]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20150103
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.596 .
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   --disable-overwrite     leave out the link to -lcurses
751   --disable-database      do not use terminfo, only fallbacks/termcap
752   --with-database=XXX     specify terminfo source to install
753   --with-hashed-db        specify hashed-database library
754   --with-fallbacks=XXX    specify list of fallback terminal descriptions
755   --without-xterm-new     specify if xterm terminfo should be old version
756   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
757   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
758   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
759   --disable-big-core      assume machine has little memory
760   --disable-big-strings   assume compiler has only standard-size strings
761   --enable-termcap        compile in termcap fallback support
762   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
763   --enable-getcap         fast termcap load, no xrefs to terminfo
764   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
765   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
766   --disable-root-environ  restrict environment when running as root
767   --enable-symlinks       make tic use symbolic links not hard links
768   --enable-broken_linker  compile with broken-linker support code
769   --enable-bsdpad         recognize BSD-style prefix padding
770   --enable-widec          compile with wide-char/UTF-8 code
771   --disable-lp64          allow chtype to be long (ignore _LP64)
772   --disable-largefile     omit support for large files
773   --disable-tparm-varargs compile tparm() without varargs interface
774   --disable-tic-depends   link tic library without explicit dependency on ncurses library
775   --with-bool=TYPE        override fallback type of bool variable
776   --with-caps=alt         compile with alternate Caps file
777   --with-chtype=TYPE      override type of chtype
778   --with-ospeed=TYPE      override type of ospeed variable
779   --with-mmask-t=TYPE     override type of mmask_t
780   --with-ccharw-max=XXX   override size CCHARW_MAX
781   --with-tparm-arg=TYPE   override parameter type of tparm
782   --with-rcs-ids          compile-in RCS identifiers
783 Options to Specify How Manpages are Installed:
784   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
785                           optionally formatted/catonly, e.g., gzip,formatted
786   --with-manpage-renames  specify manpage-renaming
787   --with-manpage-aliases  specify manpage-aliases using .so
788   --with-manpage-symlinks specify manpage-aliases using symlinks
789   --with-manpage-tbl      specify manpage processing with tbl
790 Extensions:
791   --disable-ext-funcs     disable function-extensions
792   --enable-sp-funcs       enable experimental SCREEN-extensions
793   --enable-term-driver    enable experimental terminal-driver
794   --enable-const          compile with extra/non-standard const
795   --enable-ext-colors     compile for 256-color support
796   --enable-ext-mouse      compile for extended mouse-encoding
797   --enable-no-padding     compile with $NCURSES_NO_PADDING code
798   --enable-signed-char    compile using signed Boolean's in term.h
799   --enable-sigwinch       compile with SIGWINCH handler
800   --enable-tcap-names     compile with user-definable terminal capabilities
801 Development Code:
802   --without-develop       disable development options
803   --enable-hard-tabs      compile with hard-tabs code
804   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
805 Experimental Code:
806   --disable-assumed-color do not assume anything about default-colors
807   --disable-hashmap       compile without hashmap scrolling-optimization
808   --enable-colorfgbg      compile-in experimental $COLORFGBG code
809   --enable-interop        compile-in experimental interop bindings
810   --with-pthread          use POSIX thread library
811   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
812   --enable-weak-symbols   enable weak-symbols for pthreads
813   --enable-reentrant      compile with experimental reentrant code
814   --with-wrap-prefix=XXX  override prefix used for public variables
815   --enable-safe-sprintf   compile with experimental safe-sprintf code
816   --disable-scroll-hints  compile without scroll-hints code
817   --enable-wgetch-events  compile with experimental wgetch-events code
818 Testing/development Options:
819   --disable-echo          do not display "compiling" commands
820   --enable-warnings       build: turn on GCC compiler warnings
821   --enable-string-hacks   work around bogus compiler/loader warnings
822   --enable-assertions     test: turn on generation of assertion code
823   --with-dmalloc          test: use Gray Watson's dmalloc library
824   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
825   --with-valgrind         test: use valgrind
826   --disable-leaks         test: free permanent memory, analyze leaks
827   --enable-expanded       test: generate functions for certain macros
828   --disable-macros        test: use functions rather than macros
829   --with-trace            test: add trace() function to all models of ncurses
830   --disable-gnat-projects test: disable GNAT projects even if usable
831 Ada95 Binding Options:
832   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
833   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
834   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
835   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
836
837 Some influential environment variables:
838   CC          C compiler command
839   CFLAGS      C compiler flags
840   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
841               nonstandard directory <lib dir>
842   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
843               headers in a nonstandard directory <include dir>
844   CPP         C preprocessor
845   CXX         C++ compiler command
846   CXXFLAGS    C++ compiler flags
847   CXXCPP      C++ preprocessor
848
849 Use these variables to override the choices made by `configure' or to help
850 it to find libraries and programs with nonstandard names/locations.
851
852 EOF
853 fi
854
855 if test "$ac_init_help" = "recursive"; then
856   # If there are subdirs, report their specific --help.
857   ac_popdir=`pwd`
858   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
859     cd $ac_subdir
860     # A "../" for each directory in /$ac_subdir.
861     ac_dots=`echo $ac_subdir |
862              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
863
864     case $srcdir in
865     .) # No --srcdir option.  We are building in place.
866       ac_sub_srcdir=$srcdir ;;
867     [\\/]* | ?:[\\/]* ) # Absolute path.
868       ac_sub_srcdir=$srcdir/$ac_subdir ;;
869     *) # Relative path.
870       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
871     esac
872
873     # Check for guested configure; otherwise get Cygnus style configure.
874     if test -f $ac_sub_srcdir/configure.gnu; then
875       echo
876       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
877     elif test -f $ac_sub_srcdir/configure; then
878       echo
879       $SHELL $ac_sub_srcdir/configure  --help=recursive
880     elif test -f $ac_sub_srcdir/configure.ac ||
881            test -f $ac_sub_srcdir/configure.in; then
882       echo
883       $ac_configure --help
884     else
885       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
886     fi
887     cd $ac_popdir
888   done
889 fi
890
891 test -n "$ac_init_help" && exit 0
892 if $ac_init_version; then
893   cat <<\EOF
894
895 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
896 Free Software Foundation, Inc.
897 This configure script is free software; the Free Software Foundation
898 gives unlimited permission to copy, distribute and modify it.
899 EOF
900   exit 0
901 fi
902 exec 5>config.log
903 cat >&5 <<EOF
904 This file contains any messages produced by compilers while
905 running configure, to aid debugging if configure makes a mistake.
906
907 It was created by $as_me, which was
908 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
909
910   $ $0 $@
911
912 EOF
913 {
914 cat <<_ASUNAME
915 ## ---------- ##
916 ## Platform.  ##
917 ## ---------- ##
918
919 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
920 uname -m = `(uname -m) 2>/dev/null || echo unknown`
921 uname -r = `(uname -r) 2>/dev/null || echo unknown`
922 uname -s = `(uname -s) 2>/dev/null || echo unknown`
923 uname -v = `(uname -v) 2>/dev/null || echo unknown`
924
925 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
926 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
927
928 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
929 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
930 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
931 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
932 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
933 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
934 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
935
936 PATH = $PATH
937
938 _ASUNAME
939 } >&5
940
941 cat >&5 <<EOF
942 ## ------------ ##
943 ## Core tests.  ##
944 ## ------------ ##
945
946 EOF
947
948 # Keep a trace of the command line.
949 # Strip out --no-create and --no-recursion so they do not pile up.
950 # Also quote any args containing shell meta-characters.
951 ac_configure_args=
952 ac_sep=
953 for ac_arg
954 do
955   case $ac_arg in
956   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
957   | --no-cr | --no-c) ;;
958   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
960   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
961     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
962     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
963     ac_sep=" " ;;
964   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
965      ac_sep=" " ;;
966   esac
967   # Get rid of the leading space.
968 done
969
970 # When interrupted or exit'd, cleanup temporary files, and complete
971 # config.log.  We remove comments because anyway the quotes in there
972 # would cause problems or look ugly.
973 trap 'exit_status=$?
974   # Save into config.log some information that might help in debugging.
975   echo >&5
976   echo "## ----------------- ##" >&5
977   echo "## Cache variables.  ##" >&5
978   echo "## ----------------- ##" >&5
979   echo >&5
980   # The following way of writing the cache mishandles newlines in values,
981 {
982   (set) 2>&1 |
983     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
984     *ac_space=\ *)
985       sed -n \
986         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
987           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
988       ;;
989     *)
990       sed -n \
991         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
992       ;;
993     esac;
994 } >&5
995   sed "/^$/d" confdefs.h >conftest.log
996   if test -s conftest.log; then
997     echo >&5
998     echo "## ------------ ##" >&5
999     echo "## confdefs.h.  ##" >&5
1000     echo "## ------------ ##" >&5
1001     echo >&5
1002     cat conftest.log >&5
1003   fi
1004   (echo; echo) >&5
1005   test "$ac_signal" != 0 &&
1006     echo "$as_me: caught signal $ac_signal" >&5
1007   echo "$as_me: exit $exit_status" >&5
1008   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1009     exit $exit_status
1010      ' 0
1011 for ac_signal in 1 2 13 15; do
1012   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1013 done
1014 ac_signal=0
1015
1016 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1017 rm -rf conftest* confdefs.h
1018 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1019 echo >confdefs.h
1020
1021 # Let the site file select an alternate cache file if it wants to.
1022 # Prefer explicitly selected file to automatically selected ones.
1023 if test -z "$CONFIG_SITE"; then
1024   if test "x$prefix" != xNONE; then
1025     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1026   else
1027     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1028   fi
1029 fi
1030 for ac_site_file in $CONFIG_SITE; do
1031   if test -r "$ac_site_file"; then
1032     { echo "$as_me:1032: loading site script $ac_site_file" >&5
1033 echo "$as_me: loading site script $ac_site_file" >&6;}
1034     cat "$ac_site_file" >&5
1035     . "$ac_site_file"
1036   fi
1037 done
1038
1039 if test -r "$cache_file"; then
1040   # Some versions of bash will fail to source /dev/null (special
1041   # files actually), so we avoid doing that.
1042   if test -f "$cache_file"; then
1043     { echo "$as_me:1043: loading cache $cache_file" >&5
1044 echo "$as_me: loading cache $cache_file" >&6;}
1045     case $cache_file in
1046       [\\/]* | ?:[\\/]* ) . $cache_file;;
1047       *)                      . ./$cache_file;;
1048     esac
1049   fi
1050 else
1051   { echo "$as_me:1051: creating cache $cache_file" >&5
1052 echo "$as_me: creating cache $cache_file" >&6;}
1053   >$cache_file
1054 fi
1055
1056 # Check that the precious variables saved in the cache have kept the same
1057 # value.
1058 ac_cache_corrupted=false
1059 for ac_var in `(set) 2>&1 |
1060                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1061   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1062   eval ac_new_set=\$ac_env_${ac_var}_set
1063   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1064   eval ac_new_val="\$ac_env_${ac_var}_value"
1065   case $ac_old_set,$ac_new_set in
1066     set,)
1067       { echo "$as_me:1067: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,set)
1071       { echo "$as_me:1071: error: \`$ac_var' was not set in the previous run" >&5
1072 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1073       ac_cache_corrupted=: ;;
1074     ,);;
1075     *)
1076       if test "x$ac_old_val" != "x$ac_new_val"; then
1077         { echo "$as_me:1077: error: \`$ac_var' has changed since the previous run:" >&5
1078 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1079         { echo "$as_me:1079:   former value:  $ac_old_val" >&5
1080 echo "$as_me:   former value:  $ac_old_val" >&2;}
1081         { echo "$as_me:1081:   current value: $ac_new_val" >&5
1082 echo "$as_me:   current value: $ac_new_val" >&2;}
1083         ac_cache_corrupted=:
1084       fi;;
1085   esac
1086   # Pass precious variables to config.status.  It doesn't matter if
1087   # we pass some twice (in addition to the command line arguments).
1088   if test "$ac_new_set" = set; then
1089     case $ac_new_val in
1090     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1091       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1092       ac_configure_args="$ac_configure_args '$ac_arg'"
1093       ;;
1094     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1095        ;;
1096     esac
1097   fi
1098 done
1099 if $ac_cache_corrupted; then
1100   { echo "$as_me:1100: error: changes in the environment can compromise the build" >&5
1101 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1102   { { echo "$as_me:1102: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1103 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1104    { (exit 1); exit 1; }; }
1105 fi
1106
1107 ac_ext=c
1108 ac_cpp='$CPP $CPPFLAGS'
1109 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1110 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1111 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1112 ac_main_return=return
1113
1114 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1115   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1116                    ECHO_T='     ' ;;
1117   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1118   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1119 esac
1120 echo "#! $SHELL" >conftest.sh
1121 echo  "exit 0"   >>conftest.sh
1122 chmod +x conftest.sh
1123 if { (echo "$as_me:1123: PATH=\".;.\"; conftest.sh") >&5
1124   (PATH=".;."; conftest.sh) 2>&5
1125   ac_status=$?
1126   echo "$as_me:1126: \$? = $ac_status" >&5
1127   (exit $ac_status); }; then
1128   ac_path_separator=';'
1129 else
1130   ac_path_separator=:
1131 fi
1132 PATH_SEPARATOR="$ac_path_separator"
1133 rm -f conftest.sh
1134
1135 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1136
1137 top_builddir=`pwd`
1138
1139 echo "$as_me:1139: checking for egrep" >&5
1140 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1141 if test "${ac_cv_prog_egrep+set}" = set; then
1142   echo $ECHO_N "(cached) $ECHO_C" >&6
1143 else
1144   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1145     then ac_cv_prog_egrep='grep -E'
1146     else ac_cv_prog_egrep='egrep'
1147     fi
1148 fi
1149 echo "$as_me:1149: result: $ac_cv_prog_egrep" >&5
1150 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1151  EGREP=$ac_cv_prog_egrep
1152
1153 test -z "$EGREP" && { { echo "$as_me:1153: error: No egrep program found" >&5
1154 echo "$as_me: error: No egrep program found" >&2;}
1155    { (exit 1); exit 1; }; }
1156
1157 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1158 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1159 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 cf_cv_abi_version=${NCURSES_MAJOR}
1161 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1162 cf_cv_timestamp=`date`
1163 echo "$as_me:1163: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1164 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1165
1166 if test -f $srcdir/VERSION ; then
1167         echo "$as_me:1167: checking for package version" >&5
1168 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1169
1170         # if there are not enough fields, cut returns the last one...
1171         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1172         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1173         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1174
1175         # this is how CF_BUNDLED_INTL uses $VERSION:
1176         VERSION="$cf_field1"
1177
1178         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1179         test -z "$VERSION_MAJOR" && { { echo "$as_me:1179: error: missing major-version" >&5
1180 echo "$as_me: error: missing major-version" >&2;}
1181    { (exit 1); exit 1; }; }
1182
1183         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1184         test -z "$VERSION_MINOR" && { { echo "$as_me:1184: error: missing minor-version" >&5
1185 echo "$as_me: error: missing minor-version" >&2;}
1186    { (exit 1); exit 1; }; }
1187
1188         echo "$as_me:1188: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1189 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1190
1191         echo "$as_me:1191: checking for package patch date" >&5
1192 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1193         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1194         case .$VERSION_PATCH in
1195         .)
1196                 { { echo "$as_me:1196: error: missing patch-date $VERSION_PATCH" >&5
1197 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1198    { (exit 1); exit 1; }; }
1199                 ;;
1200         .[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1201                 ;;
1202         *)
1203                 { { echo "$as_me:1203: error: illegal patch-date $VERSION_PATCH" >&5
1204 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1205    { (exit 1); exit 1; }; }
1206                 ;;
1207         esac
1208         echo "$as_me:1208: result: $VERSION_PATCH" >&5
1209 echo "${ECHO_T}$VERSION_PATCH" >&6
1210 else
1211         { { echo "$as_me:1211: error: did not find $srcdir/VERSION" >&5
1212 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1213    { (exit 1); exit 1; }; }
1214 fi
1215
1216 # show the actual data that we have for versions:
1217 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1218
1219 echo "${as_me:-configure}:1219: testing ABI VERSION $VERSION ..." 1>&5
1220
1221 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1222
1223 echo "${as_me:-configure}:1223: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1224
1225 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1226
1227 echo "${as_me:-configure}:1227: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1228
1229 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1232
1233         cf_PACKAGE=NCURSES
1234         PACKAGE=ncurses
1235
1236 cat >>confdefs.h <<EOF
1237 #define PACKAGE "$PACKAGE"
1238 EOF
1239
1240 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1241
1242         cat >>confdefs.h <<EOF
1243 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1244 EOF
1245
1246         cat >>confdefs.h <<EOF
1247 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1248 EOF
1249
1250 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1251
1252 # Check whether --with-rel-version or --without-rel-version was given.
1253 if test "${with_rel_version+set}" = set; then
1254   withval="$with_rel_version"
1255   { echo "$as_me:1255: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1256 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1257  cf_cv_rel_version=$withval
1258 fi;
1259
1260  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1261  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1262
1263 if test -n "$NCURSES_MAJOR" ; then
1264   case $NCURSES_MAJOR in #(vi
1265   [0-9]*) #(vi
1266         ;;
1267   *)
1268         { { echo "$as_me:1268: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1269 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1270    { (exit 1); exit 1; }; }
1271         ;;
1272   esac
1273 else
1274   { { echo "$as_me:1274: error: Release major-version value is empty" >&5
1275 echo "$as_me: error: Release major-version value is empty" >&2;}
1276    { (exit 1); exit 1; }; }
1277 fi
1278
1279 if test -n "$NCURSES_MINOR" ; then
1280   case $NCURSES_MINOR in #(vi
1281   [0-9]*) #(vi
1282         ;;
1283   *)
1284         { { echo "$as_me:1284: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1285 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1286    { (exit 1); exit 1; }; }
1287         ;;
1288   esac
1289 else
1290   { { echo "$as_me:1290: error: Release minor-version value is empty" >&5
1291 echo "$as_me: error: Release minor-version value is empty" >&2;}
1292    { (exit 1); exit 1; }; }
1293 fi
1294
1295 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1296
1297 # Check whether --with-abi-version or --without-abi-version was given.
1298 if test "${with_abi_version+set}" = set; then
1299   withval="$with_abi_version"
1300   { echo "$as_me:1300: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1301 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1302  cf_cv_abi_version=$withval
1303 fi;
1304
1305 if test -n "$cf_cv_abi_version" ; then
1306   case $cf_cv_abi_version in #(vi
1307   [0-9]*) #(vi
1308         ;;
1309   *)
1310         { { echo "$as_me:1310: error: ABI version is not a number: $cf_cv_abi_version" >&5
1311 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1312    { (exit 1); exit 1; }; }
1313         ;;
1314   esac
1315 else
1316   { { echo "$as_me:1316: error: ABI version value is empty" >&5
1317 echo "$as_me: error: ABI version value is empty" >&2;}
1318    { (exit 1); exit 1; }; }
1319 fi
1320
1321 ac_aux_dir=
1322 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1323   if test -f $ac_dir/install-sh; then
1324     ac_aux_dir=$ac_dir
1325     ac_install_sh="$ac_aux_dir/install-sh -c"
1326     break
1327   elif test -f $ac_dir/install.sh; then
1328     ac_aux_dir=$ac_dir
1329     ac_install_sh="$ac_aux_dir/install.sh -c"
1330     break
1331   elif test -f $ac_dir/shtool; then
1332     ac_aux_dir=$ac_dir
1333     ac_install_sh="$ac_aux_dir/shtool install -c"
1334     break
1335   fi
1336 done
1337 if test -z "$ac_aux_dir"; then
1338   { { echo "$as_me:1338: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1339 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1343 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1344 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1345
1346 # Make sure we can run config.sub.
1347 $ac_config_sub sun4 >/dev/null 2>&1 ||
1348   { { echo "$as_me:1348: error: cannot run $ac_config_sub" >&5
1349 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1350    { (exit 1); exit 1; }; }
1351
1352 echo "$as_me:1352: checking build system type" >&5
1353 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1354 if test "${ac_cv_build+set}" = set; then
1355   echo $ECHO_N "(cached) $ECHO_C" >&6
1356 else
1357   ac_cv_build_alias=$build_alias
1358 test -z "$ac_cv_build_alias" &&
1359   ac_cv_build_alias=`$ac_config_guess`
1360 test -z "$ac_cv_build_alias" &&
1361   { { echo "$as_me:1361: error: cannot guess build type; you must specify one" >&5
1362 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1363    { (exit 1); exit 1; }; }
1364 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1365   { { echo "$as_me:1365: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1366 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1367    { (exit 1); exit 1; }; }
1368
1369 fi
1370 echo "$as_me:1370: result: $ac_cv_build" >&5
1371 echo "${ECHO_T}$ac_cv_build" >&6
1372 build=$ac_cv_build
1373 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1374 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1375 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1376
1377 echo "$as_me:1377: checking host system type" >&5
1378 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1379 if test "${ac_cv_host+set}" = set; then
1380   echo $ECHO_N "(cached) $ECHO_C" >&6
1381 else
1382   ac_cv_host_alias=$host_alias
1383 test -z "$ac_cv_host_alias" &&
1384   ac_cv_host_alias=$ac_cv_build_alias
1385 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1386   { { echo "$as_me:1386: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1387 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1388    { (exit 1); exit 1; }; }
1389
1390 fi
1391 echo "$as_me:1391: result: $ac_cv_host" >&5
1392 echo "${ECHO_T}$ac_cv_host" >&6
1393 host=$ac_cv_host
1394 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1395 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1396 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1397
1398 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1399         echo "$as_me:1399: checking target system type" >&5
1400 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1401 if test "${ac_cv_target+set}" = set; then
1402   echo $ECHO_N "(cached) $ECHO_C" >&6
1403 else
1404   ac_cv_target_alias=$target_alias
1405 test "x$ac_cv_target_alias" = "x" &&
1406   ac_cv_target_alias=$ac_cv_host_alias
1407 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1408   { { echo "$as_me:1408: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1409 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1410    { (exit 1); exit 1; }; }
1411
1412 fi
1413 echo "$as_me:1413: result: $ac_cv_target" >&5
1414 echo "${ECHO_T}$ac_cv_target" >&6
1415 target=$ac_cv_target
1416 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1417 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1418 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1419
1420 # The aliases save the names the user supplied, while $host etc.
1421 # will get canonicalized.
1422 test -n "$target_alias" &&
1423   test "$program_prefix$program_suffix$program_transform_name" = \
1424     NONENONEs,x,x, &&
1425   program_prefix=${target_alias}-
1426         system_name="$host_os"
1427 else
1428         system_name="`(uname -s -r) 2>/dev/null`"
1429         if test -z "$system_name" ; then
1430                 system_name="`(hostname) 2>/dev/null`"
1431         fi
1432 fi
1433 test -n "$system_name" &&
1434 cat >>confdefs.h <<EOF
1435 #define SYSTEM_NAME "$system_name"
1436 EOF
1437
1438 if test "${cf_cv_system_name+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   cf_cv_system_name="$system_name"
1442 fi
1443
1444 test -z "$system_name" && system_name="$cf_cv_system_name"
1445 test -n "$cf_cv_system_name" && echo "$as_me:1445: result: Configuring for $cf_cv_system_name" >&5
1446 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1447
1448 if test ".$system_name" != ".$cf_cv_system_name" ; then
1449         echo "$as_me:1449: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1450 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1451         { { echo "$as_me:1451: error: \"Please remove config.cache and try again.\"" >&5
1452 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1453    { (exit 1); exit 1; }; }
1454 fi
1455
1456 # Check whether --with-system-type or --without-system-type was given.
1457 if test "${with_system_type+set}" = set; then
1458   withval="$with_system_type"
1459   { echo "$as_me:1459: WARNING: overriding system type to $withval" >&5
1460 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1461         cf_cv_system_name=$withval
1462         host_os=$withval
1463
1464 fi;
1465
1466 ###     Save the given $CFLAGS to allow user-override.
1467 cf_user_CFLAGS="$CFLAGS"
1468
1469 ###     Default install-location
1470
1471 echo "$as_me:1471: checking for prefix" >&5
1472 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1473 if test "x$prefix" = "xNONE" ; then
1474         case "$cf_cv_system_name" in
1475                 # non-vendor systems don't have a conflict
1476         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1477                 prefix=/usr
1478                 ;;
1479         *)      prefix=$ac_default_prefix
1480                 ;;
1481         esac
1482 fi
1483 echo "$as_me:1483: result: $prefix" >&5
1484 echo "${ECHO_T}$prefix" >&6
1485
1486 if test "x$prefix" = "xNONE" ; then
1487 echo "$as_me:1487: checking for default include-directory" >&5
1488 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1489 test -n "$verbose" && echo 1>&6
1490 for cf_symbol in \
1491         $includedir \
1492         $includedir/ncurses \
1493         $prefix/include \
1494         $prefix/include/ncurses \
1495         /usr/local/include \
1496         /usr/local/include/ncurses \
1497         /usr/include \
1498         /usr/include/ncurses
1499 do
1500         cf_dir=`eval echo $cf_symbol`
1501         if test -f $cf_dir/curses.h ; then
1502         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1503                 includedir="$cf_symbol"
1504                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1505                 break
1506         fi
1507         fi
1508         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1509 done
1510 echo "$as_me:1510: result: $includedir" >&5
1511 echo "${ECHO_T}$includedir" >&6
1512 fi
1513
1514 ###     Checks for programs.
1515
1516 # Check whether --with-ada or --without-ada was given.
1517 if test "${with_ada+set}" = set; then
1518   withval="$with_ada"
1519   cf_with_ada=$withval
1520 else
1521   cf_with_ada=yes
1522 fi;
1523 if test "x$cf_with_ada" = xyes
1524 then
1525         cf_PROG_CC="gnatgcc gcc cc"
1526 else
1527         cf_PROG_CC="gcc cc"
1528 fi
1529
1530 ac_ext=c
1531 ac_cpp='$CPP $CPPFLAGS'
1532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1535 ac_main_return=return
1536 if test -n "$ac_tool_prefix"; then
1537   for ac_prog in $cf_PROG_CC
1538   do
1539     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1540 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1541 echo "$as_me:1541: checking for $ac_word" >&5
1542 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1543 if test "${ac_cv_prog_CC+set}" = set; then
1544   echo $ECHO_N "(cached) $ECHO_C" >&6
1545 else
1546   if test -n "$CC"; then
1547   ac_cv_prog_CC="$CC" # Let the user override the test.
1548 else
1549   ac_save_IFS=$IFS; IFS=$ac_path_separator
1550 ac_dummy="$PATH"
1551 for ac_dir in $ac_dummy; do
1552   IFS=$ac_save_IFS
1553   test -z "$ac_dir" && ac_dir=.
1554   $as_executable_p "$ac_dir/$ac_word" || continue
1555 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1556 echo "$as_me:1556: found $ac_dir/$ac_word" >&5
1557 break
1558 done
1559
1560 fi
1561 fi
1562 CC=$ac_cv_prog_CC
1563 if test -n "$CC"; then
1564   echo "$as_me:1564: result: $CC" >&5
1565 echo "${ECHO_T}$CC" >&6
1566 else
1567   echo "$as_me:1567: result: no" >&5
1568 echo "${ECHO_T}no" >&6
1569 fi
1570
1571     test -n "$CC" && break
1572   done
1573 fi
1574 if test -z "$CC"; then
1575   ac_ct_CC=$CC
1576   for ac_prog in $cf_PROG_CC
1577 do
1578   # Extract the first word of "$ac_prog", so it can be a program name with args.
1579 set dummy $ac_prog; ac_word=$2
1580 echo "$as_me:1580: checking for $ac_word" >&5
1581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1582 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1583   echo $ECHO_N "(cached) $ECHO_C" >&6
1584 else
1585   if test -n "$ac_ct_CC"; then
1586   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1587 else
1588   ac_save_IFS=$IFS; IFS=$ac_path_separator
1589 ac_dummy="$PATH"
1590 for ac_dir in $ac_dummy; do
1591   IFS=$ac_save_IFS
1592   test -z "$ac_dir" && ac_dir=.
1593   $as_executable_p "$ac_dir/$ac_word" || continue
1594 ac_cv_prog_ac_ct_CC="$ac_prog"
1595 echo "$as_me:1595: found $ac_dir/$ac_word" >&5
1596 break
1597 done
1598
1599 fi
1600 fi
1601 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1602 if test -n "$ac_ct_CC"; then
1603   echo "$as_me:1603: result: $ac_ct_CC" >&5
1604 echo "${ECHO_T}$ac_ct_CC" >&6
1605 else
1606   echo "$as_me:1606: result: no" >&5
1607 echo "${ECHO_T}no" >&6
1608 fi
1609
1610   test -n "$ac_ct_CC" && break
1611 done
1612
1613   CC=$ac_ct_CC
1614 fi
1615
1616 test -z "$CC" && { { echo "$as_me:1616: error: no acceptable cc found in \$PATH" >&5
1617 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1618    { (exit 1); exit 1; }; }
1619
1620 # Provide some information about the compiler.
1621 echo "$as_me:1621:" \
1622      "checking for C compiler version" >&5
1623 ac_compiler=`set X $ac_compile; echo $2`
1624 { (eval echo "$as_me:1624: \"$ac_compiler --version </dev/null >&5\"") >&5
1625   (eval $ac_compiler --version </dev/null >&5) 2>&5
1626   ac_status=$?
1627   echo "$as_me:1627: \$? = $ac_status" >&5
1628   (exit $ac_status); }
1629 { (eval echo "$as_me:1629: \"$ac_compiler -v </dev/null >&5\"") >&5
1630   (eval $ac_compiler -v </dev/null >&5) 2>&5
1631   ac_status=$?
1632   echo "$as_me:1632: \$? = $ac_status" >&5
1633   (exit $ac_status); }
1634 { (eval echo "$as_me:1634: \"$ac_compiler -V </dev/null >&5\"") >&5
1635   (eval $ac_compiler -V </dev/null >&5) 2>&5
1636   ac_status=$?
1637   echo "$as_me:1637: \$? = $ac_status" >&5
1638   (exit $ac_status); }
1639
1640 cat >conftest.$ac_ext <<_ACEOF
1641 #line 1641 "configure"
1642 #include "confdefs.h"
1643
1644 int
1645 main ()
1646 {
1647
1648   ;
1649   return 0;
1650 }
1651 _ACEOF
1652 ac_clean_files_save=$ac_clean_files
1653 ac_clean_files="$ac_clean_files a.out a.exe"
1654 # Try to create an executable without -o first, disregard a.out.
1655 # It will help us diagnose broken compilers, and finding out an intuition
1656 # of exeext.
1657 echo "$as_me:1657: checking for C compiler default output" >&5
1658 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1659 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1660 if { (eval echo "$as_me:1660: \"$ac_link_default\"") >&5
1661   (eval $ac_link_default) 2>&5
1662   ac_status=$?
1663   echo "$as_me:1663: \$? = $ac_status" >&5
1664   (exit $ac_status); }; then
1665   # Find the output, starting from the most likely.  This scheme is
1666 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1667 # resort.
1668 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1669                 ls a.out conftest 2>/dev/null;
1670                 ls a.* conftest.* 2>/dev/null`; do
1671   case $ac_file in
1672     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1673     a.out ) # We found the default executable, but exeext='' is most
1674             # certainly right.
1675             break;;
1676     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1677           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1678           export ac_cv_exeext
1679           break;;
1680     * ) break;;
1681   esac
1682 done
1683 else
1684   echo "$as_me: failed program was:" >&5
1685 cat conftest.$ac_ext >&5
1686 { { echo "$as_me:1686: error: C compiler cannot create executables" >&5
1687 echo "$as_me: error: C compiler cannot create executables" >&2;}
1688    { (exit 77); exit 77; }; }
1689 fi
1690
1691 ac_exeext=$ac_cv_exeext
1692 echo "$as_me:1692: result: $ac_file" >&5
1693 echo "${ECHO_T}$ac_file" >&6
1694
1695 # Check the compiler produces executables we can run.  If not, either
1696 # the compiler is broken, or we cross compile.
1697 echo "$as_me:1697: checking whether the C compiler works" >&5
1698 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1699 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1700 # If not cross compiling, check that we can run a simple program.
1701 if test "$cross_compiling" != yes; then
1702   if { ac_try='./$ac_file'
1703   { (eval echo "$as_me:1703: \"$ac_try\"") >&5
1704   (eval $ac_try) 2>&5
1705   ac_status=$?
1706   echo "$as_me:1706: \$? = $ac_status" >&5
1707   (exit $ac_status); }; }; then
1708     cross_compiling=no
1709   else
1710     if test "$cross_compiling" = maybe; then
1711         cross_compiling=yes
1712     else
1713         { { echo "$as_me:1713: error: cannot run C compiled programs.
1714 If you meant to cross compile, use \`--host'." >&5
1715 echo "$as_me: error: cannot run C compiled programs.
1716 If you meant to cross compile, use \`--host'." >&2;}
1717    { (exit 1); exit 1; }; }
1718     fi
1719   fi
1720 fi
1721 echo "$as_me:1721: result: yes" >&5
1722 echo "${ECHO_T}yes" >&6
1723
1724 rm -f a.out a.exe conftest$ac_cv_exeext
1725 ac_clean_files=$ac_clean_files_save
1726 # Check the compiler produces executables we can run.  If not, either
1727 # the compiler is broken, or we cross compile.
1728 echo "$as_me:1728: checking whether we are cross compiling" >&5
1729 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1730 echo "$as_me:1730: result: $cross_compiling" >&5
1731 echo "${ECHO_T}$cross_compiling" >&6
1732
1733 echo "$as_me:1733: checking for executable suffix" >&5
1734 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1735 if { (eval echo "$as_me:1735: \"$ac_link\"") >&5
1736   (eval $ac_link) 2>&5
1737   ac_status=$?
1738   echo "$as_me:1738: \$? = $ac_status" >&5
1739   (exit $ac_status); }; then
1740   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1741 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1742 # work properly (i.e., refer to `conftest.exe'), while it won't with
1743 # `rm'.
1744 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1745   case $ac_file in
1746     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1747     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1748           export ac_cv_exeext
1749           break;;
1750     * ) break;;
1751   esac
1752 done
1753 else
1754   { { echo "$as_me:1754: error: cannot compute EXEEXT: cannot compile and link" >&5
1755 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1756    { (exit 1); exit 1; }; }
1757 fi
1758
1759 rm -f conftest$ac_cv_exeext
1760 echo "$as_me:1760: result: $ac_cv_exeext" >&5
1761 echo "${ECHO_T}$ac_cv_exeext" >&6
1762
1763 rm -f conftest.$ac_ext
1764 EXEEXT=$ac_cv_exeext
1765 ac_exeext=$EXEEXT
1766 echo "$as_me:1766: checking for object suffix" >&5
1767 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1768 if test "${ac_cv_objext+set}" = set; then
1769   echo $ECHO_N "(cached) $ECHO_C" >&6
1770 else
1771   cat >conftest.$ac_ext <<_ACEOF
1772 #line 1772 "configure"
1773 #include "confdefs.h"
1774
1775 int
1776 main ()
1777 {
1778
1779   ;
1780   return 0;
1781 }
1782 _ACEOF
1783 rm -f conftest.o conftest.obj
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785   (eval $ac_compile) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; then
1789   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1790   case $ac_file in
1791     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1792     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1793        break;;
1794   esac
1795 done
1796 else
1797   echo "$as_me: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1799 { { echo "$as_me:1799: error: cannot compute OBJEXT: cannot compile" >&5
1800 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1801    { (exit 1); exit 1; }; }
1802 fi
1803
1804 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1805 fi
1806 echo "$as_me:1806: result: $ac_cv_objext" >&5
1807 echo "${ECHO_T}$ac_cv_objext" >&6
1808 OBJEXT=$ac_cv_objext
1809 ac_objext=$OBJEXT
1810 echo "$as_me:1810: checking whether we are using the GNU C compiler" >&5
1811 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1812 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1813   echo $ECHO_N "(cached) $ECHO_C" >&6
1814 else
1815   cat >conftest.$ac_ext <<_ACEOF
1816 #line 1816 "configure"
1817 #include "confdefs.h"
1818
1819 int
1820 main ()
1821 {
1822 #ifndef __GNUC__
1823        choke me
1824 #endif
1825
1826   ;
1827   return 0;
1828 }
1829 _ACEOF
1830 rm -f conftest.$ac_objext
1831 if { (eval echo "$as_me:1831: \"$ac_compile\"") >&5
1832   (eval $ac_compile) 2>&5
1833   ac_status=$?
1834   echo "$as_me:1834: \$? = $ac_status" >&5
1835   (exit $ac_status); } &&
1836          { ac_try='test -s conftest.$ac_objext'
1837   { (eval echo "$as_me:1837: \"$ac_try\"") >&5
1838   (eval $ac_try) 2>&5
1839   ac_status=$?
1840   echo "$as_me:1840: \$? = $ac_status" >&5
1841   (exit $ac_status); }; }; then
1842   ac_compiler_gnu=yes
1843 else
1844   echo "$as_me: failed program was:" >&5
1845 cat conftest.$ac_ext >&5
1846 ac_compiler_gnu=no
1847 fi
1848 rm -f conftest.$ac_objext conftest.$ac_ext
1849 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1850
1851 fi
1852 echo "$as_me:1852: result: $ac_cv_c_compiler_gnu" >&5
1853 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1854 GCC=`test $ac_compiler_gnu = yes && echo yes`
1855 ac_test_CFLAGS=${CFLAGS+set}
1856 ac_save_CFLAGS=$CFLAGS
1857 CFLAGS="-g"
1858 echo "$as_me:1858: checking whether $CC accepts -g" >&5
1859 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1860 if test "${ac_cv_prog_cc_g+set}" = set; then
1861   echo $ECHO_N "(cached) $ECHO_C" >&6
1862 else
1863   cat >conftest.$ac_ext <<_ACEOF
1864 #line 1864 "configure"
1865 #include "confdefs.h"
1866
1867 int
1868 main ()
1869 {
1870
1871   ;
1872   return 0;
1873 }
1874 _ACEOF
1875 rm -f conftest.$ac_objext
1876 if { (eval echo "$as_me:1876: \"$ac_compile\"") >&5
1877   (eval $ac_compile) 2>&5
1878   ac_status=$?
1879   echo "$as_me:1879: \$? = $ac_status" >&5
1880   (exit $ac_status); } &&
1881          { ac_try='test -s conftest.$ac_objext'
1882   { (eval echo "$as_me:1882: \"$ac_try\"") >&5
1883   (eval $ac_try) 2>&5
1884   ac_status=$?
1885   echo "$as_me:1885: \$? = $ac_status" >&5
1886   (exit $ac_status); }; }; then
1887   ac_cv_prog_cc_g=yes
1888 else
1889   echo "$as_me: failed program was:" >&5
1890 cat conftest.$ac_ext >&5
1891 ac_cv_prog_cc_g=no
1892 fi
1893 rm -f conftest.$ac_objext conftest.$ac_ext
1894 fi
1895 echo "$as_me:1895: result: $ac_cv_prog_cc_g" >&5
1896 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1897 if test "$ac_test_CFLAGS" = set; then
1898   CFLAGS=$ac_save_CFLAGS
1899 elif test $ac_cv_prog_cc_g = yes; then
1900   if test "$GCC" = yes; then
1901     CFLAGS="-g -O2"
1902   else
1903     CFLAGS="-g"
1904   fi
1905 else
1906   if test "$GCC" = yes; then
1907     CFLAGS="-O2"
1908   else
1909     CFLAGS=
1910   fi
1911 fi
1912 # Some people use a C++ compiler to compile C.  Since we use `exit',
1913 # in C++ we need to declare it.  In case someone uses the same compiler
1914 # for both compiling C and C++ we need to have the C++ compiler decide
1915 # the declaration of exit, since it's the most demanding environment.
1916 cat >conftest.$ac_ext <<_ACEOF
1917 #ifndef __cplusplus
1918   choke me
1919 #endif
1920 _ACEOF
1921 rm -f conftest.$ac_objext
1922 if { (eval echo "$as_me:1922: \"$ac_compile\"") >&5
1923   (eval $ac_compile) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit $ac_status); } &&
1927          { ac_try='test -s conftest.$ac_objext'
1928   { (eval echo "$as_me:1928: \"$ac_try\"") >&5
1929   (eval $ac_try) 2>&5
1930   ac_status=$?
1931   echo "$as_me:1931: \$? = $ac_status" >&5
1932   (exit $ac_status); }; }; then
1933   for ac_declaration in \
1934    ''\
1935    '#include <stdlib.h>' \
1936    'extern "C" void std::exit (int) throw (); using std::exit;' \
1937    'extern "C" void std::exit (int); using std::exit;' \
1938    'extern "C" void exit (int) throw ();' \
1939    'extern "C" void exit (int);' \
1940    'void exit (int);'
1941 do
1942   cat >conftest.$ac_ext <<_ACEOF
1943 #line 1943 "configure"
1944 #include "confdefs.h"
1945 #include <stdlib.h>
1946 $ac_declaration
1947 int
1948 main ()
1949 {
1950 exit (42);
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   :
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 continue
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974   cat >conftest.$ac_ext <<_ACEOF
1975 #line 1975 "configure"
1976 #include "confdefs.h"
1977 $ac_declaration
1978 int
1979 main ()
1980 {
1981 exit (42);
1982   ;
1983   return 0;
1984 }
1985 _ACEOF
1986 rm -f conftest.$ac_objext
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988   (eval $ac_compile) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); } &&
1992          { ac_try='test -s conftest.$ac_objext'
1993   { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1994   (eval $ac_try) 2>&5
1995   ac_status=$?
1996   echo "$as_me:1996: \$? = $ac_status" >&5
1997   (exit $ac_status); }; }; then
1998   break
1999 else
2000   echo "$as_me: failed program was:" >&5
2001 cat conftest.$ac_ext >&5
2002 fi
2003 rm -f conftest.$ac_objext conftest.$ac_ext
2004 done
2005 rm -rf conftest*
2006 if test -n "$ac_declaration"; then
2007   echo '#ifdef __cplusplus' >>confdefs.h
2008   echo $ac_declaration      >>confdefs.h
2009   echo '#endif'             >>confdefs.h
2010 fi
2011
2012 else
2013   echo "$as_me: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 fi
2016 rm -f conftest.$ac_objext conftest.$ac_ext
2017 ac_ext=c
2018 ac_cpp='$CPP $CPPFLAGS'
2019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2022 ac_main_return=return
2023
2024 GCC_VERSION=none
2025 if test "$GCC" = yes ; then
2026         echo "$as_me:2026: checking version of $CC" >&5
2027 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2028         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.].*//'`"
2029         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2030         echo "$as_me:2030: result: $GCC_VERSION" >&5
2031 echo "${ECHO_T}$GCC_VERSION" >&6
2032 fi
2033
2034 echo "$as_me:2034: checking for $CC option to accept ANSI C" >&5
2035 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2036 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2037   echo $ECHO_N "(cached) $ECHO_C" >&6
2038 else
2039   ac_cv_prog_cc_stdc=no
2040 ac_save_CC=$CC
2041 cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 #include <stdarg.h>
2045 #include <stdio.h>
2046 #include <sys/types.h>
2047 #include <sys/stat.h>
2048 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2049 struct buf { int x; };
2050 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2051 static char *e (p, i)
2052      char **p;
2053      int i;
2054 {
2055   return p[i];
2056 }
2057 static char *f (char * (*g) (char **, int), char **p, ...)
2058 {
2059   char *s;
2060   va_list v;
2061   va_start (v,p);
2062   s = g (p, va_arg (v,int));
2063   va_end (v);
2064   return s;
2065 }
2066 int test (int i, double x);
2067 struct s1 {int (*f) (int a);};
2068 struct s2 {int (*f) (double a);};
2069 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2070 int argc;
2071 char **argv;
2072 int
2073 main ()
2074 {
2075 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2076   ;
2077   return 0;
2078 }
2079 _ACEOF
2080 # Don't try gcc -ansi; that turns off useful extensions and
2081 # breaks some systems' header files.
2082 # AIX                   -qlanglvl=ansi
2083 # Ultrix and OSF/1      -std1
2084 # HP-UX 10.20 and later -Ae
2085 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2086 # SVR4                  -Xc -D__EXTENSIONS__
2087 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2088 do
2089   CC="$ac_save_CC $ac_arg"
2090   rm -f conftest.$ac_objext
2091 if { (eval echo "$as_me:2091: \"$ac_compile\"") >&5
2092   (eval $ac_compile) 2>&5
2093   ac_status=$?
2094   echo "$as_me:2094: \$? = $ac_status" >&5
2095   (exit $ac_status); } &&
2096          { ac_try='test -s conftest.$ac_objext'
2097   { (eval echo "$as_me:2097: \"$ac_try\"") >&5
2098   (eval $ac_try) 2>&5
2099   ac_status=$?
2100   echo "$as_me:2100: \$? = $ac_status" >&5
2101   (exit $ac_status); }; }; then
2102   ac_cv_prog_cc_stdc=$ac_arg
2103 break
2104 else
2105   echo "$as_me: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2107 fi
2108 rm -f conftest.$ac_objext
2109 done
2110 rm -f conftest.$ac_ext conftest.$ac_objext
2111 CC=$ac_save_CC
2112
2113 fi
2114
2115 case "x$ac_cv_prog_cc_stdc" in
2116   x|xno)
2117     echo "$as_me:2117: result: none needed" >&5
2118 echo "${ECHO_T}none needed" >&6 ;;
2119   *)
2120     echo "$as_me:2120: result: $ac_cv_prog_cc_stdc" >&5
2121 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2122     CC="$CC $ac_cv_prog_cc_stdc" ;;
2123 esac
2124
2125 # This should have been defined by AC_PROG_CC
2126 : ${CC:=cc}
2127
2128 echo "$as_me:2128: checking \$CC variable" >&5
2129 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2130 case "$CC" in #(vi
2131 *[\ \   ]-[IUD]*)
2132         echo "$as_me:2132: result: broken" >&5
2133 echo "${ECHO_T}broken" >&6
2134         { echo "$as_me:2134: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2135 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2136         # humor him...
2137         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2138         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2139
2140 cf_fix_cppflags=no
2141 cf_new_cflags=
2142 cf_new_cppflags=
2143 cf_new_extra_cppflags=
2144
2145 for cf_add_cflags in $cf_flags
2146 do
2147 case $cf_fix_cppflags in
2148 no)
2149         case $cf_add_cflags in #(vi
2150         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2151                 case $cf_add_cflags in
2152                 -D*)
2153                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2154
2155                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2156                                 && test -z "${cf_tst_cflags}" \
2157                                 && cf_fix_cppflags=yes
2158
2159                         if test $cf_fix_cppflags = yes ; then
2160                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2161                                 continue
2162                         elif test "${cf_tst_cflags}" = "\"'" ; then
2163                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2164                                 continue
2165                         fi
2166                         ;;
2167                 esac
2168                 case "$CPPFLAGS" in
2169                 *$cf_add_cflags) #(vi
2170                         ;;
2171                 *) #(vi
2172                         case $cf_add_cflags in #(vi
2173                         -D*)
2174                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2175
2176 CPPFLAGS=`echo "$CPPFLAGS" | \
2177         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2178                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2179
2180                                 ;;
2181                         esac
2182                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2183                         ;;
2184                 esac
2185                 ;;
2186         *)
2187                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2188                 ;;
2189         esac
2190         ;;
2191 yes)
2192         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2193
2194         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2195
2196         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2197                 && test -z "${cf_tst_cflags}" \
2198                 && cf_fix_cppflags=no
2199         ;;
2200 esac
2201 done
2202
2203 if test -n "$cf_new_cflags" ; then
2204
2205         CFLAGS="$CFLAGS $cf_new_cflags"
2206 fi
2207
2208 if test -n "$cf_new_cppflags" ; then
2209
2210         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2211 fi
2212
2213 if test -n "$cf_new_extra_cppflags" ; then
2214
2215         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2216 fi
2217
2218         ;;
2219 *)
2220         echo "$as_me:2220: result: ok" >&5
2221 echo "${ECHO_T}ok" >&6
2222         ;;
2223 esac
2224
2225 ac_ext=c
2226 ac_cpp='$CPP $CPPFLAGS'
2227 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2228 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2229 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2230 ac_main_return=return
2231 echo "$as_me:2231: checking how to run the C preprocessor" >&5
2232 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2233 # On Suns, sometimes $CPP names a directory.
2234 if test -n "$CPP" && test -d "$CPP"; then
2235   CPP=
2236 fi
2237 if test -z "$CPP"; then
2238   if test "${ac_cv_prog_CPP+set}" = set; then
2239   echo $ECHO_N "(cached) $ECHO_C" >&6
2240 else
2241       # Double quotes because CPP needs to be expanded
2242     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2243     do
2244       ac_preproc_ok=false
2245 for ac_c_preproc_warn_flag in '' yes
2246 do
2247   # Use a header file that comes with gcc, so configuring glibc
2248   # with a fresh cross-compiler works.
2249   # On the NeXT, cc -E runs the code through the compiler's parser,
2250   # not just through cpp. "Syntax error" is here to catch this case.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255                      Syntax error
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   :
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Broken: fails on valid input.
2279 continue
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283   # OK, works on sane cases.  Now check whether non-existent headers
2284   # can be detected and how.
2285   cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2289 _ACEOF
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2292   ac_status=$?
2293   egrep -v '^ *\+' conftest.er1 >conftest.err
2294   rm -f conftest.er1
2295   cat conftest.err >&5
2296   echo "$as_me:2296: \$? = $ac_status" >&5
2297   (exit $ac_status); } >/dev/null; then
2298   if test -s conftest.err; then
2299     ac_cpp_err=$ac_c_preproc_warn_flag
2300   else
2301     ac_cpp_err=
2302   fi
2303 else
2304   ac_cpp_err=yes
2305 fi
2306 if test -z "$ac_cpp_err"; then
2307   # Broken: success on invalid input.
2308 continue
2309 else
2310   echo "$as_me: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   # Passes both tests.
2313 ac_preproc_ok=:
2314 break
2315 fi
2316 rm -f conftest.err conftest.$ac_ext
2317
2318 done
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2322   break
2323 fi
2324
2325     done
2326     ac_cv_prog_CPP=$CPP
2327
2328 fi
2329   CPP=$ac_cv_prog_CPP
2330 else
2331   ac_cv_prog_CPP=$CPP
2332 fi
2333 echo "$as_me:2333: result: $CPP" >&5
2334 echo "${ECHO_T}$CPP" >&6
2335 ac_preproc_ok=false
2336 for ac_c_preproc_warn_flag in '' yes
2337 do
2338   # Use a header file that comes with gcc, so configuring glibc
2339   # with a fresh cross-compiler works.
2340   # On the NeXT, cc -E runs the code through the compiler's parser,
2341   # not just through cpp. "Syntax error" is here to catch this case.
2342   cat >conftest.$ac_ext <<_ACEOF
2343 #line 2343 "configure"
2344 #include "confdefs.h"
2345 #include <assert.h>
2346                      Syntax error
2347 _ACEOF
2348 if { (eval echo "$as_me:2348: \"$ac_cpp conftest.$ac_ext\"") >&5
2349   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2350   ac_status=$?
2351   egrep -v '^ *\+' conftest.er1 >conftest.err
2352   rm -f conftest.er1
2353   cat conftest.err >&5
2354   echo "$as_me:2354: \$? = $ac_status" >&5
2355   (exit $ac_status); } >/dev/null; then
2356   if test -s conftest.err; then
2357     ac_cpp_err=$ac_c_preproc_warn_flag
2358   else
2359     ac_cpp_err=
2360   fi
2361 else
2362   ac_cpp_err=yes
2363 fi
2364 if test -z "$ac_cpp_err"; then
2365   :
2366 else
2367   echo "$as_me: failed program was:" >&5
2368   cat conftest.$ac_ext >&5
2369   # Broken: fails on valid input.
2370 continue
2371 fi
2372 rm -f conftest.err conftest.$ac_ext
2373
2374   # OK, works on sane cases.  Now check whether non-existent headers
2375   # can be detected and how.
2376   cat >conftest.$ac_ext <<_ACEOF
2377 #line 2377 "configure"
2378 #include "confdefs.h"
2379 #include <ac_nonexistent.h>
2380 _ACEOF
2381 if { (eval echo "$as_me:2381: \"$ac_cpp conftest.$ac_ext\"") >&5
2382   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2383   ac_status=$?
2384   egrep -v '^ *\+' conftest.er1 >conftest.err
2385   rm -f conftest.er1
2386   cat conftest.err >&5
2387   echo "$as_me:2387: \$? = $ac_status" >&5
2388   (exit $ac_status); } >/dev/null; then
2389   if test -s conftest.err; then
2390     ac_cpp_err=$ac_c_preproc_warn_flag
2391   else
2392     ac_cpp_err=
2393   fi
2394 else
2395   ac_cpp_err=yes
2396 fi
2397 if test -z "$ac_cpp_err"; then
2398   # Broken: success on invalid input.
2399 continue
2400 else
2401   echo "$as_me: failed program was:" >&5
2402   cat conftest.$ac_ext >&5
2403   # Passes both tests.
2404 ac_preproc_ok=:
2405 break
2406 fi
2407 rm -f conftest.err conftest.$ac_ext
2408
2409 done
2410 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2411 rm -f conftest.err conftest.$ac_ext
2412 if $ac_preproc_ok; then
2413   :
2414 else
2415   { { echo "$as_me:2415: error: C preprocessor \"$CPP\" fails sanity check" >&5
2416 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2417    { (exit 1); exit 1; }; }
2418 fi
2419
2420 ac_ext=c
2421 ac_cpp='$CPP $CPPFLAGS'
2422 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2423 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2424 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2425 ac_main_return=return
2426
2427 if test $ac_cv_c_compiler_gnu = yes; then
2428     echo "$as_me:2428: checking whether $CC needs -traditional" >&5
2429 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2430 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2431   echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433     ac_pattern="Autoconf.*'x'"
2434   cat >conftest.$ac_ext <<_ACEOF
2435 #line 2435 "configure"
2436 #include "confdefs.h"
2437 #include <sgtty.h>
2438 int Autoconf = TIOCGETP;
2439 _ACEOF
2440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2441   egrep "$ac_pattern" >/dev/null 2>&1; then
2442   ac_cv_prog_gcc_traditional=yes
2443 else
2444   ac_cv_prog_gcc_traditional=no
2445 fi
2446 rm -rf conftest*
2447
2448   if test $ac_cv_prog_gcc_traditional = no; then
2449     cat >conftest.$ac_ext <<_ACEOF
2450 #line 2450 "configure"
2451 #include "confdefs.h"
2452 #include <termio.h>
2453 int Autoconf = TCGETA;
2454 _ACEOF
2455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2456   egrep "$ac_pattern" >/dev/null 2>&1; then
2457   ac_cv_prog_gcc_traditional=yes
2458 fi
2459 rm -rf conftest*
2460
2461   fi
2462 fi
2463 echo "$as_me:2463: result: $ac_cv_prog_gcc_traditional" >&5
2464 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2465   if test $ac_cv_prog_gcc_traditional = yes; then
2466     CC="$CC -traditional"
2467   fi
2468 fi
2469
2470 echo "$as_me:2470: checking whether $CC understands -c and -o together" >&5
2471 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2472 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2473   echo $ECHO_N "(cached) $ECHO_C" >&6
2474 else
2475
2476 cat > conftest.$ac_ext <<CF_EOF
2477 #include <stdio.h>
2478 int main()
2479 {
2480         ${cf_cv_main_return:-return}(0);
2481 }
2482 CF_EOF
2483 # We do the test twice because some compilers refuse to overwrite an
2484 # existing .o file with -o, though they will create one.
2485 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2486 if { (eval echo "$as_me:2486: \"$ac_try\"") >&5
2487   (eval $ac_try) 2>&5
2488   ac_status=$?
2489   echo "$as_me:2489: \$? = $ac_status" >&5
2490   (exit $ac_status); } &&
2491   test -f conftest2.$ac_objext && { (eval echo "$as_me:2491: \"$ac_try\"") >&5
2492   (eval $ac_try) 2>&5
2493   ac_status=$?
2494   echo "$as_me:2494: \$? = $ac_status" >&5
2495   (exit $ac_status); };
2496 then
2497   eval cf_cv_prog_CC_c_o=yes
2498 else
2499   eval cf_cv_prog_CC_c_o=no
2500 fi
2501 rm -rf conftest*
2502
2503 fi
2504 if test $cf_cv_prog_CC_c_o = yes; then
2505   echo "$as_me:2505: result: yes" >&5
2506 echo "${ECHO_T}yes" >&6
2507 else
2508   echo "$as_me:2508: result: no" >&5
2509 echo "${ECHO_T}no" >&6
2510 fi
2511
2512 if test "$cross_compiling" = yes ; then
2513   LDCONFIG=:
2514 else
2515 case "$cf_cv_system_name" in #(vi
2516 dragonfly*|mirbsd*|freebsd*) #(vi
2517   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2518   ;;
2519 *) LDPATH=$PATH:/sbin:/usr/sbin
2520   # Extract the first word of "ldconfig", so it can be a program name with args.
2521 set dummy ldconfig; ac_word=$2
2522 echo "$as_me:2522: checking for $ac_word" >&5
2523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2524 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2525   echo $ECHO_N "(cached) $ECHO_C" >&6
2526 else
2527   case $LDCONFIG in
2528   [\\/]* | ?:[\\/]*)
2529   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2530   ;;
2531   *)
2532   ac_save_IFS=$IFS; IFS=$ac_path_separator
2533 ac_dummy="$LDPATH"
2534 for ac_dir in $ac_dummy; do
2535   IFS=$ac_save_IFS
2536   test -z "$ac_dir" && ac_dir=.
2537   if $as_executable_p "$ac_dir/$ac_word"; then
2538    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2539    echo "$as_me:2539: found $ac_dir/$ac_word" >&5
2540    break
2541 fi
2542 done
2543
2544   ;;
2545 esac
2546 fi
2547 LDCONFIG=$ac_cv_path_LDCONFIG
2548
2549 if test -n "$LDCONFIG"; then
2550   echo "$as_me:2550: result: $LDCONFIG" >&5
2551 echo "${ECHO_T}$LDCONFIG" >&6
2552 else
2553   echo "$as_me:2553: result: no" >&5
2554 echo "${ECHO_T}no" >&6
2555 fi
2556
2557   ;;
2558 esac
2559 fi
2560
2561 echo "$as_me:2561: checking if you want to ensure bool is consistent with C++" >&5
2562 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2563
2564 # Check whether --with-cxx or --without-cxx was given.
2565 if test "${with_cxx+set}" = set; then
2566   withval="$with_cxx"
2567   cf_with_cxx=$withval
2568 else
2569   cf_with_cxx=yes
2570 fi;
2571 echo "$as_me:2571: result: $cf_with_cxx" >&5
2572 echo "${ECHO_T}$cf_with_cxx" >&6
2573 if test "X$cf_with_cxx" = Xno ; then
2574         CXX=""
2575         GXX=""
2576 else
2577         # with autoconf 2.13, we can change the error to a warning:
2578                 ac_ext=cc
2579 ac_cpp='$CXXCPP $CPPFLAGS'
2580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2581 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2583 ac_main_return=return
2584 if test -n "$ac_tool_prefix"; then
2585   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2586   do
2587     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2588 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2589 echo "$as_me:2589: checking for $ac_word" >&5
2590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2591 if test "${ac_cv_prog_CXX+set}" = set; then
2592   echo $ECHO_N "(cached) $ECHO_C" >&6
2593 else
2594   if test -n "$CXX"; then
2595   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2596 else
2597   ac_save_IFS=$IFS; IFS=$ac_path_separator
2598 ac_dummy="$PATH"
2599 for ac_dir in $ac_dummy; do
2600   IFS=$ac_save_IFS
2601   test -z "$ac_dir" && ac_dir=.
2602   $as_executable_p "$ac_dir/$ac_word" || continue
2603 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2604 echo "$as_me:2604: found $ac_dir/$ac_word" >&5
2605 break
2606 done
2607
2608 fi
2609 fi
2610 CXX=$ac_cv_prog_CXX
2611 if test -n "$CXX"; then
2612   echo "$as_me:2612: result: $CXX" >&5
2613 echo "${ECHO_T}$CXX" >&6
2614 else
2615   echo "$as_me:2615: result: no" >&5
2616 echo "${ECHO_T}no" >&6
2617 fi
2618
2619     test -n "$CXX" && break
2620   done
2621 fi
2622 if test -z "$CXX"; then
2623   ac_ct_CXX=$CXX
2624   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2625 do
2626   # Extract the first word of "$ac_prog", so it can be a program name with args.
2627 set dummy $ac_prog; ac_word=$2
2628 echo "$as_me:2628: checking for $ac_word" >&5
2629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2630 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   if test -n "$ac_ct_CXX"; then
2634   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2635 else
2636   ac_save_IFS=$IFS; IFS=$ac_path_separator
2637 ac_dummy="$PATH"
2638 for ac_dir in $ac_dummy; do
2639   IFS=$ac_save_IFS
2640   test -z "$ac_dir" && ac_dir=.
2641   $as_executable_p "$ac_dir/$ac_word" || continue
2642 ac_cv_prog_ac_ct_CXX="$ac_prog"
2643 echo "$as_me:2643: found $ac_dir/$ac_word" >&5
2644 break
2645 done
2646
2647 fi
2648 fi
2649 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2650 if test -n "$ac_ct_CXX"; then
2651   echo "$as_me:2651: result: $ac_ct_CXX" >&5
2652 echo "${ECHO_T}$ac_ct_CXX" >&6
2653 else
2654   echo "$as_me:2654: result: no" >&5
2655 echo "${ECHO_T}no" >&6
2656 fi
2657
2658   test -n "$ac_ct_CXX" && break
2659 done
2660 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2661
2662   CXX=$ac_ct_CXX
2663 fi
2664
2665 # Provide some information about the compiler.
2666 echo "$as_me:2666:" \
2667      "checking for C++ compiler version" >&5
2668 ac_compiler=`set X $ac_compile; echo $2`
2669 { (eval echo "$as_me:2669: \"$ac_compiler --version </dev/null >&5\"") >&5
2670   (eval $ac_compiler --version </dev/null >&5) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }
2674 { (eval echo "$as_me:2674: \"$ac_compiler -v </dev/null >&5\"") >&5
2675   (eval $ac_compiler -v </dev/null >&5) 2>&5
2676   ac_status=$?
2677   echo "$as_me:2677: \$? = $ac_status" >&5
2678   (exit $ac_status); }
2679 { (eval echo "$as_me:2679: \"$ac_compiler -V </dev/null >&5\"") >&5
2680   (eval $ac_compiler -V </dev/null >&5) 2>&5
2681   ac_status=$?
2682   echo "$as_me:2682: \$? = $ac_status" >&5
2683   (exit $ac_status); }
2684
2685 echo "$as_me:2685: checking whether we are using the GNU C++ compiler" >&5
2686 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2687 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2688   echo $ECHO_N "(cached) $ECHO_C" >&6
2689 else
2690   cat >conftest.$ac_ext <<_ACEOF
2691 #line 2691 "configure"
2692 #include "confdefs.h"
2693
2694 int
2695 main ()
2696 {
2697 #ifndef __GNUC__
2698        choke me
2699 #endif
2700
2701   ;
2702   return 0;
2703 }
2704 _ACEOF
2705 rm -f conftest.$ac_objext
2706 if { (eval echo "$as_me:2706: \"$ac_compile\"") >&5
2707   (eval $ac_compile) 2>&5
2708   ac_status=$?
2709   echo "$as_me:2709: \$? = $ac_status" >&5
2710   (exit $ac_status); } &&
2711          { ac_try='test -s conftest.$ac_objext'
2712   { (eval echo "$as_me:2712: \"$ac_try\"") >&5
2713   (eval $ac_try) 2>&5
2714   ac_status=$?
2715   echo "$as_me:2715: \$? = $ac_status" >&5
2716   (exit $ac_status); }; }; then
2717   ac_compiler_gnu=yes
2718 else
2719   echo "$as_me: failed program was:" >&5
2720 cat conftest.$ac_ext >&5
2721 ac_compiler_gnu=no
2722 fi
2723 rm -f conftest.$ac_objext conftest.$ac_ext
2724 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2725
2726 fi
2727 echo "$as_me:2727: result: $ac_cv_cxx_compiler_gnu" >&5
2728 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2729 GXX=`test $ac_compiler_gnu = yes && echo yes`
2730 ac_test_CXXFLAGS=${CXXFLAGS+set}
2731 ac_save_CXXFLAGS=$CXXFLAGS
2732 CXXFLAGS="-g"
2733 echo "$as_me:2733: checking whether $CXX accepts -g" >&5
2734 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2735 if test "${ac_cv_prog_cxx_g+set}" = set; then
2736   echo $ECHO_N "(cached) $ECHO_C" >&6
2737 else
2738   cat >conftest.$ac_ext <<_ACEOF
2739 #line 2739 "configure"
2740 #include "confdefs.h"
2741
2742 int
2743 main ()
2744 {
2745
2746   ;
2747   return 0;
2748 }
2749 _ACEOF
2750 rm -f conftest.$ac_objext
2751 if { (eval echo "$as_me:2751: \"$ac_compile\"") >&5
2752   (eval $ac_compile) 2>&5
2753   ac_status=$?
2754   echo "$as_me:2754: \$? = $ac_status" >&5
2755   (exit $ac_status); } &&
2756          { ac_try='test -s conftest.$ac_objext'
2757   { (eval echo "$as_me:2757: \"$ac_try\"") >&5
2758   (eval $ac_try) 2>&5
2759   ac_status=$?
2760   echo "$as_me:2760: \$? = $ac_status" >&5
2761   (exit $ac_status); }; }; then
2762   ac_cv_prog_cxx_g=yes
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 ac_cv_prog_cxx_g=no
2767 fi
2768 rm -f conftest.$ac_objext conftest.$ac_ext
2769 fi
2770 echo "$as_me:2770: result: $ac_cv_prog_cxx_g" >&5
2771 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2772 if test "$ac_test_CXXFLAGS" = set; then
2773   CXXFLAGS=$ac_save_CXXFLAGS
2774 elif test $ac_cv_prog_cxx_g = yes; then
2775   if test "$GXX" = yes; then
2776     CXXFLAGS="-g -O2"
2777   else
2778     CXXFLAGS="-g"
2779   fi
2780 else
2781   if test "$GXX" = yes; then
2782     CXXFLAGS="-O2"
2783   else
2784     CXXFLAGS=
2785   fi
2786 fi
2787 for ac_declaration in \
2788    ''\
2789    '#include <stdlib.h>' \
2790    'extern "C" void std::exit (int) throw (); using std::exit;' \
2791    'extern "C" void std::exit (int); using std::exit;' \
2792    'extern "C" void exit (int) throw ();' \
2793    'extern "C" void exit (int);' \
2794    'void exit (int);'
2795 do
2796   cat >conftest.$ac_ext <<_ACEOF
2797 #line 2797 "configure"
2798 #include "confdefs.h"
2799 #include <stdlib.h>
2800 $ac_declaration
2801 int
2802 main ()
2803 {
2804 exit (42);
2805   ;
2806   return 0;
2807 }
2808 _ACEOF
2809 rm -f conftest.$ac_objext
2810 if { (eval echo "$as_me:2810: \"$ac_compile\"") >&5
2811   (eval $ac_compile) 2>&5
2812   ac_status=$?
2813   echo "$as_me:2813: \$? = $ac_status" >&5
2814   (exit $ac_status); } &&
2815          { ac_try='test -s conftest.$ac_objext'
2816   { (eval echo "$as_me:2816: \"$ac_try\"") >&5
2817   (eval $ac_try) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); }; }; then
2821   :
2822 else
2823   echo "$as_me: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2825 continue
2826 fi
2827 rm -f conftest.$ac_objext conftest.$ac_ext
2828   cat >conftest.$ac_ext <<_ACEOF
2829 #line 2829 "configure"
2830 #include "confdefs.h"
2831 $ac_declaration
2832 int
2833 main ()
2834 {
2835 exit (42);
2836   ;
2837   return 0;
2838 }
2839 _ACEOF
2840 rm -f conftest.$ac_objext
2841 if { (eval echo "$as_me:2841: \"$ac_compile\"") >&5
2842   (eval $ac_compile) 2>&5
2843   ac_status=$?
2844   echo "$as_me:2844: \$? = $ac_status" >&5
2845   (exit $ac_status); } &&
2846          { ac_try='test -s conftest.$ac_objext'
2847   { (eval echo "$as_me:2847: \"$ac_try\"") >&5
2848   (eval $ac_try) 2>&5
2849   ac_status=$?
2850   echo "$as_me:2850: \$? = $ac_status" >&5
2851   (exit $ac_status); }; }; then
2852   break
2853 else
2854   echo "$as_me: failed program was:" >&5
2855 cat conftest.$ac_ext >&5
2856 fi
2857 rm -f conftest.$ac_objext conftest.$ac_ext
2858 done
2859 rm -rf conftest*
2860 if test -n "$ac_declaration"; then
2861   echo '#ifdef __cplusplus' >>confdefs.h
2862   echo $ac_declaration      >>confdefs.h
2863   echo '#endif'             >>confdefs.h
2864 fi
2865
2866 ac_ext=c
2867 ac_cpp='$CPP $CPPFLAGS'
2868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2871 ac_main_return=return
2872
2873         ac_ext=cc
2874 ac_cpp='$CXXCPP $CPPFLAGS'
2875 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2876 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2877 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2878 ac_main_return=return
2879
2880         if test "x$cf_with_cxx" != xno
2881         then
2882                 # Several of the C++ configurations do not work, particularly when
2883                 # cross-compiling (20140913 -TD)
2884                 echo "$as_me:2884: checking if $CXX works" >&5
2885 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2886
2887                 save_CPPFLAGS="$CPPFLAGS"
2888                 eval cf_includedir=${includedir}
2889                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2890
2891 cat >conftest.$ac_ext <<_ACEOF
2892 #line 2892 "configure"
2893 #include "confdefs.h"
2894
2895 #include <stdlib.h>
2896 #include <stdio.h>
2897
2898 int
2899 main ()
2900 {
2901
2902                 printf("Hello world!\n")
2903
2904   ;
2905   return 0;
2906 }
2907 _ACEOF
2908 rm -f conftest.$ac_objext
2909 if { (eval echo "$as_me:2909: \"$ac_compile\"") >&5
2910   (eval $ac_compile) 2>&5
2911   ac_status=$?
2912   echo "$as_me:2912: \$? = $ac_status" >&5
2913   (exit $ac_status); } &&
2914          { ac_try='test -s conftest.$ac_objext'
2915   { (eval echo "$as_me:2915: \"$ac_try\"") >&5
2916   (eval $ac_try) 2>&5
2917   ac_status=$?
2918   echo "$as_me:2918: \$? = $ac_status" >&5
2919   (exit $ac_status); }; }; then
2920   cf_cxx_works=yes
2921 else
2922   echo "$as_me: failed program was:" >&5
2923 cat conftest.$ac_ext >&5
2924 cf_cxx_works=no
2925 fi
2926 rm -f conftest.$ac_objext conftest.$ac_ext
2927                 CPPFLAGS="$save_CPPFLAGS"
2928
2929                 echo "$as_me:2929: result: $cf_cxx_works" >&5
2930 echo "${ECHO_T}$cf_cxx_works" >&6
2931                 if test "x$cf_cxx_works" = xno
2932                 then
2933                         { echo "$as_me:2933: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2934 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2935                         cf_with_cxx=no; CXX=""; GXX="";
2936                 fi
2937         fi
2938         ac_ext=c
2939 ac_cpp='$CPP $CPPFLAGS'
2940 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2941 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2942 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2943 ac_main_return=return
2944
2945         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2946         if test "$CXX" = "g++" ; then
2947                 # Extract the first word of "g++", so it can be a program name with args.
2948 set dummy g++; ac_word=$2
2949 echo "$as_me:2949: checking for $ac_word" >&5
2950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2951 if test "${ac_cv_path_CXX+set}" = set; then
2952   echo $ECHO_N "(cached) $ECHO_C" >&6
2953 else
2954   case $CXX in
2955   [\\/]* | ?:[\\/]*)
2956   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2957   ;;
2958   *)
2959   ac_save_IFS=$IFS; IFS=$ac_path_separator
2960 ac_dummy="$PATH"
2961 for ac_dir in $ac_dummy; do
2962   IFS=$ac_save_IFS
2963   test -z "$ac_dir" && ac_dir=.
2964   if $as_executable_p "$ac_dir/$ac_word"; then
2965    ac_cv_path_CXX="$ac_dir/$ac_word"
2966    echo "$as_me:2966: found $ac_dir/$ac_word" >&5
2967    break
2968 fi
2969 done
2970
2971   ;;
2972 esac
2973 fi
2974 CXX=$ac_cv_path_CXX
2975
2976 if test -n "$CXX"; then
2977   echo "$as_me:2977: result: $CXX" >&5
2978 echo "${ECHO_T}$CXX" >&6
2979 else
2980   echo "$as_me:2980: result: no" >&5
2981 echo "${ECHO_T}no" >&6
2982 fi
2983
2984         fi
2985         case "x$CXX" in #(vi
2986         x|xg++)
2987                 { echo "$as_me:2987: WARNING: You don't have any C++ compiler, too bad" >&5
2988 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2989                 cf_with_cxx=no; CXX=""; GXX="";
2990                 ;;
2991         esac
2992 fi
2993
2994 GXX_VERSION=none
2995 if test "$GXX" = yes; then
2996         echo "$as_me:2996: checking version of ${CXX:-g++}" >&5
2997 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2998         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2999         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3000         echo "$as_me:3000: result: $GXX_VERSION" >&5
3001 echo "${ECHO_T}$GXX_VERSION" >&6
3002 fi
3003
3004 case $GXX_VERSION in
3005 1*|2.[0-6]*)
3006         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3007         # cf_cxx_library=no
3008         { echo "$as_me:3008: WARNING: templates do not work" >&5
3009 echo "$as_me: WARNING: templates do not work" >&2;}
3010         ;;
3011 esac
3012
3013 echo "$as_me:3013: checking if you want to build C++ binding and demo" >&5
3014 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3015
3016 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3017 if test "${with_cxx_binding+set}" = set; then
3018   withval="$with_cxx_binding"
3019   cf_with_cxx_binding=$withval
3020 else
3021   cf_with_cxx_binding=$cf_with_cxx
3022 fi;
3023 echo "$as_me:3023: result: $cf_with_cxx_binding" >&5
3024 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3025
3026 echo "$as_me:3026: checking if you want to build with Ada95" >&5
3027 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3028 echo "$as_me:3028: result: $cf_with_ada" >&5
3029 echo "${ECHO_T}$cf_with_ada" >&6
3030
3031 echo "$as_me:3031: checking if you want to install terminal database" >&5
3032 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3033
3034 # Check whether --enable-db-install or --disable-db-install was given.
3035 if test "${enable_db_install+set}" = set; then
3036   enableval="$enable_db_install"
3037   cf_with_db_install=$enableval
3038 else
3039   cf_with_db_install=yes
3040 fi;
3041 echo "$as_me:3041: result: $cf_with_db_install" >&5
3042 echo "${ECHO_T}$cf_with_db_install" >&6
3043
3044 echo "$as_me:3044: checking if you want to install manpages" >&5
3045 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3046
3047 # Check whether --with-manpages or --without-manpages was given.
3048 if test "${with_manpages+set}" = set; then
3049   withval="$with_manpages"
3050   cf_with_manpages=$withval
3051 else
3052   cf_with_manpages=yes
3053 fi;
3054 echo "$as_me:3054: result: $cf_with_manpages" >&5
3055 echo "${ECHO_T}$cf_with_manpages" >&6
3056
3057 echo "$as_me:3057: checking if you want to build programs such as tic" >&5
3058 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3059
3060 # Check whether --with-progs or --without-progs was given.
3061 if test "${with_progs+set}" = set; then
3062   withval="$with_progs"
3063   cf_with_progs=$withval
3064 else
3065   cf_with_progs=yes
3066 fi;
3067 echo "$as_me:3067: result: $cf_with_progs" >&5
3068 echo "${ECHO_T}$cf_with_progs" >&6
3069
3070 echo "$as_me:3070: checking if you want to build test-programs" >&5
3071 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3072
3073 # Check whether --with-tests or --without-tests was given.
3074 if test "${with_tests+set}" = set; then
3075   withval="$with_tests"
3076   cf_with_tests=$withval
3077 else
3078   cf_with_tests=yes
3079 fi;
3080 echo "$as_me:3080: result: $cf_with_tests" >&5
3081 echo "${ECHO_T}$cf_with_tests" >&6
3082
3083 echo "$as_me:3083: checking if you wish to install curses.h" >&5
3084 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3085
3086 # Check whether --with-curses-h or --without-curses-h was given.
3087 if test "${with_curses_h+set}" = set; then
3088   withval="$with_curses_h"
3089   with_curses_h=$withval
3090 else
3091   with_curses_h=yes
3092 fi;
3093 echo "$as_me:3093: result: $with_curses_h" >&5
3094 echo "${ECHO_T}$with_curses_h" >&6
3095
3096 modules_to_build="ncurses"
3097 if test "X$cf_with_progs" != Xno ; then
3098 modules_to_build="$modules_to_build progs tack"
3099 fi
3100 modules_to_build="$modules_to_build panel menu form"
3101
3102 test "$program_prefix" != NONE &&
3103   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3104 # Use a double $ so make ignores it.
3105 test "$program_suffix" != NONE &&
3106   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3107 # Double any \ or $.  echo might interpret backslashes.
3108 # By default was `s,x,x', remove it if useless.
3109 cat <<\_ACEOF >conftest.sed
3110 s/[\\$]/&&/g;s/;s,x,x,$//
3111 _ACEOF
3112 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3113 rm conftest.sed
3114
3115 for ac_prog in mawk gawk nawk awk
3116 do
3117   # Extract the first word of "$ac_prog", so it can be a program name with args.
3118 set dummy $ac_prog; ac_word=$2
3119 echo "$as_me:3119: checking for $ac_word" >&5
3120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3121 if test "${ac_cv_prog_AWK+set}" = set; then
3122   echo $ECHO_N "(cached) $ECHO_C" >&6
3123 else
3124   if test -n "$AWK"; then
3125   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3126 else
3127   ac_save_IFS=$IFS; IFS=$ac_path_separator
3128 ac_dummy="$PATH"
3129 for ac_dir in $ac_dummy; do
3130   IFS=$ac_save_IFS
3131   test -z "$ac_dir" && ac_dir=.
3132   $as_executable_p "$ac_dir/$ac_word" || continue
3133 ac_cv_prog_AWK="$ac_prog"
3134 echo "$as_me:3134: found $ac_dir/$ac_word" >&5
3135 break
3136 done
3137
3138 fi
3139 fi
3140 AWK=$ac_cv_prog_AWK
3141 if test -n "$AWK"; then
3142   echo "$as_me:3142: result: $AWK" >&5
3143 echo "${ECHO_T}$AWK" >&6
3144 else
3145   echo "$as_me:3145: result: no" >&5
3146 echo "${ECHO_T}no" >&6
3147 fi
3148
3149   test -n "$AWK" && break
3150 done
3151
3152 test -z "$AWK" && { { echo "$as_me:3152: error: No awk program found" >&5
3153 echo "$as_me: error: No awk program found" >&2;}
3154    { (exit 1); exit 1; }; }
3155
3156 echo "$as_me:3156: checking for egrep" >&5
3157 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3158 if test "${ac_cv_prog_egrep+set}" = set; then
3159   echo $ECHO_N "(cached) $ECHO_C" >&6
3160 else
3161   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3162     then ac_cv_prog_egrep='grep -E'
3163     else ac_cv_prog_egrep='egrep'
3164     fi
3165 fi
3166 echo "$as_me:3166: result: $ac_cv_prog_egrep" >&5
3167 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3168  EGREP=$ac_cv_prog_egrep
3169
3170 test -z "$EGREP" && { { echo "$as_me:3170: error: No egrep program found" >&5
3171 echo "$as_me: error: No egrep program found" >&2;}
3172    { (exit 1); exit 1; }; }
3173
3174 # Find a good install program.  We prefer a C program (faster),
3175 # so one script is as good as another.  But avoid the broken or
3176 # incompatible versions:
3177 # SysV /etc/install, /usr/sbin/install
3178 # SunOS /usr/etc/install
3179 # IRIX /sbin/install
3180 # AIX /bin/install
3181 # AmigaOS /C/install, which installs bootblocks on floppy discs
3182 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3183 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3184 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3185 # ./install, which can be erroneously created by make from ./install.sh.
3186 echo "$as_me:3186: checking for a BSD compatible install" >&5
3187 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3188 if test -z "$INSTALL"; then
3189 if test "${ac_cv_path_install+set}" = set; then
3190   echo $ECHO_N "(cached) $ECHO_C" >&6
3191 else
3192     ac_save_IFS=$IFS; IFS=$ac_path_separator
3193   for ac_dir in $PATH; do
3194     IFS=$ac_save_IFS
3195     # Account for people who put trailing slashes in PATH elements.
3196     case $ac_dir/ in
3197     / | ./ | .// | /cC/* \
3198     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3199     | /usr/ucb/* ) ;;
3200     *)
3201       # OSF1 and SCO ODT 3.0 have their own names for install.
3202       # Don't use installbsd from OSF since it installs stuff as root
3203       # by default.
3204       for ac_prog in ginstall scoinst install; do
3205         if $as_executable_p "$ac_dir/$ac_prog"; then
3206           if test $ac_prog = install &&
3207             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3208             # AIX install.  It has an incompatible calling convention.
3209             :
3210           elif test $ac_prog = install &&
3211             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3212             # program-specific install script used by HP pwplus--don't use.
3213             :
3214           else
3215             ac_cv_path_install="$ac_dir/$ac_prog -c"
3216             break 2
3217           fi
3218         fi
3219       done
3220       ;;
3221     esac
3222   done
3223
3224 fi
3225   if test "${ac_cv_path_install+set}" = set; then
3226     INSTALL=$ac_cv_path_install
3227   else
3228     # As a last resort, use the slow shell script.  We don't cache a
3229     # path for INSTALL within a source directory, because that will
3230     # break other packages using the cache if that directory is
3231     # removed, or if the path is relative.
3232     INSTALL=$ac_install_sh
3233   fi
3234 fi
3235 echo "$as_me:3235: result: $INSTALL" >&5
3236 echo "${ECHO_T}$INSTALL" >&6
3237
3238 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3239 # It thinks the first close brace ends the variable substitution.
3240 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3241
3242 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3243
3244 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3245
3246 case $INSTALL in
3247 /*)
3248   ;;
3249 *)
3250   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3251   test -z "$cf_dir" && cf_dir=.
3252   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3253   ;;
3254 esac
3255
3256 for ac_prog in tdlint lint alint splint lclint
3257 do
3258   # Extract the first word of "$ac_prog", so it can be a program name with args.
3259 set dummy $ac_prog; ac_word=$2
3260 echo "$as_me:3260: checking for $ac_word" >&5
3261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3262 if test "${ac_cv_prog_LINT+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   if test -n "$LINT"; then
3266   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3267 else
3268   ac_save_IFS=$IFS; IFS=$ac_path_separator
3269 ac_dummy="$PATH"
3270 for ac_dir in $ac_dummy; do
3271   IFS=$ac_save_IFS
3272   test -z "$ac_dir" && ac_dir=.
3273   $as_executable_p "$ac_dir/$ac_word" || continue
3274 ac_cv_prog_LINT="$ac_prog"
3275 echo "$as_me:3275: found $ac_dir/$ac_word" >&5
3276 break
3277 done
3278
3279 fi
3280 fi
3281 LINT=$ac_cv_prog_LINT
3282 if test -n "$LINT"; then
3283   echo "$as_me:3283: result: $LINT" >&5
3284 echo "${ECHO_T}$LINT" >&6
3285 else
3286   echo "$as_me:3286: result: no" >&5
3287 echo "${ECHO_T}no" >&6
3288 fi
3289
3290   test -n "$LINT" && break
3291 done
3292
3293 echo "$as_me:3293: checking whether ln -s works" >&5
3294 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3295 LN_S=$as_ln_s
3296 if test "$LN_S" = "ln -s"; then
3297   echo "$as_me:3297: result: yes" >&5
3298 echo "${ECHO_T}yes" >&6
3299 else
3300   echo "$as_me:3300: result: no, using $LN_S" >&5
3301 echo "${ECHO_T}no, using $LN_S" >&6
3302 fi
3303
3304 echo "$as_me:3304: checking if $LN_S -f options work" >&5
3305 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3306
3307 rm -f conf$$.src conf$$dst
3308 echo >conf$$.dst
3309 echo first >conf$$.src
3310 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3311         cf_prog_ln_sf=yes
3312 else
3313         cf_prog_ln_sf=no
3314 fi
3315 rm -f conf$$.dst conf$$src
3316 echo "$as_me:3316: result: $cf_prog_ln_sf" >&5
3317 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3318
3319 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3320
3321 echo "$as_me:3321: checking for long file names" >&5
3322 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3323 if test "${ac_cv_sys_long_file_names+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326   ac_cv_sys_long_file_names=yes
3327 # Test for long file names in all the places we know might matter:
3328 #      .                the current directory, where building will happen
3329 #      $prefix/lib      where we will be installing things
3330 #      $exec_prefix/lib likewise
3331 # eval it to expand exec_prefix.
3332 #      $TMPDIR          if set, where it might want to write temporary files
3333 # if $TMPDIR is not set:
3334 #      /tmp             where it might want to write temporary files
3335 #      /var/tmp         likewise
3336 #      /usr/tmp         likewise
3337 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3338   ac_tmpdirs=$TMPDIR
3339 else
3340   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3341 fi
3342 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3343   test -d $ac_dir || continue
3344   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3345   ac_xdir=$ac_dir/cf$$
3346   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3347   ac_tf1=$ac_xdir/conftest9012345
3348   ac_tf2=$ac_xdir/conftest9012346
3349   (echo 1 >$ac_tf1) 2>/dev/null
3350   (echo 2 >$ac_tf2) 2>/dev/null
3351   ac_val=`cat $ac_tf1 2>/dev/null`
3352   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3353     ac_cv_sys_long_file_names=no
3354     rm -rf $ac_xdir 2>/dev/null
3355     break
3356   fi
3357   rm -rf $ac_xdir 2>/dev/null
3358 done
3359 fi
3360 echo "$as_me:3360: result: $ac_cv_sys_long_file_names" >&5
3361 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3362 if test $ac_cv_sys_long_file_names = yes; then
3363
3364 cat >>confdefs.h <<\EOF
3365 #define HAVE_LONG_FILE_NAMES 1
3366 EOF
3367
3368 fi
3369
3370 # if we find pkg-config, check if we should install the ".pc" files.
3371
3372 echo "$as_me:3372: checking if you want to use pkg-config" >&5
3373 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3374
3375 # Check whether --with-pkg-config or --without-pkg-config was given.
3376 if test "${with_pkg_config+set}" = set; then
3377   withval="$with_pkg_config"
3378   cf_pkg_config=$withval
3379 else
3380   cf_pkg_config=yes
3381 fi;
3382 echo "$as_me:3382: result: $cf_pkg_config" >&5
3383 echo "${ECHO_T}$cf_pkg_config" >&6
3384
3385 case $cf_pkg_config in #(vi
3386 no) #(vi
3387         PKG_CONFIG=none
3388         ;;
3389 yes) #(vi
3390
3391 if test -n "$ac_tool_prefix"; then
3392   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3393 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3394 echo "$as_me:3394: checking for $ac_word" >&5
3395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   case $PKG_CONFIG in
3400   [\\/]* | ?:[\\/]*)
3401   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3402   ;;
3403   *)
3404   ac_save_IFS=$IFS; IFS=$ac_path_separator
3405 ac_dummy="$PATH"
3406 for ac_dir in $ac_dummy; do
3407   IFS=$ac_save_IFS
3408   test -z "$ac_dir" && ac_dir=.
3409   if $as_executable_p "$ac_dir/$ac_word"; then
3410    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3411    echo "$as_me:3411: found $ac_dir/$ac_word" >&5
3412    break
3413 fi
3414 done
3415
3416   ;;
3417 esac
3418 fi
3419 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3420
3421 if test -n "$PKG_CONFIG"; then
3422   echo "$as_me:3422: result: $PKG_CONFIG" >&5
3423 echo "${ECHO_T}$PKG_CONFIG" >&6
3424 else
3425   echo "$as_me:3425: result: no" >&5
3426 echo "${ECHO_T}no" >&6
3427 fi
3428
3429 fi
3430 if test -z "$ac_cv_path_PKG_CONFIG"; then
3431   ac_pt_PKG_CONFIG=$PKG_CONFIG
3432   # Extract the first word of "pkg-config", so it can be a program name with args.
3433 set dummy pkg-config; ac_word=$2
3434 echo "$as_me:3434: checking for $ac_word" >&5
3435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3436 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3437   echo $ECHO_N "(cached) $ECHO_C" >&6
3438 else
3439   case $ac_pt_PKG_CONFIG in
3440   [\\/]* | ?:[\\/]*)
3441   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3442   ;;
3443   *)
3444   ac_save_IFS=$IFS; IFS=$ac_path_separator
3445 ac_dummy="$PATH"
3446 for ac_dir in $ac_dummy; do
3447   IFS=$ac_save_IFS
3448   test -z "$ac_dir" && ac_dir=.
3449   if $as_executable_p "$ac_dir/$ac_word"; then
3450    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3451    echo "$as_me:3451: found $ac_dir/$ac_word" >&5
3452    break
3453 fi
3454 done
3455
3456   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3457   ;;
3458 esac
3459 fi
3460 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3461
3462 if test -n "$ac_pt_PKG_CONFIG"; then
3463   echo "$as_me:3463: result: $ac_pt_PKG_CONFIG" >&5
3464 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3465 else
3466   echo "$as_me:3466: result: no" >&5
3467 echo "${ECHO_T}no" >&6
3468 fi
3469
3470   PKG_CONFIG=$ac_pt_PKG_CONFIG
3471 else
3472   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3473 fi
3474
3475         ;;
3476 *)
3477         PKG_CONFIG=$withval
3478         ;;
3479 esac
3480
3481 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3482 if test "$PKG_CONFIG" != none ; then
3483
3484 if test "x$prefix" != xNONE; then
3485   cf_path_syntax="$prefix"
3486 else
3487   cf_path_syntax="$ac_default_prefix"
3488 fi
3489
3490 case ".$PKG_CONFIG" in #(vi
3491 .\$\(*\)*|.\'*\'*) #(vi
3492   ;;
3493 ..|./*|.\\*) #(vi
3494   ;;
3495 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3496   ;;
3497 .\${*prefix}*|.\${*dir}*) #(vi
3498   eval PKG_CONFIG="$PKG_CONFIG"
3499   case ".$PKG_CONFIG" in #(vi
3500   .NONE/*)
3501     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3502     ;;
3503   esac
3504   ;; #(vi
3505 .no|.NONE/*)
3506   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3507   ;;
3508 *)
3509   { { echo "$as_me:3509: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3510 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3511    { (exit 1); exit 1; }; }
3512   ;;
3513 esac
3514
3515 else
3516         { echo "$as_me:3516: WARNING: pkg-config is not installed" >&5
3517 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3518 fi
3519
3520 echo "$as_me:3520: checking for $PKG_CONFIG library directory" >&5
3521 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3522
3523 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3524 if test "${with_pkg_config_libdir+set}" = set; then
3525   withval="$with_pkg_config_libdir"
3526   PKG_CONFIG_LIBDIR=$withval
3527 else
3528   PKG_CONFIG_LIBDIR=yes
3529 fi;
3530
3531 case x$PKG_CONFIG_LIBDIR in #(vi
3532 x/*) #(vi
3533         ;;
3534 xyes) #(vi
3535         # Look for the library directory using the same prefix as the executable
3536         if test "x$PKG_CONFIG" = xnone
3537         then
3538                 cf_path=$prefix
3539         else
3540                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3541         fi
3542
3543         # If you don't like using the default architecture, you have to specify the
3544         # intended library directory and corresponding compiler/linker options.
3545         #
3546         # This case allows for Debian's 2014-flavor of multiarch, along with the
3547         # most common variations before that point.  Some other variants spell the
3548         # directory differently, e.g., "pkg-config", and put it in unusual places.
3549         # pkg-config has always been poorly standardized, which is ironic...
3550         case x`(arch) 2>/dev/null` in #(vi
3551         *64) #(vi
3552                 cf_search_path="\
3553                         $cf_path/lib/*64-linux-gnu \
3554                         $cf_path/share \
3555                         $cf_path/lib64 \
3556                         $cf_path/lib32 \
3557                         $cf_path/lib"
3558                 ;;
3559         *)
3560                 cf_search_path="\
3561                         $cf_path/lib/*-linux-gnu \
3562                         $cf_path/share \
3563                         $cf_path/lib32 \
3564                         $cf_path/lib"
3565                 ;;
3566         esac
3567
3568         test -n "$verbose" && echo "    list..." 1>&6
3569
3570 echo "${as_me:-configure}:3570: testing list... ..." 1>&5
3571
3572         for cf_config in $cf_search_path
3573         do
3574                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3575
3576 echo "${as_me:-configure}:3576: testing checking $cf_config/pkgconfig ..." 1>&5
3577
3578                 if test -d $cf_config/pkgconfig
3579                 then
3580                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3581                         echo "$as_me:3581: checking done" >&5
3582 echo $ECHO_N "checking done... $ECHO_C" >&6
3583                         break
3584                 fi
3585         done
3586         ;;
3587 *)
3588         ;;
3589 esac
3590
3591 echo "$as_me:3591: result: $PKG_CONFIG_LIBDIR" >&5
3592 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3593
3594 if test "x$PKG_CONFIG" != xnone
3595 then
3596         echo "$as_me:3596: checking if we should install .pc files for $PKG_CONFIG" >&5
3597 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3598 else
3599         echo "$as_me:3599: checking if we should install .pc files" >&5
3600 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3601 fi
3602
3603 # Check whether --enable-pc-files or --disable-pc-files was given.
3604 if test "${enable_pc_files+set}" = set; then
3605   enableval="$enable_pc_files"
3606   enable_pc_files=$enableval
3607 else
3608   enable_pc_files=no
3609 fi;
3610 echo "$as_me:3610: result: $enable_pc_files" >&5
3611 echo "${ECHO_T}$enable_pc_files" >&6
3612 if test "x$enable_pc_files" != xno
3613 then
3614
3615 if test "x$prefix" != xNONE; then
3616   cf_path_syntax="$prefix"
3617 else
3618   cf_path_syntax="$ac_default_prefix"
3619 fi
3620
3621 case ".$PKG_CONFIG_LIBDIR" in #(vi
3622 .\$\(*\)*|.\'*\'*) #(vi
3623   ;;
3624 ..|./*|.\\*) #(vi
3625   ;;
3626 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3627   ;;
3628 .\${*prefix}*|.\${*dir}*) #(vi
3629   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3630   case ".$PKG_CONFIG_LIBDIR" in #(vi
3631   .NONE/*)
3632     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3633     ;;
3634   esac
3635   ;; #(vi
3636 .no|.NONE/*)
3637   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3638   ;;
3639 *)
3640   { { echo "$as_me:3640: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3641 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3642    { (exit 1); exit 1; }; }
3643   ;;
3644 esac
3645
3646         MAKE_PC_FILES=
3647 else
3648         MAKE_PC_FILES="#"
3649 fi
3650
3651 if test -z "$MAKE_PC_FILES"
3652 then
3653         echo "$as_me:3653: checking for suffix to add to pc-files" >&5
3654 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3655
3656 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3657 if test "${with_pc_suffix+set}" = set; then
3658   withval="$with_pc_suffix"
3659   case "x$withval" in #(vi
3660         xyes|xno) #(vi
3661                 PC_MODULE_SUFFIX=
3662                 ;;
3663         *)      PC_MODULE_SUFFIX="$withval"
3664                 ;;
3665         esac
3666 fi;
3667         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3668         echo "$as_me:3668: result: $PC_MODULE_SUFFIX" >&5
3669 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3670         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3671
3672 fi
3673
3674 echo "$as_me:3674: checking if we should assume mixed-case filenames" >&5
3675 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3676
3677 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3678 if test "${enable_mixed_case+set}" = set; then
3679   enableval="$enable_mixed_case"
3680   enable_mixedcase=$enableval
3681 else
3682   enable_mixedcase=auto
3683 fi;
3684 echo "$as_me:3684: result: $enable_mixedcase" >&5
3685 echo "${ECHO_T}$enable_mixedcase" >&6
3686 if test "$enable_mixedcase" = "auto" ; then
3687
3688 echo "$as_me:3688: checking if filesystem supports mixed-case filenames" >&5
3689 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3690 if test "${cf_cv_mixedcase+set}" = set; then
3691   echo $ECHO_N "(cached) $ECHO_C" >&6
3692 else
3693
3694 if test "$cross_compiling" = yes ; then
3695         case $target_alias in #(vi
3696         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3697                 cf_cv_mixedcase=no
3698                 ;;
3699         *)
3700                 cf_cv_mixedcase=yes
3701                 ;;
3702         esac
3703 else
3704         rm -f conftest CONFTEST
3705         echo test >conftest
3706         if test -f CONFTEST ; then
3707                 cf_cv_mixedcase=no
3708         else
3709                 cf_cv_mixedcase=yes
3710         fi
3711         rm -f conftest CONFTEST
3712 fi
3713
3714 fi
3715 echo "$as_me:3715: result: $cf_cv_mixedcase" >&5
3716 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3717 test "$cf_cv_mixedcase" = yes &&
3718 cat >>confdefs.h <<\EOF
3719 #define MIXEDCASE_FILENAMES 1
3720 EOF
3721
3722 else
3723     cf_cv_mixedcase=$enable_mixedcase
3724     if test "x$enable_mixedcase" = "xyes" ; then
3725
3726 cat >>confdefs.h <<\EOF
3727 #define MIXEDCASE_FILENAMES 1
3728 EOF
3729
3730     fi
3731 fi
3732
3733 # do this after mixed-case option (tags/TAGS is not as important as tic).
3734 echo "$as_me:3734: checking whether ${MAKE-make} sets \${MAKE}" >&5
3735 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3736 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3737 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3738   echo $ECHO_N "(cached) $ECHO_C" >&6
3739 else
3740   cat >conftest.make <<\EOF
3741 all:
3742         @echo 'ac_maketemp="${MAKE}"'
3743 EOF
3744 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3745 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3746 if test -n "$ac_maketemp"; then
3747   eval ac_cv_prog_make_${ac_make}_set=yes
3748 else
3749   eval ac_cv_prog_make_${ac_make}_set=no
3750 fi
3751 rm -f conftest.make
3752 fi
3753 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3754   echo "$as_me:3754: result: yes" >&5
3755 echo "${ECHO_T}yes" >&6
3756   SET_MAKE=
3757 else
3758   echo "$as_me:3758: result: no" >&5
3759 echo "${ECHO_T}no" >&6
3760   SET_MAKE="MAKE=${MAKE-make}"
3761 fi
3762
3763 for ac_prog in exctags ctags
3764 do
3765   # Extract the first word of "$ac_prog", so it can be a program name with args.
3766 set dummy $ac_prog; ac_word=$2
3767 echo "$as_me:3767: checking for $ac_word" >&5
3768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3769 if test "${ac_cv_prog_CTAGS+set}" = set; then
3770   echo $ECHO_N "(cached) $ECHO_C" >&6
3771 else
3772   if test -n "$CTAGS"; then
3773   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3774 else
3775   ac_save_IFS=$IFS; IFS=$ac_path_separator
3776 ac_dummy="$PATH"
3777 for ac_dir in $ac_dummy; do
3778   IFS=$ac_save_IFS
3779   test -z "$ac_dir" && ac_dir=.
3780   $as_executable_p "$ac_dir/$ac_word" || continue
3781 ac_cv_prog_CTAGS="$ac_prog"
3782 echo "$as_me:3782: found $ac_dir/$ac_word" >&5
3783 break
3784 done
3785
3786 fi
3787 fi
3788 CTAGS=$ac_cv_prog_CTAGS
3789 if test -n "$CTAGS"; then
3790   echo "$as_me:3790: result: $CTAGS" >&5
3791 echo "${ECHO_T}$CTAGS" >&6
3792 else
3793   echo "$as_me:3793: result: no" >&5
3794 echo "${ECHO_T}no" >&6
3795 fi
3796
3797   test -n "$CTAGS" && break
3798 done
3799
3800 for ac_prog in exetags etags
3801 do
3802   # Extract the first word of "$ac_prog", so it can be a program name with args.
3803 set dummy $ac_prog; ac_word=$2
3804 echo "$as_me:3804: checking for $ac_word" >&5
3805 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3806 if test "${ac_cv_prog_ETAGS+set}" = set; then
3807   echo $ECHO_N "(cached) $ECHO_C" >&6
3808 else
3809   if test -n "$ETAGS"; then
3810   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3811 else
3812   ac_save_IFS=$IFS; IFS=$ac_path_separator
3813 ac_dummy="$PATH"
3814 for ac_dir in $ac_dummy; do
3815   IFS=$ac_save_IFS
3816   test -z "$ac_dir" && ac_dir=.
3817   $as_executable_p "$ac_dir/$ac_word" || continue
3818 ac_cv_prog_ETAGS="$ac_prog"
3819 echo "$as_me:3819: found $ac_dir/$ac_word" >&5
3820 break
3821 done
3822
3823 fi
3824 fi
3825 ETAGS=$ac_cv_prog_ETAGS
3826 if test -n "$ETAGS"; then
3827   echo "$as_me:3827: result: $ETAGS" >&5
3828 echo "${ECHO_T}$ETAGS" >&6
3829 else
3830   echo "$as_me:3830: result: no" >&5
3831 echo "${ECHO_T}no" >&6
3832 fi
3833
3834   test -n "$ETAGS" && break
3835 done
3836
3837 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3838 set dummy ${CTAGS:-ctags}; ac_word=$2
3839 echo "$as_me:3839: checking for $ac_word" >&5
3840 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3841 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3842   echo $ECHO_N "(cached) $ECHO_C" >&6
3843 else
3844   if test -n "$MAKE_LOWER_TAGS"; then
3845   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3846 else
3847   ac_save_IFS=$IFS; IFS=$ac_path_separator
3848 ac_dummy="$PATH"
3849 for ac_dir in $ac_dummy; do
3850   IFS=$ac_save_IFS
3851   test -z "$ac_dir" && ac_dir=.
3852   $as_executable_p "$ac_dir/$ac_word" || continue
3853 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3854 echo "$as_me:3854: found $ac_dir/$ac_word" >&5
3855 break
3856 done
3857
3858   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3859 fi
3860 fi
3861 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3862 if test -n "$MAKE_LOWER_TAGS"; then
3863   echo "$as_me:3863: result: $MAKE_LOWER_TAGS" >&5
3864 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3865 else
3866   echo "$as_me:3866: result: no" >&5
3867 echo "${ECHO_T}no" >&6
3868 fi
3869
3870 if test "$cf_cv_mixedcase" = yes ; then
3871         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3872 set dummy ${ETAGS:-etags}; ac_word=$2
3873 echo "$as_me:3873: checking for $ac_word" >&5
3874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3875 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3876   echo $ECHO_N "(cached) $ECHO_C" >&6
3877 else
3878   if test -n "$MAKE_UPPER_TAGS"; then
3879   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3880 else
3881   ac_save_IFS=$IFS; IFS=$ac_path_separator
3882 ac_dummy="$PATH"
3883 for ac_dir in $ac_dummy; do
3884   IFS=$ac_save_IFS
3885   test -z "$ac_dir" && ac_dir=.
3886   $as_executable_p "$ac_dir/$ac_word" || continue
3887 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3888 echo "$as_me:3888: found $ac_dir/$ac_word" >&5
3889 break
3890 done
3891
3892   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3893 fi
3894 fi
3895 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3896 if test -n "$MAKE_UPPER_TAGS"; then
3897   echo "$as_me:3897: result: $MAKE_UPPER_TAGS" >&5
3898 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3899 else
3900   echo "$as_me:3900: result: no" >&5
3901 echo "${ECHO_T}no" >&6
3902 fi
3903
3904 else
3905         MAKE_UPPER_TAGS=no
3906 fi
3907
3908 if test "$MAKE_UPPER_TAGS" = yes ; then
3909         MAKE_UPPER_TAGS=
3910 else
3911         MAKE_UPPER_TAGS="#"
3912 fi
3913
3914 if test "$MAKE_LOWER_TAGS" = yes ; then
3915         MAKE_LOWER_TAGS=
3916 else
3917         MAKE_LOWER_TAGS="#"
3918 fi
3919
3920 echo "$as_me:3920: checking for makeflags variable" >&5
3921 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3922 if test "${cf_cv_makeflags+set}" = set; then
3923   echo $ECHO_N "(cached) $ECHO_C" >&6
3924 else
3925
3926         cf_cv_makeflags=''
3927         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3928         do
3929                 cat >cf_makeflags.tmp <<CF_EOF
3930 SHELL = /bin/sh
3931 all :
3932         @ echo '.$cf_option'
3933 CF_EOF
3934                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3935                 case "$cf_result" in
3936                 .*k|.*kw)
3937                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3938                         case "$cf_result" in
3939                         .*CC=*) cf_cv_makeflags=
3940                                 ;;
3941                         *)      cf_cv_makeflags=$cf_option
3942                                 ;;
3943                         esac
3944                         break
3945                         ;;
3946                 .-)     ;;
3947                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3948                         ;;
3949                 esac
3950         done
3951         rm -f cf_makeflags.tmp
3952
3953 fi
3954 echo "$as_me:3954: result: $cf_cv_makeflags" >&5
3955 echo "${ECHO_T}$cf_cv_makeflags" >&6
3956
3957 if test -n "$ac_tool_prefix"; then
3958   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3959 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3960 echo "$as_me:3960: checking for $ac_word" >&5
3961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3962 if test "${ac_cv_prog_RANLIB+set}" = set; then
3963   echo $ECHO_N "(cached) $ECHO_C" >&6
3964 else
3965   if test -n "$RANLIB"; then
3966   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3967 else
3968   ac_save_IFS=$IFS; IFS=$ac_path_separator
3969 ac_dummy="$PATH"
3970 for ac_dir in $ac_dummy; do
3971   IFS=$ac_save_IFS
3972   test -z "$ac_dir" && ac_dir=.
3973   $as_executable_p "$ac_dir/$ac_word" || continue
3974 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3975 echo "$as_me:3975: found $ac_dir/$ac_word" >&5
3976 break
3977 done
3978
3979 fi
3980 fi
3981 RANLIB=$ac_cv_prog_RANLIB
3982 if test -n "$RANLIB"; then
3983   echo "$as_me:3983: result: $RANLIB" >&5
3984 echo "${ECHO_T}$RANLIB" >&6
3985 else
3986   echo "$as_me:3986: result: no" >&5
3987 echo "${ECHO_T}no" >&6
3988 fi
3989
3990 fi
3991 if test -z "$ac_cv_prog_RANLIB"; then
3992   ac_ct_RANLIB=$RANLIB
3993   # Extract the first word of "ranlib", so it can be a program name with args.
3994 set dummy ranlib; ac_word=$2
3995 echo "$as_me:3995: checking for $ac_word" >&5
3996 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3997 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3998   echo $ECHO_N "(cached) $ECHO_C" >&6
3999 else
4000   if test -n "$ac_ct_RANLIB"; then
4001   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4002 else
4003   ac_save_IFS=$IFS; IFS=$ac_path_separator
4004 ac_dummy="$PATH"
4005 for ac_dir in $ac_dummy; do
4006   IFS=$ac_save_IFS
4007   test -z "$ac_dir" && ac_dir=.
4008   $as_executable_p "$ac_dir/$ac_word" || continue
4009 ac_cv_prog_ac_ct_RANLIB="ranlib"
4010 echo "$as_me:4010: found $ac_dir/$ac_word" >&5
4011 break
4012 done
4013
4014   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4015 fi
4016 fi
4017 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4018 if test -n "$ac_ct_RANLIB"; then
4019   echo "$as_me:4019: result: $ac_ct_RANLIB" >&5
4020 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4021 else
4022   echo "$as_me:4022: result: no" >&5
4023 echo "${ECHO_T}no" >&6
4024 fi
4025
4026   RANLIB=$ac_ct_RANLIB
4027 else
4028   RANLIB="$ac_cv_prog_RANLIB"
4029 fi
4030
4031 if test -n "$ac_tool_prefix"; then
4032   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4033 set dummy ${ac_tool_prefix}ld; ac_word=$2
4034 echo "$as_me:4034: checking for $ac_word" >&5
4035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4036 if test "${ac_cv_prog_LD+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039   if test -n "$LD"; then
4040   ac_cv_prog_LD="$LD" # Let the user override the test.
4041 else
4042   ac_save_IFS=$IFS; IFS=$ac_path_separator
4043 ac_dummy="$PATH"
4044 for ac_dir in $ac_dummy; do
4045   IFS=$ac_save_IFS
4046   test -z "$ac_dir" && ac_dir=.
4047   $as_executable_p "$ac_dir/$ac_word" || continue
4048 ac_cv_prog_LD="${ac_tool_prefix}ld"
4049 echo "$as_me:4049: found $ac_dir/$ac_word" >&5
4050 break
4051 done
4052
4053 fi
4054 fi
4055 LD=$ac_cv_prog_LD
4056 if test -n "$LD"; then
4057   echo "$as_me:4057: result: $LD" >&5
4058 echo "${ECHO_T}$LD" >&6
4059 else
4060   echo "$as_me:4060: result: no" >&5
4061 echo "${ECHO_T}no" >&6
4062 fi
4063
4064 fi
4065 if test -z "$ac_cv_prog_LD"; then
4066   ac_ct_LD=$LD
4067   # Extract the first word of "ld", so it can be a program name with args.
4068 set dummy ld; ac_word=$2
4069 echo "$as_me:4069: checking for $ac_word" >&5
4070 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4071 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4072   echo $ECHO_N "(cached) $ECHO_C" >&6
4073 else
4074   if test -n "$ac_ct_LD"; then
4075   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4076 else
4077   ac_save_IFS=$IFS; IFS=$ac_path_separator
4078 ac_dummy="$PATH"
4079 for ac_dir in $ac_dummy; do
4080   IFS=$ac_save_IFS
4081   test -z "$ac_dir" && ac_dir=.
4082   $as_executable_p "$ac_dir/$ac_word" || continue
4083 ac_cv_prog_ac_ct_LD="ld"
4084 echo "$as_me:4084: found $ac_dir/$ac_word" >&5
4085 break
4086 done
4087
4088   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4089 fi
4090 fi
4091 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4092 if test -n "$ac_ct_LD"; then
4093   echo "$as_me:4093: result: $ac_ct_LD" >&5
4094 echo "${ECHO_T}$ac_ct_LD" >&6
4095 else
4096   echo "$as_me:4096: result: no" >&5
4097 echo "${ECHO_T}no" >&6
4098 fi
4099
4100   LD=$ac_ct_LD
4101 else
4102   LD="$ac_cv_prog_LD"
4103 fi
4104
4105 if test -n "$ac_tool_prefix"; then
4106   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4107 set dummy ${ac_tool_prefix}ar; ac_word=$2
4108 echo "$as_me:4108: checking for $ac_word" >&5
4109 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4110 if test "${ac_cv_prog_AR+set}" = set; then
4111   echo $ECHO_N "(cached) $ECHO_C" >&6
4112 else
4113   if test -n "$AR"; then
4114   ac_cv_prog_AR="$AR" # Let the user override the test.
4115 else
4116   ac_save_IFS=$IFS; IFS=$ac_path_separator
4117 ac_dummy="$PATH"
4118 for ac_dir in $ac_dummy; do
4119   IFS=$ac_save_IFS
4120   test -z "$ac_dir" && ac_dir=.
4121   $as_executable_p "$ac_dir/$ac_word" || continue
4122 ac_cv_prog_AR="${ac_tool_prefix}ar"
4123 echo "$as_me:4123: found $ac_dir/$ac_word" >&5
4124 break
4125 done
4126
4127 fi
4128 fi
4129 AR=$ac_cv_prog_AR
4130 if test -n "$AR"; then
4131   echo "$as_me:4131: result: $AR" >&5
4132 echo "${ECHO_T}$AR" >&6
4133 else
4134   echo "$as_me:4134: result: no" >&5
4135 echo "${ECHO_T}no" >&6
4136 fi
4137
4138 fi
4139 if test -z "$ac_cv_prog_AR"; then
4140   ac_ct_AR=$AR
4141   # Extract the first word of "ar", so it can be a program name with args.
4142 set dummy ar; ac_word=$2
4143 echo "$as_me:4143: checking for $ac_word" >&5
4144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4145 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4146   echo $ECHO_N "(cached) $ECHO_C" >&6
4147 else
4148   if test -n "$ac_ct_AR"; then
4149   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4150 else
4151   ac_save_IFS=$IFS; IFS=$ac_path_separator
4152 ac_dummy="$PATH"
4153 for ac_dir in $ac_dummy; do
4154   IFS=$ac_save_IFS
4155   test -z "$ac_dir" && ac_dir=.
4156   $as_executable_p "$ac_dir/$ac_word" || continue
4157 ac_cv_prog_ac_ct_AR="ar"
4158 echo "$as_me:4158: found $ac_dir/$ac_word" >&5
4159 break
4160 done
4161
4162   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4163 fi
4164 fi
4165 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4166 if test -n "$ac_ct_AR"; then
4167   echo "$as_me:4167: result: $ac_ct_AR" >&5
4168 echo "${ECHO_T}$ac_ct_AR" >&6
4169 else
4170   echo "$as_me:4170: result: no" >&5
4171 echo "${ECHO_T}no" >&6
4172 fi
4173
4174   AR=$ac_ct_AR
4175 else
4176   AR="$ac_cv_prog_AR"
4177 fi
4178
4179 if test -n "$ac_tool_prefix"; then
4180   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4181 set dummy ${ac_tool_prefix}nm; ac_word=$2
4182 echo "$as_me:4182: checking for $ac_word" >&5
4183 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4184 if test "${ac_cv_prog_NM+set}" = set; then
4185   echo $ECHO_N "(cached) $ECHO_C" >&6
4186 else
4187   if test -n "$NM"; then
4188   ac_cv_prog_NM="$NM" # Let the user override the test.
4189 else
4190   ac_save_IFS=$IFS; IFS=$ac_path_separator
4191 ac_dummy="$PATH"
4192 for ac_dir in $ac_dummy; do
4193   IFS=$ac_save_IFS
4194   test -z "$ac_dir" && ac_dir=.
4195   $as_executable_p "$ac_dir/$ac_word" || continue
4196 ac_cv_prog_NM="${ac_tool_prefix}nm"
4197 echo "$as_me:4197: found $ac_dir/$ac_word" >&5
4198 break
4199 done
4200
4201 fi
4202 fi
4203 NM=$ac_cv_prog_NM
4204 if test -n "$NM"; then
4205   echo "$as_me:4205: result: $NM" >&5
4206 echo "${ECHO_T}$NM" >&6
4207 else
4208   echo "$as_me:4208: result: no" >&5
4209 echo "${ECHO_T}no" >&6
4210 fi
4211
4212 fi
4213 if test -z "$ac_cv_prog_NM"; then
4214   ac_ct_NM=$NM
4215   # Extract the first word of "nm", so it can be a program name with args.
4216 set dummy nm; ac_word=$2
4217 echo "$as_me:4217: checking for $ac_word" >&5
4218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4219 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4220   echo $ECHO_N "(cached) $ECHO_C" >&6
4221 else
4222   if test -n "$ac_ct_NM"; then
4223   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4224 else
4225   ac_save_IFS=$IFS; IFS=$ac_path_separator
4226 ac_dummy="$PATH"
4227 for ac_dir in $ac_dummy; do
4228   IFS=$ac_save_IFS
4229   test -z "$ac_dir" && ac_dir=.
4230   $as_executable_p "$ac_dir/$ac_word" || continue
4231 ac_cv_prog_ac_ct_NM="nm"
4232 echo "$as_me:4232: found $ac_dir/$ac_word" >&5
4233 break
4234 done
4235
4236   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4237 fi
4238 fi
4239 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4240 if test -n "$ac_ct_NM"; then
4241   echo "$as_me:4241: result: $ac_ct_NM" >&5
4242 echo "${ECHO_T}$ac_ct_NM" >&6
4243 else
4244   echo "$as_me:4244: result: no" >&5
4245 echo "${ECHO_T}no" >&6
4246 fi
4247
4248   NM=$ac_ct_NM
4249 else
4250   NM="$ac_cv_prog_NM"
4251 fi
4252
4253 if test -n "$ac_tool_prefix"; then
4254   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4255 set dummy ${ac_tool_prefix}ar; ac_word=$2
4256 echo "$as_me:4256: checking for $ac_word" >&5
4257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4258 if test "${ac_cv_prog_AR+set}" = set; then
4259   echo $ECHO_N "(cached) $ECHO_C" >&6
4260 else
4261   if test -n "$AR"; then
4262   ac_cv_prog_AR="$AR" # Let the user override the test.
4263 else
4264   ac_save_IFS=$IFS; IFS=$ac_path_separator
4265 ac_dummy="$PATH"
4266 for ac_dir in $ac_dummy; do
4267   IFS=$ac_save_IFS
4268   test -z "$ac_dir" && ac_dir=.
4269   $as_executable_p "$ac_dir/$ac_word" || continue
4270 ac_cv_prog_AR="${ac_tool_prefix}ar"
4271 echo "$as_me:4271: found $ac_dir/$ac_word" >&5
4272 break
4273 done
4274
4275 fi
4276 fi
4277 AR=$ac_cv_prog_AR
4278 if test -n "$AR"; then
4279   echo "$as_me:4279: result: $AR" >&5
4280 echo "${ECHO_T}$AR" >&6
4281 else
4282   echo "$as_me:4282: result: no" >&5
4283 echo "${ECHO_T}no" >&6
4284 fi
4285
4286 fi
4287 if test -z "$ac_cv_prog_AR"; then
4288   ac_ct_AR=$AR
4289   # Extract the first word of "ar", so it can be a program name with args.
4290 set dummy ar; ac_word=$2
4291 echo "$as_me:4291: checking for $ac_word" >&5
4292 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4293 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4294   echo $ECHO_N "(cached) $ECHO_C" >&6
4295 else
4296   if test -n "$ac_ct_AR"; then
4297   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4298 else
4299   ac_save_IFS=$IFS; IFS=$ac_path_separator
4300 ac_dummy="$PATH"
4301 for ac_dir in $ac_dummy; do
4302   IFS=$ac_save_IFS
4303   test -z "$ac_dir" && ac_dir=.
4304   $as_executable_p "$ac_dir/$ac_word" || continue
4305 ac_cv_prog_ac_ct_AR="ar"
4306 echo "$as_me:4306: found $ac_dir/$ac_word" >&5
4307 break
4308 done
4309
4310   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4311 fi
4312 fi
4313 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4314 if test -n "$ac_ct_AR"; then
4315   echo "$as_me:4315: result: $ac_ct_AR" >&5
4316 echo "${ECHO_T}$ac_ct_AR" >&6
4317 else
4318   echo "$as_me:4318: result: no" >&5
4319 echo "${ECHO_T}no" >&6
4320 fi
4321
4322   AR=$ac_ct_AR
4323 else
4324   AR="$ac_cv_prog_AR"
4325 fi
4326
4327 echo "$as_me:4327: checking for options to update archives" >&5
4328 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4329 if test "${cf_cv_ar_flags+set}" = set; then
4330   echo $ECHO_N "(cached) $ECHO_C" >&6
4331 else
4332
4333         cf_cv_ar_flags=unknown
4334         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4335         do
4336
4337                 # check if $ARFLAGS already contains this choice
4338                 if test "x$ARFLAGS" != "x" ; then
4339                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4340                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4341                                 cf_cv_ar_flags=
4342                                 break
4343                         fi
4344                 fi
4345
4346                 rm -f conftest.$ac_cv_objext
4347                 rm -f conftest.a
4348
4349                 cat >conftest.$ac_ext <<EOF
4350 #line 4350 "configure"
4351 int     testdata[3] = { 123, 456, 789 };
4352 EOF
4353                 if { (eval echo "$as_me:4353: \"$ac_compile\"") >&5
4354   (eval $ac_compile) 2>&5
4355   ac_status=$?
4356   echo "$as_me:4356: \$? = $ac_status" >&5
4357   (exit $ac_status); } ; then
4358                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4359                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4360                         if test -f conftest.a ; then
4361                                 cf_cv_ar_flags=$cf_ar_flags
4362                                 break
4363                         fi
4364                 else
4365                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4366
4367 echo "${as_me:-configure}:4367: testing cannot compile test-program ..." 1>&5
4368
4369                         break
4370                 fi
4371         done
4372         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4373
4374 fi
4375 echo "$as_me:4375: result: $cf_cv_ar_flags" >&5
4376 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4377
4378 if test -n "$ARFLAGS" ; then
4379         if test -n "$cf_cv_ar_flags" ; then
4380                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4381         fi
4382 else
4383         ARFLAGS=$cf_cv_ar_flags
4384 fi
4385
4386 echo "$as_me:4386: checking if you have specified an install-prefix" >&5
4387 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4388
4389 # Check whether --with-install-prefix or --without-install-prefix was given.
4390 if test "${with_install_prefix+set}" = set; then
4391   withval="$with_install_prefix"
4392   case "x$withval" in #(vi
4393         xyes|xno) #(vi
4394                 ;;
4395         *)      DESTDIR="$withval"
4396                 ;;
4397         esac
4398 fi;
4399 echo "$as_me:4399: result: $DESTDIR" >&5
4400 echo "${ECHO_T}$DESTDIR" >&6
4401
4402 ###############################################################################
4403
4404 # If we're cross-compiling, allow the user to override the tools and their
4405 # options.  The configure script is oriented toward identifying the host
4406 # compiler, etc., but we need a build compiler to generate parts of the source.
4407
4408 if test "$cross_compiling" = yes ; then
4409
4410         # defaults that we might want to override
4411         : ${BUILD_CFLAGS:=''}
4412         : ${BUILD_CPPFLAGS:=''}
4413         : ${BUILD_LDFLAGS:=''}
4414         : ${BUILD_LIBS:=''}
4415         : ${BUILD_EXEEXT:='$x'}
4416         : ${BUILD_OBJEXT:='o'}
4417
4418 # Check whether --with-build-cc or --without-build-cc was given.
4419 if test "${with_build_cc+set}" = set; then
4420   withval="$with_build_cc"
4421   BUILD_CC="$withval"
4422 else
4423   for ac_prog in gcc cc cl
4424 do
4425   # Extract the first word of "$ac_prog", so it can be a program name with args.
4426 set dummy $ac_prog; ac_word=$2
4427 echo "$as_me:4427: checking for $ac_word" >&5
4428 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4429 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4430   echo $ECHO_N "(cached) $ECHO_C" >&6
4431 else
4432   if test -n "$BUILD_CC"; then
4433   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4434 else
4435   ac_save_IFS=$IFS; IFS=$ac_path_separator
4436 ac_dummy="$PATH"
4437 for ac_dir in $ac_dummy; do
4438   IFS=$ac_save_IFS
4439   test -z "$ac_dir" && ac_dir=.
4440   $as_executable_p "$ac_dir/$ac_word" || continue
4441 ac_cv_prog_BUILD_CC="$ac_prog"
4442 echo "$as_me:4442: found $ac_dir/$ac_word" >&5
4443 break
4444 done
4445
4446 fi
4447 fi
4448 BUILD_CC=$ac_cv_prog_BUILD_CC
4449 if test -n "$BUILD_CC"; then
4450   echo "$as_me:4450: result: $BUILD_CC" >&5
4451 echo "${ECHO_T}$BUILD_CC" >&6
4452 else
4453   echo "$as_me:4453: result: no" >&5
4454 echo "${ECHO_T}no" >&6
4455 fi
4456
4457   test -n "$BUILD_CC" && break
4458 done
4459
4460 fi;
4461         echo "$as_me:4461: checking for native build C compiler" >&5
4462 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4463         echo "$as_me:4463: result: $BUILD_CC" >&5
4464 echo "${ECHO_T}$BUILD_CC" >&6
4465
4466         echo "$as_me:4466: checking for native build C preprocessor" >&5
4467 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4468
4469 # Check whether --with-build-cpp or --without-build-cpp was given.
4470 if test "${with_build_cpp+set}" = set; then
4471   withval="$with_build_cpp"
4472   BUILD_CPP="$withval"
4473 else
4474   BUILD_CPP='${BUILD_CC} -E'
4475 fi;
4476         echo "$as_me:4476: result: $BUILD_CPP" >&5
4477 echo "${ECHO_T}$BUILD_CPP" >&6
4478
4479         echo "$as_me:4479: checking for native build C flags" >&5
4480 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4481
4482 # Check whether --with-build-cflags or --without-build-cflags was given.
4483 if test "${with_build_cflags+set}" = set; then
4484   withval="$with_build_cflags"
4485   BUILD_CFLAGS="$withval"
4486 fi;
4487         echo "$as_me:4487: result: $BUILD_CFLAGS" >&5
4488 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4489
4490         echo "$as_me:4490: checking for native build C preprocessor-flags" >&5
4491 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4492
4493 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4494 if test "${with_build_cppflags+set}" = set; then
4495   withval="$with_build_cppflags"
4496   BUILD_CPPFLAGS="$withval"
4497 fi;
4498         echo "$as_me:4498: result: $BUILD_CPPFLAGS" >&5
4499 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4500
4501         echo "$as_me:4501: checking for native build linker-flags" >&5
4502 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4503
4504 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4505 if test "${with_build_ldflags+set}" = set; then
4506   withval="$with_build_ldflags"
4507   BUILD_LDFLAGS="$withval"
4508 fi;
4509         echo "$as_me:4509: result: $BUILD_LDFLAGS" >&5
4510 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4511
4512         echo "$as_me:4512: checking for native build linker-libraries" >&5
4513 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4514
4515 # Check whether --with-build-libs or --without-build-libs was given.
4516 if test "${with_build_libs+set}" = set; then
4517   withval="$with_build_libs"
4518   BUILD_LIBS="$withval"
4519 fi;
4520         echo "$as_me:4520: result: $BUILD_LIBS" >&5
4521 echo "${ECHO_T}$BUILD_LIBS" >&6
4522
4523         # this assumes we're on Unix.
4524         BUILD_EXEEXT=
4525         BUILD_OBJEXT=o
4526
4527         : ${BUILD_CC:='${CC}'}
4528
4529         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4530                 { { echo "$as_me:4530: error: Cross-build requires two compilers.
4531 Use --with-build-cc to specify the native compiler." >&5
4532 echo "$as_me: error: Cross-build requires two compilers.
4533 Use --with-build-cc to specify the native compiler." >&2;}
4534    { (exit 1); exit 1; }; }
4535         fi
4536
4537 else
4538         : ${BUILD_CC:='${CC}'}
4539         : ${BUILD_CPP:='${CPP}'}
4540         : ${BUILD_CFLAGS:='${CFLAGS}'}
4541         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4542         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4543         : ${BUILD_LIBS:='${LIBS}'}
4544         : ${BUILD_EXEEXT:='$x'}
4545         : ${BUILD_OBJEXT:='o'}
4546 fi
4547
4548 ###############################################################################
4549
4550 ### Options to allow the user to specify the set of libraries which are used.
4551 ### Use "--without-normal --with-shared" to allow the default model to be
4552 ### shared, for example.
4553 cf_list_models=""
4554
4555 echo "$as_me:4555: checking if libtool -version-number should be used" >&5
4556 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4557
4558 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4559 if test "${enable_libtool_version+set}" = set; then
4560   enableval="$enable_libtool_version"
4561   test "$enableval" != no && enableval=yes
4562   if test "$enableval" != "yes" ; then
4563     cf_libtool_version=no
4564   else
4565     cf_libtool_version=yes
4566   fi
4567 else
4568   enableval=yes
4569   cf_libtool_version=yes
4570
4571 fi;
4572 echo "$as_me:4572: result: $cf_libtool_version" >&5
4573 echo "${ECHO_T}$cf_libtool_version" >&6
4574
4575 if test "$cf_libtool_version" = yes ; then
4576         LIBTOOL_VERSION="-version-number"
4577 else
4578         LIBTOOL_VERSION="-version-info"
4579         case "x$VERSION" in #(vi
4580         x) #(vi
4581                 { echo "$as_me:4581: WARNING: VERSION was not set" >&5
4582 echo "$as_me: WARNING: VERSION was not set" >&2;}
4583                 ;;
4584         x*.*.*)
4585                 ABI_VERSION="$VERSION"
4586                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4587
4588 echo "${as_me:-configure}:4588: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4589
4590                 ;;
4591         x*:*:*)
4592                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4593                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4594
4595 echo "${as_me:-configure}:4595: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4596
4597                 ;;
4598         *)
4599                 { echo "$as_me:4599: WARNING: unexpected VERSION value: $VERSION" >&5
4600 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4601                 ;;
4602         esac
4603 fi
4604
4605 LIBTOOL=
4606
4607 # common library maintenance symbols that are convenient for libtool scripts:
4608 LIB_CREATE='${AR} -cr'
4609 LIB_OBJECT='${OBJECTS}'
4610 LIB_SUFFIX=.a
4611 LIB_PREP="$RANLIB"
4612
4613 # symbols used to prop libtool up to enable it to determine what it should be
4614 # doing:
4615 LIB_CLEAN=
4616 LIB_COMPILE=
4617 LIB_LINK='${CC}'
4618 LIB_INSTALL=
4619 LIB_UNINSTALL=
4620
4621 echo "$as_me:4621: checking if you want to build libraries with libtool" >&5
4622 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4623
4624 # Check whether --with-libtool or --without-libtool was given.
4625 if test "${with_libtool+set}" = set; then
4626   withval="$with_libtool"
4627   with_libtool=$withval
4628 else
4629   with_libtool=no
4630 fi;
4631 echo "$as_me:4631: result: $with_libtool" >&5
4632 echo "${ECHO_T}$with_libtool" >&6
4633 if test "$with_libtool" != "no"; then
4634
4635         if test "$with_libtool" != "yes" ; then
4636
4637 if test "x$prefix" != xNONE; then
4638   cf_path_syntax="$prefix"
4639 else
4640   cf_path_syntax="$ac_default_prefix"
4641 fi
4642
4643 case ".$with_libtool" in #(vi
4644 .\$\(*\)*|.\'*\'*) #(vi
4645   ;;
4646 ..|./*|.\\*) #(vi
4647   ;;
4648 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4649   ;;
4650 .\${*prefix}*|.\${*dir}*) #(vi
4651   eval with_libtool="$with_libtool"
4652   case ".$with_libtool" in #(vi
4653   .NONE/*)
4654     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4655     ;;
4656   esac
4657   ;; #(vi
4658 .no|.NONE/*)
4659   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4660   ;;
4661 *)
4662   { { echo "$as_me:4662: error: expected a pathname, not \"$with_libtool\"" >&5
4663 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4664    { (exit 1); exit 1; }; }
4665   ;;
4666 esac
4667
4668                 LIBTOOL=$with_libtool
4669         else
4670                 if test -n "$ac_tool_prefix"; then
4671   for ac_prog in libtool glibtool
4672   do
4673     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4674 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4675 echo "$as_me:4675: checking for $ac_word" >&5
4676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4677 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4678   echo $ECHO_N "(cached) $ECHO_C" >&6
4679 else
4680   if test -n "$LIBTOOL"; then
4681   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4682 else
4683   ac_save_IFS=$IFS; IFS=$ac_path_separator
4684 ac_dummy="$PATH"
4685 for ac_dir in $ac_dummy; do
4686   IFS=$ac_save_IFS
4687   test -z "$ac_dir" && ac_dir=.
4688   $as_executable_p "$ac_dir/$ac_word" || continue
4689 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4690 echo "$as_me:4690: found $ac_dir/$ac_word" >&5
4691 break
4692 done
4693
4694 fi
4695 fi
4696 LIBTOOL=$ac_cv_prog_LIBTOOL
4697 if test -n "$LIBTOOL"; then
4698   echo "$as_me:4698: result: $LIBTOOL" >&5
4699 echo "${ECHO_T}$LIBTOOL" >&6
4700 else
4701   echo "$as_me:4701: result: no" >&5
4702 echo "${ECHO_T}no" >&6
4703 fi
4704
4705     test -n "$LIBTOOL" && break
4706   done
4707 fi
4708 if test -z "$LIBTOOL"; then
4709   ac_ct_LIBTOOL=$LIBTOOL
4710   for ac_prog in libtool glibtool
4711 do
4712   # Extract the first word of "$ac_prog", so it can be a program name with args.
4713 set dummy $ac_prog; ac_word=$2
4714 echo "$as_me:4714: checking for $ac_word" >&5
4715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4716 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4717   echo $ECHO_N "(cached) $ECHO_C" >&6
4718 else
4719   if test -n "$ac_ct_LIBTOOL"; then
4720   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4721 else
4722   ac_save_IFS=$IFS; IFS=$ac_path_separator
4723 ac_dummy="$PATH"
4724 for ac_dir in $ac_dummy; do
4725   IFS=$ac_save_IFS
4726   test -z "$ac_dir" && ac_dir=.
4727   $as_executable_p "$ac_dir/$ac_word" || continue
4728 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4729 echo "$as_me:4729: found $ac_dir/$ac_word" >&5
4730 break
4731 done
4732
4733 fi
4734 fi
4735 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4736 if test -n "$ac_ct_LIBTOOL"; then
4737   echo "$as_me:4737: result: $ac_ct_LIBTOOL" >&5
4738 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4739 else
4740   echo "$as_me:4740: result: no" >&5
4741 echo "${ECHO_T}no" >&6
4742 fi
4743
4744   test -n "$ac_ct_LIBTOOL" && break
4745 done
4746 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4747
4748   LIBTOOL=$ac_ct_LIBTOOL
4749 fi
4750
4751 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4752 then
4753         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.].*//'`
4754 else
4755         cf_cv_libtool_version=
4756 fi
4757 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4758
4759                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4760                 then
4761
4762 unset ac_cv_prog_ac_ct_LIBTOOL
4763 unset ac_ct_LIBTOOL
4764 unset LIBTOOL
4765
4766                         if test -n "$ac_tool_prefix"; then
4767   for ac_prog in glibtool
4768   do
4769     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4770 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4771 echo "$as_me:4771: checking for $ac_word" >&5
4772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4773 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4774   echo $ECHO_N "(cached) $ECHO_C" >&6
4775 else
4776   if test -n "$LIBTOOL"; then
4777   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4778 else
4779   ac_save_IFS=$IFS; IFS=$ac_path_separator
4780 ac_dummy="$PATH"
4781 for ac_dir in $ac_dummy; do
4782   IFS=$ac_save_IFS
4783   test -z "$ac_dir" && ac_dir=.
4784   $as_executable_p "$ac_dir/$ac_word" || continue
4785 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4786 echo "$as_me:4786: found $ac_dir/$ac_word" >&5
4787 break
4788 done
4789
4790 fi
4791 fi
4792 LIBTOOL=$ac_cv_prog_LIBTOOL
4793 if test -n "$LIBTOOL"; then
4794   echo "$as_me:4794: result: $LIBTOOL" >&5
4795 echo "${ECHO_T}$LIBTOOL" >&6
4796 else
4797   echo "$as_me:4797: result: no" >&5
4798 echo "${ECHO_T}no" >&6
4799 fi
4800
4801     test -n "$LIBTOOL" && break
4802   done
4803 fi
4804 if test -z "$LIBTOOL"; then
4805   ac_ct_LIBTOOL=$LIBTOOL
4806   for ac_prog in glibtool
4807 do
4808   # Extract the first word of "$ac_prog", so it can be a program name with args.
4809 set dummy $ac_prog; ac_word=$2
4810 echo "$as_me:4810: checking for $ac_word" >&5
4811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4812 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4813   echo $ECHO_N "(cached) $ECHO_C" >&6
4814 else
4815   if test -n "$ac_ct_LIBTOOL"; then
4816   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4817 else
4818   ac_save_IFS=$IFS; IFS=$ac_path_separator
4819 ac_dummy="$PATH"
4820 for ac_dir in $ac_dummy; do
4821   IFS=$ac_save_IFS
4822   test -z "$ac_dir" && ac_dir=.
4823   $as_executable_p "$ac_dir/$ac_word" || continue
4824 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4825 echo "$as_me:4825: found $ac_dir/$ac_word" >&5
4826 break
4827 done
4828
4829 fi
4830 fi
4831 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4832 if test -n "$ac_ct_LIBTOOL"; then
4833   echo "$as_me:4833: result: $ac_ct_LIBTOOL" >&5
4834 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4835 else
4836   echo "$as_me:4836: result: no" >&5
4837 echo "${ECHO_T}no" >&6
4838 fi
4839
4840   test -n "$ac_ct_LIBTOOL" && break
4841 done
4842 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4843
4844   LIBTOOL=$ac_ct_LIBTOOL
4845 fi
4846
4847 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4848 then
4849         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.].*//'`
4850 else
4851         cf_cv_libtool_version=
4852 fi
4853 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4854
4855                 fi
4856         fi
4857         if test -z "$LIBTOOL" ; then
4858                 { { echo "$as_me:4858: error: Cannot find libtool" >&5
4859 echo "$as_me: error: Cannot find libtool" >&2;}
4860    { (exit 1); exit 1; }; }
4861         fi
4862         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4863         LIB_OBJECT='${OBJECTS:.o=.lo}'
4864         LIB_SUFFIX=.la
4865         LIB_CLEAN='${LIBTOOL} --mode=clean'
4866         LIB_COMPILE='${LIBTOOL} --mode=compile'
4867         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4868         LIB_INSTALL='${LIBTOOL} --mode=install'
4869         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4870         LIB_PREP=:
4871
4872 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4873 then
4874         echo "$as_me:4874: checking version of $LIBTOOL" >&5
4875 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4876
4877 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4878 then
4879         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.].*//'`
4880 else
4881         cf_cv_libtool_version=
4882 fi
4883 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4884
4885         echo "$as_me:4885: result: $cf_cv_libtool_version" >&5
4886 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4887         if test -z "$cf_cv_libtool_version" ; then
4888                 { { echo "$as_me:4888: error: This is not GNU libtool" >&5
4889 echo "$as_me: error: This is not GNU libtool" >&2;}
4890    { (exit 1); exit 1; }; }
4891         fi
4892 else
4893         { { echo "$as_me:4893: error: GNU libtool has not been found" >&5
4894 echo "$as_me: error: GNU libtool has not been found" >&2;}
4895    { (exit 1); exit 1; }; }
4896 fi
4897
4898         # special hack to add -no-undefined (which libtool should do for itself)
4899         LT_UNDEF=
4900         case "$cf_cv_system_name" in #(vi
4901         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4902                 LT_UNDEF=-no-undefined
4903                 ;;
4904         esac
4905
4906         # special hack to add --tag option for C++ compiler
4907         case $cf_cv_libtool_version in #(vi
4908         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4909                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4910                 LIBTOOL="$LIBTOOL --tag=CC"
4911                 ;;
4912         *)
4913                 LIBTOOL_CXX="$LIBTOOL"
4914                 ;;
4915         esac
4916 else
4917         LIBTOOL=""
4918         LIBTOOL_CXX=""
4919 fi
4920
4921 test -z "$LIBTOOL" && ECHO_LT=
4922
4923 if test "$with_libtool" != "no" ; then
4924
4925 cf_list_models="$cf_list_models libtool"
4926
4927 else
4928
4929 echo "$as_me:4929: checking if you want to build shared libraries" >&5
4930 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4931
4932 # Check whether --with-shared or --without-shared was given.
4933 if test "${with_shared+set}" = set; then
4934   withval="$with_shared"
4935   with_shared=$withval
4936 else
4937   with_shared=no
4938 fi;
4939 echo "$as_me:4939: result: $with_shared" >&5
4940 echo "${ECHO_T}$with_shared" >&6
4941 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4942
4943 echo "$as_me:4943: checking if you want to build static libraries" >&5
4944 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4945
4946 # Check whether --with-normal or --without-normal was given.
4947 if test "${with_normal+set}" = set; then
4948   withval="$with_normal"
4949   with_normal=$withval
4950 else
4951   with_normal=yes
4952 fi;
4953 echo "$as_me:4953: result: $with_normal" >&5
4954 echo "${ECHO_T}$with_normal" >&6
4955 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4956
4957 echo "$as_me:4957: checking if you want to build debug libraries" >&5
4958 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4959
4960 # Check whether --with-debug or --without-debug was given.
4961 if test "${with_debug+set}" = set; then
4962   withval="$with_debug"
4963   with_debug=$withval
4964 else
4965   with_debug=yes
4966 fi;
4967 echo "$as_me:4967: result: $with_debug" >&5
4968 echo "${ECHO_T}$with_debug" >&6
4969 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4970
4971 echo "$as_me:4971: checking if you want to build profiling libraries" >&5
4972 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4973
4974 # Check whether --with-profile or --without-profile was given.
4975 if test "${with_profile+set}" = set; then
4976   withval="$with_profile"
4977   with_profile=$withval
4978 else
4979   with_profile=no
4980 fi;
4981 echo "$as_me:4981: result: $with_profile" >&5
4982 echo "${ECHO_T}$with_profile" >&6
4983 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4984
4985 fi
4986
4987 if test "X$cf_with_cxx_binding" != Xno; then
4988 if test "x$with_shared" = "xyes"; then
4989 echo "$as_me:4989: checking if you want to build C++ shared libraries" >&5
4990 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4991
4992 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4993 if test "${with_cxx_shared+set}" = set; then
4994   withval="$with_cxx_shared"
4995   with_shared_cxx=$withval
4996 else
4997   with_shared_cxx=no
4998 fi;
4999 echo "$as_me:4999: result: $with_shared_cxx" >&5
5000 echo "${ECHO_T}$with_shared_cxx" >&6
5001 fi
5002 fi
5003
5004 ###############################################################################
5005
5006 echo "$as_me:5006: checking for specified models" >&5
5007 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5008 test -z "$cf_list_models" && cf_list_models=normal
5009 test "$with_libtool" != "no" && cf_list_models=libtool
5010 echo "$as_me:5010: result: $cf_list_models" >&5
5011 echo "${ECHO_T}$cf_list_models" >&6
5012
5013 ### Use the first model as the default, and save its suffix for use in building
5014 ### up test-applications.
5015 echo "$as_me:5015: checking for default model" >&5
5016 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5017 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5018 echo "$as_me:5018: result: $DFT_LWR_MODEL" >&5
5019 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5020
5021 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5022
5023 TICS_NAME=tic
5024
5025 TINFO_NAME=tinfo
5026
5027 LIB_NAME=ncurses
5028
5029 LIB_DIR=../lib
5030 LIB_2ND=../../lib
5031
5032 echo "$as_me:5032: checking if you want to have a library-prefix" >&5
5033 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5034
5035 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5036 if test "${with_lib_prefix+set}" = set; then
5037   withval="$with_lib_prefix"
5038   with_lib_prefix=$withval
5039 else
5040   with_lib_prefix=auto
5041 fi;
5042 echo "$as_me:5042: result: $with_lib_prefix" >&5
5043 echo "${ECHO_T}$with_lib_prefix" >&6
5044
5045 if test $with_lib_prefix = auto
5046 then
5047
5048         case $cf_cv_system_name in #(vi
5049         OS/2*|os2*) #(vi
5050         LIB_PREFIX=''
5051         ;;
5052         *)      LIB_PREFIX='lib'
5053         ;;
5054         esac
5055 cf_prefix=$LIB_PREFIX
5056
5057 elif test $with_lib_prefix = no
5058 then
5059         LIB_PREFIX=
5060 else
5061         LIB_PREFIX=$with_lib_prefix
5062 fi
5063
5064 LIB_SUFFIX=
5065
5066         echo "$as_me:5066: checking for PATH separator" >&5
5067 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5068         case $cf_cv_system_name in
5069         os2*)   PATH_SEPARATOR=';'  ;;
5070         *)      ${PATH_SEPARATOR:=':'}  ;;
5071         esac
5072
5073         echo "$as_me:5073: result: $PATH_SEPARATOR" >&5
5074 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5075
5076 ###############################################################################
5077
5078 echo "$as_me:5078: checking if you want to build a separate terminfo library" >&5
5079 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5080
5081 # Check whether --with-termlib or --without-termlib was given.
5082 if test "${with_termlib+set}" = set; then
5083   withval="$with_termlib"
5084   with_termlib=$withval
5085 else
5086   with_termlib=no
5087 fi;
5088 echo "$as_me:5088: result: $with_termlib" >&5
5089 echo "${ECHO_T}$with_termlib" >&6
5090
5091 echo "$as_me:5091: checking if you want to build a separate tic library" >&5
5092 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5093
5094 # Check whether --with-ticlib or --without-ticlib was given.
5095 if test "${with_ticlib+set}" = set; then
5096   withval="$with_ticlib"
5097   with_ticlib=$withval
5098 else
5099   with_ticlib=no
5100 fi;
5101 echo "$as_me:5101: result: $with_ticlib" >&5
5102 echo "${ECHO_T}$with_ticlib" >&6
5103
5104 ### Checks for special libraries, must be done up-front.
5105 SHLIB_LIST=""
5106
5107 echo "$as_me:5107: checking if you want to link with the GPM mouse library" >&5
5108 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5109
5110 # Check whether --with-gpm or --without-gpm was given.
5111 if test "${with_gpm+set}" = set; then
5112   withval="$with_gpm"
5113   with_gpm=$withval
5114 else
5115   with_gpm=maybe
5116 fi;
5117 echo "$as_me:5117: result: $with_gpm" >&5
5118 echo "${ECHO_T}$with_gpm" >&6
5119
5120 if test "$with_gpm" != no ; then
5121         echo "$as_me:5121: checking for gpm.h" >&5
5122 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5123 if test "${ac_cv_header_gpm_h+set}" = set; then
5124   echo $ECHO_N "(cached) $ECHO_C" >&6
5125 else
5126   cat >conftest.$ac_ext <<_ACEOF
5127 #line 5127 "configure"
5128 #include "confdefs.h"
5129 #include <gpm.h>
5130 _ACEOF
5131 if { (eval echo "$as_me:5131: \"$ac_cpp conftest.$ac_ext\"") >&5
5132   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5133   ac_status=$?
5134   egrep -v '^ *\+' conftest.er1 >conftest.err
5135   rm -f conftest.er1
5136   cat conftest.err >&5
5137   echo "$as_me:5137: \$? = $ac_status" >&5
5138   (exit $ac_status); } >/dev/null; then
5139   if test -s conftest.err; then
5140     ac_cpp_err=$ac_c_preproc_warn_flag
5141   else
5142     ac_cpp_err=
5143   fi
5144 else
5145   ac_cpp_err=yes
5146 fi
5147 if test -z "$ac_cpp_err"; then
5148   ac_cv_header_gpm_h=yes
5149 else
5150   echo "$as_me: failed program was:" >&5
5151   cat conftest.$ac_ext >&5
5152   ac_cv_header_gpm_h=no
5153 fi
5154 rm -f conftest.err conftest.$ac_ext
5155 fi
5156 echo "$as_me:5156: result: $ac_cv_header_gpm_h" >&5
5157 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5158 if test $ac_cv_header_gpm_h = yes; then
5159
5160 cat >>confdefs.h <<\EOF
5161 #define HAVE_GPM_H 1
5162 EOF
5163
5164                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5165                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5166
5167 echo "${as_me:-configure}:5167: testing assuming we really have GPM library ..." 1>&5
5168
5169 cat >>confdefs.h <<\EOF
5170 #define HAVE_LIBGPM 1
5171 EOF
5172
5173                 else
5174                         echo "$as_me:5174: checking for Gpm_Open in -lgpm" >&5
5175 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5176 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5177   echo $ECHO_N "(cached) $ECHO_C" >&6
5178 else
5179   ac_check_lib_save_LIBS=$LIBS
5180 LIBS="-lgpm  $LIBS"
5181 cat >conftest.$ac_ext <<_ACEOF
5182 #line 5182 "configure"
5183 #include "confdefs.h"
5184
5185 /* Override any gcc2 internal prototype to avoid an error.  */
5186 #ifdef __cplusplus
5187 extern "C"
5188 #endif
5189 /* We use char because int might match the return type of a gcc2
5190    builtin and then its argument prototype would still apply.  */
5191 char Gpm_Open ();
5192 int
5193 main ()
5194 {
5195 Gpm_Open ();
5196   ;
5197   return 0;
5198 }
5199 _ACEOF
5200 rm -f conftest.$ac_objext conftest$ac_exeext
5201 if { (eval echo "$as_me:5201: \"$ac_link\"") >&5
5202   (eval $ac_link) 2>&5
5203   ac_status=$?
5204   echo "$as_me:5204: \$? = $ac_status" >&5
5205   (exit $ac_status); } &&
5206          { ac_try='test -s conftest$ac_exeext'
5207   { (eval echo "$as_me:5207: \"$ac_try\"") >&5
5208   (eval $ac_try) 2>&5
5209   ac_status=$?
5210   echo "$as_me:5210: \$? = $ac_status" >&5
5211   (exit $ac_status); }; }; then
5212   ac_cv_lib_gpm_Gpm_Open=yes
5213 else
5214   echo "$as_me: failed program was:" >&5
5215 cat conftest.$ac_ext >&5
5216 ac_cv_lib_gpm_Gpm_Open=no
5217 fi
5218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5219 LIBS=$ac_check_lib_save_LIBS
5220 fi
5221 echo "$as_me:5221: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5222 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5223 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5224   :
5225 else
5226
5227                                 { { echo "$as_me:5227: error: Cannot link with GPM library" >&5
5228 echo "$as_me: error: Cannot link with GPM library" >&2;}
5229    { (exit 1); exit 1; }; }
5230                 fi
5231                 with_gpm=yes
5232
5233 fi
5234
5235 else
5236
5237                 test "$with_gpm" != maybe && { echo "$as_me:5237: WARNING: Cannot find GPM header" >&5
5238 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5239                 with_gpm=no
5240
5241 fi
5242
5243 fi
5244
5245 if test "$with_gpm" != no ; then
5246         echo "$as_me:5246: checking if you want to load GPM dynamically" >&5
5247 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5248
5249 # Check whether --with-dlsym or --without-dlsym was given.
5250 if test "${with_dlsym+set}" = set; then
5251   withval="$with_dlsym"
5252   with_dlsym=$withval
5253 else
5254   with_dlsym=yes
5255 fi;
5256         echo "$as_me:5256: result: $with_dlsym" >&5
5257 echo "${ECHO_T}$with_dlsym" >&6
5258         if test "x$with_dlsym" = xyes ; then
5259
5260 cf_have_dlsym=no
5261 echo "$as_me:5261: checking for dlsym" >&5
5262 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5263 if test "${ac_cv_func_dlsym+set}" = set; then
5264   echo $ECHO_N "(cached) $ECHO_C" >&6
5265 else
5266   cat >conftest.$ac_ext <<_ACEOF
5267 #line 5267 "configure"
5268 #include "confdefs.h"
5269 /* System header to define __stub macros and hopefully few prototypes,
5270     which can conflict with char dlsym (); below.  */
5271 #include <assert.h>
5272 /* Override any gcc2 internal prototype to avoid an error.  */
5273 #ifdef __cplusplus
5274 extern "C"
5275 #endif
5276 /* We use char because int might match the return type of a gcc2
5277    builtin and then its argument prototype would still apply.  */
5278 char dlsym ();
5279 char (*f) ();
5280
5281 int
5282 main ()
5283 {
5284 /* The GNU C library defines this for functions which it implements
5285     to always fail with ENOSYS.  Some functions are actually named
5286     something starting with __ and the normal name is an alias.  */
5287 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5288 choke me
5289 #else
5290 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5291 #endif
5292
5293   ;
5294   return 0;
5295 }
5296 _ACEOF
5297 rm -f conftest.$ac_objext conftest$ac_exeext
5298 if { (eval echo "$as_me:5298: \"$ac_link\"") >&5
5299   (eval $ac_link) 2>&5
5300   ac_status=$?
5301   echo "$as_me:5301: \$? = $ac_status" >&5
5302   (exit $ac_status); } &&
5303          { ac_try='test -s conftest$ac_exeext'
5304   { (eval echo "$as_me:5304: \"$ac_try\"") >&5
5305   (eval $ac_try) 2>&5
5306   ac_status=$?
5307   echo "$as_me:5307: \$? = $ac_status" >&5
5308   (exit $ac_status); }; }; then
5309   ac_cv_func_dlsym=yes
5310 else
5311   echo "$as_me: failed program was:" >&5
5312 cat conftest.$ac_ext >&5
5313 ac_cv_func_dlsym=no
5314 fi
5315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5316 fi
5317 echo "$as_me:5317: result: $ac_cv_func_dlsym" >&5
5318 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5319 if test $ac_cv_func_dlsym = yes; then
5320   cf_have_dlsym=yes
5321 else
5322
5323 cf_have_libdl=no
5324 echo "$as_me:5324: checking for dlsym in -ldl" >&5
5325 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5326 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5327   echo $ECHO_N "(cached) $ECHO_C" >&6
5328 else
5329   ac_check_lib_save_LIBS=$LIBS
5330 LIBS="-ldl  $LIBS"
5331 cat >conftest.$ac_ext <<_ACEOF
5332 #line 5332 "configure"
5333 #include "confdefs.h"
5334
5335 /* Override any gcc2 internal prototype to avoid an error.  */
5336 #ifdef __cplusplus
5337 extern "C"
5338 #endif
5339 /* We use char because int might match the return type of a gcc2
5340    builtin and then its argument prototype would still apply.  */
5341 char dlsym ();
5342 int
5343 main ()
5344 {
5345 dlsym ();
5346   ;
5347   return 0;
5348 }
5349 _ACEOF
5350 rm -f conftest.$ac_objext conftest$ac_exeext
5351 if { (eval echo "$as_me:5351: \"$ac_link\"") >&5
5352   (eval $ac_link) 2>&5
5353   ac_status=$?
5354   echo "$as_me:5354: \$? = $ac_status" >&5
5355   (exit $ac_status); } &&
5356          { ac_try='test -s conftest$ac_exeext'
5357   { (eval echo "$as_me:5357: \"$ac_try\"") >&5
5358   (eval $ac_try) 2>&5
5359   ac_status=$?
5360   echo "$as_me:5360: \$? = $ac_status" >&5
5361   (exit $ac_status); }; }; then
5362   ac_cv_lib_dl_dlsym=yes
5363 else
5364   echo "$as_me: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5366 ac_cv_lib_dl_dlsym=no
5367 fi
5368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5369 LIBS=$ac_check_lib_save_LIBS
5370 fi
5371 echo "$as_me:5371: result: $ac_cv_lib_dl_dlsym" >&5
5372 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5373 if test $ac_cv_lib_dl_dlsym = yes; then
5374
5375         cf_have_dlsym=yes
5376         cf_have_libdl=yes
5377 fi
5378
5379 fi
5380
5381 if test "$cf_have_dlsym" = yes ; then
5382         test "$cf_have_libdl" = yes &&
5383 cf_add_libs="-ldl"
5384 # Filter out duplicates - this happens with badly-designed ".pc" files...
5385 for cf_add_1lib in $LIBS
5386 do
5387         for cf_add_2lib in $cf_add_libs
5388         do
5389                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5390                 then
5391                         cf_add_1lib=
5392                         break
5393                 fi
5394         done
5395         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5396 done
5397 LIBS="$cf_add_libs"
5398
5399         echo "$as_me:5399: checking whether able to link to dl*() functions" >&5
5400 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5401         cat >conftest.$ac_ext <<_ACEOF
5402 #line 5402 "configure"
5403 #include "confdefs.h"
5404 #include <dlfcn.h>
5405 int
5406 main ()
5407 {
5408
5409                 void *obj;
5410                 if ((obj = dlopen("filename", 0)) != 0) {
5411                         if (dlsym(obj, "symbolname") == 0) {
5412                         dlclose(obj);
5413                         }
5414                 }
5415   ;
5416   return 0;
5417 }
5418 _ACEOF
5419 rm -f conftest.$ac_objext conftest$ac_exeext
5420 if { (eval echo "$as_me:5420: \"$ac_link\"") >&5
5421   (eval $ac_link) 2>&5
5422   ac_status=$?
5423   echo "$as_me:5423: \$? = $ac_status" >&5
5424   (exit $ac_status); } &&
5425          { ac_try='test -s conftest$ac_exeext'
5426   { (eval echo "$as_me:5426: \"$ac_try\"") >&5
5427   (eval $ac_try) 2>&5
5428   ac_status=$?
5429   echo "$as_me:5429: \$? = $ac_status" >&5
5430   (exit $ac_status); }; }; then
5431
5432 cat >>confdefs.h <<\EOF
5433 #define HAVE_LIBDL 1
5434 EOF
5435
5436 else
5437   echo "$as_me: failed program was:" >&5
5438 cat conftest.$ac_ext >&5
5439
5440                 { { echo "$as_me:5440: error: Cannot link test program for libdl" >&5
5441 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5442    { (exit 1); exit 1; }; }
5443 fi
5444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5445         echo "$as_me:5445: result: ok" >&5
5446 echo "${ECHO_T}ok" >&6
5447 else
5448         { { echo "$as_me:5448: error: Cannot find dlsym function" >&5
5449 echo "$as_me: error: Cannot find dlsym function" >&2;}
5450    { (exit 1); exit 1; }; }
5451 fi
5452
5453                 if test "x$with_gpm" != xyes ; then
5454                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5455
5456 echo "${as_me:-configure}:5456: testing assuming soname for gpm is $with_gpm ..." 1>&5
5457
5458                         cf_cv_gpm_soname="$with_gpm"
5459                 else
5460
5461 echo "$as_me:5461: checking for soname of gpm library" >&5
5462 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5463 if test "${cf_cv_gpm_soname+set}" = set; then
5464   echo $ECHO_N "(cached) $ECHO_C" >&6
5465 else
5466
5467 cf_cv_gpm_soname=unknown
5468 if test "$cross_compiling" != yes ; then
5469 cat >conftest.$ac_ext <<CF_EOF
5470 #include <gpm.h>
5471 int main()
5472 {
5473 if (Gpm_Open(0,0)) Gpm_Close();
5474         ${cf_cv_main_return:-return}(0);
5475 }
5476 CF_EOF
5477 cf_save_LIBS="$LIBS"
5478
5479 cf_add_libs="-lgpm"
5480 # Filter out duplicates - this happens with badly-designed ".pc" files...
5481 for cf_add_1lib in $LIBS
5482 do
5483         for cf_add_2lib in $cf_add_libs
5484         do
5485                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5486                 then
5487                         cf_add_1lib=
5488                         break
5489                 fi
5490         done
5491         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5492 done
5493 LIBS="$cf_add_libs"
5494
5495         if { (eval echo "$as_me:5495: \"$ac_compile\"") >&5
5496   (eval $ac_compile) 2>&5
5497   ac_status=$?
5498   echo "$as_me:5498: \$? = $ac_status" >&5
5499   (exit $ac_status); } ; then
5500                 if { (eval echo "$as_me:5500: \"$ac_link\"") >&5
5501   (eval $ac_link) 2>&5
5502   ac_status=$?
5503   echo "$as_me:5503: \$? = $ac_status" >&5
5504   (exit $ac_status); } ; then
5505                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5506                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5507                 fi
5508         fi
5509 rm -rf conftest*
5510 LIBS="$cf_save_LIBS"
5511 fi
5512
5513 fi
5514 echo "$as_me:5514: result: $cf_cv_gpm_soname" >&5
5515 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5516
5517                 fi
5518                 test "$cf_cv_gpm_soname" != "unknown" &&
5519 cat >>confdefs.h <<EOF
5520 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5521 EOF
5522
5523                 SHLIB_LIST="-ldl $SHLIB_LIST"
5524         else
5525                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5526
5527 cf_add_libs="-lgpm"
5528 # Filter out duplicates - this happens with badly-designed ".pc" files...
5529 for cf_add_1lib in $TEST_LIBS
5530 do
5531         for cf_add_2lib in $cf_add_libs
5532         do
5533                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5534                 then
5535                         cf_add_1lib=
5536                         break
5537                 fi
5538         done
5539         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5540 done
5541 TEST_LIBS="$cf_add_libs"
5542
5543         fi
5544
5545 cat >>confdefs.h <<\EOF
5546 #define HAVE_LIBGPM 1
5547 EOF
5548
5549 echo "$as_me:5549: checking for Gpm_Wgetch in -lgpm" >&5
5550 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5551 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5552   echo $ECHO_N "(cached) $ECHO_C" >&6
5553 else
5554   ac_check_lib_save_LIBS=$LIBS
5555 LIBS="-lgpm  $LIBS"
5556 cat >conftest.$ac_ext <<_ACEOF
5557 #line 5557 "configure"
5558 #include "confdefs.h"
5559
5560 /* Override any gcc2 internal prototype to avoid an error.  */
5561 #ifdef __cplusplus
5562 extern "C"
5563 #endif
5564 /* We use char because int might match the return type of a gcc2
5565    builtin and then its argument prototype would still apply.  */
5566 char Gpm_Wgetch ();
5567 int
5568 main ()
5569 {
5570 Gpm_Wgetch ();
5571   ;
5572   return 0;
5573 }
5574 _ACEOF
5575 rm -f conftest.$ac_objext conftest$ac_exeext
5576 if { (eval echo "$as_me:5576: \"$ac_link\"") >&5
5577   (eval $ac_link) 2>&5
5578   ac_status=$?
5579   echo "$as_me:5579: \$? = $ac_status" >&5
5580   (exit $ac_status); } &&
5581          { ac_try='test -s conftest$ac_exeext'
5582   { (eval echo "$as_me:5582: \"$ac_try\"") >&5
5583   (eval $ac_try) 2>&5
5584   ac_status=$?
5585   echo "$as_me:5585: \$? = $ac_status" >&5
5586   (exit $ac_status); }; }; then
5587   ac_cv_lib_gpm_Gpm_Wgetch=yes
5588 else
5589   echo "$as_me: failed program was:" >&5
5590 cat conftest.$ac_ext >&5
5591 ac_cv_lib_gpm_Gpm_Wgetch=no
5592 fi
5593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5594 LIBS=$ac_check_lib_save_LIBS
5595 fi
5596 echo "$as_me:5596: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5597 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5598 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5599
5600 echo "$as_me:5600: checking if GPM is weakly bound to curses library" >&5
5601 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5602 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5603   echo $ECHO_N "(cached) $ECHO_C" >&6
5604 else
5605
5606 cf_cv_check_gpm_wgetch=unknown
5607 if test "$cross_compiling" != yes ; then
5608
5609 cat >conftest.$ac_ext <<CF_EOF
5610 #include <gpm.h>
5611 int main()
5612 {
5613         Gpm_Wgetch();
5614         ${cf_cv_main_return:-return}(0);
5615 }
5616 CF_EOF
5617
5618         cf_save_LIBS="$LIBS"
5619         # This only works if we can look at the symbol table.  If a shared
5620         # library is stripped for install, we cannot use that.  So we're forced
5621         # to rely on the static library, noting that some packagers may not
5622         # include it.
5623         LIBS="-static -lgpm -dynamic $LIBS"
5624         if { (eval echo "$as_me:5624: \"$ac_compile\"") >&5
5625   (eval $ac_compile) 2>&5
5626   ac_status=$?
5627   echo "$as_me:5627: \$? = $ac_status" >&5
5628   (exit $ac_status); } ; then
5629                 if { (eval echo "$as_me:5629: \"$ac_link\"") >&5
5630   (eval $ac_link) 2>&5
5631   ac_status=$?
5632   echo "$as_me:5632: \$? = $ac_status" >&5
5633   (exit $ac_status); } ; then
5634                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5635                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5636                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5637                 fi
5638         fi
5639         rm -rf conftest*
5640         LIBS="$cf_save_LIBS"
5641 fi
5642
5643 fi
5644 echo "$as_me:5644: result: $cf_cv_check_gpm_wgetch" >&5
5645 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5646
5647 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5648         { echo "$as_me:5648: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5649 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5650 fi
5651
5652 fi
5653
5654 fi
5655
5656 # not everyone has "test -c"
5657 if test -c /dev/sysmouse 2>/dev/null ; then
5658 echo "$as_me:5658: checking if you want to use sysmouse" >&5
5659 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5660
5661 # Check whether --with-sysmouse or --without-sysmouse was given.
5662 if test "${with_sysmouse+set}" = set; then
5663   withval="$with_sysmouse"
5664   cf_with_sysmouse=$withval
5665 else
5666   cf_with_sysmouse=maybe
5667 fi;
5668         if test "$cf_with_sysmouse" != no ; then
5669         cat >conftest.$ac_ext <<_ACEOF
5670 #line 5670 "configure"
5671 #include "confdefs.h"
5672
5673 #include <osreldate.h>
5674 #if (__FreeBSD_version >= 400017)
5675 #include <sys/consio.h>
5676 #include <sys/fbio.h>
5677 #else
5678 #include <machine/console.h>
5679 #endif
5680
5681 int
5682 main ()
5683 {
5684
5685         struct mouse_info the_mouse;
5686         ioctl(0, CONS_MOUSECTL, &the_mouse);
5687
5688   ;
5689   return 0;
5690 }
5691 _ACEOF
5692 rm -f conftest.$ac_objext
5693 if { (eval echo "$as_me:5693: \"$ac_compile\"") >&5
5694   (eval $ac_compile) 2>&5
5695   ac_status=$?
5696   echo "$as_me:5696: \$? = $ac_status" >&5
5697   (exit $ac_status); } &&
5698          { ac_try='test -s conftest.$ac_objext'
5699   { (eval echo "$as_me:5699: \"$ac_try\"") >&5
5700   (eval $ac_try) 2>&5
5701   ac_status=$?
5702   echo "$as_me:5702: \$? = $ac_status" >&5
5703   (exit $ac_status); }; }; then
5704   cf_with_sysmouse=yes
5705 else
5706   echo "$as_me: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 cf_with_sysmouse=no
5709 fi
5710 rm -f conftest.$ac_objext conftest.$ac_ext
5711         fi
5712 echo "$as_me:5712: result: $cf_with_sysmouse" >&5
5713 echo "${ECHO_T}$cf_with_sysmouse" >&6
5714 test "$cf_with_sysmouse" = yes &&
5715 cat >>confdefs.h <<\EOF
5716 #define USE_SYSMOUSE 1
5717 EOF
5718
5719 fi
5720
5721 if test X"$CC_G_OPT" = X"" ; then
5722         CC_G_OPT='-g'
5723         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5724 fi
5725
5726 if test X"$CXX_G_OPT" = X"" ; then
5727         CXX_G_OPT='-g'
5728         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5729 fi
5730
5731 echo "$as_me:5731: checking for default loader flags" >&5
5732 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5733 case $DFT_LWR_MODEL in
5734 libtool) LD_MODEL=''   ;;
5735 normal)  LD_MODEL=''   ;;
5736 debug)   LD_MODEL=$CC_G_OPT ;;
5737 profile) LD_MODEL='-pg';;
5738 shared)  LD_MODEL=''   ;;
5739 esac
5740 echo "$as_me:5740: result: $LD_MODEL" >&5
5741 echo "${ECHO_T}$LD_MODEL" >&6
5742
5743 case $DFT_LWR_MODEL in
5744 shared)
5745
5746 echo "$as_me:5746: checking if rpath option should be used" >&5
5747 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5748
5749 # Check whether --enable-rpath or --disable-rpath was given.
5750 if test "${enable_rpath+set}" = set; then
5751   enableval="$enable_rpath"
5752   cf_cv_enable_rpath=$enableval
5753 else
5754   cf_cv_enable_rpath=no
5755 fi;
5756 echo "$as_me:5756: result: $cf_cv_enable_rpath" >&5
5757 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5758
5759 echo "$as_me:5759: checking if shared libraries should be relinked during install" >&5
5760 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5761
5762 # Check whether --enable-relink or --disable-relink was given.
5763 if test "${enable_relink+set}" = set; then
5764   enableval="$enable_relink"
5765   cf_cv_do_relink=$enableval
5766 else
5767   cf_cv_do_relink=yes
5768 fi;
5769 echo "$as_me:5769: result: $cf_cv_do_relink" >&5
5770 echo "${ECHO_T}$cf_cv_do_relink" >&6
5771         ;;
5772 esac
5773
5774 # we will build libraries one-level down.
5775 rel_builddir=..
5776
5777 LD_RPATH_OPT=
5778 echo "$as_me:5778: checking for an rpath option" >&5
5779 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5780 case $cf_cv_system_name in #(vi
5781 irix*) #(vi
5782         if test "$GCC" = yes; then
5783                 LD_RPATH_OPT="-Wl,-rpath,"
5784         else
5785                 LD_RPATH_OPT="-rpath "
5786         fi
5787         ;;
5788 linux*|gnu*|k*bsd*-gnu) #(vi
5789         LD_RPATH_OPT="-Wl,-rpath,"
5790         ;;
5791 openbsd[2-9].*|mirbsd*) #(vi
5792         LD_RPATH_OPT="-Wl,-rpath,"
5793         ;;
5794 dragonfly*|freebsd*) #(vi
5795         LD_RPATH_OPT="-rpath "
5796         ;;
5797 netbsd*) #(vi
5798         LD_RPATH_OPT="-Wl,-rpath,"
5799         ;;
5800 osf*|mls+*) #(vi
5801         LD_RPATH_OPT="-rpath "
5802         ;;
5803 solaris2*) #(vi
5804         LD_RPATH_OPT="-R"
5805         ;;
5806 *)
5807         ;;
5808 esac
5809 echo "$as_me:5809: result: $LD_RPATH_OPT" >&5
5810 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5811
5812 case "x$LD_RPATH_OPT" in #(vi
5813 x-R*)
5814         echo "$as_me:5814: checking if we need a space after rpath option" >&5
5815 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5816         cf_save_LIBS="$LIBS"
5817
5818 cf_add_libs="${LD_RPATH_OPT}$libdir"
5819 # Filter out duplicates - this happens with badly-designed ".pc" files...
5820 for cf_add_1lib in $LIBS
5821 do
5822         for cf_add_2lib in $cf_add_libs
5823         do
5824                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5825                 then
5826                         cf_add_1lib=
5827                         break
5828                 fi
5829         done
5830         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5831 done
5832 LIBS="$cf_add_libs"
5833
5834         cat >conftest.$ac_ext <<_ACEOF
5835 #line 5835 "configure"
5836 #include "confdefs.h"
5837
5838 int
5839 main ()
5840 {
5841
5842   ;
5843   return 0;
5844 }
5845 _ACEOF
5846 rm -f conftest.$ac_objext conftest$ac_exeext
5847 if { (eval echo "$as_me:5847: \"$ac_link\"") >&5
5848   (eval $ac_link) 2>&5
5849   ac_status=$?
5850   echo "$as_me:5850: \$? = $ac_status" >&5
5851   (exit $ac_status); } &&
5852          { ac_try='test -s conftest$ac_exeext'
5853   { (eval echo "$as_me:5853: \"$ac_try\"") >&5
5854   (eval $ac_try) 2>&5
5855   ac_status=$?
5856   echo "$as_me:5856: \$? = $ac_status" >&5
5857   (exit $ac_status); }; }; then
5858   cf_rpath_space=no
5859 else
5860   echo "$as_me: failed program was:" >&5
5861 cat conftest.$ac_ext >&5
5862 cf_rpath_space=yes
5863 fi
5864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5865         LIBS="$cf_save_LIBS"
5866         echo "$as_me:5866: result: $cf_rpath_space" >&5
5867 echo "${ECHO_T}$cf_rpath_space" >&6
5868         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5869         ;;
5870 esac
5871
5872         RM_SHARED_OPTS=
5873         LOCAL_LDFLAGS=
5874         LOCAL_LDFLAGS2=
5875         LD_SHARED_OPTS=
5876         INSTALL_LIB="-m 644"
5877         : ${rel_builddir:=.}
5878
5879         shlibdir=$libdir
5880
5881         MAKE_DLLS="#"
5882
5883         cf_cv_do_symlinks=no
5884         cf_ld_rpath_opt=
5885         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5886
5887         echo "$as_me:5887: checking if release/abi version should be used for shared libs" >&5
5888 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5889
5890 # Check whether --with-shlib-version or --without-shlib-version was given.
5891 if test "${with_shlib_version+set}" = set; then
5892   withval="$with_shlib_version"
5893   test -z "$withval" && withval=auto
5894         case $withval in #(vi
5895         yes) #(vi
5896                 cf_cv_shlib_version=auto
5897                 ;;
5898         rel|abi|auto|no) #(vi
5899                 cf_cv_shlib_version=$withval
5900                 ;;
5901         *)
5902                 { { echo "$as_me:5902: error: option value must be one of: rel, abi, auto or no" >&5
5903 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5904    { (exit 1); exit 1; }; }
5905                 ;;
5906         esac
5907
5908 else
5909   cf_cv_shlib_version=auto
5910 fi;
5911         echo "$as_me:5911: result: $cf_cv_shlib_version" >&5
5912 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5913
5914         cf_cv_rm_so_locs=no
5915         cf_try_cflags=
5916
5917         # Some less-capable ports of gcc support only -fpic
5918         CC_SHARED_OPTS=
5919         if test "$GCC" = yes
5920         then
5921                 echo "$as_me:5921: checking which $CC option to use" >&5
5922 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5923                 cf_save_CFLAGS="$CFLAGS"
5924                 for CC_SHARED_OPTS in -fPIC -fpic ''
5925                 do
5926                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5927                         cat >conftest.$ac_ext <<_ACEOF
5928 #line 5928 "configure"
5929 #include "confdefs.h"
5930 #include <stdio.h>
5931 int
5932 main ()
5933 {
5934 int x = 1
5935   ;
5936   return 0;
5937 }
5938 _ACEOF
5939 rm -f conftest.$ac_objext
5940 if { (eval echo "$as_me:5940: \"$ac_compile\"") >&5
5941   (eval $ac_compile) 2>&5
5942   ac_status=$?
5943   echo "$as_me:5943: \$? = $ac_status" >&5
5944   (exit $ac_status); } &&
5945          { ac_try='test -s conftest.$ac_objext'
5946   { (eval echo "$as_me:5946: \"$ac_try\"") >&5
5947   (eval $ac_try) 2>&5
5948   ac_status=$?
5949   echo "$as_me:5949: \$? = $ac_status" >&5
5950   (exit $ac_status); }; }; then
5951   break
5952 else
5953   echo "$as_me: failed program was:" >&5
5954 cat conftest.$ac_ext >&5
5955 fi
5956 rm -f conftest.$ac_objext conftest.$ac_ext
5957                 done
5958                 echo "$as_me:5958: result: $CC_SHARED_OPTS" >&5
5959 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5960                 CFLAGS="$cf_save_CFLAGS"
5961         fi
5962
5963         cf_cv_shlib_version_infix=no
5964
5965         case $cf_cv_system_name in #(vi
5966         aix4.3-9*|aix[5-7]*) #(vi
5967                 if test "$GCC" = yes; then
5968                         CC_SHARED_OPTS=
5969                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5970                 else
5971                         # CC_SHARED_OPTS='-qpic=large -G'
5972                         # perhaps "-bM:SRE -bnoentry -bexpall"
5973                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5974                 fi
5975                 ;;
5976         beos*) #(vi
5977                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5978                 ;;
5979         cygwin*) #(vi
5980                 CC_SHARED_OPTS=
5981                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5982                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5983                 cf_cv_shlib_version=cygdll
5984                 cf_cv_shlib_version_infix=cygdll
5985                 shlibdir=$bindir
5986                 MAKE_DLLS=
5987                 cat >mk_shared_lib.sh <<-CF_EOF
5988                 #!/bin/sh
5989                 SHARED_LIB=\$1
5990                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5991                 shift
5992                 cat <<-EOF
5993                 Linking shared library
5994                 ** SHARED_LIB \$SHARED_LIB
5995                 ** IMPORT_LIB \$IMPORT_LIB
5996 EOF
5997                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5998 CF_EOF
5999                 chmod +x mk_shared_lib.sh
6000                 ;;
6001         msys*) #(vi
6002                 CC_SHARED_OPTS=
6003                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6004                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6005                 cf_cv_shlib_version=msysdll
6006                 cf_cv_shlib_version_infix=msysdll
6007                 shlibdir=$bindir
6008                 MAKE_DLLS=
6009                 cat >mk_shared_lib.sh <<-CF_EOF
6010                 #!/bin/sh
6011                 SHARED_LIB=\$1
6012                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6013                 shift
6014                 cat <<-EOF
6015                 Linking shared library
6016                 ** SHARED_LIB \$SHARED_LIB
6017                 ** IMPORT_LIB \$IMPORT_LIB
6018 EOF
6019                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6020 CF_EOF
6021                 chmod +x mk_shared_lib.sh
6022                 ;;
6023         darwin*) #(vi
6024                 cf_try_cflags="no-cpp-precomp"
6025                 CC_SHARED_OPTS="-dynamic"
6026                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6027                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6028                 cf_cv_shlib_version_infix=yes
6029                 echo "$as_me:6029: checking if ld -search_paths_first works" >&5
6030 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6031 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6032   echo $ECHO_N "(cached) $ECHO_C" >&6
6033 else
6034
6035                         cf_save_LDFLAGS=$LDFLAGS
6036                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6037                         cat >conftest.$ac_ext <<_ACEOF
6038 #line 6038 "configure"
6039 #include "confdefs.h"
6040
6041 int
6042 main ()
6043 {
6044 int i;
6045   ;
6046   return 0;
6047 }
6048 _ACEOF
6049 rm -f conftest.$ac_objext conftest$ac_exeext
6050 if { (eval echo "$as_me:6050: \"$ac_link\"") >&5
6051   (eval $ac_link) 2>&5
6052   ac_status=$?
6053   echo "$as_me:6053: \$? = $ac_status" >&5
6054   (exit $ac_status); } &&
6055          { ac_try='test -s conftest$ac_exeext'
6056   { (eval echo "$as_me:6056: \"$ac_try\"") >&5
6057   (eval $ac_try) 2>&5
6058   ac_status=$?
6059   echo "$as_me:6059: \$? = $ac_status" >&5
6060   (exit $ac_status); }; }; then
6061   cf_cv_ldflags_search_paths_first=yes
6062 else
6063   echo "$as_me: failed program was:" >&5
6064 cat conftest.$ac_ext >&5
6065 cf_cv_ldflags_search_paths_first=no
6066 fi
6067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6068                                 LDFLAGS=$cf_save_LDFLAGS
6069 fi
6070 echo "$as_me:6070: result: $cf_cv_ldflags_search_paths_first" >&5
6071 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6072                 if test $cf_cv_ldflags_search_paths_first = yes; then
6073                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6074                 fi
6075                 ;;
6076         hpux[7-8]*) #(vi
6077                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6078                 if test "$GCC" != yes; then
6079                         CC_SHARED_OPTS='+Z'
6080                 fi
6081                 MK_SHARED_LIB='${LD} -b -o $@'
6082                 INSTALL_LIB="-m 555"
6083                 ;;
6084         hpux*) #(vi
6085                 # (tested with gcc 2.7.2 -- I don't have c89)
6086                 if test "$GCC" = yes; then
6087                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6088                 else
6089                         CC_SHARED_OPTS='+Z'
6090                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6091                 fi
6092                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6093                 # HP-UX shared libraries must be executable, and should be
6094                 # readonly to exploit a quirk in the memory manager.
6095                 INSTALL_LIB="-m 555"
6096                 ;;
6097         interix*)
6098                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6099                 if test "$cf_cv_shlib_version" = rel; then
6100                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6101                 else
6102                         cf_shared_soname='`basename `'
6103                 fi
6104                 CC_SHARED_OPTS=
6105                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6106                 ;;
6107         irix*) #(vi
6108                 if test "$cf_cv_enable_rpath" = yes ; then
6109                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6110                 fi
6111                 # tested with IRIX 5.2 and 'cc'.
6112                 if test "$GCC" != yes; then
6113                         CC_SHARED_OPTS='-KPIC'
6114                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6115                 else
6116                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6117                 fi
6118                 cf_cv_rm_so_locs=yes
6119                 ;;
6120         linux*|gnu*|k*bsd*-gnu) #(vi
6121                 if test "$DFT_LWR_MODEL" = "shared" ; then
6122                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6123                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6124                 fi
6125                 if test "$cf_cv_enable_rpath" = yes ; then
6126                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6127                 fi
6128
6129         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6130         if test "$cf_cv_shlib_version" = rel; then
6131                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6132         else
6133                 cf_cv_shared_soname='`basename $@`'
6134         fi
6135
6136                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6137                 ;;
6138         mingw*) #(vi
6139                 cf_cv_shlib_version=mingw
6140                 cf_cv_shlib_version_infix=mingw
6141                 shlibdir=$bindir
6142                 MAKE_DLLS=
6143                 if test "$DFT_LWR_MODEL" = "shared" ; then
6144                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6145                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6146                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6147                 fi
6148                 CC_SHARED_OPTS=
6149                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6150                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6151                 cat >mk_shared_lib.sh <<-CF_EOF
6152                 #!/bin/sh
6153                 SHARED_LIB=\$1
6154                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6155                 shift
6156                 cat <<-EOF
6157                 Linking shared library
6158                 ** SHARED_LIB \$SHARED_LIB
6159                 ** IMPORT_LIB \$IMPORT_LIB
6160 EOF
6161                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6162 CF_EOF
6163                 chmod +x mk_shared_lib.sh
6164                 ;;
6165         openbsd[2-9].*|mirbsd*) #(vi
6166                 if test "$DFT_LWR_MODEL" = "shared" ; then
6167                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6168                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6169                 fi
6170                 if test "$cf_cv_enable_rpath" = yes ; then
6171                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6172                 fi
6173                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
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,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6183                 ;;
6184         nto-qnx*|openbsd*|freebsd[12].*) #(vi
6185                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6186                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6187                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6188                 ;;
6189         dragonfly*|freebsd*) #(vi
6190                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6191                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6192                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6193                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6194                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6195                 fi
6196
6197         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6198         if test "$cf_cv_shlib_version" = rel; then
6199                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6200         else
6201                 cf_cv_shared_soname='`basename $@`'
6202         fi
6203
6204                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
6205                 ;;
6206         netbsd*) #(vi
6207                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6208                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6209                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6210                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6211                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6212                         if test "$cf_cv_shlib_version" = auto; then
6213                         if test -f /usr/libexec/ld.elf_so; then
6214                                 cf_cv_shlib_version=abi
6215                         else
6216                                 cf_cv_shlib_version=rel
6217                         fi
6218                         fi
6219
6220         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6221         if test "$cf_cv_shlib_version" = rel; then
6222                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6223         else
6224                 cf_cv_shared_soname='`basename $@`'
6225         fi
6226
6227                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6228                 else
6229                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6230                 fi
6231                 ;;
6232         osf*|mls+*) #(vi
6233                 # tested with OSF/1 V3.2 and 'cc'
6234                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6235                 # link with shared libs).
6236                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6237                 case $host_os in #(vi
6238                 osf4*)
6239                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6240                         ;;
6241                 esac
6242                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6243                 if test "$DFT_LWR_MODEL" = "shared" ; then
6244                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6245                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6246                 fi
6247                 cf_cv_rm_so_locs=yes
6248                 ;;
6249         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6250                 # tested with osr5.0.5
6251                 if test "$GCC" != yes; then
6252                         CC_SHARED_OPTS='-belf -KPIC'
6253                 fi
6254                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6255                 if test "$cf_cv_enable_rpath" = yes ; then
6256                         # only way is to set LD_RUN_PATH but no switch for it
6257                         RUN_PATH=$libdir
6258                 fi
6259                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6260                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6261                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6262                 ;;
6263         sunos4*) #(vi
6264                 # tested with SunOS 4.1.1 and gcc 2.7.0
6265                 if test "$GCC" != yes; then
6266                         CC_SHARED_OPTS='-KPIC'
6267                 fi
6268                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6269                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6270                 ;;
6271         solaris2*) #(vi
6272                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6273                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6274                 if test "$DFT_LWR_MODEL" = "shared" ; then
6275                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6276                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6277                 fi
6278                 if test "$cf_cv_enable_rpath" = yes ; then
6279                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6280                 fi
6281
6282         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6283         if test "$cf_cv_shlib_version" = rel; then
6284                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6285         else
6286                 cf_cv_shared_soname='`basename $@`'
6287         fi
6288
6289                 if test "$GCC" != yes; then
6290                         cf_save_CFLAGS="$CFLAGS"
6291                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6292                         do
6293                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6294                                 cat >conftest.$ac_ext <<_ACEOF
6295 #line 6295 "configure"
6296 #include "confdefs.h"
6297 #include <stdio.h>
6298 int
6299 main ()
6300 {
6301 printf("Hello\n");
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306 rm -f conftest.$ac_objext
6307 if { (eval echo "$as_me:6307: \"$ac_compile\"") >&5
6308   (eval $ac_compile) 2>&5
6309   ac_status=$?
6310   echo "$as_me:6310: \$? = $ac_status" >&5
6311   (exit $ac_status); } &&
6312          { ac_try='test -s conftest.$ac_objext'
6313   { (eval echo "$as_me:6313: \"$ac_try\"") >&5
6314   (eval $ac_try) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); }; }; then
6318   break
6319 else
6320   echo "$as_me: failed program was:" >&5
6321 cat conftest.$ac_ext >&5
6322 fi
6323 rm -f conftest.$ac_objext conftest.$ac_ext
6324                         done
6325                         CFLAGS="$cf_save_CFLAGS"
6326                         CC_SHARED_OPTS=$cf_shared_opts
6327                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6328                 else
6329                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6330                 fi
6331                 ;;
6332         sysv5uw7*|unix_sv*) #(vi
6333                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6334                 if test "$GCC" != yes; then
6335                         CC_SHARED_OPTS='-KPIC'
6336                 fi
6337                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6338                 ;;
6339         *)
6340                 CC_SHARED_OPTS='unknown'
6341                 MK_SHARED_LIB='echo unknown'
6342                 ;;
6343         esac
6344
6345         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6346         case "$cf_cv_shlib_version" in #(vi
6347         rel|abi)
6348                 case "$MK_SHARED_LIB" in #(vi
6349                 *'-o $@') #(vi
6350                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6351                         ;;
6352                 *)
6353                         { echo "$as_me:6353: WARNING: ignored --with-shlib-version" >&5
6354 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6355                         ;;
6356                 esac
6357                 ;;
6358         esac
6359
6360         if test -n "$cf_try_cflags"
6361         then
6362 cat > conftest.$ac_ext <<EOF
6363 #line 6363 "${as_me:-configure}"
6364 #include <stdio.h>
6365 int main(int argc, char *argv[])
6366 {
6367         printf("hello\n");
6368         return (argv[argc-1] == 0) ;
6369 }
6370 EOF
6371                 cf_save_CFLAGS="$CFLAGS"
6372                 for cf_opt in $cf_try_cflags
6373                 do
6374                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6375                         echo "$as_me:6375: checking if CFLAGS option -$cf_opt works" >&5
6376 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6377                         if { (eval echo "$as_me:6377: \"$ac_compile\"") >&5
6378   (eval $ac_compile) 2>&5
6379   ac_status=$?
6380   echo "$as_me:6380: \$? = $ac_status" >&5
6381   (exit $ac_status); }; then
6382                                 echo "$as_me:6382: result: yes" >&5
6383 echo "${ECHO_T}yes" >&6
6384                                 cf_save_CFLAGS="$CFLAGS"
6385                         else
6386                                 echo "$as_me:6386: result: no" >&5
6387 echo "${ECHO_T}no" >&6
6388                         fi
6389                 done
6390                 CFLAGS="$cf_save_CFLAGS"
6391         fi
6392
6393         # RPATH_LIST is a colon-separated list of directories
6394         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6395         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6396
6397         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6398
6399         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6400
6401 echo "${as_me:-configure}:6401: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6402
6403         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6404
6405 echo "${as_me:-configure}:6405: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6406
6407 for model in $cf_list_models; do
6408         case $model in #(vi
6409         libtool)
6410
6411 echo "$as_me:6411: checking for additional libtool options" >&5
6412 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6413
6414 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6415 if test "${with_libtool_opts+set}" = set; then
6416   withval="$with_libtool_opts"
6417   with_libtool_opts=$withval
6418 else
6419   with_libtool_opts=no
6420 fi;
6421 echo "$as_me:6421: result: $with_libtool_opts" >&5
6422 echo "${ECHO_T}$with_libtool_opts" >&6
6423
6424 case .$with_libtool_opts in
6425 .yes|.no|.)
6426         ;;
6427 *)
6428         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6429         ;;
6430 esac
6431
6432 echo "$as_me:6432: checking if exported-symbols file should be used" >&5
6433 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6434
6435 # Check whether --with-export-syms or --without-export-syms was given.
6436 if test "${with_export_syms+set}" = set; then
6437   withval="$with_export_syms"
6438   with_export_syms=$withval
6439 else
6440   with_export_syms=no
6441 fi;
6442 if test "x$with_export_syms" = xyes
6443 then
6444         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6445
6446 fi
6447 echo "$as_me:6447: result: $with_export_syms" >&5
6448 echo "${ECHO_T}$with_export_syms" >&6
6449 if test "x$with_export_syms" != xno
6450 then
6451         EXPORT_SYMS="-export-symbols $with_export_syms"
6452
6453 fi
6454
6455                 ;;
6456         shared) #(vi
6457                 if test "$CC_SHARED_OPTS" = "unknown"; then
6458                         { { echo "$as_me:6458: error: Shared libraries are not supported in this version" >&5
6459 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6460    { (exit 1); exit 1; }; }
6461                 fi
6462
6463 echo "$as_me:6463: checking if versioned-symbols file should be used" >&5
6464 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6465
6466 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6467 if test "${with_versioned_syms+set}" = set; then
6468   withval="$with_versioned_syms"
6469   with_versioned_syms=$withval
6470 else
6471   with_versioned_syms=no
6472 fi;
6473 if test "x$with_versioned_syms" = xyes
6474 then
6475         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6476
6477 fi
6478 echo "$as_me:6478: result: $with_versioned_syms" >&5
6479 echo "${ECHO_T}$with_versioned_syms" >&6
6480
6481 RESULTING_SYMS=
6482 VERSIONED_SYMS=
6483
6484 if test "x$with_versioned_syms" != xno
6485 then
6486         RESULTING_SYMS=$with_versioned_syms
6487         case "x$MK_SHARED_LIB" in
6488         *-Wl,*) #(vi
6489                 VERSIONED_SYMS="-Wl,--version-script,\$(RESULTING_SYMS)"
6490                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6491                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6492
6493 echo "${as_me:-configure}:6493: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6494
6495                 ;;
6496         *-dy*) #(vi
6497                 VERSIONED_SYMS="-Wl,-M,\$(RESULTING_SYMS)"
6498                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6499                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6500
6501 echo "${as_me:-configure}:6501: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6502
6503                 ;;
6504         *)
6505                 { echo "$as_me:6505: WARNING: this system does not support versioned-symbols" >&5
6506 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6507                 ;;
6508         esac
6509 fi
6510
6511                 ;;
6512         esac
6513 done
6514
6515 # pretend that ncurses==ncursesw==ncursest
6516 echo "$as_me:6516: checking if you want to disable library suffixes" >&5
6517 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6518
6519 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6520 if test "${enable_lib_suffixes+set}" = set; then
6521   enableval="$enable_lib_suffixes"
6522   disable_lib_suffixes=$enableval
6523 else
6524   disable_lib_suffixes=no
6525 fi;
6526 echo "$as_me:6526: result: $disable_lib_suffixes" >&5
6527 echo "${ECHO_T}$disable_lib_suffixes" >&6
6528
6529 ### If we're building with rpath, try to link non-standard libs that way too.
6530 if test "$DFT_LWR_MODEL" = "shared"; then
6531
6532 echo "$as_me:6532: checking if rpath-hack should be disabled" >&5
6533 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6534
6535 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6536 if test "${enable_rpath_hack+set}" = set; then
6537   enableval="$enable_rpath_hack"
6538   test "$enableval" != no && enableval=yes
6539   if test "$enableval" != "yes" ; then
6540     cf_disable_rpath_hack=yes
6541   else
6542     cf_disable_rpath_hack=no
6543   fi
6544 else
6545   enableval=yes
6546   cf_disable_rpath_hack=no
6547
6548 fi;
6549 echo "$as_me:6549: result: $cf_disable_rpath_hack" >&5
6550 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6551 if test "$cf_disable_rpath_hack" = no ; then
6552
6553 echo "$as_me:6553: checking for updated LDFLAGS" >&5
6554 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6555 if test -n "$LD_RPATH_OPT" ; then
6556         echo "$as_me:6556: result: maybe" >&5
6557 echo "${ECHO_T}maybe" >&6
6558
6559         for ac_prog in ldd
6560 do
6561   # Extract the first word of "$ac_prog", so it can be a program name with args.
6562 set dummy $ac_prog; ac_word=$2
6563 echo "$as_me:6563: checking for $ac_word" >&5
6564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6565 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6566   echo $ECHO_N "(cached) $ECHO_C" >&6
6567 else
6568   if test -n "$cf_ldd_prog"; then
6569   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6570 else
6571   ac_save_IFS=$IFS; IFS=$ac_path_separator
6572 ac_dummy="$PATH"
6573 for ac_dir in $ac_dummy; do
6574   IFS=$ac_save_IFS
6575   test -z "$ac_dir" && ac_dir=.
6576   $as_executable_p "$ac_dir/$ac_word" || continue
6577 ac_cv_prog_cf_ldd_prog="$ac_prog"
6578 echo "$as_me:6578: found $ac_dir/$ac_word" >&5
6579 break
6580 done
6581
6582 fi
6583 fi
6584 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6585 if test -n "$cf_ldd_prog"; then
6586   echo "$as_me:6586: result: $cf_ldd_prog" >&5
6587 echo "${ECHO_T}$cf_ldd_prog" >&6
6588 else
6589   echo "$as_me:6589: result: no" >&5
6590 echo "${ECHO_T}no" >&6
6591 fi
6592
6593   test -n "$cf_ldd_prog" && break
6594 done
6595 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6596
6597         cf_rpath_list="/usr/lib /lib"
6598         if test "$cf_ldd_prog" != no
6599         then
6600                 cf_rpath_oops=
6601
6602 cat >conftest.$ac_ext <<_ACEOF
6603 #line 6603 "configure"
6604 #include "confdefs.h"
6605 #include <stdio.h>
6606 int
6607 main ()
6608 {
6609 printf("Hello");
6610   ;
6611   return 0;
6612 }
6613 _ACEOF
6614 rm -f conftest.$ac_objext conftest$ac_exeext
6615 if { (eval echo "$as_me:6615: \"$ac_link\"") >&5
6616   (eval $ac_link) 2>&5
6617   ac_status=$?
6618   echo "$as_me:6618: \$? = $ac_status" >&5
6619   (exit $ac_status); } &&
6620          { ac_try='test -s conftest$ac_exeext'
6621   { (eval echo "$as_me:6621: \"$ac_try\"") >&5
6622   (eval $ac_try) 2>&5
6623   ac_status=$?
6624   echo "$as_me:6624: \$? = $ac_status" >&5
6625   (exit $ac_status); }; }; then
6626   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6627                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6628 else
6629   echo "$as_me: failed program was:" >&5
6630 cat conftest.$ac_ext >&5
6631 fi
6632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6633
6634                 # If we passed the link-test, but get a "not found" on a given library,
6635                 # this could be due to inept reconfiguration of gcc to make it only
6636                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6637                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6638                 # /usr/local libraries.
6639                 if test -n "$cf_rpath_oops"
6640                 then
6641                         for cf_rpath_src in $cf_rpath_oops
6642                         do
6643                                 for cf_rpath_dir in \
6644                                         /usr/local \
6645                                         /usr/pkg \
6646                                         /opt/sfw
6647                                 do
6648                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6649                                         then
6650                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6651
6652 echo "${as_me:-configure}:6652: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6653
6654                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6655                                                 break
6656                                         fi
6657                                 done
6658                         done
6659                 fi
6660         fi
6661
6662         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6663
6664 echo "${as_me:-configure}:6664: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6665
6666 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6667
6668 echo "${as_me:-configure}:6668: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6669
6670 cf_rpath_dst=
6671 for cf_rpath_src in $LDFLAGS
6672 do
6673         case $cf_rpath_src in #(vi
6674         -L*) #(vi
6675
6676                 # check if this refers to a directory which we will ignore
6677                 cf_rpath_skip=no
6678                 if test -n "$cf_rpath_list"
6679                 then
6680                         for cf_rpath_item in $cf_rpath_list
6681                         do
6682                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6683                                 then
6684                                         cf_rpath_skip=yes
6685                                         break
6686                                 fi
6687                         done
6688                 fi
6689
6690                 if test "$cf_rpath_skip" = no
6691                 then
6692                         # transform the option
6693                         if test "$LD_RPATH_OPT" = "-R " ; then
6694                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6695                         else
6696                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6697                         fi
6698
6699                         # if we have not already added this, add it now
6700                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6701                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6702                         then
6703                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6704
6705 echo "${as_me:-configure}:6705: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6706
6707                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6708                         fi
6709                 fi
6710                 ;;
6711         esac
6712         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6713 done
6714 LDFLAGS=$cf_rpath_dst
6715
6716 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6717
6718 echo "${as_me:-configure}:6718: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6719
6720 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6721
6722 echo "${as_me:-configure}:6722: testing ...checking LIBS $LIBS ..." 1>&5
6723
6724 cf_rpath_dst=
6725 for cf_rpath_src in $LIBS
6726 do
6727         case $cf_rpath_src in #(vi
6728         -L*) #(vi
6729
6730                 # check if this refers to a directory which we will ignore
6731                 cf_rpath_skip=no
6732                 if test -n "$cf_rpath_list"
6733                 then
6734                         for cf_rpath_item in $cf_rpath_list
6735                         do
6736                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6737                                 then
6738                                         cf_rpath_skip=yes
6739                                         break
6740                                 fi
6741                         done
6742                 fi
6743
6744                 if test "$cf_rpath_skip" = no
6745                 then
6746                         # transform the option
6747                         if test "$LD_RPATH_OPT" = "-R " ; then
6748                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6749                         else
6750                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6751                         fi
6752
6753                         # if we have not already added this, add it now
6754                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6755                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6756                         then
6757                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6758
6759 echo "${as_me:-configure}:6759: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6760
6761                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6762                         fi
6763                 fi
6764                 ;;
6765         esac
6766         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6767 done
6768 LIBS=$cf_rpath_dst
6769
6770 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6771
6772 echo "${as_me:-configure}:6772: testing ...checked LIBS $LIBS ..." 1>&5
6773
6774         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6775
6776 echo "${as_me:-configure}:6776: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6777
6778 else
6779         echo "$as_me:6779: result: no" >&5
6780 echo "${ECHO_T}no" >&6
6781 fi
6782
6783 fi
6784
6785 fi
6786
6787 ###############################################################################
6788
6789 ###     use option --disable-overwrite to leave out the link to -lcurses
6790 echo "$as_me:6790: checking if you wish to install ncurses overwriting curses" >&5
6791 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6792
6793 # Check whether --enable-overwrite or --disable-overwrite was given.
6794 if test "${enable_overwrite+set}" = set; then
6795   enableval="$enable_overwrite"
6796   with_overwrite=$enableval
6797 else
6798   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6799 fi;
6800 echo "$as_me:6800: result: $with_overwrite" >&5
6801 echo "${ECHO_T}$with_overwrite" >&6
6802
6803 echo "$as_me:6803: checking if external terminfo-database is used" >&5
6804 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6805
6806 # Check whether --enable-database or --disable-database was given.
6807 if test "${enable_database+set}" = set; then
6808   enableval="$enable_database"
6809   use_database=$enableval
6810 else
6811   use_database=yes
6812 fi;
6813 echo "$as_me:6813: result: $use_database" >&5
6814 echo "${ECHO_T}$use_database" >&6
6815
6816 case $host_os in #(vi
6817 os2*) #(vi
6818         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6819         ;;
6820 *) #(vi
6821         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6822         ;;
6823 esac
6824
6825 NCURSES_USE_DATABASE=0
6826 if test "$use_database" != no ; then
6827         NCURSES_USE_DATABASE=1
6828
6829         echo "$as_me:6829: checking which terminfo source-file will be installed" >&5
6830 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6831
6832 # Check whether --with-database or --without-database was given.
6833 if test "${with_database+set}" = set; then
6834   withval="$with_database"
6835   TERMINFO_SRC=$withval
6836 fi;
6837         echo "$as_me:6837: result: $TERMINFO_SRC" >&5
6838 echo "${ECHO_T}$TERMINFO_SRC" >&6
6839
6840         echo "$as_me:6840: checking whether to use hashed database instead of directory/tree" >&5
6841 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6842
6843 # Check whether --with-hashed-db or --without-hashed-db was given.
6844 if test "${with_hashed_db+set}" = set; then
6845   withval="$with_hashed_db"
6846
6847 else
6848   with_hashed_db=no
6849 fi;
6850         echo "$as_me:6850: result: $with_hashed_db" >&5
6851 echo "${ECHO_T}$with_hashed_db" >&6
6852 else
6853         with_hashed_db=no
6854 fi
6855
6856 echo "$as_me:6856: checking for list of fallback descriptions" >&5
6857 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6858
6859 # Check whether --with-fallbacks or --without-fallbacks was given.
6860 if test "${with_fallbacks+set}" = set; then
6861   withval="$with_fallbacks"
6862   with_fallback=$withval
6863 else
6864   with_fallback=
6865 fi;
6866 echo "$as_me:6866: result: $with_fallback" >&5
6867 echo "${ECHO_T}$with_fallback" >&6
6868 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6869
6870 echo "$as_me:6870: checking if you want modern xterm or antique" >&5
6871 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6872
6873 # Check whether --with-xterm-new or --without-xterm-new was given.
6874 if test "${with_xterm_new+set}" = set; then
6875   withval="$with_xterm_new"
6876   with_xterm_new=$withval
6877 else
6878   with_xterm_new=yes
6879 fi;
6880 case $with_xterm_new in
6881 no)     with_xterm_new=xterm-old;;
6882 *)      with_xterm_new=xterm-new;;
6883 esac
6884 echo "$as_me:6884: result: $with_xterm_new" >&5
6885 echo "${ECHO_T}$with_xterm_new" >&6
6886 WHICH_XTERM=$with_xterm_new
6887
6888 echo "$as_me:6888: checking if xterm backspace sends BS or DEL" >&5
6889 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6890
6891 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6892 if test "${with_xterm_kbs+set}" = set; then
6893   withval="$with_xterm_kbs"
6894   with_xterm_kbs=$withval
6895 else
6896   with_xterm_kbs=BS
6897 fi;
6898 case x$with_xterm_kbs in
6899 xyes|xno|xBS|xbs|x8)
6900         with_xterm_kbs=BS
6901         ;;
6902 xDEL|xdel|x127)
6903         with_xterm_kbs=DEL
6904         ;;
6905 *)
6906         with_xterm_kbs=$withval
6907         ;;
6908 esac
6909 echo "$as_me:6909: result: $with_xterm_kbs" >&5
6910 echo "${ECHO_T}$with_xterm_kbs" >&6
6911 XTERM_KBS=$with_xterm_kbs
6912
6913 MAKE_TERMINFO=
6914 if test "$use_database" = no ; then
6915         TERMINFO="${datadir}/terminfo"
6916         MAKE_TERMINFO="#"
6917 else
6918
6919 echo "$as_me:6919: checking for list of terminfo directories" >&5
6920 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6921
6922 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6923 if test "${with_terminfo_dirs+set}" = set; then
6924   withval="$with_terminfo_dirs"
6925
6926 else
6927   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6928 fi;
6929 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6930 cf_dst_path=
6931 for cf_src_path in $withval
6932 do
6933
6934 if test "x$prefix" != xNONE; then
6935   cf_path_syntax="$prefix"
6936 else
6937   cf_path_syntax="$ac_default_prefix"
6938 fi
6939
6940 case ".$cf_src_path" in #(vi
6941 .\$\(*\)*|.\'*\'*) #(vi
6942   ;;
6943 ..|./*|.\\*) #(vi
6944   ;;
6945 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6946   ;;
6947 .\${*prefix}*|.\${*dir}*) #(vi
6948   eval cf_src_path="$cf_src_path"
6949   case ".$cf_src_path" in #(vi
6950   .NONE/*)
6951     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6952     ;;
6953   esac
6954   ;; #(vi
6955 .no|.NONE/*)
6956   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6957   ;;
6958 *)
6959   { { echo "$as_me:6959: error: expected a pathname, not \"$cf_src_path\"" >&5
6960 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6961    { (exit 1); exit 1; }; }
6962   ;;
6963 esac
6964
6965   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6966   cf_dst_path="${cf_dst_path}${cf_src_path}"
6967 done
6968 IFS="$ac_save_ifs"
6969
6970 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6971 # so we have to check/work around.  We do prefer the result of "eval"...
6972 eval cf_dst_eval="$cf_dst_path"
6973 case "x$cf_dst_eval" in #(vi
6974 xNONE*) #(vi
6975         TERMINFO_DIRS=$cf_dst_path
6976         ;;
6977 *)
6978         TERMINFO_DIRS="$cf_dst_eval"
6979         ;;
6980 esac
6981
6982 echo "$as_me:6982: result: $TERMINFO_DIRS" >&5
6983 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6984 test -n "$TERMINFO_DIRS" &&
6985 cat >>confdefs.h <<EOF
6986 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6987 EOF
6988
6989 echo "$as_me:6989: checking for default terminfo directory" >&5
6990 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6991
6992 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6993 if test "${with_default_terminfo_dir+set}" = set; then
6994   withval="$with_default_terminfo_dir"
6995
6996 else
6997   withval="${TERMINFO:-${datadir}/terminfo}"
6998 fi; if test -n "${datadir}/terminfo" ; then
6999
7000 if test "x$prefix" != xNONE; then
7001   cf_path_syntax="$prefix"
7002 else
7003   cf_path_syntax="$ac_default_prefix"
7004 fi
7005
7006 case ".$withval" in #(vi
7007 .\$\(*\)*|.\'*\'*) #(vi
7008   ;;
7009 ..|./*|.\\*) #(vi
7010   ;;
7011 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7012   ;;
7013 .\${*prefix}*|.\${*dir}*) #(vi
7014   eval withval="$withval"
7015   case ".$withval" in #(vi
7016   .NONE/*)
7017     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7018     ;;
7019   esac
7020   ;; #(vi
7021 .no|.NONE/*)
7022   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7023   ;;
7024 *)
7025   { { echo "$as_me:7025: error: expected a pathname, not \"$withval\"" >&5
7026 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7027    { (exit 1); exit 1; }; }
7028   ;;
7029 esac
7030
7031 fi
7032 eval TERMINFO="$withval"
7033
7034 echo "$as_me:7034: result: $TERMINFO" >&5
7035 echo "${ECHO_T}$TERMINFO" >&6
7036
7037 cat >>confdefs.h <<EOF
7038 #define TERMINFO "$TERMINFO"
7039 EOF
7040
7041 fi
7042
7043 ###     use option --disable-big-core to make tic run on small machines
7044 ###     We need 4Mb, check if we can allocate 50% more than that.
7045 echo "$as_me:7045: checking if big-core option selected" >&5
7046 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7047
7048 # Check whether --enable-big-core or --disable-big-core was given.
7049 if test "${enable_big_core+set}" = set; then
7050   enableval="$enable_big_core"
7051   with_big_core=$enableval
7052 else
7053   if test "$cross_compiling" = yes; then
7054   with_big_core=no
7055 else
7056   cat >conftest.$ac_ext <<_ACEOF
7057 #line 7057 "configure"
7058 #include "confdefs.h"
7059
7060 #include <stdlib.h>
7061 #include <string.h>
7062 int main() {
7063         unsigned long n = 6000000L;
7064         char *s = malloc(n);
7065         if (s != 0)
7066                 s[0] = s[n-1] = 0;
7067         ${cf_cv_main_return:-return}(s == 0);
7068 }
7069 _ACEOF
7070 rm -f conftest$ac_exeext
7071 if { (eval echo "$as_me:7071: \"$ac_link\"") >&5
7072   (eval $ac_link) 2>&5
7073   ac_status=$?
7074   echo "$as_me:7074: \$? = $ac_status" >&5
7075   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7076   { (eval echo "$as_me:7076: \"$ac_try\"") >&5
7077   (eval $ac_try) 2>&5
7078   ac_status=$?
7079   echo "$as_me:7079: \$? = $ac_status" >&5
7080   (exit $ac_status); }; }; then
7081   with_big_core=yes
7082 else
7083   echo "$as_me: program exited with status $ac_status" >&5
7084 echo "$as_me: failed program was:" >&5
7085 cat conftest.$ac_ext >&5
7086 with_big_core=no
7087 fi
7088 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7089 fi
7090 fi;
7091 echo "$as_me:7091: result: $with_big_core" >&5
7092 echo "${ECHO_T}$with_big_core" >&6
7093 test "x$with_big_core" = "xyes" &&
7094 cat >>confdefs.h <<\EOF
7095 #define HAVE_BIG_CORE 1
7096 EOF
7097
7098 ### ISO C only guarantees 512-char strings, we have tables which load faster
7099 ### when constructed using "big" strings.  More than the C compiler, the awk
7100 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7101 echo "$as_me:7101: checking if big-strings option selected" >&5
7102 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7103
7104 # Check whether --enable-big-strings or --disable-big-strings was given.
7105 if test "${enable_big_strings+set}" = set; then
7106   enableval="$enable_big_strings"
7107   with_big_strings=$enableval
7108 else
7109
7110         case x$AWK in #(vi
7111         x)
7112                 eval with_big_strings=no
7113                 ;;
7114         *) #(vi
7115                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7116                         | $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
7117                         eval with_big_strings=yes
7118                 else
7119                         eval with_big_strings=no
7120                 fi
7121                 ;;
7122         esac
7123
7124 fi;
7125 echo "$as_me:7125: result: $with_big_strings" >&5
7126 echo "${ECHO_T}$with_big_strings" >&6
7127
7128 USE_BIG_STRINGS=0
7129 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7130
7131 ###     use option --enable-termcap to compile in the termcap fallback support
7132 echo "$as_me:7132: checking if you want termcap-fallback support" >&5
7133 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7134
7135 # Check whether --enable-termcap or --disable-termcap was given.
7136 if test "${enable_termcap+set}" = set; then
7137   enableval="$enable_termcap"
7138   with_termcap=$enableval
7139 else
7140   with_termcap=no
7141 fi;
7142 echo "$as_me:7142: result: $with_termcap" >&5
7143 echo "${ECHO_T}$with_termcap" >&6
7144
7145 NCURSES_USE_TERMCAP=0
7146 if test "x$with_termcap" != "xyes" ; then
7147         if test "$use_database" = no ; then
7148                 if test -z "$with_fallback" ; then
7149                         { { echo "$as_me:7149: error: You have disabled the database w/o specifying fallbacks" >&5
7150 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7151    { (exit 1); exit 1; }; }
7152                 fi
7153         fi
7154
7155 cat >>confdefs.h <<\EOF
7156 #define PURE_TERMINFO 1
7157 EOF
7158
7159 else
7160
7161         if test "$with_ticlib" != no ; then
7162                 { { echo "$as_me:7162: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7163 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7164    { (exit 1); exit 1; }; }
7165         fi
7166
7167         NCURSES_USE_TERMCAP=1
7168         echo "$as_me:7168: checking for list of termcap files" >&5
7169 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7170
7171 # Check whether --with-termpath or --without-termpath was given.
7172 if test "${with_termpath+set}" = set; then
7173   withval="$with_termpath"
7174
7175 else
7176   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7177 fi;
7178 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7179 cf_dst_path=
7180 for cf_src_path in $withval
7181 do
7182
7183 if test "x$prefix" != xNONE; then
7184   cf_path_syntax="$prefix"
7185 else
7186   cf_path_syntax="$ac_default_prefix"
7187 fi
7188
7189 case ".$cf_src_path" in #(vi
7190 .\$\(*\)*|.\'*\'*) #(vi
7191   ;;
7192 ..|./*|.\\*) #(vi
7193   ;;
7194 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7195   ;;
7196 .\${*prefix}*|.\${*dir}*) #(vi
7197   eval cf_src_path="$cf_src_path"
7198   case ".$cf_src_path" in #(vi
7199   .NONE/*)
7200     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7201     ;;
7202   esac
7203   ;; #(vi
7204 .no|.NONE/*)
7205   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7206   ;;
7207 *)
7208   { { echo "$as_me:7208: error: expected a pathname, not \"$cf_src_path\"" >&5
7209 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7210    { (exit 1); exit 1; }; }
7211   ;;
7212 esac
7213
7214   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7215   cf_dst_path="${cf_dst_path}${cf_src_path}"
7216 done
7217 IFS="$ac_save_ifs"
7218
7219 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7220 # so we have to check/work around.  We do prefer the result of "eval"...
7221 eval cf_dst_eval="$cf_dst_path"
7222 case "x$cf_dst_eval" in #(vi
7223 xNONE*) #(vi
7224         TERMPATH=$cf_dst_path
7225         ;;
7226 *)
7227         TERMPATH="$cf_dst_eval"
7228         ;;
7229 esac
7230
7231         echo "$as_me:7231: result: $TERMPATH" >&5
7232 echo "${ECHO_T}$TERMPATH" >&6
7233         test -n "$TERMPATH" &&
7234 cat >>confdefs.h <<EOF
7235 #define TERMPATH "$TERMPATH"
7236 EOF
7237
7238         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7239         echo "$as_me:7239: checking if fast termcap-loader is needed" >&5
7240 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7241
7242 # Check whether --enable-getcap or --disable-getcap was given.
7243 if test "${enable_getcap+set}" = set; then
7244   enableval="$enable_getcap"
7245   with_getcap=$enableval
7246 else
7247   with_getcap=no
7248 fi;
7249         echo "$as_me:7249: result: $with_getcap" >&5
7250 echo "${ECHO_T}$with_getcap" >&6
7251         test "x$with_getcap" = "xyes" &&
7252 cat >>confdefs.h <<\EOF
7253 #define USE_GETCAP 1
7254 EOF
7255
7256         echo "$as_me:7256: checking if translated termcaps will be cached in ~/.terminfo" >&5
7257 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7258
7259 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7260 if test "${enable_getcap_cache+set}" = set; then
7261   enableval="$enable_getcap_cache"
7262   with_getcap_cache=$enableval
7263 else
7264   with_getcap_cache=no
7265 fi;
7266         echo "$as_me:7266: result: $with_getcap_cache" >&5
7267 echo "${ECHO_T}$with_getcap_cache" >&6
7268         test "x$with_getcap_cache" = "xyes" &&
7269 cat >>confdefs.h <<\EOF
7270 #define USE_GETCAP_CACHE 1
7271 EOF
7272
7273 fi
7274
7275 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7276 echo "$as_me:7276: checking if ~/.terminfo is wanted" >&5
7277 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7278
7279 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7280 if test "${enable_home_terminfo+set}" = set; then
7281   enableval="$enable_home_terminfo"
7282   with_home_terminfo=$enableval
7283 else
7284   with_home_terminfo=yes
7285 fi;
7286 echo "$as_me:7286: result: $with_home_terminfo" >&5
7287 echo "${ECHO_T}$with_home_terminfo" >&6
7288 test "x$with_home_terminfo" = "xyes" &&
7289 cat >>confdefs.h <<\EOF
7290 #define USE_HOME_TERMINFO 1
7291 EOF
7292
7293 echo "$as_me:7293: checking if you want to use restricted environment when running as root" >&5
7294 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7295
7296 # Check whether --enable-root-environ or --disable-root-environ was given.
7297 if test "${enable_root_environ+set}" = set; then
7298   enableval="$enable_root_environ"
7299   with_root_environ=$enableval
7300 else
7301   with_root_environ=yes
7302 fi;
7303 echo "$as_me:7303: result: $with_root_environ" >&5
7304 echo "${ECHO_T}$with_root_environ" >&6
7305 test "x$with_root_environ" = xyes &&
7306 cat >>confdefs.h <<\EOF
7307 #define USE_ROOT_ENVIRON 1
7308 EOF
7309
7310 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7311 ###   to reduce storage requirements for the terminfo database.
7312
7313 for ac_func in \
7314         remove \
7315         unlink
7316 do
7317 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7318 echo "$as_me:7318: checking for $ac_func" >&5
7319 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7320 if eval "test \"\${$as_ac_var+set}\" = set"; then
7321   echo $ECHO_N "(cached) $ECHO_C" >&6
7322 else
7323   cat >conftest.$ac_ext <<_ACEOF
7324 #line 7324 "configure"
7325 #include "confdefs.h"
7326 /* System header to define __stub macros and hopefully few prototypes,
7327     which can conflict with char $ac_func (); below.  */
7328 #include <assert.h>
7329 /* Override any gcc2 internal prototype to avoid an error.  */
7330 #ifdef __cplusplus
7331 extern "C"
7332 #endif
7333 /* We use char because int might match the return type of a gcc2
7334    builtin and then its argument prototype would still apply.  */
7335 char $ac_func ();
7336 char (*f) ();
7337
7338 int
7339 main ()
7340 {
7341 /* The GNU C library defines this for functions which it implements
7342     to always fail with ENOSYS.  Some functions are actually named
7343     something starting with __ and the normal name is an alias.  */
7344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7345 choke me
7346 #else
7347 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7348 #endif
7349
7350   ;
7351   return 0;
7352 }
7353 _ACEOF
7354 rm -f conftest.$ac_objext conftest$ac_exeext
7355 if { (eval echo "$as_me:7355: \"$ac_link\"") >&5
7356   (eval $ac_link) 2>&5
7357   ac_status=$?
7358   echo "$as_me:7358: \$? = $ac_status" >&5
7359   (exit $ac_status); } &&
7360          { ac_try='test -s conftest$ac_exeext'
7361   { (eval echo "$as_me:7361: \"$ac_try\"") >&5
7362   (eval $ac_try) 2>&5
7363   ac_status=$?
7364   echo "$as_me:7364: \$? = $ac_status" >&5
7365   (exit $ac_status); }; }; then
7366   eval "$as_ac_var=yes"
7367 else
7368   echo "$as_me: failed program was:" >&5
7369 cat conftest.$ac_ext >&5
7370 eval "$as_ac_var=no"
7371 fi
7372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7373 fi
7374 echo "$as_me:7374: result: `eval echo '${'$as_ac_var'}'`" >&5
7375 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7376 if test `eval echo '${'$as_ac_var'}'` = yes; then
7377   cat >>confdefs.h <<EOF
7378 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7379 EOF
7380
7381 fi
7382 done
7383
7384 if test "$cross_compiling" = yes ; then
7385
7386 for ac_func in \
7387                 link \
7388                 symlink
7389 do
7390 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7391 echo "$as_me:7391: checking for $ac_func" >&5
7392 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7393 if eval "test \"\${$as_ac_var+set}\" = set"; then
7394   echo $ECHO_N "(cached) $ECHO_C" >&6
7395 else
7396   cat >conftest.$ac_ext <<_ACEOF
7397 #line 7397 "configure"
7398 #include "confdefs.h"
7399 /* System header to define __stub macros and hopefully few prototypes,
7400     which can conflict with char $ac_func (); below.  */
7401 #include <assert.h>
7402 /* Override any gcc2 internal prototype to avoid an error.  */
7403 #ifdef __cplusplus
7404 extern "C"
7405 #endif
7406 /* We use char because int might match the return type of a gcc2
7407    builtin and then its argument prototype would still apply.  */
7408 char $ac_func ();
7409 char (*f) ();
7410
7411 int
7412 main ()
7413 {
7414 /* The GNU C library defines this for functions which it implements
7415     to always fail with ENOSYS.  Some functions are actually named
7416     something starting with __ and the normal name is an alias.  */
7417 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7418 choke me
7419 #else
7420 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7421 #endif
7422
7423   ;
7424   return 0;
7425 }
7426 _ACEOF
7427 rm -f conftest.$ac_objext conftest$ac_exeext
7428 if { (eval echo "$as_me:7428: \"$ac_link\"") >&5
7429   (eval $ac_link) 2>&5
7430   ac_status=$?
7431   echo "$as_me:7431: \$? = $ac_status" >&5
7432   (exit $ac_status); } &&
7433          { ac_try='test -s conftest$ac_exeext'
7434   { (eval echo "$as_me:7434: \"$ac_try\"") >&5
7435   (eval $ac_try) 2>&5
7436   ac_status=$?
7437   echo "$as_me:7437: \$? = $ac_status" >&5
7438   (exit $ac_status); }; }; then
7439   eval "$as_ac_var=yes"
7440 else
7441   echo "$as_me: failed program was:" >&5
7442 cat conftest.$ac_ext >&5
7443 eval "$as_ac_var=no"
7444 fi
7445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7446 fi
7447 echo "$as_me:7447: result: `eval echo '${'$as_ac_var'}'`" >&5
7448 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7449 if test `eval echo '${'$as_ac_var'}'` = yes; then
7450   cat >>confdefs.h <<EOF
7451 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7452 EOF
7453
7454 fi
7455 done
7456
7457 else
7458         echo "$as_me:7458: checking if link/symlink functions work" >&5
7459 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7460 if test "${cf_cv_link_funcs+set}" = set; then
7461   echo $ECHO_N "(cached) $ECHO_C" >&6
7462 else
7463
7464                 cf_cv_link_funcs=
7465                 for cf_func in link symlink ; do
7466                         if test "$cross_compiling" = yes; then
7467
7468                         eval 'ac_cv_func_'$cf_func'=error'
7469 else
7470   cat >conftest.$ac_ext <<_ACEOF
7471 #line 7471 "configure"
7472 #include "confdefs.h"
7473
7474 #include <sys/types.h>
7475 #include <sys/stat.h>
7476 #ifdef HAVE_UNISTD_H
7477 #include <unistd.h>
7478 #endif
7479 int main()
7480 {
7481         int fail = 0;
7482         char *src = "config.log";
7483         char *dst = "conftest.chk";
7484         struct stat src_sb;
7485         struct stat dst_sb;
7486
7487         stat(src, &src_sb);
7488         fail = ($cf_func("config.log", "conftest.chk") < 0)
7489             || (stat(dst, &dst_sb) < 0)
7490             || (dst_sb.st_mtime != src_sb.st_mtime);
7491 #ifdef HAVE_UNLINK
7492         unlink(dst);
7493 #else
7494         remove(dst);
7495 #endif
7496         ${cf_cv_main_return:-return} (fail);
7497 }
7498
7499 _ACEOF
7500 rm -f conftest$ac_exeext
7501 if { (eval echo "$as_me:7501: \"$ac_link\"") >&5
7502   (eval $ac_link) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7506   { (eval echo "$as_me:7506: \"$ac_try\"") >&5
7507   (eval $ac_try) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit $ac_status); }; }; then
7511
7512                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7513                         eval 'ac_cv_func_'$cf_func'=yes'
7514 else
7515   echo "$as_me: program exited with status $ac_status" >&5
7516 echo "$as_me: failed program was:" >&5
7517 cat conftest.$ac_ext >&5
7518
7519                         eval 'ac_cv_func_'$cf_func'=no'
7520 fi
7521 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7522 fi
7523                 done
7524                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7525
7526 fi
7527 echo "$as_me:7527: result: $cf_cv_link_funcs" >&5
7528 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7529         test "$ac_cv_func_link"    = yes &&
7530 cat >>confdefs.h <<\EOF
7531 #define HAVE_LINK 1
7532 EOF
7533
7534         test "$ac_cv_func_symlink" = yes &&
7535 cat >>confdefs.h <<\EOF
7536 #define HAVE_SYMLINK 1
7537 EOF
7538
7539 fi
7540
7541 with_links=no
7542 with_symlinks=no
7543
7544 # soft links (symbolic links) are useful for some systems where hard links do
7545 # not work, or to make it simpler to copy terminfo trees around.
7546 if test "x$ac_cv_func_symlink" = xyes ; then
7547     echo "$as_me:7547: checking if tic should use symbolic links" >&5
7548 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7549
7550 # Check whether --enable-symlinks or --disable-symlinks was given.
7551 if test "${enable_symlinks+set}" = set; then
7552   enableval="$enable_symlinks"
7553   with_symlinks=$enableval
7554 else
7555   with_symlinks=no
7556 fi;
7557     echo "$as_me:7557: result: $with_symlinks" >&5
7558 echo "${ECHO_T}$with_symlinks" >&6
7559 fi
7560
7561 # If we have hard links and did not choose to use soft links instead, there is
7562 # no reason to make this choice optional - use the hard links.
7563 if test "$with_symlinks" = no ; then
7564     echo "$as_me:7564: checking if tic should use hard links" >&5
7565 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7566     if test "x$ac_cv_func_link" = xyes ; then
7567         with_links=yes
7568     else
7569         with_links=no
7570     fi
7571     echo "$as_me:7571: result: $with_links" >&5
7572 echo "${ECHO_T}$with_links" >&6
7573 fi
7574
7575 test "x$with_links" = xyes &&
7576 cat >>confdefs.h <<\EOF
7577 #define USE_LINKS 1
7578 EOF
7579
7580 test "x$with_symlinks" = xyes &&
7581 cat >>confdefs.h <<\EOF
7582 #define USE_SYMLINKS 1
7583 EOF
7584
7585 ###   use option --enable-broken-linker to force on use of broken-linker support
7586 echo "$as_me:7586: checking if you want broken-linker support code" >&5
7587 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7588
7589 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7590 if test "${enable_broken_linker+set}" = set; then
7591   enableval="$enable_broken_linker"
7592   with_broken_linker=$enableval
7593 else
7594   with_broken_linker=${BROKEN_LINKER:-no}
7595 fi;
7596 echo "$as_me:7596: result: $with_broken_linker" >&5
7597 echo "${ECHO_T}$with_broken_linker" >&6
7598
7599 BROKEN_LINKER=0
7600 if test "x$with_broken_linker" = xyes ; then
7601
7602 cat >>confdefs.h <<\EOF
7603 #define BROKEN_LINKER 1
7604 EOF
7605
7606         BROKEN_LINKER=1
7607 elif test "$DFT_LWR_MODEL" = shared ; then
7608         case $cf_cv_system_name in #(vi
7609         cygwin*)
7610
7611 cat >>confdefs.h <<\EOF
7612 #define BROKEN_LINKER 1
7613 EOF
7614
7615                 BROKEN_LINKER=1
7616                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7617
7618 echo "${as_me:-configure}:7618: testing cygwin linker is broken anyway ..." 1>&5
7619
7620                 ;;
7621         esac
7622 fi
7623
7624 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7625 echo "$as_me:7625: checking if tputs should process BSD-style prefix padding" >&5
7626 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7627
7628 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7629 if test "${enable_bsdpad+set}" = set; then
7630   enableval="$enable_bsdpad"
7631   with_bsdpad=$enableval
7632 else
7633   with_bsdpad=no
7634 fi;
7635 echo "$as_me:7635: result: $with_bsdpad" >&5
7636 echo "${ECHO_T}$with_bsdpad" >&6
7637 test "x$with_bsdpad" = xyes &&
7638 cat >>confdefs.h <<\EOF
7639 #define BSD_TPUTS 1
7640 EOF
7641
7642 ###   use option --enable-widec to turn on use of wide-character support
7643 NCURSES_CH_T=chtype
7644 NCURSES_LIBUTF8=0
7645
7646 NEED_WCHAR_H=0
7647 NCURSES_MBSTATE_T=0
7648 NCURSES_WCHAR_T=0
7649 NCURSES_WINT_T=0
7650
7651 # Check to define _XOPEN_SOURCE "automatically"
7652
7653 cf_XOPEN_SOURCE=500
7654 cf_POSIX_C_SOURCE=199506L
7655 cf_xopen_source=
7656
7657 case $host_os in #(vi
7658 aix[4-7]*) #(vi
7659         cf_xopen_source="-D_ALL_SOURCE"
7660         ;;
7661 cygwin|msys) #(vi
7662         cf_XOPEN_SOURCE=600
7663         ;;
7664 darwin[0-8].*) #(vi
7665         cf_xopen_source="-D_APPLE_C_SOURCE"
7666         ;;
7667 darwin*) #(vi
7668         cf_xopen_source="-D_DARWIN_C_SOURCE"
7669         cf_XOPEN_SOURCE=
7670         ;;
7671 freebsd*|dragonfly*) #(vi
7672         # 5.x headers associate
7673         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7674         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7675         cf_POSIX_C_SOURCE=200112L
7676         cf_XOPEN_SOURCE=600
7677         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7678         ;;
7679 hpux11*) #(vi
7680         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7681         ;;
7682 hpux*) #(vi
7683         cf_xopen_source="-D_HPUX_SOURCE"
7684         ;;
7685 irix[56].*) #(vi
7686         cf_xopen_source="-D_SGI_SOURCE"
7687         cf_XOPEN_SOURCE=
7688         ;;
7689 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7690
7691 echo "$as_me:7691: checking if we must define _GNU_SOURCE" >&5
7692 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7693 if test "${cf_cv_gnu_source+set}" = set; then
7694   echo $ECHO_N "(cached) $ECHO_C" >&6
7695 else
7696
7697 cat >conftest.$ac_ext <<_ACEOF
7698 #line 7698 "configure"
7699 #include "confdefs.h"
7700 #include <sys/types.h>
7701 int
7702 main ()
7703 {
7704
7705 #ifndef _XOPEN_SOURCE
7706 make an error
7707 #endif
7708   ;
7709   return 0;
7710 }
7711 _ACEOF
7712 rm -f conftest.$ac_objext
7713 if { (eval echo "$as_me:7713: \"$ac_compile\"") >&5
7714   (eval $ac_compile) 2>&5
7715   ac_status=$?
7716   echo "$as_me:7716: \$? = $ac_status" >&5
7717   (exit $ac_status); } &&
7718          { ac_try='test -s conftest.$ac_objext'
7719   { (eval echo "$as_me:7719: \"$ac_try\"") >&5
7720   (eval $ac_try) 2>&5
7721   ac_status=$?
7722   echo "$as_me:7722: \$? = $ac_status" >&5
7723   (exit $ac_status); }; }; then
7724   cf_cv_gnu_source=no
7725 else
7726   echo "$as_me: failed program was:" >&5
7727 cat conftest.$ac_ext >&5
7728 cf_save="$CPPFLAGS"
7729          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7730          cat >conftest.$ac_ext <<_ACEOF
7731 #line 7731 "configure"
7732 #include "confdefs.h"
7733 #include <sys/types.h>
7734 int
7735 main ()
7736 {
7737
7738 #ifdef _XOPEN_SOURCE
7739 make an error
7740 #endif
7741   ;
7742   return 0;
7743 }
7744 _ACEOF
7745 rm -f conftest.$ac_objext
7746 if { (eval echo "$as_me:7746: \"$ac_compile\"") >&5
7747   (eval $ac_compile) 2>&5
7748   ac_status=$?
7749   echo "$as_me:7749: \$? = $ac_status" >&5
7750   (exit $ac_status); } &&
7751          { ac_try='test -s conftest.$ac_objext'
7752   { (eval echo "$as_me:7752: \"$ac_try\"") >&5
7753   (eval $ac_try) 2>&5
7754   ac_status=$?
7755   echo "$as_me:7755: \$? = $ac_status" >&5
7756   (exit $ac_status); }; }; then
7757   cf_cv_gnu_source=no
7758 else
7759   echo "$as_me: failed program was:" >&5
7760 cat conftest.$ac_ext >&5
7761 cf_cv_gnu_source=yes
7762 fi
7763 rm -f conftest.$ac_objext conftest.$ac_ext
7764         CPPFLAGS="$cf_save"
7765
7766 fi
7767 rm -f conftest.$ac_objext conftest.$ac_ext
7768
7769 fi
7770 echo "$as_me:7770: result: $cf_cv_gnu_source" >&5
7771 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7772 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7773
7774         ;;
7775 minix*) #(vi
7776         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7777         ;;
7778 mirbsd*) #(vi
7779         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7780         cf_XOPEN_SOURCE=
7781
7782 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7783
7784 cf_save_CFLAGS="$CFLAGS"
7785 cf_save_CPPFLAGS="$CPPFLAGS"
7786
7787 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7788         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7789                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7790
7791 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7792         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7793                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7794
7795 echo "$as_me:7795: checking if we should define _POSIX_C_SOURCE" >&5
7796 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7797 if test "${cf_cv_posix_c_source+set}" = set; then
7798   echo $ECHO_N "(cached) $ECHO_C" >&6
7799 else
7800
7801 echo "${as_me:-configure}:7801: testing if the symbol is already defined go no further ..." 1>&5
7802
7803         cat >conftest.$ac_ext <<_ACEOF
7804 #line 7804 "configure"
7805 #include "confdefs.h"
7806 #include <sys/types.h>
7807 int
7808 main ()
7809 {
7810
7811 #ifndef _POSIX_C_SOURCE
7812 make an error
7813 #endif
7814   ;
7815   return 0;
7816 }
7817 _ACEOF
7818 rm -f conftest.$ac_objext
7819 if { (eval echo "$as_me:7819: \"$ac_compile\"") >&5
7820   (eval $ac_compile) 2>&5
7821   ac_status=$?
7822   echo "$as_me:7822: \$? = $ac_status" >&5
7823   (exit $ac_status); } &&
7824          { ac_try='test -s conftest.$ac_objext'
7825   { (eval echo "$as_me:7825: \"$ac_try\"") >&5
7826   (eval $ac_try) 2>&5
7827   ac_status=$?
7828   echo "$as_me:7828: \$? = $ac_status" >&5
7829   (exit $ac_status); }; }; then
7830   cf_cv_posix_c_source=no
7831 else
7832   echo "$as_me: failed program was:" >&5
7833 cat conftest.$ac_ext >&5
7834 cf_want_posix_source=no
7835          case .$cf_POSIX_C_SOURCE in #(vi
7836          .[12]??*) #(vi
7837                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7838                 ;;
7839          .2) #(vi
7840                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7841                 cf_want_posix_source=yes
7842                 ;;
7843          .*)
7844                 cf_want_posix_source=yes
7845                 ;;
7846          esac
7847          if test "$cf_want_posix_source" = yes ; then
7848                 cat >conftest.$ac_ext <<_ACEOF
7849 #line 7849 "configure"
7850 #include "confdefs.h"
7851 #include <sys/types.h>
7852 int
7853 main ()
7854 {
7855
7856 #ifdef _POSIX_SOURCE
7857 make an error
7858 #endif
7859   ;
7860   return 0;
7861 }
7862 _ACEOF
7863 rm -f conftest.$ac_objext
7864 if { (eval echo "$as_me:7864: \"$ac_compile\"") >&5
7865   (eval $ac_compile) 2>&5
7866   ac_status=$?
7867   echo "$as_me:7867: \$? = $ac_status" >&5
7868   (exit $ac_status); } &&
7869          { ac_try='test -s conftest.$ac_objext'
7870   { (eval echo "$as_me:7870: \"$ac_try\"") >&5
7871   (eval $ac_try) 2>&5
7872   ac_status=$?
7873   echo "$as_me:7873: \$? = $ac_status" >&5
7874   (exit $ac_status); }; }; then
7875   :
7876 else
7877   echo "$as_me: failed program was:" >&5
7878 cat conftest.$ac_ext >&5
7879 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7880 fi
7881 rm -f conftest.$ac_objext conftest.$ac_ext
7882          fi
7883
7884 echo "${as_me:-configure}:7884: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7885
7886          CFLAGS="$cf_trim_CFLAGS"
7887          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7888
7889 echo "${as_me:-configure}:7889: testing if the second compile does not leave our definition intact error ..." 1>&5
7890
7891          cat >conftest.$ac_ext <<_ACEOF
7892 #line 7892 "configure"
7893 #include "confdefs.h"
7894 #include <sys/types.h>
7895 int
7896 main ()
7897 {
7898
7899 #ifndef _POSIX_C_SOURCE
7900 make an error
7901 #endif
7902   ;
7903   return 0;
7904 }
7905 _ACEOF
7906 rm -f conftest.$ac_objext
7907 if { (eval echo "$as_me:7907: \"$ac_compile\"") >&5
7908   (eval $ac_compile) 2>&5
7909   ac_status=$?
7910   echo "$as_me:7910: \$? = $ac_status" >&5
7911   (exit $ac_status); } &&
7912          { ac_try='test -s conftest.$ac_objext'
7913   { (eval echo "$as_me:7913: \"$ac_try\"") >&5
7914   (eval $ac_try) 2>&5
7915   ac_status=$?
7916   echo "$as_me:7916: \$? = $ac_status" >&5
7917   (exit $ac_status); }; }; then
7918   :
7919 else
7920   echo "$as_me: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7922 cf_cv_posix_c_source=no
7923 fi
7924 rm -f conftest.$ac_objext conftest.$ac_ext
7925          CFLAGS="$cf_save_CFLAGS"
7926          CPPFLAGS="$cf_save_CPPFLAGS"
7927
7928 fi
7929 rm -f conftest.$ac_objext conftest.$ac_ext
7930
7931 fi
7932 echo "$as_me:7932: result: $cf_cv_posix_c_source" >&5
7933 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7934
7935 if test "$cf_cv_posix_c_source" != no ; then
7936         CFLAGS="$cf_trim_CFLAGS"
7937         CPPFLAGS="$cf_trim_CPPFLAGS"
7938
7939 cf_fix_cppflags=no
7940 cf_new_cflags=
7941 cf_new_cppflags=
7942 cf_new_extra_cppflags=
7943
7944 for cf_add_cflags in $cf_cv_posix_c_source
7945 do
7946 case $cf_fix_cppflags in
7947 no)
7948         case $cf_add_cflags in #(vi
7949         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7950                 case $cf_add_cflags in
7951                 -D*)
7952                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7953
7954                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7955                                 && test -z "${cf_tst_cflags}" \
7956                                 && cf_fix_cppflags=yes
7957
7958                         if test $cf_fix_cppflags = yes ; then
7959                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7960                                 continue
7961                         elif test "${cf_tst_cflags}" = "\"'" ; then
7962                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7963                                 continue
7964                         fi
7965                         ;;
7966                 esac
7967                 case "$CPPFLAGS" in
7968                 *$cf_add_cflags) #(vi
7969                         ;;
7970                 *) #(vi
7971                         case $cf_add_cflags in #(vi
7972                         -D*)
7973                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7974
7975 CPPFLAGS=`echo "$CPPFLAGS" | \
7976         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7977                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7978
7979                                 ;;
7980                         esac
7981                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7982                         ;;
7983                 esac
7984                 ;;
7985         *)
7986                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7987                 ;;
7988         esac
7989         ;;
7990 yes)
7991         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7992
7993         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7994
7995         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7996                 && test -z "${cf_tst_cflags}" \
7997                 && cf_fix_cppflags=no
7998         ;;
7999 esac
8000 done
8001
8002 if test -n "$cf_new_cflags" ; then
8003
8004         CFLAGS="$CFLAGS $cf_new_cflags"
8005 fi
8006
8007 if test -n "$cf_new_cppflags" ; then
8008
8009         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8010 fi
8011
8012 if test -n "$cf_new_extra_cppflags" ; then
8013
8014         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8015 fi
8016
8017 fi
8018
8019         ;;
8020 netbsd*) #(vi
8021         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8022         ;;
8023 openbsd[4-9]*) #(vi
8024         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8025         cf_xopen_source="-D_BSD_SOURCE"
8026         cf_XOPEN_SOURCE=600
8027         ;;
8028 openbsd*) #(vi
8029         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8030         ;;
8031 osf[45]*) #(vi
8032         cf_xopen_source="-D_OSF_SOURCE"
8033         ;;
8034 nto-qnx*) #(vi
8035         cf_xopen_source="-D_QNX_SOURCE"
8036         ;;
8037 sco*) #(vi
8038         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8039         ;;
8040 solaris2.*) #(vi
8041         cf_xopen_source="-D__EXTENSIONS__"
8042         cf_cv_xopen_source=broken
8043         ;;
8044 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8045         cf_XOPEN_SOURCE=
8046         cf_POSIX_C_SOURCE=
8047         ;;
8048 *)
8049
8050 echo "$as_me:8050: checking if we should define _XOPEN_SOURCE" >&5
8051 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8052 if test "${cf_cv_xopen_source+set}" = set; then
8053   echo $ECHO_N "(cached) $ECHO_C" >&6
8054 else
8055
8056         cat >conftest.$ac_ext <<_ACEOF
8057 #line 8057 "configure"
8058 #include "confdefs.h"
8059
8060 #include <stdlib.h>
8061 #include <string.h>
8062 #include <sys/types.h>
8063
8064 int
8065 main ()
8066 {
8067
8068 #ifndef _XOPEN_SOURCE
8069 make an error
8070 #endif
8071   ;
8072   return 0;
8073 }
8074 _ACEOF
8075 rm -f conftest.$ac_objext
8076 if { (eval echo "$as_me:8076: \"$ac_compile\"") >&5
8077   (eval $ac_compile) 2>&5
8078   ac_status=$?
8079   echo "$as_me:8079: \$? = $ac_status" >&5
8080   (exit $ac_status); } &&
8081          { ac_try='test -s conftest.$ac_objext'
8082   { (eval echo "$as_me:8082: \"$ac_try\"") >&5
8083   (eval $ac_try) 2>&5
8084   ac_status=$?
8085   echo "$as_me:8085: \$? = $ac_status" >&5
8086   (exit $ac_status); }; }; then
8087   cf_cv_xopen_source=no
8088 else
8089   echo "$as_me: failed program was:" >&5
8090 cat conftest.$ac_ext >&5
8091 cf_save="$CPPFLAGS"
8092          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8093          cat >conftest.$ac_ext <<_ACEOF
8094 #line 8094 "configure"
8095 #include "confdefs.h"
8096
8097 #include <stdlib.h>
8098 #include <string.h>
8099 #include <sys/types.h>
8100
8101 int
8102 main ()
8103 {
8104
8105 #ifdef _XOPEN_SOURCE
8106 make an error
8107 #endif
8108   ;
8109   return 0;
8110 }
8111 _ACEOF
8112 rm -f conftest.$ac_objext
8113 if { (eval echo "$as_me:8113: \"$ac_compile\"") >&5
8114   (eval $ac_compile) 2>&5
8115   ac_status=$?
8116   echo "$as_me:8116: \$? = $ac_status" >&5
8117   (exit $ac_status); } &&
8118          { ac_try='test -s conftest.$ac_objext'
8119   { (eval echo "$as_me:8119: \"$ac_try\"") >&5
8120   (eval $ac_try) 2>&5
8121   ac_status=$?
8122   echo "$as_me:8122: \$? = $ac_status" >&5
8123   (exit $ac_status); }; }; then
8124   cf_cv_xopen_source=no
8125 else
8126   echo "$as_me: failed program was:" >&5
8127 cat conftest.$ac_ext >&5
8128 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8129 fi
8130 rm -f conftest.$ac_objext conftest.$ac_ext
8131         CPPFLAGS="$cf_save"
8132
8133 fi
8134 rm -f conftest.$ac_objext conftest.$ac_ext
8135
8136 fi
8137 echo "$as_me:8137: result: $cf_cv_xopen_source" >&5
8138 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8139
8140 if test "$cf_cv_xopen_source" != no ; then
8141
8142 CFLAGS=`echo "$CFLAGS" | \
8143         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8144                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8145
8146 CPPFLAGS=`echo "$CPPFLAGS" | \
8147         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8148                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8149
8150         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8151
8152 cf_fix_cppflags=no
8153 cf_new_cflags=
8154 cf_new_cppflags=
8155 cf_new_extra_cppflags=
8156
8157 for cf_add_cflags in $cf_temp_xopen_source
8158 do
8159 case $cf_fix_cppflags in
8160 no)
8161         case $cf_add_cflags in #(vi
8162         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8163                 case $cf_add_cflags in
8164                 -D*)
8165                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8166
8167                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8168                                 && test -z "${cf_tst_cflags}" \
8169                                 && cf_fix_cppflags=yes
8170
8171                         if test $cf_fix_cppflags = yes ; then
8172                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8173                                 continue
8174                         elif test "${cf_tst_cflags}" = "\"'" ; then
8175                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8176                                 continue
8177                         fi
8178                         ;;
8179                 esac
8180                 case "$CPPFLAGS" in
8181                 *$cf_add_cflags) #(vi
8182                         ;;
8183                 *) #(vi
8184                         case $cf_add_cflags in #(vi
8185                         -D*)
8186                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8187
8188 CPPFLAGS=`echo "$CPPFLAGS" | \
8189         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8190                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8191
8192                                 ;;
8193                         esac
8194                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8195                         ;;
8196                 esac
8197                 ;;
8198         *)
8199                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8200                 ;;
8201         esac
8202         ;;
8203 yes)
8204         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8205
8206         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8207
8208         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8209                 && test -z "${cf_tst_cflags}" \
8210                 && cf_fix_cppflags=no
8211         ;;
8212 esac
8213 done
8214
8215 if test -n "$cf_new_cflags" ; then
8216
8217         CFLAGS="$CFLAGS $cf_new_cflags"
8218 fi
8219
8220 if test -n "$cf_new_cppflags" ; then
8221
8222         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8223 fi
8224
8225 if test -n "$cf_new_extra_cppflags" ; then
8226
8227         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8228 fi
8229
8230 fi
8231
8232 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8233
8234 cf_save_CFLAGS="$CFLAGS"
8235 cf_save_CPPFLAGS="$CPPFLAGS"
8236
8237 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8238         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8239                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8240
8241 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8242         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8243                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8244
8245 echo "$as_me:8245: checking if we should define _POSIX_C_SOURCE" >&5
8246 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8247 if test "${cf_cv_posix_c_source+set}" = set; then
8248   echo $ECHO_N "(cached) $ECHO_C" >&6
8249 else
8250
8251 echo "${as_me:-configure}:8251: testing if the symbol is already defined go no further ..." 1>&5
8252
8253         cat >conftest.$ac_ext <<_ACEOF
8254 #line 8254 "configure"
8255 #include "confdefs.h"
8256 #include <sys/types.h>
8257 int
8258 main ()
8259 {
8260
8261 #ifndef _POSIX_C_SOURCE
8262 make an error
8263 #endif
8264   ;
8265   return 0;
8266 }
8267 _ACEOF
8268 rm -f conftest.$ac_objext
8269 if { (eval echo "$as_me:8269: \"$ac_compile\"") >&5
8270   (eval $ac_compile) 2>&5
8271   ac_status=$?
8272   echo "$as_me:8272: \$? = $ac_status" >&5
8273   (exit $ac_status); } &&
8274          { ac_try='test -s conftest.$ac_objext'
8275   { (eval echo "$as_me:8275: \"$ac_try\"") >&5
8276   (eval $ac_try) 2>&5
8277   ac_status=$?
8278   echo "$as_me:8278: \$? = $ac_status" >&5
8279   (exit $ac_status); }; }; then
8280   cf_cv_posix_c_source=no
8281 else
8282   echo "$as_me: failed program was:" >&5
8283 cat conftest.$ac_ext >&5
8284 cf_want_posix_source=no
8285          case .$cf_POSIX_C_SOURCE in #(vi
8286          .[12]??*) #(vi
8287                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8288                 ;;
8289          .2) #(vi
8290                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8291                 cf_want_posix_source=yes
8292                 ;;
8293          .*)
8294                 cf_want_posix_source=yes
8295                 ;;
8296          esac
8297          if test "$cf_want_posix_source" = yes ; then
8298                 cat >conftest.$ac_ext <<_ACEOF
8299 #line 8299 "configure"
8300 #include "confdefs.h"
8301 #include <sys/types.h>
8302 int
8303 main ()
8304 {
8305
8306 #ifdef _POSIX_SOURCE
8307 make an error
8308 #endif
8309   ;
8310   return 0;
8311 }
8312 _ACEOF
8313 rm -f conftest.$ac_objext
8314 if { (eval echo "$as_me:8314: \"$ac_compile\"") >&5
8315   (eval $ac_compile) 2>&5
8316   ac_status=$?
8317   echo "$as_me:8317: \$? = $ac_status" >&5
8318   (exit $ac_status); } &&
8319          { ac_try='test -s conftest.$ac_objext'
8320   { (eval echo "$as_me:8320: \"$ac_try\"") >&5
8321   (eval $ac_try) 2>&5
8322   ac_status=$?
8323   echo "$as_me:8323: \$? = $ac_status" >&5
8324   (exit $ac_status); }; }; then
8325   :
8326 else
8327   echo "$as_me: failed program was:" >&5
8328 cat conftest.$ac_ext >&5
8329 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8330 fi
8331 rm -f conftest.$ac_objext conftest.$ac_ext
8332          fi
8333
8334 echo "${as_me:-configure}:8334: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8335
8336          CFLAGS="$cf_trim_CFLAGS"
8337          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8338
8339 echo "${as_me:-configure}:8339: testing if the second compile does not leave our definition intact error ..." 1>&5
8340
8341          cat >conftest.$ac_ext <<_ACEOF
8342 #line 8342 "configure"
8343 #include "confdefs.h"
8344 #include <sys/types.h>
8345 int
8346 main ()
8347 {
8348
8349 #ifndef _POSIX_C_SOURCE
8350 make an error
8351 #endif
8352   ;
8353   return 0;
8354 }
8355 _ACEOF
8356 rm -f conftest.$ac_objext
8357 if { (eval echo "$as_me:8357: \"$ac_compile\"") >&5
8358   (eval $ac_compile) 2>&5
8359   ac_status=$?
8360   echo "$as_me:8360: \$? = $ac_status" >&5
8361   (exit $ac_status); } &&
8362          { ac_try='test -s conftest.$ac_objext'
8363   { (eval echo "$as_me:8363: \"$ac_try\"") >&5
8364   (eval $ac_try) 2>&5
8365   ac_status=$?
8366   echo "$as_me:8366: \$? = $ac_status" >&5
8367   (exit $ac_status); }; }; then
8368   :
8369 else
8370   echo "$as_me: failed program was:" >&5
8371 cat conftest.$ac_ext >&5
8372 cf_cv_posix_c_source=no
8373 fi
8374 rm -f conftest.$ac_objext conftest.$ac_ext
8375          CFLAGS="$cf_save_CFLAGS"
8376          CPPFLAGS="$cf_save_CPPFLAGS"
8377
8378 fi
8379 rm -f conftest.$ac_objext conftest.$ac_ext
8380
8381 fi
8382 echo "$as_me:8382: result: $cf_cv_posix_c_source" >&5
8383 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8384
8385 if test "$cf_cv_posix_c_source" != no ; then
8386         CFLAGS="$cf_trim_CFLAGS"
8387         CPPFLAGS="$cf_trim_CPPFLAGS"
8388
8389 cf_fix_cppflags=no
8390 cf_new_cflags=
8391 cf_new_cppflags=
8392 cf_new_extra_cppflags=
8393
8394 for cf_add_cflags in $cf_cv_posix_c_source
8395 do
8396 case $cf_fix_cppflags in
8397 no)
8398         case $cf_add_cflags in #(vi
8399         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8400                 case $cf_add_cflags in
8401                 -D*)
8402                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8403
8404                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8405                                 && test -z "${cf_tst_cflags}" \
8406                                 && cf_fix_cppflags=yes
8407
8408                         if test $cf_fix_cppflags = yes ; then
8409                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8410                                 continue
8411                         elif test "${cf_tst_cflags}" = "\"'" ; then
8412                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8413                                 continue
8414                         fi
8415                         ;;
8416                 esac
8417                 case "$CPPFLAGS" in
8418                 *$cf_add_cflags) #(vi
8419                         ;;
8420                 *) #(vi
8421                         case $cf_add_cflags in #(vi
8422                         -D*)
8423                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8424
8425 CPPFLAGS=`echo "$CPPFLAGS" | \
8426         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8427                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8428
8429                                 ;;
8430                         esac
8431                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8432                         ;;
8433                 esac
8434                 ;;
8435         *)
8436                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8437                 ;;
8438         esac
8439         ;;
8440 yes)
8441         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8442
8443         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8444
8445         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8446                 && test -z "${cf_tst_cflags}" \
8447                 && cf_fix_cppflags=no
8448         ;;
8449 esac
8450 done
8451
8452 if test -n "$cf_new_cflags" ; then
8453
8454         CFLAGS="$CFLAGS $cf_new_cflags"
8455 fi
8456
8457 if test -n "$cf_new_cppflags" ; then
8458
8459         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8460 fi
8461
8462 if test -n "$cf_new_extra_cppflags" ; then
8463
8464         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8465 fi
8466
8467 fi
8468
8469         ;;
8470 esac
8471
8472 if test -n "$cf_xopen_source" ; then
8473
8474 cf_fix_cppflags=no
8475 cf_new_cflags=
8476 cf_new_cppflags=
8477 cf_new_extra_cppflags=
8478
8479 for cf_add_cflags in $cf_xopen_source
8480 do
8481 case $cf_fix_cppflags in
8482 no)
8483         case $cf_add_cflags in #(vi
8484         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8485                 case $cf_add_cflags in
8486                 -D*)
8487                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8488
8489                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8490                                 && test -z "${cf_tst_cflags}" \
8491                                 && cf_fix_cppflags=yes
8492
8493                         if test $cf_fix_cppflags = yes ; then
8494                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8495                                 continue
8496                         elif test "${cf_tst_cflags}" = "\"'" ; then
8497                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8498                                 continue
8499                         fi
8500                         ;;
8501                 esac
8502                 case "$CPPFLAGS" in
8503                 *$cf_add_cflags) #(vi
8504                         ;;
8505                 *) #(vi
8506                         case $cf_add_cflags in #(vi
8507                         -D*)
8508                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8509
8510 CPPFLAGS=`echo "$CPPFLAGS" | \
8511         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8512                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8513
8514                                 ;;
8515                         esac
8516                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8517                         ;;
8518                 esac
8519                 ;;
8520         *)
8521                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8522                 ;;
8523         esac
8524         ;;
8525 yes)
8526         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8527
8528         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8529
8530         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8531                 && test -z "${cf_tst_cflags}" \
8532                 && cf_fix_cppflags=no
8533         ;;
8534 esac
8535 done
8536
8537 if test -n "$cf_new_cflags" ; then
8538         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8539
8540 echo "${as_me:-configure}:8540: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8541
8542         CFLAGS="$CFLAGS $cf_new_cflags"
8543 fi
8544
8545 if test -n "$cf_new_cppflags" ; then
8546         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8547
8548 echo "${as_me:-configure}:8548: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8549
8550         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8551 fi
8552
8553 if test -n "$cf_new_extra_cppflags" ; then
8554         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8555
8556 echo "${as_me:-configure}:8556: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8557
8558         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8559 fi
8560
8561 fi
8562
8563 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8564         echo "$as_me:8564: checking if _XOPEN_SOURCE really is set" >&5
8565 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8566         cat >conftest.$ac_ext <<_ACEOF
8567 #line 8567 "configure"
8568 #include "confdefs.h"
8569 #include <stdlib.h>
8570 int
8571 main ()
8572 {
8573
8574 #ifndef _XOPEN_SOURCE
8575 make an error
8576 #endif
8577   ;
8578   return 0;
8579 }
8580 _ACEOF
8581 rm -f conftest.$ac_objext
8582 if { (eval echo "$as_me:8582: \"$ac_compile\"") >&5
8583   (eval $ac_compile) 2>&5
8584   ac_status=$?
8585   echo "$as_me:8585: \$? = $ac_status" >&5
8586   (exit $ac_status); } &&
8587          { ac_try='test -s conftest.$ac_objext'
8588   { (eval echo "$as_me:8588: \"$ac_try\"") >&5
8589   (eval $ac_try) 2>&5
8590   ac_status=$?
8591   echo "$as_me:8591: \$? = $ac_status" >&5
8592   (exit $ac_status); }; }; then
8593   cf_XOPEN_SOURCE_set=yes
8594 else
8595   echo "$as_me: failed program was:" >&5
8596 cat conftest.$ac_ext >&5
8597 cf_XOPEN_SOURCE_set=no
8598 fi
8599 rm -f conftest.$ac_objext conftest.$ac_ext
8600         echo "$as_me:8600: result: $cf_XOPEN_SOURCE_set" >&5
8601 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8602         if test $cf_XOPEN_SOURCE_set = yes
8603         then
8604                 cat >conftest.$ac_ext <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8607 #include <stdlib.h>
8608 int
8609 main ()
8610 {
8611
8612 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8613 make an error
8614 #endif
8615   ;
8616   return 0;
8617 }
8618 _ACEOF
8619 rm -f conftest.$ac_objext
8620 if { (eval echo "$as_me:8620: \"$ac_compile\"") >&5
8621   (eval $ac_compile) 2>&5
8622   ac_status=$?
8623   echo "$as_me:8623: \$? = $ac_status" >&5
8624   (exit $ac_status); } &&
8625          { ac_try='test -s conftest.$ac_objext'
8626   { (eval echo "$as_me:8626: \"$ac_try\"") >&5
8627   (eval $ac_try) 2>&5
8628   ac_status=$?
8629   echo "$as_me:8629: \$? = $ac_status" >&5
8630   (exit $ac_status); }; }; then
8631   cf_XOPEN_SOURCE_set_ok=yes
8632 else
8633   echo "$as_me: failed program was:" >&5
8634 cat conftest.$ac_ext >&5
8635 cf_XOPEN_SOURCE_set_ok=no
8636 fi
8637 rm -f conftest.$ac_objext conftest.$ac_ext
8638                 if test $cf_XOPEN_SOURCE_set_ok = no
8639                 then
8640                         { echo "$as_me:8640: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8641 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8642                 fi
8643         else
8644
8645 echo "$as_me:8645: checking if we should define _XOPEN_SOURCE" >&5
8646 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8647 if test "${cf_cv_xopen_source+set}" = set; then
8648   echo $ECHO_N "(cached) $ECHO_C" >&6
8649 else
8650
8651         cat >conftest.$ac_ext <<_ACEOF
8652 #line 8652 "configure"
8653 #include "confdefs.h"
8654
8655 #include <stdlib.h>
8656 #include <string.h>
8657 #include <sys/types.h>
8658
8659 int
8660 main ()
8661 {
8662
8663 #ifndef _XOPEN_SOURCE
8664 make an error
8665 #endif
8666   ;
8667   return 0;
8668 }
8669 _ACEOF
8670 rm -f conftest.$ac_objext
8671 if { (eval echo "$as_me:8671: \"$ac_compile\"") >&5
8672   (eval $ac_compile) 2>&5
8673   ac_status=$?
8674   echo "$as_me:8674: \$? = $ac_status" >&5
8675   (exit $ac_status); } &&
8676          { ac_try='test -s conftest.$ac_objext'
8677   { (eval echo "$as_me:8677: \"$ac_try\"") >&5
8678   (eval $ac_try) 2>&5
8679   ac_status=$?
8680   echo "$as_me:8680: \$? = $ac_status" >&5
8681   (exit $ac_status); }; }; then
8682   cf_cv_xopen_source=no
8683 else
8684   echo "$as_me: failed program was:" >&5
8685 cat conftest.$ac_ext >&5
8686 cf_save="$CPPFLAGS"
8687          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8688          cat >conftest.$ac_ext <<_ACEOF
8689 #line 8689 "configure"
8690 #include "confdefs.h"
8691
8692 #include <stdlib.h>
8693 #include <string.h>
8694 #include <sys/types.h>
8695
8696 int
8697 main ()
8698 {
8699
8700 #ifdef _XOPEN_SOURCE
8701 make an error
8702 #endif
8703   ;
8704   return 0;
8705 }
8706 _ACEOF
8707 rm -f conftest.$ac_objext
8708 if { (eval echo "$as_me:8708: \"$ac_compile\"") >&5
8709   (eval $ac_compile) 2>&5
8710   ac_status=$?
8711   echo "$as_me:8711: \$? = $ac_status" >&5
8712   (exit $ac_status); } &&
8713          { ac_try='test -s conftest.$ac_objext'
8714   { (eval echo "$as_me:8714: \"$ac_try\"") >&5
8715   (eval $ac_try) 2>&5
8716   ac_status=$?
8717   echo "$as_me:8717: \$? = $ac_status" >&5
8718   (exit $ac_status); }; }; then
8719   cf_cv_xopen_source=no
8720 else
8721   echo "$as_me: failed program was:" >&5
8722 cat conftest.$ac_ext >&5
8723 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8724 fi
8725 rm -f conftest.$ac_objext conftest.$ac_ext
8726         CPPFLAGS="$cf_save"
8727
8728 fi
8729 rm -f conftest.$ac_objext conftest.$ac_ext
8730
8731 fi
8732 echo "$as_me:8732: result: $cf_cv_xopen_source" >&5
8733 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8734
8735 if test "$cf_cv_xopen_source" != no ; then
8736
8737 CFLAGS=`echo "$CFLAGS" | \
8738         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8739                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8740
8741 CPPFLAGS=`echo "$CPPFLAGS" | \
8742         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8743                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8744
8745         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8746
8747 cf_fix_cppflags=no
8748 cf_new_cflags=
8749 cf_new_cppflags=
8750 cf_new_extra_cppflags=
8751
8752 for cf_add_cflags in $cf_temp_xopen_source
8753 do
8754 case $cf_fix_cppflags in
8755 no)
8756         case $cf_add_cflags in #(vi
8757         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8758                 case $cf_add_cflags in
8759                 -D*)
8760                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8761
8762                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8763                                 && test -z "${cf_tst_cflags}" \
8764                                 && cf_fix_cppflags=yes
8765
8766                         if test $cf_fix_cppflags = yes ; then
8767                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8768                                 continue
8769                         elif test "${cf_tst_cflags}" = "\"'" ; then
8770                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8771                                 continue
8772                         fi
8773                         ;;
8774                 esac
8775                 case "$CPPFLAGS" in
8776                 *$cf_add_cflags) #(vi
8777                         ;;
8778                 *) #(vi
8779                         case $cf_add_cflags in #(vi
8780                         -D*)
8781                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8782
8783 CPPFLAGS=`echo "$CPPFLAGS" | \
8784         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8785                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8786
8787                                 ;;
8788                         esac
8789                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8790                         ;;
8791                 esac
8792                 ;;
8793         *)
8794                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8795                 ;;
8796         esac
8797         ;;
8798 yes)
8799         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8800
8801         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8802
8803         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8804                 && test -z "${cf_tst_cflags}" \
8805                 && cf_fix_cppflags=no
8806         ;;
8807 esac
8808 done
8809
8810 if test -n "$cf_new_cflags" ; then
8811
8812         CFLAGS="$CFLAGS $cf_new_cflags"
8813 fi
8814
8815 if test -n "$cf_new_cppflags" ; then
8816
8817         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8818 fi
8819
8820 if test -n "$cf_new_extra_cppflags" ; then
8821
8822         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8823 fi
8824
8825 fi
8826
8827         fi
8828 fi
8829
8830 # Work around breakage on OS X
8831
8832 echo "$as_me:8832: checking if SIGWINCH is defined" >&5
8833 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8834 if test "${cf_cv_define_sigwinch+set}" = set; then
8835   echo $ECHO_N "(cached) $ECHO_C" >&6
8836 else
8837
8838         cat >conftest.$ac_ext <<_ACEOF
8839 #line 8839 "configure"
8840 #include "confdefs.h"
8841
8842 #include <sys/types.h>
8843 #include <sys/signal.h>
8844
8845 int
8846 main ()
8847 {
8848 int x = SIGWINCH
8849   ;
8850   return 0;
8851 }
8852 _ACEOF
8853 rm -f conftest.$ac_objext
8854 if { (eval echo "$as_me:8854: \"$ac_compile\"") >&5
8855   (eval $ac_compile) 2>&5
8856   ac_status=$?
8857   echo "$as_me:8857: \$? = $ac_status" >&5
8858   (exit $ac_status); } &&
8859          { ac_try='test -s conftest.$ac_objext'
8860   { (eval echo "$as_me:8860: \"$ac_try\"") >&5
8861   (eval $ac_try) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); }; }; then
8865   cf_cv_define_sigwinch=yes
8866 else
8867   echo "$as_me: failed program was:" >&5
8868 cat conftest.$ac_ext >&5
8869 cat >conftest.$ac_ext <<_ACEOF
8870 #line 8870 "configure"
8871 #include "confdefs.h"
8872
8873 #undef _XOPEN_SOURCE
8874 #undef _POSIX_SOURCE
8875 #undef _POSIX_C_SOURCE
8876 #include <sys/types.h>
8877 #include <sys/signal.h>
8878
8879 int
8880 main ()
8881 {
8882 int x = SIGWINCH
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 rm -f conftest.$ac_objext
8888 if { (eval echo "$as_me:8888: \"$ac_compile\"") >&5
8889   (eval $ac_compile) 2>&5
8890   ac_status=$?
8891   echo "$as_me:8891: \$? = $ac_status" >&5
8892   (exit $ac_status); } &&
8893          { ac_try='test -s conftest.$ac_objext'
8894   { (eval echo "$as_me:8894: \"$ac_try\"") >&5
8895   (eval $ac_try) 2>&5
8896   ac_status=$?
8897   echo "$as_me:8897: \$? = $ac_status" >&5
8898   (exit $ac_status); }; }; then
8899   cf_cv_define_sigwinch=maybe
8900 else
8901   echo "$as_me: failed program was:" >&5
8902 cat conftest.$ac_ext >&5
8903 cf_cv_define_sigwinch=no
8904 fi
8905 rm -f conftest.$ac_objext conftest.$ac_ext
8906
8907 fi
8908 rm -f conftest.$ac_objext conftest.$ac_ext
8909
8910 fi
8911 echo "$as_me:8911: result: $cf_cv_define_sigwinch" >&5
8912 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8913
8914 if test "$cf_cv_define_sigwinch" = maybe ; then
8915 echo "$as_me:8915: checking for actual SIGWINCH definition" >&5
8916 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8917 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8918   echo $ECHO_N "(cached) $ECHO_C" >&6
8919 else
8920
8921 cf_cv_fixup_sigwinch=unknown
8922 cf_sigwinch=32
8923 while test $cf_sigwinch != 1
8924 do
8925         cat >conftest.$ac_ext <<_ACEOF
8926 #line 8926 "configure"
8927 #include "confdefs.h"
8928
8929 #undef _XOPEN_SOURCE
8930 #undef _POSIX_SOURCE
8931 #undef _POSIX_C_SOURCE
8932 #include <sys/types.h>
8933 #include <sys/signal.h>
8934
8935 int
8936 main ()
8937 {
8938
8939 #if SIGWINCH != $cf_sigwinch
8940 make an error
8941 #endif
8942 int x = SIGWINCH
8943   ;
8944   return 0;
8945 }
8946 _ACEOF
8947 rm -f conftest.$ac_objext
8948 if { (eval echo "$as_me:8948: \"$ac_compile\"") >&5
8949   (eval $ac_compile) 2>&5
8950   ac_status=$?
8951   echo "$as_me:8951: \$? = $ac_status" >&5
8952   (exit $ac_status); } &&
8953          { ac_try='test -s conftest.$ac_objext'
8954   { (eval echo "$as_me:8954: \"$ac_try\"") >&5
8955   (eval $ac_try) 2>&5
8956   ac_status=$?
8957   echo "$as_me:8957: \$? = $ac_status" >&5
8958   (exit $ac_status); }; }; then
8959   cf_cv_fixup_sigwinch=$cf_sigwinch
8960          break
8961 else
8962   echo "$as_me: failed program was:" >&5
8963 cat conftest.$ac_ext >&5
8964 fi
8965 rm -f conftest.$ac_objext conftest.$ac_ext
8966
8967 cf_sigwinch=`expr $cf_sigwinch - 1`
8968 done
8969
8970 fi
8971 echo "$as_me:8971: result: $cf_cv_fixup_sigwinch" >&5
8972 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8973
8974         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8975                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8976         fi
8977 fi
8978
8979 # Checks for CODESET support.
8980
8981   echo "$as_me:8981: checking for nl_langinfo and CODESET" >&5
8982 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8983 if test "${am_cv_langinfo_codeset+set}" = set; then
8984   echo $ECHO_N "(cached) $ECHO_C" >&6
8985 else
8986   cat >conftest.$ac_ext <<_ACEOF
8987 #line 8987 "configure"
8988 #include "confdefs.h"
8989 #include <langinfo.h>
8990 int
8991 main ()
8992 {
8993 char* cs = nl_langinfo(CODESET);
8994   ;
8995   return 0;
8996 }
8997 _ACEOF
8998 rm -f conftest.$ac_objext conftest$ac_exeext
8999 if { (eval echo "$as_me:8999: \"$ac_link\"") >&5
9000   (eval $ac_link) 2>&5
9001   ac_status=$?
9002   echo "$as_me:9002: \$? = $ac_status" >&5
9003   (exit $ac_status); } &&
9004          { ac_try='test -s conftest$ac_exeext'
9005   { (eval echo "$as_me:9005: \"$ac_try\"") >&5
9006   (eval $ac_try) 2>&5
9007   ac_status=$?
9008   echo "$as_me:9008: \$? = $ac_status" >&5
9009   (exit $ac_status); }; }; then
9010   am_cv_langinfo_codeset=yes
9011 else
9012   echo "$as_me: failed program was:" >&5
9013 cat conftest.$ac_ext >&5
9014 am_cv_langinfo_codeset=no
9015 fi
9016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9017
9018 fi
9019 echo "$as_me:9019: result: $am_cv_langinfo_codeset" >&5
9020 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9021   if test $am_cv_langinfo_codeset = yes; then
9022
9023 cat >>confdefs.h <<\EOF
9024 #define HAVE_LANGINFO_CODESET 1
9025 EOF
9026
9027   fi
9028
9029 # use these variables to work around a defect in gcc's fixincludes.
9030 NCURSES_OK_WCHAR_T=
9031 NCURSES_OK_WINT_T=
9032
9033 echo "$as_me:9033: checking if you want wide-character code" >&5
9034 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9035
9036 # Check whether --enable-widec or --disable-widec was given.
9037 if test "${enable_widec+set}" = set; then
9038   enableval="$enable_widec"
9039   with_widec=$enableval
9040 else
9041   with_widec=no
9042 fi;
9043 echo "$as_me:9043: result: $with_widec" >&5
9044 echo "${ECHO_T}$with_widec" >&6
9045 if test "x$with_widec" = xyes ; then
9046         if test "x$disable_lib_suffixes" = xno ; then
9047                 LIB_SUFFIX="w${LIB_SUFFIX}"
9048         fi
9049
9050 cat >>confdefs.h <<\EOF
9051 #define USE_WIDEC_SUPPORT 1
9052 EOF
9053
9054 cat >>confdefs.h <<\EOF
9055 #define NCURSES_WIDECHAR 1
9056 EOF
9057
9058 echo "$as_me:9058: checking if wchar.h can be used as is" >&5
9059 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9060 if test "${cf_cv_wchar_h_okay+set}" = set; then
9061   echo $ECHO_N "(cached) $ECHO_C" >&6
9062 else
9063
9064 cat >conftest.$ac_ext <<_ACEOF
9065 #line 9065 "configure"
9066 #include "confdefs.h"
9067
9068 #include <stdlib.h>
9069 #include <wchar.h>
9070
9071 int
9072 main ()
9073 {
9074
9075         wint_t foo = 0;
9076         int bar = iswpunct(foo)
9077   ;
9078   return 0;
9079 }
9080 _ACEOF
9081 rm -f conftest.$ac_objext
9082 if { (eval echo "$as_me:9082: \"$ac_compile\"") >&5
9083   (eval $ac_compile) 2>&5
9084   ac_status=$?
9085   echo "$as_me:9085: \$? = $ac_status" >&5
9086   (exit $ac_status); } &&
9087          { ac_try='test -s conftest.$ac_objext'
9088   { (eval echo "$as_me:9088: \"$ac_try\"") >&5
9089   (eval $ac_try) 2>&5
9090   ac_status=$?
9091   echo "$as_me:9091: \$? = $ac_status" >&5
9092   (exit $ac_status); }; }; then
9093   cf_cv_wchar_h_okay=yes
9094 else
9095   echo "$as_me: failed program was:" >&5
9096 cat conftest.$ac_ext >&5
9097 cf_cv_wchar_h_okay=no
9098 fi
9099 rm -f conftest.$ac_objext conftest.$ac_ext
9100 fi
9101 echo "$as_me:9101: result: $cf_cv_wchar_h_okay" >&5
9102 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9103
9104 if test $cf_cv_wchar_h_okay = no
9105 then
9106
9107 echo "$as_me:9107: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9108 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9109 cat >conftest.$ac_ext <<_ACEOF
9110 #line 9110 "configure"
9111 #include "confdefs.h"
9112 #include <sys/types.h>
9113
9114 int
9115 main ()
9116 {
9117
9118 #ifndef _XOPEN_SOURCE_EXTENDED
9119 make an error
9120 #endif
9121   ;
9122   return 0;
9123 }
9124 _ACEOF
9125 rm -f conftest.$ac_objext
9126 if { (eval echo "$as_me:9126: \"$ac_compile\"") >&5
9127   (eval $ac_compile) 2>&5
9128   ac_status=$?
9129   echo "$as_me:9129: \$? = $ac_status" >&5
9130   (exit $ac_status); } &&
9131          { ac_try='test -s conftest.$ac_objext'
9132   { (eval echo "$as_me:9132: \"$ac_try\"") >&5
9133   (eval $ac_try) 2>&5
9134   ac_status=$?
9135   echo "$as_me:9135: \$? = $ac_status" >&5
9136   (exit $ac_status); }; }; then
9137   cf_result=no
9138 else
9139   echo "$as_me: failed program was:" >&5
9140 cat conftest.$ac_ext >&5
9141 cf_result=yes
9142 fi
9143 rm -f conftest.$ac_objext conftest.$ac_ext
9144 echo "$as_me:9144: result: $cf_result" >&5
9145 echo "${ECHO_T}$cf_result" >&6
9146
9147 if test "$cf_result" = yes ; then
9148         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9149 elif test "x" != "x" ; then
9150         echo "$as_me:9150: checking checking for compatible value versus " >&5
9151 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9152         cat >conftest.$ac_ext <<_ACEOF
9153 #line 9153 "configure"
9154 #include "confdefs.h"
9155 #include <sys/types.h>
9156
9157 int
9158 main ()
9159 {
9160
9161 #if _XOPEN_SOURCE_EXTENDED- < 0
9162 make an error
9163 #endif
9164   ;
9165   return 0;
9166 }
9167 _ACEOF
9168 rm -f conftest.$ac_objext
9169 if { (eval echo "$as_me:9169: \"$ac_compile\"") >&5
9170   (eval $ac_compile) 2>&5
9171   ac_status=$?
9172   echo "$as_me:9172: \$? = $ac_status" >&5
9173   (exit $ac_status); } &&
9174          { ac_try='test -s conftest.$ac_objext'
9175   { (eval echo "$as_me:9175: \"$ac_try\"") >&5
9176   (eval $ac_try) 2>&5
9177   ac_status=$?
9178   echo "$as_me:9178: \$? = $ac_status" >&5
9179   (exit $ac_status); }; }; then
9180   cf_result=yes
9181 else
9182   echo "$as_me: failed program was:" >&5
9183 cat conftest.$ac_ext >&5
9184 cf_result=no
9185 fi
9186 rm -f conftest.$ac_objext conftest.$ac_ext
9187         echo "$as_me:9187: result: $cf_result" >&5
9188 echo "${ECHO_T}$cf_result" >&6
9189         if test "$cf_result" = no ; then
9190                 # perhaps we can override it - try...
9191                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9192         fi
9193 fi
9194
9195 fi
9196
9197         # with_overwrite=no
9198         NCURSES_CH_T=cchar_t
9199
9200 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9201 do
9202 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9203 echo "$as_me:9203: checking for $ac_func" >&5
9204 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9205 if eval "test \"\${$as_ac_var+set}\" = set"; then
9206   echo $ECHO_N "(cached) $ECHO_C" >&6
9207 else
9208   cat >conftest.$ac_ext <<_ACEOF
9209 #line 9209 "configure"
9210 #include "confdefs.h"
9211 /* System header to define __stub macros and hopefully few prototypes,
9212     which can conflict with char $ac_func (); below.  */
9213 #include <assert.h>
9214 /* Override any gcc2 internal prototype to avoid an error.  */
9215 #ifdef __cplusplus
9216 extern "C"
9217 #endif
9218 /* We use char because int might match the return type of a gcc2
9219    builtin and then its argument prototype would still apply.  */
9220 char $ac_func ();
9221 char (*f) ();
9222
9223 int
9224 main ()
9225 {
9226 /* The GNU C library defines this for functions which it implements
9227     to always fail with ENOSYS.  Some functions are actually named
9228     something starting with __ and the normal name is an alias.  */
9229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9230 choke me
9231 #else
9232 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9233 #endif
9234
9235   ;
9236   return 0;
9237 }
9238 _ACEOF
9239 rm -f conftest.$ac_objext conftest$ac_exeext
9240 if { (eval echo "$as_me:9240: \"$ac_link\"") >&5
9241   (eval $ac_link) 2>&5
9242   ac_status=$?
9243   echo "$as_me:9243: \$? = $ac_status" >&5
9244   (exit $ac_status); } &&
9245          { ac_try='test -s conftest$ac_exeext'
9246   { (eval echo "$as_me:9246: \"$ac_try\"") >&5
9247   (eval $ac_try) 2>&5
9248   ac_status=$?
9249   echo "$as_me:9249: \$? = $ac_status" >&5
9250   (exit $ac_status); }; }; then
9251   eval "$as_ac_var=yes"
9252 else
9253   echo "$as_me: failed program was:" >&5
9254 cat conftest.$ac_ext >&5
9255 eval "$as_ac_var=no"
9256 fi
9257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9258 fi
9259 echo "$as_me:9259: result: `eval echo '${'$as_ac_var'}'`" >&5
9260 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9261 if test `eval echo '${'$as_ac_var'}'` = yes; then
9262   cat >>confdefs.h <<EOF
9263 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9264 EOF
9265
9266 fi
9267 done
9268
9269         if test "x$ac_cv_func_putwc" != xyes ; then
9270
9271 echo "$as_me:9271: checking for multibyte character support" >&5
9272 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9273 if test "${cf_cv_utf8_lib+set}" = set; then
9274   echo $ECHO_N "(cached) $ECHO_C" >&6
9275 else
9276
9277         cf_save_LIBS="$LIBS"
9278         cat >conftest.$ac_ext <<_ACEOF
9279 #line 9279 "configure"
9280 #include "confdefs.h"
9281
9282 #include <stdlib.h>
9283 int
9284 main ()
9285 {
9286 putwc(0,0);
9287   ;
9288   return 0;
9289 }
9290 _ACEOF
9291 rm -f conftest.$ac_objext conftest$ac_exeext
9292 if { (eval echo "$as_me:9292: \"$ac_link\"") >&5
9293   (eval $ac_link) 2>&5
9294   ac_status=$?
9295   echo "$as_me:9295: \$? = $ac_status" >&5
9296   (exit $ac_status); } &&
9297          { ac_try='test -s conftest$ac_exeext'
9298   { (eval echo "$as_me:9298: \"$ac_try\"") >&5
9299   (eval $ac_try) 2>&5
9300   ac_status=$?
9301   echo "$as_me:9301: \$? = $ac_status" >&5
9302   (exit $ac_status); }; }; then
9303   cf_cv_utf8_lib=yes
9304 else
9305   echo "$as_me: failed program was:" >&5
9306 cat conftest.$ac_ext >&5
9307
9308 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9309 # will be set on completion of the AC_TRY_LINK below.
9310 cf_cv_header_path_utf8=
9311 cf_cv_library_path_utf8=
9312
9313 echo "${as_me:-configure}:9313: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9314
9315 cf_save_LIBS="$LIBS"
9316
9317 cat >conftest.$ac_ext <<_ACEOF
9318 #line 9318 "configure"
9319 #include "confdefs.h"
9320
9321 #include <libutf8.h>
9322 int
9323 main ()
9324 {
9325 putwc(0,0);
9326   ;
9327   return 0;
9328 }
9329 _ACEOF
9330 rm -f conftest.$ac_objext conftest$ac_exeext
9331 if { (eval echo "$as_me:9331: \"$ac_link\"") >&5
9332   (eval $ac_link) 2>&5
9333   ac_status=$?
9334   echo "$as_me:9334: \$? = $ac_status" >&5
9335   (exit $ac_status); } &&
9336          { ac_try='test -s conftest$ac_exeext'
9337   { (eval echo "$as_me:9337: \"$ac_try\"") >&5
9338   (eval $ac_try) 2>&5
9339   ac_status=$?
9340   echo "$as_me:9340: \$? = $ac_status" >&5
9341   (exit $ac_status); }; }; then
9342
9343         cf_cv_find_linkage_utf8=yes
9344         cf_cv_header_path_utf8=/usr/include
9345         cf_cv_library_path_utf8=/usr/lib
9346
9347 else
9348   echo "$as_me: failed program was:" >&5
9349 cat conftest.$ac_ext >&5
9350
9351 LIBS="-lutf8  $cf_save_LIBS"
9352
9353 cat >conftest.$ac_ext <<_ACEOF
9354 #line 9354 "configure"
9355 #include "confdefs.h"
9356
9357 #include <libutf8.h>
9358 int
9359 main ()
9360 {
9361 putwc(0,0);
9362   ;
9363   return 0;
9364 }
9365 _ACEOF
9366 rm -f conftest.$ac_objext conftest$ac_exeext
9367 if { (eval echo "$as_me:9367: \"$ac_link\"") >&5
9368   (eval $ac_link) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); } &&
9372          { ac_try='test -s conftest$ac_exeext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378
9379         cf_cv_find_linkage_utf8=yes
9380         cf_cv_header_path_utf8=/usr/include
9381         cf_cv_library_path_utf8=/usr/lib
9382         cf_cv_library_file_utf8="-lutf8"
9383
9384 else
9385   echo "$as_me: failed program was:" >&5
9386 cat conftest.$ac_ext >&5
9387
9388         cf_cv_find_linkage_utf8=no
9389         LIBS="$cf_save_LIBS"
9390
9391     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9392
9393 echo "${as_me:-configure}:9393: testing find linkage for utf8 library ..." 1>&5
9394
9395 echo "${as_me:-configure}:9395: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9396
9397     cf_save_CPPFLAGS="$CPPFLAGS"
9398     cf_test_CPPFLAGS="$CPPFLAGS"
9399
9400 cf_search=
9401
9402 # collect the current set of include-directories from compiler flags
9403 cf_header_path_list=""
9404 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9405         for cf_header_path in $CPPFLAGS $CFLAGS
9406         do
9407                 case $cf_header_path in #(vi
9408                 -I*)
9409                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9410
9411 test "x$cf_header_path" != "xNONE" && \
9412 test -d "$cf_header_path" && \
9413  {
9414         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9415         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9416         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9417         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9418         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9419         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9420 }
9421
9422                         cf_header_path_list="$cf_header_path_list $cf_search"
9423                         ;;
9424                 esac
9425         done
9426 fi
9427
9428 # add the variations for the package we are looking for
9429
9430 cf_search=
9431
9432 test "x$prefix" != "xNONE" && \
9433 test -d "$prefix" && \
9434  {
9435         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9436         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9437         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9438         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9439         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9440         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9441 }
9442
9443 for cf_subdir_prefix in \
9444         /usr \
9445         /usr/local \
9446         /usr/pkg \
9447         /opt \
9448         /opt/local \
9449         $HOME
9450 do
9451
9452 test "x$cf_subdir_prefix" != "x$prefix" && \
9453 test -d "$cf_subdir_prefix" && \
9454 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9455         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9456         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9457         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9458         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9459         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9460         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9461 }
9462
9463 done
9464
9465 test "$includedir" != NONE && \
9466 test "$includedir" != "/usr/include" && \
9467 test -d "$includedir" && {
9468         test -d $includedir &&    cf_search="$cf_search $includedir"
9469         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9470 }
9471
9472 test "$oldincludedir" != NONE && \
9473 test "$oldincludedir" != "/usr/include" && \
9474 test -d "$oldincludedir" && {
9475         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9476         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9477 }
9478
9479 cf_search="$cf_search $cf_header_path_list"
9480
9481     for cf_cv_header_path_utf8 in $cf_search
9482     do
9483       if test -d $cf_cv_header_path_utf8 ; then
9484         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9485
9486 echo "${as_me:-configure}:9486: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9487
9488         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9489         cat >conftest.$ac_ext <<_ACEOF
9490 #line 9490 "configure"
9491 #include "confdefs.h"
9492
9493 #include <libutf8.h>
9494 int
9495 main ()
9496 {
9497 putwc(0,0);
9498   ;
9499   return 0;
9500 }
9501 _ACEOF
9502 rm -f conftest.$ac_objext
9503 if { (eval echo "$as_me:9503: \"$ac_compile\"") >&5
9504   (eval $ac_compile) 2>&5
9505   ac_status=$?
9506   echo "$as_me:9506: \$? = $ac_status" >&5
9507   (exit $ac_status); } &&
9508          { ac_try='test -s conftest.$ac_objext'
9509   { (eval echo "$as_me:9509: \"$ac_try\"") >&5
9510   (eval $ac_try) 2>&5
9511   ac_status=$?
9512   echo "$as_me:9512: \$? = $ac_status" >&5
9513   (exit $ac_status); }; }; then
9514
9515             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9516
9517 echo "${as_me:-configure}:9517: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9518
9519             cf_cv_find_linkage_utf8=maybe
9520             cf_test_CPPFLAGS="$CPPFLAGS"
9521             break
9522 else
9523   echo "$as_me: failed program was:" >&5
9524 cat conftest.$ac_ext >&5
9525
9526             CPPFLAGS="$cf_save_CPPFLAGS"
9527
9528 fi
9529 rm -f conftest.$ac_objext conftest.$ac_ext
9530       fi
9531     done
9532
9533     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9534
9535 echo "${as_me:-configure}:9535: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9536
9537       cf_save_LIBS="$LIBS"
9538       cf_save_LDFLAGS="$LDFLAGS"
9539
9540       if test "$cf_cv_find_linkage_utf8" != yes ; then
9541
9542 cf_search=
9543 cf_library_path_list=""
9544 if test -n "${LDFLAGS}${LIBS}" ; then
9545         for cf_library_path in $LDFLAGS $LIBS
9546         do
9547                 case $cf_library_path in #(vi
9548                 -L*)
9549                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9550
9551 test "x$cf_library_path" != "xNONE" && \
9552 test -d "$cf_library_path" && \
9553  {
9554         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9555         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9556         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9557         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9558         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9559         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9560 }
9561
9562                         cf_library_path_list="$cf_library_path_list $cf_search"
9563                         ;;
9564                 esac
9565         done
9566 fi
9567
9568 cf_search=
9569
9570 test "x$prefix" != "xNONE" && \
9571 test -d "$prefix" && \
9572  {
9573         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9574         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9575         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9576         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9577         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9578         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9579 }
9580
9581 for cf_subdir_prefix in \
9582         /usr \
9583         /usr/local \
9584         /usr/pkg \
9585         /opt \
9586         /opt/local \
9587         $HOME
9588 do
9589
9590 test "x$cf_subdir_prefix" != "x$prefix" && \
9591 test -d "$cf_subdir_prefix" && \
9592 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9593         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9594         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9595         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9596         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9597         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9598         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9599 }
9600
9601 done
9602
9603 cf_search="$cf_library_path_list $cf_search"
9604
9605         for cf_cv_library_path_utf8 in $cf_search
9606         do
9607           if test -d $cf_cv_library_path_utf8 ; then
9608             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9609
9610 echo "${as_me:-configure}:9610: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9611
9612             CPPFLAGS="$cf_test_CPPFLAGS"
9613             LIBS="-lutf8  $cf_save_LIBS"
9614             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9615             cat >conftest.$ac_ext <<_ACEOF
9616 #line 9616 "configure"
9617 #include "confdefs.h"
9618
9619 #include <libutf8.h>
9620 int
9621 main ()
9622 {
9623 putwc(0,0);
9624   ;
9625   return 0;
9626 }
9627 _ACEOF
9628 rm -f conftest.$ac_objext conftest$ac_exeext
9629 if { (eval echo "$as_me:9629: \"$ac_link\"") >&5
9630   (eval $ac_link) 2>&5
9631   ac_status=$?
9632   echo "$as_me:9632: \$? = $ac_status" >&5
9633   (exit $ac_status); } &&
9634          { ac_try='test -s conftest$ac_exeext'
9635   { (eval echo "$as_me:9635: \"$ac_try\"") >&5
9636   (eval $ac_try) 2>&5
9637   ac_status=$?
9638   echo "$as_me:9638: \$? = $ac_status" >&5
9639   (exit $ac_status); }; }; then
9640
9641                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9642
9643 echo "${as_me:-configure}:9643: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9644
9645                 cf_cv_find_linkage_utf8=yes
9646                 cf_cv_library_file_utf8="-lutf8"
9647                 break
9648 else
9649   echo "$as_me: failed program was:" >&5
9650 cat conftest.$ac_ext >&5
9651
9652                 CPPFLAGS="$cf_save_CPPFLAGS"
9653                 LIBS="$cf_save_LIBS"
9654                 LDFLAGS="$cf_save_LDFLAGS"
9655
9656 fi
9657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9658           fi
9659         done
9660         CPPFLAGS="$cf_save_CPPFLAGS"
9661         LDFLAGS="$cf_save_LDFLAGS"
9662       fi
9663
9664     else
9665       cf_cv_find_linkage_utf8=no
9666     fi
9667
9668 fi
9669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9670
9671 fi
9672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9673
9674 LIBS="$cf_save_LIBS"
9675
9676 if test "$cf_cv_find_linkage_utf8" = yes ; then
9677 cf_cv_utf8_lib=add-on
9678 else
9679 cf_cv_utf8_lib=no
9680 fi
9681
9682 fi
9683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9684 fi
9685 echo "$as_me:9685: result: $cf_cv_utf8_lib" >&5
9686 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9687
9688 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9689 # ncurses/ncursesw:
9690 if test "$cf_cv_utf8_lib" = "add-on" ; then
9691
9692 cat >>confdefs.h <<\EOF
9693 #define HAVE_LIBUTF8_H 1
9694 EOF
9695
9696 if test -n "$cf_cv_header_path_utf8" ; then
9697   for cf_add_incdir in $cf_cv_header_path_utf8
9698   do
9699         while test $cf_add_incdir != /usr/include
9700         do
9701           if test -d $cf_add_incdir
9702           then
9703                 cf_have_incdir=no
9704                 if test -n "$CFLAGS$CPPFLAGS" ; then
9705                   # a loop is needed to ensure we can add subdirs of existing dirs
9706                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9707                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9708                           cf_have_incdir=yes; break
9709                         fi
9710                   done
9711                 fi
9712
9713                 if test "$cf_have_incdir" = no ; then
9714                   if test "$cf_add_incdir" = /usr/local/include ; then
9715                         if test "$GCC" = yes
9716                         then
9717                           cf_save_CPPFLAGS=$CPPFLAGS
9718                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9719                           cat >conftest.$ac_ext <<_ACEOF
9720 #line 9720 "configure"
9721 #include "confdefs.h"
9722 #include <stdio.h>
9723 int
9724 main ()
9725 {
9726 printf("Hello")
9727   ;
9728   return 0;
9729 }
9730 _ACEOF
9731 rm -f conftest.$ac_objext
9732 if { (eval echo "$as_me:9732: \"$ac_compile\"") >&5
9733   (eval $ac_compile) 2>&5
9734   ac_status=$?
9735   echo "$as_me:9735: \$? = $ac_status" >&5
9736   (exit $ac_status); } &&
9737          { ac_try='test -s conftest.$ac_objext'
9738   { (eval echo "$as_me:9738: \"$ac_try\"") >&5
9739   (eval $ac_try) 2>&5
9740   ac_status=$?
9741   echo "$as_me:9741: \$? = $ac_status" >&5
9742   (exit $ac_status); }; }; then
9743   :
9744 else
9745   echo "$as_me: failed program was:" >&5
9746 cat conftest.$ac_ext >&5
9747 cf_have_incdir=yes
9748 fi
9749 rm -f conftest.$ac_objext conftest.$ac_ext
9750                           CPPFLAGS=$cf_save_CPPFLAGS
9751                         fi
9752                   fi
9753                 fi
9754
9755                 if test "$cf_have_incdir" = no ; then
9756                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9757
9758 echo "${as_me:-configure}:9758: testing adding $cf_add_incdir to include-path ..." 1>&5
9759
9760                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9761
9762                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9763                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9764                   cf_add_incdir="$cf_top_incdir"
9765                 else
9766                   break
9767                 fi
9768           fi
9769         done
9770   done
9771 fi
9772
9773 if test -n "$cf_cv_library_path_utf8" ; then
9774   for cf_add_libdir in $cf_cv_library_path_utf8
9775   do
9776     if test $cf_add_libdir = /usr/lib ; then
9777       :
9778     elif test -d $cf_add_libdir
9779     then
9780       cf_have_libdir=no
9781       if test -n "$LDFLAGS$LIBS" ; then
9782         # a loop is needed to ensure we can add subdirs of existing dirs
9783         for cf_test_libdir in $LDFLAGS $LIBS ; do
9784           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9785             cf_have_libdir=yes; break
9786           fi
9787         done
9788       fi
9789       if test "$cf_have_libdir" = no ; then
9790         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9791
9792 echo "${as_me:-configure}:9792: testing adding $cf_add_libdir to library-path ..." 1>&5
9793
9794         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9795       fi
9796     fi
9797   done
9798 fi
9799
9800 cf_add_libs="$cf_cv_library_file_utf8"
9801 # Filter out duplicates - this happens with badly-designed ".pc" files...
9802 for cf_add_1lib in $LIBS
9803 do
9804         for cf_add_2lib in $cf_add_libs
9805         do
9806                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9807                 then
9808                         cf_add_1lib=
9809                         break
9810                 fi
9811         done
9812         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9813 done
9814 LIBS="$cf_add_libs"
9815
9816 fi
9817
9818                 if test "$cf_cv_utf8_lib" != no ; then
9819                         NCURSES_LIBUTF8=1
9820                 fi
9821         fi
9822
9823 # This is needed on Tru64 5.0 to declare mbstate_t
9824 echo "$as_me:9824: checking if we must include wchar.h to declare mbstate_t" >&5
9825 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9826 if test "${cf_cv_mbstate_t+set}" = set; then
9827   echo $ECHO_N "(cached) $ECHO_C" >&6
9828 else
9829
9830 cat >conftest.$ac_ext <<_ACEOF
9831 #line 9831 "configure"
9832 #include "confdefs.h"
9833
9834 #include <stdlib.h>
9835 #include <stdarg.h>
9836 #include <stdio.h>
9837 #ifdef HAVE_LIBUTF8_H
9838 #include <libutf8.h>
9839 #endif
9840 int
9841 main ()
9842 {
9843 mbstate_t state
9844   ;
9845   return 0;
9846 }
9847 _ACEOF
9848 rm -f conftest.$ac_objext
9849 if { (eval echo "$as_me:9849: \"$ac_compile\"") >&5
9850   (eval $ac_compile) 2>&5
9851   ac_status=$?
9852   echo "$as_me:9852: \$? = $ac_status" >&5
9853   (exit $ac_status); } &&
9854          { ac_try='test -s conftest.$ac_objext'
9855   { (eval echo "$as_me:9855: \"$ac_try\"") >&5
9856   (eval $ac_try) 2>&5
9857   ac_status=$?
9858   echo "$as_me:9858: \$? = $ac_status" >&5
9859   (exit $ac_status); }; }; then
9860   cf_cv_mbstate_t=no
9861 else
9862   echo "$as_me: failed program was:" >&5
9863 cat conftest.$ac_ext >&5
9864 cat >conftest.$ac_ext <<_ACEOF
9865 #line 9865 "configure"
9866 #include "confdefs.h"
9867
9868 #include <stdlib.h>
9869 #include <stdarg.h>
9870 #include <stdio.h>
9871 #include <wchar.h>
9872 #ifdef HAVE_LIBUTF8_H
9873 #include <libutf8.h>
9874 #endif
9875 int
9876 main ()
9877 {
9878 mbstate_t value
9879   ;
9880   return 0;
9881 }
9882 _ACEOF
9883 rm -f conftest.$ac_objext
9884 if { (eval echo "$as_me:9884: \"$ac_compile\"") >&5
9885   (eval $ac_compile) 2>&5
9886   ac_status=$?
9887   echo "$as_me:9887: \$? = $ac_status" >&5
9888   (exit $ac_status); } &&
9889          { ac_try='test -s conftest.$ac_objext'
9890   { (eval echo "$as_me:9890: \"$ac_try\"") >&5
9891   (eval $ac_try) 2>&5
9892   ac_status=$?
9893   echo "$as_me:9893: \$? = $ac_status" >&5
9894   (exit $ac_status); }; }; then
9895   cf_cv_mbstate_t=yes
9896 else
9897   echo "$as_me: failed program was:" >&5
9898 cat conftest.$ac_ext >&5
9899 cf_cv_mbstate_t=unknown
9900 fi
9901 rm -f conftest.$ac_objext conftest.$ac_ext
9902 fi
9903 rm -f conftest.$ac_objext conftest.$ac_ext
9904 fi
9905 echo "$as_me:9905: result: $cf_cv_mbstate_t" >&5
9906 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9907
9908 if test "$cf_cv_mbstate_t" = yes ; then
9909
9910 cat >>confdefs.h <<\EOF
9911 #define NEED_WCHAR_H 1
9912 EOF
9913
9914         NEED_WCHAR_H=1
9915 fi
9916
9917 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9918 if test "$cf_cv_mbstate_t" = unknown ; then
9919         NCURSES_MBSTATE_T=1
9920 fi
9921
9922 # This is needed on Tru64 5.0 to declare wchar_t
9923 echo "$as_me:9923: checking if we must include wchar.h to declare wchar_t" >&5
9924 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9925 if test "${cf_cv_wchar_t+set}" = set; then
9926   echo $ECHO_N "(cached) $ECHO_C" >&6
9927 else
9928
9929 cat >conftest.$ac_ext <<_ACEOF
9930 #line 9930 "configure"
9931 #include "confdefs.h"
9932
9933 #include <stdlib.h>
9934 #include <stdarg.h>
9935 #include <stdio.h>
9936 #ifdef HAVE_LIBUTF8_H
9937 #include <libutf8.h>
9938 #endif
9939 int
9940 main ()
9941 {
9942 wchar_t state
9943   ;
9944   return 0;
9945 }
9946 _ACEOF
9947 rm -f conftest.$ac_objext
9948 if { (eval echo "$as_me:9948: \"$ac_compile\"") >&5
9949   (eval $ac_compile) 2>&5
9950   ac_status=$?
9951   echo "$as_me:9951: \$? = $ac_status" >&5
9952   (exit $ac_status); } &&
9953          { ac_try='test -s conftest.$ac_objext'
9954   { (eval echo "$as_me:9954: \"$ac_try\"") >&5
9955   (eval $ac_try) 2>&5
9956   ac_status=$?
9957   echo "$as_me:9957: \$? = $ac_status" >&5
9958   (exit $ac_status); }; }; then
9959   cf_cv_wchar_t=no
9960 else
9961   echo "$as_me: failed program was:" >&5
9962 cat conftest.$ac_ext >&5
9963 cat >conftest.$ac_ext <<_ACEOF
9964 #line 9964 "configure"
9965 #include "confdefs.h"
9966
9967 #include <stdlib.h>
9968 #include <stdarg.h>
9969 #include <stdio.h>
9970 #include <wchar.h>
9971 #ifdef HAVE_LIBUTF8_H
9972 #include <libutf8.h>
9973 #endif
9974 int
9975 main ()
9976 {
9977 wchar_t value
9978   ;
9979   return 0;
9980 }
9981 _ACEOF
9982 rm -f conftest.$ac_objext
9983 if { (eval echo "$as_me:9983: \"$ac_compile\"") >&5
9984   (eval $ac_compile) 2>&5
9985   ac_status=$?
9986   echo "$as_me:9986: \$? = $ac_status" >&5
9987   (exit $ac_status); } &&
9988          { ac_try='test -s conftest.$ac_objext'
9989   { (eval echo "$as_me:9989: \"$ac_try\"") >&5
9990   (eval $ac_try) 2>&5
9991   ac_status=$?
9992   echo "$as_me:9992: \$? = $ac_status" >&5
9993   (exit $ac_status); }; }; then
9994   cf_cv_wchar_t=yes
9995 else
9996   echo "$as_me: failed program was:" >&5
9997 cat conftest.$ac_ext >&5
9998 cf_cv_wchar_t=unknown
9999 fi
10000 rm -f conftest.$ac_objext conftest.$ac_ext
10001 fi
10002 rm -f conftest.$ac_objext conftest.$ac_ext
10003 fi
10004 echo "$as_me:10004: result: $cf_cv_wchar_t" >&5
10005 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10006
10007 if test "$cf_cv_wchar_t" = yes ; then
10008
10009 cat >>confdefs.h <<\EOF
10010 #define NEED_WCHAR_H 1
10011 EOF
10012
10013         NEED_WCHAR_H=1
10014 fi
10015
10016 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10017 if test "$cf_cv_wchar_t" = unknown ; then
10018         NCURSES_WCHAR_T=1
10019 fi
10020
10021 # if we find wchar_t in either place, use substitution to provide a fallback.
10022 if test "$cf_cv_wchar_t" != unknown ; then
10023         NCURSES_OK_WCHAR_T=1
10024 fi
10025
10026 # This is needed on Tru64 5.0 to declare wint_t
10027 echo "$as_me:10027: checking if we must include wchar.h to declare wint_t" >&5
10028 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10029 if test "${cf_cv_wint_t+set}" = set; then
10030   echo $ECHO_N "(cached) $ECHO_C" >&6
10031 else
10032
10033 cat >conftest.$ac_ext <<_ACEOF
10034 #line 10034 "configure"
10035 #include "confdefs.h"
10036
10037 #include <stdlib.h>
10038 #include <stdarg.h>
10039 #include <stdio.h>
10040 #ifdef HAVE_LIBUTF8_H
10041 #include <libutf8.h>
10042 #endif
10043 int
10044 main ()
10045 {
10046 wint_t state
10047   ;
10048   return 0;
10049 }
10050 _ACEOF
10051 rm -f conftest.$ac_objext
10052 if { (eval echo "$as_me:10052: \"$ac_compile\"") >&5
10053   (eval $ac_compile) 2>&5
10054   ac_status=$?
10055   echo "$as_me:10055: \$? = $ac_status" >&5
10056   (exit $ac_status); } &&
10057          { ac_try='test -s conftest.$ac_objext'
10058   { (eval echo "$as_me:10058: \"$ac_try\"") >&5
10059   (eval $ac_try) 2>&5
10060   ac_status=$?
10061   echo "$as_me:10061: \$? = $ac_status" >&5
10062   (exit $ac_status); }; }; then
10063   cf_cv_wint_t=no
10064 else
10065   echo "$as_me: failed program was:" >&5
10066 cat conftest.$ac_ext >&5
10067 cat >conftest.$ac_ext <<_ACEOF
10068 #line 10068 "configure"
10069 #include "confdefs.h"
10070
10071 #include <stdlib.h>
10072 #include <stdarg.h>
10073 #include <stdio.h>
10074 #include <wchar.h>
10075 #ifdef HAVE_LIBUTF8_H
10076 #include <libutf8.h>
10077 #endif
10078 int
10079 main ()
10080 {
10081 wint_t value
10082   ;
10083   return 0;
10084 }
10085 _ACEOF
10086 rm -f conftest.$ac_objext
10087 if { (eval echo "$as_me:10087: \"$ac_compile\"") >&5
10088   (eval $ac_compile) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); } &&
10092          { ac_try='test -s conftest.$ac_objext'
10093   { (eval echo "$as_me:10093: \"$ac_try\"") >&5
10094   (eval $ac_try) 2>&5
10095   ac_status=$?
10096   echo "$as_me:10096: \$? = $ac_status" >&5
10097   (exit $ac_status); }; }; then
10098   cf_cv_wint_t=yes
10099 else
10100   echo "$as_me: failed program was:" >&5
10101 cat conftest.$ac_ext >&5
10102 cf_cv_wint_t=unknown
10103 fi
10104 rm -f conftest.$ac_objext conftest.$ac_ext
10105 fi
10106 rm -f conftest.$ac_objext conftest.$ac_ext
10107 fi
10108 echo "$as_me:10108: result: $cf_cv_wint_t" >&5
10109 echo "${ECHO_T}$cf_cv_wint_t" >&6
10110
10111 if test "$cf_cv_wint_t" = yes ; then
10112
10113 cat >>confdefs.h <<\EOF
10114 #define NEED_WCHAR_H 1
10115 EOF
10116
10117         NEED_WCHAR_H=1
10118 fi
10119
10120 # if we do not find wint_t in either place, use substitution to provide a fallback.
10121 if test "$cf_cv_wint_t" = unknown ; then
10122         NCURSES_WINT_T=1
10123 fi
10124
10125 # if we find wint_t in either place, use substitution to provide a fallback.
10126 if test "$cf_cv_wint_t" != unknown ; then
10127         NCURSES_OK_WINT_T=1
10128 fi
10129
10130         if test "$NCURSES_MBSTATE_T" != 0; then
10131
10132 cat >>confdefs.h <<\EOF
10133 #define NEED_MBSTATE_T_DEF 1
10134 EOF
10135
10136         fi
10137 fi
10138
10139 ###   use option --disable-lp64 to allow long chtype
10140 case $cf_cv_abi_version in
10141 [345]*)
10142         default_with_lp64=no
10143         ;;
10144 *)
10145         default_with_lp64=yes
10146         ;;
10147 esac
10148
10149 echo "$as_me:10149: checking whether to enable _LP64 definition in curses.h" >&5
10150 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10151
10152 # Check whether --enable-lp64 or --disable-lp64 was given.
10153 if test "${enable_lp64+set}" = set; then
10154   enableval="$enable_lp64"
10155   with_lp64=$enableval
10156 else
10157   with_lp64=$default_with_lp64
10158 fi;
10159 echo "$as_me:10159: result: $with_lp64" >&5
10160 echo "${ECHO_T}$with_lp64" >&6
10161
10162 if test "x$with_lp64" = xyes ; then
10163         cf_cv_enable_lp64=1
10164 else
10165         cf_cv_enable_lp64=0
10166 fi
10167
10168 # Check whether --enable-largefile or --disable-largefile was given.
10169 if test "${enable_largefile+set}" = set; then
10170   enableval="$enable_largefile"
10171
10172 fi;
10173 if test "$enable_largefile" != no; then
10174
10175   echo "$as_me:10175: checking for special C compiler options needed for large files" >&5
10176 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10177 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10178   echo $ECHO_N "(cached) $ECHO_C" >&6
10179 else
10180   ac_cv_sys_largefile_CC=no
10181      if test "$GCC" != yes; then
10182        ac_save_CC=$CC
10183        while :; do
10184          # IRIX 6.2 and later do not support large files by default,
10185          # so use the C compiler's -n32 option if that helps.
10186          cat >conftest.$ac_ext <<_ACEOF
10187 #line 10187 "configure"
10188 #include "confdefs.h"
10189 #include <sys/types.h>
10190  /* Check that off_t can represent 2**63 - 1 correctly.
10191     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10192     since some C++ compilers masquerading as C compilers
10193     incorrectly reject 9223372036854775807.  */
10194 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10195   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10196                        && LARGE_OFF_T % 2147483647 == 1)
10197                       ? 1 : -1];
10198 int
10199 main ()
10200 {
10201
10202   ;
10203   return 0;
10204 }
10205 _ACEOF
10206          rm -f conftest.$ac_objext
10207 if { (eval echo "$as_me:10207: \"$ac_compile\"") >&5
10208   (eval $ac_compile) 2>&5
10209   ac_status=$?
10210   echo "$as_me:10210: \$? = $ac_status" >&5
10211   (exit $ac_status); } &&
10212          { ac_try='test -s conftest.$ac_objext'
10213   { (eval echo "$as_me:10213: \"$ac_try\"") >&5
10214   (eval $ac_try) 2>&5
10215   ac_status=$?
10216   echo "$as_me:10216: \$? = $ac_status" >&5
10217   (exit $ac_status); }; }; then
10218   break
10219 else
10220   echo "$as_me: failed program was:" >&5
10221 cat conftest.$ac_ext >&5
10222 fi
10223 rm -f conftest.$ac_objext
10224          CC="$CC -n32"
10225          rm -f conftest.$ac_objext
10226 if { (eval echo "$as_me:10226: \"$ac_compile\"") >&5
10227   (eval $ac_compile) 2>&5
10228   ac_status=$?
10229   echo "$as_me:10229: \$? = $ac_status" >&5
10230   (exit $ac_status); } &&
10231          { ac_try='test -s conftest.$ac_objext'
10232   { (eval echo "$as_me:10232: \"$ac_try\"") >&5
10233   (eval $ac_try) 2>&5
10234   ac_status=$?
10235   echo "$as_me:10235: \$? = $ac_status" >&5
10236   (exit $ac_status); }; }; then
10237   ac_cv_sys_largefile_CC=' -n32'; break
10238 else
10239   echo "$as_me: failed program was:" >&5
10240 cat conftest.$ac_ext >&5
10241 fi
10242 rm -f conftest.$ac_objext
10243          break
10244        done
10245        CC=$ac_save_CC
10246        rm -f conftest.$ac_ext
10247     fi
10248 fi
10249 echo "$as_me:10249: result: $ac_cv_sys_largefile_CC" >&5
10250 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10251   if test "$ac_cv_sys_largefile_CC" != no; then
10252     CC=$CC$ac_cv_sys_largefile_CC
10253   fi
10254
10255   echo "$as_me:10255: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10256 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10257 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10258   echo $ECHO_N "(cached) $ECHO_C" >&6
10259 else
10260   while :; do
10261   ac_cv_sys_file_offset_bits=no
10262   cat >conftest.$ac_ext <<_ACEOF
10263 #line 10263 "configure"
10264 #include "confdefs.h"
10265 #include <sys/types.h>
10266  /* Check that off_t can represent 2**63 - 1 correctly.
10267     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10268     since some C++ compilers masquerading as C compilers
10269     incorrectly reject 9223372036854775807.  */
10270 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10271   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10272                        && LARGE_OFF_T % 2147483647 == 1)
10273                       ? 1 : -1];
10274 int
10275 main ()
10276 {
10277
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 rm -f conftest.$ac_objext
10283 if { (eval echo "$as_me:10283: \"$ac_compile\"") >&5
10284   (eval $ac_compile) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit $ac_status); } &&
10288          { ac_try='test -s conftest.$ac_objext'
10289   { (eval echo "$as_me:10289: \"$ac_try\"") >&5
10290   (eval $ac_try) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit $ac_status); }; }; then
10294   break
10295 else
10296   echo "$as_me: failed program was:" >&5
10297 cat conftest.$ac_ext >&5
10298 fi
10299 rm -f conftest.$ac_objext conftest.$ac_ext
10300   cat >conftest.$ac_ext <<_ACEOF
10301 #line 10301 "configure"
10302 #include "confdefs.h"
10303 #define _FILE_OFFSET_BITS 64
10304 #include <sys/types.h>
10305  /* Check that off_t can represent 2**63 - 1 correctly.
10306     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10307     since some C++ compilers masquerading as C compilers
10308     incorrectly reject 9223372036854775807.  */
10309 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10310   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10311                        && LARGE_OFF_T % 2147483647 == 1)
10312                       ? 1 : -1];
10313 int
10314 main ()
10315 {
10316
10317   ;
10318   return 0;
10319 }
10320 _ACEOF
10321 rm -f conftest.$ac_objext
10322 if { (eval echo "$as_me:10322: \"$ac_compile\"") >&5
10323   (eval $ac_compile) 2>&5
10324   ac_status=$?
10325   echo "$as_me:10325: \$? = $ac_status" >&5
10326   (exit $ac_status); } &&
10327          { ac_try='test -s conftest.$ac_objext'
10328   { (eval echo "$as_me:10328: \"$ac_try\"") >&5
10329   (eval $ac_try) 2>&5
10330   ac_status=$?
10331   echo "$as_me:10331: \$? = $ac_status" >&5
10332   (exit $ac_status); }; }; then
10333   ac_cv_sys_file_offset_bits=64; break
10334 else
10335   echo "$as_me: failed program was:" >&5
10336 cat conftest.$ac_ext >&5
10337 fi
10338 rm -f conftest.$ac_objext conftest.$ac_ext
10339   break
10340 done
10341 fi
10342 echo "$as_me:10342: result: $ac_cv_sys_file_offset_bits" >&5
10343 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10344 if test "$ac_cv_sys_file_offset_bits" != no; then
10345
10346 cat >>confdefs.h <<EOF
10347 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10348 EOF
10349
10350 fi
10351 rm -rf conftest*
10352   echo "$as_me:10352: checking for _LARGE_FILES value needed for large files" >&5
10353 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10354 if test "${ac_cv_sys_large_files+set}" = set; then
10355   echo $ECHO_N "(cached) $ECHO_C" >&6
10356 else
10357   while :; do
10358   ac_cv_sys_large_files=no
10359   cat >conftest.$ac_ext <<_ACEOF
10360 #line 10360 "configure"
10361 #include "confdefs.h"
10362 #include <sys/types.h>
10363  /* Check that off_t can represent 2**63 - 1 correctly.
10364     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10365     since some C++ compilers masquerading as C compilers
10366     incorrectly reject 9223372036854775807.  */
10367 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10368   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10369                        && LARGE_OFF_T % 2147483647 == 1)
10370                       ? 1 : -1];
10371 int
10372 main ()
10373 {
10374
10375   ;
10376   return 0;
10377 }
10378 _ACEOF
10379 rm -f conftest.$ac_objext
10380 if { (eval echo "$as_me:10380: \"$ac_compile\"") >&5
10381   (eval $ac_compile) 2>&5
10382   ac_status=$?
10383   echo "$as_me:10383: \$? = $ac_status" >&5
10384   (exit $ac_status); } &&
10385          { ac_try='test -s conftest.$ac_objext'
10386   { (eval echo "$as_me:10386: \"$ac_try\"") >&5
10387   (eval $ac_try) 2>&5
10388   ac_status=$?
10389   echo "$as_me:10389: \$? = $ac_status" >&5
10390   (exit $ac_status); }; }; then
10391   break
10392 else
10393   echo "$as_me: failed program was:" >&5
10394 cat conftest.$ac_ext >&5
10395 fi
10396 rm -f conftest.$ac_objext conftest.$ac_ext
10397   cat >conftest.$ac_ext <<_ACEOF
10398 #line 10398 "configure"
10399 #include "confdefs.h"
10400 #define _LARGE_FILES 1
10401 #include <sys/types.h>
10402  /* Check that off_t can represent 2**63 - 1 correctly.
10403     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10404     since some C++ compilers masquerading as C compilers
10405     incorrectly reject 9223372036854775807.  */
10406 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10407   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10408                        && LARGE_OFF_T % 2147483647 == 1)
10409                       ? 1 : -1];
10410 int
10411 main ()
10412 {
10413
10414   ;
10415   return 0;
10416 }
10417 _ACEOF
10418 rm -f conftest.$ac_objext
10419 if { (eval echo "$as_me:10419: \"$ac_compile\"") >&5
10420   (eval $ac_compile) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit $ac_status); } &&
10424          { ac_try='test -s conftest.$ac_objext'
10425   { (eval echo "$as_me:10425: \"$ac_try\"") >&5
10426   (eval $ac_try) 2>&5
10427   ac_status=$?
10428   echo "$as_me:10428: \$? = $ac_status" >&5
10429   (exit $ac_status); }; }; then
10430   ac_cv_sys_large_files=1; break
10431 else
10432   echo "$as_me: failed program was:" >&5
10433 cat conftest.$ac_ext >&5
10434 fi
10435 rm -f conftest.$ac_objext conftest.$ac_ext
10436   break
10437 done
10438 fi
10439 echo "$as_me:10439: result: $ac_cv_sys_large_files" >&5
10440 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10441 if test "$ac_cv_sys_large_files" != no; then
10442
10443 cat >>confdefs.h <<EOF
10444 #define _LARGE_FILES $ac_cv_sys_large_files
10445 EOF
10446
10447 fi
10448 rm -rf conftest*
10449 fi
10450
10451     if test "$enable_largefile" != no ; then
10452         echo "$as_me:10452: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10453 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10454 if test "${ac_cv_sys_largefile_source+set}" = set; then
10455   echo $ECHO_N "(cached) $ECHO_C" >&6
10456 else
10457   while :; do
10458   ac_cv_sys_largefile_source=no
10459   cat >conftest.$ac_ext <<_ACEOF
10460 #line 10460 "configure"
10461 #include "confdefs.h"
10462 #include <stdio.h>
10463 int
10464 main ()
10465 {
10466 return !fseeko;
10467   ;
10468   return 0;
10469 }
10470 _ACEOF
10471 rm -f conftest.$ac_objext
10472 if { (eval echo "$as_me:10472: \"$ac_compile\"") >&5
10473   (eval $ac_compile) 2>&5
10474   ac_status=$?
10475   echo "$as_me:10475: \$? = $ac_status" >&5
10476   (exit $ac_status); } &&
10477          { ac_try='test -s conftest.$ac_objext'
10478   { (eval echo "$as_me:10478: \"$ac_try\"") >&5
10479   (eval $ac_try) 2>&5
10480   ac_status=$?
10481   echo "$as_me:10481: \$? = $ac_status" >&5
10482   (exit $ac_status); }; }; then
10483   break
10484 else
10485   echo "$as_me: failed program was:" >&5
10486 cat conftest.$ac_ext >&5
10487 fi
10488 rm -f conftest.$ac_objext conftest.$ac_ext
10489   cat >conftest.$ac_ext <<_ACEOF
10490 #line 10490 "configure"
10491 #include "confdefs.h"
10492 #define _LARGEFILE_SOURCE 1
10493 #include <stdio.h>
10494 int
10495 main ()
10496 {
10497 return !fseeko;
10498   ;
10499   return 0;
10500 }
10501 _ACEOF
10502 rm -f conftest.$ac_objext
10503 if { (eval echo "$as_me:10503: \"$ac_compile\"") >&5
10504   (eval $ac_compile) 2>&5
10505   ac_status=$?
10506   echo "$as_me:10506: \$? = $ac_status" >&5
10507   (exit $ac_status); } &&
10508          { ac_try='test -s conftest.$ac_objext'
10509   { (eval echo "$as_me:10509: \"$ac_try\"") >&5
10510   (eval $ac_try) 2>&5
10511   ac_status=$?
10512   echo "$as_me:10512: \$? = $ac_status" >&5
10513   (exit $ac_status); }; }; then
10514   ac_cv_sys_largefile_source=1; break
10515 else
10516   echo "$as_me: failed program was:" >&5
10517 cat conftest.$ac_ext >&5
10518 fi
10519 rm -f conftest.$ac_objext conftest.$ac_ext
10520   break
10521 done
10522 fi
10523 echo "$as_me:10523: result: $ac_cv_sys_largefile_source" >&5
10524 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10525 if test "$ac_cv_sys_largefile_source" != no; then
10526
10527 cat >>confdefs.h <<EOF
10528 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10529 EOF
10530
10531 fi
10532 rm -rf conftest*
10533
10534 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10535 # in glibc 2.1.3, but that breaks too many other things.
10536 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10537 echo "$as_me:10537: checking for fseeko" >&5
10538 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10539 if test "${ac_cv_func_fseeko+set}" = set; then
10540   echo $ECHO_N "(cached) $ECHO_C" >&6
10541 else
10542   cat >conftest.$ac_ext <<_ACEOF
10543 #line 10543 "configure"
10544 #include "confdefs.h"
10545 #include <stdio.h>
10546 int
10547 main ()
10548 {
10549 return fseeko && fseeko (stdin, 0, 0);
10550   ;
10551   return 0;
10552 }
10553 _ACEOF
10554 rm -f conftest.$ac_objext conftest$ac_exeext
10555 if { (eval echo "$as_me:10555: \"$ac_link\"") >&5
10556   (eval $ac_link) 2>&5
10557   ac_status=$?
10558   echo "$as_me:10558: \$? = $ac_status" >&5
10559   (exit $ac_status); } &&
10560          { ac_try='test -s conftest$ac_exeext'
10561   { (eval echo "$as_me:10561: \"$ac_try\"") >&5
10562   (eval $ac_try) 2>&5
10563   ac_status=$?
10564   echo "$as_me:10564: \$? = $ac_status" >&5
10565   (exit $ac_status); }; }; then
10566   ac_cv_func_fseeko=yes
10567 else
10568   echo "$as_me: failed program was:" >&5
10569 cat conftest.$ac_ext >&5
10570 ac_cv_func_fseeko=no
10571 fi
10572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10573 fi
10574 echo "$as_me:10574: result: $ac_cv_func_fseeko" >&5
10575 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10576 if test $ac_cv_func_fseeko = yes; then
10577
10578 cat >>confdefs.h <<\EOF
10579 #define HAVE_FSEEKO 1
10580 EOF
10581
10582 fi
10583
10584         # Normally we would collect these definitions in the config.h,
10585         # but (like _XOPEN_SOURCE), some environments rely on having these
10586         # defined before any of the system headers are included.  Another
10587         # case comes up with C++, e.g., on AIX the compiler compiles the
10588         # header files by themselves before looking at the body files it is
10589         # told to compile.  For ncurses, those header files do not include
10590         # the config.h
10591         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10592         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10593         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10594
10595         echo "$as_me:10595: checking whether to use struct dirent64" >&5
10596 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10597 if test "${cf_cv_struct_dirent64+set}" = set; then
10598   echo $ECHO_N "(cached) $ECHO_C" >&6
10599 else
10600
10601                 cat >conftest.$ac_ext <<_ACEOF
10602 #line 10602 "configure"
10603 #include "confdefs.h"
10604
10605 #include <sys/types.h>
10606 #include <dirent.h>
10607
10608 int
10609 main ()
10610 {
10611
10612                 /* if transitional largefile support is setup, this is true */
10613                 extern struct dirent64 * readdir(DIR *);
10614                 struct dirent64 *x = readdir((DIR *)0);
10615                 struct dirent *y = readdir((DIR *)0);
10616                 int z = x - y;
10617
10618   ;
10619   return 0;
10620 }
10621 _ACEOF
10622 rm -f conftest.$ac_objext
10623 if { (eval echo "$as_me:10623: \"$ac_compile\"") >&5
10624   (eval $ac_compile) 2>&5
10625   ac_status=$?
10626   echo "$as_me:10626: \$? = $ac_status" >&5
10627   (exit $ac_status); } &&
10628          { ac_try='test -s conftest.$ac_objext'
10629   { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630   (eval $ac_try) 2>&5
10631   ac_status=$?
10632   echo "$as_me:10632: \$? = $ac_status" >&5
10633   (exit $ac_status); }; }; then
10634   cf_cv_struct_dirent64=yes
10635 else
10636   echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 cf_cv_struct_dirent64=no
10639 fi
10640 rm -f conftest.$ac_objext conftest.$ac_ext
10641
10642 fi
10643 echo "$as_me:10643: result: $cf_cv_struct_dirent64" >&5
10644 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10645         test "$cf_cv_struct_dirent64" = yes &&
10646 cat >>confdefs.h <<\EOF
10647 #define HAVE_STRUCT_DIRENT64 1
10648 EOF
10649
10650     fi
10651
10652 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10653 echo "$as_me:10653: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10654 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10655
10656 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10657 if test "${enable_tparm_varargs+set}" = set; then
10658   enableval="$enable_tparm_varargs"
10659   with_tparm_varargs=$enableval
10660 else
10661   with_tparm_varargs=yes
10662 fi;
10663 echo "$as_me:10663: result: $with_tparm_varargs" >&5
10664 echo "${ECHO_T}$with_tparm_varargs" >&6
10665 NCURSES_TPARM_VARARGS=0
10666 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10667
10668 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10669 if test "$with_ticlib" != no ; then
10670 echo "$as_me:10670: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10671 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10672
10673 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10674 if test "${enable_tic_depends+set}" = set; then
10675   enableval="$enable_tic_depends"
10676   with_tic_depends=$enableval
10677 else
10678   with_tic_depends=yes
10679 fi;
10680 echo "$as_me:10680: result: $with_tic_depends" >&5
10681 echo "${ECHO_T}$with_tic_depends" >&6
10682 else
10683         with_tic_depends=no
10684 fi
10685
10686 ###   use option --with-bool to override bool's type
10687 echo "$as_me:10687: checking for type of bool" >&5
10688 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10689
10690 # Check whether --with-bool or --without-bool was given.
10691 if test "${with_bool+set}" = set; then
10692   withval="$with_bool"
10693   NCURSES_BOOL="$withval"
10694 else
10695   NCURSES_BOOL=auto
10696 fi;
10697 echo "$as_me:10697: result: $NCURSES_BOOL" >&5
10698 echo "${ECHO_T}$NCURSES_BOOL" >&6
10699
10700 echo "$as_me:10700: checking for alternate terminal capabilities file" >&5
10701 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10702
10703 # Check whether --with-caps or --without-caps was given.
10704 if test "${with_caps+set}" = set; then
10705   withval="$with_caps"
10706   TERMINFO_CAPS=Caps.$withval
10707 else
10708   TERMINFO_CAPS=Caps
10709 fi;
10710 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10711 echo "$as_me:10711: result: $TERMINFO_CAPS" >&5
10712 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10713
10714 ###   use option --with-chtype to override chtype's type
10715 echo "$as_me:10715: checking for type of chtype" >&5
10716 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10717
10718 # Check whether --with-chtype or --without-chtype was given.
10719 if test "${with_chtype+set}" = set; then
10720   withval="$with_chtype"
10721   NCURSES_CHTYPE="$withval"
10722 else
10723   NCURSES_CHTYPE=auto
10724 fi;
10725 echo "$as_me:10725: result: $NCURSES_CHTYPE" >&5
10726 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10727
10728 ###   use option --with-ospeed to override ospeed's type
10729 echo "$as_me:10729: checking for type of ospeed" >&5
10730 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10731
10732 # Check whether --with-ospeed or --without-ospeed was given.
10733 if test "${with_ospeed+set}" = set; then
10734   withval="$with_ospeed"
10735   NCURSES_OSPEED="$withval"
10736 else
10737   NCURSES_OSPEED=short
10738 fi;
10739 echo "$as_me:10739: result: $NCURSES_OSPEED" >&5
10740 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10741
10742 ###   use option --with-mmask-t to override mmask_t's type
10743 echo "$as_me:10743: checking for type of mmask_t" >&5
10744 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10745
10746 # Check whether --with-mmask-t or --without-mmask-t was given.
10747 if test "${with_mmask_t+set}" = set; then
10748   withval="$with_mmask_t"
10749   NCURSES_MMASK_T="$withval"
10750 else
10751   NCURSES_MMASK_T=auto
10752 fi;
10753 echo "$as_me:10753: result: $NCURSES_MMASK_T" >&5
10754 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10755
10756 ###   use option --with-ccharw-max to override CCHARW_MAX size
10757 echo "$as_me:10757: checking for size CCHARW_MAX" >&5
10758 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10759
10760 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10761 if test "${with_ccharw_max+set}" = set; then
10762   withval="$with_ccharw_max"
10763   NCURSES_CCHARW_MAX="$withval"
10764 else
10765   NCURSES_CCHARW_MAX=5
10766 fi;
10767 echo "$as_me:10767: result: $NCURSES_CCHARW_MAX" >&5
10768 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10769
10770 ###   use option --with-tparm-arg to override tparm's argument type
10771 echo "$as_me:10771: checking for type of tparm args" >&5
10772 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10773
10774 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10775 if test "${with_tparm_arg+set}" = set; then
10776   withval="$with_tparm_arg"
10777   NCURSES_TPARM_ARG="$withval"
10778 else
10779   NCURSES_TPARM_ARG=long
10780 fi;
10781 echo "$as_me:10781: result: $NCURSES_TPARM_ARG" >&5
10782 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10783
10784 ### Enable compiling-in rcs id's
10785 echo "$as_me:10785: checking if RCS identifiers should be compiled-in" >&5
10786 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10787
10788 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10789 if test "${with_rcs_ids+set}" = set; then
10790   withval="$with_rcs_ids"
10791   with_rcs_ids=$withval
10792 else
10793   with_rcs_ids=no
10794 fi;
10795 echo "$as_me:10795: result: $with_rcs_ids" >&5
10796 echo "${ECHO_T}$with_rcs_ids" >&6
10797 test "x$with_rcs_ids" = xyes &&
10798 cat >>confdefs.h <<\EOF
10799 #define USE_RCS_IDS 1
10800 EOF
10801
10802 ###############################################################################
10803
10804 echo "$as_me:10804: checking format of man-pages" >&5
10805 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10806
10807 # Check whether --with-manpage-format or --without-manpage-format was given.
10808 if test "${with_manpage_format+set}" = set; then
10809   withval="$with_manpage_format"
10810   MANPAGE_FORMAT=$withval
10811 else
10812   MANPAGE_FORMAT=unknown
10813 fi;
10814
10815 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10816 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10817
10818 cf_unknown=
10819
10820 case $MANPAGE_FORMAT in
10821 unknown)
10822   if test -z "$MANPATH" ; then
10823     MANPATH="/usr/man:/usr/share/man"
10824   fi
10825
10826   # look for the 'date' man-page (it's most likely to be installed!)
10827   MANPAGE_FORMAT=
10828   cf_preform=no
10829   cf_catonly=yes
10830   cf_example=date
10831
10832   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10833   for cf_dir in $MANPATH; do
10834     test -z "$cf_dir" && cf_dir=/usr/man
10835     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
10836     do
10837       cf_test=`echo $cf_name | sed -e 's/*//'`
10838       if test "x$cf_test" = "x$cf_name" ; then
10839
10840         case "$cf_name" in
10841         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10842         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10843         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10844         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10845         esac
10846
10847         case "$cf_name" in
10848         $cf_dir/man*)
10849           cf_catonly=no
10850           ;;
10851         $cf_dir/cat*)
10852           cf_preform=yes
10853           ;;
10854         esac
10855         break
10856       fi
10857
10858       # if we found a match in either man* or cat*, stop looking
10859       if test -n "$MANPAGE_FORMAT" ; then
10860         cf_found=no
10861         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10862         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10863         case "$cf_name" in
10864         $cf_dir/cat*)
10865           cf_found=yes
10866           ;;
10867         esac
10868         test $cf_found=yes && break
10869       fi
10870     done
10871     # only check the first directory in $MANPATH where we find manpages
10872     if test -n "$MANPAGE_FORMAT" ; then
10873        break
10874     fi
10875   done
10876   # if we did not find the example, just assume it is normal
10877   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10878   IFS="$ac_save_ifs"
10879   ;;
10880 *)
10881   for cf_option in $MANPAGE_FORMAT; do
10882      case $cf_option in #(vi
10883      gzip|compress|BSDI|normal|formatted|catonly)
10884        ;;
10885      *)
10886        cf_unknown="$cf_unknown $cf_option"
10887        ;;
10888      esac
10889   done
10890   ;;
10891 esac
10892
10893 echo "$as_me:10893: result: $MANPAGE_FORMAT" >&5
10894 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10895 if test -n "$cf_unknown" ; then
10896   { echo "$as_me:10896: WARNING: Unexpected manpage-format $cf_unknown" >&5
10897 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10898 fi
10899
10900 echo "$as_me:10900: checking for manpage renaming" >&5
10901 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10902
10903 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10904 if test "${with_manpage_renames+set}" = set; then
10905   withval="$with_manpage_renames"
10906   MANPAGE_RENAMES=$withval
10907 else
10908   MANPAGE_RENAMES=yes
10909 fi;
10910
10911 case ".$MANPAGE_RENAMES" in #(vi
10912 .no) #(vi
10913   ;;
10914 .|.yes)
10915   # Debian 'man' program?
10916   if test -f /etc/debian_version ; then
10917     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10918   else
10919     MANPAGE_RENAMES=no
10920   fi
10921   ;;
10922 esac
10923
10924 if test "$MANPAGE_RENAMES" != no ; then
10925   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10926     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10927   elif test ! -f $MANPAGE_RENAMES ; then
10928     { { echo "$as_me:10928: error: not a filename: $MANPAGE_RENAMES" >&5
10929 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10930    { (exit 1); exit 1; }; }
10931   fi
10932
10933   test ! -d man && mkdir man
10934
10935   # Construct a sed-script to perform renaming within man-pages
10936   if test -n "$MANPAGE_RENAMES" ; then
10937     test ! -d man && mkdir man
10938     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10939   fi
10940 fi
10941
10942 echo "$as_me:10942: result: $MANPAGE_RENAMES" >&5
10943 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10944
10945 echo "$as_me:10945: checking if manpage aliases will be installed" >&5
10946 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10947
10948 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10949 if test "${with_manpage_aliases+set}" = set; then
10950   withval="$with_manpage_aliases"
10951   MANPAGE_ALIASES=$withval
10952 else
10953   MANPAGE_ALIASES=yes
10954 fi;
10955
10956 echo "$as_me:10956: result: $MANPAGE_ALIASES" >&5
10957 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10958
10959 case "x$LN_S" in #(vi
10960 xln*) #(vi
10961         cf_use_symlinks=yes
10962         ;;
10963 *)
10964         cf_use_symlinks=no
10965         ;;
10966 esac
10967
10968 MANPAGE_SYMLINKS=no
10969 if test "$MANPAGE_ALIASES" = yes ; then
10970 echo "$as_me:10970: checking if manpage symlinks should be used" >&5
10971 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10972
10973 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10974 if test "${with_manpage_symlinks+set}" = set; then
10975   withval="$with_manpage_symlinks"
10976   MANPAGE_SYMLINKS=$withval
10977 else
10978   MANPAGE_SYMLINKS=$cf_use_symlinks
10979 fi;
10980
10981 if test "$$cf_use_symlinks" = no; then
10982 if test "$MANPAGE_SYMLINKS" = yes ; then
10983         { echo "$as_me:10983: WARNING: cannot make symlinks" >&5
10984 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10985         MANPAGE_SYMLINKS=no
10986 fi
10987 fi
10988
10989 echo "$as_me:10989: result: $MANPAGE_SYMLINKS" >&5
10990 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10991 fi
10992
10993 echo "$as_me:10993: checking for manpage tbl" >&5
10994 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10995
10996 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10997 if test "${with_manpage_tbl+set}" = set; then
10998   withval="$with_manpage_tbl"
10999   MANPAGE_TBL=$withval
11000 else
11001   MANPAGE_TBL=no
11002 fi;
11003
11004 echo "$as_me:11004: result: $MANPAGE_TBL" >&5
11005 echo "${ECHO_T}$MANPAGE_TBL" >&6
11006
11007   if test "$prefix" = "NONE" ; then
11008      cf_prefix="$ac_default_prefix"
11009   else
11010      cf_prefix="$prefix"
11011   fi
11012
11013   case "$MANPAGE_FORMAT" in # (vi
11014   *catonly*) # (vi
11015     cf_format=yes
11016     cf_inboth=no
11017     ;;
11018   *formatted*) # (vi
11019     cf_format=yes
11020     cf_inboth=yes
11021     ;;
11022   *)
11023     cf_format=no
11024     cf_inboth=no
11025     ;;
11026   esac
11027
11028 test ! -d man && mkdir man
11029
11030 cf_so_strip=
11031 cf_compress=
11032 case "$MANPAGE_FORMAT" in #(vi
11033 *compress*) #(vi
11034         cf_so_strip="Z"
11035         cf_compress=compress
11036   ;;
11037 *gzip*)
11038         cf_so_strip="gz"
11039         cf_compress=gzip
11040   ;;
11041 esac
11042
11043 cf_edit_man=./edit_man.sh
11044 cf_man_alias=`pwd`/man_alias.sed
11045
11046 cat >$cf_edit_man <<CF_EOF
11047 #! /bin/sh
11048 # this script is generated by the configure-script CF_MAN_PAGES macro.
11049
11050 prefix="$cf_prefix"
11051 datarootdir="$datarootdir"
11052 datadir="$datadir"
11053
11054 NCURSES_MAJOR="$NCURSES_MAJOR"
11055 NCURSES_MINOR="$NCURSES_MINOR"
11056 NCURSES_PATCH="$NCURSES_PATCH"
11057
11058 NCURSES_OSPEED="$NCURSES_OSPEED"
11059 TERMINFO="$TERMINFO"
11060
11061 INSTALL="$INSTALL"
11062 INSTALL_DATA="$INSTALL_DATA"
11063
11064 transform="$program_transform_name"
11065
11066 TMP=\${TMPDIR:=/tmp}/man\$\$
11067 trap "rm -f \$TMP" 0 1 2 5 15
11068
11069 form=\$1
11070 shift || exit 1
11071
11072 verb=\$1
11073 shift || exit 1
11074
11075 mandir=\$1
11076 shift || exit 1
11077
11078 srcdir=\$1
11079 top_srcdir=\$srcdir/..
11080 shift || exit 1
11081
11082 if test "\$form" = normal ; then
11083         if test "$cf_format" = yes ; then
11084         if test "$cf_inboth" = no ; then
11085                 sh \$0 format \$verb \$mandir \$srcdir \$*
11086                 exit $?
11087         fi
11088         fi
11089         cf_subdir=\$mandir/man
11090         cf_tables=$MANPAGE_TBL
11091 else
11092         cf_subdir=\$mandir/cat
11093         cf_tables=yes
11094 fi
11095
11096 # process the list of source-files
11097 for i in \$* ; do
11098 case \$i in #(vi
11099 *.orig|*.rej) ;; #(vi
11100 *.[0-9]*)
11101         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11102         if test \$verb = installing ; then
11103         if test ! -d \$cf_subdir\${section} ; then
11104                 mkdir -p \$cf_subdir\$section
11105         fi
11106         fi
11107
11108         # replace variables in man page
11109         if test ! -f $cf_man_alias ; then
11110 cat >>$cf_man_alias <<-CF_EOF2
11111                 s,@DATADIR@,\$datadir,g
11112                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11113                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11114                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11115                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11116                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11117                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11118 CF_EOF
11119
11120         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11121         do
11122                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11123                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11124 cat >>$cf_edit_man <<-CF_EOF
11125                 s,@$cf_NAME@,$cf_name,g
11126 CF_EOF
11127         done
11128
11129 cat >>$cf_edit_man <<CF_EOF
11130 CF_EOF2
11131                 echo "...made $cf_man_alias"
11132         fi
11133
11134         aliases=
11135         cf_source=\`basename \$i\`
11136         inalias=\$cf_source
11137         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11138         if test ! -f \$inalias ; then
11139                 echo .. skipped \$cf_source
11140                 continue
11141         fi
11142 CF_EOF
11143
11144 if test "$MANPAGE_ALIASES" != no ; then
11145 cat >>$cf_edit_man <<CF_EOF
11146         nCurses=ignore.3x
11147         test $with_curses_h = yes && nCurses=ncurses.3x
11148         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11149 CF_EOF
11150 fi
11151
11152 if test "$MANPAGE_RENAMES" = no ; then
11153 cat >>$cf_edit_man <<CF_EOF
11154         # perform program transformations for section 1 man pages
11155         if test \$section = 1 ; then
11156                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11157         else
11158                 cf_target=\$cf_subdir\${section}/\$cf_source
11159         fi
11160 CF_EOF
11161 else
11162 cat >>$cf_edit_man <<CF_EOF
11163         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11164         if test -z "\$cf_target" ; then
11165                 echo '? missing rename for '\$cf_source
11166                 cf_target="\$cf_source"
11167         fi
11168         cf_target="\$cf_subdir\${section}/\${cf_target}"
11169
11170 CF_EOF
11171 fi
11172
11173 cat >>$cf_edit_man <<CF_EOF
11174         sed     -f $cf_man_alias \\
11175 CF_EOF
11176
11177 if test -f $MANPAGE_RENAMES ; then
11178 cat >>$cf_edit_man <<CF_EOF
11179                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11180 CF_EOF
11181 else
11182 cat >>$cf_edit_man <<CF_EOF
11183                 < \$i >\$TMP
11184 CF_EOF
11185 fi
11186
11187 cat >>$cf_edit_man <<CF_EOF
11188 if test \$cf_tables = yes ; then
11189         tbl \$TMP >\$TMP.out
11190         mv \$TMP.out \$TMP
11191 fi
11192 CF_EOF
11193
11194 if test $with_overwrite != yes ; then
11195 cat >>$cf_edit_man <<CF_EOF
11196         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11197         mv \$TMP.out \$TMP
11198 CF_EOF
11199 fi
11200
11201 if test $with_curses_h != yes ; then
11202 cat >>$cf_edit_man <<CF_EOF
11203         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11204         mv \$TMP.out \$TMP
11205 CF_EOF
11206 fi
11207
11208 cat >>$cf_edit_man <<CF_EOF
11209         if test \$form = format ; then
11210                 nroff -man \$TMP >\$TMP.out
11211                 mv \$TMP.out \$TMP
11212         fi
11213 CF_EOF
11214
11215 if test -n "$cf_compress" ; then
11216 cat >>$cf_edit_man <<CF_EOF
11217         if test \$verb = installing ; then
11218         if ( $cf_compress -f \$TMP )
11219         then
11220                 mv \$TMP.$cf_so_strip \$TMP
11221         fi
11222         fi
11223         cf_target="\$cf_target.$cf_so_strip"
11224 CF_EOF
11225 fi
11226
11227 case "$MANPAGE_FORMAT" in #(vi
11228 *BSDI*)
11229 cat >>$cf_edit_man <<CF_EOF
11230         if test \$form = format ; then
11231                 # BSDI installs only .0 suffixes in the cat directories
11232                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11233         fi
11234 CF_EOF
11235   ;;
11236 esac
11237
11238 cat >>$cf_edit_man <<CF_EOF
11239         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11240         if test \$verb = installing ; then
11241                 echo \$verb \$cf_target
11242                 \$INSTALL_DATA \$TMP \$cf_target
11243                 test -d \$cf_subdir\${section} &&
11244                 test -n "\$aliases" && (
11245                         cd \$cf_subdir\${section} && (
11246                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11247                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11248                                 cf_target=\`basename \$cf_target\`
11249                                 for cf_alias in \$aliases
11250                                 do
11251                                         if test \$section = 1 ; then
11252                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11253                                         fi
11254
11255                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11256                                                 if test -f \$cf_alias\${suffix} ; then
11257                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11258                                                         then
11259                                                                 continue
11260                                                         fi
11261                                                 fi
11262                                                 echo .. \$verb alias \$cf_alias\${suffix}
11263 CF_EOF
11264 case "x$LN_S" in #(vi
11265 *-f) #(vi
11266 cat >>$cf_edit_man <<CF_EOF
11267                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11268 CF_EOF
11269         ;;
11270 *)
11271 cat >>$cf_edit_man <<CF_EOF
11272                                                 rm -f \$cf_alias\${suffix}
11273                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11274 CF_EOF
11275         ;;
11276 esac
11277 cat >>$cf_edit_man <<CF_EOF
11278                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11279                                                 echo ".so \$cf_source" >\$TMP
11280 CF_EOF
11281 if test -n "$cf_compress" ; then
11282 cat >>$cf_edit_man <<CF_EOF
11283                                                 if test -n "$cf_so_strip" ; then
11284                                                         $cf_compress -f \$TMP
11285                                                         mv \$TMP.$cf_so_strip \$TMP
11286                                                 fi
11287 CF_EOF
11288 fi
11289 cat >>$cf_edit_man <<CF_EOF
11290                                                 echo .. \$verb alias \$cf_alias\${suffix}
11291                                                 rm -f \$cf_alias\${suffix}
11292                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11293                                         fi
11294                                 done
11295                         )
11296                 )
11297         elif test \$verb = removing ; then
11298                 test -f \$cf_target && (
11299                         echo \$verb \$cf_target
11300                         rm -f \$cf_target
11301                 )
11302                 test -d \$cf_subdir\${section} &&
11303                 test -n "\$aliases" && (
11304                         cd \$cf_subdir\${section} && (
11305                                 for cf_alias in \$aliases
11306                                 do
11307                                         if test \$section = 1 ; then
11308                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11309                                         fi
11310
11311                                         echo .. \$verb alias \$cf_alias\${suffix}
11312                                         rm -f \$cf_alias\${suffix}
11313                                 done
11314                         )
11315                 )
11316         else
11317 #               echo ".hy 0"
11318                 cat \$TMP
11319         fi
11320         ;;
11321 esac
11322 done
11323
11324 if test $cf_inboth = yes ; then
11325 if test \$form != format ; then
11326         sh \$0 format \$verb \$mandir \$srcdir \$*
11327 fi
11328 fi
11329
11330 exit 0
11331 CF_EOF
11332 chmod 755 $cf_edit_man
11333
11334 ###############################################################################
11335
11336 ### Note that some functions (such as const) are normally disabled anyway.
11337 echo "$as_me:11337: checking if you want to build with function extensions" >&5
11338 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11339
11340 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11341 if test "${enable_ext_funcs+set}" = set; then
11342   enableval="$enable_ext_funcs"
11343   with_ext_funcs=$enableval
11344 else
11345   with_ext_funcs=yes
11346 fi;
11347 echo "$as_me:11347: result: $with_ext_funcs" >&5
11348 echo "${ECHO_T}$with_ext_funcs" >&6
11349 if test "x$with_ext_funcs" = xyes ; then
11350         NCURSES_EXT_FUNCS=1
11351
11352 cat >>confdefs.h <<\EOF
11353 #define HAVE_ASSUME_DEFAULT_COLORS 1
11354 EOF
11355
11356 cat >>confdefs.h <<\EOF
11357 #define HAVE_CURSES_VERSION 1
11358 EOF
11359
11360 cat >>confdefs.h <<\EOF
11361 #define HAVE_HAS_KEY 1
11362 EOF
11363
11364 cat >>confdefs.h <<\EOF
11365 #define HAVE_RESIZETERM 1
11366 EOF
11367
11368 cat >>confdefs.h <<\EOF
11369 #define HAVE_RESIZE_TERM 1
11370 EOF
11371
11372 cat >>confdefs.h <<\EOF
11373 #define HAVE_TERM_ENTRY_H 1
11374 EOF
11375
11376 cat >>confdefs.h <<\EOF
11377 #define HAVE_USE_DEFAULT_COLORS 1
11378 EOF
11379
11380 cat >>confdefs.h <<\EOF
11381 #define HAVE_USE_SCREEN 1
11382 EOF
11383
11384 cat >>confdefs.h <<\EOF
11385 #define HAVE_USE_WINDOW 1
11386 EOF
11387
11388 cat >>confdefs.h <<\EOF
11389 #define HAVE_WRESIZE 1
11390 EOF
11391
11392 cat >>confdefs.h <<\EOF
11393 #define NCURSES_EXT_FUNCS 1
11394 EOF
11395
11396         GENERATED_EXT_FUNCS=generated
11397 else
11398         NCURSES_EXT_FUNCS=0
11399         GENERATED_EXT_FUNCS=
11400 fi
11401
11402 echo "$as_me:11402: checking if you want to build with experimental SCREEN extensions" >&5
11403 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11404
11405 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11406 if test "${enable_sp_funcs+set}" = set; then
11407   enableval="$enable_sp_funcs"
11408   with_sp_funcs=$enableval
11409 else
11410   with_sp_funcs=no
11411 fi;
11412 echo "$as_me:11412: result: $with_sp_funcs" >&5
11413 echo "${ECHO_T}$with_sp_funcs" >&6
11414 if test "x$with_sp_funcs" = xyes ; then
11415         NCURSES_SP_FUNCS=1
11416
11417 cat >>confdefs.h <<\EOF
11418 #define NCURSES_SP_FUNCS 1
11419 EOF
11420
11421         GENERATED_SP_FUNCS=generated
11422 else
11423         NCURSES_SP_FUNCS=0
11424         GENERATED_SP_FUNCS=
11425 fi
11426
11427 echo "$as_me:11427: checking if you want to build with experimental terminal-driver" >&5
11428 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11429
11430 # Check whether --enable-term-driver or --disable-term-driver was given.
11431 if test "${enable_term_driver+set}" = set; then
11432   enableval="$enable_term_driver"
11433   with_term_driver=$enableval
11434 else
11435   with_term_driver=no
11436 fi;
11437 echo "$as_me:11437: result: $with_term_driver" >&5
11438 echo "${ECHO_T}$with_term_driver" >&6
11439 if test "x$with_term_driver" = xyes ; then
11440
11441 cat >>confdefs.h <<\EOF
11442 #define USE_TERM_DRIVER 1
11443 EOF
11444
11445         if test "x$with_sp_funcs" != xyes ; then
11446                 { { echo "$as_me:11446: error: The term-driver option relies upon sp-funcs" >&5
11447 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11448    { (exit 1); exit 1; }; }
11449         fi
11450 fi
11451
11452 ###   use option --enable-const to turn on use of const beyond that in XSI.
11453 echo "$as_me:11453: checking for extended use of const keyword" >&5
11454 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11455
11456 # Check whether --enable-const or --disable-const was given.
11457 if test "${enable_const+set}" = set; then
11458   enableval="$enable_const"
11459   with_ext_const=$enableval
11460 else
11461   with_ext_const=no
11462 fi;
11463 echo "$as_me:11463: result: $with_ext_const" >&5
11464 echo "${ECHO_T}$with_ext_const" >&6
11465 NCURSES_CONST='/*nothing*/'
11466 if test "x$with_ext_const" = xyes ; then
11467         NCURSES_CONST=const
11468 fi
11469
11470 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11471 echo "$as_me:11471: checking if you want to use extended colors" >&5
11472 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11473
11474 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11475 if test "${enable_ext_colors+set}" = set; then
11476   enableval="$enable_ext_colors"
11477   with_ext_colors=$enableval
11478 else
11479   with_ext_colors=no
11480 fi;
11481 echo "$as_me:11481: result: $with_ext_colors" >&5
11482 echo "${ECHO_T}$with_ext_colors" >&6
11483 NCURSES_EXT_COLORS=0
11484 if test "x$with_ext_colors" = xyes ; then
11485         if test "x$with_widec" != xyes ; then
11486                 { { echo "$as_me:11486: error: This option applies only to wide-character library" >&5
11487 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11488    { (exit 1); exit 1; }; }
11489         else
11490                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11491
11492 if test "${with_abi_version+set}" != set; then
11493         case $cf_cv_rel_version in
11494         5.*)
11495                 cf_cv_rel_version=6.0
11496                 cf_cv_abi_version=6
11497                 { echo "$as_me:11497: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11498 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11499                 ;;
11500         esac
11501 fi
11502
11503         fi
11504         NCURSES_EXT_COLORS=1
11505
11506 cat >>confdefs.h <<\EOF
11507 #define NCURSES_EXT_COLORS 1
11508 EOF
11509
11510 fi
11511
11512 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11513 echo "$as_me:11513: checking if you want to use extended mouse encoding" >&5
11514 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11515
11516 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11517 if test "${enable_ext_mouse+set}" = set; then
11518   enableval="$enable_ext_mouse"
11519   with_ext_mouse=$enableval
11520 else
11521   with_ext_mouse=no
11522 fi;
11523 echo "$as_me:11523: result: $with_ext_mouse" >&5
11524 echo "${ECHO_T}$with_ext_mouse" >&6
11525 NCURSES_MOUSE_VERSION=1
11526 if test "x$with_ext_mouse" = xyes ; then
11527         NCURSES_MOUSE_VERSION=2
11528
11529 if test "${with_abi_version+set}" != set; then
11530         case $cf_cv_rel_version in
11531         5.*)
11532                 cf_cv_rel_version=6.0
11533                 cf_cv_abi_version=6
11534                 { echo "$as_me:11534: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11535 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11536                 ;;
11537         esac
11538 fi
11539
11540 fi
11541
11542 echo "$as_me:11542: checking if you want \$NCURSES_NO_PADDING code" >&5
11543 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11544
11545 # Check whether --enable-no-padding or --disable-no-padding was given.
11546 if test "${enable_no_padding+set}" = set; then
11547   enableval="$enable_no_padding"
11548   with_no_padding=$enableval
11549 else
11550   with_no_padding=$with_ext_funcs
11551 fi;
11552 echo "$as_me:11552: result: $with_no_padding" >&5
11553 echo "${ECHO_T}$with_no_padding" >&6
11554 test "x$with_no_padding" = xyes &&
11555 cat >>confdefs.h <<\EOF
11556 #define NCURSES_NO_PADDING 1
11557 EOF
11558
11559 echo "$as_me:11559: checking for ANSI C header files" >&5
11560 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11561 if test "${ac_cv_header_stdc+set}" = set; then
11562   echo $ECHO_N "(cached) $ECHO_C" >&6
11563 else
11564   cat >conftest.$ac_ext <<_ACEOF
11565 #line 11565 "configure"
11566 #include "confdefs.h"
11567 #include <stdlib.h>
11568 #include <stdarg.h>
11569 #include <string.h>
11570 #include <float.h>
11571
11572 _ACEOF
11573 if { (eval echo "$as_me:11573: \"$ac_cpp conftest.$ac_ext\"") >&5
11574   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11575   ac_status=$?
11576   egrep -v '^ *\+' conftest.er1 >conftest.err
11577   rm -f conftest.er1
11578   cat conftest.err >&5
11579   echo "$as_me:11579: \$? = $ac_status" >&5
11580   (exit $ac_status); } >/dev/null; then
11581   if test -s conftest.err; then
11582     ac_cpp_err=$ac_c_preproc_warn_flag
11583   else
11584     ac_cpp_err=
11585   fi
11586 else
11587   ac_cpp_err=yes
11588 fi
11589 if test -z "$ac_cpp_err"; then
11590   ac_cv_header_stdc=yes
11591 else
11592   echo "$as_me: failed program was:" >&5
11593   cat conftest.$ac_ext >&5
11594   ac_cv_header_stdc=no
11595 fi
11596 rm -f conftest.err conftest.$ac_ext
11597
11598 if test $ac_cv_header_stdc = yes; then
11599   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11600   cat >conftest.$ac_ext <<_ACEOF
11601 #line 11601 "configure"
11602 #include "confdefs.h"
11603 #include <string.h>
11604
11605 _ACEOF
11606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11607   egrep "memchr" >/dev/null 2>&1; then
11608   :
11609 else
11610   ac_cv_header_stdc=no
11611 fi
11612 rm -rf conftest*
11613
11614 fi
11615
11616 if test $ac_cv_header_stdc = yes; then
11617   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11618   cat >conftest.$ac_ext <<_ACEOF
11619 #line 11619 "configure"
11620 #include "confdefs.h"
11621 #include <stdlib.h>
11622
11623 _ACEOF
11624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11625   egrep "free" >/dev/null 2>&1; then
11626   :
11627 else
11628   ac_cv_header_stdc=no
11629 fi
11630 rm -rf conftest*
11631
11632 fi
11633
11634 if test $ac_cv_header_stdc = yes; then
11635   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11636   if test "$cross_compiling" = yes; then
11637   :
11638 else
11639   cat >conftest.$ac_ext <<_ACEOF
11640 #line 11640 "configure"
11641 #include "confdefs.h"
11642 #include <ctype.h>
11643 #if ((' ' & 0x0FF) == 0x020)
11644 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11645 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11646 #else
11647 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11648                      || ('j' <= (c) && (c) <= 'r') \
11649                      || ('s' <= (c) && (c) <= 'z'))
11650 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11651 #endif
11652
11653 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11654 int
11655 main ()
11656 {
11657   int i;
11658   for (i = 0; i < 256; i++)
11659     if (XOR (islower (i), ISLOWER (i))
11660         || toupper (i) != TOUPPER (i))
11661       $ac_main_return(2);
11662   $ac_main_return (0);
11663 }
11664 _ACEOF
11665 rm -f conftest$ac_exeext
11666 if { (eval echo "$as_me:11666: \"$ac_link\"") >&5
11667   (eval $ac_link) 2>&5
11668   ac_status=$?
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11671   { (eval echo "$as_me:11671: \"$ac_try\"") >&5
11672   (eval $ac_try) 2>&5
11673   ac_status=$?
11674   echo "$as_me:11674: \$? = $ac_status" >&5
11675   (exit $ac_status); }; }; then
11676   :
11677 else
11678   echo "$as_me: program exited with status $ac_status" >&5
11679 echo "$as_me: failed program was:" >&5
11680 cat conftest.$ac_ext >&5
11681 ac_cv_header_stdc=no
11682 fi
11683 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11684 fi
11685 fi
11686 fi
11687 echo "$as_me:11687: result: $ac_cv_header_stdc" >&5
11688 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11689 if test $ac_cv_header_stdc = yes; then
11690
11691 cat >>confdefs.h <<\EOF
11692 #define STDC_HEADERS 1
11693 EOF
11694
11695 fi
11696
11697 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11698
11699 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11700                   inttypes.h stdint.h unistd.h
11701 do
11702 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11703 echo "$as_me:11703: checking for $ac_header" >&5
11704 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11705 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11706   echo $ECHO_N "(cached) $ECHO_C" >&6
11707 else
11708   cat >conftest.$ac_ext <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711 $ac_includes_default
11712 #include <$ac_header>
11713 _ACEOF
11714 rm -f conftest.$ac_objext
11715 if { (eval echo "$as_me:11715: \"$ac_compile\"") >&5
11716   (eval $ac_compile) 2>&5
11717   ac_status=$?
11718   echo "$as_me:11718: \$? = $ac_status" >&5
11719   (exit $ac_status); } &&
11720          { ac_try='test -s conftest.$ac_objext'
11721   { (eval echo "$as_me:11721: \"$ac_try\"") >&5
11722   (eval $ac_try) 2>&5
11723   ac_status=$?
11724   echo "$as_me:11724: \$? = $ac_status" >&5
11725   (exit $ac_status); }; }; then
11726   eval "$as_ac_Header=yes"
11727 else
11728   echo "$as_me: failed program was:" >&5
11729 cat conftest.$ac_ext >&5
11730 eval "$as_ac_Header=no"
11731 fi
11732 rm -f conftest.$ac_objext conftest.$ac_ext
11733 fi
11734 echo "$as_me:11734: result: `eval echo '${'$as_ac_Header'}'`" >&5
11735 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11736 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11737   cat >>confdefs.h <<EOF
11738 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11739 EOF
11740
11741 fi
11742 done
11743
11744 echo "$as_me:11744: checking for signed char" >&5
11745 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11746 if test "${ac_cv_type_signed_char+set}" = set; then
11747   echo $ECHO_N "(cached) $ECHO_C" >&6
11748 else
11749   cat >conftest.$ac_ext <<_ACEOF
11750 #line 11750 "configure"
11751 #include "confdefs.h"
11752 $ac_includes_default
11753 int
11754 main ()
11755 {
11756 if ((signed char *) 0)
11757   return 0;
11758 if (sizeof (signed char))
11759   return 0;
11760   ;
11761   return 0;
11762 }
11763 _ACEOF
11764 rm -f conftest.$ac_objext
11765 if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5
11766   (eval $ac_compile) 2>&5
11767   ac_status=$?
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit $ac_status); } &&
11770          { ac_try='test -s conftest.$ac_objext'
11771   { (eval echo "$as_me:11771: \"$ac_try\"") >&5
11772   (eval $ac_try) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit $ac_status); }; }; then
11776   ac_cv_type_signed_char=yes
11777 else
11778   echo "$as_me: failed program was:" >&5
11779 cat conftest.$ac_ext >&5
11780 ac_cv_type_signed_char=no
11781 fi
11782 rm -f conftest.$ac_objext conftest.$ac_ext
11783 fi
11784 echo "$as_me:11784: result: $ac_cv_type_signed_char" >&5
11785 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11786
11787 echo "$as_me:11787: checking size of signed char" >&5
11788 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11789 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11790   echo $ECHO_N "(cached) $ECHO_C" >&6
11791 else
11792   if test "$ac_cv_type_signed_char" = yes; then
11793   if test "$cross_compiling" = yes; then
11794   # Depending upon the size, compute the lo and hi bounds.
11795 cat >conftest.$ac_ext <<_ACEOF
11796 #line 11796 "configure"
11797 #include "confdefs.h"
11798 $ac_includes_default
11799 int
11800 main ()
11801 {
11802 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11803   ;
11804   return 0;
11805 }
11806 _ACEOF
11807 rm -f conftest.$ac_objext
11808 if { (eval echo "$as_me:11808: \"$ac_compile\"") >&5
11809   (eval $ac_compile) 2>&5
11810   ac_status=$?
11811   echo "$as_me:11811: \$? = $ac_status" >&5
11812   (exit $ac_status); } &&
11813          { ac_try='test -s conftest.$ac_objext'
11814   { (eval echo "$as_me:11814: \"$ac_try\"") >&5
11815   (eval $ac_try) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit $ac_status); }; }; then
11819   ac_lo=0 ac_mid=0
11820   while :; do
11821     cat >conftest.$ac_ext <<_ACEOF
11822 #line 11822 "configure"
11823 #include "confdefs.h"
11824 $ac_includes_default
11825 int
11826 main ()
11827 {
11828 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11829   ;
11830   return 0;
11831 }
11832 _ACEOF
11833 rm -f conftest.$ac_objext
11834 if { (eval echo "$as_me:11834: \"$ac_compile\"") >&5
11835   (eval $ac_compile) 2>&5
11836   ac_status=$?
11837   echo "$as_me:11837: \$? = $ac_status" >&5
11838   (exit $ac_status); } &&
11839          { ac_try='test -s conftest.$ac_objext'
11840   { (eval echo "$as_me:11840: \"$ac_try\"") >&5
11841   (eval $ac_try) 2>&5
11842   ac_status=$?
11843   echo "$as_me:11843: \$? = $ac_status" >&5
11844   (exit $ac_status); }; }; then
11845   ac_hi=$ac_mid; break
11846 else
11847   echo "$as_me: failed program was:" >&5
11848 cat conftest.$ac_ext >&5
11849 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11850 fi
11851 rm -f conftest.$ac_objext conftest.$ac_ext
11852   done
11853 else
11854   echo "$as_me: failed program was:" >&5
11855 cat conftest.$ac_ext >&5
11856 ac_hi=-1 ac_mid=-1
11857   while :; do
11858     cat >conftest.$ac_ext <<_ACEOF
11859 #line 11859 "configure"
11860 #include "confdefs.h"
11861 $ac_includes_default
11862 int
11863 main ()
11864 {
11865 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11866   ;
11867   return 0;
11868 }
11869 _ACEOF
11870 rm -f conftest.$ac_objext
11871 if { (eval echo "$as_me:11871: \"$ac_compile\"") >&5
11872   (eval $ac_compile) 2>&5
11873   ac_status=$?
11874   echo "$as_me:11874: \$? = $ac_status" >&5
11875   (exit $ac_status); } &&
11876          { ac_try='test -s conftest.$ac_objext'
11877   { (eval echo "$as_me:11877: \"$ac_try\"") >&5
11878   (eval $ac_try) 2>&5
11879   ac_status=$?
11880   echo "$as_me:11880: \$? = $ac_status" >&5
11881   (exit $ac_status); }; }; then
11882   ac_lo=$ac_mid; break
11883 else
11884   echo "$as_me: failed program was:" >&5
11885 cat conftest.$ac_ext >&5
11886 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11887 fi
11888 rm -f conftest.$ac_objext conftest.$ac_ext
11889   done
11890 fi
11891 rm -f conftest.$ac_objext conftest.$ac_ext
11892 # Binary search between lo and hi bounds.
11893 while test "x$ac_lo" != "x$ac_hi"; do
11894   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11895   cat >conftest.$ac_ext <<_ACEOF
11896 #line 11896 "configure"
11897 #include "confdefs.h"
11898 $ac_includes_default
11899 int
11900 main ()
11901 {
11902 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11903   ;
11904   return 0;
11905 }
11906 _ACEOF
11907 rm -f conftest.$ac_objext
11908 if { (eval echo "$as_me:11908: \"$ac_compile\"") >&5
11909   (eval $ac_compile) 2>&5
11910   ac_status=$?
11911   echo "$as_me:11911: \$? = $ac_status" >&5
11912   (exit $ac_status); } &&
11913          { ac_try='test -s conftest.$ac_objext'
11914   { (eval echo "$as_me:11914: \"$ac_try\"") >&5
11915   (eval $ac_try) 2>&5
11916   ac_status=$?
11917   echo "$as_me:11917: \$? = $ac_status" >&5
11918   (exit $ac_status); }; }; then
11919   ac_hi=$ac_mid
11920 else
11921   echo "$as_me: failed program was:" >&5
11922 cat conftest.$ac_ext >&5
11923 ac_lo=`expr $ac_mid + 1`
11924 fi
11925 rm -f conftest.$ac_objext conftest.$ac_ext
11926 done
11927 ac_cv_sizeof_signed_char=$ac_lo
11928 else
11929   if test "$cross_compiling" = yes; then
11930   { { echo "$as_me:11930: error: cannot run test program while cross compiling" >&5
11931 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11932    { (exit 1); exit 1; }; }
11933 else
11934   cat >conftest.$ac_ext <<_ACEOF
11935 #line 11935 "configure"
11936 #include "confdefs.h"
11937 $ac_includes_default
11938 int
11939 main ()
11940 {
11941 FILE *f = fopen ("conftest.val", "w");
11942 if (!f)
11943   $ac_main_return (1);
11944 fprintf (f, "%d", (sizeof (signed char)));
11945 fclose (f);
11946   ;
11947   return 0;
11948 }
11949 _ACEOF
11950 rm -f conftest$ac_exeext
11951 if { (eval echo "$as_me:11951: \"$ac_link\"") >&5
11952   (eval $ac_link) 2>&5
11953   ac_status=$?
11954   echo "$as_me:11954: \$? = $ac_status" >&5
11955   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11956   { (eval echo "$as_me:11956: \"$ac_try\"") >&5
11957   (eval $ac_try) 2>&5
11958   ac_status=$?
11959   echo "$as_me:11959: \$? = $ac_status" >&5
11960   (exit $ac_status); }; }; then
11961   ac_cv_sizeof_signed_char=`cat conftest.val`
11962 else
11963   echo "$as_me: program exited with status $ac_status" >&5
11964 echo "$as_me: failed program was:" >&5
11965 cat conftest.$ac_ext >&5
11966 fi
11967 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11968 fi
11969 fi
11970 rm -f conftest.val
11971 else
11972   ac_cv_sizeof_signed_char=0
11973 fi
11974 fi
11975 echo "$as_me:11975: result: $ac_cv_sizeof_signed_char" >&5
11976 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11977 cat >>confdefs.h <<EOF
11978 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11979 EOF
11980
11981 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11982         NCURSES_SBOOL="signed char"
11983 else
11984         NCURSES_SBOOL="char"
11985 fi
11986 echo "$as_me:11986: checking if you want to use signed Boolean array in term.h" >&5
11987 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11988
11989 # Check whether --enable-signed-char or --disable-signed-char was given.
11990 if test "${enable_signed_char+set}" = set; then
11991   enableval="$enable_signed_char"
11992   with_signed_char=$enableval
11993 else
11994   with_signed_char=no
11995 fi;
11996 echo "$as_me:11996: result: $with_signed_char" >&5
11997 echo "${ECHO_T}$with_signed_char" >&6
11998 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11999
12000 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12001 echo "$as_me:12001: checking if you want SIGWINCH handler" >&5
12002 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12003
12004 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12005 if test "${enable_sigwinch+set}" = set; then
12006   enableval="$enable_sigwinch"
12007   with_sigwinch=$enableval
12008 else
12009   with_sigwinch=$with_ext_funcs
12010 fi;
12011 echo "$as_me:12011: result: $with_sigwinch" >&5
12012 echo "${ECHO_T}$with_sigwinch" >&6
12013 test "x$with_sigwinch" = xyes &&
12014 cat >>confdefs.h <<\EOF
12015 #define USE_SIGWINCH 1
12016 EOF
12017
12018 ###   use option --enable-tcap-names to allow user to define new capabilities
12019 echo "$as_me:12019: checking if you want user-definable terminal capabilities like termcap" >&5
12020 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12021
12022 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12023 if test "${enable_tcap_names+set}" = set; then
12024   enableval="$enable_tcap_names"
12025   with_tcap_names=$enableval
12026 else
12027   with_tcap_names=$with_ext_funcs
12028 fi;
12029 echo "$as_me:12029: result: $with_tcap_names" >&5
12030 echo "${ECHO_T}$with_tcap_names" >&6
12031 NCURSES_XNAMES=0
12032 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12033
12034 ###############################################################################
12035 # These options are relatively safe to experiment with.
12036
12037 echo "$as_me:12037: checking if you want all development code" >&5
12038 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12039
12040 # Check whether --with-develop or --without-develop was given.
12041 if test "${with_develop+set}" = set; then
12042   withval="$with_develop"
12043   with_develop=$withval
12044 else
12045   with_develop=no
12046 fi;
12047 echo "$as_me:12047: result: $with_develop" >&5
12048 echo "${ECHO_T}$with_develop" >&6
12049
12050 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12051 echo "$as_me:12051: checking if you want hard-tabs code" >&5
12052 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12053
12054 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12055 if test "${enable_hard_tabs+set}" = set; then
12056   enableval="$enable_hard_tabs"
12057
12058 else
12059   enable_hard_tabs=$with_develop
12060 fi;
12061 echo "$as_me:12061: result: $enable_hard_tabs" >&5
12062 echo "${ECHO_T}$enable_hard_tabs" >&6
12063 test "x$enable_hard_tabs" = xyes &&
12064 cat >>confdefs.h <<\EOF
12065 #define USE_HARD_TABS 1
12066 EOF
12067
12068 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12069 echo "$as_me:12069: checking if you want limited support for xmc" >&5
12070 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12071
12072 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12073 if test "${enable_xmc_glitch+set}" = set; then
12074   enableval="$enable_xmc_glitch"
12075
12076 else
12077   enable_xmc_glitch=$with_develop
12078 fi;
12079 echo "$as_me:12079: result: $enable_xmc_glitch" >&5
12080 echo "${ECHO_T}$enable_xmc_glitch" >&6
12081 test "x$enable_xmc_glitch" = xyes &&
12082 cat >>confdefs.h <<\EOF
12083 #define USE_XMC_SUPPORT 1
12084 EOF
12085
12086 ###############################################################################
12087 # These are just experimental, probably should not be in a package:
12088
12089 echo "$as_me:12089: checking if you do not want to assume colors are white-on-black" >&5
12090 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12091
12092 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12093 if test "${enable_assumed_color+set}" = set; then
12094   enableval="$enable_assumed_color"
12095   with_assumed_color=$enableval
12096 else
12097   with_assumed_color=yes
12098 fi;
12099 echo "$as_me:12099: result: $with_assumed_color" >&5
12100 echo "${ECHO_T}$with_assumed_color" >&6
12101 test "x$with_assumed_color" = xyes &&
12102 cat >>confdefs.h <<\EOF
12103 #define USE_ASSUMED_COLOR 1
12104 EOF
12105
12106 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12107 echo "$as_me:12107: checking if you want hashmap scrolling-optimization code" >&5
12108 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12109
12110 # Check whether --enable-hashmap or --disable-hashmap was given.
12111 if test "${enable_hashmap+set}" = set; then
12112   enableval="$enable_hashmap"
12113   with_hashmap=$enableval
12114 else
12115   with_hashmap=yes
12116 fi;
12117 echo "$as_me:12117: result: $with_hashmap" >&5
12118 echo "${ECHO_T}$with_hashmap" >&6
12119 test "x$with_hashmap" = xyes &&
12120 cat >>confdefs.h <<\EOF
12121 #define USE_HASHMAP 1
12122 EOF
12123
12124 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12125 echo "$as_me:12125: checking if you want colorfgbg code" >&5
12126 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12127
12128 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12129 if test "${enable_colorfgbg+set}" = set; then
12130   enableval="$enable_colorfgbg"
12131   with_colorfgbg=$enableval
12132 else
12133   with_colorfgbg=no
12134 fi;
12135 echo "$as_me:12135: result: $with_colorfgbg" >&5
12136 echo "${ECHO_T}$with_colorfgbg" >&6
12137 test "x$with_colorfgbg" = xyes &&
12138 cat >>confdefs.h <<\EOF
12139 #define USE_COLORFGBG 1
12140 EOF
12141
12142 ###   use option --enable-interop to turn on use of bindings used for interop
12143 echo "$as_me:12143: checking if you want interop bindings" >&5
12144 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12145
12146 # Check whether --enable-interop or --disable-interop was given.
12147 if test "${enable_interop+set}" = set; then
12148   enableval="$enable_interop"
12149   with_exp_interop=$enableval
12150 else
12151   with_exp_interop=no
12152 fi;
12153 echo "$as_me:12153: result: $with_exp_interop" >&5
12154 echo "${ECHO_T}$with_exp_interop" >&6
12155
12156 NCURSES_INTEROP_FUNCS=0
12157 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12158
12159 # This is still experimental (20080329), but should ultimately be moved to
12160 # the script-block --with-normal, etc.
12161
12162 echo "$as_me:12162: checking if you want to link with the pthread library" >&5
12163 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12164
12165 # Check whether --with-pthread or --without-pthread was given.
12166 if test "${with_pthread+set}" = set; then
12167   withval="$with_pthread"
12168   with_pthread=$withval
12169 else
12170   with_pthread=no
12171 fi;
12172 echo "$as_me:12172: result: $with_pthread" >&5
12173 echo "${ECHO_T}$with_pthread" >&6
12174
12175 if test "$with_pthread" != no ; then
12176     echo "$as_me:12176: checking for pthread.h" >&5
12177 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12178 if test "${ac_cv_header_pthread_h+set}" = set; then
12179   echo $ECHO_N "(cached) $ECHO_C" >&6
12180 else
12181   cat >conftest.$ac_ext <<_ACEOF
12182 #line 12182 "configure"
12183 #include "confdefs.h"
12184 #include <pthread.h>
12185 _ACEOF
12186 if { (eval echo "$as_me:12186: \"$ac_cpp conftest.$ac_ext\"") >&5
12187   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12188   ac_status=$?
12189   egrep -v '^ *\+' conftest.er1 >conftest.err
12190   rm -f conftest.er1
12191   cat conftest.err >&5
12192   echo "$as_me:12192: \$? = $ac_status" >&5
12193   (exit $ac_status); } >/dev/null; then
12194   if test -s conftest.err; then
12195     ac_cpp_err=$ac_c_preproc_warn_flag
12196   else
12197     ac_cpp_err=
12198   fi
12199 else
12200   ac_cpp_err=yes
12201 fi
12202 if test -z "$ac_cpp_err"; then
12203   ac_cv_header_pthread_h=yes
12204 else
12205   echo "$as_me: failed program was:" >&5
12206   cat conftest.$ac_ext >&5
12207   ac_cv_header_pthread_h=no
12208 fi
12209 rm -f conftest.err conftest.$ac_ext
12210 fi
12211 echo "$as_me:12211: result: $ac_cv_header_pthread_h" >&5
12212 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12213 if test $ac_cv_header_pthread_h = yes; then
12214
12215 cat >>confdefs.h <<\EOF
12216 #define HAVE_PTHREADS_H 1
12217 EOF
12218
12219         for cf_lib_pthread in pthread c_r
12220         do
12221             echo "$as_me:12221: checking if we can link with the $cf_lib_pthread library" >&5
12222 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12223             cf_save_LIBS="$LIBS"
12224
12225 cf_add_libs="-l$cf_lib_pthread"
12226 # Filter out duplicates - this happens with badly-designed ".pc" files...
12227 for cf_add_1lib in $LIBS
12228 do
12229         for cf_add_2lib in $cf_add_libs
12230         do
12231                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12232                 then
12233                         cf_add_1lib=
12234                         break
12235                 fi
12236         done
12237         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12238 done
12239 LIBS="$cf_add_libs"
12240
12241             cat >conftest.$ac_ext <<_ACEOF
12242 #line 12242 "configure"
12243 #include "confdefs.h"
12244
12245 #include <pthread.h>
12246
12247 int
12248 main ()
12249 {
12250
12251                 int rc = pthread_create(0,0,0,0);
12252                 int r2 = pthread_mutexattr_settype(0, 0);
12253
12254   ;
12255   return 0;
12256 }
12257 _ACEOF
12258 rm -f conftest.$ac_objext conftest$ac_exeext
12259 if { (eval echo "$as_me:12259: \"$ac_link\"") >&5
12260   (eval $ac_link) 2>&5
12261   ac_status=$?
12262   echo "$as_me:12262: \$? = $ac_status" >&5
12263   (exit $ac_status); } &&
12264          { ac_try='test -s conftest$ac_exeext'
12265   { (eval echo "$as_me:12265: \"$ac_try\"") >&5
12266   (eval $ac_try) 2>&5
12267   ac_status=$?
12268   echo "$as_me:12268: \$? = $ac_status" >&5
12269   (exit $ac_status); }; }; then
12270   with_pthread=yes
12271 else
12272   echo "$as_me: failed program was:" >&5
12273 cat conftest.$ac_ext >&5
12274 with_pthread=no
12275 fi
12276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12277             LIBS="$cf_save_LIBS"
12278             echo "$as_me:12278: result: $with_pthread" >&5
12279 echo "${ECHO_T}$with_pthread" >&6
12280             test "$with_pthread" = yes && break
12281         done
12282
12283         if test "$with_pthread" = yes ; then
12284
12285 cf_add_libs="-l$cf_lib_pthread"
12286 # Filter out duplicates - this happens with badly-designed ".pc" files...
12287 for cf_add_1lib in $LIBS
12288 do
12289         for cf_add_2lib in $cf_add_libs
12290         do
12291                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12292                 then
12293                         cf_add_1lib=
12294                         break
12295                 fi
12296         done
12297         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12298 done
12299 LIBS="$cf_add_libs"
12300
12301 cat >>confdefs.h <<\EOF
12302 #define HAVE_LIBPTHREADS 1
12303 EOF
12304
12305         else
12306             { { echo "$as_me:12306: error: Cannot link with pthread library" >&5
12307 echo "$as_me: error: Cannot link with pthread library" >&2;}
12308    { (exit 1); exit 1; }; }
12309         fi
12310
12311 fi
12312
12313 fi
12314
12315 if test "x$with_pthread" != xno; then
12316         echo "$as_me:12316: checking for pthread_kill" >&5
12317 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12318 if test "${ac_cv_func_pthread_kill+set}" = set; then
12319   echo $ECHO_N "(cached) $ECHO_C" >&6
12320 else
12321   cat >conftest.$ac_ext <<_ACEOF
12322 #line 12322 "configure"
12323 #include "confdefs.h"
12324 /* System header to define __stub macros and hopefully few prototypes,
12325     which can conflict with char pthread_kill (); below.  */
12326 #include <assert.h>
12327 /* Override any gcc2 internal prototype to avoid an error.  */
12328 #ifdef __cplusplus
12329 extern "C"
12330 #endif
12331 /* We use char because int might match the return type of a gcc2
12332    builtin and then its argument prototype would still apply.  */
12333 char pthread_kill ();
12334 char (*f) ();
12335
12336 int
12337 main ()
12338 {
12339 /* The GNU C library defines this for functions which it implements
12340     to always fail with ENOSYS.  Some functions are actually named
12341     something starting with __ and the normal name is an alias.  */
12342 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12343 choke me
12344 #else
12345 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12346 #endif
12347
12348   ;
12349   return 0;
12350 }
12351 _ACEOF
12352 rm -f conftest.$ac_objext conftest$ac_exeext
12353 if { (eval echo "$as_me:12353: \"$ac_link\"") >&5
12354   (eval $ac_link) 2>&5
12355   ac_status=$?
12356   echo "$as_me:12356: \$? = $ac_status" >&5
12357   (exit $ac_status); } &&
12358          { ac_try='test -s conftest$ac_exeext'
12359   { (eval echo "$as_me:12359: \"$ac_try\"") >&5
12360   (eval $ac_try) 2>&5
12361   ac_status=$?
12362   echo "$as_me:12362: \$? = $ac_status" >&5
12363   (exit $ac_status); }; }; then
12364   ac_cv_func_pthread_kill=yes
12365 else
12366   echo "$as_me: failed program was:" >&5
12367 cat conftest.$ac_ext >&5
12368 ac_cv_func_pthread_kill=no
12369 fi
12370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12371 fi
12372 echo "$as_me:12372: result: $ac_cv_func_pthread_kill" >&5
12373 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12374 if test $ac_cv_func_pthread_kill = yes; then
12375
12376                 echo "$as_me:12376: checking if you want to allow EINTR in wgetch with pthreads" >&5
12377 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12378
12379 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12380 if test "${enable_pthreads_eintr+set}" = set; then
12381   enableval="$enable_pthreads_eintr"
12382   use_pthreads_eintr=$enableval
12383 else
12384   use_pthreads_eintr=no
12385 fi;
12386                 echo "$as_me:12386: result: $use_pthreads_eintr" >&5
12387 echo "${ECHO_T}$use_pthreads_eintr" >&6
12388                 if test "x$use_pthreads_eintr" = xyes ; then
12389
12390 cat >>confdefs.h <<\EOF
12391 #define USE_PTHREADS_EINTR 1
12392 EOF
12393
12394                 fi
12395 fi
12396
12397         echo "$as_me:12397: checking if you want to use weak-symbols for pthreads" >&5
12398 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12399
12400 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12401 if test "${enable_weak_symbols+set}" = set; then
12402   enableval="$enable_weak_symbols"
12403   use_weak_symbols=$enableval
12404 else
12405   use_weak_symbols=no
12406 fi;
12407         echo "$as_me:12407: result: $use_weak_symbols" >&5
12408 echo "${ECHO_T}$use_weak_symbols" >&6
12409         if test "x$use_weak_symbols" = xyes ; then
12410
12411 echo "$as_me:12411: checking if $CC supports weak symbols" >&5
12412 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12413 if test "${cf_cv_weak_symbols+set}" = set; then
12414   echo $ECHO_N "(cached) $ECHO_C" >&6
12415 else
12416
12417 cat >conftest.$ac_ext <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420
12421 #include <stdio.h>
12422 int
12423 main ()
12424 {
12425
12426 #if defined(__GNUC__)
12427 #  if defined __USE_ISOC99
12428 #    define _cat_pragma(exp)    _Pragma(#exp)
12429 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12430 #  else
12431 #    define _weak_pragma(exp)
12432 #  endif
12433 #  define _declare(name)        __extension__ extern __typeof__(name) name
12434 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12435 #endif
12436
12437 weak_symbol(fopen);
12438
12439   ;
12440   return 0;
12441 }
12442 _ACEOF
12443 rm -f conftest.$ac_objext
12444 if { (eval echo "$as_me:12444: \"$ac_compile\"") >&5
12445   (eval $ac_compile) 2>&5
12446   ac_status=$?
12447   echo "$as_me:12447: \$? = $ac_status" >&5
12448   (exit $ac_status); } &&
12449          { ac_try='test -s conftest.$ac_objext'
12450   { (eval echo "$as_me:12450: \"$ac_try\"") >&5
12451   (eval $ac_try) 2>&5
12452   ac_status=$?
12453   echo "$as_me:12453: \$? = $ac_status" >&5
12454   (exit $ac_status); }; }; then
12455   cf_cv_weak_symbols=yes
12456 else
12457   echo "$as_me: failed program was:" >&5
12458 cat conftest.$ac_ext >&5
12459 cf_cv_weak_symbols=no
12460 fi
12461 rm -f conftest.$ac_objext conftest.$ac_ext
12462
12463 fi
12464 echo "$as_me:12464: result: $cf_cv_weak_symbols" >&5
12465 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12466
12467         else
12468                 cf_cv_weak_symbols=no
12469         fi
12470
12471         if test "x$cf_cv_weak_symbols" = xyes ; then
12472
12473 cat >>confdefs.h <<\EOF
12474 #define USE_WEAK_SYMBOLS 1
12475 EOF
12476
12477         fi
12478 fi
12479
12480 PTHREAD=
12481 if test "x$with_pthread" = "xyes" ; then
12482
12483 cat >>confdefs.h <<\EOF
12484 #define USE_PTHREADS 1
12485 EOF
12486
12487     enable_reentrant=yes
12488     if test "x$cf_cv_weak_symbols" = xyes ; then
12489         PTHREAD=-lpthread
12490     fi
12491 fi
12492
12493 # Reentrant code has to be opaque; there's little advantage to making ncurses
12494 # opaque outside of that, so there is no --enable-opaque option.  We can use
12495 # this option without --with-pthreads, but this will be always set for
12496 # pthreads.
12497 echo "$as_me:12497: checking if you want experimental reentrant code" >&5
12498 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12499
12500 # Check whether --enable-reentrant or --disable-reentrant was given.
12501 if test "${enable_reentrant+set}" = set; then
12502   enableval="$enable_reentrant"
12503   with_reentrant=$enableval
12504 else
12505   with_reentrant=no
12506 fi;
12507 echo "$as_me:12507: result: $with_reentrant" >&5
12508 echo "${ECHO_T}$with_reentrant" >&6
12509 if test "x$with_reentrant" = xyes ; then
12510         cf_cv_enable_reentrant=1
12511         cf_cv_enable_opaque="NCURSES_INTERNALS"
12512         NCURSES_OPAQUE=1
12513         NCURSES_SIZE_T=int
12514         if test "x$cf_cv_weak_symbols" = xyes ; then
12515
12516 # remove pthread library from $LIBS
12517 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12518
12519 cf_add_libs="-lpthread"
12520 # Filter out duplicates - this happens with badly-designed ".pc" files...
12521 for cf_add_1lib in $TEST_LIBS
12522 do
12523         for cf_add_2lib in $cf_add_libs
12524         do
12525                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12526                 then
12527                         cf_add_1lib=
12528                         break
12529                 fi
12530         done
12531         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12532 done
12533 TEST_LIBS="$cf_add_libs"
12534
12535 cf_add_libs="-lpthread"
12536 # Filter out duplicates - this happens with badly-designed ".pc" files...
12537 for cf_add_1lib in $TEST_LIBS2
12538 do
12539         for cf_add_2lib in $cf_add_libs
12540         do
12541                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12542                 then
12543                         cf_add_1lib=
12544                         break
12545                 fi
12546         done
12547         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12548 done
12549 TEST_LIBS2="$cf_add_libs"
12550
12551         else
12552                 # when not using weak symbols but with_reentrant,
12553                 # add 't' to the library suffix on all platforms
12554                 # except cygwin, where we only do that if ALSO
12555                 # compiling with full thread support.
12556                 case "$host" in
12557                 *cygwin* | *msys*) #(vi
12558                         if test "$with_pthread" = "yes" ; then
12559                                 if test "x$disable_lib_suffixes" = "xno" ; then
12560                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12561                                 fi
12562                         fi ;;
12563                 *)
12564                         if test "x$disable_lib_suffixes" = "xno" ; then
12565                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12566                         fi
12567                         ;;
12568                 esac
12569         fi
12570
12571 cat >>confdefs.h <<\EOF
12572 #define USE_REENTRANT 1
12573 EOF
12574
12575 if test "${with_abi_version+set}" != set; then
12576         case $cf_cv_rel_version in
12577         5.*)
12578                 cf_cv_rel_version=6.0
12579                 cf_cv_abi_version=6
12580                 { echo "$as_me:12580: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12581 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12582                 ;;
12583         esac
12584 fi
12585
12586 else
12587         cf_cv_enable_reentrant=0
12588         cf_cv_enable_opaque="NCURSES_OPAQUE"
12589         NCURSES_OPAQUE=0
12590         NCURSES_SIZE_T=short
12591 fi
12592
12593 ### Allow using a different wrap-prefix
12594 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12595         echo "$as_me:12595: checking for prefix used to wrap public variables" >&5
12596 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12597
12598 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12599 if test "${with_wrap_prefix+set}" = set; then
12600   withval="$with_wrap_prefix"
12601   NCURSES_WRAP_PREFIX=$withval
12602 else
12603   NCURSES_WRAP_PREFIX=_nc_
12604 fi;
12605         echo "$as_me:12605: result: $NCURSES_WRAP_PREFIX" >&5
12606 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12607 else
12608         NCURSES_WRAP_PREFIX=_nc_
12609 fi
12610
12611 cat >>confdefs.h <<EOF
12612 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12613 EOF
12614
12615 echo "$as_me:12615: checking if you want experimental safe-sprintf code" >&5
12616 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12617
12618 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12619 if test "${enable_safe_sprintf+set}" = set; then
12620   enableval="$enable_safe_sprintf"
12621   with_safe_sprintf=$enableval
12622 else
12623   with_safe_sprintf=no
12624 fi;
12625 echo "$as_me:12625: result: $with_safe_sprintf" >&5
12626 echo "${ECHO_T}$with_safe_sprintf" >&6
12627 test "x$with_safe_sprintf" = xyes &&
12628 cat >>confdefs.h <<\EOF
12629 #define USE_SAFE_SPRINTF 1
12630 EOF
12631
12632 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12633 # when hashmap is used scroll hints are useless
12634 if test "$with_hashmap" = no ; then
12635 echo "$as_me:12635: checking if you want to experiment without scrolling-hints code" >&5
12636 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12637
12638 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12639 if test "${enable_scroll_hints+set}" = set; then
12640   enableval="$enable_scroll_hints"
12641   with_scroll_hints=$enableval
12642 else
12643   with_scroll_hints=yes
12644 fi;
12645 echo "$as_me:12645: result: $with_scroll_hints" >&5
12646 echo "${ECHO_T}$with_scroll_hints" >&6
12647 test "x$with_scroll_hints" = xyes &&
12648 cat >>confdefs.h <<\EOF
12649 #define USE_SCROLL_HINTS 1
12650 EOF
12651
12652 fi
12653
12654 echo "$as_me:12654: checking if you want experimental wgetch-events code" >&5
12655 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12656
12657 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12658 if test "${enable_wgetch_events+set}" = set; then
12659   enableval="$enable_wgetch_events"
12660   with_wgetch_events=$enableval
12661 else
12662   with_wgetch_events=no
12663 fi;
12664 echo "$as_me:12664: result: $with_wgetch_events" >&5
12665 echo "${ECHO_T}$with_wgetch_events" >&6
12666 test "x$with_wgetch_events" = xyes &&
12667 cat >>confdefs.h <<\EOF
12668 #define NCURSES_WGETCH_EVENTS 1
12669 EOF
12670
12671 ###############################################################################
12672
12673 ###     use option --disable-echo to suppress full display compiling commands
12674
12675 echo "$as_me:12675: checking if you want to see long compiling messages" >&5
12676 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12677
12678 # Check whether --enable-echo or --disable-echo was given.
12679 if test "${enable_echo+set}" = set; then
12680   enableval="$enable_echo"
12681   test "$enableval" != no && enableval=yes
12682   if test "$enableval" != "yes" ; then
12683
12684     ECHO_LT='--silent'
12685     ECHO_LD='@echo linking $@;'
12686     RULE_CC='@echo compiling $<'
12687     SHOW_CC='@echo compiling $@'
12688     ECHO_CC='@'
12689
12690   else
12691
12692     ECHO_LT=''
12693     ECHO_LD=''
12694     RULE_CC=''
12695     SHOW_CC=''
12696     ECHO_CC=''
12697
12698   fi
12699 else
12700   enableval=yes
12701
12702     ECHO_LT=''
12703     ECHO_LD=''
12704     RULE_CC=''
12705     SHOW_CC=''
12706     ECHO_CC=''
12707
12708 fi;
12709 echo "$as_me:12709: result: $enableval" >&5
12710 echo "${ECHO_T}$enableval" >&6
12711
12712 if test "x$enable_echo" = xyes; then
12713         ECHO_LINK=
12714 else
12715         ECHO_LINK='@ echo linking $@ ... ;'
12716         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12717         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12718 fi
12719
12720 ###     use option --enable-warnings to turn on all gcc warnings
12721 echo "$as_me:12721: checking if you want to see compiler warnings" >&5
12722 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12723
12724 # Check whether --enable-warnings or --disable-warnings was given.
12725 if test "${enable_warnings+set}" = set; then
12726   enableval="$enable_warnings"
12727   with_warnings=$enableval
12728 fi;
12729 echo "$as_me:12729: result: $with_warnings" >&5
12730 echo "${ECHO_T}$with_warnings" >&6
12731
12732 if test "x$with_warnings" = "xyes"; then
12733
12734         ADAFLAGS="$ADAFLAGS -gnatg"
12735
12736 INTEL_COMPILER=no
12737
12738 if test "$GCC" = yes ; then
12739         case $host_os in
12740         linux*|gnu*)
12741                 echo "$as_me:12741: checking if this is really Intel C compiler" >&5
12742 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12743                 cf_save_CFLAGS="$CFLAGS"
12744                 CFLAGS="$CFLAGS -no-gcc"
12745                 cat >conftest.$ac_ext <<_ACEOF
12746 #line 12746 "configure"
12747 #include "confdefs.h"
12748
12749 int
12750 main ()
12751 {
12752
12753 #ifdef __INTEL_COMPILER
12754 #else
12755 make an error
12756 #endif
12757
12758   ;
12759   return 0;
12760 }
12761 _ACEOF
12762 rm -f conftest.$ac_objext
12763 if { (eval echo "$as_me:12763: \"$ac_compile\"") >&5
12764   (eval $ac_compile) 2>&5
12765   ac_status=$?
12766   echo "$as_me:12766: \$? = $ac_status" >&5
12767   (exit $ac_status); } &&
12768          { ac_try='test -s conftest.$ac_objext'
12769   { (eval echo "$as_me:12769: \"$ac_try\"") >&5
12770   (eval $ac_try) 2>&5
12771   ac_status=$?
12772   echo "$as_me:12772: \$? = $ac_status" >&5
12773   (exit $ac_status); }; }; then
12774   INTEL_COMPILER=yes
12775 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12776
12777 else
12778   echo "$as_me: failed program was:" >&5
12779 cat conftest.$ac_ext >&5
12780 fi
12781 rm -f conftest.$ac_objext conftest.$ac_ext
12782                 CFLAGS="$cf_save_CFLAGS"
12783                 echo "$as_me:12783: result: $INTEL_COMPILER" >&5
12784 echo "${ECHO_T}$INTEL_COMPILER" >&6
12785                 ;;
12786         esac
12787 fi
12788
12789 CLANG_COMPILER=no
12790
12791 if test "$GCC" = yes ; then
12792         echo "$as_me:12792: checking if this is really Clang C compiler" >&5
12793 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12794         cf_save_CFLAGS="$CFLAGS"
12795         CFLAGS="$CFLAGS -Qunused-arguments"
12796         cat >conftest.$ac_ext <<_ACEOF
12797 #line 12797 "configure"
12798 #include "confdefs.h"
12799
12800 int
12801 main ()
12802 {
12803
12804 #ifdef __clang__
12805 #else
12806 make an error
12807 #endif
12808
12809   ;
12810   return 0;
12811 }
12812 _ACEOF
12813 rm -f conftest.$ac_objext
12814 if { (eval echo "$as_me:12814: \"$ac_compile\"") >&5
12815   (eval $ac_compile) 2>&5
12816   ac_status=$?
12817   echo "$as_me:12817: \$? = $ac_status" >&5
12818   (exit $ac_status); } &&
12819          { ac_try='test -s conftest.$ac_objext'
12820   { (eval echo "$as_me:12820: \"$ac_try\"") >&5
12821   (eval $ac_try) 2>&5
12822   ac_status=$?
12823   echo "$as_me:12823: \$? = $ac_status" >&5
12824   (exit $ac_status); }; }; then
12825   CLANG_COMPILER=yes
12826 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12827
12828 else
12829   echo "$as_me: failed program was:" >&5
12830 cat conftest.$ac_ext >&5
12831 fi
12832 rm -f conftest.$ac_objext conftest.$ac_ext
12833         CFLAGS="$cf_save_CFLAGS"
12834         echo "$as_me:12834: result: $CLANG_COMPILER" >&5
12835 echo "${ECHO_T}$CLANG_COMPILER" >&6
12836 fi
12837
12838 cat > conftest.$ac_ext <<EOF
12839 #line 12839 "${as_me:-configure}"
12840 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12841 EOF
12842
12843 if test "$INTEL_COMPILER" = yes
12844 then
12845 # The "-wdXXX" options suppress warnings:
12846 # remark #1419: external declaration in primary source file
12847 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12848 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12849 # remark #193: zero used for undefined preprocessing identifier
12850 # remark #593: variable "curs_sb_left_arrow" was set but never used
12851 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12852 # remark #869: parameter "tw" was never referenced
12853 # remark #981: operands are evaluated in unspecified order
12854 # warning #279: controlling expression is constant
12855
12856         { echo "$as_me:12856: checking for $CC warning options..." >&5
12857 echo "$as_me: checking for $CC warning options..." >&6;}
12858         cf_save_CFLAGS="$CFLAGS"
12859         EXTRA_CFLAGS="-Wall"
12860         for cf_opt in \
12861                 wd1419 \
12862                 wd1683 \
12863                 wd1684 \
12864                 wd193 \
12865                 wd593 \
12866                 wd279 \
12867                 wd810 \
12868                 wd869 \
12869                 wd981
12870         do
12871                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12872                 if { (eval echo "$as_me:12872: \"$ac_compile\"") >&5
12873   (eval $ac_compile) 2>&5
12874   ac_status=$?
12875   echo "$as_me:12875: \$? = $ac_status" >&5
12876   (exit $ac_status); }; then
12877                         test -n "$verbose" && echo "$as_me:12877: result: ... -$cf_opt" >&5
12878 echo "${ECHO_T}... -$cf_opt" >&6
12879                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12880                 fi
12881         done
12882         CFLAGS="$cf_save_CFLAGS"
12883
12884 elif test "$GCC" = yes
12885 then
12886         { echo "$as_me:12886: checking for $CC warning options..." >&5
12887 echo "$as_me: checking for $CC warning options..." >&6;}
12888         cf_save_CFLAGS="$CFLAGS"
12889         EXTRA_CFLAGS=
12890         cf_warn_CONST=""
12891         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12892         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12893         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12894         for cf_opt in W Wall \
12895                 Wbad-function-cast \
12896                 Wcast-align \
12897                 Wcast-qual \
12898                 Wdeclaration-after-statement \
12899                 Wextra \
12900                 Winline \
12901                 Wmissing-declarations \
12902                 Wmissing-prototypes \
12903                 Wnested-externs \
12904                 Wpointer-arith \
12905                 Wshadow \
12906                 Wstrict-prototypes \
12907                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12908         do
12909                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12910                 if { (eval echo "$as_me:12910: \"$ac_compile\"") >&5
12911   (eval $ac_compile) 2>&5
12912   ac_status=$?
12913   echo "$as_me:12913: \$? = $ac_status" >&5
12914   (exit $ac_status); }; then
12915                         test -n "$verbose" && echo "$as_me:12915: result: ... -$cf_opt" >&5
12916 echo "${ECHO_T}... -$cf_opt" >&6
12917                         case $cf_opt in #(vi
12918                         Wcast-qual) #(vi
12919                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12920                                 ;;
12921                         Winline) #(vi
12922                                 case $GCC_VERSION in
12923                                 [34].*)
12924                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12925
12926 echo "${as_me:-configure}:12926: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12927
12928                                         continue;;
12929                                 esac
12930                                 ;;
12931                         Wpointer-arith) #(vi
12932                                 case $GCC_VERSION in
12933                                 [12].*)
12934                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12935
12936 echo "${as_me:-configure}:12936: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12937
12938                                         continue;;
12939                                 esac
12940                                 ;;
12941                         esac
12942                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12943                 fi
12944         done
12945         CFLAGS="$cf_save_CFLAGS"
12946 fi
12947 rm -rf conftest*
12948
12949         if test "x$cf_with_cxx" = xyes ; then
12950
12951 INTEL_CPLUSPLUS=no
12952
12953 if test "$GCC" = yes ; then
12954         case $host_os in
12955         linux*|gnu*)
12956                 echo "$as_me:12956: checking if this is really Intel C++ compiler" >&5
12957 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12958                 cf_save_CFLAGS="$CXXFLAGS"
12959                 CXXFLAGS="$CXXFLAGS -no-gcc"
12960                 cat >conftest.$ac_ext <<_ACEOF
12961 #line 12961 "configure"
12962 #include "confdefs.h"
12963
12964 int
12965 main ()
12966 {
12967
12968 #ifdef __INTEL_COMPILER
12969 #else
12970 make an error
12971 #endif
12972
12973   ;
12974   return 0;
12975 }
12976 _ACEOF
12977 rm -f conftest.$ac_objext
12978 if { (eval echo "$as_me:12978: \"$ac_compile\"") >&5
12979   (eval $ac_compile) 2>&5
12980   ac_status=$?
12981   echo "$as_me:12981: \$? = $ac_status" >&5
12982   (exit $ac_status); } &&
12983          { ac_try='test -s conftest.$ac_objext'
12984   { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985   (eval $ac_try) 2>&5
12986   ac_status=$?
12987   echo "$as_me:12987: \$? = $ac_status" >&5
12988   (exit $ac_status); }; }; then
12989   INTEL_CPLUSPLUS=yes
12990 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12991
12992 else
12993   echo "$as_me: failed program was:" >&5
12994 cat conftest.$ac_ext >&5
12995 fi
12996 rm -f conftest.$ac_objext conftest.$ac_ext
12997                 CXXFLAGS="$cf_save_CFLAGS"
12998                 echo "$as_me:12998: result: $INTEL_CPLUSPLUS" >&5
12999 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13000                 ;;
13001         esac
13002 fi
13003
13004 CLANG_CPLUSPLUS=no
13005
13006 if test "$GCC" = yes ; then
13007         echo "$as_me:13007: checking if this is really Clang C++ compiler" >&5
13008 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13009         cf_save_CFLAGS="$CXXFLAGS"
13010         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13011         cat >conftest.$ac_ext <<_ACEOF
13012 #line 13012 "configure"
13013 #include "confdefs.h"
13014
13015 int
13016 main ()
13017 {
13018
13019 #ifdef __clang__
13020 #else
13021 make an error
13022 #endif
13023
13024   ;
13025   return 0;
13026 }
13027 _ACEOF
13028 rm -f conftest.$ac_objext
13029 if { (eval echo "$as_me:13029: \"$ac_compile\"") >&5
13030   (eval $ac_compile) 2>&5
13031   ac_status=$?
13032   echo "$as_me:13032: \$? = $ac_status" >&5
13033   (exit $ac_status); } &&
13034          { ac_try='test -s conftest.$ac_objext'
13035   { (eval echo "$as_me:13035: \"$ac_try\"") >&5
13036   (eval $ac_try) 2>&5
13037   ac_status=$?
13038   echo "$as_me:13038: \$? = $ac_status" >&5
13039   (exit $ac_status); }; }; then
13040   CLANG_CPLUSPLUS=yes
13041 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13042
13043 else
13044   echo "$as_me: failed program was:" >&5
13045 cat conftest.$ac_ext >&5
13046 fi
13047 rm -f conftest.$ac_objext conftest.$ac_ext
13048         CXXFLAGS="$cf_save_CFLAGS"
13049         echo "$as_me:13049: result: $CLANG_CPLUSPLUS" >&5
13050 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13051 fi
13052
13053 ac_ext=cc
13054 ac_cpp='$CXXCPP $CPPFLAGS'
13055 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13056 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13057 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13058 ac_main_return=return
13059
13060 cat > conftest.$ac_ext <<EOF
13061 #line 13061 "configure"
13062 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13063 EOF
13064
13065 if test "$INTEL_CPLUSPLUS" = yes
13066 then
13067 # The "-wdXXX" options suppress warnings:
13068 # remark #1419: external declaration in primary source file
13069 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13070 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13071 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13072 # remark #193: zero used for undefined preprocessing identifier
13073 # remark #593: variable "curs_sb_left_arrow" was set but never used
13074 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13075 # remark #869: parameter "tw" was never referenced
13076 # remark #981: operands are evaluated in unspecified order
13077 # warning #269: invalid format string conversion
13078
13079         { echo "$as_me:13079: checking for $CC warning options..." >&5
13080 echo "$as_me: checking for $CC warning options..." >&6;}
13081         cf_save_CXXFLAGS="$CXXFLAGS"
13082         EXTRA_CXXFLAGS="-Wall"
13083         for cf_opt in \
13084                 wd1419 \
13085                 wd1682 \
13086                 wd1683 \
13087                 wd1684 \
13088                 wd193 \
13089                 wd279 \
13090                 wd593 \
13091                 wd810 \
13092                 wd869 \
13093                 wd981
13094         do
13095                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13096                 if { (eval echo "$as_me:13096: \"$ac_compile\"") >&5
13097   (eval $ac_compile) 2>&5
13098   ac_status=$?
13099   echo "$as_me:13099: \$? = $ac_status" >&5
13100   (exit $ac_status); }; then
13101                         test -n "$verbose" && echo "$as_me:13101: result: ... -$cf_opt" >&5
13102 echo "${ECHO_T}... -$cf_opt" >&6
13103                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13104                 fi
13105         done
13106         CXXFLAGS="$cf_save_CXXFLAGS"
13107
13108 elif test "$GXX" = yes
13109 then
13110         { echo "$as_me:13110: checking for $CXX warning options..." >&5
13111 echo "$as_me: checking for $CXX warning options..." >&6;}
13112         cf_save_CXXFLAGS="$CXXFLAGS"
13113         EXTRA_CXXFLAGS="-W -Wall"
13114         cf_gxx_extra_warnings=""
13115         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13116         case "$GCC_VERSION" in
13117         [1-2].*)
13118                 ;;
13119         *)
13120                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13121                 ;;
13122         esac
13123         for cf_opt in \
13124                 Wabi \
13125                 fabi-version=0 \
13126                 Wextra \
13127                 Wignored-qualifiers \
13128                 Wlogical-op \
13129                 Woverloaded-virtual \
13130                 Wsign-promo \
13131                 Wsynth \
13132                 Wold-style-cast \
13133                 Wcast-align \
13134                 Wcast-qual \
13135                 Wpointer-arith \
13136                 Wshadow \
13137                 Wundef $cf_gxx_extra_warnings Wno-unused
13138         do
13139                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13140                 if { (eval echo "$as_me:13140: \"$ac_compile\"") >&5
13141   (eval $ac_compile) 2>&5
13142   ac_status=$?
13143   echo "$as_me:13143: \$? = $ac_status" >&5
13144   (exit $ac_status); }; then
13145                         test -n "$verbose" && echo "$as_me:13145: result: ... -$cf_opt" >&5
13146 echo "${ECHO_T}... -$cf_opt" >&6
13147                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13148                 else
13149                         test -n "$verbose" && echo "$as_me:13149: result: ... no -$cf_opt" >&5
13150 echo "${ECHO_T}... no -$cf_opt" >&6
13151                 fi
13152         done
13153         CXXFLAGS="$cf_save_CXXFLAGS"
13154 fi
13155
13156 rm -rf conftest*
13157 ac_ext=c
13158 ac_cpp='$CPP $CPPFLAGS'
13159 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13160 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13162 ac_main_return=return
13163
13164         fi
13165 fi
13166
13167 if test "$GCC" = yes
13168 then
13169 cat > conftest.i <<EOF
13170 #ifndef GCC_PRINTF
13171 #define GCC_PRINTF 0
13172 #endif
13173 #ifndef GCC_SCANF
13174 #define GCC_SCANF 0
13175 #endif
13176 #ifndef GCC_NORETURN
13177 #define GCC_NORETURN /* nothing */
13178 #endif
13179 #ifndef GCC_UNUSED
13180 #define GCC_UNUSED /* nothing */
13181 #endif
13182 EOF
13183 if test "$GCC" = yes
13184 then
13185         { echo "$as_me:13185: checking for $CC __attribute__ directives..." >&5
13186 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13187 cat > conftest.$ac_ext <<EOF
13188 #line 13188 "${as_me:-configure}"
13189 #include "confdefs.h"
13190 #include "conftest.h"
13191 #include "conftest.i"
13192 #if     GCC_PRINTF
13193 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13194 #else
13195 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13196 #endif
13197 #if     GCC_SCANF
13198 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13199 #else
13200 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13201 #endif
13202 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13203 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13204 extern void foo(void) GCC_NORETURN;
13205 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13206 EOF
13207         cf_printf_attribute=no
13208         cf_scanf_attribute=no
13209         for cf_attribute in scanf printf unused noreturn
13210         do
13211
13212 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13213
13214                 cf_directive="__attribute__(($cf_attribute))"
13215                 echo "checking for $CC $cf_directive" 1>&5
13216
13217                 case $cf_attribute in #(vi
13218                 printf) #(vi
13219                         cf_printf_attribute=yes
13220                         cat >conftest.h <<EOF
13221 #define GCC_$cf_ATTRIBUTE 1
13222 EOF
13223                         ;;
13224                 scanf) #(vi
13225                         cf_scanf_attribute=yes
13226                         cat >conftest.h <<EOF
13227 #define GCC_$cf_ATTRIBUTE 1
13228 EOF
13229                         ;;
13230                 *) #(vi
13231                         cat >conftest.h <<EOF
13232 #define GCC_$cf_ATTRIBUTE $cf_directive
13233 EOF
13234                         ;;
13235                 esac
13236
13237                 if { (eval echo "$as_me:13237: \"$ac_compile\"") >&5
13238   (eval $ac_compile) 2>&5
13239   ac_status=$?
13240   echo "$as_me:13240: \$? = $ac_status" >&5
13241   (exit $ac_status); }; then
13242                         test -n "$verbose" && echo "$as_me:13242: result: ... $cf_attribute" >&5
13243 echo "${ECHO_T}... $cf_attribute" >&6
13244                         cat conftest.h >>confdefs.h
13245                         case $cf_attribute in #(vi
13246                         noreturn) #(vi
13247
13248 cat >>confdefs.h <<EOF
13249 #define GCC_NORETURN $cf_directive
13250 EOF
13251
13252                                 ;;
13253                         printf) #(vi
13254                                 cf_value='/* nothing */'
13255                                 if test "$cf_printf_attribute" != no ; then
13256                                         cf_value='__attribute__((format(printf,fmt,var)))'
13257
13258 cat >>confdefs.h <<\EOF
13259 #define GCC_PRINTF 1
13260 EOF
13261
13262                                 fi
13263
13264 cat >>confdefs.h <<EOF
13265 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13266 EOF
13267
13268                                 ;;
13269                         scanf) #(vi
13270                                 cf_value='/* nothing */'
13271                                 if test "$cf_scanf_attribute" != no ; then
13272                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13273
13274 cat >>confdefs.h <<\EOF
13275 #define GCC_SCANF 1
13276 EOF
13277
13278                                 fi
13279
13280 cat >>confdefs.h <<EOF
13281 #define GCC_SCANFLIKE(fmt,var) $cf_value
13282 EOF
13283
13284                                 ;;
13285                         unused) #(vi
13286
13287 cat >>confdefs.h <<EOF
13288 #define GCC_UNUSED $cf_directive
13289 EOF
13290
13291                                 ;;
13292                         esac
13293                 fi
13294         done
13295 else
13296         fgrep define conftest.i >>confdefs.h
13297 fi
13298 rm -rf conftest*
13299 fi
13300
13301 echo "$as_me:13301: checking if you want to work around bogus compiler/loader warnings" >&5
13302 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13303
13304 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13305 if test "${enable_string_hacks+set}" = set; then
13306   enableval="$enable_string_hacks"
13307   with_string_hacks=$enableval
13308 else
13309   with_string_hacks=no
13310 fi;
13311 echo "$as_me:13311: result: $with_string_hacks" >&5
13312 echo "${ECHO_T}$with_string_hacks" >&6
13313
13314 if test "x$with_string_hacks" = "xyes"; then
13315
13316 cat >>confdefs.h <<\EOF
13317 #define USE_STRING_HACKS 1
13318 EOF
13319
13320         { echo "$as_me:13320: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13321 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13322
13323 for ac_func in strlcat strlcpy snprintf
13324 do
13325 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13326 echo "$as_me:13326: checking for $ac_func" >&5
13327 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13328 if eval "test \"\${$as_ac_var+set}\" = set"; then
13329   echo $ECHO_N "(cached) $ECHO_C" >&6
13330 else
13331   cat >conftest.$ac_ext <<_ACEOF
13332 #line 13332 "configure"
13333 #include "confdefs.h"
13334 /* System header to define __stub macros and hopefully few prototypes,
13335     which can conflict with char $ac_func (); below.  */
13336 #include <assert.h>
13337 /* Override any gcc2 internal prototype to avoid an error.  */
13338 #ifdef __cplusplus
13339 extern "C"
13340 #endif
13341 /* We use char because int might match the return type of a gcc2
13342    builtin and then its argument prototype would still apply.  */
13343 char $ac_func ();
13344 char (*f) ();
13345
13346 int
13347 main ()
13348 {
13349 /* The GNU C library defines this for functions which it implements
13350     to always fail with ENOSYS.  Some functions are actually named
13351     something starting with __ and the normal name is an alias.  */
13352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13353 choke me
13354 #else
13355 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13356 #endif
13357
13358   ;
13359   return 0;
13360 }
13361 _ACEOF
13362 rm -f conftest.$ac_objext conftest$ac_exeext
13363 if { (eval echo "$as_me:13363: \"$ac_link\"") >&5
13364   (eval $ac_link) 2>&5
13365   ac_status=$?
13366   echo "$as_me:13366: \$? = $ac_status" >&5
13367   (exit $ac_status); } &&
13368          { ac_try='test -s conftest$ac_exeext'
13369   { (eval echo "$as_me:13369: \"$ac_try\"") >&5
13370   (eval $ac_try) 2>&5
13371   ac_status=$?
13372   echo "$as_me:13372: \$? = $ac_status" >&5
13373   (exit $ac_status); }; }; then
13374   eval "$as_ac_var=yes"
13375 else
13376   echo "$as_me: failed program was:" >&5
13377 cat conftest.$ac_ext >&5
13378 eval "$as_ac_var=no"
13379 fi
13380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13381 fi
13382 echo "$as_me:13382: result: `eval echo '${'$as_ac_var'}'`" >&5
13383 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13384 if test `eval echo '${'$as_ac_var'}'` = yes; then
13385   cat >>confdefs.h <<EOF
13386 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13387 EOF
13388
13389 fi
13390 done
13391
13392 fi
13393
13394 ###     use option --enable-assertions to turn on generation of assertion code
13395 echo "$as_me:13395: checking if you want to enable runtime assertions" >&5
13396 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13397
13398 # Check whether --enable-assertions or --disable-assertions was given.
13399 if test "${enable_assertions+set}" = set; then
13400   enableval="$enable_assertions"
13401   with_assertions=$enableval
13402 else
13403   with_assertions=no
13404 fi;
13405 echo "$as_me:13405: result: $with_assertions" >&5
13406 echo "${ECHO_T}$with_assertions" >&6
13407 if test -n "$GCC"
13408 then
13409         if test "$with_assertions" = no
13410         then
13411                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13412         else
13413
13414         ADAFLAGS="$ADAFLAGS -gnata"
13415
13416         fi
13417 fi
13418
13419 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13420
13421 echo "$as_me:13421: checking if you want to use dmalloc for testing" >&5
13422 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13423
13424 # Check whether --with-dmalloc or --without-dmalloc was given.
13425 if test "${with_dmalloc+set}" = set; then
13426   withval="$with_dmalloc"
13427
13428 cat >>confdefs.h <<EOF
13429 #define USE_DMALLOC 1
13430 EOF
13431
13432         : ${with_cflags:=-g}
13433         : ${with_no_leaks:=yes}
13434          with_dmalloc=yes
13435 else
13436   with_dmalloc=
13437 fi;
13438 echo "$as_me:13438: result: ${with_dmalloc:-no}" >&5
13439 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13440
13441 case .$with_cflags in #(vi
13442 .*-g*)
13443         case .$CFLAGS in #(vi
13444         .*-g*) #(vi
13445                 ;;
13446         *)
13447
13448 cf_fix_cppflags=no
13449 cf_new_cflags=
13450 cf_new_cppflags=
13451 cf_new_extra_cppflags=
13452
13453 for cf_add_cflags in -g
13454 do
13455 case $cf_fix_cppflags in
13456 no)
13457         case $cf_add_cflags in #(vi
13458         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13459                 case $cf_add_cflags in
13460                 -D*)
13461                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13462
13463                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13464                                 && test -z "${cf_tst_cflags}" \
13465                                 && cf_fix_cppflags=yes
13466
13467                         if test $cf_fix_cppflags = yes ; then
13468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13469                                 continue
13470                         elif test "${cf_tst_cflags}" = "\"'" ; then
13471                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13472                                 continue
13473                         fi
13474                         ;;
13475                 esac
13476                 case "$CPPFLAGS" in
13477                 *$cf_add_cflags) #(vi
13478                         ;;
13479                 *) #(vi
13480                         case $cf_add_cflags in #(vi
13481                         -D*)
13482                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13483
13484 CPPFLAGS=`echo "$CPPFLAGS" | \
13485         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13486                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13487
13488                                 ;;
13489                         esac
13490                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13491                         ;;
13492                 esac
13493                 ;;
13494         *)
13495                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13496                 ;;
13497         esac
13498         ;;
13499 yes)
13500         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13501
13502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13503
13504         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13505                 && test -z "${cf_tst_cflags}" \
13506                 && cf_fix_cppflags=no
13507         ;;
13508 esac
13509 done
13510
13511 if test -n "$cf_new_cflags" ; then
13512
13513         CFLAGS="$CFLAGS $cf_new_cflags"
13514 fi
13515
13516 if test -n "$cf_new_cppflags" ; then
13517
13518         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13519 fi
13520
13521 if test -n "$cf_new_extra_cppflags" ; then
13522
13523         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13524 fi
13525
13526                 ;;
13527         esac
13528         ;;
13529 esac
13530
13531 if test "$with_dmalloc" = yes ; then
13532         echo "$as_me:13532: checking for dmalloc.h" >&5
13533 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13534 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537   cat >conftest.$ac_ext <<_ACEOF
13538 #line 13538 "configure"
13539 #include "confdefs.h"
13540 #include <dmalloc.h>
13541 _ACEOF
13542 if { (eval echo "$as_me:13542: \"$ac_cpp conftest.$ac_ext\"") >&5
13543   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13544   ac_status=$?
13545   egrep -v '^ *\+' conftest.er1 >conftest.err
13546   rm -f conftest.er1
13547   cat conftest.err >&5
13548   echo "$as_me:13548: \$? = $ac_status" >&5
13549   (exit $ac_status); } >/dev/null; then
13550   if test -s conftest.err; then
13551     ac_cpp_err=$ac_c_preproc_warn_flag
13552   else
13553     ac_cpp_err=
13554   fi
13555 else
13556   ac_cpp_err=yes
13557 fi
13558 if test -z "$ac_cpp_err"; then
13559   ac_cv_header_dmalloc_h=yes
13560 else
13561   echo "$as_me: failed program was:" >&5
13562   cat conftest.$ac_ext >&5
13563   ac_cv_header_dmalloc_h=no
13564 fi
13565 rm -f conftest.err conftest.$ac_ext
13566 fi
13567 echo "$as_me:13567: result: $ac_cv_header_dmalloc_h" >&5
13568 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13569 if test $ac_cv_header_dmalloc_h = yes; then
13570
13571 echo "$as_me:13571: checking for dmalloc_debug in -ldmalloc" >&5
13572 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13573 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13574   echo $ECHO_N "(cached) $ECHO_C" >&6
13575 else
13576   ac_check_lib_save_LIBS=$LIBS
13577 LIBS="-ldmalloc  $LIBS"
13578 cat >conftest.$ac_ext <<_ACEOF
13579 #line 13579 "configure"
13580 #include "confdefs.h"
13581
13582 /* Override any gcc2 internal prototype to avoid an error.  */
13583 #ifdef __cplusplus
13584 extern "C"
13585 #endif
13586 /* We use char because int might match the return type of a gcc2
13587    builtin and then its argument prototype would still apply.  */
13588 char dmalloc_debug ();
13589 int
13590 main ()
13591 {
13592 dmalloc_debug ();
13593   ;
13594   return 0;
13595 }
13596 _ACEOF
13597 rm -f conftest.$ac_objext conftest$ac_exeext
13598 if { (eval echo "$as_me:13598: \"$ac_link\"") >&5
13599   (eval $ac_link) 2>&5
13600   ac_status=$?
13601   echo "$as_me:13601: \$? = $ac_status" >&5
13602   (exit $ac_status); } &&
13603          { ac_try='test -s conftest$ac_exeext'
13604   { (eval echo "$as_me:13604: \"$ac_try\"") >&5
13605   (eval $ac_try) 2>&5
13606   ac_status=$?
13607   echo "$as_me:13607: \$? = $ac_status" >&5
13608   (exit $ac_status); }; }; then
13609   ac_cv_lib_dmalloc_dmalloc_debug=yes
13610 else
13611   echo "$as_me: failed program was:" >&5
13612 cat conftest.$ac_ext >&5
13613 ac_cv_lib_dmalloc_dmalloc_debug=no
13614 fi
13615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13616 LIBS=$ac_check_lib_save_LIBS
13617 fi
13618 echo "$as_me:13618: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13619 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13620 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13621   cat >>confdefs.h <<EOF
13622 #define HAVE_LIBDMALLOC 1
13623 EOF
13624
13625   LIBS="-ldmalloc $LIBS"
13626
13627 fi
13628
13629 fi
13630
13631 fi
13632
13633 echo "$as_me:13633: checking if you want to use dbmalloc for testing" >&5
13634 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13635
13636 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13637 if test "${with_dbmalloc+set}" = set; then
13638   withval="$with_dbmalloc"
13639
13640 cat >>confdefs.h <<EOF
13641 #define USE_DBMALLOC 1
13642 EOF
13643
13644         : ${with_cflags:=-g}
13645         : ${with_no_leaks:=yes}
13646          with_dbmalloc=yes
13647 else
13648   with_dbmalloc=
13649 fi;
13650 echo "$as_me:13650: result: ${with_dbmalloc:-no}" >&5
13651 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13652
13653 case .$with_cflags in #(vi
13654 .*-g*)
13655         case .$CFLAGS in #(vi
13656         .*-g*) #(vi
13657                 ;;
13658         *)
13659
13660 cf_fix_cppflags=no
13661 cf_new_cflags=
13662 cf_new_cppflags=
13663 cf_new_extra_cppflags=
13664
13665 for cf_add_cflags in -g
13666 do
13667 case $cf_fix_cppflags in
13668 no)
13669         case $cf_add_cflags in #(vi
13670         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13671                 case $cf_add_cflags in
13672                 -D*)
13673                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13674
13675                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13676                                 && test -z "${cf_tst_cflags}" \
13677                                 && cf_fix_cppflags=yes
13678
13679                         if test $cf_fix_cppflags = yes ; then
13680                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13681                                 continue
13682                         elif test "${cf_tst_cflags}" = "\"'" ; then
13683                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13684                                 continue
13685                         fi
13686                         ;;
13687                 esac
13688                 case "$CPPFLAGS" in
13689                 *$cf_add_cflags) #(vi
13690                         ;;
13691                 *) #(vi
13692                         case $cf_add_cflags in #(vi
13693                         -D*)
13694                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13695
13696 CPPFLAGS=`echo "$CPPFLAGS" | \
13697         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13698                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13699
13700                                 ;;
13701                         esac
13702                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13703                         ;;
13704                 esac
13705                 ;;
13706         *)
13707                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13708                 ;;
13709         esac
13710         ;;
13711 yes)
13712         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13713
13714         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13715
13716         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13717                 && test -z "${cf_tst_cflags}" \
13718                 && cf_fix_cppflags=no
13719         ;;
13720 esac
13721 done
13722
13723 if test -n "$cf_new_cflags" ; then
13724
13725         CFLAGS="$CFLAGS $cf_new_cflags"
13726 fi
13727
13728 if test -n "$cf_new_cppflags" ; then
13729
13730         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13731 fi
13732
13733 if test -n "$cf_new_extra_cppflags" ; then
13734
13735         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13736 fi
13737
13738                 ;;
13739         esac
13740         ;;
13741 esac
13742
13743 if test "$with_dbmalloc" = yes ; then
13744         echo "$as_me:13744: checking for dbmalloc.h" >&5
13745 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13746 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13747   echo $ECHO_N "(cached) $ECHO_C" >&6
13748 else
13749   cat >conftest.$ac_ext <<_ACEOF
13750 #line 13750 "configure"
13751 #include "confdefs.h"
13752 #include <dbmalloc.h>
13753 _ACEOF
13754 if { (eval echo "$as_me:13754: \"$ac_cpp conftest.$ac_ext\"") >&5
13755   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13756   ac_status=$?
13757   egrep -v '^ *\+' conftest.er1 >conftest.err
13758   rm -f conftest.er1
13759   cat conftest.err >&5
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit $ac_status); } >/dev/null; then
13762   if test -s conftest.err; then
13763     ac_cpp_err=$ac_c_preproc_warn_flag
13764   else
13765     ac_cpp_err=
13766   fi
13767 else
13768   ac_cpp_err=yes
13769 fi
13770 if test -z "$ac_cpp_err"; then
13771   ac_cv_header_dbmalloc_h=yes
13772 else
13773   echo "$as_me: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   ac_cv_header_dbmalloc_h=no
13776 fi
13777 rm -f conftest.err conftest.$ac_ext
13778 fi
13779 echo "$as_me:13779: result: $ac_cv_header_dbmalloc_h" >&5
13780 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13781 if test $ac_cv_header_dbmalloc_h = yes; then
13782
13783 echo "$as_me:13783: checking for debug_malloc in -ldbmalloc" >&5
13784 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13785 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13786   echo $ECHO_N "(cached) $ECHO_C" >&6
13787 else
13788   ac_check_lib_save_LIBS=$LIBS
13789 LIBS="-ldbmalloc  $LIBS"
13790 cat >conftest.$ac_ext <<_ACEOF
13791 #line 13791 "configure"
13792 #include "confdefs.h"
13793
13794 /* Override any gcc2 internal prototype to avoid an error.  */
13795 #ifdef __cplusplus
13796 extern "C"
13797 #endif
13798 /* We use char because int might match the return type of a gcc2
13799    builtin and then its argument prototype would still apply.  */
13800 char debug_malloc ();
13801 int
13802 main ()
13803 {
13804 debug_malloc ();
13805   ;
13806   return 0;
13807 }
13808 _ACEOF
13809 rm -f conftest.$ac_objext conftest$ac_exeext
13810 if { (eval echo "$as_me:13810: \"$ac_link\"") >&5
13811   (eval $ac_link) 2>&5
13812   ac_status=$?
13813   echo "$as_me:13813: \$? = $ac_status" >&5
13814   (exit $ac_status); } &&
13815          { ac_try='test -s conftest$ac_exeext'
13816   { (eval echo "$as_me:13816: \"$ac_try\"") >&5
13817   (eval $ac_try) 2>&5
13818   ac_status=$?
13819   echo "$as_me:13819: \$? = $ac_status" >&5
13820   (exit $ac_status); }; }; then
13821   ac_cv_lib_dbmalloc_debug_malloc=yes
13822 else
13823   echo "$as_me: failed program was:" >&5
13824 cat conftest.$ac_ext >&5
13825 ac_cv_lib_dbmalloc_debug_malloc=no
13826 fi
13827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13828 LIBS=$ac_check_lib_save_LIBS
13829 fi
13830 echo "$as_me:13830: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13831 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13832 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13833   cat >>confdefs.h <<EOF
13834 #define HAVE_LIBDBMALLOC 1
13835 EOF
13836
13837   LIBS="-ldbmalloc $LIBS"
13838
13839 fi
13840
13841 fi
13842
13843 fi
13844
13845 echo "$as_me:13845: checking if you want to use valgrind for testing" >&5
13846 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13847
13848 # Check whether --with-valgrind or --without-valgrind was given.
13849 if test "${with_valgrind+set}" = set; then
13850   withval="$with_valgrind"
13851
13852 cat >>confdefs.h <<EOF
13853 #define USE_VALGRIND 1
13854 EOF
13855
13856         : ${with_cflags:=-g}
13857         : ${with_no_leaks:=yes}
13858          with_valgrind=yes
13859 else
13860   with_valgrind=
13861 fi;
13862 echo "$as_me:13862: result: ${with_valgrind:-no}" >&5
13863 echo "${ECHO_T}${with_valgrind:-no}" >&6
13864
13865 case .$with_cflags in #(vi
13866 .*-g*)
13867         case .$CFLAGS in #(vi
13868         .*-g*) #(vi
13869                 ;;
13870         *)
13871
13872 cf_fix_cppflags=no
13873 cf_new_cflags=
13874 cf_new_cppflags=
13875 cf_new_extra_cppflags=
13876
13877 for cf_add_cflags in -g
13878 do
13879 case $cf_fix_cppflags in
13880 no)
13881         case $cf_add_cflags in #(vi
13882         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13883                 case $cf_add_cflags in
13884                 -D*)
13885                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13886
13887                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13888                                 && test -z "${cf_tst_cflags}" \
13889                                 && cf_fix_cppflags=yes
13890
13891                         if test $cf_fix_cppflags = yes ; then
13892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13893                                 continue
13894                         elif test "${cf_tst_cflags}" = "\"'" ; then
13895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13896                                 continue
13897                         fi
13898                         ;;
13899                 esac
13900                 case "$CPPFLAGS" in
13901                 *$cf_add_cflags) #(vi
13902                         ;;
13903                 *) #(vi
13904                         case $cf_add_cflags in #(vi
13905                         -D*)
13906                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13907
13908 CPPFLAGS=`echo "$CPPFLAGS" | \
13909         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13910                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13911
13912                                 ;;
13913                         esac
13914                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13915                         ;;
13916                 esac
13917                 ;;
13918         *)
13919                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13920                 ;;
13921         esac
13922         ;;
13923 yes)
13924         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13925
13926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13927
13928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13929                 && test -z "${cf_tst_cflags}" \
13930                 && cf_fix_cppflags=no
13931         ;;
13932 esac
13933 done
13934
13935 if test -n "$cf_new_cflags" ; then
13936
13937         CFLAGS="$CFLAGS $cf_new_cflags"
13938 fi
13939
13940 if test -n "$cf_new_cppflags" ; then
13941
13942         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13943 fi
13944
13945 if test -n "$cf_new_extra_cppflags" ; then
13946
13947         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13948 fi
13949
13950                 ;;
13951         esac
13952         ;;
13953 esac
13954
13955 echo "$as_me:13955: checking if you want to perform memory-leak testing" >&5
13956 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13957
13958 # Check whether --enable-leaks or --disable-leaks was given.
13959 if test "${enable_leaks+set}" = set; then
13960   enableval="$enable_leaks"
13961   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13962 else
13963   : ${with_no_leaks:=no}
13964 fi;
13965 echo "$as_me:13965: result: $with_no_leaks" >&5
13966 echo "${ECHO_T}$with_no_leaks" >&6
13967
13968 if test "$with_no_leaks" = yes ; then
13969
13970 cat >>confdefs.h <<\EOF
13971 #define NO_LEAKS 1
13972 EOF
13973
13974 cat >>confdefs.h <<\EOF
13975 #define YY_NO_LEAKS 1
13976 EOF
13977
13978 fi
13979
13980 cat >>confdefs.h <<\EOF
13981 #define HAVE_NC_ALLOC_H 1
13982 EOF
13983
13984 ###     use option --enable-expanded to generate certain macros as functions
13985
13986 # Check whether --enable-expanded or --disable-expanded was given.
13987 if test "${enable_expanded+set}" = set; then
13988   enableval="$enable_expanded"
13989   test "x$enableval" = xyes &&
13990 cat >>confdefs.h <<\EOF
13991 #define NCURSES_EXPANDED 1
13992 EOF
13993
13994 fi;
13995
13996 ###     use option --disable-macros to suppress macros in favor of functions
13997
13998 # Check whether --enable-macros or --disable-macros was given.
13999 if test "${enable_macros+set}" = set; then
14000   enableval="$enable_macros"
14001   test "$enableval" = no &&
14002 cat >>confdefs.h <<\EOF
14003 #define NCURSES_NOMACROS 1
14004 EOF
14005
14006 fi;
14007
14008 # Normally we only add trace() to the debug-library.  Allow this to be
14009 # extended to all models of the ncurses library:
14010 cf_all_traces=no
14011 case "$CFLAGS $CPPFLAGS" in
14012 *-DTRACE*)
14013         cf_all_traces=yes
14014         ;;
14015 esac
14016
14017 echo "$as_me:14017: checking whether to add trace feature to all models" >&5
14018 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14019
14020 # Check whether --with-trace or --without-trace was given.
14021 if test "${with_trace+set}" = set; then
14022   withval="$with_trace"
14023   cf_with_trace=$withval
14024 else
14025   cf_with_trace=$cf_all_traces
14026 fi;
14027 echo "$as_me:14027: result: $cf_with_trace" >&5
14028 echo "${ECHO_T}$cf_with_trace" >&6
14029
14030 if test "x$cf_with_trace" = xyes ; then
14031         LIB_TRACING=all
14032         ADA_TRACE=TRUE
14033
14034 cf_fix_cppflags=no
14035 cf_new_cflags=
14036 cf_new_cppflags=
14037 cf_new_extra_cppflags=
14038
14039 for cf_add_cflags in -DTRACE
14040 do
14041 case $cf_fix_cppflags in
14042 no)
14043         case $cf_add_cflags in #(vi
14044         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14045                 case $cf_add_cflags in
14046                 -D*)
14047                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14048
14049                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14050                                 && test -z "${cf_tst_cflags}" \
14051                                 && cf_fix_cppflags=yes
14052
14053                         if test $cf_fix_cppflags = yes ; then
14054                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14055                                 continue
14056                         elif test "${cf_tst_cflags}" = "\"'" ; then
14057                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14058                                 continue
14059                         fi
14060                         ;;
14061                 esac
14062                 case "$CPPFLAGS" in
14063                 *$cf_add_cflags) #(vi
14064                         ;;
14065                 *) #(vi
14066                         case $cf_add_cflags in #(vi
14067                         -D*)
14068                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14069
14070 CPPFLAGS=`echo "$CPPFLAGS" | \
14071         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14072                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14073
14074                                 ;;
14075                         esac
14076                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14077                         ;;
14078                 esac
14079                 ;;
14080         *)
14081                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14082                 ;;
14083         esac
14084         ;;
14085 yes)
14086         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14087
14088         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14089
14090         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14091                 && test -z "${cf_tst_cflags}" \
14092                 && cf_fix_cppflags=no
14093         ;;
14094 esac
14095 done
14096
14097 if test -n "$cf_new_cflags" ; then
14098
14099         CFLAGS="$CFLAGS $cf_new_cflags"
14100 fi
14101
14102 if test -n "$cf_new_cppflags" ; then
14103
14104         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14105 fi
14106
14107 if test -n "$cf_new_extra_cppflags" ; then
14108
14109         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14110 fi
14111
14112 else
14113         LIB_TRACING=DEBUG
14114         ADA_TRACE=FALSE
14115 fi
14116
14117 echo "$as_me:14117: checking if we want to use GNAT projects" >&5
14118 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14119
14120 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14121 if test "${enable_gnat_projects+set}" = set; then
14122   enableval="$enable_gnat_projects"
14123   test "$enableval" != no && enableval=yes
14124   if test "$enableval" != "yes" ; then
14125     enable_gnat_projects=no
14126   else
14127     enable_gnat_projects=yes
14128   fi
14129 else
14130   enableval=yes
14131   enable_gnat_projects=yes
14132
14133 fi;
14134 echo "$as_me:14134: result: $enable_gnat_projects" >&5
14135 echo "${ECHO_T}$enable_gnat_projects" >&6
14136
14137 ###     Checks for libraries.
14138 case $cf_cv_system_name in #(vi
14139 *mingw32*|*mingw64*) #(vi
14140         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14141         LIBS=" -lpsapi $LIBS"
14142         ;;
14143 *)
14144 echo "$as_me:14144: checking for gettimeofday" >&5
14145 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14146 if test "${ac_cv_func_gettimeofday+set}" = set; then
14147   echo $ECHO_N "(cached) $ECHO_C" >&6
14148 else
14149   cat >conftest.$ac_ext <<_ACEOF
14150 #line 14150 "configure"
14151 #include "confdefs.h"
14152 /* System header to define __stub macros and hopefully few prototypes,
14153     which can conflict with char gettimeofday (); below.  */
14154 #include <assert.h>
14155 /* Override any gcc2 internal prototype to avoid an error.  */
14156 #ifdef __cplusplus
14157 extern "C"
14158 #endif
14159 /* We use char because int might match the return type of a gcc2
14160    builtin and then its argument prototype would still apply.  */
14161 char gettimeofday ();
14162 char (*f) ();
14163
14164 int
14165 main ()
14166 {
14167 /* The GNU C library defines this for functions which it implements
14168     to always fail with ENOSYS.  Some functions are actually named
14169     something starting with __ and the normal name is an alias.  */
14170 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14171 choke me
14172 #else
14173 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14174 #endif
14175
14176   ;
14177   return 0;
14178 }
14179 _ACEOF
14180 rm -f conftest.$ac_objext conftest$ac_exeext
14181 if { (eval echo "$as_me:14181: \"$ac_link\"") >&5
14182   (eval $ac_link) 2>&5
14183   ac_status=$?
14184   echo "$as_me:14184: \$? = $ac_status" >&5
14185   (exit $ac_status); } &&
14186          { ac_try='test -s conftest$ac_exeext'
14187   { (eval echo "$as_me:14187: \"$ac_try\"") >&5
14188   (eval $ac_try) 2>&5
14189   ac_status=$?
14190   echo "$as_me:14190: \$? = $ac_status" >&5
14191   (exit $ac_status); }; }; then
14192   ac_cv_func_gettimeofday=yes
14193 else
14194   echo "$as_me: failed program was:" >&5
14195 cat conftest.$ac_ext >&5
14196 ac_cv_func_gettimeofday=no
14197 fi
14198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14199 fi
14200 echo "$as_me:14200: result: $ac_cv_func_gettimeofday" >&5
14201 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14202 if test $ac_cv_func_gettimeofday = yes; then
14203
14204 cat >>confdefs.h <<\EOF
14205 #define HAVE_GETTIMEOFDAY 1
14206 EOF
14207
14208 else
14209
14210 echo "$as_me:14210: checking for gettimeofday in -lbsd" >&5
14211 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14212 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14213   echo $ECHO_N "(cached) $ECHO_C" >&6
14214 else
14215   ac_check_lib_save_LIBS=$LIBS
14216 LIBS="-lbsd  $LIBS"
14217 cat >conftest.$ac_ext <<_ACEOF
14218 #line 14218 "configure"
14219 #include "confdefs.h"
14220
14221 /* Override any gcc2 internal prototype to avoid an error.  */
14222 #ifdef __cplusplus
14223 extern "C"
14224 #endif
14225 /* We use char because int might match the return type of a gcc2
14226    builtin and then its argument prototype would still apply.  */
14227 char gettimeofday ();
14228 int
14229 main ()
14230 {
14231 gettimeofday ();
14232   ;
14233   return 0;
14234 }
14235 _ACEOF
14236 rm -f conftest.$ac_objext conftest$ac_exeext
14237 if { (eval echo "$as_me:14237: \"$ac_link\"") >&5
14238   (eval $ac_link) 2>&5
14239   ac_status=$?
14240   echo "$as_me:14240: \$? = $ac_status" >&5
14241   (exit $ac_status); } &&
14242          { ac_try='test -s conftest$ac_exeext'
14243   { (eval echo "$as_me:14243: \"$ac_try\"") >&5
14244   (eval $ac_try) 2>&5
14245   ac_status=$?
14246   echo "$as_me:14246: \$? = $ac_status" >&5
14247   (exit $ac_status); }; }; then
14248   ac_cv_lib_bsd_gettimeofday=yes
14249 else
14250   echo "$as_me: failed program was:" >&5
14251 cat conftest.$ac_ext >&5
14252 ac_cv_lib_bsd_gettimeofday=no
14253 fi
14254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14255 LIBS=$ac_check_lib_save_LIBS
14256 fi
14257 echo "$as_me:14257: result: $ac_cv_lib_bsd_gettimeofday" >&5
14258 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14259 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14260
14261 cat >>confdefs.h <<\EOF
14262 #define HAVE_GETTIMEOFDAY 1
14263 EOF
14264
14265 cf_add_libs="-lbsd"
14266 # Filter out duplicates - this happens with badly-designed ".pc" files...
14267 for cf_add_1lib in $LIBS
14268 do
14269         for cf_add_2lib in $cf_add_libs
14270         do
14271                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14272                 then
14273                         cf_add_1lib=
14274                         break
14275                 fi
14276         done
14277         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14278 done
14279 LIBS="$cf_add_libs"
14280
14281 fi
14282
14283 fi
14284         ;;
14285 esac
14286
14287 echo "$as_me:14287: checking if -lm needed for math functions" >&5
14288 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14289 if test "${cf_cv_need_libm+set}" = set; then
14290   echo $ECHO_N "(cached) $ECHO_C" >&6
14291 else
14292
14293         cat >conftest.$ac_ext <<_ACEOF
14294 #line 14294 "configure"
14295 #include "confdefs.h"
14296
14297         #include <stdio.h>
14298         #include <math.h>
14299
14300 int
14301 main ()
14302 {
14303 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14304   ;
14305   return 0;
14306 }
14307 _ACEOF
14308 rm -f conftest.$ac_objext conftest$ac_exeext
14309 if { (eval echo "$as_me:14309: \"$ac_link\"") >&5
14310   (eval $ac_link) 2>&5
14311   ac_status=$?
14312   echo "$as_me:14312: \$? = $ac_status" >&5
14313   (exit $ac_status); } &&
14314          { ac_try='test -s conftest$ac_exeext'
14315   { (eval echo "$as_me:14315: \"$ac_try\"") >&5
14316   (eval $ac_try) 2>&5
14317   ac_status=$?
14318   echo "$as_me:14318: \$? = $ac_status" >&5
14319   (exit $ac_status); }; }; then
14320   cf_cv_need_libm=no
14321 else
14322   echo "$as_me: failed program was:" >&5
14323 cat conftest.$ac_ext >&5
14324 cf_cv_need_libm=yes
14325 fi
14326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14327 fi
14328 echo "$as_me:14328: result: $cf_cv_need_libm" >&5
14329 echo "${ECHO_T}$cf_cv_need_libm" >&6
14330 if test "$cf_cv_need_libm" = yes
14331 then
14332 MATH_LIB=-lm
14333 fi
14334
14335 ###     Checks for header files.
14336 echo "$as_me:14336: checking for ANSI C header files" >&5
14337 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14338 if test "${ac_cv_header_stdc+set}" = set; then
14339   echo $ECHO_N "(cached) $ECHO_C" >&6
14340 else
14341   cat >conftest.$ac_ext <<_ACEOF
14342 #line 14342 "configure"
14343 #include "confdefs.h"
14344 #include <stdlib.h>
14345 #include <stdarg.h>
14346 #include <string.h>
14347 #include <float.h>
14348
14349 _ACEOF
14350 if { (eval echo "$as_me:14350: \"$ac_cpp conftest.$ac_ext\"") >&5
14351   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14352   ac_status=$?
14353   egrep -v '^ *\+' conftest.er1 >conftest.err
14354   rm -f conftest.er1
14355   cat conftest.err >&5
14356   echo "$as_me:14356: \$? = $ac_status" >&5
14357   (exit $ac_status); } >/dev/null; then
14358   if test -s conftest.err; then
14359     ac_cpp_err=$ac_c_preproc_warn_flag
14360   else
14361     ac_cpp_err=
14362   fi
14363 else
14364   ac_cpp_err=yes
14365 fi
14366 if test -z "$ac_cpp_err"; then
14367   ac_cv_header_stdc=yes
14368 else
14369   echo "$as_me: failed program was:" >&5
14370   cat conftest.$ac_ext >&5
14371   ac_cv_header_stdc=no
14372 fi
14373 rm -f conftest.err conftest.$ac_ext
14374
14375 if test $ac_cv_header_stdc = yes; then
14376   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14377   cat >conftest.$ac_ext <<_ACEOF
14378 #line 14378 "configure"
14379 #include "confdefs.h"
14380 #include <string.h>
14381
14382 _ACEOF
14383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14384   egrep "memchr" >/dev/null 2>&1; then
14385   :
14386 else
14387   ac_cv_header_stdc=no
14388 fi
14389 rm -rf conftest*
14390
14391 fi
14392
14393 if test $ac_cv_header_stdc = yes; then
14394   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14395   cat >conftest.$ac_ext <<_ACEOF
14396 #line 14396 "configure"
14397 #include "confdefs.h"
14398 #include <stdlib.h>
14399
14400 _ACEOF
14401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14402   egrep "free" >/dev/null 2>&1; then
14403   :
14404 else
14405   ac_cv_header_stdc=no
14406 fi
14407 rm -rf conftest*
14408
14409 fi
14410
14411 if test $ac_cv_header_stdc = yes; then
14412   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14413   if test "$cross_compiling" = yes; then
14414   :
14415 else
14416   cat >conftest.$ac_ext <<_ACEOF
14417 #line 14417 "configure"
14418 #include "confdefs.h"
14419 #include <ctype.h>
14420 #if ((' ' & 0x0FF) == 0x020)
14421 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14422 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14423 #else
14424 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14425                      || ('j' <= (c) && (c) <= 'r') \
14426                      || ('s' <= (c) && (c) <= 'z'))
14427 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14428 #endif
14429
14430 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14431 int
14432 main ()
14433 {
14434   int i;
14435   for (i = 0; i < 256; i++)
14436     if (XOR (islower (i), ISLOWER (i))
14437         || toupper (i) != TOUPPER (i))
14438       $ac_main_return(2);
14439   $ac_main_return (0);
14440 }
14441 _ACEOF
14442 rm -f conftest$ac_exeext
14443 if { (eval echo "$as_me:14443: \"$ac_link\"") >&5
14444   (eval $ac_link) 2>&5
14445   ac_status=$?
14446   echo "$as_me:14446: \$? = $ac_status" >&5
14447   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14448   { (eval echo "$as_me:14448: \"$ac_try\"") >&5
14449   (eval $ac_try) 2>&5
14450   ac_status=$?
14451   echo "$as_me:14451: \$? = $ac_status" >&5
14452   (exit $ac_status); }; }; then
14453   :
14454 else
14455   echo "$as_me: program exited with status $ac_status" >&5
14456 echo "$as_me: failed program was:" >&5
14457 cat conftest.$ac_ext >&5
14458 ac_cv_header_stdc=no
14459 fi
14460 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14461 fi
14462 fi
14463 fi
14464 echo "$as_me:14464: result: $ac_cv_header_stdc" >&5
14465 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14466 if test $ac_cv_header_stdc = yes; then
14467
14468 cat >>confdefs.h <<\EOF
14469 #define STDC_HEADERS 1
14470 EOF
14471
14472 fi
14473
14474 ac_header_dirent=no
14475 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14476   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14477 echo "$as_me:14477: checking for $ac_hdr that defines DIR" >&5
14478 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14479 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14480   echo $ECHO_N "(cached) $ECHO_C" >&6
14481 else
14482   cat >conftest.$ac_ext <<_ACEOF
14483 #line 14483 "configure"
14484 #include "confdefs.h"
14485 #include <sys/types.h>
14486 #include <$ac_hdr>
14487
14488 int
14489 main ()
14490 {
14491 if ((DIR *) 0)
14492 return 0;
14493   ;
14494   return 0;
14495 }
14496 _ACEOF
14497 rm -f conftest.$ac_objext
14498 if { (eval echo "$as_me:14498: \"$ac_compile\"") >&5
14499   (eval $ac_compile) 2>&5
14500   ac_status=$?
14501   echo "$as_me:14501: \$? = $ac_status" >&5
14502   (exit $ac_status); } &&
14503          { ac_try='test -s conftest.$ac_objext'
14504   { (eval echo "$as_me:14504: \"$ac_try\"") >&5
14505   (eval $ac_try) 2>&5
14506   ac_status=$?
14507   echo "$as_me:14507: \$? = $ac_status" >&5
14508   (exit $ac_status); }; }; then
14509   eval "$as_ac_Header=yes"
14510 else
14511   echo "$as_me: failed program was:" >&5
14512 cat conftest.$ac_ext >&5
14513 eval "$as_ac_Header=no"
14514 fi
14515 rm -f conftest.$ac_objext conftest.$ac_ext
14516 fi
14517 echo "$as_me:14517: result: `eval echo '${'$as_ac_Header'}'`" >&5
14518 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14519 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14520   cat >>confdefs.h <<EOF
14521 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14522 EOF
14523
14524 ac_header_dirent=$ac_hdr; break
14525 fi
14526
14527 done
14528 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14529 if test $ac_header_dirent = dirent.h; then
14530   echo "$as_me:14530: checking for opendir in -ldir" >&5
14531 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14532 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14533   echo $ECHO_N "(cached) $ECHO_C" >&6
14534 else
14535   ac_check_lib_save_LIBS=$LIBS
14536 LIBS="-ldir  $LIBS"
14537 cat >conftest.$ac_ext <<_ACEOF
14538 #line 14538 "configure"
14539 #include "confdefs.h"
14540
14541 /* Override any gcc2 internal prototype to avoid an error.  */
14542 #ifdef __cplusplus
14543 extern "C"
14544 #endif
14545 /* We use char because int might match the return type of a gcc2
14546    builtin and then its argument prototype would still apply.  */
14547 char opendir ();
14548 int
14549 main ()
14550 {
14551 opendir ();
14552   ;
14553   return 0;
14554 }
14555 _ACEOF
14556 rm -f conftest.$ac_objext conftest$ac_exeext
14557 if { (eval echo "$as_me:14557: \"$ac_link\"") >&5
14558   (eval $ac_link) 2>&5
14559   ac_status=$?
14560   echo "$as_me:14560: \$? = $ac_status" >&5
14561   (exit $ac_status); } &&
14562          { ac_try='test -s conftest$ac_exeext'
14563   { (eval echo "$as_me:14563: \"$ac_try\"") >&5
14564   (eval $ac_try) 2>&5
14565   ac_status=$?
14566   echo "$as_me:14566: \$? = $ac_status" >&5
14567   (exit $ac_status); }; }; then
14568   ac_cv_lib_dir_opendir=yes
14569 else
14570   echo "$as_me: failed program was:" >&5
14571 cat conftest.$ac_ext >&5
14572 ac_cv_lib_dir_opendir=no
14573 fi
14574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14575 LIBS=$ac_check_lib_save_LIBS
14576 fi
14577 echo "$as_me:14577: result: $ac_cv_lib_dir_opendir" >&5
14578 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14579 if test $ac_cv_lib_dir_opendir = yes; then
14580   LIBS="$LIBS -ldir"
14581 fi
14582
14583 else
14584   echo "$as_me:14584: checking for opendir in -lx" >&5
14585 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14586 if test "${ac_cv_lib_x_opendir+set}" = set; then
14587   echo $ECHO_N "(cached) $ECHO_C" >&6
14588 else
14589   ac_check_lib_save_LIBS=$LIBS
14590 LIBS="-lx  $LIBS"
14591 cat >conftest.$ac_ext <<_ACEOF
14592 #line 14592 "configure"
14593 #include "confdefs.h"
14594
14595 /* Override any gcc2 internal prototype to avoid an error.  */
14596 #ifdef __cplusplus
14597 extern "C"
14598 #endif
14599 /* We use char because int might match the return type of a gcc2
14600    builtin and then its argument prototype would still apply.  */
14601 char opendir ();
14602 int
14603 main ()
14604 {
14605 opendir ();
14606   ;
14607   return 0;
14608 }
14609 _ACEOF
14610 rm -f conftest.$ac_objext conftest$ac_exeext
14611 if { (eval echo "$as_me:14611: \"$ac_link\"") >&5
14612   (eval $ac_link) 2>&5
14613   ac_status=$?
14614   echo "$as_me:14614: \$? = $ac_status" >&5
14615   (exit $ac_status); } &&
14616          { ac_try='test -s conftest$ac_exeext'
14617   { (eval echo "$as_me:14617: \"$ac_try\"") >&5
14618   (eval $ac_try) 2>&5
14619   ac_status=$?
14620   echo "$as_me:14620: \$? = $ac_status" >&5
14621   (exit $ac_status); }; }; then
14622   ac_cv_lib_x_opendir=yes
14623 else
14624   echo "$as_me: failed program was:" >&5
14625 cat conftest.$ac_ext >&5
14626 ac_cv_lib_x_opendir=no
14627 fi
14628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14629 LIBS=$ac_check_lib_save_LIBS
14630 fi
14631 echo "$as_me:14631: result: $ac_cv_lib_x_opendir" >&5
14632 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14633 if test $ac_cv_lib_x_opendir = yes; then
14634   LIBS="$LIBS -lx"
14635 fi
14636
14637 fi
14638
14639 echo "$as_me:14639: checking whether time.h and sys/time.h may both be included" >&5
14640 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14641 if test "${ac_cv_header_time+set}" = set; then
14642   echo $ECHO_N "(cached) $ECHO_C" >&6
14643 else
14644   cat >conftest.$ac_ext <<_ACEOF
14645 #line 14645 "configure"
14646 #include "confdefs.h"
14647 #include <sys/types.h>
14648 #include <sys/time.h>
14649 #include <time.h>
14650
14651 int
14652 main ()
14653 {
14654 if ((struct tm *) 0)
14655 return 0;
14656   ;
14657   return 0;
14658 }
14659 _ACEOF
14660 rm -f conftest.$ac_objext
14661 if { (eval echo "$as_me:14661: \"$ac_compile\"") >&5
14662   (eval $ac_compile) 2>&5
14663   ac_status=$?
14664   echo "$as_me:14664: \$? = $ac_status" >&5
14665   (exit $ac_status); } &&
14666          { ac_try='test -s conftest.$ac_objext'
14667   { (eval echo "$as_me:14667: \"$ac_try\"") >&5
14668   (eval $ac_try) 2>&5
14669   ac_status=$?
14670   echo "$as_me:14670: \$? = $ac_status" >&5
14671   (exit $ac_status); }; }; then
14672   ac_cv_header_time=yes
14673 else
14674   echo "$as_me: failed program was:" >&5
14675 cat conftest.$ac_ext >&5
14676 ac_cv_header_time=no
14677 fi
14678 rm -f conftest.$ac_objext conftest.$ac_ext
14679 fi
14680 echo "$as_me:14680: result: $ac_cv_header_time" >&5
14681 echo "${ECHO_T}$ac_cv_header_time" >&6
14682 if test $ac_cv_header_time = yes; then
14683
14684 cat >>confdefs.h <<\EOF
14685 #define TIME_WITH_SYS_TIME 1
14686 EOF
14687
14688 fi
14689
14690 cf_regex_func=no
14691
14692 cf_regex_libs="regex re"
14693 case $host_os in #(vi
14694 mingw*)
14695         cf_regex_libs="gnurx $cf_regex_libs"
14696         ;;
14697 esac
14698
14699 echo "$as_me:14699: checking for regcomp" >&5
14700 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14701 if test "${ac_cv_func_regcomp+set}" = set; then
14702   echo $ECHO_N "(cached) $ECHO_C" >&6
14703 else
14704   cat >conftest.$ac_ext <<_ACEOF
14705 #line 14705 "configure"
14706 #include "confdefs.h"
14707 /* System header to define __stub macros and hopefully few prototypes,
14708     which can conflict with char regcomp (); below.  */
14709 #include <assert.h>
14710 /* Override any gcc2 internal prototype to avoid an error.  */
14711 #ifdef __cplusplus
14712 extern "C"
14713 #endif
14714 /* We use char because int might match the return type of a gcc2
14715    builtin and then its argument prototype would still apply.  */
14716 char regcomp ();
14717 char (*f) ();
14718
14719 int
14720 main ()
14721 {
14722 /* The GNU C library defines this for functions which it implements
14723     to always fail with ENOSYS.  Some functions are actually named
14724     something starting with __ and the normal name is an alias.  */
14725 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14726 choke me
14727 #else
14728 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14729 #endif
14730
14731   ;
14732   return 0;
14733 }
14734 _ACEOF
14735 rm -f conftest.$ac_objext conftest$ac_exeext
14736 if { (eval echo "$as_me:14736: \"$ac_link\"") >&5
14737   (eval $ac_link) 2>&5
14738   ac_status=$?
14739   echo "$as_me:14739: \$? = $ac_status" >&5
14740   (exit $ac_status); } &&
14741          { ac_try='test -s conftest$ac_exeext'
14742   { (eval echo "$as_me:14742: \"$ac_try\"") >&5
14743   (eval $ac_try) 2>&5
14744   ac_status=$?
14745   echo "$as_me:14745: \$? = $ac_status" >&5
14746   (exit $ac_status); }; }; then
14747   ac_cv_func_regcomp=yes
14748 else
14749   echo "$as_me: failed program was:" >&5
14750 cat conftest.$ac_ext >&5
14751 ac_cv_func_regcomp=no
14752 fi
14753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14754 fi
14755 echo "$as_me:14755: result: $ac_cv_func_regcomp" >&5
14756 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14757 if test $ac_cv_func_regcomp = yes; then
14758   cf_regex_func=regcomp
14759 else
14760
14761         for cf_regex_lib in $cf_regex_libs
14762         do
14763                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14764 echo "$as_me:14764: checking for regcomp in -l$cf_regex_lib" >&5
14765 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14766 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14767   echo $ECHO_N "(cached) $ECHO_C" >&6
14768 else
14769   ac_check_lib_save_LIBS=$LIBS
14770 LIBS="-l$cf_regex_lib  $LIBS"
14771 cat >conftest.$ac_ext <<_ACEOF
14772 #line 14772 "configure"
14773 #include "confdefs.h"
14774
14775 /* Override any gcc2 internal prototype to avoid an error.  */
14776 #ifdef __cplusplus
14777 extern "C"
14778 #endif
14779 /* We use char because int might match the return type of a gcc2
14780    builtin and then its argument prototype would still apply.  */
14781 char regcomp ();
14782 int
14783 main ()
14784 {
14785 regcomp ();
14786   ;
14787   return 0;
14788 }
14789 _ACEOF
14790 rm -f conftest.$ac_objext conftest$ac_exeext
14791 if { (eval echo "$as_me:14791: \"$ac_link\"") >&5
14792   (eval $ac_link) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); } &&
14796          { ac_try='test -s conftest$ac_exeext'
14797   { (eval echo "$as_me:14797: \"$ac_try\"") >&5
14798   (eval $ac_try) 2>&5
14799   ac_status=$?
14800   echo "$as_me:14800: \$? = $ac_status" >&5
14801   (exit $ac_status); }; }; then
14802   eval "$as_ac_Lib=yes"
14803 else
14804   echo "$as_me: failed program was:" >&5
14805 cat conftest.$ac_ext >&5
14806 eval "$as_ac_Lib=no"
14807 fi
14808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14809 LIBS=$ac_check_lib_save_LIBS
14810 fi
14811 echo "$as_me:14811: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14812 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14813 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14814
14815 cf_add_libs="-l$cf_regex_lib"
14816 # Filter out duplicates - this happens with badly-designed ".pc" files...
14817 for cf_add_1lib in $LIBS
14818 do
14819         for cf_add_2lib in $cf_add_libs
14820         do
14821                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14822                 then
14823                         cf_add_1lib=
14824                         break
14825                 fi
14826         done
14827         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14828 done
14829 LIBS="$cf_add_libs"
14830
14831                                 cf_regex_func=regcomp
14832                                 break
14833 fi
14834
14835         done
14836
14837 fi
14838
14839 if test "$cf_regex_func" = no ; then
14840         echo "$as_me:14840: checking for compile" >&5
14841 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14842 if test "${ac_cv_func_compile+set}" = set; then
14843   echo $ECHO_N "(cached) $ECHO_C" >&6
14844 else
14845   cat >conftest.$ac_ext <<_ACEOF
14846 #line 14846 "configure"
14847 #include "confdefs.h"
14848 /* System header to define __stub macros and hopefully few prototypes,
14849     which can conflict with char compile (); below.  */
14850 #include <assert.h>
14851 /* Override any gcc2 internal prototype to avoid an error.  */
14852 #ifdef __cplusplus
14853 extern "C"
14854 #endif
14855 /* We use char because int might match the return type of a gcc2
14856    builtin and then its argument prototype would still apply.  */
14857 char compile ();
14858 char (*f) ();
14859
14860 int
14861 main ()
14862 {
14863 /* The GNU C library defines this for functions which it implements
14864     to always fail with ENOSYS.  Some functions are actually named
14865     something starting with __ and the normal name is an alias.  */
14866 #if defined (__stub_compile) || defined (__stub___compile)
14867 choke me
14868 #else
14869 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14870 #endif
14871
14872   ;
14873   return 0;
14874 }
14875 _ACEOF
14876 rm -f conftest.$ac_objext conftest$ac_exeext
14877 if { (eval echo "$as_me:14877: \"$ac_link\"") >&5
14878   (eval $ac_link) 2>&5
14879   ac_status=$?
14880   echo "$as_me:14880: \$? = $ac_status" >&5
14881   (exit $ac_status); } &&
14882          { ac_try='test -s conftest$ac_exeext'
14883   { (eval echo "$as_me:14883: \"$ac_try\"") >&5
14884   (eval $ac_try) 2>&5
14885   ac_status=$?
14886   echo "$as_me:14886: \$? = $ac_status" >&5
14887   (exit $ac_status); }; }; then
14888   ac_cv_func_compile=yes
14889 else
14890   echo "$as_me: failed program was:" >&5
14891 cat conftest.$ac_ext >&5
14892 ac_cv_func_compile=no
14893 fi
14894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14895 fi
14896 echo "$as_me:14896: result: $ac_cv_func_compile" >&5
14897 echo "${ECHO_T}$ac_cv_func_compile" >&6
14898 if test $ac_cv_func_compile = yes; then
14899   cf_regex_func=compile
14900 else
14901
14902                 echo "$as_me:14902: checking for compile in -lgen" >&5
14903 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14904 if test "${ac_cv_lib_gen_compile+set}" = set; then
14905   echo $ECHO_N "(cached) $ECHO_C" >&6
14906 else
14907   ac_check_lib_save_LIBS=$LIBS
14908 LIBS="-lgen  $LIBS"
14909 cat >conftest.$ac_ext <<_ACEOF
14910 #line 14910 "configure"
14911 #include "confdefs.h"
14912
14913 /* Override any gcc2 internal prototype to avoid an error.  */
14914 #ifdef __cplusplus
14915 extern "C"
14916 #endif
14917 /* We use char because int might match the return type of a gcc2
14918    builtin and then its argument prototype would still apply.  */
14919 char compile ();
14920 int
14921 main ()
14922 {
14923 compile ();
14924   ;
14925   return 0;
14926 }
14927 _ACEOF
14928 rm -f conftest.$ac_objext conftest$ac_exeext
14929 if { (eval echo "$as_me:14929: \"$ac_link\"") >&5
14930   (eval $ac_link) 2>&5
14931   ac_status=$?
14932   echo "$as_me:14932: \$? = $ac_status" >&5
14933   (exit $ac_status); } &&
14934          { ac_try='test -s conftest$ac_exeext'
14935   { (eval echo "$as_me:14935: \"$ac_try\"") >&5
14936   (eval $ac_try) 2>&5
14937   ac_status=$?
14938   echo "$as_me:14938: \$? = $ac_status" >&5
14939   (exit $ac_status); }; }; then
14940   ac_cv_lib_gen_compile=yes
14941 else
14942   echo "$as_me: failed program was:" >&5
14943 cat conftest.$ac_ext >&5
14944 ac_cv_lib_gen_compile=no
14945 fi
14946 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14947 LIBS=$ac_check_lib_save_LIBS
14948 fi
14949 echo "$as_me:14949: result: $ac_cv_lib_gen_compile" >&5
14950 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14951 if test $ac_cv_lib_gen_compile = yes; then
14952
14953 cf_add_libs="-lgen"
14954 # Filter out duplicates - this happens with badly-designed ".pc" files...
14955 for cf_add_1lib in $LIBS
14956 do
14957         for cf_add_2lib in $cf_add_libs
14958         do
14959                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14960                 then
14961                         cf_add_1lib=
14962                         break
14963                 fi
14964         done
14965         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14966 done
14967 LIBS="$cf_add_libs"
14968
14969                                 cf_regex_func=compile
14970 fi
14971
14972 fi
14973
14974 fi
14975
14976 if test "$cf_regex_func" = no ; then
14977         { echo "$as_me:14977: WARNING: cannot find regular expression library" >&5
14978 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14979 fi
14980
14981 echo "$as_me:14981: checking for regular-expression headers" >&5
14982 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14983 if test "${cf_cv_regex_hdrs+set}" = set; then
14984   echo $ECHO_N "(cached) $ECHO_C" >&6
14985 else
14986
14987 cf_cv_regex_hdrs=no
14988 case $cf_regex_func in #(vi
14989 compile) #(vi
14990         for cf_regex_hdr in regexp.h regexpr.h
14991         do
14992                 cat >conftest.$ac_ext <<_ACEOF
14993 #line 14993 "configure"
14994 #include "confdefs.h"
14995 #include <$cf_regex_hdr>
14996 int
14997 main ()
14998 {
14999
15000                         char *p = compile("", "", "", 0);
15001                         int x = step("", "");
15002
15003   ;
15004   return 0;
15005 }
15006 _ACEOF
15007 rm -f conftest.$ac_objext conftest$ac_exeext
15008 if { (eval echo "$as_me:15008: \"$ac_link\"") >&5
15009   (eval $ac_link) 2>&5
15010   ac_status=$?
15011   echo "$as_me:15011: \$? = $ac_status" >&5
15012   (exit $ac_status); } &&
15013          { ac_try='test -s conftest$ac_exeext'
15014   { (eval echo "$as_me:15014: \"$ac_try\"") >&5
15015   (eval $ac_try) 2>&5
15016   ac_status=$?
15017   echo "$as_me:15017: \$? = $ac_status" >&5
15018   (exit $ac_status); }; }; then
15019
15020                         cf_cv_regex_hdrs=$cf_regex_hdr
15021                         break
15022
15023 else
15024   echo "$as_me: failed program was:" >&5
15025 cat conftest.$ac_ext >&5
15026 fi
15027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15028         done
15029         ;;
15030 *)
15031         for cf_regex_hdr in regex.h
15032         do
15033                 cat >conftest.$ac_ext <<_ACEOF
15034 #line 15034 "configure"
15035 #include "confdefs.h"
15036 #include <sys/types.h>
15037 #include <$cf_regex_hdr>
15038 int
15039 main ()
15040 {
15041
15042                         regex_t *p;
15043                         int x = regcomp(p, "", 0);
15044                         int y = regexec(p, "", 0, 0, 0);
15045                         regfree(p);
15046
15047   ;
15048   return 0;
15049 }
15050 _ACEOF
15051 rm -f conftest.$ac_objext conftest$ac_exeext
15052 if { (eval echo "$as_me:15052: \"$ac_link\"") >&5
15053   (eval $ac_link) 2>&5
15054   ac_status=$?
15055   echo "$as_me:15055: \$? = $ac_status" >&5
15056   (exit $ac_status); } &&
15057          { ac_try='test -s conftest$ac_exeext'
15058   { (eval echo "$as_me:15058: \"$ac_try\"") >&5
15059   (eval $ac_try) 2>&5
15060   ac_status=$?
15061   echo "$as_me:15061: \$? = $ac_status" >&5
15062   (exit $ac_status); }; }; then
15063
15064                         cf_cv_regex_hdrs=$cf_regex_hdr
15065                         break
15066
15067 else
15068   echo "$as_me: failed program was:" >&5
15069 cat conftest.$ac_ext >&5
15070 fi
15071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15072         done
15073         ;;
15074 esac
15075
15076 fi
15077 echo "$as_me:15077: result: $cf_cv_regex_hdrs" >&5
15078 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15079
15080 case $cf_cv_regex_hdrs in #(vi
15081     no)        { echo "$as_me:15081: WARNING: no regular expression header found" >&5
15082 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
15083     regex.h)
15084 cat >>confdefs.h <<\EOF
15085 #define HAVE_REGEX_H_FUNCS 1
15086 EOF
15087  ;; #(vi
15088     regexp.h)
15089 cat >>confdefs.h <<\EOF
15090 #define HAVE_REGEXP_H_FUNCS 1
15091 EOF
15092  ;; #(vi
15093     regexpr.h)
15094 cat >>confdefs.h <<\EOF
15095 #define HAVE_REGEXPR_H_FUNCS 1
15096 EOF
15097  ;;
15098 esac
15099
15100 for ac_header in \
15101 fcntl.h \
15102 getopt.h \
15103 limits.h \
15104 locale.h \
15105 math.h \
15106 poll.h \
15107 sys/bsdtypes.h \
15108 sys/ioctl.h \
15109 sys/param.h \
15110 sys/poll.h \
15111 sys/select.h \
15112 sys/time.h \
15113 sys/times.h \
15114 ttyent.h \
15115 unistd.h \
15116 wctype.h \
15117
15118 do
15119 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15120 echo "$as_me:15120: checking for $ac_header" >&5
15121 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15122 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15123   echo $ECHO_N "(cached) $ECHO_C" >&6
15124 else
15125   cat >conftest.$ac_ext <<_ACEOF
15126 #line 15126 "configure"
15127 #include "confdefs.h"
15128 #include <$ac_header>
15129 _ACEOF
15130 if { (eval echo "$as_me:15130: \"$ac_cpp conftest.$ac_ext\"") >&5
15131   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15132   ac_status=$?
15133   egrep -v '^ *\+' conftest.er1 >conftest.err
15134   rm -f conftest.er1
15135   cat conftest.err >&5
15136   echo "$as_me:15136: \$? = $ac_status" >&5
15137   (exit $ac_status); } >/dev/null; then
15138   if test -s conftest.err; then
15139     ac_cpp_err=$ac_c_preproc_warn_flag
15140   else
15141     ac_cpp_err=
15142   fi
15143 else
15144   ac_cpp_err=yes
15145 fi
15146 if test -z "$ac_cpp_err"; then
15147   eval "$as_ac_Header=yes"
15148 else
15149   echo "$as_me: failed program was:" >&5
15150   cat conftest.$ac_ext >&5
15151   eval "$as_ac_Header=no"
15152 fi
15153 rm -f conftest.err conftest.$ac_ext
15154 fi
15155 echo "$as_me:15155: result: `eval echo '${'$as_ac_Header'}'`" >&5
15156 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15157 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15158   cat >>confdefs.h <<EOF
15159 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15160 EOF
15161
15162 fi
15163 done
15164
15165 for ac_header in unistd.h getopt.h
15166 do
15167 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15168 echo "$as_me:15168: checking for $ac_header" >&5
15169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15171   echo $ECHO_N "(cached) $ECHO_C" >&6
15172 else
15173   cat >conftest.$ac_ext <<_ACEOF
15174 #line 15174 "configure"
15175 #include "confdefs.h"
15176 #include <$ac_header>
15177 _ACEOF
15178 if { (eval echo "$as_me:15178: \"$ac_cpp conftest.$ac_ext\"") >&5
15179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15180   ac_status=$?
15181   egrep -v '^ *\+' conftest.er1 >conftest.err
15182   rm -f conftest.er1
15183   cat conftest.err >&5
15184   echo "$as_me:15184: \$? = $ac_status" >&5
15185   (exit $ac_status); } >/dev/null; then
15186   if test -s conftest.err; then
15187     ac_cpp_err=$ac_c_preproc_warn_flag
15188   else
15189     ac_cpp_err=
15190   fi
15191 else
15192   ac_cpp_err=yes
15193 fi
15194 if test -z "$ac_cpp_err"; then
15195   eval "$as_ac_Header=yes"
15196 else
15197   echo "$as_me: failed program was:" >&5
15198   cat conftest.$ac_ext >&5
15199   eval "$as_ac_Header=no"
15200 fi
15201 rm -f conftest.err conftest.$ac_ext
15202 fi
15203 echo "$as_me:15203: result: `eval echo '${'$as_ac_Header'}'`" >&5
15204 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15205 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15206   cat >>confdefs.h <<EOF
15207 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15208 EOF
15209
15210 fi
15211 done
15212
15213 echo "$as_me:15213: checking for header declaring getopt variables" >&5
15214 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15215 if test "${cf_cv_getopt_header+set}" = set; then
15216   echo $ECHO_N "(cached) $ECHO_C" >&6
15217 else
15218
15219 cf_cv_getopt_header=none
15220 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15221 do
15222 cat >conftest.$ac_ext <<_ACEOF
15223 #line 15223 "configure"
15224 #include "confdefs.h"
15225
15226 #include <$cf_header>
15227 int
15228 main ()
15229 {
15230 int x = optind; char *y = optarg
15231   ;
15232   return 0;
15233 }
15234 _ACEOF
15235 rm -f conftest.$ac_objext
15236 if { (eval echo "$as_me:15236: \"$ac_compile\"") >&5
15237   (eval $ac_compile) 2>&5
15238   ac_status=$?
15239   echo "$as_me:15239: \$? = $ac_status" >&5
15240   (exit $ac_status); } &&
15241          { ac_try='test -s conftest.$ac_objext'
15242   { (eval echo "$as_me:15242: \"$ac_try\"") >&5
15243   (eval $ac_try) 2>&5
15244   ac_status=$?
15245   echo "$as_me:15245: \$? = $ac_status" >&5
15246   (exit $ac_status); }; }; then
15247   cf_cv_getopt_header=$cf_header
15248  break
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_ext
15254 done
15255
15256 fi
15257 echo "$as_me:15257: result: $cf_cv_getopt_header" >&5
15258 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15259 if test $cf_cv_getopt_header != none ; then
15260
15261 cat >>confdefs.h <<\EOF
15262 #define HAVE_GETOPT_HEADER 1
15263 EOF
15264
15265 fi
15266 if test $cf_cv_getopt_header = getopt.h ; then
15267
15268 cat >>confdefs.h <<\EOF
15269 #define NEED_GETOPT_H 1
15270 EOF
15271
15272 fi
15273
15274 # check for ISC (this may also define _POSIX_SOURCE)
15275 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15276 if test "x$ISC" = xyes ; then
15277
15278 echo "$as_me:15278: checking for main in -lcposix" >&5
15279 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15280 if test "${ac_cv_lib_cposix_main+set}" = set; then
15281   echo $ECHO_N "(cached) $ECHO_C" >&6
15282 else
15283   ac_check_lib_save_LIBS=$LIBS
15284 LIBS="-lcposix  $LIBS"
15285 cat >conftest.$ac_ext <<_ACEOF
15286 #line 15286 "configure"
15287 #include "confdefs.h"
15288
15289 int
15290 main ()
15291 {
15292 main ();
15293   ;
15294   return 0;
15295 }
15296 _ACEOF
15297 rm -f conftest.$ac_objext conftest$ac_exeext
15298 if { (eval echo "$as_me:15298: \"$ac_link\"") >&5
15299   (eval $ac_link) 2>&5
15300   ac_status=$?
15301   echo "$as_me:15301: \$? = $ac_status" >&5
15302   (exit $ac_status); } &&
15303          { ac_try='test -s conftest$ac_exeext'
15304   { (eval echo "$as_me:15304: \"$ac_try\"") >&5
15305   (eval $ac_try) 2>&5
15306   ac_status=$?
15307   echo "$as_me:15307: \$? = $ac_status" >&5
15308   (exit $ac_status); }; }; then
15309   ac_cv_lib_cposix_main=yes
15310 else
15311   echo "$as_me: failed program was:" >&5
15312 cat conftest.$ac_ext >&5
15313 ac_cv_lib_cposix_main=no
15314 fi
15315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15316 LIBS=$ac_check_lib_save_LIBS
15317 fi
15318 echo "$as_me:15318: result: $ac_cv_lib_cposix_main" >&5
15319 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15320 if test $ac_cv_lib_cposix_main = yes; then
15321   cat >>confdefs.h <<EOF
15322 #define HAVE_LIBCPOSIX 1
15323 EOF
15324
15325   LIBS="-lcposix $LIBS"
15326
15327 fi
15328
15329         echo "$as_me:15329: checking for bzero in -linet" >&5
15330 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15331 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15332   echo $ECHO_N "(cached) $ECHO_C" >&6
15333 else
15334   ac_check_lib_save_LIBS=$LIBS
15335 LIBS="-linet  $LIBS"
15336 cat >conftest.$ac_ext <<_ACEOF
15337 #line 15337 "configure"
15338 #include "confdefs.h"
15339
15340 /* Override any gcc2 internal prototype to avoid an error.  */
15341 #ifdef __cplusplus
15342 extern "C"
15343 #endif
15344 /* We use char because int might match the return type of a gcc2
15345    builtin and then its argument prototype would still apply.  */
15346 char bzero ();
15347 int
15348 main ()
15349 {
15350 bzero ();
15351   ;
15352   return 0;
15353 }
15354 _ACEOF
15355 rm -f conftest.$ac_objext conftest$ac_exeext
15356 if { (eval echo "$as_me:15356: \"$ac_link\"") >&5
15357   (eval $ac_link) 2>&5
15358   ac_status=$?
15359   echo "$as_me:15359: \$? = $ac_status" >&5
15360   (exit $ac_status); } &&
15361          { ac_try='test -s conftest$ac_exeext'
15362   { (eval echo "$as_me:15362: \"$ac_try\"") >&5
15363   (eval $ac_try) 2>&5
15364   ac_status=$?
15365   echo "$as_me:15365: \$? = $ac_status" >&5
15366   (exit $ac_status); }; }; then
15367   ac_cv_lib_inet_bzero=yes
15368 else
15369   echo "$as_me: failed program was:" >&5
15370 cat conftest.$ac_ext >&5
15371 ac_cv_lib_inet_bzero=no
15372 fi
15373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15374 LIBS=$ac_check_lib_save_LIBS
15375 fi
15376 echo "$as_me:15376: result: $ac_cv_lib_inet_bzero" >&5
15377 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15378 if test $ac_cv_lib_inet_bzero = yes; then
15379
15380 cf_add_libs="-linet"
15381 # Filter out duplicates - this happens with badly-designed ".pc" files...
15382 for cf_add_1lib in $LIBS
15383 do
15384         for cf_add_2lib in $cf_add_libs
15385         do
15386                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15387                 then
15388                         cf_add_1lib=
15389                         break
15390                 fi
15391         done
15392         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15393 done
15394 LIBS="$cf_add_libs"
15395
15396 fi
15397 fi
15398
15399 echo "$as_me:15399: checking if sys/time.h works with sys/select.h" >&5
15400 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15401 if test "${cf_cv_sys_time_select+set}" = set; then
15402   echo $ECHO_N "(cached) $ECHO_C" >&6
15403 else
15404
15405 cat >conftest.$ac_ext <<_ACEOF
15406 #line 15406 "configure"
15407 #include "confdefs.h"
15408
15409 #include <sys/types.h>
15410 #ifdef HAVE_SYS_TIME_H
15411 #include <sys/time.h>
15412 #endif
15413 #ifdef HAVE_SYS_SELECT_H
15414 #include <sys/select.h>
15415 #endif
15416
15417 int
15418 main ()
15419 {
15420
15421   ;
15422   return 0;
15423 }
15424 _ACEOF
15425 rm -f conftest.$ac_objext
15426 if { (eval echo "$as_me:15426: \"$ac_compile\"") >&5
15427   (eval $ac_compile) 2>&5
15428   ac_status=$?
15429   echo "$as_me:15429: \$? = $ac_status" >&5
15430   (exit $ac_status); } &&
15431          { ac_try='test -s conftest.$ac_objext'
15432   { (eval echo "$as_me:15432: \"$ac_try\"") >&5
15433   (eval $ac_try) 2>&5
15434   ac_status=$?
15435   echo "$as_me:15435: \$? = $ac_status" >&5
15436   (exit $ac_status); }; }; then
15437   cf_cv_sys_time_select=yes
15438 else
15439   echo "$as_me: failed program was:" >&5
15440 cat conftest.$ac_ext >&5
15441 cf_cv_sys_time_select=no
15442 fi
15443 rm -f conftest.$ac_objext conftest.$ac_ext
15444
15445 fi
15446
15447 echo "$as_me:15447: result: $cf_cv_sys_time_select" >&5
15448 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15449 test "$cf_cv_sys_time_select" = yes &&
15450 cat >>confdefs.h <<\EOF
15451 #define HAVE_SYS_TIME_SELECT 1
15452 EOF
15453
15454 ###     checks for compiler characteristics
15455 ac_ext=c
15456 ac_cpp='$CPP $CPPFLAGS'
15457 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15458 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15459 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15460 ac_main_return=return
15461
15462 echo "$as_me:15462: checking for an ANSI C-conforming const" >&5
15463 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15464 if test "${ac_cv_c_const+set}" = set; then
15465   echo $ECHO_N "(cached) $ECHO_C" >&6
15466 else
15467   cat >conftest.$ac_ext <<_ACEOF
15468 #line 15468 "configure"
15469 #include "confdefs.h"
15470
15471 int
15472 main ()
15473 {
15474 /* FIXME: Include the comments suggested by Paul. */
15475 #ifndef __cplusplus
15476   /* Ultrix mips cc rejects this.  */
15477   typedef int charset[2];
15478   const charset x;
15479   /* SunOS 4.1.1 cc rejects this.  */
15480   char const *const *ccp;
15481   char **p;
15482   /* NEC SVR4.0.2 mips cc rejects this.  */
15483   struct point {int x, y;};
15484   static struct point const zero = {0,0};
15485   /* AIX XL C 1.02.0.0 rejects this.
15486      It does not let you subtract one const X* pointer from another in
15487      an arm of an if-expression whose if-part is not a constant
15488      expression */
15489   const char *g = "string";
15490   ccp = &g + (g ? g-g : 0);
15491   /* HPUX 7.0 cc rejects these. */
15492   ++ccp;
15493   p = (char**) ccp;
15494   ccp = (char const *const *) p;
15495   { /* SCO 3.2v4 cc rejects this.  */
15496     char *t;
15497     char const *s = 0 ? (char *) 0 : (char const *) 0;
15498
15499     *t++ = 0;
15500   }
15501   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15502     int x[] = {25, 17};
15503     const int *foo = &x[0];
15504     ++foo;
15505   }
15506   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15507     typedef const int *iptr;
15508     iptr p = 0;
15509     ++p;
15510   }
15511   { /* AIX XL C 1.02.0.0 rejects this saying
15512        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15513     struct s { int j; const int *ap[3]; };
15514     struct s *b; b->j = 5;
15515   }
15516   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15517     const int foo = 10;
15518   }
15519 #endif
15520
15521   ;
15522   return 0;
15523 }
15524 _ACEOF
15525 rm -f conftest.$ac_objext
15526 if { (eval echo "$as_me:15526: \"$ac_compile\"") >&5
15527   (eval $ac_compile) 2>&5
15528   ac_status=$?
15529   echo "$as_me:15529: \$? = $ac_status" >&5
15530   (exit $ac_status); } &&
15531          { ac_try='test -s conftest.$ac_objext'
15532   { (eval echo "$as_me:15532: \"$ac_try\"") >&5
15533   (eval $ac_try) 2>&5
15534   ac_status=$?
15535   echo "$as_me:15535: \$? = $ac_status" >&5
15536   (exit $ac_status); }; }; then
15537   ac_cv_c_const=yes
15538 else
15539   echo "$as_me: failed program was:" >&5
15540 cat conftest.$ac_ext >&5
15541 ac_cv_c_const=no
15542 fi
15543 rm -f conftest.$ac_objext conftest.$ac_ext
15544 fi
15545 echo "$as_me:15545: result: $ac_cv_c_const" >&5
15546 echo "${ECHO_T}$ac_cv_c_const" >&6
15547 if test $ac_cv_c_const = no; then
15548
15549 cat >>confdefs.h <<\EOF
15550 #define const
15551 EOF
15552
15553 fi
15554
15555 echo "$as_me:15555: checking for inline" >&5
15556 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15557 if test "${ac_cv_c_inline+set}" = set; then
15558   echo $ECHO_N "(cached) $ECHO_C" >&6
15559 else
15560   ac_cv_c_inline=no
15561 for ac_kw in inline __inline__ __inline; do
15562   cat >conftest.$ac_ext <<_ACEOF
15563 #line 15563 "configure"
15564 #include "confdefs.h"
15565 #ifndef __cplusplus
15566 static $ac_kw int static_foo () {return 0; }
15567 $ac_kw int foo () {return 0; }
15568 #endif
15569
15570 _ACEOF
15571 rm -f conftest.$ac_objext
15572 if { (eval echo "$as_me:15572: \"$ac_compile\"") >&5
15573   (eval $ac_compile) 2>&5
15574   ac_status=$?
15575   echo "$as_me:15575: \$? = $ac_status" >&5
15576   (exit $ac_status); } &&
15577          { ac_try='test -s conftest.$ac_objext'
15578   { (eval echo "$as_me:15578: \"$ac_try\"") >&5
15579   (eval $ac_try) 2>&5
15580   ac_status=$?
15581   echo "$as_me:15581: \$? = $ac_status" >&5
15582   (exit $ac_status); }; }; then
15583   ac_cv_c_inline=$ac_kw; break
15584 else
15585   echo "$as_me: failed program was:" >&5
15586 cat conftest.$ac_ext >&5
15587 fi
15588 rm -f conftest.$ac_objext conftest.$ac_ext
15589 done
15590
15591 fi
15592 echo "$as_me:15592: result: $ac_cv_c_inline" >&5
15593 echo "${ECHO_T}$ac_cv_c_inline" >&6
15594 case $ac_cv_c_inline in
15595   inline | yes) ;;
15596   no)
15597 cat >>confdefs.h <<\EOF
15598 #define inline
15599 EOF
15600  ;;
15601   *)  cat >>confdefs.h <<EOF
15602 #define inline $ac_cv_c_inline
15603 EOF
15604  ;;
15605 esac
15606
15607 NCURSES_INLINE=
15608 if test "$ac_cv_c_inline" != no ; then
15609   NCURSES_INLINE=inline
15610   if test "$INTEL_COMPILER" = yes
15611   then
15612     :
15613   elif test "$CLANG_COMPILER" = yes
15614   then
15615     :
15616   elif test "$GCC" = yes
15617   then
15618     echo "$as_me:15618: checking if $CC supports options to tune inlining" >&5
15619 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15620 if test "${cf_cv_gcc_inline+set}" = set; then
15621   echo $ECHO_N "(cached) $ECHO_C" >&6
15622 else
15623
15624       cf_save_CFLAGS=$CFLAGS
15625       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15626       cat >conftest.$ac_ext <<_ACEOF
15627 #line 15627 "configure"
15628 #include "confdefs.h"
15629 inline int foo(void) { return 1; }
15630 int
15631 main ()
15632 {
15633 ${cf_cv_main_return:-return} foo()
15634   ;
15635   return 0;
15636 }
15637 _ACEOF
15638 rm -f conftest.$ac_objext
15639 if { (eval echo "$as_me:15639: \"$ac_compile\"") >&5
15640   (eval $ac_compile) 2>&5
15641   ac_status=$?
15642   echo "$as_me:15642: \$? = $ac_status" >&5
15643   (exit $ac_status); } &&
15644          { ac_try='test -s conftest.$ac_objext'
15645   { (eval echo "$as_me:15645: \"$ac_try\"") >&5
15646   (eval $ac_try) 2>&5
15647   ac_status=$?
15648   echo "$as_me:15648: \$? = $ac_status" >&5
15649   (exit $ac_status); }; }; then
15650   cf_cv_gcc_inline=yes
15651 else
15652   echo "$as_me: failed program was:" >&5
15653 cat conftest.$ac_ext >&5
15654 cf_cv_gcc_inline=no
15655 fi
15656 rm -f conftest.$ac_objext conftest.$ac_ext
15657       CFLAGS=$cf_save_CFLAGS
15658
15659 fi
15660 echo "$as_me:15660: result: $cf_cv_gcc_inline" >&5
15661 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15662     if test "$cf_cv_gcc_inline" = yes ; then
15663
15664 cf_fix_cppflags=no
15665 cf_new_cflags=
15666 cf_new_cppflags=
15667 cf_new_extra_cppflags=
15668
15669 for cf_add_cflags in --param max-inline-insns-single=1200
15670 do
15671 case $cf_fix_cppflags in
15672 no)
15673         case $cf_add_cflags in #(vi
15674         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15675                 case $cf_add_cflags in
15676                 -D*)
15677                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15678
15679                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15680                                 && test -z "${cf_tst_cflags}" \
15681                                 && cf_fix_cppflags=yes
15682
15683                         if test $cf_fix_cppflags = yes ; then
15684                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15685                                 continue
15686                         elif test "${cf_tst_cflags}" = "\"'" ; then
15687                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15688                                 continue
15689                         fi
15690                         ;;
15691                 esac
15692                 case "$CPPFLAGS" in
15693                 *$cf_add_cflags) #(vi
15694                         ;;
15695                 *) #(vi
15696                         case $cf_add_cflags in #(vi
15697                         -D*)
15698                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15699
15700 CPPFLAGS=`echo "$CPPFLAGS" | \
15701         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15702                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15703
15704                                 ;;
15705                         esac
15706                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15707                         ;;
15708                 esac
15709                 ;;
15710         *)
15711                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15712                 ;;
15713         esac
15714         ;;
15715 yes)
15716         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15717
15718         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15719
15720         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15721                 && test -z "${cf_tst_cflags}" \
15722                 && cf_fix_cppflags=no
15723         ;;
15724 esac
15725 done
15726
15727 if test -n "$cf_new_cflags" ; then
15728
15729         CFLAGS="$CFLAGS $cf_new_cflags"
15730 fi
15731
15732 if test -n "$cf_new_cppflags" ; then
15733
15734         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15735 fi
15736
15737 if test -n "$cf_new_extra_cppflags" ; then
15738
15739         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15740 fi
15741
15742     fi
15743   fi
15744 fi
15745
15746 echo "$as_me:15746: checking for signal global datatype" >&5
15747 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15748 if test "${cf_cv_sig_atomic_t+set}" = set; then
15749   echo $ECHO_N "(cached) $ECHO_C" >&6
15750 else
15751
15752         for cf_type in \
15753                 "volatile sig_atomic_t" \
15754                 "sig_atomic_t" \
15755                 "int"
15756         do
15757         cat >conftest.$ac_ext <<_ACEOF
15758 #line 15758 "configure"
15759 #include "confdefs.h"
15760
15761 #include <sys/types.h>
15762 #include <signal.h>
15763 #include <stdio.h>
15764
15765 extern $cf_type x;
15766 $cf_type x;
15767 static void handler(int sig)
15768 {
15769         x = 5;
15770 }
15771 int
15772 main ()
15773 {
15774 signal(SIGINT, handler);
15775                  x = 1
15776   ;
15777   return 0;
15778 }
15779 _ACEOF
15780 rm -f conftest.$ac_objext
15781 if { (eval echo "$as_me:15781: \"$ac_compile\"") >&5
15782   (eval $ac_compile) 2>&5
15783   ac_status=$?
15784   echo "$as_me:15784: \$? = $ac_status" >&5
15785   (exit $ac_status); } &&
15786          { ac_try='test -s conftest.$ac_objext'
15787   { (eval echo "$as_me:15787: \"$ac_try\"") >&5
15788   (eval $ac_try) 2>&5
15789   ac_status=$?
15790   echo "$as_me:15790: \$? = $ac_status" >&5
15791   (exit $ac_status); }; }; then
15792   cf_cv_sig_atomic_t=$cf_type
15793 else
15794   echo "$as_me: failed program was:" >&5
15795 cat conftest.$ac_ext >&5
15796 cf_cv_sig_atomic_t=no
15797 fi
15798 rm -f conftest.$ac_objext conftest.$ac_ext
15799                 test "$cf_cv_sig_atomic_t" != no && break
15800         done
15801
15802 fi
15803
15804 echo "$as_me:15804: result: $cf_cv_sig_atomic_t" >&5
15805 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15806 test "$cf_cv_sig_atomic_t" != no &&
15807 cat >>confdefs.h <<EOF
15808 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15809 EOF
15810
15811 if test $NCURSES_CHTYPE = auto ; then
15812
15813 echo "$as_me:15813: checking for type of chtype" >&5
15814 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15815 if test "${cf_cv_typeof_chtype+set}" = set; then
15816   echo $ECHO_N "(cached) $ECHO_C" >&6
15817 else
15818
15819                 if test "$cross_compiling" = yes; then
15820   cf_cv_typeof_chtype=long
15821 else
15822   cat >conftest.$ac_ext <<_ACEOF
15823 #line 15823 "configure"
15824 #include "confdefs.h"
15825
15826 #define WANT_BITS 31
15827 #include <stdio.h>
15828 int main()
15829 {
15830         FILE *fp = fopen("cf_test.out", "w");
15831         if (fp != 0) {
15832                 char *result = "long";
15833                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15834                         int n;
15835                         unsigned int x, y;
15836                         for (n = 0; n < WANT_BITS; n++) {
15837                                 x = (1 << n);
15838                                 y = (x >> n);
15839                                 if (y != 1 || x == 0) {
15840                                         x = 0;
15841                                         break;
15842                                 }
15843                         }
15844                         /*
15845                          * If x is nonzero, an int is big enough for the bits
15846                          * that we want.
15847                          */
15848                         result = (x != 0) ? "int" : "long";
15849                 }
15850                 fputs(result, fp);
15851                 fclose(fp);
15852         }
15853         ${cf_cv_main_return:-return}(0);
15854 }
15855
15856 _ACEOF
15857 rm -f conftest$ac_exeext
15858 if { (eval echo "$as_me:15858: \"$ac_link\"") >&5
15859   (eval $ac_link) 2>&5
15860   ac_status=$?
15861   echo "$as_me:15861: \$? = $ac_status" >&5
15862   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15863   { (eval echo "$as_me:15863: \"$ac_try\"") >&5
15864   (eval $ac_try) 2>&5
15865   ac_status=$?
15866   echo "$as_me:15866: \$? = $ac_status" >&5
15867   (exit $ac_status); }; }; then
15868   cf_cv_typeof_chtype=`cat cf_test.out`
15869 else
15870   echo "$as_me: program exited with status $ac_status" >&5
15871 echo "$as_me: failed program was:" >&5
15872 cat conftest.$ac_ext >&5
15873 cf_cv_typeof_chtype=long
15874 fi
15875 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15876 fi
15877                 rm -f cf_test.out
15878
15879 fi
15880
15881 echo "$as_me:15881: result: $cf_cv_typeof_chtype" >&5
15882 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15883
15884 cat >>confdefs.h <<EOF
15885 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15886 EOF
15887
15888 else
15889         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15890 fi
15891 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15892
15893 echo "$as_me:15893: checking if unsigned literals are legal" >&5
15894 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15895 if test "${cf_cv_unsigned_literals+set}" = set; then
15896   echo $ECHO_N "(cached) $ECHO_C" >&6
15897 else
15898
15899         cat >conftest.$ac_ext <<_ACEOF
15900 #line 15900 "configure"
15901 #include "confdefs.h"
15902
15903 int
15904 main ()
15905 {
15906 long x = 1L + 1UL + 1U + 1
15907   ;
15908   return 0;
15909 }
15910 _ACEOF
15911 rm -f conftest.$ac_objext
15912 if { (eval echo "$as_me:15912: \"$ac_compile\"") >&5
15913   (eval $ac_compile) 2>&5
15914   ac_status=$?
15915   echo "$as_me:15915: \$? = $ac_status" >&5
15916   (exit $ac_status); } &&
15917          { ac_try='test -s conftest.$ac_objext'
15918   { (eval echo "$as_me:15918: \"$ac_try\"") >&5
15919   (eval $ac_try) 2>&5
15920   ac_status=$?
15921   echo "$as_me:15921: \$? = $ac_status" >&5
15922   (exit $ac_status); }; }; then
15923   cf_cv_unsigned_literals=yes
15924 else
15925   echo "$as_me: failed program was:" >&5
15926 cat conftest.$ac_ext >&5
15927 cf_cv_unsigned_literals=no
15928 fi
15929 rm -f conftest.$ac_objext conftest.$ac_ext
15930
15931 fi
15932
15933 echo "$as_me:15933: result: $cf_cv_unsigned_literals" >&5
15934 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15935
15936 cf_cv_1UL="1"
15937 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15938 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15939
15940 if test $NCURSES_MMASK_T = auto ; then
15941         cf_cv_typeof_mmask_t=long
15942 else
15943         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15944 fi
15945 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15946
15947 ###     Checks for external-data
15948
15949 echo "$as_me:15949: checking if external errno is declared" >&5
15950 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15951 if test "${cf_cv_dcl_errno+set}" = set; then
15952   echo $ECHO_N "(cached) $ECHO_C" >&6
15953 else
15954
15955     cat >conftest.$ac_ext <<_ACEOF
15956 #line 15956 "configure"
15957 #include "confdefs.h"
15958
15959 #ifdef HAVE_STDLIB_H
15960 #include <stdlib.h>
15961 #endif
15962 #include <stdio.h>
15963 #include <sys/types.h>
15964 #include <errno.h>
15965 int
15966 main ()
15967 {
15968 int x = (int) errno
15969   ;
15970   return 0;
15971 }
15972 _ACEOF
15973 rm -f conftest.$ac_objext
15974 if { (eval echo "$as_me:15974: \"$ac_compile\"") >&5
15975   (eval $ac_compile) 2>&5
15976   ac_status=$?
15977   echo "$as_me:15977: \$? = $ac_status" >&5
15978   (exit $ac_status); } &&
15979          { ac_try='test -s conftest.$ac_objext'
15980   { (eval echo "$as_me:15980: \"$ac_try\"") >&5
15981   (eval $ac_try) 2>&5
15982   ac_status=$?
15983   echo "$as_me:15983: \$? = $ac_status" >&5
15984   (exit $ac_status); }; }; then
15985   cf_cv_dcl_errno=yes
15986 else
15987   echo "$as_me: failed program was:" >&5
15988 cat conftest.$ac_ext >&5
15989 cf_cv_dcl_errno=no
15990 fi
15991 rm -f conftest.$ac_objext conftest.$ac_ext
15992
15993 fi
15994 echo "$as_me:15994: result: $cf_cv_dcl_errno" >&5
15995 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15996
15997 if test "$cf_cv_dcl_errno" = no ; then
15998
15999 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16000
16001     cat >>confdefs.h <<EOF
16002 #define $cf_result 1
16003 EOF
16004
16005 fi
16006
16007 # It's possible (for near-UNIX clones) that the data doesn't exist
16008
16009 echo "$as_me:16009: checking if external errno exists" >&5
16010 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16011 if test "${cf_cv_have_errno+set}" = set; then
16012   echo $ECHO_N "(cached) $ECHO_C" >&6
16013 else
16014
16015     cat >conftest.$ac_ext <<_ACEOF
16016 #line 16016 "configure"
16017 #include "confdefs.h"
16018
16019 #undef errno
16020 extern int errno;
16021
16022 int
16023 main ()
16024 {
16025 errno = 2
16026   ;
16027   return 0;
16028 }
16029 _ACEOF
16030 rm -f conftest.$ac_objext conftest$ac_exeext
16031 if { (eval echo "$as_me:16031: \"$ac_link\"") >&5
16032   (eval $ac_link) 2>&5
16033   ac_status=$?
16034   echo "$as_me:16034: \$? = $ac_status" >&5
16035   (exit $ac_status); } &&
16036          { ac_try='test -s conftest$ac_exeext'
16037   { (eval echo "$as_me:16037: \"$ac_try\"") >&5
16038   (eval $ac_try) 2>&5
16039   ac_status=$?
16040   echo "$as_me:16040: \$? = $ac_status" >&5
16041   (exit $ac_status); }; }; then
16042   cf_cv_have_errno=yes
16043 else
16044   echo "$as_me: failed program was:" >&5
16045 cat conftest.$ac_ext >&5
16046 cf_cv_have_errno=no
16047 fi
16048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16049
16050 fi
16051 echo "$as_me:16051: result: $cf_cv_have_errno" >&5
16052 echo "${ECHO_T}$cf_cv_have_errno" >&6
16053
16054 if test "$cf_cv_have_errno" = yes ; then
16055
16056 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16057
16058     cat >>confdefs.h <<EOF
16059 #define $cf_result 1
16060 EOF
16061
16062 fi
16063
16064 echo "$as_me:16064: checking if data-only library module links" >&5
16065 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16066 if test "${cf_cv_link_dataonly+set}" = set; then
16067   echo $ECHO_N "(cached) $ECHO_C" >&6
16068 else
16069
16070         rm -f conftest.a
16071         cat >conftest.$ac_ext <<EOF
16072 #line 16072 "configure"
16073 int     testdata[3] = { 123, 456, 789 };
16074 EOF
16075         if { (eval echo "$as_me:16075: \"$ac_compile\"") >&5
16076   (eval $ac_compile) 2>&5
16077   ac_status=$?
16078   echo "$as_me:16078: \$? = $ac_status" >&5
16079   (exit $ac_status); } ; then
16080                 mv conftest.o data.o && \
16081                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16082         fi
16083         rm -f conftest.$ac_ext data.o
16084         cat >conftest.$ac_ext <<EOF
16085 #line 16085 "configure"
16086 int     testfunc()
16087 {
16088 #if defined(NeXT)
16089         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16090 #else
16091         extern int testdata[3];
16092         return testdata[0] == 123
16093            &&  testdata[1] == 456
16094            &&  testdata[2] == 789;
16095 #endif
16096 }
16097 EOF
16098         if { (eval echo "$as_me:16098: \"$ac_compile\"") >&5
16099   (eval $ac_compile) 2>&5
16100   ac_status=$?
16101   echo "$as_me:16101: \$? = $ac_status" >&5
16102   (exit $ac_status); }; then
16103                 mv conftest.o func.o && \
16104                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16105         fi
16106         rm -f conftest.$ac_ext func.o
16107         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16108         cf_saveLIBS="$LIBS"
16109         LIBS="conftest.a $LIBS"
16110         if test "$cross_compiling" = yes; then
16111   cf_cv_link_dataonly=unknown
16112 else
16113   cat >conftest.$ac_ext <<_ACEOF
16114 #line 16114 "configure"
16115 #include "confdefs.h"
16116
16117         int main()
16118         {
16119                 extern int testfunc();
16120                 ${cf_cv_main_return:-return} (!testfunc());
16121         }
16122
16123 _ACEOF
16124 rm -f conftest$ac_exeext
16125 if { (eval echo "$as_me:16125: \"$ac_link\"") >&5
16126   (eval $ac_link) 2>&5
16127   ac_status=$?
16128   echo "$as_me:16128: \$? = $ac_status" >&5
16129   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16130   { (eval echo "$as_me:16130: \"$ac_try\"") >&5
16131   (eval $ac_try) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); }; }; then
16135   cf_cv_link_dataonly=yes
16136 else
16137   echo "$as_me: program exited with status $ac_status" >&5
16138 echo "$as_me: failed program was:" >&5
16139 cat conftest.$ac_ext >&5
16140 cf_cv_link_dataonly=no
16141 fi
16142 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16143 fi
16144         LIBS="$cf_saveLIBS"
16145
16146 fi
16147
16148 echo "$as_me:16148: result: $cf_cv_link_dataonly" >&5
16149 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16150
16151 if test "$cf_cv_link_dataonly" = no ; then
16152
16153 cat >>confdefs.h <<\EOF
16154 #define BROKEN_LINKER 1
16155 EOF
16156
16157         BROKEN_LINKER=1
16158 fi
16159
16160 ###     Checks for library functions.
16161
16162 for ac_func in \
16163 getcwd \
16164 getegid \
16165 geteuid \
16166 getopt \
16167 getttynam \
16168 issetugid \
16169 poll \
16170 putenv \
16171 remove \
16172 select \
16173 setbuf \
16174 setbuffer \
16175 setenv \
16176 setvbuf \
16177 sigaction \
16178 sigvec \
16179 strdup \
16180 strstr \
16181 tcgetpgrp \
16182 times \
16183 vsnprintf \
16184
16185 do
16186 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16187 echo "$as_me:16187: checking for $ac_func" >&5
16188 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16189 if eval "test \"\${$as_ac_var+set}\" = set"; then
16190   echo $ECHO_N "(cached) $ECHO_C" >&6
16191 else
16192   cat >conftest.$ac_ext <<_ACEOF
16193 #line 16193 "configure"
16194 #include "confdefs.h"
16195 /* System header to define __stub macros and hopefully few prototypes,
16196     which can conflict with char $ac_func (); below.  */
16197 #include <assert.h>
16198 /* Override any gcc2 internal prototype to avoid an error.  */
16199 #ifdef __cplusplus
16200 extern "C"
16201 #endif
16202 /* We use char because int might match the return type of a gcc2
16203    builtin and then its argument prototype would still apply.  */
16204 char $ac_func ();
16205 char (*f) ();
16206
16207 int
16208 main ()
16209 {
16210 /* The GNU C library defines this for functions which it implements
16211     to always fail with ENOSYS.  Some functions are actually named
16212     something starting with __ and the normal name is an alias.  */
16213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16214 choke me
16215 #else
16216 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16217 #endif
16218
16219   ;
16220   return 0;
16221 }
16222 _ACEOF
16223 rm -f conftest.$ac_objext conftest$ac_exeext
16224 if { (eval echo "$as_me:16224: \"$ac_link\"") >&5
16225   (eval $ac_link) 2>&5
16226   ac_status=$?
16227   echo "$as_me:16227: \$? = $ac_status" >&5
16228   (exit $ac_status); } &&
16229          { ac_try='test -s conftest$ac_exeext'
16230   { (eval echo "$as_me:16230: \"$ac_try\"") >&5
16231   (eval $ac_try) 2>&5
16232   ac_status=$?
16233   echo "$as_me:16233: \$? = $ac_status" >&5
16234   (exit $ac_status); }; }; then
16235   eval "$as_ac_var=yes"
16236 else
16237   echo "$as_me: failed program was:" >&5
16238 cat conftest.$ac_ext >&5
16239 eval "$as_ac_var=no"
16240 fi
16241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16242 fi
16243 echo "$as_me:16243: result: `eval echo '${'$as_ac_var'}'`" >&5
16244 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16245 if test `eval echo '${'$as_ac_var'}'` = yes; then
16246   cat >>confdefs.h <<EOF
16247 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16248 EOF
16249
16250 fi
16251 done
16252
16253 if test "x$ac_cv_func_getopt" = xno &&
16254    test "x$cf_with_progs$cf_with_tests" != xnono; then
16255         { { echo "$as_me:16255: error: getopt is required for building programs" >&5
16256 echo "$as_me: error: getopt is required for building programs" >&2;}
16257    { (exit 1); exit 1; }; }
16258 fi
16259
16260 if test "x$with_getcap" = "xyes" ; then
16261
16262 echo "$as_me:16262: checking for terminal-capability database functions" >&5
16263 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16264 if test "${cf_cv_cgetent+set}" = set; then
16265   echo $ECHO_N "(cached) $ECHO_C" >&6
16266 else
16267
16268 cat >conftest.$ac_ext <<_ACEOF
16269 #line 16269 "configure"
16270 #include "confdefs.h"
16271
16272 #include <stdlib.h>
16273 int
16274 main ()
16275 {
16276
16277         char temp[128];
16278         char *buf = temp;
16279         char *db_array = temp;
16280         cgetent(&buf, &db_array, "vt100");
16281         cgetcap(buf, "tc", '=');
16282         cgetmatch(buf, "tc");
16283
16284   ;
16285   return 0;
16286 }
16287 _ACEOF
16288 rm -f conftest.$ac_objext conftest$ac_exeext
16289 if { (eval echo "$as_me:16289: \"$ac_link\"") >&5
16290   (eval $ac_link) 2>&5
16291   ac_status=$?
16292   echo "$as_me:16292: \$? = $ac_status" >&5
16293   (exit $ac_status); } &&
16294          { ac_try='test -s conftest$ac_exeext'
16295   { (eval echo "$as_me:16295: \"$ac_try\"") >&5
16296   (eval $ac_try) 2>&5
16297   ac_status=$?
16298   echo "$as_me:16298: \$? = $ac_status" >&5
16299   (exit $ac_status); }; }; then
16300   cf_cv_cgetent=yes
16301 else
16302   echo "$as_me: failed program was:" >&5
16303 cat conftest.$ac_ext >&5
16304 cf_cv_cgetent=no
16305 fi
16306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16307
16308 fi
16309 echo "$as_me:16309: result: $cf_cv_cgetent" >&5
16310 echo "${ECHO_T}$cf_cv_cgetent" >&6
16311
16312 if test "$cf_cv_cgetent" = yes
16313 then
16314
16315 cat >>confdefs.h <<\EOF
16316 #define HAVE_BSD_CGETENT 1
16317 EOF
16318
16319 echo "$as_me:16319: checking if cgetent uses const parameter" >&5
16320 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16321 if test "${cf_cv_cgetent_const+set}" = set; then
16322   echo $ECHO_N "(cached) $ECHO_C" >&6
16323 else
16324
16325 cat >conftest.$ac_ext <<_ACEOF
16326 #line 16326 "configure"
16327 #include "confdefs.h"
16328
16329 #include <stdlib.h>
16330 int
16331 main ()
16332 {
16333
16334         char temp[128];
16335         char *buf = temp;
16336 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16337         const char *db_array = temp;
16338         cgetent(&buf, &db_array, "vt100");
16339 #endif
16340         cgetcap(buf, "tc", '=');
16341         cgetmatch(buf, "tc");
16342
16343   ;
16344   return 0;
16345 }
16346 _ACEOF
16347 rm -f conftest.$ac_objext conftest$ac_exeext
16348 if { (eval echo "$as_me:16348: \"$ac_link\"") >&5
16349   (eval $ac_link) 2>&5
16350   ac_status=$?
16351   echo "$as_me:16351: \$? = $ac_status" >&5
16352   (exit $ac_status); } &&
16353          { ac_try='test -s conftest$ac_exeext'
16354   { (eval echo "$as_me:16354: \"$ac_try\"") >&5
16355   (eval $ac_try) 2>&5
16356   ac_status=$?
16357   echo "$as_me:16357: \$? = $ac_status" >&5
16358   (exit $ac_status); }; }; then
16359   cf_cv_cgetent_const=yes
16360 else
16361   echo "$as_me: failed program was:" >&5
16362 cat conftest.$ac_ext >&5
16363 cf_cv_cgetent_const=no
16364 fi
16365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16366
16367 fi
16368 echo "$as_me:16368: result: $cf_cv_cgetent_const" >&5
16369 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16370         if test "$cf_cv_cgetent_const" = yes
16371         then
16372
16373 cat >>confdefs.h <<EOF
16374 #define CGETENT_CONST const
16375 EOF
16376
16377         fi
16378 fi
16379
16380 fi
16381
16382 echo "$as_me:16382: checking for isascii" >&5
16383 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16384 if test "${cf_cv_have_isascii+set}" = set; then
16385   echo $ECHO_N "(cached) $ECHO_C" >&6
16386 else
16387
16388         cat >conftest.$ac_ext <<_ACEOF
16389 #line 16389 "configure"
16390 #include "confdefs.h"
16391 #include <ctype.h>
16392 int
16393 main ()
16394 {
16395 int x = isascii(' ')
16396   ;
16397   return 0;
16398 }
16399 _ACEOF
16400 rm -f conftest.$ac_objext conftest$ac_exeext
16401 if { (eval echo "$as_me:16401: \"$ac_link\"") >&5
16402   (eval $ac_link) 2>&5
16403   ac_status=$?
16404   echo "$as_me:16404: \$? = $ac_status" >&5
16405   (exit $ac_status); } &&
16406          { ac_try='test -s conftest$ac_exeext'
16407   { (eval echo "$as_me:16407: \"$ac_try\"") >&5
16408   (eval $ac_try) 2>&5
16409   ac_status=$?
16410   echo "$as_me:16410: \$? = $ac_status" >&5
16411   (exit $ac_status); }; }; then
16412   cf_cv_have_isascii=yes
16413 else
16414   echo "$as_me: failed program was:" >&5
16415 cat conftest.$ac_ext >&5
16416 cf_cv_have_isascii=no
16417 fi
16418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16419
16420 fi
16421 echo "$as_me:16421: result: $cf_cv_have_isascii" >&5
16422 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16423 test "$cf_cv_have_isascii" = yes &&
16424 cat >>confdefs.h <<\EOF
16425 #define HAVE_ISASCII 1
16426 EOF
16427
16428 if test "$ac_cv_func_sigaction" = yes; then
16429 echo "$as_me:16429: checking whether sigaction needs _POSIX_SOURCE" >&5
16430 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16431 cat >conftest.$ac_ext <<_ACEOF
16432 #line 16432 "configure"
16433 #include "confdefs.h"
16434
16435 #include <sys/types.h>
16436 #include <signal.h>
16437 int
16438 main ()
16439 {
16440 struct sigaction act
16441   ;
16442   return 0;
16443 }
16444 _ACEOF
16445 rm -f conftest.$ac_objext
16446 if { (eval echo "$as_me:16446: \"$ac_compile\"") >&5
16447   (eval $ac_compile) 2>&5
16448   ac_status=$?
16449   echo "$as_me:16449: \$? = $ac_status" >&5
16450   (exit $ac_status); } &&
16451          { ac_try='test -s conftest.$ac_objext'
16452   { (eval echo "$as_me:16452: \"$ac_try\"") >&5
16453   (eval $ac_try) 2>&5
16454   ac_status=$?
16455   echo "$as_me:16455: \$? = $ac_status" >&5
16456   (exit $ac_status); }; }; then
16457   sigact_bad=no
16458 else
16459   echo "$as_me: failed program was:" >&5
16460 cat conftest.$ac_ext >&5
16461
16462 cat >conftest.$ac_ext <<_ACEOF
16463 #line 16463 "configure"
16464 #include "confdefs.h"
16465
16466 #define _POSIX_SOURCE
16467 #include <sys/types.h>
16468 #include <signal.h>
16469 int
16470 main ()
16471 {
16472 struct sigaction act
16473   ;
16474   return 0;
16475 }
16476 _ACEOF
16477 rm -f conftest.$ac_objext
16478 if { (eval echo "$as_me:16478: \"$ac_compile\"") >&5
16479   (eval $ac_compile) 2>&5
16480   ac_status=$?
16481   echo "$as_me:16481: \$? = $ac_status" >&5
16482   (exit $ac_status); } &&
16483          { ac_try='test -s conftest.$ac_objext'
16484   { (eval echo "$as_me:16484: \"$ac_try\"") >&5
16485   (eval $ac_try) 2>&5
16486   ac_status=$?
16487   echo "$as_me:16487: \$? = $ac_status" >&5
16488   (exit $ac_status); }; }; then
16489   sigact_bad=yes
16490
16491 cat >>confdefs.h <<\EOF
16492 #define _POSIX_SOURCE 1
16493 EOF
16494
16495 else
16496   echo "$as_me: failed program was:" >&5
16497 cat conftest.$ac_ext >&5
16498 sigact_bad=unknown
16499 fi
16500 rm -f conftest.$ac_objext conftest.$ac_ext
16501 fi
16502 rm -f conftest.$ac_objext conftest.$ac_ext
16503 echo "$as_me:16503: result: $sigact_bad" >&5
16504 echo "${ECHO_T}$sigact_bad" >&6
16505 fi
16506
16507 echo "$as_me:16507: checking if nanosleep really works" >&5
16508 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16509 if test "${cf_cv_func_nanosleep+set}" = set; then
16510   echo $ECHO_N "(cached) $ECHO_C" >&6
16511 else
16512
16513 if test "$cross_compiling" = yes; then
16514   cf_cv_func_nanosleep=unknown
16515 else
16516   cat >conftest.$ac_ext <<_ACEOF
16517 #line 16517 "configure"
16518 #include "confdefs.h"
16519
16520 #include <stdio.h>
16521 #include <errno.h>
16522 #include <time.h>
16523
16524 #ifdef HAVE_SYS_TIME_H
16525 #include <sys/time.h>
16526 #endif
16527
16528 int main() {
16529         struct timespec ts1, ts2;
16530         int code;
16531         ts1.tv_sec  = 0;
16532         ts1.tv_nsec = 750000000;
16533         ts2.tv_sec  = 0;
16534         ts2.tv_nsec = 0;
16535         errno = 0;
16536         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16537         ${cf_cv_main_return:-return}(code != 0);
16538 }
16539
16540 _ACEOF
16541 rm -f conftest$ac_exeext
16542 if { (eval echo "$as_me:16542: \"$ac_link\"") >&5
16543   (eval $ac_link) 2>&5
16544   ac_status=$?
16545   echo "$as_me:16545: \$? = $ac_status" >&5
16546   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16547   { (eval echo "$as_me:16547: \"$ac_try\"") >&5
16548   (eval $ac_try) 2>&5
16549   ac_status=$?
16550   echo "$as_me:16550: \$? = $ac_status" >&5
16551   (exit $ac_status); }; }; then
16552   cf_cv_func_nanosleep=yes
16553 else
16554   echo "$as_me: program exited with status $ac_status" >&5
16555 echo "$as_me: failed program was:" >&5
16556 cat conftest.$ac_ext >&5
16557 cf_cv_func_nanosleep=no
16558 fi
16559 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16560 fi
16561 fi
16562 echo "$as_me:16562: result: $cf_cv_func_nanosleep" >&5
16563 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16564
16565 test "$cf_cv_func_nanosleep" = "yes" &&
16566 cat >>confdefs.h <<\EOF
16567 #define HAVE_NANOSLEEP 1
16568 EOF
16569
16570 for ac_header in \
16571 termio.h \
16572 termios.h \
16573 unistd.h \
16574
16575 do
16576 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16577 echo "$as_me:16577: checking for $ac_header" >&5
16578 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16579 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16580   echo $ECHO_N "(cached) $ECHO_C" >&6
16581 else
16582   cat >conftest.$ac_ext <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585 #include <$ac_header>
16586 _ACEOF
16587 if { (eval echo "$as_me:16587: \"$ac_cpp conftest.$ac_ext\"") >&5
16588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16589   ac_status=$?
16590   egrep -v '^ *\+' conftest.er1 >conftest.err
16591   rm -f conftest.er1
16592   cat conftest.err >&5
16593   echo "$as_me:16593: \$? = $ac_status" >&5
16594   (exit $ac_status); } >/dev/null; then
16595   if test -s conftest.err; then
16596     ac_cpp_err=$ac_c_preproc_warn_flag
16597   else
16598     ac_cpp_err=
16599   fi
16600 else
16601   ac_cpp_err=yes
16602 fi
16603 if test -z "$ac_cpp_err"; then
16604   eval "$as_ac_Header=yes"
16605 else
16606   echo "$as_me: failed program was:" >&5
16607   cat conftest.$ac_ext >&5
16608   eval "$as_ac_Header=no"
16609 fi
16610 rm -f conftest.err conftest.$ac_ext
16611 fi
16612 echo "$as_me:16612: result: `eval echo '${'$as_ac_Header'}'`" >&5
16613 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16614 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16615   cat >>confdefs.h <<EOF
16616 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16617 EOF
16618
16619 fi
16620 done
16621
16622 if test "$ISC" = yes ; then
16623
16624 for ac_header in sys/termio.h
16625 do
16626 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16627 echo "$as_me:16627: checking for $ac_header" >&5
16628 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16629 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16630   echo $ECHO_N "(cached) $ECHO_C" >&6
16631 else
16632   cat >conftest.$ac_ext <<_ACEOF
16633 #line 16633 "configure"
16634 #include "confdefs.h"
16635 #include <$ac_header>
16636 _ACEOF
16637 if { (eval echo "$as_me:16637: \"$ac_cpp conftest.$ac_ext\"") >&5
16638   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16639   ac_status=$?
16640   egrep -v '^ *\+' conftest.er1 >conftest.err
16641   rm -f conftest.er1
16642   cat conftest.err >&5
16643   echo "$as_me:16643: \$? = $ac_status" >&5
16644   (exit $ac_status); } >/dev/null; then
16645   if test -s conftest.err; then
16646     ac_cpp_err=$ac_c_preproc_warn_flag
16647   else
16648     ac_cpp_err=
16649   fi
16650 else
16651   ac_cpp_err=yes
16652 fi
16653 if test -z "$ac_cpp_err"; then
16654   eval "$as_ac_Header=yes"
16655 else
16656   echo "$as_me: failed program was:" >&5
16657   cat conftest.$ac_ext >&5
16658   eval "$as_ac_Header=no"
16659 fi
16660 rm -f conftest.err conftest.$ac_ext
16661 fi
16662 echo "$as_me:16662: result: `eval echo '${'$as_ac_Header'}'`" >&5
16663 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16664 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16665   cat >>confdefs.h <<EOF
16666 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16667 EOF
16668
16669 fi
16670 done
16671
16672 fi
16673 if test "$ac_cv_header_termios_h" = yes ; then
16674         case "$CFLAGS $CPPFLAGS" in
16675         *-D_POSIX_SOURCE*)
16676                 termios_bad=dunno ;;
16677         *)      termios_bad=maybe ;;
16678         esac
16679         if test "$termios_bad" = maybe ; then
16680         echo "$as_me:16680: checking whether termios.h needs _POSIX_SOURCE" >&5
16681 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16682         cat >conftest.$ac_ext <<_ACEOF
16683 #line 16683 "configure"
16684 #include "confdefs.h"
16685 #include <termios.h>
16686 int
16687 main ()
16688 {
16689 struct termios foo; int x = foo.c_iflag
16690   ;
16691   return 0;
16692 }
16693 _ACEOF
16694 rm -f conftest.$ac_objext
16695 if { (eval echo "$as_me:16695: \"$ac_compile\"") >&5
16696   (eval $ac_compile) 2>&5
16697   ac_status=$?
16698   echo "$as_me:16698: \$? = $ac_status" >&5
16699   (exit $ac_status); } &&
16700          { ac_try='test -s conftest.$ac_objext'
16701   { (eval echo "$as_me:16701: \"$ac_try\"") >&5
16702   (eval $ac_try) 2>&5
16703   ac_status=$?
16704   echo "$as_me:16704: \$? = $ac_status" >&5
16705   (exit $ac_status); }; }; then
16706   termios_bad=no
16707 else
16708   echo "$as_me: failed program was:" >&5
16709 cat conftest.$ac_ext >&5
16710
16711                 cat >conftest.$ac_ext <<_ACEOF
16712 #line 16712 "configure"
16713 #include "confdefs.h"
16714
16715 #define _POSIX_SOURCE
16716 #include <termios.h>
16717 int
16718 main ()
16719 {
16720 struct termios foo; int x = foo.c_iflag
16721   ;
16722   return 0;
16723 }
16724 _ACEOF
16725 rm -f conftest.$ac_objext
16726 if { (eval echo "$as_me:16726: \"$ac_compile\"") >&5
16727   (eval $ac_compile) 2>&5
16728   ac_status=$?
16729   echo "$as_me:16729: \$? = $ac_status" >&5
16730   (exit $ac_status); } &&
16731          { ac_try='test -s conftest.$ac_objext'
16732   { (eval echo "$as_me:16732: \"$ac_try\"") >&5
16733   (eval $ac_try) 2>&5
16734   ac_status=$?
16735   echo "$as_me:16735: \$? = $ac_status" >&5
16736   (exit $ac_status); }; }; then
16737   termios_bad=unknown
16738 else
16739   echo "$as_me: failed program was:" >&5
16740 cat conftest.$ac_ext >&5
16741 termios_bad=yes
16742 cat >>confdefs.h <<\EOF
16743 #define _POSIX_SOURCE 1
16744 EOF
16745
16746 fi
16747 rm -f conftest.$ac_objext conftest.$ac_ext
16748
16749 fi
16750 rm -f conftest.$ac_objext conftest.$ac_ext
16751         echo "$as_me:16751: result: $termios_bad" >&5
16752 echo "${ECHO_T}$termios_bad" >&6
16753         fi
16754 fi
16755
16756 echo "$as_me:16756: checking for tcgetattr" >&5
16757 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16758 if test "${cf_cv_have_tcgetattr+set}" = set; then
16759   echo $ECHO_N "(cached) $ECHO_C" >&6
16760 else
16761
16762 cat >conftest.$ac_ext <<_ACEOF
16763 #line 16763 "configure"
16764 #include "confdefs.h"
16765
16766 #include <sys/types.h>
16767 #ifdef HAVE_UNISTD_H
16768 #include <unistd.h>
16769 #endif
16770 #ifdef HAVE_TERMIOS_H
16771 #include <termios.h>
16772 #define TTY struct termios
16773 #else
16774 #ifdef HAVE_TERMIO_H
16775 #include <termio.h>
16776 #define TTY struct termio
16777 #endif
16778 #endif
16779
16780 int
16781 main ()
16782 {
16783
16784 TTY foo;
16785 tcgetattr(1, &foo);
16786   ;
16787   return 0;
16788 }
16789 _ACEOF
16790 rm -f conftest.$ac_objext conftest$ac_exeext
16791 if { (eval echo "$as_me:16791: \"$ac_link\"") >&5
16792   (eval $ac_link) 2>&5
16793   ac_status=$?
16794   echo "$as_me:16794: \$? = $ac_status" >&5
16795   (exit $ac_status); } &&
16796          { ac_try='test -s conftest$ac_exeext'
16797   { (eval echo "$as_me:16797: \"$ac_try\"") >&5
16798   (eval $ac_try) 2>&5
16799   ac_status=$?
16800   echo "$as_me:16800: \$? = $ac_status" >&5
16801   (exit $ac_status); }; }; then
16802   cf_cv_have_tcgetattr=yes
16803 else
16804   echo "$as_me: failed program was:" >&5
16805 cat conftest.$ac_ext >&5
16806 cf_cv_have_tcgetattr=no
16807 fi
16808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16809 fi
16810 echo "$as_me:16810: result: $cf_cv_have_tcgetattr" >&5
16811 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16812 test "$cf_cv_have_tcgetattr" = yes &&
16813 cat >>confdefs.h <<\EOF
16814 #define HAVE_TCGETATTR 1
16815 EOF
16816
16817 echo "$as_me:16817: checking for vsscanf function or workaround" >&5
16818 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16819 if test "${cf_cv_func_vsscanf+set}" = set; then
16820   echo $ECHO_N "(cached) $ECHO_C" >&6
16821 else
16822
16823 cat >conftest.$ac_ext <<_ACEOF
16824 #line 16824 "configure"
16825 #include "confdefs.h"
16826
16827 #include <stdarg.h>
16828 #include <stdio.h>
16829 int
16830 main ()
16831 {
16832
16833         va_list ap;
16834         vsscanf("from", "%d", ap)
16835   ;
16836   return 0;
16837 }
16838 _ACEOF
16839 rm -f conftest.$ac_objext conftest$ac_exeext
16840 if { (eval echo "$as_me:16840: \"$ac_link\"") >&5
16841   (eval $ac_link) 2>&5
16842   ac_status=$?
16843   echo "$as_me:16843: \$? = $ac_status" >&5
16844   (exit $ac_status); } &&
16845          { ac_try='test -s conftest$ac_exeext'
16846   { (eval echo "$as_me:16846: \"$ac_try\"") >&5
16847   (eval $ac_try) 2>&5
16848   ac_status=$?
16849   echo "$as_me:16849: \$? = $ac_status" >&5
16850   (exit $ac_status); }; }; then
16851   cf_cv_func_vsscanf=vsscanf
16852 else
16853   echo "$as_me: failed program was:" >&5
16854 cat conftest.$ac_ext >&5
16855
16856 cat >conftest.$ac_ext <<_ACEOF
16857 #line 16857 "configure"
16858 #include "confdefs.h"
16859
16860 #include <stdarg.h>
16861 #include <stdio.h>
16862 int
16863 main ()
16864 {
16865
16866     FILE strbuf;
16867     char *str = "from";
16868
16869     strbuf._flag = _IOREAD;
16870     strbuf._ptr = strbuf._base = (unsigned char *) str;
16871     strbuf._cnt = strlen(str);
16872     strbuf._file = _NFILE;
16873     return (vfscanf(&strbuf, "%d", ap))
16874   ;
16875   return 0;
16876 }
16877 _ACEOF
16878 rm -f conftest.$ac_objext conftest$ac_exeext
16879 if { (eval echo "$as_me:16879: \"$ac_link\"") >&5
16880   (eval $ac_link) 2>&5
16881   ac_status=$?
16882   echo "$as_me:16882: \$? = $ac_status" >&5
16883   (exit $ac_status); } &&
16884          { ac_try='test -s conftest$ac_exeext'
16885   { (eval echo "$as_me:16885: \"$ac_try\"") >&5
16886   (eval $ac_try) 2>&5
16887   ac_status=$?
16888   echo "$as_me:16888: \$? = $ac_status" >&5
16889   (exit $ac_status); }; }; then
16890   cf_cv_func_vsscanf=vfscanf
16891 else
16892   echo "$as_me: failed program was:" >&5
16893 cat conftest.$ac_ext >&5
16894
16895 cat >conftest.$ac_ext <<_ACEOF
16896 #line 16896 "configure"
16897 #include "confdefs.h"
16898
16899 #include <stdarg.h>
16900 #include <stdio.h>
16901 int
16902 main ()
16903 {
16904
16905     FILE strbuf;
16906     char *str = "from";
16907
16908     strbuf._flag = _IOREAD;
16909     strbuf._ptr = strbuf._base = (unsigned char *) str;
16910     strbuf._cnt = strlen(str);
16911     strbuf._file = _NFILE;
16912     return (_doscan(&strbuf, "%d", ap))
16913   ;
16914   return 0;
16915 }
16916 _ACEOF
16917 rm -f conftest.$ac_objext conftest$ac_exeext
16918 if { (eval echo "$as_me:16918: \"$ac_link\"") >&5
16919   (eval $ac_link) 2>&5
16920   ac_status=$?
16921   echo "$as_me:16921: \$? = $ac_status" >&5
16922   (exit $ac_status); } &&
16923          { ac_try='test -s conftest$ac_exeext'
16924   { (eval echo "$as_me:16924: \"$ac_try\"") >&5
16925   (eval $ac_try) 2>&5
16926   ac_status=$?
16927   echo "$as_me:16927: \$? = $ac_status" >&5
16928   (exit $ac_status); }; }; then
16929   cf_cv_func_vsscanf=_doscan
16930 else
16931   echo "$as_me: failed program was:" >&5
16932 cat conftest.$ac_ext >&5
16933
16934 cf_cv_func_vsscanf=no
16935 fi
16936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16937 fi
16938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16939 fi
16940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16941 fi
16942 echo "$as_me:16942: result: $cf_cv_func_vsscanf" >&5
16943 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16944
16945 case $cf_cv_func_vsscanf in #(vi
16946 vsscanf)
16947 cat >>confdefs.h <<\EOF
16948 #define HAVE_VSSCANF 1
16949 EOF
16950 ;; #(vi
16951 vfscanf)
16952 cat >>confdefs.h <<\EOF
16953 #define HAVE_VFSCANF 1
16954 EOF
16955 ;; #(vi
16956 _doscan)
16957 cat >>confdefs.h <<\EOF
16958 #define HAVE__DOSCAN 1
16959 EOF
16960 ;;
16961 esac
16962
16963 echo "$as_me:16963: checking for working mkstemp" >&5
16964 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16965 if test "${cf_cv_func_mkstemp+set}" = set; then
16966   echo $ECHO_N "(cached) $ECHO_C" >&6
16967 else
16968
16969 rm -rf conftest*
16970 if test "$cross_compiling" = yes; then
16971   cf_cv_func_mkstemp=maybe
16972 else
16973   cat >conftest.$ac_ext <<_ACEOF
16974 #line 16974 "configure"
16975 #include "confdefs.h"
16976
16977 #include <sys/types.h>
16978 #include <stdlib.h>
16979 #include <stdio.h>
16980 #include <string.h>
16981 #include <sys/stat.h>
16982 int main()
16983 {
16984         char *tmpl = "conftestXXXXXX";
16985         char name[2][80];
16986         int n;
16987         int result = 0;
16988         int fd;
16989         struct stat sb;
16990
16991         umask(077);
16992         for (n = 0; n < 2; ++n) {
16993                 strcpy(name[n], tmpl);
16994                 if ((fd = mkstemp(name[n])) >= 0) {
16995                         if (!strcmp(name[n], tmpl)
16996                          || stat(name[n], &sb) != 0
16997                          || (sb.st_mode & S_IFMT) != S_IFREG
16998                          || (sb.st_mode & 077) != 0) {
16999                                 result = 1;
17000                         }
17001                         close(fd);
17002                 }
17003         }
17004         if (result == 0
17005          && !strcmp(name[0], name[1]))
17006                 result = 1;
17007         ${cf_cv_main_return:-return}(result);
17008 }
17009
17010 _ACEOF
17011 rm -f conftest$ac_exeext
17012 if { (eval echo "$as_me:17012: \"$ac_link\"") >&5
17013   (eval $ac_link) 2>&5
17014   ac_status=$?
17015   echo "$as_me:17015: \$? = $ac_status" >&5
17016   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17017   { (eval echo "$as_me:17017: \"$ac_try\"") >&5
17018   (eval $ac_try) 2>&5
17019   ac_status=$?
17020   echo "$as_me:17020: \$? = $ac_status" >&5
17021   (exit $ac_status); }; }; then
17022   cf_cv_func_mkstemp=yes
17023
17024 else
17025   echo "$as_me: program exited with status $ac_status" >&5
17026 echo "$as_me: failed program was:" >&5
17027 cat conftest.$ac_ext >&5
17028 cf_cv_func_mkstemp=no
17029
17030 fi
17031 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17032 fi
17033
17034 fi
17035 echo "$as_me:17035: result: $cf_cv_func_mkstemp" >&5
17036 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17037 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17038         echo "$as_me:17038: checking for mkstemp" >&5
17039 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17040 if test "${ac_cv_func_mkstemp+set}" = set; then
17041   echo $ECHO_N "(cached) $ECHO_C" >&6
17042 else
17043   cat >conftest.$ac_ext <<_ACEOF
17044 #line 17044 "configure"
17045 #include "confdefs.h"
17046 /* System header to define __stub macros and hopefully few prototypes,
17047     which can conflict with char mkstemp (); below.  */
17048 #include <assert.h>
17049 /* Override any gcc2 internal prototype to avoid an error.  */
17050 #ifdef __cplusplus
17051 extern "C"
17052 #endif
17053 /* We use char because int might match the return type of a gcc2
17054    builtin and then its argument prototype would still apply.  */
17055 char mkstemp ();
17056 char (*f) ();
17057
17058 int
17059 main ()
17060 {
17061 /* The GNU C library defines this for functions which it implements
17062     to always fail with ENOSYS.  Some functions are actually named
17063     something starting with __ and the normal name is an alias.  */
17064 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17065 choke me
17066 #else
17067 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17068 #endif
17069
17070   ;
17071   return 0;
17072 }
17073 _ACEOF
17074 rm -f conftest.$ac_objext conftest$ac_exeext
17075 if { (eval echo "$as_me:17075: \"$ac_link\"") >&5
17076   (eval $ac_link) 2>&5
17077   ac_status=$?
17078   echo "$as_me:17078: \$? = $ac_status" >&5
17079   (exit $ac_status); } &&
17080          { ac_try='test -s conftest$ac_exeext'
17081   { (eval echo "$as_me:17081: \"$ac_try\"") >&5
17082   (eval $ac_try) 2>&5
17083   ac_status=$?
17084   echo "$as_me:17084: \$? = $ac_status" >&5
17085   (exit $ac_status); }; }; then
17086   ac_cv_func_mkstemp=yes
17087 else
17088   echo "$as_me: failed program was:" >&5
17089 cat conftest.$ac_ext >&5
17090 ac_cv_func_mkstemp=no
17091 fi
17092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17093 fi
17094 echo "$as_me:17094: result: $ac_cv_func_mkstemp" >&5
17095 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17096
17097 fi
17098 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17099
17100 cat >>confdefs.h <<\EOF
17101 #define HAVE_MKSTEMP 1
17102 EOF
17103
17104 fi
17105
17106 # setup for prototype of fallback for vsscanf()
17107
17108 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17109         HAVE_VSSCANF=1
17110 else
17111         HAVE_VSSCANF=0
17112 fi
17113
17114 if test "x$cross_compiling" = xyes ; then
17115         { echo "$as_me:17115: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17116 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17117 else
17118         echo "$as_me:17118: checking whether setvbuf arguments are reversed" >&5
17119 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17120 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17121   echo $ECHO_N "(cached) $ECHO_C" >&6
17122 else
17123   if test "$cross_compiling" = yes; then
17124   { { echo "$as_me:17124: error: cannot run test program while cross compiling" >&5
17125 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17126    { (exit 1); exit 1; }; }
17127 else
17128   cat >conftest.$ac_ext <<_ACEOF
17129 #line 17129 "configure"
17130 #include "confdefs.h"
17131 #include <stdio.h>
17132 /* If setvbuf has the reversed format, exit 0. */
17133 int
17134 main ()
17135 {
17136   /* This call has the arguments reversed.
17137      A reversed system may check and see that the address of main
17138      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17139   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17140     $ac_main_return(1);
17141   putc('\r', stdout);
17142   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17143 }
17144 _ACEOF
17145 rm -f conftest$ac_exeext
17146 if { (eval echo "$as_me:17146: \"$ac_link\"") >&5
17147   (eval $ac_link) 2>&5
17148   ac_status=$?
17149   echo "$as_me:17149: \$? = $ac_status" >&5
17150   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17151   { (eval echo "$as_me:17151: \"$ac_try\"") >&5
17152   (eval $ac_try) 2>&5
17153   ac_status=$?
17154   echo "$as_me:17154: \$? = $ac_status" >&5
17155   (exit $ac_status); }; }; then
17156   ac_cv_func_setvbuf_reversed=yes
17157 else
17158   echo "$as_me: program exited with status $ac_status" >&5
17159 echo "$as_me: failed program was:" >&5
17160 cat conftest.$ac_ext >&5
17161 ac_cv_func_setvbuf_reversed=no
17162 fi
17163 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17164 fi
17165 rm -f core core.* *.core
17166 fi
17167 echo "$as_me:17167: result: $ac_cv_func_setvbuf_reversed" >&5
17168 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17169 if test $ac_cv_func_setvbuf_reversed = yes; then
17170
17171 cat >>confdefs.h <<\EOF
17172 #define SETVBUF_REVERSED 1
17173 EOF
17174
17175 fi
17176
17177 fi
17178 echo "$as_me:17178: checking for intptr_t" >&5
17179 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17180 if test "${ac_cv_type_intptr_t+set}" = set; then
17181   echo $ECHO_N "(cached) $ECHO_C" >&6
17182 else
17183   cat >conftest.$ac_ext <<_ACEOF
17184 #line 17184 "configure"
17185 #include "confdefs.h"
17186 $ac_includes_default
17187 int
17188 main ()
17189 {
17190 if ((intptr_t *) 0)
17191   return 0;
17192 if (sizeof (intptr_t))
17193   return 0;
17194   ;
17195   return 0;
17196 }
17197 _ACEOF
17198 rm -f conftest.$ac_objext
17199 if { (eval echo "$as_me:17199: \"$ac_compile\"") >&5
17200   (eval $ac_compile) 2>&5
17201   ac_status=$?
17202   echo "$as_me:17202: \$? = $ac_status" >&5
17203   (exit $ac_status); } &&
17204          { ac_try='test -s conftest.$ac_objext'
17205   { (eval echo "$as_me:17205: \"$ac_try\"") >&5
17206   (eval $ac_try) 2>&5
17207   ac_status=$?
17208   echo "$as_me:17208: \$? = $ac_status" >&5
17209   (exit $ac_status); }; }; then
17210   ac_cv_type_intptr_t=yes
17211 else
17212   echo "$as_me: failed program was:" >&5
17213 cat conftest.$ac_ext >&5
17214 ac_cv_type_intptr_t=no
17215 fi
17216 rm -f conftest.$ac_objext conftest.$ac_ext
17217 fi
17218 echo "$as_me:17218: result: $ac_cv_type_intptr_t" >&5
17219 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17220 if test $ac_cv_type_intptr_t = yes; then
17221   :
17222 else
17223
17224 cat >>confdefs.h <<EOF
17225 #define intptr_t long
17226 EOF
17227
17228 fi
17229
17230 echo "$as_me:17230: checking for ssize_t" >&5
17231 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17232 if test "${ac_cv_type_ssize_t+set}" = set; then
17233   echo $ECHO_N "(cached) $ECHO_C" >&6
17234 else
17235   cat >conftest.$ac_ext <<_ACEOF
17236 #line 17236 "configure"
17237 #include "confdefs.h"
17238 $ac_includes_default
17239 int
17240 main ()
17241 {
17242 if ((ssize_t *) 0)
17243   return 0;
17244 if (sizeof (ssize_t))
17245   return 0;
17246   ;
17247   return 0;
17248 }
17249 _ACEOF
17250 rm -f conftest.$ac_objext
17251 if { (eval echo "$as_me:17251: \"$ac_compile\"") >&5
17252   (eval $ac_compile) 2>&5
17253   ac_status=$?
17254   echo "$as_me:17254: \$? = $ac_status" >&5
17255   (exit $ac_status); } &&
17256          { ac_try='test -s conftest.$ac_objext'
17257   { (eval echo "$as_me:17257: \"$ac_try\"") >&5
17258   (eval $ac_try) 2>&5
17259   ac_status=$?
17260   echo "$as_me:17260: \$? = $ac_status" >&5
17261   (exit $ac_status); }; }; then
17262   ac_cv_type_ssize_t=yes
17263 else
17264   echo "$as_me: failed program was:" >&5
17265 cat conftest.$ac_ext >&5
17266 ac_cv_type_ssize_t=no
17267 fi
17268 rm -f conftest.$ac_objext conftest.$ac_ext
17269 fi
17270 echo "$as_me:17270: result: $ac_cv_type_ssize_t" >&5
17271 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17272 if test $ac_cv_type_ssize_t = yes; then
17273   :
17274 else
17275
17276 cat >>confdefs.h <<EOF
17277 #define ssize_t int
17278 EOF
17279
17280 fi
17281
17282 echo "$as_me:17282: checking for type sigaction_t" >&5
17283 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17284 if test "${cf_cv_type_sigaction+set}" = set; then
17285   echo $ECHO_N "(cached) $ECHO_C" >&6
17286 else
17287
17288         cat >conftest.$ac_ext <<_ACEOF
17289 #line 17289 "configure"
17290 #include "confdefs.h"
17291
17292 #include <signal.h>
17293 int
17294 main ()
17295 {
17296 sigaction_t x
17297   ;
17298   return 0;
17299 }
17300 _ACEOF
17301 rm -f conftest.$ac_objext
17302 if { (eval echo "$as_me:17302: \"$ac_compile\"") >&5
17303   (eval $ac_compile) 2>&5
17304   ac_status=$?
17305   echo "$as_me:17305: \$? = $ac_status" >&5
17306   (exit $ac_status); } &&
17307          { ac_try='test -s conftest.$ac_objext'
17308   { (eval echo "$as_me:17308: \"$ac_try\"") >&5
17309   (eval $ac_try) 2>&5
17310   ac_status=$?
17311   echo "$as_me:17311: \$? = $ac_status" >&5
17312   (exit $ac_status); }; }; then
17313   cf_cv_type_sigaction=yes
17314 else
17315   echo "$as_me: failed program was:" >&5
17316 cat conftest.$ac_ext >&5
17317 cf_cv_type_sigaction=no
17318 fi
17319 rm -f conftest.$ac_objext conftest.$ac_ext
17320 fi
17321
17322 echo "$as_me:17322: result: $cf_cv_type_sigaction" >&5
17323 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17324 test "$cf_cv_type_sigaction" = yes &&
17325 cat >>confdefs.h <<\EOF
17326 #define HAVE_TYPE_SIGACTION 1
17327 EOF
17328
17329 echo "$as_me:17329: checking declaration of size-change" >&5
17330 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17331 if test "${cf_cv_sizechange+set}" = set; then
17332   echo $ECHO_N "(cached) $ECHO_C" >&6
17333 else
17334
17335     cf_cv_sizechange=unknown
17336     cf_save_CPPFLAGS="$CPPFLAGS"
17337
17338 for cf_opts in "" "NEED_PTEM_H"
17339 do
17340
17341     CPPFLAGS="$cf_save_CPPFLAGS"
17342     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17343     cat >conftest.$ac_ext <<_ACEOF
17344 #line 17344 "configure"
17345 #include "confdefs.h"
17346 #include <sys/types.h>
17347 #ifdef HAVE_TERMIOS_H
17348 #include <termios.h>
17349 #else
17350 #ifdef HAVE_TERMIO_H
17351 #include <termio.h>
17352 #endif
17353 #endif
17354 #ifdef NEED_PTEM_H
17355 /* This is a workaround for SCO:  they neglected to define struct winsize in
17356  * termios.h -- it's only in termio.h and ptem.h
17357  */
17358 #include        <sys/stream.h>
17359 #include        <sys/ptem.h>
17360 #endif
17361 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17362 #include <sys/ioctl.h>
17363 #endif
17364
17365 int
17366 main ()
17367 {
17368
17369 #ifdef TIOCGSIZE
17370         struct ttysize win;     /* FIXME: what system is this? */
17371         int y = win.ts_lines;
17372         int x = win.ts_cols;
17373 #else
17374 #ifdef TIOCGWINSZ
17375         struct winsize win;
17376         int y = win.ws_row;
17377         int x = win.ws_col;
17378 #else
17379         no TIOCGSIZE or TIOCGWINSZ
17380 #endif /* TIOCGWINSZ */
17381 #endif /* TIOCGSIZE */
17382
17383   ;
17384   return 0;
17385 }
17386 _ACEOF
17387 rm -f conftest.$ac_objext
17388 if { (eval echo "$as_me:17388: \"$ac_compile\"") >&5
17389   (eval $ac_compile) 2>&5
17390   ac_status=$?
17391   echo "$as_me:17391: \$? = $ac_status" >&5
17392   (exit $ac_status); } &&
17393          { ac_try='test -s conftest.$ac_objext'
17394   { (eval echo "$as_me:17394: \"$ac_try\"") >&5
17395   (eval $ac_try) 2>&5
17396   ac_status=$?
17397   echo "$as_me:17397: \$? = $ac_status" >&5
17398   (exit $ac_status); }; }; then
17399   cf_cv_sizechange=yes
17400 else
17401   echo "$as_me: failed program was:" >&5
17402 cat conftest.$ac_ext >&5
17403 cf_cv_sizechange=no
17404 fi
17405 rm -f conftest.$ac_objext conftest.$ac_ext
17406
17407         CPPFLAGS="$cf_save_CPPFLAGS"
17408         if test "$cf_cv_sizechange" = yes ; then
17409                 echo "size-change succeeded ($cf_opts)" >&5
17410                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17411                 break
17412         fi
17413 done
17414
17415 fi
17416 echo "$as_me:17416: result: $cf_cv_sizechange" >&5
17417 echo "${ECHO_T}$cf_cv_sizechange" >&6
17418 if test "$cf_cv_sizechange" != no ; then
17419
17420 cat >>confdefs.h <<\EOF
17421 #define HAVE_SIZECHANGE 1
17422 EOF
17423
17424         case $cf_cv_sizechange in #(vi
17425         NEED*)
17426                 cat >>confdefs.h <<EOF
17427 #define $cf_cv_sizechange  1
17428 EOF
17429
17430                 ;;
17431         esac
17432 fi
17433
17434 echo "$as_me:17434: checking for memmove" >&5
17435 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17436 if test "${ac_cv_func_memmove+set}" = set; then
17437   echo $ECHO_N "(cached) $ECHO_C" >&6
17438 else
17439   cat >conftest.$ac_ext <<_ACEOF
17440 #line 17440 "configure"
17441 #include "confdefs.h"
17442 /* System header to define __stub macros and hopefully few prototypes,
17443     which can conflict with char memmove (); below.  */
17444 #include <assert.h>
17445 /* Override any gcc2 internal prototype to avoid an error.  */
17446 #ifdef __cplusplus
17447 extern "C"
17448 #endif
17449 /* We use char because int might match the return type of a gcc2
17450    builtin and then its argument prototype would still apply.  */
17451 char memmove ();
17452 char (*f) ();
17453
17454 int
17455 main ()
17456 {
17457 /* The GNU C library defines this for functions which it implements
17458     to always fail with ENOSYS.  Some functions are actually named
17459     something starting with __ and the normal name is an alias.  */
17460 #if defined (__stub_memmove) || defined (__stub___memmove)
17461 choke me
17462 #else
17463 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17464 #endif
17465
17466   ;
17467   return 0;
17468 }
17469 _ACEOF
17470 rm -f conftest.$ac_objext conftest$ac_exeext
17471 if { (eval echo "$as_me:17471: \"$ac_link\"") >&5
17472   (eval $ac_link) 2>&5
17473   ac_status=$?
17474   echo "$as_me:17474: \$? = $ac_status" >&5
17475   (exit $ac_status); } &&
17476          { ac_try='test -s conftest$ac_exeext'
17477   { (eval echo "$as_me:17477: \"$ac_try\"") >&5
17478   (eval $ac_try) 2>&5
17479   ac_status=$?
17480   echo "$as_me:17480: \$? = $ac_status" >&5
17481   (exit $ac_status); }; }; then
17482   ac_cv_func_memmove=yes
17483 else
17484   echo "$as_me: failed program was:" >&5
17485 cat conftest.$ac_ext >&5
17486 ac_cv_func_memmove=no
17487 fi
17488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17489 fi
17490 echo "$as_me:17490: result: $ac_cv_func_memmove" >&5
17491 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17492 if test $ac_cv_func_memmove = yes; then
17493   :
17494 else
17495
17496 echo "$as_me:17496: checking for bcopy" >&5
17497 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17498 if test "${ac_cv_func_bcopy+set}" = set; then
17499   echo $ECHO_N "(cached) $ECHO_C" >&6
17500 else
17501   cat >conftest.$ac_ext <<_ACEOF
17502 #line 17502 "configure"
17503 #include "confdefs.h"
17504 /* System header to define __stub macros and hopefully few prototypes,
17505     which can conflict with char bcopy (); below.  */
17506 #include <assert.h>
17507 /* Override any gcc2 internal prototype to avoid an error.  */
17508 #ifdef __cplusplus
17509 extern "C"
17510 #endif
17511 /* We use char because int might match the return type of a gcc2
17512    builtin and then its argument prototype would still apply.  */
17513 char bcopy ();
17514 char (*f) ();
17515
17516 int
17517 main ()
17518 {
17519 /* The GNU C library defines this for functions which it implements
17520     to always fail with ENOSYS.  Some functions are actually named
17521     something starting with __ and the normal name is an alias.  */
17522 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17523 choke me
17524 #else
17525 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17526 #endif
17527
17528   ;
17529   return 0;
17530 }
17531 _ACEOF
17532 rm -f conftest.$ac_objext conftest$ac_exeext
17533 if { (eval echo "$as_me:17533: \"$ac_link\"") >&5
17534   (eval $ac_link) 2>&5
17535   ac_status=$?
17536   echo "$as_me:17536: \$? = $ac_status" >&5
17537   (exit $ac_status); } &&
17538          { ac_try='test -s conftest$ac_exeext'
17539   { (eval echo "$as_me:17539: \"$ac_try\"") >&5
17540   (eval $ac_try) 2>&5
17541   ac_status=$?
17542   echo "$as_me:17542: \$? = $ac_status" >&5
17543   (exit $ac_status); }; }; then
17544   ac_cv_func_bcopy=yes
17545 else
17546   echo "$as_me: failed program was:" >&5
17547 cat conftest.$ac_ext >&5
17548 ac_cv_func_bcopy=no
17549 fi
17550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17551 fi
17552 echo "$as_me:17552: result: $ac_cv_func_bcopy" >&5
17553 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17554 if test $ac_cv_func_bcopy = yes; then
17555
17556         echo "$as_me:17556: checking if bcopy does overlapping moves" >&5
17557 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17558 if test "${cf_cv_good_bcopy+set}" = set; then
17559   echo $ECHO_N "(cached) $ECHO_C" >&6
17560 else
17561
17562                 if test "$cross_compiling" = yes; then
17563   cf_cv_good_bcopy=unknown
17564 else
17565   cat >conftest.$ac_ext <<_ACEOF
17566 #line 17566 "configure"
17567 #include "confdefs.h"
17568
17569 int main() {
17570         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17571         char temp[40];
17572         bcopy(data, temp, sizeof(data));
17573         bcopy(temp+10, temp, 15);
17574         bcopy(temp+5, temp+15, 10);
17575         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17576 }
17577
17578 _ACEOF
17579 rm -f conftest$ac_exeext
17580 if { (eval echo "$as_me:17580: \"$ac_link\"") >&5
17581   (eval $ac_link) 2>&5
17582   ac_status=$?
17583   echo "$as_me:17583: \$? = $ac_status" >&5
17584   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17585   { (eval echo "$as_me:17585: \"$ac_try\"") >&5
17586   (eval $ac_try) 2>&5
17587   ac_status=$?
17588   echo "$as_me:17588: \$? = $ac_status" >&5
17589   (exit $ac_status); }; }; then
17590   cf_cv_good_bcopy=yes
17591 else
17592   echo "$as_me: program exited with status $ac_status" >&5
17593 echo "$as_me: failed program was:" >&5
17594 cat conftest.$ac_ext >&5
17595 cf_cv_good_bcopy=no
17596 fi
17597 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17598 fi
17599
17600 fi
17601 echo "$as_me:17601: result: $cf_cv_good_bcopy" >&5
17602 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17603
17604 else
17605   cf_cv_good_bcopy=no
17606 fi
17607
17608         if test "$cf_cv_good_bcopy" = yes ; then
17609
17610 cat >>confdefs.h <<\EOF
17611 #define USE_OK_BCOPY 1
17612 EOF
17613
17614         else
17615
17616 cat >>confdefs.h <<\EOF
17617 #define USE_MY_MEMMOVE 1
17618 EOF
17619
17620         fi
17621
17622 fi
17623
17624 echo "$as_me:17624: checking if poll really works" >&5
17625 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17626 if test "${cf_cv_working_poll+set}" = set; then
17627   echo $ECHO_N "(cached) $ECHO_C" >&6
17628 else
17629
17630 if test "$cross_compiling" = yes; then
17631   cf_cv_working_poll=unknown
17632 else
17633   cat >conftest.$ac_ext <<_ACEOF
17634 #line 17634 "configure"
17635 #include "confdefs.h"
17636
17637 #include <stdlib.h>
17638 #include <stdio.h>
17639 #include <unistd.h>
17640 #include <fcntl.h>
17641 #ifdef HAVE_POLL_H
17642 #include <poll.h>
17643 #else
17644 #include <sys/poll.h>
17645 #endif
17646 int main() {
17647         struct pollfd myfds;
17648         int ret;
17649
17650         /* check for Darwin bug with respect to "devices" */
17651         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17652         if (myfds.fd < 0)
17653                 myfds.fd = 0;
17654         myfds.events = POLLIN;
17655         myfds.revents = 0;
17656
17657         ret = poll(&myfds, 1, 100);
17658
17659         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17660                 ret = -1;
17661         } else {
17662                 int fd = 0;
17663                 if (!isatty(fd)) {
17664                         fd = open("/dev/tty", 2);       /* O_RDWR */
17665                 }
17666
17667                 if (fd >= 0) {
17668                         /* also check with standard input */
17669                         myfds.fd = fd;
17670                         myfds.events = POLLIN;
17671                         myfds.revents = 0;
17672                         ret = poll(&myfds, 1, 100);
17673                 } else {
17674                         ret = -1;
17675                 }
17676         }
17677         ${cf_cv_main_return:-return}(ret < 0);
17678 }
17679 _ACEOF
17680 rm -f conftest$ac_exeext
17681 if { (eval echo "$as_me:17681: \"$ac_link\"") >&5
17682   (eval $ac_link) 2>&5
17683   ac_status=$?
17684   echo "$as_me:17684: \$? = $ac_status" >&5
17685   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17686   { (eval echo "$as_me:17686: \"$ac_try\"") >&5
17687   (eval $ac_try) 2>&5
17688   ac_status=$?
17689   echo "$as_me:17689: \$? = $ac_status" >&5
17690   (exit $ac_status); }; }; then
17691   cf_cv_working_poll=yes
17692 else
17693   echo "$as_me: program exited with status $ac_status" >&5
17694 echo "$as_me: failed program was:" >&5
17695 cat conftest.$ac_ext >&5
17696 cf_cv_working_poll=no
17697 fi
17698 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17699 fi
17700 fi
17701 echo "$as_me:17701: result: $cf_cv_working_poll" >&5
17702 echo "${ECHO_T}$cf_cv_working_poll" >&6
17703 test "$cf_cv_working_poll" = "yes" &&
17704 cat >>confdefs.h <<\EOF
17705 #define HAVE_WORKING_POLL 1
17706 EOF
17707
17708 echo "$as_me:17708: checking for va_copy" >&5
17709 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17710 if test "${cf_cv_have_va_copy+set}" = set; then
17711   echo $ECHO_N "(cached) $ECHO_C" >&6
17712 else
17713
17714 cat >conftest.$ac_ext <<_ACEOF
17715 #line 17715 "configure"
17716 #include "confdefs.h"
17717
17718 #include <stdarg.h>
17719
17720 int
17721 main ()
17722 {
17723
17724         static va_list dst;
17725         static va_list src;
17726         va_copy(dst, src)
17727   ;
17728   return 0;
17729 }
17730 _ACEOF
17731 rm -f conftest.$ac_objext conftest$ac_exeext
17732 if { (eval echo "$as_me:17732: \"$ac_link\"") >&5
17733   (eval $ac_link) 2>&5
17734   ac_status=$?
17735   echo "$as_me:17735: \$? = $ac_status" >&5
17736   (exit $ac_status); } &&
17737          { ac_try='test -s conftest$ac_exeext'
17738   { (eval echo "$as_me:17738: \"$ac_try\"") >&5
17739   (eval $ac_try) 2>&5
17740   ac_status=$?
17741   echo "$as_me:17741: \$? = $ac_status" >&5
17742   (exit $ac_status); }; }; then
17743   cf_cv_have_va_copy=yes
17744 else
17745   echo "$as_me: failed program was:" >&5
17746 cat conftest.$ac_ext >&5
17747 cf_cv_have_va_copy=no
17748 fi
17749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17750 fi
17751 echo "$as_me:17751: result: $cf_cv_have_va_copy" >&5
17752 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17753
17754 test "$cf_cv_have_va_copy" = yes &&
17755 cat >>confdefs.h <<\EOF
17756 #define HAVE_VA_COPY 1
17757 EOF
17758
17759 echo "$as_me:17759: checking for __va_copy" >&5
17760 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17761 if test "${cf_cv_have___va_copy+set}" = set; then
17762   echo $ECHO_N "(cached) $ECHO_C" >&6
17763 else
17764
17765 cat >conftest.$ac_ext <<_ACEOF
17766 #line 17766 "configure"
17767 #include "confdefs.h"
17768
17769 #include <stdarg.h>
17770
17771 int
17772 main ()
17773 {
17774
17775         static va_list dst;
17776         static va_list src;
17777         __va_copy(dst, src)
17778   ;
17779   return 0;
17780 }
17781 _ACEOF
17782 rm -f conftest.$ac_objext conftest$ac_exeext
17783 if { (eval echo "$as_me:17783: \"$ac_link\"") >&5
17784   (eval $ac_link) 2>&5
17785   ac_status=$?
17786   echo "$as_me:17786: \$? = $ac_status" >&5
17787   (exit $ac_status); } &&
17788          { ac_try='test -s conftest$ac_exeext'
17789   { (eval echo "$as_me:17789: \"$ac_try\"") >&5
17790   (eval $ac_try) 2>&5
17791   ac_status=$?
17792   echo "$as_me:17792: \$? = $ac_status" >&5
17793   (exit $ac_status); }; }; then
17794   cf_cv_have___va_copy=yes
17795 else
17796   echo "$as_me: failed program was:" >&5
17797 cat conftest.$ac_ext >&5
17798 cf_cv_have___va_copy=no
17799 fi
17800 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17801 fi
17802 echo "$as_me:17802: result: $cf_cv_have___va_copy" >&5
17803 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17804
17805 test "$cf_cv_have___va_copy" = yes &&
17806 cat >>confdefs.h <<\EOF
17807 #define HAVE___VA_COPY 1
17808 EOF
17809
17810 echo "$as_me:17810: checking for pid_t" >&5
17811 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17812 if test "${ac_cv_type_pid_t+set}" = set; then
17813   echo $ECHO_N "(cached) $ECHO_C" >&6
17814 else
17815   cat >conftest.$ac_ext <<_ACEOF
17816 #line 17816 "configure"
17817 #include "confdefs.h"
17818 $ac_includes_default
17819 int
17820 main ()
17821 {
17822 if ((pid_t *) 0)
17823   return 0;
17824 if (sizeof (pid_t))
17825   return 0;
17826   ;
17827   return 0;
17828 }
17829 _ACEOF
17830 rm -f conftest.$ac_objext
17831 if { (eval echo "$as_me:17831: \"$ac_compile\"") >&5
17832   (eval $ac_compile) 2>&5
17833   ac_status=$?
17834   echo "$as_me:17834: \$? = $ac_status" >&5
17835   (exit $ac_status); } &&
17836          { ac_try='test -s conftest.$ac_objext'
17837   { (eval echo "$as_me:17837: \"$ac_try\"") >&5
17838   (eval $ac_try) 2>&5
17839   ac_status=$?
17840   echo "$as_me:17840: \$? = $ac_status" >&5
17841   (exit $ac_status); }; }; then
17842   ac_cv_type_pid_t=yes
17843 else
17844   echo "$as_me: failed program was:" >&5
17845 cat conftest.$ac_ext >&5
17846 ac_cv_type_pid_t=no
17847 fi
17848 rm -f conftest.$ac_objext conftest.$ac_ext
17849 fi
17850 echo "$as_me:17850: result: $ac_cv_type_pid_t" >&5
17851 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17852 if test $ac_cv_type_pid_t = yes; then
17853   :
17854 else
17855
17856 cat >>confdefs.h <<EOF
17857 #define pid_t int
17858 EOF
17859
17860 fi
17861
17862 for ac_header in unistd.h vfork.h
17863 do
17864 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17865 echo "$as_me:17865: checking for $ac_header" >&5
17866 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17867 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17868   echo $ECHO_N "(cached) $ECHO_C" >&6
17869 else
17870   cat >conftest.$ac_ext <<_ACEOF
17871 #line 17871 "configure"
17872 #include "confdefs.h"
17873 #include <$ac_header>
17874 _ACEOF
17875 if { (eval echo "$as_me:17875: \"$ac_cpp conftest.$ac_ext\"") >&5
17876   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17877   ac_status=$?
17878   egrep -v '^ *\+' conftest.er1 >conftest.err
17879   rm -f conftest.er1
17880   cat conftest.err >&5
17881   echo "$as_me:17881: \$? = $ac_status" >&5
17882   (exit $ac_status); } >/dev/null; then
17883   if test -s conftest.err; then
17884     ac_cpp_err=$ac_c_preproc_warn_flag
17885   else
17886     ac_cpp_err=
17887   fi
17888 else
17889   ac_cpp_err=yes
17890 fi
17891 if test -z "$ac_cpp_err"; then
17892   eval "$as_ac_Header=yes"
17893 else
17894   echo "$as_me: failed program was:" >&5
17895   cat conftest.$ac_ext >&5
17896   eval "$as_ac_Header=no"
17897 fi
17898 rm -f conftest.err conftest.$ac_ext
17899 fi
17900 echo "$as_me:17900: result: `eval echo '${'$as_ac_Header'}'`" >&5
17901 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17902 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17903   cat >>confdefs.h <<EOF
17904 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17905 EOF
17906
17907 fi
17908 done
17909
17910 for ac_func in fork vfork
17911 do
17912 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17913 echo "$as_me:17913: checking for $ac_func" >&5
17914 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17915 if eval "test \"\${$as_ac_var+set}\" = set"; then
17916   echo $ECHO_N "(cached) $ECHO_C" >&6
17917 else
17918   cat >conftest.$ac_ext <<_ACEOF
17919 #line 17919 "configure"
17920 #include "confdefs.h"
17921 /* System header to define __stub macros and hopefully few prototypes,
17922     which can conflict with char $ac_func (); below.  */
17923 #include <assert.h>
17924 /* Override any gcc2 internal prototype to avoid an error.  */
17925 #ifdef __cplusplus
17926 extern "C"
17927 #endif
17928 /* We use char because int might match the return type of a gcc2
17929    builtin and then its argument prototype would still apply.  */
17930 char $ac_func ();
17931 char (*f) ();
17932
17933 int
17934 main ()
17935 {
17936 /* The GNU C library defines this for functions which it implements
17937     to always fail with ENOSYS.  Some functions are actually named
17938     something starting with __ and the normal name is an alias.  */
17939 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17940 choke me
17941 #else
17942 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17943 #endif
17944
17945   ;
17946   return 0;
17947 }
17948 _ACEOF
17949 rm -f conftest.$ac_objext conftest$ac_exeext
17950 if { (eval echo "$as_me:17950: \"$ac_link\"") >&5
17951   (eval $ac_link) 2>&5
17952   ac_status=$?
17953   echo "$as_me:17953: \$? = $ac_status" >&5
17954   (exit $ac_status); } &&
17955          { ac_try='test -s conftest$ac_exeext'
17956   { (eval echo "$as_me:17956: \"$ac_try\"") >&5
17957   (eval $ac_try) 2>&5
17958   ac_status=$?
17959   echo "$as_me:17959: \$? = $ac_status" >&5
17960   (exit $ac_status); }; }; then
17961   eval "$as_ac_var=yes"
17962 else
17963   echo "$as_me: failed program was:" >&5
17964 cat conftest.$ac_ext >&5
17965 eval "$as_ac_var=no"
17966 fi
17967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17968 fi
17969 echo "$as_me:17969: result: `eval echo '${'$as_ac_var'}'`" >&5
17970 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17971 if test `eval echo '${'$as_ac_var'}'` = yes; then
17972   cat >>confdefs.h <<EOF
17973 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17974 EOF
17975
17976 fi
17977 done
17978
17979 ac_cv_func_fork_works=$ac_cv_func_fork
17980 if test "x$ac_cv_func_fork" = xyes; then
17981   echo "$as_me:17981: checking for working fork" >&5
17982 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17983 if test "${ac_cv_func_fork_works+set}" = set; then
17984   echo $ECHO_N "(cached) $ECHO_C" >&6
17985 else
17986   if test "$cross_compiling" = yes; then
17987   ac_cv_func_fork_works=cross
17988 else
17989   cat >conftest.$ac_ext <<_ACEOF
17990 /* By Rüdiger Kuhlmann. */
17991       #include <sys/types.h>
17992       #if HAVE_UNISTD_H
17993       # include <unistd.h>
17994       #endif
17995       /* Some systems only have a dummy stub for fork() */
17996       int main ()
17997       {
17998         if (fork() < 0)
17999           $ac_main_return (1);
18000         $ac_main_return (0);
18001       }
18002 _ACEOF
18003 rm -f conftest$ac_exeext
18004 if { (eval echo "$as_me:18004: \"$ac_link\"") >&5
18005   (eval $ac_link) 2>&5
18006   ac_status=$?
18007   echo "$as_me:18007: \$? = $ac_status" >&5
18008   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18009   { (eval echo "$as_me:18009: \"$ac_try\"") >&5
18010   (eval $ac_try) 2>&5
18011   ac_status=$?
18012   echo "$as_me:18012: \$? = $ac_status" >&5
18013   (exit $ac_status); }; }; then
18014   ac_cv_func_fork_works=yes
18015 else
18016   echo "$as_me: program exited with status $ac_status" >&5
18017 echo "$as_me: failed program was:" >&5
18018 cat conftest.$ac_ext >&5
18019 ac_cv_func_fork_works=no
18020 fi
18021 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18022 fi
18023 fi
18024 echo "$as_me:18024: result: $ac_cv_func_fork_works" >&5
18025 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18026
18027 fi
18028 if test "x$ac_cv_func_fork_works" = xcross; then
18029   case $host in
18030     *-*-amigaos* | *-*-msdosdjgpp*)
18031       # Override, as these systems have only a dummy fork() stub
18032       ac_cv_func_fork_works=no
18033       ;;
18034     *)
18035       ac_cv_func_fork_works=yes
18036       ;;
18037   esac
18038   { echo "$as_me:18038: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18039 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18040 fi
18041 ac_cv_func_vfork_works=$ac_cv_func_vfork
18042 if test "x$ac_cv_func_vfork" = xyes; then
18043   echo "$as_me:18043: checking for working vfork" >&5
18044 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18045 if test "${ac_cv_func_vfork_works+set}" = set; then
18046   echo $ECHO_N "(cached) $ECHO_C" >&6
18047 else
18048   if test "$cross_compiling" = yes; then
18049   ac_cv_func_vfork_works=cross
18050 else
18051   cat >conftest.$ac_ext <<_ACEOF
18052 #line 18052 "configure"
18053 #include "confdefs.h"
18054 /* Thanks to Paul Eggert for this test.  */
18055 #include <stdio.h>
18056 #include <sys/types.h>
18057 #include <sys/stat.h>
18058 #if HAVE_UNISTD_H
18059 # include <unistd.h>
18060 #endif
18061 #if HAVE_VFORK_H
18062 # include <vfork.h>
18063 #endif
18064 /* On some sparc systems, changes by the child to local and incoming
18065    argument registers are propagated back to the parent.  The compiler
18066    is told about this with #include <vfork.h>, but some compilers
18067    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18068    static variable whose address is put into a register that is
18069    clobbered by the vfork.  */
18070 static
18071 #ifdef __cplusplus
18072 sparc_address_test (int arg)
18073 # else
18074 sparc_address_test (arg) int arg;
18075 #endif
18076 {
18077   static pid_t child;
18078   if (!child) {
18079     child = vfork ();
18080     if (child < 0) {
18081       perror ("vfork");
18082       _exit(2);
18083     }
18084     if (!child) {
18085       arg = getpid();
18086       write(-1, "", 0);
18087       _exit (arg);
18088     }
18089   }
18090 }
18091
18092 int
18093 main ()
18094 {
18095   pid_t parent = getpid ();
18096   pid_t child;
18097
18098   sparc_address_test ();
18099
18100   child = vfork ();
18101
18102   if (child == 0) {
18103     /* Here is another test for sparc vfork register problems.  This
18104        test uses lots of local variables, at least as many local
18105        variables as main has allocated so far including compiler
18106        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18107        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18108        reuse the register of parent for one of the local variables,
18109        since it will think that parent can't possibly be used any more
18110        in this routine.  Assigning to the local variable will thus
18111        munge parent in the parent process.  */
18112     pid_t
18113       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18114       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18115     /* Convince the compiler that p..p7 are live; otherwise, it might
18116        use the same hardware register for all 8 local variables.  */
18117     if (p != p1 || p != p2 || p != p3 || p != p4
18118         || p != p5 || p != p6 || p != p7)
18119       _exit(1);
18120
18121     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18122        from child file descriptors.  If the child closes a descriptor
18123        before it execs or exits, this munges the parent's descriptor
18124        as well.  Test for this by closing stdout in the child.  */
18125     _exit(close(fileno(stdout)) != 0);
18126   } else {
18127     int status;
18128     struct stat st;
18129
18130     while (wait(&status) != child)
18131       ;
18132     $ac_main_return(
18133          /* Was there some problem with vforking?  */
18134          child < 0
18135
18136          /* Did the child fail?  (This shouldn't happen.)  */
18137          || status
18138
18139          /* Did the vfork/compiler bug occur?  */
18140          || parent != getpid()
18141
18142          /* Did the file descriptor bug occur?  */
18143          || fstat(fileno(stdout), &st) != 0
18144          );
18145   }
18146 }
18147 _ACEOF
18148 rm -f conftest$ac_exeext
18149 if { (eval echo "$as_me:18149: \"$ac_link\"") >&5
18150   (eval $ac_link) 2>&5
18151   ac_status=$?
18152   echo "$as_me:18152: \$? = $ac_status" >&5
18153   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18154   { (eval echo "$as_me:18154: \"$ac_try\"") >&5
18155   (eval $ac_try) 2>&5
18156   ac_status=$?
18157   echo "$as_me:18157: \$? = $ac_status" >&5
18158   (exit $ac_status); }; }; then
18159   ac_cv_func_vfork_works=yes
18160 else
18161   echo "$as_me: program exited with status $ac_status" >&5
18162 echo "$as_me: failed program was:" >&5
18163 cat conftest.$ac_ext >&5
18164 ac_cv_func_vfork_works=no
18165 fi
18166 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18167 fi
18168 fi
18169 echo "$as_me:18169: result: $ac_cv_func_vfork_works" >&5
18170 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18171
18172 fi;
18173 if test "x$ac_cv_func_fork_works" = xcross; then
18174   ac_cv_func_vfork_works=ac_cv_func_vfork
18175   { echo "$as_me:18175: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18176 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18177 fi
18178
18179 if test "x$ac_cv_func_vfork_works" = xyes; then
18180
18181 cat >>confdefs.h <<\EOF
18182 #define HAVE_WORKING_VFORK 1
18183 EOF
18184
18185 else
18186
18187 cat >>confdefs.h <<\EOF
18188 #define vfork fork
18189 EOF
18190
18191 fi
18192 if test "x$ac_cv_func_fork_works" = xyes; then
18193
18194 cat >>confdefs.h <<\EOF
18195 #define HAVE_WORKING_FORK 1
18196 EOF
18197
18198 fi
18199
18200 # special check for test/ditto.c
18201
18202 echo "$as_me:18202: checking for openpty in -lutil" >&5
18203 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18204 if test "${ac_cv_lib_util_openpty+set}" = set; then
18205   echo $ECHO_N "(cached) $ECHO_C" >&6
18206 else
18207   ac_check_lib_save_LIBS=$LIBS
18208 LIBS="-lutil  $LIBS"
18209 cat >conftest.$ac_ext <<_ACEOF
18210 #line 18210 "configure"
18211 #include "confdefs.h"
18212
18213 /* Override any gcc2 internal prototype to avoid an error.  */
18214 #ifdef __cplusplus
18215 extern "C"
18216 #endif
18217 /* We use char because int might match the return type of a gcc2
18218    builtin and then its argument prototype would still apply.  */
18219 char openpty ();
18220 int
18221 main ()
18222 {
18223 openpty ();
18224   ;
18225   return 0;
18226 }
18227 _ACEOF
18228 rm -f conftest.$ac_objext conftest$ac_exeext
18229 if { (eval echo "$as_me:18229: \"$ac_link\"") >&5
18230   (eval $ac_link) 2>&5
18231   ac_status=$?
18232   echo "$as_me:18232: \$? = $ac_status" >&5
18233   (exit $ac_status); } &&
18234          { ac_try='test -s conftest$ac_exeext'
18235   { (eval echo "$as_me:18235: \"$ac_try\"") >&5
18236   (eval $ac_try) 2>&5
18237   ac_status=$?
18238   echo "$as_me:18238: \$? = $ac_status" >&5
18239   (exit $ac_status); }; }; then
18240   ac_cv_lib_util_openpty=yes
18241 else
18242   echo "$as_me: failed program was:" >&5
18243 cat conftest.$ac_ext >&5
18244 ac_cv_lib_util_openpty=no
18245 fi
18246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18247 LIBS=$ac_check_lib_save_LIBS
18248 fi
18249 echo "$as_me:18249: result: $ac_cv_lib_util_openpty" >&5
18250 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18251 if test $ac_cv_lib_util_openpty = yes; then
18252   cf_cv_lib_util=yes
18253 else
18254   cf_cv_lib_util=no
18255 fi
18256
18257 echo "$as_me:18257: checking for openpty header" >&5
18258 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18259 if test "${cf_cv_func_openpty+set}" = set; then
18260   echo $ECHO_N "(cached) $ECHO_C" >&6
18261 else
18262
18263     cf_save_LIBS="$LIBS"
18264     test $cf_cv_lib_util = yes &&
18265 cf_add_libs="-lutil"
18266 # Filter out duplicates - this happens with badly-designed ".pc" files...
18267 for cf_add_1lib in $LIBS
18268 do
18269         for cf_add_2lib in $cf_add_libs
18270         do
18271                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18272                 then
18273                         cf_add_1lib=
18274                         break
18275                 fi
18276         done
18277         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18278 done
18279 LIBS="$cf_add_libs"
18280
18281     for cf_header in pty.h libutil.h util.h
18282     do
18283     cat >conftest.$ac_ext <<_ACEOF
18284 #line 18284 "configure"
18285 #include "confdefs.h"
18286
18287 #include <$cf_header>
18288
18289 int
18290 main ()
18291 {
18292
18293     int x = openpty((int *)0, (int *)0, (char *)0,
18294                    (struct termios *)0, (struct winsize *)0);
18295
18296   ;
18297   return 0;
18298 }
18299 _ACEOF
18300 rm -f conftest.$ac_objext conftest$ac_exeext
18301 if { (eval echo "$as_me:18301: \"$ac_link\"") >&5
18302   (eval $ac_link) 2>&5
18303   ac_status=$?
18304   echo "$as_me:18304: \$? = $ac_status" >&5
18305   (exit $ac_status); } &&
18306          { ac_try='test -s conftest$ac_exeext'
18307   { (eval echo "$as_me:18307: \"$ac_try\"") >&5
18308   (eval $ac_try) 2>&5
18309   ac_status=$?
18310   echo "$as_me:18310: \$? = $ac_status" >&5
18311   (exit $ac_status); }; }; then
18312
18313         cf_cv_func_openpty=$cf_header
18314         break
18315
18316 else
18317   echo "$as_me: failed program was:" >&5
18318 cat conftest.$ac_ext >&5
18319
18320         cf_cv_func_openpty=no
18321
18322 fi
18323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18324     done
18325     LIBS="$cf_save_LIBS"
18326
18327 fi
18328 echo "$as_me:18328: result: $cf_cv_func_openpty" >&5
18329 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18330
18331 if test "$cf_cv_func_openpty" != no ; then
18332
18333 cat >>confdefs.h <<EOF
18334 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18335 EOF
18336
18337 cat >>confdefs.h <<\EOF
18338 #define USE_XTERM_PTY 1
18339 EOF
18340
18341     if test "x$cf_cv_lib_util" = xyes ; then
18342
18343 cf_add_libs="-lutil"
18344 # Filter out duplicates - this happens with badly-designed ".pc" files...
18345 for cf_add_1lib in $TEST_LIBS
18346 do
18347         for cf_add_2lib in $cf_add_libs
18348         do
18349                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18350                 then
18351                         cf_add_1lib=
18352                         break
18353                 fi
18354         done
18355         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18356 done
18357 TEST_LIBS="$cf_add_libs"
18358
18359     fi
18360 fi
18361
18362 if test "$with_hashed_db" != no ; then
18363
18364 cat >>confdefs.h <<\EOF
18365 #define USE_HASHED_DB 1
18366 EOF
18367
18368 case $with_hashed_db in #(vi
18369 yes|*able*) #(vi
18370     ;;
18371 *)
18372     if test -d "$with_hashed_db" ; then
18373
18374 if test -n "$with_hashed_db/include" ; then
18375   for cf_add_incdir in $with_hashed_db/include
18376   do
18377         while test $cf_add_incdir != /usr/include
18378         do
18379           if test -d $cf_add_incdir
18380           then
18381                 cf_have_incdir=no
18382                 if test -n "$CFLAGS$CPPFLAGS" ; then
18383                   # a loop is needed to ensure we can add subdirs of existing dirs
18384                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18385                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18386                           cf_have_incdir=yes; break
18387                         fi
18388                   done
18389                 fi
18390
18391                 if test "$cf_have_incdir" = no ; then
18392                   if test "$cf_add_incdir" = /usr/local/include ; then
18393                         if test "$GCC" = yes
18394                         then
18395                           cf_save_CPPFLAGS=$CPPFLAGS
18396                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18397                           cat >conftest.$ac_ext <<_ACEOF
18398 #line 18398 "configure"
18399 #include "confdefs.h"
18400 #include <stdio.h>
18401 int
18402 main ()
18403 {
18404 printf("Hello")
18405   ;
18406   return 0;
18407 }
18408 _ACEOF
18409 rm -f conftest.$ac_objext
18410 if { (eval echo "$as_me:18410: \"$ac_compile\"") >&5
18411   (eval $ac_compile) 2>&5
18412   ac_status=$?
18413   echo "$as_me:18413: \$? = $ac_status" >&5
18414   (exit $ac_status); } &&
18415          { ac_try='test -s conftest.$ac_objext'
18416   { (eval echo "$as_me:18416: \"$ac_try\"") >&5
18417   (eval $ac_try) 2>&5
18418   ac_status=$?
18419   echo "$as_me:18419: \$? = $ac_status" >&5
18420   (exit $ac_status); }; }; then
18421   :
18422 else
18423   echo "$as_me: failed program was:" >&5
18424 cat conftest.$ac_ext >&5
18425 cf_have_incdir=yes
18426 fi
18427 rm -f conftest.$ac_objext conftest.$ac_ext
18428                           CPPFLAGS=$cf_save_CPPFLAGS
18429                         fi
18430                   fi
18431                 fi
18432
18433                 if test "$cf_have_incdir" = no ; then
18434                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18435
18436 echo "${as_me:-configure}:18436: testing adding $cf_add_incdir to include-path ..." 1>&5
18437
18438                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18439
18440                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18441                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18442                   cf_add_incdir="$cf_top_incdir"
18443                 else
18444                   break
18445                 fi
18446           fi
18447         done
18448   done
18449 fi
18450
18451 if test -n "$with_hashed_db/lib" ; then
18452   for cf_add_libdir in $with_hashed_db/lib
18453   do
18454     if test $cf_add_libdir = /usr/lib ; then
18455       :
18456     elif test -d $cf_add_libdir
18457     then
18458       cf_have_libdir=no
18459       if test -n "$LDFLAGS$LIBS" ; then
18460         # a loop is needed to ensure we can add subdirs of existing dirs
18461         for cf_test_libdir in $LDFLAGS $LIBS ; do
18462           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18463             cf_have_libdir=yes; break
18464           fi
18465         done
18466       fi
18467       if test "$cf_have_libdir" = no ; then
18468         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18469
18470 echo "${as_me:-configure}:18470: testing adding $cf_add_libdir to library-path ..." 1>&5
18471
18472         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18473       fi
18474     fi
18475   done
18476 fi
18477
18478         else
18479                 case "$with_hashed_db" in #(vi
18480                 ./*|../*|/*)
18481                         { echo "$as_me:18481: WARNING: no such directory $with_hashed_db" >&5
18482 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18483                         ;; #(vi
18484                 *)
18485
18486 cf_search=
18487
18488 test "x$prefix" != "xNONE" && \
18489 test -d "$prefix" && \
18490  {
18491         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18492         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18493         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18494         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18495         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18496         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18497 }
18498
18499 for cf_subdir_prefix in \
18500         /usr \
18501         /usr/local \
18502         /usr/pkg \
18503         /opt \
18504         /opt/local \
18505         $HOME
18506 do
18507
18508 test "x$cf_subdir_prefix" != "x$prefix" && \
18509 test -d "$cf_subdir_prefix" && \
18510 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18511         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18512         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18513         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18514         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18515         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18516         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"
18517 }
18518
18519 done
18520
18521         for cf_item in $cf_search
18522         do
18523                 case $cf_item in #(vi
18524                 */$with_hashed_db)
18525
18526 if test -n "$cf_item" ; then
18527   for cf_add_incdir in $cf_item
18528   do
18529         while test $cf_add_incdir != /usr/include
18530         do
18531           if test -d $cf_add_incdir
18532           then
18533                 cf_have_incdir=no
18534                 if test -n "$CFLAGS$CPPFLAGS" ; then
18535                   # a loop is needed to ensure we can add subdirs of existing dirs
18536                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18537                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18538                           cf_have_incdir=yes; break
18539                         fi
18540                   done
18541                 fi
18542
18543                 if test "$cf_have_incdir" = no ; then
18544                   if test "$cf_add_incdir" = /usr/local/include ; then
18545                         if test "$GCC" = yes
18546                         then
18547                           cf_save_CPPFLAGS=$CPPFLAGS
18548                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18549                           cat >conftest.$ac_ext <<_ACEOF
18550 #line 18550 "configure"
18551 #include "confdefs.h"
18552 #include <stdio.h>
18553 int
18554 main ()
18555 {
18556 printf("Hello")
18557   ;
18558   return 0;
18559 }
18560 _ACEOF
18561 rm -f conftest.$ac_objext
18562 if { (eval echo "$as_me:18562: \"$ac_compile\"") >&5
18563   (eval $ac_compile) 2>&5
18564   ac_status=$?
18565   echo "$as_me:18565: \$? = $ac_status" >&5
18566   (exit $ac_status); } &&
18567          { ac_try='test -s conftest.$ac_objext'
18568   { (eval echo "$as_me:18568: \"$ac_try\"") >&5
18569   (eval $ac_try) 2>&5
18570   ac_status=$?
18571   echo "$as_me:18571: \$? = $ac_status" >&5
18572   (exit $ac_status); }; }; then
18573   :
18574 else
18575   echo "$as_me: failed program was:" >&5
18576 cat conftest.$ac_ext >&5
18577 cf_have_incdir=yes
18578 fi
18579 rm -f conftest.$ac_objext conftest.$ac_ext
18580                           CPPFLAGS=$cf_save_CPPFLAGS
18581                         fi
18582                   fi
18583                 fi
18584
18585                 if test "$cf_have_incdir" = no ; then
18586                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18587
18588 echo "${as_me:-configure}:18588: testing adding $cf_add_incdir to include-path ..." 1>&5
18589
18590                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18591
18592                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18593                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18594                   cf_add_incdir="$cf_top_incdir"
18595                 else
18596                   break
18597                 fi
18598           fi
18599         done
18600   done
18601 fi
18602
18603                         ;;
18604                 esac
18605         done
18606
18607 cf_search=
18608
18609 test "x$prefix" != "xNONE" && \
18610 test -d "$prefix" && \
18611  {
18612         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18613         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18614         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18615         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18616         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18617         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18618 }
18619
18620 for cf_subdir_prefix in \
18621         /usr \
18622         /usr/local \
18623         /usr/pkg \
18624         /opt \
18625         /opt/local \
18626         $HOME
18627 do
18628
18629 test "x$cf_subdir_prefix" != "x$prefix" && \
18630 test -d "$cf_subdir_prefix" && \
18631 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18632         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18633         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18634         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18635         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18636         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18637         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"
18638 }
18639
18640 done
18641
18642         for cf_item in $cf_search
18643         do
18644                 case $cf_item in #(vi
18645                 */$with_hashed_db)
18646
18647 if test -n "$cf_item" ; then
18648   for cf_add_libdir in $cf_item
18649   do
18650     if test $cf_add_libdir = /usr/lib ; then
18651       :
18652     elif test -d $cf_add_libdir
18653     then
18654       cf_have_libdir=no
18655       if test -n "$LDFLAGS$LIBS" ; then
18656         # a loop is needed to ensure we can add subdirs of existing dirs
18657         for cf_test_libdir in $LDFLAGS $LIBS ; do
18658           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18659             cf_have_libdir=yes; break
18660           fi
18661         done
18662       fi
18663       if test "$cf_have_libdir" = no ; then
18664         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18665
18666 echo "${as_me:-configure}:18666: testing adding $cf_add_libdir to library-path ..." 1>&5
18667
18668         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18669       fi
18670     fi
18671   done
18672 fi
18673
18674                         ;;
18675                 esac
18676         done
18677
18678                         ;;
18679                 esac
18680     fi
18681 esac
18682
18683 echo "$as_me:18683: checking for db.h" >&5
18684 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18685 if test "${ac_cv_header_db_h+set}" = set; then
18686   echo $ECHO_N "(cached) $ECHO_C" >&6
18687 else
18688   cat >conftest.$ac_ext <<_ACEOF
18689 #line 18689 "configure"
18690 #include "confdefs.h"
18691 #include <db.h>
18692 _ACEOF
18693 if { (eval echo "$as_me:18693: \"$ac_cpp conftest.$ac_ext\"") >&5
18694   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18695   ac_status=$?
18696   egrep -v '^ *\+' conftest.er1 >conftest.err
18697   rm -f conftest.er1
18698   cat conftest.err >&5
18699   echo "$as_me:18699: \$? = $ac_status" >&5
18700   (exit $ac_status); } >/dev/null; then
18701   if test -s conftest.err; then
18702     ac_cpp_err=$ac_c_preproc_warn_flag
18703   else
18704     ac_cpp_err=
18705   fi
18706 else
18707   ac_cpp_err=yes
18708 fi
18709 if test -z "$ac_cpp_err"; then
18710   ac_cv_header_db_h=yes
18711 else
18712   echo "$as_me: failed program was:" >&5
18713   cat conftest.$ac_ext >&5
18714   ac_cv_header_db_h=no
18715 fi
18716 rm -f conftest.err conftest.$ac_ext
18717 fi
18718 echo "$as_me:18718: result: $ac_cv_header_db_h" >&5
18719 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18720 if test $ac_cv_header_db_h = yes; then
18721
18722 echo "$as_me:18722: checking for version of db" >&5
18723 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18724 if test "${cf_cv_hashed_db_version+set}" = set; then
18725   echo $ECHO_N "(cached) $ECHO_C" >&6
18726 else
18727
18728 cf_cv_hashed_db_version=unknown
18729
18730 for cf_db_version in 1 2 3 4 5 6
18731 do
18732
18733 echo "${as_me:-configure}:18733: testing checking for db version $cf_db_version ..." 1>&5
18734
18735         cat >conftest.$ac_ext <<_ACEOF
18736 #line 18736 "configure"
18737 #include "confdefs.h"
18738
18739 $ac_includes_default
18740 #include <db.h>
18741
18742 #ifdef DB_VERSION_MAJOR
18743         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18744 #if $cf_db_version == DB_VERSION_MAJOR
18745         /* ok */
18746 #else
18747         make an error
18748 #endif
18749 #else
18750 #if $cf_db_version == 1
18751         /* ok: assuming this is DB 1.8.5 */
18752 #else
18753         make an error
18754 #endif
18755 #endif
18756
18757 int
18758 main ()
18759 {
18760 DBT *foo = 0
18761   ;
18762   return 0;
18763 }
18764 _ACEOF
18765 rm -f conftest.$ac_objext
18766 if { (eval echo "$as_me:18766: \"$ac_compile\"") >&5
18767   (eval $ac_compile) 2>&5
18768   ac_status=$?
18769   echo "$as_me:18769: \$? = $ac_status" >&5
18770   (exit $ac_status); } &&
18771          { ac_try='test -s conftest.$ac_objext'
18772   { (eval echo "$as_me:18772: \"$ac_try\"") >&5
18773   (eval $ac_try) 2>&5
18774   ac_status=$?
18775   echo "$as_me:18775: \$? = $ac_status" >&5
18776   (exit $ac_status); }; }; then
18777
18778         cf_cv_hashed_db_version=$cf_db_version
18779         break
18780
18781 else
18782   echo "$as_me: failed program was:" >&5
18783 cat conftest.$ac_ext >&5
18784 fi
18785 rm -f conftest.$ac_objext conftest.$ac_ext
18786 done
18787
18788 fi
18789 echo "$as_me:18789: result: $cf_cv_hashed_db_version" >&5
18790 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18791
18792 if test "$cf_cv_hashed_db_version" = unknown ; then
18793         { { echo "$as_me:18793: error: Cannot determine version of db" >&5
18794 echo "$as_me: error: Cannot determine version of db" >&2;}
18795    { (exit 1); exit 1; }; }
18796 else
18797
18798 echo "$as_me:18798: checking for db libraries" >&5
18799 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18800 if test "${cf_cv_hashed_db_libs+set}" = set; then
18801   echo $ECHO_N "(cached) $ECHO_C" >&6
18802 else
18803
18804 cf_cv_hashed_db_libs=unknown
18805 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18806 do
18807         cf_save_libs="$LIBS"
18808         if test -n "$cf_db_libs"; then
18809
18810 cf_add_libs="-l$cf_db_libs"
18811 # Filter out duplicates - this happens with badly-designed ".pc" files...
18812 for cf_add_1lib in $LIBS
18813 do
18814         for cf_add_2lib in $cf_add_libs
18815         do
18816                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18817                 then
18818                         cf_add_1lib=
18819                         break
18820                 fi
18821         done
18822         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18823 done
18824 LIBS="$cf_add_libs"
18825
18826         fi
18827
18828 echo "${as_me:-configure}:18828: testing checking for library "$cf_db_libs" ..." 1>&5
18829
18830         cat >conftest.$ac_ext <<_ACEOF
18831 #line 18831 "configure"
18832 #include "confdefs.h"
18833
18834 $ac_includes_default
18835 #include <db.h>
18836
18837 int
18838 main ()
18839 {
18840
18841         char *path = "/tmp/foo";
18842 #ifdef DB_VERSION_MAJOR
18843 #if DB_VERSION_MAJOR >= 4
18844         DB *result = 0;
18845         db_create(&result, NULL, 0);
18846         result->open(result,
18847                 NULL,
18848                 path,
18849                 path,
18850                 DB_HASH,
18851                 DB_CREATE,
18852                 0644);
18853 #elif DB_VERSION_MAJOR >= 3
18854         DB *result = 0;
18855         db_create(&result, NULL, 0);
18856         result->open(result,
18857                 path,
18858                 path,
18859                 DB_HASH,
18860                 DB_CREATE,
18861                 0644);
18862 #elif DB_VERSION_MAJOR >= 2
18863         DB *result = 0;
18864         db_open(path,
18865                 DB_HASH,
18866                 DB_CREATE,
18867                 0644,
18868                 (DB_ENV *) 0,
18869                 (DB_INFO *) 0,
18870                 &result);
18871 #endif /* DB_VERSION_MAJOR */
18872 #else
18873         DB *result = dbopen(path,
18874                      2,
18875                      0644,
18876                      DB_HASH,
18877                      0);
18878 #endif
18879         ${cf_cv_main_return:-return}(result != 0)
18880
18881   ;
18882   return 0;
18883 }
18884 _ACEOF
18885 rm -f conftest.$ac_objext conftest$ac_exeext
18886 if { (eval echo "$as_me:18886: \"$ac_link\"") >&5
18887   (eval $ac_link) 2>&5
18888   ac_status=$?
18889   echo "$as_me:18889: \$? = $ac_status" >&5
18890   (exit $ac_status); } &&
18891          { ac_try='test -s conftest$ac_exeext'
18892   { (eval echo "$as_me:18892: \"$ac_try\"") >&5
18893   (eval $ac_try) 2>&5
18894   ac_status=$?
18895   echo "$as_me:18895: \$? = $ac_status" >&5
18896   (exit $ac_status); }; }; then
18897
18898         if test -n "$cf_db_libs" ; then
18899                 cf_cv_hashed_db_libs=$cf_db_libs
18900         else
18901                 cf_cv_hashed_db_libs=default
18902         fi
18903         LIBS="$cf_save_libs"
18904         break
18905
18906 else
18907   echo "$as_me: failed program was:" >&5
18908 cat conftest.$ac_ext >&5
18909 fi
18910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18911         LIBS="$cf_save_libs"
18912 done
18913
18914 fi
18915 echo "$as_me:18915: result: $cf_cv_hashed_db_libs" >&5
18916 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18917
18918         if test "$cf_cv_hashed_db_libs" = unknown ; then
18919                 { { echo "$as_me:18919: error: Cannot determine library for db" >&5
18920 echo "$as_me: error: Cannot determine library for db" >&2;}
18921    { (exit 1); exit 1; }; }
18922         elif test "$cf_cv_hashed_db_libs" != default ; then
18923
18924 cf_add_libs="-l$cf_cv_hashed_db_libs"
18925 # Filter out duplicates - this happens with badly-designed ".pc" files...
18926 for cf_add_1lib in $LIBS
18927 do
18928         for cf_add_2lib in $cf_add_libs
18929         do
18930                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18931                 then
18932                         cf_add_1lib=
18933                         break
18934                 fi
18935         done
18936         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18937 done
18938 LIBS="$cf_add_libs"
18939
18940         fi
18941 fi
18942
18943 else
18944
18945         { { echo "$as_me:18945: error: Cannot find db.h" >&5
18946 echo "$as_me: error: Cannot find db.h" >&2;}
18947    { (exit 1); exit 1; }; }
18948
18949 fi
18950
18951 fi
18952
18953 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18954         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18955         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18956 fi
18957
18958 # Just in case, check if the C compiler has a bool type.
18959
18960 echo "$as_me:18960: checking if we should include stdbool.h" >&5
18961 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18962
18963 if test "${cf_cv_header_stdbool_h+set}" = set; then
18964   echo $ECHO_N "(cached) $ECHO_C" >&6
18965 else
18966
18967         cat >conftest.$ac_ext <<_ACEOF
18968 #line 18968 "configure"
18969 #include "confdefs.h"
18970
18971 int
18972 main ()
18973 {
18974 bool foo = false
18975   ;
18976   return 0;
18977 }
18978 _ACEOF
18979 rm -f conftest.$ac_objext
18980 if { (eval echo "$as_me:18980: \"$ac_compile\"") >&5
18981   (eval $ac_compile) 2>&5
18982   ac_status=$?
18983   echo "$as_me:18983: \$? = $ac_status" >&5
18984   (exit $ac_status); } &&
18985          { ac_try='test -s conftest.$ac_objext'
18986   { (eval echo "$as_me:18986: \"$ac_try\"") >&5
18987   (eval $ac_try) 2>&5
18988   ac_status=$?
18989   echo "$as_me:18989: \$? = $ac_status" >&5
18990   (exit $ac_status); }; }; then
18991   cf_cv_header_stdbool_h=0
18992 else
18993   echo "$as_me: failed program was:" >&5
18994 cat conftest.$ac_ext >&5
18995 cat >conftest.$ac_ext <<_ACEOF
18996 #line 18996 "configure"
18997 #include "confdefs.h"
18998
18999 #ifndef __BEOS__
19000 #include <stdbool.h>
19001 #endif
19002
19003 int
19004 main ()
19005 {
19006 bool foo = false
19007   ;
19008   return 0;
19009 }
19010 _ACEOF
19011 rm -f conftest.$ac_objext
19012 if { (eval echo "$as_me:19012: \"$ac_compile\"") >&5
19013   (eval $ac_compile) 2>&5
19014   ac_status=$?
19015   echo "$as_me:19015: \$? = $ac_status" >&5
19016   (exit $ac_status); } &&
19017          { ac_try='test -s conftest.$ac_objext'
19018   { (eval echo "$as_me:19018: \"$ac_try\"") >&5
19019   (eval $ac_try) 2>&5
19020   ac_status=$?
19021   echo "$as_me:19021: \$? = $ac_status" >&5
19022   (exit $ac_status); }; }; then
19023   cf_cv_header_stdbool_h=1
19024 else
19025   echo "$as_me: failed program was:" >&5
19026 cat conftest.$ac_ext >&5
19027 cf_cv_header_stdbool_h=0
19028 fi
19029 rm -f conftest.$ac_objext conftest.$ac_ext
19030 fi
19031 rm -f conftest.$ac_objext conftest.$ac_ext
19032 fi
19033
19034 if test "$cf_cv_header_stdbool_h" = 1
19035 then    echo "$as_me:19035: result: yes" >&5
19036 echo "${ECHO_T}yes" >&6
19037 else    echo "$as_me:19037: result: no" >&5
19038 echo "${ECHO_T}no" >&6
19039 fi
19040
19041 echo "$as_me:19041: checking for builtin bool type" >&5
19042 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19043
19044 if test "${cf_cv_cc_bool_type+set}" = set; then
19045   echo $ECHO_N "(cached) $ECHO_C" >&6
19046 else
19047
19048         cat >conftest.$ac_ext <<_ACEOF
19049 #line 19049 "configure"
19050 #include "confdefs.h"
19051
19052 #include <stdio.h>
19053 #include <sys/types.h>
19054
19055 int
19056 main ()
19057 {
19058 bool x = false
19059   ;
19060   return 0;
19061 }
19062 _ACEOF
19063 rm -f conftest.$ac_objext
19064 if { (eval echo "$as_me:19064: \"$ac_compile\"") >&5
19065   (eval $ac_compile) 2>&5
19066   ac_status=$?
19067   echo "$as_me:19067: \$? = $ac_status" >&5
19068   (exit $ac_status); } &&
19069          { ac_try='test -s conftest.$ac_objext'
19070   { (eval echo "$as_me:19070: \"$ac_try\"") >&5
19071   (eval $ac_try) 2>&5
19072   ac_status=$?
19073   echo "$as_me:19073: \$? = $ac_status" >&5
19074   (exit $ac_status); }; }; then
19075   cf_cv_cc_bool_type=1
19076 else
19077   echo "$as_me: failed program was:" >&5
19078 cat conftest.$ac_ext >&5
19079 cf_cv_cc_bool_type=0
19080 fi
19081 rm -f conftest.$ac_objext conftest.$ac_ext
19082
19083 fi
19084
19085 if test "$cf_cv_cc_bool_type" = 1
19086 then    echo "$as_me:19086: result: yes" >&5
19087 echo "${ECHO_T}yes" >&6
19088 else    echo "$as_me:19088: result: no" >&5
19089 echo "${ECHO_T}no" >&6
19090 fi
19091
19092 # Check for C++ compiler characteristics (and ensure that it's there!)
19093 if test -n "$CXX" ; then
19094         ac_ext=cc
19095 ac_cpp='$CXXCPP $CPPFLAGS'
19096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19099 ac_main_return=return
19100
19101 if test -n "$GXX" ; then
19102 case $cf_cv_system_name in #(vi
19103 os2*) #(vi
19104         cf_stdcpp_libname=stdcpp
19105         ;;
19106 *)
19107         cf_stdcpp_libname=stdc++
19108         ;;
19109 esac
19110 echo "$as_me:19110: checking for library $cf_stdcpp_libname" >&5
19111 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19112 if test "${cf_cv_libstdcpp+set}" = set; then
19113   echo $ECHO_N "(cached) $ECHO_C" >&6
19114 else
19115
19116         cf_save="$LIBS"
19117
19118 cf_add_libs="-l$cf_stdcpp_libname"
19119 # Filter out duplicates - this happens with badly-designed ".pc" files...
19120 for cf_add_1lib in $LIBS
19121 do
19122         for cf_add_2lib in $cf_add_libs
19123         do
19124                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19125                 then
19126                         cf_add_1lib=
19127                         break
19128                 fi
19129         done
19130         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19131 done
19132 LIBS="$cf_add_libs"
19133
19134 cat >conftest.$ac_ext <<_ACEOF
19135 #line 19135 "configure"
19136 #include "confdefs.h"
19137
19138 #include <strstream.h>
19139 int
19140 main ()
19141 {
19142
19143 char buf[80];
19144 strstreambuf foo(buf, sizeof(buf))
19145
19146   ;
19147   return 0;
19148 }
19149 _ACEOF
19150 rm -f conftest.$ac_objext conftest$ac_exeext
19151 if { (eval echo "$as_me:19151: \"$ac_link\"") >&5
19152   (eval $ac_link) 2>&5
19153   ac_status=$?
19154   echo "$as_me:19154: \$? = $ac_status" >&5
19155   (exit $ac_status); } &&
19156          { ac_try='test -s conftest$ac_exeext'
19157   { (eval echo "$as_me:19157: \"$ac_try\"") >&5
19158   (eval $ac_try) 2>&5
19159   ac_status=$?
19160   echo "$as_me:19160: \$? = $ac_status" >&5
19161   (exit $ac_status); }; }; then
19162   cf_cv_libstdcpp=yes
19163 else
19164   echo "$as_me: failed program was:" >&5
19165 cat conftest.$ac_ext >&5
19166 cf_cv_libstdcpp=no
19167 fi
19168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19169         LIBS="$cf_save"
19170
19171 fi
19172 echo "$as_me:19172: result: $cf_cv_libstdcpp" >&5
19173 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19174 test "$cf_cv_libstdcpp" = yes &&
19175 cf_add_libs="-l$cf_stdcpp_libname"
19176 # Filter out duplicates - this happens with badly-designed ".pc" files...
19177 for cf_add_1lib in $CXXLIBS
19178 do
19179         for cf_add_2lib in $cf_add_libs
19180         do
19181                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19182                 then
19183                         cf_add_1lib=
19184                         break
19185                 fi
19186         done
19187         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19188 done
19189 CXXLIBS="$cf_add_libs"
19190
19191 fi
19192
19193         echo "$as_me:19193: checking whether $CXX understands -c and -o together" >&5
19194 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19195 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19196   echo $ECHO_N "(cached) $ECHO_C" >&6
19197 else
19198
19199 cat > conftest.$ac_ext <<CF_EOF
19200 #include <stdio.h>
19201 int main()
19202 {
19203         ${cf_cv_main_return:-return}(0);
19204 }
19205 CF_EOF
19206 # We do the test twice because some compilers refuse to overwrite an
19207 # existing .o file with -o, though they will create one.
19208 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19209 if { (eval echo "$as_me:19209: \"$ac_try\"") >&5
19210   (eval $ac_try) 2>&5
19211   ac_status=$?
19212   echo "$as_me:19212: \$? = $ac_status" >&5
19213   (exit $ac_status); } &&
19214   test -f conftest2.$ac_objext && { (eval echo "$as_me:19214: \"$ac_try\"") >&5
19215   (eval $ac_try) 2>&5
19216   ac_status=$?
19217   echo "$as_me:19217: \$? = $ac_status" >&5
19218   (exit $ac_status); };
19219 then
19220   eval cf_cv_prog_CXX_c_o=yes
19221 else
19222   eval cf_cv_prog_CXX_c_o=no
19223 fi
19224 rm -rf conftest*
19225
19226 fi
19227 if test $cf_cv_prog_CXX_c_o = yes; then
19228   echo "$as_me:19228: result: yes" >&5
19229 echo "${ECHO_T}yes" >&6
19230 else
19231   echo "$as_me:19231: result: no" >&5
19232 echo "${ECHO_T}no" >&6
19233 fi
19234
19235         case $GXX_VERSION in
19236         1*|2.0-6*)
19237                 cf_cxx_library=yes
19238                 ;;
19239         *-2.7*|2.7*)
19240
19241 cf_cxx_library=unknown
19242 case $cf_cv_system_name in #(vi
19243 os2*) #(vi
19244         cf_gpp_libname=gpp
19245         ;;
19246 *)
19247         cf_gpp_libname=g++
19248         ;;
19249 esac
19250 if test "$GXX" = yes; then
19251         echo "$as_me:19251: checking for lib$cf_gpp_libname" >&5
19252 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19253         cf_save="$LIBS"
19254
19255 cf_add_libs="-l$cf_gpp_libname"
19256 # Filter out duplicates - this happens with badly-designed ".pc" files...
19257 for cf_add_1lib in $LIBS
19258 do
19259         for cf_add_2lib in $cf_add_libs
19260         do
19261                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19262                 then
19263                         cf_add_1lib=
19264                         break
19265                 fi
19266         done
19267         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19268 done
19269 LIBS="$cf_add_libs"
19270
19271         cat >conftest.$ac_ext <<_ACEOF
19272 #line 19272 "configure"
19273 #include "confdefs.h"
19274
19275 #include <$cf_gpp_libname/builtin.h>
19276
19277 int
19278 main ()
19279 {
19280 two_arg_error_handler_t foo2 = lib_error_handler
19281   ;
19282   return 0;
19283 }
19284 _ACEOF
19285 rm -f conftest.$ac_objext conftest$ac_exeext
19286 if { (eval echo "$as_me:19286: \"$ac_link\"") >&5
19287   (eval $ac_link) 2>&5
19288   ac_status=$?
19289   echo "$as_me:19289: \$? = $ac_status" >&5
19290   (exit $ac_status); } &&
19291          { ac_try='test -s conftest$ac_exeext'
19292   { (eval echo "$as_me:19292: \"$ac_try\"") >&5
19293   (eval $ac_try) 2>&5
19294   ac_status=$?
19295   echo "$as_me:19295: \$? = $ac_status" >&5
19296   (exit $ac_status); }; }; then
19297   cf_cxx_library=yes
19298
19299 cf_add_libs="-l$cf_gpp_libname"
19300 # Filter out duplicates - this happens with badly-designed ".pc" files...
19301 for cf_add_1lib in $CXXLIBS
19302 do
19303         for cf_add_2lib in $cf_add_libs
19304         do
19305                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19306                 then
19307                         cf_add_1lib=
19308                         break
19309                 fi
19310         done
19311         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19312 done
19313 CXXLIBS="$cf_add_libs"
19314
19315          if test "$cf_gpp_libname" = cpp ; then
19316
19317 cat >>confdefs.h <<\EOF
19318 #define HAVE_GPP_BUILTIN_H 1
19319 EOF
19320
19321          else
19322
19323 cat >>confdefs.h <<\EOF
19324 #define HAVE_GXX_BUILTIN_H 1
19325 EOF
19326
19327          fi
19328 else
19329   echo "$as_me: failed program was:" >&5
19330 cat conftest.$ac_ext >&5
19331 cat >conftest.$ac_ext <<_ACEOF
19332 #line 19332 "configure"
19333 #include "confdefs.h"
19334
19335 #include <builtin.h>
19336
19337 int
19338 main ()
19339 {
19340 two_arg_error_handler_t foo2 = lib_error_handler
19341   ;
19342   return 0;
19343 }
19344 _ACEOF
19345 rm -f conftest.$ac_objext conftest$ac_exeext
19346 if { (eval echo "$as_me:19346: \"$ac_link\"") >&5
19347   (eval $ac_link) 2>&5
19348   ac_status=$?
19349   echo "$as_me:19349: \$? = $ac_status" >&5
19350   (exit $ac_status); } &&
19351          { ac_try='test -s conftest$ac_exeext'
19352   { (eval echo "$as_me:19352: \"$ac_try\"") >&5
19353   (eval $ac_try) 2>&5
19354   ac_status=$?
19355   echo "$as_me:19355: \$? = $ac_status" >&5
19356   (exit $ac_status); }; }; then
19357   cf_cxx_library=yes
19358
19359 cf_add_libs="-l$cf_gpp_libname"
19360 # Filter out duplicates - this happens with badly-designed ".pc" files...
19361 for cf_add_1lib in $CXXLIBS
19362 do
19363         for cf_add_2lib in $cf_add_libs
19364         do
19365                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19366                 then
19367                         cf_add_1lib=
19368                         break
19369                 fi
19370         done
19371         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19372 done
19373 CXXLIBS="$cf_add_libs"
19374
19375 cat >>confdefs.h <<\EOF
19376 #define HAVE_BUILTIN_H 1
19377 EOF
19378
19379 else
19380   echo "$as_me: failed program was:" >&5
19381 cat conftest.$ac_ext >&5
19382 cf_cxx_library=no
19383 fi
19384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19385 fi
19386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19387         LIBS="$cf_save"
19388         echo "$as_me:19388: result: $cf_cxx_library" >&5
19389 echo "${ECHO_T}$cf_cxx_library" >&6
19390 fi
19391
19392                 ;;
19393         *)
19394                 cf_cxx_library=no
19395                 ;;
19396         esac
19397
19398         ac_ext=cc
19399 ac_cpp='$CXXCPP $CPPFLAGS'
19400 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19401 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19402 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19403 ac_main_return=return
19404 echo "$as_me:19404: checking how to run the C++ preprocessor" >&5
19405 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19406 if test -z "$CXXCPP"; then
19407   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19408   echo $ECHO_N "(cached) $ECHO_C" >&6
19409 else
19410       # Double quotes because CXXCPP needs to be expanded
19411     for CXXCPP in "$CXX -E" "/lib/cpp"
19412     do
19413       ac_preproc_ok=false
19414 for ac_cxx_preproc_warn_flag in '' yes
19415 do
19416   # Use a header file that comes with gcc, so configuring glibc
19417   # with a fresh cross-compiler works.
19418   # On the NeXT, cc -E runs the code through the compiler's parser,
19419   # not just through cpp. "Syntax error" is here to catch this case.
19420   cat >conftest.$ac_ext <<_ACEOF
19421 #line 19421 "configure"
19422 #include "confdefs.h"
19423 #include <assert.h>
19424                      Syntax error
19425 _ACEOF
19426 if { (eval echo "$as_me:19426: \"$ac_cpp conftest.$ac_ext\"") >&5
19427   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19428   ac_status=$?
19429   egrep -v '^ *\+' conftest.er1 >conftest.err
19430   rm -f conftest.er1
19431   cat conftest.err >&5
19432   echo "$as_me:19432: \$? = $ac_status" >&5
19433   (exit $ac_status); } >/dev/null; then
19434   if test -s conftest.err; then
19435     ac_cpp_err=$ac_cxx_preproc_warn_flag
19436   else
19437     ac_cpp_err=
19438   fi
19439 else
19440   ac_cpp_err=yes
19441 fi
19442 if test -z "$ac_cpp_err"; then
19443   :
19444 else
19445   echo "$as_me: failed program was:" >&5
19446   cat conftest.$ac_ext >&5
19447   # Broken: fails on valid input.
19448 continue
19449 fi
19450 rm -f conftest.err conftest.$ac_ext
19451
19452   # OK, works on sane cases.  Now check whether non-existent headers
19453   # can be detected and how.
19454   cat >conftest.$ac_ext <<_ACEOF
19455 #line 19455 "configure"
19456 #include "confdefs.h"
19457 #include <ac_nonexistent.h>
19458 _ACEOF
19459 if { (eval echo "$as_me:19459: \"$ac_cpp conftest.$ac_ext\"") >&5
19460   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19461   ac_status=$?
19462   egrep -v '^ *\+' conftest.er1 >conftest.err
19463   rm -f conftest.er1
19464   cat conftest.err >&5
19465   echo "$as_me:19465: \$? = $ac_status" >&5
19466   (exit $ac_status); } >/dev/null; then
19467   if test -s conftest.err; then
19468     ac_cpp_err=$ac_cxx_preproc_warn_flag
19469   else
19470     ac_cpp_err=
19471   fi
19472 else
19473   ac_cpp_err=yes
19474 fi
19475 if test -z "$ac_cpp_err"; then
19476   # Broken: success on invalid input.
19477 continue
19478 else
19479   echo "$as_me: failed program was:" >&5
19480   cat conftest.$ac_ext >&5
19481   # Passes both tests.
19482 ac_preproc_ok=:
19483 break
19484 fi
19485 rm -f conftest.err conftest.$ac_ext
19486
19487 done
19488 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19489 rm -f conftest.err conftest.$ac_ext
19490 if $ac_preproc_ok; then
19491   break
19492 fi
19493
19494     done
19495     ac_cv_prog_CXXCPP=$CXXCPP
19496
19497 fi
19498   CXXCPP=$ac_cv_prog_CXXCPP
19499 else
19500   ac_cv_prog_CXXCPP=$CXXCPP
19501 fi
19502 echo "$as_me:19502: result: $CXXCPP" >&5
19503 echo "${ECHO_T}$CXXCPP" >&6
19504 ac_preproc_ok=false
19505 for ac_cxx_preproc_warn_flag in '' yes
19506 do
19507   # Use a header file that comes with gcc, so configuring glibc
19508   # with a fresh cross-compiler works.
19509   # On the NeXT, cc -E runs the code through the compiler's parser,
19510   # not just through cpp. "Syntax error" is here to catch this case.
19511   cat >conftest.$ac_ext <<_ACEOF
19512 #line 19512 "configure"
19513 #include "confdefs.h"
19514 #include <assert.h>
19515                      Syntax error
19516 _ACEOF
19517 if { (eval echo "$as_me:19517: \"$ac_cpp conftest.$ac_ext\"") >&5
19518   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19519   ac_status=$?
19520   egrep -v '^ *\+' conftest.er1 >conftest.err
19521   rm -f conftest.er1
19522   cat conftest.err >&5
19523   echo "$as_me:19523: \$? = $ac_status" >&5
19524   (exit $ac_status); } >/dev/null; then
19525   if test -s conftest.err; then
19526     ac_cpp_err=$ac_cxx_preproc_warn_flag
19527   else
19528     ac_cpp_err=
19529   fi
19530 else
19531   ac_cpp_err=yes
19532 fi
19533 if test -z "$ac_cpp_err"; then
19534   :
19535 else
19536   echo "$as_me: failed program was:" >&5
19537   cat conftest.$ac_ext >&5
19538   # Broken: fails on valid input.
19539 continue
19540 fi
19541 rm -f conftest.err conftest.$ac_ext
19542
19543   # OK, works on sane cases.  Now check whether non-existent headers
19544   # can be detected and how.
19545   cat >conftest.$ac_ext <<_ACEOF
19546 #line 19546 "configure"
19547 #include "confdefs.h"
19548 #include <ac_nonexistent.h>
19549 _ACEOF
19550 if { (eval echo "$as_me:19550: \"$ac_cpp conftest.$ac_ext\"") >&5
19551   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19552   ac_status=$?
19553   egrep -v '^ *\+' conftest.er1 >conftest.err
19554   rm -f conftest.er1
19555   cat conftest.err >&5
19556   echo "$as_me:19556: \$? = $ac_status" >&5
19557   (exit $ac_status); } >/dev/null; then
19558   if test -s conftest.err; then
19559     ac_cpp_err=$ac_cxx_preproc_warn_flag
19560   else
19561     ac_cpp_err=
19562   fi
19563 else
19564   ac_cpp_err=yes
19565 fi
19566 if test -z "$ac_cpp_err"; then
19567   # Broken: success on invalid input.
19568 continue
19569 else
19570   echo "$as_me: failed program was:" >&5
19571   cat conftest.$ac_ext >&5
19572   # Passes both tests.
19573 ac_preproc_ok=:
19574 break
19575 fi
19576 rm -f conftest.err conftest.$ac_ext
19577
19578 done
19579 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19580 rm -f conftest.err conftest.$ac_ext
19581 if $ac_preproc_ok; then
19582   :
19583 else
19584   { { echo "$as_me:19584: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19585 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19586    { (exit 1); exit 1; }; }
19587 fi
19588
19589 ac_ext=cc
19590 ac_cpp='$CXXCPP $CPPFLAGS'
19591 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19592 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19593 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19594 ac_main_return=return
19595
19596 for ac_header in typeinfo
19597 do
19598 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19599 echo "$as_me:19599: checking for $ac_header" >&5
19600 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19601 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19602   echo $ECHO_N "(cached) $ECHO_C" >&6
19603 else
19604   cat >conftest.$ac_ext <<_ACEOF
19605 #line 19605 "configure"
19606 #include "confdefs.h"
19607 #include <$ac_header>
19608 _ACEOF
19609 if { (eval echo "$as_me:19609: \"$ac_cpp conftest.$ac_ext\"") >&5
19610   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19611   ac_status=$?
19612   egrep -v '^ *\+' conftest.er1 >conftest.err
19613   rm -f conftest.er1
19614   cat conftest.err >&5
19615   echo "$as_me:19615: \$? = $ac_status" >&5
19616   (exit $ac_status); } >/dev/null; then
19617   if test -s conftest.err; then
19618     ac_cpp_err=$ac_cxx_preproc_warn_flag
19619   else
19620     ac_cpp_err=
19621   fi
19622 else
19623   ac_cpp_err=yes
19624 fi
19625 if test -z "$ac_cpp_err"; then
19626   eval "$as_ac_Header=yes"
19627 else
19628   echo "$as_me: failed program was:" >&5
19629   cat conftest.$ac_ext >&5
19630   eval "$as_ac_Header=no"
19631 fi
19632 rm -f conftest.err conftest.$ac_ext
19633 fi
19634 echo "$as_me:19634: result: `eval echo '${'$as_ac_Header'}'`" >&5
19635 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19636 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19637   cat >>confdefs.h <<EOF
19638 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19639 EOF
19640
19641 fi
19642 done
19643
19644 for ac_header in iostream
19645 do
19646 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19647 echo "$as_me:19647: checking for $ac_header" >&5
19648 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19649 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19650   echo $ECHO_N "(cached) $ECHO_C" >&6
19651 else
19652   cat >conftest.$ac_ext <<_ACEOF
19653 #line 19653 "configure"
19654 #include "confdefs.h"
19655 #include <$ac_header>
19656 _ACEOF
19657 if { (eval echo "$as_me:19657: \"$ac_cpp conftest.$ac_ext\"") >&5
19658   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19659   ac_status=$?
19660   egrep -v '^ *\+' conftest.er1 >conftest.err
19661   rm -f conftest.er1
19662   cat conftest.err >&5
19663   echo "$as_me:19663: \$? = $ac_status" >&5
19664   (exit $ac_status); } >/dev/null; then
19665   if test -s conftest.err; then
19666     ac_cpp_err=$ac_cxx_preproc_warn_flag
19667   else
19668     ac_cpp_err=
19669   fi
19670 else
19671   ac_cpp_err=yes
19672 fi
19673 if test -z "$ac_cpp_err"; then
19674   eval "$as_ac_Header=yes"
19675 else
19676   echo "$as_me: failed program was:" >&5
19677   cat conftest.$ac_ext >&5
19678   eval "$as_ac_Header=no"
19679 fi
19680 rm -f conftest.err conftest.$ac_ext
19681 fi
19682 echo "$as_me:19682: result: `eval echo '${'$as_ac_Header'}'`" >&5
19683 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19684 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19685   cat >>confdefs.h <<EOF
19686 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19687 EOF
19688
19689 fi
19690 done
19691
19692 if test x"$ac_cv_header_iostream" = xyes ; then
19693         echo "$as_me:19693: checking if iostream uses std-namespace" >&5
19694 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19695         cat >conftest.$ac_ext <<_ACEOF
19696 #line 19696 "configure"
19697 #include "confdefs.h"
19698
19699 #include <iostream>
19700 using std::endl;
19701 using std::cerr;
19702 int
19703 main ()
19704 {
19705
19706 cerr << "testing" << endl;
19707
19708   ;
19709   return 0;
19710 }
19711 _ACEOF
19712 rm -f conftest.$ac_objext
19713 if { (eval echo "$as_me:19713: \"$ac_compile\"") >&5
19714   (eval $ac_compile) 2>&5
19715   ac_status=$?
19716   echo "$as_me:19716: \$? = $ac_status" >&5
19717   (exit $ac_status); } &&
19718          { ac_try='test -s conftest.$ac_objext'
19719   { (eval echo "$as_me:19719: \"$ac_try\"") >&5
19720   (eval $ac_try) 2>&5
19721   ac_status=$?
19722   echo "$as_me:19722: \$? = $ac_status" >&5
19723   (exit $ac_status); }; }; then
19724   cf_iostream_namespace=yes
19725 else
19726   echo "$as_me: failed program was:" >&5
19727 cat conftest.$ac_ext >&5
19728 cf_iostream_namespace=no
19729 fi
19730 rm -f conftest.$ac_objext conftest.$ac_ext
19731         echo "$as_me:19731: result: $cf_iostream_namespace" >&5
19732 echo "${ECHO_T}$cf_iostream_namespace" >&6
19733         if test "$cf_iostream_namespace" = yes ; then
19734
19735 cat >>confdefs.h <<\EOF
19736 #define IOSTREAM_NAMESPACE 1
19737 EOF
19738
19739         fi
19740 fi
19741
19742 echo "$as_me:19742: checking if we should include stdbool.h" >&5
19743 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19744
19745 if test "${cf_cv_header_stdbool_h+set}" = set; then
19746   echo $ECHO_N "(cached) $ECHO_C" >&6
19747 else
19748
19749         cat >conftest.$ac_ext <<_ACEOF
19750 #line 19750 "configure"
19751 #include "confdefs.h"
19752
19753 int
19754 main ()
19755 {
19756 bool foo = false
19757   ;
19758   return 0;
19759 }
19760 _ACEOF
19761 rm -f conftest.$ac_objext
19762 if { (eval echo "$as_me:19762: \"$ac_compile\"") >&5
19763   (eval $ac_compile) 2>&5
19764   ac_status=$?
19765   echo "$as_me:19765: \$? = $ac_status" >&5
19766   (exit $ac_status); } &&
19767          { ac_try='test -s conftest.$ac_objext'
19768   { (eval echo "$as_me:19768: \"$ac_try\"") >&5
19769   (eval $ac_try) 2>&5
19770   ac_status=$?
19771   echo "$as_me:19771: \$? = $ac_status" >&5
19772   (exit $ac_status); }; }; then
19773   cf_cv_header_stdbool_h=0
19774 else
19775   echo "$as_me: failed program was:" >&5
19776 cat conftest.$ac_ext >&5
19777 cat >conftest.$ac_ext <<_ACEOF
19778 #line 19778 "configure"
19779 #include "confdefs.h"
19780
19781 #ifndef __BEOS__
19782 #include <stdbool.h>
19783 #endif
19784
19785 int
19786 main ()
19787 {
19788 bool foo = false
19789   ;
19790   return 0;
19791 }
19792 _ACEOF
19793 rm -f conftest.$ac_objext
19794 if { (eval echo "$as_me:19794: \"$ac_compile\"") >&5
19795   (eval $ac_compile) 2>&5
19796   ac_status=$?
19797   echo "$as_me:19797: \$? = $ac_status" >&5
19798   (exit $ac_status); } &&
19799          { ac_try='test -s conftest.$ac_objext'
19800   { (eval echo "$as_me:19800: \"$ac_try\"") >&5
19801   (eval $ac_try) 2>&5
19802   ac_status=$?
19803   echo "$as_me:19803: \$? = $ac_status" >&5
19804   (exit $ac_status); }; }; then
19805   cf_cv_header_stdbool_h=1
19806 else
19807   echo "$as_me: failed program was:" >&5
19808 cat conftest.$ac_ext >&5
19809 cf_cv_header_stdbool_h=0
19810 fi
19811 rm -f conftest.$ac_objext conftest.$ac_ext
19812 fi
19813 rm -f conftest.$ac_objext conftest.$ac_ext
19814 fi
19815
19816 if test "$cf_cv_header_stdbool_h" = 1
19817 then    echo "$as_me:19817: result: yes" >&5
19818 echo "${ECHO_T}yes" >&6
19819 else    echo "$as_me:19819: result: no" >&5
19820 echo "${ECHO_T}no" >&6
19821 fi
19822
19823 echo "$as_me:19823: checking for builtin bool type" >&5
19824 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19825
19826 if test "${cf_cv_builtin_bool+set}" = set; then
19827   echo $ECHO_N "(cached) $ECHO_C" >&6
19828 else
19829
19830         cat >conftest.$ac_ext <<_ACEOF
19831 #line 19831 "configure"
19832 #include "confdefs.h"
19833
19834 #include <stdio.h>
19835 #include <sys/types.h>
19836
19837 int
19838 main ()
19839 {
19840 bool x = false
19841   ;
19842   return 0;
19843 }
19844 _ACEOF
19845 rm -f conftest.$ac_objext
19846 if { (eval echo "$as_me:19846: \"$ac_compile\"") >&5
19847   (eval $ac_compile) 2>&5
19848   ac_status=$?
19849   echo "$as_me:19849: \$? = $ac_status" >&5
19850   (exit $ac_status); } &&
19851          { ac_try='test -s conftest.$ac_objext'
19852   { (eval echo "$as_me:19852: \"$ac_try\"") >&5
19853   (eval $ac_try) 2>&5
19854   ac_status=$?
19855   echo "$as_me:19855: \$? = $ac_status" >&5
19856   (exit $ac_status); }; }; then
19857   cf_cv_builtin_bool=1
19858 else
19859   echo "$as_me: failed program was:" >&5
19860 cat conftest.$ac_ext >&5
19861 cf_cv_builtin_bool=0
19862 fi
19863 rm -f conftest.$ac_objext conftest.$ac_ext
19864
19865 fi
19866
19867 if test "$cf_cv_builtin_bool" = 1
19868 then    echo "$as_me:19868: result: yes" >&5
19869 echo "${ECHO_T}yes" >&6
19870 else    echo "$as_me:19870: result: no" >&5
19871 echo "${ECHO_T}no" >&6
19872 fi
19873
19874 echo "$as_me:19874: checking for size of bool" >&5
19875 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19876 if test "${cf_cv_type_of_bool+set}" = set; then
19877   echo $ECHO_N "(cached) $ECHO_C" >&6
19878 else
19879
19880         rm -f cf_test.out
19881         if test "$cross_compiling" = yes; then
19882   cf_cv_type_of_bool=unknown
19883 else
19884   cat >conftest.$ac_ext <<_ACEOF
19885 #line 19885 "configure"
19886 #include "confdefs.h"
19887
19888 #include <stdlib.h>
19889 #include <stdio.h>
19890
19891 #if defined(__cplusplus)
19892
19893 #ifdef HAVE_GXX_BUILTIN_H
19894 #include <g++/builtin.h>
19895 #elif HAVE_GPP_BUILTIN_H
19896 #include <gpp/builtin.h>
19897 #elif HAVE_BUILTIN_H
19898 #include <builtin.h>
19899 #endif
19900
19901 #else
19902
19903 #if $cf_cv_header_stdbool_h
19904 #include <stdbool.h>
19905 #endif
19906
19907 #endif
19908
19909 int main()
19910 {
19911         FILE *fp = fopen("cf_test.out", "w");
19912         if (fp != 0) {
19913                 bool x = true;
19914                 if ((bool)(-x) >= 0)
19915                         fputs("unsigned ", fp);
19916                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19917                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19918                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19919                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19920                 fclose(fp);
19921         }
19922         ${cf_cv_main_return:-return}(0);
19923 }
19924
19925 _ACEOF
19926 rm -f conftest$ac_exeext
19927 if { (eval echo "$as_me:19927: \"$ac_link\"") >&5
19928   (eval $ac_link) 2>&5
19929   ac_status=$?
19930   echo "$as_me:19930: \$? = $ac_status" >&5
19931   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19932   { (eval echo "$as_me:19932: \"$ac_try\"") >&5
19933   (eval $ac_try) 2>&5
19934   ac_status=$?
19935   echo "$as_me:19935: \$? = $ac_status" >&5
19936   (exit $ac_status); }; }; then
19937   cf_cv_type_of_bool=`cat cf_test.out`
19938                  if test -z "$cf_cv_type_of_bool"; then
19939                    cf_cv_type_of_bool=unknown
19940                  fi
19941 else
19942   echo "$as_me: program exited with status $ac_status" >&5
19943 echo "$as_me: failed program was:" >&5
19944 cat conftest.$ac_ext >&5
19945 cf_cv_type_of_bool=unknown
19946 fi
19947 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19948 fi
19949
19950 fi
19951
19952         rm -f cf_test.out
19953 echo "$as_me:19953: result: $cf_cv_type_of_bool" >&5
19954 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19955 if test "$cf_cv_type_of_bool" = unknown ; then
19956         case .$NCURSES_BOOL in #(vi
19957         .auto|.) NCURSES_BOOL=unsigned;;
19958         esac
19959         { echo "$as_me:19959: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19960 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19961         cf_cv_type_of_bool=$NCURSES_BOOL
19962 fi
19963
19964 echo "$as_me:19964: checking for special defines needed for etip.h" >&5
19965 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19966 cf_save_CXXFLAGS="$CXXFLAGS"
19967 cf_result="none"
19968
19969 # etip.h includes ncurses.h which includes ncurses_dll.h
19970 # But ncurses_dll.h is generated - fix here.
19971 test -d include || mkdir include
19972 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
19973
19974 for cf_math in "" MATH_H
19975 do
19976 for cf_excp in "" MATH_EXCEPTION
19977 do
19978         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19979         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19980         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19981 cat >conftest.$ac_ext <<_ACEOF
19982 #line 19982 "configure"
19983 #include "confdefs.h"
19984
19985 #include <etip.h.in>
19986
19987 int
19988 main ()
19989 {
19990
19991   ;
19992   return 0;
19993 }
19994 _ACEOF
19995 rm -f conftest.$ac_objext
19996 if { (eval echo "$as_me:19996: \"$ac_compile\"") >&5
19997   (eval $ac_compile) 2>&5
19998   ac_status=$?
19999   echo "$as_me:19999: \$? = $ac_status" >&5
20000   (exit $ac_status); } &&
20001          { ac_try='test -s conftest.$ac_objext'
20002   { (eval echo "$as_me:20002: \"$ac_try\"") >&5
20003   (eval $ac_try) 2>&5
20004   ac_status=$?
20005   echo "$as_me:20005: \$? = $ac_status" >&5
20006   (exit $ac_status); }; }; then
20007
20008         test -n "$cf_math" && cat >>confdefs.h <<EOF
20009 #define ETIP_NEEDS_${cf_math} 1
20010 EOF
20011
20012         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20013 #define ETIP_NEEDS_${cf_excp} 1
20014 EOF
20015
20016         cf_result="$cf_math $cf_excp"
20017         break 2
20018
20019 else
20020   echo "$as_me: failed program was:" >&5
20021 cat conftest.$ac_ext >&5
20022 fi
20023 rm -f conftest.$ac_objext conftest.$ac_ext
20024 done
20025 done
20026 echo "$as_me:20026: result: $cf_result" >&5
20027 echo "${ECHO_T}$cf_result" >&6
20028 CXXFLAGS="$cf_save_CXXFLAGS"
20029
20030 if test -n "$CXX"; then
20031 echo "$as_me:20031: checking if $CXX accepts parameter initialization" >&5
20032 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20033 if test "${cf_cv_cpp_param_init+set}" = set; then
20034   echo $ECHO_N "(cached) $ECHO_C" >&6
20035 else
20036
20037         ac_ext=cc
20038 ac_cpp='$CXXCPP $CPPFLAGS'
20039 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20040 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20041 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20042 ac_main_return=return
20043
20044         if test "$cross_compiling" = yes; then
20045   cf_cv_cpp_param_init=unknown
20046 else
20047   cat >conftest.$ac_ext <<_ACEOF
20048 #line 20048 "configure"
20049 #include "confdefs.h"
20050
20051 class TEST {
20052 private:
20053         int value;
20054 public:
20055         TEST(int x = 1);
20056         ~TEST();
20057 };
20058
20059 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20060 {
20061         value = x;
20062 }
20063 int main() { }
20064
20065 _ACEOF
20066 rm -f conftest$ac_exeext
20067 if { (eval echo "$as_me:20067: \"$ac_link\"") >&5
20068   (eval $ac_link) 2>&5
20069   ac_status=$?
20070   echo "$as_me:20070: \$? = $ac_status" >&5
20071   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20072   { (eval echo "$as_me:20072: \"$ac_try\"") >&5
20073   (eval $ac_try) 2>&5
20074   ac_status=$?
20075   echo "$as_me:20075: \$? = $ac_status" >&5
20076   (exit $ac_status); }; }; then
20077   cf_cv_cpp_param_init=yes
20078 else
20079   echo "$as_me: program exited with status $ac_status" >&5
20080 echo "$as_me: failed program was:" >&5
20081 cat conftest.$ac_ext >&5
20082 cf_cv_cpp_param_init=no
20083 fi
20084 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20085 fi
20086         ac_ext=cc
20087 ac_cpp='$CXXCPP $CPPFLAGS'
20088 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20089 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20090 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20091 ac_main_return=return
20092
20093 fi
20094 echo "$as_me:20094: result: $cf_cv_cpp_param_init" >&5
20095 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20096 fi
20097 test "$cf_cv_cpp_param_init" = yes &&
20098 cat >>confdefs.h <<\EOF
20099 #define CPP_HAS_PARAM_INIT 1
20100 EOF
20101
20102 if test -n "$CXX"; then
20103
20104 echo "$as_me:20104: checking if $CXX accepts static_cast" >&5
20105 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20106 if test "${cf_cv_cpp_static_cast+set}" = set; then
20107   echo $ECHO_N "(cached) $ECHO_C" >&6
20108 else
20109
20110         ac_ext=cc
20111 ac_cpp='$CXXCPP $CPPFLAGS'
20112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20115 ac_main_return=return
20116
20117         cat >conftest.$ac_ext <<_ACEOF
20118 #line 20118 "configure"
20119 #include "confdefs.h"
20120
20121 class NCursesPanel
20122 {
20123 public:
20124   NCursesPanel(int nlines,
20125                int ncols,
20126                int begin_y = 0,
20127                int begin_x = 0)
20128   {
20129   }
20130   NCursesPanel();
20131   ~NCursesPanel();
20132 };
20133
20134 template<class T> class NCursesUserPanel : public NCursesPanel
20135 {
20136 public:
20137   NCursesUserPanel (int nlines,
20138                     int ncols,
20139                     int begin_y = 0,
20140                     int begin_x = 0,
20141                     const T* p_UserData = static_cast<T*>(0))
20142     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20143   {
20144   };
20145   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20146   {
20147   };
20148
20149   virtual ~NCursesUserPanel() {};
20150 };
20151
20152 int
20153 main ()
20154 {
20155
20156         const char* p_UserData = static_cast<char*>(0)
20157   ;
20158   return 0;
20159 }
20160 _ACEOF
20161 rm -f conftest.$ac_objext
20162 if { (eval echo "$as_me:20162: \"$ac_compile\"") >&5
20163   (eval $ac_compile) 2>&5
20164   ac_status=$?
20165   echo "$as_me:20165: \$? = $ac_status" >&5
20166   (exit $ac_status); } &&
20167          { ac_try='test -s conftest.$ac_objext'
20168   { (eval echo "$as_me:20168: \"$ac_try\"") >&5
20169   (eval $ac_try) 2>&5
20170   ac_status=$?
20171   echo "$as_me:20171: \$? = $ac_status" >&5
20172   (exit $ac_status); }; }; then
20173   cf_cv_cpp_static_cast=yes
20174 else
20175   echo "$as_me: failed program was:" >&5
20176 cat conftest.$ac_ext >&5
20177 cf_cv_cpp_static_cast=no
20178 fi
20179 rm -f conftest.$ac_objext conftest.$ac_ext
20180
20181         ac_ext=cc
20182 ac_cpp='$CXXCPP $CPPFLAGS'
20183 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20184 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20185 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20186 ac_main_return=return
20187
20188 fi
20189 echo "$as_me:20189: result: $cf_cv_cpp_static_cast" >&5
20190 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20191
20192 fi
20193
20194 test "$cf_cv_cpp_static_cast" = yes &&
20195 cat >>confdefs.h <<\EOF
20196 #define CPP_HAS_STATIC_CAST 1
20197 EOF
20198
20199         CXX_AR='$(AR)'
20200         CXX_ARFLAGS='$(ARFLAGS)'
20201         case $cf_cv_system_name in #(vi
20202         irix*) #(vi
20203             if test "$GXX" != yes ; then
20204                 CXX_AR='$(CXX)'
20205                 CXX_ARFLAGS='-ar -o'
20206             fi
20207             ;;
20208         sco3.2v5*) #(vi
20209             CXXLDFLAGS="-u main"
20210             ;;
20211         solaris2*)
20212             if test "$GXX" != yes ; then
20213                 CXX_AR='$(CXX)'
20214                 CXX_ARFLAGS='-xar -o'
20215             fi
20216             ;;
20217         esac
20218
20219 else
20220         cf_cxx_library=no
20221         cf_cv_builtin_bool=1
20222
20223         # Just because we are not configuring against C++ right now does not
20224         # mean that a user will not want to use C++.  Some distributors disable
20225         # the C++ portion of this configuration as a shortcut (or just to avoid
20226         # compiling the demo in the c++ directory).  So we need a reasonable
20227         # default for the 'bool' type.
20228         #
20229         # Caveat: since the storage of the bool type is not standardized, it
20230         # may change.
20231
20232         if test "$NCURSES_BOOL" != auto ; then
20233                 cf_cv_type_of_bool=$NCURSES_BOOL
20234                 cf_cv_header_stdbool_h=0
20235         else
20236                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20237
20238 echo "$as_me:20238: checking for size of bool" >&5
20239 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20240 if test "${cf_cv_type_of_bool+set}" = set; then
20241   echo $ECHO_N "(cached) $ECHO_C" >&6
20242 else
20243
20244         rm -f cf_test.out
20245         if test "$cross_compiling" = yes; then
20246   cf_cv_type_of_bool=unknown
20247 else
20248   cat >conftest.$ac_ext <<_ACEOF
20249 #line 20249 "configure"
20250 #include "confdefs.h"
20251
20252 #include <stdlib.h>
20253 #include <stdio.h>
20254
20255 #if defined(__cplusplus)
20256
20257 #ifdef HAVE_GXX_BUILTIN_H
20258 #include <g++/builtin.h>
20259 #elif HAVE_GPP_BUILTIN_H
20260 #include <gpp/builtin.h>
20261 #elif HAVE_BUILTIN_H
20262 #include <builtin.h>
20263 #endif
20264
20265 #else
20266
20267 #if $cf_cv_header_stdbool_h
20268 #include <stdbool.h>
20269 #endif
20270
20271 #endif
20272
20273 int main()
20274 {
20275         FILE *fp = fopen("cf_test.out", "w");
20276         if (fp != 0) {
20277                 bool x = true;
20278                 if ((bool)(-x) >= 0)
20279                         fputs("unsigned ", fp);
20280                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20281                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20282                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20283                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20284                 fclose(fp);
20285         }
20286         ${cf_cv_main_return:-return}(0);
20287 }
20288
20289 _ACEOF
20290 rm -f conftest$ac_exeext
20291 if { (eval echo "$as_me:20291: \"$ac_link\"") >&5
20292   (eval $ac_link) 2>&5
20293   ac_status=$?
20294   echo "$as_me:20294: \$? = $ac_status" >&5
20295   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20296   { (eval echo "$as_me:20296: \"$ac_try\"") >&5
20297   (eval $ac_try) 2>&5
20298   ac_status=$?
20299   echo "$as_me:20299: \$? = $ac_status" >&5
20300   (exit $ac_status); }; }; then
20301   cf_cv_type_of_bool=`cat cf_test.out`
20302                  if test -z "$cf_cv_type_of_bool"; then
20303                    cf_cv_type_of_bool=unknown
20304                  fi
20305 else
20306   echo "$as_me: program exited with status $ac_status" >&5
20307 echo "$as_me: failed program was:" >&5
20308 cat conftest.$ac_ext >&5
20309 cf_cv_type_of_bool=unknown
20310 fi
20311 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20312 fi
20313
20314 fi
20315
20316         rm -f cf_test.out
20317 echo "$as_me:20317: result: $cf_cv_type_of_bool" >&5
20318 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20319 if test "$cf_cv_type_of_bool" = unknown ; then
20320         case .$NCURSES_BOOL in #(vi
20321         .auto|.) NCURSES_BOOL=unsigned;;
20322         esac
20323         { echo "$as_me:20323: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20324 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20325         cf_cv_type_of_bool=$NCURSES_BOOL
20326 fi
20327
20328                 else
20329                         echo "$as_me:20329: checking for fallback type of bool" >&5
20330 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20331                         case "$host_cpu" in #(vi
20332                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20333                         *)      cf_cv_type_of_bool=int  ;;
20334                         esac
20335                         echo "$as_me:20335: result: $cf_cv_type_of_bool" >&5
20336 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20337                 fi
20338         fi
20339 fi
20340
20341 # If the C compiler did not declare bool, and we did not determine that the C++
20342 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20343 # ncurses library use the same type as C++ bool.  Note that this allows one to
20344 # specify the type of bool in a configure-script option and postpone
20345 # integration with the C++ compiler provided that the types are compatible.
20346 USE_CXX_BOOL=1
20347 if test $cf_cv_cc_bool_type = 1
20348 then
20349         # oops: C has a bool.  Unlikely, but C++ could differ.
20350         USE_CXX_BOOL=0
20351 elif test $cf_cv_builtin_bool = 0
20352 then
20353         # C++ has no bool
20354         USE_CXX_BOOL=0
20355 else
20356         # this is the normal case
20357         USE_CXX_BOOL='defined(__cplusplus)'
20358 fi
20359
20360 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20361
20362         if test "$cf_with_ada" != "no" ; then
20363                 if test "$with_libtool" != "no"; then
20364                         { echo "$as_me:20364: WARNING: libtool does not support Ada - disabling feature" >&5
20365 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20366                         cf_with_ada=no
20367                 fi
20368         fi
20369
20370         if test "$cf_with_ada" != "no" ; then
20371
20372 cf_ada_make=gnatmake
20373 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20374 set dummy $cf_ada_make; ac_word=$2
20375 echo "$as_me:20375: checking for $ac_word" >&5
20376 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20377 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20378   echo $ECHO_N "(cached) $ECHO_C" >&6
20379 else
20380   if test -n "$gnat_exists"; then
20381   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20382 else
20383   ac_save_IFS=$IFS; IFS=$ac_path_separator
20384 ac_dummy="$PATH"
20385 for ac_dir in $ac_dummy; do
20386   IFS=$ac_save_IFS
20387   test -z "$ac_dir" && ac_dir=.
20388   $as_executable_p "$ac_dir/$ac_word" || continue
20389 ac_cv_prog_gnat_exists="yes"
20390 echo "$as_me:20390: found $ac_dir/$ac_word" >&5
20391 break
20392 done
20393
20394   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20395 fi
20396 fi
20397 gnat_exists=$ac_cv_prog_gnat_exists
20398 if test -n "$gnat_exists"; then
20399   echo "$as_me:20399: result: $gnat_exists" >&5
20400 echo "${ECHO_T}$gnat_exists" >&6
20401 else
20402   echo "$as_me:20402: result: no" >&5
20403 echo "${ECHO_T}no" >&6
20404 fi
20405
20406 if test "$ac_cv_prog_gnat_exists" = no; then
20407    cf_ada_make=
20408    cf_cv_prog_gnat_correct=no
20409 else
20410
20411 echo "$as_me:20411: checking for gnat version" >&5
20412 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20413 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20414         grep '[0-9].[0-9][0-9]*' |\
20415     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20416 echo "$as_me:20416: result: $cf_gnat_version" >&5
20417 echo "${ECHO_T}$cf_gnat_version" >&6
20418
20419 case $cf_gnat_version in #(vi
20420 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20421         cf_cv_prog_gnat_correct=yes
20422         ;;
20423 *)
20424         { echo "$as_me:20424: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20425 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20426         cf_cv_prog_gnat_correct=no
20427         ;;
20428 esac
20429
20430    # Extract the first word of "m4", so it can be a program name with args.
20431 set dummy m4; ac_word=$2
20432 echo "$as_me:20432: checking for $ac_word" >&5
20433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20434 if test "${ac_cv_prog_M4_exists+set}" = set; then
20435   echo $ECHO_N "(cached) $ECHO_C" >&6
20436 else
20437   if test -n "$M4_exists"; then
20438   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20439 else
20440   ac_save_IFS=$IFS; IFS=$ac_path_separator
20441 ac_dummy="$PATH"
20442 for ac_dir in $ac_dummy; do
20443   IFS=$ac_save_IFS
20444   test -z "$ac_dir" && ac_dir=.
20445   $as_executable_p "$ac_dir/$ac_word" || continue
20446 ac_cv_prog_M4_exists="yes"
20447 echo "$as_me:20447: found $ac_dir/$ac_word" >&5
20448 break
20449 done
20450
20451   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20452 fi
20453 fi
20454 M4_exists=$ac_cv_prog_M4_exists
20455 if test -n "$M4_exists"; then
20456   echo "$as_me:20456: result: $M4_exists" >&5
20457 echo "${ECHO_T}$M4_exists" >&6
20458 else
20459   echo "$as_me:20459: result: no" >&5
20460 echo "${ECHO_T}no" >&6
20461 fi
20462
20463    if test "$ac_cv_prog_M4_exists" = no; then
20464       cf_cv_prog_gnat_correct=no
20465       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20466    fi
20467    if test "$cf_cv_prog_gnat_correct" = yes; then
20468       echo "$as_me:20468: checking if GNAT works" >&5
20469 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20470
20471 rm -rf conftest* *~conftest*
20472 cat >>conftest.ads <<CF_EOF
20473 procedure conftest;
20474 CF_EOF
20475 cat >>conftest.adb <<CF_EOF
20476 with Text_IO;
20477 with GNAT.OS_Lib;
20478 procedure conftest is
20479 begin
20480    Text_IO.Put ("Hello World");
20481    Text_IO.New_Line;
20482    GNAT.OS_Lib.OS_Exit (0);
20483 end conftest;
20484 CF_EOF
20485 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20486    if ( ./conftest 1>&5 2>&1 ) ; then
20487       cf_cv_prog_gnat_correct=yes
20488    else
20489       cf_cv_prog_gnat_correct=no
20490    fi
20491 else
20492    cf_cv_prog_gnat_correct=no
20493 fi
20494 rm -rf conftest* *~conftest*
20495
20496       echo "$as_me:20496: result: $cf_cv_prog_gnat_correct" >&5
20497 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20498    fi
20499 fi
20500
20501                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20502
20503         ADAFLAGS="$ADAFLAGS -gnatpn"
20504
20505         echo "$as_me:20505: checking optimization options for ADAFLAGS" >&5
20506 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20507         case "$CFLAGS" in
20508         *-g*)
20509
20510         ADAFLAGS="$ADAFLAGS -g"
20511
20512                 ;;
20513         esac
20514         case "$CFLAGS" in
20515         *-O*)
20516                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20517
20518         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20519
20520                 ;;
20521         esac
20522         echo "$as_me:20522: result: $ADAFLAGS" >&5
20523 echo "${ECHO_T}$ADAFLAGS" >&6
20524
20525 echo "$as_me:20525: checking if GNATPREP supports -T option" >&5
20526 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20527 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20528   echo $ECHO_N "(cached) $ECHO_C" >&6
20529 else
20530
20531 cf_cv_gnatprep_opt_t=no
20532 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20533
20534 fi
20535 echo "$as_me:20535: result: $cf_cv_gnatprep_opt_t" >&5
20536 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20537 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20538
20539 echo "$as_me:20539: checking if GNAT supports generics" >&5
20540 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20541 case $cf_gnat_version in #(vi
20542 3.[1-9]*|[4-9].*) #(vi
20543         cf_gnat_generics=yes
20544         ;;
20545 *)
20546         cf_gnat_generics=no
20547         ;;
20548 esac
20549 echo "$as_me:20549: result: $cf_gnat_generics" >&5
20550 echo "${ECHO_T}$cf_gnat_generics" >&6
20551
20552 if test "$cf_gnat_generics" = yes
20553 then
20554         cf_compile_generics=generics
20555         cf_generic_objects="\${GENOBJS}"
20556 else
20557         cf_compile_generics=
20558         cf_generic_objects=
20559 fi
20560
20561 echo "$as_me:20561: checking if GNAT supports SIGINT" >&5
20562 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20563 if test "${cf_cv_gnat_sigint+set}" = set; then
20564   echo $ECHO_N "(cached) $ECHO_C" >&6
20565 else
20566
20567 rm -rf conftest* *~conftest*
20568 cat >>conftest.ads <<CF_EOF
20569 with Ada.Interrupts.Names;
20570
20571 package ConfTest is
20572
20573    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20574    pragma Unreserve_All_Interrupts;
20575    pragma Warnings (On);
20576
20577    protected Process is
20578       procedure Stop;
20579       function Continue return Boolean;
20580       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20581    private
20582       Done : Boolean := False;
20583    end Process;
20584
20585 end ConfTest;
20586 CF_EOF
20587 cat >>conftest.adb <<CF_EOF
20588 package body ConfTest is
20589    protected body Process is
20590       procedure Stop is
20591       begin
20592          Done := True;
20593       end Stop;
20594       function Continue return Boolean is
20595       begin
20596          return not Done;
20597       end Continue;
20598    end Process;
20599 end ConfTest;
20600 CF_EOF
20601 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20602       cf_cv_gnat_sigint=yes
20603 else
20604    cf_cv_gnat_sigint=no
20605 fi
20606 rm -rf conftest* *~conftest*
20607
20608 fi
20609 echo "$as_me:20609: result: $cf_cv_gnat_sigint" >&5
20610 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20611
20612 if test $cf_cv_gnat_sigint = yes ; then
20613         USE_GNAT_SIGINT=""
20614 else
20615         USE_GNAT_SIGINT="#"
20616 fi
20617
20618 cf_gnat_libraries=no
20619 cf_gnat_projects=no
20620
20621 if test "$enable_gnat_projects" != no ; then
20622 echo "$as_me:20622: checking if GNAT supports project files" >&5
20623 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20624 case $cf_gnat_version in #(vi
20625 3.[0-9]*) #(vi
20626         ;;
20627 *)
20628         case $cf_cv_system_name in #(vi
20629         cygwin*|msys*) #(vi
20630                 ;;
20631         *)
20632                 mkdir conftest.src conftest.bin conftest.lib
20633                 cd conftest.src
20634                 rm -rf conftest* *~conftest*
20635                 cat >>library.gpr <<CF_EOF
20636 project Library is
20637   Kind := External ("LIB_KIND");
20638   for Library_Name use "ConfTest";
20639   for Object_Dir use ".";
20640   for Library_ALI_Dir use External("LIBRARY_DIR");
20641   for Library_Version use External ("SONAME");
20642   for Library_Kind use Kind;
20643   for Library_Dir use External("BUILD_DIR");
20644   Source_Dir := External ("SOURCE_DIR");
20645   for Source_Dirs use (Source_Dir);
20646 end Library;
20647 CF_EOF
20648                 cat >>confpackage.ads <<CF_EOF
20649 package ConfPackage is
20650    procedure conftest;
20651 end ConfPackage;
20652 CF_EOF
20653                 cat >>confpackage.adb <<CF_EOF
20654 with Text_IO;
20655 package body ConfPackage is
20656    procedure conftest is
20657    begin
20658       Text_IO.Put ("Hello World");
20659       Text_IO.New_Line;
20660    end conftest;
20661 end ConfPackage;
20662 CF_EOF
20663                 if ( $cf_ada_make $ADAFLAGS \
20664                                 -Plibrary.gpr \
20665                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20666                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20667                                 -XSOURCE_DIR=`pwd` \
20668                                 -XSONAME=libConfTest.so.1 \
20669                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20670                         cf_gnat_projects=yes
20671                 fi
20672                 cd ..
20673                 if test -f conftest.lib/confpackage.ali
20674                 then
20675                         cf_gnat_libraries=yes
20676                 fi
20677                 rm -rf conftest* *~conftest*
20678                 ;;
20679         esac
20680         ;;
20681 esac
20682 echo "$as_me:20682: result: $cf_gnat_projects" >&5
20683 echo "${ECHO_T}$cf_gnat_projects" >&6
20684 fi # enable_gnat_projects
20685
20686 if test $cf_gnat_projects = yes
20687 then
20688         echo "$as_me:20688: checking if GNAT supports libraries" >&5
20689 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20690         echo "$as_me:20690: result: $cf_gnat_libraries" >&5
20691 echo "${ECHO_T}$cf_gnat_libraries" >&6
20692 fi
20693
20694 if test "$cf_gnat_projects" = yes
20695 then
20696         USE_OLD_MAKERULES="#"
20697         USE_GNAT_PROJECTS=""
20698 else
20699         USE_OLD_MAKERULES=""
20700         USE_GNAT_PROJECTS="#"
20701 fi
20702
20703 if test "$cf_gnat_libraries" = yes
20704 then
20705         USE_GNAT_LIBRARIES=""
20706 else
20707         USE_GNAT_LIBRARIES="#"
20708 fi
20709
20710 echo "$as_me:20710: checking for ada-compiler" >&5
20711 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20712
20713 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20714 if test "${with_ada_compiler+set}" = set; then
20715   withval="$with_ada_compiler"
20716   cf_ada_compiler=$withval
20717 else
20718   cf_ada_compiler=gnatmake
20719 fi;
20720
20721 echo "$as_me:20721: result: $cf_ada_compiler" >&5
20722 echo "${ECHO_T}$cf_ada_compiler" >&6
20723
20724                         cf_ada_package=terminal_interface
20725
20726 echo "$as_me:20726: checking for ada-include" >&5
20727 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20728
20729 # Check whether --with-ada-include or --without-ada-include was given.
20730 if test "${with_ada_include+set}" = set; then
20731   withval="$with_ada_include"
20732
20733 else
20734   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20735 fi; if test -n "$prefix/share/ada/adainclude" ; then
20736
20737 if test "x$prefix" != xNONE; then
20738   cf_path_syntax="$prefix"
20739 else
20740   cf_path_syntax="$ac_default_prefix"
20741 fi
20742
20743 case ".$withval" in #(vi
20744 .\$\(*\)*|.\'*\'*) #(vi
20745   ;;
20746 ..|./*|.\\*) #(vi
20747   ;;
20748 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20749   ;;
20750 .\${*prefix}*|.\${*dir}*) #(vi
20751   eval withval="$withval"
20752   case ".$withval" in #(vi
20753   .NONE/*)
20754     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20755     ;;
20756   esac
20757   ;; #(vi
20758 .no|.NONE/*)
20759   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20760   ;;
20761 *)
20762   { { echo "$as_me:20762: error: expected a pathname, not \"$withval\"" >&5
20763 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20764    { (exit 1); exit 1; }; }
20765   ;;
20766 esac
20767
20768 fi
20769 eval ADA_INCLUDE="$withval"
20770
20771 echo "$as_me:20771: result: $ADA_INCLUDE" >&5
20772 echo "${ECHO_T}$ADA_INCLUDE" >&6
20773
20774 echo "$as_me:20774: checking for ada-objects" >&5
20775 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20776
20777 # Check whether --with-ada-objects or --without-ada-objects was given.
20778 if test "${with_ada_objects+set}" = set; then
20779   withval="$with_ada_objects"
20780
20781 else
20782   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20783 fi; if test -n "$prefix/lib/ada/adalib" ; then
20784
20785 if test "x$prefix" != xNONE; then
20786   cf_path_syntax="$prefix"
20787 else
20788   cf_path_syntax="$ac_default_prefix"
20789 fi
20790
20791 case ".$withval" in #(vi
20792 .\$\(*\)*|.\'*\'*) #(vi
20793   ;;
20794 ..|./*|.\\*) #(vi
20795   ;;
20796 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20797   ;;
20798 .\${*prefix}*|.\${*dir}*) #(vi
20799   eval withval="$withval"
20800   case ".$withval" in #(vi
20801   .NONE/*)
20802     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20803     ;;
20804   esac
20805   ;; #(vi
20806 .no|.NONE/*)
20807   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20808   ;;
20809 *)
20810   { { echo "$as_me:20810: error: expected a pathname, not \"$withval\"" >&5
20811 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20812    { (exit 1); exit 1; }; }
20813   ;;
20814 esac
20815
20816 fi
20817 eval ADA_OBJECTS="$withval"
20818
20819 echo "$as_me:20819: result: $ADA_OBJECTS" >&5
20820 echo "${ECHO_T}$ADA_OBJECTS" >&6
20821
20822 echo "$as_me:20822: checking if an Ada95 shared-library should be built" >&5
20823 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20824
20825 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20826 if test "${with_ada_sharedlib+set}" = set; then
20827   withval="$with_ada_sharedlib"
20828   with_ada_sharedlib=$withval
20829 else
20830   with_ada_sharedlib=no
20831 fi;
20832 echo "$as_me:20832: result: $with_ada_sharedlib" >&5
20833 echo "${ECHO_T}$with_ada_sharedlib" >&6
20834
20835 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20836 MAKE_ADA_SHAREDLIB="#"
20837
20838 if test "x$with_ada_sharedlib" != xno
20839 then
20840         MAKE_ADA_SHAREDLIB=
20841         if test "x$with_ada_sharedlib" != xyes
20842         then
20843                 ADA_SHAREDLIB="$with_ada_sharedlib"
20844         fi
20845 fi
20846
20847                 fi
20848         fi
20849 else
20850         cf_with_ada=no
20851 fi
20852
20853 # do this "late" to avoid conflict with header-checks
20854 if test "x$with_widec" = xyes ; then
20855         echo "$as_me:20855: checking for wchar_t" >&5
20856 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20857 if test "${ac_cv_type_wchar_t+set}" = set; then
20858   echo $ECHO_N "(cached) $ECHO_C" >&6
20859 else
20860   cat >conftest.$ac_ext <<_ACEOF
20861 #line 20861 "configure"
20862 #include "confdefs.h"
20863 $ac_includes_default
20864 int
20865 main ()
20866 {
20867 if ((wchar_t *) 0)
20868   return 0;
20869 if (sizeof (wchar_t))
20870   return 0;
20871   ;
20872   return 0;
20873 }
20874 _ACEOF
20875 rm -f conftest.$ac_objext
20876 if { (eval echo "$as_me:20876: \"$ac_compile\"") >&5
20877   (eval $ac_compile) 2>&5
20878   ac_status=$?
20879   echo "$as_me:20879: \$? = $ac_status" >&5
20880   (exit $ac_status); } &&
20881          { ac_try='test -s conftest.$ac_objext'
20882   { (eval echo "$as_me:20882: \"$ac_try\"") >&5
20883   (eval $ac_try) 2>&5
20884   ac_status=$?
20885   echo "$as_me:20885: \$? = $ac_status" >&5
20886   (exit $ac_status); }; }; then
20887   ac_cv_type_wchar_t=yes
20888 else
20889   echo "$as_me: failed program was:" >&5
20890 cat conftest.$ac_ext >&5
20891 ac_cv_type_wchar_t=no
20892 fi
20893 rm -f conftest.$ac_objext conftest.$ac_ext
20894 fi
20895 echo "$as_me:20895: result: $ac_cv_type_wchar_t" >&5
20896 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20897
20898 echo "$as_me:20898: checking size of wchar_t" >&5
20899 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20900 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20901   echo $ECHO_N "(cached) $ECHO_C" >&6
20902 else
20903   if test "$ac_cv_type_wchar_t" = yes; then
20904   if test "$cross_compiling" = yes; then
20905   # Depending upon the size, compute the lo and hi bounds.
20906 cat >conftest.$ac_ext <<_ACEOF
20907 #line 20907 "configure"
20908 #include "confdefs.h"
20909 $ac_includes_default
20910 int
20911 main ()
20912 {
20913 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20914   ;
20915   return 0;
20916 }
20917 _ACEOF
20918 rm -f conftest.$ac_objext
20919 if { (eval echo "$as_me:20919: \"$ac_compile\"") >&5
20920   (eval $ac_compile) 2>&5
20921   ac_status=$?
20922   echo "$as_me:20922: \$? = $ac_status" >&5
20923   (exit $ac_status); } &&
20924          { ac_try='test -s conftest.$ac_objext'
20925   { (eval echo "$as_me:20925: \"$ac_try\"") >&5
20926   (eval $ac_try) 2>&5
20927   ac_status=$?
20928   echo "$as_me:20928: \$? = $ac_status" >&5
20929   (exit $ac_status); }; }; then
20930   ac_lo=0 ac_mid=0
20931   while :; do
20932     cat >conftest.$ac_ext <<_ACEOF
20933 #line 20933 "configure"
20934 #include "confdefs.h"
20935 $ac_includes_default
20936 int
20937 main ()
20938 {
20939 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20940   ;
20941   return 0;
20942 }
20943 _ACEOF
20944 rm -f conftest.$ac_objext
20945 if { (eval echo "$as_me:20945: \"$ac_compile\"") >&5
20946   (eval $ac_compile) 2>&5
20947   ac_status=$?
20948   echo "$as_me:20948: \$? = $ac_status" >&5
20949   (exit $ac_status); } &&
20950          { ac_try='test -s conftest.$ac_objext'
20951   { (eval echo "$as_me:20951: \"$ac_try\"") >&5
20952   (eval $ac_try) 2>&5
20953   ac_status=$?
20954   echo "$as_me:20954: \$? = $ac_status" >&5
20955   (exit $ac_status); }; }; then
20956   ac_hi=$ac_mid; break
20957 else
20958   echo "$as_me: failed program was:" >&5
20959 cat conftest.$ac_ext >&5
20960 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20961 fi
20962 rm -f conftest.$ac_objext conftest.$ac_ext
20963   done
20964 else
20965   echo "$as_me: failed program was:" >&5
20966 cat conftest.$ac_ext >&5
20967 ac_hi=-1 ac_mid=-1
20968   while :; do
20969     cat >conftest.$ac_ext <<_ACEOF
20970 #line 20970 "configure"
20971 #include "confdefs.h"
20972 $ac_includes_default
20973 int
20974 main ()
20975 {
20976 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20977   ;
20978   return 0;
20979 }
20980 _ACEOF
20981 rm -f conftest.$ac_objext
20982 if { (eval echo "$as_me:20982: \"$ac_compile\"") >&5
20983   (eval $ac_compile) 2>&5
20984   ac_status=$?
20985   echo "$as_me:20985: \$? = $ac_status" >&5
20986   (exit $ac_status); } &&
20987          { ac_try='test -s conftest.$ac_objext'
20988   { (eval echo "$as_me:20988: \"$ac_try\"") >&5
20989   (eval $ac_try) 2>&5
20990   ac_status=$?
20991   echo "$as_me:20991: \$? = $ac_status" >&5
20992   (exit $ac_status); }; }; then
20993   ac_lo=$ac_mid; break
20994 else
20995   echo "$as_me: failed program was:" >&5
20996 cat conftest.$ac_ext >&5
20997 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20998 fi
20999 rm -f conftest.$ac_objext conftest.$ac_ext
21000   done
21001 fi
21002 rm -f conftest.$ac_objext conftest.$ac_ext
21003 # Binary search between lo and hi bounds.
21004 while test "x$ac_lo" != "x$ac_hi"; do
21005   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21006   cat >conftest.$ac_ext <<_ACEOF
21007 #line 21007 "configure"
21008 #include "confdefs.h"
21009 $ac_includes_default
21010 int
21011 main ()
21012 {
21013 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21014   ;
21015   return 0;
21016 }
21017 _ACEOF
21018 rm -f conftest.$ac_objext
21019 if { (eval echo "$as_me:21019: \"$ac_compile\"") >&5
21020   (eval $ac_compile) 2>&5
21021   ac_status=$?
21022   echo "$as_me:21022: \$? = $ac_status" >&5
21023   (exit $ac_status); } &&
21024          { ac_try='test -s conftest.$ac_objext'
21025   { (eval echo "$as_me:21025: \"$ac_try\"") >&5
21026   (eval $ac_try) 2>&5
21027   ac_status=$?
21028   echo "$as_me:21028: \$? = $ac_status" >&5
21029   (exit $ac_status); }; }; then
21030   ac_hi=$ac_mid
21031 else
21032   echo "$as_me: failed program was:" >&5
21033 cat conftest.$ac_ext >&5
21034 ac_lo=`expr $ac_mid + 1`
21035 fi
21036 rm -f conftest.$ac_objext conftest.$ac_ext
21037 done
21038 ac_cv_sizeof_wchar_t=$ac_lo
21039 else
21040   if test "$cross_compiling" = yes; then
21041   { { echo "$as_me:21041: error: cannot run test program while cross compiling" >&5
21042 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21043    { (exit 1); exit 1; }; }
21044 else
21045   cat >conftest.$ac_ext <<_ACEOF
21046 #line 21046 "configure"
21047 #include "confdefs.h"
21048 $ac_includes_default
21049 int
21050 main ()
21051 {
21052 FILE *f = fopen ("conftest.val", "w");
21053 if (!f)
21054   $ac_main_return (1);
21055 fprintf (f, "%d", (sizeof (wchar_t)));
21056 fclose (f);
21057   ;
21058   return 0;
21059 }
21060 _ACEOF
21061 rm -f conftest$ac_exeext
21062 if { (eval echo "$as_me:21062: \"$ac_link\"") >&5
21063   (eval $ac_link) 2>&5
21064   ac_status=$?
21065   echo "$as_me:21065: \$? = $ac_status" >&5
21066   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21067   { (eval echo "$as_me:21067: \"$ac_try\"") >&5
21068   (eval $ac_try) 2>&5
21069   ac_status=$?
21070   echo "$as_me:21070: \$? = $ac_status" >&5
21071   (exit $ac_status); }; }; then
21072   ac_cv_sizeof_wchar_t=`cat conftest.val`
21073 else
21074   echo "$as_me: program exited with status $ac_status" >&5
21075 echo "$as_me: failed program was:" >&5
21076 cat conftest.$ac_ext >&5
21077 fi
21078 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21079 fi
21080 fi
21081 rm -f conftest.val
21082 else
21083   ac_cv_sizeof_wchar_t=0
21084 fi
21085 fi
21086 echo "$as_me:21086: result: $ac_cv_sizeof_wchar_t" >&5
21087 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21088 cat >>confdefs.h <<EOF
21089 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21090 EOF
21091
21092 fi
21093
21094 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21095 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21096 ###
21097 ### ticlib modules may be a separate library, otherwise contained in termlib.
21098 ### termlib modules may be a separate library, otherwise contained in ncurses.
21099 ###
21100 ### The of "+" or " " between the tokens controls the way the script
21101 ### chooses to split module lists into libraries.
21102 ###
21103 ### (see CF_LIB_RULES).
21104 echo "$as_me:21104: checking for library subsets" >&5
21105 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21106 LIB_SUBSETS=
21107
21108 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21109         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21110         if test "$with_ticlib" != no ; then
21111                 LIB_SUBSETS="${LIB_SUBSETS} "
21112         else
21113                 LIB_SUBSETS="${LIB_SUBSETS}+"
21114         fi
21115 fi
21116
21117 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21118 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21119
21120 if test "$with_termlib" != no ; then
21121         LIB_SUBSETS="${LIB_SUBSETS} "
21122 else
21123         LIB_SUBSETS="${LIB_SUBSETS}+"
21124 fi
21125
21126 LIB_SUBSETS="${LIB_SUBSETS}base"
21127
21128 # Most term-driver calls are to tinfo, but some like init_pair are to the
21129 # base library (so it resides in base).
21130 if test "$with_term_driver" != no ; then
21131         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21132         case $cf_cv_system_name in #(vi
21133         *mingw32*|*mingw64*) #(vi
21134                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21135                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21136                 ;;
21137         *) #(vi
21138                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21139                 ;;
21140         esac
21141 fi
21142
21143 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21144 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21145
21146 echo "$as_me:21146: result: $LIB_SUBSETS" >&5
21147 echo "${ECHO_T}$LIB_SUBSETS" >&6
21148
21149 ### Construct the list of include-directories to be generated
21150
21151 if test "$srcdir" != "."; then
21152         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21153 fi
21154 CPPFLAGS="-I../include $CPPFLAGS"
21155 if test "$srcdir" != "."; then
21156         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21157 fi
21158 CPPFLAGS="-I. $CPPFLAGS"
21159
21160 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21161 if test "$srcdir" != "."; then
21162         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21163 fi
21164 if test "$GCC" != yes; then
21165         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21166 elif test "$includedir" != "/usr/include"; then
21167         if test "$includedir" = '${prefix}/include' ; then
21168                 if test x$prefix != x/usr ; then
21169                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21170                 fi
21171         else
21172                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21173         fi
21174 fi
21175
21176 ### Build up pieces for makefile rules
21177 echo "$as_me:21177: checking default library suffix" >&5
21178 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21179
21180         case $DFT_LWR_MODEL in
21181         libtool) DFT_ARG_SUFFIX=''   ;;
21182         normal)  DFT_ARG_SUFFIX=''   ;;
21183         debug)   DFT_ARG_SUFFIX='_g' ;;
21184         profile) DFT_ARG_SUFFIX='_p' ;;
21185         shared)  DFT_ARG_SUFFIX=''   ;;
21186         esac
21187         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21188 echo "$as_me:21188: result: $DFT_ARG_SUFFIX" >&5
21189 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21190
21191 echo "$as_me:21191: checking default library-dependency suffix" >&5
21192 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21193
21194         case X$DFT_LWR_MODEL in #(vi
21195         Xlibtool) #(vi
21196                 DFT_LIB_SUFFIX='.la'
21197                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21198                 ;;
21199         Xdebug) #(vi
21200                 DFT_LIB_SUFFIX='_g.a'
21201                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21202                 ;;
21203         Xprofile) #(vi
21204                 DFT_LIB_SUFFIX='_p.a'
21205                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21206                 ;;
21207         Xshared) #(vi
21208                 case $cf_cv_system_name in
21209                 aix[5-7]*) #(vi
21210                         DFT_LIB_SUFFIX='.so'
21211                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21212                         ;;
21213                 cygwin*|msys*|mingw*) #(vi
21214                         DFT_LIB_SUFFIX='.dll'
21215                         DFT_DEP_SUFFIX='.dll.a'
21216                         ;;
21217                 darwin*) #(vi
21218                         DFT_LIB_SUFFIX='.dylib'
21219                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21220                         ;;
21221                 hpux*) #(vi
21222                         case $target in
21223                         ia64*) #(vi
21224                                 DFT_LIB_SUFFIX='.so'
21225                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21226                                 ;;
21227                         *) #(vi
21228                                 DFT_LIB_SUFFIX='.sl'
21229                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21230                                 ;;
21231                         esac
21232                         ;;
21233                 *) #(vi
21234                         DFT_LIB_SUFFIX='.so'
21235                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21236                         ;;
21237                 esac
21238                 ;;
21239         *)
21240                 DFT_LIB_SUFFIX='.a'
21241                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21242                 ;;
21243         esac
21244         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21245         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21246 echo "$as_me:21246: result: $DFT_DEP_SUFFIX" >&5
21247 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21248
21249 echo "$as_me:21249: checking default object directory" >&5
21250 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21251
21252         case $DFT_LWR_MODEL in
21253         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21254         normal)  DFT_OBJ_SUBDIR='objects' ;;
21255         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21256         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21257         shared)
21258                 case $cf_cv_system_name in #(vi
21259                 cygwin|msys) #(vi
21260                         DFT_OBJ_SUBDIR='objects' ;;
21261                 *)
21262                         DFT_OBJ_SUBDIR='obj_s' ;;
21263                 esac
21264         esac
21265 echo "$as_me:21265: result: $DFT_OBJ_SUBDIR" >&5
21266 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21267
21268 if test "x$cf_with_cxx" = xyes ; then
21269 echo "$as_me:21269: checking c++ library-dependency suffix" >&5
21270 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21271 if test "$with_libtool" != "no"; then
21272         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21273         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21274 elif test "$with_shared_cxx" != "no"; then
21275         # also for g++ users...
21276         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21277 else
21278         # we normally make a static library because C/C++ library rules differ
21279
21280         case Xnormal in #(vi
21281         Xlibtool) #(vi
21282                 CXX_LIB_SUFFIX='.la'
21283                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21284                 ;;
21285         Xdebug) #(vi
21286                 CXX_LIB_SUFFIX='_g.a'
21287                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21288                 ;;
21289         Xprofile) #(vi
21290                 CXX_LIB_SUFFIX='_p.a'
21291                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21292                 ;;
21293         Xshared) #(vi
21294                 case $cf_cv_system_name in
21295                 aix[5-7]*) #(vi
21296                         CXX_LIB_SUFFIX='.so'
21297                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21298                         ;;
21299                 cygwin*|msys*|mingw*) #(vi
21300                         CXX_LIB_SUFFIX='.dll'
21301                         CXX_DEP_SUFFIX='.dll.a'
21302                         ;;
21303                 darwin*) #(vi
21304                         CXX_LIB_SUFFIX='.dylib'
21305                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21306                         ;;
21307                 hpux*) #(vi
21308                         case $target in
21309                         ia64*) #(vi
21310                                 CXX_LIB_SUFFIX='.so'
21311                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21312                                 ;;
21313                         *) #(vi
21314                                 CXX_LIB_SUFFIX='.sl'
21315                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21316                                 ;;
21317                         esac
21318                         ;;
21319                 *) #(vi
21320                         CXX_LIB_SUFFIX='.so'
21321                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21322                         ;;
21323                 esac
21324                 ;;
21325         *)
21326                 CXX_LIB_SUFFIX='.a'
21327                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21328                 ;;
21329         esac
21330         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21331         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21332
21333 fi
21334 echo "$as_me:21334: result: $CXX_LIB_SUFFIX" >&5
21335 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21336
21337 fi
21338
21339 # do not want -ldl in build except as needed for -lncurses dependency
21340 if test "x$with_dlsym" = xyes ; then
21341 if test $DFT_LWR_MODEL = shared || \
21342    test $DFT_LWR_MODEL = libtool ; then
21343
21344 # remove dl library from $LIBS
21345 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21346
21347 fi
21348 fi
21349 ### Set up low-level terminfo dependencies for makefiles.
21350
21351 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21352 # do not need libdl
21353 TICS_LIST=
21354 if test "x$with_dlsym" = xyes ; then
21355
21356 # remove dl library from $SHLIB_LIST
21357 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21358
21359 fi
21360
21361 if test "$with_ticlib" != no ; then
21362
21363         if test "x$with_ticlib" != xyes ; then
21364                 TICS_NAME=$with_ticlib
21365                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21366                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21367                 TICS_LIB_SUFFIX="${with_ticlib}"
21368         else
21369                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21370                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21371                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21372         fi
21373         TICS_LDFLAGS="-L${LIB_DIR}"
21374         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21375 else
21376         TICS_LDFLAGS="-L${LIB_DIR}"
21377         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21378 fi
21379
21380 if test "$with_termlib" != no ; then
21381
21382         if test "x$with_termlib" != xyes ; then
21383                 TINFO_NAME=$with_termlib
21384                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21385                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21386                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21387                 TINFO_LIB_SUFFIX="${with_termlib}"
21388         else
21389                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21390                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21391                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21392                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21393         fi
21394
21395         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21396         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21397         if test "$DFT_LWR_MODEL" = "libtool"; then
21398                 TEST_ARGS="${TEST_DEPS}"
21399                 TEST_ARG2="${TEST_DEP2}"
21400                 TINFO_LDFLAGS="-L${LIB_DIR}"
21401                 TINFO_LIBS="$TEST_ARGS"
21402                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21403                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21404         else
21405                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21406                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21407                 if test "x$with_term_driver" != xno ; then
21408                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21409                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21410                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21411                 else
21412                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21413                         TINFO_LIBS="$TEST_ARGS"
21414                 fi
21415                 TINFO_LDFLAGS="-L${LIB_DIR}"
21416                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21417         fi
21418 else
21419         # the next lines are needed for linking libtic over libncurses
21420         TINFO_NAME=${LIB_NAME}
21421         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21422         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21423         if test "x$with_tic_depends" = xyes ; then
21424                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21425         else
21426                 TICS_LIST="$SHLIB_LIST"
21427         fi
21428
21429         TINFO_LDFLAGS="-L${LIB_DIR}"
21430         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21431 fi
21432
21433 if test "$DFT_LWR_MODEL" = shared ; then
21434         case $cf_cv_system_name in #(vi
21435         cygwin*|msys*)
21436                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21437                 TINFO_SUFFIX=.dll
21438                 ;;
21439         esac
21440 fi
21441
21442 if test "x$with_dlsym" = xyes ; then
21443
21444 # remove dl library from $TICS_LIST
21445 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21446
21447 fi
21448
21449 if test "$DFT_LWR_MODEL" = "libtool"; then
21450     OBJEXT=lo
21451 fi
21452
21453 # needed for Ada95
21454 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21455
21456 case $DFT_LWR_MODEL in
21457 normal|debug|profile)
21458
21459 if test "$GCC" = yes ; then
21460         case $cf_cv_system_name in #(
21461         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21462                 LDFLAGS_STATIC=
21463                 LDFLAGS_SHARED=
21464                 ;;
21465     *)  #( normally, except when broken
21466         LDFLAGS_STATIC=-static
21467         LDFLAGS_SHARED=-dynamic
21468         ;;
21469     esac
21470 else
21471         case $cf_cv_system_name in #(
21472         aix[4-7]*)      #( from ld manpage
21473                 LDFLAGS_STATIC=-bstatic
21474                 LDFLAGS_SHARED=-bdynamic
21475                 ;;
21476         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21477                 # We could also use just "archive" and "shared".
21478                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21479                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21480                 ;;
21481         irix*)          #( from ld manpage IRIX64
21482                 LDFLAGS_STATIC=-Bstatic
21483                 LDFLAGS_SHARED=-Bdynamic
21484                 ;;
21485         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21486                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21487                 LDFLAGS_STATIC=-noso
21488                 LDFLAGS_SHARED=-so_archive
21489                 ;;
21490         solaris2*)
21491                 LDFLAGS_STATIC=-Bstatic
21492                 LDFLAGS_SHARED=-Bdynamic
21493                 ;;
21494         esac
21495 fi
21496
21497 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21498 then
21499         echo "$as_me:21499: checking if linker supports switching between static/dynamic" >&5
21500 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21501
21502         rm -f libconftest.a
21503         cat >conftest.$ac_ext <<EOF
21504 #line 21504 "configure"
21505 #include <stdio.h>
21506 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21507 EOF
21508         if { (eval echo "$as_me:21508: \"$ac_compile\"") >&5
21509   (eval $ac_compile) 2>&5
21510   ac_status=$?
21511   echo "$as_me:21511: \$? = $ac_status" >&5
21512   (exit $ac_status); } ; then
21513                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21514                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21515         fi
21516         rm -f conftest.*
21517
21518         cf_save_LIBS="$LIBS"
21519
21520         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21521         cat >conftest.$ac_ext <<_ACEOF
21522 #line 21522 "configure"
21523 #include "confdefs.h"
21524
21525 #line 21525 "configure"
21526 #include <stdio.h>
21527 int cf_ldflags_static(FILE *fp);
21528
21529 int
21530 main ()
21531 {
21532
21533         return cf_ldflags_static(stdin);
21534
21535   ;
21536   return 0;
21537 }
21538 _ACEOF
21539 rm -f conftest.$ac_objext conftest$ac_exeext
21540 if { (eval echo "$as_me:21540: \"$ac_link\"") >&5
21541   (eval $ac_link) 2>&5
21542   ac_status=$?
21543   echo "$as_me:21543: \$? = $ac_status" >&5
21544   (exit $ac_status); } &&
21545          { ac_try='test -s conftest$ac_exeext'
21546   { (eval echo "$as_me:21546: \"$ac_try\"") >&5
21547   (eval $ac_try) 2>&5
21548   ac_status=$?
21549   echo "$as_me:21549: \$? = $ac_status" >&5
21550   (exit $ac_status); }; }; then
21551
21552         # some linkers simply ignore the -dynamic
21553         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21554         *static*) # (vi
21555                 cf_ldflags_static=no
21556                 ;;
21557         *)
21558                 cf_ldflags_static=yes
21559                 ;;
21560         esac
21561
21562 else
21563   echo "$as_me: failed program was:" >&5
21564 cat conftest.$ac_ext >&5
21565 cf_ldflags_static=no
21566 fi
21567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21568
21569         rm -f libconftest.*
21570         LIBS="$cf_save_LIBS"
21571
21572         echo "$as_me:21572: result: $cf_ldflags_static" >&5
21573 echo "${ECHO_T}$cf_ldflags_static" >&6
21574
21575         if test $cf_ldflags_static != yes
21576         then
21577                 LDFLAGS_STATIC=
21578                 LDFLAGS_SHARED=
21579         fi
21580 else
21581         LDFLAGS_STATIC=
21582         LDFLAGS_SHARED=
21583 fi
21584
21585         ;;
21586 esac
21587
21588 echo "$as_me:21588: checking where we will install curses.h" >&5
21589 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21590
21591 includesubdir=
21592 if test "$with_overwrite" = no && \
21593  ( test "x$includedir" = 'x${prefix}/include' || \
21594    test "x$includedir" = "x${prefix}/include" )
21595 then
21596         includesubdir="/ncurses${LIB_SUFFIX}"
21597 fi
21598 echo "$as_me:21598: result: ${includedir}${includesubdir}" >&5
21599 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21600
21601 ### Resolve a conflict between normal and wide-curses by forcing applications
21602 ### that will need libutf8 to add it to their configure script.
21603 if test "$with_overwrite" != no ; then
21604 if test "$NCURSES_LIBUTF8" = 1 ; then
21605         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21606         { echo "$as_me:21606: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21607 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21608 fi
21609 fi
21610 WITH_OVERWRITE=$with_overwrite
21611
21612 # used to separate tack out of the tree
21613 NCURSES_TREE=
21614
21615 ### predefined stuff for the test programs
21616
21617 cat >>confdefs.h <<\EOF
21618 #define HAVE_SLK_COLOR 1
21619 EOF
21620
21621 ### Construct the list of subdirectories for which we'll customize makefiles
21622 ### with the appropriate compile-rules.
21623
21624 echo "$as_me:21624: checking for src modules" >&5
21625 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21626
21627 # dependencies and linker-arguments for test-programs
21628 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21629 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21630 if test "$DFT_LWR_MODEL" = "libtool"; then
21631         TEST_ARGS="${TEST_DEPS}"
21632         TEST_ARG2="${TEST_DEP2}"
21633 else
21634         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21635         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21636 fi
21637
21638 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21639 cf_cv_src_modules=
21640 for cf_dir in $modules_to_build
21641 do
21642         if test -f $srcdir/$cf_dir/modules; then
21643
21644                 # We may/may not have tack in the distribution, though the
21645                 # makefile is.
21646                 if test $cf_dir = tack ; then
21647                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21648                                 continue
21649                         fi
21650                 fi
21651
21652                 if test -z "$cf_cv_src_modules"; then
21653                         cf_cv_src_modules=$cf_dir
21654                 else
21655                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21656                 fi
21657
21658                 # Make the ncurses_cfg.h file record the library interface files as
21659                 # well.  These are header files that are the same name as their
21660                 # directory.  Ncurses is the only library that does not follow
21661                 # that pattern.
21662                 if test $cf_dir = tack ; then
21663                         continue
21664                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21665
21666 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21667
21668                         cat >>confdefs.h <<EOF
21669 #define HAVE_${cf_have_include}_H 1
21670 EOF
21671
21672                         cat >>confdefs.h <<EOF
21673 #define HAVE_LIB${cf_have_include} 1
21674 EOF
21675
21676                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21677                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21678                         if test "$DFT_LWR_MODEL" = "libtool"; then
21679                                 TEST_ARGS="${TEST_DEPS}"
21680                                 TEST_ARG2="${TEST_DEP2}"
21681                         else
21682                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21683                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21684                         fi
21685                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21686                 fi
21687         fi
21688 done
21689 echo "$as_me:21689: result: $cf_cv_src_modules" >&5
21690 echo "${ECHO_T}$cf_cv_src_modules" >&6
21691
21692 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21693 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21694
21695 SRC_SUBDIRS=
21696 if test "x$cf_with_manpages" != xno ; then
21697         SRC_SUBDIRS="$SRC_SUBDIRS man"
21698 fi
21699 SRC_SUBDIRS="$SRC_SUBDIRS include"
21700 for cf_dir in $cf_cv_src_modules
21701 do
21702         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21703 done
21704 if test "x$cf_with_tests" != "xno" ; then
21705         SRC_SUBDIRS="$SRC_SUBDIRS test"
21706 fi
21707 # always make this, to install the ncurses-config script
21708 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21709 if test "$cf_with_cxx_binding" != no; then
21710         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21711         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21712 fi
21713
21714 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21715 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21716
21717 ADA_SUBDIRS=
21718 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21719         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21720         ADA_SUBDIRS="gen src"
21721         if test "x$cf_with_tests" != "xno" ; then
21722                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21723         fi
21724 fi
21725
21726 SUB_MAKEFILES=
21727 for cf_dir in $SRC_SUBDIRS
21728 do
21729         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21730 done
21731
21732 if test -n "$ADA_SUBDIRS"; then
21733         for cf_dir in $ADA_SUBDIRS
21734         do
21735                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21736         done
21737
21738 fi
21739
21740 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21741    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21742    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21743 fi
21744
21745 DIRS_TO_MAKE="lib"
21746 for cf_item in $cf_list_models
21747 do
21748
21749         case $cf_item in
21750         libtool) cf_subdir='obj_lo'  ;;
21751         normal)  cf_subdir='objects' ;;
21752         debug)   cf_subdir='obj_g' ;;
21753         profile) cf_subdir='obj_p' ;;
21754         shared)
21755                 case $cf_cv_system_name in #(vi
21756                 cygwin|msys) #(vi
21757                         cf_subdir='objects' ;;
21758                 *)
21759                         cf_subdir='obj_s' ;;
21760                 esac
21761         esac
21762
21763         for cf_item2 in $DIRS_TO_MAKE
21764         do
21765                 test $cf_item2 = $cf_subdir && break
21766         done
21767         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21768 done
21769 for cf_dir in $DIRS_TO_MAKE
21770 do
21771         test ! -d $cf_dir && mkdir $cf_dir
21772 done
21773
21774 # symbols that differ when compiling Ada95 by itself.
21775 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21776
21777 # values to use as strings
21778
21779 cat >>confdefs.h <<EOF
21780 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21781 EOF
21782
21783 cat >>confdefs.h <<EOF
21784 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21785 EOF
21786
21787 ### Now that we're done running tests, add the compiler-warnings, if any
21788
21789 cf_fix_cppflags=no
21790 cf_new_cflags=
21791 cf_new_cppflags=
21792 cf_new_extra_cppflags=
21793
21794 for cf_add_cflags in $EXTRA_CFLAGS
21795 do
21796 case $cf_fix_cppflags in
21797 no)
21798         case $cf_add_cflags in #(vi
21799         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21800                 case $cf_add_cflags in
21801                 -D*)
21802                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21803
21804                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21805                                 && test -z "${cf_tst_cflags}" \
21806                                 && cf_fix_cppflags=yes
21807
21808                         if test $cf_fix_cppflags = yes ; then
21809                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21810                                 continue
21811                         elif test "${cf_tst_cflags}" = "\"'" ; then
21812                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21813                                 continue
21814                         fi
21815                         ;;
21816                 esac
21817                 case "$CPPFLAGS" in
21818                 *$cf_add_cflags) #(vi
21819                         ;;
21820                 *) #(vi
21821                         case $cf_add_cflags in #(vi
21822                         -D*)
21823                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21824
21825 CPPFLAGS=`echo "$CPPFLAGS" | \
21826         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21827                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21828
21829                                 ;;
21830                         esac
21831                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21832                         ;;
21833                 esac
21834                 ;;
21835         *)
21836                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21837                 ;;
21838         esac
21839         ;;
21840 yes)
21841         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21842
21843         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21844
21845         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21846                 && test -z "${cf_tst_cflags}" \
21847                 && cf_fix_cppflags=no
21848         ;;
21849 esac
21850 done
21851
21852 if test -n "$cf_new_cflags" ; then
21853
21854         CFLAGS="$CFLAGS $cf_new_cflags"
21855 fi
21856
21857 if test -n "$cf_new_cppflags" ; then
21858
21859         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21860 fi
21861
21862 if test -n "$cf_new_extra_cppflags" ; then
21863
21864         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21865 fi
21866
21867 ### Define substitutions for header files to avoid name-pollution
21868
21869 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21870         HAVE_TCGETATTR=1
21871 else
21872         HAVE_TCGETATTR=0
21873 fi
21874
21875 if test "x$ac_cv_header_stdint_h" = xyes ; then
21876         HAVE_STDINT_H=1
21877 else
21878         HAVE_STDINT_H=0
21879 fi
21880
21881 if test "x$ac_cv_header_termio_h" = xyes ; then
21882         HAVE_TERMIO_H=1
21883 else
21884         HAVE_TERMIO_H=0
21885 fi
21886
21887 if test "x$ac_cv_header_termios_h" = xyes ; then
21888         HAVE_TERMIOS_H=1
21889 else
21890         HAVE_TERMIOS_H=0
21891 fi
21892
21893 ################################################################################
21894 test "x$use_database" = xyes && \
21895 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21896
21897 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21898 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21899
21900 if test "x$enable_pc_files" = xyes ; then \
21901 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21902 MAKE_PC_FILES=
21903 else
21904 MAKE_PC_FILES="#"
21905 fi
21906
21907 # Extract the first word of "tic", so it can be a program name with args.
21908 set dummy tic; ac_word=$2
21909 echo "$as_me:21909: checking for $ac_word" >&5
21910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21911 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21912   echo $ECHO_N "(cached) $ECHO_C" >&6
21913 else
21914   case $TIC_PATH in
21915   [\\/]* | ?:[\\/]*)
21916   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21917   ;;
21918   *)
21919   ac_save_IFS=$IFS; IFS=$ac_path_separator
21920 ac_dummy="$PATH:/usr/local/ncurses/bin"
21921 for ac_dir in $ac_dummy; do
21922   IFS=$ac_save_IFS
21923   test -z "$ac_dir" && ac_dir=.
21924   if $as_executable_p "$ac_dir/$ac_word"; then
21925    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21926    echo "$as_me:21926: found $ac_dir/$ac_word" >&5
21927    break
21928 fi
21929 done
21930
21931   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21932   ;;
21933 esac
21934 fi
21935 TIC_PATH=$ac_cv_path_TIC_PATH
21936
21937 if test -n "$TIC_PATH"; then
21938   echo "$as_me:21938: result: $TIC_PATH" >&5
21939 echo "${ECHO_T}$TIC_PATH" >&6
21940 else
21941   echo "$as_me:21941: result: no" >&5
21942 echo "${ECHO_T}no" >&6
21943 fi
21944
21945 if test -n "$FALLBACK_LIST"
21946 then
21947         if test "$TIC_PATH" = unknown
21948         then
21949                 { echo "$as_me:21949: WARNING: no tic program found for fallbacks" >&5
21950 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21951         fi
21952 fi
21953
21954 if test "x$cf_with_tests" != xno ; then
21955         MAKE_TESTS=
21956 else
21957         MAKE_TESTS="#"
21958 fi
21959
21960 ADAHTML_DIR=../../doc/html/ada
21961
21962 # these could be configurable, but are not currently
21963 PANEL_NAME=panel
21964 MENU_NAME=menu
21965 FORM_NAME=form
21966 CXX_NAME=ncurses++
21967
21968 # workaround for g++ versus Solaris (20131116)
21969 case $cf_cv_system_name in #(vi
21970 solaris2*) #(vi
21971         case "x$CPPFLAGS" in #(vi
21972         *-D_XOPEN_SOURCE_EXTENDED*)
21973                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21974
21975 echo "${as_me:-configure}:21975: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21976
21977                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21978                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21979                 ;;
21980         esac
21981         ;;
21982 esac
21983
21984 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21985 case "x$NCURSES_OSPEED" in #(vi
21986 *short*) #(vi
21987         cf_compatible=1
21988         ;;
21989 *)
21990         cf_compatible=0
21991         ;;
21992 esac
21993
21994 cat >>confdefs.h <<EOF
21995 #define NCURSES_OSPEED_COMPAT $cf_compatible
21996 EOF
21997
21998 case "x$cf_cv_typeof_chtype" in
21999 xshort|xint|xlong)
22000         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22001         ;;
22002 esac
22003
22004 case "x$cf_cv_typeof_mmask_t" in
22005 xshort|xint|xlong)
22006         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22007         ;;
22008 esac
22009
22010 # substitute into misc/Makefile to suppress
22011 # (un)install.data from the
22012 # (un)install rules.
22013 if test "x$cf_with_db_install" = "xno"; then
22014         MISC_INSTALL_DATA=
22015         MISC_UNINSTALL_DATA=
22016 else
22017         MISC_INSTALL_DATA=install.data
22018         MISC_UNINSTALL_DATA=uninstall.data
22019 fi
22020
22021 SUB_SCRIPTS=
22022
22023 if test -n "$PACKAGE"
22024 then
22025         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22026         export PACKAGE
22027         echo "package: $PACKAGE"
22028 fi
22029
22030 if test -n "$RESULTING_SYMS"
22031 then
22032         UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22033         case $cf_cv_abi_version in
22034         [6789])
22035                 test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22036
22037 echo "${as_me:-configure}:22037: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22038
22039                 RESULTING_SYMS=resulting.map
22040                 ;;
22041         *)
22042                 test -n "$verbose" && echo "    will map symbols to default ABI" 1>&6
22043
22044 echo "${as_me:-configure}:22044: testing will map symbols to default ABI ..." 1>&5
22045
22046                 ;;
22047         esac
22048 else
22049         UNALTERED_SYMS=
22050 fi
22051
22052 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"
22053 ac_config_commands="$ac_config_commands default"
22054 cat >confcache <<\_ACEOF
22055 # This file is a shell script that caches the results of configure
22056 # tests run on this system so they can be shared between configure
22057 # scripts and configure runs, see configure's option --config-cache.
22058 # It is not useful on other systems.  If it contains results you don't
22059 # want to keep, you may remove or edit it.
22060 #
22061 # config.status only pays attention to the cache file if you give it
22062 # the --recheck option to rerun configure.
22063 #
22064 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22065 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22066 # following values.
22067
22068 _ACEOF
22069
22070 # The following way of writing the cache mishandles newlines in values,
22071 # but we know of no workaround that is simple, portable, and efficient.
22072 # So, don't put newlines in cache variables' values.
22073 # Ultrix sh set writes to stderr and can't be redirected directly,
22074 # and sets the high bit in the cache file unless we assign to the vars.
22075 {
22076   (set) 2>&1 |
22077     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22078     *ac_space=\ *)
22079       # `set' does not quote correctly, so add quotes (double-quote
22080       # substitution turns \\\\ into \\, and sed turns \\ into \).
22081       sed -n \
22082         "s/'/'\\\\''/g;
22083           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22084       ;;
22085     *)
22086       # `set' quotes correctly as required by POSIX, so do not add quotes.
22087       sed -n \
22088         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22089       ;;
22090     esac;
22091 } |
22092   sed '
22093      t clear
22094      : clear
22095      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22096      t end
22097      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22098      : end' >>confcache
22099 if cmp -s $cache_file confcache; then :; else
22100   if test -w $cache_file; then
22101     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22102     cat confcache >$cache_file
22103   else
22104     echo "not updating unwritable cache $cache_file"
22105   fi
22106 fi
22107 rm -f confcache
22108
22109 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22110 # Let make expand exec_prefix.
22111 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22112
22113 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22114 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22115 # trailing colons and then remove the whole line if VPATH becomes empty
22116 # (actually we leave an empty line to preserve line numbers).
22117 if test "x$srcdir" = x.; then
22118   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22119 s/:*\$(srcdir):*/:/;
22120 s/:*\${srcdir}:*/:/;
22121 s/:*@srcdir@:*/:/;
22122 s/^\([^=]*=[    ]*\):*/\1/;
22123 s/:*$//;
22124 s/^[^=]*=[      ]*$//;
22125 }'
22126 fi
22127
22128 DEFS=-DHAVE_CONFIG_H
22129
22130 : ${CONFIG_STATUS=./config.status}
22131 ac_clean_files_save=$ac_clean_files
22132 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22133 { echo "$as_me:22133: creating $CONFIG_STATUS" >&5
22134 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22135 cat >$CONFIG_STATUS <<_ACEOF
22136 #! $SHELL
22137 # Generated automatically by configure.
22138 # Run this file to recreate the current configuration.
22139 # Compiler output produced by configure, useful for debugging
22140 # configure, is in config.log if it exists.
22141
22142 debug=false
22143 SHELL=\${CONFIG_SHELL-$SHELL}
22144 ac_cs_invocation="\$0 \$@"
22145
22146 _ACEOF
22147
22148 cat >>$CONFIG_STATUS <<\_ACEOF
22149 # Be Bourne compatible
22150 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22151   emulate sh
22152   NULLCMD=:
22153 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22154   set -o posix
22155 fi
22156
22157 # Name of the executable.
22158 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22159
22160 if expr a : '\(a\)' >/dev/null 2>&1; then
22161   as_expr=expr
22162 else
22163   as_expr=false
22164 fi
22165
22166 rm -f conf$$ conf$$.exe conf$$.file
22167 echo >conf$$.file
22168 if ln -s conf$$.file conf$$ 2>/dev/null; then
22169   # We could just check for DJGPP; but this test a) works b) is more generic
22170   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22171   if test -f conf$$.exe; then
22172     # Don't use ln at all; we don't have any links
22173     as_ln_s='cp -p'
22174   else
22175     as_ln_s='ln -s'
22176   fi
22177 elif ln conf$$.file conf$$ 2>/dev/null; then
22178   as_ln_s=ln
22179 else
22180   as_ln_s='cp -p'
22181 fi
22182 rm -f conf$$ conf$$.exe conf$$.file
22183
22184 as_executable_p="test -f"
22185
22186 # Support unset when possible.
22187 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22188   as_unset=unset
22189 else
22190   as_unset=false
22191 fi
22192
22193 # NLS nuisances.
22194 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22195 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22196 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22197 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22198 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22199 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22200 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22201 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22202
22203 # IFS
22204 # We need space, tab and new line, in precisely that order.
22205 as_nl='
22206 '
22207 IFS="   $as_nl"
22208
22209 # CDPATH.
22210 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22211
22212 exec 6>&1
22213
22214 _ACEOF
22215
22216 # Files that config.status was made for.
22217 if test -n "$ac_config_files"; then
22218   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22219 fi
22220
22221 if test -n "$ac_config_headers"; then
22222   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22223 fi
22224
22225 if test -n "$ac_config_links"; then
22226   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22227 fi
22228
22229 if test -n "$ac_config_commands"; then
22230   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22231 fi
22232
22233 cat >>$CONFIG_STATUS <<\EOF
22234
22235 ac_cs_usage="\
22236 \`$as_me' instantiates files from templates according to the
22237 current configuration.
22238
22239 Usage: $0 [OPTIONS] [FILE]...
22240
22241   -h, --help       print this help, then exit
22242   -V, --version    print version number, then exit
22243   -d, --debug      don't remove temporary files
22244       --recheck    update $as_me by reconfiguring in the same conditions
22245   --file=FILE[:TEMPLATE]
22246                    instantiate the configuration file FILE
22247   --header=FILE[:TEMPLATE]
22248                    instantiate the configuration header FILE
22249
22250 Configuration files:
22251 $config_files
22252
22253 Configuration headers:
22254 $config_headers
22255
22256 Configuration commands:
22257 $config_commands
22258
22259 Report bugs to <dickey@invisible-island.net>."
22260 EOF
22261
22262 cat >>$CONFIG_STATUS <<EOF
22263 ac_cs_version="\\
22264 config.status
22265 configured by $0, generated by GNU Autoconf 2.52.20141204,
22266   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22267
22268 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22269 Free Software Foundation, Inc.
22270 This config.status script is free software; the Free Software Foundation
22271 gives unlimited permission to copy, distribute and modify it."
22272 srcdir=$srcdir
22273 INSTALL="$INSTALL"
22274 EOF
22275
22276 cat >>$CONFIG_STATUS <<\EOF
22277 # If no file are specified by the user, then we need to provide default
22278 # value.  By we need to know if files were specified by the user.
22279 ac_need_defaults=:
22280 while test $# != 0
22281 do
22282   case $1 in
22283   --*=*)
22284     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22285     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22286     shift
22287     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22288     shift
22289     ;;
22290   -*);;
22291   *) # This is not an option, so the user has probably given explicit
22292      # arguments.
22293      ac_need_defaults=false;;
22294   esac
22295
22296   case $1 in
22297   # Handling of the options.
22298 EOF
22299 cat >>$CONFIG_STATUS <<EOF
22300   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22301     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22302     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22303 EOF
22304 cat >>$CONFIG_STATUS <<\EOF
22305   --version | --vers* | -V )
22306     echo "$ac_cs_version"; exit 0 ;;
22307   --he | --h)
22308     # Conflict between --help and --header
22309     { { echo "$as_me:22309: error: ambiguous option: $1
22310 Try \`$0 --help' for more information." >&5
22311 echo "$as_me: error: ambiguous option: $1
22312 Try \`$0 --help' for more information." >&2;}
22313    { (exit 1); exit 1; }; };;
22314   --help | --hel | -h )
22315     echo "$ac_cs_usage"; exit 0 ;;
22316   --debug | --d* | -d )
22317     debug=: ;;
22318   --file | --fil | --fi | --f )
22319     shift
22320     CONFIG_FILES="$CONFIG_FILES $1"
22321     ac_need_defaults=false;;
22322   --header | --heade | --head | --hea )
22323     shift
22324     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22325     ac_need_defaults=false;;
22326
22327   # This is an error.
22328   -*) { { echo "$as_me:22328: error: unrecognized option: $1
22329 Try \`$0 --help' for more information." >&5
22330 echo "$as_me: error: unrecognized option: $1
22331 Try \`$0 --help' for more information." >&2;}
22332    { (exit 1); exit 1; }; } ;;
22333
22334   *) ac_config_targets="$ac_config_targets $1" ;;
22335
22336   esac
22337   shift
22338 done
22339
22340 exec 5>>config.log
22341 cat >&5 << _ACEOF
22342
22343 ## ----------------------- ##
22344 ## Running config.status.  ##
22345 ## ----------------------- ##
22346
22347 This file was extended by $as_me 2.52.20141204, executed with
22348   CONFIG_FILES    = $CONFIG_FILES
22349   CONFIG_HEADERS  = $CONFIG_HEADERS
22350   CONFIG_LINKS    = $CONFIG_LINKS
22351   CONFIG_COMMANDS = $CONFIG_COMMANDS
22352   > $ac_cs_invocation
22353 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22354
22355 _ACEOF
22356 EOF
22357
22358 cat >>$CONFIG_STATUS <<EOF
22359 #
22360 # INIT-COMMANDS section.
22361 #
22362
22363 ### Special initialization commands, used to pass information from the
22364 ### configuration-run into config.status
22365
22366 AWK="$AWK"
22367 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22368 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22369 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22370 ECHO_LD="$ECHO_LD"
22371 LDCONFIG="$LDCONFIG"
22372 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22373 LIB_NAME="$LIB_NAME"
22374 LIB_PREFIX="$LIB_PREFIX"
22375 LIB_SUBSETS="$LIB_SUBSETS"
22376 LIB_SUFFIX="$LIB_SUFFIX"
22377 LIB_TRACING="$LIB_TRACING"
22378 LN_S="$LN_S"
22379 MAKE_TERMINFO="$MAKE_TERMINFO"
22380 NCURSES_MAJOR="$NCURSES_MAJOR"
22381 NCURSES_MINOR="$NCURSES_MINOR"
22382 NCURSES_OSPEED="$NCURSES_OSPEED"
22383 NCURSES_PATCH="$NCURSES_PATCH"
22384 SRC_SUBDIRS="$SRC_SUBDIRS"
22385 TERMINFO="$TERMINFO"
22386 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22387 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22388 TICS_NAME="$TICS_NAME"
22389 TIC_PATH="$TIC_PATH"
22390 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22391 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22392 TINFO_NAME="$TINFO_NAME"
22393 TINFO_SUFFIX="$TINFO_SUFFIX"
22394 UNALTERED_SYMS="$UNALTERED_SYMS"
22395 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22396 WITH_CURSES_H="$with_curses_h"
22397 WITH_ECHO="${enable_echo:=yes}"
22398 WITH_OVERWRITE="$with_overwrite"
22399 cf_LIST_MODELS="$cf_list_models"
22400 cf_cv_abi_version="$cf_cv_abi_version"
22401 cf_cv_do_relink="$cf_cv_do_relink"
22402 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22403 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22404 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22405 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22406 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22407 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22408 cf_cv_rel_version="$cf_cv_rel_version"
22409 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22410 cf_cv_shared_soname='$cf_cv_shared_soname'
22411 cf_cv_shlib_version="$cf_cv_shlib_version"
22412 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22413 cf_cv_system_name="$cf_cv_system_name"
22414 cf_cv_term_driver="$with_term_driver"
22415 cf_with_ada="$cf_with_ada"
22416 cf_with_cxx_binding="$cf_with_cxx_binding"
22417 cf_with_db_install="$cf_with_db_install"
22418 cf_with_manpages="$cf_with_manpages"
22419 cf_with_tests="$cf_with_tests"
22420 host="$host"
22421 target="$target"
22422 with_shared_cxx="$with_shared_cxx"
22423
22424 EOF
22425
22426 cat >>$CONFIG_STATUS <<\EOF
22427 for ac_config_target in $ac_config_targets
22428 do
22429   case "$ac_config_target" in
22430   # Handling of arguments.
22431   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22432   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22433   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22434   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22435   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22436   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22437   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22438   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22439   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22440   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22441   *) { { echo "$as_me:22441: error: invalid argument: $ac_config_target" >&5
22442 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22443    { (exit 1); exit 1; }; };;
22444   esac
22445 done
22446
22447 # If the user did not use the arguments to specify the items to instantiate,
22448 # then the envvar interface is used.  Set only those that are not.
22449 # We use the long form for the default assignment because of an extremely
22450 # bizarre bug on SunOS 4.1.3.
22451 if $ac_need_defaults; then
22452   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22453   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22454   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22455 fi
22456
22457 # Create a temporary directory, and hook for its removal unless debugging.
22458 $debug ||
22459 {
22460   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22461   trap '{ (exit 1); exit 1; }' 1 2 13 15
22462 }
22463
22464 # Create a (secure) tmp directory for tmp files.
22465 : ${TMPDIR=/tmp}
22466 {
22467   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22468   test -n "$tmp" && test -d "$tmp"
22469 }  ||
22470 {
22471   tmp=$TMPDIR/cs$$-$RANDOM
22472   (umask 077 && mkdir $tmp)
22473 } ||
22474 {
22475    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22476    { (exit 1); exit 1; }
22477 }
22478
22479 EOF
22480
22481 cat >>$CONFIG_STATUS <<EOF
22482
22483 #
22484 # CONFIG_FILES section.
22485 #
22486
22487 # No need to generate the scripts if there are no CONFIG_FILES.
22488 # This happens for instance when ./config.status config.h
22489 if test -n "\$CONFIG_FILES"; then
22490   # Protect against being on the right side of a sed subst in config.status.
22491   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22492    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22493 s,@SHELL@,$SHELL,;t t
22494 s,@exec_prefix@,$exec_prefix,;t t
22495 s,@prefix@,$prefix,;t t
22496 s,@program_transform_name@,$program_transform_name,;t t
22497 s,@bindir@,$bindir,;t t
22498 s,@sbindir@,$sbindir,;t t
22499 s,@libexecdir@,$libexecdir,;t t
22500 s,@datarootdir@,$datarootdir,;t t
22501 s,@datadir@,$datadir,;t t
22502 s,@sysconfdir@,$sysconfdir,;t t
22503 s,@sharedstatedir@,$sharedstatedir,;t t
22504 s,@localstatedir@,$localstatedir,;t t
22505 s,@libdir@,$libdir,;t t
22506 s,@includedir@,$includedir,;t t
22507 s,@oldincludedir@,$oldincludedir,;t t
22508 s,@infodir@,$infodir,;t t
22509 s,@mandir@,$mandir,;t t
22510 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22511 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22512 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22513 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22514 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22515 s,@build_alias@,$build_alias,;t t
22516 s,@host_alias@,$host_alias,;t t
22517 s,@target_alias@,$target_alias,;t t
22518 s,@ECHO_C@,$ECHO_C,;t t
22519 s,@ECHO_N@,$ECHO_N,;t t
22520 s,@ECHO_T@,$ECHO_T,;t t
22521 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22522 s,@DEFS@,$DEFS,;t t
22523 s,@LIBS@,$LIBS,;t t
22524 s,@top_builddir@,$top_builddir,;t t
22525 s,@EGREP@,$EGREP,;t t
22526 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22527 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22528 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22529 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22530 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22531 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22532 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22533 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22534 s,@VERSION@,$VERSION,;t t
22535 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22536 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22537 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22538 s,@PACKAGE@,$PACKAGE,;t t
22539 s,@build@,$build,;t t
22540 s,@build_cpu@,$build_cpu,;t t
22541 s,@build_vendor@,$build_vendor,;t t
22542 s,@build_os@,$build_os,;t t
22543 s,@host@,$host,;t t
22544 s,@host_cpu@,$host_cpu,;t t
22545 s,@host_vendor@,$host_vendor,;t t
22546 s,@host_os@,$host_os,;t t
22547 s,@target@,$target,;t t
22548 s,@target_cpu@,$target_cpu,;t t
22549 s,@target_vendor@,$target_vendor,;t t
22550 s,@target_os@,$target_os,;t t
22551 s,@CC@,$CC,;t t
22552 s,@CFLAGS@,$CFLAGS,;t t
22553 s,@LDFLAGS@,$LDFLAGS,;t t
22554 s,@CPPFLAGS@,$CPPFLAGS,;t t
22555 s,@ac_ct_CC@,$ac_ct_CC,;t t
22556 s,@EXEEXT@,$EXEEXT,;t t
22557 s,@OBJEXT@,$OBJEXT,;t t
22558 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22559 s,@CPP@,$CPP,;t t
22560 s,@LDCONFIG@,$LDCONFIG,;t t
22561 s,@CXX@,$CXX,;t t
22562 s,@CXXFLAGS@,$CXXFLAGS,;t t
22563 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22564 s,@AWK@,$AWK,;t t
22565 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22566 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22567 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22568 s,@LINT@,$LINT,;t t
22569 s,@LINT_OPTS@,$LINT_OPTS,;t t
22570 s,@LN_S@,$LN_S,;t t
22571 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22572 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22573 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22574 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22575 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22576 s,@SET_MAKE@,$SET_MAKE,;t t
22577 s,@CTAGS@,$CTAGS,;t t
22578 s,@ETAGS@,$ETAGS,;t t
22579 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22580 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22581 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22582 s,@RANLIB@,$RANLIB,;t t
22583 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22584 s,@LD@,$LD,;t t
22585 s,@ac_ct_LD@,$ac_ct_LD,;t t
22586 s,@AR@,$AR,;t t
22587 s,@ac_ct_AR@,$ac_ct_AR,;t t
22588 s,@NM@,$NM,;t t
22589 s,@ac_ct_NM@,$ac_ct_NM,;t t
22590 s,@ARFLAGS@,$ARFLAGS,;t t
22591 s,@DESTDIR@,$DESTDIR,;t t
22592 s,@BUILD_CC@,$BUILD_CC,;t t
22593 s,@BUILD_CPP@,$BUILD_CPP,;t t
22594 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22595 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22596 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22597 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22598 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22599 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22600 s,@cf_list_models@,$cf_list_models,;t t
22601 s,@ABI_VERSION@,$ABI_VERSION,;t t
22602 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22603 s,@LIBTOOL@,$LIBTOOL,;t t
22604 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22605 s,@LT_UNDEF@,$LT_UNDEF,;t t
22606 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22607 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22608 s,@LIB_CREATE@,$LIB_CREATE,;t t
22609 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22610 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22611 s,@LIB_PREP@,$LIB_PREP,;t t
22612 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22613 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22614 s,@LIB_LINK@,$LIB_LINK,;t t
22615 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22616 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22617 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22618 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22619 s,@TICS_NAME@,$TICS_NAME,;t t
22620 s,@TINFO_NAME@,$TINFO_NAME,;t t
22621 s,@LIB_NAME@,$LIB_NAME,;t t
22622 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22623 s,@CC_G_OPT@,$CC_G_OPT,;t t
22624 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22625 s,@LD_MODEL@,$LD_MODEL,;t t
22626 s,@shlibdir@,$shlibdir,;t t
22627 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22628 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22629 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22630 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22631 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22632 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22633 s,@LINK_PROGS@,$LINK_PROGS,;t t
22634 s,@LINK_TESTS@,$LINK_TESTS,;t t
22635 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22636 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22637 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22638 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22639 s,@RPATH_LIST@,$RPATH_LIST,;t t
22640 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22641 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22642 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22643 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22644 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22645 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22646 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22647 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22648 s,@XTERM_KBS@,$XTERM_KBS,;t t
22649 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22650 s,@TERMINFO@,$TERMINFO,;t t
22651 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22652 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22653 s,@TERMPATH@,$TERMPATH,;t t
22654 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22655 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22656 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22657 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22658 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22659 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22660 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22661 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22662 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22663 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22664 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22665 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22666 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22667 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22668 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22669 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22670 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22671 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22672 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22673 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22674 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22675 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22676 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22677 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22678 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22679 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22680 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22681 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22682 s,@PTHREAD@,$PTHREAD,;t t
22683 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22684 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22685 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22686 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22687 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22688 s,@ECHO_LT@,$ECHO_LT,;t t
22689 s,@ECHO_LD@,$ECHO_LD,;t t
22690 s,@RULE_CC@,$RULE_CC,;t t
22691 s,@SHOW_CC@,$SHOW_CC,;t t
22692 s,@ECHO_CC@,$ECHO_CC,;t t
22693 s,@ECHO_LINK@,$ECHO_LINK,;t t
22694 s,@ADAFLAGS@,$ADAFLAGS,;t t
22695 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22696 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22697 s,@ADA_TRACE@,$ADA_TRACE,;t t
22698 s,@MATH_LIB@,$MATH_LIB,;t t
22699 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22700 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22701 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22702 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22703 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22704 s,@TEST_LIBS@,$TEST_LIBS,;t t
22705 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22706 s,@CXXCPP@,$CXXCPP,;t t
22707 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22708 s,@CXX_AR@,$CXX_AR,;t t
22709 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22710 s,@CXXLIBS@,$CXXLIBS,;t t
22711 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22712 s,@gnat_exists@,$gnat_exists,;t t
22713 s,@M4_exists@,$M4_exists,;t t
22714 s,@cf_ada_make@,$cf_ada_make,;t t
22715 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22716 s,@cf_compile_generics@,$cf_compile_generics,;t t
22717 s,@cf_generic_objects@,$cf_generic_objects,;t t
22718 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22719 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22720 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22721 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22722 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22723 s,@cf_ada_package@,$cf_ada_package,;t t
22724 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22725 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22726 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22727 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22728 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22729 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22730 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22731 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22732 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22733 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22734 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22735 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22736 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22737 s,@TICS_LIBS@,$TICS_LIBS,;t t
22738 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22739 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22740 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22741 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22742 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22743 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22744 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22745 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22746 s,@includesubdir@,$includesubdir,;t t
22747 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22748 s,@TICS_LIST@,$TICS_LIST,;t t
22749 s,@TINFO_LIST@,$TINFO_LIST,;t t
22750 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22751 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22752 s,@TEST_ARGS@,$TEST_ARGS,;t t
22753 s,@TEST_DEPS@,$TEST_DEPS,;t t
22754 s,@TEST_ARG2@,$TEST_ARG2,;t t
22755 s,@TEST_DEP2@,$TEST_DEP2,;t t
22756 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22757 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22758 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22759 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22760 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22761 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22762 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22763 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22764 s,@cross_compiling@,$cross_compiling,;t t
22765 s,@TIC_PATH@,$TIC_PATH,;t t
22766 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22767 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22768 s,@PANEL_NAME@,$PANEL_NAME,;t t
22769 s,@MENU_NAME@,$MENU_NAME,;t t
22770 s,@FORM_NAME@,$FORM_NAME,;t t
22771 s,@CXX_NAME@,$CXX_NAME,;t t
22772 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22773 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22774 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
22775 CEOF
22776
22777 EOF
22778
22779   cat >>$CONFIG_STATUS <<\EOF
22780   # Split the substitutions into bite-sized pieces for seds with
22781   # small command number limits, like on Digital OSF/1 and HP-UX.
22782   ac_max_sed_lines=48
22783   ac_sed_frag=1 # Number of current file.
22784   ac_beg=1 # First line for current file.
22785   ac_end=$ac_max_sed_lines # Line after last line for current file.
22786   ac_more_lines=:
22787   ac_sed_cmds=
22788   while $ac_more_lines; do
22789     if test $ac_beg -gt 1; then
22790       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22791     else
22792       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22793     fi
22794     if test ! -s $tmp/subs.frag; then
22795       ac_more_lines=false
22796     else
22797       # The purpose of the label and of the branching condition is to
22798       # speed up the sed processing (if there are no `@' at all, there
22799       # is no need to browse any of the substitutions).
22800       # These are the two extra sed commands mentioned above.
22801       (echo ':t
22802   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22803       if test -z "$ac_sed_cmds"; then
22804         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22805       else
22806         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22807       fi
22808       ac_sed_frag=`expr $ac_sed_frag + 1`
22809       ac_beg=$ac_end
22810       ac_end=`expr $ac_end + $ac_max_sed_lines`
22811     fi
22812   done
22813   if test -z "$ac_sed_cmds"; then
22814     ac_sed_cmds=cat
22815   fi
22816 fi # test -n "$CONFIG_FILES"
22817
22818 EOF
22819 cat >>$CONFIG_STATUS <<\EOF
22820 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22821   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22822   case $ac_file in
22823   - | *:- | *:-:* ) # input from stdin
22824         cat >$tmp/stdin
22825         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22826         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22827   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22828         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22829   * )   ac_file_in=$ac_file.in ;;
22830   esac
22831
22832   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22833   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22834          X"$ac_file" : 'X\(//\)[^/]' \| \
22835          X"$ac_file" : 'X\(//\)$' \| \
22836          X"$ac_file" : 'X\(/\)' \| \
22837          .     : '\(.\)' 2>/dev/null ||
22838 echo X"$ac_file" |
22839     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22840           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22841           /^X\(\/\/\)$/{ s//\1/; q; }
22842           /^X\(\/\).*/{ s//\1/; q; }
22843           s/.*/./; q'`
22844   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22845     { case "$ac_dir" in
22846   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22847   *)                      as_incr_dir=.;;
22848 esac
22849 as_dummy="$ac_dir"
22850 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22851   case $as_mkdir_dir in
22852     # Skip DOS drivespec
22853     ?:) as_incr_dir=$as_mkdir_dir ;;
22854     *)
22855       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22856       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22857     ;;
22858   esac
22859 done; }
22860
22861     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22862     # A "../" for each directory in $ac_dir_suffix.
22863     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22864   else
22865     ac_dir_suffix= ac_dots=
22866   fi
22867
22868   case $srcdir in
22869   .)  ac_srcdir=.
22870       if test -z "$ac_dots"; then
22871          ac_top_srcdir=.
22872       else
22873          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22874       fi ;;
22875   [\\/]* | ?:[\\/]* )
22876       ac_srcdir=$srcdir$ac_dir_suffix;
22877       ac_top_srcdir=$srcdir ;;
22878   *) # Relative path.
22879     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22880     ac_top_srcdir=$ac_dots$srcdir ;;
22881   esac
22882
22883   case $INSTALL in
22884   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22885   *) ac_INSTALL=$ac_dots$INSTALL ;;
22886   esac
22887
22888   if test x"$ac_file" != x-; then
22889     { echo "$as_me:22889: creating $ac_file" >&5
22890 echo "$as_me: creating $ac_file" >&6;}
22891     rm -f "$ac_file"
22892   fi
22893   # Let's still pretend it is `configure' which instantiates (i.e., don't
22894   # use $as_me), people would be surprised to read:
22895   #    /* config.h.  Generated automatically by config.status.  */
22896   configure_input="Generated automatically from `echo $ac_file_in |
22897                                                  sed 's,.*/,,'` by configure."
22898
22899   # First look for the input files in the build tree, otherwise in the
22900   # src tree.
22901   ac_file_inputs=`IFS=:
22902     for f in $ac_file_in; do
22903       case $f in
22904       -) echo $tmp/stdin ;;
22905       [\\/$]*)
22906          # Absolute (can't be DOS-style, as IFS=:)
22907          test -f "$f" || { { echo "$as_me:22907: error: cannot find input file: $f" >&5
22908 echo "$as_me: error: cannot find input file: $f" >&2;}
22909    { (exit 1); exit 1; }; }
22910          echo $f;;
22911       *) # Relative
22912          if test -f "$f"; then
22913            # Build tree
22914            echo $f
22915          elif test -f "$srcdir/$f"; then
22916            # Source tree
22917            echo $srcdir/$f
22918          else
22919            # /dev/null tree
22920            { { echo "$as_me:22920: error: cannot find input file: $f" >&5
22921 echo "$as_me: error: cannot find input file: $f" >&2;}
22922    { (exit 1); exit 1; }; }
22923          fi;;
22924       esac
22925     done` || { (exit 1); exit 1; }
22926 EOF
22927 cat >>$CONFIG_STATUS <<\EOF
22928   ac_warn_datarootdir=no
22929   if test x"$ac_file" != x-; then
22930     for ac_item in $ac_file_inputs
22931     do
22932       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22933       if test -n "$ac_seen"; then
22934         ac_used=`grep '@datarootdir@' $ac_item`
22935         if test -z "$ac_used"; then
22936           { echo "$as_me:22936: WARNING: datarootdir was used implicitly but not set:
22937 $ac_seen" >&5
22938 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22939 $ac_seen" >&2;}
22940           ac_warn_datarootdir=yes
22941         fi
22942       fi
22943       ac_seen=`grep '${datarootdir}' $ac_item`
22944       if test -n "$ac_seen"; then
22945         { echo "$as_me:22945: WARNING: datarootdir was used explicitly but not set:
22946 $ac_seen" >&5
22947 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22948 $ac_seen" >&2;}
22949         ac_warn_datarootdir=yes
22950       fi
22951     done
22952   fi
22953
22954 if test "x$ac_warn_datarootdir" = xyes; then
22955   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22956 fi
22957
22958 EOF
22959 cat >>$CONFIG_STATUS <<EOF
22960   sed "$ac_vpsub
22961 $extrasub
22962 EOF
22963 cat >>$CONFIG_STATUS <<\EOF
22964 :t
22965 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22966 s,@configure_input@,$configure_input,;t t
22967 s,@srcdir@,$ac_srcdir,;t t
22968 s,@top_srcdir@,$ac_top_srcdir,;t t
22969 s,@INSTALL@,$ac_INSTALL,;t t
22970 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22971   rm -f $tmp/stdin
22972   if test x"$ac_file" != x-; then
22973     cp $tmp/out $ac_file
22974
22975     for ac_name in prefix exec_prefix datarootdir
22976     do
22977         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22978         if test -n "$ac_seen"; then
22979             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22980             if test -z "$ac_init"; then
22981               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22982               { echo "$as_me:22982: WARNING: Variable $ac_name is used but was not set:
22983 $ac_seen" >&5
22984 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22985 $ac_seen" >&2;}
22986             fi
22987         fi
22988     done
22989     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22990     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22991     if test -s $tmp/out; then
22992       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22993       { echo "$as_me:22993: WARNING: Some variables may not be substituted:
22994 $ac_seen" >&5
22995 echo "$as_me: WARNING: Some variables may not be substituted:
22996 $ac_seen" >&2;}
22997     fi
22998   else
22999     cat $tmp/out
23000   fi
23001   rm -f $tmp/out
23002
23003 done
23004 EOF
23005 cat >>$CONFIG_STATUS <<\EOF
23006
23007 #
23008 # CONFIG_HEADER section.
23009 #
23010
23011 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23012 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23013 #
23014 # ac_d sets the value in "#define NAME VALUE" lines.
23015 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23016 ac_dB='[        ].*$,\1#\2'
23017 ac_dC=' '
23018 ac_dD=',;t'
23019 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23020 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23021 ac_iB='\([      ]\),\1#\2define\3'
23022 ac_iC=' '
23023 ac_iD='\4,;t'
23024 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23025 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23026 ac_uB='$,\1#\2define\3'
23027 ac_uC=' '
23028 ac_uD=',;t'
23029
23030 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23031   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23032   case $ac_file in
23033   - | *:- | *:-:* ) # input from stdin
23034         cat >$tmp/stdin
23035         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23036         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23037   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23038         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23039   * )   ac_file_in=$ac_file.in ;;
23040   esac
23041
23042   test x"$ac_file" != x- && { echo "$as_me:23042: creating $ac_file" >&5
23043 echo "$as_me: creating $ac_file" >&6;}
23044
23045   # First look for the input files in the build tree, otherwise in the
23046   # src tree.
23047   ac_file_inputs=`IFS=:
23048     for f in $ac_file_in; do
23049       case $f in
23050       -) echo $tmp/stdin ;;
23051       [\\/$]*)
23052          # Absolute (can't be DOS-style, as IFS=:)
23053          test -f "$f" || { { echo "$as_me:23053: error: cannot find input file: $f" >&5
23054 echo "$as_me: error: cannot find input file: $f" >&2;}
23055    { (exit 1); exit 1; }; }
23056          echo $f;;
23057       *) # Relative
23058          if test -f "$f"; then
23059            # Build tree
23060            echo $f
23061          elif test -f "$srcdir/$f"; then
23062            # Source tree
23063            echo $srcdir/$f
23064          else
23065            # /dev/null tree
23066            { { echo "$as_me:23066: error: cannot find input file: $f" >&5
23067 echo "$as_me: error: cannot find input file: $f" >&2;}
23068    { (exit 1); exit 1; }; }
23069          fi;;
23070       esac
23071     done` || { (exit 1); exit 1; }
23072   # Remove the trailing spaces.
23073   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23074
23075 EOF
23076
23077 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23078 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23079 # be either 'cat' or 'sort'.
23080 cat confdefs.h | uniq >conftest.vals
23081
23082 # Break up conftest.vals because some shells have a limit on
23083 # the size of here documents, and old seds have small limits too.
23084
23085 rm -f conftest.tail
23086 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23087 while grep . conftest.vals >/dev/null
23088 do
23089   # Write chunks of a limited-size here document to conftest.frag.
23090   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23091   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23092   echo 'CEOF' >> $CONFIG_STATUS
23093   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23094   rm -f conftest.vals
23095   mv conftest.tail conftest.vals
23096 done
23097 rm -f conftest.vals
23098
23099 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23100 # marker @DEFS@.
23101 echo '  cat >> conftest.edit <<CEOF
23102 /@DEFS@/r conftest.frag
23103 /@DEFS@/d
23104 CEOF
23105 sed -f conftest.edit $tmp/in > $tmp/out
23106 rm -f $tmp/in
23107 mv $tmp/out $tmp/in
23108 rm -f conftest.edit conftest.frag
23109 ' >> $CONFIG_STATUS
23110
23111 cat >>$CONFIG_STATUS <<\EOF
23112   # Let's still pretend it is `configure' which instantiates (i.e., don't
23113   # use $as_me), people would be surprised to read:
23114   #    /* config.h.  Generated automatically by config.status.  */
23115   if test x"$ac_file" = x-; then
23116     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23117   else
23118     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23119   fi
23120   cat $tmp/in >>$tmp/config.h
23121   rm -f $tmp/in
23122   if test x"$ac_file" != x-; then
23123     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23124       { echo "$as_me:23124: $ac_file is unchanged" >&5
23125 echo "$as_me: $ac_file is unchanged" >&6;}
23126     else
23127       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23128          X"$ac_file" : 'X\(//\)[^/]' \| \
23129          X"$ac_file" : 'X\(//\)$' \| \
23130          X"$ac_file" : 'X\(/\)' \| \
23131          .     : '\(.\)' 2>/dev/null ||
23132 echo X"$ac_file" |
23133     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23134           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23135           /^X\(\/\/\)$/{ s//\1/; q; }
23136           /^X\(\/\).*/{ s//\1/; q; }
23137           s/.*/./; q'`
23138       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23139         { case "$ac_dir" in
23140   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23141   *)                      as_incr_dir=.;;
23142 esac
23143 as_dummy="$ac_dir"
23144 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23145   case $as_mkdir_dir in
23146     # Skip DOS drivespec
23147     ?:) as_incr_dir=$as_mkdir_dir ;;
23148     *)
23149       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23150       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23151     ;;
23152   esac
23153 done; }
23154
23155       fi
23156       rm -f $ac_file
23157       mv $tmp/config.h $ac_file
23158     fi
23159   else
23160     cat $tmp/config.h
23161     rm -f $tmp/config.h
23162   fi
23163 done
23164 EOF
23165 cat >>$CONFIG_STATUS <<\EOF
23166 #
23167 # CONFIG_COMMANDS section.
23168 #
23169 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23170   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23171   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23172
23173   case $ac_dest in
23174     default )
23175 if test "x$cf_with_tests" != xno ; then
23176
23177 for cf_dir in test
23178 do
23179         if test ! -d $srcdir/$cf_dir; then
23180                 continue
23181         elif test -f $srcdir/$cf_dir/programs; then
23182                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23183         fi
23184 done
23185
23186 fi
23187
23188 cf_prefix=$LIB_PREFIX
23189
23190 case $cf_cv_shlib_version in #(vi
23191 cygdll|msysdll|mingw)
23192         TINFO_NAME=$TINFO_ARG_SUFFIX
23193         TINFO_SUFFIX=.dll
23194         ;;
23195 esac
23196
23197 if test -n "$TINFO_SUFFIX" ; then
23198         case $TINFO_SUFFIX in
23199         tw*)
23200                 TINFO_NAME="${TINFO_NAME}tw"
23201                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
23202                 ;;
23203         t*)
23204                 TINFO_NAME="${TINFO_NAME}t"
23205                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
23206                 ;;
23207         w*)
23208                 TINFO_NAME="${TINFO_NAME}w"
23209                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
23210                 ;;
23211         esac
23212 fi
23213
23214 for cf_dir in $SRC_SUBDIRS
23215 do
23216         if test ! -d $srcdir/$cf_dir ; then
23217                 continue
23218         elif test -f $srcdir/$cf_dir/modules; then
23219
23220                 SHARED_LIB=
23221                 Libs_To_Make=
23222
23223                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23224                 then
23225                         cat >>$cf_dir/Makefile <<CF_EOF
23226
23227 # Generated by CF_LIB_RULES
23228 resulting.map: $UNALTERED_SYMS
23229         sed -e "s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g" < $UNALTERED_SYMS >\$@
23230
23231 clean::
23232         rm -f resulting.map
23233 CF_EOF
23234                 fi
23235
23236                 for cf_item in $cf_LIST_MODELS
23237                 do
23238
23239         case X$cf_item in #(vi
23240         Xlibtool) #(vi
23241                 cf_suffix='.la'
23242                 cf_depsuf=$cf_suffix
23243                 ;;
23244         Xdebug) #(vi
23245                 cf_suffix='_g.a'
23246                 cf_depsuf=$cf_suffix
23247                 ;;
23248         Xprofile) #(vi
23249                 cf_suffix='_p.a'
23250                 cf_depsuf=$cf_suffix
23251                 ;;
23252         Xshared) #(vi
23253                 case $cf_cv_system_name in
23254                 aix[5-7]*) #(vi
23255                         cf_suffix='.so'
23256                         cf_depsuf=$cf_suffix
23257                         ;;
23258                 cygwin*|msys*|mingw*) #(vi
23259                         cf_suffix='.dll'
23260                         cf_depsuf='.dll.a'
23261                         ;;
23262                 darwin*) #(vi
23263                         cf_suffix='.dylib'
23264                         cf_depsuf=$cf_suffix
23265                         ;;
23266                 hpux*) #(vi
23267                         case $target in
23268                         ia64*) #(vi
23269                                 cf_suffix='.so'
23270                                 cf_depsuf=$cf_suffix
23271                                 ;;
23272                         *) #(vi
23273                                 cf_suffix='.sl'
23274                                 cf_depsuf=$cf_suffix
23275                                 ;;
23276                         esac
23277                         ;;
23278                 *) #(vi
23279                         cf_suffix='.so'
23280                         cf_depsuf=$cf_suffix
23281                         ;;
23282                 esac
23283                 ;;
23284         *)
23285                 cf_suffix='.a'
23286                 cf_depsuf=$cf_suffix
23287                 ;;
23288         esac
23289         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23290         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23291
23292                         cf_libname=$cf_dir
23293                         test "$cf_dir" = c++ && cf_libname=ncurses++
23294                         if test $cf_item = shared ; then
23295                                 if test -n "${LIB_SUFFIX}"
23296                                 then
23297                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23298                                 else
23299                                         cf_shared_suffix="$cf_suffix"
23300                                 fi
23301                                 if test "$cf_cv_do_symlinks" = yes ; then
23302                                         cf_version_name=
23303
23304                                         case "$cf_cv_shlib_version" in #(vi
23305                                         rel) #(vi
23306                                                 cf_version_name=REL_VERSION
23307                                                 ;;
23308                                         abi)
23309                                                 cf_version_name=ABI_VERSION
23310                                                 ;;
23311                                         esac
23312
23313                                         if test -n "$cf_version_name"
23314                                         then
23315                                                 case "$cf_cv_system_name" in #(vi
23316                                                 darwin*)
23317                                                         # "w", etc?
23318                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23319                                                         ;; #(vi
23320                                                 *)
23321                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23322                                                         ;;
23323                                                 esac
23324                                         fi
23325                                         if test -n "${LIB_SUFFIX}"
23326                                         then
23327                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23328                                         else
23329                                                 cf_shared_suffix="$cf_suffix"
23330                                         fi
23331                                 fi
23332                                 # cygwin needs import library, and has unique naming convention
23333                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23334                                 # use 'cyg' prefix for shared lib.
23335                                 case $cf_cv_shlib_version in #(vi
23336                                 cygdll) #(vi
23337                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23338                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23339                                         continue
23340                                         ;;
23341                                 msysdll) #(vi
23342                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23343                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23344                                         continue
23345                                         ;;
23346                                 mingw)
23347                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23348                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23349                                         continue
23350                                         ;;
23351                                 esac
23352                         fi
23353                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23354                 done
23355
23356                 if test $cf_dir = ncurses ; then
23357                         cf_subsets="$LIB_SUBSETS"
23358                         cf_r_parts="$cf_subsets"
23359                         cf_liblist="$Libs_To_Make"
23360
23361                         while test -n "$cf_r_parts"
23362                         do
23363                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23364                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23365                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23366                                         cf_item=
23367                                         case $cf_l_parts in #(vi
23368                                         *termlib*) #(vi
23369                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23370                                                 ;;
23371                                         *ticlib*)
23372                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23373                                                 ;;
23374                                         *)
23375                                                 break
23376                                                 ;;
23377                                         esac
23378                                         if test -n "$cf_item"; then
23379                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23380                                         fi
23381                                 else
23382                                         break
23383                                 fi
23384                         done
23385                 else
23386                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23387                 fi
23388
23389                 if test $cf_dir = c++; then
23390                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23391                                 cf_list=
23392                                 for cf_item in $Libs_To_Make
23393                                 do
23394                                         case $cf_item in
23395                                         *.a)
23396                                                 ;;
23397                                         *)
23398                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23399                                                 ;;
23400                                         esac
23401                                         for cf_test in $cf_list
23402                                         do
23403                                                 if test "$cf_test" = "$cf_item"
23404                                                 then
23405                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23406                                                         cf_item=
23407                                                         break
23408                                                 fi
23409                                         done
23410                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23411                                 done
23412                                 Libs_To_Make="$cf_list"
23413                         fi
23414                 fi
23415
23416                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23417                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23418                         $cf_dir/Makefile >$cf_dir/Makefile.out
23419                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23420
23421                 $AWK -f $srcdir/mk-0th.awk \
23422                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23423                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23424
23425                 for cf_subset in $cf_subsets
23426                 do
23427                         cf_subdirs=
23428                         for cf_item in $cf_LIST_MODELS
23429                         do
23430
23431                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23432
23433 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23434
23435                         CXX_MODEL=$cf_ITEM
23436                         if test "$CXX_MODEL" = SHARED; then
23437                                 case $cf_cv_shlib_version in #(vi
23438                                 cygdll|msysdll|mingw) #(vi
23439                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23440
23441 echo "${as_me:-configure}:23441: testing overriding CXX_MODEL to SHARED ..." 1>&5
23442
23443                                         with_shared_cxx=yes
23444                                         ;;
23445                                 *)
23446                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23447                                         ;;
23448                                 esac
23449                         fi
23450
23451         case X$cf_item in #(vi
23452         Xlibtool) #(vi
23453                 cf_suffix='.la'
23454                 cf_depsuf=$cf_suffix
23455                 ;;
23456         Xdebug) #(vi
23457                 cf_suffix='_g.a'
23458                 cf_depsuf=$cf_suffix
23459                 ;;
23460         Xprofile) #(vi
23461                 cf_suffix='_p.a'
23462                 cf_depsuf=$cf_suffix
23463                 ;;
23464         Xshared) #(vi
23465                 case $cf_cv_system_name in
23466                 aix[5-7]*) #(vi
23467                         cf_suffix='.so'
23468                         cf_depsuf=$cf_suffix
23469                         ;;
23470                 cygwin*|msys*|mingw*) #(vi
23471                         cf_suffix='.dll'
23472                         cf_depsuf='.dll.a'
23473                         ;;
23474                 darwin*) #(vi
23475                         cf_suffix='.dylib'
23476                         cf_depsuf=$cf_suffix
23477                         ;;
23478                 hpux*) #(vi
23479                         case $target in
23480                         ia64*) #(vi
23481                                 cf_suffix='.so'
23482                                 cf_depsuf=$cf_suffix
23483                                 ;;
23484                         *) #(vi
23485                                 cf_suffix='.sl'
23486                                 cf_depsuf=$cf_suffix
23487                                 ;;
23488                         esac
23489                         ;;
23490                 *) #(vi
23491                         cf_suffix='.so'
23492                         cf_depsuf=$cf_suffix
23493                         ;;
23494                 esac
23495                 ;;
23496         *)
23497                 cf_suffix='.a'
23498                 cf_depsuf=$cf_suffix
23499                 ;;
23500         esac
23501         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23502         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23503
23504         case $cf_item in
23505         libtool) cf_subdir='obj_lo'  ;;
23506         normal)  cf_subdir='objects' ;;
23507         debug)   cf_subdir='obj_g' ;;
23508         profile) cf_subdir='obj_p' ;;
23509         shared)
23510                 case $cf_cv_system_name in #(vi
23511                 cygwin|msys) #(vi
23512                         cf_subdir='objects' ;;
23513                 *)
23514                         cf_subdir='obj_s' ;;
23515                 esac
23516         esac
23517
23518                         # Test for case where we build libtinfo with a different name.
23519                         cf_libname=$cf_dir
23520                         if test $cf_dir = ncurses ; then
23521                                 case $cf_subset in
23522                                 *base*)
23523                                         cf_libname=${cf_libname}$LIB_SUFFIX
23524                                         ;;
23525                                 *termlib*)
23526                                         cf_libname=$TINFO_LIB_SUFFIX
23527                                         ;;
23528                                 ticlib*)
23529                                         cf_libname=$TICS_LIB_SUFFIX
23530                                         ;;
23531                                 esac
23532                         elif test $cf_dir = c++ ; then
23533                                 cf_libname=ncurses++$LIB_SUFFIX
23534                         else
23535                                 cf_libname=${cf_libname}$LIB_SUFFIX
23536                         fi
23537                         if test -n "${DFT_ARG_SUFFIX}" ; then
23538                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23539                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23540                         fi
23541
23542                         # These dependencies really are for development, not
23543                         # builds, but they are useful in porting, too.
23544                         cf_depend="../include/ncurses_cfg.h"
23545                         if test "$srcdir" = "."; then
23546                                 cf_reldir="."
23547                         else
23548                                 cf_reldir="\${srcdir}"
23549                         fi
23550
23551                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23552                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23553                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23554                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23555                         fi
23556
23557                         cf_dir_suffix=
23558                         old_cf_suffix="$cf_suffix"
23559                         if test "$cf_cv_shlib_version_infix" = yes ; then
23560                         if test -n "$LIB_SUFFIX" ; then
23561                                 case $LIB_SUFFIX in
23562                                 tw*)
23563                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23564                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23565                                         cf_dir_suffix=tw
23566                                         ;;
23567                                 t*)
23568                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23569                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23570                                         cf_dir_suffix=t
23571                                         ;;
23572                                 w*)
23573                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23574                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23575                                         cf_dir_suffix=w
23576                                         ;;
23577                                 esac
23578                         fi
23579                         fi
23580
23581                         $AWK -f $srcdir/mk-1st.awk \
23582                                 name=${cf_libname}${cf_dir_suffix} \
23583                                 traces=$LIB_TRACING \
23584                                 MODEL=$cf_ITEM \
23585                                 CXX_MODEL=$CXX_MODEL \
23586                                 model=$cf_subdir \
23587                                 prefix=$cf_prefix \
23588                                 suffix=$cf_suffix \
23589                                 subset=$cf_subset \
23590                                 driver=$cf_cv_term_driver \
23591                                 SymLink="$LN_S" \
23592                                 TermlibRoot=$TINFO_NAME \
23593                                 TermlibSuffix=$TINFO_SUFFIX \
23594                                 ShlibVer=$cf_cv_shlib_version \
23595                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23596                                 ReLink=${cf_cv_do_relink:-no} \
23597                                 DoLinks=$cf_cv_do_symlinks \
23598                                 rmSoLocs=$cf_cv_rm_so_locs \
23599                                 ldconfig="$LDCONFIG" \
23600                                 overwrite=$WITH_OVERWRITE \
23601                                 depend="$cf_depend" \
23602                                 host="$host" \
23603                                 libtool_version="$LIBTOOL_VERSION" \
23604                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23605
23606                         cf_suffix="$old_cf_suffix"
23607
23608                         for cf_subdir2 in $cf_subdirs lib
23609                         do
23610                                 test $cf_subdir = $cf_subdir2 && break
23611                         done
23612                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23613                         $AWK -f $srcdir/mk-2nd.awk \
23614                                 name=$cf_dir \
23615                                 traces=$LIB_TRACING \
23616                                 MODEL=$cf_ITEM \
23617                                 model=$cf_subdir \
23618                                 subset=$cf_subset \
23619                                 srcdir=$srcdir \
23620                                 echo=$WITH_ECHO \
23621                                 crenames=$cf_cv_prog_CC_c_o \
23622                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23623                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23624                         cf_subdirs="$cf_subdirs $cf_subdir"
23625                         done
23626                 done
23627         fi
23628
23629         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23630 done
23631
23632 for cf_dir in $SRC_SUBDIRS
23633 do
23634         if test ! -d $srcdir/$cf_dir ; then
23635                 continue
23636         fi
23637
23638         if test -f $cf_dir/Makefile ; then
23639                 case "$cf_dir" in
23640                 Ada95) #(vi
23641                         echo 'libs \' >> Makefile
23642                         echo 'install.libs \' >> Makefile
23643                         echo 'uninstall.libs ::' >> Makefile
23644                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23645                         ;;
23646                 esac
23647         fi
23648
23649         if test -f $srcdir/$cf_dir/modules; then
23650                 echo >> Makefile
23651                 if test -f $srcdir/$cf_dir/headers; then
23652 cat >> Makefile <<CF_EOF
23653 install.includes \\
23654 uninstall.includes \\
23655 CF_EOF
23656                 fi
23657 if test "$cf_dir" != "c++" ; then
23658 echo 'lint \' >> Makefile
23659 fi
23660 cat >> Makefile <<CF_EOF
23661 libs \\
23662 lintlib \\
23663 install.libs \\
23664 uninstall.libs \\
23665 install.$cf_dir \\
23666 uninstall.$cf_dir ::
23667         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23668 CF_EOF
23669         elif test -f $srcdir/$cf_dir/headers; then
23670 cat >> Makefile <<CF_EOF
23671
23672 libs \\
23673 install.libs \\
23674 uninstall.libs \\
23675 install.includes \\
23676 uninstall.includes ::
23677         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23678 CF_EOF
23679 fi
23680 done
23681
23682 if test "x$cf_with_db_install" = xyes; then
23683 cat >> Makefile <<CF_EOF
23684
23685 install.libs uninstall.libs \\
23686 install.data uninstall.data ::
23687 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23688 CF_EOF
23689 else
23690 cat >> Makefile <<CF_EOF
23691
23692 install.libs uninstall.libs ::
23693         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23694 CF_EOF
23695 fi
23696
23697 if test "x$cf_with_manpages" = xyes; then
23698 cat >> Makefile <<CF_EOF
23699
23700 install.man \\
23701 uninstall.man ::
23702         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23703 CF_EOF
23704 fi
23705
23706 cat >> Makefile <<CF_EOF
23707
23708 distclean ::
23709         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23710         rm -f headers.sh headers.sed mk_shared_lib.sh
23711         rm -f edit_man.* man_alias.*
23712         rm -rf \${DIRS_TO_MAKE}
23713 CF_EOF
23714
23715 # Special case: tack's manpage lives in its own directory.
23716 if test "x$cf_with_manpages" = xyes; then
23717 if test -d tack ; then
23718 if test -f $srcdir/$tack.h; then
23719 cat >> Makefile <<CF_EOF
23720
23721 install.man \\
23722 uninstall.man ::
23723         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23724 CF_EOF
23725 fi
23726 fi
23727 fi
23728
23729 rm -f headers.sed headers.sh
23730
23731 echo creating headers.sh
23732 cat >headers.sh <<CF_EOF
23733 #! /bin/sh
23734 # This shell script is generated by the 'configure' script.  It is invoked in a
23735 # subdirectory of the build tree.  It generates a sed-script in the parent
23736 # directory that is used to adjust includes for header files that reside in a
23737 # subdirectory of /usr/include, etc.
23738 PRG=""
23739 while test \$# != 3
23740 do
23741 PRG="\$PRG \$1"; shift
23742 done
23743 DST=\$1
23744 REF=\$2
23745 SRC=\$3
23746 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23747 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23748 echo installing \$SRC in \$DST
23749 CF_EOF
23750
23751 if test $WITH_CURSES_H = yes; then
23752         cat >>headers.sh <<CF_EOF
23753 case \$DST in
23754 /*/include/*)
23755         END=\`basename \$DST\`
23756         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23757         do
23758                 NAME=\`basename \$i\`
23759                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23760         done
23761         ;;
23762 *)
23763         echo "" >> \$TMPSED
23764         ;;
23765 esac
23766 CF_EOF
23767
23768 else
23769         cat >>headers.sh <<CF_EOF
23770 case \$DST in
23771 /*/include/*)
23772         END=\`basename \$DST\`
23773         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23774         do
23775                 NAME=\`basename \$i\`
23776                 if test "\$NAME" = "curses.h"
23777                 then
23778                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23779                         NAME=ncurses.h
23780                 fi
23781                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23782         done
23783         ;;
23784 *)
23785         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23786         ;;
23787 esac
23788 CF_EOF
23789 fi
23790 cat >>headers.sh <<CF_EOF
23791 rm -f \$TMPSRC
23792 sed -f \$TMPSED \$SRC > \$TMPSRC
23793 NAME=\`basename \$SRC\`
23794 CF_EOF
23795 if test $WITH_CURSES_H != yes; then
23796         cat >>headers.sh <<CF_EOF
23797 test "\$NAME" = "curses.h" && NAME=ncurses.h
23798 CF_EOF
23799 fi
23800 cat >>headers.sh <<CF_EOF
23801 # Just in case someone gzip'd manpages, remove the conflicting copy.
23802 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23803
23804 eval \$PRG \$TMPSRC \$DST/\$NAME
23805 rm -f \$TMPSRC \$TMPSED
23806 CF_EOF
23807
23808 chmod 0755 headers.sh
23809
23810 for cf_dir in $SRC_SUBDIRS
23811 do
23812         if test ! -d $srcdir/$cf_dir ; then
23813                 continue
23814         fi
23815
23816         if test -f $srcdir/$cf_dir/headers; then
23817                 $AWK -f $srcdir/mk-hdr.awk \
23818                         subset="$LIB_SUBSETS" \
23819                         compat="$WITH_CURSES_H" \
23820                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23821         fi
23822
23823         if test -f $srcdir/$cf_dir/modules; then
23824                 if test "$cf_dir" != "c++" ; then
23825                         cat >>$cf_dir/Makefile <<"CF_EOF"
23826 depend : ${AUTO_SRC}
23827         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23828
23829 # DO NOT DELETE THIS LINE -- make depend depends on it.
23830 CF_EOF
23831                 fi
23832         fi
23833 done
23834
23835 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23836 if test -z "$USE_OLD_MAKERULES" ; then
23837         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23838 fi
23839 fi
23840  ;;
23841   esac
23842 done
23843 EOF
23844
23845 cat >>$CONFIG_STATUS <<\EOF
23846
23847 { (exit 0); exit 0; }
23848 EOF
23849 chmod +x $CONFIG_STATUS
23850 ac_clean_files=$ac_clean_files_save
23851
23852 # configure is writing to config.log, and then calls config.status.
23853 # config.status does its own redirection, appending to config.log.
23854 # Unfortunately, on DOS this fails, as config.log is still kept open
23855 # by configure, so config.status won't be able to write to it; its
23856 # output is simply discarded.  So we exec the FD to /dev/null,
23857 # effectively closing config.log, so it can be properly (re)opened and
23858 # appended to by config.status.  When coming back to configure, we
23859 # need to make the FD available again.
23860 if test "$no_create" != yes; then
23861   ac_cs_success=:
23862   exec 5>/dev/null
23863   $SHELL $CONFIG_STATUS || ac_cs_success=false
23864   exec 5>>config.log
23865   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23866   # would make configure fail if this is the last instruction.
23867   $ac_cs_success || { (exit 1); exit 1; }
23868 fi
23869 ${MAKE:-make} preinstall