]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20150117
[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                         $cf_path/libdata"
3566                 ;;
3567         esac
3568
3569         test -n "$verbose" && echo "    list..." 1>&6
3570
3571 echo "${as_me:-configure}:3571: testing list... ..." 1>&5
3572
3573         for cf_config in $cf_search_path
3574         do
3575                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3576
3577 echo "${as_me:-configure}:3577: testing checking $cf_config/pkgconfig ..." 1>&5
3578
3579                 if test -d $cf_config/pkgconfig
3580                 then
3581                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3582                         echo "$as_me:3582: checking done" >&5
3583 echo $ECHO_N "checking done... $ECHO_C" >&6
3584                         break
3585                 fi
3586         done
3587         ;;
3588 *)
3589         ;;
3590 esac
3591
3592 echo "$as_me:3592: result: $PKG_CONFIG_LIBDIR" >&5
3593 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3594
3595 if test "x$PKG_CONFIG" != xnone
3596 then
3597         echo "$as_me:3597: checking if we should install .pc files for $PKG_CONFIG" >&5
3598 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3599 else
3600         echo "$as_me:3600: checking if we should install .pc files" >&5
3601 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3602 fi
3603
3604 # Check whether --enable-pc-files or --disable-pc-files was given.
3605 if test "${enable_pc_files+set}" = set; then
3606   enableval="$enable_pc_files"
3607   enable_pc_files=$enableval
3608 else
3609   enable_pc_files=no
3610 fi;
3611 echo "$as_me:3611: result: $enable_pc_files" >&5
3612 echo "${ECHO_T}$enable_pc_files" >&6
3613
3614 if test "x$enable_pc_files" != xno
3615 then
3616         case "x$PKG_CONFIG_LIBDIR" in #(vi
3617         xno|xyes) #(vi
3618                 { echo "$as_me:3618: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3619 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3620                 MAKE_PC_FILES="#"
3621                 ;;
3622         *)
3623
3624 if test "x$prefix" != xNONE; then
3625   cf_path_syntax="$prefix"
3626 else
3627   cf_path_syntax="$ac_default_prefix"
3628 fi
3629
3630 case ".$PKG_CONFIG_LIBDIR" in #(vi
3631 .\$\(*\)*|.\'*\'*) #(vi
3632   ;;
3633 ..|./*|.\\*) #(vi
3634   ;;
3635 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3636   ;;
3637 .\${*prefix}*|.\${*dir}*) #(vi
3638   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3639   case ".$PKG_CONFIG_LIBDIR" in #(vi
3640   .NONE/*)
3641     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3642     ;;
3643   esac
3644   ;; #(vi
3645 .no|.NONE/*)
3646   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3647   ;;
3648 *)
3649   { { echo "$as_me:3649: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3650 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3651    { (exit 1); exit 1; }; }
3652   ;;
3653 esac
3654
3655                 MAKE_PC_FILES=
3656                 ;;
3657         esac
3658 else
3659         MAKE_PC_FILES="#"
3660 fi
3661
3662 if test -z "$MAKE_PC_FILES"
3663 then
3664         echo "$as_me:3664: checking for suffix to add to pc-files" >&5
3665 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3666
3667 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3668 if test "${with_pc_suffix+set}" = set; then
3669   withval="$with_pc_suffix"
3670   case "x$withval" in #(vi
3671         xyes|xno) #(vi
3672                 PC_MODULE_SUFFIX=
3673                 ;;
3674         *)      PC_MODULE_SUFFIX="$withval"
3675                 ;;
3676         esac
3677 fi;
3678         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3679         echo "$as_me:3679: result: $PC_MODULE_SUFFIX" >&5
3680 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3681         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3682
3683 fi
3684
3685 echo "$as_me:3685: checking if we should assume mixed-case filenames" >&5
3686 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3687
3688 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3689 if test "${enable_mixed_case+set}" = set; then
3690   enableval="$enable_mixed_case"
3691   enable_mixedcase=$enableval
3692 else
3693   enable_mixedcase=auto
3694 fi;
3695 echo "$as_me:3695: result: $enable_mixedcase" >&5
3696 echo "${ECHO_T}$enable_mixedcase" >&6
3697 if test "$enable_mixedcase" = "auto" ; then
3698
3699 echo "$as_me:3699: checking if filesystem supports mixed-case filenames" >&5
3700 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3701 if test "${cf_cv_mixedcase+set}" = set; then
3702   echo $ECHO_N "(cached) $ECHO_C" >&6
3703 else
3704
3705 if test "$cross_compiling" = yes ; then
3706         case $target_alias in #(vi
3707         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3708                 cf_cv_mixedcase=no
3709                 ;;
3710         *)
3711                 cf_cv_mixedcase=yes
3712                 ;;
3713         esac
3714 else
3715         rm -f conftest CONFTEST
3716         echo test >conftest
3717         if test -f CONFTEST ; then
3718                 cf_cv_mixedcase=no
3719         else
3720                 cf_cv_mixedcase=yes
3721         fi
3722         rm -f conftest CONFTEST
3723 fi
3724
3725 fi
3726 echo "$as_me:3726: result: $cf_cv_mixedcase" >&5
3727 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3728 test "$cf_cv_mixedcase" = yes &&
3729 cat >>confdefs.h <<\EOF
3730 #define MIXEDCASE_FILENAMES 1
3731 EOF
3732
3733 else
3734     cf_cv_mixedcase=$enable_mixedcase
3735     if test "x$enable_mixedcase" = "xyes" ; then
3736
3737 cat >>confdefs.h <<\EOF
3738 #define MIXEDCASE_FILENAMES 1
3739 EOF
3740
3741     fi
3742 fi
3743
3744 # do this after mixed-case option (tags/TAGS is not as important as tic).
3745 echo "$as_me:3745: checking whether ${MAKE-make} sets \${MAKE}" >&5
3746 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3747 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3748 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3749   echo $ECHO_N "(cached) $ECHO_C" >&6
3750 else
3751   cat >conftest.make <<\EOF
3752 all:
3753         @echo 'ac_maketemp="${MAKE}"'
3754 EOF
3755 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3756 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3757 if test -n "$ac_maketemp"; then
3758   eval ac_cv_prog_make_${ac_make}_set=yes
3759 else
3760   eval ac_cv_prog_make_${ac_make}_set=no
3761 fi
3762 rm -f conftest.make
3763 fi
3764 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3765   echo "$as_me:3765: result: yes" >&5
3766 echo "${ECHO_T}yes" >&6
3767   SET_MAKE=
3768 else
3769   echo "$as_me:3769: result: no" >&5
3770 echo "${ECHO_T}no" >&6
3771   SET_MAKE="MAKE=${MAKE-make}"
3772 fi
3773
3774 for ac_prog in exctags ctags
3775 do
3776   # Extract the first word of "$ac_prog", so it can be a program name with args.
3777 set dummy $ac_prog; ac_word=$2
3778 echo "$as_me:3778: checking for $ac_word" >&5
3779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780 if test "${ac_cv_prog_CTAGS+set}" = set; then
3781   echo $ECHO_N "(cached) $ECHO_C" >&6
3782 else
3783   if test -n "$CTAGS"; then
3784   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3785 else
3786   ac_save_IFS=$IFS; IFS=$ac_path_separator
3787 ac_dummy="$PATH"
3788 for ac_dir in $ac_dummy; do
3789   IFS=$ac_save_IFS
3790   test -z "$ac_dir" && ac_dir=.
3791   $as_executable_p "$ac_dir/$ac_word" || continue
3792 ac_cv_prog_CTAGS="$ac_prog"
3793 echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3794 break
3795 done
3796
3797 fi
3798 fi
3799 CTAGS=$ac_cv_prog_CTAGS
3800 if test -n "$CTAGS"; then
3801   echo "$as_me:3801: result: $CTAGS" >&5
3802 echo "${ECHO_T}$CTAGS" >&6
3803 else
3804   echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806 fi
3807
3808   test -n "$CTAGS" && break
3809 done
3810
3811 for ac_prog in exetags etags
3812 do
3813   # Extract the first word of "$ac_prog", so it can be a program name with args.
3814 set dummy $ac_prog; ac_word=$2
3815 echo "$as_me:3815: checking for $ac_word" >&5
3816 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3817 if test "${ac_cv_prog_ETAGS+set}" = set; then
3818   echo $ECHO_N "(cached) $ECHO_C" >&6
3819 else
3820   if test -n "$ETAGS"; then
3821   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3822 else
3823   ac_save_IFS=$IFS; IFS=$ac_path_separator
3824 ac_dummy="$PATH"
3825 for ac_dir in $ac_dummy; do
3826   IFS=$ac_save_IFS
3827   test -z "$ac_dir" && ac_dir=.
3828   $as_executable_p "$ac_dir/$ac_word" || continue
3829 ac_cv_prog_ETAGS="$ac_prog"
3830 echo "$as_me:3830: found $ac_dir/$ac_word" >&5
3831 break
3832 done
3833
3834 fi
3835 fi
3836 ETAGS=$ac_cv_prog_ETAGS
3837 if test -n "$ETAGS"; then
3838   echo "$as_me:3838: result: $ETAGS" >&5
3839 echo "${ECHO_T}$ETAGS" >&6
3840 else
3841   echo "$as_me:3841: result: no" >&5
3842 echo "${ECHO_T}no" >&6
3843 fi
3844
3845   test -n "$ETAGS" && break
3846 done
3847
3848 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3849 set dummy ${CTAGS:-ctags}; ac_word=$2
3850 echo "$as_me:3850: checking for $ac_word" >&5
3851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3852 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3853   echo $ECHO_N "(cached) $ECHO_C" >&6
3854 else
3855   if test -n "$MAKE_LOWER_TAGS"; then
3856   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3857 else
3858   ac_save_IFS=$IFS; IFS=$ac_path_separator
3859 ac_dummy="$PATH"
3860 for ac_dir in $ac_dummy; do
3861   IFS=$ac_save_IFS
3862   test -z "$ac_dir" && ac_dir=.
3863   $as_executable_p "$ac_dir/$ac_word" || continue
3864 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3865 echo "$as_me:3865: found $ac_dir/$ac_word" >&5
3866 break
3867 done
3868
3869   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3870 fi
3871 fi
3872 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3873 if test -n "$MAKE_LOWER_TAGS"; then
3874   echo "$as_me:3874: result: $MAKE_LOWER_TAGS" >&5
3875 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3876 else
3877   echo "$as_me:3877: result: no" >&5
3878 echo "${ECHO_T}no" >&6
3879 fi
3880
3881 if test "$cf_cv_mixedcase" = yes ; then
3882         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3883 set dummy ${ETAGS:-etags}; ac_word=$2
3884 echo "$as_me:3884: checking for $ac_word" >&5
3885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3886 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3887   echo $ECHO_N "(cached) $ECHO_C" >&6
3888 else
3889   if test -n "$MAKE_UPPER_TAGS"; then
3890   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3891 else
3892   ac_save_IFS=$IFS; IFS=$ac_path_separator
3893 ac_dummy="$PATH"
3894 for ac_dir in $ac_dummy; do
3895   IFS=$ac_save_IFS
3896   test -z "$ac_dir" && ac_dir=.
3897   $as_executable_p "$ac_dir/$ac_word" || continue
3898 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3899 echo "$as_me:3899: found $ac_dir/$ac_word" >&5
3900 break
3901 done
3902
3903   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3904 fi
3905 fi
3906 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3907 if test -n "$MAKE_UPPER_TAGS"; then
3908   echo "$as_me:3908: result: $MAKE_UPPER_TAGS" >&5
3909 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915 else
3916         MAKE_UPPER_TAGS=no
3917 fi
3918
3919 if test "$MAKE_UPPER_TAGS" = yes ; then
3920         MAKE_UPPER_TAGS=
3921 else
3922         MAKE_UPPER_TAGS="#"
3923 fi
3924
3925 if test "$MAKE_LOWER_TAGS" = yes ; then
3926         MAKE_LOWER_TAGS=
3927 else
3928         MAKE_LOWER_TAGS="#"
3929 fi
3930
3931 echo "$as_me:3931: checking for makeflags variable" >&5
3932 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3933 if test "${cf_cv_makeflags+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936
3937         cf_cv_makeflags=''
3938         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3939         do
3940                 cat >cf_makeflags.tmp <<CF_EOF
3941 SHELL = /bin/sh
3942 all :
3943         @ echo '.$cf_option'
3944 CF_EOF
3945                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3946                 case "$cf_result" in
3947                 .*k|.*kw)
3948                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3949                         case "$cf_result" in
3950                         .*CC=*) cf_cv_makeflags=
3951                                 ;;
3952                         *)      cf_cv_makeflags=$cf_option
3953                                 ;;
3954                         esac
3955                         break
3956                         ;;
3957                 .-)     ;;
3958                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3959                         ;;
3960                 esac
3961         done
3962         rm -f cf_makeflags.tmp
3963
3964 fi
3965 echo "$as_me:3965: result: $cf_cv_makeflags" >&5
3966 echo "${ECHO_T}$cf_cv_makeflags" >&6
3967
3968 if test -n "$ac_tool_prefix"; then
3969   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3970 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3971 echo "$as_me:3971: checking for $ac_word" >&5
3972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3973 if test "${ac_cv_prog_RANLIB+set}" = set; then
3974   echo $ECHO_N "(cached) $ECHO_C" >&6
3975 else
3976   if test -n "$RANLIB"; then
3977   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3978 else
3979   ac_save_IFS=$IFS; IFS=$ac_path_separator
3980 ac_dummy="$PATH"
3981 for ac_dir in $ac_dummy; do
3982   IFS=$ac_save_IFS
3983   test -z "$ac_dir" && ac_dir=.
3984   $as_executable_p "$ac_dir/$ac_word" || continue
3985 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3986 echo "$as_me:3986: found $ac_dir/$ac_word" >&5
3987 break
3988 done
3989
3990 fi
3991 fi
3992 RANLIB=$ac_cv_prog_RANLIB
3993 if test -n "$RANLIB"; then
3994   echo "$as_me:3994: result: $RANLIB" >&5
3995 echo "${ECHO_T}$RANLIB" >&6
3996 else
3997   echo "$as_me:3997: result: no" >&5
3998 echo "${ECHO_T}no" >&6
3999 fi
4000
4001 fi
4002 if test -z "$ac_cv_prog_RANLIB"; then
4003   ac_ct_RANLIB=$RANLIB
4004   # Extract the first word of "ranlib", so it can be a program name with args.
4005 set dummy ranlib; ac_word=$2
4006 echo "$as_me:4006: checking for $ac_word" >&5
4007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4008 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4009   echo $ECHO_N "(cached) $ECHO_C" >&6
4010 else
4011   if test -n "$ac_ct_RANLIB"; then
4012   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4013 else
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   $as_executable_p "$ac_dir/$ac_word" || continue
4020 ac_cv_prog_ac_ct_RANLIB="ranlib"
4021 echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022 break
4023 done
4024
4025   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4026 fi
4027 fi
4028 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4029 if test -n "$ac_ct_RANLIB"; then
4030   echo "$as_me:4030: result: $ac_ct_RANLIB" >&5
4031 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4032 else
4033   echo "$as_me:4033: result: no" >&5
4034 echo "${ECHO_T}no" >&6
4035 fi
4036
4037   RANLIB=$ac_ct_RANLIB
4038 else
4039   RANLIB="$ac_cv_prog_RANLIB"
4040 fi
4041
4042 if test -n "$ac_tool_prefix"; then
4043   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4044 set dummy ${ac_tool_prefix}ld; ac_word=$2
4045 echo "$as_me:4045: checking for $ac_word" >&5
4046 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4047 if test "${ac_cv_prog_LD+set}" = set; then
4048   echo $ECHO_N "(cached) $ECHO_C" >&6
4049 else
4050   if test -n "$LD"; then
4051   ac_cv_prog_LD="$LD" # Let the user override the test.
4052 else
4053   ac_save_IFS=$IFS; IFS=$ac_path_separator
4054 ac_dummy="$PATH"
4055 for ac_dir in $ac_dummy; do
4056   IFS=$ac_save_IFS
4057   test -z "$ac_dir" && ac_dir=.
4058   $as_executable_p "$ac_dir/$ac_word" || continue
4059 ac_cv_prog_LD="${ac_tool_prefix}ld"
4060 echo "$as_me:4060: found $ac_dir/$ac_word" >&5
4061 break
4062 done
4063
4064 fi
4065 fi
4066 LD=$ac_cv_prog_LD
4067 if test -n "$LD"; then
4068   echo "$as_me:4068: result: $LD" >&5
4069 echo "${ECHO_T}$LD" >&6
4070 else
4071   echo "$as_me:4071: result: no" >&5
4072 echo "${ECHO_T}no" >&6
4073 fi
4074
4075 fi
4076 if test -z "$ac_cv_prog_LD"; then
4077   ac_ct_LD=$LD
4078   # Extract the first word of "ld", so it can be a program name with args.
4079 set dummy ld; ac_word=$2
4080 echo "$as_me:4080: checking for $ac_word" >&5
4081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4082 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   if test -n "$ac_ct_LD"; then
4086   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4087 else
4088   ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 ac_dummy="$PATH"
4090 for ac_dir in $ac_dummy; do
4091   IFS=$ac_save_IFS
4092   test -z "$ac_dir" && ac_dir=.
4093   $as_executable_p "$ac_dir/$ac_word" || continue
4094 ac_cv_prog_ac_ct_LD="ld"
4095 echo "$as_me:4095: found $ac_dir/$ac_word" >&5
4096 break
4097 done
4098
4099   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4100 fi
4101 fi
4102 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4103 if test -n "$ac_ct_LD"; then
4104   echo "$as_me:4104: result: $ac_ct_LD" >&5
4105 echo "${ECHO_T}$ac_ct_LD" >&6
4106 else
4107   echo "$as_me:4107: result: no" >&5
4108 echo "${ECHO_T}no" >&6
4109 fi
4110
4111   LD=$ac_ct_LD
4112 else
4113   LD="$ac_cv_prog_LD"
4114 fi
4115
4116 if test -n "$ac_tool_prefix"; then
4117   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4118 set dummy ${ac_tool_prefix}ar; ac_word=$2
4119 echo "$as_me:4119: checking for $ac_word" >&5
4120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4121 if test "${ac_cv_prog_AR+set}" = set; then
4122   echo $ECHO_N "(cached) $ECHO_C" >&6
4123 else
4124   if test -n "$AR"; then
4125   ac_cv_prog_AR="$AR" # Let the user override the test.
4126 else
4127   ac_save_IFS=$IFS; IFS=$ac_path_separator
4128 ac_dummy="$PATH"
4129 for ac_dir in $ac_dummy; do
4130   IFS=$ac_save_IFS
4131   test -z "$ac_dir" && ac_dir=.
4132   $as_executable_p "$ac_dir/$ac_word" || continue
4133 ac_cv_prog_AR="${ac_tool_prefix}ar"
4134 echo "$as_me:4134: found $ac_dir/$ac_word" >&5
4135 break
4136 done
4137
4138 fi
4139 fi
4140 AR=$ac_cv_prog_AR
4141 if test -n "$AR"; then
4142   echo "$as_me:4142: result: $AR" >&5
4143 echo "${ECHO_T}$AR" >&6
4144 else
4145   echo "$as_me:4145: result: no" >&5
4146 echo "${ECHO_T}no" >&6
4147 fi
4148
4149 fi
4150 if test -z "$ac_cv_prog_AR"; then
4151   ac_ct_AR=$AR
4152   # Extract the first word of "ar", so it can be a program name with args.
4153 set dummy ar; ac_word=$2
4154 echo "$as_me:4154: checking for $ac_word" >&5
4155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4156 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   if test -n "$ac_ct_AR"; then
4160   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4161 else
4162   ac_save_IFS=$IFS; IFS=$ac_path_separator
4163 ac_dummy="$PATH"
4164 for ac_dir in $ac_dummy; do
4165   IFS=$ac_save_IFS
4166   test -z "$ac_dir" && ac_dir=.
4167   $as_executable_p "$ac_dir/$ac_word" || continue
4168 ac_cv_prog_ac_ct_AR="ar"
4169 echo "$as_me:4169: found $ac_dir/$ac_word" >&5
4170 break
4171 done
4172
4173   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4174 fi
4175 fi
4176 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4177 if test -n "$ac_ct_AR"; then
4178   echo "$as_me:4178: result: $ac_ct_AR" >&5
4179 echo "${ECHO_T}$ac_ct_AR" >&6
4180 else
4181   echo "$as_me:4181: result: no" >&5
4182 echo "${ECHO_T}no" >&6
4183 fi
4184
4185   AR=$ac_ct_AR
4186 else
4187   AR="$ac_cv_prog_AR"
4188 fi
4189
4190 if test -n "$ac_tool_prefix"; then
4191   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4192 set dummy ${ac_tool_prefix}nm; ac_word=$2
4193 echo "$as_me:4193: checking for $ac_word" >&5
4194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4195 if test "${ac_cv_prog_NM+set}" = set; then
4196   echo $ECHO_N "(cached) $ECHO_C" >&6
4197 else
4198   if test -n "$NM"; then
4199   ac_cv_prog_NM="$NM" # Let the user override the test.
4200 else
4201   ac_save_IFS=$IFS; IFS=$ac_path_separator
4202 ac_dummy="$PATH"
4203 for ac_dir in $ac_dummy; do
4204   IFS=$ac_save_IFS
4205   test -z "$ac_dir" && ac_dir=.
4206   $as_executable_p "$ac_dir/$ac_word" || continue
4207 ac_cv_prog_NM="${ac_tool_prefix}nm"
4208 echo "$as_me:4208: found $ac_dir/$ac_word" >&5
4209 break
4210 done
4211
4212 fi
4213 fi
4214 NM=$ac_cv_prog_NM
4215 if test -n "$NM"; then
4216   echo "$as_me:4216: result: $NM" >&5
4217 echo "${ECHO_T}$NM" >&6
4218 else
4219   echo "$as_me:4219: result: no" >&5
4220 echo "${ECHO_T}no" >&6
4221 fi
4222
4223 fi
4224 if test -z "$ac_cv_prog_NM"; then
4225   ac_ct_NM=$NM
4226   # Extract the first word of "nm", so it can be a program name with args.
4227 set dummy nm; ac_word=$2
4228 echo "$as_me:4228: checking for $ac_word" >&5
4229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4230 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4231   echo $ECHO_N "(cached) $ECHO_C" >&6
4232 else
4233   if test -n "$ac_ct_NM"; then
4234   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4235 else
4236   ac_save_IFS=$IFS; IFS=$ac_path_separator
4237 ac_dummy="$PATH"
4238 for ac_dir in $ac_dummy; do
4239   IFS=$ac_save_IFS
4240   test -z "$ac_dir" && ac_dir=.
4241   $as_executable_p "$ac_dir/$ac_word" || continue
4242 ac_cv_prog_ac_ct_NM="nm"
4243 echo "$as_me:4243: found $ac_dir/$ac_word" >&5
4244 break
4245 done
4246
4247   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4248 fi
4249 fi
4250 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4251 if test -n "$ac_ct_NM"; then
4252   echo "$as_me:4252: result: $ac_ct_NM" >&5
4253 echo "${ECHO_T}$ac_ct_NM" >&6
4254 else
4255   echo "$as_me:4255: result: no" >&5
4256 echo "${ECHO_T}no" >&6
4257 fi
4258
4259   NM=$ac_ct_NM
4260 else
4261   NM="$ac_cv_prog_NM"
4262 fi
4263
4264 if test -n "$ac_tool_prefix"; then
4265   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4266 set dummy ${ac_tool_prefix}ar; ac_word=$2
4267 echo "$as_me:4267: checking for $ac_word" >&5
4268 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4269 if test "${ac_cv_prog_AR+set}" = set; then
4270   echo $ECHO_N "(cached) $ECHO_C" >&6
4271 else
4272   if test -n "$AR"; then
4273   ac_cv_prog_AR="$AR" # Let the user override the test.
4274 else
4275   ac_save_IFS=$IFS; IFS=$ac_path_separator
4276 ac_dummy="$PATH"
4277 for ac_dir in $ac_dummy; do
4278   IFS=$ac_save_IFS
4279   test -z "$ac_dir" && ac_dir=.
4280   $as_executable_p "$ac_dir/$ac_word" || continue
4281 ac_cv_prog_AR="${ac_tool_prefix}ar"
4282 echo "$as_me:4282: found $ac_dir/$ac_word" >&5
4283 break
4284 done
4285
4286 fi
4287 fi
4288 AR=$ac_cv_prog_AR
4289 if test -n "$AR"; then
4290   echo "$as_me:4290: result: $AR" >&5
4291 echo "${ECHO_T}$AR" >&6
4292 else
4293   echo "$as_me:4293: result: no" >&5
4294 echo "${ECHO_T}no" >&6
4295 fi
4296
4297 fi
4298 if test -z "$ac_cv_prog_AR"; then
4299   ac_ct_AR=$AR
4300   # Extract the first word of "ar", so it can be a program name with args.
4301 set dummy ar; ac_word=$2
4302 echo "$as_me:4302: checking for $ac_word" >&5
4303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4304 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if test -n "$ac_ct_AR"; then
4308   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4309 else
4310   ac_save_IFS=$IFS; IFS=$ac_path_separator
4311 ac_dummy="$PATH"
4312 for ac_dir in $ac_dummy; do
4313   IFS=$ac_save_IFS
4314   test -z "$ac_dir" && ac_dir=.
4315   $as_executable_p "$ac_dir/$ac_word" || continue
4316 ac_cv_prog_ac_ct_AR="ar"
4317 echo "$as_me:4317: found $ac_dir/$ac_word" >&5
4318 break
4319 done
4320
4321   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4322 fi
4323 fi
4324 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4325 if test -n "$ac_ct_AR"; then
4326   echo "$as_me:4326: result: $ac_ct_AR" >&5
4327 echo "${ECHO_T}$ac_ct_AR" >&6
4328 else
4329   echo "$as_me:4329: result: no" >&5
4330 echo "${ECHO_T}no" >&6
4331 fi
4332
4333   AR=$ac_ct_AR
4334 else
4335   AR="$ac_cv_prog_AR"
4336 fi
4337
4338 echo "$as_me:4338: checking for options to update archives" >&5
4339 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4340 if test "${cf_cv_ar_flags+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343
4344         cf_cv_ar_flags=unknown
4345         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4346         do
4347
4348                 # check if $ARFLAGS already contains this choice
4349                 if test "x$ARFLAGS" != "x" ; then
4350                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4351                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4352                                 cf_cv_ar_flags=
4353                                 break
4354                         fi
4355                 fi
4356
4357                 rm -f conftest.$ac_cv_objext
4358                 rm -f conftest.a
4359
4360                 cat >conftest.$ac_ext <<EOF
4361 #line 4361 "configure"
4362 int     testdata[3] = { 123, 456, 789 };
4363 EOF
4364                 if { (eval echo "$as_me:4364: \"$ac_compile\"") >&5
4365   (eval $ac_compile) 2>&5
4366   ac_status=$?
4367   echo "$as_me:4367: \$? = $ac_status" >&5
4368   (exit $ac_status); } ; then
4369                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4370                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4371                         if test -f conftest.a ; then
4372                                 cf_cv_ar_flags=$cf_ar_flags
4373                                 break
4374                         fi
4375                 else
4376                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4377
4378 echo "${as_me:-configure}:4378: testing cannot compile test-program ..." 1>&5
4379
4380                         break
4381                 fi
4382         done
4383         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4384
4385 fi
4386 echo "$as_me:4386: result: $cf_cv_ar_flags" >&5
4387 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4388
4389 if test -n "$ARFLAGS" ; then
4390         if test -n "$cf_cv_ar_flags" ; then
4391                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4392         fi
4393 else
4394         ARFLAGS=$cf_cv_ar_flags
4395 fi
4396
4397 echo "$as_me:4397: checking if you have specified an install-prefix" >&5
4398 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4399
4400 # Check whether --with-install-prefix or --without-install-prefix was given.
4401 if test "${with_install_prefix+set}" = set; then
4402   withval="$with_install_prefix"
4403   case "x$withval" in #(vi
4404         xyes|xno) #(vi
4405                 ;;
4406         *)      DESTDIR="$withval"
4407                 ;;
4408         esac
4409 fi;
4410 echo "$as_me:4410: result: $DESTDIR" >&5
4411 echo "${ECHO_T}$DESTDIR" >&6
4412
4413 ###############################################################################
4414
4415 # If we're cross-compiling, allow the user to override the tools and their
4416 # options.  The configure script is oriented toward identifying the host
4417 # compiler, etc., but we need a build compiler to generate parts of the source.
4418
4419 if test "$cross_compiling" = yes ; then
4420
4421         # defaults that we might want to override
4422         : ${BUILD_CFLAGS:=''}
4423         : ${BUILD_CPPFLAGS:=''}
4424         : ${BUILD_LDFLAGS:=''}
4425         : ${BUILD_LIBS:=''}
4426         : ${BUILD_EXEEXT:='$x'}
4427         : ${BUILD_OBJEXT:='o'}
4428
4429 # Check whether --with-build-cc or --without-build-cc was given.
4430 if test "${with_build_cc+set}" = set; then
4431   withval="$with_build_cc"
4432   BUILD_CC="$withval"
4433 else
4434   for ac_prog in gcc cc cl
4435 do
4436   # Extract the first word of "$ac_prog", so it can be a program name with args.
4437 set dummy $ac_prog; ac_word=$2
4438 echo "$as_me:4438: checking for $ac_word" >&5
4439 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4440 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4441   echo $ECHO_N "(cached) $ECHO_C" >&6
4442 else
4443   if test -n "$BUILD_CC"; then
4444   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4445 else
4446   ac_save_IFS=$IFS; IFS=$ac_path_separator
4447 ac_dummy="$PATH"
4448 for ac_dir in $ac_dummy; do
4449   IFS=$ac_save_IFS
4450   test -z "$ac_dir" && ac_dir=.
4451   $as_executable_p "$ac_dir/$ac_word" || continue
4452 ac_cv_prog_BUILD_CC="$ac_prog"
4453 echo "$as_me:4453: found $ac_dir/$ac_word" >&5
4454 break
4455 done
4456
4457 fi
4458 fi
4459 BUILD_CC=$ac_cv_prog_BUILD_CC
4460 if test -n "$BUILD_CC"; then
4461   echo "$as_me:4461: result: $BUILD_CC" >&5
4462 echo "${ECHO_T}$BUILD_CC" >&6
4463 else
4464   echo "$as_me:4464: result: no" >&5
4465 echo "${ECHO_T}no" >&6
4466 fi
4467
4468   test -n "$BUILD_CC" && break
4469 done
4470
4471 fi;
4472         echo "$as_me:4472: checking for native build C compiler" >&5
4473 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4474         echo "$as_me:4474: result: $BUILD_CC" >&5
4475 echo "${ECHO_T}$BUILD_CC" >&6
4476
4477         echo "$as_me:4477: checking for native build C preprocessor" >&5
4478 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4479
4480 # Check whether --with-build-cpp or --without-build-cpp was given.
4481 if test "${with_build_cpp+set}" = set; then
4482   withval="$with_build_cpp"
4483   BUILD_CPP="$withval"
4484 else
4485   BUILD_CPP='${BUILD_CC} -E'
4486 fi;
4487         echo "$as_me:4487: result: $BUILD_CPP" >&5
4488 echo "${ECHO_T}$BUILD_CPP" >&6
4489
4490         echo "$as_me:4490: checking for native build C flags" >&5
4491 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4492
4493 # Check whether --with-build-cflags or --without-build-cflags was given.
4494 if test "${with_build_cflags+set}" = set; then
4495   withval="$with_build_cflags"
4496   BUILD_CFLAGS="$withval"
4497 fi;
4498         echo "$as_me:4498: result: $BUILD_CFLAGS" >&5
4499 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4500
4501         echo "$as_me:4501: checking for native build C preprocessor-flags" >&5
4502 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4503
4504 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4505 if test "${with_build_cppflags+set}" = set; then
4506   withval="$with_build_cppflags"
4507   BUILD_CPPFLAGS="$withval"
4508 fi;
4509         echo "$as_me:4509: result: $BUILD_CPPFLAGS" >&5
4510 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4511
4512         echo "$as_me:4512: checking for native build linker-flags" >&5
4513 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4514
4515 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4516 if test "${with_build_ldflags+set}" = set; then
4517   withval="$with_build_ldflags"
4518   BUILD_LDFLAGS="$withval"
4519 fi;
4520         echo "$as_me:4520: result: $BUILD_LDFLAGS" >&5
4521 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4522
4523         echo "$as_me:4523: checking for native build linker-libraries" >&5
4524 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4525
4526 # Check whether --with-build-libs or --without-build-libs was given.
4527 if test "${with_build_libs+set}" = set; then
4528   withval="$with_build_libs"
4529   BUILD_LIBS="$withval"
4530 fi;
4531         echo "$as_me:4531: result: $BUILD_LIBS" >&5
4532 echo "${ECHO_T}$BUILD_LIBS" >&6
4533
4534         # this assumes we're on Unix.
4535         BUILD_EXEEXT=
4536         BUILD_OBJEXT=o
4537
4538         : ${BUILD_CC:='${CC}'}
4539
4540         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4541                 { { echo "$as_me:4541: error: Cross-build requires two compilers.
4542 Use --with-build-cc to specify the native compiler." >&5
4543 echo "$as_me: error: Cross-build requires two compilers.
4544 Use --with-build-cc to specify the native compiler." >&2;}
4545    { (exit 1); exit 1; }; }
4546         fi
4547
4548 else
4549         : ${BUILD_CC:='${CC}'}
4550         : ${BUILD_CPP:='${CPP}'}
4551         : ${BUILD_CFLAGS:='${CFLAGS}'}
4552         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4553         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4554         : ${BUILD_LIBS:='${LIBS}'}
4555         : ${BUILD_EXEEXT:='$x'}
4556         : ${BUILD_OBJEXT:='o'}
4557 fi
4558
4559 ###############################################################################
4560
4561 ### Options to allow the user to specify the set of libraries which are used.
4562 ### Use "--without-normal --with-shared" to allow the default model to be
4563 ### shared, for example.
4564 cf_list_models=""
4565
4566 echo "$as_me:4566: checking if libtool -version-number should be used" >&5
4567 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4568
4569 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4570 if test "${enable_libtool_version+set}" = set; then
4571   enableval="$enable_libtool_version"
4572   test "$enableval" != no && enableval=yes
4573   if test "$enableval" != "yes" ; then
4574     cf_libtool_version=no
4575   else
4576     cf_libtool_version=yes
4577   fi
4578 else
4579   enableval=yes
4580   cf_libtool_version=yes
4581
4582 fi;
4583 echo "$as_me:4583: result: $cf_libtool_version" >&5
4584 echo "${ECHO_T}$cf_libtool_version" >&6
4585
4586 if test "$cf_libtool_version" = yes ; then
4587         LIBTOOL_VERSION="-version-number"
4588 else
4589         LIBTOOL_VERSION="-version-info"
4590         case "x$VERSION" in #(vi
4591         x) #(vi
4592                 { echo "$as_me:4592: WARNING: VERSION was not set" >&5
4593 echo "$as_me: WARNING: VERSION was not set" >&2;}
4594                 ;;
4595         x*.*.*)
4596                 ABI_VERSION="$VERSION"
4597                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4598
4599 echo "${as_me:-configure}:4599: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4600
4601                 ;;
4602         x*:*:*)
4603                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4604                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4605
4606 echo "${as_me:-configure}:4606: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4607
4608                 ;;
4609         *)
4610                 { echo "$as_me:4610: WARNING: unexpected VERSION value: $VERSION" >&5
4611 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4612                 ;;
4613         esac
4614 fi
4615
4616 LIBTOOL=
4617
4618 # common library maintenance symbols that are convenient for libtool scripts:
4619 LIB_CREATE='${AR} -cr'
4620 LIB_OBJECT='${OBJECTS}'
4621 LIB_SUFFIX=.a
4622 LIB_PREP="$RANLIB"
4623
4624 # symbols used to prop libtool up to enable it to determine what it should be
4625 # doing:
4626 LIB_CLEAN=
4627 LIB_COMPILE=
4628 LIB_LINK='${CC}'
4629 LIB_INSTALL=
4630 LIB_UNINSTALL=
4631
4632 echo "$as_me:4632: checking if you want to build libraries with libtool" >&5
4633 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4634
4635 # Check whether --with-libtool or --without-libtool was given.
4636 if test "${with_libtool+set}" = set; then
4637   withval="$with_libtool"
4638   with_libtool=$withval
4639 else
4640   with_libtool=no
4641 fi;
4642 echo "$as_me:4642: result: $with_libtool" >&5
4643 echo "${ECHO_T}$with_libtool" >&6
4644 if test "$with_libtool" != "no"; then
4645
4646         if test "$with_libtool" != "yes" ; then
4647
4648 if test "x$prefix" != xNONE; then
4649   cf_path_syntax="$prefix"
4650 else
4651   cf_path_syntax="$ac_default_prefix"
4652 fi
4653
4654 case ".$with_libtool" in #(vi
4655 .\$\(*\)*|.\'*\'*) #(vi
4656   ;;
4657 ..|./*|.\\*) #(vi
4658   ;;
4659 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4660   ;;
4661 .\${*prefix}*|.\${*dir}*) #(vi
4662   eval with_libtool="$with_libtool"
4663   case ".$with_libtool" in #(vi
4664   .NONE/*)
4665     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4666     ;;
4667   esac
4668   ;; #(vi
4669 .no|.NONE/*)
4670   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4671   ;;
4672 *)
4673   { { echo "$as_me:4673: error: expected a pathname, not \"$with_libtool\"" >&5
4674 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4675    { (exit 1); exit 1; }; }
4676   ;;
4677 esac
4678
4679                 LIBTOOL=$with_libtool
4680         else
4681                 if test -n "$ac_tool_prefix"; then
4682   for ac_prog in libtool glibtool
4683   do
4684     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4685 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4686 echo "$as_me:4686: checking for $ac_word" >&5
4687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4688 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4689   echo $ECHO_N "(cached) $ECHO_C" >&6
4690 else
4691   if test -n "$LIBTOOL"; then
4692   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4693 else
4694   ac_save_IFS=$IFS; IFS=$ac_path_separator
4695 ac_dummy="$PATH"
4696 for ac_dir in $ac_dummy; do
4697   IFS=$ac_save_IFS
4698   test -z "$ac_dir" && ac_dir=.
4699   $as_executable_p "$ac_dir/$ac_word" || continue
4700 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4701 echo "$as_me:4701: found $ac_dir/$ac_word" >&5
4702 break
4703 done
4704
4705 fi
4706 fi
4707 LIBTOOL=$ac_cv_prog_LIBTOOL
4708 if test -n "$LIBTOOL"; then
4709   echo "$as_me:4709: result: $LIBTOOL" >&5
4710 echo "${ECHO_T}$LIBTOOL" >&6
4711 else
4712   echo "$as_me:4712: result: no" >&5
4713 echo "${ECHO_T}no" >&6
4714 fi
4715
4716     test -n "$LIBTOOL" && break
4717   done
4718 fi
4719 if test -z "$LIBTOOL"; then
4720   ac_ct_LIBTOOL=$LIBTOOL
4721   for ac_prog in libtool glibtool
4722 do
4723   # Extract the first word of "$ac_prog", so it can be a program name with args.
4724 set dummy $ac_prog; ac_word=$2
4725 echo "$as_me:4725: checking for $ac_word" >&5
4726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4727 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4728   echo $ECHO_N "(cached) $ECHO_C" >&6
4729 else
4730   if test -n "$ac_ct_LIBTOOL"; then
4731   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4732 else
4733   ac_save_IFS=$IFS; IFS=$ac_path_separator
4734 ac_dummy="$PATH"
4735 for ac_dir in $ac_dummy; do
4736   IFS=$ac_save_IFS
4737   test -z "$ac_dir" && ac_dir=.
4738   $as_executable_p "$ac_dir/$ac_word" || continue
4739 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4740 echo "$as_me:4740: found $ac_dir/$ac_word" >&5
4741 break
4742 done
4743
4744 fi
4745 fi
4746 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4747 if test -n "$ac_ct_LIBTOOL"; then
4748   echo "$as_me:4748: result: $ac_ct_LIBTOOL" >&5
4749 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4750 else
4751   echo "$as_me:4751: result: no" >&5
4752 echo "${ECHO_T}no" >&6
4753 fi
4754
4755   test -n "$ac_ct_LIBTOOL" && break
4756 done
4757 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4758
4759   LIBTOOL=$ac_ct_LIBTOOL
4760 fi
4761
4762 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4763 then
4764         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.].*//'`
4765 else
4766         cf_cv_libtool_version=
4767 fi
4768 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4769
4770                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4771                 then
4772
4773 unset ac_cv_prog_ac_ct_LIBTOOL
4774 unset ac_ct_LIBTOOL
4775 unset LIBTOOL
4776
4777                         if test -n "$ac_tool_prefix"; then
4778   for ac_prog in glibtool
4779   do
4780     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4781 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4782 echo "$as_me:4782: checking for $ac_word" >&5
4783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4784 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4785   echo $ECHO_N "(cached) $ECHO_C" >&6
4786 else
4787   if test -n "$LIBTOOL"; then
4788   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4789 else
4790   ac_save_IFS=$IFS; IFS=$ac_path_separator
4791 ac_dummy="$PATH"
4792 for ac_dir in $ac_dummy; do
4793   IFS=$ac_save_IFS
4794   test -z "$ac_dir" && ac_dir=.
4795   $as_executable_p "$ac_dir/$ac_word" || continue
4796 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4797 echo "$as_me:4797: found $ac_dir/$ac_word" >&5
4798 break
4799 done
4800
4801 fi
4802 fi
4803 LIBTOOL=$ac_cv_prog_LIBTOOL
4804 if test -n "$LIBTOOL"; then
4805   echo "$as_me:4805: result: $LIBTOOL" >&5
4806 echo "${ECHO_T}$LIBTOOL" >&6
4807 else
4808   echo "$as_me:4808: result: no" >&5
4809 echo "${ECHO_T}no" >&6
4810 fi
4811
4812     test -n "$LIBTOOL" && break
4813   done
4814 fi
4815 if test -z "$LIBTOOL"; then
4816   ac_ct_LIBTOOL=$LIBTOOL
4817   for ac_prog in glibtool
4818 do
4819   # Extract the first word of "$ac_prog", so it can be a program name with args.
4820 set dummy $ac_prog; ac_word=$2
4821 echo "$as_me:4821: checking for $ac_word" >&5
4822 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4823 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4824   echo $ECHO_N "(cached) $ECHO_C" >&6
4825 else
4826   if test -n "$ac_ct_LIBTOOL"; then
4827   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4828 else
4829   ac_save_IFS=$IFS; IFS=$ac_path_separator
4830 ac_dummy="$PATH"
4831 for ac_dir in $ac_dummy; do
4832   IFS=$ac_save_IFS
4833   test -z "$ac_dir" && ac_dir=.
4834   $as_executable_p "$ac_dir/$ac_word" || continue
4835 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4836 echo "$as_me:4836: found $ac_dir/$ac_word" >&5
4837 break
4838 done
4839
4840 fi
4841 fi
4842 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4843 if test -n "$ac_ct_LIBTOOL"; then
4844   echo "$as_me:4844: result: $ac_ct_LIBTOOL" >&5
4845 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4846 else
4847   echo "$as_me:4847: result: no" >&5
4848 echo "${ECHO_T}no" >&6
4849 fi
4850
4851   test -n "$ac_ct_LIBTOOL" && break
4852 done
4853 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4854
4855   LIBTOOL=$ac_ct_LIBTOOL
4856 fi
4857
4858 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4859 then
4860         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.].*//'`
4861 else
4862         cf_cv_libtool_version=
4863 fi
4864 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4865
4866                 fi
4867         fi
4868         if test -z "$LIBTOOL" ; then
4869                 { { echo "$as_me:4869: error: Cannot find libtool" >&5
4870 echo "$as_me: error: Cannot find libtool" >&2;}
4871    { (exit 1); exit 1; }; }
4872         fi
4873         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4874         LIB_OBJECT='${OBJECTS:.o=.lo}'
4875         LIB_SUFFIX=.la
4876         LIB_CLEAN='${LIBTOOL} --mode=clean'
4877         LIB_COMPILE='${LIBTOOL} --mode=compile'
4878         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4879         LIB_INSTALL='${LIBTOOL} --mode=install'
4880         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4881         LIB_PREP=:
4882
4883 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4884 then
4885         echo "$as_me:4885: checking version of $LIBTOOL" >&5
4886 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4887
4888 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4889 then
4890         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.].*//'`
4891 else
4892         cf_cv_libtool_version=
4893 fi
4894 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4895
4896         echo "$as_me:4896: result: $cf_cv_libtool_version" >&5
4897 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4898         if test -z "$cf_cv_libtool_version" ; then
4899                 { { echo "$as_me:4899: error: This is not GNU libtool" >&5
4900 echo "$as_me: error: This is not GNU libtool" >&2;}
4901    { (exit 1); exit 1; }; }
4902         fi
4903 else
4904         { { echo "$as_me:4904: error: GNU libtool has not been found" >&5
4905 echo "$as_me: error: GNU libtool has not been found" >&2;}
4906    { (exit 1); exit 1; }; }
4907 fi
4908
4909         # special hack to add -no-undefined (which libtool should do for itself)
4910         LT_UNDEF=
4911         case "$cf_cv_system_name" in #(vi
4912         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4913                 LT_UNDEF=-no-undefined
4914                 ;;
4915         esac
4916
4917         # special hack to add --tag option for C++ compiler
4918         case $cf_cv_libtool_version in #(vi
4919         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4920                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4921                 LIBTOOL="$LIBTOOL --tag=CC"
4922                 ;;
4923         *)
4924                 LIBTOOL_CXX="$LIBTOOL"
4925                 ;;
4926         esac
4927 else
4928         LIBTOOL=""
4929         LIBTOOL_CXX=""
4930 fi
4931
4932 test -z "$LIBTOOL" && ECHO_LT=
4933
4934 if test "$with_libtool" != "no" ; then
4935
4936 cf_list_models="$cf_list_models libtool"
4937
4938 else
4939
4940 echo "$as_me:4940: checking if you want to build shared libraries" >&5
4941 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4942
4943 # Check whether --with-shared or --without-shared was given.
4944 if test "${with_shared+set}" = set; then
4945   withval="$with_shared"
4946   with_shared=$withval
4947 else
4948   with_shared=no
4949 fi;
4950 echo "$as_me:4950: result: $with_shared" >&5
4951 echo "${ECHO_T}$with_shared" >&6
4952 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4953
4954 echo "$as_me:4954: checking if you want to build static libraries" >&5
4955 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4956
4957 # Check whether --with-normal or --without-normal was given.
4958 if test "${with_normal+set}" = set; then
4959   withval="$with_normal"
4960   with_normal=$withval
4961 else
4962   with_normal=yes
4963 fi;
4964 echo "$as_me:4964: result: $with_normal" >&5
4965 echo "${ECHO_T}$with_normal" >&6
4966 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4967
4968 echo "$as_me:4968: checking if you want to build debug libraries" >&5
4969 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4970
4971 # Check whether --with-debug or --without-debug was given.
4972 if test "${with_debug+set}" = set; then
4973   withval="$with_debug"
4974   with_debug=$withval
4975 else
4976   with_debug=yes
4977 fi;
4978 echo "$as_me:4978: result: $with_debug" >&5
4979 echo "${ECHO_T}$with_debug" >&6
4980 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4981
4982 echo "$as_me:4982: checking if you want to build profiling libraries" >&5
4983 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4984
4985 # Check whether --with-profile or --without-profile was given.
4986 if test "${with_profile+set}" = set; then
4987   withval="$with_profile"
4988   with_profile=$withval
4989 else
4990   with_profile=no
4991 fi;
4992 echo "$as_me:4992: result: $with_profile" >&5
4993 echo "${ECHO_T}$with_profile" >&6
4994 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4995
4996 fi
4997
4998 if test "X$cf_with_cxx_binding" != Xno; then
4999 if test "x$with_shared" = "xyes"; then
5000 echo "$as_me:5000: checking if you want to build C++ shared libraries" >&5
5001 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5002
5003 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5004 if test "${with_cxx_shared+set}" = set; then
5005   withval="$with_cxx_shared"
5006   with_shared_cxx=$withval
5007 else
5008   with_shared_cxx=no
5009 fi;
5010 echo "$as_me:5010: result: $with_shared_cxx" >&5
5011 echo "${ECHO_T}$with_shared_cxx" >&6
5012 fi
5013 fi
5014
5015 ###############################################################################
5016
5017 echo "$as_me:5017: checking for specified models" >&5
5018 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5019 test -z "$cf_list_models" && cf_list_models=normal
5020 test "$with_libtool" != "no" && cf_list_models=libtool
5021 echo "$as_me:5021: result: $cf_list_models" >&5
5022 echo "${ECHO_T}$cf_list_models" >&6
5023
5024 ### Use the first model as the default, and save its suffix for use in building
5025 ### up test-applications.
5026 echo "$as_me:5026: checking for default model" >&5
5027 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5028 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5029 echo "$as_me:5029: result: $DFT_LWR_MODEL" >&5
5030 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5031
5032 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5033
5034 TICS_NAME=tic
5035
5036 TINFO_NAME=tinfo
5037
5038 LIB_NAME=ncurses
5039
5040 LIB_DIR=../lib
5041 LIB_2ND=../../lib
5042
5043 echo "$as_me:5043: checking if you want to have a library-prefix" >&5
5044 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5045
5046 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5047 if test "${with_lib_prefix+set}" = set; then
5048   withval="$with_lib_prefix"
5049   with_lib_prefix=$withval
5050 else
5051   with_lib_prefix=auto
5052 fi;
5053 echo "$as_me:5053: result: $with_lib_prefix" >&5
5054 echo "${ECHO_T}$with_lib_prefix" >&6
5055
5056 if test $with_lib_prefix = auto
5057 then
5058
5059         case $cf_cv_system_name in #(vi
5060         OS/2*|os2*) #(vi
5061         LIB_PREFIX=''
5062         ;;
5063         *)      LIB_PREFIX='lib'
5064         ;;
5065         esac
5066 cf_prefix=$LIB_PREFIX
5067
5068 elif test $with_lib_prefix = no
5069 then
5070         LIB_PREFIX=
5071 else
5072         LIB_PREFIX=$with_lib_prefix
5073 fi
5074
5075 LIB_SUFFIX=
5076
5077         echo "$as_me:5077: checking for PATH separator" >&5
5078 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5079         case $cf_cv_system_name in
5080         os2*)   PATH_SEPARATOR=';'  ;;
5081         *)      ${PATH_SEPARATOR:=':'}  ;;
5082         esac
5083
5084         echo "$as_me:5084: result: $PATH_SEPARATOR" >&5
5085 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5086
5087 ###############################################################################
5088
5089 echo "$as_me:5089: checking if you want to build a separate terminfo library" >&5
5090 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5091
5092 # Check whether --with-termlib or --without-termlib was given.
5093 if test "${with_termlib+set}" = set; then
5094   withval="$with_termlib"
5095   with_termlib=$withval
5096 else
5097   with_termlib=no
5098 fi;
5099 echo "$as_me:5099: result: $with_termlib" >&5
5100 echo "${ECHO_T}$with_termlib" >&6
5101
5102 echo "$as_me:5102: checking if you want to build a separate tic library" >&5
5103 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5104
5105 # Check whether --with-ticlib or --without-ticlib was given.
5106 if test "${with_ticlib+set}" = set; then
5107   withval="$with_ticlib"
5108   with_ticlib=$withval
5109 else
5110   with_ticlib=no
5111 fi;
5112 echo "$as_me:5112: result: $with_ticlib" >&5
5113 echo "${ECHO_T}$with_ticlib" >&6
5114
5115 ### Checks for special libraries, must be done up-front.
5116 SHLIB_LIST=""
5117
5118 echo "$as_me:5118: checking if you want to link with the GPM mouse library" >&5
5119 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5120
5121 # Check whether --with-gpm or --without-gpm was given.
5122 if test "${with_gpm+set}" = set; then
5123   withval="$with_gpm"
5124   with_gpm=$withval
5125 else
5126   with_gpm=maybe
5127 fi;
5128 echo "$as_me:5128: result: $with_gpm" >&5
5129 echo "${ECHO_T}$with_gpm" >&6
5130
5131 if test "$with_gpm" != no ; then
5132         echo "$as_me:5132: checking for gpm.h" >&5
5133 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5134 if test "${ac_cv_header_gpm_h+set}" = set; then
5135   echo $ECHO_N "(cached) $ECHO_C" >&6
5136 else
5137   cat >conftest.$ac_ext <<_ACEOF
5138 #line 5138 "configure"
5139 #include "confdefs.h"
5140 #include <gpm.h>
5141 _ACEOF
5142 if { (eval echo "$as_me:5142: \"$ac_cpp conftest.$ac_ext\"") >&5
5143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5144   ac_status=$?
5145   egrep -v '^ *\+' conftest.er1 >conftest.err
5146   rm -f conftest.er1
5147   cat conftest.err >&5
5148   echo "$as_me:5148: \$? = $ac_status" >&5
5149   (exit $ac_status); } >/dev/null; then
5150   if test -s conftest.err; then
5151     ac_cpp_err=$ac_c_preproc_warn_flag
5152   else
5153     ac_cpp_err=
5154   fi
5155 else
5156   ac_cpp_err=yes
5157 fi
5158 if test -z "$ac_cpp_err"; then
5159   ac_cv_header_gpm_h=yes
5160 else
5161   echo "$as_me: failed program was:" >&5
5162   cat conftest.$ac_ext >&5
5163   ac_cv_header_gpm_h=no
5164 fi
5165 rm -f conftest.err conftest.$ac_ext
5166 fi
5167 echo "$as_me:5167: result: $ac_cv_header_gpm_h" >&5
5168 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5169 if test $ac_cv_header_gpm_h = yes; then
5170
5171 cat >>confdefs.h <<\EOF
5172 #define HAVE_GPM_H 1
5173 EOF
5174
5175                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5176                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5177
5178 echo "${as_me:-configure}:5178: testing assuming we really have GPM library ..." 1>&5
5179
5180 cat >>confdefs.h <<\EOF
5181 #define HAVE_LIBGPM 1
5182 EOF
5183
5184                 else
5185                         echo "$as_me:5185: checking for Gpm_Open in -lgpm" >&5
5186 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5187 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5188   echo $ECHO_N "(cached) $ECHO_C" >&6
5189 else
5190   ac_check_lib_save_LIBS=$LIBS
5191 LIBS="-lgpm  $LIBS"
5192 cat >conftest.$ac_ext <<_ACEOF
5193 #line 5193 "configure"
5194 #include "confdefs.h"
5195
5196 /* Override any gcc2 internal prototype to avoid an error.  */
5197 #ifdef __cplusplus
5198 extern "C"
5199 #endif
5200 /* We use char because int might match the return type of a gcc2
5201    builtin and then its argument prototype would still apply.  */
5202 char Gpm_Open ();
5203 int
5204 main ()
5205 {
5206 Gpm_Open ();
5207   ;
5208   return 0;
5209 }
5210 _ACEOF
5211 rm -f conftest.$ac_objext conftest$ac_exeext
5212 if { (eval echo "$as_me:5212: \"$ac_link\"") >&5
5213   (eval $ac_link) 2>&5
5214   ac_status=$?
5215   echo "$as_me:5215: \$? = $ac_status" >&5
5216   (exit $ac_status); } &&
5217          { ac_try='test -s conftest$ac_exeext'
5218   { (eval echo "$as_me:5218: \"$ac_try\"") >&5
5219   (eval $ac_try) 2>&5
5220   ac_status=$?
5221   echo "$as_me:5221: \$? = $ac_status" >&5
5222   (exit $ac_status); }; }; then
5223   ac_cv_lib_gpm_Gpm_Open=yes
5224 else
5225   echo "$as_me: failed program was:" >&5
5226 cat conftest.$ac_ext >&5
5227 ac_cv_lib_gpm_Gpm_Open=no
5228 fi
5229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5230 LIBS=$ac_check_lib_save_LIBS
5231 fi
5232 echo "$as_me:5232: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5233 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5234 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5235   :
5236 else
5237
5238                                 { { echo "$as_me:5238: error: Cannot link with GPM library" >&5
5239 echo "$as_me: error: Cannot link with GPM library" >&2;}
5240    { (exit 1); exit 1; }; }
5241                 fi
5242                 with_gpm=yes
5243
5244 fi
5245
5246 else
5247
5248                 test "$with_gpm" != maybe && { echo "$as_me:5248: WARNING: Cannot find GPM header" >&5
5249 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5250                 with_gpm=no
5251
5252 fi
5253
5254 fi
5255
5256 if test "$with_gpm" != no ; then
5257         echo "$as_me:5257: checking if you want to load GPM dynamically" >&5
5258 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5259
5260 # Check whether --with-dlsym or --without-dlsym was given.
5261 if test "${with_dlsym+set}" = set; then
5262   withval="$with_dlsym"
5263   with_dlsym=$withval
5264 else
5265   with_dlsym=yes
5266 fi;
5267         echo "$as_me:5267: result: $with_dlsym" >&5
5268 echo "${ECHO_T}$with_dlsym" >&6
5269         if test "x$with_dlsym" = xyes ; then
5270
5271 cf_have_dlsym=no
5272 echo "$as_me:5272: checking for dlsym" >&5
5273 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5274 if test "${ac_cv_func_dlsym+set}" = set; then
5275   echo $ECHO_N "(cached) $ECHO_C" >&6
5276 else
5277   cat >conftest.$ac_ext <<_ACEOF
5278 #line 5278 "configure"
5279 #include "confdefs.h"
5280 /* System header to define __stub macros and hopefully few prototypes,
5281     which can conflict with char dlsym (); below.  */
5282 #include <assert.h>
5283 /* Override any gcc2 internal prototype to avoid an error.  */
5284 #ifdef __cplusplus
5285 extern "C"
5286 #endif
5287 /* We use char because int might match the return type of a gcc2
5288    builtin and then its argument prototype would still apply.  */
5289 char dlsym ();
5290 char (*f) ();
5291
5292 int
5293 main ()
5294 {
5295 /* The GNU C library defines this for functions which it implements
5296     to always fail with ENOSYS.  Some functions are actually named
5297     something starting with __ and the normal name is an alias.  */
5298 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5299 choke me
5300 #else
5301 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5302 #endif
5303
5304   ;
5305   return 0;
5306 }
5307 _ACEOF
5308 rm -f conftest.$ac_objext conftest$ac_exeext
5309 if { (eval echo "$as_me:5309: \"$ac_link\"") >&5
5310   (eval $ac_link) 2>&5
5311   ac_status=$?
5312   echo "$as_me:5312: \$? = $ac_status" >&5
5313   (exit $ac_status); } &&
5314          { ac_try='test -s conftest$ac_exeext'
5315   { (eval echo "$as_me:5315: \"$ac_try\"") >&5
5316   (eval $ac_try) 2>&5
5317   ac_status=$?
5318   echo "$as_me:5318: \$? = $ac_status" >&5
5319   (exit $ac_status); }; }; then
5320   ac_cv_func_dlsym=yes
5321 else
5322   echo "$as_me: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 ac_cv_func_dlsym=no
5325 fi
5326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5327 fi
5328 echo "$as_me:5328: result: $ac_cv_func_dlsym" >&5
5329 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5330 if test $ac_cv_func_dlsym = yes; then
5331   cf_have_dlsym=yes
5332 else
5333
5334 cf_have_libdl=no
5335 echo "$as_me:5335: checking for dlsym in -ldl" >&5
5336 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5337 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5338   echo $ECHO_N "(cached) $ECHO_C" >&6
5339 else
5340   ac_check_lib_save_LIBS=$LIBS
5341 LIBS="-ldl  $LIBS"
5342 cat >conftest.$ac_ext <<_ACEOF
5343 #line 5343 "configure"
5344 #include "confdefs.h"
5345
5346 /* Override any gcc2 internal prototype to avoid an error.  */
5347 #ifdef __cplusplus
5348 extern "C"
5349 #endif
5350 /* We use char because int might match the return type of a gcc2
5351    builtin and then its argument prototype would still apply.  */
5352 char dlsym ();
5353 int
5354 main ()
5355 {
5356 dlsym ();
5357   ;
5358   return 0;
5359 }
5360 _ACEOF
5361 rm -f conftest.$ac_objext conftest$ac_exeext
5362 if { (eval echo "$as_me:5362: \"$ac_link\"") >&5
5363   (eval $ac_link) 2>&5
5364   ac_status=$?
5365   echo "$as_me:5365: \$? = $ac_status" >&5
5366   (exit $ac_status); } &&
5367          { ac_try='test -s conftest$ac_exeext'
5368   { (eval echo "$as_me:5368: \"$ac_try\"") >&5
5369   (eval $ac_try) 2>&5
5370   ac_status=$?
5371   echo "$as_me:5371: \$? = $ac_status" >&5
5372   (exit $ac_status); }; }; then
5373   ac_cv_lib_dl_dlsym=yes
5374 else
5375   echo "$as_me: failed program was:" >&5
5376 cat conftest.$ac_ext >&5
5377 ac_cv_lib_dl_dlsym=no
5378 fi
5379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5380 LIBS=$ac_check_lib_save_LIBS
5381 fi
5382 echo "$as_me:5382: result: $ac_cv_lib_dl_dlsym" >&5
5383 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5384 if test $ac_cv_lib_dl_dlsym = yes; then
5385
5386         cf_have_dlsym=yes
5387         cf_have_libdl=yes
5388 fi
5389
5390 fi
5391
5392 if test "$cf_have_dlsym" = yes ; then
5393         test "$cf_have_libdl" = yes &&
5394 cf_add_libs="-ldl"
5395 # Filter out duplicates - this happens with badly-designed ".pc" files...
5396 for cf_add_1lib in $LIBS
5397 do
5398         for cf_add_2lib in $cf_add_libs
5399         do
5400                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5401                 then
5402                         cf_add_1lib=
5403                         break
5404                 fi
5405         done
5406         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5407 done
5408 LIBS="$cf_add_libs"
5409
5410         echo "$as_me:5410: checking whether able to link to dl*() functions" >&5
5411 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5412         cat >conftest.$ac_ext <<_ACEOF
5413 #line 5413 "configure"
5414 #include "confdefs.h"
5415 #include <dlfcn.h>
5416 int
5417 main ()
5418 {
5419
5420                 void *obj;
5421                 if ((obj = dlopen("filename", 0)) != 0) {
5422                         if (dlsym(obj, "symbolname") == 0) {
5423                         dlclose(obj);
5424                         }
5425                 }
5426   ;
5427   return 0;
5428 }
5429 _ACEOF
5430 rm -f conftest.$ac_objext conftest$ac_exeext
5431 if { (eval echo "$as_me:5431: \"$ac_link\"") >&5
5432   (eval $ac_link) 2>&5
5433   ac_status=$?
5434   echo "$as_me:5434: \$? = $ac_status" >&5
5435   (exit $ac_status); } &&
5436          { ac_try='test -s conftest$ac_exeext'
5437   { (eval echo "$as_me:5437: \"$ac_try\"") >&5
5438   (eval $ac_try) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); }; }; then
5442
5443 cat >>confdefs.h <<\EOF
5444 #define HAVE_LIBDL 1
5445 EOF
5446
5447 else
5448   echo "$as_me: failed program was:" >&5
5449 cat conftest.$ac_ext >&5
5450
5451                 { { echo "$as_me:5451: error: Cannot link test program for libdl" >&5
5452 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5453    { (exit 1); exit 1; }; }
5454 fi
5455 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5456         echo "$as_me:5456: result: ok" >&5
5457 echo "${ECHO_T}ok" >&6
5458 else
5459         { { echo "$as_me:5459: error: Cannot find dlsym function" >&5
5460 echo "$as_me: error: Cannot find dlsym function" >&2;}
5461    { (exit 1); exit 1; }; }
5462 fi
5463
5464                 if test "x$with_gpm" != xyes ; then
5465                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5466
5467 echo "${as_me:-configure}:5467: testing assuming soname for gpm is $with_gpm ..." 1>&5
5468
5469                         cf_cv_gpm_soname="$with_gpm"
5470                 else
5471
5472 echo "$as_me:5472: checking for soname of gpm library" >&5
5473 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5474 if test "${cf_cv_gpm_soname+set}" = set; then
5475   echo $ECHO_N "(cached) $ECHO_C" >&6
5476 else
5477
5478 cf_cv_gpm_soname=unknown
5479 if test "$cross_compiling" != yes ; then
5480 cat >conftest.$ac_ext <<CF_EOF
5481 #include <gpm.h>
5482 int main()
5483 {
5484 if (Gpm_Open(0,0)) Gpm_Close();
5485         ${cf_cv_main_return:-return}(0);
5486 }
5487 CF_EOF
5488 cf_save_LIBS="$LIBS"
5489
5490 cf_add_libs="-lgpm"
5491 # Filter out duplicates - this happens with badly-designed ".pc" files...
5492 for cf_add_1lib in $LIBS
5493 do
5494         for cf_add_2lib in $cf_add_libs
5495         do
5496                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5497                 then
5498                         cf_add_1lib=
5499                         break
5500                 fi
5501         done
5502         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5503 done
5504 LIBS="$cf_add_libs"
5505
5506         if { (eval echo "$as_me:5506: \"$ac_compile\"") >&5
5507   (eval $ac_compile) 2>&5
5508   ac_status=$?
5509   echo "$as_me:5509: \$? = $ac_status" >&5
5510   (exit $ac_status); } ; then
5511                 if { (eval echo "$as_me:5511: \"$ac_link\"") >&5
5512   (eval $ac_link) 2>&5
5513   ac_status=$?
5514   echo "$as_me:5514: \$? = $ac_status" >&5
5515   (exit $ac_status); } ; then
5516                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5517                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5518                 fi
5519         fi
5520 rm -rf conftest*
5521 LIBS="$cf_save_LIBS"
5522 fi
5523
5524 fi
5525 echo "$as_me:5525: result: $cf_cv_gpm_soname" >&5
5526 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5527
5528                 fi
5529                 test "$cf_cv_gpm_soname" != "unknown" &&
5530 cat >>confdefs.h <<EOF
5531 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5532 EOF
5533
5534                 SHLIB_LIST="-ldl $SHLIB_LIST"
5535         else
5536                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5537
5538 cf_add_libs="-lgpm"
5539 # Filter out duplicates - this happens with badly-designed ".pc" files...
5540 for cf_add_1lib in $TEST_LIBS
5541 do
5542         for cf_add_2lib in $cf_add_libs
5543         do
5544                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5545                 then
5546                         cf_add_1lib=
5547                         break
5548                 fi
5549         done
5550         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5551 done
5552 TEST_LIBS="$cf_add_libs"
5553
5554         fi
5555
5556 cat >>confdefs.h <<\EOF
5557 #define HAVE_LIBGPM 1
5558 EOF
5559
5560 echo "$as_me:5560: checking for Gpm_Wgetch in -lgpm" >&5
5561 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5562 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5563   echo $ECHO_N "(cached) $ECHO_C" >&6
5564 else
5565   ac_check_lib_save_LIBS=$LIBS
5566 LIBS="-lgpm  $LIBS"
5567 cat >conftest.$ac_ext <<_ACEOF
5568 #line 5568 "configure"
5569 #include "confdefs.h"
5570
5571 /* Override any gcc2 internal prototype to avoid an error.  */
5572 #ifdef __cplusplus
5573 extern "C"
5574 #endif
5575 /* We use char because int might match the return type of a gcc2
5576    builtin and then its argument prototype would still apply.  */
5577 char Gpm_Wgetch ();
5578 int
5579 main ()
5580 {
5581 Gpm_Wgetch ();
5582   ;
5583   return 0;
5584 }
5585 _ACEOF
5586 rm -f conftest.$ac_objext conftest$ac_exeext
5587 if { (eval echo "$as_me:5587: \"$ac_link\"") >&5
5588   (eval $ac_link) 2>&5
5589   ac_status=$?
5590   echo "$as_me:5590: \$? = $ac_status" >&5
5591   (exit $ac_status); } &&
5592          { ac_try='test -s conftest$ac_exeext'
5593   { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5594   (eval $ac_try) 2>&5
5595   ac_status=$?
5596   echo "$as_me:5596: \$? = $ac_status" >&5
5597   (exit $ac_status); }; }; then
5598   ac_cv_lib_gpm_Gpm_Wgetch=yes
5599 else
5600   echo "$as_me: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 ac_cv_lib_gpm_Gpm_Wgetch=no
5603 fi
5604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5605 LIBS=$ac_check_lib_save_LIBS
5606 fi
5607 echo "$as_me:5607: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5608 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5609 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5610
5611 echo "$as_me:5611: checking if GPM is weakly bound to curses library" >&5
5612 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5613 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5614   echo $ECHO_N "(cached) $ECHO_C" >&6
5615 else
5616
5617 cf_cv_check_gpm_wgetch=unknown
5618 if test "$cross_compiling" != yes ; then
5619
5620 cat >conftest.$ac_ext <<CF_EOF
5621 #include <gpm.h>
5622 int main()
5623 {
5624         Gpm_Wgetch();
5625         ${cf_cv_main_return:-return}(0);
5626 }
5627 CF_EOF
5628
5629         cf_save_LIBS="$LIBS"
5630         # This only works if we can look at the symbol table.  If a shared
5631         # library is stripped for install, we cannot use that.  So we're forced
5632         # to rely on the static library, noting that some packagers may not
5633         # include it.
5634         LIBS="-static -lgpm -dynamic $LIBS"
5635         if { (eval echo "$as_me:5635: \"$ac_compile\"") >&5
5636   (eval $ac_compile) 2>&5
5637   ac_status=$?
5638   echo "$as_me:5638: \$? = $ac_status" >&5
5639   (exit $ac_status); } ; then
5640                 if { (eval echo "$as_me:5640: \"$ac_link\"") >&5
5641   (eval $ac_link) 2>&5
5642   ac_status=$?
5643   echo "$as_me:5643: \$? = $ac_status" >&5
5644   (exit $ac_status); } ; then
5645                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5646                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5647                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5648                 fi
5649         fi
5650         rm -rf conftest*
5651         LIBS="$cf_save_LIBS"
5652 fi
5653
5654 fi
5655 echo "$as_me:5655: result: $cf_cv_check_gpm_wgetch" >&5
5656 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5657
5658 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5659         { echo "$as_me:5659: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5660 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5661 fi
5662
5663 fi
5664
5665 fi
5666
5667 # not everyone has "test -c"
5668 if test -c /dev/sysmouse 2>/dev/null ; then
5669 echo "$as_me:5669: checking if you want to use sysmouse" >&5
5670 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5671
5672 # Check whether --with-sysmouse or --without-sysmouse was given.
5673 if test "${with_sysmouse+set}" = set; then
5674   withval="$with_sysmouse"
5675   cf_with_sysmouse=$withval
5676 else
5677   cf_with_sysmouse=maybe
5678 fi;
5679         if test "$cf_with_sysmouse" != no ; then
5680         cat >conftest.$ac_ext <<_ACEOF
5681 #line 5681 "configure"
5682 #include "confdefs.h"
5683
5684 #include <osreldate.h>
5685 #if (__FreeBSD_version >= 400017)
5686 #include <sys/consio.h>
5687 #include <sys/fbio.h>
5688 #else
5689 #include <machine/console.h>
5690 #endif
5691
5692 int
5693 main ()
5694 {
5695
5696         struct mouse_info the_mouse;
5697         ioctl(0, CONS_MOUSECTL, &the_mouse);
5698
5699   ;
5700   return 0;
5701 }
5702 _ACEOF
5703 rm -f conftest.$ac_objext
5704 if { (eval echo "$as_me:5704: \"$ac_compile\"") >&5
5705   (eval $ac_compile) 2>&5
5706   ac_status=$?
5707   echo "$as_me:5707: \$? = $ac_status" >&5
5708   (exit $ac_status); } &&
5709          { ac_try='test -s conftest.$ac_objext'
5710   { (eval echo "$as_me:5710: \"$ac_try\"") >&5
5711   (eval $ac_try) 2>&5
5712   ac_status=$?
5713   echo "$as_me:5713: \$? = $ac_status" >&5
5714   (exit $ac_status); }; }; then
5715   cf_with_sysmouse=yes
5716 else
5717   echo "$as_me: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
5719 cf_with_sysmouse=no
5720 fi
5721 rm -f conftest.$ac_objext conftest.$ac_ext
5722         fi
5723 echo "$as_me:5723: result: $cf_with_sysmouse" >&5
5724 echo "${ECHO_T}$cf_with_sysmouse" >&6
5725 test "$cf_with_sysmouse" = yes &&
5726 cat >>confdefs.h <<\EOF
5727 #define USE_SYSMOUSE 1
5728 EOF
5729
5730 fi
5731
5732 if test X"$CC_G_OPT" = X"" ; then
5733         CC_G_OPT='-g'
5734         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5735 fi
5736
5737 if test X"$CXX_G_OPT" = X"" ; then
5738         CXX_G_OPT='-g'
5739         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5740 fi
5741
5742 echo "$as_me:5742: checking for default loader flags" >&5
5743 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5744 case $DFT_LWR_MODEL in
5745 libtool) LD_MODEL=''   ;;
5746 normal)  LD_MODEL=''   ;;
5747 debug)   LD_MODEL=$CC_G_OPT ;;
5748 profile) LD_MODEL='-pg';;
5749 shared)  LD_MODEL=''   ;;
5750 esac
5751 echo "$as_me:5751: result: $LD_MODEL" >&5
5752 echo "${ECHO_T}$LD_MODEL" >&6
5753
5754 case $DFT_LWR_MODEL in
5755 shared)
5756
5757 echo "$as_me:5757: checking if rpath option should be used" >&5
5758 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5759
5760 # Check whether --enable-rpath or --disable-rpath was given.
5761 if test "${enable_rpath+set}" = set; then
5762   enableval="$enable_rpath"
5763   cf_cv_enable_rpath=$enableval
5764 else
5765   cf_cv_enable_rpath=no
5766 fi;
5767 echo "$as_me:5767: result: $cf_cv_enable_rpath" >&5
5768 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5769
5770 echo "$as_me:5770: checking if shared libraries should be relinked during install" >&5
5771 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5772
5773 # Check whether --enable-relink or --disable-relink was given.
5774 if test "${enable_relink+set}" = set; then
5775   enableval="$enable_relink"
5776   cf_cv_do_relink=$enableval
5777 else
5778   cf_cv_do_relink=yes
5779 fi;
5780 echo "$as_me:5780: result: $cf_cv_do_relink" >&5
5781 echo "${ECHO_T}$cf_cv_do_relink" >&6
5782         ;;
5783 esac
5784
5785 # we will build libraries one-level down.
5786 rel_builddir=..
5787
5788 LD_RPATH_OPT=
5789 echo "$as_me:5789: checking for an rpath option" >&5
5790 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5791 case $cf_cv_system_name in #(vi
5792 irix*) #(vi
5793         if test "$GCC" = yes; then
5794                 LD_RPATH_OPT="-Wl,-rpath,"
5795         else
5796                 LD_RPATH_OPT="-rpath "
5797         fi
5798         ;;
5799 linux*|gnu*|k*bsd*-gnu) #(vi
5800         LD_RPATH_OPT="-Wl,-rpath,"
5801         ;;
5802 openbsd[2-9].*|mirbsd*) #(vi
5803         LD_RPATH_OPT="-Wl,-rpath,"
5804         ;;
5805 dragonfly*|freebsd*) #(vi
5806         LD_RPATH_OPT="-rpath "
5807         ;;
5808 netbsd*) #(vi
5809         LD_RPATH_OPT="-Wl,-rpath,"
5810         ;;
5811 osf*|mls+*) #(vi
5812         LD_RPATH_OPT="-rpath "
5813         ;;
5814 solaris2*) #(vi
5815         LD_RPATH_OPT="-R"
5816         ;;
5817 *)
5818         ;;
5819 esac
5820 echo "$as_me:5820: result: $LD_RPATH_OPT" >&5
5821 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5822
5823 case "x$LD_RPATH_OPT" in #(vi
5824 x-R*)
5825         echo "$as_me:5825: checking if we need a space after rpath option" >&5
5826 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5827         cf_save_LIBS="$LIBS"
5828
5829 cf_add_libs="${LD_RPATH_OPT}$libdir"
5830 # Filter out duplicates - this happens with badly-designed ".pc" files...
5831 for cf_add_1lib in $LIBS
5832 do
5833         for cf_add_2lib in $cf_add_libs
5834         do
5835                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5836                 then
5837                         cf_add_1lib=
5838                         break
5839                 fi
5840         done
5841         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5842 done
5843 LIBS="$cf_add_libs"
5844
5845         cat >conftest.$ac_ext <<_ACEOF
5846 #line 5846 "configure"
5847 #include "confdefs.h"
5848
5849 int
5850 main ()
5851 {
5852
5853   ;
5854   return 0;
5855 }
5856 _ACEOF
5857 rm -f conftest.$ac_objext conftest$ac_exeext
5858 if { (eval echo "$as_me:5858: \"$ac_link\"") >&5
5859   (eval $ac_link) 2>&5
5860   ac_status=$?
5861   echo "$as_me:5861: \$? = $ac_status" >&5
5862   (exit $ac_status); } &&
5863          { ac_try='test -s conftest$ac_exeext'
5864   { (eval echo "$as_me:5864: \"$ac_try\"") >&5
5865   (eval $ac_try) 2>&5
5866   ac_status=$?
5867   echo "$as_me:5867: \$? = $ac_status" >&5
5868   (exit $ac_status); }; }; then
5869   cf_rpath_space=no
5870 else
5871   echo "$as_me: failed program was:" >&5
5872 cat conftest.$ac_ext >&5
5873 cf_rpath_space=yes
5874 fi
5875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5876         LIBS="$cf_save_LIBS"
5877         echo "$as_me:5877: result: $cf_rpath_space" >&5
5878 echo "${ECHO_T}$cf_rpath_space" >&6
5879         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5880         ;;
5881 esac
5882
5883         RM_SHARED_OPTS=
5884         LOCAL_LDFLAGS=
5885         LOCAL_LDFLAGS2=
5886         LD_SHARED_OPTS=
5887         INSTALL_LIB="-m 644"
5888         : ${rel_builddir:=.}
5889
5890         shlibdir=$libdir
5891
5892         MAKE_DLLS="#"
5893
5894         cf_cv_do_symlinks=no
5895         cf_ld_rpath_opt=
5896         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5897
5898         echo "$as_me:5898: checking if release/abi version should be used for shared libs" >&5
5899 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5900
5901 # Check whether --with-shlib-version or --without-shlib-version was given.
5902 if test "${with_shlib_version+set}" = set; then
5903   withval="$with_shlib_version"
5904   test -z "$withval" && withval=auto
5905         case $withval in #(vi
5906         yes) #(vi
5907                 cf_cv_shlib_version=auto
5908                 ;;
5909         rel|abi|auto|no) #(vi
5910                 cf_cv_shlib_version=$withval
5911                 ;;
5912         *)
5913                 { { echo "$as_me:5913: error: option value must be one of: rel, abi, auto or no" >&5
5914 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5915    { (exit 1); exit 1; }; }
5916                 ;;
5917         esac
5918
5919 else
5920   cf_cv_shlib_version=auto
5921 fi;
5922         echo "$as_me:5922: result: $cf_cv_shlib_version" >&5
5923 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5924
5925         cf_cv_rm_so_locs=no
5926         cf_try_cflags=
5927
5928         # Some less-capable ports of gcc support only -fpic
5929         CC_SHARED_OPTS=
5930         if test "$GCC" = yes
5931         then
5932                 echo "$as_me:5932: checking which $CC option to use" >&5
5933 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5934                 cf_save_CFLAGS="$CFLAGS"
5935                 for CC_SHARED_OPTS in -fPIC -fpic ''
5936                 do
5937                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5938                         cat >conftest.$ac_ext <<_ACEOF
5939 #line 5939 "configure"
5940 #include "confdefs.h"
5941 #include <stdio.h>
5942 int
5943 main ()
5944 {
5945 int x = 1
5946   ;
5947   return 0;
5948 }
5949 _ACEOF
5950 rm -f conftest.$ac_objext
5951 if { (eval echo "$as_me:5951: \"$ac_compile\"") >&5
5952   (eval $ac_compile) 2>&5
5953   ac_status=$?
5954   echo "$as_me:5954: \$? = $ac_status" >&5
5955   (exit $ac_status); } &&
5956          { ac_try='test -s conftest.$ac_objext'
5957   { (eval echo "$as_me:5957: \"$ac_try\"") >&5
5958   (eval $ac_try) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); }; }; then
5962   break
5963 else
5964   echo "$as_me: failed program was:" >&5
5965 cat conftest.$ac_ext >&5
5966 fi
5967 rm -f conftest.$ac_objext conftest.$ac_ext
5968                 done
5969                 echo "$as_me:5969: result: $CC_SHARED_OPTS" >&5
5970 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5971                 CFLAGS="$cf_save_CFLAGS"
5972         fi
5973
5974         cf_cv_shlib_version_infix=no
5975
5976         case $cf_cv_system_name in #(vi
5977         aix4.3-9*|aix[5-7]*) #(vi
5978                 if test "$GCC" = yes; then
5979                         CC_SHARED_OPTS=
5980                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5981                 else
5982                         # CC_SHARED_OPTS='-qpic=large -G'
5983                         # perhaps "-bM:SRE -bnoentry -bexpall"
5984                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5985                 fi
5986                 ;;
5987         beos*) #(vi
5988                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5989                 ;;
5990         cygwin*) #(vi
5991                 CC_SHARED_OPTS=
5992                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5993                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5994                 cf_cv_shlib_version=cygdll
5995                 cf_cv_shlib_version_infix=cygdll
5996                 shlibdir=$bindir
5997                 MAKE_DLLS=
5998                 cat >mk_shared_lib.sh <<-CF_EOF
5999                 #!/bin/sh
6000                 SHARED_LIB=\$1
6001                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6002                 shift
6003                 cat <<-EOF
6004                 Linking shared library
6005                 ** SHARED_LIB \$SHARED_LIB
6006                 ** IMPORT_LIB \$IMPORT_LIB
6007 EOF
6008                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6009 CF_EOF
6010                 chmod +x mk_shared_lib.sh
6011                 ;;
6012         msys*) #(vi
6013                 CC_SHARED_OPTS=
6014                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6015                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6016                 cf_cv_shlib_version=msysdll
6017                 cf_cv_shlib_version_infix=msysdll
6018                 shlibdir=$bindir
6019                 MAKE_DLLS=
6020                 cat >mk_shared_lib.sh <<-CF_EOF
6021                 #!/bin/sh
6022                 SHARED_LIB=\$1
6023                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6024                 shift
6025                 cat <<-EOF
6026                 Linking shared library
6027                 ** SHARED_LIB \$SHARED_LIB
6028                 ** IMPORT_LIB \$IMPORT_LIB
6029 EOF
6030                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6031 CF_EOF
6032                 chmod +x mk_shared_lib.sh
6033                 ;;
6034         darwin*) #(vi
6035                 cf_try_cflags="no-cpp-precomp"
6036                 CC_SHARED_OPTS="-dynamic"
6037                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6038                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6039                 cf_cv_shlib_version_infix=yes
6040                 echo "$as_me:6040: checking if ld -search_paths_first works" >&5
6041 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6042 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6043   echo $ECHO_N "(cached) $ECHO_C" >&6
6044 else
6045
6046                         cf_save_LDFLAGS=$LDFLAGS
6047                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6048                         cat >conftest.$ac_ext <<_ACEOF
6049 #line 6049 "configure"
6050 #include "confdefs.h"
6051
6052 int
6053 main ()
6054 {
6055 int i;
6056   ;
6057   return 0;
6058 }
6059 _ACEOF
6060 rm -f conftest.$ac_objext conftest$ac_exeext
6061 if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
6062   (eval $ac_link) 2>&5
6063   ac_status=$?
6064   echo "$as_me:6064: \$? = $ac_status" >&5
6065   (exit $ac_status); } &&
6066          { ac_try='test -s conftest$ac_exeext'
6067   { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6068   (eval $ac_try) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit $ac_status); }; }; then
6072   cf_cv_ldflags_search_paths_first=yes
6073 else
6074   echo "$as_me: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6076 cf_cv_ldflags_search_paths_first=no
6077 fi
6078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6079                                 LDFLAGS=$cf_save_LDFLAGS
6080 fi
6081 echo "$as_me:6081: result: $cf_cv_ldflags_search_paths_first" >&5
6082 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6083                 if test $cf_cv_ldflags_search_paths_first = yes; then
6084                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6085                 fi
6086                 ;;
6087         hpux[7-8]*) #(vi
6088                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6089                 if test "$GCC" != yes; then
6090                         CC_SHARED_OPTS='+Z'
6091                 fi
6092                 MK_SHARED_LIB='${LD} -b -o $@'
6093                 INSTALL_LIB="-m 555"
6094                 ;;
6095         hpux*) #(vi
6096                 # (tested with gcc 2.7.2 -- I don't have c89)
6097                 if test "$GCC" = yes; then
6098                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6099                 else
6100                         CC_SHARED_OPTS='+Z'
6101                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6102                 fi
6103                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6104                 # HP-UX shared libraries must be executable, and should be
6105                 # readonly to exploit a quirk in the memory manager.
6106                 INSTALL_LIB="-m 555"
6107                 ;;
6108         interix*)
6109                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6110                 if test "$cf_cv_shlib_version" = rel; then
6111                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6112                 else
6113                         cf_shared_soname='`basename `'
6114                 fi
6115                 CC_SHARED_OPTS=
6116                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6117                 ;;
6118         irix*) #(vi
6119                 if test "$cf_cv_enable_rpath" = yes ; then
6120                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6121                 fi
6122                 # tested with IRIX 5.2 and 'cc'.
6123                 if test "$GCC" != yes; then
6124                         CC_SHARED_OPTS='-KPIC'
6125                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6126                 else
6127                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6128                 fi
6129                 cf_cv_rm_so_locs=yes
6130                 ;;
6131         linux*|gnu*|k*bsd*-gnu) #(vi
6132                 if test "$DFT_LWR_MODEL" = "shared" ; then
6133                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6134                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6135                 fi
6136                 if test "$cf_cv_enable_rpath" = yes ; then
6137                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6138                 fi
6139
6140         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6141         if test "$cf_cv_shlib_version" = rel; then
6142                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6143         else
6144                 cf_cv_shared_soname='`basename $@`'
6145         fi
6146
6147                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6148                 ;;
6149         mingw*) #(vi
6150                 cf_cv_shlib_version=mingw
6151                 cf_cv_shlib_version_infix=mingw
6152                 shlibdir=$bindir
6153                 MAKE_DLLS=
6154                 if test "$DFT_LWR_MODEL" = "shared" ; then
6155                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6156                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6157                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6158                 fi
6159                 CC_SHARED_OPTS=
6160                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6161                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6162                 cat >mk_shared_lib.sh <<-CF_EOF
6163                 #!/bin/sh
6164                 SHARED_LIB=\$1
6165                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6166                 shift
6167                 cat <<-EOF
6168                 Linking shared library
6169                 ** SHARED_LIB \$SHARED_LIB
6170                 ** IMPORT_LIB \$IMPORT_LIB
6171 EOF
6172                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6173 CF_EOF
6174                 chmod +x mk_shared_lib.sh
6175                 ;;
6176         openbsd[2-9].*|mirbsd*) #(vi
6177                 if test "$DFT_LWR_MODEL" = "shared" ; then
6178                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6179                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6180                 fi
6181                 if test "$cf_cv_enable_rpath" = yes ; then
6182                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6183                 fi
6184                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6185
6186         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6187         if test "$cf_cv_shlib_version" = rel; then
6188                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6189         else
6190                 cf_cv_shared_soname='`basename $@`'
6191         fi
6192
6193                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6194                 ;;
6195         nto-qnx*|openbsd*|freebsd[12].*) #(vi
6196                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6197                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6198                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6199                 ;;
6200         dragonfly*|freebsd*) #(vi
6201                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6202                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6203                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6204                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6205                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6206                 fi
6207
6208         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6209         if test "$cf_cv_shlib_version" = rel; then
6210                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6211         else
6212                 cf_cv_shared_soname='`basename $@`'
6213         fi
6214
6215                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6216                 ;;
6217         netbsd*) #(vi
6218                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6219                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6220                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6221                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6222                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6223                         if test "$cf_cv_shlib_version" = auto; then
6224                         if test -f /usr/libexec/ld.elf_so; then
6225                                 cf_cv_shlib_version=abi
6226                         else
6227                                 cf_cv_shlib_version=rel
6228                         fi
6229                         fi
6230
6231         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6232         if test "$cf_cv_shlib_version" = rel; then
6233                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6234         else
6235                 cf_cv_shared_soname='`basename $@`'
6236         fi
6237
6238                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6239                 else
6240                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6241                 fi
6242                 ;;
6243         osf*|mls+*) #(vi
6244                 # tested with OSF/1 V3.2 and 'cc'
6245                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6246                 # link with shared libs).
6247                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6248                 case $host_os in #(vi
6249                 osf4*)
6250                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6251                         ;;
6252                 esac
6253                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6254                 if test "$DFT_LWR_MODEL" = "shared" ; then
6255                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6256                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6257                 fi
6258                 cf_cv_rm_so_locs=yes
6259                 ;;
6260         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6261                 # tested with osr5.0.5
6262                 if test "$GCC" != yes; then
6263                         CC_SHARED_OPTS='-belf -KPIC'
6264                 fi
6265                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6266                 if test "$cf_cv_enable_rpath" = yes ; then
6267                         # only way is to set LD_RUN_PATH but no switch for it
6268                         RUN_PATH=$libdir
6269                 fi
6270                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6271                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6272                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6273                 ;;
6274         sunos4*) #(vi
6275                 # tested with SunOS 4.1.1 and gcc 2.7.0
6276                 if test "$GCC" != yes; then
6277                         CC_SHARED_OPTS='-KPIC'
6278                 fi
6279                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6280                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6281                 ;;
6282         solaris2*) #(vi
6283                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6284                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6285                 if test "$DFT_LWR_MODEL" = "shared" ; then
6286                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6287                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6288                 fi
6289                 if test "$cf_cv_enable_rpath" = yes ; then
6290                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6291                 fi
6292
6293         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6294         if test "$cf_cv_shlib_version" = rel; then
6295                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6296         else
6297                 cf_cv_shared_soname='`basename $@`'
6298         fi
6299
6300                 if test "$GCC" != yes; then
6301                         cf_save_CFLAGS="$CFLAGS"
6302                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6303                         do
6304                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6305                                 cat >conftest.$ac_ext <<_ACEOF
6306 #line 6306 "configure"
6307 #include "confdefs.h"
6308 #include <stdio.h>
6309 int
6310 main ()
6311 {
6312 printf("Hello\n");
6313   ;
6314   return 0;
6315 }
6316 _ACEOF
6317 rm -f conftest.$ac_objext
6318 if { (eval echo "$as_me:6318: \"$ac_compile\"") >&5
6319   (eval $ac_compile) 2>&5
6320   ac_status=$?
6321   echo "$as_me:6321: \$? = $ac_status" >&5
6322   (exit $ac_status); } &&
6323          { ac_try='test -s conftest.$ac_objext'
6324   { (eval echo "$as_me:6324: \"$ac_try\"") >&5
6325   (eval $ac_try) 2>&5
6326   ac_status=$?
6327   echo "$as_me:6327: \$? = $ac_status" >&5
6328   (exit $ac_status); }; }; then
6329   break
6330 else
6331   echo "$as_me: failed program was:" >&5
6332 cat conftest.$ac_ext >&5
6333 fi
6334 rm -f conftest.$ac_objext conftest.$ac_ext
6335                         done
6336                         CFLAGS="$cf_save_CFLAGS"
6337                         CC_SHARED_OPTS=$cf_shared_opts
6338                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6339                 else
6340                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6341                 fi
6342                 ;;
6343         sysv5uw7*|unix_sv*) #(vi
6344                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6345                 if test "$GCC" != yes; then
6346                         CC_SHARED_OPTS='-KPIC'
6347                 fi
6348                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6349                 ;;
6350         *)
6351                 CC_SHARED_OPTS='unknown'
6352                 MK_SHARED_LIB='echo unknown'
6353                 ;;
6354         esac
6355
6356         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6357         case "$cf_cv_shlib_version" in #(vi
6358         rel|abi)
6359                 case "$MK_SHARED_LIB" in #(vi
6360                 *'-o $@') #(vi
6361                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6362                         ;;
6363                 *)
6364                         { echo "$as_me:6364: WARNING: ignored --with-shlib-version" >&5
6365 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6366                         ;;
6367                 esac
6368                 ;;
6369         esac
6370
6371         if test -n "$cf_try_cflags"
6372         then
6373 cat > conftest.$ac_ext <<EOF
6374 #line 6374 "${as_me:-configure}"
6375 #include <stdio.h>
6376 int main(int argc, char *argv[])
6377 {
6378         printf("hello\n");
6379         return (argv[argc-1] == 0) ;
6380 }
6381 EOF
6382                 cf_save_CFLAGS="$CFLAGS"
6383                 for cf_opt in $cf_try_cflags
6384                 do
6385                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6386                         echo "$as_me:6386: checking if CFLAGS option -$cf_opt works" >&5
6387 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6388                         if { (eval echo "$as_me:6388: \"$ac_compile\"") >&5
6389   (eval $ac_compile) 2>&5
6390   ac_status=$?
6391   echo "$as_me:6391: \$? = $ac_status" >&5
6392   (exit $ac_status); }; then
6393                                 echo "$as_me:6393: result: yes" >&5
6394 echo "${ECHO_T}yes" >&6
6395                                 cf_save_CFLAGS="$CFLAGS"
6396                         else
6397                                 echo "$as_me:6397: result: no" >&5
6398 echo "${ECHO_T}no" >&6
6399                         fi
6400                 done
6401                 CFLAGS="$cf_save_CFLAGS"
6402         fi
6403
6404         # RPATH_LIST is a colon-separated list of directories
6405         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6406         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6407
6408         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6409
6410         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6411
6412 echo "${as_me:-configure}:6412: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6413
6414         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6415
6416 echo "${as_me:-configure}:6416: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6417
6418 for model in $cf_list_models; do
6419         case $model in #(vi
6420         libtool)
6421
6422 echo "$as_me:6422: checking for additional libtool options" >&5
6423 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6424
6425 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6426 if test "${with_libtool_opts+set}" = set; then
6427   withval="$with_libtool_opts"
6428   with_libtool_opts=$withval
6429 else
6430   with_libtool_opts=no
6431 fi;
6432 echo "$as_me:6432: result: $with_libtool_opts" >&5
6433 echo "${ECHO_T}$with_libtool_opts" >&6
6434
6435 case .$with_libtool_opts in
6436 .yes|.no|.)
6437         ;;
6438 *)
6439         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6440         ;;
6441 esac
6442
6443 echo "$as_me:6443: checking if exported-symbols file should be used" >&5
6444 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6445
6446 # Check whether --with-export-syms or --without-export-syms was given.
6447 if test "${with_export_syms+set}" = set; then
6448   withval="$with_export_syms"
6449   with_export_syms=$withval
6450 else
6451   with_export_syms=no
6452 fi;
6453 if test "x$with_export_syms" = xyes
6454 then
6455         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6456
6457 fi
6458 echo "$as_me:6458: result: $with_export_syms" >&5
6459 echo "${ECHO_T}$with_export_syms" >&6
6460 if test "x$with_export_syms" != xno
6461 then
6462         EXPORT_SYMS="-export-symbols $with_export_syms"
6463
6464 fi
6465
6466                 ;;
6467         shared) #(vi
6468                 if test "$CC_SHARED_OPTS" = "unknown"; then
6469                         { { echo "$as_me:6469: error: Shared libraries are not supported in this version" >&5
6470 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6471    { (exit 1); exit 1; }; }
6472                 fi
6473
6474 echo "$as_me:6474: checking if versioned-symbols file should be used" >&5
6475 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6476
6477 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6478 if test "${with_versioned_syms+set}" = set; then
6479   withval="$with_versioned_syms"
6480   with_versioned_syms=$withval
6481 else
6482   with_versioned_syms=no
6483 fi;
6484 if test "x$with_versioned_syms" = xyes
6485 then
6486         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6487
6488 fi
6489 echo "$as_me:6489: result: $with_versioned_syms" >&5
6490 echo "${ECHO_T}$with_versioned_syms" >&6
6491
6492 RESULTING_SYMS=
6493 VERSIONED_SYMS=
6494
6495 if test "x$with_versioned_syms" != xno
6496 then
6497         RESULTING_SYMS=$with_versioned_syms
6498         case "x$MK_SHARED_LIB" in
6499         *-Wl,*) #(vi
6500                 VERSIONED_SYMS="-Wl,--version-script,\$(RESULTING_SYMS)"
6501                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6502                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6503
6504 echo "${as_me:-configure}:6504: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6505
6506                 ;;
6507         *-dy*) #(vi
6508                 VERSIONED_SYMS="-Wl,-M,\$(RESULTING_SYMS)"
6509                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6510                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6511
6512 echo "${as_me:-configure}:6512: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6513
6514                 ;;
6515         *)
6516                 { echo "$as_me:6516: WARNING: this system does not support versioned-symbols" >&5
6517 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6518                 ;;
6519         esac
6520 fi
6521
6522                 ;;
6523         esac
6524 done
6525
6526 # pretend that ncurses==ncursesw==ncursest
6527 echo "$as_me:6527: checking if you want to disable library suffixes" >&5
6528 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6529
6530 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6531 if test "${enable_lib_suffixes+set}" = set; then
6532   enableval="$enable_lib_suffixes"
6533   disable_lib_suffixes=$enableval
6534 else
6535   disable_lib_suffixes=no
6536 fi;
6537 echo "$as_me:6537: result: $disable_lib_suffixes" >&5
6538 echo "${ECHO_T}$disable_lib_suffixes" >&6
6539
6540 ### If we're building with rpath, try to link non-standard libs that way too.
6541 if test "$DFT_LWR_MODEL" = "shared"; then
6542
6543 echo "$as_me:6543: checking if rpath-hack should be disabled" >&5
6544 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6545
6546 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6547 if test "${enable_rpath_hack+set}" = set; then
6548   enableval="$enable_rpath_hack"
6549   test "$enableval" != no && enableval=yes
6550   if test "$enableval" != "yes" ; then
6551     cf_disable_rpath_hack=yes
6552   else
6553     cf_disable_rpath_hack=no
6554   fi
6555 else
6556   enableval=yes
6557   cf_disable_rpath_hack=no
6558
6559 fi;
6560 echo "$as_me:6560: result: $cf_disable_rpath_hack" >&5
6561 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6562 if test "$cf_disable_rpath_hack" = no ; then
6563
6564 echo "$as_me:6564: checking for updated LDFLAGS" >&5
6565 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6566 if test -n "$LD_RPATH_OPT" ; then
6567         echo "$as_me:6567: result: maybe" >&5
6568 echo "${ECHO_T}maybe" >&6
6569
6570         for ac_prog in ldd
6571 do
6572   # Extract the first word of "$ac_prog", so it can be a program name with args.
6573 set dummy $ac_prog; ac_word=$2
6574 echo "$as_me:6574: checking for $ac_word" >&5
6575 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6576 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6577   echo $ECHO_N "(cached) $ECHO_C" >&6
6578 else
6579   if test -n "$cf_ldd_prog"; then
6580   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6581 else
6582   ac_save_IFS=$IFS; IFS=$ac_path_separator
6583 ac_dummy="$PATH"
6584 for ac_dir in $ac_dummy; do
6585   IFS=$ac_save_IFS
6586   test -z "$ac_dir" && ac_dir=.
6587   $as_executable_p "$ac_dir/$ac_word" || continue
6588 ac_cv_prog_cf_ldd_prog="$ac_prog"
6589 echo "$as_me:6589: found $ac_dir/$ac_word" >&5
6590 break
6591 done
6592
6593 fi
6594 fi
6595 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6596 if test -n "$cf_ldd_prog"; then
6597   echo "$as_me:6597: result: $cf_ldd_prog" >&5
6598 echo "${ECHO_T}$cf_ldd_prog" >&6
6599 else
6600   echo "$as_me:6600: result: no" >&5
6601 echo "${ECHO_T}no" >&6
6602 fi
6603
6604   test -n "$cf_ldd_prog" && break
6605 done
6606 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6607
6608         cf_rpath_list="/usr/lib /lib"
6609         if test "$cf_ldd_prog" != no
6610         then
6611                 cf_rpath_oops=
6612
6613 cat >conftest.$ac_ext <<_ACEOF
6614 #line 6614 "configure"
6615 #include "confdefs.h"
6616 #include <stdio.h>
6617 int
6618 main ()
6619 {
6620 printf("Hello");
6621   ;
6622   return 0;
6623 }
6624 _ACEOF
6625 rm -f conftest.$ac_objext conftest$ac_exeext
6626 if { (eval echo "$as_me:6626: \"$ac_link\"") >&5
6627   (eval $ac_link) 2>&5
6628   ac_status=$?
6629   echo "$as_me:6629: \$? = $ac_status" >&5
6630   (exit $ac_status); } &&
6631          { ac_try='test -s conftest$ac_exeext'
6632   { (eval echo "$as_me:6632: \"$ac_try\"") >&5
6633   (eval $ac_try) 2>&5
6634   ac_status=$?
6635   echo "$as_me:6635: \$? = $ac_status" >&5
6636   (exit $ac_status); }; }; then
6637   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6638                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6639 else
6640   echo "$as_me: failed program was:" >&5
6641 cat conftest.$ac_ext >&5
6642 fi
6643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6644
6645                 # If we passed the link-test, but get a "not found" on a given library,
6646                 # this could be due to inept reconfiguration of gcc to make it only
6647                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6648                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6649                 # /usr/local libraries.
6650                 if test -n "$cf_rpath_oops"
6651                 then
6652                         for cf_rpath_src in $cf_rpath_oops
6653                         do
6654                                 for cf_rpath_dir in \
6655                                         /usr/local \
6656                                         /usr/pkg \
6657                                         /opt/sfw
6658                                 do
6659                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6660                                         then
6661                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6662
6663 echo "${as_me:-configure}:6663: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6664
6665                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6666                                                 break
6667                                         fi
6668                                 done
6669                         done
6670                 fi
6671         fi
6672
6673         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6674
6675 echo "${as_me:-configure}:6675: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6676
6677 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6678
6679 echo "${as_me:-configure}:6679: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6680
6681 cf_rpath_dst=
6682 for cf_rpath_src in $LDFLAGS
6683 do
6684         case $cf_rpath_src in #(vi
6685         -L*) #(vi
6686
6687                 # check if this refers to a directory which we will ignore
6688                 cf_rpath_skip=no
6689                 if test -n "$cf_rpath_list"
6690                 then
6691                         for cf_rpath_item in $cf_rpath_list
6692                         do
6693                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6694                                 then
6695                                         cf_rpath_skip=yes
6696                                         break
6697                                 fi
6698                         done
6699                 fi
6700
6701                 if test "$cf_rpath_skip" = no
6702                 then
6703                         # transform the option
6704                         if test "$LD_RPATH_OPT" = "-R " ; then
6705                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6706                         else
6707                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6708                         fi
6709
6710                         # if we have not already added this, add it now
6711                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6712                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6713                         then
6714                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6715
6716 echo "${as_me:-configure}:6716: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6717
6718                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6719                         fi
6720                 fi
6721                 ;;
6722         esac
6723         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6724 done
6725 LDFLAGS=$cf_rpath_dst
6726
6727 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6728
6729 echo "${as_me:-configure}:6729: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6730
6731 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6732
6733 echo "${as_me:-configure}:6733: testing ...checking LIBS $LIBS ..." 1>&5
6734
6735 cf_rpath_dst=
6736 for cf_rpath_src in $LIBS
6737 do
6738         case $cf_rpath_src in #(vi
6739         -L*) #(vi
6740
6741                 # check if this refers to a directory which we will ignore
6742                 cf_rpath_skip=no
6743                 if test -n "$cf_rpath_list"
6744                 then
6745                         for cf_rpath_item in $cf_rpath_list
6746                         do
6747                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6748                                 then
6749                                         cf_rpath_skip=yes
6750                                         break
6751                                 fi
6752                         done
6753                 fi
6754
6755                 if test "$cf_rpath_skip" = no
6756                 then
6757                         # transform the option
6758                         if test "$LD_RPATH_OPT" = "-R " ; then
6759                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6760                         else
6761                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6762                         fi
6763
6764                         # if we have not already added this, add it now
6765                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6766                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6767                         then
6768                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6769
6770 echo "${as_me:-configure}:6770: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6771
6772                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6773                         fi
6774                 fi
6775                 ;;
6776         esac
6777         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6778 done
6779 LIBS=$cf_rpath_dst
6780
6781 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6782
6783 echo "${as_me:-configure}:6783: testing ...checked LIBS $LIBS ..." 1>&5
6784
6785         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6786
6787 echo "${as_me:-configure}:6787: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6788
6789 else
6790         echo "$as_me:6790: result: no" >&5
6791 echo "${ECHO_T}no" >&6
6792 fi
6793
6794 fi
6795
6796 fi
6797
6798 ###############################################################################
6799
6800 ###     use option --disable-overwrite to leave out the link to -lcurses
6801 echo "$as_me:6801: checking if you wish to install ncurses overwriting curses" >&5
6802 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6803
6804 # Check whether --enable-overwrite or --disable-overwrite was given.
6805 if test "${enable_overwrite+set}" = set; then
6806   enableval="$enable_overwrite"
6807   with_overwrite=$enableval
6808 else
6809   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6810 fi;
6811 echo "$as_me:6811: result: $with_overwrite" >&5
6812 echo "${ECHO_T}$with_overwrite" >&6
6813
6814 echo "$as_me:6814: checking if external terminfo-database is used" >&5
6815 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6816
6817 # Check whether --enable-database or --disable-database was given.
6818 if test "${enable_database+set}" = set; then
6819   enableval="$enable_database"
6820   use_database=$enableval
6821 else
6822   use_database=yes
6823 fi;
6824 echo "$as_me:6824: result: $use_database" >&5
6825 echo "${ECHO_T}$use_database" >&6
6826
6827 case $host_os in #(vi
6828 os2*) #(vi
6829         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6830         ;;
6831 *) #(vi
6832         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6833         ;;
6834 esac
6835
6836 NCURSES_USE_DATABASE=0
6837 if test "$use_database" != no ; then
6838         NCURSES_USE_DATABASE=1
6839
6840         echo "$as_me:6840: checking which terminfo source-file will be installed" >&5
6841 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6842
6843 # Check whether --with-database or --without-database was given.
6844 if test "${with_database+set}" = set; then
6845   withval="$with_database"
6846   TERMINFO_SRC=$withval
6847 fi;
6848         echo "$as_me:6848: result: $TERMINFO_SRC" >&5
6849 echo "${ECHO_T}$TERMINFO_SRC" >&6
6850
6851         echo "$as_me:6851: checking whether to use hashed database instead of directory/tree" >&5
6852 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6853
6854 # Check whether --with-hashed-db or --without-hashed-db was given.
6855 if test "${with_hashed_db+set}" = set; then
6856   withval="$with_hashed_db"
6857
6858 else
6859   with_hashed_db=no
6860 fi;
6861         echo "$as_me:6861: result: $with_hashed_db" >&5
6862 echo "${ECHO_T}$with_hashed_db" >&6
6863 else
6864         with_hashed_db=no
6865 fi
6866
6867 echo "$as_me:6867: checking for list of fallback descriptions" >&5
6868 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6869
6870 # Check whether --with-fallbacks or --without-fallbacks was given.
6871 if test "${with_fallbacks+set}" = set; then
6872   withval="$with_fallbacks"
6873   with_fallback=$withval
6874 else
6875   with_fallback=
6876 fi;
6877 echo "$as_me:6877: result: $with_fallback" >&5
6878 echo "${ECHO_T}$with_fallback" >&6
6879 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6880
6881 echo "$as_me:6881: checking if you want modern xterm or antique" >&5
6882 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6883
6884 # Check whether --with-xterm-new or --without-xterm-new was given.
6885 if test "${with_xterm_new+set}" = set; then
6886   withval="$with_xterm_new"
6887   with_xterm_new=$withval
6888 else
6889   with_xterm_new=yes
6890 fi;
6891 case $with_xterm_new in
6892 no)     with_xterm_new=xterm-old;;
6893 *)      with_xterm_new=xterm-new;;
6894 esac
6895 echo "$as_me:6895: result: $with_xterm_new" >&5
6896 echo "${ECHO_T}$with_xterm_new" >&6
6897 WHICH_XTERM=$with_xterm_new
6898
6899 echo "$as_me:6899: checking if xterm backspace sends BS or DEL" >&5
6900 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6901
6902 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6903 if test "${with_xterm_kbs+set}" = set; then
6904   withval="$with_xterm_kbs"
6905   with_xterm_kbs=$withval
6906 else
6907   with_xterm_kbs=BS
6908 fi;
6909 case x$with_xterm_kbs in
6910 xyes|xno|xBS|xbs|x8)
6911         with_xterm_kbs=BS
6912         ;;
6913 xDEL|xdel|x127)
6914         with_xterm_kbs=DEL
6915         ;;
6916 *)
6917         with_xterm_kbs=$withval
6918         ;;
6919 esac
6920 echo "$as_me:6920: result: $with_xterm_kbs" >&5
6921 echo "${ECHO_T}$with_xterm_kbs" >&6
6922 XTERM_KBS=$with_xterm_kbs
6923
6924 MAKE_TERMINFO=
6925 if test "$use_database" = no ; then
6926         TERMINFO="${datadir}/terminfo"
6927         MAKE_TERMINFO="#"
6928 else
6929
6930 echo "$as_me:6930: checking for list of terminfo directories" >&5
6931 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6932
6933 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6934 if test "${with_terminfo_dirs+set}" = set; then
6935   withval="$with_terminfo_dirs"
6936
6937 else
6938   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6939 fi;
6940 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6941 cf_dst_path=
6942 for cf_src_path in $withval
6943 do
6944
6945 if test "x$prefix" != xNONE; then
6946   cf_path_syntax="$prefix"
6947 else
6948   cf_path_syntax="$ac_default_prefix"
6949 fi
6950
6951 case ".$cf_src_path" in #(vi
6952 .\$\(*\)*|.\'*\'*) #(vi
6953   ;;
6954 ..|./*|.\\*) #(vi
6955   ;;
6956 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6957   ;;
6958 .\${*prefix}*|.\${*dir}*) #(vi
6959   eval cf_src_path="$cf_src_path"
6960   case ".$cf_src_path" in #(vi
6961   .NONE/*)
6962     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6963     ;;
6964   esac
6965   ;; #(vi
6966 .no|.NONE/*)
6967   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6968   ;;
6969 *)
6970   { { echo "$as_me:6970: error: expected a pathname, not \"$cf_src_path\"" >&5
6971 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6972    { (exit 1); exit 1; }; }
6973   ;;
6974 esac
6975
6976   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6977   cf_dst_path="${cf_dst_path}${cf_src_path}"
6978 done
6979 IFS="$ac_save_ifs"
6980
6981 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6982 # so we have to check/work around.  We do prefer the result of "eval"...
6983 eval cf_dst_eval="$cf_dst_path"
6984 case "x$cf_dst_eval" in #(vi
6985 xNONE*) #(vi
6986         TERMINFO_DIRS=$cf_dst_path
6987         ;;
6988 *)
6989         TERMINFO_DIRS="$cf_dst_eval"
6990         ;;
6991 esac
6992
6993 echo "$as_me:6993: result: $TERMINFO_DIRS" >&5
6994 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6995 test -n "$TERMINFO_DIRS" &&
6996 cat >>confdefs.h <<EOF
6997 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6998 EOF
6999
7000 echo "$as_me:7000: checking for default terminfo directory" >&5
7001 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7002
7003 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7004 if test "${with_default_terminfo_dir+set}" = set; then
7005   withval="$with_default_terminfo_dir"
7006
7007 else
7008   withval="${TERMINFO:-${datadir}/terminfo}"
7009 fi; if test -n "${datadir}/terminfo" ; then
7010
7011 if test "x$prefix" != xNONE; then
7012   cf_path_syntax="$prefix"
7013 else
7014   cf_path_syntax="$ac_default_prefix"
7015 fi
7016
7017 case ".$withval" in #(vi
7018 .\$\(*\)*|.\'*\'*) #(vi
7019   ;;
7020 ..|./*|.\\*) #(vi
7021   ;;
7022 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7023   ;;
7024 .\${*prefix}*|.\${*dir}*) #(vi
7025   eval withval="$withval"
7026   case ".$withval" in #(vi
7027   .NONE/*)
7028     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7029     ;;
7030   esac
7031   ;; #(vi
7032 .no|.NONE/*)
7033   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7034   ;;
7035 *)
7036   { { echo "$as_me:7036: error: expected a pathname, not \"$withval\"" >&5
7037 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7038    { (exit 1); exit 1; }; }
7039   ;;
7040 esac
7041
7042 fi
7043 eval TERMINFO="$withval"
7044
7045 echo "$as_me:7045: result: $TERMINFO" >&5
7046 echo "${ECHO_T}$TERMINFO" >&6
7047
7048 cat >>confdefs.h <<EOF
7049 #define TERMINFO "$TERMINFO"
7050 EOF
7051
7052 fi
7053
7054 ###     use option --disable-big-core to make tic run on small machines
7055 ###     We need 4Mb, check if we can allocate 50% more than that.
7056 echo "$as_me:7056: checking if big-core option selected" >&5
7057 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7058
7059 # Check whether --enable-big-core or --disable-big-core was given.
7060 if test "${enable_big_core+set}" = set; then
7061   enableval="$enable_big_core"
7062   with_big_core=$enableval
7063 else
7064   if test "$cross_compiling" = yes; then
7065   with_big_core=no
7066 else
7067   cat >conftest.$ac_ext <<_ACEOF
7068 #line 7068 "configure"
7069 #include "confdefs.h"
7070
7071 #include <stdlib.h>
7072 #include <string.h>
7073 int main() {
7074         unsigned long n = 6000000L;
7075         char *s = malloc(n);
7076         if (s != 0)
7077                 s[0] = s[n-1] = 0;
7078         ${cf_cv_main_return:-return}(s == 0);
7079 }
7080 _ACEOF
7081 rm -f conftest$ac_exeext
7082 if { (eval echo "$as_me:7082: \"$ac_link\"") >&5
7083   (eval $ac_link) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7087   { (eval echo "$as_me:7087: \"$ac_try\"") >&5
7088   (eval $ac_try) 2>&5
7089   ac_status=$?
7090   echo "$as_me:7090: \$? = $ac_status" >&5
7091   (exit $ac_status); }; }; then
7092   with_big_core=yes
7093 else
7094   echo "$as_me: program exited with status $ac_status" >&5
7095 echo "$as_me: failed program was:" >&5
7096 cat conftest.$ac_ext >&5
7097 with_big_core=no
7098 fi
7099 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7100 fi
7101 fi;
7102 echo "$as_me:7102: result: $with_big_core" >&5
7103 echo "${ECHO_T}$with_big_core" >&6
7104 test "x$with_big_core" = "xyes" &&
7105 cat >>confdefs.h <<\EOF
7106 #define HAVE_BIG_CORE 1
7107 EOF
7108
7109 ### ISO C only guarantees 512-char strings, we have tables which load faster
7110 ### when constructed using "big" strings.  More than the C compiler, the awk
7111 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7112 echo "$as_me:7112: checking if big-strings option selected" >&5
7113 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7114
7115 # Check whether --enable-big-strings or --disable-big-strings was given.
7116 if test "${enable_big_strings+set}" = set; then
7117   enableval="$enable_big_strings"
7118   with_big_strings=$enableval
7119 else
7120
7121         case x$AWK in #(vi
7122         x)
7123                 eval with_big_strings=no
7124                 ;;
7125         *) #(vi
7126                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7127                         | $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
7128                         eval with_big_strings=yes
7129                 else
7130                         eval with_big_strings=no
7131                 fi
7132                 ;;
7133         esac
7134
7135 fi;
7136 echo "$as_me:7136: result: $with_big_strings" >&5
7137 echo "${ECHO_T}$with_big_strings" >&6
7138
7139 USE_BIG_STRINGS=0
7140 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7141
7142 ###     use option --enable-termcap to compile in the termcap fallback support
7143 echo "$as_me:7143: checking if you want termcap-fallback support" >&5
7144 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7145
7146 # Check whether --enable-termcap or --disable-termcap was given.
7147 if test "${enable_termcap+set}" = set; then
7148   enableval="$enable_termcap"
7149   with_termcap=$enableval
7150 else
7151   with_termcap=no
7152 fi;
7153 echo "$as_me:7153: result: $with_termcap" >&5
7154 echo "${ECHO_T}$with_termcap" >&6
7155
7156 NCURSES_USE_TERMCAP=0
7157 if test "x$with_termcap" != "xyes" ; then
7158         if test "$use_database" = no ; then
7159                 if test -z "$with_fallback" ; then
7160                         { { echo "$as_me:7160: error: You have disabled the database w/o specifying fallbacks" >&5
7161 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7162    { (exit 1); exit 1; }; }
7163                 fi
7164         fi
7165
7166 cat >>confdefs.h <<\EOF
7167 #define PURE_TERMINFO 1
7168 EOF
7169
7170 else
7171
7172         if test "$with_ticlib" != no ; then
7173                 { { echo "$as_me:7173: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7174 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7175    { (exit 1); exit 1; }; }
7176         fi
7177
7178         NCURSES_USE_TERMCAP=1
7179         echo "$as_me:7179: checking for list of termcap files" >&5
7180 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7181
7182 # Check whether --with-termpath or --without-termpath was given.
7183 if test "${with_termpath+set}" = set; then
7184   withval="$with_termpath"
7185
7186 else
7187   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7188 fi;
7189 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7190 cf_dst_path=
7191 for cf_src_path in $withval
7192 do
7193
7194 if test "x$prefix" != xNONE; then
7195   cf_path_syntax="$prefix"
7196 else
7197   cf_path_syntax="$ac_default_prefix"
7198 fi
7199
7200 case ".$cf_src_path" in #(vi
7201 .\$\(*\)*|.\'*\'*) #(vi
7202   ;;
7203 ..|./*|.\\*) #(vi
7204   ;;
7205 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7206   ;;
7207 .\${*prefix}*|.\${*dir}*) #(vi
7208   eval cf_src_path="$cf_src_path"
7209   case ".$cf_src_path" in #(vi
7210   .NONE/*)
7211     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7212     ;;
7213   esac
7214   ;; #(vi
7215 .no|.NONE/*)
7216   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7217   ;;
7218 *)
7219   { { echo "$as_me:7219: error: expected a pathname, not \"$cf_src_path\"" >&5
7220 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7221    { (exit 1); exit 1; }; }
7222   ;;
7223 esac
7224
7225   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7226   cf_dst_path="${cf_dst_path}${cf_src_path}"
7227 done
7228 IFS="$ac_save_ifs"
7229
7230 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7231 # so we have to check/work around.  We do prefer the result of "eval"...
7232 eval cf_dst_eval="$cf_dst_path"
7233 case "x$cf_dst_eval" in #(vi
7234 xNONE*) #(vi
7235         TERMPATH=$cf_dst_path
7236         ;;
7237 *)
7238         TERMPATH="$cf_dst_eval"
7239         ;;
7240 esac
7241
7242         echo "$as_me:7242: result: $TERMPATH" >&5
7243 echo "${ECHO_T}$TERMPATH" >&6
7244         test -n "$TERMPATH" &&
7245 cat >>confdefs.h <<EOF
7246 #define TERMPATH "$TERMPATH"
7247 EOF
7248
7249         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7250         echo "$as_me:7250: checking if fast termcap-loader is needed" >&5
7251 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7252
7253 # Check whether --enable-getcap or --disable-getcap was given.
7254 if test "${enable_getcap+set}" = set; then
7255   enableval="$enable_getcap"
7256   with_getcap=$enableval
7257 else
7258   with_getcap=no
7259 fi;
7260         echo "$as_me:7260: result: $with_getcap" >&5
7261 echo "${ECHO_T}$with_getcap" >&6
7262         test "x$with_getcap" = "xyes" &&
7263 cat >>confdefs.h <<\EOF
7264 #define USE_GETCAP 1
7265 EOF
7266
7267         echo "$as_me:7267: checking if translated termcaps will be cached in ~/.terminfo" >&5
7268 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7269
7270 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7271 if test "${enable_getcap_cache+set}" = set; then
7272   enableval="$enable_getcap_cache"
7273   with_getcap_cache=$enableval
7274 else
7275   with_getcap_cache=no
7276 fi;
7277         echo "$as_me:7277: result: $with_getcap_cache" >&5
7278 echo "${ECHO_T}$with_getcap_cache" >&6
7279         test "x$with_getcap_cache" = "xyes" &&
7280 cat >>confdefs.h <<\EOF
7281 #define USE_GETCAP_CACHE 1
7282 EOF
7283
7284 fi
7285
7286 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7287 echo "$as_me:7287: checking if ~/.terminfo is wanted" >&5
7288 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7289
7290 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7291 if test "${enable_home_terminfo+set}" = set; then
7292   enableval="$enable_home_terminfo"
7293   with_home_terminfo=$enableval
7294 else
7295   with_home_terminfo=yes
7296 fi;
7297 echo "$as_me:7297: result: $with_home_terminfo" >&5
7298 echo "${ECHO_T}$with_home_terminfo" >&6
7299 test "x$with_home_terminfo" = "xyes" &&
7300 cat >>confdefs.h <<\EOF
7301 #define USE_HOME_TERMINFO 1
7302 EOF
7303
7304 echo "$as_me:7304: checking if you want to use restricted environment when running as root" >&5
7305 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7306
7307 # Check whether --enable-root-environ or --disable-root-environ was given.
7308 if test "${enable_root_environ+set}" = set; then
7309   enableval="$enable_root_environ"
7310   with_root_environ=$enableval
7311 else
7312   with_root_environ=yes
7313 fi;
7314 echo "$as_me:7314: result: $with_root_environ" >&5
7315 echo "${ECHO_T}$with_root_environ" >&6
7316 test "x$with_root_environ" = xyes &&
7317 cat >>confdefs.h <<\EOF
7318 #define USE_ROOT_ENVIRON 1
7319 EOF
7320
7321 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7322 ###   to reduce storage requirements for the terminfo database.
7323
7324 for ac_func in \
7325         remove \
7326         unlink
7327 do
7328 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7329 echo "$as_me:7329: checking for $ac_func" >&5
7330 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7331 if eval "test \"\${$as_ac_var+set}\" = set"; then
7332   echo $ECHO_N "(cached) $ECHO_C" >&6
7333 else
7334   cat >conftest.$ac_ext <<_ACEOF
7335 #line 7335 "configure"
7336 #include "confdefs.h"
7337 /* System header to define __stub macros and hopefully few prototypes,
7338     which can conflict with char $ac_func (); below.  */
7339 #include <assert.h>
7340 /* Override any gcc2 internal prototype to avoid an error.  */
7341 #ifdef __cplusplus
7342 extern "C"
7343 #endif
7344 /* We use char because int might match the return type of a gcc2
7345    builtin and then its argument prototype would still apply.  */
7346 char $ac_func ();
7347 char (*f) ();
7348
7349 int
7350 main ()
7351 {
7352 /* The GNU C library defines this for functions which it implements
7353     to always fail with ENOSYS.  Some functions are actually named
7354     something starting with __ and the normal name is an alias.  */
7355 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7356 choke me
7357 #else
7358 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7359 #endif
7360
7361   ;
7362   return 0;
7363 }
7364 _ACEOF
7365 rm -f conftest.$ac_objext conftest$ac_exeext
7366 if { (eval echo "$as_me:7366: \"$ac_link\"") >&5
7367   (eval $ac_link) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit $ac_status); } &&
7371          { ac_try='test -s conftest$ac_exeext'
7372   { (eval echo "$as_me:7372: \"$ac_try\"") >&5
7373   (eval $ac_try) 2>&5
7374   ac_status=$?
7375   echo "$as_me:7375: \$? = $ac_status" >&5
7376   (exit $ac_status); }; }; then
7377   eval "$as_ac_var=yes"
7378 else
7379   echo "$as_me: failed program was:" >&5
7380 cat conftest.$ac_ext >&5
7381 eval "$as_ac_var=no"
7382 fi
7383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7384 fi
7385 echo "$as_me:7385: result: `eval echo '${'$as_ac_var'}'`" >&5
7386 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7387 if test `eval echo '${'$as_ac_var'}'` = yes; then
7388   cat >>confdefs.h <<EOF
7389 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7390 EOF
7391
7392 fi
7393 done
7394
7395 if test "$cross_compiling" = yes ; then
7396
7397 for ac_func in \
7398                 link \
7399                 symlink
7400 do
7401 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7402 echo "$as_me:7402: checking for $ac_func" >&5
7403 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7404 if eval "test \"\${$as_ac_var+set}\" = set"; then
7405   echo $ECHO_N "(cached) $ECHO_C" >&6
7406 else
7407   cat >conftest.$ac_ext <<_ACEOF
7408 #line 7408 "configure"
7409 #include "confdefs.h"
7410 /* System header to define __stub macros and hopefully few prototypes,
7411     which can conflict with char $ac_func (); below.  */
7412 #include <assert.h>
7413 /* Override any gcc2 internal prototype to avoid an error.  */
7414 #ifdef __cplusplus
7415 extern "C"
7416 #endif
7417 /* We use char because int might match the return type of a gcc2
7418    builtin and then its argument prototype would still apply.  */
7419 char $ac_func ();
7420 char (*f) ();
7421
7422 int
7423 main ()
7424 {
7425 /* The GNU C library defines this for functions which it implements
7426     to always fail with ENOSYS.  Some functions are actually named
7427     something starting with __ and the normal name is an alias.  */
7428 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7429 choke me
7430 #else
7431 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7432 #endif
7433
7434   ;
7435   return 0;
7436 }
7437 _ACEOF
7438 rm -f conftest.$ac_objext conftest$ac_exeext
7439 if { (eval echo "$as_me:7439: \"$ac_link\"") >&5
7440   (eval $ac_link) 2>&5
7441   ac_status=$?
7442   echo "$as_me:7442: \$? = $ac_status" >&5
7443   (exit $ac_status); } &&
7444          { ac_try='test -s conftest$ac_exeext'
7445   { (eval echo "$as_me:7445: \"$ac_try\"") >&5
7446   (eval $ac_try) 2>&5
7447   ac_status=$?
7448   echo "$as_me:7448: \$? = $ac_status" >&5
7449   (exit $ac_status); }; }; then
7450   eval "$as_ac_var=yes"
7451 else
7452   echo "$as_me: failed program was:" >&5
7453 cat conftest.$ac_ext >&5
7454 eval "$as_ac_var=no"
7455 fi
7456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7457 fi
7458 echo "$as_me:7458: result: `eval echo '${'$as_ac_var'}'`" >&5
7459 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7460 if test `eval echo '${'$as_ac_var'}'` = yes; then
7461   cat >>confdefs.h <<EOF
7462 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7463 EOF
7464
7465 fi
7466 done
7467
7468 else
7469         echo "$as_me:7469: checking if link/symlink functions work" >&5
7470 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7471 if test "${cf_cv_link_funcs+set}" = set; then
7472   echo $ECHO_N "(cached) $ECHO_C" >&6
7473 else
7474
7475                 cf_cv_link_funcs=
7476                 for cf_func in link symlink ; do
7477                         if test "$cross_compiling" = yes; then
7478
7479                         eval 'ac_cv_func_'$cf_func'=error'
7480 else
7481   cat >conftest.$ac_ext <<_ACEOF
7482 #line 7482 "configure"
7483 #include "confdefs.h"
7484
7485 #include <sys/types.h>
7486 #include <sys/stat.h>
7487 #ifdef HAVE_UNISTD_H
7488 #include <unistd.h>
7489 #endif
7490 int main()
7491 {
7492         int fail = 0;
7493         char *src = "config.log";
7494         char *dst = "conftest.chk";
7495         struct stat src_sb;
7496         struct stat dst_sb;
7497
7498         stat(src, &src_sb);
7499         fail = ($cf_func("config.log", "conftest.chk") < 0)
7500             || (stat(dst, &dst_sb) < 0)
7501             || (dst_sb.st_mtime != src_sb.st_mtime);
7502 #ifdef HAVE_UNLINK
7503         unlink(dst);
7504 #else
7505         remove(dst);
7506 #endif
7507         ${cf_cv_main_return:-return} (fail);
7508 }
7509
7510 _ACEOF
7511 rm -f conftest$ac_exeext
7512 if { (eval echo "$as_me:7512: \"$ac_link\"") >&5
7513   (eval $ac_link) 2>&5
7514   ac_status=$?
7515   echo "$as_me:7515: \$? = $ac_status" >&5
7516   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7517   { (eval echo "$as_me:7517: \"$ac_try\"") >&5
7518   (eval $ac_try) 2>&5
7519   ac_status=$?
7520   echo "$as_me:7520: \$? = $ac_status" >&5
7521   (exit $ac_status); }; }; then
7522
7523                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7524                         eval 'ac_cv_func_'$cf_func'=yes'
7525 else
7526   echo "$as_me: program exited with status $ac_status" >&5
7527 echo "$as_me: failed program was:" >&5
7528 cat conftest.$ac_ext >&5
7529
7530                         eval 'ac_cv_func_'$cf_func'=no'
7531 fi
7532 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7533 fi
7534                 done
7535                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7536
7537 fi
7538 echo "$as_me:7538: result: $cf_cv_link_funcs" >&5
7539 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7540         test "$ac_cv_func_link"    = yes &&
7541 cat >>confdefs.h <<\EOF
7542 #define HAVE_LINK 1
7543 EOF
7544
7545         test "$ac_cv_func_symlink" = yes &&
7546 cat >>confdefs.h <<\EOF
7547 #define HAVE_SYMLINK 1
7548 EOF
7549
7550 fi
7551
7552 with_links=no
7553 with_symlinks=no
7554
7555 # soft links (symbolic links) are useful for some systems where hard links do
7556 # not work, or to make it simpler to copy terminfo trees around.
7557 if test "x$ac_cv_func_symlink" = xyes ; then
7558     echo "$as_me:7558: checking if tic should use symbolic links" >&5
7559 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7560
7561 # Check whether --enable-symlinks or --disable-symlinks was given.
7562 if test "${enable_symlinks+set}" = set; then
7563   enableval="$enable_symlinks"
7564   with_symlinks=$enableval
7565 else
7566   with_symlinks=no
7567 fi;
7568     echo "$as_me:7568: result: $with_symlinks" >&5
7569 echo "${ECHO_T}$with_symlinks" >&6
7570 fi
7571
7572 # If we have hard links and did not choose to use soft links instead, there is
7573 # no reason to make this choice optional - use the hard links.
7574 if test "$with_symlinks" = no ; then
7575     echo "$as_me:7575: checking if tic should use hard links" >&5
7576 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7577     if test "x$ac_cv_func_link" = xyes ; then
7578         with_links=yes
7579     else
7580         with_links=no
7581     fi
7582     echo "$as_me:7582: result: $with_links" >&5
7583 echo "${ECHO_T}$with_links" >&6
7584 fi
7585
7586 test "x$with_links" = xyes &&
7587 cat >>confdefs.h <<\EOF
7588 #define USE_LINKS 1
7589 EOF
7590
7591 test "x$with_symlinks" = xyes &&
7592 cat >>confdefs.h <<\EOF
7593 #define USE_SYMLINKS 1
7594 EOF
7595
7596 ###   use option --enable-broken-linker to force on use of broken-linker support
7597 echo "$as_me:7597: checking if you want broken-linker support code" >&5
7598 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7599
7600 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7601 if test "${enable_broken_linker+set}" = set; then
7602   enableval="$enable_broken_linker"
7603   with_broken_linker=$enableval
7604 else
7605   with_broken_linker=${BROKEN_LINKER:-no}
7606 fi;
7607 echo "$as_me:7607: result: $with_broken_linker" >&5
7608 echo "${ECHO_T}$with_broken_linker" >&6
7609
7610 BROKEN_LINKER=0
7611 if test "x$with_broken_linker" = xyes ; then
7612
7613 cat >>confdefs.h <<\EOF
7614 #define BROKEN_LINKER 1
7615 EOF
7616
7617         BROKEN_LINKER=1
7618 elif test "$DFT_LWR_MODEL" = shared ; then
7619         case $cf_cv_system_name in #(vi
7620         cygwin*)
7621
7622 cat >>confdefs.h <<\EOF
7623 #define BROKEN_LINKER 1
7624 EOF
7625
7626                 BROKEN_LINKER=1
7627                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7628
7629 echo "${as_me:-configure}:7629: testing cygwin linker is broken anyway ..." 1>&5
7630
7631                 ;;
7632         esac
7633 fi
7634
7635 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7636 echo "$as_me:7636: checking if tputs should process BSD-style prefix padding" >&5
7637 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7638
7639 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7640 if test "${enable_bsdpad+set}" = set; then
7641   enableval="$enable_bsdpad"
7642   with_bsdpad=$enableval
7643 else
7644   with_bsdpad=no
7645 fi;
7646 echo "$as_me:7646: result: $with_bsdpad" >&5
7647 echo "${ECHO_T}$with_bsdpad" >&6
7648 test "x$with_bsdpad" = xyes &&
7649 cat >>confdefs.h <<\EOF
7650 #define BSD_TPUTS 1
7651 EOF
7652
7653 ###   use option --enable-widec to turn on use of wide-character support
7654 NCURSES_CH_T=chtype
7655 NCURSES_LIBUTF8=0
7656
7657 NEED_WCHAR_H=0
7658 NCURSES_MBSTATE_T=0
7659 NCURSES_WCHAR_T=0
7660 NCURSES_WINT_T=0
7661
7662 # Check to define _XOPEN_SOURCE "automatically"
7663
7664 cf_XOPEN_SOURCE=500
7665 cf_POSIX_C_SOURCE=199506L
7666 cf_xopen_source=
7667
7668 case $host_os in #(vi
7669 aix[4-7]*) #(vi
7670         cf_xopen_source="-D_ALL_SOURCE"
7671         ;;
7672 cygwin|msys) #(vi
7673         cf_XOPEN_SOURCE=600
7674         ;;
7675 darwin[0-8].*) #(vi
7676         cf_xopen_source="-D_APPLE_C_SOURCE"
7677         ;;
7678 darwin*) #(vi
7679         cf_xopen_source="-D_DARWIN_C_SOURCE"
7680         cf_XOPEN_SOURCE=
7681         ;;
7682 freebsd*|dragonfly*) #(vi
7683         # 5.x headers associate
7684         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7685         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7686         cf_POSIX_C_SOURCE=200112L
7687         cf_XOPEN_SOURCE=600
7688         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7689         ;;
7690 hpux11*) #(vi
7691         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7692         ;;
7693 hpux*) #(vi
7694         cf_xopen_source="-D_HPUX_SOURCE"
7695         ;;
7696 irix[56].*) #(vi
7697         cf_xopen_source="-D_SGI_SOURCE"
7698         cf_XOPEN_SOURCE=
7699         ;;
7700 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7701
7702 echo "$as_me:7702: checking if we must define _GNU_SOURCE" >&5
7703 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7704 if test "${cf_cv_gnu_source+set}" = set; then
7705   echo $ECHO_N "(cached) $ECHO_C" >&6
7706 else
7707
7708 cat >conftest.$ac_ext <<_ACEOF
7709 #line 7709 "configure"
7710 #include "confdefs.h"
7711 #include <sys/types.h>
7712 int
7713 main ()
7714 {
7715
7716 #ifndef _XOPEN_SOURCE
7717 make an error
7718 #endif
7719   ;
7720   return 0;
7721 }
7722 _ACEOF
7723 rm -f conftest.$ac_objext
7724 if { (eval echo "$as_me:7724: \"$ac_compile\"") >&5
7725   (eval $ac_compile) 2>&5
7726   ac_status=$?
7727   echo "$as_me:7727: \$? = $ac_status" >&5
7728   (exit $ac_status); } &&
7729          { ac_try='test -s conftest.$ac_objext'
7730   { (eval echo "$as_me:7730: \"$ac_try\"") >&5
7731   (eval $ac_try) 2>&5
7732   ac_status=$?
7733   echo "$as_me:7733: \$? = $ac_status" >&5
7734   (exit $ac_status); }; }; then
7735   cf_cv_gnu_source=no
7736 else
7737   echo "$as_me: failed program was:" >&5
7738 cat conftest.$ac_ext >&5
7739 cf_save="$CPPFLAGS"
7740          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7741          cat >conftest.$ac_ext <<_ACEOF
7742 #line 7742 "configure"
7743 #include "confdefs.h"
7744 #include <sys/types.h>
7745 int
7746 main ()
7747 {
7748
7749 #ifdef _XOPEN_SOURCE
7750 make an error
7751 #endif
7752   ;
7753   return 0;
7754 }
7755 _ACEOF
7756 rm -f conftest.$ac_objext
7757 if { (eval echo "$as_me:7757: \"$ac_compile\"") >&5
7758   (eval $ac_compile) 2>&5
7759   ac_status=$?
7760   echo "$as_me:7760: \$? = $ac_status" >&5
7761   (exit $ac_status); } &&
7762          { ac_try='test -s conftest.$ac_objext'
7763   { (eval echo "$as_me:7763: \"$ac_try\"") >&5
7764   (eval $ac_try) 2>&5
7765   ac_status=$?
7766   echo "$as_me:7766: \$? = $ac_status" >&5
7767   (exit $ac_status); }; }; then
7768   cf_cv_gnu_source=no
7769 else
7770   echo "$as_me: failed program was:" >&5
7771 cat conftest.$ac_ext >&5
7772 cf_cv_gnu_source=yes
7773 fi
7774 rm -f conftest.$ac_objext conftest.$ac_ext
7775         CPPFLAGS="$cf_save"
7776
7777 fi
7778 rm -f conftest.$ac_objext conftest.$ac_ext
7779
7780 fi
7781 echo "$as_me:7781: result: $cf_cv_gnu_source" >&5
7782 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7783 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7784
7785         ;;
7786 minix*) #(vi
7787         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7788         ;;
7789 mirbsd*) #(vi
7790         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7791         cf_XOPEN_SOURCE=
7792
7793 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7794
7795 cf_save_CFLAGS="$CFLAGS"
7796 cf_save_CPPFLAGS="$CPPFLAGS"
7797
7798 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7799         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7800                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7801
7802 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7803         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7804                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7805
7806 echo "$as_me:7806: checking if we should define _POSIX_C_SOURCE" >&5
7807 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7808 if test "${cf_cv_posix_c_source+set}" = set; then
7809   echo $ECHO_N "(cached) $ECHO_C" >&6
7810 else
7811
7812 echo "${as_me:-configure}:7812: testing if the symbol is already defined go no further ..." 1>&5
7813
7814         cat >conftest.$ac_ext <<_ACEOF
7815 #line 7815 "configure"
7816 #include "confdefs.h"
7817 #include <sys/types.h>
7818 int
7819 main ()
7820 {
7821
7822 #ifndef _POSIX_C_SOURCE
7823 make an error
7824 #endif
7825   ;
7826   return 0;
7827 }
7828 _ACEOF
7829 rm -f conftest.$ac_objext
7830 if { (eval echo "$as_me:7830: \"$ac_compile\"") >&5
7831   (eval $ac_compile) 2>&5
7832   ac_status=$?
7833   echo "$as_me:7833: \$? = $ac_status" >&5
7834   (exit $ac_status); } &&
7835          { ac_try='test -s conftest.$ac_objext'
7836   { (eval echo "$as_me:7836: \"$ac_try\"") >&5
7837   (eval $ac_try) 2>&5
7838   ac_status=$?
7839   echo "$as_me:7839: \$? = $ac_status" >&5
7840   (exit $ac_status); }; }; then
7841   cf_cv_posix_c_source=no
7842 else
7843   echo "$as_me: failed program was:" >&5
7844 cat conftest.$ac_ext >&5
7845 cf_want_posix_source=no
7846          case .$cf_POSIX_C_SOURCE in #(vi
7847          .[12]??*) #(vi
7848                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7849                 ;;
7850          .2) #(vi
7851                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7852                 cf_want_posix_source=yes
7853                 ;;
7854          .*)
7855                 cf_want_posix_source=yes
7856                 ;;
7857          esac
7858          if test "$cf_want_posix_source" = yes ; then
7859                 cat >conftest.$ac_ext <<_ACEOF
7860 #line 7860 "configure"
7861 #include "confdefs.h"
7862 #include <sys/types.h>
7863 int
7864 main ()
7865 {
7866
7867 #ifdef _POSIX_SOURCE
7868 make an error
7869 #endif
7870   ;
7871   return 0;
7872 }
7873 _ACEOF
7874 rm -f conftest.$ac_objext
7875 if { (eval echo "$as_me:7875: \"$ac_compile\"") >&5
7876   (eval $ac_compile) 2>&5
7877   ac_status=$?
7878   echo "$as_me:7878: \$? = $ac_status" >&5
7879   (exit $ac_status); } &&
7880          { ac_try='test -s conftest.$ac_objext'
7881   { (eval echo "$as_me:7881: \"$ac_try\"") >&5
7882   (eval $ac_try) 2>&5
7883   ac_status=$?
7884   echo "$as_me:7884: \$? = $ac_status" >&5
7885   (exit $ac_status); }; }; then
7886   :
7887 else
7888   echo "$as_me: failed program was:" >&5
7889 cat conftest.$ac_ext >&5
7890 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7891 fi
7892 rm -f conftest.$ac_objext conftest.$ac_ext
7893          fi
7894
7895 echo "${as_me:-configure}:7895: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7896
7897          CFLAGS="$cf_trim_CFLAGS"
7898          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7899
7900 echo "${as_me:-configure}:7900: testing if the second compile does not leave our definition intact error ..." 1>&5
7901
7902          cat >conftest.$ac_ext <<_ACEOF
7903 #line 7903 "configure"
7904 #include "confdefs.h"
7905 #include <sys/types.h>
7906 int
7907 main ()
7908 {
7909
7910 #ifndef _POSIX_C_SOURCE
7911 make an error
7912 #endif
7913   ;
7914   return 0;
7915 }
7916 _ACEOF
7917 rm -f conftest.$ac_objext
7918 if { (eval echo "$as_me:7918: \"$ac_compile\"") >&5
7919   (eval $ac_compile) 2>&5
7920   ac_status=$?
7921   echo "$as_me:7921: \$? = $ac_status" >&5
7922   (exit $ac_status); } &&
7923          { ac_try='test -s conftest.$ac_objext'
7924   { (eval echo "$as_me:7924: \"$ac_try\"") >&5
7925   (eval $ac_try) 2>&5
7926   ac_status=$?
7927   echo "$as_me:7927: \$? = $ac_status" >&5
7928   (exit $ac_status); }; }; then
7929   :
7930 else
7931   echo "$as_me: failed program was:" >&5
7932 cat conftest.$ac_ext >&5
7933 cf_cv_posix_c_source=no
7934 fi
7935 rm -f conftest.$ac_objext conftest.$ac_ext
7936          CFLAGS="$cf_save_CFLAGS"
7937          CPPFLAGS="$cf_save_CPPFLAGS"
7938
7939 fi
7940 rm -f conftest.$ac_objext conftest.$ac_ext
7941
7942 fi
7943 echo "$as_me:7943: result: $cf_cv_posix_c_source" >&5
7944 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7945
7946 if test "$cf_cv_posix_c_source" != no ; then
7947         CFLAGS="$cf_trim_CFLAGS"
7948         CPPFLAGS="$cf_trim_CPPFLAGS"
7949
7950 cf_fix_cppflags=no
7951 cf_new_cflags=
7952 cf_new_cppflags=
7953 cf_new_extra_cppflags=
7954
7955 for cf_add_cflags in $cf_cv_posix_c_source
7956 do
7957 case $cf_fix_cppflags in
7958 no)
7959         case $cf_add_cflags in #(vi
7960         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7961                 case $cf_add_cflags in
7962                 -D*)
7963                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7964
7965                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7966                                 && test -z "${cf_tst_cflags}" \
7967                                 && cf_fix_cppflags=yes
7968
7969                         if test $cf_fix_cppflags = yes ; then
7970                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7971                                 continue
7972                         elif test "${cf_tst_cflags}" = "\"'" ; then
7973                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7974                                 continue
7975                         fi
7976                         ;;
7977                 esac
7978                 case "$CPPFLAGS" in
7979                 *$cf_add_cflags) #(vi
7980                         ;;
7981                 *) #(vi
7982                         case $cf_add_cflags in #(vi
7983                         -D*)
7984                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7985
7986 CPPFLAGS=`echo "$CPPFLAGS" | \
7987         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7988                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7989
7990                                 ;;
7991                         esac
7992                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7993                         ;;
7994                 esac
7995                 ;;
7996         *)
7997                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7998                 ;;
7999         esac
8000         ;;
8001 yes)
8002         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8003
8004         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8005
8006         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8007                 && test -z "${cf_tst_cflags}" \
8008                 && cf_fix_cppflags=no
8009         ;;
8010 esac
8011 done
8012
8013 if test -n "$cf_new_cflags" ; then
8014
8015         CFLAGS="$CFLAGS $cf_new_cflags"
8016 fi
8017
8018 if test -n "$cf_new_cppflags" ; then
8019
8020         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8021 fi
8022
8023 if test -n "$cf_new_extra_cppflags" ; then
8024
8025         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8026 fi
8027
8028 fi
8029
8030         ;;
8031 netbsd*) #(vi
8032         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8033         ;;
8034 openbsd[4-9]*) #(vi
8035         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8036         cf_xopen_source="-D_BSD_SOURCE"
8037         cf_XOPEN_SOURCE=600
8038         ;;
8039 openbsd*) #(vi
8040         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8041         ;;
8042 osf[45]*) #(vi
8043         cf_xopen_source="-D_OSF_SOURCE"
8044         ;;
8045 nto-qnx*) #(vi
8046         cf_xopen_source="-D_QNX_SOURCE"
8047         ;;
8048 sco*) #(vi
8049         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8050         ;;
8051 solaris2.*) #(vi
8052         cf_xopen_source="-D__EXTENSIONS__"
8053         cf_cv_xopen_source=broken
8054         ;;
8055 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8056         cf_XOPEN_SOURCE=
8057         cf_POSIX_C_SOURCE=
8058         ;;
8059 *)
8060
8061 echo "$as_me:8061: checking if we should define _XOPEN_SOURCE" >&5
8062 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8063 if test "${cf_cv_xopen_source+set}" = set; then
8064   echo $ECHO_N "(cached) $ECHO_C" >&6
8065 else
8066
8067         cat >conftest.$ac_ext <<_ACEOF
8068 #line 8068 "configure"
8069 #include "confdefs.h"
8070
8071 #include <stdlib.h>
8072 #include <string.h>
8073 #include <sys/types.h>
8074
8075 int
8076 main ()
8077 {
8078
8079 #ifndef _XOPEN_SOURCE
8080 make an error
8081 #endif
8082   ;
8083   return 0;
8084 }
8085 _ACEOF
8086 rm -f conftest.$ac_objext
8087 if { (eval echo "$as_me:8087: \"$ac_compile\"") >&5
8088   (eval $ac_compile) 2>&5
8089   ac_status=$?
8090   echo "$as_me:8090: \$? = $ac_status" >&5
8091   (exit $ac_status); } &&
8092          { ac_try='test -s conftest.$ac_objext'
8093   { (eval echo "$as_me:8093: \"$ac_try\"") >&5
8094   (eval $ac_try) 2>&5
8095   ac_status=$?
8096   echo "$as_me:8096: \$? = $ac_status" >&5
8097   (exit $ac_status); }; }; then
8098   cf_cv_xopen_source=no
8099 else
8100   echo "$as_me: failed program was:" >&5
8101 cat conftest.$ac_ext >&5
8102 cf_save="$CPPFLAGS"
8103          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8104          cat >conftest.$ac_ext <<_ACEOF
8105 #line 8105 "configure"
8106 #include "confdefs.h"
8107
8108 #include <stdlib.h>
8109 #include <string.h>
8110 #include <sys/types.h>
8111
8112 int
8113 main ()
8114 {
8115
8116 #ifdef _XOPEN_SOURCE
8117 make an error
8118 #endif
8119   ;
8120   return 0;
8121 }
8122 _ACEOF
8123 rm -f conftest.$ac_objext
8124 if { (eval echo "$as_me:8124: \"$ac_compile\"") >&5
8125   (eval $ac_compile) 2>&5
8126   ac_status=$?
8127   echo "$as_me:8127: \$? = $ac_status" >&5
8128   (exit $ac_status); } &&
8129          { ac_try='test -s conftest.$ac_objext'
8130   { (eval echo "$as_me:8130: \"$ac_try\"") >&5
8131   (eval $ac_try) 2>&5
8132   ac_status=$?
8133   echo "$as_me:8133: \$? = $ac_status" >&5
8134   (exit $ac_status); }; }; then
8135   cf_cv_xopen_source=no
8136 else
8137   echo "$as_me: failed program was:" >&5
8138 cat conftest.$ac_ext >&5
8139 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8140 fi
8141 rm -f conftest.$ac_objext conftest.$ac_ext
8142         CPPFLAGS="$cf_save"
8143
8144 fi
8145 rm -f conftest.$ac_objext conftest.$ac_ext
8146
8147 fi
8148 echo "$as_me:8148: result: $cf_cv_xopen_source" >&5
8149 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8150
8151 if test "$cf_cv_xopen_source" != no ; then
8152
8153 CFLAGS=`echo "$CFLAGS" | \
8154         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8155                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8156
8157 CPPFLAGS=`echo "$CPPFLAGS" | \
8158         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8159                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8160
8161         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8162
8163 cf_fix_cppflags=no
8164 cf_new_cflags=
8165 cf_new_cppflags=
8166 cf_new_extra_cppflags=
8167
8168 for cf_add_cflags in $cf_temp_xopen_source
8169 do
8170 case $cf_fix_cppflags in
8171 no)
8172         case $cf_add_cflags in #(vi
8173         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8174                 case $cf_add_cflags in
8175                 -D*)
8176                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8177
8178                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8179                                 && test -z "${cf_tst_cflags}" \
8180                                 && cf_fix_cppflags=yes
8181
8182                         if test $cf_fix_cppflags = yes ; then
8183                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8184                                 continue
8185                         elif test "${cf_tst_cflags}" = "\"'" ; then
8186                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8187                                 continue
8188                         fi
8189                         ;;
8190                 esac
8191                 case "$CPPFLAGS" in
8192                 *$cf_add_cflags) #(vi
8193                         ;;
8194                 *) #(vi
8195                         case $cf_add_cflags in #(vi
8196                         -D*)
8197                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8198
8199 CPPFLAGS=`echo "$CPPFLAGS" | \
8200         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8201                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8202
8203                                 ;;
8204                         esac
8205                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8206                         ;;
8207                 esac
8208                 ;;
8209         *)
8210                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8211                 ;;
8212         esac
8213         ;;
8214 yes)
8215         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8216
8217         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8218
8219         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8220                 && test -z "${cf_tst_cflags}" \
8221                 && cf_fix_cppflags=no
8222         ;;
8223 esac
8224 done
8225
8226 if test -n "$cf_new_cflags" ; then
8227
8228         CFLAGS="$CFLAGS $cf_new_cflags"
8229 fi
8230
8231 if test -n "$cf_new_cppflags" ; then
8232
8233         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8234 fi
8235
8236 if test -n "$cf_new_extra_cppflags" ; then
8237
8238         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8239 fi
8240
8241 fi
8242
8243 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8244
8245 cf_save_CFLAGS="$CFLAGS"
8246 cf_save_CPPFLAGS="$CPPFLAGS"
8247
8248 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8249         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8250                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8251
8252 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8253         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8254                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8255
8256 echo "$as_me:8256: checking if we should define _POSIX_C_SOURCE" >&5
8257 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8258 if test "${cf_cv_posix_c_source+set}" = set; then
8259   echo $ECHO_N "(cached) $ECHO_C" >&6
8260 else
8261
8262 echo "${as_me:-configure}:8262: testing if the symbol is already defined go no further ..." 1>&5
8263
8264         cat >conftest.$ac_ext <<_ACEOF
8265 #line 8265 "configure"
8266 #include "confdefs.h"
8267 #include <sys/types.h>
8268 int
8269 main ()
8270 {
8271
8272 #ifndef _POSIX_C_SOURCE
8273 make an error
8274 #endif
8275   ;
8276   return 0;
8277 }
8278 _ACEOF
8279 rm -f conftest.$ac_objext
8280 if { (eval echo "$as_me:8280: \"$ac_compile\"") >&5
8281   (eval $ac_compile) 2>&5
8282   ac_status=$?
8283   echo "$as_me:8283: \$? = $ac_status" >&5
8284   (exit $ac_status); } &&
8285          { ac_try='test -s conftest.$ac_objext'
8286   { (eval echo "$as_me:8286: \"$ac_try\"") >&5
8287   (eval $ac_try) 2>&5
8288   ac_status=$?
8289   echo "$as_me:8289: \$? = $ac_status" >&5
8290   (exit $ac_status); }; }; then
8291   cf_cv_posix_c_source=no
8292 else
8293   echo "$as_me: failed program was:" >&5
8294 cat conftest.$ac_ext >&5
8295 cf_want_posix_source=no
8296          case .$cf_POSIX_C_SOURCE in #(vi
8297          .[12]??*) #(vi
8298                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8299                 ;;
8300          .2) #(vi
8301                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8302                 cf_want_posix_source=yes
8303                 ;;
8304          .*)
8305                 cf_want_posix_source=yes
8306                 ;;
8307          esac
8308          if test "$cf_want_posix_source" = yes ; then
8309                 cat >conftest.$ac_ext <<_ACEOF
8310 #line 8310 "configure"
8311 #include "confdefs.h"
8312 #include <sys/types.h>
8313 int
8314 main ()
8315 {
8316
8317 #ifdef _POSIX_SOURCE
8318 make an error
8319 #endif
8320   ;
8321   return 0;
8322 }
8323 _ACEOF
8324 rm -f conftest.$ac_objext
8325 if { (eval echo "$as_me:8325: \"$ac_compile\"") >&5
8326   (eval $ac_compile) 2>&5
8327   ac_status=$?
8328   echo "$as_me:8328: \$? = $ac_status" >&5
8329   (exit $ac_status); } &&
8330          { ac_try='test -s conftest.$ac_objext'
8331   { (eval echo "$as_me:8331: \"$ac_try\"") >&5
8332   (eval $ac_try) 2>&5
8333   ac_status=$?
8334   echo "$as_me:8334: \$? = $ac_status" >&5
8335   (exit $ac_status); }; }; then
8336   :
8337 else
8338   echo "$as_me: failed program was:" >&5
8339 cat conftest.$ac_ext >&5
8340 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8341 fi
8342 rm -f conftest.$ac_objext conftest.$ac_ext
8343          fi
8344
8345 echo "${as_me:-configure}:8345: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8346
8347          CFLAGS="$cf_trim_CFLAGS"
8348          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8349
8350 echo "${as_me:-configure}:8350: testing if the second compile does not leave our definition intact error ..." 1>&5
8351
8352          cat >conftest.$ac_ext <<_ACEOF
8353 #line 8353 "configure"
8354 #include "confdefs.h"
8355 #include <sys/types.h>
8356 int
8357 main ()
8358 {
8359
8360 #ifndef _POSIX_C_SOURCE
8361 make an error
8362 #endif
8363   ;
8364   return 0;
8365 }
8366 _ACEOF
8367 rm -f conftest.$ac_objext
8368 if { (eval echo "$as_me:8368: \"$ac_compile\"") >&5
8369   (eval $ac_compile) 2>&5
8370   ac_status=$?
8371   echo "$as_me:8371: \$? = $ac_status" >&5
8372   (exit $ac_status); } &&
8373          { ac_try='test -s conftest.$ac_objext'
8374   { (eval echo "$as_me:8374: \"$ac_try\"") >&5
8375   (eval $ac_try) 2>&5
8376   ac_status=$?
8377   echo "$as_me:8377: \$? = $ac_status" >&5
8378   (exit $ac_status); }; }; then
8379   :
8380 else
8381   echo "$as_me: failed program was:" >&5
8382 cat conftest.$ac_ext >&5
8383 cf_cv_posix_c_source=no
8384 fi
8385 rm -f conftest.$ac_objext conftest.$ac_ext
8386          CFLAGS="$cf_save_CFLAGS"
8387          CPPFLAGS="$cf_save_CPPFLAGS"
8388
8389 fi
8390 rm -f conftest.$ac_objext conftest.$ac_ext
8391
8392 fi
8393 echo "$as_me:8393: result: $cf_cv_posix_c_source" >&5
8394 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8395
8396 if test "$cf_cv_posix_c_source" != no ; then
8397         CFLAGS="$cf_trim_CFLAGS"
8398         CPPFLAGS="$cf_trim_CPPFLAGS"
8399
8400 cf_fix_cppflags=no
8401 cf_new_cflags=
8402 cf_new_cppflags=
8403 cf_new_extra_cppflags=
8404
8405 for cf_add_cflags in $cf_cv_posix_c_source
8406 do
8407 case $cf_fix_cppflags in
8408 no)
8409         case $cf_add_cflags in #(vi
8410         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8411                 case $cf_add_cflags in
8412                 -D*)
8413                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8414
8415                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8416                                 && test -z "${cf_tst_cflags}" \
8417                                 && cf_fix_cppflags=yes
8418
8419                         if test $cf_fix_cppflags = yes ; then
8420                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8421                                 continue
8422                         elif test "${cf_tst_cflags}" = "\"'" ; then
8423                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8424                                 continue
8425                         fi
8426                         ;;
8427                 esac
8428                 case "$CPPFLAGS" in
8429                 *$cf_add_cflags) #(vi
8430                         ;;
8431                 *) #(vi
8432                         case $cf_add_cflags in #(vi
8433                         -D*)
8434                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8435
8436 CPPFLAGS=`echo "$CPPFLAGS" | \
8437         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8438                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8439
8440                                 ;;
8441                         esac
8442                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8443                         ;;
8444                 esac
8445                 ;;
8446         *)
8447                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8448                 ;;
8449         esac
8450         ;;
8451 yes)
8452         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8453
8454         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8455
8456         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8457                 && test -z "${cf_tst_cflags}" \
8458                 && cf_fix_cppflags=no
8459         ;;
8460 esac
8461 done
8462
8463 if test -n "$cf_new_cflags" ; then
8464
8465         CFLAGS="$CFLAGS $cf_new_cflags"
8466 fi
8467
8468 if test -n "$cf_new_cppflags" ; then
8469
8470         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8471 fi
8472
8473 if test -n "$cf_new_extra_cppflags" ; then
8474
8475         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8476 fi
8477
8478 fi
8479
8480         ;;
8481 esac
8482
8483 if test -n "$cf_xopen_source" ; then
8484
8485 cf_fix_cppflags=no
8486 cf_new_cflags=
8487 cf_new_cppflags=
8488 cf_new_extra_cppflags=
8489
8490 for cf_add_cflags in $cf_xopen_source
8491 do
8492 case $cf_fix_cppflags in
8493 no)
8494         case $cf_add_cflags in #(vi
8495         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8496                 case $cf_add_cflags in
8497                 -D*)
8498                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8499
8500                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8501                                 && test -z "${cf_tst_cflags}" \
8502                                 && cf_fix_cppflags=yes
8503
8504                         if test $cf_fix_cppflags = yes ; then
8505                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8506                                 continue
8507                         elif test "${cf_tst_cflags}" = "\"'" ; then
8508                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8509                                 continue
8510                         fi
8511                         ;;
8512                 esac
8513                 case "$CPPFLAGS" in
8514                 *$cf_add_cflags) #(vi
8515                         ;;
8516                 *) #(vi
8517                         case $cf_add_cflags in #(vi
8518                         -D*)
8519                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8520
8521 CPPFLAGS=`echo "$CPPFLAGS" | \
8522         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8523                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8524
8525                                 ;;
8526                         esac
8527                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8528                         ;;
8529                 esac
8530                 ;;
8531         *)
8532                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8533                 ;;
8534         esac
8535         ;;
8536 yes)
8537         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8538
8539         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8540
8541         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8542                 && test -z "${cf_tst_cflags}" \
8543                 && cf_fix_cppflags=no
8544         ;;
8545 esac
8546 done
8547
8548 if test -n "$cf_new_cflags" ; then
8549         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8550
8551 echo "${as_me:-configure}:8551: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8552
8553         CFLAGS="$CFLAGS $cf_new_cflags"
8554 fi
8555
8556 if test -n "$cf_new_cppflags" ; then
8557         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8558
8559 echo "${as_me:-configure}:8559: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8560
8561         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8562 fi
8563
8564 if test -n "$cf_new_extra_cppflags" ; then
8565         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8566
8567 echo "${as_me:-configure}:8567: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8568
8569         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8570 fi
8571
8572 fi
8573
8574 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8575         echo "$as_me:8575: checking if _XOPEN_SOURCE really is set" >&5
8576 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8577         cat >conftest.$ac_ext <<_ACEOF
8578 #line 8578 "configure"
8579 #include "confdefs.h"
8580 #include <stdlib.h>
8581 int
8582 main ()
8583 {
8584
8585 #ifndef _XOPEN_SOURCE
8586 make an error
8587 #endif
8588   ;
8589   return 0;
8590 }
8591 _ACEOF
8592 rm -f conftest.$ac_objext
8593 if { (eval echo "$as_me:8593: \"$ac_compile\"") >&5
8594   (eval $ac_compile) 2>&5
8595   ac_status=$?
8596   echo "$as_me:8596: \$? = $ac_status" >&5
8597   (exit $ac_status); } &&
8598          { ac_try='test -s conftest.$ac_objext'
8599   { (eval echo "$as_me:8599: \"$ac_try\"") >&5
8600   (eval $ac_try) 2>&5
8601   ac_status=$?
8602   echo "$as_me:8602: \$? = $ac_status" >&5
8603   (exit $ac_status); }; }; then
8604   cf_XOPEN_SOURCE_set=yes
8605 else
8606   echo "$as_me: failed program was:" >&5
8607 cat conftest.$ac_ext >&5
8608 cf_XOPEN_SOURCE_set=no
8609 fi
8610 rm -f conftest.$ac_objext conftest.$ac_ext
8611         echo "$as_me:8611: result: $cf_XOPEN_SOURCE_set" >&5
8612 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8613         if test $cf_XOPEN_SOURCE_set = yes
8614         then
8615                 cat >conftest.$ac_ext <<_ACEOF
8616 #line 8616 "configure"
8617 #include "confdefs.h"
8618 #include <stdlib.h>
8619 int
8620 main ()
8621 {
8622
8623 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8624 make an error
8625 #endif
8626   ;
8627   return 0;
8628 }
8629 _ACEOF
8630 rm -f conftest.$ac_objext
8631 if { (eval echo "$as_me:8631: \"$ac_compile\"") >&5
8632   (eval $ac_compile) 2>&5
8633   ac_status=$?
8634   echo "$as_me:8634: \$? = $ac_status" >&5
8635   (exit $ac_status); } &&
8636          { ac_try='test -s conftest.$ac_objext'
8637   { (eval echo "$as_me:8637: \"$ac_try\"") >&5
8638   (eval $ac_try) 2>&5
8639   ac_status=$?
8640   echo "$as_me:8640: \$? = $ac_status" >&5
8641   (exit $ac_status); }; }; then
8642   cf_XOPEN_SOURCE_set_ok=yes
8643 else
8644   echo "$as_me: failed program was:" >&5
8645 cat conftest.$ac_ext >&5
8646 cf_XOPEN_SOURCE_set_ok=no
8647 fi
8648 rm -f conftest.$ac_objext conftest.$ac_ext
8649                 if test $cf_XOPEN_SOURCE_set_ok = no
8650                 then
8651                         { echo "$as_me:8651: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8652 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8653                 fi
8654         else
8655
8656 echo "$as_me:8656: checking if we should define _XOPEN_SOURCE" >&5
8657 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8658 if test "${cf_cv_xopen_source+set}" = set; then
8659   echo $ECHO_N "(cached) $ECHO_C" >&6
8660 else
8661
8662         cat >conftest.$ac_ext <<_ACEOF
8663 #line 8663 "configure"
8664 #include "confdefs.h"
8665
8666 #include <stdlib.h>
8667 #include <string.h>
8668 #include <sys/types.h>
8669
8670 int
8671 main ()
8672 {
8673
8674 #ifndef _XOPEN_SOURCE
8675 make an error
8676 #endif
8677   ;
8678   return 0;
8679 }
8680 _ACEOF
8681 rm -f conftest.$ac_objext
8682 if { (eval echo "$as_me:8682: \"$ac_compile\"") >&5
8683   (eval $ac_compile) 2>&5
8684   ac_status=$?
8685   echo "$as_me:8685: \$? = $ac_status" >&5
8686   (exit $ac_status); } &&
8687          { ac_try='test -s conftest.$ac_objext'
8688   { (eval echo "$as_me:8688: \"$ac_try\"") >&5
8689   (eval $ac_try) 2>&5
8690   ac_status=$?
8691   echo "$as_me:8691: \$? = $ac_status" >&5
8692   (exit $ac_status); }; }; then
8693   cf_cv_xopen_source=no
8694 else
8695   echo "$as_me: failed program was:" >&5
8696 cat conftest.$ac_ext >&5
8697 cf_save="$CPPFLAGS"
8698          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8699          cat >conftest.$ac_ext <<_ACEOF
8700 #line 8700 "configure"
8701 #include "confdefs.h"
8702
8703 #include <stdlib.h>
8704 #include <string.h>
8705 #include <sys/types.h>
8706
8707 int
8708 main ()
8709 {
8710
8711 #ifdef _XOPEN_SOURCE
8712 make an error
8713 #endif
8714   ;
8715   return 0;
8716 }
8717 _ACEOF
8718 rm -f conftest.$ac_objext
8719 if { (eval echo "$as_me:8719: \"$ac_compile\"") >&5
8720   (eval $ac_compile) 2>&5
8721   ac_status=$?
8722   echo "$as_me:8722: \$? = $ac_status" >&5
8723   (exit $ac_status); } &&
8724          { ac_try='test -s conftest.$ac_objext'
8725   { (eval echo "$as_me:8725: \"$ac_try\"") >&5
8726   (eval $ac_try) 2>&5
8727   ac_status=$?
8728   echo "$as_me:8728: \$? = $ac_status" >&5
8729   (exit $ac_status); }; }; then
8730   cf_cv_xopen_source=no
8731 else
8732   echo "$as_me: failed program was:" >&5
8733 cat conftest.$ac_ext >&5
8734 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8735 fi
8736 rm -f conftest.$ac_objext conftest.$ac_ext
8737         CPPFLAGS="$cf_save"
8738
8739 fi
8740 rm -f conftest.$ac_objext conftest.$ac_ext
8741
8742 fi
8743 echo "$as_me:8743: result: $cf_cv_xopen_source" >&5
8744 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8745
8746 if test "$cf_cv_xopen_source" != no ; then
8747
8748 CFLAGS=`echo "$CFLAGS" | \
8749         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8750                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8751
8752 CPPFLAGS=`echo "$CPPFLAGS" | \
8753         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8754                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8755
8756         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8757
8758 cf_fix_cppflags=no
8759 cf_new_cflags=
8760 cf_new_cppflags=
8761 cf_new_extra_cppflags=
8762
8763 for cf_add_cflags in $cf_temp_xopen_source
8764 do
8765 case $cf_fix_cppflags in
8766 no)
8767         case $cf_add_cflags in #(vi
8768         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8769                 case $cf_add_cflags in
8770                 -D*)
8771                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8772
8773                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8774                                 && test -z "${cf_tst_cflags}" \
8775                                 && cf_fix_cppflags=yes
8776
8777                         if test $cf_fix_cppflags = yes ; then
8778                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8779                                 continue
8780                         elif test "${cf_tst_cflags}" = "\"'" ; then
8781                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8782                                 continue
8783                         fi
8784                         ;;
8785                 esac
8786                 case "$CPPFLAGS" in
8787                 *$cf_add_cflags) #(vi
8788                         ;;
8789                 *) #(vi
8790                         case $cf_add_cflags in #(vi
8791                         -D*)
8792                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8793
8794 CPPFLAGS=`echo "$CPPFLAGS" | \
8795         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8796                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8797
8798                                 ;;
8799                         esac
8800                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8801                         ;;
8802                 esac
8803                 ;;
8804         *)
8805                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8806                 ;;
8807         esac
8808         ;;
8809 yes)
8810         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8811
8812         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8813
8814         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8815                 && test -z "${cf_tst_cflags}" \
8816                 && cf_fix_cppflags=no
8817         ;;
8818 esac
8819 done
8820
8821 if test -n "$cf_new_cflags" ; then
8822
8823         CFLAGS="$CFLAGS $cf_new_cflags"
8824 fi
8825
8826 if test -n "$cf_new_cppflags" ; then
8827
8828         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8829 fi
8830
8831 if test -n "$cf_new_extra_cppflags" ; then
8832
8833         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8834 fi
8835
8836 fi
8837
8838         fi
8839 fi
8840
8841 # Work around breakage on OS X
8842
8843 echo "$as_me:8843: checking if SIGWINCH is defined" >&5
8844 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8845 if test "${cf_cv_define_sigwinch+set}" = set; then
8846   echo $ECHO_N "(cached) $ECHO_C" >&6
8847 else
8848
8849         cat >conftest.$ac_ext <<_ACEOF
8850 #line 8850 "configure"
8851 #include "confdefs.h"
8852
8853 #include <sys/types.h>
8854 #include <sys/signal.h>
8855
8856 int
8857 main ()
8858 {
8859 int x = SIGWINCH
8860   ;
8861   return 0;
8862 }
8863 _ACEOF
8864 rm -f conftest.$ac_objext
8865 if { (eval echo "$as_me:8865: \"$ac_compile\"") >&5
8866   (eval $ac_compile) 2>&5
8867   ac_status=$?
8868   echo "$as_me:8868: \$? = $ac_status" >&5
8869   (exit $ac_status); } &&
8870          { ac_try='test -s conftest.$ac_objext'
8871   { (eval echo "$as_me:8871: \"$ac_try\"") >&5
8872   (eval $ac_try) 2>&5
8873   ac_status=$?
8874   echo "$as_me:8874: \$? = $ac_status" >&5
8875   (exit $ac_status); }; }; then
8876   cf_cv_define_sigwinch=yes
8877 else
8878   echo "$as_me: failed program was:" >&5
8879 cat conftest.$ac_ext >&5
8880 cat >conftest.$ac_ext <<_ACEOF
8881 #line 8881 "configure"
8882 #include "confdefs.h"
8883
8884 #undef _XOPEN_SOURCE
8885 #undef _POSIX_SOURCE
8886 #undef _POSIX_C_SOURCE
8887 #include <sys/types.h>
8888 #include <sys/signal.h>
8889
8890 int
8891 main ()
8892 {
8893 int x = SIGWINCH
8894   ;
8895   return 0;
8896 }
8897 _ACEOF
8898 rm -f conftest.$ac_objext
8899 if { (eval echo "$as_me:8899: \"$ac_compile\"") >&5
8900   (eval $ac_compile) 2>&5
8901   ac_status=$?
8902   echo "$as_me:8902: \$? = $ac_status" >&5
8903   (exit $ac_status); } &&
8904          { ac_try='test -s conftest.$ac_objext'
8905   { (eval echo "$as_me:8905: \"$ac_try\"") >&5
8906   (eval $ac_try) 2>&5
8907   ac_status=$?
8908   echo "$as_me:8908: \$? = $ac_status" >&5
8909   (exit $ac_status); }; }; then
8910   cf_cv_define_sigwinch=maybe
8911 else
8912   echo "$as_me: failed program was:" >&5
8913 cat conftest.$ac_ext >&5
8914 cf_cv_define_sigwinch=no
8915 fi
8916 rm -f conftest.$ac_objext conftest.$ac_ext
8917
8918 fi
8919 rm -f conftest.$ac_objext conftest.$ac_ext
8920
8921 fi
8922 echo "$as_me:8922: result: $cf_cv_define_sigwinch" >&5
8923 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8924
8925 if test "$cf_cv_define_sigwinch" = maybe ; then
8926 echo "$as_me:8926: checking for actual SIGWINCH definition" >&5
8927 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8928 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8929   echo $ECHO_N "(cached) $ECHO_C" >&6
8930 else
8931
8932 cf_cv_fixup_sigwinch=unknown
8933 cf_sigwinch=32
8934 while test $cf_sigwinch != 1
8935 do
8936         cat >conftest.$ac_ext <<_ACEOF
8937 #line 8937 "configure"
8938 #include "confdefs.h"
8939
8940 #undef _XOPEN_SOURCE
8941 #undef _POSIX_SOURCE
8942 #undef _POSIX_C_SOURCE
8943 #include <sys/types.h>
8944 #include <sys/signal.h>
8945
8946 int
8947 main ()
8948 {
8949
8950 #if SIGWINCH != $cf_sigwinch
8951 make an error
8952 #endif
8953 int x = SIGWINCH
8954   ;
8955   return 0;
8956 }
8957 _ACEOF
8958 rm -f conftest.$ac_objext
8959 if { (eval echo "$as_me:8959: \"$ac_compile\"") >&5
8960   (eval $ac_compile) 2>&5
8961   ac_status=$?
8962   echo "$as_me:8962: \$? = $ac_status" >&5
8963   (exit $ac_status); } &&
8964          { ac_try='test -s conftest.$ac_objext'
8965   { (eval echo "$as_me:8965: \"$ac_try\"") >&5
8966   (eval $ac_try) 2>&5
8967   ac_status=$?
8968   echo "$as_me:8968: \$? = $ac_status" >&5
8969   (exit $ac_status); }; }; then
8970   cf_cv_fixup_sigwinch=$cf_sigwinch
8971          break
8972 else
8973   echo "$as_me: failed program was:" >&5
8974 cat conftest.$ac_ext >&5
8975 fi
8976 rm -f conftest.$ac_objext conftest.$ac_ext
8977
8978 cf_sigwinch=`expr $cf_sigwinch - 1`
8979 done
8980
8981 fi
8982 echo "$as_me:8982: result: $cf_cv_fixup_sigwinch" >&5
8983 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8984
8985         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8986                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8987         fi
8988 fi
8989
8990 # Checks for CODESET support.
8991
8992   echo "$as_me:8992: checking for nl_langinfo and CODESET" >&5
8993 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8994 if test "${am_cv_langinfo_codeset+set}" = set; then
8995   echo $ECHO_N "(cached) $ECHO_C" >&6
8996 else
8997   cat >conftest.$ac_ext <<_ACEOF
8998 #line 8998 "configure"
8999 #include "confdefs.h"
9000 #include <langinfo.h>
9001 int
9002 main ()
9003 {
9004 char* cs = nl_langinfo(CODESET);
9005   ;
9006   return 0;
9007 }
9008 _ACEOF
9009 rm -f conftest.$ac_objext conftest$ac_exeext
9010 if { (eval echo "$as_me:9010: \"$ac_link\"") >&5
9011   (eval $ac_link) 2>&5
9012   ac_status=$?
9013   echo "$as_me:9013: \$? = $ac_status" >&5
9014   (exit $ac_status); } &&
9015          { ac_try='test -s conftest$ac_exeext'
9016   { (eval echo "$as_me:9016: \"$ac_try\"") >&5
9017   (eval $ac_try) 2>&5
9018   ac_status=$?
9019   echo "$as_me:9019: \$? = $ac_status" >&5
9020   (exit $ac_status); }; }; then
9021   am_cv_langinfo_codeset=yes
9022 else
9023   echo "$as_me: failed program was:" >&5
9024 cat conftest.$ac_ext >&5
9025 am_cv_langinfo_codeset=no
9026 fi
9027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9028
9029 fi
9030 echo "$as_me:9030: result: $am_cv_langinfo_codeset" >&5
9031 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9032   if test $am_cv_langinfo_codeset = yes; then
9033
9034 cat >>confdefs.h <<\EOF
9035 #define HAVE_LANGINFO_CODESET 1
9036 EOF
9037
9038   fi
9039
9040 # use these variables to work around a defect in gcc's fixincludes.
9041 NCURSES_OK_WCHAR_T=
9042 NCURSES_OK_WINT_T=
9043
9044 echo "$as_me:9044: checking if you want wide-character code" >&5
9045 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9046
9047 # Check whether --enable-widec or --disable-widec was given.
9048 if test "${enable_widec+set}" = set; then
9049   enableval="$enable_widec"
9050   with_widec=$enableval
9051 else
9052   with_widec=no
9053 fi;
9054 echo "$as_me:9054: result: $with_widec" >&5
9055 echo "${ECHO_T}$with_widec" >&6
9056 if test "x$with_widec" = xyes ; then
9057         if test "x$disable_lib_suffixes" = xno ; then
9058                 LIB_SUFFIX="w${LIB_SUFFIX}"
9059         fi
9060
9061 cat >>confdefs.h <<\EOF
9062 #define USE_WIDEC_SUPPORT 1
9063 EOF
9064
9065 cat >>confdefs.h <<\EOF
9066 #define NCURSES_WIDECHAR 1
9067 EOF
9068
9069 echo "$as_me:9069: checking if wchar.h can be used as is" >&5
9070 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9071 if test "${cf_cv_wchar_h_okay+set}" = set; then
9072   echo $ECHO_N "(cached) $ECHO_C" >&6
9073 else
9074
9075 cat >conftest.$ac_ext <<_ACEOF
9076 #line 9076 "configure"
9077 #include "confdefs.h"
9078
9079 #include <stdlib.h>
9080 #include <wchar.h>
9081
9082 int
9083 main ()
9084 {
9085
9086         wint_t foo = 0;
9087         int bar = iswpunct(foo)
9088   ;
9089   return 0;
9090 }
9091 _ACEOF
9092 rm -f conftest.$ac_objext
9093 if { (eval echo "$as_me:9093: \"$ac_compile\"") >&5
9094   (eval $ac_compile) 2>&5
9095   ac_status=$?
9096   echo "$as_me:9096: \$? = $ac_status" >&5
9097   (exit $ac_status); } &&
9098          { ac_try='test -s conftest.$ac_objext'
9099   { (eval echo "$as_me:9099: \"$ac_try\"") >&5
9100   (eval $ac_try) 2>&5
9101   ac_status=$?
9102   echo "$as_me:9102: \$? = $ac_status" >&5
9103   (exit $ac_status); }; }; then
9104   cf_cv_wchar_h_okay=yes
9105 else
9106   echo "$as_me: failed program was:" >&5
9107 cat conftest.$ac_ext >&5
9108 cf_cv_wchar_h_okay=no
9109 fi
9110 rm -f conftest.$ac_objext conftest.$ac_ext
9111 fi
9112 echo "$as_me:9112: result: $cf_cv_wchar_h_okay" >&5
9113 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9114
9115 if test $cf_cv_wchar_h_okay = no
9116 then
9117
9118 echo "$as_me:9118: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9119 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9120 cat >conftest.$ac_ext <<_ACEOF
9121 #line 9121 "configure"
9122 #include "confdefs.h"
9123 #include <sys/types.h>
9124
9125 int
9126 main ()
9127 {
9128
9129 #ifndef _XOPEN_SOURCE_EXTENDED
9130 make an error
9131 #endif
9132   ;
9133   return 0;
9134 }
9135 _ACEOF
9136 rm -f conftest.$ac_objext
9137 if { (eval echo "$as_me:9137: \"$ac_compile\"") >&5
9138   (eval $ac_compile) 2>&5
9139   ac_status=$?
9140   echo "$as_me:9140: \$? = $ac_status" >&5
9141   (exit $ac_status); } &&
9142          { ac_try='test -s conftest.$ac_objext'
9143   { (eval echo "$as_me:9143: \"$ac_try\"") >&5
9144   (eval $ac_try) 2>&5
9145   ac_status=$?
9146   echo "$as_me:9146: \$? = $ac_status" >&5
9147   (exit $ac_status); }; }; then
9148   cf_result=no
9149 else
9150   echo "$as_me: failed program was:" >&5
9151 cat conftest.$ac_ext >&5
9152 cf_result=yes
9153 fi
9154 rm -f conftest.$ac_objext conftest.$ac_ext
9155 echo "$as_me:9155: result: $cf_result" >&5
9156 echo "${ECHO_T}$cf_result" >&6
9157
9158 if test "$cf_result" = yes ; then
9159         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9160 elif test "x" != "x" ; then
9161         echo "$as_me:9161: checking checking for compatible value versus " >&5
9162 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9163         cat >conftest.$ac_ext <<_ACEOF
9164 #line 9164 "configure"
9165 #include "confdefs.h"
9166 #include <sys/types.h>
9167
9168 int
9169 main ()
9170 {
9171
9172 #if _XOPEN_SOURCE_EXTENDED- < 0
9173 make an error
9174 #endif
9175   ;
9176   return 0;
9177 }
9178 _ACEOF
9179 rm -f conftest.$ac_objext
9180 if { (eval echo "$as_me:9180: \"$ac_compile\"") >&5
9181   (eval $ac_compile) 2>&5
9182   ac_status=$?
9183   echo "$as_me:9183: \$? = $ac_status" >&5
9184   (exit $ac_status); } &&
9185          { ac_try='test -s conftest.$ac_objext'
9186   { (eval echo "$as_me:9186: \"$ac_try\"") >&5
9187   (eval $ac_try) 2>&5
9188   ac_status=$?
9189   echo "$as_me:9189: \$? = $ac_status" >&5
9190   (exit $ac_status); }; }; then
9191   cf_result=yes
9192 else
9193   echo "$as_me: failed program was:" >&5
9194 cat conftest.$ac_ext >&5
9195 cf_result=no
9196 fi
9197 rm -f conftest.$ac_objext conftest.$ac_ext
9198         echo "$as_me:9198: result: $cf_result" >&5
9199 echo "${ECHO_T}$cf_result" >&6
9200         if test "$cf_result" = no ; then
9201                 # perhaps we can override it - try...
9202                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9203         fi
9204 fi
9205
9206 fi
9207
9208         # with_overwrite=no
9209         NCURSES_CH_T=cchar_t
9210
9211 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9212 do
9213 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9214 echo "$as_me:9214: checking for $ac_func" >&5
9215 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9216 if eval "test \"\${$as_ac_var+set}\" = set"; then
9217   echo $ECHO_N "(cached) $ECHO_C" >&6
9218 else
9219   cat >conftest.$ac_ext <<_ACEOF
9220 #line 9220 "configure"
9221 #include "confdefs.h"
9222 /* System header to define __stub macros and hopefully few prototypes,
9223     which can conflict with char $ac_func (); below.  */
9224 #include <assert.h>
9225 /* Override any gcc2 internal prototype to avoid an error.  */
9226 #ifdef __cplusplus
9227 extern "C"
9228 #endif
9229 /* We use char because int might match the return type of a gcc2
9230    builtin and then its argument prototype would still apply.  */
9231 char $ac_func ();
9232 char (*f) ();
9233
9234 int
9235 main ()
9236 {
9237 /* The GNU C library defines this for functions which it implements
9238     to always fail with ENOSYS.  Some functions are actually named
9239     something starting with __ and the normal name is an alias.  */
9240 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9241 choke me
9242 #else
9243 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9244 #endif
9245
9246   ;
9247   return 0;
9248 }
9249 _ACEOF
9250 rm -f conftest.$ac_objext conftest$ac_exeext
9251 if { (eval echo "$as_me:9251: \"$ac_link\"") >&5
9252   (eval $ac_link) 2>&5
9253   ac_status=$?
9254   echo "$as_me:9254: \$? = $ac_status" >&5
9255   (exit $ac_status); } &&
9256          { ac_try='test -s conftest$ac_exeext'
9257   { (eval echo "$as_me:9257: \"$ac_try\"") >&5
9258   (eval $ac_try) 2>&5
9259   ac_status=$?
9260   echo "$as_me:9260: \$? = $ac_status" >&5
9261   (exit $ac_status); }; }; then
9262   eval "$as_ac_var=yes"
9263 else
9264   echo "$as_me: failed program was:" >&5
9265 cat conftest.$ac_ext >&5
9266 eval "$as_ac_var=no"
9267 fi
9268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9269 fi
9270 echo "$as_me:9270: result: `eval echo '${'$as_ac_var'}'`" >&5
9271 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9272 if test `eval echo '${'$as_ac_var'}'` = yes; then
9273   cat >>confdefs.h <<EOF
9274 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9275 EOF
9276
9277 fi
9278 done
9279
9280         if test "x$ac_cv_func_putwc" != xyes ; then
9281
9282 echo "$as_me:9282: checking for multibyte character support" >&5
9283 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9284 if test "${cf_cv_utf8_lib+set}" = set; then
9285   echo $ECHO_N "(cached) $ECHO_C" >&6
9286 else
9287
9288         cf_save_LIBS="$LIBS"
9289         cat >conftest.$ac_ext <<_ACEOF
9290 #line 9290 "configure"
9291 #include "confdefs.h"
9292
9293 #include <stdlib.h>
9294 int
9295 main ()
9296 {
9297 putwc(0,0);
9298   ;
9299   return 0;
9300 }
9301 _ACEOF
9302 rm -f conftest.$ac_objext conftest$ac_exeext
9303 if { (eval echo "$as_me:9303: \"$ac_link\"") >&5
9304   (eval $ac_link) 2>&5
9305   ac_status=$?
9306   echo "$as_me:9306: \$? = $ac_status" >&5
9307   (exit $ac_status); } &&
9308          { ac_try='test -s conftest$ac_exeext'
9309   { (eval echo "$as_me:9309: \"$ac_try\"") >&5
9310   (eval $ac_try) 2>&5
9311   ac_status=$?
9312   echo "$as_me:9312: \$? = $ac_status" >&5
9313   (exit $ac_status); }; }; then
9314   cf_cv_utf8_lib=yes
9315 else
9316   echo "$as_me: failed program was:" >&5
9317 cat conftest.$ac_ext >&5
9318
9319 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9320 # will be set on completion of the AC_TRY_LINK below.
9321 cf_cv_header_path_utf8=
9322 cf_cv_library_path_utf8=
9323
9324 echo "${as_me:-configure}:9324: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9325
9326 cf_save_LIBS="$LIBS"
9327
9328 cat >conftest.$ac_ext <<_ACEOF
9329 #line 9329 "configure"
9330 #include "confdefs.h"
9331
9332 #include <libutf8.h>
9333 int
9334 main ()
9335 {
9336 putwc(0,0);
9337   ;
9338   return 0;
9339 }
9340 _ACEOF
9341 rm -f conftest.$ac_objext conftest$ac_exeext
9342 if { (eval echo "$as_me:9342: \"$ac_link\"") >&5
9343   (eval $ac_link) 2>&5
9344   ac_status=$?
9345   echo "$as_me:9345: \$? = $ac_status" >&5
9346   (exit $ac_status); } &&
9347          { ac_try='test -s conftest$ac_exeext'
9348   { (eval echo "$as_me:9348: \"$ac_try\"") >&5
9349   (eval $ac_try) 2>&5
9350   ac_status=$?
9351   echo "$as_me:9351: \$? = $ac_status" >&5
9352   (exit $ac_status); }; }; then
9353
9354         cf_cv_find_linkage_utf8=yes
9355         cf_cv_header_path_utf8=/usr/include
9356         cf_cv_library_path_utf8=/usr/lib
9357
9358 else
9359   echo "$as_me: failed program was:" >&5
9360 cat conftest.$ac_ext >&5
9361
9362 LIBS="-lutf8  $cf_save_LIBS"
9363
9364 cat >conftest.$ac_ext <<_ACEOF
9365 #line 9365 "configure"
9366 #include "confdefs.h"
9367
9368 #include <libutf8.h>
9369 int
9370 main ()
9371 {
9372 putwc(0,0);
9373   ;
9374   return 0;
9375 }
9376 _ACEOF
9377 rm -f conftest.$ac_objext conftest$ac_exeext
9378 if { (eval echo "$as_me:9378: \"$ac_link\"") >&5
9379   (eval $ac_link) 2>&5
9380   ac_status=$?
9381   echo "$as_me:9381: \$? = $ac_status" >&5
9382   (exit $ac_status); } &&
9383          { ac_try='test -s conftest$ac_exeext'
9384   { (eval echo "$as_me:9384: \"$ac_try\"") >&5
9385   (eval $ac_try) 2>&5
9386   ac_status=$?
9387   echo "$as_me:9387: \$? = $ac_status" >&5
9388   (exit $ac_status); }; }; then
9389
9390         cf_cv_find_linkage_utf8=yes
9391         cf_cv_header_path_utf8=/usr/include
9392         cf_cv_library_path_utf8=/usr/lib
9393         cf_cv_library_file_utf8="-lutf8"
9394
9395 else
9396   echo "$as_me: failed program was:" >&5
9397 cat conftest.$ac_ext >&5
9398
9399         cf_cv_find_linkage_utf8=no
9400         LIBS="$cf_save_LIBS"
9401
9402     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9403
9404 echo "${as_me:-configure}:9404: testing find linkage for utf8 library ..." 1>&5
9405
9406 echo "${as_me:-configure}:9406: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9407
9408     cf_save_CPPFLAGS="$CPPFLAGS"
9409     cf_test_CPPFLAGS="$CPPFLAGS"
9410
9411 cf_search=
9412
9413 # collect the current set of include-directories from compiler flags
9414 cf_header_path_list=""
9415 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9416         for cf_header_path in $CPPFLAGS $CFLAGS
9417         do
9418                 case $cf_header_path in #(vi
9419                 -I*)
9420                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9421
9422 test "x$cf_header_path" != "xNONE" && \
9423 test -d "$cf_header_path" && \
9424  {
9425         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9426         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9427         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9428         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9429         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9430         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9431 }
9432
9433                         cf_header_path_list="$cf_header_path_list $cf_search"
9434                         ;;
9435                 esac
9436         done
9437 fi
9438
9439 # add the variations for the package we are looking for
9440
9441 cf_search=
9442
9443 test "x$prefix" != "xNONE" && \
9444 test -d "$prefix" && \
9445  {
9446         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9447         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9448         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9449         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9450         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9451         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9452 }
9453
9454 for cf_subdir_prefix in \
9455         /usr \
9456         /usr/local \
9457         /usr/pkg \
9458         /opt \
9459         /opt/local \
9460         $HOME
9461 do
9462
9463 test "x$cf_subdir_prefix" != "x$prefix" && \
9464 test -d "$cf_subdir_prefix" && \
9465 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9466         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9467         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9468         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9469         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9470         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9471         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9472 }
9473
9474 done
9475
9476 test "$includedir" != NONE && \
9477 test "$includedir" != "/usr/include" && \
9478 test -d "$includedir" && {
9479         test -d $includedir &&    cf_search="$cf_search $includedir"
9480         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9481 }
9482
9483 test "$oldincludedir" != NONE && \
9484 test "$oldincludedir" != "/usr/include" && \
9485 test -d "$oldincludedir" && {
9486         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9487         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9488 }
9489
9490 cf_search="$cf_search $cf_header_path_list"
9491
9492     for cf_cv_header_path_utf8 in $cf_search
9493     do
9494       if test -d $cf_cv_header_path_utf8 ; then
9495         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9496
9497 echo "${as_me:-configure}:9497: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9498
9499         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9500         cat >conftest.$ac_ext <<_ACEOF
9501 #line 9501 "configure"
9502 #include "confdefs.h"
9503
9504 #include <libutf8.h>
9505 int
9506 main ()
9507 {
9508 putwc(0,0);
9509   ;
9510   return 0;
9511 }
9512 _ACEOF
9513 rm -f conftest.$ac_objext
9514 if { (eval echo "$as_me:9514: \"$ac_compile\"") >&5
9515   (eval $ac_compile) 2>&5
9516   ac_status=$?
9517   echo "$as_me:9517: \$? = $ac_status" >&5
9518   (exit $ac_status); } &&
9519          { ac_try='test -s conftest.$ac_objext'
9520   { (eval echo "$as_me:9520: \"$ac_try\"") >&5
9521   (eval $ac_try) 2>&5
9522   ac_status=$?
9523   echo "$as_me:9523: \$? = $ac_status" >&5
9524   (exit $ac_status); }; }; then
9525
9526             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9527
9528 echo "${as_me:-configure}:9528: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9529
9530             cf_cv_find_linkage_utf8=maybe
9531             cf_test_CPPFLAGS="$CPPFLAGS"
9532             break
9533 else
9534   echo "$as_me: failed program was:" >&5
9535 cat conftest.$ac_ext >&5
9536
9537             CPPFLAGS="$cf_save_CPPFLAGS"
9538
9539 fi
9540 rm -f conftest.$ac_objext conftest.$ac_ext
9541       fi
9542     done
9543
9544     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9545
9546 echo "${as_me:-configure}:9546: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9547
9548       cf_save_LIBS="$LIBS"
9549       cf_save_LDFLAGS="$LDFLAGS"
9550
9551       if test "$cf_cv_find_linkage_utf8" != yes ; then
9552
9553 cf_search=
9554 cf_library_path_list=""
9555 if test -n "${LDFLAGS}${LIBS}" ; then
9556         for cf_library_path in $LDFLAGS $LIBS
9557         do
9558                 case $cf_library_path in #(vi
9559                 -L*)
9560                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9561
9562 test "x$cf_library_path" != "xNONE" && \
9563 test -d "$cf_library_path" && \
9564  {
9565         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9566         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9567         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9568         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9569         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9570         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9571 }
9572
9573                         cf_library_path_list="$cf_library_path_list $cf_search"
9574                         ;;
9575                 esac
9576         done
9577 fi
9578
9579 cf_search=
9580
9581 test "x$prefix" != "xNONE" && \
9582 test -d "$prefix" && \
9583  {
9584         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9585         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9586         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9587         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9588         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9589         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9590 }
9591
9592 for cf_subdir_prefix in \
9593         /usr \
9594         /usr/local \
9595         /usr/pkg \
9596         /opt \
9597         /opt/local \
9598         $HOME
9599 do
9600
9601 test "x$cf_subdir_prefix" != "x$prefix" && \
9602 test -d "$cf_subdir_prefix" && \
9603 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9604         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9605         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9606         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9607         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9608         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9609         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9610 }
9611
9612 done
9613
9614 cf_search="$cf_library_path_list $cf_search"
9615
9616         for cf_cv_library_path_utf8 in $cf_search
9617         do
9618           if test -d $cf_cv_library_path_utf8 ; then
9619             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9620
9621 echo "${as_me:-configure}:9621: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9622
9623             CPPFLAGS="$cf_test_CPPFLAGS"
9624             LIBS="-lutf8  $cf_save_LIBS"
9625             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9626             cat >conftest.$ac_ext <<_ACEOF
9627 #line 9627 "configure"
9628 #include "confdefs.h"
9629
9630 #include <libutf8.h>
9631 int
9632 main ()
9633 {
9634 putwc(0,0);
9635   ;
9636   return 0;
9637 }
9638 _ACEOF
9639 rm -f conftest.$ac_objext conftest$ac_exeext
9640 if { (eval echo "$as_me:9640: \"$ac_link\"") >&5
9641   (eval $ac_link) 2>&5
9642   ac_status=$?
9643   echo "$as_me:9643: \$? = $ac_status" >&5
9644   (exit $ac_status); } &&
9645          { ac_try='test -s conftest$ac_exeext'
9646   { (eval echo "$as_me:9646: \"$ac_try\"") >&5
9647   (eval $ac_try) 2>&5
9648   ac_status=$?
9649   echo "$as_me:9649: \$? = $ac_status" >&5
9650   (exit $ac_status); }; }; then
9651
9652                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9653
9654 echo "${as_me:-configure}:9654: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9655
9656                 cf_cv_find_linkage_utf8=yes
9657                 cf_cv_library_file_utf8="-lutf8"
9658                 break
9659 else
9660   echo "$as_me: failed program was:" >&5
9661 cat conftest.$ac_ext >&5
9662
9663                 CPPFLAGS="$cf_save_CPPFLAGS"
9664                 LIBS="$cf_save_LIBS"
9665                 LDFLAGS="$cf_save_LDFLAGS"
9666
9667 fi
9668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9669           fi
9670         done
9671         CPPFLAGS="$cf_save_CPPFLAGS"
9672         LDFLAGS="$cf_save_LDFLAGS"
9673       fi
9674
9675     else
9676       cf_cv_find_linkage_utf8=no
9677     fi
9678
9679 fi
9680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9681
9682 fi
9683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9684
9685 LIBS="$cf_save_LIBS"
9686
9687 if test "$cf_cv_find_linkage_utf8" = yes ; then
9688 cf_cv_utf8_lib=add-on
9689 else
9690 cf_cv_utf8_lib=no
9691 fi
9692
9693 fi
9694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9695 fi
9696 echo "$as_me:9696: result: $cf_cv_utf8_lib" >&5
9697 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9698
9699 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9700 # ncurses/ncursesw:
9701 if test "$cf_cv_utf8_lib" = "add-on" ; then
9702
9703 cat >>confdefs.h <<\EOF
9704 #define HAVE_LIBUTF8_H 1
9705 EOF
9706
9707 if test -n "$cf_cv_header_path_utf8" ; then
9708   for cf_add_incdir in $cf_cv_header_path_utf8
9709   do
9710         while test $cf_add_incdir != /usr/include
9711         do
9712           if test -d $cf_add_incdir
9713           then
9714                 cf_have_incdir=no
9715                 if test -n "$CFLAGS$CPPFLAGS" ; then
9716                   # a loop is needed to ensure we can add subdirs of existing dirs
9717                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9718                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9719                           cf_have_incdir=yes; break
9720                         fi
9721                   done
9722                 fi
9723
9724                 if test "$cf_have_incdir" = no ; then
9725                   if test "$cf_add_incdir" = /usr/local/include ; then
9726                         if test "$GCC" = yes
9727                         then
9728                           cf_save_CPPFLAGS=$CPPFLAGS
9729                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9730                           cat >conftest.$ac_ext <<_ACEOF
9731 #line 9731 "configure"
9732 #include "confdefs.h"
9733 #include <stdio.h>
9734 int
9735 main ()
9736 {
9737 printf("Hello")
9738   ;
9739   return 0;
9740 }
9741 _ACEOF
9742 rm -f conftest.$ac_objext
9743 if { (eval echo "$as_me:9743: \"$ac_compile\"") >&5
9744   (eval $ac_compile) 2>&5
9745   ac_status=$?
9746   echo "$as_me:9746: \$? = $ac_status" >&5
9747   (exit $ac_status); } &&
9748          { ac_try='test -s conftest.$ac_objext'
9749   { (eval echo "$as_me:9749: \"$ac_try\"") >&5
9750   (eval $ac_try) 2>&5
9751   ac_status=$?
9752   echo "$as_me:9752: \$? = $ac_status" >&5
9753   (exit $ac_status); }; }; then
9754   :
9755 else
9756   echo "$as_me: failed program was:" >&5
9757 cat conftest.$ac_ext >&5
9758 cf_have_incdir=yes
9759 fi
9760 rm -f conftest.$ac_objext conftest.$ac_ext
9761                           CPPFLAGS=$cf_save_CPPFLAGS
9762                         fi
9763                   fi
9764                 fi
9765
9766                 if test "$cf_have_incdir" = no ; then
9767                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9768
9769 echo "${as_me:-configure}:9769: testing adding $cf_add_incdir to include-path ..." 1>&5
9770
9771                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9772
9773                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9774                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9775                   cf_add_incdir="$cf_top_incdir"
9776                 else
9777                   break
9778                 fi
9779           fi
9780         done
9781   done
9782 fi
9783
9784 if test -n "$cf_cv_library_path_utf8" ; then
9785   for cf_add_libdir in $cf_cv_library_path_utf8
9786   do
9787     if test $cf_add_libdir = /usr/lib ; then
9788       :
9789     elif test -d $cf_add_libdir
9790     then
9791       cf_have_libdir=no
9792       if test -n "$LDFLAGS$LIBS" ; then
9793         # a loop is needed to ensure we can add subdirs of existing dirs
9794         for cf_test_libdir in $LDFLAGS $LIBS ; do
9795           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9796             cf_have_libdir=yes; break
9797           fi
9798         done
9799       fi
9800       if test "$cf_have_libdir" = no ; then
9801         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9802
9803 echo "${as_me:-configure}:9803: testing adding $cf_add_libdir to library-path ..." 1>&5
9804
9805         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9806       fi
9807     fi
9808   done
9809 fi
9810
9811 cf_add_libs="$cf_cv_library_file_utf8"
9812 # Filter out duplicates - this happens with badly-designed ".pc" files...
9813 for cf_add_1lib in $LIBS
9814 do
9815         for cf_add_2lib in $cf_add_libs
9816         do
9817                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9818                 then
9819                         cf_add_1lib=
9820                         break
9821                 fi
9822         done
9823         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9824 done
9825 LIBS="$cf_add_libs"
9826
9827 fi
9828
9829                 if test "$cf_cv_utf8_lib" != no ; then
9830                         NCURSES_LIBUTF8=1
9831                 fi
9832         fi
9833
9834 # This is needed on Tru64 5.0 to declare mbstate_t
9835 echo "$as_me:9835: checking if we must include wchar.h to declare mbstate_t" >&5
9836 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9837 if test "${cf_cv_mbstate_t+set}" = set; then
9838   echo $ECHO_N "(cached) $ECHO_C" >&6
9839 else
9840
9841 cat >conftest.$ac_ext <<_ACEOF
9842 #line 9842 "configure"
9843 #include "confdefs.h"
9844
9845 #include <stdlib.h>
9846 #include <stdarg.h>
9847 #include <stdio.h>
9848 #ifdef HAVE_LIBUTF8_H
9849 #include <libutf8.h>
9850 #endif
9851 int
9852 main ()
9853 {
9854 mbstate_t state
9855   ;
9856   return 0;
9857 }
9858 _ACEOF
9859 rm -f conftest.$ac_objext
9860 if { (eval echo "$as_me:9860: \"$ac_compile\"") >&5
9861   (eval $ac_compile) 2>&5
9862   ac_status=$?
9863   echo "$as_me:9863: \$? = $ac_status" >&5
9864   (exit $ac_status); } &&
9865          { ac_try='test -s conftest.$ac_objext'
9866   { (eval echo "$as_me:9866: \"$ac_try\"") >&5
9867   (eval $ac_try) 2>&5
9868   ac_status=$?
9869   echo "$as_me:9869: \$? = $ac_status" >&5
9870   (exit $ac_status); }; }; then
9871   cf_cv_mbstate_t=no
9872 else
9873   echo "$as_me: failed program was:" >&5
9874 cat conftest.$ac_ext >&5
9875 cat >conftest.$ac_ext <<_ACEOF
9876 #line 9876 "configure"
9877 #include "confdefs.h"
9878
9879 #include <stdlib.h>
9880 #include <stdarg.h>
9881 #include <stdio.h>
9882 #include <wchar.h>
9883 #ifdef HAVE_LIBUTF8_H
9884 #include <libutf8.h>
9885 #endif
9886 int
9887 main ()
9888 {
9889 mbstate_t value
9890   ;
9891   return 0;
9892 }
9893 _ACEOF
9894 rm -f conftest.$ac_objext
9895 if { (eval echo "$as_me:9895: \"$ac_compile\"") >&5
9896   (eval $ac_compile) 2>&5
9897   ac_status=$?
9898   echo "$as_me:9898: \$? = $ac_status" >&5
9899   (exit $ac_status); } &&
9900          { ac_try='test -s conftest.$ac_objext'
9901   { (eval echo "$as_me:9901: \"$ac_try\"") >&5
9902   (eval $ac_try) 2>&5
9903   ac_status=$?
9904   echo "$as_me:9904: \$? = $ac_status" >&5
9905   (exit $ac_status); }; }; then
9906   cf_cv_mbstate_t=yes
9907 else
9908   echo "$as_me: failed program was:" >&5
9909 cat conftest.$ac_ext >&5
9910 cf_cv_mbstate_t=unknown
9911 fi
9912 rm -f conftest.$ac_objext conftest.$ac_ext
9913 fi
9914 rm -f conftest.$ac_objext conftest.$ac_ext
9915 fi
9916 echo "$as_me:9916: result: $cf_cv_mbstate_t" >&5
9917 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9918
9919 if test "$cf_cv_mbstate_t" = yes ; then
9920
9921 cat >>confdefs.h <<\EOF
9922 #define NEED_WCHAR_H 1
9923 EOF
9924
9925         NEED_WCHAR_H=1
9926 fi
9927
9928 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9929 if test "$cf_cv_mbstate_t" = unknown ; then
9930         NCURSES_MBSTATE_T=1
9931 fi
9932
9933 # This is needed on Tru64 5.0 to declare wchar_t
9934 echo "$as_me:9934: checking if we must include wchar.h to declare wchar_t" >&5
9935 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9936 if test "${cf_cv_wchar_t+set}" = set; then
9937   echo $ECHO_N "(cached) $ECHO_C" >&6
9938 else
9939
9940 cat >conftest.$ac_ext <<_ACEOF
9941 #line 9941 "configure"
9942 #include "confdefs.h"
9943
9944 #include <stdlib.h>
9945 #include <stdarg.h>
9946 #include <stdio.h>
9947 #ifdef HAVE_LIBUTF8_H
9948 #include <libutf8.h>
9949 #endif
9950 int
9951 main ()
9952 {
9953 wchar_t state
9954   ;
9955   return 0;
9956 }
9957 _ACEOF
9958 rm -f conftest.$ac_objext
9959 if { (eval echo "$as_me:9959: \"$ac_compile\"") >&5
9960   (eval $ac_compile) 2>&5
9961   ac_status=$?
9962   echo "$as_me:9962: \$? = $ac_status" >&5
9963   (exit $ac_status); } &&
9964          { ac_try='test -s conftest.$ac_objext'
9965   { (eval echo "$as_me:9965: \"$ac_try\"") >&5
9966   (eval $ac_try) 2>&5
9967   ac_status=$?
9968   echo "$as_me:9968: \$? = $ac_status" >&5
9969   (exit $ac_status); }; }; then
9970   cf_cv_wchar_t=no
9971 else
9972   echo "$as_me: failed program was:" >&5
9973 cat conftest.$ac_ext >&5
9974 cat >conftest.$ac_ext <<_ACEOF
9975 #line 9975 "configure"
9976 #include "confdefs.h"
9977
9978 #include <stdlib.h>
9979 #include <stdarg.h>
9980 #include <stdio.h>
9981 #include <wchar.h>
9982 #ifdef HAVE_LIBUTF8_H
9983 #include <libutf8.h>
9984 #endif
9985 int
9986 main ()
9987 {
9988 wchar_t value
9989   ;
9990   return 0;
9991 }
9992 _ACEOF
9993 rm -f conftest.$ac_objext
9994 if { (eval echo "$as_me:9994: \"$ac_compile\"") >&5
9995   (eval $ac_compile) 2>&5
9996   ac_status=$?
9997   echo "$as_me:9997: \$? = $ac_status" >&5
9998   (exit $ac_status); } &&
9999          { ac_try='test -s conftest.$ac_objext'
10000   { (eval echo "$as_me:10000: \"$ac_try\"") >&5
10001   (eval $ac_try) 2>&5
10002   ac_status=$?
10003   echo "$as_me:10003: \$? = $ac_status" >&5
10004   (exit $ac_status); }; }; then
10005   cf_cv_wchar_t=yes
10006 else
10007   echo "$as_me: failed program was:" >&5
10008 cat conftest.$ac_ext >&5
10009 cf_cv_wchar_t=unknown
10010 fi
10011 rm -f conftest.$ac_objext conftest.$ac_ext
10012 fi
10013 rm -f conftest.$ac_objext conftest.$ac_ext
10014 fi
10015 echo "$as_me:10015: result: $cf_cv_wchar_t" >&5
10016 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10017
10018 if test "$cf_cv_wchar_t" = yes ; then
10019
10020 cat >>confdefs.h <<\EOF
10021 #define NEED_WCHAR_H 1
10022 EOF
10023
10024         NEED_WCHAR_H=1
10025 fi
10026
10027 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10028 if test "$cf_cv_wchar_t" = unknown ; then
10029         NCURSES_WCHAR_T=1
10030 fi
10031
10032 # if we find wchar_t in either place, use substitution to provide a fallback.
10033 if test "$cf_cv_wchar_t" != unknown ; then
10034         NCURSES_OK_WCHAR_T=1
10035 fi
10036
10037 # This is needed on Tru64 5.0 to declare wint_t
10038 echo "$as_me:10038: checking if we must include wchar.h to declare wint_t" >&5
10039 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10040 if test "${cf_cv_wint_t+set}" = set; then
10041   echo $ECHO_N "(cached) $ECHO_C" >&6
10042 else
10043
10044 cat >conftest.$ac_ext <<_ACEOF
10045 #line 10045 "configure"
10046 #include "confdefs.h"
10047
10048 #include <stdlib.h>
10049 #include <stdarg.h>
10050 #include <stdio.h>
10051 #ifdef HAVE_LIBUTF8_H
10052 #include <libutf8.h>
10053 #endif
10054 int
10055 main ()
10056 {
10057 wint_t state
10058   ;
10059   return 0;
10060 }
10061 _ACEOF
10062 rm -f conftest.$ac_objext
10063 if { (eval echo "$as_me:10063: \"$ac_compile\"") >&5
10064   (eval $ac_compile) 2>&5
10065   ac_status=$?
10066   echo "$as_me:10066: \$? = $ac_status" >&5
10067   (exit $ac_status); } &&
10068          { ac_try='test -s conftest.$ac_objext'
10069   { (eval echo "$as_me:10069: \"$ac_try\"") >&5
10070   (eval $ac_try) 2>&5
10071   ac_status=$?
10072   echo "$as_me:10072: \$? = $ac_status" >&5
10073   (exit $ac_status); }; }; then
10074   cf_cv_wint_t=no
10075 else
10076   echo "$as_me: failed program was:" >&5
10077 cat conftest.$ac_ext >&5
10078 cat >conftest.$ac_ext <<_ACEOF
10079 #line 10079 "configure"
10080 #include "confdefs.h"
10081
10082 #include <stdlib.h>
10083 #include <stdarg.h>
10084 #include <stdio.h>
10085 #include <wchar.h>
10086 #ifdef HAVE_LIBUTF8_H
10087 #include <libutf8.h>
10088 #endif
10089 int
10090 main ()
10091 {
10092 wint_t value
10093   ;
10094   return 0;
10095 }
10096 _ACEOF
10097 rm -f conftest.$ac_objext
10098 if { (eval echo "$as_me:10098: \"$ac_compile\"") >&5
10099   (eval $ac_compile) 2>&5
10100   ac_status=$?
10101   echo "$as_me:10101: \$? = $ac_status" >&5
10102   (exit $ac_status); } &&
10103          { ac_try='test -s conftest.$ac_objext'
10104   { (eval echo "$as_me:10104: \"$ac_try\"") >&5
10105   (eval $ac_try) 2>&5
10106   ac_status=$?
10107   echo "$as_me:10107: \$? = $ac_status" >&5
10108   (exit $ac_status); }; }; then
10109   cf_cv_wint_t=yes
10110 else
10111   echo "$as_me: failed program was:" >&5
10112 cat conftest.$ac_ext >&5
10113 cf_cv_wint_t=unknown
10114 fi
10115 rm -f conftest.$ac_objext conftest.$ac_ext
10116 fi
10117 rm -f conftest.$ac_objext conftest.$ac_ext
10118 fi
10119 echo "$as_me:10119: result: $cf_cv_wint_t" >&5
10120 echo "${ECHO_T}$cf_cv_wint_t" >&6
10121
10122 if test "$cf_cv_wint_t" = yes ; then
10123
10124 cat >>confdefs.h <<\EOF
10125 #define NEED_WCHAR_H 1
10126 EOF
10127
10128         NEED_WCHAR_H=1
10129 fi
10130
10131 # if we do not find wint_t in either place, use substitution to provide a fallback.
10132 if test "$cf_cv_wint_t" = unknown ; then
10133         NCURSES_WINT_T=1
10134 fi
10135
10136 # if we find wint_t in either place, use substitution to provide a fallback.
10137 if test "$cf_cv_wint_t" != unknown ; then
10138         NCURSES_OK_WINT_T=1
10139 fi
10140
10141         if test "$NCURSES_MBSTATE_T" != 0; then
10142
10143 cat >>confdefs.h <<\EOF
10144 #define NEED_MBSTATE_T_DEF 1
10145 EOF
10146
10147         fi
10148 fi
10149
10150 ###   use option --disable-lp64 to allow long chtype
10151 case $cf_cv_abi_version in
10152 [345]*)
10153         default_with_lp64=no
10154         ;;
10155 *)
10156         default_with_lp64=yes
10157         ;;
10158 esac
10159
10160 echo "$as_me:10160: checking whether to enable _LP64 definition in curses.h" >&5
10161 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10162
10163 # Check whether --enable-lp64 or --disable-lp64 was given.
10164 if test "${enable_lp64+set}" = set; then
10165   enableval="$enable_lp64"
10166   with_lp64=$enableval
10167 else
10168   with_lp64=$default_with_lp64
10169 fi;
10170 echo "$as_me:10170: result: $with_lp64" >&5
10171 echo "${ECHO_T}$with_lp64" >&6
10172
10173 if test "x$with_lp64" = xyes ; then
10174         cf_cv_enable_lp64=1
10175 else
10176         cf_cv_enable_lp64=0
10177 fi
10178
10179 # Check whether --enable-largefile or --disable-largefile was given.
10180 if test "${enable_largefile+set}" = set; then
10181   enableval="$enable_largefile"
10182
10183 fi;
10184 if test "$enable_largefile" != no; then
10185
10186   echo "$as_me:10186: checking for special C compiler options needed for large files" >&5
10187 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10188 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10189   echo $ECHO_N "(cached) $ECHO_C" >&6
10190 else
10191   ac_cv_sys_largefile_CC=no
10192      if test "$GCC" != yes; then
10193        ac_save_CC=$CC
10194        while :; do
10195          # IRIX 6.2 and later do not support large files by default,
10196          # so use the C compiler's -n32 option if that helps.
10197          cat >conftest.$ac_ext <<_ACEOF
10198 #line 10198 "configure"
10199 #include "confdefs.h"
10200 #include <sys/types.h>
10201  /* Check that off_t can represent 2**63 - 1 correctly.
10202     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10203     since some C++ compilers masquerading as C compilers
10204     incorrectly reject 9223372036854775807.  */
10205 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10206   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10207                        && LARGE_OFF_T % 2147483647 == 1)
10208                       ? 1 : -1];
10209 int
10210 main ()
10211 {
10212
10213   ;
10214   return 0;
10215 }
10216 _ACEOF
10217          rm -f conftest.$ac_objext
10218 if { (eval echo "$as_me:10218: \"$ac_compile\"") >&5
10219   (eval $ac_compile) 2>&5
10220   ac_status=$?
10221   echo "$as_me:10221: \$? = $ac_status" >&5
10222   (exit $ac_status); } &&
10223          { ac_try='test -s conftest.$ac_objext'
10224   { (eval echo "$as_me:10224: \"$ac_try\"") >&5
10225   (eval $ac_try) 2>&5
10226   ac_status=$?
10227   echo "$as_me:10227: \$? = $ac_status" >&5
10228   (exit $ac_status); }; }; then
10229   break
10230 else
10231   echo "$as_me: failed program was:" >&5
10232 cat conftest.$ac_ext >&5
10233 fi
10234 rm -f conftest.$ac_objext
10235          CC="$CC -n32"
10236          rm -f conftest.$ac_objext
10237 if { (eval echo "$as_me:10237: \"$ac_compile\"") >&5
10238   (eval $ac_compile) 2>&5
10239   ac_status=$?
10240   echo "$as_me:10240: \$? = $ac_status" >&5
10241   (exit $ac_status); } &&
10242          { ac_try='test -s conftest.$ac_objext'
10243   { (eval echo "$as_me:10243: \"$ac_try\"") >&5
10244   (eval $ac_try) 2>&5
10245   ac_status=$?
10246   echo "$as_me:10246: \$? = $ac_status" >&5
10247   (exit $ac_status); }; }; then
10248   ac_cv_sys_largefile_CC=' -n32'; break
10249 else
10250   echo "$as_me: failed program was:" >&5
10251 cat conftest.$ac_ext >&5
10252 fi
10253 rm -f conftest.$ac_objext
10254          break
10255        done
10256        CC=$ac_save_CC
10257        rm -f conftest.$ac_ext
10258     fi
10259 fi
10260 echo "$as_me:10260: result: $ac_cv_sys_largefile_CC" >&5
10261 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10262   if test "$ac_cv_sys_largefile_CC" != no; then
10263     CC=$CC$ac_cv_sys_largefile_CC
10264   fi
10265
10266   echo "$as_me:10266: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10267 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10268 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10269   echo $ECHO_N "(cached) $ECHO_C" >&6
10270 else
10271   while :; do
10272   ac_cv_sys_file_offset_bits=no
10273   cat >conftest.$ac_ext <<_ACEOF
10274 #line 10274 "configure"
10275 #include "confdefs.h"
10276 #include <sys/types.h>
10277  /* Check that off_t can represent 2**63 - 1 correctly.
10278     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10279     since some C++ compilers masquerading as C compilers
10280     incorrectly reject 9223372036854775807.  */
10281 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10282   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10283                        && LARGE_OFF_T % 2147483647 == 1)
10284                       ? 1 : -1];
10285 int
10286 main ()
10287 {
10288
10289   ;
10290   return 0;
10291 }
10292 _ACEOF
10293 rm -f conftest.$ac_objext
10294 if { (eval echo "$as_me:10294: \"$ac_compile\"") >&5
10295   (eval $ac_compile) 2>&5
10296   ac_status=$?
10297   echo "$as_me:10297: \$? = $ac_status" >&5
10298   (exit $ac_status); } &&
10299          { ac_try='test -s conftest.$ac_objext'
10300   { (eval echo "$as_me:10300: \"$ac_try\"") >&5
10301   (eval $ac_try) 2>&5
10302   ac_status=$?
10303   echo "$as_me:10303: \$? = $ac_status" >&5
10304   (exit $ac_status); }; }; then
10305   break
10306 else
10307   echo "$as_me: failed program was:" >&5
10308 cat conftest.$ac_ext >&5
10309 fi
10310 rm -f conftest.$ac_objext conftest.$ac_ext
10311   cat >conftest.$ac_ext <<_ACEOF
10312 #line 10312 "configure"
10313 #include "confdefs.h"
10314 #define _FILE_OFFSET_BITS 64
10315 #include <sys/types.h>
10316  /* Check that off_t can represent 2**63 - 1 correctly.
10317     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10318     since some C++ compilers masquerading as C compilers
10319     incorrectly reject 9223372036854775807.  */
10320 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10321   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10322                        && LARGE_OFF_T % 2147483647 == 1)
10323                       ? 1 : -1];
10324 int
10325 main ()
10326 {
10327
10328   ;
10329   return 0;
10330 }
10331 _ACEOF
10332 rm -f conftest.$ac_objext
10333 if { (eval echo "$as_me:10333: \"$ac_compile\"") >&5
10334   (eval $ac_compile) 2>&5
10335   ac_status=$?
10336   echo "$as_me:10336: \$? = $ac_status" >&5
10337   (exit $ac_status); } &&
10338          { ac_try='test -s conftest.$ac_objext'
10339   { (eval echo "$as_me:10339: \"$ac_try\"") >&5
10340   (eval $ac_try) 2>&5
10341   ac_status=$?
10342   echo "$as_me:10342: \$? = $ac_status" >&5
10343   (exit $ac_status); }; }; then
10344   ac_cv_sys_file_offset_bits=64; break
10345 else
10346   echo "$as_me: failed program was:" >&5
10347 cat conftest.$ac_ext >&5
10348 fi
10349 rm -f conftest.$ac_objext conftest.$ac_ext
10350   break
10351 done
10352 fi
10353 echo "$as_me:10353: result: $ac_cv_sys_file_offset_bits" >&5
10354 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10355 if test "$ac_cv_sys_file_offset_bits" != no; then
10356
10357 cat >>confdefs.h <<EOF
10358 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10359 EOF
10360
10361 fi
10362 rm -rf conftest*
10363   echo "$as_me:10363: checking for _LARGE_FILES value needed for large files" >&5
10364 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10365 if test "${ac_cv_sys_large_files+set}" = set; then
10366   echo $ECHO_N "(cached) $ECHO_C" >&6
10367 else
10368   while :; do
10369   ac_cv_sys_large_files=no
10370   cat >conftest.$ac_ext <<_ACEOF
10371 #line 10371 "configure"
10372 #include "confdefs.h"
10373 #include <sys/types.h>
10374  /* Check that off_t can represent 2**63 - 1 correctly.
10375     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10376     since some C++ compilers masquerading as C compilers
10377     incorrectly reject 9223372036854775807.  */
10378 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10379   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10380                        && LARGE_OFF_T % 2147483647 == 1)
10381                       ? 1 : -1];
10382 int
10383 main ()
10384 {
10385
10386   ;
10387   return 0;
10388 }
10389 _ACEOF
10390 rm -f conftest.$ac_objext
10391 if { (eval echo "$as_me:10391: \"$ac_compile\"") >&5
10392   (eval $ac_compile) 2>&5
10393   ac_status=$?
10394   echo "$as_me:10394: \$? = $ac_status" >&5
10395   (exit $ac_status); } &&
10396          { ac_try='test -s conftest.$ac_objext'
10397   { (eval echo "$as_me:10397: \"$ac_try\"") >&5
10398   (eval $ac_try) 2>&5
10399   ac_status=$?
10400   echo "$as_me:10400: \$? = $ac_status" >&5
10401   (exit $ac_status); }; }; then
10402   break
10403 else
10404   echo "$as_me: failed program was:" >&5
10405 cat conftest.$ac_ext >&5
10406 fi
10407 rm -f conftest.$ac_objext conftest.$ac_ext
10408   cat >conftest.$ac_ext <<_ACEOF
10409 #line 10409 "configure"
10410 #include "confdefs.h"
10411 #define _LARGE_FILES 1
10412 #include <sys/types.h>
10413  /* Check that off_t can represent 2**63 - 1 correctly.
10414     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10415     since some C++ compilers masquerading as C compilers
10416     incorrectly reject 9223372036854775807.  */
10417 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10418   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10419                        && LARGE_OFF_T % 2147483647 == 1)
10420                       ? 1 : -1];
10421 int
10422 main ()
10423 {
10424
10425   ;
10426   return 0;
10427 }
10428 _ACEOF
10429 rm -f conftest.$ac_objext
10430 if { (eval echo "$as_me:10430: \"$ac_compile\"") >&5
10431   (eval $ac_compile) 2>&5
10432   ac_status=$?
10433   echo "$as_me:10433: \$? = $ac_status" >&5
10434   (exit $ac_status); } &&
10435          { ac_try='test -s conftest.$ac_objext'
10436   { (eval echo "$as_me:10436: \"$ac_try\"") >&5
10437   (eval $ac_try) 2>&5
10438   ac_status=$?
10439   echo "$as_me:10439: \$? = $ac_status" >&5
10440   (exit $ac_status); }; }; then
10441   ac_cv_sys_large_files=1; break
10442 else
10443   echo "$as_me: failed program was:" >&5
10444 cat conftest.$ac_ext >&5
10445 fi
10446 rm -f conftest.$ac_objext conftest.$ac_ext
10447   break
10448 done
10449 fi
10450 echo "$as_me:10450: result: $ac_cv_sys_large_files" >&5
10451 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10452 if test "$ac_cv_sys_large_files" != no; then
10453
10454 cat >>confdefs.h <<EOF
10455 #define _LARGE_FILES $ac_cv_sys_large_files
10456 EOF
10457
10458 fi
10459 rm -rf conftest*
10460 fi
10461
10462     if test "$enable_largefile" != no ; then
10463         echo "$as_me:10463: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10464 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10465 if test "${ac_cv_sys_largefile_source+set}" = set; then
10466   echo $ECHO_N "(cached) $ECHO_C" >&6
10467 else
10468   while :; do
10469   ac_cv_sys_largefile_source=no
10470   cat >conftest.$ac_ext <<_ACEOF
10471 #line 10471 "configure"
10472 #include "confdefs.h"
10473 #include <stdio.h>
10474 int
10475 main ()
10476 {
10477 return !fseeko;
10478   ;
10479   return 0;
10480 }
10481 _ACEOF
10482 rm -f conftest.$ac_objext
10483 if { (eval echo "$as_me:10483: \"$ac_compile\"") >&5
10484   (eval $ac_compile) 2>&5
10485   ac_status=$?
10486   echo "$as_me:10486: \$? = $ac_status" >&5
10487   (exit $ac_status); } &&
10488          { ac_try='test -s conftest.$ac_objext'
10489   { (eval echo "$as_me:10489: \"$ac_try\"") >&5
10490   (eval $ac_try) 2>&5
10491   ac_status=$?
10492   echo "$as_me:10492: \$? = $ac_status" >&5
10493   (exit $ac_status); }; }; then
10494   break
10495 else
10496   echo "$as_me: failed program was:" >&5
10497 cat conftest.$ac_ext >&5
10498 fi
10499 rm -f conftest.$ac_objext conftest.$ac_ext
10500   cat >conftest.$ac_ext <<_ACEOF
10501 #line 10501 "configure"
10502 #include "confdefs.h"
10503 #define _LARGEFILE_SOURCE 1
10504 #include <stdio.h>
10505 int
10506 main ()
10507 {
10508 return !fseeko;
10509   ;
10510   return 0;
10511 }
10512 _ACEOF
10513 rm -f conftest.$ac_objext
10514 if { (eval echo "$as_me:10514: \"$ac_compile\"") >&5
10515   (eval $ac_compile) 2>&5
10516   ac_status=$?
10517   echo "$as_me:10517: \$? = $ac_status" >&5
10518   (exit $ac_status); } &&
10519          { ac_try='test -s conftest.$ac_objext'
10520   { (eval echo "$as_me:10520: \"$ac_try\"") >&5
10521   (eval $ac_try) 2>&5
10522   ac_status=$?
10523   echo "$as_me:10523: \$? = $ac_status" >&5
10524   (exit $ac_status); }; }; then
10525   ac_cv_sys_largefile_source=1; break
10526 else
10527   echo "$as_me: failed program was:" >&5
10528 cat conftest.$ac_ext >&5
10529 fi
10530 rm -f conftest.$ac_objext conftest.$ac_ext
10531   break
10532 done
10533 fi
10534 echo "$as_me:10534: result: $ac_cv_sys_largefile_source" >&5
10535 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10536 if test "$ac_cv_sys_largefile_source" != no; then
10537
10538 cat >>confdefs.h <<EOF
10539 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10540 EOF
10541
10542 fi
10543 rm -rf conftest*
10544
10545 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10546 # in glibc 2.1.3, but that breaks too many other things.
10547 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10548 echo "$as_me:10548: checking for fseeko" >&5
10549 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10550 if test "${ac_cv_func_fseeko+set}" = set; then
10551   echo $ECHO_N "(cached) $ECHO_C" >&6
10552 else
10553   cat >conftest.$ac_ext <<_ACEOF
10554 #line 10554 "configure"
10555 #include "confdefs.h"
10556 #include <stdio.h>
10557 int
10558 main ()
10559 {
10560 return fseeko && fseeko (stdin, 0, 0);
10561   ;
10562   return 0;
10563 }
10564 _ACEOF
10565 rm -f conftest.$ac_objext conftest$ac_exeext
10566 if { (eval echo "$as_me:10566: \"$ac_link\"") >&5
10567   (eval $ac_link) 2>&5
10568   ac_status=$?
10569   echo "$as_me:10569: \$? = $ac_status" >&5
10570   (exit $ac_status); } &&
10571          { ac_try='test -s conftest$ac_exeext'
10572   { (eval echo "$as_me:10572: \"$ac_try\"") >&5
10573   (eval $ac_try) 2>&5
10574   ac_status=$?
10575   echo "$as_me:10575: \$? = $ac_status" >&5
10576   (exit $ac_status); }; }; then
10577   ac_cv_func_fseeko=yes
10578 else
10579   echo "$as_me: failed program was:" >&5
10580 cat conftest.$ac_ext >&5
10581 ac_cv_func_fseeko=no
10582 fi
10583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10584 fi
10585 echo "$as_me:10585: result: $ac_cv_func_fseeko" >&5
10586 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10587 if test $ac_cv_func_fseeko = yes; then
10588
10589 cat >>confdefs.h <<\EOF
10590 #define HAVE_FSEEKO 1
10591 EOF
10592
10593 fi
10594
10595         # Normally we would collect these definitions in the config.h,
10596         # but (like _XOPEN_SOURCE), some environments rely on having these
10597         # defined before any of the system headers are included.  Another
10598         # case comes up with C++, e.g., on AIX the compiler compiles the
10599         # header files by themselves before looking at the body files it is
10600         # told to compile.  For ncurses, those header files do not include
10601         # the config.h
10602         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10603         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10604         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10605
10606         echo "$as_me:10606: checking whether to use struct dirent64" >&5
10607 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10608 if test "${cf_cv_struct_dirent64+set}" = set; then
10609   echo $ECHO_N "(cached) $ECHO_C" >&6
10610 else
10611
10612                 cat >conftest.$ac_ext <<_ACEOF
10613 #line 10613 "configure"
10614 #include "confdefs.h"
10615
10616 #include <sys/types.h>
10617 #include <dirent.h>
10618
10619 int
10620 main ()
10621 {
10622
10623                 /* if transitional largefile support is setup, this is true */
10624                 extern struct dirent64 * readdir(DIR *);
10625                 struct dirent64 *x = readdir((DIR *)0);
10626                 struct dirent *y = readdir((DIR *)0);
10627                 int z = x - y;
10628
10629   ;
10630   return 0;
10631 }
10632 _ACEOF
10633 rm -f conftest.$ac_objext
10634 if { (eval echo "$as_me:10634: \"$ac_compile\"") >&5
10635   (eval $ac_compile) 2>&5
10636   ac_status=$?
10637   echo "$as_me:10637: \$? = $ac_status" >&5
10638   (exit $ac_status); } &&
10639          { ac_try='test -s conftest.$ac_objext'
10640   { (eval echo "$as_me:10640: \"$ac_try\"") >&5
10641   (eval $ac_try) 2>&5
10642   ac_status=$?
10643   echo "$as_me:10643: \$? = $ac_status" >&5
10644   (exit $ac_status); }; }; then
10645   cf_cv_struct_dirent64=yes
10646 else
10647   echo "$as_me: failed program was:" >&5
10648 cat conftest.$ac_ext >&5
10649 cf_cv_struct_dirent64=no
10650 fi
10651 rm -f conftest.$ac_objext conftest.$ac_ext
10652
10653 fi
10654 echo "$as_me:10654: result: $cf_cv_struct_dirent64" >&5
10655 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10656         test "$cf_cv_struct_dirent64" = yes &&
10657 cat >>confdefs.h <<\EOF
10658 #define HAVE_STRUCT_DIRENT64 1
10659 EOF
10660
10661     fi
10662
10663 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10664 echo "$as_me:10664: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10665 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10666
10667 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10668 if test "${enable_tparm_varargs+set}" = set; then
10669   enableval="$enable_tparm_varargs"
10670   with_tparm_varargs=$enableval
10671 else
10672   with_tparm_varargs=yes
10673 fi;
10674 echo "$as_me:10674: result: $with_tparm_varargs" >&5
10675 echo "${ECHO_T}$with_tparm_varargs" >&6
10676 NCURSES_TPARM_VARARGS=0
10677 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10678
10679 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10680 if test "$with_ticlib" != no ; then
10681 echo "$as_me:10681: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10682 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10683
10684 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10685 if test "${enable_tic_depends+set}" = set; then
10686   enableval="$enable_tic_depends"
10687   with_tic_depends=$enableval
10688 else
10689   with_tic_depends=yes
10690 fi;
10691 echo "$as_me:10691: result: $with_tic_depends" >&5
10692 echo "${ECHO_T}$with_tic_depends" >&6
10693 else
10694         with_tic_depends=no
10695 fi
10696
10697 ###   use option --with-bool to override bool's type
10698 echo "$as_me:10698: checking for type of bool" >&5
10699 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10700
10701 # Check whether --with-bool or --without-bool was given.
10702 if test "${with_bool+set}" = set; then
10703   withval="$with_bool"
10704   NCURSES_BOOL="$withval"
10705 else
10706   NCURSES_BOOL=auto
10707 fi;
10708 echo "$as_me:10708: result: $NCURSES_BOOL" >&5
10709 echo "${ECHO_T}$NCURSES_BOOL" >&6
10710
10711 echo "$as_me:10711: checking for alternate terminal capabilities file" >&5
10712 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10713
10714 # Check whether --with-caps or --without-caps was given.
10715 if test "${with_caps+set}" = set; then
10716   withval="$with_caps"
10717   TERMINFO_CAPS=Caps.$withval
10718 else
10719   TERMINFO_CAPS=Caps
10720 fi;
10721 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10722 echo "$as_me:10722: result: $TERMINFO_CAPS" >&5
10723 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10724
10725 ###   use option --with-chtype to override chtype's type
10726 echo "$as_me:10726: checking for type of chtype" >&5
10727 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10728
10729 # Check whether --with-chtype or --without-chtype was given.
10730 if test "${with_chtype+set}" = set; then
10731   withval="$with_chtype"
10732   NCURSES_CHTYPE="$withval"
10733 else
10734   NCURSES_CHTYPE=auto
10735 fi;
10736 echo "$as_me:10736: result: $NCURSES_CHTYPE" >&5
10737 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10738
10739 ###   use option --with-ospeed to override ospeed's type
10740 echo "$as_me:10740: checking for type of ospeed" >&5
10741 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10742
10743 # Check whether --with-ospeed or --without-ospeed was given.
10744 if test "${with_ospeed+set}" = set; then
10745   withval="$with_ospeed"
10746   NCURSES_OSPEED="$withval"
10747 else
10748   NCURSES_OSPEED=short
10749 fi;
10750 echo "$as_me:10750: result: $NCURSES_OSPEED" >&5
10751 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10752
10753 ###   use option --with-mmask-t to override mmask_t's type
10754 echo "$as_me:10754: checking for type of mmask_t" >&5
10755 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10756
10757 # Check whether --with-mmask-t or --without-mmask-t was given.
10758 if test "${with_mmask_t+set}" = set; then
10759   withval="$with_mmask_t"
10760   NCURSES_MMASK_T="$withval"
10761 else
10762   NCURSES_MMASK_T=auto
10763 fi;
10764 echo "$as_me:10764: result: $NCURSES_MMASK_T" >&5
10765 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10766
10767 ###   use option --with-ccharw-max to override CCHARW_MAX size
10768 echo "$as_me:10768: checking for size CCHARW_MAX" >&5
10769 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10770
10771 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10772 if test "${with_ccharw_max+set}" = set; then
10773   withval="$with_ccharw_max"
10774   NCURSES_CCHARW_MAX="$withval"
10775 else
10776   NCURSES_CCHARW_MAX=5
10777 fi;
10778 echo "$as_me:10778: result: $NCURSES_CCHARW_MAX" >&5
10779 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10780
10781 ###   use option --with-tparm-arg to override tparm's argument type
10782 echo "$as_me:10782: checking for type of tparm args" >&5
10783 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10784
10785 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10786 if test "${with_tparm_arg+set}" = set; then
10787   withval="$with_tparm_arg"
10788   NCURSES_TPARM_ARG="$withval"
10789 else
10790   NCURSES_TPARM_ARG=long
10791 fi;
10792 echo "$as_me:10792: result: $NCURSES_TPARM_ARG" >&5
10793 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10794
10795 ### Enable compiling-in rcs id's
10796 echo "$as_me:10796: checking if RCS identifiers should be compiled-in" >&5
10797 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10798
10799 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10800 if test "${with_rcs_ids+set}" = set; then
10801   withval="$with_rcs_ids"
10802   with_rcs_ids=$withval
10803 else
10804   with_rcs_ids=no
10805 fi;
10806 echo "$as_me:10806: result: $with_rcs_ids" >&5
10807 echo "${ECHO_T}$with_rcs_ids" >&6
10808 test "x$with_rcs_ids" = xyes &&
10809 cat >>confdefs.h <<\EOF
10810 #define USE_RCS_IDS 1
10811 EOF
10812
10813 ###############################################################################
10814
10815 echo "$as_me:10815: checking format of man-pages" >&5
10816 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10817
10818 # Check whether --with-manpage-format or --without-manpage-format was given.
10819 if test "${with_manpage_format+set}" = set; then
10820   withval="$with_manpage_format"
10821   MANPAGE_FORMAT=$withval
10822 else
10823   MANPAGE_FORMAT=unknown
10824 fi;
10825
10826 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10827 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10828
10829 cf_unknown=
10830
10831 case $MANPAGE_FORMAT in
10832 unknown)
10833   if test -z "$MANPATH" ; then
10834     MANPATH="/usr/man:/usr/share/man"
10835   fi
10836
10837   # look for the 'date' man-page (it's most likely to be installed!)
10838   MANPAGE_FORMAT=
10839   cf_preform=no
10840   cf_catonly=yes
10841   cf_example=date
10842
10843   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10844   for cf_dir in $MANPATH; do
10845     test -z "$cf_dir" && cf_dir=/usr/man
10846     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
10847     do
10848       cf_test=`echo $cf_name | sed -e 's/*//'`
10849       if test "x$cf_test" = "x$cf_name" ; then
10850
10851         case "$cf_name" in
10852         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10853         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10854         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10855         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10856         esac
10857
10858         case "$cf_name" in
10859         $cf_dir/man*)
10860           cf_catonly=no
10861           ;;
10862         $cf_dir/cat*)
10863           cf_preform=yes
10864           ;;
10865         esac
10866         break
10867       fi
10868
10869       # if we found a match in either man* or cat*, stop looking
10870       if test -n "$MANPAGE_FORMAT" ; then
10871         cf_found=no
10872         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10873         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10874         case "$cf_name" in
10875         $cf_dir/cat*)
10876           cf_found=yes
10877           ;;
10878         esac
10879         test $cf_found=yes && break
10880       fi
10881     done
10882     # only check the first directory in $MANPATH where we find manpages
10883     if test -n "$MANPAGE_FORMAT" ; then
10884        break
10885     fi
10886   done
10887   # if we did not find the example, just assume it is normal
10888   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10889   IFS="$ac_save_ifs"
10890   ;;
10891 *)
10892   for cf_option in $MANPAGE_FORMAT; do
10893      case $cf_option in #(vi
10894      gzip|compress|BSDI|normal|formatted|catonly)
10895        ;;
10896      *)
10897        cf_unknown="$cf_unknown $cf_option"
10898        ;;
10899      esac
10900   done
10901   ;;
10902 esac
10903
10904 echo "$as_me:10904: result: $MANPAGE_FORMAT" >&5
10905 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10906 if test -n "$cf_unknown" ; then
10907   { echo "$as_me:10907: WARNING: Unexpected manpage-format $cf_unknown" >&5
10908 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10909 fi
10910
10911 echo "$as_me:10911: checking for manpage renaming" >&5
10912 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10913
10914 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10915 if test "${with_manpage_renames+set}" = set; then
10916   withval="$with_manpage_renames"
10917   MANPAGE_RENAMES=$withval
10918 else
10919   MANPAGE_RENAMES=yes
10920 fi;
10921
10922 case ".$MANPAGE_RENAMES" in #(vi
10923 .no) #(vi
10924   ;;
10925 .|.yes)
10926   # Debian 'man' program?
10927   if test -f /etc/debian_version ; then
10928     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10929   else
10930     MANPAGE_RENAMES=no
10931   fi
10932   ;;
10933 esac
10934
10935 if test "$MANPAGE_RENAMES" != no ; then
10936   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10937     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10938   elif test ! -f $MANPAGE_RENAMES ; then
10939     { { echo "$as_me:10939: error: not a filename: $MANPAGE_RENAMES" >&5
10940 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10941    { (exit 1); exit 1; }; }
10942   fi
10943
10944   test ! -d man && mkdir man
10945
10946   # Construct a sed-script to perform renaming within man-pages
10947   if test -n "$MANPAGE_RENAMES" ; then
10948     test ! -d man && mkdir man
10949     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10950   fi
10951 fi
10952
10953 echo "$as_me:10953: result: $MANPAGE_RENAMES" >&5
10954 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10955
10956 echo "$as_me:10956: checking if manpage aliases will be installed" >&5
10957 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10958
10959 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10960 if test "${with_manpage_aliases+set}" = set; then
10961   withval="$with_manpage_aliases"
10962   MANPAGE_ALIASES=$withval
10963 else
10964   MANPAGE_ALIASES=yes
10965 fi;
10966
10967 echo "$as_me:10967: result: $MANPAGE_ALIASES" >&5
10968 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10969
10970 case "x$LN_S" in #(vi
10971 xln*) #(vi
10972         cf_use_symlinks=yes
10973         ;;
10974 *)
10975         cf_use_symlinks=no
10976         ;;
10977 esac
10978
10979 MANPAGE_SYMLINKS=no
10980 if test "$MANPAGE_ALIASES" = yes ; then
10981 echo "$as_me:10981: checking if manpage symlinks should be used" >&5
10982 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10983
10984 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10985 if test "${with_manpage_symlinks+set}" = set; then
10986   withval="$with_manpage_symlinks"
10987   MANPAGE_SYMLINKS=$withval
10988 else
10989   MANPAGE_SYMLINKS=$cf_use_symlinks
10990 fi;
10991
10992 if test "$$cf_use_symlinks" = no; then
10993 if test "$MANPAGE_SYMLINKS" = yes ; then
10994         { echo "$as_me:10994: WARNING: cannot make symlinks" >&5
10995 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10996         MANPAGE_SYMLINKS=no
10997 fi
10998 fi
10999
11000 echo "$as_me:11000: result: $MANPAGE_SYMLINKS" >&5
11001 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11002 fi
11003
11004 echo "$as_me:11004: checking for manpage tbl" >&5
11005 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11006
11007 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11008 if test "${with_manpage_tbl+set}" = set; then
11009   withval="$with_manpage_tbl"
11010   MANPAGE_TBL=$withval
11011 else
11012   MANPAGE_TBL=no
11013 fi;
11014
11015 echo "$as_me:11015: result: $MANPAGE_TBL" >&5
11016 echo "${ECHO_T}$MANPAGE_TBL" >&6
11017
11018   if test "$prefix" = "NONE" ; then
11019      cf_prefix="$ac_default_prefix"
11020   else
11021      cf_prefix="$prefix"
11022   fi
11023
11024   case "$MANPAGE_FORMAT" in # (vi
11025   *catonly*) # (vi
11026     cf_format=yes
11027     cf_inboth=no
11028     ;;
11029   *formatted*) # (vi
11030     cf_format=yes
11031     cf_inboth=yes
11032     ;;
11033   *)
11034     cf_format=no
11035     cf_inboth=no
11036     ;;
11037   esac
11038
11039 test ! -d man && mkdir man
11040
11041 cf_so_strip=
11042 cf_compress=
11043 case "$MANPAGE_FORMAT" in #(vi
11044 *compress*) #(vi
11045         cf_so_strip="Z"
11046         cf_compress=compress
11047   ;;
11048 *gzip*)
11049         cf_so_strip="gz"
11050         cf_compress=gzip
11051   ;;
11052 esac
11053
11054 cf_edit_man=./edit_man.sh
11055 cf_man_alias=`pwd`/man_alias.sed
11056
11057 cat >$cf_edit_man <<CF_EOF
11058 #! /bin/sh
11059 # this script is generated by the configure-script CF_MAN_PAGES macro.
11060
11061 prefix="$cf_prefix"
11062 datarootdir="$datarootdir"
11063 datadir="$datadir"
11064
11065 NCURSES_MAJOR="$NCURSES_MAJOR"
11066 NCURSES_MINOR="$NCURSES_MINOR"
11067 NCURSES_PATCH="$NCURSES_PATCH"
11068
11069 NCURSES_OSPEED="$NCURSES_OSPEED"
11070 TERMINFO="$TERMINFO"
11071
11072 INSTALL="$INSTALL"
11073 INSTALL_DATA="$INSTALL_DATA"
11074
11075 transform="$program_transform_name"
11076
11077 TMP=\${TMPDIR:=/tmp}/man\$\$
11078 trap "rm -f \$TMP" 0 1 2 5 15
11079
11080 form=\$1
11081 shift || exit 1
11082
11083 verb=\$1
11084 shift || exit 1
11085
11086 mandir=\$1
11087 shift || exit 1
11088
11089 srcdir=\$1
11090 top_srcdir=\$srcdir/..
11091 shift || exit 1
11092
11093 if test "\$form" = normal ; then
11094         if test "$cf_format" = yes ; then
11095         if test "$cf_inboth" = no ; then
11096                 sh \$0 format \$verb \$mandir \$srcdir \$*
11097                 exit $?
11098         fi
11099         fi
11100         cf_subdir=\$mandir/man
11101         cf_tables=$MANPAGE_TBL
11102 else
11103         cf_subdir=\$mandir/cat
11104         cf_tables=yes
11105 fi
11106
11107 # process the list of source-files
11108 for i in \$* ; do
11109 case \$i in #(vi
11110 *.orig|*.rej) ;; #(vi
11111 *.[0-9]*)
11112         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11113         if test \$verb = installing ; then
11114         if test ! -d \$cf_subdir\${section} ; then
11115                 mkdir -p \$cf_subdir\$section
11116         fi
11117         fi
11118
11119         # replace variables in man page
11120         if test ! -f $cf_man_alias ; then
11121 cat >>$cf_man_alias <<-CF_EOF2
11122                 s,@DATADIR@,\$datadir,g
11123                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11124                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11125                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11126                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11127                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11128                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11129 CF_EOF
11130
11131         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11132         do
11133                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11134                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11135 cat >>$cf_edit_man <<-CF_EOF
11136                 s,@$cf_NAME@,$cf_name,g
11137 CF_EOF
11138         done
11139
11140 cat >>$cf_edit_man <<CF_EOF
11141 CF_EOF2
11142                 echo "...made $cf_man_alias"
11143         fi
11144
11145         aliases=
11146         cf_source=\`basename \$i\`
11147         inalias=\$cf_source
11148         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11149         if test ! -f \$inalias ; then
11150                 echo .. skipped \$cf_source
11151                 continue
11152         fi
11153 CF_EOF
11154
11155 if test "$MANPAGE_ALIASES" != no ; then
11156 cat >>$cf_edit_man <<CF_EOF
11157         nCurses=ignore.3x
11158         test $with_curses_h = yes && nCurses=ncurses.3x
11159         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11160 CF_EOF
11161 fi
11162
11163 if test "$MANPAGE_RENAMES" = no ; then
11164 cat >>$cf_edit_man <<CF_EOF
11165         # perform program transformations for section 1 man pages
11166         if test \$section = 1 ; then
11167                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11168         else
11169                 cf_target=\$cf_subdir\${section}/\$cf_source
11170         fi
11171 CF_EOF
11172 else
11173 cat >>$cf_edit_man <<CF_EOF
11174         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11175         if test -z "\$cf_target" ; then
11176                 echo '? missing rename for '\$cf_source
11177                 cf_target="\$cf_source"
11178         fi
11179         cf_target="\$cf_subdir\${section}/\${cf_target}"
11180
11181 CF_EOF
11182 fi
11183
11184 cat >>$cf_edit_man <<CF_EOF
11185         sed     -f $cf_man_alias \\
11186 CF_EOF
11187
11188 if test -f $MANPAGE_RENAMES ; then
11189 cat >>$cf_edit_man <<CF_EOF
11190                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11191 CF_EOF
11192 else
11193 cat >>$cf_edit_man <<CF_EOF
11194                 < \$i >\$TMP
11195 CF_EOF
11196 fi
11197
11198 cat >>$cf_edit_man <<CF_EOF
11199 if test \$cf_tables = yes ; then
11200         tbl \$TMP >\$TMP.out
11201         mv \$TMP.out \$TMP
11202 fi
11203 CF_EOF
11204
11205 if test $with_overwrite != yes ; then
11206 cat >>$cf_edit_man <<CF_EOF
11207         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11208         mv \$TMP.out \$TMP
11209 CF_EOF
11210 fi
11211
11212 if test $with_curses_h != yes ; then
11213 cat >>$cf_edit_man <<CF_EOF
11214         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11215         mv \$TMP.out \$TMP
11216 CF_EOF
11217 fi
11218
11219 cat >>$cf_edit_man <<CF_EOF
11220         if test \$form = format ; then
11221                 nroff -man \$TMP >\$TMP.out
11222                 mv \$TMP.out \$TMP
11223         fi
11224 CF_EOF
11225
11226 if test -n "$cf_compress" ; then
11227 cat >>$cf_edit_man <<CF_EOF
11228         if test \$verb = installing ; then
11229         if ( $cf_compress -f \$TMP )
11230         then
11231                 mv \$TMP.$cf_so_strip \$TMP
11232         fi
11233         fi
11234         cf_target="\$cf_target.$cf_so_strip"
11235 CF_EOF
11236 fi
11237
11238 case "$MANPAGE_FORMAT" in #(vi
11239 *BSDI*)
11240 cat >>$cf_edit_man <<CF_EOF
11241         if test \$form = format ; then
11242                 # BSDI installs only .0 suffixes in the cat directories
11243                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11244         fi
11245 CF_EOF
11246   ;;
11247 esac
11248
11249 cat >>$cf_edit_man <<CF_EOF
11250         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11251         if test \$verb = installing ; then
11252                 echo \$verb \$cf_target
11253                 \$INSTALL_DATA \$TMP \$cf_target
11254                 test -d \$cf_subdir\${section} &&
11255                 test -n "\$aliases" && (
11256                         cd \$cf_subdir\${section} && (
11257                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11258                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11259                                 cf_target=\`basename \$cf_target\`
11260                                 for cf_alias in \$aliases
11261                                 do
11262                                         if test \$section = 1 ; then
11263                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11264                                         fi
11265
11266                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11267                                                 if test -f \$cf_alias\${suffix} ; then
11268                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11269                                                         then
11270                                                                 continue
11271                                                         fi
11272                                                 fi
11273                                                 echo .. \$verb alias \$cf_alias\${suffix}
11274 CF_EOF
11275 case "x$LN_S" in #(vi
11276 *-f) #(vi
11277 cat >>$cf_edit_man <<CF_EOF
11278                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11279 CF_EOF
11280         ;;
11281 *)
11282 cat >>$cf_edit_man <<CF_EOF
11283                                                 rm -f \$cf_alias\${suffix}
11284                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11285 CF_EOF
11286         ;;
11287 esac
11288 cat >>$cf_edit_man <<CF_EOF
11289                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11290                                                 echo ".so \$cf_source" >\$TMP
11291 CF_EOF
11292 if test -n "$cf_compress" ; then
11293 cat >>$cf_edit_man <<CF_EOF
11294                                                 if test -n "$cf_so_strip" ; then
11295                                                         $cf_compress -f \$TMP
11296                                                         mv \$TMP.$cf_so_strip \$TMP
11297                                                 fi
11298 CF_EOF
11299 fi
11300 cat >>$cf_edit_man <<CF_EOF
11301                                                 echo .. \$verb alias \$cf_alias\${suffix}
11302                                                 rm -f \$cf_alias\${suffix}
11303                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11304                                         fi
11305                                 done
11306                         )
11307                 )
11308         elif test \$verb = removing ; then
11309                 test -f \$cf_target && (
11310                         echo \$verb \$cf_target
11311                         rm -f \$cf_target
11312                 )
11313                 test -d \$cf_subdir\${section} &&
11314                 test -n "\$aliases" && (
11315                         cd \$cf_subdir\${section} && (
11316                                 for cf_alias in \$aliases
11317                                 do
11318                                         if test \$section = 1 ; then
11319                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11320                                         fi
11321
11322                                         echo .. \$verb alias \$cf_alias\${suffix}
11323                                         rm -f \$cf_alias\${suffix}
11324                                 done
11325                         )
11326                 )
11327         else
11328 #               echo ".hy 0"
11329                 cat \$TMP
11330         fi
11331         ;;
11332 esac
11333 done
11334
11335 if test $cf_inboth = yes ; then
11336 if test \$form != format ; then
11337         sh \$0 format \$verb \$mandir \$srcdir \$*
11338 fi
11339 fi
11340
11341 exit 0
11342 CF_EOF
11343 chmod 755 $cf_edit_man
11344
11345 ###############################################################################
11346
11347 ### Note that some functions (such as const) are normally disabled anyway.
11348 echo "$as_me:11348: checking if you want to build with function extensions" >&5
11349 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11350
11351 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11352 if test "${enable_ext_funcs+set}" = set; then
11353   enableval="$enable_ext_funcs"
11354   with_ext_funcs=$enableval
11355 else
11356   with_ext_funcs=yes
11357 fi;
11358 echo "$as_me:11358: result: $with_ext_funcs" >&5
11359 echo "${ECHO_T}$with_ext_funcs" >&6
11360 if test "x$with_ext_funcs" = xyes ; then
11361         NCURSES_EXT_FUNCS=1
11362
11363 cat >>confdefs.h <<\EOF
11364 #define HAVE_ASSUME_DEFAULT_COLORS 1
11365 EOF
11366
11367 cat >>confdefs.h <<\EOF
11368 #define HAVE_CURSES_VERSION 1
11369 EOF
11370
11371 cat >>confdefs.h <<\EOF
11372 #define HAVE_HAS_KEY 1
11373 EOF
11374
11375 cat >>confdefs.h <<\EOF
11376 #define HAVE_RESIZETERM 1
11377 EOF
11378
11379 cat >>confdefs.h <<\EOF
11380 #define HAVE_RESIZE_TERM 1
11381 EOF
11382
11383 cat >>confdefs.h <<\EOF
11384 #define HAVE_TERM_ENTRY_H 1
11385 EOF
11386
11387 cat >>confdefs.h <<\EOF
11388 #define HAVE_USE_DEFAULT_COLORS 1
11389 EOF
11390
11391 cat >>confdefs.h <<\EOF
11392 #define HAVE_USE_SCREEN 1
11393 EOF
11394
11395 cat >>confdefs.h <<\EOF
11396 #define HAVE_USE_WINDOW 1
11397 EOF
11398
11399 cat >>confdefs.h <<\EOF
11400 #define HAVE_WRESIZE 1
11401 EOF
11402
11403 cat >>confdefs.h <<\EOF
11404 #define NCURSES_EXT_FUNCS 1
11405 EOF
11406
11407         GENERATED_EXT_FUNCS=generated
11408 else
11409         NCURSES_EXT_FUNCS=0
11410         GENERATED_EXT_FUNCS=
11411 fi
11412
11413 echo "$as_me:11413: checking if you want to build with experimental SCREEN extensions" >&5
11414 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11415
11416 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11417 if test "${enable_sp_funcs+set}" = set; then
11418   enableval="$enable_sp_funcs"
11419   with_sp_funcs=$enableval
11420 else
11421   with_sp_funcs=no
11422 fi;
11423 echo "$as_me:11423: result: $with_sp_funcs" >&5
11424 echo "${ECHO_T}$with_sp_funcs" >&6
11425 if test "x$with_sp_funcs" = xyes ; then
11426         NCURSES_SP_FUNCS=1
11427
11428 cat >>confdefs.h <<\EOF
11429 #define NCURSES_SP_FUNCS 1
11430 EOF
11431
11432         GENERATED_SP_FUNCS=generated
11433 else
11434         NCURSES_SP_FUNCS=0
11435         GENERATED_SP_FUNCS=
11436 fi
11437
11438 echo "$as_me:11438: checking if you want to build with experimental terminal-driver" >&5
11439 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11440
11441 # Check whether --enable-term-driver or --disable-term-driver was given.
11442 if test "${enable_term_driver+set}" = set; then
11443   enableval="$enable_term_driver"
11444   with_term_driver=$enableval
11445 else
11446   with_term_driver=no
11447 fi;
11448 echo "$as_me:11448: result: $with_term_driver" >&5
11449 echo "${ECHO_T}$with_term_driver" >&6
11450 if test "x$with_term_driver" = xyes ; then
11451
11452 cat >>confdefs.h <<\EOF
11453 #define USE_TERM_DRIVER 1
11454 EOF
11455
11456         if test "x$with_sp_funcs" != xyes ; then
11457                 { { echo "$as_me:11457: error: The term-driver option relies upon sp-funcs" >&5
11458 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11459    { (exit 1); exit 1; }; }
11460         fi
11461 fi
11462
11463 ###   use option --enable-const to turn on use of const beyond that in XSI.
11464 echo "$as_me:11464: checking for extended use of const keyword" >&5
11465 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11466
11467 # Check whether --enable-const or --disable-const was given.
11468 if test "${enable_const+set}" = set; then
11469   enableval="$enable_const"
11470   with_ext_const=$enableval
11471 else
11472   with_ext_const=no
11473 fi;
11474 echo "$as_me:11474: result: $with_ext_const" >&5
11475 echo "${ECHO_T}$with_ext_const" >&6
11476 NCURSES_CONST='/*nothing*/'
11477 if test "x$with_ext_const" = xyes ; then
11478         NCURSES_CONST=const
11479 fi
11480
11481 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11482 echo "$as_me:11482: checking if you want to use extended colors" >&5
11483 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11484
11485 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11486 if test "${enable_ext_colors+set}" = set; then
11487   enableval="$enable_ext_colors"
11488   with_ext_colors=$enableval
11489 else
11490   with_ext_colors=no
11491 fi;
11492 echo "$as_me:11492: result: $with_ext_colors" >&5
11493 echo "${ECHO_T}$with_ext_colors" >&6
11494 NCURSES_EXT_COLORS=0
11495 if test "x$with_ext_colors" = xyes ; then
11496         if test "x$with_widec" != xyes ; then
11497                 { { echo "$as_me:11497: error: This option applies only to wide-character library" >&5
11498 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11499    { (exit 1); exit 1; }; }
11500         else
11501                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11502
11503 if test "${with_abi_version+set}" != set; then
11504         case $cf_cv_rel_version in
11505         5.*)
11506                 cf_cv_rel_version=6.0
11507                 cf_cv_abi_version=6
11508                 { echo "$as_me:11508: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11509 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11510                 ;;
11511         esac
11512 fi
11513
11514         fi
11515         NCURSES_EXT_COLORS=1
11516
11517 cat >>confdefs.h <<\EOF
11518 #define NCURSES_EXT_COLORS 1
11519 EOF
11520
11521 fi
11522
11523 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11524 echo "$as_me:11524: checking if you want to use extended mouse encoding" >&5
11525 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11526
11527 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11528 if test "${enable_ext_mouse+set}" = set; then
11529   enableval="$enable_ext_mouse"
11530   with_ext_mouse=$enableval
11531 else
11532   with_ext_mouse=no
11533 fi;
11534 echo "$as_me:11534: result: $with_ext_mouse" >&5
11535 echo "${ECHO_T}$with_ext_mouse" >&6
11536 NCURSES_MOUSE_VERSION=1
11537 if test "x$with_ext_mouse" = xyes ; then
11538         NCURSES_MOUSE_VERSION=2
11539
11540 if test "${with_abi_version+set}" != set; then
11541         case $cf_cv_rel_version in
11542         5.*)
11543                 cf_cv_rel_version=6.0
11544                 cf_cv_abi_version=6
11545                 { echo "$as_me:11545: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11546 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11547                 ;;
11548         esac
11549 fi
11550
11551 fi
11552
11553 echo "$as_me:11553: checking if you want \$NCURSES_NO_PADDING code" >&5
11554 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11555
11556 # Check whether --enable-no-padding or --disable-no-padding was given.
11557 if test "${enable_no_padding+set}" = set; then
11558   enableval="$enable_no_padding"
11559   with_no_padding=$enableval
11560 else
11561   with_no_padding=$with_ext_funcs
11562 fi;
11563 echo "$as_me:11563: result: $with_no_padding" >&5
11564 echo "${ECHO_T}$with_no_padding" >&6
11565 test "x$with_no_padding" = xyes &&
11566 cat >>confdefs.h <<\EOF
11567 #define NCURSES_NO_PADDING 1
11568 EOF
11569
11570 echo "$as_me:11570: checking for ANSI C header files" >&5
11571 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11572 if test "${ac_cv_header_stdc+set}" = set; then
11573   echo $ECHO_N "(cached) $ECHO_C" >&6
11574 else
11575   cat >conftest.$ac_ext <<_ACEOF
11576 #line 11576 "configure"
11577 #include "confdefs.h"
11578 #include <stdlib.h>
11579 #include <stdarg.h>
11580 #include <string.h>
11581 #include <float.h>
11582
11583 _ACEOF
11584 if { (eval echo "$as_me:11584: \"$ac_cpp conftest.$ac_ext\"") >&5
11585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11586   ac_status=$?
11587   egrep -v '^ *\+' conftest.er1 >conftest.err
11588   rm -f conftest.er1
11589   cat conftest.err >&5
11590   echo "$as_me:11590: \$? = $ac_status" >&5
11591   (exit $ac_status); } >/dev/null; then
11592   if test -s conftest.err; then
11593     ac_cpp_err=$ac_c_preproc_warn_flag
11594   else
11595     ac_cpp_err=
11596   fi
11597 else
11598   ac_cpp_err=yes
11599 fi
11600 if test -z "$ac_cpp_err"; then
11601   ac_cv_header_stdc=yes
11602 else
11603   echo "$as_me: failed program was:" >&5
11604   cat conftest.$ac_ext >&5
11605   ac_cv_header_stdc=no
11606 fi
11607 rm -f conftest.err conftest.$ac_ext
11608
11609 if test $ac_cv_header_stdc = yes; then
11610   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11611   cat >conftest.$ac_ext <<_ACEOF
11612 #line 11612 "configure"
11613 #include "confdefs.h"
11614 #include <string.h>
11615
11616 _ACEOF
11617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11618   egrep "memchr" >/dev/null 2>&1; then
11619   :
11620 else
11621   ac_cv_header_stdc=no
11622 fi
11623 rm -rf conftest*
11624
11625 fi
11626
11627 if test $ac_cv_header_stdc = yes; then
11628   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11629   cat >conftest.$ac_ext <<_ACEOF
11630 #line 11630 "configure"
11631 #include "confdefs.h"
11632 #include <stdlib.h>
11633
11634 _ACEOF
11635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11636   egrep "free" >/dev/null 2>&1; then
11637   :
11638 else
11639   ac_cv_header_stdc=no
11640 fi
11641 rm -rf conftest*
11642
11643 fi
11644
11645 if test $ac_cv_header_stdc = yes; then
11646   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11647   if test "$cross_compiling" = yes; then
11648   :
11649 else
11650   cat >conftest.$ac_ext <<_ACEOF
11651 #line 11651 "configure"
11652 #include "confdefs.h"
11653 #include <ctype.h>
11654 #if ((' ' & 0x0FF) == 0x020)
11655 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11656 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11657 #else
11658 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11659                      || ('j' <= (c) && (c) <= 'r') \
11660                      || ('s' <= (c) && (c) <= 'z'))
11661 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11662 #endif
11663
11664 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11665 int
11666 main ()
11667 {
11668   int i;
11669   for (i = 0; i < 256; i++)
11670     if (XOR (islower (i), ISLOWER (i))
11671         || toupper (i) != TOUPPER (i))
11672       $ac_main_return(2);
11673   $ac_main_return (0);
11674 }
11675 _ACEOF
11676 rm -f conftest$ac_exeext
11677 if { (eval echo "$as_me:11677: \"$ac_link\"") >&5
11678   (eval $ac_link) 2>&5
11679   ac_status=$?
11680   echo "$as_me:11680: \$? = $ac_status" >&5
11681   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11682   { (eval echo "$as_me:11682: \"$ac_try\"") >&5
11683   (eval $ac_try) 2>&5
11684   ac_status=$?
11685   echo "$as_me:11685: \$? = $ac_status" >&5
11686   (exit $ac_status); }; }; then
11687   :
11688 else
11689   echo "$as_me: program exited with status $ac_status" >&5
11690 echo "$as_me: failed program was:" >&5
11691 cat conftest.$ac_ext >&5
11692 ac_cv_header_stdc=no
11693 fi
11694 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11695 fi
11696 fi
11697 fi
11698 echo "$as_me:11698: result: $ac_cv_header_stdc" >&5
11699 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11700 if test $ac_cv_header_stdc = yes; then
11701
11702 cat >>confdefs.h <<\EOF
11703 #define STDC_HEADERS 1
11704 EOF
11705
11706 fi
11707
11708 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11709
11710 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11711                   inttypes.h stdint.h unistd.h
11712 do
11713 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11714 echo "$as_me:11714: checking for $ac_header" >&5
11715 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11716 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11717   echo $ECHO_N "(cached) $ECHO_C" >&6
11718 else
11719   cat >conftest.$ac_ext <<_ACEOF
11720 #line 11720 "configure"
11721 #include "confdefs.h"
11722 $ac_includes_default
11723 #include <$ac_header>
11724 _ACEOF
11725 rm -f conftest.$ac_objext
11726 if { (eval echo "$as_me:11726: \"$ac_compile\"") >&5
11727   (eval $ac_compile) 2>&5
11728   ac_status=$?
11729   echo "$as_me:11729: \$? = $ac_status" >&5
11730   (exit $ac_status); } &&
11731          { ac_try='test -s conftest.$ac_objext'
11732   { (eval echo "$as_me:11732: \"$ac_try\"") >&5
11733   (eval $ac_try) 2>&5
11734   ac_status=$?
11735   echo "$as_me:11735: \$? = $ac_status" >&5
11736   (exit $ac_status); }; }; then
11737   eval "$as_ac_Header=yes"
11738 else
11739   echo "$as_me: failed program was:" >&5
11740 cat conftest.$ac_ext >&5
11741 eval "$as_ac_Header=no"
11742 fi
11743 rm -f conftest.$ac_objext conftest.$ac_ext
11744 fi
11745 echo "$as_me:11745: result: `eval echo '${'$as_ac_Header'}'`" >&5
11746 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11747 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11748   cat >>confdefs.h <<EOF
11749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11750 EOF
11751
11752 fi
11753 done
11754
11755 echo "$as_me:11755: checking for signed char" >&5
11756 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11757 if test "${ac_cv_type_signed_char+set}" = set; then
11758   echo $ECHO_N "(cached) $ECHO_C" >&6
11759 else
11760   cat >conftest.$ac_ext <<_ACEOF
11761 #line 11761 "configure"
11762 #include "confdefs.h"
11763 $ac_includes_default
11764 int
11765 main ()
11766 {
11767 if ((signed char *) 0)
11768   return 0;
11769 if (sizeof (signed char))
11770   return 0;
11771   ;
11772   return 0;
11773 }
11774 _ACEOF
11775 rm -f conftest.$ac_objext
11776 if { (eval echo "$as_me:11776: \"$ac_compile\"") >&5
11777   (eval $ac_compile) 2>&5
11778   ac_status=$?
11779   echo "$as_me:11779: \$? = $ac_status" >&5
11780   (exit $ac_status); } &&
11781          { ac_try='test -s conftest.$ac_objext'
11782   { (eval echo "$as_me:11782: \"$ac_try\"") >&5
11783   (eval $ac_try) 2>&5
11784   ac_status=$?
11785   echo "$as_me:11785: \$? = $ac_status" >&5
11786   (exit $ac_status); }; }; then
11787   ac_cv_type_signed_char=yes
11788 else
11789   echo "$as_me: failed program was:" >&5
11790 cat conftest.$ac_ext >&5
11791 ac_cv_type_signed_char=no
11792 fi
11793 rm -f conftest.$ac_objext conftest.$ac_ext
11794 fi
11795 echo "$as_me:11795: result: $ac_cv_type_signed_char" >&5
11796 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11797
11798 echo "$as_me:11798: checking size of signed char" >&5
11799 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11800 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11801   echo $ECHO_N "(cached) $ECHO_C" >&6
11802 else
11803   if test "$ac_cv_type_signed_char" = yes; then
11804   if test "$cross_compiling" = yes; then
11805   # Depending upon the size, compute the lo and hi bounds.
11806 cat >conftest.$ac_ext <<_ACEOF
11807 #line 11807 "configure"
11808 #include "confdefs.h"
11809 $ac_includes_default
11810 int
11811 main ()
11812 {
11813 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11814   ;
11815   return 0;
11816 }
11817 _ACEOF
11818 rm -f conftest.$ac_objext
11819 if { (eval echo "$as_me:11819: \"$ac_compile\"") >&5
11820   (eval $ac_compile) 2>&5
11821   ac_status=$?
11822   echo "$as_me:11822: \$? = $ac_status" >&5
11823   (exit $ac_status); } &&
11824          { ac_try='test -s conftest.$ac_objext'
11825   { (eval echo "$as_me:11825: \"$ac_try\"") >&5
11826   (eval $ac_try) 2>&5
11827   ac_status=$?
11828   echo "$as_me:11828: \$? = $ac_status" >&5
11829   (exit $ac_status); }; }; then
11830   ac_lo=0 ac_mid=0
11831   while :; do
11832     cat >conftest.$ac_ext <<_ACEOF
11833 #line 11833 "configure"
11834 #include "confdefs.h"
11835 $ac_includes_default
11836 int
11837 main ()
11838 {
11839 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11840   ;
11841   return 0;
11842 }
11843 _ACEOF
11844 rm -f conftest.$ac_objext
11845 if { (eval echo "$as_me:11845: \"$ac_compile\"") >&5
11846   (eval $ac_compile) 2>&5
11847   ac_status=$?
11848   echo "$as_me:11848: \$? = $ac_status" >&5
11849   (exit $ac_status); } &&
11850          { ac_try='test -s conftest.$ac_objext'
11851   { (eval echo "$as_me:11851: \"$ac_try\"") >&5
11852   (eval $ac_try) 2>&5
11853   ac_status=$?
11854   echo "$as_me:11854: \$? = $ac_status" >&5
11855   (exit $ac_status); }; }; then
11856   ac_hi=$ac_mid; break
11857 else
11858   echo "$as_me: failed program was:" >&5
11859 cat conftest.$ac_ext >&5
11860 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11861 fi
11862 rm -f conftest.$ac_objext conftest.$ac_ext
11863   done
11864 else
11865   echo "$as_me: failed program was:" >&5
11866 cat conftest.$ac_ext >&5
11867 ac_hi=-1 ac_mid=-1
11868   while :; do
11869     cat >conftest.$ac_ext <<_ACEOF
11870 #line 11870 "configure"
11871 #include "confdefs.h"
11872 $ac_includes_default
11873 int
11874 main ()
11875 {
11876 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11877   ;
11878   return 0;
11879 }
11880 _ACEOF
11881 rm -f conftest.$ac_objext
11882 if { (eval echo "$as_me:11882: \"$ac_compile\"") >&5
11883   (eval $ac_compile) 2>&5
11884   ac_status=$?
11885   echo "$as_me:11885: \$? = $ac_status" >&5
11886   (exit $ac_status); } &&
11887          { ac_try='test -s conftest.$ac_objext'
11888   { (eval echo "$as_me:11888: \"$ac_try\"") >&5
11889   (eval $ac_try) 2>&5
11890   ac_status=$?
11891   echo "$as_me:11891: \$? = $ac_status" >&5
11892   (exit $ac_status); }; }; then
11893   ac_lo=$ac_mid; break
11894 else
11895   echo "$as_me: failed program was:" >&5
11896 cat conftest.$ac_ext >&5
11897 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11898 fi
11899 rm -f conftest.$ac_objext conftest.$ac_ext
11900   done
11901 fi
11902 rm -f conftest.$ac_objext conftest.$ac_ext
11903 # Binary search between lo and hi bounds.
11904 while test "x$ac_lo" != "x$ac_hi"; do
11905   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11906   cat >conftest.$ac_ext <<_ACEOF
11907 #line 11907 "configure"
11908 #include "confdefs.h"
11909 $ac_includes_default
11910 int
11911 main ()
11912 {
11913 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11914   ;
11915   return 0;
11916 }
11917 _ACEOF
11918 rm -f conftest.$ac_objext
11919 if { (eval echo "$as_me:11919: \"$ac_compile\"") >&5
11920   (eval $ac_compile) 2>&5
11921   ac_status=$?
11922   echo "$as_me:11922: \$? = $ac_status" >&5
11923   (exit $ac_status); } &&
11924          { ac_try='test -s conftest.$ac_objext'
11925   { (eval echo "$as_me:11925: \"$ac_try\"") >&5
11926   (eval $ac_try) 2>&5
11927   ac_status=$?
11928   echo "$as_me:11928: \$? = $ac_status" >&5
11929   (exit $ac_status); }; }; then
11930   ac_hi=$ac_mid
11931 else
11932   echo "$as_me: failed program was:" >&5
11933 cat conftest.$ac_ext >&5
11934 ac_lo=`expr $ac_mid + 1`
11935 fi
11936 rm -f conftest.$ac_objext conftest.$ac_ext
11937 done
11938 ac_cv_sizeof_signed_char=$ac_lo
11939 else
11940   if test "$cross_compiling" = yes; then
11941   { { echo "$as_me:11941: error: cannot run test program while cross compiling" >&5
11942 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11943    { (exit 1); exit 1; }; }
11944 else
11945   cat >conftest.$ac_ext <<_ACEOF
11946 #line 11946 "configure"
11947 #include "confdefs.h"
11948 $ac_includes_default
11949 int
11950 main ()
11951 {
11952 FILE *f = fopen ("conftest.val", "w");
11953 if (!f)
11954   $ac_main_return (1);
11955 fprintf (f, "%d", (sizeof (signed char)));
11956 fclose (f);
11957   ;
11958   return 0;
11959 }
11960 _ACEOF
11961 rm -f conftest$ac_exeext
11962 if { (eval echo "$as_me:11962: \"$ac_link\"") >&5
11963   (eval $ac_link) 2>&5
11964   ac_status=$?
11965   echo "$as_me:11965: \$? = $ac_status" >&5
11966   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11967   { (eval echo "$as_me:11967: \"$ac_try\"") >&5
11968   (eval $ac_try) 2>&5
11969   ac_status=$?
11970   echo "$as_me:11970: \$? = $ac_status" >&5
11971   (exit $ac_status); }; }; then
11972   ac_cv_sizeof_signed_char=`cat conftest.val`
11973 else
11974   echo "$as_me: program exited with status $ac_status" >&5
11975 echo "$as_me: failed program was:" >&5
11976 cat conftest.$ac_ext >&5
11977 fi
11978 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11979 fi
11980 fi
11981 rm -f conftest.val
11982 else
11983   ac_cv_sizeof_signed_char=0
11984 fi
11985 fi
11986 echo "$as_me:11986: result: $ac_cv_sizeof_signed_char" >&5
11987 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11988 cat >>confdefs.h <<EOF
11989 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11990 EOF
11991
11992 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11993         NCURSES_SBOOL="signed char"
11994 else
11995         NCURSES_SBOOL="char"
11996 fi
11997 echo "$as_me:11997: checking if you want to use signed Boolean array in term.h" >&5
11998 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11999
12000 # Check whether --enable-signed-char or --disable-signed-char was given.
12001 if test "${enable_signed_char+set}" = set; then
12002   enableval="$enable_signed_char"
12003   with_signed_char=$enableval
12004 else
12005   with_signed_char=no
12006 fi;
12007 echo "$as_me:12007: result: $with_signed_char" >&5
12008 echo "${ECHO_T}$with_signed_char" >&6
12009 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12010
12011 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12012 echo "$as_me:12012: checking if you want SIGWINCH handler" >&5
12013 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12014
12015 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12016 if test "${enable_sigwinch+set}" = set; then
12017   enableval="$enable_sigwinch"
12018   with_sigwinch=$enableval
12019 else
12020   with_sigwinch=$with_ext_funcs
12021 fi;
12022 echo "$as_me:12022: result: $with_sigwinch" >&5
12023 echo "${ECHO_T}$with_sigwinch" >&6
12024 test "x$with_sigwinch" = xyes &&
12025 cat >>confdefs.h <<\EOF
12026 #define USE_SIGWINCH 1
12027 EOF
12028
12029 ###   use option --enable-tcap-names to allow user to define new capabilities
12030 echo "$as_me:12030: checking if you want user-definable terminal capabilities like termcap" >&5
12031 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12032
12033 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12034 if test "${enable_tcap_names+set}" = set; then
12035   enableval="$enable_tcap_names"
12036   with_tcap_names=$enableval
12037 else
12038   with_tcap_names=$with_ext_funcs
12039 fi;
12040 echo "$as_me:12040: result: $with_tcap_names" >&5
12041 echo "${ECHO_T}$with_tcap_names" >&6
12042 NCURSES_XNAMES=0
12043 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12044
12045 ###############################################################################
12046 # These options are relatively safe to experiment with.
12047
12048 echo "$as_me:12048: checking if you want all development code" >&5
12049 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12050
12051 # Check whether --with-develop or --without-develop was given.
12052 if test "${with_develop+set}" = set; then
12053   withval="$with_develop"
12054   with_develop=$withval
12055 else
12056   with_develop=no
12057 fi;
12058 echo "$as_me:12058: result: $with_develop" >&5
12059 echo "${ECHO_T}$with_develop" >&6
12060
12061 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12062 echo "$as_me:12062: checking if you want hard-tabs code" >&5
12063 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12064
12065 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12066 if test "${enable_hard_tabs+set}" = set; then
12067   enableval="$enable_hard_tabs"
12068
12069 else
12070   enable_hard_tabs=$with_develop
12071 fi;
12072 echo "$as_me:12072: result: $enable_hard_tabs" >&5
12073 echo "${ECHO_T}$enable_hard_tabs" >&6
12074 test "x$enable_hard_tabs" = xyes &&
12075 cat >>confdefs.h <<\EOF
12076 #define USE_HARD_TABS 1
12077 EOF
12078
12079 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12080 echo "$as_me:12080: checking if you want limited support for xmc" >&5
12081 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12082
12083 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12084 if test "${enable_xmc_glitch+set}" = set; then
12085   enableval="$enable_xmc_glitch"
12086
12087 else
12088   enable_xmc_glitch=$with_develop
12089 fi;
12090 echo "$as_me:12090: result: $enable_xmc_glitch" >&5
12091 echo "${ECHO_T}$enable_xmc_glitch" >&6
12092 test "x$enable_xmc_glitch" = xyes &&
12093 cat >>confdefs.h <<\EOF
12094 #define USE_XMC_SUPPORT 1
12095 EOF
12096
12097 ###############################################################################
12098 # These are just experimental, probably should not be in a package:
12099
12100 echo "$as_me:12100: checking if you do not want to assume colors are white-on-black" >&5
12101 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12102
12103 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12104 if test "${enable_assumed_color+set}" = set; then
12105   enableval="$enable_assumed_color"
12106   with_assumed_color=$enableval
12107 else
12108   with_assumed_color=yes
12109 fi;
12110 echo "$as_me:12110: result: $with_assumed_color" >&5
12111 echo "${ECHO_T}$with_assumed_color" >&6
12112 test "x$with_assumed_color" = xyes &&
12113 cat >>confdefs.h <<\EOF
12114 #define USE_ASSUMED_COLOR 1
12115 EOF
12116
12117 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12118 echo "$as_me:12118: checking if you want hashmap scrolling-optimization code" >&5
12119 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12120
12121 # Check whether --enable-hashmap or --disable-hashmap was given.
12122 if test "${enable_hashmap+set}" = set; then
12123   enableval="$enable_hashmap"
12124   with_hashmap=$enableval
12125 else
12126   with_hashmap=yes
12127 fi;
12128 echo "$as_me:12128: result: $with_hashmap" >&5
12129 echo "${ECHO_T}$with_hashmap" >&6
12130 test "x$with_hashmap" = xyes &&
12131 cat >>confdefs.h <<\EOF
12132 #define USE_HASHMAP 1
12133 EOF
12134
12135 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12136 echo "$as_me:12136: checking if you want colorfgbg code" >&5
12137 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12138
12139 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12140 if test "${enable_colorfgbg+set}" = set; then
12141   enableval="$enable_colorfgbg"
12142   with_colorfgbg=$enableval
12143 else
12144   with_colorfgbg=no
12145 fi;
12146 echo "$as_me:12146: result: $with_colorfgbg" >&5
12147 echo "${ECHO_T}$with_colorfgbg" >&6
12148 test "x$with_colorfgbg" = xyes &&
12149 cat >>confdefs.h <<\EOF
12150 #define USE_COLORFGBG 1
12151 EOF
12152
12153 ###   use option --enable-interop to turn on use of bindings used for interop
12154 echo "$as_me:12154: checking if you want interop bindings" >&5
12155 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12156
12157 # Check whether --enable-interop or --disable-interop was given.
12158 if test "${enable_interop+set}" = set; then
12159   enableval="$enable_interop"
12160   with_exp_interop=$enableval
12161 else
12162   with_exp_interop=no
12163 fi;
12164 echo "$as_me:12164: result: $with_exp_interop" >&5
12165 echo "${ECHO_T}$with_exp_interop" >&6
12166
12167 NCURSES_INTEROP_FUNCS=0
12168 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12169
12170 # This is still experimental (20080329), but should ultimately be moved to
12171 # the script-block --with-normal, etc.
12172
12173 echo "$as_me:12173: checking if you want to link with the pthread library" >&5
12174 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12175
12176 # Check whether --with-pthread or --without-pthread was given.
12177 if test "${with_pthread+set}" = set; then
12178   withval="$with_pthread"
12179   with_pthread=$withval
12180 else
12181   with_pthread=no
12182 fi;
12183 echo "$as_me:12183: result: $with_pthread" >&5
12184 echo "${ECHO_T}$with_pthread" >&6
12185
12186 if test "$with_pthread" != no ; then
12187     echo "$as_me:12187: checking for pthread.h" >&5
12188 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12189 if test "${ac_cv_header_pthread_h+set}" = set; then
12190   echo $ECHO_N "(cached) $ECHO_C" >&6
12191 else
12192   cat >conftest.$ac_ext <<_ACEOF
12193 #line 12193 "configure"
12194 #include "confdefs.h"
12195 #include <pthread.h>
12196 _ACEOF
12197 if { (eval echo "$as_me:12197: \"$ac_cpp conftest.$ac_ext\"") >&5
12198   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12199   ac_status=$?
12200   egrep -v '^ *\+' conftest.er1 >conftest.err
12201   rm -f conftest.er1
12202   cat conftest.err >&5
12203   echo "$as_me:12203: \$? = $ac_status" >&5
12204   (exit $ac_status); } >/dev/null; then
12205   if test -s conftest.err; then
12206     ac_cpp_err=$ac_c_preproc_warn_flag
12207   else
12208     ac_cpp_err=
12209   fi
12210 else
12211   ac_cpp_err=yes
12212 fi
12213 if test -z "$ac_cpp_err"; then
12214   ac_cv_header_pthread_h=yes
12215 else
12216   echo "$as_me: failed program was:" >&5
12217   cat conftest.$ac_ext >&5
12218   ac_cv_header_pthread_h=no
12219 fi
12220 rm -f conftest.err conftest.$ac_ext
12221 fi
12222 echo "$as_me:12222: result: $ac_cv_header_pthread_h" >&5
12223 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12224 if test $ac_cv_header_pthread_h = yes; then
12225
12226 cat >>confdefs.h <<\EOF
12227 #define HAVE_PTHREADS_H 1
12228 EOF
12229
12230         for cf_lib_pthread in pthread c_r
12231         do
12232             echo "$as_me:12232: checking if we can link with the $cf_lib_pthread library" >&5
12233 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12234             cf_save_LIBS="$LIBS"
12235
12236 cf_add_libs="-l$cf_lib_pthread"
12237 # Filter out duplicates - this happens with badly-designed ".pc" files...
12238 for cf_add_1lib in $LIBS
12239 do
12240         for cf_add_2lib in $cf_add_libs
12241         do
12242                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12243                 then
12244                         cf_add_1lib=
12245                         break
12246                 fi
12247         done
12248         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12249 done
12250 LIBS="$cf_add_libs"
12251
12252             cat >conftest.$ac_ext <<_ACEOF
12253 #line 12253 "configure"
12254 #include "confdefs.h"
12255
12256 #include <pthread.h>
12257
12258 int
12259 main ()
12260 {
12261
12262                 int rc = pthread_create(0,0,0,0);
12263                 int r2 = pthread_mutexattr_settype(0, 0);
12264
12265   ;
12266   return 0;
12267 }
12268 _ACEOF
12269 rm -f conftest.$ac_objext conftest$ac_exeext
12270 if { (eval echo "$as_me:12270: \"$ac_link\"") >&5
12271   (eval $ac_link) 2>&5
12272   ac_status=$?
12273   echo "$as_me:12273: \$? = $ac_status" >&5
12274   (exit $ac_status); } &&
12275          { ac_try='test -s conftest$ac_exeext'
12276   { (eval echo "$as_me:12276: \"$ac_try\"") >&5
12277   (eval $ac_try) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit $ac_status); }; }; then
12281   with_pthread=yes
12282 else
12283   echo "$as_me: failed program was:" >&5
12284 cat conftest.$ac_ext >&5
12285 with_pthread=no
12286 fi
12287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12288             LIBS="$cf_save_LIBS"
12289             echo "$as_me:12289: result: $with_pthread" >&5
12290 echo "${ECHO_T}$with_pthread" >&6
12291             test "$with_pthread" = yes && break
12292         done
12293
12294         if test "$with_pthread" = yes ; then
12295
12296 cf_add_libs="-l$cf_lib_pthread"
12297 # Filter out duplicates - this happens with badly-designed ".pc" files...
12298 for cf_add_1lib in $LIBS
12299 do
12300         for cf_add_2lib in $cf_add_libs
12301         do
12302                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12303                 then
12304                         cf_add_1lib=
12305                         break
12306                 fi
12307         done
12308         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12309 done
12310 LIBS="$cf_add_libs"
12311
12312 cat >>confdefs.h <<\EOF
12313 #define HAVE_LIBPTHREADS 1
12314 EOF
12315
12316         else
12317             { { echo "$as_me:12317: error: Cannot link with pthread library" >&5
12318 echo "$as_me: error: Cannot link with pthread library" >&2;}
12319    { (exit 1); exit 1; }; }
12320         fi
12321
12322 fi
12323
12324 fi
12325
12326 if test "x$with_pthread" != xno; then
12327         echo "$as_me:12327: checking for pthread_kill" >&5
12328 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12329 if test "${ac_cv_func_pthread_kill+set}" = set; then
12330   echo $ECHO_N "(cached) $ECHO_C" >&6
12331 else
12332   cat >conftest.$ac_ext <<_ACEOF
12333 #line 12333 "configure"
12334 #include "confdefs.h"
12335 /* System header to define __stub macros and hopefully few prototypes,
12336     which can conflict with char pthread_kill (); below.  */
12337 #include <assert.h>
12338 /* Override any gcc2 internal prototype to avoid an error.  */
12339 #ifdef __cplusplus
12340 extern "C"
12341 #endif
12342 /* We use char because int might match the return type of a gcc2
12343    builtin and then its argument prototype would still apply.  */
12344 char pthread_kill ();
12345 char (*f) ();
12346
12347 int
12348 main ()
12349 {
12350 /* The GNU C library defines this for functions which it implements
12351     to always fail with ENOSYS.  Some functions are actually named
12352     something starting with __ and the normal name is an alias.  */
12353 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12354 choke me
12355 #else
12356 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12357 #endif
12358
12359   ;
12360   return 0;
12361 }
12362 _ACEOF
12363 rm -f conftest.$ac_objext conftest$ac_exeext
12364 if { (eval echo "$as_me:12364: \"$ac_link\"") >&5
12365   (eval $ac_link) 2>&5
12366   ac_status=$?
12367   echo "$as_me:12367: \$? = $ac_status" >&5
12368   (exit $ac_status); } &&
12369          { ac_try='test -s conftest$ac_exeext'
12370   { (eval echo "$as_me:12370: \"$ac_try\"") >&5
12371   (eval $ac_try) 2>&5
12372   ac_status=$?
12373   echo "$as_me:12373: \$? = $ac_status" >&5
12374   (exit $ac_status); }; }; then
12375   ac_cv_func_pthread_kill=yes
12376 else
12377   echo "$as_me: failed program was:" >&5
12378 cat conftest.$ac_ext >&5
12379 ac_cv_func_pthread_kill=no
12380 fi
12381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12382 fi
12383 echo "$as_me:12383: result: $ac_cv_func_pthread_kill" >&5
12384 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12385 if test $ac_cv_func_pthread_kill = yes; then
12386
12387                 echo "$as_me:12387: checking if you want to allow EINTR in wgetch with pthreads" >&5
12388 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12389
12390 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12391 if test "${enable_pthreads_eintr+set}" = set; then
12392   enableval="$enable_pthreads_eintr"
12393   use_pthreads_eintr=$enableval
12394 else
12395   use_pthreads_eintr=no
12396 fi;
12397                 echo "$as_me:12397: result: $use_pthreads_eintr" >&5
12398 echo "${ECHO_T}$use_pthreads_eintr" >&6
12399                 if test "x$use_pthreads_eintr" = xyes ; then
12400
12401 cat >>confdefs.h <<\EOF
12402 #define USE_PTHREADS_EINTR 1
12403 EOF
12404
12405                 fi
12406 fi
12407
12408         echo "$as_me:12408: checking if you want to use weak-symbols for pthreads" >&5
12409 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12410
12411 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12412 if test "${enable_weak_symbols+set}" = set; then
12413   enableval="$enable_weak_symbols"
12414   use_weak_symbols=$enableval
12415 else
12416   use_weak_symbols=no
12417 fi;
12418         echo "$as_me:12418: result: $use_weak_symbols" >&5
12419 echo "${ECHO_T}$use_weak_symbols" >&6
12420         if test "x$use_weak_symbols" = xyes ; then
12421
12422 echo "$as_me:12422: checking if $CC supports weak symbols" >&5
12423 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12424 if test "${cf_cv_weak_symbols+set}" = set; then
12425   echo $ECHO_N "(cached) $ECHO_C" >&6
12426 else
12427
12428 cat >conftest.$ac_ext <<_ACEOF
12429 #line 12429 "configure"
12430 #include "confdefs.h"
12431
12432 #include <stdio.h>
12433 int
12434 main ()
12435 {
12436
12437 #if defined(__GNUC__)
12438 #  if defined __USE_ISOC99
12439 #    define _cat_pragma(exp)    _Pragma(#exp)
12440 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12441 #  else
12442 #    define _weak_pragma(exp)
12443 #  endif
12444 #  define _declare(name)        __extension__ extern __typeof__(name) name
12445 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12446 #endif
12447
12448 weak_symbol(fopen);
12449
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 rm -f conftest.$ac_objext
12455 if { (eval echo "$as_me:12455: \"$ac_compile\"") >&5
12456   (eval $ac_compile) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); } &&
12460          { ac_try='test -s conftest.$ac_objext'
12461   { (eval echo "$as_me:12461: \"$ac_try\"") >&5
12462   (eval $ac_try) 2>&5
12463   ac_status=$?
12464   echo "$as_me:12464: \$? = $ac_status" >&5
12465   (exit $ac_status); }; }; then
12466   cf_cv_weak_symbols=yes
12467 else
12468   echo "$as_me: failed program was:" >&5
12469 cat conftest.$ac_ext >&5
12470 cf_cv_weak_symbols=no
12471 fi
12472 rm -f conftest.$ac_objext conftest.$ac_ext
12473
12474 fi
12475 echo "$as_me:12475: result: $cf_cv_weak_symbols" >&5
12476 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12477
12478         else
12479                 cf_cv_weak_symbols=no
12480         fi
12481
12482         if test "x$cf_cv_weak_symbols" = xyes ; then
12483
12484 cat >>confdefs.h <<\EOF
12485 #define USE_WEAK_SYMBOLS 1
12486 EOF
12487
12488         fi
12489 fi
12490
12491 PTHREAD=
12492 if test "x$with_pthread" = "xyes" ; then
12493
12494 cat >>confdefs.h <<\EOF
12495 #define USE_PTHREADS 1
12496 EOF
12497
12498     enable_reentrant=yes
12499     if test "x$cf_cv_weak_symbols" = xyes ; then
12500         PTHREAD=-lpthread
12501     fi
12502 fi
12503
12504 # Reentrant code has to be opaque; there's little advantage to making ncurses
12505 # opaque outside of that, so there is no --enable-opaque option.  We can use
12506 # this option without --with-pthreads, but this will be always set for
12507 # pthreads.
12508 echo "$as_me:12508: checking if you want experimental reentrant code" >&5
12509 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12510
12511 # Check whether --enable-reentrant or --disable-reentrant was given.
12512 if test "${enable_reentrant+set}" = set; then
12513   enableval="$enable_reentrant"
12514   with_reentrant=$enableval
12515 else
12516   with_reentrant=no
12517 fi;
12518 echo "$as_me:12518: result: $with_reentrant" >&5
12519 echo "${ECHO_T}$with_reentrant" >&6
12520 if test "x$with_reentrant" = xyes ; then
12521         cf_cv_enable_reentrant=1
12522         cf_cv_enable_opaque="NCURSES_INTERNALS"
12523         NCURSES_OPAQUE=1
12524         NCURSES_SIZE_T=int
12525         if test "x$cf_cv_weak_symbols" = xyes ; then
12526
12527 # remove pthread library from $LIBS
12528 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12529
12530 cf_add_libs="-lpthread"
12531 # Filter out duplicates - this happens with badly-designed ".pc" files...
12532 for cf_add_1lib in $TEST_LIBS
12533 do
12534         for cf_add_2lib in $cf_add_libs
12535         do
12536                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12537                 then
12538                         cf_add_1lib=
12539                         break
12540                 fi
12541         done
12542         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12543 done
12544 TEST_LIBS="$cf_add_libs"
12545
12546 cf_add_libs="-lpthread"
12547 # Filter out duplicates - this happens with badly-designed ".pc" files...
12548 for cf_add_1lib in $TEST_LIBS2
12549 do
12550         for cf_add_2lib in $cf_add_libs
12551         do
12552                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12553                 then
12554                         cf_add_1lib=
12555                         break
12556                 fi
12557         done
12558         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12559 done
12560 TEST_LIBS2="$cf_add_libs"
12561
12562         else
12563                 # when not using weak symbols but with_reentrant,
12564                 # add 't' to the library suffix on all platforms
12565                 # except cygwin, where we only do that if ALSO
12566                 # compiling with full thread support.
12567                 case "$host" in
12568                 *cygwin* | *msys*) #(vi
12569                         if test "$with_pthread" = "yes" ; then
12570                                 if test "x$disable_lib_suffixes" = "xno" ; then
12571                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12572                                 fi
12573                         fi ;;
12574                 *)
12575                         if test "x$disable_lib_suffixes" = "xno" ; then
12576                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12577                         fi
12578                         ;;
12579                 esac
12580         fi
12581
12582 cat >>confdefs.h <<\EOF
12583 #define USE_REENTRANT 1
12584 EOF
12585
12586 if test "${with_abi_version+set}" != set; then
12587         case $cf_cv_rel_version in
12588         5.*)
12589                 cf_cv_rel_version=6.0
12590                 cf_cv_abi_version=6
12591                 { echo "$as_me:12591: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12592 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12593                 ;;
12594         esac
12595 fi
12596
12597 else
12598         cf_cv_enable_reentrant=0
12599         cf_cv_enable_opaque="NCURSES_OPAQUE"
12600         NCURSES_OPAQUE=0
12601         NCURSES_SIZE_T=short
12602 fi
12603
12604 ### Allow using a different wrap-prefix
12605 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12606         echo "$as_me:12606: checking for prefix used to wrap public variables" >&5
12607 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12608
12609 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12610 if test "${with_wrap_prefix+set}" = set; then
12611   withval="$with_wrap_prefix"
12612   NCURSES_WRAP_PREFIX=$withval
12613 else
12614   NCURSES_WRAP_PREFIX=_nc_
12615 fi;
12616         echo "$as_me:12616: result: $NCURSES_WRAP_PREFIX" >&5
12617 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12618 else
12619         NCURSES_WRAP_PREFIX=_nc_
12620 fi
12621
12622 cat >>confdefs.h <<EOF
12623 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12624 EOF
12625
12626 echo "$as_me:12626: checking if you want experimental safe-sprintf code" >&5
12627 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12628
12629 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12630 if test "${enable_safe_sprintf+set}" = set; then
12631   enableval="$enable_safe_sprintf"
12632   with_safe_sprintf=$enableval
12633 else
12634   with_safe_sprintf=no
12635 fi;
12636 echo "$as_me:12636: result: $with_safe_sprintf" >&5
12637 echo "${ECHO_T}$with_safe_sprintf" >&6
12638 test "x$with_safe_sprintf" = xyes &&
12639 cat >>confdefs.h <<\EOF
12640 #define USE_SAFE_SPRINTF 1
12641 EOF
12642
12643 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12644 # when hashmap is used scroll hints are useless
12645 if test "$with_hashmap" = no ; then
12646 echo "$as_me:12646: checking if you want to experiment without scrolling-hints code" >&5
12647 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12648
12649 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12650 if test "${enable_scroll_hints+set}" = set; then
12651   enableval="$enable_scroll_hints"
12652   with_scroll_hints=$enableval
12653 else
12654   with_scroll_hints=yes
12655 fi;
12656 echo "$as_me:12656: result: $with_scroll_hints" >&5
12657 echo "${ECHO_T}$with_scroll_hints" >&6
12658 test "x$with_scroll_hints" = xyes &&
12659 cat >>confdefs.h <<\EOF
12660 #define USE_SCROLL_HINTS 1
12661 EOF
12662
12663 fi
12664
12665 echo "$as_me:12665: checking if you want experimental wgetch-events code" >&5
12666 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12667
12668 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12669 if test "${enable_wgetch_events+set}" = set; then
12670   enableval="$enable_wgetch_events"
12671   with_wgetch_events=$enableval
12672 else
12673   with_wgetch_events=no
12674 fi;
12675 echo "$as_me:12675: result: $with_wgetch_events" >&5
12676 echo "${ECHO_T}$with_wgetch_events" >&6
12677 test "x$with_wgetch_events" = xyes &&
12678 cat >>confdefs.h <<\EOF
12679 #define NCURSES_WGETCH_EVENTS 1
12680 EOF
12681
12682 ###############################################################################
12683
12684 ###     use option --disable-echo to suppress full display compiling commands
12685
12686 echo "$as_me:12686: checking if you want to see long compiling messages" >&5
12687 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12688
12689 # Check whether --enable-echo or --disable-echo was given.
12690 if test "${enable_echo+set}" = set; then
12691   enableval="$enable_echo"
12692   test "$enableval" != no && enableval=yes
12693   if test "$enableval" != "yes" ; then
12694
12695     ECHO_LT='--silent'
12696     ECHO_LD='@echo linking $@;'
12697     RULE_CC='@echo compiling $<'
12698     SHOW_CC='@echo compiling $@'
12699     ECHO_CC='@'
12700
12701   else
12702
12703     ECHO_LT=''
12704     ECHO_LD=''
12705     RULE_CC=''
12706     SHOW_CC=''
12707     ECHO_CC=''
12708
12709   fi
12710 else
12711   enableval=yes
12712
12713     ECHO_LT=''
12714     ECHO_LD=''
12715     RULE_CC=''
12716     SHOW_CC=''
12717     ECHO_CC=''
12718
12719 fi;
12720 echo "$as_me:12720: result: $enableval" >&5
12721 echo "${ECHO_T}$enableval" >&6
12722
12723 if test "x$enable_echo" = xyes; then
12724         ECHO_LINK=
12725 else
12726         ECHO_LINK='@ echo linking $@ ... ;'
12727         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12728         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12729 fi
12730
12731 ###     use option --enable-warnings to turn on all gcc warnings
12732 echo "$as_me:12732: checking if you want to see compiler warnings" >&5
12733 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12734
12735 # Check whether --enable-warnings or --disable-warnings was given.
12736 if test "${enable_warnings+set}" = set; then
12737   enableval="$enable_warnings"
12738   with_warnings=$enableval
12739 fi;
12740 echo "$as_me:12740: result: $with_warnings" >&5
12741 echo "${ECHO_T}$with_warnings" >&6
12742
12743 if test "x$with_warnings" = "xyes"; then
12744
12745         ADAFLAGS="$ADAFLAGS -gnatg"
12746
12747 INTEL_COMPILER=no
12748
12749 if test "$GCC" = yes ; then
12750         case $host_os in
12751         linux*|gnu*)
12752                 echo "$as_me:12752: checking if this is really Intel C compiler" >&5
12753 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12754                 cf_save_CFLAGS="$CFLAGS"
12755                 CFLAGS="$CFLAGS -no-gcc"
12756                 cat >conftest.$ac_ext <<_ACEOF
12757 #line 12757 "configure"
12758 #include "confdefs.h"
12759
12760 int
12761 main ()
12762 {
12763
12764 #ifdef __INTEL_COMPILER
12765 #else
12766 make an error
12767 #endif
12768
12769   ;
12770   return 0;
12771 }
12772 _ACEOF
12773 rm -f conftest.$ac_objext
12774 if { (eval echo "$as_me:12774: \"$ac_compile\"") >&5
12775   (eval $ac_compile) 2>&5
12776   ac_status=$?
12777   echo "$as_me:12777: \$? = $ac_status" >&5
12778   (exit $ac_status); } &&
12779          { ac_try='test -s conftest.$ac_objext'
12780   { (eval echo "$as_me:12780: \"$ac_try\"") >&5
12781   (eval $ac_try) 2>&5
12782   ac_status=$?
12783   echo "$as_me:12783: \$? = $ac_status" >&5
12784   (exit $ac_status); }; }; then
12785   INTEL_COMPILER=yes
12786 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12787
12788 else
12789   echo "$as_me: failed program was:" >&5
12790 cat conftest.$ac_ext >&5
12791 fi
12792 rm -f conftest.$ac_objext conftest.$ac_ext
12793                 CFLAGS="$cf_save_CFLAGS"
12794                 echo "$as_me:12794: result: $INTEL_COMPILER" >&5
12795 echo "${ECHO_T}$INTEL_COMPILER" >&6
12796                 ;;
12797         esac
12798 fi
12799
12800 CLANG_COMPILER=no
12801
12802 if test "$GCC" = yes ; then
12803         echo "$as_me:12803: checking if this is really Clang C compiler" >&5
12804 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12805         cf_save_CFLAGS="$CFLAGS"
12806         CFLAGS="$CFLAGS -Qunused-arguments"
12807         cat >conftest.$ac_ext <<_ACEOF
12808 #line 12808 "configure"
12809 #include "confdefs.h"
12810
12811 int
12812 main ()
12813 {
12814
12815 #ifdef __clang__
12816 #else
12817 make an error
12818 #endif
12819
12820   ;
12821   return 0;
12822 }
12823 _ACEOF
12824 rm -f conftest.$ac_objext
12825 if { (eval echo "$as_me:12825: \"$ac_compile\"") >&5
12826   (eval $ac_compile) 2>&5
12827   ac_status=$?
12828   echo "$as_me:12828: \$? = $ac_status" >&5
12829   (exit $ac_status); } &&
12830          { ac_try='test -s conftest.$ac_objext'
12831   { (eval echo "$as_me:12831: \"$ac_try\"") >&5
12832   (eval $ac_try) 2>&5
12833   ac_status=$?
12834   echo "$as_me:12834: \$? = $ac_status" >&5
12835   (exit $ac_status); }; }; then
12836   CLANG_COMPILER=yes
12837 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12838
12839 else
12840   echo "$as_me: failed program was:" >&5
12841 cat conftest.$ac_ext >&5
12842 fi
12843 rm -f conftest.$ac_objext conftest.$ac_ext
12844         CFLAGS="$cf_save_CFLAGS"
12845         echo "$as_me:12845: result: $CLANG_COMPILER" >&5
12846 echo "${ECHO_T}$CLANG_COMPILER" >&6
12847 fi
12848
12849 cat > conftest.$ac_ext <<EOF
12850 #line 12850 "${as_me:-configure}"
12851 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12852 EOF
12853
12854 if test "$INTEL_COMPILER" = yes
12855 then
12856 # The "-wdXXX" options suppress warnings:
12857 # remark #1419: external declaration in primary source file
12858 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12859 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12860 # remark #193: zero used for undefined preprocessing identifier
12861 # remark #593: variable "curs_sb_left_arrow" was set but never used
12862 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12863 # remark #869: parameter "tw" was never referenced
12864 # remark #981: operands are evaluated in unspecified order
12865 # warning #279: controlling expression is constant
12866
12867         { echo "$as_me:12867: checking for $CC warning options..." >&5
12868 echo "$as_me: checking for $CC warning options..." >&6;}
12869         cf_save_CFLAGS="$CFLAGS"
12870         EXTRA_CFLAGS="-Wall"
12871         for cf_opt in \
12872                 wd1419 \
12873                 wd1683 \
12874                 wd1684 \
12875                 wd193 \
12876                 wd593 \
12877                 wd279 \
12878                 wd810 \
12879                 wd869 \
12880                 wd981
12881         do
12882                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12883                 if { (eval echo "$as_me:12883: \"$ac_compile\"") >&5
12884   (eval $ac_compile) 2>&5
12885   ac_status=$?
12886   echo "$as_me:12886: \$? = $ac_status" >&5
12887   (exit $ac_status); }; then
12888                         test -n "$verbose" && echo "$as_me:12888: result: ... -$cf_opt" >&5
12889 echo "${ECHO_T}... -$cf_opt" >&6
12890                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12891                 fi
12892         done
12893         CFLAGS="$cf_save_CFLAGS"
12894
12895 elif test "$GCC" = yes
12896 then
12897         { echo "$as_me:12897: checking for $CC warning options..." >&5
12898 echo "$as_me: checking for $CC warning options..." >&6;}
12899         cf_save_CFLAGS="$CFLAGS"
12900         EXTRA_CFLAGS=
12901         cf_warn_CONST=""
12902         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12903         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12904         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12905         for cf_opt in W Wall \
12906                 Wbad-function-cast \
12907                 Wcast-align \
12908                 Wcast-qual \
12909                 Wdeclaration-after-statement \
12910                 Wextra \
12911                 Winline \
12912                 Wmissing-declarations \
12913                 Wmissing-prototypes \
12914                 Wnested-externs \
12915                 Wpointer-arith \
12916                 Wshadow \
12917                 Wstrict-prototypes \
12918                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12919         do
12920                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12921                 if { (eval echo "$as_me:12921: \"$ac_compile\"") >&5
12922   (eval $ac_compile) 2>&5
12923   ac_status=$?
12924   echo "$as_me:12924: \$? = $ac_status" >&5
12925   (exit $ac_status); }; then
12926                         test -n "$verbose" && echo "$as_me:12926: result: ... -$cf_opt" >&5
12927 echo "${ECHO_T}... -$cf_opt" >&6
12928                         case $cf_opt in #(vi
12929                         Wcast-qual) #(vi
12930                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12931                                 ;;
12932                         Winline) #(vi
12933                                 case $GCC_VERSION in
12934                                 [34].*)
12935                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12936
12937 echo "${as_me:-configure}:12937: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12938
12939                                         continue;;
12940                                 esac
12941                                 ;;
12942                         Wpointer-arith) #(vi
12943                                 case $GCC_VERSION in
12944                                 [12].*)
12945                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12946
12947 echo "${as_me:-configure}:12947: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12948
12949                                         continue;;
12950                                 esac
12951                                 ;;
12952                         esac
12953                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12954                 fi
12955         done
12956         CFLAGS="$cf_save_CFLAGS"
12957 fi
12958 rm -rf conftest*
12959
12960         if test "x$cf_with_cxx" = xyes ; then
12961
12962 INTEL_CPLUSPLUS=no
12963
12964 if test "$GCC" = yes ; then
12965         case $host_os in
12966         linux*|gnu*)
12967                 echo "$as_me:12967: checking if this is really Intel C++ compiler" >&5
12968 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12969                 cf_save_CFLAGS="$CXXFLAGS"
12970                 CXXFLAGS="$CXXFLAGS -no-gcc"
12971                 cat >conftest.$ac_ext <<_ACEOF
12972 #line 12972 "configure"
12973 #include "confdefs.h"
12974
12975 int
12976 main ()
12977 {
12978
12979 #ifdef __INTEL_COMPILER
12980 #else
12981 make an error
12982 #endif
12983
12984   ;
12985   return 0;
12986 }
12987 _ACEOF
12988 rm -f conftest.$ac_objext
12989 if { (eval echo "$as_me:12989: \"$ac_compile\"") >&5
12990   (eval $ac_compile) 2>&5
12991   ac_status=$?
12992   echo "$as_me:12992: \$? = $ac_status" >&5
12993   (exit $ac_status); } &&
12994          { ac_try='test -s conftest.$ac_objext'
12995   { (eval echo "$as_me:12995: \"$ac_try\"") >&5
12996   (eval $ac_try) 2>&5
12997   ac_status=$?
12998   echo "$as_me:12998: \$? = $ac_status" >&5
12999   (exit $ac_status); }; }; then
13000   INTEL_CPLUSPLUS=yes
13001 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13002
13003 else
13004   echo "$as_me: failed program was:" >&5
13005 cat conftest.$ac_ext >&5
13006 fi
13007 rm -f conftest.$ac_objext conftest.$ac_ext
13008                 CXXFLAGS="$cf_save_CFLAGS"
13009                 echo "$as_me:13009: result: $INTEL_CPLUSPLUS" >&5
13010 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13011                 ;;
13012         esac
13013 fi
13014
13015 CLANG_CPLUSPLUS=no
13016
13017 if test "$GCC" = yes ; then
13018         echo "$as_me:13018: checking if this is really Clang C++ compiler" >&5
13019 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13020         cf_save_CFLAGS="$CXXFLAGS"
13021         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13022         cat >conftest.$ac_ext <<_ACEOF
13023 #line 13023 "configure"
13024 #include "confdefs.h"
13025
13026 int
13027 main ()
13028 {
13029
13030 #ifdef __clang__
13031 #else
13032 make an error
13033 #endif
13034
13035   ;
13036   return 0;
13037 }
13038 _ACEOF
13039 rm -f conftest.$ac_objext
13040 if { (eval echo "$as_me:13040: \"$ac_compile\"") >&5
13041   (eval $ac_compile) 2>&5
13042   ac_status=$?
13043   echo "$as_me:13043: \$? = $ac_status" >&5
13044   (exit $ac_status); } &&
13045          { ac_try='test -s conftest.$ac_objext'
13046   { (eval echo "$as_me:13046: \"$ac_try\"") >&5
13047   (eval $ac_try) 2>&5
13048   ac_status=$?
13049   echo "$as_me:13049: \$? = $ac_status" >&5
13050   (exit $ac_status); }; }; then
13051   CLANG_CPLUSPLUS=yes
13052 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13053
13054 else
13055   echo "$as_me: failed program was:" >&5
13056 cat conftest.$ac_ext >&5
13057 fi
13058 rm -f conftest.$ac_objext conftest.$ac_ext
13059         CXXFLAGS="$cf_save_CFLAGS"
13060         echo "$as_me:13060: result: $CLANG_CPLUSPLUS" >&5
13061 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13062 fi
13063
13064 ac_ext=cc
13065 ac_cpp='$CXXCPP $CPPFLAGS'
13066 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13067 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13068 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13069 ac_main_return=return
13070
13071 cat > conftest.$ac_ext <<EOF
13072 #line 13072 "configure"
13073 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13074 EOF
13075
13076 if test "$INTEL_CPLUSPLUS" = yes
13077 then
13078 # The "-wdXXX" options suppress warnings:
13079 # remark #1419: external declaration in primary source file
13080 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13081 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13082 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13083 # remark #193: zero used for undefined preprocessing identifier
13084 # remark #593: variable "curs_sb_left_arrow" was set but never used
13085 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13086 # remark #869: parameter "tw" was never referenced
13087 # remark #981: operands are evaluated in unspecified order
13088 # warning #269: invalid format string conversion
13089
13090         { echo "$as_me:13090: checking for $CC warning options..." >&5
13091 echo "$as_me: checking for $CC warning options..." >&6;}
13092         cf_save_CXXFLAGS="$CXXFLAGS"
13093         EXTRA_CXXFLAGS="-Wall"
13094         for cf_opt in \
13095                 wd1419 \
13096                 wd1682 \
13097                 wd1683 \
13098                 wd1684 \
13099                 wd193 \
13100                 wd279 \
13101                 wd593 \
13102                 wd810 \
13103                 wd869 \
13104                 wd981
13105         do
13106                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13107                 if { (eval echo "$as_me:13107: \"$ac_compile\"") >&5
13108   (eval $ac_compile) 2>&5
13109   ac_status=$?
13110   echo "$as_me:13110: \$? = $ac_status" >&5
13111   (exit $ac_status); }; then
13112                         test -n "$verbose" && echo "$as_me:13112: result: ... -$cf_opt" >&5
13113 echo "${ECHO_T}... -$cf_opt" >&6
13114                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13115                 fi
13116         done
13117         CXXFLAGS="$cf_save_CXXFLAGS"
13118
13119 elif test "$GXX" = yes
13120 then
13121         { echo "$as_me:13121: checking for $CXX warning options..." >&5
13122 echo "$as_me: checking for $CXX warning options..." >&6;}
13123         cf_save_CXXFLAGS="$CXXFLAGS"
13124         EXTRA_CXXFLAGS="-W -Wall"
13125         cf_gxx_extra_warnings=""
13126         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13127         case "$GCC_VERSION" in
13128         [1-2].*)
13129                 ;;
13130         *)
13131                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13132                 ;;
13133         esac
13134         for cf_opt in \
13135                 Wabi \
13136                 fabi-version=0 \
13137                 Wextra \
13138                 Wignored-qualifiers \
13139                 Wlogical-op \
13140                 Woverloaded-virtual \
13141                 Wsign-promo \
13142                 Wsynth \
13143                 Wold-style-cast \
13144                 Wcast-align \
13145                 Wcast-qual \
13146                 Wpointer-arith \
13147                 Wshadow \
13148                 Wundef $cf_gxx_extra_warnings Wno-unused
13149         do
13150                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13151                 if { (eval echo "$as_me:13151: \"$ac_compile\"") >&5
13152   (eval $ac_compile) 2>&5
13153   ac_status=$?
13154   echo "$as_me:13154: \$? = $ac_status" >&5
13155   (exit $ac_status); }; then
13156                         test -n "$verbose" && echo "$as_me:13156: result: ... -$cf_opt" >&5
13157 echo "${ECHO_T}... -$cf_opt" >&6
13158                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13159                 else
13160                         test -n "$verbose" && echo "$as_me:13160: result: ... no -$cf_opt" >&5
13161 echo "${ECHO_T}... no -$cf_opt" >&6
13162                 fi
13163         done
13164         CXXFLAGS="$cf_save_CXXFLAGS"
13165 fi
13166
13167 rm -rf conftest*
13168 ac_ext=c
13169 ac_cpp='$CPP $CPPFLAGS'
13170 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13171 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13172 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13173 ac_main_return=return
13174
13175         fi
13176 fi
13177
13178 if test "$GCC" = yes
13179 then
13180 cat > conftest.i <<EOF
13181 #ifndef GCC_PRINTF
13182 #define GCC_PRINTF 0
13183 #endif
13184 #ifndef GCC_SCANF
13185 #define GCC_SCANF 0
13186 #endif
13187 #ifndef GCC_NORETURN
13188 #define GCC_NORETURN /* nothing */
13189 #endif
13190 #ifndef GCC_UNUSED
13191 #define GCC_UNUSED /* nothing */
13192 #endif
13193 EOF
13194 if test "$GCC" = yes
13195 then
13196         { echo "$as_me:13196: checking for $CC __attribute__ directives..." >&5
13197 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13198 cat > conftest.$ac_ext <<EOF
13199 #line 13199 "${as_me:-configure}"
13200 #include "confdefs.h"
13201 #include "conftest.h"
13202 #include "conftest.i"
13203 #if     GCC_PRINTF
13204 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13205 #else
13206 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13207 #endif
13208 #if     GCC_SCANF
13209 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13210 #else
13211 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13212 #endif
13213 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13214 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13215 extern void foo(void) GCC_NORETURN;
13216 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13217 EOF
13218         cf_printf_attribute=no
13219         cf_scanf_attribute=no
13220         for cf_attribute in scanf printf unused noreturn
13221         do
13222
13223 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13224
13225                 cf_directive="__attribute__(($cf_attribute))"
13226                 echo "checking for $CC $cf_directive" 1>&5
13227
13228                 case $cf_attribute in #(vi
13229                 printf) #(vi
13230                         cf_printf_attribute=yes
13231                         cat >conftest.h <<EOF
13232 #define GCC_$cf_ATTRIBUTE 1
13233 EOF
13234                         ;;
13235                 scanf) #(vi
13236                         cf_scanf_attribute=yes
13237                         cat >conftest.h <<EOF
13238 #define GCC_$cf_ATTRIBUTE 1
13239 EOF
13240                         ;;
13241                 *) #(vi
13242                         cat >conftest.h <<EOF
13243 #define GCC_$cf_ATTRIBUTE $cf_directive
13244 EOF
13245                         ;;
13246                 esac
13247
13248                 if { (eval echo "$as_me:13248: \"$ac_compile\"") >&5
13249   (eval $ac_compile) 2>&5
13250   ac_status=$?
13251   echo "$as_me:13251: \$? = $ac_status" >&5
13252   (exit $ac_status); }; then
13253                         test -n "$verbose" && echo "$as_me:13253: result: ... $cf_attribute" >&5
13254 echo "${ECHO_T}... $cf_attribute" >&6
13255                         cat conftest.h >>confdefs.h
13256                         case $cf_attribute in #(vi
13257                         noreturn) #(vi
13258
13259 cat >>confdefs.h <<EOF
13260 #define GCC_NORETURN $cf_directive
13261 EOF
13262
13263                                 ;;
13264                         printf) #(vi
13265                                 cf_value='/* nothing */'
13266                                 if test "$cf_printf_attribute" != no ; then
13267                                         cf_value='__attribute__((format(printf,fmt,var)))'
13268
13269 cat >>confdefs.h <<\EOF
13270 #define GCC_PRINTF 1
13271 EOF
13272
13273                                 fi
13274
13275 cat >>confdefs.h <<EOF
13276 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13277 EOF
13278
13279                                 ;;
13280                         scanf) #(vi
13281                                 cf_value='/* nothing */'
13282                                 if test "$cf_scanf_attribute" != no ; then
13283                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13284
13285 cat >>confdefs.h <<\EOF
13286 #define GCC_SCANF 1
13287 EOF
13288
13289                                 fi
13290
13291 cat >>confdefs.h <<EOF
13292 #define GCC_SCANFLIKE(fmt,var) $cf_value
13293 EOF
13294
13295                                 ;;
13296                         unused) #(vi
13297
13298 cat >>confdefs.h <<EOF
13299 #define GCC_UNUSED $cf_directive
13300 EOF
13301
13302                                 ;;
13303                         esac
13304                 fi
13305         done
13306 else
13307         fgrep define conftest.i >>confdefs.h
13308 fi
13309 rm -rf conftest*
13310 fi
13311
13312 echo "$as_me:13312: checking if you want to work around bogus compiler/loader warnings" >&5
13313 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13314
13315 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13316 if test "${enable_string_hacks+set}" = set; then
13317   enableval="$enable_string_hacks"
13318   with_string_hacks=$enableval
13319 else
13320   with_string_hacks=no
13321 fi;
13322 echo "$as_me:13322: result: $with_string_hacks" >&5
13323 echo "${ECHO_T}$with_string_hacks" >&6
13324
13325 if test "x$with_string_hacks" = "xyes"; then
13326
13327 cat >>confdefs.h <<\EOF
13328 #define USE_STRING_HACKS 1
13329 EOF
13330
13331         { echo "$as_me:13331: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13332 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13333
13334 for ac_func in strlcat strlcpy snprintf
13335 do
13336 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13337 echo "$as_me:13337: checking for $ac_func" >&5
13338 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13339 if eval "test \"\${$as_ac_var+set}\" = set"; then
13340   echo $ECHO_N "(cached) $ECHO_C" >&6
13341 else
13342   cat >conftest.$ac_ext <<_ACEOF
13343 #line 13343 "configure"
13344 #include "confdefs.h"
13345 /* System header to define __stub macros and hopefully few prototypes,
13346     which can conflict with char $ac_func (); below.  */
13347 #include <assert.h>
13348 /* Override any gcc2 internal prototype to avoid an error.  */
13349 #ifdef __cplusplus
13350 extern "C"
13351 #endif
13352 /* We use char because int might match the return type of a gcc2
13353    builtin and then its argument prototype would still apply.  */
13354 char $ac_func ();
13355 char (*f) ();
13356
13357 int
13358 main ()
13359 {
13360 /* The GNU C library defines this for functions which it implements
13361     to always fail with ENOSYS.  Some functions are actually named
13362     something starting with __ and the normal name is an alias.  */
13363 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13364 choke me
13365 #else
13366 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13367 #endif
13368
13369   ;
13370   return 0;
13371 }
13372 _ACEOF
13373 rm -f conftest.$ac_objext conftest$ac_exeext
13374 if { (eval echo "$as_me:13374: \"$ac_link\"") >&5
13375   (eval $ac_link) 2>&5
13376   ac_status=$?
13377   echo "$as_me:13377: \$? = $ac_status" >&5
13378   (exit $ac_status); } &&
13379          { ac_try='test -s conftest$ac_exeext'
13380   { (eval echo "$as_me:13380: \"$ac_try\"") >&5
13381   (eval $ac_try) 2>&5
13382   ac_status=$?
13383   echo "$as_me:13383: \$? = $ac_status" >&5
13384   (exit $ac_status); }; }; then
13385   eval "$as_ac_var=yes"
13386 else
13387   echo "$as_me: failed program was:" >&5
13388 cat conftest.$ac_ext >&5
13389 eval "$as_ac_var=no"
13390 fi
13391 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13392 fi
13393 echo "$as_me:13393: result: `eval echo '${'$as_ac_var'}'`" >&5
13394 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13395 if test `eval echo '${'$as_ac_var'}'` = yes; then
13396   cat >>confdefs.h <<EOF
13397 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13398 EOF
13399
13400 fi
13401 done
13402
13403 fi
13404
13405 ###     use option --enable-assertions to turn on generation of assertion code
13406 echo "$as_me:13406: checking if you want to enable runtime assertions" >&5
13407 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13408
13409 # Check whether --enable-assertions or --disable-assertions was given.
13410 if test "${enable_assertions+set}" = set; then
13411   enableval="$enable_assertions"
13412   with_assertions=$enableval
13413 else
13414   with_assertions=no
13415 fi;
13416 echo "$as_me:13416: result: $with_assertions" >&5
13417 echo "${ECHO_T}$with_assertions" >&6
13418 if test -n "$GCC"
13419 then
13420         if test "$with_assertions" = no
13421         then
13422                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13423         else
13424
13425         ADAFLAGS="$ADAFLAGS -gnata"
13426
13427         fi
13428 fi
13429
13430 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13431
13432 echo "$as_me:13432: checking if you want to use dmalloc for testing" >&5
13433 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13434
13435 # Check whether --with-dmalloc or --without-dmalloc was given.
13436 if test "${with_dmalloc+set}" = set; then
13437   withval="$with_dmalloc"
13438
13439 cat >>confdefs.h <<EOF
13440 #define USE_DMALLOC 1
13441 EOF
13442
13443         : ${with_cflags:=-g}
13444         : ${with_no_leaks:=yes}
13445          with_dmalloc=yes
13446 else
13447   with_dmalloc=
13448 fi;
13449 echo "$as_me:13449: result: ${with_dmalloc:-no}" >&5
13450 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13451
13452 case .$with_cflags in #(vi
13453 .*-g*)
13454         case .$CFLAGS in #(vi
13455         .*-g*) #(vi
13456                 ;;
13457         *)
13458
13459 cf_fix_cppflags=no
13460 cf_new_cflags=
13461 cf_new_cppflags=
13462 cf_new_extra_cppflags=
13463
13464 for cf_add_cflags in -g
13465 do
13466 case $cf_fix_cppflags in
13467 no)
13468         case $cf_add_cflags in #(vi
13469         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13470                 case $cf_add_cflags in
13471                 -D*)
13472                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13473
13474                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13475                                 && test -z "${cf_tst_cflags}" \
13476                                 && cf_fix_cppflags=yes
13477
13478                         if test $cf_fix_cppflags = yes ; then
13479                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13480                                 continue
13481                         elif test "${cf_tst_cflags}" = "\"'" ; then
13482                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13483                                 continue
13484                         fi
13485                         ;;
13486                 esac
13487                 case "$CPPFLAGS" in
13488                 *$cf_add_cflags) #(vi
13489                         ;;
13490                 *) #(vi
13491                         case $cf_add_cflags in #(vi
13492                         -D*)
13493                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13494
13495 CPPFLAGS=`echo "$CPPFLAGS" | \
13496         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13497                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13498
13499                                 ;;
13500                         esac
13501                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13502                         ;;
13503                 esac
13504                 ;;
13505         *)
13506                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13507                 ;;
13508         esac
13509         ;;
13510 yes)
13511         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13512
13513         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13514
13515         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13516                 && test -z "${cf_tst_cflags}" \
13517                 && cf_fix_cppflags=no
13518         ;;
13519 esac
13520 done
13521
13522 if test -n "$cf_new_cflags" ; then
13523
13524         CFLAGS="$CFLAGS $cf_new_cflags"
13525 fi
13526
13527 if test -n "$cf_new_cppflags" ; then
13528
13529         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13530 fi
13531
13532 if test -n "$cf_new_extra_cppflags" ; then
13533
13534         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13535 fi
13536
13537                 ;;
13538         esac
13539         ;;
13540 esac
13541
13542 if test "$with_dmalloc" = yes ; then
13543         echo "$as_me:13543: checking for dmalloc.h" >&5
13544 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13545 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13546   echo $ECHO_N "(cached) $ECHO_C" >&6
13547 else
13548   cat >conftest.$ac_ext <<_ACEOF
13549 #line 13549 "configure"
13550 #include "confdefs.h"
13551 #include <dmalloc.h>
13552 _ACEOF
13553 if { (eval echo "$as_me:13553: \"$ac_cpp conftest.$ac_ext\"") >&5
13554   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13555   ac_status=$?
13556   egrep -v '^ *\+' conftest.er1 >conftest.err
13557   rm -f conftest.er1
13558   cat conftest.err >&5
13559   echo "$as_me:13559: \$? = $ac_status" >&5
13560   (exit $ac_status); } >/dev/null; then
13561   if test -s conftest.err; then
13562     ac_cpp_err=$ac_c_preproc_warn_flag
13563   else
13564     ac_cpp_err=
13565   fi
13566 else
13567   ac_cpp_err=yes
13568 fi
13569 if test -z "$ac_cpp_err"; then
13570   ac_cv_header_dmalloc_h=yes
13571 else
13572   echo "$as_me: failed program was:" >&5
13573   cat conftest.$ac_ext >&5
13574   ac_cv_header_dmalloc_h=no
13575 fi
13576 rm -f conftest.err conftest.$ac_ext
13577 fi
13578 echo "$as_me:13578: result: $ac_cv_header_dmalloc_h" >&5
13579 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13580 if test $ac_cv_header_dmalloc_h = yes; then
13581
13582 echo "$as_me:13582: checking for dmalloc_debug in -ldmalloc" >&5
13583 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13584 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13585   echo $ECHO_N "(cached) $ECHO_C" >&6
13586 else
13587   ac_check_lib_save_LIBS=$LIBS
13588 LIBS="-ldmalloc  $LIBS"
13589 cat >conftest.$ac_ext <<_ACEOF
13590 #line 13590 "configure"
13591 #include "confdefs.h"
13592
13593 /* Override any gcc2 internal prototype to avoid an error.  */
13594 #ifdef __cplusplus
13595 extern "C"
13596 #endif
13597 /* We use char because int might match the return type of a gcc2
13598    builtin and then its argument prototype would still apply.  */
13599 char dmalloc_debug ();
13600 int
13601 main ()
13602 {
13603 dmalloc_debug ();
13604   ;
13605   return 0;
13606 }
13607 _ACEOF
13608 rm -f conftest.$ac_objext conftest$ac_exeext
13609 if { (eval echo "$as_me:13609: \"$ac_link\"") >&5
13610   (eval $ac_link) 2>&5
13611   ac_status=$?
13612   echo "$as_me:13612: \$? = $ac_status" >&5
13613   (exit $ac_status); } &&
13614          { ac_try='test -s conftest$ac_exeext'
13615   { (eval echo "$as_me:13615: \"$ac_try\"") >&5
13616   (eval $ac_try) 2>&5
13617   ac_status=$?
13618   echo "$as_me:13618: \$? = $ac_status" >&5
13619   (exit $ac_status); }; }; then
13620   ac_cv_lib_dmalloc_dmalloc_debug=yes
13621 else
13622   echo "$as_me: failed program was:" >&5
13623 cat conftest.$ac_ext >&5
13624 ac_cv_lib_dmalloc_dmalloc_debug=no
13625 fi
13626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13627 LIBS=$ac_check_lib_save_LIBS
13628 fi
13629 echo "$as_me:13629: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13630 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13631 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13632   cat >>confdefs.h <<EOF
13633 #define HAVE_LIBDMALLOC 1
13634 EOF
13635
13636   LIBS="-ldmalloc $LIBS"
13637
13638 fi
13639
13640 fi
13641
13642 fi
13643
13644 echo "$as_me:13644: checking if you want to use dbmalloc for testing" >&5
13645 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13646
13647 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13648 if test "${with_dbmalloc+set}" = set; then
13649   withval="$with_dbmalloc"
13650
13651 cat >>confdefs.h <<EOF
13652 #define USE_DBMALLOC 1
13653 EOF
13654
13655         : ${with_cflags:=-g}
13656         : ${with_no_leaks:=yes}
13657          with_dbmalloc=yes
13658 else
13659   with_dbmalloc=
13660 fi;
13661 echo "$as_me:13661: result: ${with_dbmalloc:-no}" >&5
13662 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13663
13664 case .$with_cflags in #(vi
13665 .*-g*)
13666         case .$CFLAGS in #(vi
13667         .*-g*) #(vi
13668                 ;;
13669         *)
13670
13671 cf_fix_cppflags=no
13672 cf_new_cflags=
13673 cf_new_cppflags=
13674 cf_new_extra_cppflags=
13675
13676 for cf_add_cflags in -g
13677 do
13678 case $cf_fix_cppflags in
13679 no)
13680         case $cf_add_cflags in #(vi
13681         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13682                 case $cf_add_cflags in
13683                 -D*)
13684                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13685
13686                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13687                                 && test -z "${cf_tst_cflags}" \
13688                                 && cf_fix_cppflags=yes
13689
13690                         if test $cf_fix_cppflags = yes ; then
13691                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13692                                 continue
13693                         elif test "${cf_tst_cflags}" = "\"'" ; then
13694                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13695                                 continue
13696                         fi
13697                         ;;
13698                 esac
13699                 case "$CPPFLAGS" in
13700                 *$cf_add_cflags) #(vi
13701                         ;;
13702                 *) #(vi
13703                         case $cf_add_cflags in #(vi
13704                         -D*)
13705                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13706
13707 CPPFLAGS=`echo "$CPPFLAGS" | \
13708         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13709                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13710
13711                                 ;;
13712                         esac
13713                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13714                         ;;
13715                 esac
13716                 ;;
13717         *)
13718                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13719                 ;;
13720         esac
13721         ;;
13722 yes)
13723         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13724
13725         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13726
13727         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13728                 && test -z "${cf_tst_cflags}" \
13729                 && cf_fix_cppflags=no
13730         ;;
13731 esac
13732 done
13733
13734 if test -n "$cf_new_cflags" ; then
13735
13736         CFLAGS="$CFLAGS $cf_new_cflags"
13737 fi
13738
13739 if test -n "$cf_new_cppflags" ; then
13740
13741         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13742 fi
13743
13744 if test -n "$cf_new_extra_cppflags" ; then
13745
13746         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13747 fi
13748
13749                 ;;
13750         esac
13751         ;;
13752 esac
13753
13754 if test "$with_dbmalloc" = yes ; then
13755         echo "$as_me:13755: checking for dbmalloc.h" >&5
13756 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13757 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13758   echo $ECHO_N "(cached) $ECHO_C" >&6
13759 else
13760   cat >conftest.$ac_ext <<_ACEOF
13761 #line 13761 "configure"
13762 #include "confdefs.h"
13763 #include <dbmalloc.h>
13764 _ACEOF
13765 if { (eval echo "$as_me:13765: \"$ac_cpp conftest.$ac_ext\"") >&5
13766   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13767   ac_status=$?
13768   egrep -v '^ *\+' conftest.er1 >conftest.err
13769   rm -f conftest.er1
13770   cat conftest.err >&5
13771   echo "$as_me:13771: \$? = $ac_status" >&5
13772   (exit $ac_status); } >/dev/null; then
13773   if test -s conftest.err; then
13774     ac_cpp_err=$ac_c_preproc_warn_flag
13775   else
13776     ac_cpp_err=
13777   fi
13778 else
13779   ac_cpp_err=yes
13780 fi
13781 if test -z "$ac_cpp_err"; then
13782   ac_cv_header_dbmalloc_h=yes
13783 else
13784   echo "$as_me: failed program was:" >&5
13785   cat conftest.$ac_ext >&5
13786   ac_cv_header_dbmalloc_h=no
13787 fi
13788 rm -f conftest.err conftest.$ac_ext
13789 fi
13790 echo "$as_me:13790: result: $ac_cv_header_dbmalloc_h" >&5
13791 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13792 if test $ac_cv_header_dbmalloc_h = yes; then
13793
13794 echo "$as_me:13794: checking for debug_malloc in -ldbmalloc" >&5
13795 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13796 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13797   echo $ECHO_N "(cached) $ECHO_C" >&6
13798 else
13799   ac_check_lib_save_LIBS=$LIBS
13800 LIBS="-ldbmalloc  $LIBS"
13801 cat >conftest.$ac_ext <<_ACEOF
13802 #line 13802 "configure"
13803 #include "confdefs.h"
13804
13805 /* Override any gcc2 internal prototype to avoid an error.  */
13806 #ifdef __cplusplus
13807 extern "C"
13808 #endif
13809 /* We use char because int might match the return type of a gcc2
13810    builtin and then its argument prototype would still apply.  */
13811 char debug_malloc ();
13812 int
13813 main ()
13814 {
13815 debug_malloc ();
13816   ;
13817   return 0;
13818 }
13819 _ACEOF
13820 rm -f conftest.$ac_objext conftest$ac_exeext
13821 if { (eval echo "$as_me:13821: \"$ac_link\"") >&5
13822   (eval $ac_link) 2>&5
13823   ac_status=$?
13824   echo "$as_me:13824: \$? = $ac_status" >&5
13825   (exit $ac_status); } &&
13826          { ac_try='test -s conftest$ac_exeext'
13827   { (eval echo "$as_me:13827: \"$ac_try\"") >&5
13828   (eval $ac_try) 2>&5
13829   ac_status=$?
13830   echo "$as_me:13830: \$? = $ac_status" >&5
13831   (exit $ac_status); }; }; then
13832   ac_cv_lib_dbmalloc_debug_malloc=yes
13833 else
13834   echo "$as_me: failed program was:" >&5
13835 cat conftest.$ac_ext >&5
13836 ac_cv_lib_dbmalloc_debug_malloc=no
13837 fi
13838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13839 LIBS=$ac_check_lib_save_LIBS
13840 fi
13841 echo "$as_me:13841: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13842 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13843 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13844   cat >>confdefs.h <<EOF
13845 #define HAVE_LIBDBMALLOC 1
13846 EOF
13847
13848   LIBS="-ldbmalloc $LIBS"
13849
13850 fi
13851
13852 fi
13853
13854 fi
13855
13856 echo "$as_me:13856: checking if you want to use valgrind for testing" >&5
13857 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13858
13859 # Check whether --with-valgrind or --without-valgrind was given.
13860 if test "${with_valgrind+set}" = set; then
13861   withval="$with_valgrind"
13862
13863 cat >>confdefs.h <<EOF
13864 #define USE_VALGRIND 1
13865 EOF
13866
13867         : ${with_cflags:=-g}
13868         : ${with_no_leaks:=yes}
13869          with_valgrind=yes
13870 else
13871   with_valgrind=
13872 fi;
13873 echo "$as_me:13873: result: ${with_valgrind:-no}" >&5
13874 echo "${ECHO_T}${with_valgrind:-no}" >&6
13875
13876 case .$with_cflags in #(vi
13877 .*-g*)
13878         case .$CFLAGS in #(vi
13879         .*-g*) #(vi
13880                 ;;
13881         *)
13882
13883 cf_fix_cppflags=no
13884 cf_new_cflags=
13885 cf_new_cppflags=
13886 cf_new_extra_cppflags=
13887
13888 for cf_add_cflags in -g
13889 do
13890 case $cf_fix_cppflags in
13891 no)
13892         case $cf_add_cflags in #(vi
13893         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13894                 case $cf_add_cflags in
13895                 -D*)
13896                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13897
13898                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13899                                 && test -z "${cf_tst_cflags}" \
13900                                 && cf_fix_cppflags=yes
13901
13902                         if test $cf_fix_cppflags = yes ; then
13903                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13904                                 continue
13905                         elif test "${cf_tst_cflags}" = "\"'" ; then
13906                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13907                                 continue
13908                         fi
13909                         ;;
13910                 esac
13911                 case "$CPPFLAGS" in
13912                 *$cf_add_cflags) #(vi
13913                         ;;
13914                 *) #(vi
13915                         case $cf_add_cflags in #(vi
13916                         -D*)
13917                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13918
13919 CPPFLAGS=`echo "$CPPFLAGS" | \
13920         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13921                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13922
13923                                 ;;
13924                         esac
13925                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13926                         ;;
13927                 esac
13928                 ;;
13929         *)
13930                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13931                 ;;
13932         esac
13933         ;;
13934 yes)
13935         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13936
13937         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13938
13939         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13940                 && test -z "${cf_tst_cflags}" \
13941                 && cf_fix_cppflags=no
13942         ;;
13943 esac
13944 done
13945
13946 if test -n "$cf_new_cflags" ; then
13947
13948         CFLAGS="$CFLAGS $cf_new_cflags"
13949 fi
13950
13951 if test -n "$cf_new_cppflags" ; then
13952
13953         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13954 fi
13955
13956 if test -n "$cf_new_extra_cppflags" ; then
13957
13958         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13959 fi
13960
13961                 ;;
13962         esac
13963         ;;
13964 esac
13965
13966 echo "$as_me:13966: checking if you want to perform memory-leak testing" >&5
13967 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13968
13969 # Check whether --enable-leaks or --disable-leaks was given.
13970 if test "${enable_leaks+set}" = set; then
13971   enableval="$enable_leaks"
13972   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13973 else
13974   : ${with_no_leaks:=no}
13975 fi;
13976 echo "$as_me:13976: result: $with_no_leaks" >&5
13977 echo "${ECHO_T}$with_no_leaks" >&6
13978
13979 if test "$with_no_leaks" = yes ; then
13980
13981 cat >>confdefs.h <<\EOF
13982 #define NO_LEAKS 1
13983 EOF
13984
13985 cat >>confdefs.h <<\EOF
13986 #define YY_NO_LEAKS 1
13987 EOF
13988
13989 fi
13990
13991 cat >>confdefs.h <<\EOF
13992 #define HAVE_NC_ALLOC_H 1
13993 EOF
13994
13995 ###     use option --enable-expanded to generate certain macros as functions
13996
13997 # Check whether --enable-expanded or --disable-expanded was given.
13998 if test "${enable_expanded+set}" = set; then
13999   enableval="$enable_expanded"
14000   test "x$enableval" = xyes &&
14001 cat >>confdefs.h <<\EOF
14002 #define NCURSES_EXPANDED 1
14003 EOF
14004
14005 fi;
14006
14007 ###     use option --disable-macros to suppress macros in favor of functions
14008
14009 # Check whether --enable-macros or --disable-macros was given.
14010 if test "${enable_macros+set}" = set; then
14011   enableval="$enable_macros"
14012   test "$enableval" = no &&
14013 cat >>confdefs.h <<\EOF
14014 #define NCURSES_NOMACROS 1
14015 EOF
14016
14017 fi;
14018
14019 # Normally we only add trace() to the debug-library.  Allow this to be
14020 # extended to all models of the ncurses library:
14021 cf_all_traces=no
14022 case "$CFLAGS $CPPFLAGS" in
14023 *-DTRACE*)
14024         cf_all_traces=yes
14025         ;;
14026 esac
14027
14028 echo "$as_me:14028: checking whether to add trace feature to all models" >&5
14029 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14030
14031 # Check whether --with-trace or --without-trace was given.
14032 if test "${with_trace+set}" = set; then
14033   withval="$with_trace"
14034   cf_with_trace=$withval
14035 else
14036   cf_with_trace=$cf_all_traces
14037 fi;
14038 echo "$as_me:14038: result: $cf_with_trace" >&5
14039 echo "${ECHO_T}$cf_with_trace" >&6
14040
14041 if test "x$cf_with_trace" = xyes ; then
14042         LIB_TRACING=all
14043         ADA_TRACE=TRUE
14044
14045 cf_fix_cppflags=no
14046 cf_new_cflags=
14047 cf_new_cppflags=
14048 cf_new_extra_cppflags=
14049
14050 for cf_add_cflags in -DTRACE
14051 do
14052 case $cf_fix_cppflags in
14053 no)
14054         case $cf_add_cflags in #(vi
14055         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14056                 case $cf_add_cflags in
14057                 -D*)
14058                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14059
14060                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14061                                 && test -z "${cf_tst_cflags}" \
14062                                 && cf_fix_cppflags=yes
14063
14064                         if test $cf_fix_cppflags = yes ; then
14065                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14066                                 continue
14067                         elif test "${cf_tst_cflags}" = "\"'" ; then
14068                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14069                                 continue
14070                         fi
14071                         ;;
14072                 esac
14073                 case "$CPPFLAGS" in
14074                 *$cf_add_cflags) #(vi
14075                         ;;
14076                 *) #(vi
14077                         case $cf_add_cflags in #(vi
14078                         -D*)
14079                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14080
14081 CPPFLAGS=`echo "$CPPFLAGS" | \
14082         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14083                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14084
14085                                 ;;
14086                         esac
14087                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14088                         ;;
14089                 esac
14090                 ;;
14091         *)
14092                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14093                 ;;
14094         esac
14095         ;;
14096 yes)
14097         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14098
14099         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14100
14101         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14102                 && test -z "${cf_tst_cflags}" \
14103                 && cf_fix_cppflags=no
14104         ;;
14105 esac
14106 done
14107
14108 if test -n "$cf_new_cflags" ; then
14109
14110         CFLAGS="$CFLAGS $cf_new_cflags"
14111 fi
14112
14113 if test -n "$cf_new_cppflags" ; then
14114
14115         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14116 fi
14117
14118 if test -n "$cf_new_extra_cppflags" ; then
14119
14120         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14121 fi
14122
14123 else
14124         LIB_TRACING=DEBUG
14125         ADA_TRACE=FALSE
14126 fi
14127
14128 echo "$as_me:14128: checking if we want to use GNAT projects" >&5
14129 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14130
14131 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14132 if test "${enable_gnat_projects+set}" = set; then
14133   enableval="$enable_gnat_projects"
14134   test "$enableval" != no && enableval=yes
14135   if test "$enableval" != "yes" ; then
14136     enable_gnat_projects=no
14137   else
14138     enable_gnat_projects=yes
14139   fi
14140 else
14141   enableval=yes
14142   enable_gnat_projects=yes
14143
14144 fi;
14145 echo "$as_me:14145: result: $enable_gnat_projects" >&5
14146 echo "${ECHO_T}$enable_gnat_projects" >&6
14147
14148 ###     Checks for libraries.
14149 case $cf_cv_system_name in #(vi
14150 *mingw32*|*mingw64*) #(vi
14151         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14152         LIBS=" -lpsapi $LIBS"
14153         ;;
14154 *)
14155 echo "$as_me:14155: checking for gettimeofday" >&5
14156 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14157 if test "${ac_cv_func_gettimeofday+set}" = set; then
14158   echo $ECHO_N "(cached) $ECHO_C" >&6
14159 else
14160   cat >conftest.$ac_ext <<_ACEOF
14161 #line 14161 "configure"
14162 #include "confdefs.h"
14163 /* System header to define __stub macros and hopefully few prototypes,
14164     which can conflict with char gettimeofday (); below.  */
14165 #include <assert.h>
14166 /* Override any gcc2 internal prototype to avoid an error.  */
14167 #ifdef __cplusplus
14168 extern "C"
14169 #endif
14170 /* We use char because int might match the return type of a gcc2
14171    builtin and then its argument prototype would still apply.  */
14172 char gettimeofday ();
14173 char (*f) ();
14174
14175 int
14176 main ()
14177 {
14178 /* The GNU C library defines this for functions which it implements
14179     to always fail with ENOSYS.  Some functions are actually named
14180     something starting with __ and the normal name is an alias.  */
14181 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14182 choke me
14183 #else
14184 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14185 #endif
14186
14187   ;
14188   return 0;
14189 }
14190 _ACEOF
14191 rm -f conftest.$ac_objext conftest$ac_exeext
14192 if { (eval echo "$as_me:14192: \"$ac_link\"") >&5
14193   (eval $ac_link) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit $ac_status); } &&
14197          { ac_try='test -s conftest$ac_exeext'
14198   { (eval echo "$as_me:14198: \"$ac_try\"") >&5
14199   (eval $ac_try) 2>&5
14200   ac_status=$?
14201   echo "$as_me:14201: \$? = $ac_status" >&5
14202   (exit $ac_status); }; }; then
14203   ac_cv_func_gettimeofday=yes
14204 else
14205   echo "$as_me: failed program was:" >&5
14206 cat conftest.$ac_ext >&5
14207 ac_cv_func_gettimeofday=no
14208 fi
14209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14210 fi
14211 echo "$as_me:14211: result: $ac_cv_func_gettimeofday" >&5
14212 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14213 if test $ac_cv_func_gettimeofday = yes; then
14214
14215 cat >>confdefs.h <<\EOF
14216 #define HAVE_GETTIMEOFDAY 1
14217 EOF
14218
14219 else
14220
14221 echo "$as_me:14221: checking for gettimeofday in -lbsd" >&5
14222 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14223 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14224   echo $ECHO_N "(cached) $ECHO_C" >&6
14225 else
14226   ac_check_lib_save_LIBS=$LIBS
14227 LIBS="-lbsd  $LIBS"
14228 cat >conftest.$ac_ext <<_ACEOF
14229 #line 14229 "configure"
14230 #include "confdefs.h"
14231
14232 /* Override any gcc2 internal prototype to avoid an error.  */
14233 #ifdef __cplusplus
14234 extern "C"
14235 #endif
14236 /* We use char because int might match the return type of a gcc2
14237    builtin and then its argument prototype would still apply.  */
14238 char gettimeofday ();
14239 int
14240 main ()
14241 {
14242 gettimeofday ();
14243   ;
14244   return 0;
14245 }
14246 _ACEOF
14247 rm -f conftest.$ac_objext conftest$ac_exeext
14248 if { (eval echo "$as_me:14248: \"$ac_link\"") >&5
14249   (eval $ac_link) 2>&5
14250   ac_status=$?
14251   echo "$as_me:14251: \$? = $ac_status" >&5
14252   (exit $ac_status); } &&
14253          { ac_try='test -s conftest$ac_exeext'
14254   { (eval echo "$as_me:14254: \"$ac_try\"") >&5
14255   (eval $ac_try) 2>&5
14256   ac_status=$?
14257   echo "$as_me:14257: \$? = $ac_status" >&5
14258   (exit $ac_status); }; }; then
14259   ac_cv_lib_bsd_gettimeofday=yes
14260 else
14261   echo "$as_me: failed program was:" >&5
14262 cat conftest.$ac_ext >&5
14263 ac_cv_lib_bsd_gettimeofday=no
14264 fi
14265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14266 LIBS=$ac_check_lib_save_LIBS
14267 fi
14268 echo "$as_me:14268: result: $ac_cv_lib_bsd_gettimeofday" >&5
14269 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14270 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14271
14272 cat >>confdefs.h <<\EOF
14273 #define HAVE_GETTIMEOFDAY 1
14274 EOF
14275
14276 cf_add_libs="-lbsd"
14277 # Filter out duplicates - this happens with badly-designed ".pc" files...
14278 for cf_add_1lib in $LIBS
14279 do
14280         for cf_add_2lib in $cf_add_libs
14281         do
14282                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14283                 then
14284                         cf_add_1lib=
14285                         break
14286                 fi
14287         done
14288         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14289 done
14290 LIBS="$cf_add_libs"
14291
14292 fi
14293
14294 fi
14295         ;;
14296 esac
14297
14298 echo "$as_me:14298: checking if -lm needed for math functions" >&5
14299 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14300 if test "${cf_cv_need_libm+set}" = set; then
14301   echo $ECHO_N "(cached) $ECHO_C" >&6
14302 else
14303
14304         cat >conftest.$ac_ext <<_ACEOF
14305 #line 14305 "configure"
14306 #include "confdefs.h"
14307
14308         #include <stdio.h>
14309         #include <math.h>
14310
14311 int
14312 main ()
14313 {
14314 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14315   ;
14316   return 0;
14317 }
14318 _ACEOF
14319 rm -f conftest.$ac_objext conftest$ac_exeext
14320 if { (eval echo "$as_me:14320: \"$ac_link\"") >&5
14321   (eval $ac_link) 2>&5
14322   ac_status=$?
14323   echo "$as_me:14323: \$? = $ac_status" >&5
14324   (exit $ac_status); } &&
14325          { ac_try='test -s conftest$ac_exeext'
14326   { (eval echo "$as_me:14326: \"$ac_try\"") >&5
14327   (eval $ac_try) 2>&5
14328   ac_status=$?
14329   echo "$as_me:14329: \$? = $ac_status" >&5
14330   (exit $ac_status); }; }; then
14331   cf_cv_need_libm=no
14332 else
14333   echo "$as_me: failed program was:" >&5
14334 cat conftest.$ac_ext >&5
14335 cf_cv_need_libm=yes
14336 fi
14337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14338 fi
14339 echo "$as_me:14339: result: $cf_cv_need_libm" >&5
14340 echo "${ECHO_T}$cf_cv_need_libm" >&6
14341 if test "$cf_cv_need_libm" = yes
14342 then
14343 MATH_LIB=-lm
14344 fi
14345
14346 ###     Checks for header files.
14347 echo "$as_me:14347: checking for ANSI C header files" >&5
14348 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14349 if test "${ac_cv_header_stdc+set}" = set; then
14350   echo $ECHO_N "(cached) $ECHO_C" >&6
14351 else
14352   cat >conftest.$ac_ext <<_ACEOF
14353 #line 14353 "configure"
14354 #include "confdefs.h"
14355 #include <stdlib.h>
14356 #include <stdarg.h>
14357 #include <string.h>
14358 #include <float.h>
14359
14360 _ACEOF
14361 if { (eval echo "$as_me:14361: \"$ac_cpp conftest.$ac_ext\"") >&5
14362   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14363   ac_status=$?
14364   egrep -v '^ *\+' conftest.er1 >conftest.err
14365   rm -f conftest.er1
14366   cat conftest.err >&5
14367   echo "$as_me:14367: \$? = $ac_status" >&5
14368   (exit $ac_status); } >/dev/null; then
14369   if test -s conftest.err; then
14370     ac_cpp_err=$ac_c_preproc_warn_flag
14371   else
14372     ac_cpp_err=
14373   fi
14374 else
14375   ac_cpp_err=yes
14376 fi
14377 if test -z "$ac_cpp_err"; then
14378   ac_cv_header_stdc=yes
14379 else
14380   echo "$as_me: failed program was:" >&5
14381   cat conftest.$ac_ext >&5
14382   ac_cv_header_stdc=no
14383 fi
14384 rm -f conftest.err conftest.$ac_ext
14385
14386 if test $ac_cv_header_stdc = yes; then
14387   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14388   cat >conftest.$ac_ext <<_ACEOF
14389 #line 14389 "configure"
14390 #include "confdefs.h"
14391 #include <string.h>
14392
14393 _ACEOF
14394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14395   egrep "memchr" >/dev/null 2>&1; then
14396   :
14397 else
14398   ac_cv_header_stdc=no
14399 fi
14400 rm -rf conftest*
14401
14402 fi
14403
14404 if test $ac_cv_header_stdc = yes; then
14405   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14406   cat >conftest.$ac_ext <<_ACEOF
14407 #line 14407 "configure"
14408 #include "confdefs.h"
14409 #include <stdlib.h>
14410
14411 _ACEOF
14412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14413   egrep "free" >/dev/null 2>&1; then
14414   :
14415 else
14416   ac_cv_header_stdc=no
14417 fi
14418 rm -rf conftest*
14419
14420 fi
14421
14422 if test $ac_cv_header_stdc = yes; then
14423   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14424   if test "$cross_compiling" = yes; then
14425   :
14426 else
14427   cat >conftest.$ac_ext <<_ACEOF
14428 #line 14428 "configure"
14429 #include "confdefs.h"
14430 #include <ctype.h>
14431 #if ((' ' & 0x0FF) == 0x020)
14432 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14433 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14434 #else
14435 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14436                      || ('j' <= (c) && (c) <= 'r') \
14437                      || ('s' <= (c) && (c) <= 'z'))
14438 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14439 #endif
14440
14441 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14442 int
14443 main ()
14444 {
14445   int i;
14446   for (i = 0; i < 256; i++)
14447     if (XOR (islower (i), ISLOWER (i))
14448         || toupper (i) != TOUPPER (i))
14449       $ac_main_return(2);
14450   $ac_main_return (0);
14451 }
14452 _ACEOF
14453 rm -f conftest$ac_exeext
14454 if { (eval echo "$as_me:14454: \"$ac_link\"") >&5
14455   (eval $ac_link) 2>&5
14456   ac_status=$?
14457   echo "$as_me:14457: \$? = $ac_status" >&5
14458   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14459   { (eval echo "$as_me:14459: \"$ac_try\"") >&5
14460   (eval $ac_try) 2>&5
14461   ac_status=$?
14462   echo "$as_me:14462: \$? = $ac_status" >&5
14463   (exit $ac_status); }; }; then
14464   :
14465 else
14466   echo "$as_me: program exited with status $ac_status" >&5
14467 echo "$as_me: failed program was:" >&5
14468 cat conftest.$ac_ext >&5
14469 ac_cv_header_stdc=no
14470 fi
14471 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14472 fi
14473 fi
14474 fi
14475 echo "$as_me:14475: result: $ac_cv_header_stdc" >&5
14476 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14477 if test $ac_cv_header_stdc = yes; then
14478
14479 cat >>confdefs.h <<\EOF
14480 #define STDC_HEADERS 1
14481 EOF
14482
14483 fi
14484
14485 ac_header_dirent=no
14486 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14487   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14488 echo "$as_me:14488: checking for $ac_hdr that defines DIR" >&5
14489 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14490 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14491   echo $ECHO_N "(cached) $ECHO_C" >&6
14492 else
14493   cat >conftest.$ac_ext <<_ACEOF
14494 #line 14494 "configure"
14495 #include "confdefs.h"
14496 #include <sys/types.h>
14497 #include <$ac_hdr>
14498
14499 int
14500 main ()
14501 {
14502 if ((DIR *) 0)
14503 return 0;
14504   ;
14505   return 0;
14506 }
14507 _ACEOF
14508 rm -f conftest.$ac_objext
14509 if { (eval echo "$as_me:14509: \"$ac_compile\"") >&5
14510   (eval $ac_compile) 2>&5
14511   ac_status=$?
14512   echo "$as_me:14512: \$? = $ac_status" >&5
14513   (exit $ac_status); } &&
14514          { ac_try='test -s conftest.$ac_objext'
14515   { (eval echo "$as_me:14515: \"$ac_try\"") >&5
14516   (eval $ac_try) 2>&5
14517   ac_status=$?
14518   echo "$as_me:14518: \$? = $ac_status" >&5
14519   (exit $ac_status); }; }; then
14520   eval "$as_ac_Header=yes"
14521 else
14522   echo "$as_me: failed program was:" >&5
14523 cat conftest.$ac_ext >&5
14524 eval "$as_ac_Header=no"
14525 fi
14526 rm -f conftest.$ac_objext conftest.$ac_ext
14527 fi
14528 echo "$as_me:14528: result: `eval echo '${'$as_ac_Header'}'`" >&5
14529 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14530 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14531   cat >>confdefs.h <<EOF
14532 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14533 EOF
14534
14535 ac_header_dirent=$ac_hdr; break
14536 fi
14537
14538 done
14539 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14540 if test $ac_header_dirent = dirent.h; then
14541   echo "$as_me:14541: checking for opendir in -ldir" >&5
14542 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14543 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14544   echo $ECHO_N "(cached) $ECHO_C" >&6
14545 else
14546   ac_check_lib_save_LIBS=$LIBS
14547 LIBS="-ldir  $LIBS"
14548 cat >conftest.$ac_ext <<_ACEOF
14549 #line 14549 "configure"
14550 #include "confdefs.h"
14551
14552 /* Override any gcc2 internal prototype to avoid an error.  */
14553 #ifdef __cplusplus
14554 extern "C"
14555 #endif
14556 /* We use char because int might match the return type of a gcc2
14557    builtin and then its argument prototype would still apply.  */
14558 char opendir ();
14559 int
14560 main ()
14561 {
14562 opendir ();
14563   ;
14564   return 0;
14565 }
14566 _ACEOF
14567 rm -f conftest.$ac_objext conftest$ac_exeext
14568 if { (eval echo "$as_me:14568: \"$ac_link\"") >&5
14569   (eval $ac_link) 2>&5
14570   ac_status=$?
14571   echo "$as_me:14571: \$? = $ac_status" >&5
14572   (exit $ac_status); } &&
14573          { ac_try='test -s conftest$ac_exeext'
14574   { (eval echo "$as_me:14574: \"$ac_try\"") >&5
14575   (eval $ac_try) 2>&5
14576   ac_status=$?
14577   echo "$as_me:14577: \$? = $ac_status" >&5
14578   (exit $ac_status); }; }; then
14579   ac_cv_lib_dir_opendir=yes
14580 else
14581   echo "$as_me: failed program was:" >&5
14582 cat conftest.$ac_ext >&5
14583 ac_cv_lib_dir_opendir=no
14584 fi
14585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14586 LIBS=$ac_check_lib_save_LIBS
14587 fi
14588 echo "$as_me:14588: result: $ac_cv_lib_dir_opendir" >&5
14589 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14590 if test $ac_cv_lib_dir_opendir = yes; then
14591   LIBS="$LIBS -ldir"
14592 fi
14593
14594 else
14595   echo "$as_me:14595: checking for opendir in -lx" >&5
14596 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14597 if test "${ac_cv_lib_x_opendir+set}" = set; then
14598   echo $ECHO_N "(cached) $ECHO_C" >&6
14599 else
14600   ac_check_lib_save_LIBS=$LIBS
14601 LIBS="-lx  $LIBS"
14602 cat >conftest.$ac_ext <<_ACEOF
14603 #line 14603 "configure"
14604 #include "confdefs.h"
14605
14606 /* Override any gcc2 internal prototype to avoid an error.  */
14607 #ifdef __cplusplus
14608 extern "C"
14609 #endif
14610 /* We use char because int might match the return type of a gcc2
14611    builtin and then its argument prototype would still apply.  */
14612 char opendir ();
14613 int
14614 main ()
14615 {
14616 opendir ();
14617   ;
14618   return 0;
14619 }
14620 _ACEOF
14621 rm -f conftest.$ac_objext conftest$ac_exeext
14622 if { (eval echo "$as_me:14622: \"$ac_link\"") >&5
14623   (eval $ac_link) 2>&5
14624   ac_status=$?
14625   echo "$as_me:14625: \$? = $ac_status" >&5
14626   (exit $ac_status); } &&
14627          { ac_try='test -s conftest$ac_exeext'
14628   { (eval echo "$as_me:14628: \"$ac_try\"") >&5
14629   (eval $ac_try) 2>&5
14630   ac_status=$?
14631   echo "$as_me:14631: \$? = $ac_status" >&5
14632   (exit $ac_status); }; }; then
14633   ac_cv_lib_x_opendir=yes
14634 else
14635   echo "$as_me: failed program was:" >&5
14636 cat conftest.$ac_ext >&5
14637 ac_cv_lib_x_opendir=no
14638 fi
14639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14640 LIBS=$ac_check_lib_save_LIBS
14641 fi
14642 echo "$as_me:14642: result: $ac_cv_lib_x_opendir" >&5
14643 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14644 if test $ac_cv_lib_x_opendir = yes; then
14645   LIBS="$LIBS -lx"
14646 fi
14647
14648 fi
14649
14650 echo "$as_me:14650: checking whether time.h and sys/time.h may both be included" >&5
14651 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14652 if test "${ac_cv_header_time+set}" = set; then
14653   echo $ECHO_N "(cached) $ECHO_C" >&6
14654 else
14655   cat >conftest.$ac_ext <<_ACEOF
14656 #line 14656 "configure"
14657 #include "confdefs.h"
14658 #include <sys/types.h>
14659 #include <sys/time.h>
14660 #include <time.h>
14661
14662 int
14663 main ()
14664 {
14665 if ((struct tm *) 0)
14666 return 0;
14667   ;
14668   return 0;
14669 }
14670 _ACEOF
14671 rm -f conftest.$ac_objext
14672 if { (eval echo "$as_me:14672: \"$ac_compile\"") >&5
14673   (eval $ac_compile) 2>&5
14674   ac_status=$?
14675   echo "$as_me:14675: \$? = $ac_status" >&5
14676   (exit $ac_status); } &&
14677          { ac_try='test -s conftest.$ac_objext'
14678   { (eval echo "$as_me:14678: \"$ac_try\"") >&5
14679   (eval $ac_try) 2>&5
14680   ac_status=$?
14681   echo "$as_me:14681: \$? = $ac_status" >&5
14682   (exit $ac_status); }; }; then
14683   ac_cv_header_time=yes
14684 else
14685   echo "$as_me: failed program was:" >&5
14686 cat conftest.$ac_ext >&5
14687 ac_cv_header_time=no
14688 fi
14689 rm -f conftest.$ac_objext conftest.$ac_ext
14690 fi
14691 echo "$as_me:14691: result: $ac_cv_header_time" >&5
14692 echo "${ECHO_T}$ac_cv_header_time" >&6
14693 if test $ac_cv_header_time = yes; then
14694
14695 cat >>confdefs.h <<\EOF
14696 #define TIME_WITH_SYS_TIME 1
14697 EOF
14698
14699 fi
14700
14701 cf_regex_func=no
14702
14703 cf_regex_libs="regex re"
14704 case $host_os in #(vi
14705 mingw*)
14706         cf_regex_libs="gnurx $cf_regex_libs"
14707         ;;
14708 esac
14709
14710 echo "$as_me:14710: checking for regcomp" >&5
14711 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14712 if test "${ac_cv_func_regcomp+set}" = set; then
14713   echo $ECHO_N "(cached) $ECHO_C" >&6
14714 else
14715   cat >conftest.$ac_ext <<_ACEOF
14716 #line 14716 "configure"
14717 #include "confdefs.h"
14718 /* System header to define __stub macros and hopefully few prototypes,
14719     which can conflict with char regcomp (); below.  */
14720 #include <assert.h>
14721 /* Override any gcc2 internal prototype to avoid an error.  */
14722 #ifdef __cplusplus
14723 extern "C"
14724 #endif
14725 /* We use char because int might match the return type of a gcc2
14726    builtin and then its argument prototype would still apply.  */
14727 char regcomp ();
14728 char (*f) ();
14729
14730 int
14731 main ()
14732 {
14733 /* The GNU C library defines this for functions which it implements
14734     to always fail with ENOSYS.  Some functions are actually named
14735     something starting with __ and the normal name is an alias.  */
14736 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14737 choke me
14738 #else
14739 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14740 #endif
14741
14742   ;
14743   return 0;
14744 }
14745 _ACEOF
14746 rm -f conftest.$ac_objext conftest$ac_exeext
14747 if { (eval echo "$as_me:14747: \"$ac_link\"") >&5
14748   (eval $ac_link) 2>&5
14749   ac_status=$?
14750   echo "$as_me:14750: \$? = $ac_status" >&5
14751   (exit $ac_status); } &&
14752          { ac_try='test -s conftest$ac_exeext'
14753   { (eval echo "$as_me:14753: \"$ac_try\"") >&5
14754   (eval $ac_try) 2>&5
14755   ac_status=$?
14756   echo "$as_me:14756: \$? = $ac_status" >&5
14757   (exit $ac_status); }; }; then
14758   ac_cv_func_regcomp=yes
14759 else
14760   echo "$as_me: failed program was:" >&5
14761 cat conftest.$ac_ext >&5
14762 ac_cv_func_regcomp=no
14763 fi
14764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14765 fi
14766 echo "$as_me:14766: result: $ac_cv_func_regcomp" >&5
14767 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14768 if test $ac_cv_func_regcomp = yes; then
14769   cf_regex_func=regcomp
14770 else
14771
14772         for cf_regex_lib in $cf_regex_libs
14773         do
14774                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14775 echo "$as_me:14775: checking for regcomp in -l$cf_regex_lib" >&5
14776 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14777 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14778   echo $ECHO_N "(cached) $ECHO_C" >&6
14779 else
14780   ac_check_lib_save_LIBS=$LIBS
14781 LIBS="-l$cf_regex_lib  $LIBS"
14782 cat >conftest.$ac_ext <<_ACEOF
14783 #line 14783 "configure"
14784 #include "confdefs.h"
14785
14786 /* Override any gcc2 internal prototype to avoid an error.  */
14787 #ifdef __cplusplus
14788 extern "C"
14789 #endif
14790 /* We use char because int might match the return type of a gcc2
14791    builtin and then its argument prototype would still apply.  */
14792 char regcomp ();
14793 int
14794 main ()
14795 {
14796 regcomp ();
14797   ;
14798   return 0;
14799 }
14800 _ACEOF
14801 rm -f conftest.$ac_objext conftest$ac_exeext
14802 if { (eval echo "$as_me:14802: \"$ac_link\"") >&5
14803   (eval $ac_link) 2>&5
14804   ac_status=$?
14805   echo "$as_me:14805: \$? = $ac_status" >&5
14806   (exit $ac_status); } &&
14807          { ac_try='test -s conftest$ac_exeext'
14808   { (eval echo "$as_me:14808: \"$ac_try\"") >&5
14809   (eval $ac_try) 2>&5
14810   ac_status=$?
14811   echo "$as_me:14811: \$? = $ac_status" >&5
14812   (exit $ac_status); }; }; then
14813   eval "$as_ac_Lib=yes"
14814 else
14815   echo "$as_me: failed program was:" >&5
14816 cat conftest.$ac_ext >&5
14817 eval "$as_ac_Lib=no"
14818 fi
14819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14820 LIBS=$ac_check_lib_save_LIBS
14821 fi
14822 echo "$as_me:14822: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14823 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14824 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14825
14826 cf_add_libs="-l$cf_regex_lib"
14827 # Filter out duplicates - this happens with badly-designed ".pc" files...
14828 for cf_add_1lib in $LIBS
14829 do
14830         for cf_add_2lib in $cf_add_libs
14831         do
14832                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14833                 then
14834                         cf_add_1lib=
14835                         break
14836                 fi
14837         done
14838         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14839 done
14840 LIBS="$cf_add_libs"
14841
14842                                 cf_regex_func=regcomp
14843                                 break
14844 fi
14845
14846         done
14847
14848 fi
14849
14850 if test "$cf_regex_func" = no ; then
14851         echo "$as_me:14851: checking for compile" >&5
14852 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14853 if test "${ac_cv_func_compile+set}" = set; then
14854   echo $ECHO_N "(cached) $ECHO_C" >&6
14855 else
14856   cat >conftest.$ac_ext <<_ACEOF
14857 #line 14857 "configure"
14858 #include "confdefs.h"
14859 /* System header to define __stub macros and hopefully few prototypes,
14860     which can conflict with char compile (); below.  */
14861 #include <assert.h>
14862 /* Override any gcc2 internal prototype to avoid an error.  */
14863 #ifdef __cplusplus
14864 extern "C"
14865 #endif
14866 /* We use char because int might match the return type of a gcc2
14867    builtin and then its argument prototype would still apply.  */
14868 char compile ();
14869 char (*f) ();
14870
14871 int
14872 main ()
14873 {
14874 /* The GNU C library defines this for functions which it implements
14875     to always fail with ENOSYS.  Some functions are actually named
14876     something starting with __ and the normal name is an alias.  */
14877 #if defined (__stub_compile) || defined (__stub___compile)
14878 choke me
14879 #else
14880 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14881 #endif
14882
14883   ;
14884   return 0;
14885 }
14886 _ACEOF
14887 rm -f conftest.$ac_objext conftest$ac_exeext
14888 if { (eval echo "$as_me:14888: \"$ac_link\"") >&5
14889   (eval $ac_link) 2>&5
14890   ac_status=$?
14891   echo "$as_me:14891: \$? = $ac_status" >&5
14892   (exit $ac_status); } &&
14893          { ac_try='test -s conftest$ac_exeext'
14894   { (eval echo "$as_me:14894: \"$ac_try\"") >&5
14895   (eval $ac_try) 2>&5
14896   ac_status=$?
14897   echo "$as_me:14897: \$? = $ac_status" >&5
14898   (exit $ac_status); }; }; then
14899   ac_cv_func_compile=yes
14900 else
14901   echo "$as_me: failed program was:" >&5
14902 cat conftest.$ac_ext >&5
14903 ac_cv_func_compile=no
14904 fi
14905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14906 fi
14907 echo "$as_me:14907: result: $ac_cv_func_compile" >&5
14908 echo "${ECHO_T}$ac_cv_func_compile" >&6
14909 if test $ac_cv_func_compile = yes; then
14910   cf_regex_func=compile
14911 else
14912
14913                 echo "$as_me:14913: checking for compile in -lgen" >&5
14914 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14915 if test "${ac_cv_lib_gen_compile+set}" = set; then
14916   echo $ECHO_N "(cached) $ECHO_C" >&6
14917 else
14918   ac_check_lib_save_LIBS=$LIBS
14919 LIBS="-lgen  $LIBS"
14920 cat >conftest.$ac_ext <<_ACEOF
14921 #line 14921 "configure"
14922 #include "confdefs.h"
14923
14924 /* Override any gcc2 internal prototype to avoid an error.  */
14925 #ifdef __cplusplus
14926 extern "C"
14927 #endif
14928 /* We use char because int might match the return type of a gcc2
14929    builtin and then its argument prototype would still apply.  */
14930 char compile ();
14931 int
14932 main ()
14933 {
14934 compile ();
14935   ;
14936   return 0;
14937 }
14938 _ACEOF
14939 rm -f conftest.$ac_objext conftest$ac_exeext
14940 if { (eval echo "$as_me:14940: \"$ac_link\"") >&5
14941   (eval $ac_link) 2>&5
14942   ac_status=$?
14943   echo "$as_me:14943: \$? = $ac_status" >&5
14944   (exit $ac_status); } &&
14945          { ac_try='test -s conftest$ac_exeext'
14946   { (eval echo "$as_me:14946: \"$ac_try\"") >&5
14947   (eval $ac_try) 2>&5
14948   ac_status=$?
14949   echo "$as_me:14949: \$? = $ac_status" >&5
14950   (exit $ac_status); }; }; then
14951   ac_cv_lib_gen_compile=yes
14952 else
14953   echo "$as_me: failed program was:" >&5
14954 cat conftest.$ac_ext >&5
14955 ac_cv_lib_gen_compile=no
14956 fi
14957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14958 LIBS=$ac_check_lib_save_LIBS
14959 fi
14960 echo "$as_me:14960: result: $ac_cv_lib_gen_compile" >&5
14961 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14962 if test $ac_cv_lib_gen_compile = yes; then
14963
14964 cf_add_libs="-lgen"
14965 # Filter out duplicates - this happens with badly-designed ".pc" files...
14966 for cf_add_1lib in $LIBS
14967 do
14968         for cf_add_2lib in $cf_add_libs
14969         do
14970                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14971                 then
14972                         cf_add_1lib=
14973                         break
14974                 fi
14975         done
14976         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14977 done
14978 LIBS="$cf_add_libs"
14979
14980                                 cf_regex_func=compile
14981 fi
14982
14983 fi
14984
14985 fi
14986
14987 if test "$cf_regex_func" = no ; then
14988         { echo "$as_me:14988: WARNING: cannot find regular expression library" >&5
14989 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14990 fi
14991
14992 echo "$as_me:14992: checking for regular-expression headers" >&5
14993 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14994 if test "${cf_cv_regex_hdrs+set}" = set; then
14995   echo $ECHO_N "(cached) $ECHO_C" >&6
14996 else
14997
14998 cf_cv_regex_hdrs=no
14999 case $cf_regex_func in #(vi
15000 compile) #(vi
15001         for cf_regex_hdr in regexp.h regexpr.h
15002         do
15003                 cat >conftest.$ac_ext <<_ACEOF
15004 #line 15004 "configure"
15005 #include "confdefs.h"
15006 #include <$cf_regex_hdr>
15007 int
15008 main ()
15009 {
15010
15011                         char *p = compile("", "", "", 0);
15012                         int x = step("", "");
15013
15014   ;
15015   return 0;
15016 }
15017 _ACEOF
15018 rm -f conftest.$ac_objext conftest$ac_exeext
15019 if { (eval echo "$as_me:15019: \"$ac_link\"") >&5
15020   (eval $ac_link) 2>&5
15021   ac_status=$?
15022   echo "$as_me:15022: \$? = $ac_status" >&5
15023   (exit $ac_status); } &&
15024          { ac_try='test -s conftest$ac_exeext'
15025   { (eval echo "$as_me:15025: \"$ac_try\"") >&5
15026   (eval $ac_try) 2>&5
15027   ac_status=$?
15028   echo "$as_me:15028: \$? = $ac_status" >&5
15029   (exit $ac_status); }; }; then
15030
15031                         cf_cv_regex_hdrs=$cf_regex_hdr
15032                         break
15033
15034 else
15035   echo "$as_me: failed program was:" >&5
15036 cat conftest.$ac_ext >&5
15037 fi
15038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15039         done
15040         ;;
15041 *)
15042         for cf_regex_hdr in regex.h
15043         do
15044                 cat >conftest.$ac_ext <<_ACEOF
15045 #line 15045 "configure"
15046 #include "confdefs.h"
15047 #include <sys/types.h>
15048 #include <$cf_regex_hdr>
15049 int
15050 main ()
15051 {
15052
15053                         regex_t *p;
15054                         int x = regcomp(p, "", 0);
15055                         int y = regexec(p, "", 0, 0, 0);
15056                         regfree(p);
15057
15058   ;
15059   return 0;
15060 }
15061 _ACEOF
15062 rm -f conftest.$ac_objext conftest$ac_exeext
15063 if { (eval echo "$as_me:15063: \"$ac_link\"") >&5
15064   (eval $ac_link) 2>&5
15065   ac_status=$?
15066   echo "$as_me:15066: \$? = $ac_status" >&5
15067   (exit $ac_status); } &&
15068          { ac_try='test -s conftest$ac_exeext'
15069   { (eval echo "$as_me:15069: \"$ac_try\"") >&5
15070   (eval $ac_try) 2>&5
15071   ac_status=$?
15072   echo "$as_me:15072: \$? = $ac_status" >&5
15073   (exit $ac_status); }; }; then
15074
15075                         cf_cv_regex_hdrs=$cf_regex_hdr
15076                         break
15077
15078 else
15079   echo "$as_me: failed program was:" >&5
15080 cat conftest.$ac_ext >&5
15081 fi
15082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15083         done
15084         ;;
15085 esac
15086
15087 fi
15088 echo "$as_me:15088: result: $cf_cv_regex_hdrs" >&5
15089 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15090
15091 case $cf_cv_regex_hdrs in #(vi
15092     no)        { echo "$as_me:15092: WARNING: no regular expression header found" >&5
15093 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
15094     regex.h)
15095 cat >>confdefs.h <<\EOF
15096 #define HAVE_REGEX_H_FUNCS 1
15097 EOF
15098  ;; #(vi
15099     regexp.h)
15100 cat >>confdefs.h <<\EOF
15101 #define HAVE_REGEXP_H_FUNCS 1
15102 EOF
15103  ;; #(vi
15104     regexpr.h)
15105 cat >>confdefs.h <<\EOF
15106 #define HAVE_REGEXPR_H_FUNCS 1
15107 EOF
15108  ;;
15109 esac
15110
15111 for ac_header in \
15112 fcntl.h \
15113 getopt.h \
15114 limits.h \
15115 locale.h \
15116 math.h \
15117 poll.h \
15118 sys/bsdtypes.h \
15119 sys/ioctl.h \
15120 sys/param.h \
15121 sys/poll.h \
15122 sys/select.h \
15123 sys/time.h \
15124 sys/times.h \
15125 ttyent.h \
15126 unistd.h \
15127 wctype.h \
15128
15129 do
15130 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15131 echo "$as_me:15131: checking for $ac_header" >&5
15132 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15133 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15134   echo $ECHO_N "(cached) $ECHO_C" >&6
15135 else
15136   cat >conftest.$ac_ext <<_ACEOF
15137 #line 15137 "configure"
15138 #include "confdefs.h"
15139 #include <$ac_header>
15140 _ACEOF
15141 if { (eval echo "$as_me:15141: \"$ac_cpp conftest.$ac_ext\"") >&5
15142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15143   ac_status=$?
15144   egrep -v '^ *\+' conftest.er1 >conftest.err
15145   rm -f conftest.er1
15146   cat conftest.err >&5
15147   echo "$as_me:15147: \$? = $ac_status" >&5
15148   (exit $ac_status); } >/dev/null; then
15149   if test -s conftest.err; then
15150     ac_cpp_err=$ac_c_preproc_warn_flag
15151   else
15152     ac_cpp_err=
15153   fi
15154 else
15155   ac_cpp_err=yes
15156 fi
15157 if test -z "$ac_cpp_err"; then
15158   eval "$as_ac_Header=yes"
15159 else
15160   echo "$as_me: failed program was:" >&5
15161   cat conftest.$ac_ext >&5
15162   eval "$as_ac_Header=no"
15163 fi
15164 rm -f conftest.err conftest.$ac_ext
15165 fi
15166 echo "$as_me:15166: result: `eval echo '${'$as_ac_Header'}'`" >&5
15167 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15168 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15169   cat >>confdefs.h <<EOF
15170 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15171 EOF
15172
15173 fi
15174 done
15175
15176 for ac_header in unistd.h getopt.h
15177 do
15178 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15179 echo "$as_me:15179: checking for $ac_header" >&5
15180 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15181 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15182   echo $ECHO_N "(cached) $ECHO_C" >&6
15183 else
15184   cat >conftest.$ac_ext <<_ACEOF
15185 #line 15185 "configure"
15186 #include "confdefs.h"
15187 #include <$ac_header>
15188 _ACEOF
15189 if { (eval echo "$as_me:15189: \"$ac_cpp conftest.$ac_ext\"") >&5
15190   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15191   ac_status=$?
15192   egrep -v '^ *\+' conftest.er1 >conftest.err
15193   rm -f conftest.er1
15194   cat conftest.err >&5
15195   echo "$as_me:15195: \$? = $ac_status" >&5
15196   (exit $ac_status); } >/dev/null; then
15197   if test -s conftest.err; then
15198     ac_cpp_err=$ac_c_preproc_warn_flag
15199   else
15200     ac_cpp_err=
15201   fi
15202 else
15203   ac_cpp_err=yes
15204 fi
15205 if test -z "$ac_cpp_err"; then
15206   eval "$as_ac_Header=yes"
15207 else
15208   echo "$as_me: failed program was:" >&5
15209   cat conftest.$ac_ext >&5
15210   eval "$as_ac_Header=no"
15211 fi
15212 rm -f conftest.err conftest.$ac_ext
15213 fi
15214 echo "$as_me:15214: result: `eval echo '${'$as_ac_Header'}'`" >&5
15215 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15216 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15217   cat >>confdefs.h <<EOF
15218 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15219 EOF
15220
15221 fi
15222 done
15223
15224 echo "$as_me:15224: checking for header declaring getopt variables" >&5
15225 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15226 if test "${cf_cv_getopt_header+set}" = set; then
15227   echo $ECHO_N "(cached) $ECHO_C" >&6
15228 else
15229
15230 cf_cv_getopt_header=none
15231 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15232 do
15233 cat >conftest.$ac_ext <<_ACEOF
15234 #line 15234 "configure"
15235 #include "confdefs.h"
15236
15237 #include <$cf_header>
15238 int
15239 main ()
15240 {
15241 int x = optind; char *y = optarg
15242   ;
15243   return 0;
15244 }
15245 _ACEOF
15246 rm -f conftest.$ac_objext
15247 if { (eval echo "$as_me:15247: \"$ac_compile\"") >&5
15248   (eval $ac_compile) 2>&5
15249   ac_status=$?
15250   echo "$as_me:15250: \$? = $ac_status" >&5
15251   (exit $ac_status); } &&
15252          { ac_try='test -s conftest.$ac_objext'
15253   { (eval echo "$as_me:15253: \"$ac_try\"") >&5
15254   (eval $ac_try) 2>&5
15255   ac_status=$?
15256   echo "$as_me:15256: \$? = $ac_status" >&5
15257   (exit $ac_status); }; }; then
15258   cf_cv_getopt_header=$cf_header
15259  break
15260 else
15261   echo "$as_me: failed program was:" >&5
15262 cat conftest.$ac_ext >&5
15263 fi
15264 rm -f conftest.$ac_objext conftest.$ac_ext
15265 done
15266
15267 fi
15268 echo "$as_me:15268: result: $cf_cv_getopt_header" >&5
15269 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15270 if test $cf_cv_getopt_header != none ; then
15271
15272 cat >>confdefs.h <<\EOF
15273 #define HAVE_GETOPT_HEADER 1
15274 EOF
15275
15276 fi
15277 if test $cf_cv_getopt_header = getopt.h ; then
15278
15279 cat >>confdefs.h <<\EOF
15280 #define NEED_GETOPT_H 1
15281 EOF
15282
15283 fi
15284
15285 # check for ISC (this may also define _POSIX_SOURCE)
15286 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15287 if test "x$ISC" = xyes ; then
15288
15289 echo "$as_me:15289: checking for main in -lcposix" >&5
15290 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15291 if test "${ac_cv_lib_cposix_main+set}" = set; then
15292   echo $ECHO_N "(cached) $ECHO_C" >&6
15293 else
15294   ac_check_lib_save_LIBS=$LIBS
15295 LIBS="-lcposix  $LIBS"
15296 cat >conftest.$ac_ext <<_ACEOF
15297 #line 15297 "configure"
15298 #include "confdefs.h"
15299
15300 int
15301 main ()
15302 {
15303 main ();
15304   ;
15305   return 0;
15306 }
15307 _ACEOF
15308 rm -f conftest.$ac_objext conftest$ac_exeext
15309 if { (eval echo "$as_me:15309: \"$ac_link\"") >&5
15310   (eval $ac_link) 2>&5
15311   ac_status=$?
15312   echo "$as_me:15312: \$? = $ac_status" >&5
15313   (exit $ac_status); } &&
15314          { ac_try='test -s conftest$ac_exeext'
15315   { (eval echo "$as_me:15315: \"$ac_try\"") >&5
15316   (eval $ac_try) 2>&5
15317   ac_status=$?
15318   echo "$as_me:15318: \$? = $ac_status" >&5
15319   (exit $ac_status); }; }; then
15320   ac_cv_lib_cposix_main=yes
15321 else
15322   echo "$as_me: failed program was:" >&5
15323 cat conftest.$ac_ext >&5
15324 ac_cv_lib_cposix_main=no
15325 fi
15326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15327 LIBS=$ac_check_lib_save_LIBS
15328 fi
15329 echo "$as_me:15329: result: $ac_cv_lib_cposix_main" >&5
15330 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15331 if test $ac_cv_lib_cposix_main = yes; then
15332   cat >>confdefs.h <<EOF
15333 #define HAVE_LIBCPOSIX 1
15334 EOF
15335
15336   LIBS="-lcposix $LIBS"
15337
15338 fi
15339
15340         echo "$as_me:15340: checking for bzero in -linet" >&5
15341 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15342 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15343   echo $ECHO_N "(cached) $ECHO_C" >&6
15344 else
15345   ac_check_lib_save_LIBS=$LIBS
15346 LIBS="-linet  $LIBS"
15347 cat >conftest.$ac_ext <<_ACEOF
15348 #line 15348 "configure"
15349 #include "confdefs.h"
15350
15351 /* Override any gcc2 internal prototype to avoid an error.  */
15352 #ifdef __cplusplus
15353 extern "C"
15354 #endif
15355 /* We use char because int might match the return type of a gcc2
15356    builtin and then its argument prototype would still apply.  */
15357 char bzero ();
15358 int
15359 main ()
15360 {
15361 bzero ();
15362   ;
15363   return 0;
15364 }
15365 _ACEOF
15366 rm -f conftest.$ac_objext conftest$ac_exeext
15367 if { (eval echo "$as_me:15367: \"$ac_link\"") >&5
15368   (eval $ac_link) 2>&5
15369   ac_status=$?
15370   echo "$as_me:15370: \$? = $ac_status" >&5
15371   (exit $ac_status); } &&
15372          { ac_try='test -s conftest$ac_exeext'
15373   { (eval echo "$as_me:15373: \"$ac_try\"") >&5
15374   (eval $ac_try) 2>&5
15375   ac_status=$?
15376   echo "$as_me:15376: \$? = $ac_status" >&5
15377   (exit $ac_status); }; }; then
15378   ac_cv_lib_inet_bzero=yes
15379 else
15380   echo "$as_me: failed program was:" >&5
15381 cat conftest.$ac_ext >&5
15382 ac_cv_lib_inet_bzero=no
15383 fi
15384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15385 LIBS=$ac_check_lib_save_LIBS
15386 fi
15387 echo "$as_me:15387: result: $ac_cv_lib_inet_bzero" >&5
15388 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15389 if test $ac_cv_lib_inet_bzero = yes; then
15390
15391 cf_add_libs="-linet"
15392 # Filter out duplicates - this happens with badly-designed ".pc" files...
15393 for cf_add_1lib in $LIBS
15394 do
15395         for cf_add_2lib in $cf_add_libs
15396         do
15397                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15398                 then
15399                         cf_add_1lib=
15400                         break
15401                 fi
15402         done
15403         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15404 done
15405 LIBS="$cf_add_libs"
15406
15407 fi
15408 fi
15409
15410 echo "$as_me:15410: checking if sys/time.h works with sys/select.h" >&5
15411 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15412 if test "${cf_cv_sys_time_select+set}" = set; then
15413   echo $ECHO_N "(cached) $ECHO_C" >&6
15414 else
15415
15416 cat >conftest.$ac_ext <<_ACEOF
15417 #line 15417 "configure"
15418 #include "confdefs.h"
15419
15420 #include <sys/types.h>
15421 #ifdef HAVE_SYS_TIME_H
15422 #include <sys/time.h>
15423 #endif
15424 #ifdef HAVE_SYS_SELECT_H
15425 #include <sys/select.h>
15426 #endif
15427
15428 int
15429 main ()
15430 {
15431
15432   ;
15433   return 0;
15434 }
15435 _ACEOF
15436 rm -f conftest.$ac_objext
15437 if { (eval echo "$as_me:15437: \"$ac_compile\"") >&5
15438   (eval $ac_compile) 2>&5
15439   ac_status=$?
15440   echo "$as_me:15440: \$? = $ac_status" >&5
15441   (exit $ac_status); } &&
15442          { ac_try='test -s conftest.$ac_objext'
15443   { (eval echo "$as_me:15443: \"$ac_try\"") >&5
15444   (eval $ac_try) 2>&5
15445   ac_status=$?
15446   echo "$as_me:15446: \$? = $ac_status" >&5
15447   (exit $ac_status); }; }; then
15448   cf_cv_sys_time_select=yes
15449 else
15450   echo "$as_me: failed program was:" >&5
15451 cat conftest.$ac_ext >&5
15452 cf_cv_sys_time_select=no
15453 fi
15454 rm -f conftest.$ac_objext conftest.$ac_ext
15455
15456 fi
15457
15458 echo "$as_me:15458: result: $cf_cv_sys_time_select" >&5
15459 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15460 test "$cf_cv_sys_time_select" = yes &&
15461 cat >>confdefs.h <<\EOF
15462 #define HAVE_SYS_TIME_SELECT 1
15463 EOF
15464
15465 ###     checks for compiler characteristics
15466 ac_ext=c
15467 ac_cpp='$CPP $CPPFLAGS'
15468 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15469 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15470 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15471 ac_main_return=return
15472
15473 echo "$as_me:15473: checking for an ANSI C-conforming const" >&5
15474 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15475 if test "${ac_cv_c_const+set}" = set; then
15476   echo $ECHO_N "(cached) $ECHO_C" >&6
15477 else
15478   cat >conftest.$ac_ext <<_ACEOF
15479 #line 15479 "configure"
15480 #include "confdefs.h"
15481
15482 int
15483 main ()
15484 {
15485 /* FIXME: Include the comments suggested by Paul. */
15486 #ifndef __cplusplus
15487   /* Ultrix mips cc rejects this.  */
15488   typedef int charset[2];
15489   const charset x;
15490   /* SunOS 4.1.1 cc rejects this.  */
15491   char const *const *ccp;
15492   char **p;
15493   /* NEC SVR4.0.2 mips cc rejects this.  */
15494   struct point {int x, y;};
15495   static struct point const zero = {0,0};
15496   /* AIX XL C 1.02.0.0 rejects this.
15497      It does not let you subtract one const X* pointer from another in
15498      an arm of an if-expression whose if-part is not a constant
15499      expression */
15500   const char *g = "string";
15501   ccp = &g + (g ? g-g : 0);
15502   /* HPUX 7.0 cc rejects these. */
15503   ++ccp;
15504   p = (char**) ccp;
15505   ccp = (char const *const *) p;
15506   { /* SCO 3.2v4 cc rejects this.  */
15507     char *t;
15508     char const *s = 0 ? (char *) 0 : (char const *) 0;
15509
15510     *t++ = 0;
15511   }
15512   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15513     int x[] = {25, 17};
15514     const int *foo = &x[0];
15515     ++foo;
15516   }
15517   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15518     typedef const int *iptr;
15519     iptr p = 0;
15520     ++p;
15521   }
15522   { /* AIX XL C 1.02.0.0 rejects this saying
15523        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15524     struct s { int j; const int *ap[3]; };
15525     struct s *b; b->j = 5;
15526   }
15527   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15528     const int foo = 10;
15529   }
15530 #endif
15531
15532   ;
15533   return 0;
15534 }
15535 _ACEOF
15536 rm -f conftest.$ac_objext
15537 if { (eval echo "$as_me:15537: \"$ac_compile\"") >&5
15538   (eval $ac_compile) 2>&5
15539   ac_status=$?
15540   echo "$as_me:15540: \$? = $ac_status" >&5
15541   (exit $ac_status); } &&
15542          { ac_try='test -s conftest.$ac_objext'
15543   { (eval echo "$as_me:15543: \"$ac_try\"") >&5
15544   (eval $ac_try) 2>&5
15545   ac_status=$?
15546   echo "$as_me:15546: \$? = $ac_status" >&5
15547   (exit $ac_status); }; }; then
15548   ac_cv_c_const=yes
15549 else
15550   echo "$as_me: failed program was:" >&5
15551 cat conftest.$ac_ext >&5
15552 ac_cv_c_const=no
15553 fi
15554 rm -f conftest.$ac_objext conftest.$ac_ext
15555 fi
15556 echo "$as_me:15556: result: $ac_cv_c_const" >&5
15557 echo "${ECHO_T}$ac_cv_c_const" >&6
15558 if test $ac_cv_c_const = no; then
15559
15560 cat >>confdefs.h <<\EOF
15561 #define const
15562 EOF
15563
15564 fi
15565
15566 echo "$as_me:15566: checking for inline" >&5
15567 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15568 if test "${ac_cv_c_inline+set}" = set; then
15569   echo $ECHO_N "(cached) $ECHO_C" >&6
15570 else
15571   ac_cv_c_inline=no
15572 for ac_kw in inline __inline__ __inline; do
15573   cat >conftest.$ac_ext <<_ACEOF
15574 #line 15574 "configure"
15575 #include "confdefs.h"
15576 #ifndef __cplusplus
15577 static $ac_kw int static_foo () {return 0; }
15578 $ac_kw int foo () {return 0; }
15579 #endif
15580
15581 _ACEOF
15582 rm -f conftest.$ac_objext
15583 if { (eval echo "$as_me:15583: \"$ac_compile\"") >&5
15584   (eval $ac_compile) 2>&5
15585   ac_status=$?
15586   echo "$as_me:15586: \$? = $ac_status" >&5
15587   (exit $ac_status); } &&
15588          { ac_try='test -s conftest.$ac_objext'
15589   { (eval echo "$as_me:15589: \"$ac_try\"") >&5
15590   (eval $ac_try) 2>&5
15591   ac_status=$?
15592   echo "$as_me:15592: \$? = $ac_status" >&5
15593   (exit $ac_status); }; }; then
15594   ac_cv_c_inline=$ac_kw; break
15595 else
15596   echo "$as_me: failed program was:" >&5
15597 cat conftest.$ac_ext >&5
15598 fi
15599 rm -f conftest.$ac_objext conftest.$ac_ext
15600 done
15601
15602 fi
15603 echo "$as_me:15603: result: $ac_cv_c_inline" >&5
15604 echo "${ECHO_T}$ac_cv_c_inline" >&6
15605 case $ac_cv_c_inline in
15606   inline | yes) ;;
15607   no)
15608 cat >>confdefs.h <<\EOF
15609 #define inline
15610 EOF
15611  ;;
15612   *)  cat >>confdefs.h <<EOF
15613 #define inline $ac_cv_c_inline
15614 EOF
15615  ;;
15616 esac
15617
15618 NCURSES_INLINE=
15619 if test "$ac_cv_c_inline" != no ; then
15620   NCURSES_INLINE=inline
15621   if test "$INTEL_COMPILER" = yes
15622   then
15623     :
15624   elif test "$CLANG_COMPILER" = yes
15625   then
15626     :
15627   elif test "$GCC" = yes
15628   then
15629     echo "$as_me:15629: checking if $CC supports options to tune inlining" >&5
15630 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15631 if test "${cf_cv_gcc_inline+set}" = set; then
15632   echo $ECHO_N "(cached) $ECHO_C" >&6
15633 else
15634
15635       cf_save_CFLAGS=$CFLAGS
15636       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15637       cat >conftest.$ac_ext <<_ACEOF
15638 #line 15638 "configure"
15639 #include "confdefs.h"
15640 inline int foo(void) { return 1; }
15641 int
15642 main ()
15643 {
15644 ${cf_cv_main_return:-return} foo()
15645   ;
15646   return 0;
15647 }
15648 _ACEOF
15649 rm -f conftest.$ac_objext
15650 if { (eval echo "$as_me:15650: \"$ac_compile\"") >&5
15651   (eval $ac_compile) 2>&5
15652   ac_status=$?
15653   echo "$as_me:15653: \$? = $ac_status" >&5
15654   (exit $ac_status); } &&
15655          { ac_try='test -s conftest.$ac_objext'
15656   { (eval echo "$as_me:15656: \"$ac_try\"") >&5
15657   (eval $ac_try) 2>&5
15658   ac_status=$?
15659   echo "$as_me:15659: \$? = $ac_status" >&5
15660   (exit $ac_status); }; }; then
15661   cf_cv_gcc_inline=yes
15662 else
15663   echo "$as_me: failed program was:" >&5
15664 cat conftest.$ac_ext >&5
15665 cf_cv_gcc_inline=no
15666 fi
15667 rm -f conftest.$ac_objext conftest.$ac_ext
15668       CFLAGS=$cf_save_CFLAGS
15669
15670 fi
15671 echo "$as_me:15671: result: $cf_cv_gcc_inline" >&5
15672 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15673     if test "$cf_cv_gcc_inline" = yes ; then
15674
15675 cf_fix_cppflags=no
15676 cf_new_cflags=
15677 cf_new_cppflags=
15678 cf_new_extra_cppflags=
15679
15680 for cf_add_cflags in --param max-inline-insns-single=1200
15681 do
15682 case $cf_fix_cppflags in
15683 no)
15684         case $cf_add_cflags in #(vi
15685         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15686                 case $cf_add_cflags in
15687                 -D*)
15688                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15689
15690                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15691                                 && test -z "${cf_tst_cflags}" \
15692                                 && cf_fix_cppflags=yes
15693
15694                         if test $cf_fix_cppflags = yes ; then
15695                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15696                                 continue
15697                         elif test "${cf_tst_cflags}" = "\"'" ; then
15698                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15699                                 continue
15700                         fi
15701                         ;;
15702                 esac
15703                 case "$CPPFLAGS" in
15704                 *$cf_add_cflags) #(vi
15705                         ;;
15706                 *) #(vi
15707                         case $cf_add_cflags in #(vi
15708                         -D*)
15709                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15710
15711 CPPFLAGS=`echo "$CPPFLAGS" | \
15712         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15713                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15714
15715                                 ;;
15716                         esac
15717                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15718                         ;;
15719                 esac
15720                 ;;
15721         *)
15722                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15723                 ;;
15724         esac
15725         ;;
15726 yes)
15727         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15728
15729         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15730
15731         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15732                 && test -z "${cf_tst_cflags}" \
15733                 && cf_fix_cppflags=no
15734         ;;
15735 esac
15736 done
15737
15738 if test -n "$cf_new_cflags" ; then
15739
15740         CFLAGS="$CFLAGS $cf_new_cflags"
15741 fi
15742
15743 if test -n "$cf_new_cppflags" ; then
15744
15745         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15746 fi
15747
15748 if test -n "$cf_new_extra_cppflags" ; then
15749
15750         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15751 fi
15752
15753     fi
15754   fi
15755 fi
15756
15757 echo "$as_me:15757: checking for signal global datatype" >&5
15758 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15759 if test "${cf_cv_sig_atomic_t+set}" = set; then
15760   echo $ECHO_N "(cached) $ECHO_C" >&6
15761 else
15762
15763         for cf_type in \
15764                 "volatile sig_atomic_t" \
15765                 "sig_atomic_t" \
15766                 "int"
15767         do
15768         cat >conftest.$ac_ext <<_ACEOF
15769 #line 15769 "configure"
15770 #include "confdefs.h"
15771
15772 #include <sys/types.h>
15773 #include <signal.h>
15774 #include <stdio.h>
15775
15776 extern $cf_type x;
15777 $cf_type x;
15778 static void handler(int sig)
15779 {
15780         x = 5;
15781 }
15782 int
15783 main ()
15784 {
15785 signal(SIGINT, handler);
15786                  x = 1
15787   ;
15788   return 0;
15789 }
15790 _ACEOF
15791 rm -f conftest.$ac_objext
15792 if { (eval echo "$as_me:15792: \"$ac_compile\"") >&5
15793   (eval $ac_compile) 2>&5
15794   ac_status=$?
15795   echo "$as_me:15795: \$? = $ac_status" >&5
15796   (exit $ac_status); } &&
15797          { ac_try='test -s conftest.$ac_objext'
15798   { (eval echo "$as_me:15798: \"$ac_try\"") >&5
15799   (eval $ac_try) 2>&5
15800   ac_status=$?
15801   echo "$as_me:15801: \$? = $ac_status" >&5
15802   (exit $ac_status); }; }; then
15803   cf_cv_sig_atomic_t=$cf_type
15804 else
15805   echo "$as_me: failed program was:" >&5
15806 cat conftest.$ac_ext >&5
15807 cf_cv_sig_atomic_t=no
15808 fi
15809 rm -f conftest.$ac_objext conftest.$ac_ext
15810                 test "$cf_cv_sig_atomic_t" != no && break
15811         done
15812
15813 fi
15814
15815 echo "$as_me:15815: result: $cf_cv_sig_atomic_t" >&5
15816 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15817 test "$cf_cv_sig_atomic_t" != no &&
15818 cat >>confdefs.h <<EOF
15819 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15820 EOF
15821
15822 if test $NCURSES_CHTYPE = auto ; then
15823
15824 echo "$as_me:15824: checking for type of chtype" >&5
15825 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15826 if test "${cf_cv_typeof_chtype+set}" = set; then
15827   echo $ECHO_N "(cached) $ECHO_C" >&6
15828 else
15829
15830                 if test "$cross_compiling" = yes; then
15831   cf_cv_typeof_chtype=long
15832 else
15833   cat >conftest.$ac_ext <<_ACEOF
15834 #line 15834 "configure"
15835 #include "confdefs.h"
15836
15837 #define WANT_BITS 31
15838 #include <stdio.h>
15839 int main()
15840 {
15841         FILE *fp = fopen("cf_test.out", "w");
15842         if (fp != 0) {
15843                 char *result = "long";
15844                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15845                         int n;
15846                         unsigned int x, y;
15847                         for (n = 0; n < WANT_BITS; n++) {
15848                                 x = (1 << n);
15849                                 y = (x >> n);
15850                                 if (y != 1 || x == 0) {
15851                                         x = 0;
15852                                         break;
15853                                 }
15854                         }
15855                         /*
15856                          * If x is nonzero, an int is big enough for the bits
15857                          * that we want.
15858                          */
15859                         result = (x != 0) ? "int" : "long";
15860                 }
15861                 fputs(result, fp);
15862                 fclose(fp);
15863         }
15864         ${cf_cv_main_return:-return}(0);
15865 }
15866
15867 _ACEOF
15868 rm -f conftest$ac_exeext
15869 if { (eval echo "$as_me:15869: \"$ac_link\"") >&5
15870   (eval $ac_link) 2>&5
15871   ac_status=$?
15872   echo "$as_me:15872: \$? = $ac_status" >&5
15873   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15874   { (eval echo "$as_me:15874: \"$ac_try\"") >&5
15875   (eval $ac_try) 2>&5
15876   ac_status=$?
15877   echo "$as_me:15877: \$? = $ac_status" >&5
15878   (exit $ac_status); }; }; then
15879   cf_cv_typeof_chtype=`cat cf_test.out`
15880 else
15881   echo "$as_me: program exited with status $ac_status" >&5
15882 echo "$as_me: failed program was:" >&5
15883 cat conftest.$ac_ext >&5
15884 cf_cv_typeof_chtype=long
15885 fi
15886 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15887 fi
15888                 rm -f cf_test.out
15889
15890 fi
15891
15892 echo "$as_me:15892: result: $cf_cv_typeof_chtype" >&5
15893 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15894
15895 cat >>confdefs.h <<EOF
15896 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15897 EOF
15898
15899 else
15900         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15901 fi
15902 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15903
15904 echo "$as_me:15904: checking if unsigned literals are legal" >&5
15905 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15906 if test "${cf_cv_unsigned_literals+set}" = set; then
15907   echo $ECHO_N "(cached) $ECHO_C" >&6
15908 else
15909
15910         cat >conftest.$ac_ext <<_ACEOF
15911 #line 15911 "configure"
15912 #include "confdefs.h"
15913
15914 int
15915 main ()
15916 {
15917 long x = 1L + 1UL + 1U + 1
15918   ;
15919   return 0;
15920 }
15921 _ACEOF
15922 rm -f conftest.$ac_objext
15923 if { (eval echo "$as_me:15923: \"$ac_compile\"") >&5
15924   (eval $ac_compile) 2>&5
15925   ac_status=$?
15926   echo "$as_me:15926: \$? = $ac_status" >&5
15927   (exit $ac_status); } &&
15928          { ac_try='test -s conftest.$ac_objext'
15929   { (eval echo "$as_me:15929: \"$ac_try\"") >&5
15930   (eval $ac_try) 2>&5
15931   ac_status=$?
15932   echo "$as_me:15932: \$? = $ac_status" >&5
15933   (exit $ac_status); }; }; then
15934   cf_cv_unsigned_literals=yes
15935 else
15936   echo "$as_me: failed program was:" >&5
15937 cat conftest.$ac_ext >&5
15938 cf_cv_unsigned_literals=no
15939 fi
15940 rm -f conftest.$ac_objext conftest.$ac_ext
15941
15942 fi
15943
15944 echo "$as_me:15944: result: $cf_cv_unsigned_literals" >&5
15945 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15946
15947 cf_cv_1UL="1"
15948 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15949 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15950
15951 if test $NCURSES_MMASK_T = auto ; then
15952         cf_cv_typeof_mmask_t=long
15953 else
15954         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15955 fi
15956 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15957
15958 ###     Checks for external-data
15959
15960 echo "$as_me:15960: checking if external errno is declared" >&5
15961 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15962 if test "${cf_cv_dcl_errno+set}" = set; then
15963   echo $ECHO_N "(cached) $ECHO_C" >&6
15964 else
15965
15966     cat >conftest.$ac_ext <<_ACEOF
15967 #line 15967 "configure"
15968 #include "confdefs.h"
15969
15970 #ifdef HAVE_STDLIB_H
15971 #include <stdlib.h>
15972 #endif
15973 #include <stdio.h>
15974 #include <sys/types.h>
15975 #include <errno.h>
15976 int
15977 main ()
15978 {
15979 int x = (int) errno
15980   ;
15981   return 0;
15982 }
15983 _ACEOF
15984 rm -f conftest.$ac_objext
15985 if { (eval echo "$as_me:15985: \"$ac_compile\"") >&5
15986   (eval $ac_compile) 2>&5
15987   ac_status=$?
15988   echo "$as_me:15988: \$? = $ac_status" >&5
15989   (exit $ac_status); } &&
15990          { ac_try='test -s conftest.$ac_objext'
15991   { (eval echo "$as_me:15991: \"$ac_try\"") >&5
15992   (eval $ac_try) 2>&5
15993   ac_status=$?
15994   echo "$as_me:15994: \$? = $ac_status" >&5
15995   (exit $ac_status); }; }; then
15996   cf_cv_dcl_errno=yes
15997 else
15998   echo "$as_me: failed program was:" >&5
15999 cat conftest.$ac_ext >&5
16000 cf_cv_dcl_errno=no
16001 fi
16002 rm -f conftest.$ac_objext conftest.$ac_ext
16003
16004 fi
16005 echo "$as_me:16005: result: $cf_cv_dcl_errno" >&5
16006 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16007
16008 if test "$cf_cv_dcl_errno" = no ; then
16009
16010 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16011
16012     cat >>confdefs.h <<EOF
16013 #define $cf_result 1
16014 EOF
16015
16016 fi
16017
16018 # It's possible (for near-UNIX clones) that the data doesn't exist
16019
16020 echo "$as_me:16020: checking if external errno exists" >&5
16021 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16022 if test "${cf_cv_have_errno+set}" = set; then
16023   echo $ECHO_N "(cached) $ECHO_C" >&6
16024 else
16025
16026     cat >conftest.$ac_ext <<_ACEOF
16027 #line 16027 "configure"
16028 #include "confdefs.h"
16029
16030 #undef errno
16031 extern int errno;
16032
16033 int
16034 main ()
16035 {
16036 errno = 2
16037   ;
16038   return 0;
16039 }
16040 _ACEOF
16041 rm -f conftest.$ac_objext conftest$ac_exeext
16042 if { (eval echo "$as_me:16042: \"$ac_link\"") >&5
16043   (eval $ac_link) 2>&5
16044   ac_status=$?
16045   echo "$as_me:16045: \$? = $ac_status" >&5
16046   (exit $ac_status); } &&
16047          { ac_try='test -s conftest$ac_exeext'
16048   { (eval echo "$as_me:16048: \"$ac_try\"") >&5
16049   (eval $ac_try) 2>&5
16050   ac_status=$?
16051   echo "$as_me:16051: \$? = $ac_status" >&5
16052   (exit $ac_status); }; }; then
16053   cf_cv_have_errno=yes
16054 else
16055   echo "$as_me: failed program was:" >&5
16056 cat conftest.$ac_ext >&5
16057 cf_cv_have_errno=no
16058 fi
16059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16060
16061 fi
16062 echo "$as_me:16062: result: $cf_cv_have_errno" >&5
16063 echo "${ECHO_T}$cf_cv_have_errno" >&6
16064
16065 if test "$cf_cv_have_errno" = yes ; then
16066
16067 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16068
16069     cat >>confdefs.h <<EOF
16070 #define $cf_result 1
16071 EOF
16072
16073 fi
16074
16075 echo "$as_me:16075: checking if data-only library module links" >&5
16076 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16077 if test "${cf_cv_link_dataonly+set}" = set; then
16078   echo $ECHO_N "(cached) $ECHO_C" >&6
16079 else
16080
16081         rm -f conftest.a
16082         cat >conftest.$ac_ext <<EOF
16083 #line 16083 "configure"
16084 int     testdata[3] = { 123, 456, 789 };
16085 EOF
16086         if { (eval echo "$as_me:16086: \"$ac_compile\"") >&5
16087   (eval $ac_compile) 2>&5
16088   ac_status=$?
16089   echo "$as_me:16089: \$? = $ac_status" >&5
16090   (exit $ac_status); } ; then
16091                 mv conftest.o data.o && \
16092                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16093         fi
16094         rm -f conftest.$ac_ext data.o
16095         cat >conftest.$ac_ext <<EOF
16096 #line 16096 "configure"
16097 int     testfunc()
16098 {
16099 #if defined(NeXT)
16100         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16101 #else
16102         extern int testdata[3];
16103         return testdata[0] == 123
16104            &&  testdata[1] == 456
16105            &&  testdata[2] == 789;
16106 #endif
16107 }
16108 EOF
16109         if { (eval echo "$as_me:16109: \"$ac_compile\"") >&5
16110   (eval $ac_compile) 2>&5
16111   ac_status=$?
16112   echo "$as_me:16112: \$? = $ac_status" >&5
16113   (exit $ac_status); }; then
16114                 mv conftest.o func.o && \
16115                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16116         fi
16117         rm -f conftest.$ac_ext func.o
16118         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16119         cf_saveLIBS="$LIBS"
16120         LIBS="conftest.a $LIBS"
16121         if test "$cross_compiling" = yes; then
16122   cf_cv_link_dataonly=unknown
16123 else
16124   cat >conftest.$ac_ext <<_ACEOF
16125 #line 16125 "configure"
16126 #include "confdefs.h"
16127
16128         int main()
16129         {
16130                 extern int testfunc();
16131                 ${cf_cv_main_return:-return} (!testfunc());
16132         }
16133
16134 _ACEOF
16135 rm -f conftest$ac_exeext
16136 if { (eval echo "$as_me:16136: \"$ac_link\"") >&5
16137   (eval $ac_link) 2>&5
16138   ac_status=$?
16139   echo "$as_me:16139: \$? = $ac_status" >&5
16140   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16141   { (eval echo "$as_me:16141: \"$ac_try\"") >&5
16142   (eval $ac_try) 2>&5
16143   ac_status=$?
16144   echo "$as_me:16144: \$? = $ac_status" >&5
16145   (exit $ac_status); }; }; then
16146   cf_cv_link_dataonly=yes
16147 else
16148   echo "$as_me: program exited with status $ac_status" >&5
16149 echo "$as_me: failed program was:" >&5
16150 cat conftest.$ac_ext >&5
16151 cf_cv_link_dataonly=no
16152 fi
16153 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16154 fi
16155         LIBS="$cf_saveLIBS"
16156
16157 fi
16158
16159 echo "$as_me:16159: result: $cf_cv_link_dataonly" >&5
16160 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16161
16162 if test "$cf_cv_link_dataonly" = no ; then
16163
16164 cat >>confdefs.h <<\EOF
16165 #define BROKEN_LINKER 1
16166 EOF
16167
16168         BROKEN_LINKER=1
16169 fi
16170
16171 ###     Checks for library functions.
16172
16173 for ac_func in \
16174 getcwd \
16175 getegid \
16176 geteuid \
16177 getopt \
16178 getttynam \
16179 issetugid \
16180 poll \
16181 putenv \
16182 remove \
16183 select \
16184 setbuf \
16185 setbuffer \
16186 setenv \
16187 setvbuf \
16188 sigaction \
16189 sigvec \
16190 strdup \
16191 strstr \
16192 tcgetpgrp \
16193 times \
16194 vsnprintf \
16195
16196 do
16197 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16198 echo "$as_me:16198: checking for $ac_func" >&5
16199 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16200 if eval "test \"\${$as_ac_var+set}\" = set"; then
16201   echo $ECHO_N "(cached) $ECHO_C" >&6
16202 else
16203   cat >conftest.$ac_ext <<_ACEOF
16204 #line 16204 "configure"
16205 #include "confdefs.h"
16206 /* System header to define __stub macros and hopefully few prototypes,
16207     which can conflict with char $ac_func (); below.  */
16208 #include <assert.h>
16209 /* Override any gcc2 internal prototype to avoid an error.  */
16210 #ifdef __cplusplus
16211 extern "C"
16212 #endif
16213 /* We use char because int might match the return type of a gcc2
16214    builtin and then its argument prototype would still apply.  */
16215 char $ac_func ();
16216 char (*f) ();
16217
16218 int
16219 main ()
16220 {
16221 /* The GNU C library defines this for functions which it implements
16222     to always fail with ENOSYS.  Some functions are actually named
16223     something starting with __ and the normal name is an alias.  */
16224 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16225 choke me
16226 #else
16227 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16228 #endif
16229
16230   ;
16231   return 0;
16232 }
16233 _ACEOF
16234 rm -f conftest.$ac_objext conftest$ac_exeext
16235 if { (eval echo "$as_me:16235: \"$ac_link\"") >&5
16236   (eval $ac_link) 2>&5
16237   ac_status=$?
16238   echo "$as_me:16238: \$? = $ac_status" >&5
16239   (exit $ac_status); } &&
16240          { ac_try='test -s conftest$ac_exeext'
16241   { (eval echo "$as_me:16241: \"$ac_try\"") >&5
16242   (eval $ac_try) 2>&5
16243   ac_status=$?
16244   echo "$as_me:16244: \$? = $ac_status" >&5
16245   (exit $ac_status); }; }; then
16246   eval "$as_ac_var=yes"
16247 else
16248   echo "$as_me: failed program was:" >&5
16249 cat conftest.$ac_ext >&5
16250 eval "$as_ac_var=no"
16251 fi
16252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16253 fi
16254 echo "$as_me:16254: result: `eval echo '${'$as_ac_var'}'`" >&5
16255 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16256 if test `eval echo '${'$as_ac_var'}'` = yes; then
16257   cat >>confdefs.h <<EOF
16258 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16259 EOF
16260
16261 fi
16262 done
16263
16264 if test "x$ac_cv_func_getopt" = xno &&
16265    test "x$cf_with_progs$cf_with_tests" != xnono; then
16266         { { echo "$as_me:16266: error: getopt is required for building programs" >&5
16267 echo "$as_me: error: getopt is required for building programs" >&2;}
16268    { (exit 1); exit 1; }; }
16269 fi
16270
16271 if test "x$with_getcap" = "xyes" ; then
16272
16273 echo "$as_me:16273: checking for terminal-capability database functions" >&5
16274 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16275 if test "${cf_cv_cgetent+set}" = set; then
16276   echo $ECHO_N "(cached) $ECHO_C" >&6
16277 else
16278
16279 cat >conftest.$ac_ext <<_ACEOF
16280 #line 16280 "configure"
16281 #include "confdefs.h"
16282
16283 #include <stdlib.h>
16284 int
16285 main ()
16286 {
16287
16288         char temp[128];
16289         char *buf = temp;
16290         char *db_array = temp;
16291         cgetent(&buf, &db_array, "vt100");
16292         cgetcap(buf, "tc", '=');
16293         cgetmatch(buf, "tc");
16294
16295   ;
16296   return 0;
16297 }
16298 _ACEOF
16299 rm -f conftest.$ac_objext conftest$ac_exeext
16300 if { (eval echo "$as_me:16300: \"$ac_link\"") >&5
16301   (eval $ac_link) 2>&5
16302   ac_status=$?
16303   echo "$as_me:16303: \$? = $ac_status" >&5
16304   (exit $ac_status); } &&
16305          { ac_try='test -s conftest$ac_exeext'
16306   { (eval echo "$as_me:16306: \"$ac_try\"") >&5
16307   (eval $ac_try) 2>&5
16308   ac_status=$?
16309   echo "$as_me:16309: \$? = $ac_status" >&5
16310   (exit $ac_status); }; }; then
16311   cf_cv_cgetent=yes
16312 else
16313   echo "$as_me: failed program was:" >&5
16314 cat conftest.$ac_ext >&5
16315 cf_cv_cgetent=no
16316 fi
16317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16318
16319 fi
16320 echo "$as_me:16320: result: $cf_cv_cgetent" >&5
16321 echo "${ECHO_T}$cf_cv_cgetent" >&6
16322
16323 if test "$cf_cv_cgetent" = yes
16324 then
16325
16326 cat >>confdefs.h <<\EOF
16327 #define HAVE_BSD_CGETENT 1
16328 EOF
16329
16330 echo "$as_me:16330: checking if cgetent uses const parameter" >&5
16331 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16332 if test "${cf_cv_cgetent_const+set}" = set; then
16333   echo $ECHO_N "(cached) $ECHO_C" >&6
16334 else
16335
16336 cat >conftest.$ac_ext <<_ACEOF
16337 #line 16337 "configure"
16338 #include "confdefs.h"
16339
16340 #include <stdlib.h>
16341 int
16342 main ()
16343 {
16344
16345         char temp[128];
16346         char *buf = temp;
16347 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16348         const char *db_array = temp;
16349         cgetent(&buf, &db_array, "vt100");
16350 #endif
16351         cgetcap(buf, "tc", '=');
16352         cgetmatch(buf, "tc");
16353
16354   ;
16355   return 0;
16356 }
16357 _ACEOF
16358 rm -f conftest.$ac_objext conftest$ac_exeext
16359 if { (eval echo "$as_me:16359: \"$ac_link\"") >&5
16360   (eval $ac_link) 2>&5
16361   ac_status=$?
16362   echo "$as_me:16362: \$? = $ac_status" >&5
16363   (exit $ac_status); } &&
16364          { ac_try='test -s conftest$ac_exeext'
16365   { (eval echo "$as_me:16365: \"$ac_try\"") >&5
16366   (eval $ac_try) 2>&5
16367   ac_status=$?
16368   echo "$as_me:16368: \$? = $ac_status" >&5
16369   (exit $ac_status); }; }; then
16370   cf_cv_cgetent_const=yes
16371 else
16372   echo "$as_me: failed program was:" >&5
16373 cat conftest.$ac_ext >&5
16374 cf_cv_cgetent_const=no
16375 fi
16376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16377
16378 fi
16379 echo "$as_me:16379: result: $cf_cv_cgetent_const" >&5
16380 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16381         if test "$cf_cv_cgetent_const" = yes
16382         then
16383
16384 cat >>confdefs.h <<EOF
16385 #define CGETENT_CONST const
16386 EOF
16387
16388         fi
16389 fi
16390
16391 fi
16392
16393 echo "$as_me:16393: checking for isascii" >&5
16394 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16395 if test "${cf_cv_have_isascii+set}" = set; then
16396   echo $ECHO_N "(cached) $ECHO_C" >&6
16397 else
16398
16399         cat >conftest.$ac_ext <<_ACEOF
16400 #line 16400 "configure"
16401 #include "confdefs.h"
16402 #include <ctype.h>
16403 int
16404 main ()
16405 {
16406 int x = isascii(' ')
16407   ;
16408   return 0;
16409 }
16410 _ACEOF
16411 rm -f conftest.$ac_objext conftest$ac_exeext
16412 if { (eval echo "$as_me:16412: \"$ac_link\"") >&5
16413   (eval $ac_link) 2>&5
16414   ac_status=$?
16415   echo "$as_me:16415: \$? = $ac_status" >&5
16416   (exit $ac_status); } &&
16417          { ac_try='test -s conftest$ac_exeext'
16418   { (eval echo "$as_me:16418: \"$ac_try\"") >&5
16419   (eval $ac_try) 2>&5
16420   ac_status=$?
16421   echo "$as_me:16421: \$? = $ac_status" >&5
16422   (exit $ac_status); }; }; then
16423   cf_cv_have_isascii=yes
16424 else
16425   echo "$as_me: failed program was:" >&5
16426 cat conftest.$ac_ext >&5
16427 cf_cv_have_isascii=no
16428 fi
16429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16430
16431 fi
16432 echo "$as_me:16432: result: $cf_cv_have_isascii" >&5
16433 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16434 test "$cf_cv_have_isascii" = yes &&
16435 cat >>confdefs.h <<\EOF
16436 #define HAVE_ISASCII 1
16437 EOF
16438
16439 if test "$ac_cv_func_sigaction" = yes; then
16440 echo "$as_me:16440: checking whether sigaction needs _POSIX_SOURCE" >&5
16441 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16442 cat >conftest.$ac_ext <<_ACEOF
16443 #line 16443 "configure"
16444 #include "confdefs.h"
16445
16446 #include <sys/types.h>
16447 #include <signal.h>
16448 int
16449 main ()
16450 {
16451 struct sigaction act
16452   ;
16453   return 0;
16454 }
16455 _ACEOF
16456 rm -f conftest.$ac_objext
16457 if { (eval echo "$as_me:16457: \"$ac_compile\"") >&5
16458   (eval $ac_compile) 2>&5
16459   ac_status=$?
16460   echo "$as_me:16460: \$? = $ac_status" >&5
16461   (exit $ac_status); } &&
16462          { ac_try='test -s conftest.$ac_objext'
16463   { (eval echo "$as_me:16463: \"$ac_try\"") >&5
16464   (eval $ac_try) 2>&5
16465   ac_status=$?
16466   echo "$as_me:16466: \$? = $ac_status" >&5
16467   (exit $ac_status); }; }; then
16468   sigact_bad=no
16469 else
16470   echo "$as_me: failed program was:" >&5
16471 cat conftest.$ac_ext >&5
16472
16473 cat >conftest.$ac_ext <<_ACEOF
16474 #line 16474 "configure"
16475 #include "confdefs.h"
16476
16477 #define _POSIX_SOURCE
16478 #include <sys/types.h>
16479 #include <signal.h>
16480 int
16481 main ()
16482 {
16483 struct sigaction act
16484   ;
16485   return 0;
16486 }
16487 _ACEOF
16488 rm -f conftest.$ac_objext
16489 if { (eval echo "$as_me:16489: \"$ac_compile\"") >&5
16490   (eval $ac_compile) 2>&5
16491   ac_status=$?
16492   echo "$as_me:16492: \$? = $ac_status" >&5
16493   (exit $ac_status); } &&
16494          { ac_try='test -s conftest.$ac_objext'
16495   { (eval echo "$as_me:16495: \"$ac_try\"") >&5
16496   (eval $ac_try) 2>&5
16497   ac_status=$?
16498   echo "$as_me:16498: \$? = $ac_status" >&5
16499   (exit $ac_status); }; }; then
16500   sigact_bad=yes
16501
16502 cat >>confdefs.h <<\EOF
16503 #define _POSIX_SOURCE 1
16504 EOF
16505
16506 else
16507   echo "$as_me: failed program was:" >&5
16508 cat conftest.$ac_ext >&5
16509 sigact_bad=unknown
16510 fi
16511 rm -f conftest.$ac_objext conftest.$ac_ext
16512 fi
16513 rm -f conftest.$ac_objext conftest.$ac_ext
16514 echo "$as_me:16514: result: $sigact_bad" >&5
16515 echo "${ECHO_T}$sigact_bad" >&6
16516 fi
16517
16518 echo "$as_me:16518: checking if nanosleep really works" >&5
16519 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16520 if test "${cf_cv_func_nanosleep+set}" = set; then
16521   echo $ECHO_N "(cached) $ECHO_C" >&6
16522 else
16523
16524 if test "$cross_compiling" = yes; then
16525   cf_cv_func_nanosleep=unknown
16526 else
16527   cat >conftest.$ac_ext <<_ACEOF
16528 #line 16528 "configure"
16529 #include "confdefs.h"
16530
16531 #include <stdio.h>
16532 #include <errno.h>
16533 #include <time.h>
16534
16535 #ifdef HAVE_SYS_TIME_H
16536 #include <sys/time.h>
16537 #endif
16538
16539 int main() {
16540         struct timespec ts1, ts2;
16541         int code;
16542         ts1.tv_sec  = 0;
16543         ts1.tv_nsec = 750000000;
16544         ts2.tv_sec  = 0;
16545         ts2.tv_nsec = 0;
16546         errno = 0;
16547         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16548         ${cf_cv_main_return:-return}(code != 0);
16549 }
16550
16551 _ACEOF
16552 rm -f conftest$ac_exeext
16553 if { (eval echo "$as_me:16553: \"$ac_link\"") >&5
16554   (eval $ac_link) 2>&5
16555   ac_status=$?
16556   echo "$as_me:16556: \$? = $ac_status" >&5
16557   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16558   { (eval echo "$as_me:16558: \"$ac_try\"") >&5
16559   (eval $ac_try) 2>&5
16560   ac_status=$?
16561   echo "$as_me:16561: \$? = $ac_status" >&5
16562   (exit $ac_status); }; }; then
16563   cf_cv_func_nanosleep=yes
16564 else
16565   echo "$as_me: program exited with status $ac_status" >&5
16566 echo "$as_me: failed program was:" >&5
16567 cat conftest.$ac_ext >&5
16568 cf_cv_func_nanosleep=no
16569 fi
16570 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16571 fi
16572 fi
16573 echo "$as_me:16573: result: $cf_cv_func_nanosleep" >&5
16574 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16575
16576 test "$cf_cv_func_nanosleep" = "yes" &&
16577 cat >>confdefs.h <<\EOF
16578 #define HAVE_NANOSLEEP 1
16579 EOF
16580
16581 for ac_header in \
16582 termio.h \
16583 termios.h \
16584 unistd.h \
16585
16586 do
16587 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16588 echo "$as_me:16588: checking for $ac_header" >&5
16589 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16590 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16591   echo $ECHO_N "(cached) $ECHO_C" >&6
16592 else
16593   cat >conftest.$ac_ext <<_ACEOF
16594 #line 16594 "configure"
16595 #include "confdefs.h"
16596 #include <$ac_header>
16597 _ACEOF
16598 if { (eval echo "$as_me:16598: \"$ac_cpp conftest.$ac_ext\"") >&5
16599   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16600   ac_status=$?
16601   egrep -v '^ *\+' conftest.er1 >conftest.err
16602   rm -f conftest.er1
16603   cat conftest.err >&5
16604   echo "$as_me:16604: \$? = $ac_status" >&5
16605   (exit $ac_status); } >/dev/null; then
16606   if test -s conftest.err; then
16607     ac_cpp_err=$ac_c_preproc_warn_flag
16608   else
16609     ac_cpp_err=
16610   fi
16611 else
16612   ac_cpp_err=yes
16613 fi
16614 if test -z "$ac_cpp_err"; then
16615   eval "$as_ac_Header=yes"
16616 else
16617   echo "$as_me: failed program was:" >&5
16618   cat conftest.$ac_ext >&5
16619   eval "$as_ac_Header=no"
16620 fi
16621 rm -f conftest.err conftest.$ac_ext
16622 fi
16623 echo "$as_me:16623: result: `eval echo '${'$as_ac_Header'}'`" >&5
16624 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16625 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16626   cat >>confdefs.h <<EOF
16627 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16628 EOF
16629
16630 fi
16631 done
16632
16633 if test "$ISC" = yes ; then
16634
16635 for ac_header in sys/termio.h
16636 do
16637 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16638 echo "$as_me:16638: checking for $ac_header" >&5
16639 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16640 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16641   echo $ECHO_N "(cached) $ECHO_C" >&6
16642 else
16643   cat >conftest.$ac_ext <<_ACEOF
16644 #line 16644 "configure"
16645 #include "confdefs.h"
16646 #include <$ac_header>
16647 _ACEOF
16648 if { (eval echo "$as_me:16648: \"$ac_cpp conftest.$ac_ext\"") >&5
16649   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16650   ac_status=$?
16651   egrep -v '^ *\+' conftest.er1 >conftest.err
16652   rm -f conftest.er1
16653   cat conftest.err >&5
16654   echo "$as_me:16654: \$? = $ac_status" >&5
16655   (exit $ac_status); } >/dev/null; then
16656   if test -s conftest.err; then
16657     ac_cpp_err=$ac_c_preproc_warn_flag
16658   else
16659     ac_cpp_err=
16660   fi
16661 else
16662   ac_cpp_err=yes
16663 fi
16664 if test -z "$ac_cpp_err"; then
16665   eval "$as_ac_Header=yes"
16666 else
16667   echo "$as_me: failed program was:" >&5
16668   cat conftest.$ac_ext >&5
16669   eval "$as_ac_Header=no"
16670 fi
16671 rm -f conftest.err conftest.$ac_ext
16672 fi
16673 echo "$as_me:16673: result: `eval echo '${'$as_ac_Header'}'`" >&5
16674 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16675 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16676   cat >>confdefs.h <<EOF
16677 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16678 EOF
16679
16680 fi
16681 done
16682
16683 fi
16684 if test "$ac_cv_header_termios_h" = yes ; then
16685         case "$CFLAGS $CPPFLAGS" in
16686         *-D_POSIX_SOURCE*)
16687                 termios_bad=dunno ;;
16688         *)      termios_bad=maybe ;;
16689         esac
16690         if test "$termios_bad" = maybe ; then
16691         echo "$as_me:16691: checking whether termios.h needs _POSIX_SOURCE" >&5
16692 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16693         cat >conftest.$ac_ext <<_ACEOF
16694 #line 16694 "configure"
16695 #include "confdefs.h"
16696 #include <termios.h>
16697 int
16698 main ()
16699 {
16700 struct termios foo; int x = foo.c_iflag
16701   ;
16702   return 0;
16703 }
16704 _ACEOF
16705 rm -f conftest.$ac_objext
16706 if { (eval echo "$as_me:16706: \"$ac_compile\"") >&5
16707   (eval $ac_compile) 2>&5
16708   ac_status=$?
16709   echo "$as_me:16709: \$? = $ac_status" >&5
16710   (exit $ac_status); } &&
16711          { ac_try='test -s conftest.$ac_objext'
16712   { (eval echo "$as_me:16712: \"$ac_try\"") >&5
16713   (eval $ac_try) 2>&5
16714   ac_status=$?
16715   echo "$as_me:16715: \$? = $ac_status" >&5
16716   (exit $ac_status); }; }; then
16717   termios_bad=no
16718 else
16719   echo "$as_me: failed program was:" >&5
16720 cat conftest.$ac_ext >&5
16721
16722                 cat >conftest.$ac_ext <<_ACEOF
16723 #line 16723 "configure"
16724 #include "confdefs.h"
16725
16726 #define _POSIX_SOURCE
16727 #include <termios.h>
16728 int
16729 main ()
16730 {
16731 struct termios foo; int x = foo.c_iflag
16732   ;
16733   return 0;
16734 }
16735 _ACEOF
16736 rm -f conftest.$ac_objext
16737 if { (eval echo "$as_me:16737: \"$ac_compile\"") >&5
16738   (eval $ac_compile) 2>&5
16739   ac_status=$?
16740   echo "$as_me:16740: \$? = $ac_status" >&5
16741   (exit $ac_status); } &&
16742          { ac_try='test -s conftest.$ac_objext'
16743   { (eval echo "$as_me:16743: \"$ac_try\"") >&5
16744   (eval $ac_try) 2>&5
16745   ac_status=$?
16746   echo "$as_me:16746: \$? = $ac_status" >&5
16747   (exit $ac_status); }; }; then
16748   termios_bad=unknown
16749 else
16750   echo "$as_me: failed program was:" >&5
16751 cat conftest.$ac_ext >&5
16752 termios_bad=yes
16753 cat >>confdefs.h <<\EOF
16754 #define _POSIX_SOURCE 1
16755 EOF
16756
16757 fi
16758 rm -f conftest.$ac_objext conftest.$ac_ext
16759
16760 fi
16761 rm -f conftest.$ac_objext conftest.$ac_ext
16762         echo "$as_me:16762: result: $termios_bad" >&5
16763 echo "${ECHO_T}$termios_bad" >&6
16764         fi
16765 fi
16766
16767 echo "$as_me:16767: checking for tcgetattr" >&5
16768 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16769 if test "${cf_cv_have_tcgetattr+set}" = set; then
16770   echo $ECHO_N "(cached) $ECHO_C" >&6
16771 else
16772
16773 cat >conftest.$ac_ext <<_ACEOF
16774 #line 16774 "configure"
16775 #include "confdefs.h"
16776
16777 #include <sys/types.h>
16778 #ifdef HAVE_UNISTD_H
16779 #include <unistd.h>
16780 #endif
16781 #ifdef HAVE_TERMIOS_H
16782 #include <termios.h>
16783 #define TTY struct termios
16784 #else
16785 #ifdef HAVE_TERMIO_H
16786 #include <termio.h>
16787 #define TTY struct termio
16788 #endif
16789 #endif
16790
16791 int
16792 main ()
16793 {
16794
16795 TTY foo;
16796 tcgetattr(1, &foo);
16797   ;
16798   return 0;
16799 }
16800 _ACEOF
16801 rm -f conftest.$ac_objext conftest$ac_exeext
16802 if { (eval echo "$as_me:16802: \"$ac_link\"") >&5
16803   (eval $ac_link) 2>&5
16804   ac_status=$?
16805   echo "$as_me:16805: \$? = $ac_status" >&5
16806   (exit $ac_status); } &&
16807          { ac_try='test -s conftest$ac_exeext'
16808   { (eval echo "$as_me:16808: \"$ac_try\"") >&5
16809   (eval $ac_try) 2>&5
16810   ac_status=$?
16811   echo "$as_me:16811: \$? = $ac_status" >&5
16812   (exit $ac_status); }; }; then
16813   cf_cv_have_tcgetattr=yes
16814 else
16815   echo "$as_me: failed program was:" >&5
16816 cat conftest.$ac_ext >&5
16817 cf_cv_have_tcgetattr=no
16818 fi
16819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16820 fi
16821 echo "$as_me:16821: result: $cf_cv_have_tcgetattr" >&5
16822 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16823 test "$cf_cv_have_tcgetattr" = yes &&
16824 cat >>confdefs.h <<\EOF
16825 #define HAVE_TCGETATTR 1
16826 EOF
16827
16828 echo "$as_me:16828: checking for vsscanf function or workaround" >&5
16829 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16830 if test "${cf_cv_func_vsscanf+set}" = set; then
16831   echo $ECHO_N "(cached) $ECHO_C" >&6
16832 else
16833
16834 cat >conftest.$ac_ext <<_ACEOF
16835 #line 16835 "configure"
16836 #include "confdefs.h"
16837
16838 #include <stdarg.h>
16839 #include <stdio.h>
16840 int
16841 main ()
16842 {
16843
16844         va_list ap;
16845         vsscanf("from", "%d", ap)
16846   ;
16847   return 0;
16848 }
16849 _ACEOF
16850 rm -f conftest.$ac_objext conftest$ac_exeext
16851 if { (eval echo "$as_me:16851: \"$ac_link\"") >&5
16852   (eval $ac_link) 2>&5
16853   ac_status=$?
16854   echo "$as_me:16854: \$? = $ac_status" >&5
16855   (exit $ac_status); } &&
16856          { ac_try='test -s conftest$ac_exeext'
16857   { (eval echo "$as_me:16857: \"$ac_try\"") >&5
16858   (eval $ac_try) 2>&5
16859   ac_status=$?
16860   echo "$as_me:16860: \$? = $ac_status" >&5
16861   (exit $ac_status); }; }; then
16862   cf_cv_func_vsscanf=vsscanf
16863 else
16864   echo "$as_me: failed program was:" >&5
16865 cat conftest.$ac_ext >&5
16866
16867 cat >conftest.$ac_ext <<_ACEOF
16868 #line 16868 "configure"
16869 #include "confdefs.h"
16870
16871 #include <stdarg.h>
16872 #include <stdio.h>
16873 int
16874 main ()
16875 {
16876
16877     FILE strbuf;
16878     char *str = "from";
16879
16880     strbuf._flag = _IOREAD;
16881     strbuf._ptr = strbuf._base = (unsigned char *) str;
16882     strbuf._cnt = strlen(str);
16883     strbuf._file = _NFILE;
16884     return (vfscanf(&strbuf, "%d", ap))
16885   ;
16886   return 0;
16887 }
16888 _ACEOF
16889 rm -f conftest.$ac_objext conftest$ac_exeext
16890 if { (eval echo "$as_me:16890: \"$ac_link\"") >&5
16891   (eval $ac_link) 2>&5
16892   ac_status=$?
16893   echo "$as_me:16893: \$? = $ac_status" >&5
16894   (exit $ac_status); } &&
16895          { ac_try='test -s conftest$ac_exeext'
16896   { (eval echo "$as_me:16896: \"$ac_try\"") >&5
16897   (eval $ac_try) 2>&5
16898   ac_status=$?
16899   echo "$as_me:16899: \$? = $ac_status" >&5
16900   (exit $ac_status); }; }; then
16901   cf_cv_func_vsscanf=vfscanf
16902 else
16903   echo "$as_me: failed program was:" >&5
16904 cat conftest.$ac_ext >&5
16905
16906 cat >conftest.$ac_ext <<_ACEOF
16907 #line 16907 "configure"
16908 #include "confdefs.h"
16909
16910 #include <stdarg.h>
16911 #include <stdio.h>
16912 int
16913 main ()
16914 {
16915
16916     FILE strbuf;
16917     char *str = "from";
16918
16919     strbuf._flag = _IOREAD;
16920     strbuf._ptr = strbuf._base = (unsigned char *) str;
16921     strbuf._cnt = strlen(str);
16922     strbuf._file = _NFILE;
16923     return (_doscan(&strbuf, "%d", ap))
16924   ;
16925   return 0;
16926 }
16927 _ACEOF
16928 rm -f conftest.$ac_objext conftest$ac_exeext
16929 if { (eval echo "$as_me:16929: \"$ac_link\"") >&5
16930   (eval $ac_link) 2>&5
16931   ac_status=$?
16932   echo "$as_me:16932: \$? = $ac_status" >&5
16933   (exit $ac_status); } &&
16934          { ac_try='test -s conftest$ac_exeext'
16935   { (eval echo "$as_me:16935: \"$ac_try\"") >&5
16936   (eval $ac_try) 2>&5
16937   ac_status=$?
16938   echo "$as_me:16938: \$? = $ac_status" >&5
16939   (exit $ac_status); }; }; then
16940   cf_cv_func_vsscanf=_doscan
16941 else
16942   echo "$as_me: failed program was:" >&5
16943 cat conftest.$ac_ext >&5
16944
16945 cf_cv_func_vsscanf=no
16946 fi
16947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16948 fi
16949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16950 fi
16951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16952 fi
16953 echo "$as_me:16953: result: $cf_cv_func_vsscanf" >&5
16954 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16955
16956 case $cf_cv_func_vsscanf in #(vi
16957 vsscanf)
16958 cat >>confdefs.h <<\EOF
16959 #define HAVE_VSSCANF 1
16960 EOF
16961 ;; #(vi
16962 vfscanf)
16963 cat >>confdefs.h <<\EOF
16964 #define HAVE_VFSCANF 1
16965 EOF
16966 ;; #(vi
16967 _doscan)
16968 cat >>confdefs.h <<\EOF
16969 #define HAVE__DOSCAN 1
16970 EOF
16971 ;;
16972 esac
16973
16974 echo "$as_me:16974: checking for working mkstemp" >&5
16975 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16976 if test "${cf_cv_func_mkstemp+set}" = set; then
16977   echo $ECHO_N "(cached) $ECHO_C" >&6
16978 else
16979
16980 rm -rf conftest*
16981 if test "$cross_compiling" = yes; then
16982   cf_cv_func_mkstemp=maybe
16983 else
16984   cat >conftest.$ac_ext <<_ACEOF
16985 #line 16985 "configure"
16986 #include "confdefs.h"
16987
16988 #include <sys/types.h>
16989 #include <stdlib.h>
16990 #include <stdio.h>
16991 #include <string.h>
16992 #include <sys/stat.h>
16993 int main()
16994 {
16995         char *tmpl = "conftestXXXXXX";
16996         char name[2][80];
16997         int n;
16998         int result = 0;
16999         int fd;
17000         struct stat sb;
17001
17002         umask(077);
17003         for (n = 0; n < 2; ++n) {
17004                 strcpy(name[n], tmpl);
17005                 if ((fd = mkstemp(name[n])) >= 0) {
17006                         if (!strcmp(name[n], tmpl)
17007                          || stat(name[n], &sb) != 0
17008                          || (sb.st_mode & S_IFMT) != S_IFREG
17009                          || (sb.st_mode & 077) != 0) {
17010                                 result = 1;
17011                         }
17012                         close(fd);
17013                 }
17014         }
17015         if (result == 0
17016          && !strcmp(name[0], name[1]))
17017                 result = 1;
17018         ${cf_cv_main_return:-return}(result);
17019 }
17020
17021 _ACEOF
17022 rm -f conftest$ac_exeext
17023 if { (eval echo "$as_me:17023: \"$ac_link\"") >&5
17024   (eval $ac_link) 2>&5
17025   ac_status=$?
17026   echo "$as_me:17026: \$? = $ac_status" >&5
17027   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17028   { (eval echo "$as_me:17028: \"$ac_try\"") >&5
17029   (eval $ac_try) 2>&5
17030   ac_status=$?
17031   echo "$as_me:17031: \$? = $ac_status" >&5
17032   (exit $ac_status); }; }; then
17033   cf_cv_func_mkstemp=yes
17034
17035 else
17036   echo "$as_me: program exited with status $ac_status" >&5
17037 echo "$as_me: failed program was:" >&5
17038 cat conftest.$ac_ext >&5
17039 cf_cv_func_mkstemp=no
17040
17041 fi
17042 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17043 fi
17044
17045 fi
17046 echo "$as_me:17046: result: $cf_cv_func_mkstemp" >&5
17047 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17048 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17049         echo "$as_me:17049: checking for mkstemp" >&5
17050 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17051 if test "${ac_cv_func_mkstemp+set}" = set; then
17052   echo $ECHO_N "(cached) $ECHO_C" >&6
17053 else
17054   cat >conftest.$ac_ext <<_ACEOF
17055 #line 17055 "configure"
17056 #include "confdefs.h"
17057 /* System header to define __stub macros and hopefully few prototypes,
17058     which can conflict with char mkstemp (); below.  */
17059 #include <assert.h>
17060 /* Override any gcc2 internal prototype to avoid an error.  */
17061 #ifdef __cplusplus
17062 extern "C"
17063 #endif
17064 /* We use char because int might match the return type of a gcc2
17065    builtin and then its argument prototype would still apply.  */
17066 char mkstemp ();
17067 char (*f) ();
17068
17069 int
17070 main ()
17071 {
17072 /* The GNU C library defines this for functions which it implements
17073     to always fail with ENOSYS.  Some functions are actually named
17074     something starting with __ and the normal name is an alias.  */
17075 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17076 choke me
17077 #else
17078 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17079 #endif
17080
17081   ;
17082   return 0;
17083 }
17084 _ACEOF
17085 rm -f conftest.$ac_objext conftest$ac_exeext
17086 if { (eval echo "$as_me:17086: \"$ac_link\"") >&5
17087   (eval $ac_link) 2>&5
17088   ac_status=$?
17089   echo "$as_me:17089: \$? = $ac_status" >&5
17090   (exit $ac_status); } &&
17091          { ac_try='test -s conftest$ac_exeext'
17092   { (eval echo "$as_me:17092: \"$ac_try\"") >&5
17093   (eval $ac_try) 2>&5
17094   ac_status=$?
17095   echo "$as_me:17095: \$? = $ac_status" >&5
17096   (exit $ac_status); }; }; then
17097   ac_cv_func_mkstemp=yes
17098 else
17099   echo "$as_me: failed program was:" >&5
17100 cat conftest.$ac_ext >&5
17101 ac_cv_func_mkstemp=no
17102 fi
17103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17104 fi
17105 echo "$as_me:17105: result: $ac_cv_func_mkstemp" >&5
17106 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17107
17108 fi
17109 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17110
17111 cat >>confdefs.h <<\EOF
17112 #define HAVE_MKSTEMP 1
17113 EOF
17114
17115 fi
17116
17117 # setup for prototype of fallback for vsscanf()
17118
17119 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17120         HAVE_VSSCANF=1
17121 else
17122         HAVE_VSSCANF=0
17123 fi
17124
17125 if test "x$cross_compiling" = xyes ; then
17126         { echo "$as_me:17126: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17127 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17128 else
17129         echo "$as_me:17129: checking whether setvbuf arguments are reversed" >&5
17130 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17131 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17132   echo $ECHO_N "(cached) $ECHO_C" >&6
17133 else
17134   if test "$cross_compiling" = yes; then
17135   { { echo "$as_me:17135: error: cannot run test program while cross compiling" >&5
17136 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17137    { (exit 1); exit 1; }; }
17138 else
17139   cat >conftest.$ac_ext <<_ACEOF
17140 #line 17140 "configure"
17141 #include "confdefs.h"
17142 #include <stdio.h>
17143 /* If setvbuf has the reversed format, exit 0. */
17144 int
17145 main ()
17146 {
17147   /* This call has the arguments reversed.
17148      A reversed system may check and see that the address of main
17149      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17150   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17151     $ac_main_return(1);
17152   putc('\r', stdout);
17153   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17154 }
17155 _ACEOF
17156 rm -f conftest$ac_exeext
17157 if { (eval echo "$as_me:17157: \"$ac_link\"") >&5
17158   (eval $ac_link) 2>&5
17159   ac_status=$?
17160   echo "$as_me:17160: \$? = $ac_status" >&5
17161   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17162   { (eval echo "$as_me:17162: \"$ac_try\"") >&5
17163   (eval $ac_try) 2>&5
17164   ac_status=$?
17165   echo "$as_me:17165: \$? = $ac_status" >&5
17166   (exit $ac_status); }; }; then
17167   ac_cv_func_setvbuf_reversed=yes
17168 else
17169   echo "$as_me: program exited with status $ac_status" >&5
17170 echo "$as_me: failed program was:" >&5
17171 cat conftest.$ac_ext >&5
17172 ac_cv_func_setvbuf_reversed=no
17173 fi
17174 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17175 fi
17176 rm -f core core.* *.core
17177 fi
17178 echo "$as_me:17178: result: $ac_cv_func_setvbuf_reversed" >&5
17179 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17180 if test $ac_cv_func_setvbuf_reversed = yes; then
17181
17182 cat >>confdefs.h <<\EOF
17183 #define SETVBUF_REVERSED 1
17184 EOF
17185
17186 fi
17187
17188 fi
17189 echo "$as_me:17189: checking for intptr_t" >&5
17190 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17191 if test "${ac_cv_type_intptr_t+set}" = set; then
17192   echo $ECHO_N "(cached) $ECHO_C" >&6
17193 else
17194   cat >conftest.$ac_ext <<_ACEOF
17195 #line 17195 "configure"
17196 #include "confdefs.h"
17197 $ac_includes_default
17198 int
17199 main ()
17200 {
17201 if ((intptr_t *) 0)
17202   return 0;
17203 if (sizeof (intptr_t))
17204   return 0;
17205   ;
17206   return 0;
17207 }
17208 _ACEOF
17209 rm -f conftest.$ac_objext
17210 if { (eval echo "$as_me:17210: \"$ac_compile\"") >&5
17211   (eval $ac_compile) 2>&5
17212   ac_status=$?
17213   echo "$as_me:17213: \$? = $ac_status" >&5
17214   (exit $ac_status); } &&
17215          { ac_try='test -s conftest.$ac_objext'
17216   { (eval echo "$as_me:17216: \"$ac_try\"") >&5
17217   (eval $ac_try) 2>&5
17218   ac_status=$?
17219   echo "$as_me:17219: \$? = $ac_status" >&5
17220   (exit $ac_status); }; }; then
17221   ac_cv_type_intptr_t=yes
17222 else
17223   echo "$as_me: failed program was:" >&5
17224 cat conftest.$ac_ext >&5
17225 ac_cv_type_intptr_t=no
17226 fi
17227 rm -f conftest.$ac_objext conftest.$ac_ext
17228 fi
17229 echo "$as_me:17229: result: $ac_cv_type_intptr_t" >&5
17230 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17231 if test $ac_cv_type_intptr_t = yes; then
17232   :
17233 else
17234
17235 cat >>confdefs.h <<EOF
17236 #define intptr_t long
17237 EOF
17238
17239 fi
17240
17241 echo "$as_me:17241: checking for ssize_t" >&5
17242 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17243 if test "${ac_cv_type_ssize_t+set}" = set; then
17244   echo $ECHO_N "(cached) $ECHO_C" >&6
17245 else
17246   cat >conftest.$ac_ext <<_ACEOF
17247 #line 17247 "configure"
17248 #include "confdefs.h"
17249 $ac_includes_default
17250 int
17251 main ()
17252 {
17253 if ((ssize_t *) 0)
17254   return 0;
17255 if (sizeof (ssize_t))
17256   return 0;
17257   ;
17258   return 0;
17259 }
17260 _ACEOF
17261 rm -f conftest.$ac_objext
17262 if { (eval echo "$as_me:17262: \"$ac_compile\"") >&5
17263   (eval $ac_compile) 2>&5
17264   ac_status=$?
17265   echo "$as_me:17265: \$? = $ac_status" >&5
17266   (exit $ac_status); } &&
17267          { ac_try='test -s conftest.$ac_objext'
17268   { (eval echo "$as_me:17268: \"$ac_try\"") >&5
17269   (eval $ac_try) 2>&5
17270   ac_status=$?
17271   echo "$as_me:17271: \$? = $ac_status" >&5
17272   (exit $ac_status); }; }; then
17273   ac_cv_type_ssize_t=yes
17274 else
17275   echo "$as_me: failed program was:" >&5
17276 cat conftest.$ac_ext >&5
17277 ac_cv_type_ssize_t=no
17278 fi
17279 rm -f conftest.$ac_objext conftest.$ac_ext
17280 fi
17281 echo "$as_me:17281: result: $ac_cv_type_ssize_t" >&5
17282 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17283 if test $ac_cv_type_ssize_t = yes; then
17284   :
17285 else
17286
17287 cat >>confdefs.h <<EOF
17288 #define ssize_t int
17289 EOF
17290
17291 fi
17292
17293 echo "$as_me:17293: checking for type sigaction_t" >&5
17294 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17295 if test "${cf_cv_type_sigaction+set}" = set; then
17296   echo $ECHO_N "(cached) $ECHO_C" >&6
17297 else
17298
17299         cat >conftest.$ac_ext <<_ACEOF
17300 #line 17300 "configure"
17301 #include "confdefs.h"
17302
17303 #include <signal.h>
17304 int
17305 main ()
17306 {
17307 sigaction_t x
17308   ;
17309   return 0;
17310 }
17311 _ACEOF
17312 rm -f conftest.$ac_objext
17313 if { (eval echo "$as_me:17313: \"$ac_compile\"") >&5
17314   (eval $ac_compile) 2>&5
17315   ac_status=$?
17316   echo "$as_me:17316: \$? = $ac_status" >&5
17317   (exit $ac_status); } &&
17318          { ac_try='test -s conftest.$ac_objext'
17319   { (eval echo "$as_me:17319: \"$ac_try\"") >&5
17320   (eval $ac_try) 2>&5
17321   ac_status=$?
17322   echo "$as_me:17322: \$? = $ac_status" >&5
17323   (exit $ac_status); }; }; then
17324   cf_cv_type_sigaction=yes
17325 else
17326   echo "$as_me: failed program was:" >&5
17327 cat conftest.$ac_ext >&5
17328 cf_cv_type_sigaction=no
17329 fi
17330 rm -f conftest.$ac_objext conftest.$ac_ext
17331 fi
17332
17333 echo "$as_me:17333: result: $cf_cv_type_sigaction" >&5
17334 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17335 test "$cf_cv_type_sigaction" = yes &&
17336 cat >>confdefs.h <<\EOF
17337 #define HAVE_TYPE_SIGACTION 1
17338 EOF
17339
17340 echo "$as_me:17340: checking declaration of size-change" >&5
17341 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17342 if test "${cf_cv_sizechange+set}" = set; then
17343   echo $ECHO_N "(cached) $ECHO_C" >&6
17344 else
17345
17346     cf_cv_sizechange=unknown
17347     cf_save_CPPFLAGS="$CPPFLAGS"
17348
17349 for cf_opts in "" "NEED_PTEM_H"
17350 do
17351
17352     CPPFLAGS="$cf_save_CPPFLAGS"
17353     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17354     cat >conftest.$ac_ext <<_ACEOF
17355 #line 17355 "configure"
17356 #include "confdefs.h"
17357 #include <sys/types.h>
17358 #ifdef HAVE_TERMIOS_H
17359 #include <termios.h>
17360 #else
17361 #ifdef HAVE_TERMIO_H
17362 #include <termio.h>
17363 #endif
17364 #endif
17365 #ifdef NEED_PTEM_H
17366 /* This is a workaround for SCO:  they neglected to define struct winsize in
17367  * termios.h -- it's only in termio.h and ptem.h
17368  */
17369 #include        <sys/stream.h>
17370 #include        <sys/ptem.h>
17371 #endif
17372 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17373 #include <sys/ioctl.h>
17374 #endif
17375
17376 int
17377 main ()
17378 {
17379
17380 #ifdef TIOCGSIZE
17381         struct ttysize win;     /* FIXME: what system is this? */
17382         int y = win.ts_lines;
17383         int x = win.ts_cols;
17384 #else
17385 #ifdef TIOCGWINSZ
17386         struct winsize win;
17387         int y = win.ws_row;
17388         int x = win.ws_col;
17389 #else
17390         no TIOCGSIZE or TIOCGWINSZ
17391 #endif /* TIOCGWINSZ */
17392 #endif /* TIOCGSIZE */
17393
17394   ;
17395   return 0;
17396 }
17397 _ACEOF
17398 rm -f conftest.$ac_objext
17399 if { (eval echo "$as_me:17399: \"$ac_compile\"") >&5
17400   (eval $ac_compile) 2>&5
17401   ac_status=$?
17402   echo "$as_me:17402: \$? = $ac_status" >&5
17403   (exit $ac_status); } &&
17404          { ac_try='test -s conftest.$ac_objext'
17405   { (eval echo "$as_me:17405: \"$ac_try\"") >&5
17406   (eval $ac_try) 2>&5
17407   ac_status=$?
17408   echo "$as_me:17408: \$? = $ac_status" >&5
17409   (exit $ac_status); }; }; then
17410   cf_cv_sizechange=yes
17411 else
17412   echo "$as_me: failed program was:" >&5
17413 cat conftest.$ac_ext >&5
17414 cf_cv_sizechange=no
17415 fi
17416 rm -f conftest.$ac_objext conftest.$ac_ext
17417
17418         CPPFLAGS="$cf_save_CPPFLAGS"
17419         if test "$cf_cv_sizechange" = yes ; then
17420                 echo "size-change succeeded ($cf_opts)" >&5
17421                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17422                 break
17423         fi
17424 done
17425
17426 fi
17427 echo "$as_me:17427: result: $cf_cv_sizechange" >&5
17428 echo "${ECHO_T}$cf_cv_sizechange" >&6
17429 if test "$cf_cv_sizechange" != no ; then
17430
17431 cat >>confdefs.h <<\EOF
17432 #define HAVE_SIZECHANGE 1
17433 EOF
17434
17435         case $cf_cv_sizechange in #(vi
17436         NEED*)
17437                 cat >>confdefs.h <<EOF
17438 #define $cf_cv_sizechange  1
17439 EOF
17440
17441                 ;;
17442         esac
17443 fi
17444
17445 echo "$as_me:17445: checking for memmove" >&5
17446 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17447 if test "${ac_cv_func_memmove+set}" = set; then
17448   echo $ECHO_N "(cached) $ECHO_C" >&6
17449 else
17450   cat >conftest.$ac_ext <<_ACEOF
17451 #line 17451 "configure"
17452 #include "confdefs.h"
17453 /* System header to define __stub macros and hopefully few prototypes,
17454     which can conflict with char memmove (); below.  */
17455 #include <assert.h>
17456 /* Override any gcc2 internal prototype to avoid an error.  */
17457 #ifdef __cplusplus
17458 extern "C"
17459 #endif
17460 /* We use char because int might match the return type of a gcc2
17461    builtin and then its argument prototype would still apply.  */
17462 char memmove ();
17463 char (*f) ();
17464
17465 int
17466 main ()
17467 {
17468 /* The GNU C library defines this for functions which it implements
17469     to always fail with ENOSYS.  Some functions are actually named
17470     something starting with __ and the normal name is an alias.  */
17471 #if defined (__stub_memmove) || defined (__stub___memmove)
17472 choke me
17473 #else
17474 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17475 #endif
17476
17477   ;
17478   return 0;
17479 }
17480 _ACEOF
17481 rm -f conftest.$ac_objext conftest$ac_exeext
17482 if { (eval echo "$as_me:17482: \"$ac_link\"") >&5
17483   (eval $ac_link) 2>&5
17484   ac_status=$?
17485   echo "$as_me:17485: \$? = $ac_status" >&5
17486   (exit $ac_status); } &&
17487          { ac_try='test -s conftest$ac_exeext'
17488   { (eval echo "$as_me:17488: \"$ac_try\"") >&5
17489   (eval $ac_try) 2>&5
17490   ac_status=$?
17491   echo "$as_me:17491: \$? = $ac_status" >&5
17492   (exit $ac_status); }; }; then
17493   ac_cv_func_memmove=yes
17494 else
17495   echo "$as_me: failed program was:" >&5
17496 cat conftest.$ac_ext >&5
17497 ac_cv_func_memmove=no
17498 fi
17499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17500 fi
17501 echo "$as_me:17501: result: $ac_cv_func_memmove" >&5
17502 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17503 if test $ac_cv_func_memmove = yes; then
17504   :
17505 else
17506
17507 echo "$as_me:17507: checking for bcopy" >&5
17508 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17509 if test "${ac_cv_func_bcopy+set}" = set; then
17510   echo $ECHO_N "(cached) $ECHO_C" >&6
17511 else
17512   cat >conftest.$ac_ext <<_ACEOF
17513 #line 17513 "configure"
17514 #include "confdefs.h"
17515 /* System header to define __stub macros and hopefully few prototypes,
17516     which can conflict with char bcopy (); below.  */
17517 #include <assert.h>
17518 /* Override any gcc2 internal prototype to avoid an error.  */
17519 #ifdef __cplusplus
17520 extern "C"
17521 #endif
17522 /* We use char because int might match the return type of a gcc2
17523    builtin and then its argument prototype would still apply.  */
17524 char bcopy ();
17525 char (*f) ();
17526
17527 int
17528 main ()
17529 {
17530 /* The GNU C library defines this for functions which it implements
17531     to always fail with ENOSYS.  Some functions are actually named
17532     something starting with __ and the normal name is an alias.  */
17533 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17534 choke me
17535 #else
17536 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17537 #endif
17538
17539   ;
17540   return 0;
17541 }
17542 _ACEOF
17543 rm -f conftest.$ac_objext conftest$ac_exeext
17544 if { (eval echo "$as_me:17544: \"$ac_link\"") >&5
17545   (eval $ac_link) 2>&5
17546   ac_status=$?
17547   echo "$as_me:17547: \$? = $ac_status" >&5
17548   (exit $ac_status); } &&
17549          { ac_try='test -s conftest$ac_exeext'
17550   { (eval echo "$as_me:17550: \"$ac_try\"") >&5
17551   (eval $ac_try) 2>&5
17552   ac_status=$?
17553   echo "$as_me:17553: \$? = $ac_status" >&5
17554   (exit $ac_status); }; }; then
17555   ac_cv_func_bcopy=yes
17556 else
17557   echo "$as_me: failed program was:" >&5
17558 cat conftest.$ac_ext >&5
17559 ac_cv_func_bcopy=no
17560 fi
17561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17562 fi
17563 echo "$as_me:17563: result: $ac_cv_func_bcopy" >&5
17564 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17565 if test $ac_cv_func_bcopy = yes; then
17566
17567         echo "$as_me:17567: checking if bcopy does overlapping moves" >&5
17568 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17569 if test "${cf_cv_good_bcopy+set}" = set; then
17570   echo $ECHO_N "(cached) $ECHO_C" >&6
17571 else
17572
17573                 if test "$cross_compiling" = yes; then
17574   cf_cv_good_bcopy=unknown
17575 else
17576   cat >conftest.$ac_ext <<_ACEOF
17577 #line 17577 "configure"
17578 #include "confdefs.h"
17579
17580 int main() {
17581         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17582         char temp[40];
17583         bcopy(data, temp, sizeof(data));
17584         bcopy(temp+10, temp, 15);
17585         bcopy(temp+5, temp+15, 10);
17586         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17587 }
17588
17589 _ACEOF
17590 rm -f conftest$ac_exeext
17591 if { (eval echo "$as_me:17591: \"$ac_link\"") >&5
17592   (eval $ac_link) 2>&5
17593   ac_status=$?
17594   echo "$as_me:17594: \$? = $ac_status" >&5
17595   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17596   { (eval echo "$as_me:17596: \"$ac_try\"") >&5
17597   (eval $ac_try) 2>&5
17598   ac_status=$?
17599   echo "$as_me:17599: \$? = $ac_status" >&5
17600   (exit $ac_status); }; }; then
17601   cf_cv_good_bcopy=yes
17602 else
17603   echo "$as_me: program exited with status $ac_status" >&5
17604 echo "$as_me: failed program was:" >&5
17605 cat conftest.$ac_ext >&5
17606 cf_cv_good_bcopy=no
17607 fi
17608 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17609 fi
17610
17611 fi
17612 echo "$as_me:17612: result: $cf_cv_good_bcopy" >&5
17613 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17614
17615 else
17616   cf_cv_good_bcopy=no
17617 fi
17618
17619         if test "$cf_cv_good_bcopy" = yes ; then
17620
17621 cat >>confdefs.h <<\EOF
17622 #define USE_OK_BCOPY 1
17623 EOF
17624
17625         else
17626
17627 cat >>confdefs.h <<\EOF
17628 #define USE_MY_MEMMOVE 1
17629 EOF
17630
17631         fi
17632
17633 fi
17634
17635 echo "$as_me:17635: checking if poll really works" >&5
17636 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17637 if test "${cf_cv_working_poll+set}" = set; then
17638   echo $ECHO_N "(cached) $ECHO_C" >&6
17639 else
17640
17641 if test "$cross_compiling" = yes; then
17642   cf_cv_working_poll=unknown
17643 else
17644   cat >conftest.$ac_ext <<_ACEOF
17645 #line 17645 "configure"
17646 #include "confdefs.h"
17647
17648 #include <stdlib.h>
17649 #include <stdio.h>
17650 #include <unistd.h>
17651 #include <fcntl.h>
17652 #ifdef HAVE_POLL_H
17653 #include <poll.h>
17654 #else
17655 #include <sys/poll.h>
17656 #endif
17657 int main() {
17658         struct pollfd myfds;
17659         int ret;
17660
17661         /* check for Darwin bug with respect to "devices" */
17662         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17663         if (myfds.fd < 0)
17664                 myfds.fd = 0;
17665         myfds.events = POLLIN;
17666         myfds.revents = 0;
17667
17668         ret = poll(&myfds, 1, 100);
17669
17670         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17671                 ret = -1;
17672         } else {
17673                 int fd = 0;
17674                 if (!isatty(fd)) {
17675                         fd = open("/dev/tty", 2);       /* O_RDWR */
17676                 }
17677
17678                 if (fd >= 0) {
17679                         /* also check with standard input */
17680                         myfds.fd = fd;
17681                         myfds.events = POLLIN;
17682                         myfds.revents = 0;
17683                         ret = poll(&myfds, 1, 100);
17684                 } else {
17685                         ret = -1;
17686                 }
17687         }
17688         ${cf_cv_main_return:-return}(ret < 0);
17689 }
17690 _ACEOF
17691 rm -f conftest$ac_exeext
17692 if { (eval echo "$as_me:17692: \"$ac_link\"") >&5
17693   (eval $ac_link) 2>&5
17694   ac_status=$?
17695   echo "$as_me:17695: \$? = $ac_status" >&5
17696   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17697   { (eval echo "$as_me:17697: \"$ac_try\"") >&5
17698   (eval $ac_try) 2>&5
17699   ac_status=$?
17700   echo "$as_me:17700: \$? = $ac_status" >&5
17701   (exit $ac_status); }; }; then
17702   cf_cv_working_poll=yes
17703 else
17704   echo "$as_me: program exited with status $ac_status" >&5
17705 echo "$as_me: failed program was:" >&5
17706 cat conftest.$ac_ext >&5
17707 cf_cv_working_poll=no
17708 fi
17709 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17710 fi
17711 fi
17712 echo "$as_me:17712: result: $cf_cv_working_poll" >&5
17713 echo "${ECHO_T}$cf_cv_working_poll" >&6
17714 test "$cf_cv_working_poll" = "yes" &&
17715 cat >>confdefs.h <<\EOF
17716 #define HAVE_WORKING_POLL 1
17717 EOF
17718
17719 echo "$as_me:17719: checking for va_copy" >&5
17720 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17721 if test "${cf_cv_have_va_copy+set}" = set; then
17722   echo $ECHO_N "(cached) $ECHO_C" >&6
17723 else
17724
17725 cat >conftest.$ac_ext <<_ACEOF
17726 #line 17726 "configure"
17727 #include "confdefs.h"
17728
17729 #include <stdarg.h>
17730
17731 int
17732 main ()
17733 {
17734
17735         static va_list dst;
17736         static va_list src;
17737         va_copy(dst, src)
17738   ;
17739   return 0;
17740 }
17741 _ACEOF
17742 rm -f conftest.$ac_objext conftest$ac_exeext
17743 if { (eval echo "$as_me:17743: \"$ac_link\"") >&5
17744   (eval $ac_link) 2>&5
17745   ac_status=$?
17746   echo "$as_me:17746: \$? = $ac_status" >&5
17747   (exit $ac_status); } &&
17748          { ac_try='test -s conftest$ac_exeext'
17749   { (eval echo "$as_me:17749: \"$ac_try\"") >&5
17750   (eval $ac_try) 2>&5
17751   ac_status=$?
17752   echo "$as_me:17752: \$? = $ac_status" >&5
17753   (exit $ac_status); }; }; then
17754   cf_cv_have_va_copy=yes
17755 else
17756   echo "$as_me: failed program was:" >&5
17757 cat conftest.$ac_ext >&5
17758 cf_cv_have_va_copy=no
17759 fi
17760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17761 fi
17762 echo "$as_me:17762: result: $cf_cv_have_va_copy" >&5
17763 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17764
17765 test "$cf_cv_have_va_copy" = yes &&
17766 cat >>confdefs.h <<\EOF
17767 #define HAVE_VA_COPY 1
17768 EOF
17769
17770 echo "$as_me:17770: checking for __va_copy" >&5
17771 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17772 if test "${cf_cv_have___va_copy+set}" = set; then
17773   echo $ECHO_N "(cached) $ECHO_C" >&6
17774 else
17775
17776 cat >conftest.$ac_ext <<_ACEOF
17777 #line 17777 "configure"
17778 #include "confdefs.h"
17779
17780 #include <stdarg.h>
17781
17782 int
17783 main ()
17784 {
17785
17786         static va_list dst;
17787         static va_list src;
17788         __va_copy(dst, src)
17789   ;
17790   return 0;
17791 }
17792 _ACEOF
17793 rm -f conftest.$ac_objext conftest$ac_exeext
17794 if { (eval echo "$as_me:17794: \"$ac_link\"") >&5
17795   (eval $ac_link) 2>&5
17796   ac_status=$?
17797   echo "$as_me:17797: \$? = $ac_status" >&5
17798   (exit $ac_status); } &&
17799          { ac_try='test -s conftest$ac_exeext'
17800   { (eval echo "$as_me:17800: \"$ac_try\"") >&5
17801   (eval $ac_try) 2>&5
17802   ac_status=$?
17803   echo "$as_me:17803: \$? = $ac_status" >&5
17804   (exit $ac_status); }; }; then
17805   cf_cv_have___va_copy=yes
17806 else
17807   echo "$as_me: failed program was:" >&5
17808 cat conftest.$ac_ext >&5
17809 cf_cv_have___va_copy=no
17810 fi
17811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17812 fi
17813 echo "$as_me:17813: result: $cf_cv_have___va_copy" >&5
17814 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17815
17816 test "$cf_cv_have___va_copy" = yes &&
17817 cat >>confdefs.h <<\EOF
17818 #define HAVE___VA_COPY 1
17819 EOF
17820
17821 echo "$as_me:17821: checking for pid_t" >&5
17822 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17823 if test "${ac_cv_type_pid_t+set}" = set; then
17824   echo $ECHO_N "(cached) $ECHO_C" >&6
17825 else
17826   cat >conftest.$ac_ext <<_ACEOF
17827 #line 17827 "configure"
17828 #include "confdefs.h"
17829 $ac_includes_default
17830 int
17831 main ()
17832 {
17833 if ((pid_t *) 0)
17834   return 0;
17835 if (sizeof (pid_t))
17836   return 0;
17837   ;
17838   return 0;
17839 }
17840 _ACEOF
17841 rm -f conftest.$ac_objext
17842 if { (eval echo "$as_me:17842: \"$ac_compile\"") >&5
17843   (eval $ac_compile) 2>&5
17844   ac_status=$?
17845   echo "$as_me:17845: \$? = $ac_status" >&5
17846   (exit $ac_status); } &&
17847          { ac_try='test -s conftest.$ac_objext'
17848   { (eval echo "$as_me:17848: \"$ac_try\"") >&5
17849   (eval $ac_try) 2>&5
17850   ac_status=$?
17851   echo "$as_me:17851: \$? = $ac_status" >&5
17852   (exit $ac_status); }; }; then
17853   ac_cv_type_pid_t=yes
17854 else
17855   echo "$as_me: failed program was:" >&5
17856 cat conftest.$ac_ext >&5
17857 ac_cv_type_pid_t=no
17858 fi
17859 rm -f conftest.$ac_objext conftest.$ac_ext
17860 fi
17861 echo "$as_me:17861: result: $ac_cv_type_pid_t" >&5
17862 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17863 if test $ac_cv_type_pid_t = yes; then
17864   :
17865 else
17866
17867 cat >>confdefs.h <<EOF
17868 #define pid_t int
17869 EOF
17870
17871 fi
17872
17873 for ac_header in unistd.h vfork.h
17874 do
17875 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17876 echo "$as_me:17876: checking for $ac_header" >&5
17877 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17878 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17879   echo $ECHO_N "(cached) $ECHO_C" >&6
17880 else
17881   cat >conftest.$ac_ext <<_ACEOF
17882 #line 17882 "configure"
17883 #include "confdefs.h"
17884 #include <$ac_header>
17885 _ACEOF
17886 if { (eval echo "$as_me:17886: \"$ac_cpp conftest.$ac_ext\"") >&5
17887   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17888   ac_status=$?
17889   egrep -v '^ *\+' conftest.er1 >conftest.err
17890   rm -f conftest.er1
17891   cat conftest.err >&5
17892   echo "$as_me:17892: \$? = $ac_status" >&5
17893   (exit $ac_status); } >/dev/null; then
17894   if test -s conftest.err; then
17895     ac_cpp_err=$ac_c_preproc_warn_flag
17896   else
17897     ac_cpp_err=
17898   fi
17899 else
17900   ac_cpp_err=yes
17901 fi
17902 if test -z "$ac_cpp_err"; then
17903   eval "$as_ac_Header=yes"
17904 else
17905   echo "$as_me: failed program was:" >&5
17906   cat conftest.$ac_ext >&5
17907   eval "$as_ac_Header=no"
17908 fi
17909 rm -f conftest.err conftest.$ac_ext
17910 fi
17911 echo "$as_me:17911: result: `eval echo '${'$as_ac_Header'}'`" >&5
17912 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17913 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17914   cat >>confdefs.h <<EOF
17915 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17916 EOF
17917
17918 fi
17919 done
17920
17921 for ac_func in fork vfork
17922 do
17923 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17924 echo "$as_me:17924: checking for $ac_func" >&5
17925 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17926 if eval "test \"\${$as_ac_var+set}\" = set"; then
17927   echo $ECHO_N "(cached) $ECHO_C" >&6
17928 else
17929   cat >conftest.$ac_ext <<_ACEOF
17930 #line 17930 "configure"
17931 #include "confdefs.h"
17932 /* System header to define __stub macros and hopefully few prototypes,
17933     which can conflict with char $ac_func (); below.  */
17934 #include <assert.h>
17935 /* Override any gcc2 internal prototype to avoid an error.  */
17936 #ifdef __cplusplus
17937 extern "C"
17938 #endif
17939 /* We use char because int might match the return type of a gcc2
17940    builtin and then its argument prototype would still apply.  */
17941 char $ac_func ();
17942 char (*f) ();
17943
17944 int
17945 main ()
17946 {
17947 /* The GNU C library defines this for functions which it implements
17948     to always fail with ENOSYS.  Some functions are actually named
17949     something starting with __ and the normal name is an alias.  */
17950 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17951 choke me
17952 #else
17953 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17954 #endif
17955
17956   ;
17957   return 0;
17958 }
17959 _ACEOF
17960 rm -f conftest.$ac_objext conftest$ac_exeext
17961 if { (eval echo "$as_me:17961: \"$ac_link\"") >&5
17962   (eval $ac_link) 2>&5
17963   ac_status=$?
17964   echo "$as_me:17964: \$? = $ac_status" >&5
17965   (exit $ac_status); } &&
17966          { ac_try='test -s conftest$ac_exeext'
17967   { (eval echo "$as_me:17967: \"$ac_try\"") >&5
17968   (eval $ac_try) 2>&5
17969   ac_status=$?
17970   echo "$as_me:17970: \$? = $ac_status" >&5
17971   (exit $ac_status); }; }; then
17972   eval "$as_ac_var=yes"
17973 else
17974   echo "$as_me: failed program was:" >&5
17975 cat conftest.$ac_ext >&5
17976 eval "$as_ac_var=no"
17977 fi
17978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17979 fi
17980 echo "$as_me:17980: result: `eval echo '${'$as_ac_var'}'`" >&5
17981 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17982 if test `eval echo '${'$as_ac_var'}'` = yes; then
17983   cat >>confdefs.h <<EOF
17984 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17985 EOF
17986
17987 fi
17988 done
17989
17990 ac_cv_func_fork_works=$ac_cv_func_fork
17991 if test "x$ac_cv_func_fork" = xyes; then
17992   echo "$as_me:17992: checking for working fork" >&5
17993 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17994 if test "${ac_cv_func_fork_works+set}" = set; then
17995   echo $ECHO_N "(cached) $ECHO_C" >&6
17996 else
17997   if test "$cross_compiling" = yes; then
17998   ac_cv_func_fork_works=cross
17999 else
18000   cat >conftest.$ac_ext <<_ACEOF
18001 /* By Rüdiger Kuhlmann. */
18002       #include <sys/types.h>
18003       #if HAVE_UNISTD_H
18004       # include <unistd.h>
18005       #endif
18006       /* Some systems only have a dummy stub for fork() */
18007       int main ()
18008       {
18009         if (fork() < 0)
18010           $ac_main_return (1);
18011         $ac_main_return (0);
18012       }
18013 _ACEOF
18014 rm -f conftest$ac_exeext
18015 if { (eval echo "$as_me:18015: \"$ac_link\"") >&5
18016   (eval $ac_link) 2>&5
18017   ac_status=$?
18018   echo "$as_me:18018: \$? = $ac_status" >&5
18019   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18020   { (eval echo "$as_me:18020: \"$ac_try\"") >&5
18021   (eval $ac_try) 2>&5
18022   ac_status=$?
18023   echo "$as_me:18023: \$? = $ac_status" >&5
18024   (exit $ac_status); }; }; then
18025   ac_cv_func_fork_works=yes
18026 else
18027   echo "$as_me: program exited with status $ac_status" >&5
18028 echo "$as_me: failed program was:" >&5
18029 cat conftest.$ac_ext >&5
18030 ac_cv_func_fork_works=no
18031 fi
18032 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18033 fi
18034 fi
18035 echo "$as_me:18035: result: $ac_cv_func_fork_works" >&5
18036 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18037
18038 fi
18039 if test "x$ac_cv_func_fork_works" = xcross; then
18040   case $host in
18041     *-*-amigaos* | *-*-msdosdjgpp*)
18042       # Override, as these systems have only a dummy fork() stub
18043       ac_cv_func_fork_works=no
18044       ;;
18045     *)
18046       ac_cv_func_fork_works=yes
18047       ;;
18048   esac
18049   { echo "$as_me:18049: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18050 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18051 fi
18052 ac_cv_func_vfork_works=$ac_cv_func_vfork
18053 if test "x$ac_cv_func_vfork" = xyes; then
18054   echo "$as_me:18054: checking for working vfork" >&5
18055 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18056 if test "${ac_cv_func_vfork_works+set}" = set; then
18057   echo $ECHO_N "(cached) $ECHO_C" >&6
18058 else
18059   if test "$cross_compiling" = yes; then
18060   ac_cv_func_vfork_works=cross
18061 else
18062   cat >conftest.$ac_ext <<_ACEOF
18063 #line 18063 "configure"
18064 #include "confdefs.h"
18065 /* Thanks to Paul Eggert for this test.  */
18066 #include <stdio.h>
18067 #include <sys/types.h>
18068 #include <sys/stat.h>
18069 #if HAVE_UNISTD_H
18070 # include <unistd.h>
18071 #endif
18072 #if HAVE_VFORK_H
18073 # include <vfork.h>
18074 #endif
18075 /* On some sparc systems, changes by the child to local and incoming
18076    argument registers are propagated back to the parent.  The compiler
18077    is told about this with #include <vfork.h>, but some compilers
18078    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18079    static variable whose address is put into a register that is
18080    clobbered by the vfork.  */
18081 static
18082 #ifdef __cplusplus
18083 sparc_address_test (int arg)
18084 # else
18085 sparc_address_test (arg) int arg;
18086 #endif
18087 {
18088   static pid_t child;
18089   if (!child) {
18090     child = vfork ();
18091     if (child < 0) {
18092       perror ("vfork");
18093       _exit(2);
18094     }
18095     if (!child) {
18096       arg = getpid();
18097       write(-1, "", 0);
18098       _exit (arg);
18099     }
18100   }
18101 }
18102
18103 int
18104 main ()
18105 {
18106   pid_t parent = getpid ();
18107   pid_t child;
18108
18109   sparc_address_test ();
18110
18111   child = vfork ();
18112
18113   if (child == 0) {
18114     /* Here is another test for sparc vfork register problems.  This
18115        test uses lots of local variables, at least as many local
18116        variables as main has allocated so far including compiler
18117        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18118        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18119        reuse the register of parent for one of the local variables,
18120        since it will think that parent can't possibly be used any more
18121        in this routine.  Assigning to the local variable will thus
18122        munge parent in the parent process.  */
18123     pid_t
18124       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18125       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18126     /* Convince the compiler that p..p7 are live; otherwise, it might
18127        use the same hardware register for all 8 local variables.  */
18128     if (p != p1 || p != p2 || p != p3 || p != p4
18129         || p != p5 || p != p6 || p != p7)
18130       _exit(1);
18131
18132     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18133        from child file descriptors.  If the child closes a descriptor
18134        before it execs or exits, this munges the parent's descriptor
18135        as well.  Test for this by closing stdout in the child.  */
18136     _exit(close(fileno(stdout)) != 0);
18137   } else {
18138     int status;
18139     struct stat st;
18140
18141     while (wait(&status) != child)
18142       ;
18143     $ac_main_return(
18144          /* Was there some problem with vforking?  */
18145          child < 0
18146
18147          /* Did the child fail?  (This shouldn't happen.)  */
18148          || status
18149
18150          /* Did the vfork/compiler bug occur?  */
18151          || parent != getpid()
18152
18153          /* Did the file descriptor bug occur?  */
18154          || fstat(fileno(stdout), &st) != 0
18155          );
18156   }
18157 }
18158 _ACEOF
18159 rm -f conftest$ac_exeext
18160 if { (eval echo "$as_me:18160: \"$ac_link\"") >&5
18161   (eval $ac_link) 2>&5
18162   ac_status=$?
18163   echo "$as_me:18163: \$? = $ac_status" >&5
18164   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18165   { (eval echo "$as_me:18165: \"$ac_try\"") >&5
18166   (eval $ac_try) 2>&5
18167   ac_status=$?
18168   echo "$as_me:18168: \$? = $ac_status" >&5
18169   (exit $ac_status); }; }; then
18170   ac_cv_func_vfork_works=yes
18171 else
18172   echo "$as_me: program exited with status $ac_status" >&5
18173 echo "$as_me: failed program was:" >&5
18174 cat conftest.$ac_ext >&5
18175 ac_cv_func_vfork_works=no
18176 fi
18177 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18178 fi
18179 fi
18180 echo "$as_me:18180: result: $ac_cv_func_vfork_works" >&5
18181 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18182
18183 fi;
18184 if test "x$ac_cv_func_fork_works" = xcross; then
18185   ac_cv_func_vfork_works=ac_cv_func_vfork
18186   { echo "$as_me:18186: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18187 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18188 fi
18189
18190 if test "x$ac_cv_func_vfork_works" = xyes; then
18191
18192 cat >>confdefs.h <<\EOF
18193 #define HAVE_WORKING_VFORK 1
18194 EOF
18195
18196 else
18197
18198 cat >>confdefs.h <<\EOF
18199 #define vfork fork
18200 EOF
18201
18202 fi
18203 if test "x$ac_cv_func_fork_works" = xyes; then
18204
18205 cat >>confdefs.h <<\EOF
18206 #define HAVE_WORKING_FORK 1
18207 EOF
18208
18209 fi
18210
18211 # special check for test/ditto.c
18212
18213 echo "$as_me:18213: checking for openpty in -lutil" >&5
18214 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18215 if test "${ac_cv_lib_util_openpty+set}" = set; then
18216   echo $ECHO_N "(cached) $ECHO_C" >&6
18217 else
18218   ac_check_lib_save_LIBS=$LIBS
18219 LIBS="-lutil  $LIBS"
18220 cat >conftest.$ac_ext <<_ACEOF
18221 #line 18221 "configure"
18222 #include "confdefs.h"
18223
18224 /* Override any gcc2 internal prototype to avoid an error.  */
18225 #ifdef __cplusplus
18226 extern "C"
18227 #endif
18228 /* We use char because int might match the return type of a gcc2
18229    builtin and then its argument prototype would still apply.  */
18230 char openpty ();
18231 int
18232 main ()
18233 {
18234 openpty ();
18235   ;
18236   return 0;
18237 }
18238 _ACEOF
18239 rm -f conftest.$ac_objext conftest$ac_exeext
18240 if { (eval echo "$as_me:18240: \"$ac_link\"") >&5
18241   (eval $ac_link) 2>&5
18242   ac_status=$?
18243   echo "$as_me:18243: \$? = $ac_status" >&5
18244   (exit $ac_status); } &&
18245          { ac_try='test -s conftest$ac_exeext'
18246   { (eval echo "$as_me:18246: \"$ac_try\"") >&5
18247   (eval $ac_try) 2>&5
18248   ac_status=$?
18249   echo "$as_me:18249: \$? = $ac_status" >&5
18250   (exit $ac_status); }; }; then
18251   ac_cv_lib_util_openpty=yes
18252 else
18253   echo "$as_me: failed program was:" >&5
18254 cat conftest.$ac_ext >&5
18255 ac_cv_lib_util_openpty=no
18256 fi
18257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18258 LIBS=$ac_check_lib_save_LIBS
18259 fi
18260 echo "$as_me:18260: result: $ac_cv_lib_util_openpty" >&5
18261 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18262 if test $ac_cv_lib_util_openpty = yes; then
18263   cf_cv_lib_util=yes
18264 else
18265   cf_cv_lib_util=no
18266 fi
18267
18268 echo "$as_me:18268: checking for openpty header" >&5
18269 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18270 if test "${cf_cv_func_openpty+set}" = set; then
18271   echo $ECHO_N "(cached) $ECHO_C" >&6
18272 else
18273
18274     cf_save_LIBS="$LIBS"
18275     test $cf_cv_lib_util = yes &&
18276 cf_add_libs="-lutil"
18277 # Filter out duplicates - this happens with badly-designed ".pc" files...
18278 for cf_add_1lib in $LIBS
18279 do
18280         for cf_add_2lib in $cf_add_libs
18281         do
18282                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18283                 then
18284                         cf_add_1lib=
18285                         break
18286                 fi
18287         done
18288         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18289 done
18290 LIBS="$cf_add_libs"
18291
18292     for cf_header in pty.h libutil.h util.h
18293     do
18294     cat >conftest.$ac_ext <<_ACEOF
18295 #line 18295 "configure"
18296 #include "confdefs.h"
18297
18298 #include <$cf_header>
18299
18300 int
18301 main ()
18302 {
18303
18304     int x = openpty((int *)0, (int *)0, (char *)0,
18305                    (struct termios *)0, (struct winsize *)0);
18306
18307   ;
18308   return 0;
18309 }
18310 _ACEOF
18311 rm -f conftest.$ac_objext conftest$ac_exeext
18312 if { (eval echo "$as_me:18312: \"$ac_link\"") >&5
18313   (eval $ac_link) 2>&5
18314   ac_status=$?
18315   echo "$as_me:18315: \$? = $ac_status" >&5
18316   (exit $ac_status); } &&
18317          { ac_try='test -s conftest$ac_exeext'
18318   { (eval echo "$as_me:18318: \"$ac_try\"") >&5
18319   (eval $ac_try) 2>&5
18320   ac_status=$?
18321   echo "$as_me:18321: \$? = $ac_status" >&5
18322   (exit $ac_status); }; }; then
18323
18324         cf_cv_func_openpty=$cf_header
18325         break
18326
18327 else
18328   echo "$as_me: failed program was:" >&5
18329 cat conftest.$ac_ext >&5
18330
18331         cf_cv_func_openpty=no
18332
18333 fi
18334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18335     done
18336     LIBS="$cf_save_LIBS"
18337
18338 fi
18339 echo "$as_me:18339: result: $cf_cv_func_openpty" >&5
18340 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18341
18342 if test "$cf_cv_func_openpty" != no ; then
18343
18344 cat >>confdefs.h <<EOF
18345 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18346 EOF
18347
18348 cat >>confdefs.h <<\EOF
18349 #define USE_XTERM_PTY 1
18350 EOF
18351
18352     if test "x$cf_cv_lib_util" = xyes ; then
18353
18354 cf_add_libs="-lutil"
18355 # Filter out duplicates - this happens with badly-designed ".pc" files...
18356 for cf_add_1lib in $TEST_LIBS
18357 do
18358         for cf_add_2lib in $cf_add_libs
18359         do
18360                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18361                 then
18362                         cf_add_1lib=
18363                         break
18364                 fi
18365         done
18366         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18367 done
18368 TEST_LIBS="$cf_add_libs"
18369
18370     fi
18371 fi
18372
18373 if test "$with_hashed_db" != no ; then
18374
18375 cat >>confdefs.h <<\EOF
18376 #define USE_HASHED_DB 1
18377 EOF
18378
18379 case $with_hashed_db in #(vi
18380 yes|*able*) #(vi
18381     ;;
18382 *)
18383     if test -d "$with_hashed_db" ; then
18384
18385 if test -n "$with_hashed_db/include" ; then
18386   for cf_add_incdir in $with_hashed_db/include
18387   do
18388         while test $cf_add_incdir != /usr/include
18389         do
18390           if test -d $cf_add_incdir
18391           then
18392                 cf_have_incdir=no
18393                 if test -n "$CFLAGS$CPPFLAGS" ; then
18394                   # a loop is needed to ensure we can add subdirs of existing dirs
18395                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18396                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18397                           cf_have_incdir=yes; break
18398                         fi
18399                   done
18400                 fi
18401
18402                 if test "$cf_have_incdir" = no ; then
18403                   if test "$cf_add_incdir" = /usr/local/include ; then
18404                         if test "$GCC" = yes
18405                         then
18406                           cf_save_CPPFLAGS=$CPPFLAGS
18407                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18408                           cat >conftest.$ac_ext <<_ACEOF
18409 #line 18409 "configure"
18410 #include "confdefs.h"
18411 #include <stdio.h>
18412 int
18413 main ()
18414 {
18415 printf("Hello")
18416   ;
18417   return 0;
18418 }
18419 _ACEOF
18420 rm -f conftest.$ac_objext
18421 if { (eval echo "$as_me:18421: \"$ac_compile\"") >&5
18422   (eval $ac_compile) 2>&5
18423   ac_status=$?
18424   echo "$as_me:18424: \$? = $ac_status" >&5
18425   (exit $ac_status); } &&
18426          { ac_try='test -s conftest.$ac_objext'
18427   { (eval echo "$as_me:18427: \"$ac_try\"") >&5
18428   (eval $ac_try) 2>&5
18429   ac_status=$?
18430   echo "$as_me:18430: \$? = $ac_status" >&5
18431   (exit $ac_status); }; }; then
18432   :
18433 else
18434   echo "$as_me: failed program was:" >&5
18435 cat conftest.$ac_ext >&5
18436 cf_have_incdir=yes
18437 fi
18438 rm -f conftest.$ac_objext conftest.$ac_ext
18439                           CPPFLAGS=$cf_save_CPPFLAGS
18440                         fi
18441                   fi
18442                 fi
18443
18444                 if test "$cf_have_incdir" = no ; then
18445                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18446
18447 echo "${as_me:-configure}:18447: testing adding $cf_add_incdir to include-path ..." 1>&5
18448
18449                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18450
18451                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18452                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18453                   cf_add_incdir="$cf_top_incdir"
18454                 else
18455                   break
18456                 fi
18457           fi
18458         done
18459   done
18460 fi
18461
18462 if test -n "$with_hashed_db/lib" ; then
18463   for cf_add_libdir in $with_hashed_db/lib
18464   do
18465     if test $cf_add_libdir = /usr/lib ; then
18466       :
18467     elif test -d $cf_add_libdir
18468     then
18469       cf_have_libdir=no
18470       if test -n "$LDFLAGS$LIBS" ; then
18471         # a loop is needed to ensure we can add subdirs of existing dirs
18472         for cf_test_libdir in $LDFLAGS $LIBS ; do
18473           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18474             cf_have_libdir=yes; break
18475           fi
18476         done
18477       fi
18478       if test "$cf_have_libdir" = no ; then
18479         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18480
18481 echo "${as_me:-configure}:18481: testing adding $cf_add_libdir to library-path ..." 1>&5
18482
18483         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18484       fi
18485     fi
18486   done
18487 fi
18488
18489         else
18490                 case "$with_hashed_db" in #(vi
18491                 ./*|../*|/*)
18492                         { echo "$as_me:18492: WARNING: no such directory $with_hashed_db" >&5
18493 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18494                         ;; #(vi
18495                 *)
18496
18497 cf_search=
18498
18499 test "x$prefix" != "xNONE" && \
18500 test -d "$prefix" && \
18501  {
18502         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18503         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18504         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18505         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18506         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18507         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18508 }
18509
18510 for cf_subdir_prefix in \
18511         /usr \
18512         /usr/local \
18513         /usr/pkg \
18514         /opt \
18515         /opt/local \
18516         $HOME
18517 do
18518
18519 test "x$cf_subdir_prefix" != "x$prefix" && \
18520 test -d "$cf_subdir_prefix" && \
18521 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18522         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18523         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18524         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18525         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18526         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18527         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"
18528 }
18529
18530 done
18531
18532         for cf_item in $cf_search
18533         do
18534                 case $cf_item in #(vi
18535                 */$with_hashed_db)
18536
18537 if test -n "$cf_item" ; then
18538   for cf_add_incdir in $cf_item
18539   do
18540         while test $cf_add_incdir != /usr/include
18541         do
18542           if test -d $cf_add_incdir
18543           then
18544                 cf_have_incdir=no
18545                 if test -n "$CFLAGS$CPPFLAGS" ; then
18546                   # a loop is needed to ensure we can add subdirs of existing dirs
18547                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18548                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18549                           cf_have_incdir=yes; break
18550                         fi
18551                   done
18552                 fi
18553
18554                 if test "$cf_have_incdir" = no ; then
18555                   if test "$cf_add_incdir" = /usr/local/include ; then
18556                         if test "$GCC" = yes
18557                         then
18558                           cf_save_CPPFLAGS=$CPPFLAGS
18559                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18560                           cat >conftest.$ac_ext <<_ACEOF
18561 #line 18561 "configure"
18562 #include "confdefs.h"
18563 #include <stdio.h>
18564 int
18565 main ()
18566 {
18567 printf("Hello")
18568   ;
18569   return 0;
18570 }
18571 _ACEOF
18572 rm -f conftest.$ac_objext
18573 if { (eval echo "$as_me:18573: \"$ac_compile\"") >&5
18574   (eval $ac_compile) 2>&5
18575   ac_status=$?
18576   echo "$as_me:18576: \$? = $ac_status" >&5
18577   (exit $ac_status); } &&
18578          { ac_try='test -s conftest.$ac_objext'
18579   { (eval echo "$as_me:18579: \"$ac_try\"") >&5
18580   (eval $ac_try) 2>&5
18581   ac_status=$?
18582   echo "$as_me:18582: \$? = $ac_status" >&5
18583   (exit $ac_status); }; }; then
18584   :
18585 else
18586   echo "$as_me: failed program was:" >&5
18587 cat conftest.$ac_ext >&5
18588 cf_have_incdir=yes
18589 fi
18590 rm -f conftest.$ac_objext conftest.$ac_ext
18591                           CPPFLAGS=$cf_save_CPPFLAGS
18592                         fi
18593                   fi
18594                 fi
18595
18596                 if test "$cf_have_incdir" = no ; then
18597                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18598
18599 echo "${as_me:-configure}:18599: testing adding $cf_add_incdir to include-path ..." 1>&5
18600
18601                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18602
18603                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18604                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18605                   cf_add_incdir="$cf_top_incdir"
18606                 else
18607                   break
18608                 fi
18609           fi
18610         done
18611   done
18612 fi
18613
18614                         ;;
18615                 esac
18616         done
18617
18618 cf_search=
18619
18620 test "x$prefix" != "xNONE" && \
18621 test -d "$prefix" && \
18622  {
18623         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18624         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18625         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18626         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18627         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18628         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18629 }
18630
18631 for cf_subdir_prefix in \
18632         /usr \
18633         /usr/local \
18634         /usr/pkg \
18635         /opt \
18636         /opt/local \
18637         $HOME
18638 do
18639
18640 test "x$cf_subdir_prefix" != "x$prefix" && \
18641 test -d "$cf_subdir_prefix" && \
18642 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18643         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18644         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18645         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18646         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18647         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18648         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"
18649 }
18650
18651 done
18652
18653         for cf_item in $cf_search
18654         do
18655                 case $cf_item in #(vi
18656                 */$with_hashed_db)
18657
18658 if test -n "$cf_item" ; then
18659   for cf_add_libdir in $cf_item
18660   do
18661     if test $cf_add_libdir = /usr/lib ; then
18662       :
18663     elif test -d $cf_add_libdir
18664     then
18665       cf_have_libdir=no
18666       if test -n "$LDFLAGS$LIBS" ; then
18667         # a loop is needed to ensure we can add subdirs of existing dirs
18668         for cf_test_libdir in $LDFLAGS $LIBS ; do
18669           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18670             cf_have_libdir=yes; break
18671           fi
18672         done
18673       fi
18674       if test "$cf_have_libdir" = no ; then
18675         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18676
18677 echo "${as_me:-configure}:18677: testing adding $cf_add_libdir to library-path ..." 1>&5
18678
18679         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18680       fi
18681     fi
18682   done
18683 fi
18684
18685                         ;;
18686                 esac
18687         done
18688
18689                         ;;
18690                 esac
18691     fi
18692 esac
18693
18694 echo "$as_me:18694: checking for db.h" >&5
18695 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18696 if test "${ac_cv_header_db_h+set}" = set; then
18697   echo $ECHO_N "(cached) $ECHO_C" >&6
18698 else
18699   cat >conftest.$ac_ext <<_ACEOF
18700 #line 18700 "configure"
18701 #include "confdefs.h"
18702 #include <db.h>
18703 _ACEOF
18704 if { (eval echo "$as_me:18704: \"$ac_cpp conftest.$ac_ext\"") >&5
18705   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18706   ac_status=$?
18707   egrep -v '^ *\+' conftest.er1 >conftest.err
18708   rm -f conftest.er1
18709   cat conftest.err >&5
18710   echo "$as_me:18710: \$? = $ac_status" >&5
18711   (exit $ac_status); } >/dev/null; then
18712   if test -s conftest.err; then
18713     ac_cpp_err=$ac_c_preproc_warn_flag
18714   else
18715     ac_cpp_err=
18716   fi
18717 else
18718   ac_cpp_err=yes
18719 fi
18720 if test -z "$ac_cpp_err"; then
18721   ac_cv_header_db_h=yes
18722 else
18723   echo "$as_me: failed program was:" >&5
18724   cat conftest.$ac_ext >&5
18725   ac_cv_header_db_h=no
18726 fi
18727 rm -f conftest.err conftest.$ac_ext
18728 fi
18729 echo "$as_me:18729: result: $ac_cv_header_db_h" >&5
18730 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18731 if test $ac_cv_header_db_h = yes; then
18732
18733 echo "$as_me:18733: checking for version of db" >&5
18734 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18735 if test "${cf_cv_hashed_db_version+set}" = set; then
18736   echo $ECHO_N "(cached) $ECHO_C" >&6
18737 else
18738
18739 cf_cv_hashed_db_version=unknown
18740
18741 for cf_db_version in 1 2 3 4 5 6
18742 do
18743
18744 echo "${as_me:-configure}:18744: testing checking for db version $cf_db_version ..." 1>&5
18745
18746         cat >conftest.$ac_ext <<_ACEOF
18747 #line 18747 "configure"
18748 #include "confdefs.h"
18749
18750 $ac_includes_default
18751 #include <db.h>
18752
18753 #ifdef DB_VERSION_MAJOR
18754         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18755 #if $cf_db_version == DB_VERSION_MAJOR
18756         /* ok */
18757 #else
18758         make an error
18759 #endif
18760 #else
18761 #if $cf_db_version == 1
18762         /* ok: assuming this is DB 1.8.5 */
18763 #else
18764         make an error
18765 #endif
18766 #endif
18767
18768 int
18769 main ()
18770 {
18771 DBT *foo = 0
18772   ;
18773   return 0;
18774 }
18775 _ACEOF
18776 rm -f conftest.$ac_objext
18777 if { (eval echo "$as_me:18777: \"$ac_compile\"") >&5
18778   (eval $ac_compile) 2>&5
18779   ac_status=$?
18780   echo "$as_me:18780: \$? = $ac_status" >&5
18781   (exit $ac_status); } &&
18782          { ac_try='test -s conftest.$ac_objext'
18783   { (eval echo "$as_me:18783: \"$ac_try\"") >&5
18784   (eval $ac_try) 2>&5
18785   ac_status=$?
18786   echo "$as_me:18786: \$? = $ac_status" >&5
18787   (exit $ac_status); }; }; then
18788
18789         cf_cv_hashed_db_version=$cf_db_version
18790         break
18791
18792 else
18793   echo "$as_me: failed program was:" >&5
18794 cat conftest.$ac_ext >&5
18795 fi
18796 rm -f conftest.$ac_objext conftest.$ac_ext
18797 done
18798
18799 fi
18800 echo "$as_me:18800: result: $cf_cv_hashed_db_version" >&5
18801 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18802
18803 if test "$cf_cv_hashed_db_version" = unknown ; then
18804         { { echo "$as_me:18804: error: Cannot determine version of db" >&5
18805 echo "$as_me: error: Cannot determine version of db" >&2;}
18806    { (exit 1); exit 1; }; }
18807 else
18808
18809 echo "$as_me:18809: checking for db libraries" >&5
18810 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18811 if test "${cf_cv_hashed_db_libs+set}" = set; then
18812   echo $ECHO_N "(cached) $ECHO_C" >&6
18813 else
18814
18815 cf_cv_hashed_db_libs=unknown
18816 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18817 do
18818         cf_save_libs="$LIBS"
18819         if test -n "$cf_db_libs"; then
18820
18821 cf_add_libs="-l$cf_db_libs"
18822 # Filter out duplicates - this happens with badly-designed ".pc" files...
18823 for cf_add_1lib in $LIBS
18824 do
18825         for cf_add_2lib in $cf_add_libs
18826         do
18827                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18828                 then
18829                         cf_add_1lib=
18830                         break
18831                 fi
18832         done
18833         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18834 done
18835 LIBS="$cf_add_libs"
18836
18837         fi
18838
18839 echo "${as_me:-configure}:18839: testing checking for library "$cf_db_libs" ..." 1>&5
18840
18841         cat >conftest.$ac_ext <<_ACEOF
18842 #line 18842 "configure"
18843 #include "confdefs.h"
18844
18845 $ac_includes_default
18846 #include <db.h>
18847
18848 int
18849 main ()
18850 {
18851
18852         char *path = "/tmp/foo";
18853 #ifdef DB_VERSION_MAJOR
18854 #if DB_VERSION_MAJOR >= 4
18855         DB *result = 0;
18856         db_create(&result, NULL, 0);
18857         result->open(result,
18858                 NULL,
18859                 path,
18860                 path,
18861                 DB_HASH,
18862                 DB_CREATE,
18863                 0644);
18864 #elif DB_VERSION_MAJOR >= 3
18865         DB *result = 0;
18866         db_create(&result, NULL, 0);
18867         result->open(result,
18868                 path,
18869                 path,
18870                 DB_HASH,
18871                 DB_CREATE,
18872                 0644);
18873 #elif DB_VERSION_MAJOR >= 2
18874         DB *result = 0;
18875         db_open(path,
18876                 DB_HASH,
18877                 DB_CREATE,
18878                 0644,
18879                 (DB_ENV *) 0,
18880                 (DB_INFO *) 0,
18881                 &result);
18882 #endif /* DB_VERSION_MAJOR */
18883 #else
18884         DB *result = dbopen(path,
18885                      2,
18886                      0644,
18887                      DB_HASH,
18888                      0);
18889 #endif
18890         ${cf_cv_main_return:-return}(result != 0)
18891
18892   ;
18893   return 0;
18894 }
18895 _ACEOF
18896 rm -f conftest.$ac_objext conftest$ac_exeext
18897 if { (eval echo "$as_me:18897: \"$ac_link\"") >&5
18898   (eval $ac_link) 2>&5
18899   ac_status=$?
18900   echo "$as_me:18900: \$? = $ac_status" >&5
18901   (exit $ac_status); } &&
18902          { ac_try='test -s conftest$ac_exeext'
18903   { (eval echo "$as_me:18903: \"$ac_try\"") >&5
18904   (eval $ac_try) 2>&5
18905   ac_status=$?
18906   echo "$as_me:18906: \$? = $ac_status" >&5
18907   (exit $ac_status); }; }; then
18908
18909         if test -n "$cf_db_libs" ; then
18910                 cf_cv_hashed_db_libs=$cf_db_libs
18911         else
18912                 cf_cv_hashed_db_libs=default
18913         fi
18914         LIBS="$cf_save_libs"
18915         break
18916
18917 else
18918   echo "$as_me: failed program was:" >&5
18919 cat conftest.$ac_ext >&5
18920 fi
18921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18922         LIBS="$cf_save_libs"
18923 done
18924
18925 fi
18926 echo "$as_me:18926: result: $cf_cv_hashed_db_libs" >&5
18927 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18928
18929         if test "$cf_cv_hashed_db_libs" = unknown ; then
18930                 { { echo "$as_me:18930: error: Cannot determine library for db" >&5
18931 echo "$as_me: error: Cannot determine library for db" >&2;}
18932    { (exit 1); exit 1; }; }
18933         elif test "$cf_cv_hashed_db_libs" != default ; then
18934
18935 cf_add_libs="-l$cf_cv_hashed_db_libs"
18936 # Filter out duplicates - this happens with badly-designed ".pc" files...
18937 for cf_add_1lib in $LIBS
18938 do
18939         for cf_add_2lib in $cf_add_libs
18940         do
18941                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18942                 then
18943                         cf_add_1lib=
18944                         break
18945                 fi
18946         done
18947         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18948 done
18949 LIBS="$cf_add_libs"
18950
18951         fi
18952 fi
18953
18954 else
18955
18956         { { echo "$as_me:18956: error: Cannot find db.h" >&5
18957 echo "$as_me: error: Cannot find db.h" >&2;}
18958    { (exit 1); exit 1; }; }
18959
18960 fi
18961
18962 fi
18963
18964 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18965         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18966         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18967 fi
18968
18969 # Just in case, check if the C compiler has a bool type.
18970
18971 echo "$as_me:18971: checking if we should include stdbool.h" >&5
18972 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18973
18974 if test "${cf_cv_header_stdbool_h+set}" = set; then
18975   echo $ECHO_N "(cached) $ECHO_C" >&6
18976 else
18977
18978         cat >conftest.$ac_ext <<_ACEOF
18979 #line 18979 "configure"
18980 #include "confdefs.h"
18981
18982 int
18983 main ()
18984 {
18985 bool foo = false
18986   ;
18987   return 0;
18988 }
18989 _ACEOF
18990 rm -f conftest.$ac_objext
18991 if { (eval echo "$as_me:18991: \"$ac_compile\"") >&5
18992   (eval $ac_compile) 2>&5
18993   ac_status=$?
18994   echo "$as_me:18994: \$? = $ac_status" >&5
18995   (exit $ac_status); } &&
18996          { ac_try='test -s conftest.$ac_objext'
18997   { (eval echo "$as_me:18997: \"$ac_try\"") >&5
18998   (eval $ac_try) 2>&5
18999   ac_status=$?
19000   echo "$as_me:19000: \$? = $ac_status" >&5
19001   (exit $ac_status); }; }; then
19002   cf_cv_header_stdbool_h=0
19003 else
19004   echo "$as_me: failed program was:" >&5
19005 cat conftest.$ac_ext >&5
19006 cat >conftest.$ac_ext <<_ACEOF
19007 #line 19007 "configure"
19008 #include "confdefs.h"
19009
19010 #ifndef __BEOS__
19011 #include <stdbool.h>
19012 #endif
19013
19014 int
19015 main ()
19016 {
19017 bool foo = false
19018   ;
19019   return 0;
19020 }
19021 _ACEOF
19022 rm -f conftest.$ac_objext
19023 if { (eval echo "$as_me:19023: \"$ac_compile\"") >&5
19024   (eval $ac_compile) 2>&5
19025   ac_status=$?
19026   echo "$as_me:19026: \$? = $ac_status" >&5
19027   (exit $ac_status); } &&
19028          { ac_try='test -s conftest.$ac_objext'
19029   { (eval echo "$as_me:19029: \"$ac_try\"") >&5
19030   (eval $ac_try) 2>&5
19031   ac_status=$?
19032   echo "$as_me:19032: \$? = $ac_status" >&5
19033   (exit $ac_status); }; }; then
19034   cf_cv_header_stdbool_h=1
19035 else
19036   echo "$as_me: failed program was:" >&5
19037 cat conftest.$ac_ext >&5
19038 cf_cv_header_stdbool_h=0
19039 fi
19040 rm -f conftest.$ac_objext conftest.$ac_ext
19041 fi
19042 rm -f conftest.$ac_objext conftest.$ac_ext
19043 fi
19044
19045 if test "$cf_cv_header_stdbool_h" = 1
19046 then    echo "$as_me:19046: result: yes" >&5
19047 echo "${ECHO_T}yes" >&6
19048 else    echo "$as_me:19048: result: no" >&5
19049 echo "${ECHO_T}no" >&6
19050 fi
19051
19052 echo "$as_me:19052: checking for builtin bool type" >&5
19053 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19054
19055 if test "${cf_cv_cc_bool_type+set}" = set; then
19056   echo $ECHO_N "(cached) $ECHO_C" >&6
19057 else
19058
19059         cat >conftest.$ac_ext <<_ACEOF
19060 #line 19060 "configure"
19061 #include "confdefs.h"
19062
19063 #include <stdio.h>
19064 #include <sys/types.h>
19065
19066 int
19067 main ()
19068 {
19069 bool x = false
19070   ;
19071   return 0;
19072 }
19073 _ACEOF
19074 rm -f conftest.$ac_objext
19075 if { (eval echo "$as_me:19075: \"$ac_compile\"") >&5
19076   (eval $ac_compile) 2>&5
19077   ac_status=$?
19078   echo "$as_me:19078: \$? = $ac_status" >&5
19079   (exit $ac_status); } &&
19080          { ac_try='test -s conftest.$ac_objext'
19081   { (eval echo "$as_me:19081: \"$ac_try\"") >&5
19082   (eval $ac_try) 2>&5
19083   ac_status=$?
19084   echo "$as_me:19084: \$? = $ac_status" >&5
19085   (exit $ac_status); }; }; then
19086   cf_cv_cc_bool_type=1
19087 else
19088   echo "$as_me: failed program was:" >&5
19089 cat conftest.$ac_ext >&5
19090 cf_cv_cc_bool_type=0
19091 fi
19092 rm -f conftest.$ac_objext conftest.$ac_ext
19093
19094 fi
19095
19096 if test "$cf_cv_cc_bool_type" = 1
19097 then    echo "$as_me:19097: result: yes" >&5
19098 echo "${ECHO_T}yes" >&6
19099 else    echo "$as_me:19099: result: no" >&5
19100 echo "${ECHO_T}no" >&6
19101 fi
19102
19103 # Check for C++ compiler characteristics (and ensure that it's there!)
19104 if test -n "$CXX" ; then
19105         ac_ext=cc
19106 ac_cpp='$CXXCPP $CPPFLAGS'
19107 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19108 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19109 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19110 ac_main_return=return
19111
19112 if test -n "$GXX" ; then
19113 case $cf_cv_system_name in #(vi
19114 os2*) #(vi
19115         cf_stdcpp_libname=stdcpp
19116         ;;
19117 *)
19118         cf_stdcpp_libname=stdc++
19119         ;;
19120 esac
19121 echo "$as_me:19121: checking for library $cf_stdcpp_libname" >&5
19122 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19123 if test "${cf_cv_libstdcpp+set}" = set; then
19124   echo $ECHO_N "(cached) $ECHO_C" >&6
19125 else
19126
19127         cf_save="$LIBS"
19128
19129 cf_add_libs="-l$cf_stdcpp_libname"
19130 # Filter out duplicates - this happens with badly-designed ".pc" files...
19131 for cf_add_1lib in $LIBS
19132 do
19133         for cf_add_2lib in $cf_add_libs
19134         do
19135                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19136                 then
19137                         cf_add_1lib=
19138                         break
19139                 fi
19140         done
19141         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19142 done
19143 LIBS="$cf_add_libs"
19144
19145 cat >conftest.$ac_ext <<_ACEOF
19146 #line 19146 "configure"
19147 #include "confdefs.h"
19148
19149 #include <strstream.h>
19150 int
19151 main ()
19152 {
19153
19154 char buf[80];
19155 strstreambuf foo(buf, sizeof(buf))
19156
19157   ;
19158   return 0;
19159 }
19160 _ACEOF
19161 rm -f conftest.$ac_objext conftest$ac_exeext
19162 if { (eval echo "$as_me:19162: \"$ac_link\"") >&5
19163   (eval $ac_link) 2>&5
19164   ac_status=$?
19165   echo "$as_me:19165: \$? = $ac_status" >&5
19166   (exit $ac_status); } &&
19167          { ac_try='test -s conftest$ac_exeext'
19168   { (eval echo "$as_me:19168: \"$ac_try\"") >&5
19169   (eval $ac_try) 2>&5
19170   ac_status=$?
19171   echo "$as_me:19171: \$? = $ac_status" >&5
19172   (exit $ac_status); }; }; then
19173   cf_cv_libstdcpp=yes
19174 else
19175   echo "$as_me: failed program was:" >&5
19176 cat conftest.$ac_ext >&5
19177 cf_cv_libstdcpp=no
19178 fi
19179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19180         LIBS="$cf_save"
19181
19182 fi
19183 echo "$as_me:19183: result: $cf_cv_libstdcpp" >&5
19184 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19185 test "$cf_cv_libstdcpp" = yes &&
19186 cf_add_libs="-l$cf_stdcpp_libname"
19187 # Filter out duplicates - this happens with badly-designed ".pc" files...
19188 for cf_add_1lib in $CXXLIBS
19189 do
19190         for cf_add_2lib in $cf_add_libs
19191         do
19192                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19193                 then
19194                         cf_add_1lib=
19195                         break
19196                 fi
19197         done
19198         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19199 done
19200 CXXLIBS="$cf_add_libs"
19201
19202 fi
19203
19204         echo "$as_me:19204: checking whether $CXX understands -c and -o together" >&5
19205 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19206 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19207   echo $ECHO_N "(cached) $ECHO_C" >&6
19208 else
19209
19210 cat > conftest.$ac_ext <<CF_EOF
19211 #include <stdio.h>
19212 int main()
19213 {
19214         ${cf_cv_main_return:-return}(0);
19215 }
19216 CF_EOF
19217 # We do the test twice because some compilers refuse to overwrite an
19218 # existing .o file with -o, though they will create one.
19219 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19220 if { (eval echo "$as_me:19220: \"$ac_try\"") >&5
19221   (eval $ac_try) 2>&5
19222   ac_status=$?
19223   echo "$as_me:19223: \$? = $ac_status" >&5
19224   (exit $ac_status); } &&
19225   test -f conftest2.$ac_objext && { (eval echo "$as_me:19225: \"$ac_try\"") >&5
19226   (eval $ac_try) 2>&5
19227   ac_status=$?
19228   echo "$as_me:19228: \$? = $ac_status" >&5
19229   (exit $ac_status); };
19230 then
19231   eval cf_cv_prog_CXX_c_o=yes
19232 else
19233   eval cf_cv_prog_CXX_c_o=no
19234 fi
19235 rm -rf conftest*
19236
19237 fi
19238 if test $cf_cv_prog_CXX_c_o = yes; then
19239   echo "$as_me:19239: result: yes" >&5
19240 echo "${ECHO_T}yes" >&6
19241 else
19242   echo "$as_me:19242: result: no" >&5
19243 echo "${ECHO_T}no" >&6
19244 fi
19245
19246         case $GXX_VERSION in
19247         1*|2.0-6*)
19248                 cf_cxx_library=yes
19249                 ;;
19250         *-2.7*|2.7*)
19251
19252 cf_cxx_library=unknown
19253 case $cf_cv_system_name in #(vi
19254 os2*) #(vi
19255         cf_gpp_libname=gpp
19256         ;;
19257 *)
19258         cf_gpp_libname=g++
19259         ;;
19260 esac
19261 if test "$GXX" = yes; then
19262         echo "$as_me:19262: checking for lib$cf_gpp_libname" >&5
19263 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19264         cf_save="$LIBS"
19265
19266 cf_add_libs="-l$cf_gpp_libname"
19267 # Filter out duplicates - this happens with badly-designed ".pc" files...
19268 for cf_add_1lib in $LIBS
19269 do
19270         for cf_add_2lib in $cf_add_libs
19271         do
19272                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19273                 then
19274                         cf_add_1lib=
19275                         break
19276                 fi
19277         done
19278         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19279 done
19280 LIBS="$cf_add_libs"
19281
19282         cat >conftest.$ac_ext <<_ACEOF
19283 #line 19283 "configure"
19284 #include "confdefs.h"
19285
19286 #include <$cf_gpp_libname/builtin.h>
19287
19288 int
19289 main ()
19290 {
19291 two_arg_error_handler_t foo2 = lib_error_handler
19292   ;
19293   return 0;
19294 }
19295 _ACEOF
19296 rm -f conftest.$ac_objext conftest$ac_exeext
19297 if { (eval echo "$as_me:19297: \"$ac_link\"") >&5
19298   (eval $ac_link) 2>&5
19299   ac_status=$?
19300   echo "$as_me:19300: \$? = $ac_status" >&5
19301   (exit $ac_status); } &&
19302          { ac_try='test -s conftest$ac_exeext'
19303   { (eval echo "$as_me:19303: \"$ac_try\"") >&5
19304   (eval $ac_try) 2>&5
19305   ac_status=$?
19306   echo "$as_me:19306: \$? = $ac_status" >&5
19307   (exit $ac_status); }; }; then
19308   cf_cxx_library=yes
19309
19310 cf_add_libs="-l$cf_gpp_libname"
19311 # Filter out duplicates - this happens with badly-designed ".pc" files...
19312 for cf_add_1lib in $CXXLIBS
19313 do
19314         for cf_add_2lib in $cf_add_libs
19315         do
19316                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19317                 then
19318                         cf_add_1lib=
19319                         break
19320                 fi
19321         done
19322         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19323 done
19324 CXXLIBS="$cf_add_libs"
19325
19326          if test "$cf_gpp_libname" = cpp ; then
19327
19328 cat >>confdefs.h <<\EOF
19329 #define HAVE_GPP_BUILTIN_H 1
19330 EOF
19331
19332          else
19333
19334 cat >>confdefs.h <<\EOF
19335 #define HAVE_GXX_BUILTIN_H 1
19336 EOF
19337
19338          fi
19339 else
19340   echo "$as_me: failed program was:" >&5
19341 cat conftest.$ac_ext >&5
19342 cat >conftest.$ac_ext <<_ACEOF
19343 #line 19343 "configure"
19344 #include "confdefs.h"
19345
19346 #include <builtin.h>
19347
19348 int
19349 main ()
19350 {
19351 two_arg_error_handler_t foo2 = lib_error_handler
19352   ;
19353   return 0;
19354 }
19355 _ACEOF
19356 rm -f conftest.$ac_objext conftest$ac_exeext
19357 if { (eval echo "$as_me:19357: \"$ac_link\"") >&5
19358   (eval $ac_link) 2>&5
19359   ac_status=$?
19360   echo "$as_me:19360: \$? = $ac_status" >&5
19361   (exit $ac_status); } &&
19362          { ac_try='test -s conftest$ac_exeext'
19363   { (eval echo "$as_me:19363: \"$ac_try\"") >&5
19364   (eval $ac_try) 2>&5
19365   ac_status=$?
19366   echo "$as_me:19366: \$? = $ac_status" >&5
19367   (exit $ac_status); }; }; then
19368   cf_cxx_library=yes
19369
19370 cf_add_libs="-l$cf_gpp_libname"
19371 # Filter out duplicates - this happens with badly-designed ".pc" files...
19372 for cf_add_1lib in $CXXLIBS
19373 do
19374         for cf_add_2lib in $cf_add_libs
19375         do
19376                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19377                 then
19378                         cf_add_1lib=
19379                         break
19380                 fi
19381         done
19382         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19383 done
19384 CXXLIBS="$cf_add_libs"
19385
19386 cat >>confdefs.h <<\EOF
19387 #define HAVE_BUILTIN_H 1
19388 EOF
19389
19390 else
19391   echo "$as_me: failed program was:" >&5
19392 cat conftest.$ac_ext >&5
19393 cf_cxx_library=no
19394 fi
19395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19396 fi
19397 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19398         LIBS="$cf_save"
19399         echo "$as_me:19399: result: $cf_cxx_library" >&5
19400 echo "${ECHO_T}$cf_cxx_library" >&6
19401 fi
19402
19403                 ;;
19404         *)
19405                 cf_cxx_library=no
19406                 ;;
19407         esac
19408
19409         ac_ext=cc
19410 ac_cpp='$CXXCPP $CPPFLAGS'
19411 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19412 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19413 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19414 ac_main_return=return
19415 echo "$as_me:19415: checking how to run the C++ preprocessor" >&5
19416 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19417 if test -z "$CXXCPP"; then
19418   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19419   echo $ECHO_N "(cached) $ECHO_C" >&6
19420 else
19421       # Double quotes because CXXCPP needs to be expanded
19422     for CXXCPP in "$CXX -E" "/lib/cpp"
19423     do
19424       ac_preproc_ok=false
19425 for ac_cxx_preproc_warn_flag in '' yes
19426 do
19427   # Use a header file that comes with gcc, so configuring glibc
19428   # with a fresh cross-compiler works.
19429   # On the NeXT, cc -E runs the code through the compiler's parser,
19430   # not just through cpp. "Syntax error" is here to catch this case.
19431   cat >conftest.$ac_ext <<_ACEOF
19432 #line 19432 "configure"
19433 #include "confdefs.h"
19434 #include <assert.h>
19435                      Syntax error
19436 _ACEOF
19437 if { (eval echo "$as_me:19437: \"$ac_cpp conftest.$ac_ext\"") >&5
19438   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19439   ac_status=$?
19440   egrep -v '^ *\+' conftest.er1 >conftest.err
19441   rm -f conftest.er1
19442   cat conftest.err >&5
19443   echo "$as_me:19443: \$? = $ac_status" >&5
19444   (exit $ac_status); } >/dev/null; then
19445   if test -s conftest.err; then
19446     ac_cpp_err=$ac_cxx_preproc_warn_flag
19447   else
19448     ac_cpp_err=
19449   fi
19450 else
19451   ac_cpp_err=yes
19452 fi
19453 if test -z "$ac_cpp_err"; then
19454   :
19455 else
19456   echo "$as_me: failed program was:" >&5
19457   cat conftest.$ac_ext >&5
19458   # Broken: fails on valid input.
19459 continue
19460 fi
19461 rm -f conftest.err conftest.$ac_ext
19462
19463   # OK, works on sane cases.  Now check whether non-existent headers
19464   # can be detected and how.
19465   cat >conftest.$ac_ext <<_ACEOF
19466 #line 19466 "configure"
19467 #include "confdefs.h"
19468 #include <ac_nonexistent.h>
19469 _ACEOF
19470 if { (eval echo "$as_me:19470: \"$ac_cpp conftest.$ac_ext\"") >&5
19471   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19472   ac_status=$?
19473   egrep -v '^ *\+' conftest.er1 >conftest.err
19474   rm -f conftest.er1
19475   cat conftest.err >&5
19476   echo "$as_me:19476: \$? = $ac_status" >&5
19477   (exit $ac_status); } >/dev/null; then
19478   if test -s conftest.err; then
19479     ac_cpp_err=$ac_cxx_preproc_warn_flag
19480   else
19481     ac_cpp_err=
19482   fi
19483 else
19484   ac_cpp_err=yes
19485 fi
19486 if test -z "$ac_cpp_err"; then
19487   # Broken: success on invalid input.
19488 continue
19489 else
19490   echo "$as_me: failed program was:" >&5
19491   cat conftest.$ac_ext >&5
19492   # Passes both tests.
19493 ac_preproc_ok=:
19494 break
19495 fi
19496 rm -f conftest.err conftest.$ac_ext
19497
19498 done
19499 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19500 rm -f conftest.err conftest.$ac_ext
19501 if $ac_preproc_ok; then
19502   break
19503 fi
19504
19505     done
19506     ac_cv_prog_CXXCPP=$CXXCPP
19507
19508 fi
19509   CXXCPP=$ac_cv_prog_CXXCPP
19510 else
19511   ac_cv_prog_CXXCPP=$CXXCPP
19512 fi
19513 echo "$as_me:19513: result: $CXXCPP" >&5
19514 echo "${ECHO_T}$CXXCPP" >&6
19515 ac_preproc_ok=false
19516 for ac_cxx_preproc_warn_flag in '' yes
19517 do
19518   # Use a header file that comes with gcc, so configuring glibc
19519   # with a fresh cross-compiler works.
19520   # On the NeXT, cc -E runs the code through the compiler's parser,
19521   # not just through cpp. "Syntax error" is here to catch this case.
19522   cat >conftest.$ac_ext <<_ACEOF
19523 #line 19523 "configure"
19524 #include "confdefs.h"
19525 #include <assert.h>
19526                      Syntax error
19527 _ACEOF
19528 if { (eval echo "$as_me:19528: \"$ac_cpp conftest.$ac_ext\"") >&5
19529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19530   ac_status=$?
19531   egrep -v '^ *\+' conftest.er1 >conftest.err
19532   rm -f conftest.er1
19533   cat conftest.err >&5
19534   echo "$as_me:19534: \$? = $ac_status" >&5
19535   (exit $ac_status); } >/dev/null; then
19536   if test -s conftest.err; then
19537     ac_cpp_err=$ac_cxx_preproc_warn_flag
19538   else
19539     ac_cpp_err=
19540   fi
19541 else
19542   ac_cpp_err=yes
19543 fi
19544 if test -z "$ac_cpp_err"; then
19545   :
19546 else
19547   echo "$as_me: failed program was:" >&5
19548   cat conftest.$ac_ext >&5
19549   # Broken: fails on valid input.
19550 continue
19551 fi
19552 rm -f conftest.err conftest.$ac_ext
19553
19554   # OK, works on sane cases.  Now check whether non-existent headers
19555   # can be detected and how.
19556   cat >conftest.$ac_ext <<_ACEOF
19557 #line 19557 "configure"
19558 #include "confdefs.h"
19559 #include <ac_nonexistent.h>
19560 _ACEOF
19561 if { (eval echo "$as_me:19561: \"$ac_cpp conftest.$ac_ext\"") >&5
19562   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19563   ac_status=$?
19564   egrep -v '^ *\+' conftest.er1 >conftest.err
19565   rm -f conftest.er1
19566   cat conftest.err >&5
19567   echo "$as_me:19567: \$? = $ac_status" >&5
19568   (exit $ac_status); } >/dev/null; then
19569   if test -s conftest.err; then
19570     ac_cpp_err=$ac_cxx_preproc_warn_flag
19571   else
19572     ac_cpp_err=
19573   fi
19574 else
19575   ac_cpp_err=yes
19576 fi
19577 if test -z "$ac_cpp_err"; then
19578   # Broken: success on invalid input.
19579 continue
19580 else
19581   echo "$as_me: failed program was:" >&5
19582   cat conftest.$ac_ext >&5
19583   # Passes both tests.
19584 ac_preproc_ok=:
19585 break
19586 fi
19587 rm -f conftest.err conftest.$ac_ext
19588
19589 done
19590 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19591 rm -f conftest.err conftest.$ac_ext
19592 if $ac_preproc_ok; then
19593   :
19594 else
19595   { { echo "$as_me:19595: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19596 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19597    { (exit 1); exit 1; }; }
19598 fi
19599
19600 ac_ext=cc
19601 ac_cpp='$CXXCPP $CPPFLAGS'
19602 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19603 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19604 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19605 ac_main_return=return
19606
19607 for ac_header in typeinfo
19608 do
19609 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19610 echo "$as_me:19610: checking for $ac_header" >&5
19611 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19612 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19613   echo $ECHO_N "(cached) $ECHO_C" >&6
19614 else
19615   cat >conftest.$ac_ext <<_ACEOF
19616 #line 19616 "configure"
19617 #include "confdefs.h"
19618 #include <$ac_header>
19619 _ACEOF
19620 if { (eval echo "$as_me:19620: \"$ac_cpp conftest.$ac_ext\"") >&5
19621   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19622   ac_status=$?
19623   egrep -v '^ *\+' conftest.er1 >conftest.err
19624   rm -f conftest.er1
19625   cat conftest.err >&5
19626   echo "$as_me:19626: \$? = $ac_status" >&5
19627   (exit $ac_status); } >/dev/null; then
19628   if test -s conftest.err; then
19629     ac_cpp_err=$ac_cxx_preproc_warn_flag
19630   else
19631     ac_cpp_err=
19632   fi
19633 else
19634   ac_cpp_err=yes
19635 fi
19636 if test -z "$ac_cpp_err"; then
19637   eval "$as_ac_Header=yes"
19638 else
19639   echo "$as_me: failed program was:" >&5
19640   cat conftest.$ac_ext >&5
19641   eval "$as_ac_Header=no"
19642 fi
19643 rm -f conftest.err conftest.$ac_ext
19644 fi
19645 echo "$as_me:19645: result: `eval echo '${'$as_ac_Header'}'`" >&5
19646 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19647 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19648   cat >>confdefs.h <<EOF
19649 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19650 EOF
19651
19652 fi
19653 done
19654
19655 for ac_header in iostream
19656 do
19657 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19658 echo "$as_me:19658: checking for $ac_header" >&5
19659 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19660 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19661   echo $ECHO_N "(cached) $ECHO_C" >&6
19662 else
19663   cat >conftest.$ac_ext <<_ACEOF
19664 #line 19664 "configure"
19665 #include "confdefs.h"
19666 #include <$ac_header>
19667 _ACEOF
19668 if { (eval echo "$as_me:19668: \"$ac_cpp conftest.$ac_ext\"") >&5
19669   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19670   ac_status=$?
19671   egrep -v '^ *\+' conftest.er1 >conftest.err
19672   rm -f conftest.er1
19673   cat conftest.err >&5
19674   echo "$as_me:19674: \$? = $ac_status" >&5
19675   (exit $ac_status); } >/dev/null; then
19676   if test -s conftest.err; then
19677     ac_cpp_err=$ac_cxx_preproc_warn_flag
19678   else
19679     ac_cpp_err=
19680   fi
19681 else
19682   ac_cpp_err=yes
19683 fi
19684 if test -z "$ac_cpp_err"; then
19685   eval "$as_ac_Header=yes"
19686 else
19687   echo "$as_me: failed program was:" >&5
19688   cat conftest.$ac_ext >&5
19689   eval "$as_ac_Header=no"
19690 fi
19691 rm -f conftest.err conftest.$ac_ext
19692 fi
19693 echo "$as_me:19693: result: `eval echo '${'$as_ac_Header'}'`" >&5
19694 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19695 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19696   cat >>confdefs.h <<EOF
19697 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19698 EOF
19699
19700 fi
19701 done
19702
19703 if test x"$ac_cv_header_iostream" = xyes ; then
19704         echo "$as_me:19704: checking if iostream uses std-namespace" >&5
19705 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19706         cat >conftest.$ac_ext <<_ACEOF
19707 #line 19707 "configure"
19708 #include "confdefs.h"
19709
19710 #include <iostream>
19711 using std::endl;
19712 using std::cerr;
19713 int
19714 main ()
19715 {
19716
19717 cerr << "testing" << endl;
19718
19719   ;
19720   return 0;
19721 }
19722 _ACEOF
19723 rm -f conftest.$ac_objext
19724 if { (eval echo "$as_me:19724: \"$ac_compile\"") >&5
19725   (eval $ac_compile) 2>&5
19726   ac_status=$?
19727   echo "$as_me:19727: \$? = $ac_status" >&5
19728   (exit $ac_status); } &&
19729          { ac_try='test -s conftest.$ac_objext'
19730   { (eval echo "$as_me:19730: \"$ac_try\"") >&5
19731   (eval $ac_try) 2>&5
19732   ac_status=$?
19733   echo "$as_me:19733: \$? = $ac_status" >&5
19734   (exit $ac_status); }; }; then
19735   cf_iostream_namespace=yes
19736 else
19737   echo "$as_me: failed program was:" >&5
19738 cat conftest.$ac_ext >&5
19739 cf_iostream_namespace=no
19740 fi
19741 rm -f conftest.$ac_objext conftest.$ac_ext
19742         echo "$as_me:19742: result: $cf_iostream_namespace" >&5
19743 echo "${ECHO_T}$cf_iostream_namespace" >&6
19744         if test "$cf_iostream_namespace" = yes ; then
19745
19746 cat >>confdefs.h <<\EOF
19747 #define IOSTREAM_NAMESPACE 1
19748 EOF
19749
19750         fi
19751 fi
19752
19753 echo "$as_me:19753: checking if we should include stdbool.h" >&5
19754 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19755
19756 if test "${cf_cv_header_stdbool_h+set}" = set; then
19757   echo $ECHO_N "(cached) $ECHO_C" >&6
19758 else
19759
19760         cat >conftest.$ac_ext <<_ACEOF
19761 #line 19761 "configure"
19762 #include "confdefs.h"
19763
19764 int
19765 main ()
19766 {
19767 bool foo = false
19768   ;
19769   return 0;
19770 }
19771 _ACEOF
19772 rm -f conftest.$ac_objext
19773 if { (eval echo "$as_me:19773: \"$ac_compile\"") >&5
19774   (eval $ac_compile) 2>&5
19775   ac_status=$?
19776   echo "$as_me:19776: \$? = $ac_status" >&5
19777   (exit $ac_status); } &&
19778          { ac_try='test -s conftest.$ac_objext'
19779   { (eval echo "$as_me:19779: \"$ac_try\"") >&5
19780   (eval $ac_try) 2>&5
19781   ac_status=$?
19782   echo "$as_me:19782: \$? = $ac_status" >&5
19783   (exit $ac_status); }; }; then
19784   cf_cv_header_stdbool_h=0
19785 else
19786   echo "$as_me: failed program was:" >&5
19787 cat conftest.$ac_ext >&5
19788 cat >conftest.$ac_ext <<_ACEOF
19789 #line 19789 "configure"
19790 #include "confdefs.h"
19791
19792 #ifndef __BEOS__
19793 #include <stdbool.h>
19794 #endif
19795
19796 int
19797 main ()
19798 {
19799 bool foo = false
19800   ;
19801   return 0;
19802 }
19803 _ACEOF
19804 rm -f conftest.$ac_objext
19805 if { (eval echo "$as_me:19805: \"$ac_compile\"") >&5
19806   (eval $ac_compile) 2>&5
19807   ac_status=$?
19808   echo "$as_me:19808: \$? = $ac_status" >&5
19809   (exit $ac_status); } &&
19810          { ac_try='test -s conftest.$ac_objext'
19811   { (eval echo "$as_me:19811: \"$ac_try\"") >&5
19812   (eval $ac_try) 2>&5
19813   ac_status=$?
19814   echo "$as_me:19814: \$? = $ac_status" >&5
19815   (exit $ac_status); }; }; then
19816   cf_cv_header_stdbool_h=1
19817 else
19818   echo "$as_me: failed program was:" >&5
19819 cat conftest.$ac_ext >&5
19820 cf_cv_header_stdbool_h=0
19821 fi
19822 rm -f conftest.$ac_objext conftest.$ac_ext
19823 fi
19824 rm -f conftest.$ac_objext conftest.$ac_ext
19825 fi
19826
19827 if test "$cf_cv_header_stdbool_h" = 1
19828 then    echo "$as_me:19828: result: yes" >&5
19829 echo "${ECHO_T}yes" >&6
19830 else    echo "$as_me:19830: result: no" >&5
19831 echo "${ECHO_T}no" >&6
19832 fi
19833
19834 echo "$as_me:19834: checking for builtin bool type" >&5
19835 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19836
19837 if test "${cf_cv_builtin_bool+set}" = set; then
19838   echo $ECHO_N "(cached) $ECHO_C" >&6
19839 else
19840
19841         cat >conftest.$ac_ext <<_ACEOF
19842 #line 19842 "configure"
19843 #include "confdefs.h"
19844
19845 #include <stdio.h>
19846 #include <sys/types.h>
19847
19848 int
19849 main ()
19850 {
19851 bool x = false
19852   ;
19853   return 0;
19854 }
19855 _ACEOF
19856 rm -f conftest.$ac_objext
19857 if { (eval echo "$as_me:19857: \"$ac_compile\"") >&5
19858   (eval $ac_compile) 2>&5
19859   ac_status=$?
19860   echo "$as_me:19860: \$? = $ac_status" >&5
19861   (exit $ac_status); } &&
19862          { ac_try='test -s conftest.$ac_objext'
19863   { (eval echo "$as_me:19863: \"$ac_try\"") >&5
19864   (eval $ac_try) 2>&5
19865   ac_status=$?
19866   echo "$as_me:19866: \$? = $ac_status" >&5
19867   (exit $ac_status); }; }; then
19868   cf_cv_builtin_bool=1
19869 else
19870   echo "$as_me: failed program was:" >&5
19871 cat conftest.$ac_ext >&5
19872 cf_cv_builtin_bool=0
19873 fi
19874 rm -f conftest.$ac_objext conftest.$ac_ext
19875
19876 fi
19877
19878 if test "$cf_cv_builtin_bool" = 1
19879 then    echo "$as_me:19879: result: yes" >&5
19880 echo "${ECHO_T}yes" >&6
19881 else    echo "$as_me:19881: result: no" >&5
19882 echo "${ECHO_T}no" >&6
19883 fi
19884
19885 echo "$as_me:19885: checking for size of bool" >&5
19886 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19887 if test "${cf_cv_type_of_bool+set}" = set; then
19888   echo $ECHO_N "(cached) $ECHO_C" >&6
19889 else
19890
19891         rm -f cf_test.out
19892         if test "$cross_compiling" = yes; then
19893   cf_cv_type_of_bool=unknown
19894 else
19895   cat >conftest.$ac_ext <<_ACEOF
19896 #line 19896 "configure"
19897 #include "confdefs.h"
19898
19899 #include <stdlib.h>
19900 #include <stdio.h>
19901
19902 #if defined(__cplusplus)
19903
19904 #ifdef HAVE_GXX_BUILTIN_H
19905 #include <g++/builtin.h>
19906 #elif HAVE_GPP_BUILTIN_H
19907 #include <gpp/builtin.h>
19908 #elif HAVE_BUILTIN_H
19909 #include <builtin.h>
19910 #endif
19911
19912 #else
19913
19914 #if $cf_cv_header_stdbool_h
19915 #include <stdbool.h>
19916 #endif
19917
19918 #endif
19919
19920 int main()
19921 {
19922         FILE *fp = fopen("cf_test.out", "w");
19923         if (fp != 0) {
19924                 bool x = true;
19925                 if ((bool)(-x) >= 0)
19926                         fputs("unsigned ", fp);
19927                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19928                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19929                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19930                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19931                 fclose(fp);
19932         }
19933         ${cf_cv_main_return:-return}(0);
19934 }
19935
19936 _ACEOF
19937 rm -f conftest$ac_exeext
19938 if { (eval echo "$as_me:19938: \"$ac_link\"") >&5
19939   (eval $ac_link) 2>&5
19940   ac_status=$?
19941   echo "$as_me:19941: \$? = $ac_status" >&5
19942   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19943   { (eval echo "$as_me:19943: \"$ac_try\"") >&5
19944   (eval $ac_try) 2>&5
19945   ac_status=$?
19946   echo "$as_me:19946: \$? = $ac_status" >&5
19947   (exit $ac_status); }; }; then
19948   cf_cv_type_of_bool=`cat cf_test.out`
19949                  if test -z "$cf_cv_type_of_bool"; then
19950                    cf_cv_type_of_bool=unknown
19951                  fi
19952 else
19953   echo "$as_me: program exited with status $ac_status" >&5
19954 echo "$as_me: failed program was:" >&5
19955 cat conftest.$ac_ext >&5
19956 cf_cv_type_of_bool=unknown
19957 fi
19958 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19959 fi
19960
19961 fi
19962
19963         rm -f cf_test.out
19964 echo "$as_me:19964: result: $cf_cv_type_of_bool" >&5
19965 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19966 if test "$cf_cv_type_of_bool" = unknown ; then
19967         case .$NCURSES_BOOL in #(vi
19968         .auto|.) NCURSES_BOOL=unsigned;;
19969         esac
19970         { echo "$as_me:19970: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19971 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19972         cf_cv_type_of_bool=$NCURSES_BOOL
19973 fi
19974
19975 echo "$as_me:19975: checking for special defines needed for etip.h" >&5
19976 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19977 cf_save_CXXFLAGS="$CXXFLAGS"
19978 cf_result="none"
19979
19980 # etip.h includes ncurses.h which includes ncurses_dll.h
19981 # But ncurses_dll.h is generated - fix here.
19982 test -d include || mkdir include
19983 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
19984
19985 for cf_math in "" MATH_H
19986 do
19987 for cf_excp in "" MATH_EXCEPTION
19988 do
19989         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19990         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19991         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19992 cat >conftest.$ac_ext <<_ACEOF
19993 #line 19993 "configure"
19994 #include "confdefs.h"
19995
19996 #include <etip.h.in>
19997
19998 int
19999 main ()
20000 {
20001
20002   ;
20003   return 0;
20004 }
20005 _ACEOF
20006 rm -f conftest.$ac_objext
20007 if { (eval echo "$as_me:20007: \"$ac_compile\"") >&5
20008   (eval $ac_compile) 2>&5
20009   ac_status=$?
20010   echo "$as_me:20010: \$? = $ac_status" >&5
20011   (exit $ac_status); } &&
20012          { ac_try='test -s conftest.$ac_objext'
20013   { (eval echo "$as_me:20013: \"$ac_try\"") >&5
20014   (eval $ac_try) 2>&5
20015   ac_status=$?
20016   echo "$as_me:20016: \$? = $ac_status" >&5
20017   (exit $ac_status); }; }; then
20018
20019         test -n "$cf_math" && cat >>confdefs.h <<EOF
20020 #define ETIP_NEEDS_${cf_math} 1
20021 EOF
20022
20023         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20024 #define ETIP_NEEDS_${cf_excp} 1
20025 EOF
20026
20027         cf_result="$cf_math $cf_excp"
20028         break 2
20029
20030 else
20031   echo "$as_me: failed program was:" >&5
20032 cat conftest.$ac_ext >&5
20033 fi
20034 rm -f conftest.$ac_objext conftest.$ac_ext
20035 done
20036 done
20037 echo "$as_me:20037: result: $cf_result" >&5
20038 echo "${ECHO_T}$cf_result" >&6
20039 CXXFLAGS="$cf_save_CXXFLAGS"
20040
20041 if test -n "$CXX"; then
20042 echo "$as_me:20042: checking if $CXX accepts parameter initialization" >&5
20043 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20044 if test "${cf_cv_cpp_param_init+set}" = set; then
20045   echo $ECHO_N "(cached) $ECHO_C" >&6
20046 else
20047
20048         ac_ext=cc
20049 ac_cpp='$CXXCPP $CPPFLAGS'
20050 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20051 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20052 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20053 ac_main_return=return
20054
20055         if test "$cross_compiling" = yes; then
20056   cf_cv_cpp_param_init=unknown
20057 else
20058   cat >conftest.$ac_ext <<_ACEOF
20059 #line 20059 "configure"
20060 #include "confdefs.h"
20061
20062 class TEST {
20063 private:
20064         int value;
20065 public:
20066         TEST(int x = 1);
20067         ~TEST();
20068 };
20069
20070 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20071 {
20072         value = x;
20073 }
20074 int main() { }
20075
20076 _ACEOF
20077 rm -f conftest$ac_exeext
20078 if { (eval echo "$as_me:20078: \"$ac_link\"") >&5
20079   (eval $ac_link) 2>&5
20080   ac_status=$?
20081   echo "$as_me:20081: \$? = $ac_status" >&5
20082   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20083   { (eval echo "$as_me:20083: \"$ac_try\"") >&5
20084   (eval $ac_try) 2>&5
20085   ac_status=$?
20086   echo "$as_me:20086: \$? = $ac_status" >&5
20087   (exit $ac_status); }; }; then
20088   cf_cv_cpp_param_init=yes
20089 else
20090   echo "$as_me: program exited with status $ac_status" >&5
20091 echo "$as_me: failed program was:" >&5
20092 cat conftest.$ac_ext >&5
20093 cf_cv_cpp_param_init=no
20094 fi
20095 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20096 fi
20097         ac_ext=cc
20098 ac_cpp='$CXXCPP $CPPFLAGS'
20099 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20100 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20101 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20102 ac_main_return=return
20103
20104 fi
20105 echo "$as_me:20105: result: $cf_cv_cpp_param_init" >&5
20106 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20107 fi
20108 test "$cf_cv_cpp_param_init" = yes &&
20109 cat >>confdefs.h <<\EOF
20110 #define CPP_HAS_PARAM_INIT 1
20111 EOF
20112
20113 if test -n "$CXX"; then
20114
20115 echo "$as_me:20115: checking if $CXX accepts static_cast" >&5
20116 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20117 if test "${cf_cv_cpp_static_cast+set}" = set; then
20118   echo $ECHO_N "(cached) $ECHO_C" >&6
20119 else
20120
20121         ac_ext=cc
20122 ac_cpp='$CXXCPP $CPPFLAGS'
20123 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20124 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20125 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20126 ac_main_return=return
20127
20128         cat >conftest.$ac_ext <<_ACEOF
20129 #line 20129 "configure"
20130 #include "confdefs.h"
20131
20132 class NCursesPanel
20133 {
20134 public:
20135   NCursesPanel(int nlines,
20136                int ncols,
20137                int begin_y = 0,
20138                int begin_x = 0)
20139   {
20140   }
20141   NCursesPanel();
20142   ~NCursesPanel();
20143 };
20144
20145 template<class T> class NCursesUserPanel : public NCursesPanel
20146 {
20147 public:
20148   NCursesUserPanel (int nlines,
20149                     int ncols,
20150                     int begin_y = 0,
20151                     int begin_x = 0,
20152                     const T* p_UserData = static_cast<T*>(0))
20153     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20154   {
20155   };
20156   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20157   {
20158   };
20159
20160   virtual ~NCursesUserPanel() {};
20161 };
20162
20163 int
20164 main ()
20165 {
20166
20167         const char* p_UserData = static_cast<char*>(0)
20168   ;
20169   return 0;
20170 }
20171 _ACEOF
20172 rm -f conftest.$ac_objext
20173 if { (eval echo "$as_me:20173: \"$ac_compile\"") >&5
20174   (eval $ac_compile) 2>&5
20175   ac_status=$?
20176   echo "$as_me:20176: \$? = $ac_status" >&5
20177   (exit $ac_status); } &&
20178          { ac_try='test -s conftest.$ac_objext'
20179   { (eval echo "$as_me:20179: \"$ac_try\"") >&5
20180   (eval $ac_try) 2>&5
20181   ac_status=$?
20182   echo "$as_me:20182: \$? = $ac_status" >&5
20183   (exit $ac_status); }; }; then
20184   cf_cv_cpp_static_cast=yes
20185 else
20186   echo "$as_me: failed program was:" >&5
20187 cat conftest.$ac_ext >&5
20188 cf_cv_cpp_static_cast=no
20189 fi
20190 rm -f conftest.$ac_objext conftest.$ac_ext
20191
20192         ac_ext=cc
20193 ac_cpp='$CXXCPP $CPPFLAGS'
20194 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20195 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20196 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20197 ac_main_return=return
20198
20199 fi
20200 echo "$as_me:20200: result: $cf_cv_cpp_static_cast" >&5
20201 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20202
20203 fi
20204
20205 test "$cf_cv_cpp_static_cast" = yes &&
20206 cat >>confdefs.h <<\EOF
20207 #define CPP_HAS_STATIC_CAST 1
20208 EOF
20209
20210         CXX_AR='$(AR)'
20211         CXX_ARFLAGS='$(ARFLAGS)'
20212         case $cf_cv_system_name in #(vi
20213         irix*) #(vi
20214             if test "$GXX" != yes ; then
20215                 CXX_AR='$(CXX)'
20216                 CXX_ARFLAGS='-ar -o'
20217             fi
20218             ;;
20219         sco3.2v5*) #(vi
20220             CXXLDFLAGS="-u main"
20221             ;;
20222         solaris2*)
20223             if test "$GXX" != yes ; then
20224                 CXX_AR='$(CXX)'
20225                 CXX_ARFLAGS='-xar -o'
20226             fi
20227             ;;
20228         esac
20229
20230 else
20231         cf_cxx_library=no
20232         cf_cv_builtin_bool=1
20233
20234         # Just because we are not configuring against C++ right now does not
20235         # mean that a user will not want to use C++.  Some distributors disable
20236         # the C++ portion of this configuration as a shortcut (or just to avoid
20237         # compiling the demo in the c++ directory).  So we need a reasonable
20238         # default for the 'bool' type.
20239         #
20240         # Caveat: since the storage of the bool type is not standardized, it
20241         # may change.
20242
20243         if test "$NCURSES_BOOL" != auto ; then
20244                 cf_cv_type_of_bool=$NCURSES_BOOL
20245                 cf_cv_header_stdbool_h=0
20246         else
20247                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20248
20249 echo "$as_me:20249: checking for size of bool" >&5
20250 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20251 if test "${cf_cv_type_of_bool+set}" = set; then
20252   echo $ECHO_N "(cached) $ECHO_C" >&6
20253 else
20254
20255         rm -f cf_test.out
20256         if test "$cross_compiling" = yes; then
20257   cf_cv_type_of_bool=unknown
20258 else
20259   cat >conftest.$ac_ext <<_ACEOF
20260 #line 20260 "configure"
20261 #include "confdefs.h"
20262
20263 #include <stdlib.h>
20264 #include <stdio.h>
20265
20266 #if defined(__cplusplus)
20267
20268 #ifdef HAVE_GXX_BUILTIN_H
20269 #include <g++/builtin.h>
20270 #elif HAVE_GPP_BUILTIN_H
20271 #include <gpp/builtin.h>
20272 #elif HAVE_BUILTIN_H
20273 #include <builtin.h>
20274 #endif
20275
20276 #else
20277
20278 #if $cf_cv_header_stdbool_h
20279 #include <stdbool.h>
20280 #endif
20281
20282 #endif
20283
20284 int main()
20285 {
20286         FILE *fp = fopen("cf_test.out", "w");
20287         if (fp != 0) {
20288                 bool x = true;
20289                 if ((bool)(-x) >= 0)
20290                         fputs("unsigned ", fp);
20291                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20292                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20293                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20294                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20295                 fclose(fp);
20296         }
20297         ${cf_cv_main_return:-return}(0);
20298 }
20299
20300 _ACEOF
20301 rm -f conftest$ac_exeext
20302 if { (eval echo "$as_me:20302: \"$ac_link\"") >&5
20303   (eval $ac_link) 2>&5
20304   ac_status=$?
20305   echo "$as_me:20305: \$? = $ac_status" >&5
20306   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20307   { (eval echo "$as_me:20307: \"$ac_try\"") >&5
20308   (eval $ac_try) 2>&5
20309   ac_status=$?
20310   echo "$as_me:20310: \$? = $ac_status" >&5
20311   (exit $ac_status); }; }; then
20312   cf_cv_type_of_bool=`cat cf_test.out`
20313                  if test -z "$cf_cv_type_of_bool"; then
20314                    cf_cv_type_of_bool=unknown
20315                  fi
20316 else
20317   echo "$as_me: program exited with status $ac_status" >&5
20318 echo "$as_me: failed program was:" >&5
20319 cat conftest.$ac_ext >&5
20320 cf_cv_type_of_bool=unknown
20321 fi
20322 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20323 fi
20324
20325 fi
20326
20327         rm -f cf_test.out
20328 echo "$as_me:20328: result: $cf_cv_type_of_bool" >&5
20329 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20330 if test "$cf_cv_type_of_bool" = unknown ; then
20331         case .$NCURSES_BOOL in #(vi
20332         .auto|.) NCURSES_BOOL=unsigned;;
20333         esac
20334         { echo "$as_me:20334: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20335 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20336         cf_cv_type_of_bool=$NCURSES_BOOL
20337 fi
20338
20339                 else
20340                         echo "$as_me:20340: checking for fallback type of bool" >&5
20341 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20342                         case "$host_cpu" in #(vi
20343                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20344                         *)      cf_cv_type_of_bool=int  ;;
20345                         esac
20346                         echo "$as_me:20346: result: $cf_cv_type_of_bool" >&5
20347 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20348                 fi
20349         fi
20350 fi
20351
20352 # If the C compiler did not declare bool, and we did not determine that the C++
20353 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20354 # ncurses library use the same type as C++ bool.  Note that this allows one to
20355 # specify the type of bool in a configure-script option and postpone
20356 # integration with the C++ compiler provided that the types are compatible.
20357 USE_CXX_BOOL=1
20358 if test $cf_cv_cc_bool_type = 1
20359 then
20360         # oops: C has a bool.  Unlikely, but C++ could differ.
20361         USE_CXX_BOOL=0
20362 elif test $cf_cv_builtin_bool = 0
20363 then
20364         # C++ has no bool
20365         USE_CXX_BOOL=0
20366 else
20367         # this is the normal case
20368         USE_CXX_BOOL='defined(__cplusplus)'
20369 fi
20370
20371 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20372
20373         if test "$cf_with_ada" != "no" ; then
20374                 if test "$with_libtool" != "no"; then
20375                         { echo "$as_me:20375: WARNING: libtool does not support Ada - disabling feature" >&5
20376 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20377                         cf_with_ada=no
20378                 fi
20379         fi
20380
20381         if test "$cf_with_ada" != "no" ; then
20382
20383 cf_ada_make=gnatmake
20384 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20385 set dummy $cf_ada_make; ac_word=$2
20386 echo "$as_me:20386: checking for $ac_word" >&5
20387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20388 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20389   echo $ECHO_N "(cached) $ECHO_C" >&6
20390 else
20391   if test -n "$gnat_exists"; then
20392   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20393 else
20394   ac_save_IFS=$IFS; IFS=$ac_path_separator
20395 ac_dummy="$PATH"
20396 for ac_dir in $ac_dummy; do
20397   IFS=$ac_save_IFS
20398   test -z "$ac_dir" && ac_dir=.
20399   $as_executable_p "$ac_dir/$ac_word" || continue
20400 ac_cv_prog_gnat_exists="yes"
20401 echo "$as_me:20401: found $ac_dir/$ac_word" >&5
20402 break
20403 done
20404
20405   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20406 fi
20407 fi
20408 gnat_exists=$ac_cv_prog_gnat_exists
20409 if test -n "$gnat_exists"; then
20410   echo "$as_me:20410: result: $gnat_exists" >&5
20411 echo "${ECHO_T}$gnat_exists" >&6
20412 else
20413   echo "$as_me:20413: result: no" >&5
20414 echo "${ECHO_T}no" >&6
20415 fi
20416
20417 if test "$ac_cv_prog_gnat_exists" = no; then
20418    cf_ada_make=
20419    cf_cv_prog_gnat_correct=no
20420 else
20421
20422 echo "$as_me:20422: checking for gnat version" >&5
20423 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20424 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20425         grep '[0-9].[0-9][0-9]*' |\
20426     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20427 echo "$as_me:20427: result: $cf_gnat_version" >&5
20428 echo "${ECHO_T}$cf_gnat_version" >&6
20429
20430 case $cf_gnat_version in #(vi
20431 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20432         cf_cv_prog_gnat_correct=yes
20433         ;;
20434 *)
20435         { echo "$as_me:20435: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20436 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20437         cf_cv_prog_gnat_correct=no
20438         ;;
20439 esac
20440
20441    # Extract the first word of "m4", so it can be a program name with args.
20442 set dummy m4; ac_word=$2
20443 echo "$as_me:20443: checking for $ac_word" >&5
20444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20445 if test "${ac_cv_prog_M4_exists+set}" = set; then
20446   echo $ECHO_N "(cached) $ECHO_C" >&6
20447 else
20448   if test -n "$M4_exists"; then
20449   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20450 else
20451   ac_save_IFS=$IFS; IFS=$ac_path_separator
20452 ac_dummy="$PATH"
20453 for ac_dir in $ac_dummy; do
20454   IFS=$ac_save_IFS
20455   test -z "$ac_dir" && ac_dir=.
20456   $as_executable_p "$ac_dir/$ac_word" || continue
20457 ac_cv_prog_M4_exists="yes"
20458 echo "$as_me:20458: found $ac_dir/$ac_word" >&5
20459 break
20460 done
20461
20462   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20463 fi
20464 fi
20465 M4_exists=$ac_cv_prog_M4_exists
20466 if test -n "$M4_exists"; then
20467   echo "$as_me:20467: result: $M4_exists" >&5
20468 echo "${ECHO_T}$M4_exists" >&6
20469 else
20470   echo "$as_me:20470: result: no" >&5
20471 echo "${ECHO_T}no" >&6
20472 fi
20473
20474    if test "$ac_cv_prog_M4_exists" = no; then
20475       cf_cv_prog_gnat_correct=no
20476       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20477    fi
20478    if test "$cf_cv_prog_gnat_correct" = yes; then
20479       echo "$as_me:20479: checking if GNAT works" >&5
20480 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20481
20482 rm -rf conftest* *~conftest*
20483 cat >>conftest.ads <<CF_EOF
20484 procedure conftest;
20485 CF_EOF
20486 cat >>conftest.adb <<CF_EOF
20487 with Text_IO;
20488 with GNAT.OS_Lib;
20489 procedure conftest is
20490 begin
20491    Text_IO.Put ("Hello World");
20492    Text_IO.New_Line;
20493    GNAT.OS_Lib.OS_Exit (0);
20494 end conftest;
20495 CF_EOF
20496 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20497    if ( ./conftest 1>&5 2>&1 ) ; then
20498       cf_cv_prog_gnat_correct=yes
20499    else
20500       cf_cv_prog_gnat_correct=no
20501    fi
20502 else
20503    cf_cv_prog_gnat_correct=no
20504 fi
20505 rm -rf conftest* *~conftest*
20506
20507       echo "$as_me:20507: result: $cf_cv_prog_gnat_correct" >&5
20508 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20509    fi
20510 fi
20511
20512                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20513
20514         ADAFLAGS="$ADAFLAGS -gnatpn"
20515
20516         echo "$as_me:20516: checking optimization options for ADAFLAGS" >&5
20517 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20518         case "$CFLAGS" in
20519         *-g*)
20520
20521         ADAFLAGS="$ADAFLAGS -g"
20522
20523                 ;;
20524         esac
20525         case "$CFLAGS" in
20526         *-O*)
20527                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20528
20529         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20530
20531                 ;;
20532         esac
20533         echo "$as_me:20533: result: $ADAFLAGS" >&5
20534 echo "${ECHO_T}$ADAFLAGS" >&6
20535
20536 echo "$as_me:20536: checking if GNATPREP supports -T option" >&5
20537 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20538 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20539   echo $ECHO_N "(cached) $ECHO_C" >&6
20540 else
20541
20542 cf_cv_gnatprep_opt_t=no
20543 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20544
20545 fi
20546 echo "$as_me:20546: result: $cf_cv_gnatprep_opt_t" >&5
20547 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20548 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20549
20550 echo "$as_me:20550: checking if GNAT supports generics" >&5
20551 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20552 case $cf_gnat_version in #(vi
20553 3.[1-9]*|[4-9].*) #(vi
20554         cf_gnat_generics=yes
20555         ;;
20556 *)
20557         cf_gnat_generics=no
20558         ;;
20559 esac
20560 echo "$as_me:20560: result: $cf_gnat_generics" >&5
20561 echo "${ECHO_T}$cf_gnat_generics" >&6
20562
20563 if test "$cf_gnat_generics" = yes
20564 then
20565         cf_compile_generics=generics
20566         cf_generic_objects="\${GENOBJS}"
20567 else
20568         cf_compile_generics=
20569         cf_generic_objects=
20570 fi
20571
20572 echo "$as_me:20572: checking if GNAT supports SIGINT" >&5
20573 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20574 if test "${cf_cv_gnat_sigint+set}" = set; then
20575   echo $ECHO_N "(cached) $ECHO_C" >&6
20576 else
20577
20578 rm -rf conftest* *~conftest*
20579 cat >>conftest.ads <<CF_EOF
20580 with Ada.Interrupts.Names;
20581
20582 package ConfTest is
20583
20584    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20585    pragma Unreserve_All_Interrupts;
20586    pragma Warnings (On);
20587
20588    protected Process is
20589       procedure Stop;
20590       function Continue return Boolean;
20591       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20592    private
20593       Done : Boolean := False;
20594    end Process;
20595
20596 end ConfTest;
20597 CF_EOF
20598 cat >>conftest.adb <<CF_EOF
20599 package body ConfTest is
20600    protected body Process is
20601       procedure Stop is
20602       begin
20603          Done := True;
20604       end Stop;
20605       function Continue return Boolean is
20606       begin
20607          return not Done;
20608       end Continue;
20609    end Process;
20610 end ConfTest;
20611 CF_EOF
20612 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20613       cf_cv_gnat_sigint=yes
20614 else
20615    cf_cv_gnat_sigint=no
20616 fi
20617 rm -rf conftest* *~conftest*
20618
20619 fi
20620 echo "$as_me:20620: result: $cf_cv_gnat_sigint" >&5
20621 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20622
20623 if test $cf_cv_gnat_sigint = yes ; then
20624         USE_GNAT_SIGINT=""
20625 else
20626         USE_GNAT_SIGINT="#"
20627 fi
20628
20629 cf_gnat_libraries=no
20630 cf_gnat_projects=no
20631
20632 if test "$enable_gnat_projects" != no ; then
20633 echo "$as_me:20633: checking if GNAT supports project files" >&5
20634 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20635 case $cf_gnat_version in #(vi
20636 3.[0-9]*) #(vi
20637         ;;
20638 *)
20639         case $cf_cv_system_name in #(vi
20640         cygwin*|msys*) #(vi
20641                 ;;
20642         *)
20643                 mkdir conftest.src conftest.bin conftest.lib
20644                 cd conftest.src
20645                 rm -rf conftest* *~conftest*
20646                 cat >>library.gpr <<CF_EOF
20647 project Library is
20648   Kind := External ("LIB_KIND");
20649   for Library_Name use "ConfTest";
20650   for Object_Dir use ".";
20651   for Library_ALI_Dir use External("LIBRARY_DIR");
20652   for Library_Version use External ("SONAME");
20653   for Library_Kind use Kind;
20654   for Library_Dir use External("BUILD_DIR");
20655   Source_Dir := External ("SOURCE_DIR");
20656   for Source_Dirs use (Source_Dir);
20657 end Library;
20658 CF_EOF
20659                 cat >>confpackage.ads <<CF_EOF
20660 package ConfPackage is
20661    procedure conftest;
20662 end ConfPackage;
20663 CF_EOF
20664                 cat >>confpackage.adb <<CF_EOF
20665 with Text_IO;
20666 package body ConfPackage is
20667    procedure conftest is
20668    begin
20669       Text_IO.Put ("Hello World");
20670       Text_IO.New_Line;
20671    end conftest;
20672 end ConfPackage;
20673 CF_EOF
20674                 if ( $cf_ada_make $ADAFLAGS \
20675                                 -Plibrary.gpr \
20676                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20677                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20678                                 -XSOURCE_DIR=`pwd` \
20679                                 -XSONAME=libConfTest.so.1 \
20680                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20681                         cf_gnat_projects=yes
20682                 fi
20683                 cd ..
20684                 if test -f conftest.lib/confpackage.ali
20685                 then
20686                         cf_gnat_libraries=yes
20687                 fi
20688                 rm -rf conftest* *~conftest*
20689                 ;;
20690         esac
20691         ;;
20692 esac
20693 echo "$as_me:20693: result: $cf_gnat_projects" >&5
20694 echo "${ECHO_T}$cf_gnat_projects" >&6
20695 fi # enable_gnat_projects
20696
20697 if test $cf_gnat_projects = yes
20698 then
20699         echo "$as_me:20699: checking if GNAT supports libraries" >&5
20700 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20701         echo "$as_me:20701: result: $cf_gnat_libraries" >&5
20702 echo "${ECHO_T}$cf_gnat_libraries" >&6
20703 fi
20704
20705 if test "$cf_gnat_projects" = yes
20706 then
20707         USE_OLD_MAKERULES="#"
20708         USE_GNAT_PROJECTS=""
20709 else
20710         USE_OLD_MAKERULES=""
20711         USE_GNAT_PROJECTS="#"
20712 fi
20713
20714 if test "$cf_gnat_libraries" = yes
20715 then
20716         USE_GNAT_LIBRARIES=""
20717 else
20718         USE_GNAT_LIBRARIES="#"
20719 fi
20720
20721 echo "$as_me:20721: checking for ada-compiler" >&5
20722 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20723
20724 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20725 if test "${with_ada_compiler+set}" = set; then
20726   withval="$with_ada_compiler"
20727   cf_ada_compiler=$withval
20728 else
20729   cf_ada_compiler=gnatmake
20730 fi;
20731
20732 echo "$as_me:20732: result: $cf_ada_compiler" >&5
20733 echo "${ECHO_T}$cf_ada_compiler" >&6
20734
20735                         cf_ada_package=terminal_interface
20736
20737 echo "$as_me:20737: checking for ada-include" >&5
20738 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20739
20740 # Check whether --with-ada-include or --without-ada-include was given.
20741 if test "${with_ada_include+set}" = set; then
20742   withval="$with_ada_include"
20743
20744 else
20745   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20746 fi; if test -n "$prefix/share/ada/adainclude" ; then
20747
20748 if test "x$prefix" != xNONE; then
20749   cf_path_syntax="$prefix"
20750 else
20751   cf_path_syntax="$ac_default_prefix"
20752 fi
20753
20754 case ".$withval" in #(vi
20755 .\$\(*\)*|.\'*\'*) #(vi
20756   ;;
20757 ..|./*|.\\*) #(vi
20758   ;;
20759 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20760   ;;
20761 .\${*prefix}*|.\${*dir}*) #(vi
20762   eval withval="$withval"
20763   case ".$withval" in #(vi
20764   .NONE/*)
20765     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20766     ;;
20767   esac
20768   ;; #(vi
20769 .no|.NONE/*)
20770   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20771   ;;
20772 *)
20773   { { echo "$as_me:20773: error: expected a pathname, not \"$withval\"" >&5
20774 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20775    { (exit 1); exit 1; }; }
20776   ;;
20777 esac
20778
20779 fi
20780 eval ADA_INCLUDE="$withval"
20781
20782 echo "$as_me:20782: result: $ADA_INCLUDE" >&5
20783 echo "${ECHO_T}$ADA_INCLUDE" >&6
20784
20785 echo "$as_me:20785: checking for ada-objects" >&5
20786 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20787
20788 # Check whether --with-ada-objects or --without-ada-objects was given.
20789 if test "${with_ada_objects+set}" = set; then
20790   withval="$with_ada_objects"
20791
20792 else
20793   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20794 fi; if test -n "$prefix/lib/ada/adalib" ; then
20795
20796 if test "x$prefix" != xNONE; then
20797   cf_path_syntax="$prefix"
20798 else
20799   cf_path_syntax="$ac_default_prefix"
20800 fi
20801
20802 case ".$withval" in #(vi
20803 .\$\(*\)*|.\'*\'*) #(vi
20804   ;;
20805 ..|./*|.\\*) #(vi
20806   ;;
20807 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20808   ;;
20809 .\${*prefix}*|.\${*dir}*) #(vi
20810   eval withval="$withval"
20811   case ".$withval" in #(vi
20812   .NONE/*)
20813     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20814     ;;
20815   esac
20816   ;; #(vi
20817 .no|.NONE/*)
20818   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20819   ;;
20820 *)
20821   { { echo "$as_me:20821: error: expected a pathname, not \"$withval\"" >&5
20822 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20823    { (exit 1); exit 1; }; }
20824   ;;
20825 esac
20826
20827 fi
20828 eval ADA_OBJECTS="$withval"
20829
20830 echo "$as_me:20830: result: $ADA_OBJECTS" >&5
20831 echo "${ECHO_T}$ADA_OBJECTS" >&6
20832
20833 echo "$as_me:20833: checking if an Ada95 shared-library should be built" >&5
20834 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20835
20836 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20837 if test "${with_ada_sharedlib+set}" = set; then
20838   withval="$with_ada_sharedlib"
20839   with_ada_sharedlib=$withval
20840 else
20841   with_ada_sharedlib=no
20842 fi;
20843 echo "$as_me:20843: result: $with_ada_sharedlib" >&5
20844 echo "${ECHO_T}$with_ada_sharedlib" >&6
20845
20846 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20847 MAKE_ADA_SHAREDLIB="#"
20848
20849 if test "x$with_ada_sharedlib" != xno
20850 then
20851         MAKE_ADA_SHAREDLIB=
20852         if test "x$with_ada_sharedlib" != xyes
20853         then
20854                 ADA_SHAREDLIB="$with_ada_sharedlib"
20855         fi
20856 fi
20857
20858                 fi
20859         fi
20860 else
20861         cf_with_ada=no
20862 fi
20863
20864 # do this "late" to avoid conflict with header-checks
20865 if test "x$with_widec" = xyes ; then
20866         echo "$as_me:20866: checking for wchar_t" >&5
20867 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20868 if test "${ac_cv_type_wchar_t+set}" = set; then
20869   echo $ECHO_N "(cached) $ECHO_C" >&6
20870 else
20871   cat >conftest.$ac_ext <<_ACEOF
20872 #line 20872 "configure"
20873 #include "confdefs.h"
20874 $ac_includes_default
20875 int
20876 main ()
20877 {
20878 if ((wchar_t *) 0)
20879   return 0;
20880 if (sizeof (wchar_t))
20881   return 0;
20882   ;
20883   return 0;
20884 }
20885 _ACEOF
20886 rm -f conftest.$ac_objext
20887 if { (eval echo "$as_me:20887: \"$ac_compile\"") >&5
20888   (eval $ac_compile) 2>&5
20889   ac_status=$?
20890   echo "$as_me:20890: \$? = $ac_status" >&5
20891   (exit $ac_status); } &&
20892          { ac_try='test -s conftest.$ac_objext'
20893   { (eval echo "$as_me:20893: \"$ac_try\"") >&5
20894   (eval $ac_try) 2>&5
20895   ac_status=$?
20896   echo "$as_me:20896: \$? = $ac_status" >&5
20897   (exit $ac_status); }; }; then
20898   ac_cv_type_wchar_t=yes
20899 else
20900   echo "$as_me: failed program was:" >&5
20901 cat conftest.$ac_ext >&5
20902 ac_cv_type_wchar_t=no
20903 fi
20904 rm -f conftest.$ac_objext conftest.$ac_ext
20905 fi
20906 echo "$as_me:20906: result: $ac_cv_type_wchar_t" >&5
20907 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20908
20909 echo "$as_me:20909: checking size of wchar_t" >&5
20910 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20911 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20912   echo $ECHO_N "(cached) $ECHO_C" >&6
20913 else
20914   if test "$ac_cv_type_wchar_t" = yes; then
20915   if test "$cross_compiling" = yes; then
20916   # Depending upon the size, compute the lo and hi bounds.
20917 cat >conftest.$ac_ext <<_ACEOF
20918 #line 20918 "configure"
20919 #include "confdefs.h"
20920 $ac_includes_default
20921 int
20922 main ()
20923 {
20924 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20925   ;
20926   return 0;
20927 }
20928 _ACEOF
20929 rm -f conftest.$ac_objext
20930 if { (eval echo "$as_me:20930: \"$ac_compile\"") >&5
20931   (eval $ac_compile) 2>&5
20932   ac_status=$?
20933   echo "$as_me:20933: \$? = $ac_status" >&5
20934   (exit $ac_status); } &&
20935          { ac_try='test -s conftest.$ac_objext'
20936   { (eval echo "$as_me:20936: \"$ac_try\"") >&5
20937   (eval $ac_try) 2>&5
20938   ac_status=$?
20939   echo "$as_me:20939: \$? = $ac_status" >&5
20940   (exit $ac_status); }; }; then
20941   ac_lo=0 ac_mid=0
20942   while :; do
20943     cat >conftest.$ac_ext <<_ACEOF
20944 #line 20944 "configure"
20945 #include "confdefs.h"
20946 $ac_includes_default
20947 int
20948 main ()
20949 {
20950 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20951   ;
20952   return 0;
20953 }
20954 _ACEOF
20955 rm -f conftest.$ac_objext
20956 if { (eval echo "$as_me:20956: \"$ac_compile\"") >&5
20957   (eval $ac_compile) 2>&5
20958   ac_status=$?
20959   echo "$as_me:20959: \$? = $ac_status" >&5
20960   (exit $ac_status); } &&
20961          { ac_try='test -s conftest.$ac_objext'
20962   { (eval echo "$as_me:20962: \"$ac_try\"") >&5
20963   (eval $ac_try) 2>&5
20964   ac_status=$?
20965   echo "$as_me:20965: \$? = $ac_status" >&5
20966   (exit $ac_status); }; }; then
20967   ac_hi=$ac_mid; break
20968 else
20969   echo "$as_me: failed program was:" >&5
20970 cat conftest.$ac_ext >&5
20971 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20972 fi
20973 rm -f conftest.$ac_objext conftest.$ac_ext
20974   done
20975 else
20976   echo "$as_me: failed program was:" >&5
20977 cat conftest.$ac_ext >&5
20978 ac_hi=-1 ac_mid=-1
20979   while :; do
20980     cat >conftest.$ac_ext <<_ACEOF
20981 #line 20981 "configure"
20982 #include "confdefs.h"
20983 $ac_includes_default
20984 int
20985 main ()
20986 {
20987 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20988   ;
20989   return 0;
20990 }
20991 _ACEOF
20992 rm -f conftest.$ac_objext
20993 if { (eval echo "$as_me:20993: \"$ac_compile\"") >&5
20994   (eval $ac_compile) 2>&5
20995   ac_status=$?
20996   echo "$as_me:20996: \$? = $ac_status" >&5
20997   (exit $ac_status); } &&
20998          { ac_try='test -s conftest.$ac_objext'
20999   { (eval echo "$as_me:20999: \"$ac_try\"") >&5
21000   (eval $ac_try) 2>&5
21001   ac_status=$?
21002   echo "$as_me:21002: \$? = $ac_status" >&5
21003   (exit $ac_status); }; }; then
21004   ac_lo=$ac_mid; break
21005 else
21006   echo "$as_me: failed program was:" >&5
21007 cat conftest.$ac_ext >&5
21008 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21009 fi
21010 rm -f conftest.$ac_objext conftest.$ac_ext
21011   done
21012 fi
21013 rm -f conftest.$ac_objext conftest.$ac_ext
21014 # Binary search between lo and hi bounds.
21015 while test "x$ac_lo" != "x$ac_hi"; do
21016   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21017   cat >conftest.$ac_ext <<_ACEOF
21018 #line 21018 "configure"
21019 #include "confdefs.h"
21020 $ac_includes_default
21021 int
21022 main ()
21023 {
21024 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21025   ;
21026   return 0;
21027 }
21028 _ACEOF
21029 rm -f conftest.$ac_objext
21030 if { (eval echo "$as_me:21030: \"$ac_compile\"") >&5
21031   (eval $ac_compile) 2>&5
21032   ac_status=$?
21033   echo "$as_me:21033: \$? = $ac_status" >&5
21034   (exit $ac_status); } &&
21035          { ac_try='test -s conftest.$ac_objext'
21036   { (eval echo "$as_me:21036: \"$ac_try\"") >&5
21037   (eval $ac_try) 2>&5
21038   ac_status=$?
21039   echo "$as_me:21039: \$? = $ac_status" >&5
21040   (exit $ac_status); }; }; then
21041   ac_hi=$ac_mid
21042 else
21043   echo "$as_me: failed program was:" >&5
21044 cat conftest.$ac_ext >&5
21045 ac_lo=`expr $ac_mid + 1`
21046 fi
21047 rm -f conftest.$ac_objext conftest.$ac_ext
21048 done
21049 ac_cv_sizeof_wchar_t=$ac_lo
21050 else
21051   if test "$cross_compiling" = yes; then
21052   { { echo "$as_me:21052: error: cannot run test program while cross compiling" >&5
21053 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21054    { (exit 1); exit 1; }; }
21055 else
21056   cat >conftest.$ac_ext <<_ACEOF
21057 #line 21057 "configure"
21058 #include "confdefs.h"
21059 $ac_includes_default
21060 int
21061 main ()
21062 {
21063 FILE *f = fopen ("conftest.val", "w");
21064 if (!f)
21065   $ac_main_return (1);
21066 fprintf (f, "%d", (sizeof (wchar_t)));
21067 fclose (f);
21068   ;
21069   return 0;
21070 }
21071 _ACEOF
21072 rm -f conftest$ac_exeext
21073 if { (eval echo "$as_me:21073: \"$ac_link\"") >&5
21074   (eval $ac_link) 2>&5
21075   ac_status=$?
21076   echo "$as_me:21076: \$? = $ac_status" >&5
21077   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21078   { (eval echo "$as_me:21078: \"$ac_try\"") >&5
21079   (eval $ac_try) 2>&5
21080   ac_status=$?
21081   echo "$as_me:21081: \$? = $ac_status" >&5
21082   (exit $ac_status); }; }; then
21083   ac_cv_sizeof_wchar_t=`cat conftest.val`
21084 else
21085   echo "$as_me: program exited with status $ac_status" >&5
21086 echo "$as_me: failed program was:" >&5
21087 cat conftest.$ac_ext >&5
21088 fi
21089 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21090 fi
21091 fi
21092 rm -f conftest.val
21093 else
21094   ac_cv_sizeof_wchar_t=0
21095 fi
21096 fi
21097 echo "$as_me:21097: result: $ac_cv_sizeof_wchar_t" >&5
21098 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21099 cat >>confdefs.h <<EOF
21100 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21101 EOF
21102
21103 fi
21104
21105 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21106 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21107 ###
21108 ### ticlib modules may be a separate library, otherwise contained in termlib.
21109 ### termlib modules may be a separate library, otherwise contained in ncurses.
21110 ###
21111 ### The of "+" or " " between the tokens controls the way the script
21112 ### chooses to split module lists into libraries.
21113 ###
21114 ### (see CF_LIB_RULES).
21115 echo "$as_me:21115: checking for library subsets" >&5
21116 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21117 LIB_SUBSETS=
21118
21119 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21120         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21121         if test "$with_ticlib" != no ; then
21122                 LIB_SUBSETS="${LIB_SUBSETS} "
21123         else
21124                 LIB_SUBSETS="${LIB_SUBSETS}+"
21125         fi
21126 fi
21127
21128 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21129 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21130
21131 if test "$with_termlib" != no ; then
21132         LIB_SUBSETS="${LIB_SUBSETS} "
21133 else
21134         LIB_SUBSETS="${LIB_SUBSETS}+"
21135 fi
21136
21137 LIB_SUBSETS="${LIB_SUBSETS}base"
21138
21139 # Most term-driver calls are to tinfo, but some like init_pair are to the
21140 # base library (so it resides in base).
21141 if test "$with_term_driver" != no ; then
21142         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21143         case $cf_cv_system_name in #(vi
21144         *mingw32*|*mingw64*) #(vi
21145                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21146                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21147                 ;;
21148         *) #(vi
21149                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21150                 ;;
21151         esac
21152 fi
21153
21154 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21155 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21156
21157 echo "$as_me:21157: result: $LIB_SUBSETS" >&5
21158 echo "${ECHO_T}$LIB_SUBSETS" >&6
21159
21160 ### Construct the list of include-directories to be generated
21161
21162 if test "$srcdir" != "."; then
21163         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21164 fi
21165 CPPFLAGS="-I../include $CPPFLAGS"
21166 if test "$srcdir" != "."; then
21167         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21168 fi
21169 CPPFLAGS="-I. $CPPFLAGS"
21170
21171 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21172 if test "$srcdir" != "."; then
21173         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21174 fi
21175 if test "$GCC" != yes; then
21176         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21177 elif test "$includedir" != "/usr/include"; then
21178         if test "$includedir" = '${prefix}/include' ; then
21179                 if test x$prefix != x/usr ; then
21180                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21181                 fi
21182         else
21183                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21184         fi
21185 fi
21186
21187 ### Build up pieces for makefile rules
21188 echo "$as_me:21188: checking default library suffix" >&5
21189 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21190
21191         case $DFT_LWR_MODEL in
21192         libtool) DFT_ARG_SUFFIX=''   ;;
21193         normal)  DFT_ARG_SUFFIX=''   ;;
21194         debug)   DFT_ARG_SUFFIX='_g' ;;
21195         profile) DFT_ARG_SUFFIX='_p' ;;
21196         shared)  DFT_ARG_SUFFIX=''   ;;
21197         esac
21198         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21199 echo "$as_me:21199: result: $DFT_ARG_SUFFIX" >&5
21200 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21201
21202 echo "$as_me:21202: checking default library-dependency suffix" >&5
21203 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21204
21205         case X$DFT_LWR_MODEL in #(vi
21206         Xlibtool) #(vi
21207                 DFT_LIB_SUFFIX='.la'
21208                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21209                 ;;
21210         Xdebug) #(vi
21211                 DFT_LIB_SUFFIX='_g.a'
21212                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21213                 ;;
21214         Xprofile) #(vi
21215                 DFT_LIB_SUFFIX='_p.a'
21216                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21217                 ;;
21218         Xshared) #(vi
21219                 case $cf_cv_system_name in
21220                 aix[5-7]*) #(vi
21221                         DFT_LIB_SUFFIX='.so'
21222                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21223                         ;;
21224                 cygwin*|msys*|mingw*) #(vi
21225                         DFT_LIB_SUFFIX='.dll'
21226                         DFT_DEP_SUFFIX='.dll.a'
21227                         ;;
21228                 darwin*) #(vi
21229                         DFT_LIB_SUFFIX='.dylib'
21230                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21231                         ;;
21232                 hpux*) #(vi
21233                         case $target in
21234                         ia64*) #(vi
21235                                 DFT_LIB_SUFFIX='.so'
21236                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21237                                 ;;
21238                         *) #(vi
21239                                 DFT_LIB_SUFFIX='.sl'
21240                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21241                                 ;;
21242                         esac
21243                         ;;
21244                 *) #(vi
21245                         DFT_LIB_SUFFIX='.so'
21246                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21247                         ;;
21248                 esac
21249                 ;;
21250         *)
21251                 DFT_LIB_SUFFIX='.a'
21252                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21253                 ;;
21254         esac
21255         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21256         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21257 echo "$as_me:21257: result: $DFT_DEP_SUFFIX" >&5
21258 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21259
21260 echo "$as_me:21260: checking default object directory" >&5
21261 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21262
21263         case $DFT_LWR_MODEL in
21264         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21265         normal)  DFT_OBJ_SUBDIR='objects' ;;
21266         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21267         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21268         shared)
21269                 case $cf_cv_system_name in #(vi
21270                 cygwin|msys) #(vi
21271                         DFT_OBJ_SUBDIR='objects' ;;
21272                 *)
21273                         DFT_OBJ_SUBDIR='obj_s' ;;
21274                 esac
21275         esac
21276 echo "$as_me:21276: result: $DFT_OBJ_SUBDIR" >&5
21277 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21278
21279 if test "x$cf_with_cxx" = xyes ; then
21280 echo "$as_me:21280: checking c++ library-dependency suffix" >&5
21281 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21282 if test "$with_libtool" != "no"; then
21283         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21284         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21285 elif test "$with_shared_cxx" != "no"; then
21286         # also for g++ users...
21287         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21288 else
21289         # we normally make a static library because C/C++ library rules differ
21290
21291         case Xnormal in #(vi
21292         Xlibtool) #(vi
21293                 CXX_LIB_SUFFIX='.la'
21294                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21295                 ;;
21296         Xdebug) #(vi
21297                 CXX_LIB_SUFFIX='_g.a'
21298                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21299                 ;;
21300         Xprofile) #(vi
21301                 CXX_LIB_SUFFIX='_p.a'
21302                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21303                 ;;
21304         Xshared) #(vi
21305                 case $cf_cv_system_name in
21306                 aix[5-7]*) #(vi
21307                         CXX_LIB_SUFFIX='.so'
21308                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21309                         ;;
21310                 cygwin*|msys*|mingw*) #(vi
21311                         CXX_LIB_SUFFIX='.dll'
21312                         CXX_DEP_SUFFIX='.dll.a'
21313                         ;;
21314                 darwin*) #(vi
21315                         CXX_LIB_SUFFIX='.dylib'
21316                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21317                         ;;
21318                 hpux*) #(vi
21319                         case $target in
21320                         ia64*) #(vi
21321                                 CXX_LIB_SUFFIX='.so'
21322                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21323                                 ;;
21324                         *) #(vi
21325                                 CXX_LIB_SUFFIX='.sl'
21326                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21327                                 ;;
21328                         esac
21329                         ;;
21330                 *) #(vi
21331                         CXX_LIB_SUFFIX='.so'
21332                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21333                         ;;
21334                 esac
21335                 ;;
21336         *)
21337                 CXX_LIB_SUFFIX='.a'
21338                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21339                 ;;
21340         esac
21341         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21342         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21343
21344 fi
21345 echo "$as_me:21345: result: $CXX_LIB_SUFFIX" >&5
21346 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21347
21348 fi
21349
21350 # do not want -ldl in build except as needed for -lncurses dependency
21351 if test "x$with_dlsym" = xyes ; then
21352 if test $DFT_LWR_MODEL = shared || \
21353    test $DFT_LWR_MODEL = libtool ; then
21354
21355 # remove dl library from $LIBS
21356 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21357
21358 fi
21359 fi
21360 ### Set up low-level terminfo dependencies for makefiles.
21361
21362 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21363 # do not need libdl
21364 TICS_LIST=
21365 if test "x$with_dlsym" = xyes ; then
21366
21367 # remove dl library from $SHLIB_LIST
21368 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21369
21370 fi
21371
21372 if test "$with_ticlib" != no ; then
21373
21374         if test "x$with_ticlib" != xyes ; then
21375                 TICS_NAME=$with_ticlib
21376                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21377                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21378                 TICS_LIB_SUFFIX="${with_ticlib}"
21379         else
21380                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21381                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21382                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21383         fi
21384         TICS_LDFLAGS="-L${LIB_DIR}"
21385         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21386 else
21387         TICS_LDFLAGS="-L${LIB_DIR}"
21388         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21389 fi
21390
21391 if test "$with_termlib" != no ; then
21392
21393         if test "x$with_termlib" != xyes ; then
21394                 TINFO_NAME=$with_termlib
21395                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21396                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21397                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21398                 TINFO_LIB_SUFFIX="${with_termlib}"
21399         else
21400                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21401                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21402                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21403                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21404         fi
21405
21406         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21407         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21408         if test "$DFT_LWR_MODEL" = "libtool"; then
21409                 TEST_ARGS="${TEST_DEPS}"
21410                 TEST_ARG2="${TEST_DEP2}"
21411                 TINFO_LDFLAGS="-L${LIB_DIR}"
21412                 TINFO_LIBS="$TEST_ARGS"
21413                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21414                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21415         else
21416                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21417                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21418                 if test "x$with_term_driver" != xno ; then
21419                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21420                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21421                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21422                 else
21423                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21424                         TINFO_LIBS="$TEST_ARGS"
21425                 fi
21426                 TINFO_LDFLAGS="-L${LIB_DIR}"
21427                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21428         fi
21429 else
21430         # the next lines are needed for linking libtic over libncurses
21431         TINFO_NAME=${LIB_NAME}
21432         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21433         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21434         if test "x$with_tic_depends" = xyes ; then
21435                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21436         else
21437                 TICS_LIST="$SHLIB_LIST"
21438         fi
21439
21440         TINFO_LDFLAGS="-L${LIB_DIR}"
21441         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21442 fi
21443
21444 if test "$DFT_LWR_MODEL" = shared ; then
21445         case $cf_cv_system_name in #(vi
21446         cygwin*|msys*)
21447                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21448                 TINFO_SUFFIX=.dll
21449                 ;;
21450         esac
21451 fi
21452
21453 if test "x$with_dlsym" = xyes ; then
21454
21455 # remove dl library from $TICS_LIST
21456 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21457
21458 fi
21459
21460 if test "$DFT_LWR_MODEL" = "libtool"; then
21461     OBJEXT=lo
21462 fi
21463
21464 # needed for Ada95
21465 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21466
21467 case $DFT_LWR_MODEL in
21468 normal|debug|profile)
21469
21470 if test "$GCC" = yes ; then
21471         case $cf_cv_system_name in #(
21472         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21473                 LDFLAGS_STATIC=
21474                 LDFLAGS_SHARED=
21475                 ;;
21476     *)  #( normally, except when broken
21477         LDFLAGS_STATIC=-static
21478         LDFLAGS_SHARED=-dynamic
21479         ;;
21480     esac
21481 else
21482         case $cf_cv_system_name in #(
21483         aix[4-7]*)      #( from ld manpage
21484                 LDFLAGS_STATIC=-bstatic
21485                 LDFLAGS_SHARED=-bdynamic
21486                 ;;
21487         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21488                 # We could also use just "archive" and "shared".
21489                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21490                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21491                 ;;
21492         irix*)          #( from ld manpage IRIX64
21493                 LDFLAGS_STATIC=-Bstatic
21494                 LDFLAGS_SHARED=-Bdynamic
21495                 ;;
21496         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21497                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21498                 LDFLAGS_STATIC=-noso
21499                 LDFLAGS_SHARED=-so_archive
21500                 ;;
21501         solaris2*)
21502                 LDFLAGS_STATIC=-Bstatic
21503                 LDFLAGS_SHARED=-Bdynamic
21504                 ;;
21505         esac
21506 fi
21507
21508 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21509 then
21510         echo "$as_me:21510: checking if linker supports switching between static/dynamic" >&5
21511 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21512
21513         rm -f libconftest.a
21514         cat >conftest.$ac_ext <<EOF
21515 #line 21515 "configure"
21516 #include <stdio.h>
21517 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21518 EOF
21519         if { (eval echo "$as_me:21519: \"$ac_compile\"") >&5
21520   (eval $ac_compile) 2>&5
21521   ac_status=$?
21522   echo "$as_me:21522: \$? = $ac_status" >&5
21523   (exit $ac_status); } ; then
21524                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21525                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21526         fi
21527         rm -f conftest.*
21528
21529         cf_save_LIBS="$LIBS"
21530
21531         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21532         cat >conftest.$ac_ext <<_ACEOF
21533 #line 21533 "configure"
21534 #include "confdefs.h"
21535
21536 #line 21536 "configure"
21537 #include <stdio.h>
21538 int cf_ldflags_static(FILE *fp);
21539
21540 int
21541 main ()
21542 {
21543
21544         return cf_ldflags_static(stdin);
21545
21546   ;
21547   return 0;
21548 }
21549 _ACEOF
21550 rm -f conftest.$ac_objext conftest$ac_exeext
21551 if { (eval echo "$as_me:21551: \"$ac_link\"") >&5
21552   (eval $ac_link) 2>&5
21553   ac_status=$?
21554   echo "$as_me:21554: \$? = $ac_status" >&5
21555   (exit $ac_status); } &&
21556          { ac_try='test -s conftest$ac_exeext'
21557   { (eval echo "$as_me:21557: \"$ac_try\"") >&5
21558   (eval $ac_try) 2>&5
21559   ac_status=$?
21560   echo "$as_me:21560: \$? = $ac_status" >&5
21561   (exit $ac_status); }; }; then
21562
21563         # some linkers simply ignore the -dynamic
21564         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21565         *static*) # (vi
21566                 cf_ldflags_static=no
21567                 ;;
21568         *)
21569                 cf_ldflags_static=yes
21570                 ;;
21571         esac
21572
21573 else
21574   echo "$as_me: failed program was:" >&5
21575 cat conftest.$ac_ext >&5
21576 cf_ldflags_static=no
21577 fi
21578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21579
21580         rm -f libconftest.*
21581         LIBS="$cf_save_LIBS"
21582
21583         echo "$as_me:21583: result: $cf_ldflags_static" >&5
21584 echo "${ECHO_T}$cf_ldflags_static" >&6
21585
21586         if test $cf_ldflags_static != yes
21587         then
21588                 LDFLAGS_STATIC=
21589                 LDFLAGS_SHARED=
21590         fi
21591 else
21592         LDFLAGS_STATIC=
21593         LDFLAGS_SHARED=
21594 fi
21595
21596         ;;
21597 esac
21598
21599 echo "$as_me:21599: checking where we will install curses.h" >&5
21600 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21601
21602 includesubdir=
21603 if test "$with_overwrite" = no && \
21604  ( test "x$includedir" = 'x${prefix}/include' || \
21605    test "x$includedir" = "x${prefix}/include" )
21606 then
21607         includesubdir="/ncurses${LIB_SUFFIX}"
21608 fi
21609 echo "$as_me:21609: result: ${includedir}${includesubdir}" >&5
21610 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21611
21612 ### Resolve a conflict between normal and wide-curses by forcing applications
21613 ### that will need libutf8 to add it to their configure script.
21614 if test "$with_overwrite" != no ; then
21615 if test "$NCURSES_LIBUTF8" = 1 ; then
21616         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21617         { echo "$as_me:21617: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21618 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21619 fi
21620 fi
21621 WITH_OVERWRITE=$with_overwrite
21622
21623 # used to separate tack out of the tree
21624 NCURSES_TREE=
21625
21626 ### predefined stuff for the test programs
21627
21628 cat >>confdefs.h <<\EOF
21629 #define HAVE_SLK_COLOR 1
21630 EOF
21631
21632 ### Construct the list of subdirectories for which we'll customize makefiles
21633 ### with the appropriate compile-rules.
21634
21635 echo "$as_me:21635: checking for src modules" >&5
21636 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21637
21638 # dependencies and linker-arguments for test-programs
21639 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21640 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21641 if test "$DFT_LWR_MODEL" = "libtool"; then
21642         TEST_ARGS="${TEST_DEPS}"
21643         TEST_ARG2="${TEST_DEP2}"
21644 else
21645         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21646         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21647 fi
21648
21649 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21650 cf_cv_src_modules=
21651 for cf_dir in $modules_to_build
21652 do
21653         if test -f $srcdir/$cf_dir/modules; then
21654
21655                 # We may/may not have tack in the distribution, though the
21656                 # makefile is.
21657                 if test $cf_dir = tack ; then
21658                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21659                                 continue
21660                         fi
21661                 fi
21662
21663                 if test -z "$cf_cv_src_modules"; then
21664                         cf_cv_src_modules=$cf_dir
21665                 else
21666                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21667                 fi
21668
21669                 # Make the ncurses_cfg.h file record the library interface files as
21670                 # well.  These are header files that are the same name as their
21671                 # directory.  Ncurses is the only library that does not follow
21672                 # that pattern.
21673                 if test $cf_dir = tack ; then
21674                         continue
21675                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21676
21677 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21678
21679                         cat >>confdefs.h <<EOF
21680 #define HAVE_${cf_have_include}_H 1
21681 EOF
21682
21683                         cat >>confdefs.h <<EOF
21684 #define HAVE_LIB${cf_have_include} 1
21685 EOF
21686
21687                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21688                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21689                         if test "$DFT_LWR_MODEL" = "libtool"; then
21690                                 TEST_ARGS="${TEST_DEPS}"
21691                                 TEST_ARG2="${TEST_DEP2}"
21692                         else
21693                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21694                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21695                         fi
21696                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21697                 fi
21698         fi
21699 done
21700 echo "$as_me:21700: result: $cf_cv_src_modules" >&5
21701 echo "${ECHO_T}$cf_cv_src_modules" >&6
21702
21703 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21704 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21705
21706 SRC_SUBDIRS=
21707 if test "x$cf_with_manpages" != xno ; then
21708         SRC_SUBDIRS="$SRC_SUBDIRS man"
21709 fi
21710 SRC_SUBDIRS="$SRC_SUBDIRS include"
21711 for cf_dir in $cf_cv_src_modules
21712 do
21713         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21714 done
21715 if test "x$cf_with_tests" != "xno" ; then
21716         SRC_SUBDIRS="$SRC_SUBDIRS test"
21717 fi
21718 # always make this, to install the ncurses-config script
21719 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21720 if test "$cf_with_cxx_binding" != no; then
21721         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21722         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21723 fi
21724
21725 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21726 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21727
21728 ADA_SUBDIRS=
21729 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21730         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21731         ADA_SUBDIRS="gen src"
21732         if test "x$cf_with_tests" != "xno" ; then
21733                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21734         fi
21735 fi
21736
21737 SUB_MAKEFILES=
21738 for cf_dir in $SRC_SUBDIRS
21739 do
21740         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21741 done
21742
21743 if test -n "$ADA_SUBDIRS"; then
21744         for cf_dir in $ADA_SUBDIRS
21745         do
21746                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21747         done
21748
21749 fi
21750
21751 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21752    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21753    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21754 fi
21755
21756 DIRS_TO_MAKE="lib"
21757 for cf_item in $cf_list_models
21758 do
21759
21760         case $cf_item in
21761         libtool) cf_subdir='obj_lo'  ;;
21762         normal)  cf_subdir='objects' ;;
21763         debug)   cf_subdir='obj_g' ;;
21764         profile) cf_subdir='obj_p' ;;
21765         shared)
21766                 case $cf_cv_system_name in #(vi
21767                 cygwin|msys) #(vi
21768                         cf_subdir='objects' ;;
21769                 *)
21770                         cf_subdir='obj_s' ;;
21771                 esac
21772         esac
21773
21774         for cf_item2 in $DIRS_TO_MAKE
21775         do
21776                 test $cf_item2 = $cf_subdir && break
21777         done
21778         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21779 done
21780 for cf_dir in $DIRS_TO_MAKE
21781 do
21782         test ! -d $cf_dir && mkdir $cf_dir
21783 done
21784
21785 # symbols that differ when compiling Ada95 by itself.
21786 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21787
21788 # values to use as strings
21789
21790 cat >>confdefs.h <<EOF
21791 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21792 EOF
21793
21794 cat >>confdefs.h <<EOF
21795 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21796 EOF
21797
21798 ### Now that we're done running tests, add the compiler-warnings, if any
21799
21800 cf_fix_cppflags=no
21801 cf_new_cflags=
21802 cf_new_cppflags=
21803 cf_new_extra_cppflags=
21804
21805 for cf_add_cflags in $EXTRA_CFLAGS
21806 do
21807 case $cf_fix_cppflags in
21808 no)
21809         case $cf_add_cflags in #(vi
21810         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21811                 case $cf_add_cflags in
21812                 -D*)
21813                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21814
21815                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21816                                 && test -z "${cf_tst_cflags}" \
21817                                 && cf_fix_cppflags=yes
21818
21819                         if test $cf_fix_cppflags = yes ; then
21820                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21821                                 continue
21822                         elif test "${cf_tst_cflags}" = "\"'" ; then
21823                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21824                                 continue
21825                         fi
21826                         ;;
21827                 esac
21828                 case "$CPPFLAGS" in
21829                 *$cf_add_cflags) #(vi
21830                         ;;
21831                 *) #(vi
21832                         case $cf_add_cflags in #(vi
21833                         -D*)
21834                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21835
21836 CPPFLAGS=`echo "$CPPFLAGS" | \
21837         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21838                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21839
21840                                 ;;
21841                         esac
21842                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21843                         ;;
21844                 esac
21845                 ;;
21846         *)
21847                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21848                 ;;
21849         esac
21850         ;;
21851 yes)
21852         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21853
21854         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21855
21856         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21857                 && test -z "${cf_tst_cflags}" \
21858                 && cf_fix_cppflags=no
21859         ;;
21860 esac
21861 done
21862
21863 if test -n "$cf_new_cflags" ; then
21864
21865         CFLAGS="$CFLAGS $cf_new_cflags"
21866 fi
21867
21868 if test -n "$cf_new_cppflags" ; then
21869
21870         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21871 fi
21872
21873 if test -n "$cf_new_extra_cppflags" ; then
21874
21875         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21876 fi
21877
21878 ### Define substitutions for header files to avoid name-pollution
21879
21880 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21881         HAVE_TCGETATTR=1
21882 else
21883         HAVE_TCGETATTR=0
21884 fi
21885
21886 if test "x$ac_cv_header_stdint_h" = xyes ; then
21887         HAVE_STDINT_H=1
21888 else
21889         HAVE_STDINT_H=0
21890 fi
21891
21892 if test "x$ac_cv_header_termio_h" = xyes ; then
21893         HAVE_TERMIO_H=1
21894 else
21895         HAVE_TERMIO_H=0
21896 fi
21897
21898 if test "x$ac_cv_header_termios_h" = xyes ; then
21899         HAVE_TERMIOS_H=1
21900 else
21901         HAVE_TERMIOS_H=0
21902 fi
21903
21904 ################################################################################
21905 test "x$use_database" = xyes && \
21906 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21907
21908 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21909 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21910
21911 if test "x$enable_pc_files" = xyes ; then \
21912 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21913 MAKE_PC_FILES=
21914 else
21915 MAKE_PC_FILES="#"
21916 fi
21917
21918 # Extract the first word of "tic", so it can be a program name with args.
21919 set dummy tic; ac_word=$2
21920 echo "$as_me:21920: checking for $ac_word" >&5
21921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21922 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21923   echo $ECHO_N "(cached) $ECHO_C" >&6
21924 else
21925   case $TIC_PATH in
21926   [\\/]* | ?:[\\/]*)
21927   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21928   ;;
21929   *)
21930   ac_save_IFS=$IFS; IFS=$ac_path_separator
21931 ac_dummy="$PATH:/usr/local/ncurses/bin"
21932 for ac_dir in $ac_dummy; do
21933   IFS=$ac_save_IFS
21934   test -z "$ac_dir" && ac_dir=.
21935   if $as_executable_p "$ac_dir/$ac_word"; then
21936    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21937    echo "$as_me:21937: found $ac_dir/$ac_word" >&5
21938    break
21939 fi
21940 done
21941
21942   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21943   ;;
21944 esac
21945 fi
21946 TIC_PATH=$ac_cv_path_TIC_PATH
21947
21948 if test -n "$TIC_PATH"; then
21949   echo "$as_me:21949: result: $TIC_PATH" >&5
21950 echo "${ECHO_T}$TIC_PATH" >&6
21951 else
21952   echo "$as_me:21952: result: no" >&5
21953 echo "${ECHO_T}no" >&6
21954 fi
21955
21956 if test -n "$FALLBACK_LIST"
21957 then
21958         if test "$TIC_PATH" = unknown
21959         then
21960                 { echo "$as_me:21960: WARNING: no tic program found for fallbacks" >&5
21961 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21962         fi
21963 fi
21964
21965 if test "x$cf_with_tests" != xno ; then
21966         MAKE_TESTS=
21967 else
21968         MAKE_TESTS="#"
21969 fi
21970
21971 ADAHTML_DIR=../../doc/html/ada
21972
21973 # these could be configurable, but are not currently
21974 PANEL_NAME=panel
21975 MENU_NAME=menu
21976 FORM_NAME=form
21977 CXX_NAME=ncurses++
21978
21979 # workaround for g++ versus Solaris (20131116)
21980 case $cf_cv_system_name in #(vi
21981 solaris2*) #(vi
21982         case "x$CPPFLAGS" in #(vi
21983         *-D_XOPEN_SOURCE_EXTENDED*)
21984                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21985
21986 echo "${as_me:-configure}:21986: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21987
21988                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21989                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21990                 ;;
21991         esac
21992         ;;
21993 esac
21994
21995 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21996 case "x$NCURSES_OSPEED" in #(vi
21997 *short*) #(vi
21998         cf_compatible=1
21999         ;;
22000 *)
22001         cf_compatible=0
22002         ;;
22003 esac
22004
22005 cat >>confdefs.h <<EOF
22006 #define NCURSES_OSPEED_COMPAT $cf_compatible
22007 EOF
22008
22009 case "x$cf_cv_typeof_chtype" in
22010 xshort|xint|xlong)
22011         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22012         ;;
22013 esac
22014
22015 case "x$cf_cv_typeof_mmask_t" in
22016 xshort|xint|xlong)
22017         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22018         ;;
22019 esac
22020
22021 # substitute into misc/Makefile to suppress
22022 # (un)install.data from the
22023 # (un)install rules.
22024 if test "x$cf_with_db_install" = "xno"; then
22025         MISC_INSTALL_DATA=
22026         MISC_UNINSTALL_DATA=
22027 else
22028         MISC_INSTALL_DATA=install.data
22029         MISC_UNINSTALL_DATA=uninstall.data
22030 fi
22031
22032 SUB_SCRIPTS=
22033
22034 if test -n "$PACKAGE"
22035 then
22036         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22037         export PACKAGE
22038         echo "package: $PACKAGE"
22039 fi
22040
22041 if test -n "$RESULTING_SYMS"
22042 then
22043         UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22044         case $cf_cv_abi_version in
22045         [6789])
22046                 test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22047
22048 echo "${as_me:-configure}:22048: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22049
22050                 RESULTING_SYMS=resulting.map
22051                 ;;
22052         *)
22053                 test -n "$verbose" && echo "    will map symbols to default ABI" 1>&6
22054
22055 echo "${as_me:-configure}:22055: testing will map symbols to default ABI ..." 1>&5
22056
22057                 ;;
22058         esac
22059 else
22060         UNALTERED_SYMS=
22061 fi
22062
22063 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"
22064 ac_config_commands="$ac_config_commands default"
22065 cat >confcache <<\_ACEOF
22066 # This file is a shell script that caches the results of configure
22067 # tests run on this system so they can be shared between configure
22068 # scripts and configure runs, see configure's option --config-cache.
22069 # It is not useful on other systems.  If it contains results you don't
22070 # want to keep, you may remove or edit it.
22071 #
22072 # config.status only pays attention to the cache file if you give it
22073 # the --recheck option to rerun configure.
22074 #
22075 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22076 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22077 # following values.
22078
22079 _ACEOF
22080
22081 # The following way of writing the cache mishandles newlines in values,
22082 # but we know of no workaround that is simple, portable, and efficient.
22083 # So, don't put newlines in cache variables' values.
22084 # Ultrix sh set writes to stderr and can't be redirected directly,
22085 # and sets the high bit in the cache file unless we assign to the vars.
22086 {
22087   (set) 2>&1 |
22088     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22089     *ac_space=\ *)
22090       # `set' does not quote correctly, so add quotes (double-quote
22091       # substitution turns \\\\ into \\, and sed turns \\ into \).
22092       sed -n \
22093         "s/'/'\\\\''/g;
22094           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22095       ;;
22096     *)
22097       # `set' quotes correctly as required by POSIX, so do not add quotes.
22098       sed -n \
22099         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22100       ;;
22101     esac;
22102 } |
22103   sed '
22104      t clear
22105      : clear
22106      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22107      t end
22108      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22109      : end' >>confcache
22110 if cmp -s $cache_file confcache; then :; else
22111   if test -w $cache_file; then
22112     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22113     cat confcache >$cache_file
22114   else
22115     echo "not updating unwritable cache $cache_file"
22116   fi
22117 fi
22118 rm -f confcache
22119
22120 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22121 # Let make expand exec_prefix.
22122 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22123
22124 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22125 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22126 # trailing colons and then remove the whole line if VPATH becomes empty
22127 # (actually we leave an empty line to preserve line numbers).
22128 if test "x$srcdir" = x.; then
22129   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22130 s/:*\$(srcdir):*/:/;
22131 s/:*\${srcdir}:*/:/;
22132 s/:*@srcdir@:*/:/;
22133 s/^\([^=]*=[    ]*\):*/\1/;
22134 s/:*$//;
22135 s/^[^=]*=[      ]*$//;
22136 }'
22137 fi
22138
22139 DEFS=-DHAVE_CONFIG_H
22140
22141 : ${CONFIG_STATUS=./config.status}
22142 ac_clean_files_save=$ac_clean_files
22143 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22144 { echo "$as_me:22144: creating $CONFIG_STATUS" >&5
22145 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22146 cat >$CONFIG_STATUS <<_ACEOF
22147 #! $SHELL
22148 # Generated automatically by configure.
22149 # Run this file to recreate the current configuration.
22150 # Compiler output produced by configure, useful for debugging
22151 # configure, is in config.log if it exists.
22152
22153 debug=false
22154 SHELL=\${CONFIG_SHELL-$SHELL}
22155 ac_cs_invocation="\$0 \$@"
22156
22157 _ACEOF
22158
22159 cat >>$CONFIG_STATUS <<\_ACEOF
22160 # Be Bourne compatible
22161 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22162   emulate sh
22163   NULLCMD=:
22164 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22165   set -o posix
22166 fi
22167
22168 # Name of the executable.
22169 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22170
22171 if expr a : '\(a\)' >/dev/null 2>&1; then
22172   as_expr=expr
22173 else
22174   as_expr=false
22175 fi
22176
22177 rm -f conf$$ conf$$.exe conf$$.file
22178 echo >conf$$.file
22179 if ln -s conf$$.file conf$$ 2>/dev/null; then
22180   # We could just check for DJGPP; but this test a) works b) is more generic
22181   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22182   if test -f conf$$.exe; then
22183     # Don't use ln at all; we don't have any links
22184     as_ln_s='cp -p'
22185   else
22186     as_ln_s='ln -s'
22187   fi
22188 elif ln conf$$.file conf$$ 2>/dev/null; then
22189   as_ln_s=ln
22190 else
22191   as_ln_s='cp -p'
22192 fi
22193 rm -f conf$$ conf$$.exe conf$$.file
22194
22195 as_executable_p="test -f"
22196
22197 # Support unset when possible.
22198 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22199   as_unset=unset
22200 else
22201   as_unset=false
22202 fi
22203
22204 # NLS nuisances.
22205 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22206 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22207 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22208 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22209 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22210 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22211 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22212 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22213
22214 # IFS
22215 # We need space, tab and new line, in precisely that order.
22216 as_nl='
22217 '
22218 IFS="   $as_nl"
22219
22220 # CDPATH.
22221 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22222
22223 exec 6>&1
22224
22225 _ACEOF
22226
22227 # Files that config.status was made for.
22228 if test -n "$ac_config_files"; then
22229   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22230 fi
22231
22232 if test -n "$ac_config_headers"; then
22233   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22234 fi
22235
22236 if test -n "$ac_config_links"; then
22237   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22238 fi
22239
22240 if test -n "$ac_config_commands"; then
22241   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22242 fi
22243
22244 cat >>$CONFIG_STATUS <<\EOF
22245
22246 ac_cs_usage="\
22247 \`$as_me' instantiates files from templates according to the
22248 current configuration.
22249
22250 Usage: $0 [OPTIONS] [FILE]...
22251
22252   -h, --help       print this help, then exit
22253   -V, --version    print version number, then exit
22254   -d, --debug      don't remove temporary files
22255       --recheck    update $as_me by reconfiguring in the same conditions
22256   --file=FILE[:TEMPLATE]
22257                    instantiate the configuration file FILE
22258   --header=FILE[:TEMPLATE]
22259                    instantiate the configuration header FILE
22260
22261 Configuration files:
22262 $config_files
22263
22264 Configuration headers:
22265 $config_headers
22266
22267 Configuration commands:
22268 $config_commands
22269
22270 Report bugs to <dickey@invisible-island.net>."
22271 EOF
22272
22273 cat >>$CONFIG_STATUS <<EOF
22274 ac_cs_version="\\
22275 config.status
22276 configured by $0, generated by GNU Autoconf 2.52.20141204,
22277   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22278
22279 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22280 Free Software Foundation, Inc.
22281 This config.status script is free software; the Free Software Foundation
22282 gives unlimited permission to copy, distribute and modify it."
22283 srcdir=$srcdir
22284 INSTALL="$INSTALL"
22285 EOF
22286
22287 cat >>$CONFIG_STATUS <<\EOF
22288 # If no file are specified by the user, then we need to provide default
22289 # value.  By we need to know if files were specified by the user.
22290 ac_need_defaults=:
22291 while test $# != 0
22292 do
22293   case $1 in
22294   --*=*)
22295     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22296     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22297     shift
22298     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22299     shift
22300     ;;
22301   -*);;
22302   *) # This is not an option, so the user has probably given explicit
22303      # arguments.
22304      ac_need_defaults=false;;
22305   esac
22306
22307   case $1 in
22308   # Handling of the options.
22309 EOF
22310 cat >>$CONFIG_STATUS <<EOF
22311   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22312     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22313     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22314 EOF
22315 cat >>$CONFIG_STATUS <<\EOF
22316   --version | --vers* | -V )
22317     echo "$ac_cs_version"; exit 0 ;;
22318   --he | --h)
22319     # Conflict between --help and --header
22320     { { echo "$as_me:22320: error: ambiguous option: $1
22321 Try \`$0 --help' for more information." >&5
22322 echo "$as_me: error: ambiguous option: $1
22323 Try \`$0 --help' for more information." >&2;}
22324    { (exit 1); exit 1; }; };;
22325   --help | --hel | -h )
22326     echo "$ac_cs_usage"; exit 0 ;;
22327   --debug | --d* | -d )
22328     debug=: ;;
22329   --file | --fil | --fi | --f )
22330     shift
22331     CONFIG_FILES="$CONFIG_FILES $1"
22332     ac_need_defaults=false;;
22333   --header | --heade | --head | --hea )
22334     shift
22335     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22336     ac_need_defaults=false;;
22337
22338   # This is an error.
22339   -*) { { echo "$as_me:22339: error: unrecognized option: $1
22340 Try \`$0 --help' for more information." >&5
22341 echo "$as_me: error: unrecognized option: $1
22342 Try \`$0 --help' for more information." >&2;}
22343    { (exit 1); exit 1; }; } ;;
22344
22345   *) ac_config_targets="$ac_config_targets $1" ;;
22346
22347   esac
22348   shift
22349 done
22350
22351 exec 5>>config.log
22352 cat >&5 << _ACEOF
22353
22354 ## ----------------------- ##
22355 ## Running config.status.  ##
22356 ## ----------------------- ##
22357
22358 This file was extended by $as_me 2.52.20141204, executed with
22359   CONFIG_FILES    = $CONFIG_FILES
22360   CONFIG_HEADERS  = $CONFIG_HEADERS
22361   CONFIG_LINKS    = $CONFIG_LINKS
22362   CONFIG_COMMANDS = $CONFIG_COMMANDS
22363   > $ac_cs_invocation
22364 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22365
22366 _ACEOF
22367 EOF
22368
22369 cat >>$CONFIG_STATUS <<EOF
22370 #
22371 # INIT-COMMANDS section.
22372 #
22373
22374 ### Special initialization commands, used to pass information from the
22375 ### configuration-run into config.status
22376
22377 AWK="$AWK"
22378 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22379 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22380 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22381 ECHO_LD="$ECHO_LD"
22382 LDCONFIG="$LDCONFIG"
22383 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22384 LIB_NAME="$LIB_NAME"
22385 LIB_PREFIX="$LIB_PREFIX"
22386 LIB_SUBSETS="$LIB_SUBSETS"
22387 LIB_SUFFIX="$LIB_SUFFIX"
22388 LIB_TRACING="$LIB_TRACING"
22389 LN_S="$LN_S"
22390 MAKE_TERMINFO="$MAKE_TERMINFO"
22391 NCURSES_MAJOR="$NCURSES_MAJOR"
22392 NCURSES_MINOR="$NCURSES_MINOR"
22393 NCURSES_OSPEED="$NCURSES_OSPEED"
22394 NCURSES_PATCH="$NCURSES_PATCH"
22395 SRC_SUBDIRS="$SRC_SUBDIRS"
22396 TERMINFO="$TERMINFO"
22397 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22398 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22399 TICS_NAME="$TICS_NAME"
22400 TIC_PATH="$TIC_PATH"
22401 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22402 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22403 TINFO_NAME="$TINFO_NAME"
22404 TINFO_SUFFIX="$TINFO_SUFFIX"
22405 UNALTERED_SYMS="$UNALTERED_SYMS"
22406 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22407 WITH_CURSES_H="$with_curses_h"
22408 WITH_ECHO="${enable_echo:=yes}"
22409 WITH_OVERWRITE="$with_overwrite"
22410 cf_LIST_MODELS="$cf_list_models"
22411 cf_cv_abi_version="$cf_cv_abi_version"
22412 cf_cv_do_relink="$cf_cv_do_relink"
22413 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22414 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22415 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22416 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22417 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22418 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22419 cf_cv_rel_version="$cf_cv_rel_version"
22420 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22421 cf_cv_shared_soname='$cf_cv_shared_soname'
22422 cf_cv_shlib_version="$cf_cv_shlib_version"
22423 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22424 cf_cv_system_name="$cf_cv_system_name"
22425 cf_cv_term_driver="$with_term_driver"
22426 cf_with_ada="$cf_with_ada"
22427 cf_with_cxx_binding="$cf_with_cxx_binding"
22428 cf_with_db_install="$cf_with_db_install"
22429 cf_with_manpages="$cf_with_manpages"
22430 cf_with_tests="$cf_with_tests"
22431 host="$host"
22432 target="$target"
22433 with_shared_cxx="$with_shared_cxx"
22434
22435 EOF
22436
22437 cat >>$CONFIG_STATUS <<\EOF
22438 for ac_config_target in $ac_config_targets
22439 do
22440   case "$ac_config_target" in
22441   # Handling of arguments.
22442   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22443   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22444   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22445   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22446   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22447   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22448   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22449   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22450   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22451   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22452   *) { { echo "$as_me:22452: error: invalid argument: $ac_config_target" >&5
22453 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22454    { (exit 1); exit 1; }; };;
22455   esac
22456 done
22457
22458 # If the user did not use the arguments to specify the items to instantiate,
22459 # then the envvar interface is used.  Set only those that are not.
22460 # We use the long form for the default assignment because of an extremely
22461 # bizarre bug on SunOS 4.1.3.
22462 if $ac_need_defaults; then
22463   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22464   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22465   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22466 fi
22467
22468 # Create a temporary directory, and hook for its removal unless debugging.
22469 $debug ||
22470 {
22471   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22472   trap '{ (exit 1); exit 1; }' 1 2 13 15
22473 }
22474
22475 # Create a (secure) tmp directory for tmp files.
22476 : ${TMPDIR=/tmp}
22477 {
22478   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22479   test -n "$tmp" && test -d "$tmp"
22480 }  ||
22481 {
22482   tmp=$TMPDIR/cs$$-$RANDOM
22483   (umask 077 && mkdir $tmp)
22484 } ||
22485 {
22486    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22487    { (exit 1); exit 1; }
22488 }
22489
22490 EOF
22491
22492 cat >>$CONFIG_STATUS <<EOF
22493
22494 #
22495 # CONFIG_FILES section.
22496 #
22497
22498 # No need to generate the scripts if there are no CONFIG_FILES.
22499 # This happens for instance when ./config.status config.h
22500 if test -n "\$CONFIG_FILES"; then
22501   # Protect against being on the right side of a sed subst in config.status.
22502   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22503    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22504 s,@SHELL@,$SHELL,;t t
22505 s,@exec_prefix@,$exec_prefix,;t t
22506 s,@prefix@,$prefix,;t t
22507 s,@program_transform_name@,$program_transform_name,;t t
22508 s,@bindir@,$bindir,;t t
22509 s,@sbindir@,$sbindir,;t t
22510 s,@libexecdir@,$libexecdir,;t t
22511 s,@datarootdir@,$datarootdir,;t t
22512 s,@datadir@,$datadir,;t t
22513 s,@sysconfdir@,$sysconfdir,;t t
22514 s,@sharedstatedir@,$sharedstatedir,;t t
22515 s,@localstatedir@,$localstatedir,;t t
22516 s,@libdir@,$libdir,;t t
22517 s,@includedir@,$includedir,;t t
22518 s,@oldincludedir@,$oldincludedir,;t t
22519 s,@infodir@,$infodir,;t t
22520 s,@mandir@,$mandir,;t t
22521 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22522 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22523 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22524 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22525 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22526 s,@build_alias@,$build_alias,;t t
22527 s,@host_alias@,$host_alias,;t t
22528 s,@target_alias@,$target_alias,;t t
22529 s,@ECHO_C@,$ECHO_C,;t t
22530 s,@ECHO_N@,$ECHO_N,;t t
22531 s,@ECHO_T@,$ECHO_T,;t t
22532 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22533 s,@DEFS@,$DEFS,;t t
22534 s,@LIBS@,$LIBS,;t t
22535 s,@top_builddir@,$top_builddir,;t t
22536 s,@EGREP@,$EGREP,;t t
22537 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22538 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22539 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22540 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22541 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22542 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22543 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22544 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22545 s,@VERSION@,$VERSION,;t t
22546 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22547 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22548 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22549 s,@PACKAGE@,$PACKAGE,;t t
22550 s,@build@,$build,;t t
22551 s,@build_cpu@,$build_cpu,;t t
22552 s,@build_vendor@,$build_vendor,;t t
22553 s,@build_os@,$build_os,;t t
22554 s,@host@,$host,;t t
22555 s,@host_cpu@,$host_cpu,;t t
22556 s,@host_vendor@,$host_vendor,;t t
22557 s,@host_os@,$host_os,;t t
22558 s,@target@,$target,;t t
22559 s,@target_cpu@,$target_cpu,;t t
22560 s,@target_vendor@,$target_vendor,;t t
22561 s,@target_os@,$target_os,;t t
22562 s,@CC@,$CC,;t t
22563 s,@CFLAGS@,$CFLAGS,;t t
22564 s,@LDFLAGS@,$LDFLAGS,;t t
22565 s,@CPPFLAGS@,$CPPFLAGS,;t t
22566 s,@ac_ct_CC@,$ac_ct_CC,;t t
22567 s,@EXEEXT@,$EXEEXT,;t t
22568 s,@OBJEXT@,$OBJEXT,;t t
22569 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22570 s,@CPP@,$CPP,;t t
22571 s,@LDCONFIG@,$LDCONFIG,;t t
22572 s,@CXX@,$CXX,;t t
22573 s,@CXXFLAGS@,$CXXFLAGS,;t t
22574 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22575 s,@AWK@,$AWK,;t t
22576 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22577 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22578 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22579 s,@LINT@,$LINT,;t t
22580 s,@LINT_OPTS@,$LINT_OPTS,;t t
22581 s,@LN_S@,$LN_S,;t t
22582 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22583 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22584 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22585 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22586 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22587 s,@SET_MAKE@,$SET_MAKE,;t t
22588 s,@CTAGS@,$CTAGS,;t t
22589 s,@ETAGS@,$ETAGS,;t t
22590 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22591 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22592 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22593 s,@RANLIB@,$RANLIB,;t t
22594 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22595 s,@LD@,$LD,;t t
22596 s,@ac_ct_LD@,$ac_ct_LD,;t t
22597 s,@AR@,$AR,;t t
22598 s,@ac_ct_AR@,$ac_ct_AR,;t t
22599 s,@NM@,$NM,;t t
22600 s,@ac_ct_NM@,$ac_ct_NM,;t t
22601 s,@ARFLAGS@,$ARFLAGS,;t t
22602 s,@DESTDIR@,$DESTDIR,;t t
22603 s,@BUILD_CC@,$BUILD_CC,;t t
22604 s,@BUILD_CPP@,$BUILD_CPP,;t t
22605 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22606 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22607 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22608 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22609 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22610 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22611 s,@cf_list_models@,$cf_list_models,;t t
22612 s,@ABI_VERSION@,$ABI_VERSION,;t t
22613 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22614 s,@LIBTOOL@,$LIBTOOL,;t t
22615 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22616 s,@LT_UNDEF@,$LT_UNDEF,;t t
22617 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22618 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22619 s,@LIB_CREATE@,$LIB_CREATE,;t t
22620 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22621 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22622 s,@LIB_PREP@,$LIB_PREP,;t t
22623 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22624 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22625 s,@LIB_LINK@,$LIB_LINK,;t t
22626 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22627 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22628 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22629 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22630 s,@TICS_NAME@,$TICS_NAME,;t t
22631 s,@TINFO_NAME@,$TINFO_NAME,;t t
22632 s,@LIB_NAME@,$LIB_NAME,;t t
22633 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22634 s,@CC_G_OPT@,$CC_G_OPT,;t t
22635 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22636 s,@LD_MODEL@,$LD_MODEL,;t t
22637 s,@shlibdir@,$shlibdir,;t t
22638 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22639 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22640 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22641 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22642 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22643 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22644 s,@LINK_PROGS@,$LINK_PROGS,;t t
22645 s,@LINK_TESTS@,$LINK_TESTS,;t t
22646 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22647 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22648 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22649 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22650 s,@RPATH_LIST@,$RPATH_LIST,;t t
22651 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22652 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22653 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22654 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22655 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22656 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22657 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22658 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22659 s,@XTERM_KBS@,$XTERM_KBS,;t t
22660 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22661 s,@TERMINFO@,$TERMINFO,;t t
22662 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22663 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22664 s,@TERMPATH@,$TERMPATH,;t t
22665 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22666 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22667 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22668 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22669 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22670 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22671 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22672 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22673 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22674 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22675 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22676 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22677 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22678 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22679 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22680 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22681 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22682 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22683 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22684 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22685 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22686 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22687 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22688 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22689 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22690 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22691 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22692 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22693 s,@PTHREAD@,$PTHREAD,;t t
22694 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22695 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22696 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22697 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22698 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22699 s,@ECHO_LT@,$ECHO_LT,;t t
22700 s,@ECHO_LD@,$ECHO_LD,;t t
22701 s,@RULE_CC@,$RULE_CC,;t t
22702 s,@SHOW_CC@,$SHOW_CC,;t t
22703 s,@ECHO_CC@,$ECHO_CC,;t t
22704 s,@ECHO_LINK@,$ECHO_LINK,;t t
22705 s,@ADAFLAGS@,$ADAFLAGS,;t t
22706 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22707 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22708 s,@ADA_TRACE@,$ADA_TRACE,;t t
22709 s,@MATH_LIB@,$MATH_LIB,;t t
22710 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22711 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22712 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22713 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22714 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22715 s,@TEST_LIBS@,$TEST_LIBS,;t t
22716 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22717 s,@CXXCPP@,$CXXCPP,;t t
22718 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22719 s,@CXX_AR@,$CXX_AR,;t t
22720 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22721 s,@CXXLIBS@,$CXXLIBS,;t t
22722 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22723 s,@gnat_exists@,$gnat_exists,;t t
22724 s,@M4_exists@,$M4_exists,;t t
22725 s,@cf_ada_make@,$cf_ada_make,;t t
22726 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22727 s,@cf_compile_generics@,$cf_compile_generics,;t t
22728 s,@cf_generic_objects@,$cf_generic_objects,;t t
22729 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22730 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22731 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22732 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22733 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22734 s,@cf_ada_package@,$cf_ada_package,;t t
22735 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22736 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22737 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22738 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22739 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22740 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22741 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22742 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22743 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22744 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22745 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22746 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22747 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22748 s,@TICS_LIBS@,$TICS_LIBS,;t t
22749 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22750 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22751 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22752 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22753 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22754 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22755 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22756 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22757 s,@includesubdir@,$includesubdir,;t t
22758 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22759 s,@TICS_LIST@,$TICS_LIST,;t t
22760 s,@TINFO_LIST@,$TINFO_LIST,;t t
22761 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22762 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22763 s,@TEST_ARGS@,$TEST_ARGS,;t t
22764 s,@TEST_DEPS@,$TEST_DEPS,;t t
22765 s,@TEST_ARG2@,$TEST_ARG2,;t t
22766 s,@TEST_DEP2@,$TEST_DEP2,;t t
22767 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22768 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22769 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22770 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22771 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22772 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22773 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22774 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22775 s,@cross_compiling@,$cross_compiling,;t t
22776 s,@TIC_PATH@,$TIC_PATH,;t t
22777 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22778 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22779 s,@PANEL_NAME@,$PANEL_NAME,;t t
22780 s,@MENU_NAME@,$MENU_NAME,;t t
22781 s,@FORM_NAME@,$FORM_NAME,;t t
22782 s,@CXX_NAME@,$CXX_NAME,;t t
22783 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22784 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22785 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
22786 CEOF
22787
22788 EOF
22789
22790   cat >>$CONFIG_STATUS <<\EOF
22791   # Split the substitutions into bite-sized pieces for seds with
22792   # small command number limits, like on Digital OSF/1 and HP-UX.
22793   ac_max_sed_lines=48
22794   ac_sed_frag=1 # Number of current file.
22795   ac_beg=1 # First line for current file.
22796   ac_end=$ac_max_sed_lines # Line after last line for current file.
22797   ac_more_lines=:
22798   ac_sed_cmds=
22799   while $ac_more_lines; do
22800     if test $ac_beg -gt 1; then
22801       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22802     else
22803       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22804     fi
22805     if test ! -s $tmp/subs.frag; then
22806       ac_more_lines=false
22807     else
22808       # The purpose of the label and of the branching condition is to
22809       # speed up the sed processing (if there are no `@' at all, there
22810       # is no need to browse any of the substitutions).
22811       # These are the two extra sed commands mentioned above.
22812       (echo ':t
22813   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22814       if test -z "$ac_sed_cmds"; then
22815         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22816       else
22817         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22818       fi
22819       ac_sed_frag=`expr $ac_sed_frag + 1`
22820       ac_beg=$ac_end
22821       ac_end=`expr $ac_end + $ac_max_sed_lines`
22822     fi
22823   done
22824   if test -z "$ac_sed_cmds"; then
22825     ac_sed_cmds=cat
22826   fi
22827 fi # test -n "$CONFIG_FILES"
22828
22829 EOF
22830 cat >>$CONFIG_STATUS <<\EOF
22831 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22832   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22833   case $ac_file in
22834   - | *:- | *:-:* ) # input from stdin
22835         cat >$tmp/stdin
22836         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22837         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22838   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22839         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22840   * )   ac_file_in=$ac_file.in ;;
22841   esac
22842
22843   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22844   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22845          X"$ac_file" : 'X\(//\)[^/]' \| \
22846          X"$ac_file" : 'X\(//\)$' \| \
22847          X"$ac_file" : 'X\(/\)' \| \
22848          .     : '\(.\)' 2>/dev/null ||
22849 echo X"$ac_file" |
22850     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22851           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22852           /^X\(\/\/\)$/{ s//\1/; q; }
22853           /^X\(\/\).*/{ s//\1/; q; }
22854           s/.*/./; q'`
22855   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22856     { case "$ac_dir" in
22857   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22858   *)                      as_incr_dir=.;;
22859 esac
22860 as_dummy="$ac_dir"
22861 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22862   case $as_mkdir_dir in
22863     # Skip DOS drivespec
22864     ?:) as_incr_dir=$as_mkdir_dir ;;
22865     *)
22866       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22867       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22868     ;;
22869   esac
22870 done; }
22871
22872     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22873     # A "../" for each directory in $ac_dir_suffix.
22874     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22875   else
22876     ac_dir_suffix= ac_dots=
22877   fi
22878
22879   case $srcdir in
22880   .)  ac_srcdir=.
22881       if test -z "$ac_dots"; then
22882          ac_top_srcdir=.
22883       else
22884          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22885       fi ;;
22886   [\\/]* | ?:[\\/]* )
22887       ac_srcdir=$srcdir$ac_dir_suffix;
22888       ac_top_srcdir=$srcdir ;;
22889   *) # Relative path.
22890     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22891     ac_top_srcdir=$ac_dots$srcdir ;;
22892   esac
22893
22894   case $INSTALL in
22895   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22896   *) ac_INSTALL=$ac_dots$INSTALL ;;
22897   esac
22898
22899   if test x"$ac_file" != x-; then
22900     { echo "$as_me:22900: creating $ac_file" >&5
22901 echo "$as_me: creating $ac_file" >&6;}
22902     rm -f "$ac_file"
22903   fi
22904   # Let's still pretend it is `configure' which instantiates (i.e., don't
22905   # use $as_me), people would be surprised to read:
22906   #    /* config.h.  Generated automatically by config.status.  */
22907   configure_input="Generated automatically from `echo $ac_file_in |
22908                                                  sed 's,.*/,,'` by configure."
22909
22910   # First look for the input files in the build tree, otherwise in the
22911   # src tree.
22912   ac_file_inputs=`IFS=:
22913     for f in $ac_file_in; do
22914       case $f in
22915       -) echo $tmp/stdin ;;
22916       [\\/$]*)
22917          # Absolute (can't be DOS-style, as IFS=:)
22918          test -f "$f" || { { echo "$as_me:22918: error: cannot find input file: $f" >&5
22919 echo "$as_me: error: cannot find input file: $f" >&2;}
22920    { (exit 1); exit 1; }; }
22921          echo $f;;
22922       *) # Relative
22923          if test -f "$f"; then
22924            # Build tree
22925            echo $f
22926          elif test -f "$srcdir/$f"; then
22927            # Source tree
22928            echo $srcdir/$f
22929          else
22930            # /dev/null tree
22931            { { echo "$as_me:22931: error: cannot find input file: $f" >&5
22932 echo "$as_me: error: cannot find input file: $f" >&2;}
22933    { (exit 1); exit 1; }; }
22934          fi;;
22935       esac
22936     done` || { (exit 1); exit 1; }
22937 EOF
22938 cat >>$CONFIG_STATUS <<\EOF
22939   ac_warn_datarootdir=no
22940   if test x"$ac_file" != x-; then
22941     for ac_item in $ac_file_inputs
22942     do
22943       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22944       if test -n "$ac_seen"; then
22945         ac_used=`grep '@datarootdir@' $ac_item`
22946         if test -z "$ac_used"; then
22947           { echo "$as_me:22947: WARNING: datarootdir was used implicitly but not set:
22948 $ac_seen" >&5
22949 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22950 $ac_seen" >&2;}
22951           ac_warn_datarootdir=yes
22952         fi
22953       fi
22954       ac_seen=`grep '${datarootdir}' $ac_item`
22955       if test -n "$ac_seen"; then
22956         { echo "$as_me:22956: WARNING: datarootdir was used explicitly but not set:
22957 $ac_seen" >&5
22958 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22959 $ac_seen" >&2;}
22960         ac_warn_datarootdir=yes
22961       fi
22962     done
22963   fi
22964
22965 if test "x$ac_warn_datarootdir" = xyes; then
22966   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22967 fi
22968
22969 EOF
22970 cat >>$CONFIG_STATUS <<EOF
22971   sed "$ac_vpsub
22972 $extrasub
22973 EOF
22974 cat >>$CONFIG_STATUS <<\EOF
22975 :t
22976 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22977 s,@configure_input@,$configure_input,;t t
22978 s,@srcdir@,$ac_srcdir,;t t
22979 s,@top_srcdir@,$ac_top_srcdir,;t t
22980 s,@INSTALL@,$ac_INSTALL,;t t
22981 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22982   rm -f $tmp/stdin
22983   if test x"$ac_file" != x-; then
22984     cp $tmp/out $ac_file
22985
22986     for ac_name in prefix exec_prefix datarootdir
22987     do
22988         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22989         if test -n "$ac_seen"; then
22990             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22991             if test -z "$ac_init"; then
22992               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22993               { echo "$as_me:22993: WARNING: Variable $ac_name is used but was not set:
22994 $ac_seen" >&5
22995 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22996 $ac_seen" >&2;}
22997             fi
22998         fi
22999     done
23000     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23001     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23002     if test -s $tmp/out; then
23003       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23004       { echo "$as_me:23004: WARNING: Some variables may not be substituted:
23005 $ac_seen" >&5
23006 echo "$as_me: WARNING: Some variables may not be substituted:
23007 $ac_seen" >&2;}
23008     fi
23009   else
23010     cat $tmp/out
23011   fi
23012   rm -f $tmp/out
23013
23014 done
23015 EOF
23016 cat >>$CONFIG_STATUS <<\EOF
23017
23018 #
23019 # CONFIG_HEADER section.
23020 #
23021
23022 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23023 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23024 #
23025 # ac_d sets the value in "#define NAME VALUE" lines.
23026 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23027 ac_dB='[        ].*$,\1#\2'
23028 ac_dC=' '
23029 ac_dD=',;t'
23030 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23031 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23032 ac_iB='\([      ]\),\1#\2define\3'
23033 ac_iC=' '
23034 ac_iD='\4,;t'
23035 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23036 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23037 ac_uB='$,\1#\2define\3'
23038 ac_uC=' '
23039 ac_uD=',;t'
23040
23041 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23042   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23043   case $ac_file in
23044   - | *:- | *:-:* ) # input from stdin
23045         cat >$tmp/stdin
23046         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23047         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23048   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23049         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23050   * )   ac_file_in=$ac_file.in ;;
23051   esac
23052
23053   test x"$ac_file" != x- && { echo "$as_me:23053: creating $ac_file" >&5
23054 echo "$as_me: creating $ac_file" >&6;}
23055
23056   # First look for the input files in the build tree, otherwise in the
23057   # src tree.
23058   ac_file_inputs=`IFS=:
23059     for f in $ac_file_in; do
23060       case $f in
23061       -) echo $tmp/stdin ;;
23062       [\\/$]*)
23063          # Absolute (can't be DOS-style, as IFS=:)
23064          test -f "$f" || { { echo "$as_me:23064: error: cannot find input file: $f" >&5
23065 echo "$as_me: error: cannot find input file: $f" >&2;}
23066    { (exit 1); exit 1; }; }
23067          echo $f;;
23068       *) # Relative
23069          if test -f "$f"; then
23070            # Build tree
23071            echo $f
23072          elif test -f "$srcdir/$f"; then
23073            # Source tree
23074            echo $srcdir/$f
23075          else
23076            # /dev/null tree
23077            { { echo "$as_me:23077: error: cannot find input file: $f" >&5
23078 echo "$as_me: error: cannot find input file: $f" >&2;}
23079    { (exit 1); exit 1; }; }
23080          fi;;
23081       esac
23082     done` || { (exit 1); exit 1; }
23083   # Remove the trailing spaces.
23084   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23085
23086 EOF
23087
23088 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23089 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23090 # be either 'cat' or 'sort'.
23091 cat confdefs.h | uniq >conftest.vals
23092
23093 # Break up conftest.vals because some shells have a limit on
23094 # the size of here documents, and old seds have small limits too.
23095
23096 rm -f conftest.tail
23097 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23098 while grep . conftest.vals >/dev/null
23099 do
23100   # Write chunks of a limited-size here document to conftest.frag.
23101   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23102   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23103   echo 'CEOF' >> $CONFIG_STATUS
23104   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23105   rm -f conftest.vals
23106   mv conftest.tail conftest.vals
23107 done
23108 rm -f conftest.vals
23109
23110 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23111 # marker @DEFS@.
23112 echo '  cat >> conftest.edit <<CEOF
23113 /@DEFS@/r conftest.frag
23114 /@DEFS@/d
23115 CEOF
23116 sed -f conftest.edit $tmp/in > $tmp/out
23117 rm -f $tmp/in
23118 mv $tmp/out $tmp/in
23119 rm -f conftest.edit conftest.frag
23120 ' >> $CONFIG_STATUS
23121
23122 cat >>$CONFIG_STATUS <<\EOF
23123   # Let's still pretend it is `configure' which instantiates (i.e., don't
23124   # use $as_me), people would be surprised to read:
23125   #    /* config.h.  Generated automatically by config.status.  */
23126   if test x"$ac_file" = x-; then
23127     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23128   else
23129     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23130   fi
23131   cat $tmp/in >>$tmp/config.h
23132   rm -f $tmp/in
23133   if test x"$ac_file" != x-; then
23134     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23135       { echo "$as_me:23135: $ac_file is unchanged" >&5
23136 echo "$as_me: $ac_file is unchanged" >&6;}
23137     else
23138       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23139          X"$ac_file" : 'X\(//\)[^/]' \| \
23140          X"$ac_file" : 'X\(//\)$' \| \
23141          X"$ac_file" : 'X\(/\)' \| \
23142          .     : '\(.\)' 2>/dev/null ||
23143 echo X"$ac_file" |
23144     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23145           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23146           /^X\(\/\/\)$/{ s//\1/; q; }
23147           /^X\(\/\).*/{ s//\1/; q; }
23148           s/.*/./; q'`
23149       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23150         { case "$ac_dir" in
23151   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23152   *)                      as_incr_dir=.;;
23153 esac
23154 as_dummy="$ac_dir"
23155 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23156   case $as_mkdir_dir in
23157     # Skip DOS drivespec
23158     ?:) as_incr_dir=$as_mkdir_dir ;;
23159     *)
23160       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23161       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23162     ;;
23163   esac
23164 done; }
23165
23166       fi
23167       rm -f $ac_file
23168       mv $tmp/config.h $ac_file
23169     fi
23170   else
23171     cat $tmp/config.h
23172     rm -f $tmp/config.h
23173   fi
23174 done
23175 EOF
23176 cat >>$CONFIG_STATUS <<\EOF
23177 #
23178 # CONFIG_COMMANDS section.
23179 #
23180 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23181   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23182   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23183
23184   case $ac_dest in
23185     default )
23186 if test "x$cf_with_tests" != xno ; then
23187
23188 for cf_dir in test
23189 do
23190         if test ! -d $srcdir/$cf_dir; then
23191                 continue
23192         elif test -f $srcdir/$cf_dir/programs; then
23193                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23194         fi
23195 done
23196
23197 fi
23198
23199 cf_prefix=$LIB_PREFIX
23200
23201 case $cf_cv_shlib_version in #(vi
23202 cygdll|msysdll|mingw)
23203         TINFO_NAME=$TINFO_ARG_SUFFIX
23204         TINFO_SUFFIX=.dll
23205         ;;
23206 esac
23207
23208 if test -n "$TINFO_SUFFIX" ; then
23209         case $TINFO_SUFFIX in
23210         tw*)
23211                 TINFO_NAME="${TINFO_NAME}tw"
23212                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
23213                 ;;
23214         t*)
23215                 TINFO_NAME="${TINFO_NAME}t"
23216                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
23217                 ;;
23218         w*)
23219                 TINFO_NAME="${TINFO_NAME}w"
23220                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
23221                 ;;
23222         esac
23223 fi
23224
23225 for cf_dir in $SRC_SUBDIRS
23226 do
23227         if test ! -d $srcdir/$cf_dir ; then
23228                 continue
23229         elif test -f $srcdir/$cf_dir/modules; then
23230
23231                 SHARED_LIB=
23232                 Libs_To_Make=
23233
23234                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23235                 then
23236                         cat >>$cf_dir/Makefile <<CF_EOF
23237
23238 # Generated by CF_LIB_RULES
23239 resulting.map: $UNALTERED_SYMS
23240         sed -e "s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g" < $UNALTERED_SYMS >\$@
23241
23242 clean::
23243         rm -f resulting.map
23244 CF_EOF
23245                 fi
23246
23247                 for cf_item in $cf_LIST_MODELS
23248                 do
23249
23250         case X$cf_item in #(vi
23251         Xlibtool) #(vi
23252                 cf_suffix='.la'
23253                 cf_depsuf=$cf_suffix
23254                 ;;
23255         Xdebug) #(vi
23256                 cf_suffix='_g.a'
23257                 cf_depsuf=$cf_suffix
23258                 ;;
23259         Xprofile) #(vi
23260                 cf_suffix='_p.a'
23261                 cf_depsuf=$cf_suffix
23262                 ;;
23263         Xshared) #(vi
23264                 case $cf_cv_system_name in
23265                 aix[5-7]*) #(vi
23266                         cf_suffix='.so'
23267                         cf_depsuf=$cf_suffix
23268                         ;;
23269                 cygwin*|msys*|mingw*) #(vi
23270                         cf_suffix='.dll'
23271                         cf_depsuf='.dll.a'
23272                         ;;
23273                 darwin*) #(vi
23274                         cf_suffix='.dylib'
23275                         cf_depsuf=$cf_suffix
23276                         ;;
23277                 hpux*) #(vi
23278                         case $target in
23279                         ia64*) #(vi
23280                                 cf_suffix='.so'
23281                                 cf_depsuf=$cf_suffix
23282                                 ;;
23283                         *) #(vi
23284                                 cf_suffix='.sl'
23285                                 cf_depsuf=$cf_suffix
23286                                 ;;
23287                         esac
23288                         ;;
23289                 *) #(vi
23290                         cf_suffix='.so'
23291                         cf_depsuf=$cf_suffix
23292                         ;;
23293                 esac
23294                 ;;
23295         *)
23296                 cf_suffix='.a'
23297                 cf_depsuf=$cf_suffix
23298                 ;;
23299         esac
23300         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23301         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23302
23303                         cf_libname=$cf_dir
23304                         test "$cf_dir" = c++ && cf_libname=ncurses++
23305                         if test $cf_item = shared ; then
23306                                 if test -n "${LIB_SUFFIX}"
23307                                 then
23308                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23309                                 else
23310                                         cf_shared_suffix="$cf_suffix"
23311                                 fi
23312                                 if test "$cf_cv_do_symlinks" = yes ; then
23313                                         cf_version_name=
23314
23315                                         case "$cf_cv_shlib_version" in #(vi
23316                                         rel) #(vi
23317                                                 cf_version_name=REL_VERSION
23318                                                 ;;
23319                                         abi)
23320                                                 cf_version_name=ABI_VERSION
23321                                                 ;;
23322                                         esac
23323
23324                                         if test -n "$cf_version_name"
23325                                         then
23326                                                 case "$cf_cv_system_name" in #(vi
23327                                                 darwin*)
23328                                                         # "w", etc?
23329                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23330                                                         ;; #(vi
23331                                                 *)
23332                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23333                                                         ;;
23334                                                 esac
23335                                         fi
23336                                         if test -n "${LIB_SUFFIX}"
23337                                         then
23338                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23339                                         else
23340                                                 cf_shared_suffix="$cf_suffix"
23341                                         fi
23342                                 fi
23343                                 # cygwin needs import library, and has unique naming convention
23344                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23345                                 # use 'cyg' prefix for shared lib.
23346                                 case $cf_cv_shlib_version in #(vi
23347                                 cygdll) #(vi
23348                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23349                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23350                                         continue
23351                                         ;;
23352                                 msysdll) #(vi
23353                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23354                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23355                                         continue
23356                                         ;;
23357                                 mingw)
23358                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23359                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23360                                         continue
23361                                         ;;
23362                                 esac
23363                         fi
23364                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23365                 done
23366
23367                 if test $cf_dir = ncurses ; then
23368                         cf_subsets="$LIB_SUBSETS"
23369                         cf_r_parts="$cf_subsets"
23370                         cf_liblist="$Libs_To_Make"
23371
23372                         while test -n "$cf_r_parts"
23373                         do
23374                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23375                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23376                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23377                                         cf_item=
23378                                         case $cf_l_parts in #(vi
23379                                         *termlib*) #(vi
23380                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23381                                                 ;;
23382                                         *ticlib*)
23383                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23384                                                 ;;
23385                                         *)
23386                                                 break
23387                                                 ;;
23388                                         esac
23389                                         if test -n "$cf_item"; then
23390                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23391                                         fi
23392                                 else
23393                                         break
23394                                 fi
23395                         done
23396                 else
23397                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23398                 fi
23399
23400                 if test $cf_dir = c++; then
23401                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23402                                 cf_list=
23403                                 for cf_item in $Libs_To_Make
23404                                 do
23405                                         case $cf_item in
23406                                         *.a)
23407                                                 ;;
23408                                         *)
23409                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23410                                                 ;;
23411                                         esac
23412                                         for cf_test in $cf_list
23413                                         do
23414                                                 if test "$cf_test" = "$cf_item"
23415                                                 then
23416                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23417                                                         cf_item=
23418                                                         break
23419                                                 fi
23420                                         done
23421                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23422                                 done
23423                                 Libs_To_Make="$cf_list"
23424                         fi
23425                 fi
23426
23427                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23428                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23429                         $cf_dir/Makefile >$cf_dir/Makefile.out
23430                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23431
23432                 $AWK -f $srcdir/mk-0th.awk \
23433                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23434                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23435
23436                 for cf_subset in $cf_subsets
23437                 do
23438                         cf_subdirs=
23439                         for cf_item in $cf_LIST_MODELS
23440                         do
23441
23442                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23443
23444 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23445
23446                         CXX_MODEL=$cf_ITEM
23447                         if test "$CXX_MODEL" = SHARED; then
23448                                 case $cf_cv_shlib_version in #(vi
23449                                 cygdll|msysdll|mingw) #(vi
23450                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23451
23452 echo "${as_me:-configure}:23452: testing overriding CXX_MODEL to SHARED ..." 1>&5
23453
23454                                         with_shared_cxx=yes
23455                                         ;;
23456                                 *)
23457                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23458                                         ;;
23459                                 esac
23460                         fi
23461
23462         case X$cf_item in #(vi
23463         Xlibtool) #(vi
23464                 cf_suffix='.la'
23465                 cf_depsuf=$cf_suffix
23466                 ;;
23467         Xdebug) #(vi
23468                 cf_suffix='_g.a'
23469                 cf_depsuf=$cf_suffix
23470                 ;;
23471         Xprofile) #(vi
23472                 cf_suffix='_p.a'
23473                 cf_depsuf=$cf_suffix
23474                 ;;
23475         Xshared) #(vi
23476                 case $cf_cv_system_name in
23477                 aix[5-7]*) #(vi
23478                         cf_suffix='.so'
23479                         cf_depsuf=$cf_suffix
23480                         ;;
23481                 cygwin*|msys*|mingw*) #(vi
23482                         cf_suffix='.dll'
23483                         cf_depsuf='.dll.a'
23484                         ;;
23485                 darwin*) #(vi
23486                         cf_suffix='.dylib'
23487                         cf_depsuf=$cf_suffix
23488                         ;;
23489                 hpux*) #(vi
23490                         case $target in
23491                         ia64*) #(vi
23492                                 cf_suffix='.so'
23493                                 cf_depsuf=$cf_suffix
23494                                 ;;
23495                         *) #(vi
23496                                 cf_suffix='.sl'
23497                                 cf_depsuf=$cf_suffix
23498                                 ;;
23499                         esac
23500                         ;;
23501                 *) #(vi
23502                         cf_suffix='.so'
23503                         cf_depsuf=$cf_suffix
23504                         ;;
23505                 esac
23506                 ;;
23507         *)
23508                 cf_suffix='.a'
23509                 cf_depsuf=$cf_suffix
23510                 ;;
23511         esac
23512         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23513         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23514
23515         case $cf_item in
23516         libtool) cf_subdir='obj_lo'  ;;
23517         normal)  cf_subdir='objects' ;;
23518         debug)   cf_subdir='obj_g' ;;
23519         profile) cf_subdir='obj_p' ;;
23520         shared)
23521                 case $cf_cv_system_name in #(vi
23522                 cygwin|msys) #(vi
23523                         cf_subdir='objects' ;;
23524                 *)
23525                         cf_subdir='obj_s' ;;
23526                 esac
23527         esac
23528
23529                         # Test for case where we build libtinfo with a different name.
23530                         cf_libname=$cf_dir
23531                         if test $cf_dir = ncurses ; then
23532                                 case $cf_subset in
23533                                 *base*)
23534                                         cf_libname=${cf_libname}$LIB_SUFFIX
23535                                         ;;
23536                                 *termlib*)
23537                                         cf_libname=$TINFO_LIB_SUFFIX
23538                                         ;;
23539                                 ticlib*)
23540                                         cf_libname=$TICS_LIB_SUFFIX
23541                                         ;;
23542                                 esac
23543                         elif test $cf_dir = c++ ; then
23544                                 cf_libname=ncurses++$LIB_SUFFIX
23545                         else
23546                                 cf_libname=${cf_libname}$LIB_SUFFIX
23547                         fi
23548                         if test -n "${DFT_ARG_SUFFIX}" ; then
23549                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23550                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23551                         fi
23552
23553                         # These dependencies really are for development, not
23554                         # builds, but they are useful in porting, too.
23555                         cf_depend="../include/ncurses_cfg.h"
23556                         if test "$srcdir" = "."; then
23557                                 cf_reldir="."
23558                         else
23559                                 cf_reldir="\${srcdir}"
23560                         fi
23561
23562                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23563                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23564                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23565                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23566                         fi
23567
23568                         cf_dir_suffix=
23569                         old_cf_suffix="$cf_suffix"
23570                         if test "$cf_cv_shlib_version_infix" = yes ; then
23571                         if test -n "$LIB_SUFFIX" ; then
23572                                 case $LIB_SUFFIX in
23573                                 tw*)
23574                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23575                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23576                                         cf_dir_suffix=tw
23577                                         ;;
23578                                 t*)
23579                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23580                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23581                                         cf_dir_suffix=t
23582                                         ;;
23583                                 w*)
23584                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23585                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23586                                         cf_dir_suffix=w
23587                                         ;;
23588                                 esac
23589                         fi
23590                         fi
23591
23592                         $AWK -f $srcdir/mk-1st.awk \
23593                                 name=${cf_libname}${cf_dir_suffix} \
23594                                 traces=$LIB_TRACING \
23595                                 MODEL=$cf_ITEM \
23596                                 CXX_MODEL=$CXX_MODEL \
23597                                 model=$cf_subdir \
23598                                 prefix=$cf_prefix \
23599                                 suffix=$cf_suffix \
23600                                 subset=$cf_subset \
23601                                 driver=$cf_cv_term_driver \
23602                                 SymLink="$LN_S" \
23603                                 TermlibRoot=$TINFO_NAME \
23604                                 TermlibSuffix=$TINFO_SUFFIX \
23605                                 ShlibVer=$cf_cv_shlib_version \
23606                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23607                                 ReLink=${cf_cv_do_relink:-no} \
23608                                 DoLinks=$cf_cv_do_symlinks \
23609                                 rmSoLocs=$cf_cv_rm_so_locs \
23610                                 ldconfig="$LDCONFIG" \
23611                                 overwrite=$WITH_OVERWRITE \
23612                                 depend="$cf_depend" \
23613                                 host="$host" \
23614                                 libtool_version="$LIBTOOL_VERSION" \
23615                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23616
23617                         cf_suffix="$old_cf_suffix"
23618
23619                         for cf_subdir2 in $cf_subdirs lib
23620                         do
23621                                 test $cf_subdir = $cf_subdir2 && break
23622                         done
23623                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23624                         $AWK -f $srcdir/mk-2nd.awk \
23625                                 name=$cf_dir \
23626                                 traces=$LIB_TRACING \
23627                                 MODEL=$cf_ITEM \
23628                                 model=$cf_subdir \
23629                                 subset=$cf_subset \
23630                                 srcdir=$srcdir \
23631                                 echo=$WITH_ECHO \
23632                                 crenames=$cf_cv_prog_CC_c_o \
23633                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23634                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23635                         cf_subdirs="$cf_subdirs $cf_subdir"
23636                         done
23637                 done
23638         fi
23639
23640         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23641 done
23642
23643 for cf_dir in $SRC_SUBDIRS
23644 do
23645         if test ! -d $srcdir/$cf_dir ; then
23646                 continue
23647         fi
23648
23649         if test -f $cf_dir/Makefile ; then
23650                 case "$cf_dir" in
23651                 Ada95) #(vi
23652                         echo 'libs \' >> Makefile
23653                         echo 'install.libs \' >> Makefile
23654                         echo 'uninstall.libs ::' >> Makefile
23655                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23656                         ;;
23657                 esac
23658         fi
23659
23660         if test -f $srcdir/$cf_dir/modules; then
23661                 echo >> Makefile
23662                 if test -f $srcdir/$cf_dir/headers; then
23663 cat >> Makefile <<CF_EOF
23664 install.includes \\
23665 uninstall.includes \\
23666 CF_EOF
23667                 fi
23668 if test "$cf_dir" != "c++" ; then
23669 echo 'lint \' >> Makefile
23670 fi
23671 cat >> Makefile <<CF_EOF
23672 libs \\
23673 lintlib \\
23674 install.libs \\
23675 uninstall.libs \\
23676 install.$cf_dir \\
23677 uninstall.$cf_dir ::
23678         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23679 CF_EOF
23680         elif test -f $srcdir/$cf_dir/headers; then
23681 cat >> Makefile <<CF_EOF
23682
23683 libs \\
23684 install.libs \\
23685 uninstall.libs \\
23686 install.includes \\
23687 uninstall.includes ::
23688         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23689 CF_EOF
23690 fi
23691 done
23692
23693 if test "x$cf_with_db_install" = xyes; then
23694 cat >> Makefile <<CF_EOF
23695
23696 install.libs uninstall.libs \\
23697 install.data uninstall.data ::
23698 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23699 CF_EOF
23700 else
23701 cat >> Makefile <<CF_EOF
23702
23703 install.libs uninstall.libs ::
23704         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23705 CF_EOF
23706 fi
23707
23708 if test "x$cf_with_manpages" = xyes; then
23709 cat >> Makefile <<CF_EOF
23710
23711 install.man \\
23712 uninstall.man ::
23713         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23714 CF_EOF
23715 fi
23716
23717 cat >> Makefile <<CF_EOF
23718
23719 distclean ::
23720         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23721         rm -f headers.sh headers.sed mk_shared_lib.sh
23722         rm -f edit_man.* man_alias.*
23723         rm -rf \${DIRS_TO_MAKE}
23724 CF_EOF
23725
23726 # Special case: tack's manpage lives in its own directory.
23727 if test "x$cf_with_manpages" = xyes; then
23728 if test -d tack ; then
23729 if test -f $srcdir/$tack.h; then
23730 cat >> Makefile <<CF_EOF
23731
23732 install.man \\
23733 uninstall.man ::
23734         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23735 CF_EOF
23736 fi
23737 fi
23738 fi
23739
23740 rm -f headers.sed headers.sh
23741
23742 echo creating headers.sh
23743 cat >headers.sh <<CF_EOF
23744 #! /bin/sh
23745 # This shell script is generated by the 'configure' script.  It is invoked in a
23746 # subdirectory of the build tree.  It generates a sed-script in the parent
23747 # directory that is used to adjust includes for header files that reside in a
23748 # subdirectory of /usr/include, etc.
23749 PRG=""
23750 while test \$# != 3
23751 do
23752 PRG="\$PRG \$1"; shift
23753 done
23754 DST=\$1
23755 REF=\$2
23756 SRC=\$3
23757 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23758 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23759 echo installing \$SRC in \$DST
23760 CF_EOF
23761
23762 if test $WITH_CURSES_H = yes; then
23763         cat >>headers.sh <<CF_EOF
23764 case \$DST in
23765 /*/include/*)
23766         END=\`basename \$DST\`
23767         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23768         do
23769                 NAME=\`basename \$i\`
23770                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23771         done
23772         ;;
23773 *)
23774         echo "" >> \$TMPSED
23775         ;;
23776 esac
23777 CF_EOF
23778
23779 else
23780         cat >>headers.sh <<CF_EOF
23781 case \$DST in
23782 /*/include/*)
23783         END=\`basename \$DST\`
23784         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23785         do
23786                 NAME=\`basename \$i\`
23787                 if test "\$NAME" = "curses.h"
23788                 then
23789                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23790                         NAME=ncurses.h
23791                 fi
23792                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23793         done
23794         ;;
23795 *)
23796         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23797         ;;
23798 esac
23799 CF_EOF
23800 fi
23801 cat >>headers.sh <<CF_EOF
23802 rm -f \$TMPSRC
23803 sed -f \$TMPSED \$SRC > \$TMPSRC
23804 NAME=\`basename \$SRC\`
23805 CF_EOF
23806 if test $WITH_CURSES_H != yes; then
23807         cat >>headers.sh <<CF_EOF
23808 test "\$NAME" = "curses.h" && NAME=ncurses.h
23809 CF_EOF
23810 fi
23811 cat >>headers.sh <<CF_EOF
23812 # Just in case someone gzip'd manpages, remove the conflicting copy.
23813 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23814
23815 eval \$PRG \$TMPSRC \$DST/\$NAME
23816 rm -f \$TMPSRC \$TMPSED
23817 CF_EOF
23818
23819 chmod 0755 headers.sh
23820
23821 for cf_dir in $SRC_SUBDIRS
23822 do
23823         if test ! -d $srcdir/$cf_dir ; then
23824                 continue
23825         fi
23826
23827         if test -f $srcdir/$cf_dir/headers; then
23828                 $AWK -f $srcdir/mk-hdr.awk \
23829                         subset="$LIB_SUBSETS" \
23830                         compat="$WITH_CURSES_H" \
23831                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23832         fi
23833
23834         if test -f $srcdir/$cf_dir/modules; then
23835                 if test "$cf_dir" != "c++" ; then
23836                         cat >>$cf_dir/Makefile <<"CF_EOF"
23837 depend : ${AUTO_SRC}
23838         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23839
23840 # DO NOT DELETE THIS LINE -- make depend depends on it.
23841 CF_EOF
23842                 fi
23843         fi
23844 done
23845
23846 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23847 if test -z "$USE_OLD_MAKERULES" ; then
23848         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23849 fi
23850 fi
23851  ;;
23852   esac
23853 done
23854 EOF
23855
23856 cat >>$CONFIG_STATUS <<\EOF
23857
23858 { (exit 0); exit 0; }
23859 EOF
23860 chmod +x $CONFIG_STATUS
23861 ac_clean_files=$ac_clean_files_save
23862
23863 # configure is writing to config.log, and then calls config.status.
23864 # config.status does its own redirection, appending to config.log.
23865 # Unfortunately, on DOS this fails, as config.log is still kept open
23866 # by configure, so config.status won't be able to write to it; its
23867 # output is simply discarded.  So we exec the FD to /dev/null,
23868 # effectively closing config.log, so it can be properly (re)opened and
23869 # appended to by config.status.  When coming back to configure, we
23870 # need to make the FD available again.
23871 if test "$no_create" != yes; then
23872   ac_cs_success=:
23873   exec 5>/dev/null
23874   $SHELL $CONFIG_STATUS || ac_cs_success=false
23875   exec 5>>config.log
23876   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23877   # would make configure fail if this is the last instruction.
23878   $ac_cs_success || { (exit 1); exit 1; }
23879 fi
23880 ${MAKE:-make} preinstall