]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20150418
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.611 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --with-extra-suffix=X   append extra suffix to header/library paths
751   --disable-overwrite     put headers in subdir, omit link to -lcurses
752   --disable-database      do not use terminfo, only fallbacks/termcap
753   --with-database=XXX     specify terminfo source to install
754   --with-hashed-db        specify hashed-database library
755   --with-fallbacks=XXX    specify list of fallback terminal descriptions
756   --without-xterm-new     specify if xterm terminfo should be old version
757   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
758   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760   --disable-big-core      assume machine has little memory
761   --disable-big-strings   assume compiler has only standard-size strings
762   --enable-termcap        compile in termcap fallback support
763   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764   --enable-getcap         fast termcap load, no xrefs to terminfo
765   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
766   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767   --disable-root-environ  restrict environment when running as root
768   --enable-symlinks       make tic use symbolic links not hard links
769   --enable-broken_linker  compile with broken-linker support code
770   --enable-bsdpad         recognize BSD-style prefix padding
771   --enable-widec          compile with wide-char/UTF-8 code
772   --disable-lp64          allow chtype to be long (ignore _LP64)
773   --disable-largefile     omit support for large files
774   --disable-tparm-varargs compile tparm() without varargs interface
775   --disable-tic-depends   link tic library without explicit dependency on ncurses library
776   --with-bool=TYPE        override fallback type of bool variable
777   --with-caps=alt         compile with alternate Caps file
778   --with-chtype=TYPE      override type of chtype
779   --with-ospeed=TYPE      override type of ospeed variable
780   --with-mmask-t=TYPE     override type of mmask_t
781   --with-ccharw-max=XXX   override size CCHARW_MAX
782   --with-tparm-arg=TYPE   override parameter type of tparm
783   --with-rcs-ids          compile-in RCS identifiers
784 Options to Specify How Manpages are Installed:
785   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
786                           optionally formatted/catonly, e.g., gzip,formatted
787   --with-manpage-renames  specify manpage-renaming
788   --with-manpage-aliases  specify manpage-aliases using .so
789   --with-manpage-symlinks specify manpage-aliases using symlinks
790   --with-manpage-tbl      specify manpage processing with tbl
791 Extensions:
792   --disable-ext-funcs     disable function-extensions
793   --enable-sp-funcs       enable experimental SCREEN-extensions
794   --enable-term-driver    enable experimental terminal-driver
795   --enable-const          compile with extra/non-standard const
796   --enable-ext-colors     compile for 256-color support
797   --enable-ext-mouse      compile for extended mouse-encoding
798   --enable-ext-putwin     compile with extended putwin/screendump
799   --enable-no-padding     compile with $NCURSES_NO_PADDING code
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --enable-sigwinch       compile with SIGWINCH handler
802   --enable-tcap-names     compile with user-definable terminal capabilities
803 Development Code:
804   --without-develop       disable development options
805   --enable-hard-tabs      compile with hard-tabs code
806   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
807 Experimental Code:
808   --disable-assumed-color do not assume anything about default-colors
809   --disable-hashmap       compile without hashmap scrolling-optimization
810   --enable-colorfgbg      compile-in experimental $COLORFGBG code
811   --enable-interop        compile-in experimental interop bindings
812   --with-pthread          use POSIX thread library
813   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
814   --enable-weak-symbols   enable weak-symbols for pthreads
815   --enable-reentrant      compile with experimental reentrant code
816   --with-wrap-prefix=XXX  override prefix used for public variables
817   --enable-safe-sprintf   compile with experimental safe-sprintf code
818   --disable-scroll-hints  compile without scroll-hints code
819   --enable-wgetch-events  compile with experimental wgetch-events code
820 Testing/development Options:
821   --disable-echo          do not display "compiling" commands
822   --enable-warnings       build: turn on GCC compiler warnings
823   --enable-string-hacks   work around bogus compiler/loader warnings
824   --enable-assertions     test: turn on generation of assertion code
825   --with-dmalloc          test: use Gray Watson's dmalloc library
826   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
827   --with-valgrind         test: use valgrind
828   --disable-leaks         test: free permanent memory, analyze leaks
829   --enable-expanded       test: generate functions for certain macros
830   --disable-macros        test: use functions rather than macros
831   --with-trace            test: add trace() function to all models of ncurses
832   --disable-gnat-projects test: disable GNAT projects even if usable
833 Ada95 Binding Options:
834   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
835   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
836   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
837   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
838
839 Some influential environment variables:
840   CC          C compiler command
841   CFLAGS      C compiler flags
842   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
843               nonstandard directory <lib dir>
844   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
845               headers in a nonstandard directory <include dir>
846   CPP         C preprocessor
847   CXX         C++ compiler command
848   CXXFLAGS    C++ compiler flags
849   CXXCPP      C++ preprocessor
850
851 Use these variables to override the choices made by `configure' or to help
852 it to find libraries and programs with nonstandard names/locations.
853
854 EOF
855 fi
856
857 if test "$ac_init_help" = "recursive"; then
858   # If there are subdirs, report their specific --help.
859   ac_popdir=`pwd`
860   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861     cd $ac_subdir
862     # A "../" for each directory in /$ac_subdir.
863     ac_dots=`echo $ac_subdir |
864              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
865
866     case $srcdir in
867     .) # No --srcdir option.  We are building in place.
868       ac_sub_srcdir=$srcdir ;;
869     [\\/]* | ?:[\\/]* ) # Absolute path.
870       ac_sub_srcdir=$srcdir/$ac_subdir ;;
871     *) # Relative path.
872       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873     esac
874
875     # Check for guested configure; otherwise get Cygnus style configure.
876     if test -f $ac_sub_srcdir/configure.gnu; then
877       echo
878       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
879     elif test -f $ac_sub_srcdir/configure; then
880       echo
881       $SHELL $ac_sub_srcdir/configure  --help=recursive
882     elif test -f $ac_sub_srcdir/configure.ac ||
883            test -f $ac_sub_srcdir/configure.in; then
884       echo
885       $ac_configure --help
886     else
887       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
888     fi
889     cd $ac_popdir
890   done
891 fi
892
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895   cat <<\EOF
896
897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898 Free Software Foundation, Inc.
899 This configure script is free software; the Free Software Foundation
900 gives unlimited permission to copy, distribute and modify it.
901 EOF
902   exit 0
903 fi
904 exec 5>config.log
905 cat >&5 <<EOF
906 This file contains any messages produced by compilers while
907 running configure, to aid debugging if configure makes a mistake.
908
909 It was created by $as_me, which was
910 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
911
912   $ $0 $@
913
914 EOF
915 {
916 cat <<_ASUNAME
917 ## ---------- ##
918 ## Platform.  ##
919 ## ---------- ##
920
921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
926
927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
928 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
929
930 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
931 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
933 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
934 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
935 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
936 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
937
938 PATH = $PATH
939
940 _ASUNAME
941 } >&5
942
943 cat >&5 <<EOF
944 ## ------------ ##
945 ## Core tests.  ##
946 ## ------------ ##
947
948 EOF
949
950 # Keep a trace of the command line.
951 # Strip out --no-create and --no-recursion so they do not pile up.
952 # Also quote any args containing shell meta-characters.
953 ac_configure_args=
954 ac_sep=
955 for ac_arg
956 do
957   case $ac_arg in
958   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959   | --no-cr | --no-c) ;;
960   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
962   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
963     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
964     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
965     ac_sep=" " ;;
966   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
967      ac_sep=" " ;;
968   esac
969   # Get rid of the leading space.
970 done
971
972 # When interrupted or exit'd, cleanup temporary files, and complete
973 # config.log.  We remove comments because anyway the quotes in there
974 # would cause problems or look ugly.
975 trap 'exit_status=$?
976   # Save into config.log some information that might help in debugging.
977   echo >&5
978   echo "## ----------------- ##" >&5
979   echo "## Cache variables.  ##" >&5
980   echo "## ----------------- ##" >&5
981   echo >&5
982   # The following way of writing the cache mishandles newlines in values,
983 {
984   (set) 2>&1 |
985     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
986     *ac_space=\ *)
987       sed -n \
988         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
989           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
990       ;;
991     *)
992       sed -n \
993         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
994       ;;
995     esac;
996 } >&5
997   sed "/^$/d" confdefs.h >conftest.log
998   if test -s conftest.log; then
999     echo >&5
1000     echo "## ------------ ##" >&5
1001     echo "## confdefs.h.  ##" >&5
1002     echo "## ------------ ##" >&5
1003     echo >&5
1004     cat conftest.log >&5
1005   fi
1006   (echo; echo) >&5
1007   test "$ac_signal" != 0 &&
1008     echo "$as_me: caught signal $ac_signal" >&5
1009   echo "$as_me: exit $exit_status" >&5
1010   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1011     exit $exit_status
1012      ' 0
1013 for ac_signal in 1 2 13 15; do
1014   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015 done
1016 ac_signal=0
1017
1018 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1019 rm -rf conftest* confdefs.h
1020 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021 echo >confdefs.h
1022
1023 # Let the site file select an alternate cache file if it wants to.
1024 # Prefer explicitly selected file to automatically selected ones.
1025 if test -z "$CONFIG_SITE"; then
1026   if test "x$prefix" != xNONE; then
1027     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1028   else
1029     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1030   fi
1031 fi
1032 for ac_site_file in $CONFIG_SITE; do
1033   if test -r "$ac_site_file"; then
1034     { echo "$as_me:1034: loading site script $ac_site_file" >&5
1035 echo "$as_me: loading site script $ac_site_file" >&6;}
1036     cat "$ac_site_file" >&5
1037     . "$ac_site_file"
1038   fi
1039 done
1040
1041 if test -r "$cache_file"; then
1042   # Some versions of bash will fail to source /dev/null (special
1043   # files actually), so we avoid doing that.
1044   if test -f "$cache_file"; then
1045     { echo "$as_me:1045: loading cache $cache_file" >&5
1046 echo "$as_me: loading cache $cache_file" >&6;}
1047     case $cache_file in
1048       [\\/]* | ?:[\\/]* ) . $cache_file;;
1049       *)                      . ./$cache_file;;
1050     esac
1051   fi
1052 else
1053   { echo "$as_me:1053: creating cache $cache_file" >&5
1054 echo "$as_me: creating cache $cache_file" >&6;}
1055   >$cache_file
1056 fi
1057
1058 # Check that the precious variables saved in the cache have kept the same
1059 # value.
1060 ac_cache_corrupted=false
1061 for ac_var in `(set) 2>&1 |
1062                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1063   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1064   eval ac_new_set=\$ac_env_${ac_var}_set
1065   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1066   eval ac_new_val="\$ac_env_${ac_var}_value"
1067   case $ac_old_set,$ac_new_set in
1068     set,)
1069       { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1070 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071       ac_cache_corrupted=: ;;
1072     ,set)
1073       { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
1074 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075       ac_cache_corrupted=: ;;
1076     ,);;
1077     *)
1078       if test "x$ac_old_val" != "x$ac_new_val"; then
1079         { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
1080 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1081         { echo "$as_me:1081:   former value:  $ac_old_val" >&5
1082 echo "$as_me:   former value:  $ac_old_val" >&2;}
1083         { echo "$as_me:1083:   current value: $ac_new_val" >&5
1084 echo "$as_me:   current value: $ac_new_val" >&2;}
1085         ac_cache_corrupted=:
1086       fi;;
1087   esac
1088   # Pass precious variables to config.status.  It doesn't matter if
1089   # we pass some twice (in addition to the command line arguments).
1090   if test "$ac_new_set" = set; then
1091     case $ac_new_val in
1092     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1093       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1094       ac_configure_args="$ac_configure_args '$ac_arg'"
1095       ;;
1096     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1097        ;;
1098     esac
1099   fi
1100 done
1101 if $ac_cache_corrupted; then
1102   { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
1103 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1104   { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1105 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106    { (exit 1); exit 1; }; }
1107 fi
1108
1109 ac_ext=c
1110 ac_cpp='$CPP $CPPFLAGS'
1111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114 ac_main_return=return
1115
1116 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1117   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1118                    ECHO_T='     ' ;;
1119   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121 esac
1122 echo "#! $SHELL" >conftest.sh
1123 echo  "exit 0"   >>conftest.sh
1124 chmod +x conftest.sh
1125 if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
1126   (PATH=".;."; conftest.sh) 2>&5
1127   ac_status=$?
1128   echo "$as_me:1128: \$? = $ac_status" >&5
1129   (exit $ac_status); }; then
1130   ac_path_separator=';'
1131 else
1132   ac_path_separator=:
1133 fi
1134 PATH_SEPARATOR="$ac_path_separator"
1135 rm -f conftest.sh
1136
1137 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1138
1139 top_builddir=`pwd`
1140
1141 echo "$as_me:1141: checking for egrep" >&5
1142 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143 if test "${ac_cv_prog_egrep+set}" = set; then
1144   echo $ECHO_N "(cached) $ECHO_C" >&6
1145 else
1146   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1147                 then ac_cv_prog_egrep='grep -E'
1148                 else ac_cv_prog_egrep='egrep'
1149         fi
1150 fi
1151 echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
1152 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1153         EGREP=$ac_cv_prog_egrep
1154
1155         test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
1156 echo "$as_me: error: No egrep program found" >&2;}
1157    { (exit 1); exit 1; }; }
1158
1159 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 cf_cv_abi_version=${NCURSES_MAJOR}
1163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164 cf_cv_timestamp=`date`
1165 echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1166 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1167
1168 if test -f $srcdir/VERSION ; then
1169         echo "$as_me:1169: checking for package version" >&5
1170 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1171
1172         # if there are not enough fields, cut returns the last one...
1173         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1174         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1175         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1176
1177         # this is how CF_BUNDLED_INTL uses $VERSION:
1178         VERSION="$cf_field1"
1179
1180         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181         test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182 echo "$as_me: error: missing major-version" >&2;}
1183    { (exit 1); exit 1; }; }
1184
1185         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1186         test -z "$VERSION_MINOR" && { { echo "$as_me:1186: error: missing minor-version" >&5
1187 echo "$as_me: error: missing minor-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1192
1193         echo "$as_me:1193: checking for package patch date" >&5
1194 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196         case .$VERSION_PATCH in
1197         (.)
1198                 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200    { (exit 1); exit 1; }; }
1201                 ;;
1202         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1203                 ;;
1204         (*)
1205                 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207    { (exit 1); exit 1; }; }
1208                 ;;
1209         esac
1210         echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211 echo "${ECHO_T}$VERSION_PATCH" >&6
1212 else
1213         { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217
1218 # show the actual data that we have for versions:
1219 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1220
1221 echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1222
1223 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1224
1225 echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1226
1227 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1234
1235         cf_PACKAGE=NCURSES
1236         PACKAGE=ncurses
1237
1238 cat >>confdefs.h <<EOF
1239 #define PACKAGE "$PACKAGE"
1240 EOF
1241
1242 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1243
1244         cat >>confdefs.h <<EOF
1245 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1246 EOF
1247
1248         cat >>confdefs.h <<EOF
1249 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1250 EOF
1251
1252 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1253
1254 # Check whether --with-rel-version or --without-rel-version was given.
1255 if test "${with_rel_version+set}" = set; then
1256   withval="$with_rel_version"
1257   { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1258 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259  cf_cv_rel_version=$withval
1260 fi;
1261
1262  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1263  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1264
1265 if test -n "$NCURSES_MAJOR" ; then
1266   case $NCURSES_MAJOR in
1267   ([0-9]*)
1268         ;;
1269   (*)
1270         { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1271 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272    { (exit 1); exit 1; }; }
1273         ;;
1274   esac
1275 else
1276   { { echo "$as_me:1276: error: Release major-version value is empty" >&5
1277 echo "$as_me: error: Release major-version value is empty" >&2;}
1278    { (exit 1); exit 1; }; }
1279 fi
1280
1281 if test -n "$NCURSES_MINOR" ; then
1282   case $NCURSES_MINOR in
1283   ([0-9]*)
1284         ;;
1285   (*)
1286         { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1287 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288    { (exit 1); exit 1; }; }
1289         ;;
1290   esac
1291 else
1292   { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
1293 echo "$as_me: error: Release minor-version value is empty" >&2;}
1294    { (exit 1); exit 1; }; }
1295 fi
1296
1297 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1298
1299 # Check whether --with-abi-version or --without-abi-version was given.
1300 if test "${with_abi_version+set}" = set; then
1301   withval="$with_abi_version"
1302   { echo "$as_me:1302: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1303 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1304  cf_cv_abi_version=$withval
1305 fi;
1306
1307 if test -n "$cf_cv_abi_version" ; then
1308   case $cf_cv_abi_version in
1309   ([0-9]*)
1310         ;;
1311   (*)
1312         { { echo "$as_me:1312: error: ABI version is not a number: $cf_cv_abi_version" >&5
1313 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1314    { (exit 1); exit 1; }; }
1315         ;;
1316   esac
1317 else
1318   { { echo "$as_me:1318: error: ABI version value is empty" >&5
1319 echo "$as_me: error: ABI version value is empty" >&2;}
1320    { (exit 1); exit 1; }; }
1321 fi
1322
1323 ac_aux_dir=
1324 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1325   if test -f $ac_dir/install-sh; then
1326     ac_aux_dir=$ac_dir
1327     ac_install_sh="$ac_aux_dir/install-sh -c"
1328     break
1329   elif test -f $ac_dir/install.sh; then
1330     ac_aux_dir=$ac_dir
1331     ac_install_sh="$ac_aux_dir/install.sh -c"
1332     break
1333   elif test -f $ac_dir/shtool; then
1334     ac_aux_dir=$ac_dir
1335     ac_install_sh="$ac_aux_dir/shtool install -c"
1336     break
1337   fi
1338 done
1339 if test -z "$ac_aux_dir"; then
1340   { { echo "$as_me:1340: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1341 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1345 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1346 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1347
1348 # Make sure we can run config.sub.
1349 $ac_config_sub sun4 >/dev/null 2>&1 ||
1350   { { echo "$as_me:1350: error: cannot run $ac_config_sub" >&5
1351 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1352    { (exit 1); exit 1; }; }
1353
1354 echo "$as_me:1354: checking build system type" >&5
1355 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1356 if test "${ac_cv_build+set}" = set; then
1357   echo $ECHO_N "(cached) $ECHO_C" >&6
1358 else
1359   ac_cv_build_alias=$build_alias
1360 test -z "$ac_cv_build_alias" &&
1361   ac_cv_build_alias=`$ac_config_guess`
1362 test -z "$ac_cv_build_alias" &&
1363   { { echo "$as_me:1363: error: cannot guess build type; you must specify one" >&5
1364 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1365    { (exit 1); exit 1; }; }
1366 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1367   { { echo "$as_me:1367: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1368 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1369    { (exit 1); exit 1; }; }
1370
1371 fi
1372 echo "$as_me:1372: result: $ac_cv_build" >&5
1373 echo "${ECHO_T}$ac_cv_build" >&6
1374 build=$ac_cv_build
1375 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1376 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1377 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1378
1379 echo "$as_me:1379: checking host system type" >&5
1380 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1381 if test "${ac_cv_host+set}" = set; then
1382   echo $ECHO_N "(cached) $ECHO_C" >&6
1383 else
1384   ac_cv_host_alias=$host_alias
1385 test -z "$ac_cv_host_alias" &&
1386   ac_cv_host_alias=$ac_cv_build_alias
1387 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_host" >&5
1394 echo "${ECHO_T}$ac_cv_host" >&6
1395 host=$ac_cv_host
1396 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1401         echo "$as_me:1401: checking target system type" >&5
1402 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1403 if test "${ac_cv_target+set}" = set; then
1404   echo $ECHO_N "(cached) $ECHO_C" >&6
1405 else
1406   ac_cv_target_alias=$target_alias
1407 test "x$ac_cv_target_alias" = "x" &&
1408   ac_cv_target_alias=$ac_cv_host_alias
1409 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1410   { { echo "$as_me:1410: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1411 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1412    { (exit 1); exit 1; }; }
1413
1414 fi
1415 echo "$as_me:1415: result: $ac_cv_target" >&5
1416 echo "${ECHO_T}$ac_cv_target" >&6
1417 target=$ac_cv_target
1418 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422 # The aliases save the names the user supplied, while $host etc.
1423 # will get canonicalized.
1424 test -n "$target_alias" &&
1425   test "$program_prefix$program_suffix$program_transform_name" = \
1426     NONENONEs,x,x, &&
1427   program_prefix=${target_alias}-
1428         system_name="$host_os"
1429 else
1430         system_name="`(uname -s -r) 2>/dev/null`"
1431         if test -z "$system_name" ; then
1432                 system_name="`(hostname) 2>/dev/null`"
1433         fi
1434 fi
1435 test -n "$system_name" &&
1436 cat >>confdefs.h <<EOF
1437 #define SYSTEM_NAME "$system_name"
1438 EOF
1439
1440 if test "${cf_cv_system_name+set}" = set; then
1441   echo $ECHO_N "(cached) $ECHO_C" >&6
1442 else
1443   cf_cv_system_name="$system_name"
1444 fi
1445
1446 test -z "$system_name" && system_name="$cf_cv_system_name"
1447 test -n "$cf_cv_system_name" && echo "$as_me:1447: result: Configuring for $cf_cv_system_name" >&5
1448 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1449
1450 if test ".$system_name" != ".$cf_cv_system_name" ; then
1451         echo "$as_me:1451: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1452 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1453         { { echo "$as_me:1453: error: \"Please remove config.cache and try again.\"" >&5
1454 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1455    { (exit 1); exit 1; }; }
1456 fi
1457
1458 # Check whether --with-system-type or --without-system-type was given.
1459 if test "${with_system_type+set}" = set; then
1460   withval="$with_system_type"
1461   { echo "$as_me:1461: WARNING: overriding system type to $withval" >&5
1462 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1463         cf_cv_system_name=$withval
1464         host_os=$withval
1465
1466 fi;
1467
1468 ###     Save the given $CFLAGS to allow user-override.
1469 cf_user_CFLAGS="$CFLAGS"
1470
1471 ###     Default install-location
1472
1473 echo "$as_me:1473: checking for prefix" >&5
1474 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1475 if test "x$prefix" = "xNONE" ; then
1476         case "$cf_cv_system_name" in
1477                 # non-vendor systems don't have a conflict
1478         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1479                 prefix=/usr
1480                 ;;
1481         (*)     prefix=$ac_default_prefix
1482                 ;;
1483         esac
1484 fi
1485 echo "$as_me:1485: result: $prefix" >&5
1486 echo "${ECHO_T}$prefix" >&6
1487
1488 if test "x$prefix" = "xNONE" ; then
1489 echo "$as_me:1489: checking for default include-directory" >&5
1490 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1491 test -n "$verbose" && echo 1>&6
1492 for cf_symbol in \
1493         $includedir \
1494         $includedir/ncurses \
1495         $prefix/include \
1496         $prefix/include/ncurses \
1497         /usr/local/include \
1498         /usr/local/include/ncurses \
1499         /usr/include \
1500         /usr/include/ncurses
1501 do
1502         cf_dir=`eval echo $cf_symbol`
1503         if test -f $cf_dir/curses.h ; then
1504         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1505                 includedir="$cf_symbol"
1506                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1507                 break
1508         fi
1509         fi
1510         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1511 done
1512 echo "$as_me:1512: result: $includedir" >&5
1513 echo "${ECHO_T}$includedir" >&6
1514 fi
1515
1516 ###     Checks for programs.
1517
1518 # Check whether --with-ada or --without-ada was given.
1519 if test "${with_ada+set}" = set; then
1520   withval="$with_ada"
1521   cf_with_ada=$withval
1522 else
1523   cf_with_ada=yes
1524 fi;
1525 if test "x$cf_with_ada" = xyes
1526 then
1527         cf_PROG_CC="gnatgcc gcc cc"
1528 else
1529         cf_PROG_CC="gcc cc"
1530 fi
1531
1532 ac_ext=c
1533 ac_cpp='$CPP $CPPFLAGS'
1534 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1535 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1536 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1537 ac_main_return=return
1538 if test -n "$ac_tool_prefix"; then
1539   for ac_prog in $cf_PROG_CC
1540   do
1541     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1542 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1543 echo "$as_me:1543: checking for $ac_word" >&5
1544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1545 if test "${ac_cv_prog_CC+set}" = set; then
1546   echo $ECHO_N "(cached) $ECHO_C" >&6
1547 else
1548   if test -n "$CC"; then
1549   ac_cv_prog_CC="$CC" # Let the user override the test.
1550 else
1551   ac_save_IFS=$IFS; IFS=$ac_path_separator
1552 ac_dummy="$PATH"
1553 for ac_dir in $ac_dummy; do
1554   IFS=$ac_save_IFS
1555   test -z "$ac_dir" && ac_dir=.
1556   $as_executable_p "$ac_dir/$ac_word" || continue
1557 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1558 echo "$as_me:1558: found $ac_dir/$ac_word" >&5
1559 break
1560 done
1561
1562 fi
1563 fi
1564 CC=$ac_cv_prog_CC
1565 if test -n "$CC"; then
1566   echo "$as_me:1566: result: $CC" >&5
1567 echo "${ECHO_T}$CC" >&6
1568 else
1569   echo "$as_me:1569: result: no" >&5
1570 echo "${ECHO_T}no" >&6
1571 fi
1572
1573     test -n "$CC" && break
1574   done
1575 fi
1576 if test -z "$CC"; then
1577   ac_ct_CC=$CC
1578   for ac_prog in $cf_PROG_CC
1579 do
1580   # Extract the first word of "$ac_prog", so it can be a program name with args.
1581 set dummy $ac_prog; ac_word=$2
1582 echo "$as_me:1582: checking for $ac_word" >&5
1583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1584 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1585   echo $ECHO_N "(cached) $ECHO_C" >&6
1586 else
1587   if test -n "$ac_ct_CC"; then
1588   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1589 else
1590   ac_save_IFS=$IFS; IFS=$ac_path_separator
1591 ac_dummy="$PATH"
1592 for ac_dir in $ac_dummy; do
1593   IFS=$ac_save_IFS
1594   test -z "$ac_dir" && ac_dir=.
1595   $as_executable_p "$ac_dir/$ac_word" || continue
1596 ac_cv_prog_ac_ct_CC="$ac_prog"
1597 echo "$as_me:1597: found $ac_dir/$ac_word" >&5
1598 break
1599 done
1600
1601 fi
1602 fi
1603 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1604 if test -n "$ac_ct_CC"; then
1605   echo "$as_me:1605: result: $ac_ct_CC" >&5
1606 echo "${ECHO_T}$ac_ct_CC" >&6
1607 else
1608   echo "$as_me:1608: result: no" >&5
1609 echo "${ECHO_T}no" >&6
1610 fi
1611
1612   test -n "$ac_ct_CC" && break
1613 done
1614
1615   CC=$ac_ct_CC
1616 fi
1617
1618 test -z "$CC" && { { echo "$as_me:1618: error: no acceptable cc found in \$PATH" >&5
1619 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1620    { (exit 1); exit 1; }; }
1621
1622 # Provide some information about the compiler.
1623 echo "$as_me:1623:" \
1624      "checking for C compiler version" >&5
1625 ac_compiler=`set X $ac_compile; echo $2`
1626 { (eval echo "$as_me:1626: \"$ac_compiler --version </dev/null >&5\"") >&5
1627   (eval $ac_compiler --version </dev/null >&5) 2>&5
1628   ac_status=$?
1629   echo "$as_me:1629: \$? = $ac_status" >&5
1630   (exit $ac_status); }
1631 { (eval echo "$as_me:1631: \"$ac_compiler -v </dev/null >&5\"") >&5
1632   (eval $ac_compiler -v </dev/null >&5) 2>&5
1633   ac_status=$?
1634   echo "$as_me:1634: \$? = $ac_status" >&5
1635   (exit $ac_status); }
1636 { (eval echo "$as_me:1636: \"$ac_compiler -V </dev/null >&5\"") >&5
1637   (eval $ac_compiler -V </dev/null >&5) 2>&5
1638   ac_status=$?
1639   echo "$as_me:1639: \$? = $ac_status" >&5
1640   (exit $ac_status); }
1641
1642 cat >conftest.$ac_ext <<_ACEOF
1643 #line 1643 "configure"
1644 #include "confdefs.h"
1645
1646 int
1647 main ()
1648 {
1649
1650   ;
1651   return 0;
1652 }
1653 _ACEOF
1654 ac_clean_files_save=$ac_clean_files
1655 ac_clean_files="$ac_clean_files a.out a.exe"
1656 # Try to create an executable without -o first, disregard a.out.
1657 # It will help us diagnose broken compilers, and finding out an intuition
1658 # of exeext.
1659 echo "$as_me:1659: checking for C compiler default output" >&5
1660 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1661 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1662 if { (eval echo "$as_me:1662: \"$ac_link_default\"") >&5
1663   (eval $ac_link_default) 2>&5
1664   ac_status=$?
1665   echo "$as_me:1665: \$? = $ac_status" >&5
1666   (exit $ac_status); }; then
1667   # Find the output, starting from the most likely.  This scheme is
1668 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1669 # resort.
1670 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1671                 ls a.out conftest 2>/dev/null;
1672                 ls a.* conftest.* 2>/dev/null`; do
1673   case $ac_file in
1674     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1675     a.out ) # We found the default executable, but exeext='' is most
1676             # certainly right.
1677             break;;
1678     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1679           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1680           export ac_cv_exeext
1681           break;;
1682     * ) break;;
1683   esac
1684 done
1685 else
1686   echo "$as_me: failed program was:" >&5
1687 cat conftest.$ac_ext >&5
1688 { { echo "$as_me:1688: error: C compiler cannot create executables" >&5
1689 echo "$as_me: error: C compiler cannot create executables" >&2;}
1690    { (exit 77); exit 77; }; }
1691 fi
1692
1693 ac_exeext=$ac_cv_exeext
1694 echo "$as_me:1694: result: $ac_file" >&5
1695 echo "${ECHO_T}$ac_file" >&6
1696
1697 # Check the compiler produces executables we can run.  If not, either
1698 # the compiler is broken, or we cross compile.
1699 echo "$as_me:1699: checking whether the C compiler works" >&5
1700 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1701 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1702 # If not cross compiling, check that we can run a simple program.
1703 if test "$cross_compiling" != yes; then
1704   if { ac_try='./$ac_file'
1705   { (eval echo "$as_me:1705: \"$ac_try\"") >&5
1706   (eval $ac_try) 2>&5
1707   ac_status=$?
1708   echo "$as_me:1708: \$? = $ac_status" >&5
1709   (exit $ac_status); }; }; then
1710     cross_compiling=no
1711   else
1712     if test "$cross_compiling" = maybe; then
1713         cross_compiling=yes
1714     else
1715         { { echo "$as_me:1715: error: cannot run C compiled programs.
1716 If you meant to cross compile, use \`--host'." >&5
1717 echo "$as_me: error: cannot run C compiled programs.
1718 If you meant to cross compile, use \`--host'." >&2;}
1719    { (exit 1); exit 1; }; }
1720     fi
1721   fi
1722 fi
1723 echo "$as_me:1723: result: yes" >&5
1724 echo "${ECHO_T}yes" >&6
1725
1726 rm -f a.out a.exe conftest$ac_cv_exeext
1727 ac_clean_files=$ac_clean_files_save
1728 # Check the compiler produces executables we can run.  If not, either
1729 # the compiler is broken, or we cross compile.
1730 echo "$as_me:1730: checking whether we are cross compiling" >&5
1731 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1732 echo "$as_me:1732: result: $cross_compiling" >&5
1733 echo "${ECHO_T}$cross_compiling" >&6
1734
1735 echo "$as_me:1735: checking for executable suffix" >&5
1736 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1737 if { (eval echo "$as_me:1737: \"$ac_link\"") >&5
1738   (eval $ac_link) 2>&5
1739   ac_status=$?
1740   echo "$as_me:1740: \$? = $ac_status" >&5
1741   (exit $ac_status); }; then
1742   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1743 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1744 # work properly (i.e., refer to `conftest.exe'), while it won't with
1745 # `rm'.
1746 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1747   case $ac_file in
1748     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1749     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1750           export ac_cv_exeext
1751           break;;
1752     * ) break;;
1753   esac
1754 done
1755 else
1756   { { echo "$as_me:1756: error: cannot compute EXEEXT: cannot compile and link" >&5
1757 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1758    { (exit 1); exit 1; }; }
1759 fi
1760
1761 rm -f conftest$ac_cv_exeext
1762 echo "$as_me:1762: result: $ac_cv_exeext" >&5
1763 echo "${ECHO_T}$ac_cv_exeext" >&6
1764
1765 rm -f conftest.$ac_ext
1766 EXEEXT=$ac_cv_exeext
1767 ac_exeext=$EXEEXT
1768 echo "$as_me:1768: checking for object suffix" >&5
1769 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1770 if test "${ac_cv_objext+set}" = set; then
1771   echo $ECHO_N "(cached) $ECHO_C" >&6
1772 else
1773   cat >conftest.$ac_ext <<_ACEOF
1774 #line 1774 "configure"
1775 #include "confdefs.h"
1776
1777 int
1778 main ()
1779 {
1780
1781   ;
1782   return 0;
1783 }
1784 _ACEOF
1785 rm -f conftest.o conftest.obj
1786 if { (eval echo "$as_me:1786: \"$ac_compile\"") >&5
1787   (eval $ac_compile) 2>&5
1788   ac_status=$?
1789   echo "$as_me:1789: \$? = $ac_status" >&5
1790   (exit $ac_status); }; then
1791   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1792   case $ac_file in
1793     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1794     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1795        break;;
1796   esac
1797 done
1798 else
1799   echo "$as_me: failed program was:" >&5
1800 cat conftest.$ac_ext >&5
1801 { { echo "$as_me:1801: error: cannot compute OBJEXT: cannot compile" >&5
1802 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1803    { (exit 1); exit 1; }; }
1804 fi
1805
1806 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1807 fi
1808 echo "$as_me:1808: result: $ac_cv_objext" >&5
1809 echo "${ECHO_T}$ac_cv_objext" >&6
1810 OBJEXT=$ac_cv_objext
1811 ac_objext=$OBJEXT
1812 echo "$as_me:1812: checking whether we are using the GNU C compiler" >&5
1813 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1814 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1815   echo $ECHO_N "(cached) $ECHO_C" >&6
1816 else
1817   cat >conftest.$ac_ext <<_ACEOF
1818 #line 1818 "configure"
1819 #include "confdefs.h"
1820
1821 int
1822 main ()
1823 {
1824 #ifndef __GNUC__
1825        choke me
1826 #endif
1827
1828   ;
1829   return 0;
1830 }
1831 _ACEOF
1832 rm -f conftest.$ac_objext
1833 if { (eval echo "$as_me:1833: \"$ac_compile\"") >&5
1834   (eval $ac_compile) 2>&5
1835   ac_status=$?
1836   echo "$as_me:1836: \$? = $ac_status" >&5
1837   (exit $ac_status); } &&
1838          { ac_try='test -s conftest.$ac_objext'
1839   { (eval echo "$as_me:1839: \"$ac_try\"") >&5
1840   (eval $ac_try) 2>&5
1841   ac_status=$?
1842   echo "$as_me:1842: \$? = $ac_status" >&5
1843   (exit $ac_status); }; }; then
1844   ac_compiler_gnu=yes
1845 else
1846   echo "$as_me: failed program was:" >&5
1847 cat conftest.$ac_ext >&5
1848 ac_compiler_gnu=no
1849 fi
1850 rm -f conftest.$ac_objext conftest.$ac_ext
1851 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1852
1853 fi
1854 echo "$as_me:1854: result: $ac_cv_c_compiler_gnu" >&5
1855 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1856 GCC=`test $ac_compiler_gnu = yes && echo yes`
1857 ac_test_CFLAGS=${CFLAGS+set}
1858 ac_save_CFLAGS=$CFLAGS
1859 CFLAGS="-g"
1860 echo "$as_me:1860: checking whether $CC accepts -g" >&5
1861 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1862 if test "${ac_cv_prog_cc_g+set}" = set; then
1863   echo $ECHO_N "(cached) $ECHO_C" >&6
1864 else
1865   cat >conftest.$ac_ext <<_ACEOF
1866 #line 1866 "configure"
1867 #include "confdefs.h"
1868
1869 int
1870 main ()
1871 {
1872
1873   ;
1874   return 0;
1875 }
1876 _ACEOF
1877 rm -f conftest.$ac_objext
1878 if { (eval echo "$as_me:1878: \"$ac_compile\"") >&5
1879   (eval $ac_compile) 2>&5
1880   ac_status=$?
1881   echo "$as_me:1881: \$? = $ac_status" >&5
1882   (exit $ac_status); } &&
1883          { ac_try='test -s conftest.$ac_objext'
1884   { (eval echo "$as_me:1884: \"$ac_try\"") >&5
1885   (eval $ac_try) 2>&5
1886   ac_status=$?
1887   echo "$as_me:1887: \$? = $ac_status" >&5
1888   (exit $ac_status); }; }; then
1889   ac_cv_prog_cc_g=yes
1890 else
1891   echo "$as_me: failed program was:" >&5
1892 cat conftest.$ac_ext >&5
1893 ac_cv_prog_cc_g=no
1894 fi
1895 rm -f conftest.$ac_objext conftest.$ac_ext
1896 fi
1897 echo "$as_me:1897: result: $ac_cv_prog_cc_g" >&5
1898 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1899 if test "$ac_test_CFLAGS" = set; then
1900   CFLAGS=$ac_save_CFLAGS
1901 elif test $ac_cv_prog_cc_g = yes; then
1902   if test "$GCC" = yes; then
1903     CFLAGS="-g -O2"
1904   else
1905     CFLAGS="-g"
1906   fi
1907 else
1908   if test "$GCC" = yes; then
1909     CFLAGS="-O2"
1910   else
1911     CFLAGS=
1912   fi
1913 fi
1914 # Some people use a C++ compiler to compile C.  Since we use `exit',
1915 # in C++ we need to declare it.  In case someone uses the same compiler
1916 # for both compiling C and C++ we need to have the C++ compiler decide
1917 # the declaration of exit, since it's the most demanding environment.
1918 cat >conftest.$ac_ext <<_ACEOF
1919 #ifndef __cplusplus
1920   choke me
1921 #endif
1922 _ACEOF
1923 rm -f conftest.$ac_objext
1924 if { (eval echo "$as_me:1924: \"$ac_compile\"") >&5
1925   (eval $ac_compile) 2>&5
1926   ac_status=$?
1927   echo "$as_me:1927: \$? = $ac_status" >&5
1928   (exit $ac_status); } &&
1929          { ac_try='test -s conftest.$ac_objext'
1930   { (eval echo "$as_me:1930: \"$ac_try\"") >&5
1931   (eval $ac_try) 2>&5
1932   ac_status=$?
1933   echo "$as_me:1933: \$? = $ac_status" >&5
1934   (exit $ac_status); }; }; then
1935   for ac_declaration in \
1936    ''\
1937    '#include <stdlib.h>' \
1938    'extern "C" void std::exit (int) throw (); using std::exit;' \
1939    'extern "C" void std::exit (int); using std::exit;' \
1940    'extern "C" void exit (int) throw ();' \
1941    'extern "C" void exit (int);' \
1942    'void exit (int);'
1943 do
1944   cat >conftest.$ac_ext <<_ACEOF
1945 #line 1945 "configure"
1946 #include "confdefs.h"
1947 #include <stdlib.h>
1948 $ac_declaration
1949 int
1950 main ()
1951 {
1952 exit (42);
1953   ;
1954   return 0;
1955 }
1956 _ACEOF
1957 rm -f conftest.$ac_objext
1958 if { (eval echo "$as_me:1958: \"$ac_compile\"") >&5
1959   (eval $ac_compile) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); } &&
1963          { ac_try='test -s conftest.$ac_objext'
1964   { (eval echo "$as_me:1964: \"$ac_try\"") >&5
1965   (eval $ac_try) 2>&5
1966   ac_status=$?
1967   echo "$as_me:1967: \$? = $ac_status" >&5
1968   (exit $ac_status); }; }; then
1969   :
1970 else
1971   echo "$as_me: failed program was:" >&5
1972 cat conftest.$ac_ext >&5
1973 continue
1974 fi
1975 rm -f conftest.$ac_objext conftest.$ac_ext
1976   cat >conftest.$ac_ext <<_ACEOF
1977 #line 1977 "configure"
1978 #include "confdefs.h"
1979 $ac_declaration
1980 int
1981 main ()
1982 {
1983 exit (42);
1984   ;
1985   return 0;
1986 }
1987 _ACEOF
1988 rm -f conftest.$ac_objext
1989 if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
1990   (eval $ac_compile) 2>&5
1991   ac_status=$?
1992   echo "$as_me:1992: \$? = $ac_status" >&5
1993   (exit $ac_status); } &&
1994          { ac_try='test -s conftest.$ac_objext'
1995   { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996   (eval $ac_try) 2>&5
1997   ac_status=$?
1998   echo "$as_me:1998: \$? = $ac_status" >&5
1999   (exit $ac_status); }; }; then
2000   break
2001 else
2002   echo "$as_me: failed program was:" >&5
2003 cat conftest.$ac_ext >&5
2004 fi
2005 rm -f conftest.$ac_objext conftest.$ac_ext
2006 done
2007 rm -rf conftest*
2008 if test -n "$ac_declaration"; then
2009   echo '#ifdef __cplusplus' >>confdefs.h
2010   echo $ac_declaration      >>confdefs.h
2011   echo '#endif'             >>confdefs.h
2012 fi
2013
2014 else
2015   echo "$as_me: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2017 fi
2018 rm -f conftest.$ac_objext conftest.$ac_ext
2019 ac_ext=c
2020 ac_cpp='$CPP $CPPFLAGS'
2021 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2022 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2023 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2024 ac_main_return=return
2025
2026 GCC_VERSION=none
2027 if test "$GCC" = yes ; then
2028         echo "$as_me:2028: checking version of $CC" >&5
2029 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2030         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.].*//'`"
2031         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2032         echo "$as_me:2032: result: $GCC_VERSION" >&5
2033 echo "${ECHO_T}$GCC_VERSION" >&6
2034 fi
2035
2036 echo "$as_me:2036: checking for $CC option to accept ANSI C" >&5
2037 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2038 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2039   echo $ECHO_N "(cached) $ECHO_C" >&6
2040 else
2041   ac_cv_prog_cc_stdc=no
2042 ac_save_CC=$CC
2043 cat >conftest.$ac_ext <<_ACEOF
2044 #line 2044 "configure"
2045 #include "confdefs.h"
2046 #include <stdarg.h>
2047 #include <stdio.h>
2048 #include <sys/types.h>
2049 #include <sys/stat.h>
2050 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2051 struct buf { int x; };
2052 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2053 static char *e (p, i)
2054      char **p;
2055      int i;
2056 {
2057   return p[i];
2058 }
2059 static char *f (char * (*g) (char **, int), char **p, ...)
2060 {
2061   char *s;
2062   va_list v;
2063   va_start (v,p);
2064   s = g (p, va_arg (v,int));
2065   va_end (v);
2066   return s;
2067 }
2068 int test (int i, double x);
2069 struct s1 {int (*f) (int a);};
2070 struct s2 {int (*f) (double a);};
2071 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2072 int argc;
2073 char **argv;
2074 int
2075 main ()
2076 {
2077 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2078   ;
2079   return 0;
2080 }
2081 _ACEOF
2082 # Don't try gcc -ansi; that turns off useful extensions and
2083 # breaks some systems' header files.
2084 # AIX                   -qlanglvl=ansi
2085 # Ultrix and OSF/1      -std1
2086 # HP-UX 10.20 and later -Ae
2087 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2088 # SVR4                  -Xc -D__EXTENSIONS__
2089 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2090 do
2091   CC="$ac_save_CC $ac_arg"
2092   rm -f conftest.$ac_objext
2093 if { (eval echo "$as_me:2093: \"$ac_compile\"") >&5
2094   (eval $ac_compile) 2>&5
2095   ac_status=$?
2096   echo "$as_me:2096: \$? = $ac_status" >&5
2097   (exit $ac_status); } &&
2098          { ac_try='test -s conftest.$ac_objext'
2099   { (eval echo "$as_me:2099: \"$ac_try\"") >&5
2100   (eval $ac_try) 2>&5
2101   ac_status=$?
2102   echo "$as_me:2102: \$? = $ac_status" >&5
2103   (exit $ac_status); }; }; then
2104   ac_cv_prog_cc_stdc=$ac_arg
2105 break
2106 else
2107   echo "$as_me: failed program was:" >&5
2108 cat conftest.$ac_ext >&5
2109 fi
2110 rm -f conftest.$ac_objext
2111 done
2112 rm -f conftest.$ac_ext conftest.$ac_objext
2113 CC=$ac_save_CC
2114
2115 fi
2116
2117 case "x$ac_cv_prog_cc_stdc" in
2118   x|xno)
2119     echo "$as_me:2119: result: none needed" >&5
2120 echo "${ECHO_T}none needed" >&6 ;;
2121   *)
2122     echo "$as_me:2122: result: $ac_cv_prog_cc_stdc" >&5
2123 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2124     CC="$CC $ac_cv_prog_cc_stdc" ;;
2125 esac
2126
2127 # This should have been defined by AC_PROG_CC
2128 : ${CC:=cc}
2129
2130 echo "$as_me:2130: checking \$CC variable" >&5
2131 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2132 case "$CC" in
2133 (*[\ \  ]-[IUD]*)
2134         echo "$as_me:2134: result: broken" >&5
2135 echo "${ECHO_T}broken" >&6
2136         { echo "$as_me:2136: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2137 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2138         # humor him...
2139         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2140         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2141
2142 cf_fix_cppflags=no
2143 cf_new_cflags=
2144 cf_new_cppflags=
2145 cf_new_extra_cppflags=
2146
2147 for cf_add_cflags in $cf_flags
2148 do
2149 case $cf_fix_cppflags in
2150 (no)
2151         case $cf_add_cflags in
2152         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2153                 case $cf_add_cflags in
2154                 (-D*)
2155                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2156
2157                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2158                                 && test -z "${cf_tst_cflags}" \
2159                                 && cf_fix_cppflags=yes
2160
2161                         if test $cf_fix_cppflags = yes ; then
2162                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2163                                 continue
2164                         elif test "${cf_tst_cflags}" = "\"'" ; then
2165                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2166                                 continue
2167                         fi
2168                         ;;
2169                 esac
2170                 case "$CPPFLAGS" in
2171                 (*$cf_add_cflags)
2172                         ;;
2173                 (*)
2174                         case $cf_add_cflags in
2175                         (-D*)
2176                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2177
2178 CPPFLAGS=`echo "$CPPFLAGS" | \
2179         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2180                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2181
2182                                 ;;
2183                         esac
2184                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2185                         ;;
2186                 esac
2187                 ;;
2188         (*)
2189                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2190                 ;;
2191         esac
2192         ;;
2193 (yes)
2194         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2195
2196         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2197
2198         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2199                 && test -z "${cf_tst_cflags}" \
2200                 && cf_fix_cppflags=no
2201         ;;
2202 esac
2203 done
2204
2205 if test -n "$cf_new_cflags" ; then
2206
2207         CFLAGS="$CFLAGS $cf_new_cflags"
2208 fi
2209
2210 if test -n "$cf_new_cppflags" ; then
2211
2212         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2213 fi
2214
2215 if test -n "$cf_new_extra_cppflags" ; then
2216
2217         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2218 fi
2219
2220         ;;
2221 (*)
2222         echo "$as_me:2222: result: ok" >&5
2223 echo "${ECHO_T}ok" >&6
2224         ;;
2225 esac
2226
2227 ac_ext=c
2228 ac_cpp='$CPP $CPPFLAGS'
2229 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2230 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2231 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2232 ac_main_return=return
2233 echo "$as_me:2233: checking how to run the C preprocessor" >&5
2234 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2235 # On Suns, sometimes $CPP names a directory.
2236 if test -n "$CPP" && test -d "$CPP"; then
2237   CPP=
2238 fi
2239 if test -z "$CPP"; then
2240   if test "${ac_cv_prog_CPP+set}" = set; then
2241   echo $ECHO_N "(cached) $ECHO_C" >&6
2242 else
2243       # Double quotes because CPP needs to be expanded
2244     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2245     do
2246       ac_preproc_ok=false
2247 for ac_c_preproc_warn_flag in '' yes
2248 do
2249   # Use a header file that comes with gcc, so configuring glibc
2250   # with a fresh cross-compiler works.
2251   # On the NeXT, cc -E runs the code through the compiler's parser,
2252   # not just through cpp. "Syntax error" is here to catch this case.
2253   cat >conftest.$ac_ext <<_ACEOF
2254 #line 2254 "configure"
2255 #include "confdefs.h"
2256 #include <assert.h>
2257                      Syntax error
2258 _ACEOF
2259 if { (eval echo "$as_me:2259: \"$ac_cpp conftest.$ac_ext\"") >&5
2260   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2261   ac_status=$?
2262   egrep -v '^ *\+' conftest.er1 >conftest.err
2263   rm -f conftest.er1
2264   cat conftest.err >&5
2265   echo "$as_me:2265: \$? = $ac_status" >&5
2266   (exit $ac_status); } >/dev/null; then
2267   if test -s conftest.err; then
2268     ac_cpp_err=$ac_c_preproc_warn_flag
2269   else
2270     ac_cpp_err=
2271   fi
2272 else
2273   ac_cpp_err=yes
2274 fi
2275 if test -z "$ac_cpp_err"; then
2276   :
2277 else
2278   echo "$as_me: failed program was:" >&5
2279   cat conftest.$ac_ext >&5
2280   # Broken: fails on valid input.
2281 continue
2282 fi
2283 rm -f conftest.err conftest.$ac_ext
2284
2285   # OK, works on sane cases.  Now check whether non-existent headers
2286   # can be detected and how.
2287   cat >conftest.$ac_ext <<_ACEOF
2288 #line 2288 "configure"
2289 #include "confdefs.h"
2290 #include <ac_nonexistent.h>
2291 _ACEOF
2292 if { (eval echo "$as_me:2292: \"$ac_cpp conftest.$ac_ext\"") >&5
2293   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2294   ac_status=$?
2295   egrep -v '^ *\+' conftest.er1 >conftest.err
2296   rm -f conftest.er1
2297   cat conftest.err >&5
2298   echo "$as_me:2298: \$? = $ac_status" >&5
2299   (exit $ac_status); } >/dev/null; then
2300   if test -s conftest.err; then
2301     ac_cpp_err=$ac_c_preproc_warn_flag
2302   else
2303     ac_cpp_err=
2304   fi
2305 else
2306   ac_cpp_err=yes
2307 fi
2308 if test -z "$ac_cpp_err"; then
2309   # Broken: success on invalid input.
2310 continue
2311 else
2312   echo "$as_me: failed program was:" >&5
2313   cat conftest.$ac_ext >&5
2314   # Passes both tests.
2315 ac_preproc_ok=:
2316 break
2317 fi
2318 rm -f conftest.err conftest.$ac_ext
2319
2320 done
2321 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2322 rm -f conftest.err conftest.$ac_ext
2323 if $ac_preproc_ok; then
2324   break
2325 fi
2326
2327     done
2328     ac_cv_prog_CPP=$CPP
2329
2330 fi
2331   CPP=$ac_cv_prog_CPP
2332 else
2333   ac_cv_prog_CPP=$CPP
2334 fi
2335 echo "$as_me:2335: result: $CPP" >&5
2336 echo "${ECHO_T}$CPP" >&6
2337 ac_preproc_ok=false
2338 for ac_c_preproc_warn_flag in '' yes
2339 do
2340   # Use a header file that comes with gcc, so configuring glibc
2341   # with a fresh cross-compiler works.
2342   # On the NeXT, cc -E runs the code through the compiler's parser,
2343   # not just through cpp. "Syntax error" is here to catch this case.
2344   cat >conftest.$ac_ext <<_ACEOF
2345 #line 2345 "configure"
2346 #include "confdefs.h"
2347 #include <assert.h>
2348                      Syntax error
2349 _ACEOF
2350 if { (eval echo "$as_me:2350: \"$ac_cpp conftest.$ac_ext\"") >&5
2351   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2352   ac_status=$?
2353   egrep -v '^ *\+' conftest.er1 >conftest.err
2354   rm -f conftest.er1
2355   cat conftest.err >&5
2356   echo "$as_me:2356: \$? = $ac_status" >&5
2357   (exit $ac_status); } >/dev/null; then
2358   if test -s conftest.err; then
2359     ac_cpp_err=$ac_c_preproc_warn_flag
2360   else
2361     ac_cpp_err=
2362   fi
2363 else
2364   ac_cpp_err=yes
2365 fi
2366 if test -z "$ac_cpp_err"; then
2367   :
2368 else
2369   echo "$as_me: failed program was:" >&5
2370   cat conftest.$ac_ext >&5
2371   # Broken: fails on valid input.
2372 continue
2373 fi
2374 rm -f conftest.err conftest.$ac_ext
2375
2376   # OK, works on sane cases.  Now check whether non-existent headers
2377   # can be detected and how.
2378   cat >conftest.$ac_ext <<_ACEOF
2379 #line 2379 "configure"
2380 #include "confdefs.h"
2381 #include <ac_nonexistent.h>
2382 _ACEOF
2383 if { (eval echo "$as_me:2383: \"$ac_cpp conftest.$ac_ext\"") >&5
2384   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2385   ac_status=$?
2386   egrep -v '^ *\+' conftest.er1 >conftest.err
2387   rm -f conftest.er1
2388   cat conftest.err >&5
2389   echo "$as_me:2389: \$? = $ac_status" >&5
2390   (exit $ac_status); } >/dev/null; then
2391   if test -s conftest.err; then
2392     ac_cpp_err=$ac_c_preproc_warn_flag
2393   else
2394     ac_cpp_err=
2395   fi
2396 else
2397   ac_cpp_err=yes
2398 fi
2399 if test -z "$ac_cpp_err"; then
2400   # Broken: success on invalid input.
2401 continue
2402 else
2403   echo "$as_me: failed program was:" >&5
2404   cat conftest.$ac_ext >&5
2405   # Passes both tests.
2406 ac_preproc_ok=:
2407 break
2408 fi
2409 rm -f conftest.err conftest.$ac_ext
2410
2411 done
2412 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2413 rm -f conftest.err conftest.$ac_ext
2414 if $ac_preproc_ok; then
2415   :
2416 else
2417   { { echo "$as_me:2417: error: C preprocessor \"$CPP\" fails sanity check" >&5
2418 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2419    { (exit 1); exit 1; }; }
2420 fi
2421
2422 ac_ext=c
2423 ac_cpp='$CPP $CPPFLAGS'
2424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2427 ac_main_return=return
2428
2429 if test $ac_cv_c_compiler_gnu = yes; then
2430     echo "$as_me:2430: checking whether $CC needs -traditional" >&5
2431 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2432 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2433   echo $ECHO_N "(cached) $ECHO_C" >&6
2434 else
2435     ac_pattern="Autoconf.*'x'"
2436   cat >conftest.$ac_ext <<_ACEOF
2437 #line 2437 "configure"
2438 #include "confdefs.h"
2439 #include <sgtty.h>
2440 int Autoconf = TIOCGETP;
2441 _ACEOF
2442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2443   egrep "$ac_pattern" >/dev/null 2>&1; then
2444   ac_cv_prog_gcc_traditional=yes
2445 else
2446   ac_cv_prog_gcc_traditional=no
2447 fi
2448 rm -rf conftest*
2449
2450   if test $ac_cv_prog_gcc_traditional = no; then
2451     cat >conftest.$ac_ext <<_ACEOF
2452 #line 2452 "configure"
2453 #include "confdefs.h"
2454 #include <termio.h>
2455 int Autoconf = TCGETA;
2456 _ACEOF
2457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2458   egrep "$ac_pattern" >/dev/null 2>&1; then
2459   ac_cv_prog_gcc_traditional=yes
2460 fi
2461 rm -rf conftest*
2462
2463   fi
2464 fi
2465 echo "$as_me:2465: result: $ac_cv_prog_gcc_traditional" >&5
2466 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2467   if test $ac_cv_prog_gcc_traditional = yes; then
2468     CC="$CC -traditional"
2469   fi
2470 fi
2471
2472 echo "$as_me:2472: checking whether $CC understands -c and -o together" >&5
2473 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2474 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2475   echo $ECHO_N "(cached) $ECHO_C" >&6
2476 else
2477
2478 cat > conftest.$ac_ext <<CF_EOF
2479 #include <stdio.h>
2480 int main()
2481 {
2482         ${cf_cv_main_return:-return}(0);
2483 }
2484 CF_EOF
2485 # We do the test twice because some compilers refuse to overwrite an
2486 # existing .o file with -o, though they will create one.
2487 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2488 if { (eval echo "$as_me:2488: \"$ac_try\"") >&5
2489   (eval $ac_try) 2>&5
2490   ac_status=$?
2491   echo "$as_me:2491: \$? = $ac_status" >&5
2492   (exit $ac_status); } &&
2493   test -f conftest2.$ac_objext && { (eval echo "$as_me:2493: \"$ac_try\"") >&5
2494   (eval $ac_try) 2>&5
2495   ac_status=$?
2496   echo "$as_me:2496: \$? = $ac_status" >&5
2497   (exit $ac_status); };
2498 then
2499   eval cf_cv_prog_CC_c_o=yes
2500 else
2501   eval cf_cv_prog_CC_c_o=no
2502 fi
2503 rm -rf conftest*
2504
2505 fi
2506 if test $cf_cv_prog_CC_c_o = yes; then
2507   echo "$as_me:2507: result: yes" >&5
2508 echo "${ECHO_T}yes" >&6
2509 else
2510   echo "$as_me:2510: result: no" >&5
2511 echo "${ECHO_T}no" >&6
2512 fi
2513
2514 if test "$cross_compiling" = yes ; then
2515         LDCONFIG=:
2516 else
2517         case "$cf_cv_system_name" in
2518         (dragonfly*|mirbsd*|freebsd*)
2519                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2520                 ;;
2521         (*) LDPATH=$PATH:/sbin:/usr/sbin
2522                 # Extract the first word of "ldconfig", so it can be a program name with args.
2523 set dummy ldconfig; ac_word=$2
2524 echo "$as_me:2524: checking for $ac_word" >&5
2525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2526 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2527   echo $ECHO_N "(cached) $ECHO_C" >&6
2528 else
2529   case $LDCONFIG in
2530   [\\/]* | ?:[\\/]*)
2531   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2532   ;;
2533   *)
2534   ac_save_IFS=$IFS; IFS=$ac_path_separator
2535 ac_dummy="$LDPATH"
2536 for ac_dir in $ac_dummy; do
2537   IFS=$ac_save_IFS
2538   test -z "$ac_dir" && ac_dir=.
2539   if $as_executable_p "$ac_dir/$ac_word"; then
2540    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2541    echo "$as_me:2541: found $ac_dir/$ac_word" >&5
2542    break
2543 fi
2544 done
2545
2546   ;;
2547 esac
2548 fi
2549 LDCONFIG=$ac_cv_path_LDCONFIG
2550
2551 if test -n "$LDCONFIG"; then
2552   echo "$as_me:2552: result: $LDCONFIG" >&5
2553 echo "${ECHO_T}$LDCONFIG" >&6
2554 else
2555   echo "$as_me:2555: result: no" >&5
2556 echo "${ECHO_T}no" >&6
2557 fi
2558
2559                 ;;
2560         esac
2561 fi
2562
2563 echo "$as_me:2563: checking if you want to ensure bool is consistent with C++" >&5
2564 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2565
2566 # Check whether --with-cxx or --without-cxx was given.
2567 if test "${with_cxx+set}" = set; then
2568   withval="$with_cxx"
2569   cf_with_cxx=$withval
2570 else
2571   cf_with_cxx=yes
2572 fi;
2573 echo "$as_me:2573: result: $cf_with_cxx" >&5
2574 echo "${ECHO_T}$cf_with_cxx" >&6
2575 if test "X$cf_with_cxx" = Xno ; then
2576         CXX=""
2577         GXX=""
2578 else
2579         # with autoconf 2.13, we can change the error to a warning:
2580                 ac_ext=cc
2581 ac_cpp='$CXXCPP $CPPFLAGS'
2582 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2583 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2584 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2585 ac_main_return=return
2586 if test -n "$ac_tool_prefix"; then
2587   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2588   do
2589     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2590 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2591 echo "$as_me:2591: checking for $ac_word" >&5
2592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2593 if test "${ac_cv_prog_CXX+set}" = set; then
2594   echo $ECHO_N "(cached) $ECHO_C" >&6
2595 else
2596   if test -n "$CXX"; then
2597   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2598 else
2599   ac_save_IFS=$IFS; IFS=$ac_path_separator
2600 ac_dummy="$PATH"
2601 for ac_dir in $ac_dummy; do
2602   IFS=$ac_save_IFS
2603   test -z "$ac_dir" && ac_dir=.
2604   $as_executable_p "$ac_dir/$ac_word" || continue
2605 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2606 echo "$as_me:2606: found $ac_dir/$ac_word" >&5
2607 break
2608 done
2609
2610 fi
2611 fi
2612 CXX=$ac_cv_prog_CXX
2613 if test -n "$CXX"; then
2614   echo "$as_me:2614: result: $CXX" >&5
2615 echo "${ECHO_T}$CXX" >&6
2616 else
2617   echo "$as_me:2617: result: no" >&5
2618 echo "${ECHO_T}no" >&6
2619 fi
2620
2621     test -n "$CXX" && break
2622   done
2623 fi
2624 if test -z "$CXX"; then
2625   ac_ct_CXX=$CXX
2626   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2627 do
2628   # Extract the first word of "$ac_prog", so it can be a program name with args.
2629 set dummy $ac_prog; ac_word=$2
2630 echo "$as_me:2630: checking for $ac_word" >&5
2631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2632 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2633   echo $ECHO_N "(cached) $ECHO_C" >&6
2634 else
2635   if test -n "$ac_ct_CXX"; then
2636   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2637 else
2638   ac_save_IFS=$IFS; IFS=$ac_path_separator
2639 ac_dummy="$PATH"
2640 for ac_dir in $ac_dummy; do
2641   IFS=$ac_save_IFS
2642   test -z "$ac_dir" && ac_dir=.
2643   $as_executable_p "$ac_dir/$ac_word" || continue
2644 ac_cv_prog_ac_ct_CXX="$ac_prog"
2645 echo "$as_me:2645: found $ac_dir/$ac_word" >&5
2646 break
2647 done
2648
2649 fi
2650 fi
2651 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2652 if test -n "$ac_ct_CXX"; then
2653   echo "$as_me:2653: result: $ac_ct_CXX" >&5
2654 echo "${ECHO_T}$ac_ct_CXX" >&6
2655 else
2656   echo "$as_me:2656: result: no" >&5
2657 echo "${ECHO_T}no" >&6
2658 fi
2659
2660   test -n "$ac_ct_CXX" && break
2661 done
2662 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2663
2664   CXX=$ac_ct_CXX
2665 fi
2666
2667 # Provide some information about the compiler.
2668 echo "$as_me:2668:" \
2669      "checking for C++ compiler version" >&5
2670 ac_compiler=`set X $ac_compile; echo $2`
2671 { (eval echo "$as_me:2671: \"$ac_compiler --version </dev/null >&5\"") >&5
2672   (eval $ac_compiler --version </dev/null >&5) 2>&5
2673   ac_status=$?
2674   echo "$as_me:2674: \$? = $ac_status" >&5
2675   (exit $ac_status); }
2676 { (eval echo "$as_me:2676: \"$ac_compiler -v </dev/null >&5\"") >&5
2677   (eval $ac_compiler -v </dev/null >&5) 2>&5
2678   ac_status=$?
2679   echo "$as_me:2679: \$? = $ac_status" >&5
2680   (exit $ac_status); }
2681 { (eval echo "$as_me:2681: \"$ac_compiler -V </dev/null >&5\"") >&5
2682   (eval $ac_compiler -V </dev/null >&5) 2>&5
2683   ac_status=$?
2684   echo "$as_me:2684: \$? = $ac_status" >&5
2685   (exit $ac_status); }
2686
2687 echo "$as_me:2687: checking whether we are using the GNU C++ compiler" >&5
2688 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2689 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2690   echo $ECHO_N "(cached) $ECHO_C" >&6
2691 else
2692   cat >conftest.$ac_ext <<_ACEOF
2693 #line 2693 "configure"
2694 #include "confdefs.h"
2695
2696 int
2697 main ()
2698 {
2699 #ifndef __GNUC__
2700        choke me
2701 #endif
2702
2703   ;
2704   return 0;
2705 }
2706 _ACEOF
2707 rm -f conftest.$ac_objext
2708 if { (eval echo "$as_me:2708: \"$ac_compile\"") >&5
2709   (eval $ac_compile) 2>&5
2710   ac_status=$?
2711   echo "$as_me:2711: \$? = $ac_status" >&5
2712   (exit $ac_status); } &&
2713          { ac_try='test -s conftest.$ac_objext'
2714   { (eval echo "$as_me:2714: \"$ac_try\"") >&5
2715   (eval $ac_try) 2>&5
2716   ac_status=$?
2717   echo "$as_me:2717: \$? = $ac_status" >&5
2718   (exit $ac_status); }; }; then
2719   ac_compiler_gnu=yes
2720 else
2721   echo "$as_me: failed program was:" >&5
2722 cat conftest.$ac_ext >&5
2723 ac_compiler_gnu=no
2724 fi
2725 rm -f conftest.$ac_objext conftest.$ac_ext
2726 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2727
2728 fi
2729 echo "$as_me:2729: result: $ac_cv_cxx_compiler_gnu" >&5
2730 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2731 GXX=`test $ac_compiler_gnu = yes && echo yes`
2732 ac_test_CXXFLAGS=${CXXFLAGS+set}
2733 ac_save_CXXFLAGS=$CXXFLAGS
2734 CXXFLAGS="-g"
2735 echo "$as_me:2735: checking whether $CXX accepts -g" >&5
2736 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2737 if test "${ac_cv_prog_cxx_g+set}" = set; then
2738   echo $ECHO_N "(cached) $ECHO_C" >&6
2739 else
2740   cat >conftest.$ac_ext <<_ACEOF
2741 #line 2741 "configure"
2742 #include "confdefs.h"
2743
2744 int
2745 main ()
2746 {
2747
2748   ;
2749   return 0;
2750 }
2751 _ACEOF
2752 rm -f conftest.$ac_objext
2753 if { (eval echo "$as_me:2753: \"$ac_compile\"") >&5
2754   (eval $ac_compile) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); } &&
2758          { ac_try='test -s conftest.$ac_objext'
2759   { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2760   (eval $ac_try) 2>&5
2761   ac_status=$?
2762   echo "$as_me:2762: \$? = $ac_status" >&5
2763   (exit $ac_status); }; }; then
2764   ac_cv_prog_cxx_g=yes
2765 else
2766   echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 ac_cv_prog_cxx_g=no
2769 fi
2770 rm -f conftest.$ac_objext conftest.$ac_ext
2771 fi
2772 echo "$as_me:2772: result: $ac_cv_prog_cxx_g" >&5
2773 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2774 if test "$ac_test_CXXFLAGS" = set; then
2775   CXXFLAGS=$ac_save_CXXFLAGS
2776 elif test $ac_cv_prog_cxx_g = yes; then
2777   if test "$GXX" = yes; then
2778     CXXFLAGS="-g -O2"
2779   else
2780     CXXFLAGS="-g"
2781   fi
2782 else
2783   if test "$GXX" = yes; then
2784     CXXFLAGS="-O2"
2785   else
2786     CXXFLAGS=
2787   fi
2788 fi
2789 for ac_declaration in \
2790    ''\
2791    '#include <stdlib.h>' \
2792    'extern "C" void std::exit (int) throw (); using std::exit;' \
2793    'extern "C" void std::exit (int); using std::exit;' \
2794    'extern "C" void exit (int) throw ();' \
2795    'extern "C" void exit (int);' \
2796    'void exit (int);'
2797 do
2798   cat >conftest.$ac_ext <<_ACEOF
2799 #line 2799 "configure"
2800 #include "confdefs.h"
2801 #include <stdlib.h>
2802 $ac_declaration
2803 int
2804 main ()
2805 {
2806 exit (42);
2807   ;
2808   return 0;
2809 }
2810 _ACEOF
2811 rm -f conftest.$ac_objext
2812 if { (eval echo "$as_me:2812: \"$ac_compile\"") >&5
2813   (eval $ac_compile) 2>&5
2814   ac_status=$?
2815   echo "$as_me:2815: \$? = $ac_status" >&5
2816   (exit $ac_status); } &&
2817          { ac_try='test -s conftest.$ac_objext'
2818   { (eval echo "$as_me:2818: \"$ac_try\"") >&5
2819   (eval $ac_try) 2>&5
2820   ac_status=$?
2821   echo "$as_me:2821: \$? = $ac_status" >&5
2822   (exit $ac_status); }; }; then
2823   :
2824 else
2825   echo "$as_me: failed program was:" >&5
2826 cat conftest.$ac_ext >&5
2827 continue
2828 fi
2829 rm -f conftest.$ac_objext conftest.$ac_ext
2830   cat >conftest.$ac_ext <<_ACEOF
2831 #line 2831 "configure"
2832 #include "confdefs.h"
2833 $ac_declaration
2834 int
2835 main ()
2836 {
2837 exit (42);
2838   ;
2839   return 0;
2840 }
2841 _ACEOF
2842 rm -f conftest.$ac_objext
2843 if { (eval echo "$as_me:2843: \"$ac_compile\"") >&5
2844   (eval $ac_compile) 2>&5
2845   ac_status=$?
2846   echo "$as_me:2846: \$? = $ac_status" >&5
2847   (exit $ac_status); } &&
2848          { ac_try='test -s conftest.$ac_objext'
2849   { (eval echo "$as_me:2849: \"$ac_try\"") >&5
2850   (eval $ac_try) 2>&5
2851   ac_status=$?
2852   echo "$as_me:2852: \$? = $ac_status" >&5
2853   (exit $ac_status); }; }; then
2854   break
2855 else
2856   echo "$as_me: failed program was:" >&5
2857 cat conftest.$ac_ext >&5
2858 fi
2859 rm -f conftest.$ac_objext conftest.$ac_ext
2860 done
2861 rm -rf conftest*
2862 if test -n "$ac_declaration"; then
2863   echo '#ifdef __cplusplus' >>confdefs.h
2864   echo $ac_declaration      >>confdefs.h
2865   echo '#endif'             >>confdefs.h
2866 fi
2867
2868 ac_ext=c
2869 ac_cpp='$CPP $CPPFLAGS'
2870 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2871 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2872 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2873 ac_main_return=return
2874
2875         ac_ext=cc
2876 ac_cpp='$CXXCPP $CPPFLAGS'
2877 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2878 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2879 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2880 ac_main_return=return
2881
2882         if test "x$cf_with_cxx" != xno
2883         then
2884                 # Several of the C++ configurations do not work, particularly when
2885                 # cross-compiling (20140913 -TD)
2886                 echo "$as_me:2886: checking if $CXX works" >&5
2887 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2888
2889                 save_CPPFLAGS="$CPPFLAGS"
2890                 eval cf_includedir=${includedir}
2891                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2892
2893 cat >conftest.$ac_ext <<_ACEOF
2894 #line 2894 "configure"
2895 #include "confdefs.h"
2896
2897 #include <stdlib.h>
2898 #include <stdio.h>
2899
2900 int
2901 main ()
2902 {
2903
2904                 printf("Hello world!\n")
2905
2906   ;
2907   return 0;
2908 }
2909 _ACEOF
2910 rm -f conftest.$ac_objext
2911 if { (eval echo "$as_me:2911: \"$ac_compile\"") >&5
2912   (eval $ac_compile) 2>&5
2913   ac_status=$?
2914   echo "$as_me:2914: \$? = $ac_status" >&5
2915   (exit $ac_status); } &&
2916          { ac_try='test -s conftest.$ac_objext'
2917   { (eval echo "$as_me:2917: \"$ac_try\"") >&5
2918   (eval $ac_try) 2>&5
2919   ac_status=$?
2920   echo "$as_me:2920: \$? = $ac_status" >&5
2921   (exit $ac_status); }; }; then
2922   cf_cxx_works=yes
2923 else
2924   echo "$as_me: failed program was:" >&5
2925 cat conftest.$ac_ext >&5
2926 cf_cxx_works=no
2927 fi
2928 rm -f conftest.$ac_objext conftest.$ac_ext
2929                 CPPFLAGS="$save_CPPFLAGS"
2930
2931                 echo "$as_me:2931: result: $cf_cxx_works" >&5
2932 echo "${ECHO_T}$cf_cxx_works" >&6
2933                 if test "x$cf_cxx_works" = xno
2934                 then
2935                         { echo "$as_me:2935: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2936 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2937                         cf_with_cxx=no; CXX=""; GXX="";
2938                 fi
2939         fi
2940         ac_ext=c
2941 ac_cpp='$CPP $CPPFLAGS'
2942 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2943 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2944 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2945 ac_main_return=return
2946
2947         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2948         if test "$CXX" = "g++" ; then
2949                 # Extract the first word of "g++", so it can be a program name with args.
2950 set dummy g++; ac_word=$2
2951 echo "$as_me:2951: checking for $ac_word" >&5
2952 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2953 if test "${ac_cv_path_CXX+set}" = set; then
2954   echo $ECHO_N "(cached) $ECHO_C" >&6
2955 else
2956   case $CXX in
2957   [\\/]* | ?:[\\/]*)
2958   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2959   ;;
2960   *)
2961   ac_save_IFS=$IFS; IFS=$ac_path_separator
2962 ac_dummy="$PATH"
2963 for ac_dir in $ac_dummy; do
2964   IFS=$ac_save_IFS
2965   test -z "$ac_dir" && ac_dir=.
2966   if $as_executable_p "$ac_dir/$ac_word"; then
2967    ac_cv_path_CXX="$ac_dir/$ac_word"
2968    echo "$as_me:2968: found $ac_dir/$ac_word" >&5
2969    break
2970 fi
2971 done
2972
2973   ;;
2974 esac
2975 fi
2976 CXX=$ac_cv_path_CXX
2977
2978 if test -n "$CXX"; then
2979   echo "$as_me:2979: result: $CXX" >&5
2980 echo "${ECHO_T}$CXX" >&6
2981 else
2982   echo "$as_me:2982: result: no" >&5
2983 echo "${ECHO_T}no" >&6
2984 fi
2985
2986         fi
2987         case "x$CXX" in
2988         (x|xg++)
2989                 { echo "$as_me:2989: WARNING: You don't have any C++ compiler, too bad" >&5
2990 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2991                 cf_with_cxx=no; CXX=""; GXX="";
2992                 ;;
2993         esac
2994 fi
2995
2996 GXX_VERSION=none
2997 if test "$GXX" = yes; then
2998         echo "$as_me:2998: checking version of ${CXX:-g++}" >&5
2999 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3000         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3001         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3002         echo "$as_me:3002: result: $GXX_VERSION" >&5
3003 echo "${ECHO_T}$GXX_VERSION" >&6
3004 fi
3005
3006 case $GXX_VERSION in
3007 (1*|2.[0-6]*)
3008         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3009         # cf_cxx_library=no
3010         { echo "$as_me:3010: WARNING: templates do not work" >&5
3011 echo "$as_me: WARNING: templates do not work" >&2;}
3012         ;;
3013 esac
3014
3015 echo "$as_me:3015: checking if you want to build C++ binding and demo" >&5
3016 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3017
3018 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3019 if test "${with_cxx_binding+set}" = set; then
3020   withval="$with_cxx_binding"
3021   cf_with_cxx_binding=$withval
3022 else
3023   cf_with_cxx_binding=$cf_with_cxx
3024 fi;
3025 echo "$as_me:3025: result: $cf_with_cxx_binding" >&5
3026 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3027
3028 echo "$as_me:3028: checking if you want to build with Ada95" >&5
3029 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3030 echo "$as_me:3030: result: $cf_with_ada" >&5
3031 echo "${ECHO_T}$cf_with_ada" >&6
3032
3033 echo "$as_me:3033: checking if you want to install terminal database" >&5
3034 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3035
3036 # Check whether --enable-db-install or --disable-db-install was given.
3037 if test "${enable_db_install+set}" = set; then
3038   enableval="$enable_db_install"
3039   cf_with_db_install=$enableval
3040 else
3041   cf_with_db_install=yes
3042 fi;
3043 echo "$as_me:3043: result: $cf_with_db_install" >&5
3044 echo "${ECHO_T}$cf_with_db_install" >&6
3045
3046 echo "$as_me:3046: checking if you want to install manpages" >&5
3047 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3048
3049 # Check whether --with-manpages or --without-manpages was given.
3050 if test "${with_manpages+set}" = set; then
3051   withval="$with_manpages"
3052   cf_with_manpages=$withval
3053 else
3054   cf_with_manpages=yes
3055 fi;
3056 echo "$as_me:3056: result: $cf_with_manpages" >&5
3057 echo "${ECHO_T}$cf_with_manpages" >&6
3058
3059 echo "$as_me:3059: checking if you want to build programs such as tic" >&5
3060 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3061
3062 # Check whether --with-progs or --without-progs was given.
3063 if test "${with_progs+set}" = set; then
3064   withval="$with_progs"
3065   cf_with_progs=$withval
3066 else
3067   cf_with_progs=yes
3068 fi;
3069 echo "$as_me:3069: result: $cf_with_progs" >&5
3070 echo "${ECHO_T}$cf_with_progs" >&6
3071
3072 echo "$as_me:3072: checking if you want to build test-programs" >&5
3073 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3074
3075 # Check whether --with-tests or --without-tests was given.
3076 if test "${with_tests+set}" = set; then
3077   withval="$with_tests"
3078   cf_with_tests=$withval
3079 else
3080   cf_with_tests=yes
3081 fi;
3082 echo "$as_me:3082: result: $cf_with_tests" >&5
3083 echo "${ECHO_T}$cf_with_tests" >&6
3084
3085 echo "$as_me:3085: checking if you wish to install curses.h" >&5
3086 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3087
3088 # Check whether --with-curses-h or --without-curses-h was given.
3089 if test "${with_curses_h+set}" = set; then
3090   withval="$with_curses_h"
3091   with_curses_h=$withval
3092 else
3093   with_curses_h=yes
3094 fi;
3095 echo "$as_me:3095: result: $with_curses_h" >&5
3096 echo "${ECHO_T}$with_curses_h" >&6
3097
3098 modules_to_build="ncurses"
3099 if test "X$cf_with_progs" != Xno ; then
3100 modules_to_build="$modules_to_build progs tack"
3101 fi
3102 modules_to_build="$modules_to_build panel menu form"
3103
3104 test "$program_prefix" != NONE &&
3105   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3106 # Use a double $ so make ignores it.
3107 test "$program_suffix" != NONE &&
3108   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3109 # Double any \ or $.  echo might interpret backslashes.
3110 # By default was `s,x,x', remove it if useless.
3111 cat <<\_ACEOF >conftest.sed
3112 s/[\\$]/&&/g;s/;s,x,x,$//
3113 _ACEOF
3114 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3115 rm conftest.sed
3116
3117 for ac_prog in mawk gawk nawk awk
3118 do
3119   # Extract the first word of "$ac_prog", so it can be a program name with args.
3120 set dummy $ac_prog; ac_word=$2
3121 echo "$as_me:3121: checking for $ac_word" >&5
3122 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3123 if test "${ac_cv_prog_AWK+set}" = set; then
3124   echo $ECHO_N "(cached) $ECHO_C" >&6
3125 else
3126   if test -n "$AWK"; then
3127   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3128 else
3129   ac_save_IFS=$IFS; IFS=$ac_path_separator
3130 ac_dummy="$PATH"
3131 for ac_dir in $ac_dummy; do
3132   IFS=$ac_save_IFS
3133   test -z "$ac_dir" && ac_dir=.
3134   $as_executable_p "$ac_dir/$ac_word" || continue
3135 ac_cv_prog_AWK="$ac_prog"
3136 echo "$as_me:3136: found $ac_dir/$ac_word" >&5
3137 break
3138 done
3139
3140 fi
3141 fi
3142 AWK=$ac_cv_prog_AWK
3143 if test -n "$AWK"; then
3144   echo "$as_me:3144: result: $AWK" >&5
3145 echo "${ECHO_T}$AWK" >&6
3146 else
3147   echo "$as_me:3147: result: no" >&5
3148 echo "${ECHO_T}no" >&6
3149 fi
3150
3151   test -n "$AWK" && break
3152 done
3153
3154 test -z "$AWK" && { { echo "$as_me:3154: error: No awk program found" >&5
3155 echo "$as_me: error: No awk program found" >&2;}
3156    { (exit 1); exit 1; }; }
3157
3158 echo "$as_me:3158: checking for egrep" >&5
3159 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3160 if test "${ac_cv_prog_egrep+set}" = set; then
3161   echo $ECHO_N "(cached) $ECHO_C" >&6
3162 else
3163   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3164                 then ac_cv_prog_egrep='grep -E'
3165                 else ac_cv_prog_egrep='egrep'
3166         fi
3167 fi
3168 echo "$as_me:3168: result: $ac_cv_prog_egrep" >&5
3169 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3170         EGREP=$ac_cv_prog_egrep
3171
3172         test -z "$EGREP" && { { echo "$as_me:3172: error: No egrep program found" >&5
3173 echo "$as_me: error: No egrep program found" >&2;}
3174    { (exit 1); exit 1; }; }
3175
3176 # Find a good install program.  We prefer a C program (faster),
3177 # so one script is as good as another.  But avoid the broken or
3178 # incompatible versions:
3179 # SysV /etc/install, /usr/sbin/install
3180 # SunOS /usr/etc/install
3181 # IRIX /sbin/install
3182 # AIX /bin/install
3183 # AmigaOS /C/install, which installs bootblocks on floppy discs
3184 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3185 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3186 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3187 # ./install, which can be erroneously created by make from ./install.sh.
3188 echo "$as_me:3188: checking for a BSD compatible install" >&5
3189 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3190 if test -z "$INSTALL"; then
3191 if test "${ac_cv_path_install+set}" = set; then
3192   echo $ECHO_N "(cached) $ECHO_C" >&6
3193 else
3194     ac_save_IFS=$IFS; IFS=$ac_path_separator
3195   for ac_dir in $PATH; do
3196     IFS=$ac_save_IFS
3197     # Account for people who put trailing slashes in PATH elements.
3198     case $ac_dir/ in
3199     / | ./ | .// | /cC/* \
3200     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3201     | /usr/ucb/* ) ;;
3202     *)
3203       # OSF1 and SCO ODT 3.0 have their own names for install.
3204       # Don't use installbsd from OSF since it installs stuff as root
3205       # by default.
3206       for ac_prog in ginstall scoinst install; do
3207         if $as_executable_p "$ac_dir/$ac_prog"; then
3208           if test $ac_prog = install &&
3209             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3210             # AIX install.  It has an incompatible calling convention.
3211             :
3212           elif test $ac_prog = install &&
3213             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3214             # program-specific install script used by HP pwplus--don't use.
3215             :
3216           else
3217             ac_cv_path_install="$ac_dir/$ac_prog -c"
3218             break 2
3219           fi
3220         fi
3221       done
3222       ;;
3223     esac
3224   done
3225
3226 fi
3227   if test "${ac_cv_path_install+set}" = set; then
3228     INSTALL=$ac_cv_path_install
3229   else
3230     # As a last resort, use the slow shell script.  We don't cache a
3231     # path for INSTALL within a source directory, because that will
3232     # break other packages using the cache if that directory is
3233     # removed, or if the path is relative.
3234     INSTALL=$ac_install_sh
3235   fi
3236 fi
3237 echo "$as_me:3237: result: $INSTALL" >&5
3238 echo "${ECHO_T}$INSTALL" >&6
3239
3240 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3241 # It thinks the first close brace ends the variable substitution.
3242 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3243
3244 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3245
3246 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3247
3248 case $INSTALL in
3249 (/*)
3250         ;;
3251 (*)
3252         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3253         test -z "$cf_dir" && cf_dir=.
3254         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3255         ;;
3256 esac
3257
3258 for ac_prog in tdlint lint alint splint lclint
3259 do
3260   # Extract the first word of "$ac_prog", so it can be a program name with args.
3261 set dummy $ac_prog; ac_word=$2
3262 echo "$as_me:3262: checking for $ac_word" >&5
3263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3264 if test "${ac_cv_prog_LINT+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   if test -n "$LINT"; then
3268   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3269 else
3270   ac_save_IFS=$IFS; IFS=$ac_path_separator
3271 ac_dummy="$PATH"
3272 for ac_dir in $ac_dummy; do
3273   IFS=$ac_save_IFS
3274   test -z "$ac_dir" && ac_dir=.
3275   $as_executable_p "$ac_dir/$ac_word" || continue
3276 ac_cv_prog_LINT="$ac_prog"
3277 echo "$as_me:3277: found $ac_dir/$ac_word" >&5
3278 break
3279 done
3280
3281 fi
3282 fi
3283 LINT=$ac_cv_prog_LINT
3284 if test -n "$LINT"; then
3285   echo "$as_me:3285: result: $LINT" >&5
3286 echo "${ECHO_T}$LINT" >&6
3287 else
3288   echo "$as_me:3288: result: no" >&5
3289 echo "${ECHO_T}no" >&6
3290 fi
3291
3292   test -n "$LINT" && break
3293 done
3294
3295 echo "$as_me:3295: checking whether ln -s works" >&5
3296 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3297 LN_S=$as_ln_s
3298 if test "$LN_S" = "ln -s"; then
3299   echo "$as_me:3299: result: yes" >&5
3300 echo "${ECHO_T}yes" >&6
3301 else
3302   echo "$as_me:3302: result: no, using $LN_S" >&5
3303 echo "${ECHO_T}no, using $LN_S" >&6
3304 fi
3305
3306 echo "$as_me:3306: checking if $LN_S -f options work" >&5
3307 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3308
3309 rm -f conf$$.src conf$$dst
3310 echo >conf$$.dst
3311 echo first >conf$$.src
3312 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3313         cf_prog_ln_sf=yes
3314 else
3315         cf_prog_ln_sf=no
3316 fi
3317 rm -f conf$$.dst conf$$src
3318 echo "$as_me:3318: result: $cf_prog_ln_sf" >&5
3319 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3320
3321 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3322
3323 echo "$as_me:3323: checking for long file names" >&5
3324 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3325 if test "${ac_cv_sys_long_file_names+set}" = set; then
3326   echo $ECHO_N "(cached) $ECHO_C" >&6
3327 else
3328   ac_cv_sys_long_file_names=yes
3329 # Test for long file names in all the places we know might matter:
3330 #      .                the current directory, where building will happen
3331 #      $prefix/lib      where we will be installing things
3332 #      $exec_prefix/lib likewise
3333 # eval it to expand exec_prefix.
3334 #      $TMPDIR          if set, where it might want to write temporary files
3335 # if $TMPDIR is not set:
3336 #      /tmp             where it might want to write temporary files
3337 #      /var/tmp         likewise
3338 #      /usr/tmp         likewise
3339 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3340   ac_tmpdirs=$TMPDIR
3341 else
3342   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3343 fi
3344 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3345   test -d $ac_dir || continue
3346   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3347   ac_xdir=$ac_dir/cf$$
3348   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3349   ac_tf1=$ac_xdir/conftest9012345
3350   ac_tf2=$ac_xdir/conftest9012346
3351   (echo 1 >$ac_tf1) 2>/dev/null
3352   (echo 2 >$ac_tf2) 2>/dev/null
3353   ac_val=`cat $ac_tf1 2>/dev/null`
3354   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3355     ac_cv_sys_long_file_names=no
3356     rm -rf $ac_xdir 2>/dev/null
3357     break
3358   fi
3359   rm -rf $ac_xdir 2>/dev/null
3360 done
3361 fi
3362 echo "$as_me:3362: result: $ac_cv_sys_long_file_names" >&5
3363 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3364 if test $ac_cv_sys_long_file_names = yes; then
3365
3366 cat >>confdefs.h <<\EOF
3367 #define HAVE_LONG_FILE_NAMES 1
3368 EOF
3369
3370 fi
3371
3372 # if we find pkg-config, check if we should install the ".pc" files.
3373
3374 echo "$as_me:3374: checking if you want to use pkg-config" >&5
3375 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3376
3377 # Check whether --with-pkg-config or --without-pkg-config was given.
3378 if test "${with_pkg_config+set}" = set; then
3379   withval="$with_pkg_config"
3380   cf_pkg_config=$withval
3381 else
3382   cf_pkg_config=yes
3383 fi;
3384 echo "$as_me:3384: result: $cf_pkg_config" >&5
3385 echo "${ECHO_T}$cf_pkg_config" >&6
3386
3387 case $cf_pkg_config in
3388 (no)
3389         PKG_CONFIG=none
3390         ;;
3391 (yes)
3392
3393 if test -n "$ac_tool_prefix"; then
3394   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3395 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3396 echo "$as_me:3396: checking for $ac_word" >&5
3397 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3398 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3399   echo $ECHO_N "(cached) $ECHO_C" >&6
3400 else
3401   case $PKG_CONFIG in
3402   [\\/]* | ?:[\\/]*)
3403   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3404   ;;
3405   *)
3406   ac_save_IFS=$IFS; IFS=$ac_path_separator
3407 ac_dummy="$PATH"
3408 for ac_dir in $ac_dummy; do
3409   IFS=$ac_save_IFS
3410   test -z "$ac_dir" && ac_dir=.
3411   if $as_executable_p "$ac_dir/$ac_word"; then
3412    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3413    echo "$as_me:3413: found $ac_dir/$ac_word" >&5
3414    break
3415 fi
3416 done
3417
3418   ;;
3419 esac
3420 fi
3421 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3422
3423 if test -n "$PKG_CONFIG"; then
3424   echo "$as_me:3424: result: $PKG_CONFIG" >&5
3425 echo "${ECHO_T}$PKG_CONFIG" >&6
3426 else
3427   echo "$as_me:3427: result: no" >&5
3428 echo "${ECHO_T}no" >&6
3429 fi
3430
3431 fi
3432 if test -z "$ac_cv_path_PKG_CONFIG"; then
3433   ac_pt_PKG_CONFIG=$PKG_CONFIG
3434   # Extract the first word of "pkg-config", so it can be a program name with args.
3435 set dummy pkg-config; ac_word=$2
3436 echo "$as_me:3436: checking for $ac_word" >&5
3437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3438 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3439   echo $ECHO_N "(cached) $ECHO_C" >&6
3440 else
3441   case $ac_pt_PKG_CONFIG in
3442   [\\/]* | ?:[\\/]*)
3443   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3444   ;;
3445   *)
3446   ac_save_IFS=$IFS; IFS=$ac_path_separator
3447 ac_dummy="$PATH"
3448 for ac_dir in $ac_dummy; do
3449   IFS=$ac_save_IFS
3450   test -z "$ac_dir" && ac_dir=.
3451   if $as_executable_p "$ac_dir/$ac_word"; then
3452    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3453    echo "$as_me:3453: found $ac_dir/$ac_word" >&5
3454    break
3455 fi
3456 done
3457
3458   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3459   ;;
3460 esac
3461 fi
3462 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3463
3464 if test -n "$ac_pt_PKG_CONFIG"; then
3465   echo "$as_me:3465: result: $ac_pt_PKG_CONFIG" >&5
3466 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3467 else
3468   echo "$as_me:3468: result: no" >&5
3469 echo "${ECHO_T}no" >&6
3470 fi
3471
3472   PKG_CONFIG=$ac_pt_PKG_CONFIG
3473 else
3474   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3475 fi
3476
3477         ;;
3478 (*)
3479         PKG_CONFIG=$withval
3480         ;;
3481 esac
3482
3483 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3484 if test "$PKG_CONFIG" != none ; then
3485
3486 if test "x$prefix" != xNONE; then
3487         cf_path_syntax="$prefix"
3488 else
3489         cf_path_syntax="$ac_default_prefix"
3490 fi
3491
3492 case ".$PKG_CONFIG" in
3493 (.\$\(*\)*|.\'*\'*)
3494         ;;
3495 (..|./*|.\\*)
3496         ;;
3497 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3498         ;;
3499 (.\${*prefix}*|.\${*dir}*)
3500         eval PKG_CONFIG="$PKG_CONFIG"
3501         case ".$PKG_CONFIG" in
3502         (.NONE/*)
3503                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3504                 ;;
3505         esac
3506         ;;
3507 (.no|.NONE/*)
3508         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3509         ;;
3510 (*)
3511         { { echo "$as_me:3511: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3512 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3513    { (exit 1); exit 1; }; }
3514         ;;
3515 esac
3516
3517 else
3518         { echo "$as_me:3518: WARNING: pkg-config is not installed" >&5
3519 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3520 fi
3521
3522 echo "$as_me:3522: checking for $PKG_CONFIG library directory" >&5
3523 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3524
3525 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3526 if test "${with_pkg_config_libdir+set}" = set; then
3527   withval="$with_pkg_config_libdir"
3528   PKG_CONFIG_LIBDIR=$withval
3529 else
3530   PKG_CONFIG_LIBDIR=yes
3531 fi;
3532
3533 case x$PKG_CONFIG_LIBDIR in
3534 (x/*)
3535         ;;
3536 (xyes)
3537         # Look for the library directory using the same prefix as the executable
3538         if test "x$PKG_CONFIG" = xnone
3539         then
3540                 cf_path=$prefix
3541         else
3542                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3543         fi
3544
3545         # If you don't like using the default architecture, you have to specify the
3546         # intended library directory and corresponding compiler/linker options.
3547         #
3548         # This case allows for Debian's 2014-flavor of multiarch, along with the
3549         # most common variations before that point.  Some other variants spell the
3550         # directory differently, e.g., "pkg-config", and put it in unusual places.
3551         # pkg-config has always been poorly standardized, which is ironic...
3552         case x`(arch) 2>/dev/null` in
3553         (*64)
3554                 cf_search_path="\
3555                         $cf_path/lib/*64-linux-gnu \
3556                         $cf_path/share \
3557                         $cf_path/lib64 \
3558                         $cf_path/lib32 \
3559                         $cf_path/lib"
3560                 ;;
3561         (*)
3562                 cf_search_path="\
3563                         $cf_path/lib/*-linux-gnu \
3564                         $cf_path/share \
3565                         $cf_path/lib32 \
3566                         $cf_path/lib \
3567                         $cf_path/libdata"
3568                 ;;
3569         esac
3570
3571         test -n "$verbose" && echo "    list..." 1>&6
3572
3573 echo "${as_me:-configure}:3573: testing list... ..." 1>&5
3574
3575         for cf_config in $cf_search_path
3576         do
3577                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3578
3579 echo "${as_me:-configure}:3579: testing checking $cf_config/pkgconfig ..." 1>&5
3580
3581                 if test -d $cf_config/pkgconfig
3582                 then
3583                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3584                         echo "$as_me:3584: checking done" >&5
3585 echo $ECHO_N "checking done... $ECHO_C" >&6
3586                         break
3587                 fi
3588         done
3589         ;;
3590 (*)
3591         ;;
3592 esac
3593
3594 echo "$as_me:3594: result: $PKG_CONFIG_LIBDIR" >&5
3595 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3596
3597 if test "x$PKG_CONFIG" != xnone
3598 then
3599         echo "$as_me:3599: checking if we should install .pc files for $PKG_CONFIG" >&5
3600 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3601 else
3602         echo "$as_me:3602: checking if we should install .pc files" >&5
3603 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3604 fi
3605
3606 # Check whether --enable-pc-files or --disable-pc-files was given.
3607 if test "${enable_pc_files+set}" = set; then
3608   enableval="$enable_pc_files"
3609   enable_pc_files=$enableval
3610 else
3611   enable_pc_files=no
3612 fi;
3613 echo "$as_me:3613: result: $enable_pc_files" >&5
3614 echo "${ECHO_T}$enable_pc_files" >&6
3615
3616 if test "x$enable_pc_files" != xno
3617 then
3618         case "x$PKG_CONFIG_LIBDIR" in
3619         (xno|xyes)
3620                 { echo "$as_me:3620: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3621 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3622                 MAKE_PC_FILES="#"
3623                 ;;
3624         (*)
3625
3626 if test "x$prefix" != xNONE; then
3627         cf_path_syntax="$prefix"
3628 else
3629         cf_path_syntax="$ac_default_prefix"
3630 fi
3631
3632 case ".$PKG_CONFIG_LIBDIR" in
3633 (.\$\(*\)*|.\'*\'*)
3634         ;;
3635 (..|./*|.\\*)
3636         ;;
3637 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3638         ;;
3639 (.\${*prefix}*|.\${*dir}*)
3640         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3641         case ".$PKG_CONFIG_LIBDIR" in
3642         (.NONE/*)
3643                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3644                 ;;
3645         esac
3646         ;;
3647 (.no|.NONE/*)
3648         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3649         ;;
3650 (*)
3651         { { echo "$as_me:3651: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3652 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3653    { (exit 1); exit 1; }; }
3654         ;;
3655 esac
3656
3657                 MAKE_PC_FILES=
3658                 ;;
3659         esac
3660 else
3661         MAKE_PC_FILES="#"
3662 fi
3663
3664 if test -z "$MAKE_PC_FILES"
3665 then
3666         echo "$as_me:3666: checking for suffix to add to pc-files" >&5
3667 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3668
3669 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3670 if test "${with_pc_suffix+set}" = set; then
3671   withval="$with_pc_suffix"
3672   case "x$withval" in
3673         (xyes|xno)
3674                 PC_MODULE_SUFFIX=
3675                 ;;
3676         (*)     PC_MODULE_SUFFIX="$withval"
3677                 ;;
3678         esac
3679 fi;
3680         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3681         echo "$as_me:3681: result: $PC_MODULE_SUFFIX" >&5
3682 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3683         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3684
3685 fi
3686
3687 echo "$as_me:3687: checking if we should assume mixed-case filenames" >&5
3688 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3689
3690 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3691 if test "${enable_mixed_case+set}" = set; then
3692   enableval="$enable_mixed_case"
3693   enable_mixedcase=$enableval
3694 else
3695   enable_mixedcase=auto
3696 fi;
3697 echo "$as_me:3697: result: $enable_mixedcase" >&5
3698 echo "${ECHO_T}$enable_mixedcase" >&6
3699 if test "$enable_mixedcase" = "auto" ; then
3700
3701 echo "$as_me:3701: checking if filesystem supports mixed-case filenames" >&5
3702 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3703 if test "${cf_cv_mixedcase+set}" = set; then
3704   echo $ECHO_N "(cached) $ECHO_C" >&6
3705 else
3706
3707 if test "$cross_compiling" = yes ; then
3708         case $target_alias in
3709         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3710                 cf_cv_mixedcase=no
3711                 ;;
3712         (*)
3713                 cf_cv_mixedcase=yes
3714                 ;;
3715         esac
3716 else
3717         rm -f conftest CONFTEST
3718         echo test >conftest
3719         if test -f CONFTEST ; then
3720                 cf_cv_mixedcase=no
3721         else
3722                 cf_cv_mixedcase=yes
3723         fi
3724         rm -f conftest CONFTEST
3725 fi
3726
3727 fi
3728 echo "$as_me:3728: result: $cf_cv_mixedcase" >&5
3729 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3730 test "$cf_cv_mixedcase" = yes &&
3731 cat >>confdefs.h <<\EOF
3732 #define MIXEDCASE_FILENAMES 1
3733 EOF
3734
3735 else
3736         cf_cv_mixedcase=$enable_mixedcase
3737         if test "x$enable_mixedcase" = "xyes" ; then
3738
3739 cat >>confdefs.h <<\EOF
3740 #define MIXEDCASE_FILENAMES 1
3741 EOF
3742
3743         fi
3744 fi
3745
3746 # do this after mixed-case option (tags/TAGS is not as important as tic).
3747 echo "$as_me:3747: checking whether ${MAKE-make} sets \${MAKE}" >&5
3748 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3749 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3750 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3751   echo $ECHO_N "(cached) $ECHO_C" >&6
3752 else
3753   cat >conftest.make <<\EOF
3754 all:
3755         @echo 'ac_maketemp="${MAKE}"'
3756 EOF
3757 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3758 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3759 if test -n "$ac_maketemp"; then
3760   eval ac_cv_prog_make_${ac_make}_set=yes
3761 else
3762   eval ac_cv_prog_make_${ac_make}_set=no
3763 fi
3764 rm -f conftest.make
3765 fi
3766 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3767   echo "$as_me:3767: result: yes" >&5
3768 echo "${ECHO_T}yes" >&6
3769   SET_MAKE=
3770 else
3771   echo "$as_me:3771: result: no" >&5
3772 echo "${ECHO_T}no" >&6
3773   SET_MAKE="MAKE=${MAKE-make}"
3774 fi
3775
3776 for ac_prog in exctags ctags
3777 do
3778   # Extract the first word of "$ac_prog", so it can be a program name with args.
3779 set dummy $ac_prog; ac_word=$2
3780 echo "$as_me:3780: checking for $ac_word" >&5
3781 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3782 if test "${ac_cv_prog_CTAGS+set}" = set; then
3783   echo $ECHO_N "(cached) $ECHO_C" >&6
3784 else
3785   if test -n "$CTAGS"; then
3786   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3787 else
3788   ac_save_IFS=$IFS; IFS=$ac_path_separator
3789 ac_dummy="$PATH"
3790 for ac_dir in $ac_dummy; do
3791   IFS=$ac_save_IFS
3792   test -z "$ac_dir" && ac_dir=.
3793   $as_executable_p "$ac_dir/$ac_word" || continue
3794 ac_cv_prog_CTAGS="$ac_prog"
3795 echo "$as_me:3795: found $ac_dir/$ac_word" >&5
3796 break
3797 done
3798
3799 fi
3800 fi
3801 CTAGS=$ac_cv_prog_CTAGS
3802 if test -n "$CTAGS"; then
3803   echo "$as_me:3803: result: $CTAGS" >&5
3804 echo "${ECHO_T}$CTAGS" >&6
3805 else
3806   echo "$as_me:3806: result: no" >&5
3807 echo "${ECHO_T}no" >&6
3808 fi
3809
3810   test -n "$CTAGS" && break
3811 done
3812
3813 for ac_prog in exetags etags
3814 do
3815   # Extract the first word of "$ac_prog", so it can be a program name with args.
3816 set dummy $ac_prog; ac_word=$2
3817 echo "$as_me:3817: checking for $ac_word" >&5
3818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3819 if test "${ac_cv_prog_ETAGS+set}" = set; then
3820   echo $ECHO_N "(cached) $ECHO_C" >&6
3821 else
3822   if test -n "$ETAGS"; then
3823   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3824 else
3825   ac_save_IFS=$IFS; IFS=$ac_path_separator
3826 ac_dummy="$PATH"
3827 for ac_dir in $ac_dummy; do
3828   IFS=$ac_save_IFS
3829   test -z "$ac_dir" && ac_dir=.
3830   $as_executable_p "$ac_dir/$ac_word" || continue
3831 ac_cv_prog_ETAGS="$ac_prog"
3832 echo "$as_me:3832: found $ac_dir/$ac_word" >&5
3833 break
3834 done
3835
3836 fi
3837 fi
3838 ETAGS=$ac_cv_prog_ETAGS
3839 if test -n "$ETAGS"; then
3840   echo "$as_me:3840: result: $ETAGS" >&5
3841 echo "${ECHO_T}$ETAGS" >&6
3842 else
3843   echo "$as_me:3843: result: no" >&5
3844 echo "${ECHO_T}no" >&6
3845 fi
3846
3847   test -n "$ETAGS" && break
3848 done
3849
3850 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3851 set dummy ${CTAGS:-ctags}; ac_word=$2
3852 echo "$as_me:3852: checking for $ac_word" >&5
3853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3854 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3855   echo $ECHO_N "(cached) $ECHO_C" >&6
3856 else
3857   if test -n "$MAKE_LOWER_TAGS"; then
3858   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3859 else
3860   ac_save_IFS=$IFS; IFS=$ac_path_separator
3861 ac_dummy="$PATH"
3862 for ac_dir in $ac_dummy; do
3863   IFS=$ac_save_IFS
3864   test -z "$ac_dir" && ac_dir=.
3865   $as_executable_p "$ac_dir/$ac_word" || continue
3866 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3867 echo "$as_me:3867: found $ac_dir/$ac_word" >&5
3868 break
3869 done
3870
3871   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3872 fi
3873 fi
3874 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3875 if test -n "$MAKE_LOWER_TAGS"; then
3876   echo "$as_me:3876: result: $MAKE_LOWER_TAGS" >&5
3877 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3878 else
3879   echo "$as_me:3879: result: no" >&5
3880 echo "${ECHO_T}no" >&6
3881 fi
3882
3883 if test "$cf_cv_mixedcase" = yes ; then
3884         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3885 set dummy ${ETAGS:-etags}; ac_word=$2
3886 echo "$as_me:3886: checking for $ac_word" >&5
3887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3888 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3889   echo $ECHO_N "(cached) $ECHO_C" >&6
3890 else
3891   if test -n "$MAKE_UPPER_TAGS"; then
3892   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3893 else
3894   ac_save_IFS=$IFS; IFS=$ac_path_separator
3895 ac_dummy="$PATH"
3896 for ac_dir in $ac_dummy; do
3897   IFS=$ac_save_IFS
3898   test -z "$ac_dir" && ac_dir=.
3899   $as_executable_p "$ac_dir/$ac_word" || continue
3900 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3901 echo "$as_me:3901: found $ac_dir/$ac_word" >&5
3902 break
3903 done
3904
3905   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3906 fi
3907 fi
3908 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3909 if test -n "$MAKE_UPPER_TAGS"; then
3910   echo "$as_me:3910: result: $MAKE_UPPER_TAGS" >&5
3911 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3912 else
3913   echo "$as_me:3913: result: no" >&5
3914 echo "${ECHO_T}no" >&6
3915 fi
3916
3917 else
3918         MAKE_UPPER_TAGS=no
3919 fi
3920
3921 if test "$MAKE_UPPER_TAGS" = yes ; then
3922         MAKE_UPPER_TAGS=
3923 else
3924         MAKE_UPPER_TAGS="#"
3925 fi
3926
3927 if test "$MAKE_LOWER_TAGS" = yes ; then
3928         MAKE_LOWER_TAGS=
3929 else
3930         MAKE_LOWER_TAGS="#"
3931 fi
3932
3933 echo "$as_me:3933: checking for makeflags variable" >&5
3934 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3935 if test "${cf_cv_makeflags+set}" = set; then
3936   echo $ECHO_N "(cached) $ECHO_C" >&6
3937 else
3938
3939         cf_cv_makeflags=''
3940         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3941         do
3942                 cat >cf_makeflags.tmp <<CF_EOF
3943 SHELL = /bin/sh
3944 all :
3945         @ echo '.$cf_option'
3946 CF_EOF
3947                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3948                 case "$cf_result" in
3949                 (.*k|.*kw)
3950                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3951                         case "$cf_result" in
3952                         (.*CC=*)        cf_cv_makeflags=
3953                                 ;;
3954                         (*)     cf_cv_makeflags=$cf_option
3955                                 ;;
3956                         esac
3957                         break
3958                         ;;
3959                 (.-)    ;;
3960                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
3961                         ;;
3962                 esac
3963         done
3964         rm -f cf_makeflags.tmp
3965
3966 fi
3967 echo "$as_me:3967: result: $cf_cv_makeflags" >&5
3968 echo "${ECHO_T}$cf_cv_makeflags" >&6
3969
3970 if test -n "$ac_tool_prefix"; then
3971   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3972 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3973 echo "$as_me:3973: checking for $ac_word" >&5
3974 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3975 if test "${ac_cv_prog_RANLIB+set}" = set; then
3976   echo $ECHO_N "(cached) $ECHO_C" >&6
3977 else
3978   if test -n "$RANLIB"; then
3979   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3980 else
3981   ac_save_IFS=$IFS; IFS=$ac_path_separator
3982 ac_dummy="$PATH"
3983 for ac_dir in $ac_dummy; do
3984   IFS=$ac_save_IFS
3985   test -z "$ac_dir" && ac_dir=.
3986   $as_executable_p "$ac_dir/$ac_word" || continue
3987 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3988 echo "$as_me:3988: found $ac_dir/$ac_word" >&5
3989 break
3990 done
3991
3992 fi
3993 fi
3994 RANLIB=$ac_cv_prog_RANLIB
3995 if test -n "$RANLIB"; then
3996   echo "$as_me:3996: result: $RANLIB" >&5
3997 echo "${ECHO_T}$RANLIB" >&6
3998 else
3999   echo "$as_me:3999: result: no" >&5
4000 echo "${ECHO_T}no" >&6
4001 fi
4002
4003 fi
4004 if test -z "$ac_cv_prog_RANLIB"; then
4005   ac_ct_RANLIB=$RANLIB
4006   # Extract the first word of "ranlib", so it can be a program name with args.
4007 set dummy ranlib; ac_word=$2
4008 echo "$as_me:4008: checking for $ac_word" >&5
4009 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4010 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4011   echo $ECHO_N "(cached) $ECHO_C" >&6
4012 else
4013   if test -n "$ac_ct_RANLIB"; then
4014   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4015 else
4016   ac_save_IFS=$IFS; IFS=$ac_path_separator
4017 ac_dummy="$PATH"
4018 for ac_dir in $ac_dummy; do
4019   IFS=$ac_save_IFS
4020   test -z "$ac_dir" && ac_dir=.
4021   $as_executable_p "$ac_dir/$ac_word" || continue
4022 ac_cv_prog_ac_ct_RANLIB="ranlib"
4023 echo "$as_me:4023: found $ac_dir/$ac_word" >&5
4024 break
4025 done
4026
4027   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4028 fi
4029 fi
4030 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4031 if test -n "$ac_ct_RANLIB"; then
4032   echo "$as_me:4032: result: $ac_ct_RANLIB" >&5
4033 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4034 else
4035   echo "$as_me:4035: result: no" >&5
4036 echo "${ECHO_T}no" >&6
4037 fi
4038
4039   RANLIB=$ac_ct_RANLIB
4040 else
4041   RANLIB="$ac_cv_prog_RANLIB"
4042 fi
4043
4044 if test -n "$ac_tool_prefix"; then
4045   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4046 set dummy ${ac_tool_prefix}ld; ac_word=$2
4047 echo "$as_me:4047: checking for $ac_word" >&5
4048 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4049 if test "${ac_cv_prog_LD+set}" = set; then
4050   echo $ECHO_N "(cached) $ECHO_C" >&6
4051 else
4052   if test -n "$LD"; then
4053   ac_cv_prog_LD="$LD" # Let the user override the test.
4054 else
4055   ac_save_IFS=$IFS; IFS=$ac_path_separator
4056 ac_dummy="$PATH"
4057 for ac_dir in $ac_dummy; do
4058   IFS=$ac_save_IFS
4059   test -z "$ac_dir" && ac_dir=.
4060   $as_executable_p "$ac_dir/$ac_word" || continue
4061 ac_cv_prog_LD="${ac_tool_prefix}ld"
4062 echo "$as_me:4062: found $ac_dir/$ac_word" >&5
4063 break
4064 done
4065
4066 fi
4067 fi
4068 LD=$ac_cv_prog_LD
4069 if test -n "$LD"; then
4070   echo "$as_me:4070: result: $LD" >&5
4071 echo "${ECHO_T}$LD" >&6
4072 else
4073   echo "$as_me:4073: result: no" >&5
4074 echo "${ECHO_T}no" >&6
4075 fi
4076
4077 fi
4078 if test -z "$ac_cv_prog_LD"; then
4079   ac_ct_LD=$LD
4080   # Extract the first word of "ld", so it can be a program name with args.
4081 set dummy ld; ac_word=$2
4082 echo "$as_me:4082: checking for $ac_word" >&5
4083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4084 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4085   echo $ECHO_N "(cached) $ECHO_C" >&6
4086 else
4087   if test -n "$ac_ct_LD"; then
4088   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4089 else
4090   ac_save_IFS=$IFS; IFS=$ac_path_separator
4091 ac_dummy="$PATH"
4092 for ac_dir in $ac_dummy; do
4093   IFS=$ac_save_IFS
4094   test -z "$ac_dir" && ac_dir=.
4095   $as_executable_p "$ac_dir/$ac_word" || continue
4096 ac_cv_prog_ac_ct_LD="ld"
4097 echo "$as_me:4097: found $ac_dir/$ac_word" >&5
4098 break
4099 done
4100
4101   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4102 fi
4103 fi
4104 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4105 if test -n "$ac_ct_LD"; then
4106   echo "$as_me:4106: result: $ac_ct_LD" >&5
4107 echo "${ECHO_T}$ac_ct_LD" >&6
4108 else
4109   echo "$as_me:4109: result: no" >&5
4110 echo "${ECHO_T}no" >&6
4111 fi
4112
4113   LD=$ac_ct_LD
4114 else
4115   LD="$ac_cv_prog_LD"
4116 fi
4117
4118 if test -n "$ac_tool_prefix"; then
4119   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4120 set dummy ${ac_tool_prefix}ar; ac_word=$2
4121 echo "$as_me:4121: checking for $ac_word" >&5
4122 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4123 if test "${ac_cv_prog_AR+set}" = set; then
4124   echo $ECHO_N "(cached) $ECHO_C" >&6
4125 else
4126   if test -n "$AR"; then
4127   ac_cv_prog_AR="$AR" # Let the user override the test.
4128 else
4129   ac_save_IFS=$IFS; IFS=$ac_path_separator
4130 ac_dummy="$PATH"
4131 for ac_dir in $ac_dummy; do
4132   IFS=$ac_save_IFS
4133   test -z "$ac_dir" && ac_dir=.
4134   $as_executable_p "$ac_dir/$ac_word" || continue
4135 ac_cv_prog_AR="${ac_tool_prefix}ar"
4136 echo "$as_me:4136: found $ac_dir/$ac_word" >&5
4137 break
4138 done
4139
4140 fi
4141 fi
4142 AR=$ac_cv_prog_AR
4143 if test -n "$AR"; then
4144   echo "$as_me:4144: result: $AR" >&5
4145 echo "${ECHO_T}$AR" >&6
4146 else
4147   echo "$as_me:4147: result: no" >&5
4148 echo "${ECHO_T}no" >&6
4149 fi
4150
4151 fi
4152 if test -z "$ac_cv_prog_AR"; then
4153   ac_ct_AR=$AR
4154   # Extract the first word of "ar", so it can be a program name with args.
4155 set dummy ar; ac_word=$2
4156 echo "$as_me:4156: checking for $ac_word" >&5
4157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4158 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4159   echo $ECHO_N "(cached) $ECHO_C" >&6
4160 else
4161   if test -n "$ac_ct_AR"; then
4162   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4163 else
4164   ac_save_IFS=$IFS; IFS=$ac_path_separator
4165 ac_dummy="$PATH"
4166 for ac_dir in $ac_dummy; do
4167   IFS=$ac_save_IFS
4168   test -z "$ac_dir" && ac_dir=.
4169   $as_executable_p "$ac_dir/$ac_word" || continue
4170 ac_cv_prog_ac_ct_AR="ar"
4171 echo "$as_me:4171: found $ac_dir/$ac_word" >&5
4172 break
4173 done
4174
4175   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4176 fi
4177 fi
4178 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4179 if test -n "$ac_ct_AR"; then
4180   echo "$as_me:4180: result: $ac_ct_AR" >&5
4181 echo "${ECHO_T}$ac_ct_AR" >&6
4182 else
4183   echo "$as_me:4183: result: no" >&5
4184 echo "${ECHO_T}no" >&6
4185 fi
4186
4187   AR=$ac_ct_AR
4188 else
4189   AR="$ac_cv_prog_AR"
4190 fi
4191
4192 if test -n "$ac_tool_prefix"; then
4193   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4194 set dummy ${ac_tool_prefix}nm; ac_word=$2
4195 echo "$as_me:4195: checking for $ac_word" >&5
4196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4197 if test "${ac_cv_prog_NM+set}" = set; then
4198   echo $ECHO_N "(cached) $ECHO_C" >&6
4199 else
4200   if test -n "$NM"; then
4201   ac_cv_prog_NM="$NM" # Let the user override the test.
4202 else
4203   ac_save_IFS=$IFS; IFS=$ac_path_separator
4204 ac_dummy="$PATH"
4205 for ac_dir in $ac_dummy; do
4206   IFS=$ac_save_IFS
4207   test -z "$ac_dir" && ac_dir=.
4208   $as_executable_p "$ac_dir/$ac_word" || continue
4209 ac_cv_prog_NM="${ac_tool_prefix}nm"
4210 echo "$as_me:4210: found $ac_dir/$ac_word" >&5
4211 break
4212 done
4213
4214 fi
4215 fi
4216 NM=$ac_cv_prog_NM
4217 if test -n "$NM"; then
4218   echo "$as_me:4218: result: $NM" >&5
4219 echo "${ECHO_T}$NM" >&6
4220 else
4221   echo "$as_me:4221: result: no" >&5
4222 echo "${ECHO_T}no" >&6
4223 fi
4224
4225 fi
4226 if test -z "$ac_cv_prog_NM"; then
4227   ac_ct_NM=$NM
4228   # Extract the first word of "nm", so it can be a program name with args.
4229 set dummy nm; ac_word=$2
4230 echo "$as_me:4230: checking for $ac_word" >&5
4231 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4232 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4233   echo $ECHO_N "(cached) $ECHO_C" >&6
4234 else
4235   if test -n "$ac_ct_NM"; then
4236   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4237 else
4238   ac_save_IFS=$IFS; IFS=$ac_path_separator
4239 ac_dummy="$PATH"
4240 for ac_dir in $ac_dummy; do
4241   IFS=$ac_save_IFS
4242   test -z "$ac_dir" && ac_dir=.
4243   $as_executable_p "$ac_dir/$ac_word" || continue
4244 ac_cv_prog_ac_ct_NM="nm"
4245 echo "$as_me:4245: found $ac_dir/$ac_word" >&5
4246 break
4247 done
4248
4249   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4250 fi
4251 fi
4252 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4253 if test -n "$ac_ct_NM"; then
4254   echo "$as_me:4254: result: $ac_ct_NM" >&5
4255 echo "${ECHO_T}$ac_ct_NM" >&6
4256 else
4257   echo "$as_me:4257: result: no" >&5
4258 echo "${ECHO_T}no" >&6
4259 fi
4260
4261   NM=$ac_ct_NM
4262 else
4263   NM="$ac_cv_prog_NM"
4264 fi
4265
4266 if test -n "$ac_tool_prefix"; then
4267   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4268 set dummy ${ac_tool_prefix}ar; ac_word=$2
4269 echo "$as_me:4269: checking for $ac_word" >&5
4270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4271 if test "${ac_cv_prog_AR+set}" = set; then
4272   echo $ECHO_N "(cached) $ECHO_C" >&6
4273 else
4274   if test -n "$AR"; then
4275   ac_cv_prog_AR="$AR" # Let the user override the test.
4276 else
4277   ac_save_IFS=$IFS; IFS=$ac_path_separator
4278 ac_dummy="$PATH"
4279 for ac_dir in $ac_dummy; do
4280   IFS=$ac_save_IFS
4281   test -z "$ac_dir" && ac_dir=.
4282   $as_executable_p "$ac_dir/$ac_word" || continue
4283 ac_cv_prog_AR="${ac_tool_prefix}ar"
4284 echo "$as_me:4284: found $ac_dir/$ac_word" >&5
4285 break
4286 done
4287
4288 fi
4289 fi
4290 AR=$ac_cv_prog_AR
4291 if test -n "$AR"; then
4292   echo "$as_me:4292: result: $AR" >&5
4293 echo "${ECHO_T}$AR" >&6
4294 else
4295   echo "$as_me:4295: result: no" >&5
4296 echo "${ECHO_T}no" >&6
4297 fi
4298
4299 fi
4300 if test -z "$ac_cv_prog_AR"; then
4301   ac_ct_AR=$AR
4302   # Extract the first word of "ar", so it can be a program name with args.
4303 set dummy ar; ac_word=$2
4304 echo "$as_me:4304: checking for $ac_word" >&5
4305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4306 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4307   echo $ECHO_N "(cached) $ECHO_C" >&6
4308 else
4309   if test -n "$ac_ct_AR"; then
4310   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4311 else
4312   ac_save_IFS=$IFS; IFS=$ac_path_separator
4313 ac_dummy="$PATH"
4314 for ac_dir in $ac_dummy; do
4315   IFS=$ac_save_IFS
4316   test -z "$ac_dir" && ac_dir=.
4317   $as_executable_p "$ac_dir/$ac_word" || continue
4318 ac_cv_prog_ac_ct_AR="ar"
4319 echo "$as_me:4319: found $ac_dir/$ac_word" >&5
4320 break
4321 done
4322
4323   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4324 fi
4325 fi
4326 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4327 if test -n "$ac_ct_AR"; then
4328   echo "$as_me:4328: result: $ac_ct_AR" >&5
4329 echo "${ECHO_T}$ac_ct_AR" >&6
4330 else
4331   echo "$as_me:4331: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4333 fi
4334
4335   AR=$ac_ct_AR
4336 else
4337   AR="$ac_cv_prog_AR"
4338 fi
4339
4340 echo "$as_me:4340: checking for options to update archives" >&5
4341 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4342 if test "${cf_cv_ar_flags+set}" = set; then
4343   echo $ECHO_N "(cached) $ECHO_C" >&6
4344 else
4345
4346         cf_cv_ar_flags=unknown
4347         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4348         do
4349
4350                 # check if $ARFLAGS already contains this choice
4351                 if test "x$ARFLAGS" != "x" ; then
4352                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4353                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4354                                 cf_cv_ar_flags=
4355                                 break
4356                         fi
4357                 fi
4358
4359                 rm -f conftest.$ac_cv_objext
4360                 rm -f conftest.a
4361
4362                 cat >conftest.$ac_ext <<EOF
4363 #line 4363 "configure"
4364 int     testdata[3] = { 123, 456, 789 };
4365 EOF
4366                 if { (eval echo "$as_me:4366: \"$ac_compile\"") >&5
4367   (eval $ac_compile) 2>&5
4368   ac_status=$?
4369   echo "$as_me:4369: \$? = $ac_status" >&5
4370   (exit $ac_status); } ; then
4371                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4372                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4373                         if test -f conftest.a ; then
4374                                 cf_cv_ar_flags=$cf_ar_flags
4375                                 break
4376                         fi
4377                 else
4378                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4379
4380 echo "${as_me:-configure}:4380: testing cannot compile test-program ..." 1>&5
4381
4382                         break
4383                 fi
4384         done
4385         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4386
4387 fi
4388 echo "$as_me:4388: result: $cf_cv_ar_flags" >&5
4389 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4390
4391 if test -n "$ARFLAGS" ; then
4392         if test -n "$cf_cv_ar_flags" ; then
4393                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4394         fi
4395 else
4396         ARFLAGS=$cf_cv_ar_flags
4397 fi
4398
4399 echo "$as_me:4399: checking if you have specified an install-prefix" >&5
4400 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4401
4402 # Check whether --with-install-prefix or --without-install-prefix was given.
4403 if test "${with_install_prefix+set}" = set; then
4404   withval="$with_install_prefix"
4405   case "x$withval" in
4406         (xyes|xno)
4407                 ;;
4408         (*)     DESTDIR="$withval"
4409                 ;;
4410         esac
4411 fi;
4412 echo "$as_me:4412: result: $DESTDIR" >&5
4413 echo "${ECHO_T}$DESTDIR" >&6
4414
4415 ###############################################################################
4416
4417 # If we're cross-compiling, allow the user to override the tools and their
4418 # options.  The configure script is oriented toward identifying the host
4419 # compiler, etc., but we need a build compiler to generate parts of the source.
4420
4421 if test "$cross_compiling" = yes ; then
4422
4423         # defaults that we might want to override
4424         : ${BUILD_CFLAGS:=''}
4425         : ${BUILD_CPPFLAGS:=''}
4426         : ${BUILD_LDFLAGS:=''}
4427         : ${BUILD_LIBS:=''}
4428         : ${BUILD_EXEEXT:='$x'}
4429         : ${BUILD_OBJEXT:='o'}
4430
4431 # Check whether --with-build-cc or --without-build-cc was given.
4432 if test "${with_build_cc+set}" = set; then
4433   withval="$with_build_cc"
4434   BUILD_CC="$withval"
4435 else
4436   for ac_prog in gcc cc cl
4437 do
4438   # Extract the first word of "$ac_prog", so it can be a program name with args.
4439 set dummy $ac_prog; ac_word=$2
4440 echo "$as_me:4440: checking for $ac_word" >&5
4441 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4442 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4443   echo $ECHO_N "(cached) $ECHO_C" >&6
4444 else
4445   if test -n "$BUILD_CC"; then
4446   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4447 else
4448   ac_save_IFS=$IFS; IFS=$ac_path_separator
4449 ac_dummy="$PATH"
4450 for ac_dir in $ac_dummy; do
4451   IFS=$ac_save_IFS
4452   test -z "$ac_dir" && ac_dir=.
4453   $as_executable_p "$ac_dir/$ac_word" || continue
4454 ac_cv_prog_BUILD_CC="$ac_prog"
4455 echo "$as_me:4455: found $ac_dir/$ac_word" >&5
4456 break
4457 done
4458
4459 fi
4460 fi
4461 BUILD_CC=$ac_cv_prog_BUILD_CC
4462 if test -n "$BUILD_CC"; then
4463   echo "$as_me:4463: result: $BUILD_CC" >&5
4464 echo "${ECHO_T}$BUILD_CC" >&6
4465 else
4466   echo "$as_me:4466: result: no" >&5
4467 echo "${ECHO_T}no" >&6
4468 fi
4469
4470   test -n "$BUILD_CC" && break
4471 done
4472
4473 fi;
4474         echo "$as_me:4474: checking for native build C compiler" >&5
4475 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4476         echo "$as_me:4476: result: $BUILD_CC" >&5
4477 echo "${ECHO_T}$BUILD_CC" >&6
4478
4479         echo "$as_me:4479: checking for native build C preprocessor" >&5
4480 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4481
4482 # Check whether --with-build-cpp or --without-build-cpp was given.
4483 if test "${with_build_cpp+set}" = set; then
4484   withval="$with_build_cpp"
4485   BUILD_CPP="$withval"
4486 else
4487   BUILD_CPP='${BUILD_CC} -E'
4488 fi;
4489         echo "$as_me:4489: result: $BUILD_CPP" >&5
4490 echo "${ECHO_T}$BUILD_CPP" >&6
4491
4492         echo "$as_me:4492: checking for native build C flags" >&5
4493 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4494
4495 # Check whether --with-build-cflags or --without-build-cflags was given.
4496 if test "${with_build_cflags+set}" = set; then
4497   withval="$with_build_cflags"
4498   BUILD_CFLAGS="$withval"
4499 fi;
4500         echo "$as_me:4500: result: $BUILD_CFLAGS" >&5
4501 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4502
4503         echo "$as_me:4503: checking for native build C preprocessor-flags" >&5
4504 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4505
4506 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4507 if test "${with_build_cppflags+set}" = set; then
4508   withval="$with_build_cppflags"
4509   BUILD_CPPFLAGS="$withval"
4510 fi;
4511         echo "$as_me:4511: result: $BUILD_CPPFLAGS" >&5
4512 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4513
4514         echo "$as_me:4514: checking for native build linker-flags" >&5
4515 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4516
4517 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4518 if test "${with_build_ldflags+set}" = set; then
4519   withval="$with_build_ldflags"
4520   BUILD_LDFLAGS="$withval"
4521 fi;
4522         echo "$as_me:4522: result: $BUILD_LDFLAGS" >&5
4523 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4524
4525         echo "$as_me:4525: checking for native build linker-libraries" >&5
4526 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4527
4528 # Check whether --with-build-libs or --without-build-libs was given.
4529 if test "${with_build_libs+set}" = set; then
4530   withval="$with_build_libs"
4531   BUILD_LIBS="$withval"
4532 fi;
4533         echo "$as_me:4533: result: $BUILD_LIBS" >&5
4534 echo "${ECHO_T}$BUILD_LIBS" >&6
4535
4536         # this assumes we're on Unix.
4537         BUILD_EXEEXT=
4538         BUILD_OBJEXT=o
4539
4540         : ${BUILD_CC:='${CC}'}
4541
4542         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4543                 { { echo "$as_me:4543: error: Cross-build requires two compilers.
4544 Use --with-build-cc to specify the native compiler." >&5
4545 echo "$as_me: error: Cross-build requires two compilers.
4546 Use --with-build-cc to specify the native compiler." >&2;}
4547    { (exit 1); exit 1; }; }
4548         fi
4549
4550 else
4551         : ${BUILD_CC:='${CC}'}
4552         : ${BUILD_CPP:='${CPP}'}
4553         : ${BUILD_CFLAGS:='${CFLAGS}'}
4554         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4555         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4556         : ${BUILD_LIBS:='${LIBS}'}
4557         : ${BUILD_EXEEXT:='$x'}
4558         : ${BUILD_OBJEXT:='o'}
4559 fi
4560
4561 ###############################################################################
4562
4563 ### Options to allow the user to specify the set of libraries which are used.
4564 ### Use "--without-normal --with-shared" to allow the default model to be
4565 ### shared, for example.
4566 cf_list_models=""
4567
4568 echo "$as_me:4568: checking if libtool -version-number should be used" >&5
4569 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4570
4571 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4572 if test "${enable_libtool_version+set}" = set; then
4573   enableval="$enable_libtool_version"
4574   test "$enableval" != no && enableval=yes
4575   if test "$enableval" != "yes" ; then
4576     cf_libtool_version=no
4577   else
4578     cf_libtool_version=yes
4579   fi
4580 else
4581   enableval=yes
4582   cf_libtool_version=yes
4583
4584 fi;
4585 echo "$as_me:4585: result: $cf_libtool_version" >&5
4586 echo "${ECHO_T}$cf_libtool_version" >&6
4587
4588 if test "$cf_libtool_version" = yes ; then
4589         LIBTOOL_VERSION="-version-number"
4590 else
4591         LIBTOOL_VERSION="-version-info"
4592         case "x$VERSION" in
4593         (x)
4594                 { echo "$as_me:4594: WARNING: VERSION was not set" >&5
4595 echo "$as_me: WARNING: VERSION was not set" >&2;}
4596                 ;;
4597         (x*.*.*)
4598                 ABI_VERSION="$VERSION"
4599                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4600
4601 echo "${as_me:-configure}:4601: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4602
4603                 ;;
4604         (x*:*:*)
4605                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4606                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4607
4608 echo "${as_me:-configure}:4608: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4609
4610                 ;;
4611         (*)
4612                 { echo "$as_me:4612: WARNING: unexpected VERSION value: $VERSION" >&5
4613 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4614                 ;;
4615         esac
4616 fi
4617
4618 LIBTOOL=
4619
4620 # common library maintenance symbols that are convenient for libtool scripts:
4621 LIB_CREATE='${AR} -cr'
4622 LIB_OBJECT='${OBJECTS}'
4623 LIB_SUFFIX=.a
4624 LIB_PREP="$RANLIB"
4625
4626 # symbols used to prop libtool up to enable it to determine what it should be
4627 # doing:
4628 LIB_CLEAN=
4629 LIB_COMPILE=
4630 LIB_LINK='${CC}'
4631 LIB_INSTALL=
4632 LIB_UNINSTALL=
4633
4634 echo "$as_me:4634: checking if you want to build libraries with libtool" >&5
4635 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4636
4637 # Check whether --with-libtool or --without-libtool was given.
4638 if test "${with_libtool+set}" = set; then
4639   withval="$with_libtool"
4640   with_libtool=$withval
4641 else
4642   with_libtool=no
4643 fi;
4644 echo "$as_me:4644: result: $with_libtool" >&5
4645 echo "${ECHO_T}$with_libtool" >&6
4646 if test "$with_libtool" != "no"; then
4647
4648         if test "$with_libtool" != "yes" ; then
4649
4650 if test "x$prefix" != xNONE; then
4651         cf_path_syntax="$prefix"
4652 else
4653         cf_path_syntax="$ac_default_prefix"
4654 fi
4655
4656 case ".$with_libtool" in
4657 (.\$\(*\)*|.\'*\'*)
4658         ;;
4659 (..|./*|.\\*)
4660         ;;
4661 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4662         ;;
4663 (.\${*prefix}*|.\${*dir}*)
4664         eval with_libtool="$with_libtool"
4665         case ".$with_libtool" in
4666         (.NONE/*)
4667                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4668                 ;;
4669         esac
4670         ;;
4671 (.no|.NONE/*)
4672         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4673         ;;
4674 (*)
4675         { { echo "$as_me:4675: error: expected a pathname, not \"$with_libtool\"" >&5
4676 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4677    { (exit 1); exit 1; }; }
4678         ;;
4679 esac
4680
4681                 LIBTOOL=$with_libtool
4682         else
4683                 if test -n "$ac_tool_prefix"; then
4684   for ac_prog in libtool glibtool
4685   do
4686     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4687 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4688 echo "$as_me:4688: checking for $ac_word" >&5
4689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4690 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4691   echo $ECHO_N "(cached) $ECHO_C" >&6
4692 else
4693   if test -n "$LIBTOOL"; then
4694   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4695 else
4696   ac_save_IFS=$IFS; IFS=$ac_path_separator
4697 ac_dummy="$PATH"
4698 for ac_dir in $ac_dummy; do
4699   IFS=$ac_save_IFS
4700   test -z "$ac_dir" && ac_dir=.
4701   $as_executable_p "$ac_dir/$ac_word" || continue
4702 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4703 echo "$as_me:4703: found $ac_dir/$ac_word" >&5
4704 break
4705 done
4706
4707 fi
4708 fi
4709 LIBTOOL=$ac_cv_prog_LIBTOOL
4710 if test -n "$LIBTOOL"; then
4711   echo "$as_me:4711: result: $LIBTOOL" >&5
4712 echo "${ECHO_T}$LIBTOOL" >&6
4713 else
4714   echo "$as_me:4714: result: no" >&5
4715 echo "${ECHO_T}no" >&6
4716 fi
4717
4718     test -n "$LIBTOOL" && break
4719   done
4720 fi
4721 if test -z "$LIBTOOL"; then
4722   ac_ct_LIBTOOL=$LIBTOOL
4723   for ac_prog in libtool glibtool
4724 do
4725   # Extract the first word of "$ac_prog", so it can be a program name with args.
4726 set dummy $ac_prog; ac_word=$2
4727 echo "$as_me:4727: checking for $ac_word" >&5
4728 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4729 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4730   echo $ECHO_N "(cached) $ECHO_C" >&6
4731 else
4732   if test -n "$ac_ct_LIBTOOL"; then
4733   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4734 else
4735   ac_save_IFS=$IFS; IFS=$ac_path_separator
4736 ac_dummy="$PATH"
4737 for ac_dir in $ac_dummy; do
4738   IFS=$ac_save_IFS
4739   test -z "$ac_dir" && ac_dir=.
4740   $as_executable_p "$ac_dir/$ac_word" || continue
4741 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4742 echo "$as_me:4742: found $ac_dir/$ac_word" >&5
4743 break
4744 done
4745
4746 fi
4747 fi
4748 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4749 if test -n "$ac_ct_LIBTOOL"; then
4750   echo "$as_me:4750: result: $ac_ct_LIBTOOL" >&5
4751 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4752 else
4753   echo "$as_me:4753: result: no" >&5
4754 echo "${ECHO_T}no" >&6
4755 fi
4756
4757   test -n "$ac_ct_LIBTOOL" && break
4758 done
4759 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4760
4761   LIBTOOL=$ac_ct_LIBTOOL
4762 fi
4763
4764 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4765 then
4766         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.].*//'`
4767 else
4768         cf_cv_libtool_version=
4769 fi
4770 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4771
4772                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4773                 then
4774
4775 unset ac_cv_prog_ac_ct_LIBTOOL
4776 unset ac_ct_LIBTOOL
4777 unset LIBTOOL
4778
4779                         if test -n "$ac_tool_prefix"; then
4780   for ac_prog in glibtool
4781   do
4782     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4783 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4784 echo "$as_me:4784: checking for $ac_word" >&5
4785 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4786 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4787   echo $ECHO_N "(cached) $ECHO_C" >&6
4788 else
4789   if test -n "$LIBTOOL"; then
4790   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4791 else
4792   ac_save_IFS=$IFS; IFS=$ac_path_separator
4793 ac_dummy="$PATH"
4794 for ac_dir in $ac_dummy; do
4795   IFS=$ac_save_IFS
4796   test -z "$ac_dir" && ac_dir=.
4797   $as_executable_p "$ac_dir/$ac_word" || continue
4798 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4799 echo "$as_me:4799: found $ac_dir/$ac_word" >&5
4800 break
4801 done
4802
4803 fi
4804 fi
4805 LIBTOOL=$ac_cv_prog_LIBTOOL
4806 if test -n "$LIBTOOL"; then
4807   echo "$as_me:4807: result: $LIBTOOL" >&5
4808 echo "${ECHO_T}$LIBTOOL" >&6
4809 else
4810   echo "$as_me:4810: result: no" >&5
4811 echo "${ECHO_T}no" >&6
4812 fi
4813
4814     test -n "$LIBTOOL" && break
4815   done
4816 fi
4817 if test -z "$LIBTOOL"; then
4818   ac_ct_LIBTOOL=$LIBTOOL
4819   for ac_prog in glibtool
4820 do
4821   # Extract the first word of "$ac_prog", so it can be a program name with args.
4822 set dummy $ac_prog; ac_word=$2
4823 echo "$as_me:4823: checking for $ac_word" >&5
4824 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4825 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4826   echo $ECHO_N "(cached) $ECHO_C" >&6
4827 else
4828   if test -n "$ac_ct_LIBTOOL"; then
4829   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4830 else
4831   ac_save_IFS=$IFS; IFS=$ac_path_separator
4832 ac_dummy="$PATH"
4833 for ac_dir in $ac_dummy; do
4834   IFS=$ac_save_IFS
4835   test -z "$ac_dir" && ac_dir=.
4836   $as_executable_p "$ac_dir/$ac_word" || continue
4837 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4838 echo "$as_me:4838: found $ac_dir/$ac_word" >&5
4839 break
4840 done
4841
4842 fi
4843 fi
4844 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4845 if test -n "$ac_ct_LIBTOOL"; then
4846   echo "$as_me:4846: result: $ac_ct_LIBTOOL" >&5
4847 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4848 else
4849   echo "$as_me:4849: result: no" >&5
4850 echo "${ECHO_T}no" >&6
4851 fi
4852
4853   test -n "$ac_ct_LIBTOOL" && break
4854 done
4855 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4856
4857   LIBTOOL=$ac_ct_LIBTOOL
4858 fi
4859
4860 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4861 then
4862         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.].*//'`
4863 else
4864         cf_cv_libtool_version=
4865 fi
4866 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4867
4868                 fi
4869         fi
4870         if test -z "$LIBTOOL" ; then
4871                 { { echo "$as_me:4871: error: Cannot find libtool" >&5
4872 echo "$as_me: error: Cannot find libtool" >&2;}
4873    { (exit 1); exit 1; }; }
4874         fi
4875         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4876         LIB_OBJECT='${OBJECTS:.o=.lo}'
4877         LIB_SUFFIX=.la
4878         LIB_CLEAN='${LIBTOOL} --mode=clean'
4879         LIB_COMPILE='${LIBTOOL} --mode=compile'
4880         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4881         LIB_INSTALL='${LIBTOOL} --mode=install'
4882         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4883         LIB_PREP=:
4884
4885 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4886 then
4887         echo "$as_me:4887: checking version of $LIBTOOL" >&5
4888 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4889
4890 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4891 then
4892         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.].*//'`
4893 else
4894         cf_cv_libtool_version=
4895 fi
4896 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4897
4898         echo "$as_me:4898: result: $cf_cv_libtool_version" >&5
4899 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4900         if test -z "$cf_cv_libtool_version" ; then
4901                 { { echo "$as_me:4901: error: This is not GNU libtool" >&5
4902 echo "$as_me: error: This is not GNU libtool" >&2;}
4903    { (exit 1); exit 1; }; }
4904         fi
4905 else
4906         { { echo "$as_me:4906: error: GNU libtool has not been found" >&5
4907 echo "$as_me: error: GNU libtool has not been found" >&2;}
4908    { (exit 1); exit 1; }; }
4909 fi
4910
4911         # special hack to add -no-undefined (which libtool should do for itself)
4912         LT_UNDEF=
4913         case "$cf_cv_system_name" in
4914         (cygwin*|msys*|mingw32*|uwin*|aix[4-7])
4915                 LT_UNDEF=-no-undefined
4916                 ;;
4917         esac
4918
4919         # special hack to add --tag option for C++ compiler
4920         case $cf_cv_libtool_version in
4921         (1.[5-9]*|[2-9].[0-9.a-z]*)
4922                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4923                 LIBTOOL="$LIBTOOL --tag=CC"
4924                 ;;
4925         (*)
4926                 LIBTOOL_CXX="$LIBTOOL"
4927                 ;;
4928         esac
4929 else
4930         LIBTOOL=""
4931         LIBTOOL_CXX=""
4932 fi
4933
4934 test -z "$LIBTOOL" && ECHO_LT=
4935
4936 if test "$with_libtool" != "no" ; then
4937
4938 cf_list_models="$cf_list_models libtool"
4939
4940 else
4941
4942 echo "$as_me:4942: checking if you want to build shared libraries" >&5
4943 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4944
4945 # Check whether --with-shared or --without-shared was given.
4946 if test "${with_shared+set}" = set; then
4947   withval="$with_shared"
4948   with_shared=$withval
4949 else
4950   with_shared=no
4951 fi;
4952 echo "$as_me:4952: result: $with_shared" >&5
4953 echo "${ECHO_T}$with_shared" >&6
4954 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4955
4956 echo "$as_me:4956: checking if you want to build static libraries" >&5
4957 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4958
4959 # Check whether --with-normal or --without-normal was given.
4960 if test "${with_normal+set}" = set; then
4961   withval="$with_normal"
4962   with_normal=$withval
4963 else
4964   with_normal=yes
4965 fi;
4966 echo "$as_me:4966: result: $with_normal" >&5
4967 echo "${ECHO_T}$with_normal" >&6
4968 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4969
4970 echo "$as_me:4970: checking if you want to build debug libraries" >&5
4971 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4972
4973 # Check whether --with-debug or --without-debug was given.
4974 if test "${with_debug+set}" = set; then
4975   withval="$with_debug"
4976   with_debug=$withval
4977 else
4978   with_debug=yes
4979 fi;
4980 echo "$as_me:4980: result: $with_debug" >&5
4981 echo "${ECHO_T}$with_debug" >&6
4982 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4983
4984 echo "$as_me:4984: checking if you want to build profiling libraries" >&5
4985 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4986
4987 # Check whether --with-profile or --without-profile was given.
4988 if test "${with_profile+set}" = set; then
4989   withval="$with_profile"
4990   with_profile=$withval
4991 else
4992   with_profile=no
4993 fi;
4994 echo "$as_me:4994: result: $with_profile" >&5
4995 echo "${ECHO_T}$with_profile" >&6
4996 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4997
4998 fi
4999
5000 if test "X$cf_with_cxx_binding" != Xno; then
5001 if test "x$with_shared" = "xyes"; then
5002 echo "$as_me:5002: checking if you want to build C++ shared libraries" >&5
5003 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5004
5005 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5006 if test "${with_cxx_shared+set}" = set; then
5007   withval="$with_cxx_shared"
5008   with_shared_cxx=$withval
5009 else
5010   with_shared_cxx=no
5011 fi;
5012 echo "$as_me:5012: result: $with_shared_cxx" >&5
5013 echo "${ECHO_T}$with_shared_cxx" >&6
5014 fi
5015 fi
5016
5017 ###############################################################################
5018
5019 echo "$as_me:5019: checking for specified models" >&5
5020 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5021 test -z "$cf_list_models" && cf_list_models=normal
5022 test "$with_libtool" != "no" && cf_list_models=libtool
5023 echo "$as_me:5023: result: $cf_list_models" >&5
5024 echo "${ECHO_T}$cf_list_models" >&6
5025
5026 ### Use the first model as the default, and save its suffix for use in building
5027 ### up test-applications.
5028 echo "$as_me:5028: checking for default model" >&5
5029 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5030 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5031 echo "$as_me:5031: result: $DFT_LWR_MODEL" >&5
5032 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5033
5034 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5035
5036 TICS_NAME=tic
5037
5038 TINFO_NAME=tinfo
5039
5040 LIB_NAME=ncurses
5041
5042 LIB_DIR=../lib
5043 LIB_2ND=../../lib
5044
5045 echo "$as_me:5045: checking if you want to have a library-prefix" >&5
5046 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5047
5048 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5049 if test "${with_lib_prefix+set}" = set; then
5050   withval="$with_lib_prefix"
5051   with_lib_prefix=$withval
5052 else
5053   with_lib_prefix=auto
5054 fi;
5055 echo "$as_me:5055: result: $with_lib_prefix" >&5
5056 echo "${ECHO_T}$with_lib_prefix" >&6
5057
5058 if test $with_lib_prefix = auto
5059 then
5060
5061         case $cf_cv_system_name in
5062         (OS/2*|os2*)
5063                 LIB_PREFIX=''
5064                 ;;
5065         (*)     LIB_PREFIX='lib'
5066                 ;;
5067         esac
5068 cf_prefix=$LIB_PREFIX
5069
5070 elif test $with_lib_prefix = no
5071 then
5072         LIB_PREFIX=
5073 else
5074         LIB_PREFIX=$with_lib_prefix
5075 fi
5076
5077 LIB_SUFFIX=
5078
5079         echo "$as_me:5079: checking for PATH separator" >&5
5080 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5081         case $cf_cv_system_name in
5082         (os2*)  PATH_SEPARATOR=';'  ;;
5083         (*)     ${PATH_SEPARATOR:=':'}  ;;
5084         esac
5085
5086         echo "$as_me:5086: result: $PATH_SEPARATOR" >&5
5087 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5088
5089 ###############################################################################
5090
5091 echo "$as_me:5091: checking if you want to build a separate terminfo library" >&5
5092 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5093
5094 # Check whether --with-termlib or --without-termlib was given.
5095 if test "${with_termlib+set}" = set; then
5096   withval="$with_termlib"
5097   with_termlib=$withval
5098 else
5099   with_termlib=no
5100 fi;
5101 echo "$as_me:5101: result: $with_termlib" >&5
5102 echo "${ECHO_T}$with_termlib" >&6
5103
5104 echo "$as_me:5104: checking if you want to build a separate tic library" >&5
5105 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5106
5107 # Check whether --with-ticlib or --without-ticlib was given.
5108 if test "${with_ticlib+set}" = set; then
5109   withval="$with_ticlib"
5110   with_ticlib=$withval
5111 else
5112   with_ticlib=no
5113 fi;
5114 echo "$as_me:5114: result: $with_ticlib" >&5
5115 echo "${ECHO_T}$with_ticlib" >&6
5116
5117 ### Checks for special libraries, must be done up-front.
5118 SHLIB_LIST=""
5119
5120 echo "$as_me:5120: checking if you want to link with the GPM mouse library" >&5
5121 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5122
5123 # Check whether --with-gpm or --without-gpm was given.
5124 if test "${with_gpm+set}" = set; then
5125   withval="$with_gpm"
5126   with_gpm=$withval
5127 else
5128   with_gpm=maybe
5129 fi;
5130 echo "$as_me:5130: result: $with_gpm" >&5
5131 echo "${ECHO_T}$with_gpm" >&6
5132
5133 if test "$with_gpm" != no ; then
5134         echo "$as_me:5134: checking for gpm.h" >&5
5135 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5136 if test "${ac_cv_header_gpm_h+set}" = set; then
5137   echo $ECHO_N "(cached) $ECHO_C" >&6
5138 else
5139   cat >conftest.$ac_ext <<_ACEOF
5140 #line 5140 "configure"
5141 #include "confdefs.h"
5142 #include <gpm.h>
5143 _ACEOF
5144 if { (eval echo "$as_me:5144: \"$ac_cpp conftest.$ac_ext\"") >&5
5145   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5146   ac_status=$?
5147   egrep -v '^ *\+' conftest.er1 >conftest.err
5148   rm -f conftest.er1
5149   cat conftest.err >&5
5150   echo "$as_me:5150: \$? = $ac_status" >&5
5151   (exit $ac_status); } >/dev/null; then
5152   if test -s conftest.err; then
5153     ac_cpp_err=$ac_c_preproc_warn_flag
5154   else
5155     ac_cpp_err=
5156   fi
5157 else
5158   ac_cpp_err=yes
5159 fi
5160 if test -z "$ac_cpp_err"; then
5161   ac_cv_header_gpm_h=yes
5162 else
5163   echo "$as_me: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   ac_cv_header_gpm_h=no
5166 fi
5167 rm -f conftest.err conftest.$ac_ext
5168 fi
5169 echo "$as_me:5169: result: $ac_cv_header_gpm_h" >&5
5170 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5171 if test $ac_cv_header_gpm_h = yes; then
5172
5173 cat >>confdefs.h <<\EOF
5174 #define HAVE_GPM_H 1
5175 EOF
5176
5177                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5178                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5179
5180 echo "${as_me:-configure}:5180: testing assuming we really have GPM library ..." 1>&5
5181
5182 cat >>confdefs.h <<\EOF
5183 #define HAVE_LIBGPM 1
5184 EOF
5185
5186                 else
5187                         echo "$as_me:5187: checking for Gpm_Open in -lgpm" >&5
5188 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5189 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5190   echo $ECHO_N "(cached) $ECHO_C" >&6
5191 else
5192   ac_check_lib_save_LIBS=$LIBS
5193 LIBS="-lgpm  $LIBS"
5194 cat >conftest.$ac_ext <<_ACEOF
5195 #line 5195 "configure"
5196 #include "confdefs.h"
5197
5198 /* Override any gcc2 internal prototype to avoid an error.  */
5199 #ifdef __cplusplus
5200 extern "C"
5201 #endif
5202 /* We use char because int might match the return type of a gcc2
5203    builtin and then its argument prototype would still apply.  */
5204 char Gpm_Open ();
5205 int
5206 main ()
5207 {
5208 Gpm_Open ();
5209   ;
5210   return 0;
5211 }
5212 _ACEOF
5213 rm -f conftest.$ac_objext conftest$ac_exeext
5214 if { (eval echo "$as_me:5214: \"$ac_link\"") >&5
5215   (eval $ac_link) 2>&5
5216   ac_status=$?
5217   echo "$as_me:5217: \$? = $ac_status" >&5
5218   (exit $ac_status); } &&
5219          { ac_try='test -s conftest$ac_exeext'
5220   { (eval echo "$as_me:5220: \"$ac_try\"") >&5
5221   (eval $ac_try) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); }; }; then
5225   ac_cv_lib_gpm_Gpm_Open=yes
5226 else
5227   echo "$as_me: failed program was:" >&5
5228 cat conftest.$ac_ext >&5
5229 ac_cv_lib_gpm_Gpm_Open=no
5230 fi
5231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5232 LIBS=$ac_check_lib_save_LIBS
5233 fi
5234 echo "$as_me:5234: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5235 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5236 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5237   :
5238 else
5239
5240                                 { { echo "$as_me:5240: error: Cannot link with GPM library" >&5
5241 echo "$as_me: error: Cannot link with GPM library" >&2;}
5242    { (exit 1); exit 1; }; }
5243                 fi
5244                 with_gpm=yes
5245
5246 fi
5247
5248 else
5249
5250                 test "$with_gpm" != maybe && { echo "$as_me:5250: WARNING: Cannot find GPM header" >&5
5251 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5252                 with_gpm=no
5253
5254 fi
5255
5256 fi
5257
5258 if test "$with_gpm" != no ; then
5259         echo "$as_me:5259: checking if you want to load GPM dynamically" >&5
5260 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5261
5262 # Check whether --with-dlsym or --without-dlsym was given.
5263 if test "${with_dlsym+set}" = set; then
5264   withval="$with_dlsym"
5265   with_dlsym=$withval
5266 else
5267   with_dlsym=yes
5268 fi;
5269         echo "$as_me:5269: result: $with_dlsym" >&5
5270 echo "${ECHO_T}$with_dlsym" >&6
5271         if test "x$with_dlsym" = xyes ; then
5272
5273 cf_have_dlsym=no
5274 echo "$as_me:5274: checking for dlsym" >&5
5275 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5276 if test "${ac_cv_func_dlsym+set}" = set; then
5277   echo $ECHO_N "(cached) $ECHO_C" >&6
5278 else
5279   cat >conftest.$ac_ext <<_ACEOF
5280 #line 5280 "configure"
5281 #include "confdefs.h"
5282 /* System header to define __stub macros and hopefully few prototypes,
5283     which can conflict with char dlsym (); below.  */
5284 #include <assert.h>
5285 /* Override any gcc2 internal prototype to avoid an error.  */
5286 #ifdef __cplusplus
5287 extern "C"
5288 #endif
5289 /* We use char because int might match the return type of a gcc2
5290    builtin and then its argument prototype would still apply.  */
5291 char dlsym ();
5292 char (*f) ();
5293
5294 int
5295 main ()
5296 {
5297 /* The GNU C library defines this for functions which it implements
5298     to always fail with ENOSYS.  Some functions are actually named
5299     something starting with __ and the normal name is an alias.  */
5300 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5301 choke me
5302 #else
5303 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5304 #endif
5305
5306   ;
5307   return 0;
5308 }
5309 _ACEOF
5310 rm -f conftest.$ac_objext conftest$ac_exeext
5311 if { (eval echo "$as_me:5311: \"$ac_link\"") >&5
5312   (eval $ac_link) 2>&5
5313   ac_status=$?
5314   echo "$as_me:5314: \$? = $ac_status" >&5
5315   (exit $ac_status); } &&
5316          { ac_try='test -s conftest$ac_exeext'
5317   { (eval echo "$as_me:5317: \"$ac_try\"") >&5
5318   (eval $ac_try) 2>&5
5319   ac_status=$?
5320   echo "$as_me:5320: \$? = $ac_status" >&5
5321   (exit $ac_status); }; }; then
5322   ac_cv_func_dlsym=yes
5323 else
5324   echo "$as_me: failed program was:" >&5
5325 cat conftest.$ac_ext >&5
5326 ac_cv_func_dlsym=no
5327 fi
5328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5329 fi
5330 echo "$as_me:5330: result: $ac_cv_func_dlsym" >&5
5331 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5332 if test $ac_cv_func_dlsym = yes; then
5333   cf_have_dlsym=yes
5334 else
5335
5336 cf_have_libdl=no
5337 echo "$as_me:5337: checking for dlsym in -ldl" >&5
5338 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5339 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5340   echo $ECHO_N "(cached) $ECHO_C" >&6
5341 else
5342   ac_check_lib_save_LIBS=$LIBS
5343 LIBS="-ldl  $LIBS"
5344 cat >conftest.$ac_ext <<_ACEOF
5345 #line 5345 "configure"
5346 #include "confdefs.h"
5347
5348 /* Override any gcc2 internal prototype to avoid an error.  */
5349 #ifdef __cplusplus
5350 extern "C"
5351 #endif
5352 /* We use char because int might match the return type of a gcc2
5353    builtin and then its argument prototype would still apply.  */
5354 char dlsym ();
5355 int
5356 main ()
5357 {
5358 dlsym ();
5359   ;
5360   return 0;
5361 }
5362 _ACEOF
5363 rm -f conftest.$ac_objext conftest$ac_exeext
5364 if { (eval echo "$as_me:5364: \"$ac_link\"") >&5
5365   (eval $ac_link) 2>&5
5366   ac_status=$?
5367   echo "$as_me:5367: \$? = $ac_status" >&5
5368   (exit $ac_status); } &&
5369          { ac_try='test -s conftest$ac_exeext'
5370   { (eval echo "$as_me:5370: \"$ac_try\"") >&5
5371   (eval $ac_try) 2>&5
5372   ac_status=$?
5373   echo "$as_me:5373: \$? = $ac_status" >&5
5374   (exit $ac_status); }; }; then
5375   ac_cv_lib_dl_dlsym=yes
5376 else
5377   echo "$as_me: failed program was:" >&5
5378 cat conftest.$ac_ext >&5
5379 ac_cv_lib_dl_dlsym=no
5380 fi
5381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5382 LIBS=$ac_check_lib_save_LIBS
5383 fi
5384 echo "$as_me:5384: result: $ac_cv_lib_dl_dlsym" >&5
5385 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5386 if test $ac_cv_lib_dl_dlsym = yes; then
5387
5388         cf_have_dlsym=yes
5389         cf_have_libdl=yes
5390 fi
5391
5392 fi
5393
5394 if test "$cf_have_dlsym" = yes ; then
5395         test "$cf_have_libdl" = yes &&
5396 cf_add_libs="-ldl"
5397 # Filter out duplicates - this happens with badly-designed ".pc" files...
5398 for cf_add_1lib in $LIBS
5399 do
5400         for cf_add_2lib in $cf_add_libs
5401         do
5402                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5403                 then
5404                         cf_add_1lib=
5405                         break
5406                 fi
5407         done
5408         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5409 done
5410 LIBS="$cf_add_libs"
5411
5412         echo "$as_me:5412: checking whether able to link to dl*() functions" >&5
5413 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5414         cat >conftest.$ac_ext <<_ACEOF
5415 #line 5415 "configure"
5416 #include "confdefs.h"
5417 #include <dlfcn.h>
5418 int
5419 main ()
5420 {
5421
5422                 void *obj;
5423                 if ((obj = dlopen("filename", 0)) != 0) {
5424                         if (dlsym(obj, "symbolname") == 0) {
5425                         dlclose(obj);
5426                         }
5427                 }
5428   ;
5429   return 0;
5430 }
5431 _ACEOF
5432 rm -f conftest.$ac_objext conftest$ac_exeext
5433 if { (eval echo "$as_me:5433: \"$ac_link\"") >&5
5434   (eval $ac_link) 2>&5
5435   ac_status=$?
5436   echo "$as_me:5436: \$? = $ac_status" >&5
5437   (exit $ac_status); } &&
5438          { ac_try='test -s conftest$ac_exeext'
5439   { (eval echo "$as_me:5439: \"$ac_try\"") >&5
5440   (eval $ac_try) 2>&5
5441   ac_status=$?
5442   echo "$as_me:5442: \$? = $ac_status" >&5
5443   (exit $ac_status); }; }; then
5444
5445 cat >>confdefs.h <<\EOF
5446 #define HAVE_LIBDL 1
5447 EOF
5448
5449 else
5450   echo "$as_me: failed program was:" >&5
5451 cat conftest.$ac_ext >&5
5452
5453                 { { echo "$as_me:5453: error: Cannot link test program for libdl" >&5
5454 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5455    { (exit 1); exit 1; }; }
5456 fi
5457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5458         echo "$as_me:5458: result: ok" >&5
5459 echo "${ECHO_T}ok" >&6
5460 else
5461         { { echo "$as_me:5461: error: Cannot find dlsym function" >&5
5462 echo "$as_me: error: Cannot find dlsym function" >&2;}
5463    { (exit 1); exit 1; }; }
5464 fi
5465
5466                 if test "x$with_gpm" != xyes ; then
5467                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5468
5469 echo "${as_me:-configure}:5469: testing assuming soname for gpm is $with_gpm ..." 1>&5
5470
5471                         cf_cv_gpm_soname="$with_gpm"
5472                 else
5473
5474 echo "$as_me:5474: checking for soname of gpm library" >&5
5475 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5476 if test "${cf_cv_gpm_soname+set}" = set; then
5477   echo $ECHO_N "(cached) $ECHO_C" >&6
5478 else
5479
5480 cf_cv_gpm_soname=unknown
5481 if test "$cross_compiling" != yes ; then
5482 cat >conftest.$ac_ext <<CF_EOF
5483 #include <gpm.h>
5484 int main()
5485 {
5486 if (Gpm_Open(0,0)) Gpm_Close();
5487         ${cf_cv_main_return:-return}(0);
5488 }
5489 CF_EOF
5490 cf_save_LIBS="$LIBS"
5491
5492 cf_add_libs="-lgpm"
5493 # Filter out duplicates - this happens with badly-designed ".pc" files...
5494 for cf_add_1lib in $LIBS
5495 do
5496         for cf_add_2lib in $cf_add_libs
5497         do
5498                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5499                 then
5500                         cf_add_1lib=
5501                         break
5502                 fi
5503         done
5504         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5505 done
5506 LIBS="$cf_add_libs"
5507
5508         if { (eval echo "$as_me:5508: \"$ac_compile\"") >&5
5509   (eval $ac_compile) 2>&5
5510   ac_status=$?
5511   echo "$as_me:5511: \$? = $ac_status" >&5
5512   (exit $ac_status); } ; then
5513                 if { (eval echo "$as_me:5513: \"$ac_link\"") >&5
5514   (eval $ac_link) 2>&5
5515   ac_status=$?
5516   echo "$as_me:5516: \$? = $ac_status" >&5
5517   (exit $ac_status); } ; then
5518                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5519                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5520                 fi
5521         fi
5522 rm -rf conftest*
5523 LIBS="$cf_save_LIBS"
5524 fi
5525
5526 fi
5527 echo "$as_me:5527: result: $cf_cv_gpm_soname" >&5
5528 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5529
5530                 fi
5531                 test "$cf_cv_gpm_soname" != "unknown" &&
5532 cat >>confdefs.h <<EOF
5533 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5534 EOF
5535
5536                 SHLIB_LIST="-ldl $SHLIB_LIST"
5537         else
5538                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5539
5540 cf_add_libs="-lgpm"
5541 # Filter out duplicates - this happens with badly-designed ".pc" files...
5542 for cf_add_1lib in $TEST_LIBS
5543 do
5544         for cf_add_2lib in $cf_add_libs
5545         do
5546                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5547                 then
5548                         cf_add_1lib=
5549                         break
5550                 fi
5551         done
5552         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5553 done
5554 TEST_LIBS="$cf_add_libs"
5555
5556         fi
5557
5558 cat >>confdefs.h <<\EOF
5559 #define HAVE_LIBGPM 1
5560 EOF
5561
5562 echo "$as_me:5562: checking for Gpm_Wgetch in -lgpm" >&5
5563 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5564 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5565   echo $ECHO_N "(cached) $ECHO_C" >&6
5566 else
5567   ac_check_lib_save_LIBS=$LIBS
5568 LIBS="-lgpm  $LIBS"
5569 cat >conftest.$ac_ext <<_ACEOF
5570 #line 5570 "configure"
5571 #include "confdefs.h"
5572
5573 /* Override any gcc2 internal prototype to avoid an error.  */
5574 #ifdef __cplusplus
5575 extern "C"
5576 #endif
5577 /* We use char because int might match the return type of a gcc2
5578    builtin and then its argument prototype would still apply.  */
5579 char Gpm_Wgetch ();
5580 int
5581 main ()
5582 {
5583 Gpm_Wgetch ();
5584   ;
5585   return 0;
5586 }
5587 _ACEOF
5588 rm -f conftest.$ac_objext conftest$ac_exeext
5589 if { (eval echo "$as_me:5589: \"$ac_link\"") >&5
5590   (eval $ac_link) 2>&5
5591   ac_status=$?
5592   echo "$as_me:5592: \$? = $ac_status" >&5
5593   (exit $ac_status); } &&
5594          { ac_try='test -s conftest$ac_exeext'
5595   { (eval echo "$as_me:5595: \"$ac_try\"") >&5
5596   (eval $ac_try) 2>&5
5597   ac_status=$?
5598   echo "$as_me:5598: \$? = $ac_status" >&5
5599   (exit $ac_status); }; }; then
5600   ac_cv_lib_gpm_Gpm_Wgetch=yes
5601 else
5602   echo "$as_me: failed program was:" >&5
5603 cat conftest.$ac_ext >&5
5604 ac_cv_lib_gpm_Gpm_Wgetch=no
5605 fi
5606 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5607 LIBS=$ac_check_lib_save_LIBS
5608 fi
5609 echo "$as_me:5609: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5610 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5611 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5612
5613 echo "$as_me:5613: checking if GPM is weakly bound to curses library" >&5
5614 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5615 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5616   echo $ECHO_N "(cached) $ECHO_C" >&6
5617 else
5618
5619 cf_cv_check_gpm_wgetch=unknown
5620 if test "$cross_compiling" != yes ; then
5621
5622 cat >conftest.$ac_ext <<CF_EOF
5623 #include <gpm.h>
5624 int main()
5625 {
5626         Gpm_Wgetch();
5627         ${cf_cv_main_return:-return}(0);
5628 }
5629 CF_EOF
5630
5631         cf_save_LIBS="$LIBS"
5632         # This only works if we can look at the symbol table.  If a shared
5633         # library is stripped for install, we cannot use that.  So we're forced
5634         # to rely on the static library, noting that some packagers may not
5635         # include it.
5636         LIBS="-static -lgpm -dynamic $LIBS"
5637         if { (eval echo "$as_me:5637: \"$ac_compile\"") >&5
5638   (eval $ac_compile) 2>&5
5639   ac_status=$?
5640   echo "$as_me:5640: \$? = $ac_status" >&5
5641   (exit $ac_status); } ; then
5642                 if { (eval echo "$as_me:5642: \"$ac_link\"") >&5
5643   (eval $ac_link) 2>&5
5644   ac_status=$?
5645   echo "$as_me:5645: \$? = $ac_status" >&5
5646   (exit $ac_status); } ; then
5647                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5648                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5649                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5650                 fi
5651         fi
5652         rm -rf conftest*
5653         LIBS="$cf_save_LIBS"
5654 fi
5655
5656 fi
5657 echo "$as_me:5657: result: $cf_cv_check_gpm_wgetch" >&5
5658 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5659
5660 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5661         { echo "$as_me:5661: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5662 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5663 fi
5664
5665 fi
5666
5667 fi
5668
5669 # not everyone has "test -c"
5670 if test -c /dev/sysmouse 2>/dev/null ; then
5671 echo "$as_me:5671: checking if you want to use sysmouse" >&5
5672 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5673
5674 # Check whether --with-sysmouse or --without-sysmouse was given.
5675 if test "${with_sysmouse+set}" = set; then
5676   withval="$with_sysmouse"
5677   cf_with_sysmouse=$withval
5678 else
5679   cf_with_sysmouse=maybe
5680 fi;
5681         if test "$cf_with_sysmouse" != no ; then
5682         cat >conftest.$ac_ext <<_ACEOF
5683 #line 5683 "configure"
5684 #include "confdefs.h"
5685
5686 #include <osreldate.h>
5687 #if (__FreeBSD_version >= 400017)
5688 #include <sys/consio.h>
5689 #include <sys/fbio.h>
5690 #else
5691 #include <machine/console.h>
5692 #endif
5693
5694 int
5695 main ()
5696 {
5697
5698         struct mouse_info the_mouse;
5699         ioctl(0, CONS_MOUSECTL, &the_mouse);
5700
5701   ;
5702   return 0;
5703 }
5704 _ACEOF
5705 rm -f conftest.$ac_objext
5706 if { (eval echo "$as_me:5706: \"$ac_compile\"") >&5
5707   (eval $ac_compile) 2>&5
5708   ac_status=$?
5709   echo "$as_me:5709: \$? = $ac_status" >&5
5710   (exit $ac_status); } &&
5711          { ac_try='test -s conftest.$ac_objext'
5712   { (eval echo "$as_me:5712: \"$ac_try\"") >&5
5713   (eval $ac_try) 2>&5
5714   ac_status=$?
5715   echo "$as_me:5715: \$? = $ac_status" >&5
5716   (exit $ac_status); }; }; then
5717   cf_with_sysmouse=yes
5718 else
5719   echo "$as_me: failed program was:" >&5
5720 cat conftest.$ac_ext >&5
5721 cf_with_sysmouse=no
5722 fi
5723 rm -f conftest.$ac_objext conftest.$ac_ext
5724         fi
5725 echo "$as_me:5725: result: $cf_with_sysmouse" >&5
5726 echo "${ECHO_T}$cf_with_sysmouse" >&6
5727 test "$cf_with_sysmouse" = yes &&
5728 cat >>confdefs.h <<\EOF
5729 #define USE_SYSMOUSE 1
5730 EOF
5731
5732 fi
5733
5734 if test X"$CC_G_OPT" = X"" ; then
5735         CC_G_OPT='-g'
5736         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5737 fi
5738
5739 if test X"$CXX_G_OPT" = X"" ; then
5740         CXX_G_OPT='-g'
5741         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5742 fi
5743
5744 echo "$as_me:5744: checking for default loader flags" >&5
5745 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5746 case $DFT_LWR_MODEL in
5747 (libtool) LD_MODEL=''   ;;
5748 (normal)  LD_MODEL=''   ;;
5749 (debug)   LD_MODEL=$CC_G_OPT ;;
5750 (profile) LD_MODEL='-pg';;
5751 (shared)  LD_MODEL=''   ;;
5752 esac
5753 echo "$as_me:5753: result: $LD_MODEL" >&5
5754 echo "${ECHO_T}$LD_MODEL" >&6
5755
5756 case $DFT_LWR_MODEL in
5757 (shared)
5758
5759 echo "$as_me:5759: checking if rpath option should be used" >&5
5760 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5761
5762 # Check whether --enable-rpath or --disable-rpath was given.
5763 if test "${enable_rpath+set}" = set; then
5764   enableval="$enable_rpath"
5765   cf_cv_enable_rpath=$enableval
5766 else
5767   cf_cv_enable_rpath=no
5768 fi;
5769 echo "$as_me:5769: result: $cf_cv_enable_rpath" >&5
5770 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5771
5772 echo "$as_me:5772: checking if shared libraries should be relinked during install" >&5
5773 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5774
5775 # Check whether --enable-relink or --disable-relink was given.
5776 if test "${enable_relink+set}" = set; then
5777   enableval="$enable_relink"
5778   cf_cv_do_relink=$enableval
5779 else
5780   cf_cv_do_relink=yes
5781 fi;
5782 echo "$as_me:5782: result: $cf_cv_do_relink" >&5
5783 echo "${ECHO_T}$cf_cv_do_relink" >&6
5784         ;;
5785 esac
5786
5787 # we will build libraries one-level down.
5788 rel_builddir=..
5789
5790 LD_RPATH_OPT=
5791 echo "$as_me:5791: checking for an rpath option" >&5
5792 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5793 case $cf_cv_system_name in
5794 (irix*)
5795         if test "$GCC" = yes; then
5796                 LD_RPATH_OPT="-Wl,-rpath,"
5797         else
5798                 LD_RPATH_OPT="-rpath "
5799         fi
5800         ;;
5801 (linux*|gnu*|k*bsd*-gnu)
5802         LD_RPATH_OPT="-Wl,-rpath,"
5803         ;;
5804 (openbsd[2-9].*|mirbsd*)
5805         LD_RPATH_OPT="-Wl,-rpath,"
5806         ;;
5807 (dragonfly*|freebsd*)
5808         LD_RPATH_OPT="-rpath "
5809         ;;
5810 (netbsd*)
5811         LD_RPATH_OPT="-Wl,-rpath,"
5812         ;;
5813 (osf*|mls+*)
5814         LD_RPATH_OPT="-rpath "
5815         ;;
5816 (solaris2*)
5817         LD_RPATH_OPT="-R"
5818         ;;
5819 (*)
5820         ;;
5821 esac
5822 echo "$as_me:5822: result: $LD_RPATH_OPT" >&5
5823 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5824
5825 case "x$LD_RPATH_OPT" in
5826 (x-R*)
5827         echo "$as_me:5827: checking if we need a space after rpath option" >&5
5828 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5829         cf_save_LIBS="$LIBS"
5830
5831 cf_add_libs="${LD_RPATH_OPT}$libdir"
5832 # Filter out duplicates - this happens with badly-designed ".pc" files...
5833 for cf_add_1lib in $LIBS
5834 do
5835         for cf_add_2lib in $cf_add_libs
5836         do
5837                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5838                 then
5839                         cf_add_1lib=
5840                         break
5841                 fi
5842         done
5843         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5844 done
5845 LIBS="$cf_add_libs"
5846
5847         cat >conftest.$ac_ext <<_ACEOF
5848 #line 5848 "configure"
5849 #include "confdefs.h"
5850
5851 int
5852 main ()
5853 {
5854
5855   ;
5856   return 0;
5857 }
5858 _ACEOF
5859 rm -f conftest.$ac_objext conftest$ac_exeext
5860 if { (eval echo "$as_me:5860: \"$ac_link\"") >&5
5861   (eval $ac_link) 2>&5
5862   ac_status=$?
5863   echo "$as_me:5863: \$? = $ac_status" >&5
5864   (exit $ac_status); } &&
5865          { ac_try='test -s conftest$ac_exeext'
5866   { (eval echo "$as_me:5866: \"$ac_try\"") >&5
5867   (eval $ac_try) 2>&5
5868   ac_status=$?
5869   echo "$as_me:5869: \$? = $ac_status" >&5
5870   (exit $ac_status); }; }; then
5871   cf_rpath_space=no
5872 else
5873   echo "$as_me: failed program was:" >&5
5874 cat conftest.$ac_ext >&5
5875 cf_rpath_space=yes
5876 fi
5877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5878         LIBS="$cf_save_LIBS"
5879         echo "$as_me:5879: result: $cf_rpath_space" >&5
5880 echo "${ECHO_T}$cf_rpath_space" >&6
5881         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5882         ;;
5883 esac
5884
5885         RM_SHARED_OPTS=
5886         LOCAL_LDFLAGS=
5887         LOCAL_LDFLAGS2=
5888         LD_SHARED_OPTS=
5889         INSTALL_LIB="-m 644"
5890         : ${rel_builddir:=.}
5891
5892         shlibdir=$libdir
5893
5894         MAKE_DLLS="#"
5895
5896         cf_cv_do_symlinks=no
5897         cf_ld_rpath_opt=
5898         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5899
5900         echo "$as_me:5900: checking if release/abi version should be used for shared libs" >&5
5901 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5902
5903 # Check whether --with-shlib-version or --without-shlib-version was given.
5904 if test "${with_shlib_version+set}" = set; then
5905   withval="$with_shlib_version"
5906   test -z "$withval" && withval=auto
5907         case $withval in
5908         (yes)
5909                 cf_cv_shlib_version=auto
5910                 ;;
5911         (rel|abi|auto|no)
5912                 cf_cv_shlib_version=$withval
5913                 ;;
5914         (*)
5915                 { { echo "$as_me:5915: error: option value must be one of: rel, abi, auto or no" >&5
5916 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5917    { (exit 1); exit 1; }; }
5918                 ;;
5919         esac
5920
5921 else
5922   cf_cv_shlib_version=auto
5923 fi;
5924         echo "$as_me:5924: result: $cf_cv_shlib_version" >&5
5925 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5926
5927         cf_cv_rm_so_locs=no
5928         cf_try_cflags=
5929
5930         # Some less-capable ports of gcc support only -fpic
5931         CC_SHARED_OPTS=
5932         if test "$GCC" = yes
5933         then
5934                 echo "$as_me:5934: checking which $CC option to use" >&5
5935 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5936                 cf_save_CFLAGS="$CFLAGS"
5937                 for CC_SHARED_OPTS in -fPIC -fpic ''
5938                 do
5939                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5940                         cat >conftest.$ac_ext <<_ACEOF
5941 #line 5941 "configure"
5942 #include "confdefs.h"
5943 #include <stdio.h>
5944 int
5945 main ()
5946 {
5947 int x = 1
5948   ;
5949   return 0;
5950 }
5951 _ACEOF
5952 rm -f conftest.$ac_objext
5953 if { (eval echo "$as_me:5953: \"$ac_compile\"") >&5
5954   (eval $ac_compile) 2>&5
5955   ac_status=$?
5956   echo "$as_me:5956: \$? = $ac_status" >&5
5957   (exit $ac_status); } &&
5958          { ac_try='test -s conftest.$ac_objext'
5959   { (eval echo "$as_me:5959: \"$ac_try\"") >&5
5960   (eval $ac_try) 2>&5
5961   ac_status=$?
5962   echo "$as_me:5962: \$? = $ac_status" >&5
5963   (exit $ac_status); }; }; then
5964   break
5965 else
5966   echo "$as_me: failed program was:" >&5
5967 cat conftest.$ac_ext >&5
5968 fi
5969 rm -f conftest.$ac_objext conftest.$ac_ext
5970                 done
5971                 echo "$as_me:5971: result: $CC_SHARED_OPTS" >&5
5972 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5973                 CFLAGS="$cf_save_CFLAGS"
5974         fi
5975
5976         cf_cv_shlib_version_infix=no
5977
5978         case $cf_cv_system_name in
5979         (aix4.3-9*|aix[5-7]*)
5980                 if test "$GCC" = yes; then
5981                         CC_SHARED_OPTS='-Wl,-brtl'
5982                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5983                 else
5984                         CC_SHARED_OPTS='-brtl'
5985                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5986                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5987                 fi
5988                 ;;
5989         (beos*)
5990                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5991                 ;;
5992         (cygwin*)
5993                 CC_SHARED_OPTS=
5994                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5995                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5996                 cf_cv_shlib_version=cygdll
5997                 cf_cv_shlib_version_infix=cygdll
5998                 shlibdir=$bindir
5999                 MAKE_DLLS=
6000                 cat >mk_shared_lib.sh <<-CF_EOF
6001                 #!/bin/sh
6002                 SHARED_LIB=\$1
6003                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6004                 shift
6005                 cat <<-EOF
6006                 Linking shared library
6007                 ** SHARED_LIB \$SHARED_LIB
6008                 ** IMPORT_LIB \$IMPORT_LIB
6009 EOF
6010                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6011 CF_EOF
6012                 chmod +x mk_shared_lib.sh
6013                 ;;
6014         (msys*)
6015                 CC_SHARED_OPTS=
6016                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6017                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6018                 cf_cv_shlib_version=msysdll
6019                 cf_cv_shlib_version_infix=msysdll
6020                 shlibdir=$bindir
6021                 MAKE_DLLS=
6022                 cat >mk_shared_lib.sh <<-CF_EOF
6023                 #!/bin/sh
6024                 SHARED_LIB=\$1
6025                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6026                 shift
6027                 cat <<-EOF
6028                 Linking shared library
6029                 ** SHARED_LIB \$SHARED_LIB
6030                 ** IMPORT_LIB \$IMPORT_LIB
6031 EOF
6032                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6033 CF_EOF
6034                 chmod +x mk_shared_lib.sh
6035                 ;;
6036         (darwin*)
6037                 cf_try_cflags="no-cpp-precomp"
6038                 CC_SHARED_OPTS="-dynamic"
6039                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6040                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6041                 cf_cv_shlib_version_infix=yes
6042                 echo "$as_me:6042: checking if ld -search_paths_first works" >&5
6043 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6044 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6045   echo $ECHO_N "(cached) $ECHO_C" >&6
6046 else
6047
6048                         cf_save_LDFLAGS=$LDFLAGS
6049                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6050                         cat >conftest.$ac_ext <<_ACEOF
6051 #line 6051 "configure"
6052 #include "confdefs.h"
6053
6054 int
6055 main ()
6056 {
6057 int i;
6058   ;
6059   return 0;
6060 }
6061 _ACEOF
6062 rm -f conftest.$ac_objext conftest$ac_exeext
6063 if { (eval echo "$as_me:6063: \"$ac_link\"") >&5
6064   (eval $ac_link) 2>&5
6065   ac_status=$?
6066   echo "$as_me:6066: \$? = $ac_status" >&5
6067   (exit $ac_status); } &&
6068          { ac_try='test -s conftest$ac_exeext'
6069   { (eval echo "$as_me:6069: \"$ac_try\"") >&5
6070   (eval $ac_try) 2>&5
6071   ac_status=$?
6072   echo "$as_me:6072: \$? = $ac_status" >&5
6073   (exit $ac_status); }; }; then
6074   cf_cv_ldflags_search_paths_first=yes
6075 else
6076   echo "$as_me: failed program was:" >&5
6077 cat conftest.$ac_ext >&5
6078 cf_cv_ldflags_search_paths_first=no
6079 fi
6080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6081                                 LDFLAGS=$cf_save_LDFLAGS
6082 fi
6083 echo "$as_me:6083: result: $cf_cv_ldflags_search_paths_first" >&5
6084 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6085                 if test $cf_cv_ldflags_search_paths_first = yes; then
6086                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6087                 fi
6088                 ;;
6089         (hpux[7-8]*)
6090                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6091                 if test "$GCC" != yes; then
6092                         CC_SHARED_OPTS='+Z'
6093                 fi
6094                 MK_SHARED_LIB='${LD} -b -o $@'
6095                 INSTALL_LIB="-m 555"
6096                 ;;
6097         (hpux*)
6098                 # (tested with gcc 2.7.2 -- I don't have c89)
6099                 if test "$GCC" = yes; then
6100                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6101                 else
6102                         CC_SHARED_OPTS='+Z'
6103                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6104                 fi
6105                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6106                 # HP-UX shared libraries must be executable, and should be
6107                 # readonly to exploit a quirk in the memory manager.
6108                 INSTALL_LIB="-m 555"
6109                 ;;
6110         (interix*)
6111                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6112                 if test "$cf_cv_shlib_version" = rel; then
6113                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6114                 else
6115                         cf_shared_soname='`basename `'
6116                 fi
6117                 CC_SHARED_OPTS=
6118                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6119                 ;;
6120         (irix*)
6121                 if test "$cf_cv_enable_rpath" = yes ; then
6122                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6123                 fi
6124                 # tested with IRIX 5.2 and 'cc'.
6125                 if test "$GCC" != yes; then
6126                         CC_SHARED_OPTS='-KPIC'
6127                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6128                 else
6129                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6130                 fi
6131                 cf_cv_rm_so_locs=yes
6132                 ;;
6133         (linux*|gnu*|k*bsd*-gnu)
6134                 if test "$DFT_LWR_MODEL" = "shared" ; then
6135                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6136                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6137                 fi
6138                 if test "$cf_cv_enable_rpath" = yes ; then
6139                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6140                 fi
6141
6142         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6143         if test "$cf_cv_shlib_version" = rel; then
6144                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6145         else
6146                 cf_cv_shared_soname='`basename $@`'
6147         fi
6148
6149                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6150                 ;;
6151         (mingw*)
6152                 cf_cv_shlib_version=mingw
6153                 cf_cv_shlib_version_infix=mingw
6154                 shlibdir=$bindir
6155                 MAKE_DLLS=
6156                 if test "$DFT_LWR_MODEL" = "shared" ; then
6157                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6158                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6159                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6160                 fi
6161                 CC_SHARED_OPTS=
6162                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6163                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6164                 cat >mk_shared_lib.sh <<-CF_EOF
6165                 #!/bin/sh
6166                 SHARED_LIB=\$1
6167                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6168                 shift
6169                 cat <<-EOF
6170                 Linking shared library
6171                 ** SHARED_LIB \$SHARED_LIB
6172                 ** IMPORT_LIB \$IMPORT_LIB
6173 EOF
6174                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6175 CF_EOF
6176                 chmod +x mk_shared_lib.sh
6177                 ;;
6178         (openbsd[2-9].*|mirbsd*)
6179                 if test "$DFT_LWR_MODEL" = "shared" ; then
6180                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6181                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6182                 fi
6183                 if test "$cf_cv_enable_rpath" = yes ; then
6184                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6185                 fi
6186                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6187
6188         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6189         if test "$cf_cv_shlib_version" = rel; then
6190                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6191         else
6192                 cf_cv_shared_soname='`basename $@`'
6193         fi
6194
6195                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6196                 ;;
6197         (nto-qnx*|openbsd*|freebsd[12].*)
6198                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6199                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6200                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6201                 ;;
6202         (dragonfly*|freebsd*)
6203                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6204                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6205                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6206                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6207                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6208                 fi
6209
6210         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6211         if test "$cf_cv_shlib_version" = rel; then
6212                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6213         else
6214                 cf_cv_shared_soname='`basename $@`'
6215         fi
6216
6217                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6218                 ;;
6219         (netbsd*)
6220                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6221                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6222                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6223                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6224                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6225                         if test "$cf_cv_shlib_version" = auto; then
6226                         if test -f /usr/libexec/ld.elf_so; then
6227                                 cf_cv_shlib_version=abi
6228                         else
6229                                 cf_cv_shlib_version=rel
6230                         fi
6231                         fi
6232
6233         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6234         if test "$cf_cv_shlib_version" = rel; then
6235                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6236         else
6237                 cf_cv_shared_soname='`basename $@`'
6238         fi
6239
6240                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6241                 else
6242                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6243                 fi
6244                 ;;
6245         (osf*|mls+*)
6246                 # tested with OSF/1 V3.2 and 'cc'
6247                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6248                 # link with shared libs).
6249                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6250                 case $host_os in
6251                 (osf4*)
6252                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6253                         ;;
6254                 esac
6255                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6256                 if test "$DFT_LWR_MODEL" = "shared" ; then
6257                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6258                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6259                 fi
6260                 cf_cv_rm_so_locs=yes
6261                 ;;
6262         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6263                 # tested with osr5.0.5
6264                 if test "$GCC" != yes; then
6265                         CC_SHARED_OPTS='-belf -KPIC'
6266                 fi
6267                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6268                 if test "$cf_cv_enable_rpath" = yes ; then
6269                         # only way is to set LD_RUN_PATH but no switch for it
6270                         RUN_PATH=$libdir
6271                 fi
6272                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6273                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6274                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6275                 ;;
6276         (sunos4*)
6277                 # tested with SunOS 4.1.1 and gcc 2.7.0
6278                 if test "$GCC" != yes; then
6279                         CC_SHARED_OPTS='-KPIC'
6280                 fi
6281                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6282                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6283                 ;;
6284         (solaris2*)
6285                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6286                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6287                 if test "$DFT_LWR_MODEL" = "shared" ; then
6288                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6289                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6290                 fi
6291                 if test "$cf_cv_enable_rpath" = yes ; then
6292                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6293                 fi
6294
6295         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6296         if test "$cf_cv_shlib_version" = rel; then
6297                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6298         else
6299                 cf_cv_shared_soname='`basename $@`'
6300         fi
6301
6302                 if test "$GCC" != yes; then
6303                         cf_save_CFLAGS="$CFLAGS"
6304                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6305                         do
6306                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6307                                 cat >conftest.$ac_ext <<_ACEOF
6308 #line 6308 "configure"
6309 #include "confdefs.h"
6310 #include <stdio.h>
6311 int
6312 main ()
6313 {
6314 printf("Hello\n");
6315   ;
6316   return 0;
6317 }
6318 _ACEOF
6319 rm -f conftest.$ac_objext
6320 if { (eval echo "$as_me:6320: \"$ac_compile\"") >&5
6321   (eval $ac_compile) 2>&5
6322   ac_status=$?
6323   echo "$as_me:6323: \$? = $ac_status" >&5
6324   (exit $ac_status); } &&
6325          { ac_try='test -s conftest.$ac_objext'
6326   { (eval echo "$as_me:6326: \"$ac_try\"") >&5
6327   (eval $ac_try) 2>&5
6328   ac_status=$?
6329   echo "$as_me:6329: \$? = $ac_status" >&5
6330   (exit $ac_status); }; }; then
6331   break
6332 else
6333   echo "$as_me: failed program was:" >&5
6334 cat conftest.$ac_ext >&5
6335 fi
6336 rm -f conftest.$ac_objext conftest.$ac_ext
6337                         done
6338                         CFLAGS="$cf_save_CFLAGS"
6339                         CC_SHARED_OPTS=$cf_shared_opts
6340                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6341                 else
6342                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6343                 fi
6344                 ;;
6345         (sysv5uw7*|unix_sv*)
6346                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6347                 if test "$GCC" != yes; then
6348                         CC_SHARED_OPTS='-KPIC'
6349                 fi
6350                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6351                 ;;
6352         (*)
6353                 CC_SHARED_OPTS='unknown'
6354                 MK_SHARED_LIB='echo unknown'
6355                 ;;
6356         esac
6357
6358         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6359         case "$cf_cv_shlib_version" in
6360         (rel|abi)
6361                 case "$MK_SHARED_LIB" in
6362                 (*'-o $@')
6363                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6364                         ;;
6365                 (*)
6366                         { echo "$as_me:6366: WARNING: ignored --with-shlib-version" >&5
6367 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6368                         ;;
6369                 esac
6370                 ;;
6371         esac
6372
6373         if test -n "$cf_try_cflags"
6374         then
6375 cat > conftest.$ac_ext <<EOF
6376 #line 6376 "${as_me:-configure}"
6377 #include <stdio.h>
6378 int main(int argc, char *argv[])
6379 {
6380         printf("hello\n");
6381         return (argv[argc-1] == 0) ;
6382 }
6383 EOF
6384                 cf_save_CFLAGS="$CFLAGS"
6385                 for cf_opt in $cf_try_cflags
6386                 do
6387                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6388                         echo "$as_me:6388: checking if CFLAGS option -$cf_opt works" >&5
6389 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6390                         if { (eval echo "$as_me:6390: \"$ac_compile\"") >&5
6391   (eval $ac_compile) 2>&5
6392   ac_status=$?
6393   echo "$as_me:6393: \$? = $ac_status" >&5
6394   (exit $ac_status); }; then
6395                                 echo "$as_me:6395: result: yes" >&5
6396 echo "${ECHO_T}yes" >&6
6397                                 cf_save_CFLAGS="$CFLAGS"
6398                         else
6399                                 echo "$as_me:6399: result: no" >&5
6400 echo "${ECHO_T}no" >&6
6401                         fi
6402                 done
6403                 CFLAGS="$cf_save_CFLAGS"
6404         fi
6405
6406         # RPATH_LIST is a colon-separated list of directories
6407         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6408         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6409
6410         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6411
6412         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6413
6414 echo "${as_me:-configure}:6414: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6415
6416         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6417
6418 echo "${as_me:-configure}:6418: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6419
6420 for model in $cf_list_models; do
6421         case $model in
6422         (libtool)
6423
6424 echo "$as_me:6424: checking for additional libtool options" >&5
6425 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6426
6427 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6428 if test "${with_libtool_opts+set}" = set; then
6429   withval="$with_libtool_opts"
6430   with_libtool_opts=$withval
6431 else
6432   with_libtool_opts=no
6433 fi;
6434 echo "$as_me:6434: result: $with_libtool_opts" >&5
6435 echo "${ECHO_T}$with_libtool_opts" >&6
6436
6437 case .$with_libtool_opts in
6438 (.yes|.no|.)
6439         ;;
6440 (*)
6441         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6442         ;;
6443 esac
6444
6445 echo "$as_me:6445: checking if exported-symbols file should be used" >&5
6446 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6447
6448 # Check whether --with-export-syms or --without-export-syms was given.
6449 if test "${with_export_syms+set}" = set; then
6450   withval="$with_export_syms"
6451   with_export_syms=$withval
6452 else
6453   with_export_syms=no
6454 fi;
6455 if test "x$with_export_syms" = xyes
6456 then
6457         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6458
6459 fi
6460 echo "$as_me:6460: result: $with_export_syms" >&5
6461 echo "${ECHO_T}$with_export_syms" >&6
6462 if test "x$with_export_syms" != xno
6463 then
6464         EXPORT_SYMS="-export-symbols $with_export_syms"
6465
6466 fi
6467
6468                 ;;
6469         (shared)
6470                 if test "$CC_SHARED_OPTS" = "unknown"; then
6471                         { { echo "$as_me:6471: error: Shared libraries are not supported in this version" >&5
6472 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6473    { (exit 1); exit 1; }; }
6474                 fi
6475
6476 echo "$as_me:6476: checking if versioned-symbols file should be used" >&5
6477 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6478
6479 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6480 if test "${with_versioned_syms+set}" = set; then
6481   withval="$with_versioned_syms"
6482   with_versioned_syms=$withval
6483 else
6484   with_versioned_syms=no
6485 fi;
6486 if test "x$with_versioned_syms" = xyes
6487 then
6488         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6489
6490 fi
6491 echo "$as_me:6491: result: $with_versioned_syms" >&5
6492 echo "${ECHO_T}$with_versioned_syms" >&6
6493
6494 RESULTING_SYMS=
6495 VERSIONED_SYMS=
6496 WILDCARD_SYMS=
6497
6498 if test "x$with_versioned_syms" != xno
6499 then
6500         RESULTING_SYMS=$with_versioned_syms
6501         case "x$MK_SHARED_LIB" in
6502         (*-Wl,*)
6503                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6504                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6505                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6506
6507 echo "${as_me:-configure}:6507: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6508
6509                 ;;
6510         (*-dy\ *)
6511                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6512                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6513                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6514
6515 echo "${as_me:-configure}:6515: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6516
6517                 ;;
6518         (*)
6519                 { echo "$as_me:6519: WARNING: this system does not support versioned-symbols" >&5
6520 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6521                 ;;
6522         esac
6523
6524         # Linux ld can selectively override scope, e.g., of symbols beginning with
6525         # "_" by first declaring some as global, and then using a wildcard to
6526         # declare the others as local.  Some other loaders cannot do this.  Check
6527         # by constructing a (very) simple shared library and inspecting its
6528         # symbols.
6529         if test "x$VERSIONED_SYMS" != "x"
6530         then
6531                 echo "$as_me:6531: checking if wildcards can be used to selectively omit symbols" >&5
6532 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6533                 WILDCARD_SYMS=no
6534
6535                 # make sources
6536                 rm -f conftest.*
6537
6538                 cat >conftest.ver <<EOF
6539 module_1.0 {
6540 global:
6541         globalf1;
6542 local:
6543         localf1;
6544 };
6545 module_2.0 {
6546 global:
6547         globalf2;
6548 local:
6549         localf2;
6550         _*;
6551 } module_1.0;
6552 submodule_1.0 {
6553 global:
6554         subglobalf1;
6555         _ismissing;
6556 local:
6557         sublocalf1;
6558 };
6559 submodule_2.0 {
6560 global:
6561         subglobalf2;
6562 local:
6563         sublocalf2;
6564         _*;
6565 } submodule_1.0;
6566 EOF
6567                 cat >conftest.$ac_ext <<EOF
6568 #line 6568 "configure"
6569 int     _ismissing(void) { return 1; }
6570 int     _localf1(void) { return 1; }
6571 int     _localf2(void) { return 2; }
6572 int     globalf1(void) { return 1; }
6573 int     globalf2(void) { return 2; }
6574 int     _sublocalf1(void) { return 1; }
6575 int     _sublocalf2(void) { return 2; }
6576 int     subglobalf1(void) { return 1; }
6577 int     subglobalf2(void) { return 2; }
6578 EOF
6579                 cat >conftest.mk <<EOF
6580 CC=${CC}
6581 CFLAGS=${CFLAGS}
6582 CPPFLAGS=${CPPFLAGS}
6583 LDFLAGS=${LDFLAGS}
6584 LIBS=${LIBS}
6585 VERSIONED_SYMS=${VERSIONED_SYMS}
6586 RESULTING_SYMS=conftest.ver
6587 MK_SHARED_LIB=${MK_SHARED_LIB}
6588 conftest.so: conftest.$ac_cv_objext
6589                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6590 EOF
6591
6592                 # compile source, make library
6593                 if make -f conftest.mk 2>&5 >/dev/null
6594                 then
6595                         # test for missing symbol
6596                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6597                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6598                 fi
6599                 echo "$as_me:6599: result: $WILDCARD_SYMS" >&5
6600 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6601                 rm -f conftest.*
6602         fi
6603 fi
6604
6605                 ;;
6606         esac
6607 done
6608
6609 # pretend that ncurses==ncursesw==ncursest
6610 echo "$as_me:6610: checking if you want to disable library suffixes" >&5
6611 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6612
6613 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6614 if test "${enable_lib_suffixes+set}" = set; then
6615   enableval="$enable_lib_suffixes"
6616   test "$enableval" != no && enableval=yes
6617   if test "$enableval" != "yes" ; then
6618     disable_lib_suffixes=yes
6619   else
6620     disable_lib_suffixes=no
6621   fi
6622 else
6623   enableval=yes
6624   disable_lib_suffixes=no
6625
6626 fi;
6627 echo "$as_me:6627: result: $disable_lib_suffixes" >&5
6628 echo "${ECHO_T}$disable_lib_suffixes" >&6
6629
6630 ### If we're building with rpath, try to link non-standard libs that way too.
6631 if test "$DFT_LWR_MODEL" = "shared"; then
6632
6633 echo "$as_me:6633: checking if rpath-hack should be disabled" >&5
6634 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6635
6636 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6637 if test "${enable_rpath_hack+set}" = set; then
6638   enableval="$enable_rpath_hack"
6639   test "$enableval" != no && enableval=yes
6640   if test "$enableval" != "yes" ; then
6641     cf_disable_rpath_hack=yes
6642   else
6643     cf_disable_rpath_hack=no
6644   fi
6645 else
6646   enableval=yes
6647   cf_disable_rpath_hack=no
6648
6649 fi;
6650 echo "$as_me:6650: result: $cf_disable_rpath_hack" >&5
6651 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6652 if test "$cf_disable_rpath_hack" = no ; then
6653
6654 echo "$as_me:6654: checking for updated LDFLAGS" >&5
6655 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6656 if test -n "$LD_RPATH_OPT" ; then
6657         echo "$as_me:6657: result: maybe" >&5
6658 echo "${ECHO_T}maybe" >&6
6659
6660         for ac_prog in ldd
6661 do
6662   # Extract the first word of "$ac_prog", so it can be a program name with args.
6663 set dummy $ac_prog; ac_word=$2
6664 echo "$as_me:6664: checking for $ac_word" >&5
6665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6666 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6667   echo $ECHO_N "(cached) $ECHO_C" >&6
6668 else
6669   if test -n "$cf_ldd_prog"; then
6670   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6671 else
6672   ac_save_IFS=$IFS; IFS=$ac_path_separator
6673 ac_dummy="$PATH"
6674 for ac_dir in $ac_dummy; do
6675   IFS=$ac_save_IFS
6676   test -z "$ac_dir" && ac_dir=.
6677   $as_executable_p "$ac_dir/$ac_word" || continue
6678 ac_cv_prog_cf_ldd_prog="$ac_prog"
6679 echo "$as_me:6679: found $ac_dir/$ac_word" >&5
6680 break
6681 done
6682
6683 fi
6684 fi
6685 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6686 if test -n "$cf_ldd_prog"; then
6687   echo "$as_me:6687: result: $cf_ldd_prog" >&5
6688 echo "${ECHO_T}$cf_ldd_prog" >&6
6689 else
6690   echo "$as_me:6690: result: no" >&5
6691 echo "${ECHO_T}no" >&6
6692 fi
6693
6694   test -n "$cf_ldd_prog" && break
6695 done
6696 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6697
6698         cf_rpath_list="/usr/lib /lib"
6699         if test "$cf_ldd_prog" != no
6700         then
6701                 cf_rpath_oops=
6702
6703 cat >conftest.$ac_ext <<_ACEOF
6704 #line 6704 "configure"
6705 #include "confdefs.h"
6706 #include <stdio.h>
6707 int
6708 main ()
6709 {
6710 printf("Hello");
6711   ;
6712   return 0;
6713 }
6714 _ACEOF
6715 rm -f conftest.$ac_objext conftest$ac_exeext
6716 if { (eval echo "$as_me:6716: \"$ac_link\"") >&5
6717   (eval $ac_link) 2>&5
6718   ac_status=$?
6719   echo "$as_me:6719: \$? = $ac_status" >&5
6720   (exit $ac_status); } &&
6721          { ac_try='test -s conftest$ac_exeext'
6722   { (eval echo "$as_me:6722: \"$ac_try\"") >&5
6723   (eval $ac_try) 2>&5
6724   ac_status=$?
6725   echo "$as_me:6725: \$? = $ac_status" >&5
6726   (exit $ac_status); }; }; then
6727   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6728                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6729 else
6730   echo "$as_me: failed program was:" >&5
6731 cat conftest.$ac_ext >&5
6732 fi
6733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6734
6735                 # If we passed the link-test, but get a "not found" on a given library,
6736                 # this could be due to inept reconfiguration of gcc to make it only
6737                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6738                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6739                 # /usr/local libraries.
6740                 if test -n "$cf_rpath_oops"
6741                 then
6742                         for cf_rpath_src in $cf_rpath_oops
6743                         do
6744                                 for cf_rpath_dir in \
6745                                         /usr/local \
6746                                         /usr/pkg \
6747                                         /opt/sfw
6748                                 do
6749                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6750                                         then
6751                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6752
6753 echo "${as_me:-configure}:6753: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6754
6755                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6756                                                 break
6757                                         fi
6758                                 done
6759                         done
6760                 fi
6761         fi
6762
6763         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6764
6765 echo "${as_me:-configure}:6765: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6766
6767 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6768
6769 echo "${as_me:-configure}:6769: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6770
6771 cf_rpath_dst=
6772 for cf_rpath_src in $LDFLAGS
6773 do
6774         case $cf_rpath_src in
6775         (-L*)
6776
6777                 # check if this refers to a directory which we will ignore
6778                 cf_rpath_skip=no
6779                 if test -n "$cf_rpath_list"
6780                 then
6781                         for cf_rpath_item in $cf_rpath_list
6782                         do
6783                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6784                                 then
6785                                         cf_rpath_skip=yes
6786                                         break
6787                                 fi
6788                         done
6789                 fi
6790
6791                 if test "$cf_rpath_skip" = no
6792                 then
6793                         # transform the option
6794                         if test "$LD_RPATH_OPT" = "-R " ; then
6795                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6796                         else
6797                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6798                         fi
6799
6800                         # if we have not already added this, add it now
6801                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6802                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6803                         then
6804                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6805
6806 echo "${as_me:-configure}:6806: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6807
6808                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6809                         fi
6810                 fi
6811                 ;;
6812         esac
6813         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6814 done
6815 LDFLAGS=$cf_rpath_dst
6816
6817 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6818
6819 echo "${as_me:-configure}:6819: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6820
6821 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6822
6823 echo "${as_me:-configure}:6823: testing ...checking LIBS $LIBS ..." 1>&5
6824
6825 cf_rpath_dst=
6826 for cf_rpath_src in $LIBS
6827 do
6828         case $cf_rpath_src in
6829         (-L*)
6830
6831                 # check if this refers to a directory which we will ignore
6832                 cf_rpath_skip=no
6833                 if test -n "$cf_rpath_list"
6834                 then
6835                         for cf_rpath_item in $cf_rpath_list
6836                         do
6837                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6838                                 then
6839                                         cf_rpath_skip=yes
6840                                         break
6841                                 fi
6842                         done
6843                 fi
6844
6845                 if test "$cf_rpath_skip" = no
6846                 then
6847                         # transform the option
6848                         if test "$LD_RPATH_OPT" = "-R " ; then
6849                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6850                         else
6851                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6852                         fi
6853
6854                         # if we have not already added this, add it now
6855                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6856                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6857                         then
6858                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6859
6860 echo "${as_me:-configure}:6860: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6861
6862                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6863                         fi
6864                 fi
6865                 ;;
6866         esac
6867         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6868 done
6869 LIBS=$cf_rpath_dst
6870
6871 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6872
6873 echo "${as_me:-configure}:6873: testing ...checked LIBS $LIBS ..." 1>&5
6874
6875         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6876
6877 echo "${as_me:-configure}:6877: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6878
6879 else
6880         echo "$as_me:6880: result: no" >&5
6881 echo "${ECHO_T}no" >&6
6882 fi
6883
6884 fi
6885
6886 fi
6887
6888 ###############################################################################
6889
6890 ###     use option --with-extra-suffix to append suffix to headers and libraries
6891 echo "$as_me:6891: checking if you wish to append extra suffix to header/library paths" >&5
6892 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6893 EXTRA_SUFFIX=
6894
6895 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6896 if test "${with_extra_suffix+set}" = set; then
6897   withval="$with_extra_suffix"
6898   case x$withval in
6899         (no)
6900                 ;;
6901         (xyes|x)
6902                 EXTRA_SUFFIX=$cf_cv_abi_version
6903                 ;;
6904         (*)
6905                 EXTRA_SUFFIX=$withval
6906                 ;;
6907         esac
6908
6909 fi;
6910 echo "$as_me:6910: result: $EXTRA_SUFFIX" >&5
6911 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6912
6913 ###     use option --disable-overwrite to leave out the link to -lcurses
6914 echo "$as_me:6914: checking if you wish to install ncurses overwriting curses" >&5
6915 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6916
6917 # Check whether --enable-overwrite or --disable-overwrite was given.
6918 if test "${enable_overwrite+set}" = set; then
6919   enableval="$enable_overwrite"
6920   with_overwrite=$enableval
6921 else
6922   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6923 fi;
6924 echo "$as_me:6924: result: $with_overwrite" >&5
6925 echo "${ECHO_T}$with_overwrite" >&6
6926
6927 echo "$as_me:6927: checking if external terminfo-database is used" >&5
6928 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6929
6930 # Check whether --enable-database or --disable-database was given.
6931 if test "${enable_database+set}" = set; then
6932   enableval="$enable_database"
6933   use_database=$enableval
6934 else
6935   use_database=yes
6936 fi;
6937 echo "$as_me:6937: result: $use_database" >&5
6938 echo "${ECHO_T}$use_database" >&6
6939
6940 case $host_os in
6941 (os2*)
6942         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6943         ;;
6944 (*)
6945         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6946         ;;
6947 esac
6948
6949 NCURSES_USE_DATABASE=0
6950 if test "$use_database" != no ; then
6951         NCURSES_USE_DATABASE=1
6952
6953         echo "$as_me:6953: checking which terminfo source-file will be installed" >&5
6954 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6955
6956 # Check whether --with-database or --without-database was given.
6957 if test "${with_database+set}" = set; then
6958   withval="$with_database"
6959   TERMINFO_SRC=$withval
6960 fi;
6961         echo "$as_me:6961: result: $TERMINFO_SRC" >&5
6962 echo "${ECHO_T}$TERMINFO_SRC" >&6
6963
6964         echo "$as_me:6964: checking whether to use hashed database instead of directory/tree" >&5
6965 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6966
6967 # Check whether --with-hashed-db or --without-hashed-db was given.
6968 if test "${with_hashed_db+set}" = set; then
6969   withval="$with_hashed_db"
6970
6971 else
6972   with_hashed_db=no
6973 fi;
6974         echo "$as_me:6974: result: $with_hashed_db" >&5
6975 echo "${ECHO_T}$with_hashed_db" >&6
6976 else
6977         with_hashed_db=no
6978 fi
6979
6980 echo "$as_me:6980: checking for list of fallback descriptions" >&5
6981 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6982
6983 # Check whether --with-fallbacks or --without-fallbacks was given.
6984 if test "${with_fallbacks+set}" = set; then
6985   withval="$with_fallbacks"
6986   with_fallback=$withval
6987 else
6988   with_fallback=
6989 fi;
6990 echo "$as_me:6990: result: $with_fallback" >&5
6991 echo "${ECHO_T}$with_fallback" >&6
6992 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6993
6994 echo "$as_me:6994: checking if you want modern xterm or antique" >&5
6995 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6996
6997 # Check whether --with-xterm-new or --without-xterm-new was given.
6998 if test "${with_xterm_new+set}" = set; then
6999   withval="$with_xterm_new"
7000   with_xterm_new=$withval
7001 else
7002   with_xterm_new=yes
7003 fi;
7004 case $with_xterm_new in
7005 (no) with_xterm_new=xterm-old;;
7006 (*)      with_xterm_new=xterm-new;;
7007 esac
7008 echo "$as_me:7008: result: $with_xterm_new" >&5
7009 echo "${ECHO_T}$with_xterm_new" >&6
7010 WHICH_XTERM=$with_xterm_new
7011
7012 echo "$as_me:7012: checking if xterm backspace sends BS or DEL" >&5
7013 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7014
7015 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7016 if test "${with_xterm_kbs+set}" = set; then
7017   withval="$with_xterm_kbs"
7018   with_xterm_kbs=$withval
7019 else
7020   with_xterm_kbs=BS
7021 fi;
7022 case x$with_xterm_kbs in
7023 (xyes|xno|xBS|xbs|x8)
7024         with_xterm_kbs=BS
7025         ;;
7026 (xDEL|xdel|x127)
7027         with_xterm_kbs=DEL
7028         ;;
7029 (*)
7030         with_xterm_kbs=$withval
7031         ;;
7032 esac
7033 echo "$as_me:7033: result: $with_xterm_kbs" >&5
7034 echo "${ECHO_T}$with_xterm_kbs" >&6
7035 XTERM_KBS=$with_xterm_kbs
7036
7037 MAKE_TERMINFO=
7038 if test "$use_database" = no ; then
7039         TERMINFO="${datadir}/terminfo"
7040         MAKE_TERMINFO="#"
7041 else
7042
7043 echo "$as_me:7043: checking for list of terminfo directories" >&5
7044 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7045
7046 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7047 if test "${with_terminfo_dirs+set}" = set; then
7048   withval="$with_terminfo_dirs"
7049
7050 else
7051   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7052 fi;
7053 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7054 cf_dst_path=
7055 for cf_src_path in $withval
7056 do
7057
7058 if test "x$prefix" != xNONE; then
7059         cf_path_syntax="$prefix"
7060 else
7061         cf_path_syntax="$ac_default_prefix"
7062 fi
7063
7064 case ".$cf_src_path" in
7065 (.\$\(*\)*|.\'*\'*)
7066         ;;
7067 (..|./*|.\\*)
7068         ;;
7069 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7070         ;;
7071 (.\${*prefix}*|.\${*dir}*)
7072         eval cf_src_path="$cf_src_path"
7073         case ".$cf_src_path" in
7074         (.NONE/*)
7075                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7076                 ;;
7077         esac
7078         ;;
7079 (.no|.NONE/*)
7080         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7081         ;;
7082 (*)
7083         { { echo "$as_me:7083: error: expected a pathname, not \"$cf_src_path\"" >&5
7084 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7085    { (exit 1); exit 1; }; }
7086         ;;
7087 esac
7088
7089   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7090   cf_dst_path="${cf_dst_path}${cf_src_path}"
7091 done
7092 IFS="$ac_save_ifs"
7093
7094 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7095 # so we have to check/work around.  We do prefer the result of "eval"...
7096 eval cf_dst_eval="$cf_dst_path"
7097 case "x$cf_dst_eval" in
7098 (xNONE*)
7099         TERMINFO_DIRS=$cf_dst_path
7100         ;;
7101 (*)
7102         TERMINFO_DIRS="$cf_dst_eval"
7103         ;;
7104 esac
7105
7106 echo "$as_me:7106: result: $TERMINFO_DIRS" >&5
7107 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7108 test -n "$TERMINFO_DIRS" &&
7109 cat >>confdefs.h <<EOF
7110 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7111 EOF
7112
7113 echo "$as_me:7113: checking for default terminfo directory" >&5
7114 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7115
7116 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7117 if test "${with_default_terminfo_dir+set}" = set; then
7118   withval="$with_default_terminfo_dir"
7119
7120 else
7121   withval="${TERMINFO:-${datadir}/terminfo}"
7122 fi; if test -n "${datadir}/terminfo" ; then
7123
7124 if test "x$prefix" != xNONE; then
7125         cf_path_syntax="$prefix"
7126 else
7127         cf_path_syntax="$ac_default_prefix"
7128 fi
7129
7130 case ".$withval" in
7131 (.\$\(*\)*|.\'*\'*)
7132         ;;
7133 (..|./*|.\\*)
7134         ;;
7135 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7136         ;;
7137 (.\${*prefix}*|.\${*dir}*)
7138         eval withval="$withval"
7139         case ".$withval" in
7140         (.NONE/*)
7141                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7142                 ;;
7143         esac
7144         ;;
7145 (.no|.NONE/*)
7146         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7147         ;;
7148 (*)
7149         { { echo "$as_me:7149: error: expected a pathname, not \"$withval\"" >&5
7150 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7151    { (exit 1); exit 1; }; }
7152         ;;
7153 esac
7154
7155 fi
7156 eval TERMINFO="$withval"
7157
7158 echo "$as_me:7158: result: $TERMINFO" >&5
7159 echo "${ECHO_T}$TERMINFO" >&6
7160
7161 cat >>confdefs.h <<EOF
7162 #define TERMINFO "$TERMINFO"
7163 EOF
7164
7165 fi
7166
7167 ###     use option --disable-big-core to make tic run on small machines
7168 ###     We need 4Mb, check if we can allocate 50% more than that.
7169 echo "$as_me:7169: checking if big-core option selected" >&5
7170 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7171
7172 # Check whether --enable-big-core or --disable-big-core was given.
7173 if test "${enable_big_core+set}" = set; then
7174   enableval="$enable_big_core"
7175   with_big_core=$enableval
7176 else
7177   if test "$cross_compiling" = yes; then
7178   with_big_core=no
7179 else
7180   cat >conftest.$ac_ext <<_ACEOF
7181 #line 7181 "configure"
7182 #include "confdefs.h"
7183
7184 #include <stdlib.h>
7185 #include <string.h>
7186 int main() {
7187         unsigned long n = 6000000L;
7188         char *s = malloc(n);
7189         if (s != 0)
7190                 s[0] = s[n-1] = 0;
7191         ${cf_cv_main_return:-return}(s == 0);
7192 }
7193 _ACEOF
7194 rm -f conftest$ac_exeext
7195 if { (eval echo "$as_me:7195: \"$ac_link\"") >&5
7196   (eval $ac_link) 2>&5
7197   ac_status=$?
7198   echo "$as_me:7198: \$? = $ac_status" >&5
7199   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7200   { (eval echo "$as_me:7200: \"$ac_try\"") >&5
7201   (eval $ac_try) 2>&5
7202   ac_status=$?
7203   echo "$as_me:7203: \$? = $ac_status" >&5
7204   (exit $ac_status); }; }; then
7205   with_big_core=yes
7206 else
7207   echo "$as_me: program exited with status $ac_status" >&5
7208 echo "$as_me: failed program was:" >&5
7209 cat conftest.$ac_ext >&5
7210 with_big_core=no
7211 fi
7212 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7213 fi
7214 fi;
7215 echo "$as_me:7215: result: $with_big_core" >&5
7216 echo "${ECHO_T}$with_big_core" >&6
7217 test "x$with_big_core" = "xyes" &&
7218 cat >>confdefs.h <<\EOF
7219 #define HAVE_BIG_CORE 1
7220 EOF
7221
7222 ### ISO C only guarantees 512-char strings, we have tables which load faster
7223 ### when constructed using "big" strings.  More than the C compiler, the awk
7224 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7225 echo "$as_me:7225: checking if big-strings option selected" >&5
7226 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7227
7228 # Check whether --enable-big-strings or --disable-big-strings was given.
7229 if test "${enable_big_strings+set}" = set; then
7230   enableval="$enable_big_strings"
7231   with_big_strings=$enableval
7232 else
7233
7234         case x$AWK in
7235         (x)
7236                 eval with_big_strings=no
7237                 ;;
7238         (*)
7239                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7240                         | $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
7241                         eval with_big_strings=yes
7242                 else
7243                         eval with_big_strings=no
7244                 fi
7245                 ;;
7246         esac
7247
7248 fi;
7249 echo "$as_me:7249: result: $with_big_strings" >&5
7250 echo "${ECHO_T}$with_big_strings" >&6
7251
7252 USE_BIG_STRINGS=0
7253 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7254
7255 ###     use option --enable-termcap to compile in the termcap fallback support
7256 echo "$as_me:7256: checking if you want termcap-fallback support" >&5
7257 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7258
7259 # Check whether --enable-termcap or --disable-termcap was given.
7260 if test "${enable_termcap+set}" = set; then
7261   enableval="$enable_termcap"
7262   with_termcap=$enableval
7263 else
7264   with_termcap=no
7265 fi;
7266 echo "$as_me:7266: result: $with_termcap" >&5
7267 echo "${ECHO_T}$with_termcap" >&6
7268
7269 NCURSES_USE_TERMCAP=0
7270 if test "x$with_termcap" != "xyes" ; then
7271         if test "$use_database" = no ; then
7272                 if test -z "$with_fallback" ; then
7273                         { { echo "$as_me:7273: error: You have disabled the database w/o specifying fallbacks" >&5
7274 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7275    { (exit 1); exit 1; }; }
7276                 fi
7277         fi
7278
7279 cat >>confdefs.h <<\EOF
7280 #define PURE_TERMINFO 1
7281 EOF
7282
7283 else
7284
7285         if test "$with_ticlib" != no ; then
7286                 { { echo "$as_me:7286: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7287 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7288    { (exit 1); exit 1; }; }
7289         fi
7290
7291         NCURSES_USE_TERMCAP=1
7292         echo "$as_me:7292: checking for list of termcap files" >&5
7293 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7294
7295 # Check whether --with-termpath or --without-termpath was given.
7296 if test "${with_termpath+set}" = set; then
7297   withval="$with_termpath"
7298
7299 else
7300   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7301 fi;
7302 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7303 cf_dst_path=
7304 for cf_src_path in $withval
7305 do
7306
7307 if test "x$prefix" != xNONE; then
7308         cf_path_syntax="$prefix"
7309 else
7310         cf_path_syntax="$ac_default_prefix"
7311 fi
7312
7313 case ".$cf_src_path" in
7314 (.\$\(*\)*|.\'*\'*)
7315         ;;
7316 (..|./*|.\\*)
7317         ;;
7318 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7319         ;;
7320 (.\${*prefix}*|.\${*dir}*)
7321         eval cf_src_path="$cf_src_path"
7322         case ".$cf_src_path" in
7323         (.NONE/*)
7324                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7325                 ;;
7326         esac
7327         ;;
7328 (.no|.NONE/*)
7329         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7330         ;;
7331 (*)
7332         { { echo "$as_me:7332: error: expected a pathname, not \"$cf_src_path\"" >&5
7333 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7334    { (exit 1); exit 1; }; }
7335         ;;
7336 esac
7337
7338   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7339   cf_dst_path="${cf_dst_path}${cf_src_path}"
7340 done
7341 IFS="$ac_save_ifs"
7342
7343 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7344 # so we have to check/work around.  We do prefer the result of "eval"...
7345 eval cf_dst_eval="$cf_dst_path"
7346 case "x$cf_dst_eval" in
7347 (xNONE*)
7348         TERMPATH=$cf_dst_path
7349         ;;
7350 (*)
7351         TERMPATH="$cf_dst_eval"
7352         ;;
7353 esac
7354
7355         echo "$as_me:7355: result: $TERMPATH" >&5
7356 echo "${ECHO_T}$TERMPATH" >&6
7357         test -n "$TERMPATH" &&
7358 cat >>confdefs.h <<EOF
7359 #define TERMPATH "$TERMPATH"
7360 EOF
7361
7362         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7363         echo "$as_me:7363: checking if fast termcap-loader is needed" >&5
7364 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7365
7366 # Check whether --enable-getcap or --disable-getcap was given.
7367 if test "${enable_getcap+set}" = set; then
7368   enableval="$enable_getcap"
7369   with_getcap=$enableval
7370 else
7371   with_getcap=no
7372 fi;
7373         echo "$as_me:7373: result: $with_getcap" >&5
7374 echo "${ECHO_T}$with_getcap" >&6
7375         test "x$with_getcap" = "xyes" &&
7376 cat >>confdefs.h <<\EOF
7377 #define USE_GETCAP 1
7378 EOF
7379
7380         echo "$as_me:7380: checking if translated termcaps will be cached in ~/.terminfo" >&5
7381 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7382
7383 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7384 if test "${enable_getcap_cache+set}" = set; then
7385   enableval="$enable_getcap_cache"
7386   with_getcap_cache=$enableval
7387 else
7388   with_getcap_cache=no
7389 fi;
7390         echo "$as_me:7390: result: $with_getcap_cache" >&5
7391 echo "${ECHO_T}$with_getcap_cache" >&6
7392         test "x$with_getcap_cache" = "xyes" &&
7393 cat >>confdefs.h <<\EOF
7394 #define USE_GETCAP_CACHE 1
7395 EOF
7396
7397 fi
7398
7399 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7400 echo "$as_me:7400: checking if ~/.terminfo is wanted" >&5
7401 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7402
7403 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7404 if test "${enable_home_terminfo+set}" = set; then
7405   enableval="$enable_home_terminfo"
7406   with_home_terminfo=$enableval
7407 else
7408   with_home_terminfo=yes
7409 fi;
7410 echo "$as_me:7410: result: $with_home_terminfo" >&5
7411 echo "${ECHO_T}$with_home_terminfo" >&6
7412 test "x$with_home_terminfo" = "xyes" &&
7413 cat >>confdefs.h <<\EOF
7414 #define USE_HOME_TERMINFO 1
7415 EOF
7416
7417 echo "$as_me:7417: checking if you want to use restricted environment when running as root" >&5
7418 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7419
7420 # Check whether --enable-root-environ or --disable-root-environ was given.
7421 if test "${enable_root_environ+set}" = set; then
7422   enableval="$enable_root_environ"
7423   with_root_environ=$enableval
7424 else
7425   with_root_environ=yes
7426 fi;
7427 echo "$as_me:7427: result: $with_root_environ" >&5
7428 echo "${ECHO_T}$with_root_environ" >&6
7429 test "x$with_root_environ" = xyes &&
7430 cat >>confdefs.h <<\EOF
7431 #define USE_ROOT_ENVIRON 1
7432 EOF
7433
7434 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7435 ###   to reduce storage requirements for the terminfo database.
7436
7437 for ac_func in \
7438         remove \
7439         unlink
7440 do
7441 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7442 echo "$as_me:7442: checking for $ac_func" >&5
7443 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7444 if eval "test \"\${$as_ac_var+set}\" = set"; then
7445   echo $ECHO_N "(cached) $ECHO_C" >&6
7446 else
7447   cat >conftest.$ac_ext <<_ACEOF
7448 #line 7448 "configure"
7449 #include "confdefs.h"
7450 /* System header to define __stub macros and hopefully few prototypes,
7451     which can conflict with char $ac_func (); below.  */
7452 #include <assert.h>
7453 /* Override any gcc2 internal prototype to avoid an error.  */
7454 #ifdef __cplusplus
7455 extern "C"
7456 #endif
7457 /* We use char because int might match the return type of a gcc2
7458    builtin and then its argument prototype would still apply.  */
7459 char $ac_func ();
7460 char (*f) ();
7461
7462 int
7463 main ()
7464 {
7465 /* The GNU C library defines this for functions which it implements
7466     to always fail with ENOSYS.  Some functions are actually named
7467     something starting with __ and the normal name is an alias.  */
7468 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7469 choke me
7470 #else
7471 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7472 #endif
7473
7474   ;
7475   return 0;
7476 }
7477 _ACEOF
7478 rm -f conftest.$ac_objext conftest$ac_exeext
7479 if { (eval echo "$as_me:7479: \"$ac_link\"") >&5
7480   (eval $ac_link) 2>&5
7481   ac_status=$?
7482   echo "$as_me:7482: \$? = $ac_status" >&5
7483   (exit $ac_status); } &&
7484          { ac_try='test -s conftest$ac_exeext'
7485   { (eval echo "$as_me:7485: \"$ac_try\"") >&5
7486   (eval $ac_try) 2>&5
7487   ac_status=$?
7488   echo "$as_me:7488: \$? = $ac_status" >&5
7489   (exit $ac_status); }; }; then
7490   eval "$as_ac_var=yes"
7491 else
7492   echo "$as_me: failed program was:" >&5
7493 cat conftest.$ac_ext >&5
7494 eval "$as_ac_var=no"
7495 fi
7496 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7497 fi
7498 echo "$as_me:7498: result: `eval echo '${'$as_ac_var'}'`" >&5
7499 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7500 if test `eval echo '${'$as_ac_var'}'` = yes; then
7501   cat >>confdefs.h <<EOF
7502 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7503 EOF
7504
7505 fi
7506 done
7507
7508 if test "$cross_compiling" = yes ; then
7509
7510 for ac_func in \
7511                 link \
7512                 symlink
7513 do
7514 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7515 echo "$as_me:7515: checking for $ac_func" >&5
7516 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7517 if eval "test \"\${$as_ac_var+set}\" = set"; then
7518   echo $ECHO_N "(cached) $ECHO_C" >&6
7519 else
7520   cat >conftest.$ac_ext <<_ACEOF
7521 #line 7521 "configure"
7522 #include "confdefs.h"
7523 /* System header to define __stub macros and hopefully few prototypes,
7524     which can conflict with char $ac_func (); below.  */
7525 #include <assert.h>
7526 /* Override any gcc2 internal prototype to avoid an error.  */
7527 #ifdef __cplusplus
7528 extern "C"
7529 #endif
7530 /* We use char because int might match the return type of a gcc2
7531    builtin and then its argument prototype would still apply.  */
7532 char $ac_func ();
7533 char (*f) ();
7534
7535 int
7536 main ()
7537 {
7538 /* The GNU C library defines this for functions which it implements
7539     to always fail with ENOSYS.  Some functions are actually named
7540     something starting with __ and the normal name is an alias.  */
7541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7542 choke me
7543 #else
7544 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7545 #endif
7546
7547   ;
7548   return 0;
7549 }
7550 _ACEOF
7551 rm -f conftest.$ac_objext conftest$ac_exeext
7552 if { (eval echo "$as_me:7552: \"$ac_link\"") >&5
7553   (eval $ac_link) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); } &&
7557          { ac_try='test -s conftest$ac_exeext'
7558   { (eval echo "$as_me:7558: \"$ac_try\"") >&5
7559   (eval $ac_try) 2>&5
7560   ac_status=$?
7561   echo "$as_me:7561: \$? = $ac_status" >&5
7562   (exit $ac_status); }; }; then
7563   eval "$as_ac_var=yes"
7564 else
7565   echo "$as_me: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7567 eval "$as_ac_var=no"
7568 fi
7569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7570 fi
7571 echo "$as_me:7571: result: `eval echo '${'$as_ac_var'}'`" >&5
7572 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7573 if test `eval echo '${'$as_ac_var'}'` = yes; then
7574   cat >>confdefs.h <<EOF
7575 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7576 EOF
7577
7578 fi
7579 done
7580
7581 else
7582         echo "$as_me:7582: checking if link/symlink functions work" >&5
7583 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7584 if test "${cf_cv_link_funcs+set}" = set; then
7585   echo $ECHO_N "(cached) $ECHO_C" >&6
7586 else
7587
7588                 cf_cv_link_funcs=
7589                 for cf_func in link symlink ; do
7590                         if test "$cross_compiling" = yes; then
7591
7592                         eval 'ac_cv_func_'$cf_func'=error'
7593 else
7594   cat >conftest.$ac_ext <<_ACEOF
7595 #line 7595 "configure"
7596 #include "confdefs.h"
7597
7598 #include <sys/types.h>
7599 #include <sys/stat.h>
7600 #ifdef HAVE_UNISTD_H
7601 #include <unistd.h>
7602 #endif
7603 int main()
7604 {
7605         int fail = 0;
7606         char *src = "config.log";
7607         char *dst = "conftest.chk";
7608         struct stat src_sb;
7609         struct stat dst_sb;
7610
7611         stat(src, &src_sb);
7612         fail = ($cf_func("config.log", "conftest.chk") < 0)
7613             || (stat(dst, &dst_sb) < 0)
7614             || (dst_sb.st_mtime != src_sb.st_mtime);
7615 #ifdef HAVE_UNLINK
7616         unlink(dst);
7617 #else
7618         remove(dst);
7619 #endif
7620         ${cf_cv_main_return:-return} (fail);
7621 }
7622
7623 _ACEOF
7624 rm -f conftest$ac_exeext
7625 if { (eval echo "$as_me:7625: \"$ac_link\"") >&5
7626   (eval $ac_link) 2>&5
7627   ac_status=$?
7628   echo "$as_me:7628: \$? = $ac_status" >&5
7629   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7630   { (eval echo "$as_me:7630: \"$ac_try\"") >&5
7631   (eval $ac_try) 2>&5
7632   ac_status=$?
7633   echo "$as_me:7633: \$? = $ac_status" >&5
7634   (exit $ac_status); }; }; then
7635
7636                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7637                         eval 'ac_cv_func_'$cf_func'=yes'
7638 else
7639   echo "$as_me: program exited with status $ac_status" >&5
7640 echo "$as_me: failed program was:" >&5
7641 cat conftest.$ac_ext >&5
7642
7643                         eval 'ac_cv_func_'$cf_func'=no'
7644 fi
7645 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7646 fi
7647                 done
7648                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7649
7650 fi
7651 echo "$as_me:7651: result: $cf_cv_link_funcs" >&5
7652 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7653         test "$ac_cv_func_link"    = yes &&
7654 cat >>confdefs.h <<\EOF
7655 #define HAVE_LINK 1
7656 EOF
7657
7658         test "$ac_cv_func_symlink" = yes &&
7659 cat >>confdefs.h <<\EOF
7660 #define HAVE_SYMLINK 1
7661 EOF
7662
7663 fi
7664
7665 with_links=no
7666 with_symlinks=no
7667
7668 # soft links (symbolic links) are useful for some systems where hard links do
7669 # not work, or to make it simpler to copy terminfo trees around.
7670 if test "x$ac_cv_func_symlink" = xyes ; then
7671         echo "$as_me:7671: checking if tic should use symbolic links" >&5
7672 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7673
7674 # Check whether --enable-symlinks or --disable-symlinks was given.
7675 if test "${enable_symlinks+set}" = set; then
7676   enableval="$enable_symlinks"
7677   with_symlinks=$enableval
7678 else
7679   with_symlinks=no
7680 fi;
7681         echo "$as_me:7681: result: $with_symlinks" >&5
7682 echo "${ECHO_T}$with_symlinks" >&6
7683 fi
7684
7685 # If we have hard links and did not choose to use soft links instead, there is
7686 # no reason to make this choice optional - use the hard links.
7687 if test "$with_symlinks" = no ; then
7688         echo "$as_me:7688: checking if tic should use hard links" >&5
7689 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7690         if test "x$ac_cv_func_link" = xyes ; then
7691                 with_links=yes
7692         else
7693                 with_links=no
7694         fi
7695         echo "$as_me:7695: result: $with_links" >&5
7696 echo "${ECHO_T}$with_links" >&6
7697 fi
7698
7699 test "x$with_links" = xyes &&
7700 cat >>confdefs.h <<\EOF
7701 #define USE_LINKS 1
7702 EOF
7703
7704 test "x$with_symlinks" = xyes &&
7705 cat >>confdefs.h <<\EOF
7706 #define USE_SYMLINKS 1
7707 EOF
7708
7709 ###   use option --enable-broken-linker to force on use of broken-linker support
7710 echo "$as_me:7710: checking if you want broken-linker support code" >&5
7711 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7712
7713 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7714 if test "${enable_broken_linker+set}" = set; then
7715   enableval="$enable_broken_linker"
7716   with_broken_linker=$enableval
7717 else
7718   with_broken_linker=${BROKEN_LINKER:-no}
7719 fi;
7720 echo "$as_me:7720: result: $with_broken_linker" >&5
7721 echo "${ECHO_T}$with_broken_linker" >&6
7722
7723 BROKEN_LINKER=0
7724 if test "x$with_broken_linker" = xyes ; then
7725
7726 cat >>confdefs.h <<\EOF
7727 #define BROKEN_LINKER 1
7728 EOF
7729
7730         BROKEN_LINKER=1
7731 elif test "$DFT_LWR_MODEL" = shared ; then
7732         case $cf_cv_system_name in
7733         (cygwin*)
7734
7735 cat >>confdefs.h <<\EOF
7736 #define BROKEN_LINKER 1
7737 EOF
7738
7739                 BROKEN_LINKER=1
7740                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7741
7742 echo "${as_me:-configure}:7742: testing cygwin linker is broken anyway ..." 1>&5
7743
7744                 ;;
7745         esac
7746 fi
7747
7748 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7749 echo "$as_me:7749: checking if tputs should process BSD-style prefix padding" >&5
7750 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7751
7752 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7753 if test "${enable_bsdpad+set}" = set; then
7754   enableval="$enable_bsdpad"
7755   with_bsdpad=$enableval
7756 else
7757   with_bsdpad=no
7758 fi;
7759 echo "$as_me:7759: result: $with_bsdpad" >&5
7760 echo "${ECHO_T}$with_bsdpad" >&6
7761 test "x$with_bsdpad" = xyes &&
7762 cat >>confdefs.h <<\EOF
7763 #define BSD_TPUTS 1
7764 EOF
7765
7766 ###   use option --enable-widec to turn on use of wide-character support
7767 NCURSES_CH_T=chtype
7768 NCURSES_LIBUTF8=0
7769
7770 NEED_WCHAR_H=0
7771 NCURSES_MBSTATE_T=0
7772 NCURSES_WCHAR_T=0
7773 NCURSES_WINT_T=0
7774
7775 # Check to define _XOPEN_SOURCE "automatically"
7776 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7777
7778 cf_XOPEN_SOURCE=500
7779 cf_POSIX_C_SOURCE=199506L
7780 cf_xopen_source=
7781
7782 case $host_os in
7783 (aix[4-7]*)
7784         cf_xopen_source="-D_ALL_SOURCE"
7785         ;;
7786 (cygwin|msys)
7787         cf_XOPEN_SOURCE=600
7788         ;;
7789 (darwin[0-8].*)
7790         cf_xopen_source="-D_APPLE_C_SOURCE"
7791         ;;
7792 (darwin*)
7793         cf_xopen_source="-D_DARWIN_C_SOURCE"
7794         cf_XOPEN_SOURCE=
7795         ;;
7796 (freebsd*|dragonfly*)
7797         # 5.x headers associate
7798         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7799         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7800         cf_POSIX_C_SOURCE=200112L
7801         cf_XOPEN_SOURCE=600
7802         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7803         ;;
7804 (hpux11*)
7805         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7806         ;;
7807 (hpux*)
7808         cf_xopen_source="-D_HPUX_SOURCE"
7809         ;;
7810 (irix[56].*)
7811         cf_xopen_source="-D_SGI_SOURCE"
7812         cf_XOPEN_SOURCE=
7813         ;;
7814 (linux*|gnu*|mint*|k*bsd*-gnu)
7815
7816 echo "$as_me:7816: checking if we must define _GNU_SOURCE" >&5
7817 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7818 if test "${cf_cv_gnu_source+set}" = set; then
7819   echo $ECHO_N "(cached) $ECHO_C" >&6
7820 else
7821
7822 cat >conftest.$ac_ext <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7825 #include <sys/types.h>
7826 int
7827 main ()
7828 {
7829
7830 #ifndef _XOPEN_SOURCE
7831 make an error
7832 #endif
7833   ;
7834   return 0;
7835 }
7836 _ACEOF
7837 rm -f conftest.$ac_objext
7838 if { (eval echo "$as_me:7838: \"$ac_compile\"") >&5
7839   (eval $ac_compile) 2>&5
7840   ac_status=$?
7841   echo "$as_me:7841: \$? = $ac_status" >&5
7842   (exit $ac_status); } &&
7843          { ac_try='test -s conftest.$ac_objext'
7844   { (eval echo "$as_me:7844: \"$ac_try\"") >&5
7845   (eval $ac_try) 2>&5
7846   ac_status=$?
7847   echo "$as_me:7847: \$? = $ac_status" >&5
7848   (exit $ac_status); }; }; then
7849   cf_cv_gnu_source=no
7850 else
7851   echo "$as_me: failed program was:" >&5
7852 cat conftest.$ac_ext >&5
7853 cf_save="$CPPFLAGS"
7854          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7855          cat >conftest.$ac_ext <<_ACEOF
7856 #line 7856 "configure"
7857 #include "confdefs.h"
7858 #include <sys/types.h>
7859 int
7860 main ()
7861 {
7862
7863 #ifdef _XOPEN_SOURCE
7864 make an error
7865 #endif
7866   ;
7867   return 0;
7868 }
7869 _ACEOF
7870 rm -f conftest.$ac_objext
7871 if { (eval echo "$as_me:7871: \"$ac_compile\"") >&5
7872   (eval $ac_compile) 2>&5
7873   ac_status=$?
7874   echo "$as_me:7874: \$? = $ac_status" >&5
7875   (exit $ac_status); } &&
7876          { ac_try='test -s conftest.$ac_objext'
7877   { (eval echo "$as_me:7877: \"$ac_try\"") >&5
7878   (eval $ac_try) 2>&5
7879   ac_status=$?
7880   echo "$as_me:7880: \$? = $ac_status" >&5
7881   (exit $ac_status); }; }; then
7882   cf_cv_gnu_source=no
7883 else
7884   echo "$as_me: failed program was:" >&5
7885 cat conftest.$ac_ext >&5
7886 cf_cv_gnu_source=yes
7887 fi
7888 rm -f conftest.$ac_objext conftest.$ac_ext
7889         CPPFLAGS="$cf_save"
7890
7891 fi
7892 rm -f conftest.$ac_objext conftest.$ac_ext
7893
7894 fi
7895 echo "$as_me:7895: result: $cf_cv_gnu_source" >&5
7896 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7897 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7898
7899         ;;
7900 (minix*)
7901         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7902         ;;
7903 (mirbsd*)
7904         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7905         cf_XOPEN_SOURCE=
7906
7907 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7908
7909 cf_save_CFLAGS="$CFLAGS"
7910 cf_save_CPPFLAGS="$CPPFLAGS"
7911
7912 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7913         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7914                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7915
7916 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7917         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7918                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7919
7920 echo "$as_me:7920: checking if we should define _POSIX_C_SOURCE" >&5
7921 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7922 if test "${cf_cv_posix_c_source+set}" = set; then
7923   echo $ECHO_N "(cached) $ECHO_C" >&6
7924 else
7925
7926 echo "${as_me:-configure}:7926: testing if the symbol is already defined go no further ..." 1>&5
7927
7928         cat >conftest.$ac_ext <<_ACEOF
7929 #line 7929 "configure"
7930 #include "confdefs.h"
7931 #include <sys/types.h>
7932 int
7933 main ()
7934 {
7935
7936 #ifndef _POSIX_C_SOURCE
7937 make an error
7938 #endif
7939   ;
7940   return 0;
7941 }
7942 _ACEOF
7943 rm -f conftest.$ac_objext
7944 if { (eval echo "$as_me:7944: \"$ac_compile\"") >&5
7945   (eval $ac_compile) 2>&5
7946   ac_status=$?
7947   echo "$as_me:7947: \$? = $ac_status" >&5
7948   (exit $ac_status); } &&
7949          { ac_try='test -s conftest.$ac_objext'
7950   { (eval echo "$as_me:7950: \"$ac_try\"") >&5
7951   (eval $ac_try) 2>&5
7952   ac_status=$?
7953   echo "$as_me:7953: \$? = $ac_status" >&5
7954   (exit $ac_status); }; }; then
7955   cf_cv_posix_c_source=no
7956 else
7957   echo "$as_me: failed program was:" >&5
7958 cat conftest.$ac_ext >&5
7959 cf_want_posix_source=no
7960          case .$cf_POSIX_C_SOURCE in
7961          (.[12]??*)
7962                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7963                 ;;
7964          (.2)
7965                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7966                 cf_want_posix_source=yes
7967                 ;;
7968          (.*)
7969                 cf_want_posix_source=yes
7970                 ;;
7971          esac
7972          if test "$cf_want_posix_source" = yes ; then
7973                 cat >conftest.$ac_ext <<_ACEOF
7974 #line 7974 "configure"
7975 #include "confdefs.h"
7976 #include <sys/types.h>
7977 int
7978 main ()
7979 {
7980
7981 #ifdef _POSIX_SOURCE
7982 make an error
7983 #endif
7984   ;
7985   return 0;
7986 }
7987 _ACEOF
7988 rm -f conftest.$ac_objext
7989 if { (eval echo "$as_me:7989: \"$ac_compile\"") >&5
7990   (eval $ac_compile) 2>&5
7991   ac_status=$?
7992   echo "$as_me:7992: \$? = $ac_status" >&5
7993   (exit $ac_status); } &&
7994          { ac_try='test -s conftest.$ac_objext'
7995   { (eval echo "$as_me:7995: \"$ac_try\"") >&5
7996   (eval $ac_try) 2>&5
7997   ac_status=$?
7998   echo "$as_me:7998: \$? = $ac_status" >&5
7999   (exit $ac_status); }; }; then
8000   :
8001 else
8002   echo "$as_me: failed program was:" >&5
8003 cat conftest.$ac_ext >&5
8004 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8005 fi
8006 rm -f conftest.$ac_objext conftest.$ac_ext
8007          fi
8008
8009 echo "${as_me:-configure}:8009: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8010
8011          CFLAGS="$cf_trim_CFLAGS"
8012          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8013
8014 echo "${as_me:-configure}:8014: testing if the second compile does not leave our definition intact error ..." 1>&5
8015
8016          cat >conftest.$ac_ext <<_ACEOF
8017 #line 8017 "configure"
8018 #include "confdefs.h"
8019 #include <sys/types.h>
8020 int
8021 main ()
8022 {
8023
8024 #ifndef _POSIX_C_SOURCE
8025 make an error
8026 #endif
8027   ;
8028   return 0;
8029 }
8030 _ACEOF
8031 rm -f conftest.$ac_objext
8032 if { (eval echo "$as_me:8032: \"$ac_compile\"") >&5
8033   (eval $ac_compile) 2>&5
8034   ac_status=$?
8035   echo "$as_me:8035: \$? = $ac_status" >&5
8036   (exit $ac_status); } &&
8037          { ac_try='test -s conftest.$ac_objext'
8038   { (eval echo "$as_me:8038: \"$ac_try\"") >&5
8039   (eval $ac_try) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit $ac_status); }; }; then
8043   :
8044 else
8045   echo "$as_me: failed program was:" >&5
8046 cat conftest.$ac_ext >&5
8047 cf_cv_posix_c_source=no
8048 fi
8049 rm -f conftest.$ac_objext conftest.$ac_ext
8050          CFLAGS="$cf_save_CFLAGS"
8051          CPPFLAGS="$cf_save_CPPFLAGS"
8052
8053 fi
8054 rm -f conftest.$ac_objext conftest.$ac_ext
8055
8056 fi
8057 echo "$as_me:8057: result: $cf_cv_posix_c_source" >&5
8058 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8059
8060 if test "$cf_cv_posix_c_source" != no ; then
8061         CFLAGS="$cf_trim_CFLAGS"
8062         CPPFLAGS="$cf_trim_CPPFLAGS"
8063
8064 cf_fix_cppflags=no
8065 cf_new_cflags=
8066 cf_new_cppflags=
8067 cf_new_extra_cppflags=
8068
8069 for cf_add_cflags in $cf_cv_posix_c_source
8070 do
8071 case $cf_fix_cppflags in
8072 (no)
8073         case $cf_add_cflags in
8074         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8075                 case $cf_add_cflags in
8076                 (-D*)
8077                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8078
8079                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8080                                 && test -z "${cf_tst_cflags}" \
8081                                 && cf_fix_cppflags=yes
8082
8083                         if test $cf_fix_cppflags = yes ; then
8084                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8085                                 continue
8086                         elif test "${cf_tst_cflags}" = "\"'" ; then
8087                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8088                                 continue
8089                         fi
8090                         ;;
8091                 esac
8092                 case "$CPPFLAGS" in
8093                 (*$cf_add_cflags)
8094                         ;;
8095                 (*)
8096                         case $cf_add_cflags in
8097                         (-D*)
8098                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8099
8100 CPPFLAGS=`echo "$CPPFLAGS" | \
8101         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8102                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8103
8104                                 ;;
8105                         esac
8106                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8107                         ;;
8108                 esac
8109                 ;;
8110         (*)
8111                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8112                 ;;
8113         esac
8114         ;;
8115 (yes)
8116         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8117
8118         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8119
8120         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8121                 && test -z "${cf_tst_cflags}" \
8122                 && cf_fix_cppflags=no
8123         ;;
8124 esac
8125 done
8126
8127 if test -n "$cf_new_cflags" ; then
8128
8129         CFLAGS="$CFLAGS $cf_new_cflags"
8130 fi
8131
8132 if test -n "$cf_new_cppflags" ; then
8133
8134         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8135 fi
8136
8137 if test -n "$cf_new_extra_cppflags" ; then
8138
8139         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8140 fi
8141
8142 fi
8143
8144         ;;
8145 (netbsd*)
8146         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8147         ;;
8148 (openbsd[4-9]*)
8149         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8150         cf_xopen_source="-D_BSD_SOURCE"
8151         cf_XOPEN_SOURCE=600
8152         ;;
8153 (openbsd*)
8154         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8155         ;;
8156 (osf[45]*)
8157         cf_xopen_source="-D_OSF_SOURCE"
8158         ;;
8159 (nto-qnx*)
8160         cf_xopen_source="-D_QNX_SOURCE"
8161         ;;
8162 (sco*)
8163         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8164         ;;
8165 (solaris2.*)
8166         cf_xopen_source="-D__EXTENSIONS__"
8167         cf_cv_xopen_source=broken
8168         ;;
8169 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8170         cf_XOPEN_SOURCE=
8171         cf_POSIX_C_SOURCE=
8172         ;;
8173 (*)
8174
8175 echo "$as_me:8175: checking if we should define _XOPEN_SOURCE" >&5
8176 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8177 if test "${cf_cv_xopen_source+set}" = set; then
8178   echo $ECHO_N "(cached) $ECHO_C" >&6
8179 else
8180
8181         cat >conftest.$ac_ext <<_ACEOF
8182 #line 8182 "configure"
8183 #include "confdefs.h"
8184
8185 #include <stdlib.h>
8186 #include <string.h>
8187 #include <sys/types.h>
8188
8189 int
8190 main ()
8191 {
8192
8193 #ifndef _XOPEN_SOURCE
8194 make an error
8195 #endif
8196   ;
8197   return 0;
8198 }
8199 _ACEOF
8200 rm -f conftest.$ac_objext
8201 if { (eval echo "$as_me:8201: \"$ac_compile\"") >&5
8202   (eval $ac_compile) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); } &&
8206          { ac_try='test -s conftest.$ac_objext'
8207   { (eval echo "$as_me:8207: \"$ac_try\"") >&5
8208   (eval $ac_try) 2>&5
8209   ac_status=$?
8210   echo "$as_me:8210: \$? = $ac_status" >&5
8211   (exit $ac_status); }; }; then
8212   cf_cv_xopen_source=no
8213 else
8214   echo "$as_me: failed program was:" >&5
8215 cat conftest.$ac_ext >&5
8216 cf_save="$CPPFLAGS"
8217          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8218          cat >conftest.$ac_ext <<_ACEOF
8219 #line 8219 "configure"
8220 #include "confdefs.h"
8221
8222 #include <stdlib.h>
8223 #include <string.h>
8224 #include <sys/types.h>
8225
8226 int
8227 main ()
8228 {
8229
8230 #ifdef _XOPEN_SOURCE
8231 make an error
8232 #endif
8233   ;
8234   return 0;
8235 }
8236 _ACEOF
8237 rm -f conftest.$ac_objext
8238 if { (eval echo "$as_me:8238: \"$ac_compile\"") >&5
8239   (eval $ac_compile) 2>&5
8240   ac_status=$?
8241   echo "$as_me:8241: \$? = $ac_status" >&5
8242   (exit $ac_status); } &&
8243          { ac_try='test -s conftest.$ac_objext'
8244   { (eval echo "$as_me:8244: \"$ac_try\"") >&5
8245   (eval $ac_try) 2>&5
8246   ac_status=$?
8247   echo "$as_me:8247: \$? = $ac_status" >&5
8248   (exit $ac_status); }; }; then
8249   cf_cv_xopen_source=no
8250 else
8251   echo "$as_me: failed program was:" >&5
8252 cat conftest.$ac_ext >&5
8253 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8254 fi
8255 rm -f conftest.$ac_objext conftest.$ac_ext
8256         CPPFLAGS="$cf_save"
8257
8258 fi
8259 rm -f conftest.$ac_objext conftest.$ac_ext
8260
8261 fi
8262 echo "$as_me:8262: result: $cf_cv_xopen_source" >&5
8263 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8264
8265 if test "$cf_cv_xopen_source" != no ; then
8266
8267 CFLAGS=`echo "$CFLAGS" | \
8268         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8269                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8270
8271 CPPFLAGS=`echo "$CPPFLAGS" | \
8272         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8273                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8274
8275         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8276
8277 cf_fix_cppflags=no
8278 cf_new_cflags=
8279 cf_new_cppflags=
8280 cf_new_extra_cppflags=
8281
8282 for cf_add_cflags in $cf_temp_xopen_source
8283 do
8284 case $cf_fix_cppflags in
8285 (no)
8286         case $cf_add_cflags in
8287         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8288                 case $cf_add_cflags in
8289                 (-D*)
8290                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8291
8292                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8293                                 && test -z "${cf_tst_cflags}" \
8294                                 && cf_fix_cppflags=yes
8295
8296                         if test $cf_fix_cppflags = yes ; then
8297                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8298                                 continue
8299                         elif test "${cf_tst_cflags}" = "\"'" ; then
8300                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8301                                 continue
8302                         fi
8303                         ;;
8304                 esac
8305                 case "$CPPFLAGS" in
8306                 (*$cf_add_cflags)
8307                         ;;
8308                 (*)
8309                         case $cf_add_cflags in
8310                         (-D*)
8311                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8312
8313 CPPFLAGS=`echo "$CPPFLAGS" | \
8314         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8315                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8316
8317                                 ;;
8318                         esac
8319                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8320                         ;;
8321                 esac
8322                 ;;
8323         (*)
8324                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8325                 ;;
8326         esac
8327         ;;
8328 (yes)
8329         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8330
8331         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8332
8333         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8334                 && test -z "${cf_tst_cflags}" \
8335                 && cf_fix_cppflags=no
8336         ;;
8337 esac
8338 done
8339
8340 if test -n "$cf_new_cflags" ; then
8341
8342         CFLAGS="$CFLAGS $cf_new_cflags"
8343 fi
8344
8345 if test -n "$cf_new_cppflags" ; then
8346
8347         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8348 fi
8349
8350 if test -n "$cf_new_extra_cppflags" ; then
8351
8352         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8353 fi
8354
8355 fi
8356
8357 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8358
8359 cf_save_CFLAGS="$CFLAGS"
8360 cf_save_CPPFLAGS="$CPPFLAGS"
8361
8362 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8363         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8364                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8365
8366 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8367         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8368                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8369
8370 echo "$as_me:8370: checking if we should define _POSIX_C_SOURCE" >&5
8371 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8372 if test "${cf_cv_posix_c_source+set}" = set; then
8373   echo $ECHO_N "(cached) $ECHO_C" >&6
8374 else
8375
8376 echo "${as_me:-configure}:8376: testing if the symbol is already defined go no further ..." 1>&5
8377
8378         cat >conftest.$ac_ext <<_ACEOF
8379 #line 8379 "configure"
8380 #include "confdefs.h"
8381 #include <sys/types.h>
8382 int
8383 main ()
8384 {
8385
8386 #ifndef _POSIX_C_SOURCE
8387 make an error
8388 #endif
8389   ;
8390   return 0;
8391 }
8392 _ACEOF
8393 rm -f conftest.$ac_objext
8394 if { (eval echo "$as_me:8394: \"$ac_compile\"") >&5
8395   (eval $ac_compile) 2>&5
8396   ac_status=$?
8397   echo "$as_me:8397: \$? = $ac_status" >&5
8398   (exit $ac_status); } &&
8399          { ac_try='test -s conftest.$ac_objext'
8400   { (eval echo "$as_me:8400: \"$ac_try\"") >&5
8401   (eval $ac_try) 2>&5
8402   ac_status=$?
8403   echo "$as_me:8403: \$? = $ac_status" >&5
8404   (exit $ac_status); }; }; then
8405   cf_cv_posix_c_source=no
8406 else
8407   echo "$as_me: failed program was:" >&5
8408 cat conftest.$ac_ext >&5
8409 cf_want_posix_source=no
8410          case .$cf_POSIX_C_SOURCE in
8411          (.[12]??*)
8412                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8413                 ;;
8414          (.2)
8415                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8416                 cf_want_posix_source=yes
8417                 ;;
8418          (.*)
8419                 cf_want_posix_source=yes
8420                 ;;
8421          esac
8422          if test "$cf_want_posix_source" = yes ; then
8423                 cat >conftest.$ac_ext <<_ACEOF
8424 #line 8424 "configure"
8425 #include "confdefs.h"
8426 #include <sys/types.h>
8427 int
8428 main ()
8429 {
8430
8431 #ifdef _POSIX_SOURCE
8432 make an error
8433 #endif
8434   ;
8435   return 0;
8436 }
8437 _ACEOF
8438 rm -f conftest.$ac_objext
8439 if { (eval echo "$as_me:8439: \"$ac_compile\"") >&5
8440   (eval $ac_compile) 2>&5
8441   ac_status=$?
8442   echo "$as_me:8442: \$? = $ac_status" >&5
8443   (exit $ac_status); } &&
8444          { ac_try='test -s conftest.$ac_objext'
8445   { (eval echo "$as_me:8445: \"$ac_try\"") >&5
8446   (eval $ac_try) 2>&5
8447   ac_status=$?
8448   echo "$as_me:8448: \$? = $ac_status" >&5
8449   (exit $ac_status); }; }; then
8450   :
8451 else
8452   echo "$as_me: failed program was:" >&5
8453 cat conftest.$ac_ext >&5
8454 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8455 fi
8456 rm -f conftest.$ac_objext conftest.$ac_ext
8457          fi
8458
8459 echo "${as_me:-configure}:8459: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8460
8461          CFLAGS="$cf_trim_CFLAGS"
8462          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8463
8464 echo "${as_me:-configure}:8464: testing if the second compile does not leave our definition intact error ..." 1>&5
8465
8466          cat >conftest.$ac_ext <<_ACEOF
8467 #line 8467 "configure"
8468 #include "confdefs.h"
8469 #include <sys/types.h>
8470 int
8471 main ()
8472 {
8473
8474 #ifndef _POSIX_C_SOURCE
8475 make an error
8476 #endif
8477   ;
8478   return 0;
8479 }
8480 _ACEOF
8481 rm -f conftest.$ac_objext
8482 if { (eval echo "$as_me:8482: \"$ac_compile\"") >&5
8483   (eval $ac_compile) 2>&5
8484   ac_status=$?
8485   echo "$as_me:8485: \$? = $ac_status" >&5
8486   (exit $ac_status); } &&
8487          { ac_try='test -s conftest.$ac_objext'
8488   { (eval echo "$as_me:8488: \"$ac_try\"") >&5
8489   (eval $ac_try) 2>&5
8490   ac_status=$?
8491   echo "$as_me:8491: \$? = $ac_status" >&5
8492   (exit $ac_status); }; }; then
8493   :
8494 else
8495   echo "$as_me: failed program was:" >&5
8496 cat conftest.$ac_ext >&5
8497 cf_cv_posix_c_source=no
8498 fi
8499 rm -f conftest.$ac_objext conftest.$ac_ext
8500          CFLAGS="$cf_save_CFLAGS"
8501          CPPFLAGS="$cf_save_CPPFLAGS"
8502
8503 fi
8504 rm -f conftest.$ac_objext conftest.$ac_ext
8505
8506 fi
8507 echo "$as_me:8507: result: $cf_cv_posix_c_source" >&5
8508 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8509
8510 if test "$cf_cv_posix_c_source" != no ; then
8511         CFLAGS="$cf_trim_CFLAGS"
8512         CPPFLAGS="$cf_trim_CPPFLAGS"
8513
8514 cf_fix_cppflags=no
8515 cf_new_cflags=
8516 cf_new_cppflags=
8517 cf_new_extra_cppflags=
8518
8519 for cf_add_cflags in $cf_cv_posix_c_source
8520 do
8521 case $cf_fix_cppflags in
8522 (no)
8523         case $cf_add_cflags in
8524         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8525                 case $cf_add_cflags in
8526                 (-D*)
8527                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8528
8529                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8530                                 && test -z "${cf_tst_cflags}" \
8531                                 && cf_fix_cppflags=yes
8532
8533                         if test $cf_fix_cppflags = yes ; then
8534                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8535                                 continue
8536                         elif test "${cf_tst_cflags}" = "\"'" ; then
8537                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8538                                 continue
8539                         fi
8540                         ;;
8541                 esac
8542                 case "$CPPFLAGS" in
8543                 (*$cf_add_cflags)
8544                         ;;
8545                 (*)
8546                         case $cf_add_cflags in
8547                         (-D*)
8548                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8549
8550 CPPFLAGS=`echo "$CPPFLAGS" | \
8551         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8552                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8553
8554                                 ;;
8555                         esac
8556                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8557                         ;;
8558                 esac
8559                 ;;
8560         (*)
8561                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8562                 ;;
8563         esac
8564         ;;
8565 (yes)
8566         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8567
8568         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8569
8570         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8571                 && test -z "${cf_tst_cflags}" \
8572                 && cf_fix_cppflags=no
8573         ;;
8574 esac
8575 done
8576
8577 if test -n "$cf_new_cflags" ; then
8578
8579         CFLAGS="$CFLAGS $cf_new_cflags"
8580 fi
8581
8582 if test -n "$cf_new_cppflags" ; then
8583
8584         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8585 fi
8586
8587 if test -n "$cf_new_extra_cppflags" ; then
8588
8589         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8590 fi
8591
8592 fi
8593
8594         ;;
8595 esac
8596
8597 if test -n "$cf_xopen_source" ; then
8598
8599 cf_fix_cppflags=no
8600 cf_new_cflags=
8601 cf_new_cppflags=
8602 cf_new_extra_cppflags=
8603
8604 for cf_add_cflags in $cf_xopen_source
8605 do
8606 case $cf_fix_cppflags in
8607 (no)
8608         case $cf_add_cflags in
8609         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8610                 case $cf_add_cflags in
8611                 (-D*)
8612                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8613
8614                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8615                                 && test -z "${cf_tst_cflags}" \
8616                                 && cf_fix_cppflags=yes
8617
8618                         if test $cf_fix_cppflags = yes ; then
8619                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8620                                 continue
8621                         elif test "${cf_tst_cflags}" = "\"'" ; then
8622                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8623                                 continue
8624                         fi
8625                         ;;
8626                 esac
8627                 case "$CPPFLAGS" in
8628                 (*$cf_add_cflags)
8629                         ;;
8630                 (*)
8631                         case $cf_add_cflags in
8632                         (-D*)
8633                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8634
8635 CPPFLAGS=`echo "$CPPFLAGS" | \
8636         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8637                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8638
8639                                 ;;
8640                         esac
8641                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8642                         ;;
8643                 esac
8644                 ;;
8645         (*)
8646                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8647                 ;;
8648         esac
8649         ;;
8650 (yes)
8651         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8652
8653         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8654
8655         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8656                 && test -z "${cf_tst_cflags}" \
8657                 && cf_fix_cppflags=no
8658         ;;
8659 esac
8660 done
8661
8662 if test -n "$cf_new_cflags" ; then
8663         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8664
8665 echo "${as_me:-configure}:8665: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8666
8667         CFLAGS="$CFLAGS $cf_new_cflags"
8668 fi
8669
8670 if test -n "$cf_new_cppflags" ; then
8671         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8672
8673 echo "${as_me:-configure}:8673: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8674
8675         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8676 fi
8677
8678 if test -n "$cf_new_extra_cppflags" ; then
8679         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8680
8681 echo "${as_me:-configure}:8681: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8682
8683         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8684 fi
8685
8686 fi
8687
8688 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8689         echo "$as_me:8689: checking if _XOPEN_SOURCE really is set" >&5
8690 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8691         cat >conftest.$ac_ext <<_ACEOF
8692 #line 8692 "configure"
8693 #include "confdefs.h"
8694 #include <stdlib.h>
8695 int
8696 main ()
8697 {
8698
8699 #ifndef _XOPEN_SOURCE
8700 make an error
8701 #endif
8702   ;
8703   return 0;
8704 }
8705 _ACEOF
8706 rm -f conftest.$ac_objext
8707 if { (eval echo "$as_me:8707: \"$ac_compile\"") >&5
8708   (eval $ac_compile) 2>&5
8709   ac_status=$?
8710   echo "$as_me:8710: \$? = $ac_status" >&5
8711   (exit $ac_status); } &&
8712          { ac_try='test -s conftest.$ac_objext'
8713   { (eval echo "$as_me:8713: \"$ac_try\"") >&5
8714   (eval $ac_try) 2>&5
8715   ac_status=$?
8716   echo "$as_me:8716: \$? = $ac_status" >&5
8717   (exit $ac_status); }; }; then
8718   cf_XOPEN_SOURCE_set=yes
8719 else
8720   echo "$as_me: failed program was:" >&5
8721 cat conftest.$ac_ext >&5
8722 cf_XOPEN_SOURCE_set=no
8723 fi
8724 rm -f conftest.$ac_objext conftest.$ac_ext
8725         echo "$as_me:8725: result: $cf_XOPEN_SOURCE_set" >&5
8726 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8727         if test $cf_XOPEN_SOURCE_set = yes
8728         then
8729                 cat >conftest.$ac_ext <<_ACEOF
8730 #line 8730 "configure"
8731 #include "confdefs.h"
8732 #include <stdlib.h>
8733 int
8734 main ()
8735 {
8736
8737 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8738 make an error
8739 #endif
8740   ;
8741   return 0;
8742 }
8743 _ACEOF
8744 rm -f conftest.$ac_objext
8745 if { (eval echo "$as_me:8745: \"$ac_compile\"") >&5
8746   (eval $ac_compile) 2>&5
8747   ac_status=$?
8748   echo "$as_me:8748: \$? = $ac_status" >&5
8749   (exit $ac_status); } &&
8750          { ac_try='test -s conftest.$ac_objext'
8751   { (eval echo "$as_me:8751: \"$ac_try\"") >&5
8752   (eval $ac_try) 2>&5
8753   ac_status=$?
8754   echo "$as_me:8754: \$? = $ac_status" >&5
8755   (exit $ac_status); }; }; then
8756   cf_XOPEN_SOURCE_set_ok=yes
8757 else
8758   echo "$as_me: failed program was:" >&5
8759 cat conftest.$ac_ext >&5
8760 cf_XOPEN_SOURCE_set_ok=no
8761 fi
8762 rm -f conftest.$ac_objext conftest.$ac_ext
8763                 if test $cf_XOPEN_SOURCE_set_ok = no
8764                 then
8765                         { echo "$as_me:8765: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8766 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8767                 fi
8768         else
8769
8770 echo "$as_me:8770: checking if we should define _XOPEN_SOURCE" >&5
8771 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8772 if test "${cf_cv_xopen_source+set}" = set; then
8773   echo $ECHO_N "(cached) $ECHO_C" >&6
8774 else
8775
8776         cat >conftest.$ac_ext <<_ACEOF
8777 #line 8777 "configure"
8778 #include "confdefs.h"
8779
8780 #include <stdlib.h>
8781 #include <string.h>
8782 #include <sys/types.h>
8783
8784 int
8785 main ()
8786 {
8787
8788 #ifndef _XOPEN_SOURCE
8789 make an error
8790 #endif
8791   ;
8792   return 0;
8793 }
8794 _ACEOF
8795 rm -f conftest.$ac_objext
8796 if { (eval echo "$as_me:8796: \"$ac_compile\"") >&5
8797   (eval $ac_compile) 2>&5
8798   ac_status=$?
8799   echo "$as_me:8799: \$? = $ac_status" >&5
8800   (exit $ac_status); } &&
8801          { ac_try='test -s conftest.$ac_objext'
8802   { (eval echo "$as_me:8802: \"$ac_try\"") >&5
8803   (eval $ac_try) 2>&5
8804   ac_status=$?
8805   echo "$as_me:8805: \$? = $ac_status" >&5
8806   (exit $ac_status); }; }; then
8807   cf_cv_xopen_source=no
8808 else
8809   echo "$as_me: failed program was:" >&5
8810 cat conftest.$ac_ext >&5
8811 cf_save="$CPPFLAGS"
8812          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8813          cat >conftest.$ac_ext <<_ACEOF
8814 #line 8814 "configure"
8815 #include "confdefs.h"
8816
8817 #include <stdlib.h>
8818 #include <string.h>
8819 #include <sys/types.h>
8820
8821 int
8822 main ()
8823 {
8824
8825 #ifdef _XOPEN_SOURCE
8826 make an error
8827 #endif
8828   ;
8829   return 0;
8830 }
8831 _ACEOF
8832 rm -f conftest.$ac_objext
8833 if { (eval echo "$as_me:8833: \"$ac_compile\"") >&5
8834   (eval $ac_compile) 2>&5
8835   ac_status=$?
8836   echo "$as_me:8836: \$? = $ac_status" >&5
8837   (exit $ac_status); } &&
8838          { ac_try='test -s conftest.$ac_objext'
8839   { (eval echo "$as_me:8839: \"$ac_try\"") >&5
8840   (eval $ac_try) 2>&5
8841   ac_status=$?
8842   echo "$as_me:8842: \$? = $ac_status" >&5
8843   (exit $ac_status); }; }; then
8844   cf_cv_xopen_source=no
8845 else
8846   echo "$as_me: failed program was:" >&5
8847 cat conftest.$ac_ext >&5
8848 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8849 fi
8850 rm -f conftest.$ac_objext conftest.$ac_ext
8851         CPPFLAGS="$cf_save"
8852
8853 fi
8854 rm -f conftest.$ac_objext conftest.$ac_ext
8855
8856 fi
8857 echo "$as_me:8857: result: $cf_cv_xopen_source" >&5
8858 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8859
8860 if test "$cf_cv_xopen_source" != no ; then
8861
8862 CFLAGS=`echo "$CFLAGS" | \
8863         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8864                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8865
8866 CPPFLAGS=`echo "$CPPFLAGS" | \
8867         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8868                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8869
8870         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8871
8872 cf_fix_cppflags=no
8873 cf_new_cflags=
8874 cf_new_cppflags=
8875 cf_new_extra_cppflags=
8876
8877 for cf_add_cflags in $cf_temp_xopen_source
8878 do
8879 case $cf_fix_cppflags in
8880 (no)
8881         case $cf_add_cflags in
8882         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8883                 case $cf_add_cflags in
8884                 (-D*)
8885                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8886
8887                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8888                                 && test -z "${cf_tst_cflags}" \
8889                                 && cf_fix_cppflags=yes
8890
8891                         if test $cf_fix_cppflags = yes ; then
8892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8893                                 continue
8894                         elif test "${cf_tst_cflags}" = "\"'" ; then
8895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8896                                 continue
8897                         fi
8898                         ;;
8899                 esac
8900                 case "$CPPFLAGS" in
8901                 (*$cf_add_cflags)
8902                         ;;
8903                 (*)
8904                         case $cf_add_cflags in
8905                         (-D*)
8906                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8907
8908 CPPFLAGS=`echo "$CPPFLAGS" | \
8909         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8910                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8911
8912                                 ;;
8913                         esac
8914                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8915                         ;;
8916                 esac
8917                 ;;
8918         (*)
8919                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8920                 ;;
8921         esac
8922         ;;
8923 (yes)
8924         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8925
8926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8927
8928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8929                 && test -z "${cf_tst_cflags}" \
8930                 && cf_fix_cppflags=no
8931         ;;
8932 esac
8933 done
8934
8935 if test -n "$cf_new_cflags" ; then
8936
8937         CFLAGS="$CFLAGS $cf_new_cflags"
8938 fi
8939
8940 if test -n "$cf_new_cppflags" ; then
8941
8942         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8943 fi
8944
8945 if test -n "$cf_new_extra_cppflags" ; then
8946
8947         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8948 fi
8949
8950 fi
8951
8952         fi
8953 fi
8954
8955 CPPFLAGS_after_XOPEN="$CPPFLAGS"
8956
8957 # Work around breakage on OS X
8958
8959 echo "$as_me:8959: checking if SIGWINCH is defined" >&5
8960 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8961 if test "${cf_cv_define_sigwinch+set}" = set; then
8962   echo $ECHO_N "(cached) $ECHO_C" >&6
8963 else
8964
8965         cat >conftest.$ac_ext <<_ACEOF
8966 #line 8966 "configure"
8967 #include "confdefs.h"
8968
8969 #include <sys/types.h>
8970 #include <sys/signal.h>
8971
8972 int
8973 main ()
8974 {
8975 int x = SIGWINCH
8976   ;
8977   return 0;
8978 }
8979 _ACEOF
8980 rm -f conftest.$ac_objext
8981 if { (eval echo "$as_me:8981: \"$ac_compile\"") >&5
8982   (eval $ac_compile) 2>&5
8983   ac_status=$?
8984   echo "$as_me:8984: \$? = $ac_status" >&5
8985   (exit $ac_status); } &&
8986          { ac_try='test -s conftest.$ac_objext'
8987   { (eval echo "$as_me:8987: \"$ac_try\"") >&5
8988   (eval $ac_try) 2>&5
8989   ac_status=$?
8990   echo "$as_me:8990: \$? = $ac_status" >&5
8991   (exit $ac_status); }; }; then
8992   cf_cv_define_sigwinch=yes
8993 else
8994   echo "$as_me: failed program was:" >&5
8995 cat conftest.$ac_ext >&5
8996 cat >conftest.$ac_ext <<_ACEOF
8997 #line 8997 "configure"
8998 #include "confdefs.h"
8999
9000 #undef _XOPEN_SOURCE
9001 #undef _POSIX_SOURCE
9002 #undef _POSIX_C_SOURCE
9003 #include <sys/types.h>
9004 #include <sys/signal.h>
9005
9006 int
9007 main ()
9008 {
9009 int x = SIGWINCH
9010   ;
9011   return 0;
9012 }
9013 _ACEOF
9014 rm -f conftest.$ac_objext
9015 if { (eval echo "$as_me:9015: \"$ac_compile\"") >&5
9016   (eval $ac_compile) 2>&5
9017   ac_status=$?
9018   echo "$as_me:9018: \$? = $ac_status" >&5
9019   (exit $ac_status); } &&
9020          { ac_try='test -s conftest.$ac_objext'
9021   { (eval echo "$as_me:9021: \"$ac_try\"") >&5
9022   (eval $ac_try) 2>&5
9023   ac_status=$?
9024   echo "$as_me:9024: \$? = $ac_status" >&5
9025   (exit $ac_status); }; }; then
9026   cf_cv_define_sigwinch=maybe
9027 else
9028   echo "$as_me: failed program was:" >&5
9029 cat conftest.$ac_ext >&5
9030 cf_cv_define_sigwinch=no
9031 fi
9032 rm -f conftest.$ac_objext conftest.$ac_ext
9033
9034 fi
9035 rm -f conftest.$ac_objext conftest.$ac_ext
9036
9037 fi
9038 echo "$as_me:9038: result: $cf_cv_define_sigwinch" >&5
9039 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9040
9041 if test "$cf_cv_define_sigwinch" = maybe ; then
9042 echo "$as_me:9042: checking for actual SIGWINCH definition" >&5
9043 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9044 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9045   echo $ECHO_N "(cached) $ECHO_C" >&6
9046 else
9047
9048 cf_cv_fixup_sigwinch=unknown
9049 cf_sigwinch=32
9050 while test $cf_sigwinch != 1
9051 do
9052         cat >conftest.$ac_ext <<_ACEOF
9053 #line 9053 "configure"
9054 #include "confdefs.h"
9055
9056 #undef _XOPEN_SOURCE
9057 #undef _POSIX_SOURCE
9058 #undef _POSIX_C_SOURCE
9059 #include <sys/types.h>
9060 #include <sys/signal.h>
9061
9062 int
9063 main ()
9064 {
9065
9066 #if SIGWINCH != $cf_sigwinch
9067 make an error
9068 #endif
9069 int x = SIGWINCH
9070   ;
9071   return 0;
9072 }
9073 _ACEOF
9074 rm -f conftest.$ac_objext
9075 if { (eval echo "$as_me:9075: \"$ac_compile\"") >&5
9076   (eval $ac_compile) 2>&5
9077   ac_status=$?
9078   echo "$as_me:9078: \$? = $ac_status" >&5
9079   (exit $ac_status); } &&
9080          { ac_try='test -s conftest.$ac_objext'
9081   { (eval echo "$as_me:9081: \"$ac_try\"") >&5
9082   (eval $ac_try) 2>&5
9083   ac_status=$?
9084   echo "$as_me:9084: \$? = $ac_status" >&5
9085   (exit $ac_status); }; }; then
9086   cf_cv_fixup_sigwinch=$cf_sigwinch
9087          break
9088 else
9089   echo "$as_me: failed program was:" >&5
9090 cat conftest.$ac_ext >&5
9091 fi
9092 rm -f conftest.$ac_objext conftest.$ac_ext
9093
9094 cf_sigwinch=`expr $cf_sigwinch - 1`
9095 done
9096
9097 fi
9098 echo "$as_me:9098: result: $cf_cv_fixup_sigwinch" >&5
9099 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9100
9101         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9102                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9103         fi
9104 fi
9105
9106 # Checks for CODESET support.
9107
9108 echo "$as_me:9108: checking for nl_langinfo and CODESET" >&5
9109 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9110 if test "${am_cv_langinfo_codeset+set}" = set; then
9111   echo $ECHO_N "(cached) $ECHO_C" >&6
9112 else
9113   cat >conftest.$ac_ext <<_ACEOF
9114 #line 9114 "configure"
9115 #include "confdefs.h"
9116 #include <langinfo.h>
9117 int
9118 main ()
9119 {
9120 char* cs = nl_langinfo(CODESET);
9121   ;
9122   return 0;
9123 }
9124 _ACEOF
9125 rm -f conftest.$ac_objext conftest$ac_exeext
9126 if { (eval echo "$as_me:9126: \"$ac_link\"") >&5
9127   (eval $ac_link) 2>&5
9128   ac_status=$?
9129   echo "$as_me:9129: \$? = $ac_status" >&5
9130   (exit $ac_status); } &&
9131          { ac_try='test -s conftest$ac_exeext'
9132   { (eval echo "$as_me:9132: \"$ac_try\"") >&5
9133   (eval $ac_try) 2>&5
9134   ac_status=$?
9135   echo "$as_me:9135: \$? = $ac_status" >&5
9136   (exit $ac_status); }; }; then
9137   am_cv_langinfo_codeset=yes
9138 else
9139   echo "$as_me: failed program was:" >&5
9140 cat conftest.$ac_ext >&5
9141 am_cv_langinfo_codeset=no
9142 fi
9143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9144
9145 fi
9146 echo "$as_me:9146: result: $am_cv_langinfo_codeset" >&5
9147 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9148         if test $am_cv_langinfo_codeset = yes; then
9149
9150 cat >>confdefs.h <<\EOF
9151 #define HAVE_LANGINFO_CODESET 1
9152 EOF
9153
9154         fi
9155
9156 # use these variables to work around a defect in gcc's fixincludes.
9157 NCURSES_OK_WCHAR_T=
9158 NCURSES_OK_WINT_T=
9159
9160 echo "$as_me:9160: checking if you want wide-character code" >&5
9161 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9162
9163 # Check whether --enable-widec or --disable-widec was given.
9164 if test "${enable_widec+set}" = set; then
9165   enableval="$enable_widec"
9166   with_widec=$enableval
9167 else
9168   with_widec=no
9169 fi;
9170 echo "$as_me:9170: result: $with_widec" >&5
9171 echo "${ECHO_T}$with_widec" >&6
9172 if test "x$with_widec" = xyes ; then
9173         if test "x$disable_lib_suffixes" = xno ; then
9174                 LIB_SUFFIX="w${LIB_SUFFIX}"
9175         fi
9176
9177 cat >>confdefs.h <<\EOF
9178 #define USE_WIDEC_SUPPORT 1
9179 EOF
9180
9181 cat >>confdefs.h <<\EOF
9182 #define NCURSES_WIDECHAR 1
9183 EOF
9184
9185 echo "$as_me:9185: checking if wchar.h can be used as is" >&5
9186 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9187 if test "${cf_cv_wchar_h_okay+set}" = set; then
9188   echo $ECHO_N "(cached) $ECHO_C" >&6
9189 else
9190
9191 cat >conftest.$ac_ext <<_ACEOF
9192 #line 9192 "configure"
9193 #include "confdefs.h"
9194
9195 #include <stdlib.h>
9196 #include <wchar.h>
9197
9198 int
9199 main ()
9200 {
9201
9202         wint_t foo = 0;
9203         int bar = iswpunct(foo)
9204   ;
9205   return 0;
9206 }
9207 _ACEOF
9208 rm -f conftest.$ac_objext
9209 if { (eval echo "$as_me:9209: \"$ac_compile\"") >&5
9210   (eval $ac_compile) 2>&5
9211   ac_status=$?
9212   echo "$as_me:9212: \$? = $ac_status" >&5
9213   (exit $ac_status); } &&
9214          { ac_try='test -s conftest.$ac_objext'
9215   { (eval echo "$as_me:9215: \"$ac_try\"") >&5
9216   (eval $ac_try) 2>&5
9217   ac_status=$?
9218   echo "$as_me:9218: \$? = $ac_status" >&5
9219   (exit $ac_status); }; }; then
9220   cf_cv_wchar_h_okay=yes
9221 else
9222   echo "$as_me: failed program was:" >&5
9223 cat conftest.$ac_ext >&5
9224 cf_cv_wchar_h_okay=no
9225 fi
9226 rm -f conftest.$ac_objext conftest.$ac_ext
9227 fi
9228 echo "$as_me:9228: result: $cf_cv_wchar_h_okay" >&5
9229 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9230
9231 if test $cf_cv_wchar_h_okay = no
9232 then
9233
9234 echo "$as_me:9234: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9235 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9236 cat >conftest.$ac_ext <<_ACEOF
9237 #line 9237 "configure"
9238 #include "confdefs.h"
9239 #include <sys/types.h>
9240
9241 int
9242 main ()
9243 {
9244
9245 #ifndef _XOPEN_SOURCE_EXTENDED
9246 make an error
9247 #endif
9248   ;
9249   return 0;
9250 }
9251 _ACEOF
9252 rm -f conftest.$ac_objext
9253 if { (eval echo "$as_me:9253: \"$ac_compile\"") >&5
9254   (eval $ac_compile) 2>&5
9255   ac_status=$?
9256   echo "$as_me:9256: \$? = $ac_status" >&5
9257   (exit $ac_status); } &&
9258          { ac_try='test -s conftest.$ac_objext'
9259   { (eval echo "$as_me:9259: \"$ac_try\"") >&5
9260   (eval $ac_try) 2>&5
9261   ac_status=$?
9262   echo "$as_me:9262: \$? = $ac_status" >&5
9263   (exit $ac_status); }; }; then
9264   cf_result=no
9265 else
9266   echo "$as_me: failed program was:" >&5
9267 cat conftest.$ac_ext >&5
9268 cf_result=yes
9269 fi
9270 rm -f conftest.$ac_objext conftest.$ac_ext
9271 echo "$as_me:9271: result: $cf_result" >&5
9272 echo "${ECHO_T}$cf_result" >&6
9273
9274 if test "$cf_result" = yes ; then
9275         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9276 elif test "x" != "x" ; then
9277         echo "$as_me:9277: checking checking for compatible value versus " >&5
9278 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9279         cat >conftest.$ac_ext <<_ACEOF
9280 #line 9280 "configure"
9281 #include "confdefs.h"
9282 #include <sys/types.h>
9283
9284 int
9285 main ()
9286 {
9287
9288 #if _XOPEN_SOURCE_EXTENDED- < 0
9289 make an error
9290 #endif
9291   ;
9292   return 0;
9293 }
9294 _ACEOF
9295 rm -f conftest.$ac_objext
9296 if { (eval echo "$as_me:9296: \"$ac_compile\"") >&5
9297   (eval $ac_compile) 2>&5
9298   ac_status=$?
9299   echo "$as_me:9299: \$? = $ac_status" >&5
9300   (exit $ac_status); } &&
9301          { ac_try='test -s conftest.$ac_objext'
9302   { (eval echo "$as_me:9302: \"$ac_try\"") >&5
9303   (eval $ac_try) 2>&5
9304   ac_status=$?
9305   echo "$as_me:9305: \$? = $ac_status" >&5
9306   (exit $ac_status); }; }; then
9307   cf_result=yes
9308 else
9309   echo "$as_me: failed program was:" >&5
9310 cat conftest.$ac_ext >&5
9311 cf_result=no
9312 fi
9313 rm -f conftest.$ac_objext conftest.$ac_ext
9314         echo "$as_me:9314: result: $cf_result" >&5
9315 echo "${ECHO_T}$cf_result" >&6
9316         if test "$cf_result" = no ; then
9317                 # perhaps we can override it - try...
9318                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9319         fi
9320 fi
9321
9322 fi
9323
9324         # with_overwrite=no
9325         NCURSES_CH_T=cchar_t
9326
9327 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9328 do
9329 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9330 echo "$as_me:9330: checking for $ac_func" >&5
9331 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9332 if eval "test \"\${$as_ac_var+set}\" = set"; then
9333   echo $ECHO_N "(cached) $ECHO_C" >&6
9334 else
9335   cat >conftest.$ac_ext <<_ACEOF
9336 #line 9336 "configure"
9337 #include "confdefs.h"
9338 /* System header to define __stub macros and hopefully few prototypes,
9339     which can conflict with char $ac_func (); below.  */
9340 #include <assert.h>
9341 /* Override any gcc2 internal prototype to avoid an error.  */
9342 #ifdef __cplusplus
9343 extern "C"
9344 #endif
9345 /* We use char because int might match the return type of a gcc2
9346    builtin and then its argument prototype would still apply.  */
9347 char $ac_func ();
9348 char (*f) ();
9349
9350 int
9351 main ()
9352 {
9353 /* The GNU C library defines this for functions which it implements
9354     to always fail with ENOSYS.  Some functions are actually named
9355     something starting with __ and the normal name is an alias.  */
9356 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9357 choke me
9358 #else
9359 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9360 #endif
9361
9362   ;
9363   return 0;
9364 }
9365 _ACEOF
9366 rm -f conftest.$ac_objext conftest$ac_exeext
9367 if { (eval echo "$as_me:9367: \"$ac_link\"") >&5
9368   (eval $ac_link) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); } &&
9372          { ac_try='test -s conftest$ac_exeext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378   eval "$as_ac_var=yes"
9379 else
9380   echo "$as_me: failed program was:" >&5
9381 cat conftest.$ac_ext >&5
9382 eval "$as_ac_var=no"
9383 fi
9384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9385 fi
9386 echo "$as_me:9386: result: `eval echo '${'$as_ac_var'}'`" >&5
9387 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9388 if test `eval echo '${'$as_ac_var'}'` = yes; then
9389   cat >>confdefs.h <<EOF
9390 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9391 EOF
9392
9393 fi
9394 done
9395
9396         if test "x$ac_cv_func_putwc" != xyes ; then
9397
9398 echo "$as_me:9398: checking for multibyte character support" >&5
9399 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9400 if test "${cf_cv_utf8_lib+set}" = set; then
9401   echo $ECHO_N "(cached) $ECHO_C" >&6
9402 else
9403
9404         cf_save_LIBS="$LIBS"
9405         cat >conftest.$ac_ext <<_ACEOF
9406 #line 9406 "configure"
9407 #include "confdefs.h"
9408
9409 #include <stdlib.h>
9410 int
9411 main ()
9412 {
9413 putwc(0,0);
9414   ;
9415   return 0;
9416 }
9417 _ACEOF
9418 rm -f conftest.$ac_objext conftest$ac_exeext
9419 if { (eval echo "$as_me:9419: \"$ac_link\"") >&5
9420   (eval $ac_link) 2>&5
9421   ac_status=$?
9422   echo "$as_me:9422: \$? = $ac_status" >&5
9423   (exit $ac_status); } &&
9424          { ac_try='test -s conftest$ac_exeext'
9425   { (eval echo "$as_me:9425: \"$ac_try\"") >&5
9426   (eval $ac_try) 2>&5
9427   ac_status=$?
9428   echo "$as_me:9428: \$? = $ac_status" >&5
9429   (exit $ac_status); }; }; then
9430   cf_cv_utf8_lib=yes
9431 else
9432   echo "$as_me: failed program was:" >&5
9433 cat conftest.$ac_ext >&5
9434
9435 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9436 # will be set on completion of the AC_TRY_LINK below.
9437 cf_cv_header_path_utf8=
9438 cf_cv_library_path_utf8=
9439
9440 echo "${as_me:-configure}:9440: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9441
9442 cf_save_LIBS="$LIBS"
9443
9444 cat >conftest.$ac_ext <<_ACEOF
9445 #line 9445 "configure"
9446 #include "confdefs.h"
9447
9448 #include <libutf8.h>
9449 int
9450 main ()
9451 {
9452 putwc(0,0);
9453   ;
9454   return 0;
9455 }
9456 _ACEOF
9457 rm -f conftest.$ac_objext conftest$ac_exeext
9458 if { (eval echo "$as_me:9458: \"$ac_link\"") >&5
9459   (eval $ac_link) 2>&5
9460   ac_status=$?
9461   echo "$as_me:9461: \$? = $ac_status" >&5
9462   (exit $ac_status); } &&
9463          { ac_try='test -s conftest$ac_exeext'
9464   { (eval echo "$as_me:9464: \"$ac_try\"") >&5
9465   (eval $ac_try) 2>&5
9466   ac_status=$?
9467   echo "$as_me:9467: \$? = $ac_status" >&5
9468   (exit $ac_status); }; }; then
9469
9470         cf_cv_find_linkage_utf8=yes
9471         cf_cv_header_path_utf8=/usr/include
9472         cf_cv_library_path_utf8=/usr/lib
9473
9474 else
9475   echo "$as_me: failed program was:" >&5
9476 cat conftest.$ac_ext >&5
9477
9478 LIBS="-lutf8  $cf_save_LIBS"
9479
9480 cat >conftest.$ac_ext <<_ACEOF
9481 #line 9481 "configure"
9482 #include "confdefs.h"
9483
9484 #include <libutf8.h>
9485 int
9486 main ()
9487 {
9488 putwc(0,0);
9489   ;
9490   return 0;
9491 }
9492 _ACEOF
9493 rm -f conftest.$ac_objext conftest$ac_exeext
9494 if { (eval echo "$as_me:9494: \"$ac_link\"") >&5
9495   (eval $ac_link) 2>&5
9496   ac_status=$?
9497   echo "$as_me:9497: \$? = $ac_status" >&5
9498   (exit $ac_status); } &&
9499          { ac_try='test -s conftest$ac_exeext'
9500   { (eval echo "$as_me:9500: \"$ac_try\"") >&5
9501   (eval $ac_try) 2>&5
9502   ac_status=$?
9503   echo "$as_me:9503: \$? = $ac_status" >&5
9504   (exit $ac_status); }; }; then
9505
9506         cf_cv_find_linkage_utf8=yes
9507         cf_cv_header_path_utf8=/usr/include
9508         cf_cv_library_path_utf8=/usr/lib
9509         cf_cv_library_file_utf8="-lutf8"
9510
9511 else
9512   echo "$as_me: failed program was:" >&5
9513 cat conftest.$ac_ext >&5
9514
9515         cf_cv_find_linkage_utf8=no
9516         LIBS="$cf_save_LIBS"
9517
9518         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9519
9520 echo "${as_me:-configure}:9520: testing find linkage for utf8 library ..." 1>&5
9521
9522 echo "${as_me:-configure}:9522: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9523
9524         cf_save_CPPFLAGS="$CPPFLAGS"
9525         cf_test_CPPFLAGS="$CPPFLAGS"
9526
9527 cf_search=
9528
9529 # collect the current set of include-directories from compiler flags
9530 cf_header_path_list=""
9531 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9532         for cf_header_path in $CPPFLAGS $CFLAGS
9533         do
9534                 case $cf_header_path in
9535                 (-I*)
9536                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9537
9538 test "x$cf_header_path" != "xNONE" && \
9539 test -d "$cf_header_path" && \
9540  {
9541         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9542         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9543         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9544         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9545         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9546         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9547 }
9548
9549                         cf_header_path_list="$cf_header_path_list $cf_search"
9550                         ;;
9551                 esac
9552         done
9553 fi
9554
9555 # add the variations for the package we are looking for
9556
9557 cf_search=
9558
9559 test "x$prefix" != "xNONE" && \
9560 test -d "$prefix" && \
9561  {
9562         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9563         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9564         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9565         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9566         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9567         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9568 }
9569
9570 for cf_subdir_prefix in \
9571         /usr \
9572         /usr/local \
9573         /usr/pkg \
9574         /opt \
9575         /opt/local \
9576         $HOME
9577 do
9578
9579 test "x$cf_subdir_prefix" != "x$prefix" && \
9580 test -d "$cf_subdir_prefix" && \
9581 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9582         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9583         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9584         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9585         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9586         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9587         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9588 }
9589
9590 done
9591
9592 test "$includedir" != NONE && \
9593 test "$includedir" != "/usr/include" && \
9594 test -d "$includedir" && {
9595         test -d $includedir &&    cf_search="$cf_search $includedir"
9596         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9597 }
9598
9599 test "$oldincludedir" != NONE && \
9600 test "$oldincludedir" != "/usr/include" && \
9601 test -d "$oldincludedir" && {
9602         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9603         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9604 }
9605
9606 cf_search="$cf_search $cf_header_path_list"
9607
9608         for cf_cv_header_path_utf8 in $cf_search
9609         do
9610                 if test -d $cf_cv_header_path_utf8 ; then
9611                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9612
9613 echo "${as_me:-configure}:9613: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9614
9615                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9616                         cat >conftest.$ac_ext <<_ACEOF
9617 #line 9617 "configure"
9618 #include "confdefs.h"
9619
9620 #include <libutf8.h>
9621 int
9622 main ()
9623 {
9624 putwc(0,0);
9625   ;
9626   return 0;
9627 }
9628 _ACEOF
9629 rm -f conftest.$ac_objext
9630 if { (eval echo "$as_me:9630: \"$ac_compile\"") >&5
9631   (eval $ac_compile) 2>&5
9632   ac_status=$?
9633   echo "$as_me:9633: \$? = $ac_status" >&5
9634   (exit $ac_status); } &&
9635          { ac_try='test -s conftest.$ac_objext'
9636   { (eval echo "$as_me:9636: \"$ac_try\"") >&5
9637   (eval $ac_try) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit $ac_status); }; }; then
9641
9642                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9643
9644 echo "${as_me:-configure}:9644: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9645
9646                                 cf_cv_find_linkage_utf8=maybe
9647                                 cf_test_CPPFLAGS="$CPPFLAGS"
9648                                 break
9649 else
9650   echo "$as_me: failed program was:" >&5
9651 cat conftest.$ac_ext >&5
9652
9653                                 CPPFLAGS="$cf_save_CPPFLAGS"
9654
9655 fi
9656 rm -f conftest.$ac_objext conftest.$ac_ext
9657                 fi
9658         done
9659
9660         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9661
9662 echo "${as_me:-configure}:9662: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9663
9664                 cf_save_LIBS="$LIBS"
9665                 cf_save_LDFLAGS="$LDFLAGS"
9666
9667                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9668
9669 cf_search=
9670 cf_library_path_list=""
9671 if test -n "${LDFLAGS}${LIBS}" ; then
9672         for cf_library_path in $LDFLAGS $LIBS
9673         do
9674                 case $cf_library_path in
9675                 (-L*)
9676                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9677
9678 test "x$cf_library_path" != "xNONE" && \
9679 test -d "$cf_library_path" && \
9680  {
9681         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9682         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9683         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9684         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9685         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9686         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9687 }
9688
9689                         cf_library_path_list="$cf_library_path_list $cf_search"
9690                         ;;
9691                 esac
9692         done
9693 fi
9694
9695 cf_search=
9696
9697 test "x$prefix" != "xNONE" && \
9698 test -d "$prefix" && \
9699  {
9700         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9701         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9702         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9703         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9704         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9705         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9706 }
9707
9708 for cf_subdir_prefix in \
9709         /usr \
9710         /usr/local \
9711         /usr/pkg \
9712         /opt \
9713         /opt/local \
9714         $HOME
9715 do
9716
9717 test "x$cf_subdir_prefix" != "x$prefix" && \
9718 test -d "$cf_subdir_prefix" && \
9719 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9720         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9721         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9722         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9723         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9724         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9725         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9726 }
9727
9728 done
9729
9730 cf_search="$cf_library_path_list $cf_search"
9731
9732                         for cf_cv_library_path_utf8 in $cf_search
9733                         do
9734                                 if test -d $cf_cv_library_path_utf8 ; then
9735                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9736
9737 echo "${as_me:-configure}:9737: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9738
9739                                         CPPFLAGS="$cf_test_CPPFLAGS"
9740                                         LIBS="-lutf8  $cf_save_LIBS"
9741                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9742                                         cat >conftest.$ac_ext <<_ACEOF
9743 #line 9743 "configure"
9744 #include "confdefs.h"
9745
9746 #include <libutf8.h>
9747 int
9748 main ()
9749 {
9750 putwc(0,0);
9751   ;
9752   return 0;
9753 }
9754 _ACEOF
9755 rm -f conftest.$ac_objext conftest$ac_exeext
9756 if { (eval echo "$as_me:9756: \"$ac_link\"") >&5
9757   (eval $ac_link) 2>&5
9758   ac_status=$?
9759   echo "$as_me:9759: \$? = $ac_status" >&5
9760   (exit $ac_status); } &&
9761          { ac_try='test -s conftest$ac_exeext'
9762   { (eval echo "$as_me:9762: \"$ac_try\"") >&5
9763   (eval $ac_try) 2>&5
9764   ac_status=$?
9765   echo "$as_me:9765: \$? = $ac_status" >&5
9766   (exit $ac_status); }; }; then
9767
9768                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9769
9770 echo "${as_me:-configure}:9770: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9771
9772                                         cf_cv_find_linkage_utf8=yes
9773                                         cf_cv_library_file_utf8="-lutf8"
9774                                         break
9775 else
9776   echo "$as_me: failed program was:" >&5
9777 cat conftest.$ac_ext >&5
9778
9779                                         CPPFLAGS="$cf_save_CPPFLAGS"
9780                                         LIBS="$cf_save_LIBS"
9781                                         LDFLAGS="$cf_save_LDFLAGS"
9782
9783 fi
9784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9785                                 fi
9786                         done
9787                         CPPFLAGS="$cf_save_CPPFLAGS"
9788                         LDFLAGS="$cf_save_LDFLAGS"
9789                 fi
9790
9791         else
9792                 cf_cv_find_linkage_utf8=no
9793         fi
9794
9795 fi
9796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9797
9798 fi
9799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9800
9801 LIBS="$cf_save_LIBS"
9802
9803 if test "$cf_cv_find_linkage_utf8" = yes ; then
9804 cf_cv_utf8_lib=add-on
9805 else
9806 cf_cv_utf8_lib=no
9807 fi
9808
9809 fi
9810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9811 fi
9812 echo "$as_me:9812: result: $cf_cv_utf8_lib" >&5
9813 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9814
9815 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9816 # ncurses/ncursesw:
9817 if test "$cf_cv_utf8_lib" = "add-on" ; then
9818
9819 cat >>confdefs.h <<\EOF
9820 #define HAVE_LIBUTF8_H 1
9821 EOF
9822
9823 if test -n "$cf_cv_header_path_utf8" ; then
9824   for cf_add_incdir in $cf_cv_header_path_utf8
9825   do
9826         while test $cf_add_incdir != /usr/include
9827         do
9828           if test -d $cf_add_incdir
9829           then
9830                 cf_have_incdir=no
9831                 if test -n "$CFLAGS$CPPFLAGS" ; then
9832                   # a loop is needed to ensure we can add subdirs of existing dirs
9833                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9834                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9835                           cf_have_incdir=yes; break
9836                         fi
9837                   done
9838                 fi
9839
9840                 if test "$cf_have_incdir" = no ; then
9841                   if test "$cf_add_incdir" = /usr/local/include ; then
9842                         if test "$GCC" = yes
9843                         then
9844                           cf_save_CPPFLAGS=$CPPFLAGS
9845                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9846                           cat >conftest.$ac_ext <<_ACEOF
9847 #line 9847 "configure"
9848 #include "confdefs.h"
9849 #include <stdio.h>
9850 int
9851 main ()
9852 {
9853 printf("Hello")
9854   ;
9855   return 0;
9856 }
9857 _ACEOF
9858 rm -f conftest.$ac_objext
9859 if { (eval echo "$as_me:9859: \"$ac_compile\"") >&5
9860   (eval $ac_compile) 2>&5
9861   ac_status=$?
9862   echo "$as_me:9862: \$? = $ac_status" >&5
9863   (exit $ac_status); } &&
9864          { ac_try='test -s conftest.$ac_objext'
9865   { (eval echo "$as_me:9865: \"$ac_try\"") >&5
9866   (eval $ac_try) 2>&5
9867   ac_status=$?
9868   echo "$as_me:9868: \$? = $ac_status" >&5
9869   (exit $ac_status); }; }; then
9870   :
9871 else
9872   echo "$as_me: failed program was:" >&5
9873 cat conftest.$ac_ext >&5
9874 cf_have_incdir=yes
9875 fi
9876 rm -f conftest.$ac_objext conftest.$ac_ext
9877                           CPPFLAGS=$cf_save_CPPFLAGS
9878                         fi
9879                   fi
9880                 fi
9881
9882                 if test "$cf_have_incdir" = no ; then
9883                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9884
9885 echo "${as_me:-configure}:9885: testing adding $cf_add_incdir to include-path ..." 1>&5
9886
9887                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9888
9889                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9890                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9891                   cf_add_incdir="$cf_top_incdir"
9892                 else
9893                   break
9894                 fi
9895           fi
9896         done
9897   done
9898 fi
9899
9900 if test -n "$cf_cv_library_path_utf8" ; then
9901         for cf_add_libdir in $cf_cv_library_path_utf8
9902         do
9903                 if test $cf_add_libdir = /usr/lib ; then
9904                         :
9905                 elif test -d $cf_add_libdir
9906                 then
9907                         cf_have_libdir=no
9908                         if test -n "$LDFLAGS$LIBS" ; then
9909                                 # a loop is needed to ensure we can add subdirs of existing dirs
9910                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9911                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9912                                                 cf_have_libdir=yes; break
9913                                         fi
9914                                 done
9915                         fi
9916                         if test "$cf_have_libdir" = no ; then
9917                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9918
9919 echo "${as_me:-configure}:9919: testing adding $cf_add_libdir to library-path ..." 1>&5
9920
9921                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9922                         fi
9923                 fi
9924         done
9925 fi
9926
9927 cf_add_libs="$cf_cv_library_file_utf8"
9928 # Filter out duplicates - this happens with badly-designed ".pc" files...
9929 for cf_add_1lib in $LIBS
9930 do
9931         for cf_add_2lib in $cf_add_libs
9932         do
9933                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9934                 then
9935                         cf_add_1lib=
9936                         break
9937                 fi
9938         done
9939         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9940 done
9941 LIBS="$cf_add_libs"
9942
9943 fi
9944
9945                 if test "$cf_cv_utf8_lib" != no ; then
9946                         NCURSES_LIBUTF8=1
9947                 fi
9948         fi
9949
9950 # This is needed on Tru64 5.0 to declare mbstate_t
9951 echo "$as_me:9951: checking if we must include wchar.h to declare mbstate_t" >&5
9952 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9953 if test "${cf_cv_mbstate_t+set}" = set; then
9954   echo $ECHO_N "(cached) $ECHO_C" >&6
9955 else
9956
9957 cat >conftest.$ac_ext <<_ACEOF
9958 #line 9958 "configure"
9959 #include "confdefs.h"
9960
9961 #include <stdlib.h>
9962 #include <stdarg.h>
9963 #include <stdio.h>
9964 #ifdef HAVE_LIBUTF8_H
9965 #include <libutf8.h>
9966 #endif
9967 int
9968 main ()
9969 {
9970 mbstate_t state
9971   ;
9972   return 0;
9973 }
9974 _ACEOF
9975 rm -f conftest.$ac_objext
9976 if { (eval echo "$as_me:9976: \"$ac_compile\"") >&5
9977   (eval $ac_compile) 2>&5
9978   ac_status=$?
9979   echo "$as_me:9979: \$? = $ac_status" >&5
9980   (exit $ac_status); } &&
9981          { ac_try='test -s conftest.$ac_objext'
9982   { (eval echo "$as_me:9982: \"$ac_try\"") >&5
9983   (eval $ac_try) 2>&5
9984   ac_status=$?
9985   echo "$as_me:9985: \$? = $ac_status" >&5
9986   (exit $ac_status); }; }; then
9987   cf_cv_mbstate_t=no
9988 else
9989   echo "$as_me: failed program was:" >&5
9990 cat conftest.$ac_ext >&5
9991 cat >conftest.$ac_ext <<_ACEOF
9992 #line 9992 "configure"
9993 #include "confdefs.h"
9994
9995 #include <stdlib.h>
9996 #include <stdarg.h>
9997 #include <stdio.h>
9998 #include <wchar.h>
9999 #ifdef HAVE_LIBUTF8_H
10000 #include <libutf8.h>
10001 #endif
10002 int
10003 main ()
10004 {
10005 mbstate_t value
10006   ;
10007   return 0;
10008 }
10009 _ACEOF
10010 rm -f conftest.$ac_objext
10011 if { (eval echo "$as_me:10011: \"$ac_compile\"") >&5
10012   (eval $ac_compile) 2>&5
10013   ac_status=$?
10014   echo "$as_me:10014: \$? = $ac_status" >&5
10015   (exit $ac_status); } &&
10016          { ac_try='test -s conftest.$ac_objext'
10017   { (eval echo "$as_me:10017: \"$ac_try\"") >&5
10018   (eval $ac_try) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); }; }; then
10022   cf_cv_mbstate_t=yes
10023 else
10024   echo "$as_me: failed program was:" >&5
10025 cat conftest.$ac_ext >&5
10026 cf_cv_mbstate_t=unknown
10027 fi
10028 rm -f conftest.$ac_objext conftest.$ac_ext
10029 fi
10030 rm -f conftest.$ac_objext conftest.$ac_ext
10031 fi
10032 echo "$as_me:10032: result: $cf_cv_mbstate_t" >&5
10033 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10034
10035 if test "$cf_cv_mbstate_t" = yes ; then
10036
10037 cat >>confdefs.h <<\EOF
10038 #define NEED_WCHAR_H 1
10039 EOF
10040
10041         NEED_WCHAR_H=1
10042 fi
10043
10044 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10045 if test "$cf_cv_mbstate_t" = unknown ; then
10046         NCURSES_MBSTATE_T=1
10047 fi
10048
10049 # This is needed on Tru64 5.0 to declare wchar_t
10050 echo "$as_me:10050: checking if we must include wchar.h to declare wchar_t" >&5
10051 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10052 if test "${cf_cv_wchar_t+set}" = set; then
10053   echo $ECHO_N "(cached) $ECHO_C" >&6
10054 else
10055
10056 cat >conftest.$ac_ext <<_ACEOF
10057 #line 10057 "configure"
10058 #include "confdefs.h"
10059
10060 #include <stdlib.h>
10061 #include <stdarg.h>
10062 #include <stdio.h>
10063 #ifdef HAVE_LIBUTF8_H
10064 #include <libutf8.h>
10065 #endif
10066 int
10067 main ()
10068 {
10069 wchar_t state
10070   ;
10071   return 0;
10072 }
10073 _ACEOF
10074 rm -f conftest.$ac_objext
10075 if { (eval echo "$as_me:10075: \"$ac_compile\"") >&5
10076   (eval $ac_compile) 2>&5
10077   ac_status=$?
10078   echo "$as_me:10078: \$? = $ac_status" >&5
10079   (exit $ac_status); } &&
10080          { ac_try='test -s conftest.$ac_objext'
10081   { (eval echo "$as_me:10081: \"$ac_try\"") >&5
10082   (eval $ac_try) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit $ac_status); }; }; then
10086   cf_cv_wchar_t=no
10087 else
10088   echo "$as_me: failed program was:" >&5
10089 cat conftest.$ac_ext >&5
10090 cat >conftest.$ac_ext <<_ACEOF
10091 #line 10091 "configure"
10092 #include "confdefs.h"
10093
10094 #include <stdlib.h>
10095 #include <stdarg.h>
10096 #include <stdio.h>
10097 #include <wchar.h>
10098 #ifdef HAVE_LIBUTF8_H
10099 #include <libutf8.h>
10100 #endif
10101 int
10102 main ()
10103 {
10104 wchar_t value
10105   ;
10106   return 0;
10107 }
10108 _ACEOF
10109 rm -f conftest.$ac_objext
10110 if { (eval echo "$as_me:10110: \"$ac_compile\"") >&5
10111   (eval $ac_compile) 2>&5
10112   ac_status=$?
10113   echo "$as_me:10113: \$? = $ac_status" >&5
10114   (exit $ac_status); } &&
10115          { ac_try='test -s conftest.$ac_objext'
10116   { (eval echo "$as_me:10116: \"$ac_try\"") >&5
10117   (eval $ac_try) 2>&5
10118   ac_status=$?
10119   echo "$as_me:10119: \$? = $ac_status" >&5
10120   (exit $ac_status); }; }; then
10121   cf_cv_wchar_t=yes
10122 else
10123   echo "$as_me: failed program was:" >&5
10124 cat conftest.$ac_ext >&5
10125 cf_cv_wchar_t=unknown
10126 fi
10127 rm -f conftest.$ac_objext conftest.$ac_ext
10128 fi
10129 rm -f conftest.$ac_objext conftest.$ac_ext
10130 fi
10131 echo "$as_me:10131: result: $cf_cv_wchar_t" >&5
10132 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10133
10134 if test "$cf_cv_wchar_t" = yes ; then
10135
10136 cat >>confdefs.h <<\EOF
10137 #define NEED_WCHAR_H 1
10138 EOF
10139
10140         NEED_WCHAR_H=1
10141 fi
10142
10143 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10144 if test "$cf_cv_wchar_t" = unknown ; then
10145         NCURSES_WCHAR_T=1
10146 fi
10147
10148 # if we find wchar_t in either place, use substitution to provide a fallback.
10149 if test "$cf_cv_wchar_t" != unknown ; then
10150         NCURSES_OK_WCHAR_T=1
10151 fi
10152
10153 # This is needed on Tru64 5.0 to declare wint_t
10154 echo "$as_me:10154: checking if we must include wchar.h to declare wint_t" >&5
10155 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10156 if test "${cf_cv_wint_t+set}" = set; then
10157   echo $ECHO_N "(cached) $ECHO_C" >&6
10158 else
10159
10160 cat >conftest.$ac_ext <<_ACEOF
10161 #line 10161 "configure"
10162 #include "confdefs.h"
10163
10164 #include <stdlib.h>
10165 #include <stdarg.h>
10166 #include <stdio.h>
10167 #ifdef HAVE_LIBUTF8_H
10168 #include <libutf8.h>
10169 #endif
10170 int
10171 main ()
10172 {
10173 wint_t state
10174   ;
10175   return 0;
10176 }
10177 _ACEOF
10178 rm -f conftest.$ac_objext
10179 if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
10180   (eval $ac_compile) 2>&5
10181   ac_status=$?
10182   echo "$as_me:10182: \$? = $ac_status" >&5
10183   (exit $ac_status); } &&
10184          { ac_try='test -s conftest.$ac_objext'
10185   { (eval echo "$as_me:10185: \"$ac_try\"") >&5
10186   (eval $ac_try) 2>&5
10187   ac_status=$?
10188   echo "$as_me:10188: \$? = $ac_status" >&5
10189   (exit $ac_status); }; }; then
10190   cf_cv_wint_t=no
10191 else
10192   echo "$as_me: failed program was:" >&5
10193 cat conftest.$ac_ext >&5
10194 cat >conftest.$ac_ext <<_ACEOF
10195 #line 10195 "configure"
10196 #include "confdefs.h"
10197
10198 #include <stdlib.h>
10199 #include <stdarg.h>
10200 #include <stdio.h>
10201 #include <wchar.h>
10202 #ifdef HAVE_LIBUTF8_H
10203 #include <libutf8.h>
10204 #endif
10205 int
10206 main ()
10207 {
10208 wint_t value
10209   ;
10210   return 0;
10211 }
10212 _ACEOF
10213 rm -f conftest.$ac_objext
10214 if { (eval echo "$as_me:10214: \"$ac_compile\"") >&5
10215   (eval $ac_compile) 2>&5
10216   ac_status=$?
10217   echo "$as_me:10217: \$? = $ac_status" >&5
10218   (exit $ac_status); } &&
10219          { ac_try='test -s conftest.$ac_objext'
10220   { (eval echo "$as_me:10220: \"$ac_try\"") >&5
10221   (eval $ac_try) 2>&5
10222   ac_status=$?
10223   echo "$as_me:10223: \$? = $ac_status" >&5
10224   (exit $ac_status); }; }; then
10225   cf_cv_wint_t=yes
10226 else
10227   echo "$as_me: failed program was:" >&5
10228 cat conftest.$ac_ext >&5
10229 cf_cv_wint_t=unknown
10230 fi
10231 rm -f conftest.$ac_objext conftest.$ac_ext
10232 fi
10233 rm -f conftest.$ac_objext conftest.$ac_ext
10234 fi
10235 echo "$as_me:10235: result: $cf_cv_wint_t" >&5
10236 echo "${ECHO_T}$cf_cv_wint_t" >&6
10237
10238 if test "$cf_cv_wint_t" = yes ; then
10239
10240 cat >>confdefs.h <<\EOF
10241 #define NEED_WCHAR_H 1
10242 EOF
10243
10244         NEED_WCHAR_H=1
10245 fi
10246
10247 # if we do not find wint_t in either place, use substitution to provide a fallback.
10248 if test "$cf_cv_wint_t" = unknown ; then
10249         NCURSES_WINT_T=1
10250 fi
10251
10252 # if we find wint_t in either place, use substitution to provide a fallback.
10253 if test "$cf_cv_wint_t" != unknown ; then
10254         NCURSES_OK_WINT_T=1
10255 fi
10256
10257         if test "$NCURSES_MBSTATE_T" != 0; then
10258
10259 cat >>confdefs.h <<\EOF
10260 #define NEED_MBSTATE_T_DEF 1
10261 EOF
10262
10263         fi
10264 fi
10265
10266 ###   use option --disable-lp64 to allow long chtype
10267 case $cf_cv_abi_version in
10268 ([345]*)
10269         default_with_lp64=no
10270         ;;
10271 (*)
10272         default_with_lp64=yes
10273         ;;
10274 esac
10275
10276 echo "$as_me:10276: checking whether to enable _LP64 definition in curses.h" >&5
10277 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10278
10279 # Check whether --enable-lp64 or --disable-lp64 was given.
10280 if test "${enable_lp64+set}" = set; then
10281   enableval="$enable_lp64"
10282   with_lp64=$enableval
10283 else
10284   with_lp64=$default_with_lp64
10285 fi;
10286 echo "$as_me:10286: result: $with_lp64" >&5
10287 echo "${ECHO_T}$with_lp64" >&6
10288
10289 if test "x$with_lp64" = xyes ; then
10290         cf_cv_enable_lp64=1
10291 else
10292         cf_cv_enable_lp64=0
10293 fi
10294
10295 # Check whether --enable-largefile or --disable-largefile was given.
10296 if test "${enable_largefile+set}" = set; then
10297   enableval="$enable_largefile"
10298
10299 fi;
10300 if test "$enable_largefile" != no; then
10301
10302   echo "$as_me:10302: checking for special C compiler options needed for large files" >&5
10303 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10304 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10305   echo $ECHO_N "(cached) $ECHO_C" >&6
10306 else
10307   ac_cv_sys_largefile_CC=no
10308      if test "$GCC" != yes; then
10309        ac_save_CC=$CC
10310        while :; do
10311          # IRIX 6.2 and later do not support large files by default,
10312          # so use the C compiler's -n32 option if that helps.
10313          cat >conftest.$ac_ext <<_ACEOF
10314 #line 10314 "configure"
10315 #include "confdefs.h"
10316 #include <sys/types.h>
10317  /* Check that off_t can represent 2**63 - 1 correctly.
10318     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10319     since some C++ compilers masquerading as C compilers
10320     incorrectly reject 9223372036854775807.  */
10321 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10322   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10323                        && LARGE_OFF_T % 2147483647 == 1)
10324                       ? 1 : -1];
10325 int
10326 main ()
10327 {
10328
10329   ;
10330   return 0;
10331 }
10332 _ACEOF
10333          rm -f conftest.$ac_objext
10334 if { (eval echo "$as_me:10334: \"$ac_compile\"") >&5
10335   (eval $ac_compile) 2>&5
10336   ac_status=$?
10337   echo "$as_me:10337: \$? = $ac_status" >&5
10338   (exit $ac_status); } &&
10339          { ac_try='test -s conftest.$ac_objext'
10340   { (eval echo "$as_me:10340: \"$ac_try\"") >&5
10341   (eval $ac_try) 2>&5
10342   ac_status=$?
10343   echo "$as_me:10343: \$? = $ac_status" >&5
10344   (exit $ac_status); }; }; then
10345   break
10346 else
10347   echo "$as_me: failed program was:" >&5
10348 cat conftest.$ac_ext >&5
10349 fi
10350 rm -f conftest.$ac_objext
10351          CC="$CC -n32"
10352          rm -f conftest.$ac_objext
10353 if { (eval echo "$as_me:10353: \"$ac_compile\"") >&5
10354   (eval $ac_compile) 2>&5
10355   ac_status=$?
10356   echo "$as_me:10356: \$? = $ac_status" >&5
10357   (exit $ac_status); } &&
10358          { ac_try='test -s conftest.$ac_objext'
10359   { (eval echo "$as_me:10359: \"$ac_try\"") >&5
10360   (eval $ac_try) 2>&5
10361   ac_status=$?
10362   echo "$as_me:10362: \$? = $ac_status" >&5
10363   (exit $ac_status); }; }; then
10364   ac_cv_sys_largefile_CC=' -n32'; break
10365 else
10366   echo "$as_me: failed program was:" >&5
10367 cat conftest.$ac_ext >&5
10368 fi
10369 rm -f conftest.$ac_objext
10370          break
10371        done
10372        CC=$ac_save_CC
10373        rm -f conftest.$ac_ext
10374     fi
10375 fi
10376 echo "$as_me:10376: result: $ac_cv_sys_largefile_CC" >&5
10377 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10378   if test "$ac_cv_sys_largefile_CC" != no; then
10379     CC=$CC$ac_cv_sys_largefile_CC
10380   fi
10381
10382   echo "$as_me:10382: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10383 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10384 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10385   echo $ECHO_N "(cached) $ECHO_C" >&6
10386 else
10387   while :; do
10388   ac_cv_sys_file_offset_bits=no
10389   cat >conftest.$ac_ext <<_ACEOF
10390 #line 10390 "configure"
10391 #include "confdefs.h"
10392 #include <sys/types.h>
10393  /* Check that off_t can represent 2**63 - 1 correctly.
10394     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10395     since some C++ compilers masquerading as C compilers
10396     incorrectly reject 9223372036854775807.  */
10397 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10398   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10399                        && LARGE_OFF_T % 2147483647 == 1)
10400                       ? 1 : -1];
10401 int
10402 main ()
10403 {
10404
10405   ;
10406   return 0;
10407 }
10408 _ACEOF
10409 rm -f conftest.$ac_objext
10410 if { (eval echo "$as_me:10410: \"$ac_compile\"") >&5
10411   (eval $ac_compile) 2>&5
10412   ac_status=$?
10413   echo "$as_me:10413: \$? = $ac_status" >&5
10414   (exit $ac_status); } &&
10415          { ac_try='test -s conftest.$ac_objext'
10416   { (eval echo "$as_me:10416: \"$ac_try\"") >&5
10417   (eval $ac_try) 2>&5
10418   ac_status=$?
10419   echo "$as_me:10419: \$? = $ac_status" >&5
10420   (exit $ac_status); }; }; then
10421   break
10422 else
10423   echo "$as_me: failed program was:" >&5
10424 cat conftest.$ac_ext >&5
10425 fi
10426 rm -f conftest.$ac_objext conftest.$ac_ext
10427   cat >conftest.$ac_ext <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430 #define _FILE_OFFSET_BITS 64
10431 #include <sys/types.h>
10432  /* Check that off_t can represent 2**63 - 1 correctly.
10433     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10434     since some C++ compilers masquerading as C compilers
10435     incorrectly reject 9223372036854775807.  */
10436 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10437   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10438                        && LARGE_OFF_T % 2147483647 == 1)
10439                       ? 1 : -1];
10440 int
10441 main ()
10442 {
10443
10444   ;
10445   return 0;
10446 }
10447 _ACEOF
10448 rm -f conftest.$ac_objext
10449 if { (eval echo "$as_me:10449: \"$ac_compile\"") >&5
10450   (eval $ac_compile) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit $ac_status); } &&
10454          { ac_try='test -s conftest.$ac_objext'
10455   { (eval echo "$as_me:10455: \"$ac_try\"") >&5
10456   (eval $ac_try) 2>&5
10457   ac_status=$?
10458   echo "$as_me:10458: \$? = $ac_status" >&5
10459   (exit $ac_status); }; }; then
10460   ac_cv_sys_file_offset_bits=64; break
10461 else
10462   echo "$as_me: failed program was:" >&5
10463 cat conftest.$ac_ext >&5
10464 fi
10465 rm -f conftest.$ac_objext conftest.$ac_ext
10466   break
10467 done
10468 fi
10469 echo "$as_me:10469: result: $ac_cv_sys_file_offset_bits" >&5
10470 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10471 if test "$ac_cv_sys_file_offset_bits" != no; then
10472
10473 cat >>confdefs.h <<EOF
10474 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10475 EOF
10476
10477 fi
10478 rm -rf conftest*
10479   echo "$as_me:10479: checking for _LARGE_FILES value needed for large files" >&5
10480 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10481 if test "${ac_cv_sys_large_files+set}" = set; then
10482   echo $ECHO_N "(cached) $ECHO_C" >&6
10483 else
10484   while :; do
10485   ac_cv_sys_large_files=no
10486   cat >conftest.$ac_ext <<_ACEOF
10487 #line 10487 "configure"
10488 #include "confdefs.h"
10489 #include <sys/types.h>
10490  /* Check that off_t can represent 2**63 - 1 correctly.
10491     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10492     since some C++ compilers masquerading as C compilers
10493     incorrectly reject 9223372036854775807.  */
10494 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10495   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10496                        && LARGE_OFF_T % 2147483647 == 1)
10497                       ? 1 : -1];
10498 int
10499 main ()
10500 {
10501
10502   ;
10503   return 0;
10504 }
10505 _ACEOF
10506 rm -f conftest.$ac_objext
10507 if { (eval echo "$as_me:10507: \"$ac_compile\"") >&5
10508   (eval $ac_compile) 2>&5
10509   ac_status=$?
10510   echo "$as_me:10510: \$? = $ac_status" >&5
10511   (exit $ac_status); } &&
10512          { ac_try='test -s conftest.$ac_objext'
10513   { (eval echo "$as_me:10513: \"$ac_try\"") >&5
10514   (eval $ac_try) 2>&5
10515   ac_status=$?
10516   echo "$as_me:10516: \$? = $ac_status" >&5
10517   (exit $ac_status); }; }; then
10518   break
10519 else
10520   echo "$as_me: failed program was:" >&5
10521 cat conftest.$ac_ext >&5
10522 fi
10523 rm -f conftest.$ac_objext conftest.$ac_ext
10524   cat >conftest.$ac_ext <<_ACEOF
10525 #line 10525 "configure"
10526 #include "confdefs.h"
10527 #define _LARGE_FILES 1
10528 #include <sys/types.h>
10529  /* Check that off_t can represent 2**63 - 1 correctly.
10530     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10531     since some C++ compilers masquerading as C compilers
10532     incorrectly reject 9223372036854775807.  */
10533 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10534   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10535                        && LARGE_OFF_T % 2147483647 == 1)
10536                       ? 1 : -1];
10537 int
10538 main ()
10539 {
10540
10541   ;
10542   return 0;
10543 }
10544 _ACEOF
10545 rm -f conftest.$ac_objext
10546 if { (eval echo "$as_me:10546: \"$ac_compile\"") >&5
10547   (eval $ac_compile) 2>&5
10548   ac_status=$?
10549   echo "$as_me:10549: \$? = $ac_status" >&5
10550   (exit $ac_status); } &&
10551          { ac_try='test -s conftest.$ac_objext'
10552   { (eval echo "$as_me:10552: \"$ac_try\"") >&5
10553   (eval $ac_try) 2>&5
10554   ac_status=$?
10555   echo "$as_me:10555: \$? = $ac_status" >&5
10556   (exit $ac_status); }; }; then
10557   ac_cv_sys_large_files=1; break
10558 else
10559   echo "$as_me: failed program was:" >&5
10560 cat conftest.$ac_ext >&5
10561 fi
10562 rm -f conftest.$ac_objext conftest.$ac_ext
10563   break
10564 done
10565 fi
10566 echo "$as_me:10566: result: $ac_cv_sys_large_files" >&5
10567 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10568 if test "$ac_cv_sys_large_files" != no; then
10569
10570 cat >>confdefs.h <<EOF
10571 #define _LARGE_FILES $ac_cv_sys_large_files
10572 EOF
10573
10574 fi
10575 rm -rf conftest*
10576 fi
10577
10578         if test "$enable_largefile" != no ; then
10579         echo "$as_me:10579: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10580 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10581 if test "${ac_cv_sys_largefile_source+set}" = set; then
10582   echo $ECHO_N "(cached) $ECHO_C" >&6
10583 else
10584   while :; do
10585   ac_cv_sys_largefile_source=no
10586   cat >conftest.$ac_ext <<_ACEOF
10587 #line 10587 "configure"
10588 #include "confdefs.h"
10589 #include <stdio.h>
10590 int
10591 main ()
10592 {
10593 return !fseeko;
10594   ;
10595   return 0;
10596 }
10597 _ACEOF
10598 rm -f conftest.$ac_objext
10599 if { (eval echo "$as_me:10599: \"$ac_compile\"") >&5
10600   (eval $ac_compile) 2>&5
10601   ac_status=$?
10602   echo "$as_me:10602: \$? = $ac_status" >&5
10603   (exit $ac_status); } &&
10604          { ac_try='test -s conftest.$ac_objext'
10605   { (eval echo "$as_me:10605: \"$ac_try\"") >&5
10606   (eval $ac_try) 2>&5
10607   ac_status=$?
10608   echo "$as_me:10608: \$? = $ac_status" >&5
10609   (exit $ac_status); }; }; then
10610   break
10611 else
10612   echo "$as_me: failed program was:" >&5
10613 cat conftest.$ac_ext >&5
10614 fi
10615 rm -f conftest.$ac_objext conftest.$ac_ext
10616   cat >conftest.$ac_ext <<_ACEOF
10617 #line 10617 "configure"
10618 #include "confdefs.h"
10619 #define _LARGEFILE_SOURCE 1
10620 #include <stdio.h>
10621 int
10622 main ()
10623 {
10624 return !fseeko;
10625   ;
10626   return 0;
10627 }
10628 _ACEOF
10629 rm -f conftest.$ac_objext
10630 if { (eval echo "$as_me:10630: \"$ac_compile\"") >&5
10631   (eval $ac_compile) 2>&5
10632   ac_status=$?
10633   echo "$as_me:10633: \$? = $ac_status" >&5
10634   (exit $ac_status); } &&
10635          { ac_try='test -s conftest.$ac_objext'
10636   { (eval echo "$as_me:10636: \"$ac_try\"") >&5
10637   (eval $ac_try) 2>&5
10638   ac_status=$?
10639   echo "$as_me:10639: \$? = $ac_status" >&5
10640   (exit $ac_status); }; }; then
10641   ac_cv_sys_largefile_source=1; break
10642 else
10643   echo "$as_me: failed program was:" >&5
10644 cat conftest.$ac_ext >&5
10645 fi
10646 rm -f conftest.$ac_objext conftest.$ac_ext
10647   break
10648 done
10649 fi
10650 echo "$as_me:10650: result: $ac_cv_sys_largefile_source" >&5
10651 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10652 if test "$ac_cv_sys_largefile_source" != no; then
10653
10654 cat >>confdefs.h <<EOF
10655 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10656 EOF
10657
10658 fi
10659 rm -rf conftest*
10660
10661 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10662 # in glibc 2.1.3, but that breaks too many other things.
10663 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10664 echo "$as_me:10664: checking for fseeko" >&5
10665 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10666 if test "${ac_cv_func_fseeko+set}" = set; then
10667   echo $ECHO_N "(cached) $ECHO_C" >&6
10668 else
10669   cat >conftest.$ac_ext <<_ACEOF
10670 #line 10670 "configure"
10671 #include "confdefs.h"
10672 #include <stdio.h>
10673 int
10674 main ()
10675 {
10676 return fseeko && fseeko (stdin, 0, 0);
10677   ;
10678   return 0;
10679 }
10680 _ACEOF
10681 rm -f conftest.$ac_objext conftest$ac_exeext
10682 if { (eval echo "$as_me:10682: \"$ac_link\"") >&5
10683   (eval $ac_link) 2>&5
10684   ac_status=$?
10685   echo "$as_me:10685: \$? = $ac_status" >&5
10686   (exit $ac_status); } &&
10687          { ac_try='test -s conftest$ac_exeext'
10688   { (eval echo "$as_me:10688: \"$ac_try\"") >&5
10689   (eval $ac_try) 2>&5
10690   ac_status=$?
10691   echo "$as_me:10691: \$? = $ac_status" >&5
10692   (exit $ac_status); }; }; then
10693   ac_cv_func_fseeko=yes
10694 else
10695   echo "$as_me: failed program was:" >&5
10696 cat conftest.$ac_ext >&5
10697 ac_cv_func_fseeko=no
10698 fi
10699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10700 fi
10701 echo "$as_me:10701: result: $ac_cv_func_fseeko" >&5
10702 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10703 if test $ac_cv_func_fseeko = yes; then
10704
10705 cat >>confdefs.h <<\EOF
10706 #define HAVE_FSEEKO 1
10707 EOF
10708
10709 fi
10710
10711         # Normally we would collect these definitions in the config.h,
10712         # but (like _XOPEN_SOURCE), some environments rely on having these
10713         # defined before any of the system headers are included.  Another
10714         # case comes up with C++, e.g., on AIX the compiler compiles the
10715         # header files by themselves before looking at the body files it is
10716         # told to compile.  For ncurses, those header files do not include
10717         # the config.h
10718         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10719         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10720         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10721
10722         echo "$as_me:10722: checking whether to use struct dirent64" >&5
10723 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10724 if test "${cf_cv_struct_dirent64+set}" = set; then
10725   echo $ECHO_N "(cached) $ECHO_C" >&6
10726 else
10727
10728                 cat >conftest.$ac_ext <<_ACEOF
10729 #line 10729 "configure"
10730 #include "confdefs.h"
10731
10732 #include <sys/types.h>
10733 #include <dirent.h>
10734
10735 int
10736 main ()
10737 {
10738
10739                 /* if transitional largefile support is setup, this is true */
10740                 extern struct dirent64 * readdir(DIR *);
10741                 struct dirent64 *x = readdir((DIR *)0);
10742                 struct dirent *y = readdir((DIR *)0);
10743                 int z = x - y;
10744
10745   ;
10746   return 0;
10747 }
10748 _ACEOF
10749 rm -f conftest.$ac_objext
10750 if { (eval echo "$as_me:10750: \"$ac_compile\"") >&5
10751   (eval $ac_compile) 2>&5
10752   ac_status=$?
10753   echo "$as_me:10753: \$? = $ac_status" >&5
10754   (exit $ac_status); } &&
10755          { ac_try='test -s conftest.$ac_objext'
10756   { (eval echo "$as_me:10756: \"$ac_try\"") >&5
10757   (eval $ac_try) 2>&5
10758   ac_status=$?
10759   echo "$as_me:10759: \$? = $ac_status" >&5
10760   (exit $ac_status); }; }; then
10761   cf_cv_struct_dirent64=yes
10762 else
10763   echo "$as_me: failed program was:" >&5
10764 cat conftest.$ac_ext >&5
10765 cf_cv_struct_dirent64=no
10766 fi
10767 rm -f conftest.$ac_objext conftest.$ac_ext
10768
10769 fi
10770 echo "$as_me:10770: result: $cf_cv_struct_dirent64" >&5
10771 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10772         test "$cf_cv_struct_dirent64" = yes &&
10773 cat >>confdefs.h <<\EOF
10774 #define HAVE_STRUCT_DIRENT64 1
10775 EOF
10776
10777         fi
10778
10779 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10780 echo "$as_me:10780: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10781 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10782
10783 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10784 if test "${enable_tparm_varargs+set}" = set; then
10785   enableval="$enable_tparm_varargs"
10786   with_tparm_varargs=$enableval
10787 else
10788   with_tparm_varargs=yes
10789 fi;
10790 echo "$as_me:10790: result: $with_tparm_varargs" >&5
10791 echo "${ECHO_T}$with_tparm_varargs" >&6
10792 NCURSES_TPARM_VARARGS=0
10793 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10794
10795 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10796 if test "$with_ticlib" != no ; then
10797 echo "$as_me:10797: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10798 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10799
10800 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10801 if test "${enable_tic_depends+set}" = set; then
10802   enableval="$enable_tic_depends"
10803   with_tic_depends=$enableval
10804 else
10805   with_tic_depends=yes
10806 fi;
10807 echo "$as_me:10807: result: $with_tic_depends" >&5
10808 echo "${ECHO_T}$with_tic_depends" >&6
10809 else
10810         with_tic_depends=no
10811 fi
10812
10813 ###   use option --with-bool to override bool's type
10814 echo "$as_me:10814: checking for type of bool" >&5
10815 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10816
10817 # Check whether --with-bool or --without-bool was given.
10818 if test "${with_bool+set}" = set; then
10819   withval="$with_bool"
10820   NCURSES_BOOL="$withval"
10821 else
10822   NCURSES_BOOL=auto
10823 fi;
10824 echo "$as_me:10824: result: $NCURSES_BOOL" >&5
10825 echo "${ECHO_T}$NCURSES_BOOL" >&6
10826
10827 echo "$as_me:10827: checking for alternate terminal capabilities file" >&5
10828 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10829
10830 # Check whether --with-caps or --without-caps was given.
10831 if test "${with_caps+set}" = set; then
10832   withval="$with_caps"
10833   TERMINFO_CAPS=Caps.$withval
10834 else
10835   TERMINFO_CAPS=Caps
10836 fi;
10837 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10838 echo "$as_me:10838: result: $TERMINFO_CAPS" >&5
10839 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10840
10841 ###   use option --with-chtype to override chtype's type
10842 echo "$as_me:10842: checking for type of chtype" >&5
10843 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10844
10845 # Check whether --with-chtype or --without-chtype was given.
10846 if test "${with_chtype+set}" = set; then
10847   withval="$with_chtype"
10848   NCURSES_CHTYPE="$withval"
10849 else
10850   NCURSES_CHTYPE=auto
10851 fi;
10852 echo "$as_me:10852: result: $NCURSES_CHTYPE" >&5
10853 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10854
10855 ###   use option --with-ospeed to override ospeed's type
10856 echo "$as_me:10856: checking for type of ospeed" >&5
10857 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10858
10859 # Check whether --with-ospeed or --without-ospeed was given.
10860 if test "${with_ospeed+set}" = set; then
10861   withval="$with_ospeed"
10862   NCURSES_OSPEED="$withval"
10863 else
10864   NCURSES_OSPEED=short
10865 fi;
10866 echo "$as_me:10866: result: $NCURSES_OSPEED" >&5
10867 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10868
10869 ###   use option --with-mmask-t to override mmask_t's type
10870 echo "$as_me:10870: checking for type of mmask_t" >&5
10871 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10872
10873 # Check whether --with-mmask-t or --without-mmask-t was given.
10874 if test "${with_mmask_t+set}" = set; then
10875   withval="$with_mmask_t"
10876   NCURSES_MMASK_T="$withval"
10877 else
10878   NCURSES_MMASK_T=auto
10879 fi;
10880 echo "$as_me:10880: result: $NCURSES_MMASK_T" >&5
10881 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10882
10883 ###   use option --with-ccharw-max to override CCHARW_MAX size
10884 echo "$as_me:10884: checking for size CCHARW_MAX" >&5
10885 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10886
10887 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10888 if test "${with_ccharw_max+set}" = set; then
10889   withval="$with_ccharw_max"
10890   NCURSES_CCHARW_MAX="$withval"
10891 else
10892   NCURSES_CCHARW_MAX=5
10893 fi;
10894 echo "$as_me:10894: result: $NCURSES_CCHARW_MAX" >&5
10895 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10896
10897 ###   use option --with-tparm-arg to override tparm's argument type
10898 echo "$as_me:10898: checking for type of tparm args" >&5
10899 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10900
10901 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10902 if test "${with_tparm_arg+set}" = set; then
10903   withval="$with_tparm_arg"
10904   NCURSES_TPARM_ARG="$withval"
10905 else
10906   NCURSES_TPARM_ARG=long
10907 fi;
10908 echo "$as_me:10908: result: $NCURSES_TPARM_ARG" >&5
10909 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10910
10911 ### Enable compiling-in rcs id's
10912 echo "$as_me:10912: checking if RCS identifiers should be compiled-in" >&5
10913 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10914
10915 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10916 if test "${with_rcs_ids+set}" = set; then
10917   withval="$with_rcs_ids"
10918   with_rcs_ids=$withval
10919 else
10920   with_rcs_ids=no
10921 fi;
10922 echo "$as_me:10922: result: $with_rcs_ids" >&5
10923 echo "${ECHO_T}$with_rcs_ids" >&6
10924 test "x$with_rcs_ids" = xyes &&
10925 cat >>confdefs.h <<\EOF
10926 #define USE_RCS_IDS 1
10927 EOF
10928
10929 ###############################################################################
10930
10931 echo "$as_me:10931: checking format of man-pages" >&5
10932 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10933
10934 # Check whether --with-manpage-format or --without-manpage-format was given.
10935 if test "${with_manpage_format+set}" = set; then
10936   withval="$with_manpage_format"
10937   MANPAGE_FORMAT=$withval
10938 else
10939   MANPAGE_FORMAT=unknown
10940 fi;
10941
10942 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10943 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10944
10945 cf_unknown=
10946
10947 case $MANPAGE_FORMAT in
10948 (unknown)
10949         if test -z "$MANPATH" ; then
10950                 MANPATH="/usr/man:/usr/share/man"
10951         fi
10952
10953         # look for the 'date' man-page (it's most likely to be installed!)
10954         MANPAGE_FORMAT=
10955         cf_preform=no
10956         cf_catonly=yes
10957         cf_example=date
10958
10959         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10960         for cf_dir in $MANPATH; do
10961                 test -z "$cf_dir" && cf_dir=/usr/man
10962                 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
10963                 do
10964                         cf_test=`echo $cf_name | sed -e 's/*//'`
10965                         if test "x$cf_test" = "x$cf_name" ; then
10966
10967                                 case "$cf_name" in
10968                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10969                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10970                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10971                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10972                                 esac
10973
10974                                 case "$cf_name" in
10975                                 ($cf_dir/man*)
10976                                         cf_catonly=no
10977                                         ;;
10978                                 ($cf_dir/cat*)
10979                                         cf_preform=yes
10980                                         ;;
10981                                 esac
10982                                 break
10983                         fi
10984
10985                         # if we found a match in either man* or cat*, stop looking
10986                         if test -n "$MANPAGE_FORMAT" ; then
10987                                 cf_found=no
10988                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10989                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10990                                 case "$cf_name" in
10991                                 ($cf_dir/cat*)
10992                                         cf_found=yes
10993                                         ;;
10994                                 esac
10995                                 test $cf_found=yes && break
10996                         fi
10997                 done
10998                 # only check the first directory in $MANPATH where we find manpages
10999                 if test -n "$MANPAGE_FORMAT" ; then
11000                         break
11001                 fi
11002         done
11003         # if we did not find the example, just assume it is normal
11004         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11005         IFS="$ac_save_ifs"
11006         ;;
11007 (*)
11008         for cf_option in $MANPAGE_FORMAT; do
11009         case $cf_option in
11010         (gzip|compress|BSDI|normal|formatted|catonly)
11011                 ;;
11012         (*)
11013                 cf_unknown="$cf_unknown $cf_option"
11014                 ;;
11015         esac
11016         done
11017         ;;
11018 esac
11019
11020 echo "$as_me:11020: result: $MANPAGE_FORMAT" >&5
11021 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11022 if test -n "$cf_unknown" ; then
11023         { echo "$as_me:11023: WARNING: Unexpected manpage-format $cf_unknown" >&5
11024 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11025 fi
11026
11027 echo "$as_me:11027: checking for manpage renaming" >&5
11028 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11029
11030 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11031 if test "${with_manpage_renames+set}" = set; then
11032   withval="$with_manpage_renames"
11033   MANPAGE_RENAMES=$withval
11034 else
11035   MANPAGE_RENAMES=yes
11036 fi;
11037
11038 case ".$MANPAGE_RENAMES" in
11039 (.no)
11040         ;;
11041 (.|.yes)
11042         # Debian 'man' program?
11043         if test -f /etc/debian_version ; then
11044                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11045         else
11046                 MANPAGE_RENAMES=no
11047         fi
11048         ;;
11049 esac
11050
11051 if test "$MANPAGE_RENAMES" != no ; then
11052         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11053                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11054         elif test ! -f $MANPAGE_RENAMES ; then
11055                 { { echo "$as_me:11055: error: not a filename: $MANPAGE_RENAMES" >&5
11056 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11057    { (exit 1); exit 1; }; }
11058         fi
11059
11060         test ! -d man && mkdir man
11061
11062         # Construct a sed-script to perform renaming within man-pages
11063         if test -n "$MANPAGE_RENAMES" ; then
11064                 test ! -d man && mkdir man
11065                 sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11066         fi
11067 fi
11068
11069 echo "$as_me:11069: result: $MANPAGE_RENAMES" >&5
11070 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11071
11072 echo "$as_me:11072: checking if manpage aliases will be installed" >&5
11073 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11074
11075 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11076 if test "${with_manpage_aliases+set}" = set; then
11077   withval="$with_manpage_aliases"
11078   MANPAGE_ALIASES=$withval
11079 else
11080   MANPAGE_ALIASES=yes
11081 fi;
11082
11083 echo "$as_me:11083: result: $MANPAGE_ALIASES" >&5
11084 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11085
11086 case "x$LN_S" in
11087 (xln*)
11088         cf_use_symlinks=yes
11089         ;;
11090 (*)
11091         cf_use_symlinks=no
11092         ;;
11093 esac
11094
11095 MANPAGE_SYMLINKS=no
11096 if test "$MANPAGE_ALIASES" = yes ; then
11097 echo "$as_me:11097: checking if manpage symlinks should be used" >&5
11098 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11099
11100 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11101 if test "${with_manpage_symlinks+set}" = set; then
11102   withval="$with_manpage_symlinks"
11103   MANPAGE_SYMLINKS=$withval
11104 else
11105   MANPAGE_SYMLINKS=$cf_use_symlinks
11106 fi;
11107
11108 if test "$$cf_use_symlinks" = no; then
11109 if test "$MANPAGE_SYMLINKS" = yes ; then
11110         { echo "$as_me:11110: WARNING: cannot make symlinks" >&5
11111 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11112         MANPAGE_SYMLINKS=no
11113 fi
11114 fi
11115
11116 echo "$as_me:11116: result: $MANPAGE_SYMLINKS" >&5
11117 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11118 fi
11119
11120 echo "$as_me:11120: checking for manpage tbl" >&5
11121 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11122
11123 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11124 if test "${with_manpage_tbl+set}" = set; then
11125   withval="$with_manpage_tbl"
11126   MANPAGE_TBL=$withval
11127 else
11128   MANPAGE_TBL=no
11129 fi;
11130
11131 echo "$as_me:11131: result: $MANPAGE_TBL" >&5
11132 echo "${ECHO_T}$MANPAGE_TBL" >&6
11133
11134 if test "$prefix" = "NONE" ; then
11135         cf_prefix="$ac_default_prefix"
11136 else
11137         cf_prefix="$prefix"
11138 fi
11139
11140 case "$MANPAGE_FORMAT" in
11141 (*catonly*)
11142         cf_format=yes
11143         cf_inboth=no
11144         ;;
11145 (*formatted*)
11146         cf_format=yes
11147         cf_inboth=yes
11148         ;;
11149 (*)
11150         cf_format=no
11151         cf_inboth=no
11152         ;;
11153 esac
11154
11155 test ! -d man && mkdir man
11156
11157 cf_so_strip=
11158 cf_compress=
11159 case "$MANPAGE_FORMAT" in
11160 (*compress*)
11161         cf_so_strip="Z"
11162         cf_compress=compress
11163         ;;
11164 (*gzip*)
11165         cf_so_strip="gz"
11166         cf_compress=gzip
11167         ;;
11168 esac
11169
11170 cf_edit_man=./edit_man.sh
11171 cf_man_alias=`pwd`/man_alias.sed
11172
11173 cat >$cf_edit_man <<CF_EOF
11174 #! /bin/sh
11175 # this script is generated by the configure-script CF_MAN_PAGES macro.
11176
11177 prefix="$cf_prefix"
11178 datarootdir="$datarootdir"
11179 datadir="$datadir"
11180
11181 NCURSES_MAJOR="$NCURSES_MAJOR"
11182 NCURSES_MINOR="$NCURSES_MINOR"
11183 NCURSES_PATCH="$NCURSES_PATCH"
11184
11185 NCURSES_OSPEED="$NCURSES_OSPEED"
11186 TERMINFO="$TERMINFO"
11187
11188 INSTALL="$INSTALL"
11189 INSTALL_DATA="$INSTALL_DATA"
11190
11191 transform="$program_transform_name"
11192
11193 TMP=\${TMPDIR:=/tmp}/man\$\$
11194 trap "rm -f \$TMP" 0 1 2 5 15
11195
11196 form=\$1
11197 shift || exit 1
11198
11199 verb=\$1
11200 shift || exit 1
11201
11202 mandir=\$1
11203 shift || exit 1
11204
11205 srcdir=\$1
11206 top_srcdir=\$srcdir/..
11207 shift || exit 1
11208
11209 if test "\$form" = normal ; then
11210         if test "$cf_format" = yes ; then
11211         if test "$cf_inboth" = no ; then
11212                 sh \$0 format \$verb \$mandir \$srcdir \$*
11213                 exit $?
11214         fi
11215         fi
11216         cf_subdir=\$mandir/man
11217         cf_tables=$MANPAGE_TBL
11218 else
11219         cf_subdir=\$mandir/cat
11220         cf_tables=yes
11221 fi
11222
11223 # process the list of source-files
11224 for i in \$* ; do
11225 case \$i in
11226 (*.orig|*.rej) ;;
11227 (*.[0-9]*)
11228         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11229         if test \$verb = installing ; then
11230         if test ! -d \$cf_subdir\${section} ; then
11231                 mkdir -p \$cf_subdir\$section
11232         fi
11233         fi
11234
11235         # replace variables in man page
11236         if test ! -f $cf_man_alias ; then
11237 cat >>$cf_man_alias <<-CF_EOF2
11238                 s,@DATADIR@,\$datadir,g
11239                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11240                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11241                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11242                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11243                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11244                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11245 CF_EOF
11246
11247         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11248         do
11249                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11250                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11251 cat >>$cf_edit_man <<-CF_EOF
11252                 s,@$cf_NAME@,$cf_name,g
11253 CF_EOF
11254         done
11255
11256 cat >>$cf_edit_man <<CF_EOF
11257 CF_EOF2
11258                 echo "...made $cf_man_alias"
11259         fi
11260
11261         aliases=
11262         cf_source=\`basename \$i\`
11263         inalias=\$cf_source
11264         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11265         if test ! -f \$inalias ; then
11266                 echo .. skipped \$cf_source
11267                 continue
11268         fi
11269 CF_EOF
11270
11271 if test "$MANPAGE_ALIASES" != no ; then
11272 cat >>$cf_edit_man <<CF_EOF
11273         nCurses=ignore.3x
11274         test $with_curses_h = yes && nCurses=ncurses.3x
11275         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11276 CF_EOF
11277 fi
11278
11279 if test "$MANPAGE_RENAMES" = no ; then
11280 cat >>$cf_edit_man <<CF_EOF
11281         # perform program transformations for section 1 man pages
11282         if test \$section = 1 ; then
11283                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11284         else
11285                 cf_target=\$cf_subdir\${section}/\$cf_source
11286         fi
11287 CF_EOF
11288 else
11289 cat >>$cf_edit_man <<CF_EOF
11290         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11291         if test -z "\$cf_target" ; then
11292                 echo '? missing rename for '\$cf_source
11293                 cf_target="\$cf_source"
11294         fi
11295         cf_target="\$cf_subdir\${section}/\${cf_target}"
11296
11297 CF_EOF
11298 fi
11299
11300 cat >>$cf_edit_man <<CF_EOF
11301         sed     -f $cf_man_alias \\
11302 CF_EOF
11303
11304 if test -f $MANPAGE_RENAMES ; then
11305 cat >>$cf_edit_man <<CF_EOF
11306                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11307 CF_EOF
11308 else
11309 cat >>$cf_edit_man <<CF_EOF
11310                 < \$i >\$TMP
11311 CF_EOF
11312 fi
11313
11314 cat >>$cf_edit_man <<CF_EOF
11315 if test \$cf_tables = yes ; then
11316         tbl \$TMP >\$TMP.out
11317         mv \$TMP.out \$TMP
11318 fi
11319 CF_EOF
11320
11321 if test $with_overwrite != yes ; then
11322 cat >>$cf_edit_man <<CF_EOF
11323         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11324         mv \$TMP.out \$TMP
11325 CF_EOF
11326 fi
11327
11328 if test $with_curses_h != yes ; then
11329 cat >>$cf_edit_man <<CF_EOF
11330         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11331         mv \$TMP.out \$TMP
11332 CF_EOF
11333 fi
11334
11335 cat >>$cf_edit_man <<CF_EOF
11336         if test \$form = format ; then
11337                 nroff -man \$TMP >\$TMP.out
11338                 mv \$TMP.out \$TMP
11339         fi
11340 CF_EOF
11341
11342 if test -n "$cf_compress" ; then
11343 cat >>$cf_edit_man <<CF_EOF
11344         if test \$verb = installing ; then
11345         if ( $cf_compress -f \$TMP )
11346         then
11347                 mv \$TMP.$cf_so_strip \$TMP
11348         fi
11349         fi
11350         cf_target="\$cf_target.$cf_so_strip"
11351 CF_EOF
11352 fi
11353
11354 case "$MANPAGE_FORMAT" in
11355 (*BSDI*)
11356 cat >>$cf_edit_man <<CF_EOF
11357         if test \$form = format ; then
11358                 # BSDI installs only .0 suffixes in the cat directories
11359                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11360         fi
11361 CF_EOF
11362   ;;
11363 esac
11364
11365 cat >>$cf_edit_man <<CF_EOF
11366         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11367         if test \$verb = installing ; then
11368                 echo \$verb \$cf_target
11369                 \$INSTALL_DATA \$TMP \$cf_target
11370                 test -d \$cf_subdir\${section} &&
11371                 test -n "\$aliases" && (
11372                         cd \$cf_subdir\${section} && (
11373                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11374                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11375                                 cf_target=\`basename \$cf_target\`
11376                                 for cf_alias in \$aliases
11377                                 do
11378                                         if test \$section = 1 ; then
11379                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11380                                         fi
11381
11382                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11383                                                 if test -f \$cf_alias\${suffix} ; then
11384                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11385                                                         then
11386                                                                 continue
11387                                                         fi
11388                                                 fi
11389                                                 echo .. \$verb alias \$cf_alias\${suffix}
11390 CF_EOF
11391 case "x$LN_S" in
11392 (*-f)
11393 cat >>$cf_edit_man <<CF_EOF
11394                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11395 CF_EOF
11396         ;;
11397 (*)
11398 cat >>$cf_edit_man <<CF_EOF
11399                                                 rm -f \$cf_alias\${suffix}
11400                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11401 CF_EOF
11402         ;;
11403 esac
11404 cat >>$cf_edit_man <<CF_EOF
11405                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11406                                                 echo ".so \$cf_source" >\$TMP
11407 CF_EOF
11408 if test -n "$cf_compress" ; then
11409 cat >>$cf_edit_man <<CF_EOF
11410                                                 if test -n "$cf_so_strip" ; then
11411                                                         $cf_compress -f \$TMP
11412                                                         mv \$TMP.$cf_so_strip \$TMP
11413                                                 fi
11414 CF_EOF
11415 fi
11416 cat >>$cf_edit_man <<CF_EOF
11417                                                 echo .. \$verb alias \$cf_alias\${suffix}
11418                                                 rm -f \$cf_alias\${suffix}
11419                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11420                                         fi
11421                                 done
11422                         )
11423                 )
11424         elif test \$verb = removing ; then
11425                 test -f \$cf_target && (
11426                         echo \$verb \$cf_target
11427                         rm -f \$cf_target
11428                 )
11429                 test -d \$cf_subdir\${section} &&
11430                 test -n "\$aliases" && (
11431                         cd \$cf_subdir\${section} && (
11432                                 for cf_alias in \$aliases
11433                                 do
11434                                         if test \$section = 1 ; then
11435                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11436                                         fi
11437
11438                                         echo .. \$verb alias \$cf_alias\${suffix}
11439                                         rm -f \$cf_alias\${suffix}
11440                                 done
11441                         )
11442                 )
11443         else
11444 #               echo ".hy 0"
11445                 cat \$TMP
11446         fi
11447         ;;
11448 esac
11449 done
11450
11451 if test $cf_inboth = yes ; then
11452 if test \$form != format ; then
11453         sh \$0 format \$verb \$mandir \$srcdir \$*
11454 fi
11455 fi
11456
11457 exit 0
11458 CF_EOF
11459 chmod 755 $cf_edit_man
11460
11461 ###############################################################################
11462
11463 ### Note that some functions (such as const) are normally disabled anyway.
11464 echo "$as_me:11464: checking if you want to build with function extensions" >&5
11465 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11466
11467 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11468 if test "${enable_ext_funcs+set}" = set; then
11469   enableval="$enable_ext_funcs"
11470   with_ext_funcs=$enableval
11471 else
11472   with_ext_funcs=yes
11473 fi;
11474 echo "$as_me:11474: result: $with_ext_funcs" >&5
11475 echo "${ECHO_T}$with_ext_funcs" >&6
11476 if test "x$with_ext_funcs" = xyes ; then
11477         NCURSES_EXT_FUNCS=1
11478
11479 cat >>confdefs.h <<\EOF
11480 #define HAVE_ASSUME_DEFAULT_COLORS 1
11481 EOF
11482
11483 cat >>confdefs.h <<\EOF
11484 #define HAVE_CURSES_VERSION 1
11485 EOF
11486
11487 cat >>confdefs.h <<\EOF
11488 #define HAVE_HAS_KEY 1
11489 EOF
11490
11491 cat >>confdefs.h <<\EOF
11492 #define HAVE_RESIZETERM 1
11493 EOF
11494
11495 cat >>confdefs.h <<\EOF
11496 #define HAVE_RESIZE_TERM 1
11497 EOF
11498
11499 cat >>confdefs.h <<\EOF
11500 #define HAVE_TERM_ENTRY_H 1
11501 EOF
11502
11503 cat >>confdefs.h <<\EOF
11504 #define HAVE_USE_DEFAULT_COLORS 1
11505 EOF
11506
11507 cat >>confdefs.h <<\EOF
11508 #define HAVE_USE_SCREEN 1
11509 EOF
11510
11511 cat >>confdefs.h <<\EOF
11512 #define HAVE_USE_WINDOW 1
11513 EOF
11514
11515 cat >>confdefs.h <<\EOF
11516 #define HAVE_WRESIZE 1
11517 EOF
11518
11519 cat >>confdefs.h <<\EOF
11520 #define NCURSES_EXT_FUNCS 1
11521 EOF
11522
11523         GENERATED_EXT_FUNCS=generated
11524 else
11525         NCURSES_EXT_FUNCS=0
11526         GENERATED_EXT_FUNCS=
11527 fi
11528
11529 echo "$as_me:11529: checking if you want to build with experimental SCREEN extensions" >&5
11530 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11531
11532 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11533 if test "${enable_sp_funcs+set}" = set; then
11534   enableval="$enable_sp_funcs"
11535   with_sp_funcs=$enableval
11536 else
11537   with_sp_funcs=no
11538 fi;
11539 echo "$as_me:11539: result: $with_sp_funcs" >&5
11540 echo "${ECHO_T}$with_sp_funcs" >&6
11541 if test "x$with_sp_funcs" = xyes ; then
11542         NCURSES_SP_FUNCS=1
11543
11544 cat >>confdefs.h <<\EOF
11545 #define NCURSES_SP_FUNCS 1
11546 EOF
11547
11548         GENERATED_SP_FUNCS=generated
11549 else
11550         NCURSES_SP_FUNCS=0
11551         GENERATED_SP_FUNCS=
11552 fi
11553
11554 echo "$as_me:11554: checking if you want to build with experimental terminal-driver" >&5
11555 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11556
11557 # Check whether --enable-term-driver or --disable-term-driver was given.
11558 if test "${enable_term_driver+set}" = set; then
11559   enableval="$enable_term_driver"
11560   with_term_driver=$enableval
11561 else
11562   with_term_driver=no
11563 fi;
11564 echo "$as_me:11564: result: $with_term_driver" >&5
11565 echo "${ECHO_T}$with_term_driver" >&6
11566 if test "x$with_term_driver" = xyes ; then
11567
11568 cat >>confdefs.h <<\EOF
11569 #define USE_TERM_DRIVER 1
11570 EOF
11571
11572         if test "x$with_sp_funcs" != xyes ; then
11573                 { { echo "$as_me:11573: error: The term-driver option relies upon sp-funcs" >&5
11574 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11575    { (exit 1); exit 1; }; }
11576         fi
11577 fi
11578
11579 ###   use option --enable-const to turn on use of const beyond that in XSI.
11580 echo "$as_me:11580: checking for extended use of const keyword" >&5
11581 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11582
11583 # Check whether --enable-const or --disable-const was given.
11584 if test "${enable_const+set}" = set; then
11585   enableval="$enable_const"
11586   with_ext_const=$enableval
11587 else
11588   with_ext_const=no
11589 fi;
11590 echo "$as_me:11590: result: $with_ext_const" >&5
11591 echo "${ECHO_T}$with_ext_const" >&6
11592 NCURSES_CONST='/*nothing*/'
11593 if test "x$with_ext_const" = xyes ; then
11594         NCURSES_CONST=const
11595 fi
11596
11597 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11598 echo "$as_me:11598: checking if you want to use extended colors" >&5
11599 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11600
11601 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11602 if test "${enable_ext_colors+set}" = set; then
11603   enableval="$enable_ext_colors"
11604   with_ext_colors=$enableval
11605 else
11606   with_ext_colors=no
11607 fi;
11608 echo "$as_me:11608: result: $with_ext_colors" >&5
11609 echo "${ECHO_T}$with_ext_colors" >&6
11610 NCURSES_EXT_COLORS=0
11611 if test "x$with_ext_colors" = xyes ; then
11612         if test "x$with_widec" != xyes ; then
11613                 { { echo "$as_me:11613: error: This option applies only to wide-character library" >&5
11614 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11615    { (exit 1); exit 1; }; }
11616         else
11617                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11618
11619 if test "${with_abi_version+set}" != set; then
11620         case $cf_cv_rel_version in
11621         (5.*)
11622                 cf_cv_rel_version=6.0
11623                 cf_cv_abi_version=6
11624                 { echo "$as_me:11624: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11625 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11626                 ;;
11627         esac
11628 fi
11629
11630         fi
11631         NCURSES_EXT_COLORS=1
11632
11633 cat >>confdefs.h <<\EOF
11634 #define NCURSES_EXT_COLORS 1
11635 EOF
11636
11637 fi
11638
11639 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11640 echo "$as_me:11640: checking if you want to use extended mouse encoding" >&5
11641 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11642
11643 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11644 if test "${enable_ext_mouse+set}" = set; then
11645   enableval="$enable_ext_mouse"
11646   with_ext_mouse=$enableval
11647 else
11648   with_ext_mouse=no
11649 fi;
11650 echo "$as_me:11650: result: $with_ext_mouse" >&5
11651 echo "${ECHO_T}$with_ext_mouse" >&6
11652 NCURSES_MOUSE_VERSION=1
11653 if test "x$with_ext_mouse" = xyes ; then
11654         NCURSES_MOUSE_VERSION=2
11655
11656 if test "${with_abi_version+set}" != set; then
11657         case $cf_cv_rel_version in
11658         (5.*)
11659                 cf_cv_rel_version=6.0
11660                 cf_cv_abi_version=6
11661                 { echo "$as_me:11661: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11662 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11663                 ;;
11664         esac
11665 fi
11666
11667 fi
11668
11669 ###   use option --enable-ext-putwin to turn on extended screendumps
11670 echo "$as_me:11670: checking if you want to use extended putwin/screendump" >&5
11671 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11672
11673 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11674 if test "${enable_ext_putwin+set}" = set; then
11675   enableval="$enable_ext_putwin"
11676   with_ext_putwin=$enableval
11677 else
11678   with_ext_putwin=no
11679 fi;
11680 echo "$as_me:11680: result: $with_ext_putwin" >&5
11681 echo "${ECHO_T}$with_ext_putwin" >&6
11682 if test "x$with_ext_putwin" = xyes ; then
11683
11684 cat >>confdefs.h <<\EOF
11685 #define NCURSES_EXT_PUTWIN 1
11686 EOF
11687
11688 fi
11689
11690 echo "$as_me:11690: checking if you want \$NCURSES_NO_PADDING code" >&5
11691 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11692
11693 # Check whether --enable-no-padding or --disable-no-padding was given.
11694 if test "${enable_no_padding+set}" = set; then
11695   enableval="$enable_no_padding"
11696   with_no_padding=$enableval
11697 else
11698   with_no_padding=$with_ext_funcs
11699 fi;
11700 echo "$as_me:11700: result: $with_no_padding" >&5
11701 echo "${ECHO_T}$with_no_padding" >&6
11702 test "x$with_no_padding" = xyes &&
11703 cat >>confdefs.h <<\EOF
11704 #define NCURSES_NO_PADDING 1
11705 EOF
11706
11707 echo "$as_me:11707: checking for ANSI C header files" >&5
11708 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11709 if test "${ac_cv_header_stdc+set}" = set; then
11710   echo $ECHO_N "(cached) $ECHO_C" >&6
11711 else
11712   cat >conftest.$ac_ext <<_ACEOF
11713 #line 11713 "configure"
11714 #include "confdefs.h"
11715 #include <stdlib.h>
11716 #include <stdarg.h>
11717 #include <string.h>
11718 #include <float.h>
11719
11720 _ACEOF
11721 if { (eval echo "$as_me:11721: \"$ac_cpp conftest.$ac_ext\"") >&5
11722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11723   ac_status=$?
11724   egrep -v '^ *\+' conftest.er1 >conftest.err
11725   rm -f conftest.er1
11726   cat conftest.err >&5
11727   echo "$as_me:11727: \$? = $ac_status" >&5
11728   (exit $ac_status); } >/dev/null; then
11729   if test -s conftest.err; then
11730     ac_cpp_err=$ac_c_preproc_warn_flag
11731   else
11732     ac_cpp_err=
11733   fi
11734 else
11735   ac_cpp_err=yes
11736 fi
11737 if test -z "$ac_cpp_err"; then
11738   ac_cv_header_stdc=yes
11739 else
11740   echo "$as_me: failed program was:" >&5
11741   cat conftest.$ac_ext >&5
11742   ac_cv_header_stdc=no
11743 fi
11744 rm -f conftest.err conftest.$ac_ext
11745
11746 if test $ac_cv_header_stdc = yes; then
11747   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11748   cat >conftest.$ac_ext <<_ACEOF
11749 #line 11749 "configure"
11750 #include "confdefs.h"
11751 #include <string.h>
11752
11753 _ACEOF
11754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11755   egrep "memchr" >/dev/null 2>&1; then
11756   :
11757 else
11758   ac_cv_header_stdc=no
11759 fi
11760 rm -rf conftest*
11761
11762 fi
11763
11764 if test $ac_cv_header_stdc = yes; then
11765   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11766   cat >conftest.$ac_ext <<_ACEOF
11767 #line 11767 "configure"
11768 #include "confdefs.h"
11769 #include <stdlib.h>
11770
11771 _ACEOF
11772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11773   egrep "free" >/dev/null 2>&1; then
11774   :
11775 else
11776   ac_cv_header_stdc=no
11777 fi
11778 rm -rf conftest*
11779
11780 fi
11781
11782 if test $ac_cv_header_stdc = yes; then
11783   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11784   if test "$cross_compiling" = yes; then
11785   :
11786 else
11787   cat >conftest.$ac_ext <<_ACEOF
11788 #line 11788 "configure"
11789 #include "confdefs.h"
11790 #include <ctype.h>
11791 #if ((' ' & 0x0FF) == 0x020)
11792 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11793 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11794 #else
11795 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11796                      || ('j' <= (c) && (c) <= 'r') \
11797                      || ('s' <= (c) && (c) <= 'z'))
11798 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11799 #endif
11800
11801 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11802 int
11803 main ()
11804 {
11805   int i;
11806   for (i = 0; i < 256; i++)
11807     if (XOR (islower (i), ISLOWER (i))
11808         || toupper (i) != TOUPPER (i))
11809       $ac_main_return(2);
11810   $ac_main_return (0);
11811 }
11812 _ACEOF
11813 rm -f conftest$ac_exeext
11814 if { (eval echo "$as_me:11814: \"$ac_link\"") >&5
11815   (eval $ac_link) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11819   { (eval echo "$as_me:11819: \"$ac_try\"") >&5
11820   (eval $ac_try) 2>&5
11821   ac_status=$?
11822   echo "$as_me:11822: \$? = $ac_status" >&5
11823   (exit $ac_status); }; }; then
11824   :
11825 else
11826   echo "$as_me: program exited with status $ac_status" >&5
11827 echo "$as_me: failed program was:" >&5
11828 cat conftest.$ac_ext >&5
11829 ac_cv_header_stdc=no
11830 fi
11831 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11832 fi
11833 fi
11834 fi
11835 echo "$as_me:11835: result: $ac_cv_header_stdc" >&5
11836 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11837 if test $ac_cv_header_stdc = yes; then
11838
11839 cat >>confdefs.h <<\EOF
11840 #define STDC_HEADERS 1
11841 EOF
11842
11843 fi
11844
11845 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11846
11847 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11848                   inttypes.h stdint.h unistd.h
11849 do
11850 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11851 echo "$as_me:11851: checking for $ac_header" >&5
11852 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11853 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11854   echo $ECHO_N "(cached) $ECHO_C" >&6
11855 else
11856   cat >conftest.$ac_ext <<_ACEOF
11857 #line 11857 "configure"
11858 #include "confdefs.h"
11859 $ac_includes_default
11860 #include <$ac_header>
11861 _ACEOF
11862 rm -f conftest.$ac_objext
11863 if { (eval echo "$as_me:11863: \"$ac_compile\"") >&5
11864   (eval $ac_compile) 2>&5
11865   ac_status=$?
11866   echo "$as_me:11866: \$? = $ac_status" >&5
11867   (exit $ac_status); } &&
11868          { ac_try='test -s conftest.$ac_objext'
11869   { (eval echo "$as_me:11869: \"$ac_try\"") >&5
11870   (eval $ac_try) 2>&5
11871   ac_status=$?
11872   echo "$as_me:11872: \$? = $ac_status" >&5
11873   (exit $ac_status); }; }; then
11874   eval "$as_ac_Header=yes"
11875 else
11876   echo "$as_me: failed program was:" >&5
11877 cat conftest.$ac_ext >&5
11878 eval "$as_ac_Header=no"
11879 fi
11880 rm -f conftest.$ac_objext conftest.$ac_ext
11881 fi
11882 echo "$as_me:11882: result: `eval echo '${'$as_ac_Header'}'`" >&5
11883 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11884 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11885   cat >>confdefs.h <<EOF
11886 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11887 EOF
11888
11889 fi
11890 done
11891
11892 echo "$as_me:11892: checking for signed char" >&5
11893 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11894 if test "${ac_cv_type_signed_char+set}" = set; then
11895   echo $ECHO_N "(cached) $ECHO_C" >&6
11896 else
11897   cat >conftest.$ac_ext <<_ACEOF
11898 #line 11898 "configure"
11899 #include "confdefs.h"
11900 $ac_includes_default
11901 int
11902 main ()
11903 {
11904 if ((signed char *) 0)
11905   return 0;
11906 if (sizeof (signed char))
11907   return 0;
11908   ;
11909   return 0;
11910 }
11911 _ACEOF
11912 rm -f conftest.$ac_objext
11913 if { (eval echo "$as_me:11913: \"$ac_compile\"") >&5
11914   (eval $ac_compile) 2>&5
11915   ac_status=$?
11916   echo "$as_me:11916: \$? = $ac_status" >&5
11917   (exit $ac_status); } &&
11918          { ac_try='test -s conftest.$ac_objext'
11919   { (eval echo "$as_me:11919: \"$ac_try\"") >&5
11920   (eval $ac_try) 2>&5
11921   ac_status=$?
11922   echo "$as_me:11922: \$? = $ac_status" >&5
11923   (exit $ac_status); }; }; then
11924   ac_cv_type_signed_char=yes
11925 else
11926   echo "$as_me: failed program was:" >&5
11927 cat conftest.$ac_ext >&5
11928 ac_cv_type_signed_char=no
11929 fi
11930 rm -f conftest.$ac_objext conftest.$ac_ext
11931 fi
11932 echo "$as_me:11932: result: $ac_cv_type_signed_char" >&5
11933 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11934
11935 echo "$as_me:11935: checking size of signed char" >&5
11936 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11937 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11938   echo $ECHO_N "(cached) $ECHO_C" >&6
11939 else
11940   if test "$ac_cv_type_signed_char" = yes; then
11941   if test "$cross_compiling" = yes; then
11942   # Depending upon the size, compute the lo and hi bounds.
11943 cat >conftest.$ac_ext <<_ACEOF
11944 #line 11944 "configure"
11945 #include "confdefs.h"
11946 $ac_includes_default
11947 int
11948 main ()
11949 {
11950 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11951   ;
11952   return 0;
11953 }
11954 _ACEOF
11955 rm -f conftest.$ac_objext
11956 if { (eval echo "$as_me:11956: \"$ac_compile\"") >&5
11957   (eval $ac_compile) 2>&5
11958   ac_status=$?
11959   echo "$as_me:11959: \$? = $ac_status" >&5
11960   (exit $ac_status); } &&
11961          { ac_try='test -s conftest.$ac_objext'
11962   { (eval echo "$as_me:11962: \"$ac_try\"") >&5
11963   (eval $ac_try) 2>&5
11964   ac_status=$?
11965   echo "$as_me:11965: \$? = $ac_status" >&5
11966   (exit $ac_status); }; }; then
11967   ac_lo=0 ac_mid=0
11968   while :; do
11969     cat >conftest.$ac_ext <<_ACEOF
11970 #line 11970 "configure"
11971 #include "confdefs.h"
11972 $ac_includes_default
11973 int
11974 main ()
11975 {
11976 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11977   ;
11978   return 0;
11979 }
11980 _ACEOF
11981 rm -f conftest.$ac_objext
11982 if { (eval echo "$as_me:11982: \"$ac_compile\"") >&5
11983   (eval $ac_compile) 2>&5
11984   ac_status=$?
11985   echo "$as_me:11985: \$? = $ac_status" >&5
11986   (exit $ac_status); } &&
11987          { ac_try='test -s conftest.$ac_objext'
11988   { (eval echo "$as_me:11988: \"$ac_try\"") >&5
11989   (eval $ac_try) 2>&5
11990   ac_status=$?
11991   echo "$as_me:11991: \$? = $ac_status" >&5
11992   (exit $ac_status); }; }; then
11993   ac_hi=$ac_mid; break
11994 else
11995   echo "$as_me: failed program was:" >&5
11996 cat conftest.$ac_ext >&5
11997 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11998 fi
11999 rm -f conftest.$ac_objext conftest.$ac_ext
12000   done
12001 else
12002   echo "$as_me: failed program was:" >&5
12003 cat conftest.$ac_ext >&5
12004 ac_hi=-1 ac_mid=-1
12005   while :; do
12006     cat >conftest.$ac_ext <<_ACEOF
12007 #line 12007 "configure"
12008 #include "confdefs.h"
12009 $ac_includes_default
12010 int
12011 main ()
12012 {
12013 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12014   ;
12015   return 0;
12016 }
12017 _ACEOF
12018 rm -f conftest.$ac_objext
12019 if { (eval echo "$as_me:12019: \"$ac_compile\"") >&5
12020   (eval $ac_compile) 2>&5
12021   ac_status=$?
12022   echo "$as_me:12022: \$? = $ac_status" >&5
12023   (exit $ac_status); } &&
12024          { ac_try='test -s conftest.$ac_objext'
12025   { (eval echo "$as_me:12025: \"$ac_try\"") >&5
12026   (eval $ac_try) 2>&5
12027   ac_status=$?
12028   echo "$as_me:12028: \$? = $ac_status" >&5
12029   (exit $ac_status); }; }; then
12030   ac_lo=$ac_mid; break
12031 else
12032   echo "$as_me: failed program was:" >&5
12033 cat conftest.$ac_ext >&5
12034 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12035 fi
12036 rm -f conftest.$ac_objext conftest.$ac_ext
12037   done
12038 fi
12039 rm -f conftest.$ac_objext conftest.$ac_ext
12040 # Binary search between lo and hi bounds.
12041 while test "x$ac_lo" != "x$ac_hi"; do
12042   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12043   cat >conftest.$ac_ext <<_ACEOF
12044 #line 12044 "configure"
12045 #include "confdefs.h"
12046 $ac_includes_default
12047 int
12048 main ()
12049 {
12050 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12051   ;
12052   return 0;
12053 }
12054 _ACEOF
12055 rm -f conftest.$ac_objext
12056 if { (eval echo "$as_me:12056: \"$ac_compile\"") >&5
12057   (eval $ac_compile) 2>&5
12058   ac_status=$?
12059   echo "$as_me:12059: \$? = $ac_status" >&5
12060   (exit $ac_status); } &&
12061          { ac_try='test -s conftest.$ac_objext'
12062   { (eval echo "$as_me:12062: \"$ac_try\"") >&5
12063   (eval $ac_try) 2>&5
12064   ac_status=$?
12065   echo "$as_me:12065: \$? = $ac_status" >&5
12066   (exit $ac_status); }; }; then
12067   ac_hi=$ac_mid
12068 else
12069   echo "$as_me: failed program was:" >&5
12070 cat conftest.$ac_ext >&5
12071 ac_lo=`expr $ac_mid + 1`
12072 fi
12073 rm -f conftest.$ac_objext conftest.$ac_ext
12074 done
12075 ac_cv_sizeof_signed_char=$ac_lo
12076 else
12077   if test "$cross_compiling" = yes; then
12078   { { echo "$as_me:12078: error: cannot run test program while cross compiling" >&5
12079 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12080    { (exit 1); exit 1; }; }
12081 else
12082   cat >conftest.$ac_ext <<_ACEOF
12083 #line 12083 "configure"
12084 #include "confdefs.h"
12085 $ac_includes_default
12086 int
12087 main ()
12088 {
12089 FILE *f = fopen ("conftest.val", "w");
12090 if (!f)
12091   $ac_main_return (1);
12092 fprintf (f, "%d", (sizeof (signed char)));
12093 fclose (f);
12094   ;
12095   return 0;
12096 }
12097 _ACEOF
12098 rm -f conftest$ac_exeext
12099 if { (eval echo "$as_me:12099: \"$ac_link\"") >&5
12100   (eval $ac_link) 2>&5
12101   ac_status=$?
12102   echo "$as_me:12102: \$? = $ac_status" >&5
12103   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12104   { (eval echo "$as_me:12104: \"$ac_try\"") >&5
12105   (eval $ac_try) 2>&5
12106   ac_status=$?
12107   echo "$as_me:12107: \$? = $ac_status" >&5
12108   (exit $ac_status); }; }; then
12109   ac_cv_sizeof_signed_char=`cat conftest.val`
12110 else
12111   echo "$as_me: program exited with status $ac_status" >&5
12112 echo "$as_me: failed program was:" >&5
12113 cat conftest.$ac_ext >&5
12114 fi
12115 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12116 fi
12117 fi
12118 rm -f conftest.val
12119 else
12120   ac_cv_sizeof_signed_char=0
12121 fi
12122 fi
12123 echo "$as_me:12123: result: $ac_cv_sizeof_signed_char" >&5
12124 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12125 cat >>confdefs.h <<EOF
12126 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12127 EOF
12128
12129 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12130         NCURSES_SBOOL="signed char"
12131 else
12132         NCURSES_SBOOL="char"
12133 fi
12134 echo "$as_me:12134: checking if you want to use signed Boolean array in term.h" >&5
12135 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12136
12137 # Check whether --enable-signed-char or --disable-signed-char was given.
12138 if test "${enable_signed_char+set}" = set; then
12139   enableval="$enable_signed_char"
12140   with_signed_char=$enableval
12141 else
12142   with_signed_char=no
12143 fi;
12144 echo "$as_me:12144: result: $with_signed_char" >&5
12145 echo "${ECHO_T}$with_signed_char" >&6
12146 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12147
12148 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12149 echo "$as_me:12149: checking if you want SIGWINCH handler" >&5
12150 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12151
12152 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12153 if test "${enable_sigwinch+set}" = set; then
12154   enableval="$enable_sigwinch"
12155   with_sigwinch=$enableval
12156 else
12157   with_sigwinch=$with_ext_funcs
12158 fi;
12159 echo "$as_me:12159: result: $with_sigwinch" >&5
12160 echo "${ECHO_T}$with_sigwinch" >&6
12161 test "x$with_sigwinch" = xyes &&
12162 cat >>confdefs.h <<\EOF
12163 #define USE_SIGWINCH 1
12164 EOF
12165
12166 ###   use option --enable-tcap-names to allow user to define new capabilities
12167 echo "$as_me:12167: checking if you want user-definable terminal capabilities like termcap" >&5
12168 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12169
12170 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12171 if test "${enable_tcap_names+set}" = set; then
12172   enableval="$enable_tcap_names"
12173   with_tcap_names=$enableval
12174 else
12175   with_tcap_names=$with_ext_funcs
12176 fi;
12177 echo "$as_me:12177: result: $with_tcap_names" >&5
12178 echo "${ECHO_T}$with_tcap_names" >&6
12179 NCURSES_XNAMES=0
12180 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12181
12182 ###############################################################################
12183 # These options are relatively safe to experiment with.
12184
12185 echo "$as_me:12185: checking if you want all development code" >&5
12186 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12187
12188 # Check whether --with-develop or --without-develop was given.
12189 if test "${with_develop+set}" = set; then
12190   withval="$with_develop"
12191   with_develop=$withval
12192 else
12193   with_develop=no
12194 fi;
12195 echo "$as_me:12195: result: $with_develop" >&5
12196 echo "${ECHO_T}$with_develop" >&6
12197
12198 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12199 echo "$as_me:12199: checking if you want hard-tabs code" >&5
12200 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12201
12202 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12203 if test "${enable_hard_tabs+set}" = set; then
12204   enableval="$enable_hard_tabs"
12205
12206 else
12207   enable_hard_tabs=$with_develop
12208 fi;
12209 echo "$as_me:12209: result: $enable_hard_tabs" >&5
12210 echo "${ECHO_T}$enable_hard_tabs" >&6
12211 test "x$enable_hard_tabs" = xyes &&
12212 cat >>confdefs.h <<\EOF
12213 #define USE_HARD_TABS 1
12214 EOF
12215
12216 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12217 echo "$as_me:12217: checking if you want limited support for xmc" >&5
12218 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12219
12220 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12221 if test "${enable_xmc_glitch+set}" = set; then
12222   enableval="$enable_xmc_glitch"
12223
12224 else
12225   enable_xmc_glitch=$with_develop
12226 fi;
12227 echo "$as_me:12227: result: $enable_xmc_glitch" >&5
12228 echo "${ECHO_T}$enable_xmc_glitch" >&6
12229 test "x$enable_xmc_glitch" = xyes &&
12230 cat >>confdefs.h <<\EOF
12231 #define USE_XMC_SUPPORT 1
12232 EOF
12233
12234 ###############################################################################
12235 # These are just experimental, probably should not be in a package:
12236
12237 echo "$as_me:12237: checking if you do not want to assume colors are white-on-black" >&5
12238 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12239
12240 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12241 if test "${enable_assumed_color+set}" = set; then
12242   enableval="$enable_assumed_color"
12243   with_assumed_color=$enableval
12244 else
12245   with_assumed_color=yes
12246 fi;
12247 echo "$as_me:12247: result: $with_assumed_color" >&5
12248 echo "${ECHO_T}$with_assumed_color" >&6
12249 test "x$with_assumed_color" = xyes &&
12250 cat >>confdefs.h <<\EOF
12251 #define USE_ASSUMED_COLOR 1
12252 EOF
12253
12254 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12255 echo "$as_me:12255: checking if you want hashmap scrolling-optimization code" >&5
12256 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12257
12258 # Check whether --enable-hashmap or --disable-hashmap was given.
12259 if test "${enable_hashmap+set}" = set; then
12260   enableval="$enable_hashmap"
12261   with_hashmap=$enableval
12262 else
12263   with_hashmap=yes
12264 fi;
12265 echo "$as_me:12265: result: $with_hashmap" >&5
12266 echo "${ECHO_T}$with_hashmap" >&6
12267 test "x$with_hashmap" = xyes &&
12268 cat >>confdefs.h <<\EOF
12269 #define USE_HASHMAP 1
12270 EOF
12271
12272 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12273 echo "$as_me:12273: checking if you want colorfgbg code" >&5
12274 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12275
12276 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12277 if test "${enable_colorfgbg+set}" = set; then
12278   enableval="$enable_colorfgbg"
12279   with_colorfgbg=$enableval
12280 else
12281   with_colorfgbg=no
12282 fi;
12283 echo "$as_me:12283: result: $with_colorfgbg" >&5
12284 echo "${ECHO_T}$with_colorfgbg" >&6
12285 test "x$with_colorfgbg" = xyes &&
12286 cat >>confdefs.h <<\EOF
12287 #define USE_COLORFGBG 1
12288 EOF
12289
12290 ###   use option --enable-interop to turn on use of bindings used for interop
12291 echo "$as_me:12291: checking if you want interop bindings" >&5
12292 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12293
12294 # Check whether --enable-interop or --disable-interop was given.
12295 if test "${enable_interop+set}" = set; then
12296   enableval="$enable_interop"
12297   with_exp_interop=$enableval
12298 else
12299   with_exp_interop=no
12300 fi;
12301 echo "$as_me:12301: result: $with_exp_interop" >&5
12302 echo "${ECHO_T}$with_exp_interop" >&6
12303
12304 NCURSES_INTEROP_FUNCS=0
12305 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12306
12307 # This is still experimental (20080329), but should ultimately be moved to
12308 # the script-block --with-normal, etc.
12309
12310 echo "$as_me:12310: checking if you want to link with the pthread library" >&5
12311 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12312
12313 # Check whether --with-pthread or --without-pthread was given.
12314 if test "${with_pthread+set}" = set; then
12315   withval="$with_pthread"
12316   with_pthread=$withval
12317 else
12318   with_pthread=no
12319 fi;
12320 echo "$as_me:12320: result: $with_pthread" >&5
12321 echo "${ECHO_T}$with_pthread" >&6
12322
12323 if test "$with_pthread" != no ; then
12324         echo "$as_me:12324: checking for pthread.h" >&5
12325 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12326 if test "${ac_cv_header_pthread_h+set}" = set; then
12327   echo $ECHO_N "(cached) $ECHO_C" >&6
12328 else
12329   cat >conftest.$ac_ext <<_ACEOF
12330 #line 12330 "configure"
12331 #include "confdefs.h"
12332 #include <pthread.h>
12333 _ACEOF
12334 if { (eval echo "$as_me:12334: \"$ac_cpp conftest.$ac_ext\"") >&5
12335   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12336   ac_status=$?
12337   egrep -v '^ *\+' conftest.er1 >conftest.err
12338   rm -f conftest.er1
12339   cat conftest.err >&5
12340   echo "$as_me:12340: \$? = $ac_status" >&5
12341   (exit $ac_status); } >/dev/null; then
12342   if test -s conftest.err; then
12343     ac_cpp_err=$ac_c_preproc_warn_flag
12344   else
12345     ac_cpp_err=
12346   fi
12347 else
12348   ac_cpp_err=yes
12349 fi
12350 if test -z "$ac_cpp_err"; then
12351   ac_cv_header_pthread_h=yes
12352 else
12353   echo "$as_me: failed program was:" >&5
12354   cat conftest.$ac_ext >&5
12355   ac_cv_header_pthread_h=no
12356 fi
12357 rm -f conftest.err conftest.$ac_ext
12358 fi
12359 echo "$as_me:12359: result: $ac_cv_header_pthread_h" >&5
12360 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12361 if test $ac_cv_header_pthread_h = yes; then
12362
12363 cat >>confdefs.h <<\EOF
12364 #define HAVE_PTHREADS_H 1
12365 EOF
12366
12367         for cf_lib_pthread in pthread c_r
12368         do
12369             echo "$as_me:12369: checking if we can link with the $cf_lib_pthread library" >&5
12370 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12371             cf_save_LIBS="$LIBS"
12372
12373 cf_add_libs="-l$cf_lib_pthread"
12374 # Filter out duplicates - this happens with badly-designed ".pc" files...
12375 for cf_add_1lib in $LIBS
12376 do
12377         for cf_add_2lib in $cf_add_libs
12378         do
12379                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12380                 then
12381                         cf_add_1lib=
12382                         break
12383                 fi
12384         done
12385         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12386 done
12387 LIBS="$cf_add_libs"
12388
12389             cat >conftest.$ac_ext <<_ACEOF
12390 #line 12390 "configure"
12391 #include "confdefs.h"
12392
12393 #include <pthread.h>
12394
12395 int
12396 main ()
12397 {
12398
12399                 int rc = pthread_create(0,0,0,0);
12400                 int r2 = pthread_mutexattr_settype(0, 0);
12401
12402   ;
12403   return 0;
12404 }
12405 _ACEOF
12406 rm -f conftest.$ac_objext conftest$ac_exeext
12407 if { (eval echo "$as_me:12407: \"$ac_link\"") >&5
12408   (eval $ac_link) 2>&5
12409   ac_status=$?
12410   echo "$as_me:12410: \$? = $ac_status" >&5
12411   (exit $ac_status); } &&
12412          { ac_try='test -s conftest$ac_exeext'
12413   { (eval echo "$as_me:12413: \"$ac_try\"") >&5
12414   (eval $ac_try) 2>&5
12415   ac_status=$?
12416   echo "$as_me:12416: \$? = $ac_status" >&5
12417   (exit $ac_status); }; }; then
12418   with_pthread=yes
12419 else
12420   echo "$as_me: failed program was:" >&5
12421 cat conftest.$ac_ext >&5
12422 with_pthread=no
12423 fi
12424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12425             LIBS="$cf_save_LIBS"
12426             echo "$as_me:12426: result: $with_pthread" >&5
12427 echo "${ECHO_T}$with_pthread" >&6
12428             test "$with_pthread" = yes && break
12429         done
12430
12431         if test "$with_pthread" = yes ; then
12432
12433 cf_add_libs="-l$cf_lib_pthread"
12434 # Filter out duplicates - this happens with badly-designed ".pc" files...
12435 for cf_add_1lib in $LIBS
12436 do
12437         for cf_add_2lib in $cf_add_libs
12438         do
12439                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12440                 then
12441                         cf_add_1lib=
12442                         break
12443                 fi
12444         done
12445         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12446 done
12447 LIBS="$cf_add_libs"
12448
12449 cat >>confdefs.h <<\EOF
12450 #define HAVE_LIBPTHREADS 1
12451 EOF
12452
12453         else
12454             { { echo "$as_me:12454: error: Cannot link with pthread library" >&5
12455 echo "$as_me: error: Cannot link with pthread library" >&2;}
12456    { (exit 1); exit 1; }; }
12457         fi
12458
12459 fi
12460
12461 fi
12462
12463 if test "x$with_pthread" != xno; then
12464         echo "$as_me:12464: checking for pthread_kill" >&5
12465 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12466 if test "${ac_cv_func_pthread_kill+set}" = set; then
12467   echo $ECHO_N "(cached) $ECHO_C" >&6
12468 else
12469   cat >conftest.$ac_ext <<_ACEOF
12470 #line 12470 "configure"
12471 #include "confdefs.h"
12472 /* System header to define __stub macros and hopefully few prototypes,
12473     which can conflict with char pthread_kill (); below.  */
12474 #include <assert.h>
12475 /* Override any gcc2 internal prototype to avoid an error.  */
12476 #ifdef __cplusplus
12477 extern "C"
12478 #endif
12479 /* We use char because int might match the return type of a gcc2
12480    builtin and then its argument prototype would still apply.  */
12481 char pthread_kill ();
12482 char (*f) ();
12483
12484 int
12485 main ()
12486 {
12487 /* The GNU C library defines this for functions which it implements
12488     to always fail with ENOSYS.  Some functions are actually named
12489     something starting with __ and the normal name is an alias.  */
12490 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12491 choke me
12492 #else
12493 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12494 #endif
12495
12496   ;
12497   return 0;
12498 }
12499 _ACEOF
12500 rm -f conftest.$ac_objext conftest$ac_exeext
12501 if { (eval echo "$as_me:12501: \"$ac_link\"") >&5
12502   (eval $ac_link) 2>&5
12503   ac_status=$?
12504   echo "$as_me:12504: \$? = $ac_status" >&5
12505   (exit $ac_status); } &&
12506          { ac_try='test -s conftest$ac_exeext'
12507   { (eval echo "$as_me:12507: \"$ac_try\"") >&5
12508   (eval $ac_try) 2>&5
12509   ac_status=$?
12510   echo "$as_me:12510: \$? = $ac_status" >&5
12511   (exit $ac_status); }; }; then
12512   ac_cv_func_pthread_kill=yes
12513 else
12514   echo "$as_me: failed program was:" >&5
12515 cat conftest.$ac_ext >&5
12516 ac_cv_func_pthread_kill=no
12517 fi
12518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12519 fi
12520 echo "$as_me:12520: result: $ac_cv_func_pthread_kill" >&5
12521 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12522 if test $ac_cv_func_pthread_kill = yes; then
12523
12524                 echo "$as_me:12524: checking if you want to allow EINTR in wgetch with pthreads" >&5
12525 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12526
12527 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12528 if test "${enable_pthreads_eintr+set}" = set; then
12529   enableval="$enable_pthreads_eintr"
12530   use_pthreads_eintr=$enableval
12531 else
12532   use_pthreads_eintr=no
12533 fi;
12534                 echo "$as_me:12534: result: $use_pthreads_eintr" >&5
12535 echo "${ECHO_T}$use_pthreads_eintr" >&6
12536                 if test "x$use_pthreads_eintr" = xyes ; then
12537
12538 cat >>confdefs.h <<\EOF
12539 #define USE_PTHREADS_EINTR 1
12540 EOF
12541
12542                 fi
12543 fi
12544
12545         echo "$as_me:12545: checking if you want to use weak-symbols for pthreads" >&5
12546 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12547
12548 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12549 if test "${enable_weak_symbols+set}" = set; then
12550   enableval="$enable_weak_symbols"
12551   use_weak_symbols=$enableval
12552 else
12553   use_weak_symbols=no
12554 fi;
12555         echo "$as_me:12555: result: $use_weak_symbols" >&5
12556 echo "${ECHO_T}$use_weak_symbols" >&6
12557         if test "x$use_weak_symbols" = xyes ; then
12558
12559 echo "$as_me:12559: checking if $CC supports weak symbols" >&5
12560 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12561 if test "${cf_cv_weak_symbols+set}" = set; then
12562   echo $ECHO_N "(cached) $ECHO_C" >&6
12563 else
12564
12565 cat >conftest.$ac_ext <<_ACEOF
12566 #line 12566 "configure"
12567 #include "confdefs.h"
12568
12569 #include <stdio.h>
12570 int
12571 main ()
12572 {
12573
12574 #if defined(__GNUC__)
12575 #  if defined __USE_ISOC99
12576 #    define _cat_pragma(exp)    _Pragma(#exp)
12577 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12578 #  else
12579 #    define _weak_pragma(exp)
12580 #  endif
12581 #  define _declare(name)        __extension__ extern __typeof__(name) name
12582 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12583 #endif
12584
12585 weak_symbol(fopen);
12586
12587   ;
12588   return 0;
12589 }
12590 _ACEOF
12591 rm -f conftest.$ac_objext
12592 if { (eval echo "$as_me:12592: \"$ac_compile\"") >&5
12593   (eval $ac_compile) 2>&5
12594   ac_status=$?
12595   echo "$as_me:12595: \$? = $ac_status" >&5
12596   (exit $ac_status); } &&
12597          { ac_try='test -s conftest.$ac_objext'
12598   { (eval echo "$as_me:12598: \"$ac_try\"") >&5
12599   (eval $ac_try) 2>&5
12600   ac_status=$?
12601   echo "$as_me:12601: \$? = $ac_status" >&5
12602   (exit $ac_status); }; }; then
12603   cf_cv_weak_symbols=yes
12604 else
12605   echo "$as_me: failed program was:" >&5
12606 cat conftest.$ac_ext >&5
12607 cf_cv_weak_symbols=no
12608 fi
12609 rm -f conftest.$ac_objext conftest.$ac_ext
12610
12611 fi
12612 echo "$as_me:12612: result: $cf_cv_weak_symbols" >&5
12613 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12614
12615         else
12616                 cf_cv_weak_symbols=no
12617         fi
12618
12619         if test "x$cf_cv_weak_symbols" = xyes ; then
12620
12621 cat >>confdefs.h <<\EOF
12622 #define USE_WEAK_SYMBOLS 1
12623 EOF
12624
12625         fi
12626 fi
12627
12628 PTHREAD=
12629 if test "x$with_pthread" = "xyes" ; then
12630
12631 cat >>confdefs.h <<\EOF
12632 #define USE_PTHREADS 1
12633 EOF
12634
12635         enable_reentrant=yes
12636         if test "x$cf_cv_weak_symbols" = xyes ; then
12637                 PTHREAD=-lpthread
12638         fi
12639 fi
12640
12641 # Reentrant code has to be opaque; there's little advantage to making ncurses
12642 # opaque outside of that, so there is no --enable-opaque option.  We can use
12643 # this option without --with-pthreads, but this will be always set for
12644 # pthreads.
12645 echo "$as_me:12645: checking if you want experimental reentrant code" >&5
12646 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12647
12648 # Check whether --enable-reentrant or --disable-reentrant was given.
12649 if test "${enable_reentrant+set}" = set; then
12650   enableval="$enable_reentrant"
12651   with_reentrant=$enableval
12652 else
12653   with_reentrant=no
12654 fi;
12655 echo "$as_me:12655: result: $with_reentrant" >&5
12656 echo "${ECHO_T}$with_reentrant" >&6
12657 if test "x$with_reentrant" = xyes ; then
12658         cf_cv_enable_reentrant=1
12659         cf_cv_enable_opaque="NCURSES_INTERNALS"
12660         NCURSES_OPAQUE=1
12661         NCURSES_SIZE_T=int
12662         if test "x$cf_cv_weak_symbols" = xyes ; then
12663
12664 # remove pthread library from $LIBS
12665 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12666
12667 cf_add_libs="-lpthread"
12668 # Filter out duplicates - this happens with badly-designed ".pc" files...
12669 for cf_add_1lib in $TEST_LIBS
12670 do
12671         for cf_add_2lib in $cf_add_libs
12672         do
12673                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12674                 then
12675                         cf_add_1lib=
12676                         break
12677                 fi
12678         done
12679         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12680 done
12681 TEST_LIBS="$cf_add_libs"
12682
12683 cf_add_libs="-lpthread"
12684 # Filter out duplicates - this happens with badly-designed ".pc" files...
12685 for cf_add_1lib in $TEST_LIBS2
12686 do
12687         for cf_add_2lib in $cf_add_libs
12688         do
12689                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12690                 then
12691                         cf_add_1lib=
12692                         break
12693                 fi
12694         done
12695         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12696 done
12697 TEST_LIBS2="$cf_add_libs"
12698
12699         else
12700                 # when not using weak symbols but with_reentrant,
12701                 # add 't' to the library suffix on all platforms
12702                 # except cygwin, where we only do that if ALSO
12703                 # compiling with full thread support.
12704                 case "$host" in
12705                 (*cygwin* | *msys*)
12706                         if test "$with_pthread" = "yes" ; then
12707                                 if test "x$disable_lib_suffixes" = "xno" ; then
12708                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12709                                 fi
12710                         fi ;;
12711                 (*)
12712                         if test "x$disable_lib_suffixes" = "xno" ; then
12713                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12714                         fi
12715                         ;;
12716                 esac
12717         fi
12718
12719 cat >>confdefs.h <<\EOF
12720 #define USE_REENTRANT 1
12721 EOF
12722
12723 if test "${with_abi_version+set}" != set; then
12724         case $cf_cv_rel_version in
12725         (5.*)
12726                 cf_cv_rel_version=6.0
12727                 cf_cv_abi_version=6
12728                 { echo "$as_me:12728: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12729 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12730                 ;;
12731         esac
12732 fi
12733
12734 else
12735         cf_cv_enable_reentrant=0
12736         cf_cv_enable_opaque="NCURSES_OPAQUE"
12737         NCURSES_OPAQUE=0
12738         NCURSES_SIZE_T=short
12739 fi
12740
12741 ### Allow using a different wrap-prefix
12742 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12743         echo "$as_me:12743: checking for prefix used to wrap public variables" >&5
12744 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12745
12746 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12747 if test "${with_wrap_prefix+set}" = set; then
12748   withval="$with_wrap_prefix"
12749   NCURSES_WRAP_PREFIX=$withval
12750 else
12751   NCURSES_WRAP_PREFIX=_nc_
12752 fi;
12753         echo "$as_me:12753: result: $NCURSES_WRAP_PREFIX" >&5
12754 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12755 else
12756         NCURSES_WRAP_PREFIX=_nc_
12757 fi
12758
12759 cat >>confdefs.h <<EOF
12760 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12761 EOF
12762
12763 echo "$as_me:12763: checking if you want experimental safe-sprintf code" >&5
12764 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12765
12766 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12767 if test "${enable_safe_sprintf+set}" = set; then
12768   enableval="$enable_safe_sprintf"
12769   with_safe_sprintf=$enableval
12770 else
12771   with_safe_sprintf=no
12772 fi;
12773 echo "$as_me:12773: result: $with_safe_sprintf" >&5
12774 echo "${ECHO_T}$with_safe_sprintf" >&6
12775 test "x$with_safe_sprintf" = xyes &&
12776 cat >>confdefs.h <<\EOF
12777 #define USE_SAFE_SPRINTF 1
12778 EOF
12779
12780 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12781 # when hashmap is used scroll hints are useless
12782 if test "$with_hashmap" = no ; then
12783 echo "$as_me:12783: checking if you want to experiment without scrolling-hints code" >&5
12784 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12785
12786 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12787 if test "${enable_scroll_hints+set}" = set; then
12788   enableval="$enable_scroll_hints"
12789   with_scroll_hints=$enableval
12790 else
12791   with_scroll_hints=yes
12792 fi;
12793 echo "$as_me:12793: result: $with_scroll_hints" >&5
12794 echo "${ECHO_T}$with_scroll_hints" >&6
12795 test "x$with_scroll_hints" = xyes &&
12796 cat >>confdefs.h <<\EOF
12797 #define USE_SCROLL_HINTS 1
12798 EOF
12799
12800 fi
12801
12802 echo "$as_me:12802: checking if you want experimental wgetch-events code" >&5
12803 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12804
12805 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12806 if test "${enable_wgetch_events+set}" = set; then
12807   enableval="$enable_wgetch_events"
12808   with_wgetch_events=$enableval
12809 else
12810   with_wgetch_events=no
12811 fi;
12812 echo "$as_me:12812: result: $with_wgetch_events" >&5
12813 echo "${ECHO_T}$with_wgetch_events" >&6
12814 test "x$with_wgetch_events" = xyes &&
12815 cat >>confdefs.h <<\EOF
12816 #define NCURSES_WGETCH_EVENTS 1
12817 EOF
12818
12819 ###############################################################################
12820
12821 ###     use option --disable-echo to suppress full display compiling commands
12822
12823 echo "$as_me:12823: checking if you want to see long compiling messages" >&5
12824 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12825
12826 # Check whether --enable-echo or --disable-echo was given.
12827 if test "${enable_echo+set}" = set; then
12828   enableval="$enable_echo"
12829   test "$enableval" != no && enableval=yes
12830   if test "$enableval" != "yes" ; then
12831
12832         ECHO_LT='--silent'
12833         ECHO_LD='@echo linking $@;'
12834         RULE_CC='@echo compiling $<'
12835         SHOW_CC='@echo compiling $@'
12836         ECHO_CC='@'
12837
12838   else
12839
12840         ECHO_LT=''
12841         ECHO_LD=''
12842         RULE_CC=''
12843         SHOW_CC=''
12844         ECHO_CC=''
12845
12846   fi
12847 else
12848   enableval=yes
12849
12850         ECHO_LT=''
12851         ECHO_LD=''
12852         RULE_CC=''
12853         SHOW_CC=''
12854         ECHO_CC=''
12855
12856 fi;
12857 echo "$as_me:12857: result: $enableval" >&5
12858 echo "${ECHO_T}$enableval" >&6
12859
12860 if test "x$enable_echo" = xyes; then
12861         ECHO_LINK=
12862 else
12863         ECHO_LINK='@ echo linking $@ ... ;'
12864         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12865         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12866 fi
12867
12868 ###     use option --enable-warnings to turn on all gcc warnings
12869 echo "$as_me:12869: checking if you want to see compiler warnings" >&5
12870 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12871
12872 # Check whether --enable-warnings or --disable-warnings was given.
12873 if test "${enable_warnings+set}" = set; then
12874   enableval="$enable_warnings"
12875   with_warnings=$enableval
12876 fi;
12877 echo "$as_me:12877: result: $with_warnings" >&5
12878 echo "${ECHO_T}$with_warnings" >&6
12879
12880 if test "x$with_warnings" = "xyes"; then
12881
12882         ADAFLAGS="$ADAFLAGS -gnatg"
12883
12884 INTEL_COMPILER=no
12885
12886 if test "$GCC" = yes ; then
12887         case $host_os in
12888         (linux*|gnu*)
12889                 echo "$as_me:12889: checking if this is really Intel C compiler" >&5
12890 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12891                 cf_save_CFLAGS="$CFLAGS"
12892                 CFLAGS="$CFLAGS -no-gcc"
12893                 cat >conftest.$ac_ext <<_ACEOF
12894 #line 12894 "configure"
12895 #include "confdefs.h"
12896
12897 int
12898 main ()
12899 {
12900
12901 #ifdef __INTEL_COMPILER
12902 #else
12903 make an error
12904 #endif
12905
12906   ;
12907   return 0;
12908 }
12909 _ACEOF
12910 rm -f conftest.$ac_objext
12911 if { (eval echo "$as_me:12911: \"$ac_compile\"") >&5
12912   (eval $ac_compile) 2>&5
12913   ac_status=$?
12914   echo "$as_me:12914: \$? = $ac_status" >&5
12915   (exit $ac_status); } &&
12916          { ac_try='test -s conftest.$ac_objext'
12917   { (eval echo "$as_me:12917: \"$ac_try\"") >&5
12918   (eval $ac_try) 2>&5
12919   ac_status=$?
12920   echo "$as_me:12920: \$? = $ac_status" >&5
12921   (exit $ac_status); }; }; then
12922   INTEL_COMPILER=yes
12923 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12924
12925 else
12926   echo "$as_me: failed program was:" >&5
12927 cat conftest.$ac_ext >&5
12928 fi
12929 rm -f conftest.$ac_objext conftest.$ac_ext
12930                 CFLAGS="$cf_save_CFLAGS"
12931                 echo "$as_me:12931: result: $INTEL_COMPILER" >&5
12932 echo "${ECHO_T}$INTEL_COMPILER" >&6
12933                 ;;
12934         esac
12935 fi
12936
12937 CLANG_COMPILER=no
12938
12939 if test "$GCC" = yes ; then
12940         echo "$as_me:12940: checking if this is really Clang C compiler" >&5
12941 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12942         cf_save_CFLAGS="$CFLAGS"
12943         CFLAGS="$CFLAGS -Qunused-arguments"
12944         cat >conftest.$ac_ext <<_ACEOF
12945 #line 12945 "configure"
12946 #include "confdefs.h"
12947
12948 int
12949 main ()
12950 {
12951
12952 #ifdef __clang__
12953 #else
12954 make an error
12955 #endif
12956
12957   ;
12958   return 0;
12959 }
12960 _ACEOF
12961 rm -f conftest.$ac_objext
12962 if { (eval echo "$as_me:12962: \"$ac_compile\"") >&5
12963   (eval $ac_compile) 2>&5
12964   ac_status=$?
12965   echo "$as_me:12965: \$? = $ac_status" >&5
12966   (exit $ac_status); } &&
12967          { ac_try='test -s conftest.$ac_objext'
12968   { (eval echo "$as_me:12968: \"$ac_try\"") >&5
12969   (eval $ac_try) 2>&5
12970   ac_status=$?
12971   echo "$as_me:12971: \$? = $ac_status" >&5
12972   (exit $ac_status); }; }; then
12973   CLANG_COMPILER=yes
12974 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12975
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 cat conftest.$ac_ext >&5
12979 fi
12980 rm -f conftest.$ac_objext conftest.$ac_ext
12981         CFLAGS="$cf_save_CFLAGS"
12982         echo "$as_me:12982: result: $CLANG_COMPILER" >&5
12983 echo "${ECHO_T}$CLANG_COMPILER" >&6
12984 fi
12985
12986 cat > conftest.$ac_ext <<EOF
12987 #line 12987 "${as_me:-configure}"
12988 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12989 EOF
12990
12991 if test "$INTEL_COMPILER" = yes
12992 then
12993 # The "-wdXXX" options suppress warnings:
12994 # remark #1419: external declaration in primary source file
12995 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12996 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12997 # remark #193: zero used for undefined preprocessing identifier
12998 # remark #593: variable "curs_sb_left_arrow" was set but never used
12999 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13000 # remark #869: parameter "tw" was never referenced
13001 # remark #981: operands are evaluated in unspecified order
13002 # warning #279: controlling expression is constant
13003
13004         { echo "$as_me:13004: checking for $CC warning options..." >&5
13005 echo "$as_me: checking for $CC warning options..." >&6;}
13006         cf_save_CFLAGS="$CFLAGS"
13007         EXTRA_CFLAGS="-Wall"
13008         for cf_opt in \
13009                 wd1419 \
13010                 wd1683 \
13011                 wd1684 \
13012                 wd193 \
13013                 wd593 \
13014                 wd279 \
13015                 wd810 \
13016                 wd869 \
13017                 wd981
13018         do
13019                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13020                 if { (eval echo "$as_me:13020: \"$ac_compile\"") >&5
13021   (eval $ac_compile) 2>&5
13022   ac_status=$?
13023   echo "$as_me:13023: \$? = $ac_status" >&5
13024   (exit $ac_status); }; then
13025                         test -n "$verbose" && echo "$as_me:13025: result: ... -$cf_opt" >&5
13026 echo "${ECHO_T}... -$cf_opt" >&6
13027                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13028                 fi
13029         done
13030         CFLAGS="$cf_save_CFLAGS"
13031
13032 elif test "$GCC" = yes
13033 then
13034         { echo "$as_me:13034: checking for $CC warning options..." >&5
13035 echo "$as_me: checking for $CC warning options..." >&6;}
13036         cf_save_CFLAGS="$CFLAGS"
13037         EXTRA_CFLAGS=
13038         cf_warn_CONST=""
13039         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13040         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13041         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13042         for cf_opt in W Wall \
13043                 Wbad-function-cast \
13044                 Wcast-align \
13045                 Wcast-qual \
13046                 Wdeclaration-after-statement \
13047                 Wextra \
13048                 Winline \
13049                 Wmissing-declarations \
13050                 Wmissing-prototypes \
13051                 Wnested-externs \
13052                 Wpointer-arith \
13053                 Wshadow \
13054                 Wstrict-prototypes \
13055                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13056         do
13057                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13058                 if { (eval echo "$as_me:13058: \"$ac_compile\"") >&5
13059   (eval $ac_compile) 2>&5
13060   ac_status=$?
13061   echo "$as_me:13061: \$? = $ac_status" >&5
13062   (exit $ac_status); }; then
13063                         test -n "$verbose" && echo "$as_me:13063: result: ... -$cf_opt" >&5
13064 echo "${ECHO_T}... -$cf_opt" >&6
13065                         case $cf_opt in
13066                         (Wcast-qual)
13067                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13068                                 ;;
13069                         (Winline)
13070                                 case $GCC_VERSION in
13071                                 ([34].*)
13072                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13073
13074 echo "${as_me:-configure}:13074: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13075
13076                                         continue;;
13077                                 esac
13078                                 ;;
13079                         (Wpointer-arith)
13080                                 case $GCC_VERSION in
13081                                 ([12].*)
13082                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13083
13084 echo "${as_me:-configure}:13084: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13085
13086                                         continue;;
13087                                 esac
13088                                 ;;
13089                         esac
13090                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13091                 fi
13092         done
13093         CFLAGS="$cf_save_CFLAGS"
13094 fi
13095 rm -rf conftest*
13096
13097         if test "x$cf_with_cxx" = xyes ; then
13098
13099 INTEL_CPLUSPLUS=no
13100
13101 if test "$GCC" = yes ; then
13102         case $host_os in
13103         (linux*|gnu*)
13104                 echo "$as_me:13104: checking if this is really Intel C++ compiler" >&5
13105 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13106                 cf_save_CFLAGS="$CXXFLAGS"
13107                 CXXFLAGS="$CXXFLAGS -no-gcc"
13108                 cat >conftest.$ac_ext <<_ACEOF
13109 #line 13109 "configure"
13110 #include "confdefs.h"
13111
13112 int
13113 main ()
13114 {
13115
13116 #ifdef __INTEL_COMPILER
13117 #else
13118 make an error
13119 #endif
13120
13121   ;
13122   return 0;
13123 }
13124 _ACEOF
13125 rm -f conftest.$ac_objext
13126 if { (eval echo "$as_me:13126: \"$ac_compile\"") >&5
13127   (eval $ac_compile) 2>&5
13128   ac_status=$?
13129   echo "$as_me:13129: \$? = $ac_status" >&5
13130   (exit $ac_status); } &&
13131          { ac_try='test -s conftest.$ac_objext'
13132   { (eval echo "$as_me:13132: \"$ac_try\"") >&5
13133   (eval $ac_try) 2>&5
13134   ac_status=$?
13135   echo "$as_me:13135: \$? = $ac_status" >&5
13136   (exit $ac_status); }; }; then
13137   INTEL_CPLUSPLUS=yes
13138 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13139
13140 else
13141   echo "$as_me: failed program was:" >&5
13142 cat conftest.$ac_ext >&5
13143 fi
13144 rm -f conftest.$ac_objext conftest.$ac_ext
13145                 CXXFLAGS="$cf_save_CFLAGS"
13146                 echo "$as_me:13146: result: $INTEL_CPLUSPLUS" >&5
13147 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13148                 ;;
13149         esac
13150 fi
13151
13152 CLANG_CPLUSPLUS=no
13153
13154 if test "$GCC" = yes ; then
13155         echo "$as_me:13155: checking if this is really Clang C++ compiler" >&5
13156 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13157         cf_save_CFLAGS="$CXXFLAGS"
13158         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13159         cat >conftest.$ac_ext <<_ACEOF
13160 #line 13160 "configure"
13161 #include "confdefs.h"
13162
13163 int
13164 main ()
13165 {
13166
13167 #ifdef __clang__
13168 #else
13169 make an error
13170 #endif
13171
13172   ;
13173   return 0;
13174 }
13175 _ACEOF
13176 rm -f conftest.$ac_objext
13177 if { (eval echo "$as_me:13177: \"$ac_compile\"") >&5
13178   (eval $ac_compile) 2>&5
13179   ac_status=$?
13180   echo "$as_me:13180: \$? = $ac_status" >&5
13181   (exit $ac_status); } &&
13182          { ac_try='test -s conftest.$ac_objext'
13183   { (eval echo "$as_me:13183: \"$ac_try\"") >&5
13184   (eval $ac_try) 2>&5
13185   ac_status=$?
13186   echo "$as_me:13186: \$? = $ac_status" >&5
13187   (exit $ac_status); }; }; then
13188   CLANG_CPLUSPLUS=yes
13189 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13190
13191 else
13192   echo "$as_me: failed program was:" >&5
13193 cat conftest.$ac_ext >&5
13194 fi
13195 rm -f conftest.$ac_objext conftest.$ac_ext
13196         CXXFLAGS="$cf_save_CFLAGS"
13197         echo "$as_me:13197: result: $CLANG_CPLUSPLUS" >&5
13198 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13199 fi
13200
13201 ac_ext=cc
13202 ac_cpp='$CXXCPP $CPPFLAGS'
13203 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13204 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13205 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13206 ac_main_return=return
13207
13208 cat > conftest.$ac_ext <<EOF
13209 #line 13209 "configure"
13210 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13211 EOF
13212
13213 if test "$INTEL_CPLUSPLUS" = yes
13214 then
13215 # The "-wdXXX" options suppress warnings:
13216 # remark #1419: external declaration in primary source file
13217 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13218 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13219 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13220 # remark #193: zero used for undefined preprocessing identifier
13221 # remark #593: variable "curs_sb_left_arrow" was set but never used
13222 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13223 # remark #869: parameter "tw" was never referenced
13224 # remark #981: operands are evaluated in unspecified order
13225 # warning #269: invalid format string conversion
13226
13227         { echo "$as_me:13227: checking for $CC warning options..." >&5
13228 echo "$as_me: checking for $CC warning options..." >&6;}
13229         cf_save_CXXFLAGS="$CXXFLAGS"
13230         EXTRA_CXXFLAGS="-Wall"
13231         for cf_opt in \
13232                 wd1419 \
13233                 wd1682 \
13234                 wd1683 \
13235                 wd1684 \
13236                 wd193 \
13237                 wd279 \
13238                 wd593 \
13239                 wd810 \
13240                 wd869 \
13241                 wd981
13242         do
13243                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13244                 if { (eval echo "$as_me:13244: \"$ac_compile\"") >&5
13245   (eval $ac_compile) 2>&5
13246   ac_status=$?
13247   echo "$as_me:13247: \$? = $ac_status" >&5
13248   (exit $ac_status); }; then
13249                         test -n "$verbose" && echo "$as_me:13249: result: ... -$cf_opt" >&5
13250 echo "${ECHO_T}... -$cf_opt" >&6
13251                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13252                 fi
13253         done
13254         CXXFLAGS="$cf_save_CXXFLAGS"
13255
13256 elif test "$GXX" = yes
13257 then
13258         { echo "$as_me:13258: checking for $CXX warning options..." >&5
13259 echo "$as_me: checking for $CXX warning options..." >&6;}
13260         cf_save_CXXFLAGS="$CXXFLAGS"
13261         EXTRA_CXXFLAGS="-W -Wall"
13262         cf_gxx_extra_warnings=""
13263         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13264         case "$GCC_VERSION" in
13265         ([1-2].*)
13266                 ;;
13267         (*)
13268                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13269                 ;;
13270         esac
13271         for cf_opt in \
13272                 Wabi \
13273                 fabi-version=0 \
13274                 Wextra \
13275                 Wignored-qualifiers \
13276                 Wlogical-op \
13277                 Woverloaded-virtual \
13278                 Wsign-promo \
13279                 Wsynth \
13280                 Wold-style-cast \
13281                 Wcast-align \
13282                 Wcast-qual \
13283                 Wpointer-arith \
13284                 Wshadow \
13285                 Wundef $cf_gxx_extra_warnings Wno-unused
13286         do
13287                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13288                 if { (eval echo "$as_me:13288: \"$ac_compile\"") >&5
13289   (eval $ac_compile) 2>&5
13290   ac_status=$?
13291   echo "$as_me:13291: \$? = $ac_status" >&5
13292   (exit $ac_status); }; then
13293                         test -n "$verbose" && echo "$as_me:13293: result: ... -$cf_opt" >&5
13294 echo "${ECHO_T}... -$cf_opt" >&6
13295                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13296                 else
13297                         test -n "$verbose" && echo "$as_me:13297: result: ... no -$cf_opt" >&5
13298 echo "${ECHO_T}... no -$cf_opt" >&6
13299                 fi
13300         done
13301         CXXFLAGS="$cf_save_CXXFLAGS"
13302 fi
13303
13304 rm -rf conftest*
13305 ac_ext=c
13306 ac_cpp='$CPP $CPPFLAGS'
13307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13310 ac_main_return=return
13311
13312         fi
13313 fi
13314
13315 if test "$GCC" = yes
13316 then
13317 cat > conftest.i <<EOF
13318 #ifndef GCC_PRINTF
13319 #define GCC_PRINTF 0
13320 #endif
13321 #ifndef GCC_SCANF
13322 #define GCC_SCANF 0
13323 #endif
13324 #ifndef GCC_NORETURN
13325 #define GCC_NORETURN /* nothing */
13326 #endif
13327 #ifndef GCC_UNUSED
13328 #define GCC_UNUSED /* nothing */
13329 #endif
13330 EOF
13331 if test "$GCC" = yes
13332 then
13333         { echo "$as_me:13333: checking for $CC __attribute__ directives..." >&5
13334 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13335 cat > conftest.$ac_ext <<EOF
13336 #line 13336 "${as_me:-configure}"
13337 #include "confdefs.h"
13338 #include "conftest.h"
13339 #include "conftest.i"
13340 #if     GCC_PRINTF
13341 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13342 #else
13343 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13344 #endif
13345 #if     GCC_SCANF
13346 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13347 #else
13348 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13349 #endif
13350 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13351 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13352 extern void foo(void) GCC_NORETURN;
13353 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13354 EOF
13355         cf_printf_attribute=no
13356         cf_scanf_attribute=no
13357         for cf_attribute in scanf printf unused noreturn
13358         do
13359
13360 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13361
13362                 cf_directive="__attribute__(($cf_attribute))"
13363                 echo "checking for $CC $cf_directive" 1>&5
13364
13365                 case $cf_attribute in
13366                 (printf)
13367                         cf_printf_attribute=yes
13368                         cat >conftest.h <<EOF
13369 #define GCC_$cf_ATTRIBUTE 1
13370 EOF
13371                         ;;
13372                 (scanf)
13373                         cf_scanf_attribute=yes
13374                         cat >conftest.h <<EOF
13375 #define GCC_$cf_ATTRIBUTE 1
13376 EOF
13377                         ;;
13378                 (*)
13379                         cat >conftest.h <<EOF
13380 #define GCC_$cf_ATTRIBUTE $cf_directive
13381 EOF
13382                         ;;
13383                 esac
13384
13385                 if { (eval echo "$as_me:13385: \"$ac_compile\"") >&5
13386   (eval $ac_compile) 2>&5
13387   ac_status=$?
13388   echo "$as_me:13388: \$? = $ac_status" >&5
13389   (exit $ac_status); }; then
13390                         test -n "$verbose" && echo "$as_me:13390: result: ... $cf_attribute" >&5
13391 echo "${ECHO_T}... $cf_attribute" >&6
13392                         cat conftest.h >>confdefs.h
13393                         case $cf_attribute in
13394                         (noreturn)
13395
13396 cat >>confdefs.h <<EOF
13397 #define GCC_NORETURN $cf_directive
13398 EOF
13399
13400                                 ;;
13401                         (printf)
13402                                 cf_value='/* nothing */'
13403                                 if test "$cf_printf_attribute" != no ; then
13404                                         cf_value='__attribute__((format(printf,fmt,var)))'
13405
13406 cat >>confdefs.h <<\EOF
13407 #define GCC_PRINTF 1
13408 EOF
13409
13410                                 fi
13411
13412 cat >>confdefs.h <<EOF
13413 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13414 EOF
13415
13416                                 ;;
13417                         (scanf)
13418                                 cf_value='/* nothing */'
13419                                 if test "$cf_scanf_attribute" != no ; then
13420                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13421
13422 cat >>confdefs.h <<\EOF
13423 #define GCC_SCANF 1
13424 EOF
13425
13426                                 fi
13427
13428 cat >>confdefs.h <<EOF
13429 #define GCC_SCANFLIKE(fmt,var) $cf_value
13430 EOF
13431
13432                                 ;;
13433                         (unused)
13434
13435 cat >>confdefs.h <<EOF
13436 #define GCC_UNUSED $cf_directive
13437 EOF
13438
13439                                 ;;
13440                         esac
13441                 fi
13442         done
13443 else
13444         fgrep define conftest.i >>confdefs.h
13445 fi
13446 rm -rf conftest*
13447 fi
13448
13449 echo "$as_me:13449: checking if you want to work around bogus compiler/loader warnings" >&5
13450 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13451
13452 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13453 if test "${enable_string_hacks+set}" = set; then
13454   enableval="$enable_string_hacks"
13455   with_string_hacks=$enableval
13456 else
13457   with_string_hacks=no
13458 fi;
13459 echo "$as_me:13459: result: $with_string_hacks" >&5
13460 echo "${ECHO_T}$with_string_hacks" >&6
13461
13462 if test "x$with_string_hacks" = "xyes"; then
13463
13464 cat >>confdefs.h <<\EOF
13465 #define USE_STRING_HACKS 1
13466 EOF
13467
13468         { echo "$as_me:13468: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13469 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13470
13471 for ac_func in strlcat strlcpy snprintf
13472 do
13473 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13474 echo "$as_me:13474: checking for $ac_func" >&5
13475 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13476 if eval "test \"\${$as_ac_var+set}\" = set"; then
13477   echo $ECHO_N "(cached) $ECHO_C" >&6
13478 else
13479   cat >conftest.$ac_ext <<_ACEOF
13480 #line 13480 "configure"
13481 #include "confdefs.h"
13482 /* System header to define __stub macros and hopefully few prototypes,
13483     which can conflict with char $ac_func (); below.  */
13484 #include <assert.h>
13485 /* Override any gcc2 internal prototype to avoid an error.  */
13486 #ifdef __cplusplus
13487 extern "C"
13488 #endif
13489 /* We use char because int might match the return type of a gcc2
13490    builtin and then its argument prototype would still apply.  */
13491 char $ac_func ();
13492 char (*f) ();
13493
13494 int
13495 main ()
13496 {
13497 /* The GNU C library defines this for functions which it implements
13498     to always fail with ENOSYS.  Some functions are actually named
13499     something starting with __ and the normal name is an alias.  */
13500 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13501 choke me
13502 #else
13503 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13504 #endif
13505
13506   ;
13507   return 0;
13508 }
13509 _ACEOF
13510 rm -f conftest.$ac_objext conftest$ac_exeext
13511 if { (eval echo "$as_me:13511: \"$ac_link\"") >&5
13512   (eval $ac_link) 2>&5
13513   ac_status=$?
13514   echo "$as_me:13514: \$? = $ac_status" >&5
13515   (exit $ac_status); } &&
13516          { ac_try='test -s conftest$ac_exeext'
13517   { (eval echo "$as_me:13517: \"$ac_try\"") >&5
13518   (eval $ac_try) 2>&5
13519   ac_status=$?
13520   echo "$as_me:13520: \$? = $ac_status" >&5
13521   (exit $ac_status); }; }; then
13522   eval "$as_ac_var=yes"
13523 else
13524   echo "$as_me: failed program was:" >&5
13525 cat conftest.$ac_ext >&5
13526 eval "$as_ac_var=no"
13527 fi
13528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13529 fi
13530 echo "$as_me:13530: result: `eval echo '${'$as_ac_var'}'`" >&5
13531 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13532 if test `eval echo '${'$as_ac_var'}'` = yes; then
13533   cat >>confdefs.h <<EOF
13534 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13535 EOF
13536
13537 fi
13538 done
13539
13540 fi
13541
13542 ###     use option --enable-assertions to turn on generation of assertion code
13543 echo "$as_me:13543: checking if you want to enable runtime assertions" >&5
13544 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13545
13546 # Check whether --enable-assertions or --disable-assertions was given.
13547 if test "${enable_assertions+set}" = set; then
13548   enableval="$enable_assertions"
13549   with_assertions=$enableval
13550 else
13551   with_assertions=no
13552 fi;
13553 echo "$as_me:13553: result: $with_assertions" >&5
13554 echo "${ECHO_T}$with_assertions" >&6
13555 if test -n "$GCC"
13556 then
13557         if test "$with_assertions" = no
13558         then
13559                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13560         else
13561
13562         ADAFLAGS="$ADAFLAGS -gnata"
13563
13564         fi
13565 fi
13566
13567 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13568
13569 echo "$as_me:13569: checking if you want to use dmalloc for testing" >&5
13570 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13571
13572 # Check whether --with-dmalloc or --without-dmalloc was given.
13573 if test "${with_dmalloc+set}" = set; then
13574   withval="$with_dmalloc"
13575
13576 cat >>confdefs.h <<EOF
13577 #define USE_DMALLOC 1
13578 EOF
13579
13580         : ${with_cflags:=-g}
13581         : ${with_no_leaks:=yes}
13582          with_dmalloc=yes
13583 else
13584   with_dmalloc=
13585 fi;
13586 echo "$as_me:13586: result: ${with_dmalloc:-no}" >&5
13587 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13588
13589 case .$with_cflags in
13590 (.*-g*)
13591         case .$CFLAGS in
13592         (.*-g*)
13593                 ;;
13594         (*)
13595
13596 cf_fix_cppflags=no
13597 cf_new_cflags=
13598 cf_new_cppflags=
13599 cf_new_extra_cppflags=
13600
13601 for cf_add_cflags in -g
13602 do
13603 case $cf_fix_cppflags in
13604 (no)
13605         case $cf_add_cflags in
13606         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13607                 case $cf_add_cflags in
13608                 (-D*)
13609                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13610
13611                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13612                                 && test -z "${cf_tst_cflags}" \
13613                                 && cf_fix_cppflags=yes
13614
13615                         if test $cf_fix_cppflags = yes ; then
13616                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13617                                 continue
13618                         elif test "${cf_tst_cflags}" = "\"'" ; then
13619                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13620                                 continue
13621                         fi
13622                         ;;
13623                 esac
13624                 case "$CPPFLAGS" in
13625                 (*$cf_add_cflags)
13626                         ;;
13627                 (*)
13628                         case $cf_add_cflags in
13629                         (-D*)
13630                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13631
13632 CPPFLAGS=`echo "$CPPFLAGS" | \
13633         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13634                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13635
13636                                 ;;
13637                         esac
13638                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13639                         ;;
13640                 esac
13641                 ;;
13642         (*)
13643                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13644                 ;;
13645         esac
13646         ;;
13647 (yes)
13648         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13649
13650         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13651
13652         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13653                 && test -z "${cf_tst_cflags}" \
13654                 && cf_fix_cppflags=no
13655         ;;
13656 esac
13657 done
13658
13659 if test -n "$cf_new_cflags" ; then
13660
13661         CFLAGS="$CFLAGS $cf_new_cflags"
13662 fi
13663
13664 if test -n "$cf_new_cppflags" ; then
13665
13666         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13667 fi
13668
13669 if test -n "$cf_new_extra_cppflags" ; then
13670
13671         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13672 fi
13673
13674                 ;;
13675         esac
13676         ;;
13677 esac
13678
13679 if test "$with_dmalloc" = yes ; then
13680         echo "$as_me:13680: checking for dmalloc.h" >&5
13681 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13682 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13683   echo $ECHO_N "(cached) $ECHO_C" >&6
13684 else
13685   cat >conftest.$ac_ext <<_ACEOF
13686 #line 13686 "configure"
13687 #include "confdefs.h"
13688 #include <dmalloc.h>
13689 _ACEOF
13690 if { (eval echo "$as_me:13690: \"$ac_cpp conftest.$ac_ext\"") >&5
13691   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13692   ac_status=$?
13693   egrep -v '^ *\+' conftest.er1 >conftest.err
13694   rm -f conftest.er1
13695   cat conftest.err >&5
13696   echo "$as_me:13696: \$? = $ac_status" >&5
13697   (exit $ac_status); } >/dev/null; then
13698   if test -s conftest.err; then
13699     ac_cpp_err=$ac_c_preproc_warn_flag
13700   else
13701     ac_cpp_err=
13702   fi
13703 else
13704   ac_cpp_err=yes
13705 fi
13706 if test -z "$ac_cpp_err"; then
13707   ac_cv_header_dmalloc_h=yes
13708 else
13709   echo "$as_me: failed program was:" >&5
13710   cat conftest.$ac_ext >&5
13711   ac_cv_header_dmalloc_h=no
13712 fi
13713 rm -f conftest.err conftest.$ac_ext
13714 fi
13715 echo "$as_me:13715: result: $ac_cv_header_dmalloc_h" >&5
13716 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13717 if test $ac_cv_header_dmalloc_h = yes; then
13718
13719 echo "$as_me:13719: checking for dmalloc_debug in -ldmalloc" >&5
13720 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13721 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13722   echo $ECHO_N "(cached) $ECHO_C" >&6
13723 else
13724   ac_check_lib_save_LIBS=$LIBS
13725 LIBS="-ldmalloc  $LIBS"
13726 cat >conftest.$ac_ext <<_ACEOF
13727 #line 13727 "configure"
13728 #include "confdefs.h"
13729
13730 /* Override any gcc2 internal prototype to avoid an error.  */
13731 #ifdef __cplusplus
13732 extern "C"
13733 #endif
13734 /* We use char because int might match the return type of a gcc2
13735    builtin and then its argument prototype would still apply.  */
13736 char dmalloc_debug ();
13737 int
13738 main ()
13739 {
13740 dmalloc_debug ();
13741   ;
13742   return 0;
13743 }
13744 _ACEOF
13745 rm -f conftest.$ac_objext conftest$ac_exeext
13746 if { (eval echo "$as_me:13746: \"$ac_link\"") >&5
13747   (eval $ac_link) 2>&5
13748   ac_status=$?
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit $ac_status); } &&
13751          { ac_try='test -s conftest$ac_exeext'
13752   { (eval echo "$as_me:13752: \"$ac_try\"") >&5
13753   (eval $ac_try) 2>&5
13754   ac_status=$?
13755   echo "$as_me:13755: \$? = $ac_status" >&5
13756   (exit $ac_status); }; }; then
13757   ac_cv_lib_dmalloc_dmalloc_debug=yes
13758 else
13759   echo "$as_me: failed program was:" >&5
13760 cat conftest.$ac_ext >&5
13761 ac_cv_lib_dmalloc_dmalloc_debug=no
13762 fi
13763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13764 LIBS=$ac_check_lib_save_LIBS
13765 fi
13766 echo "$as_me:13766: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13767 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13768 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13769   cat >>confdefs.h <<EOF
13770 #define HAVE_LIBDMALLOC 1
13771 EOF
13772
13773   LIBS="-ldmalloc $LIBS"
13774
13775 fi
13776
13777 fi
13778
13779 fi
13780
13781 echo "$as_me:13781: checking if you want to use dbmalloc for testing" >&5
13782 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13783
13784 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13785 if test "${with_dbmalloc+set}" = set; then
13786   withval="$with_dbmalloc"
13787
13788 cat >>confdefs.h <<EOF
13789 #define USE_DBMALLOC 1
13790 EOF
13791
13792         : ${with_cflags:=-g}
13793         : ${with_no_leaks:=yes}
13794          with_dbmalloc=yes
13795 else
13796   with_dbmalloc=
13797 fi;
13798 echo "$as_me:13798: result: ${with_dbmalloc:-no}" >&5
13799 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13800
13801 case .$with_cflags in
13802 (.*-g*)
13803         case .$CFLAGS in
13804         (.*-g*)
13805                 ;;
13806         (*)
13807
13808 cf_fix_cppflags=no
13809 cf_new_cflags=
13810 cf_new_cppflags=
13811 cf_new_extra_cppflags=
13812
13813 for cf_add_cflags in -g
13814 do
13815 case $cf_fix_cppflags in
13816 (no)
13817         case $cf_add_cflags in
13818         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13819                 case $cf_add_cflags in
13820                 (-D*)
13821                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13822
13823                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13824                                 && test -z "${cf_tst_cflags}" \
13825                                 && cf_fix_cppflags=yes
13826
13827                         if test $cf_fix_cppflags = yes ; then
13828                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13829                                 continue
13830                         elif test "${cf_tst_cflags}" = "\"'" ; then
13831                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13832                                 continue
13833                         fi
13834                         ;;
13835                 esac
13836                 case "$CPPFLAGS" in
13837                 (*$cf_add_cflags)
13838                         ;;
13839                 (*)
13840                         case $cf_add_cflags in
13841                         (-D*)
13842                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13843
13844 CPPFLAGS=`echo "$CPPFLAGS" | \
13845         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13846                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13847
13848                                 ;;
13849                         esac
13850                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13851                         ;;
13852                 esac
13853                 ;;
13854         (*)
13855                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13856                 ;;
13857         esac
13858         ;;
13859 (yes)
13860         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13861
13862         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13863
13864         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13865                 && test -z "${cf_tst_cflags}" \
13866                 && cf_fix_cppflags=no
13867         ;;
13868 esac
13869 done
13870
13871 if test -n "$cf_new_cflags" ; then
13872
13873         CFLAGS="$CFLAGS $cf_new_cflags"
13874 fi
13875
13876 if test -n "$cf_new_cppflags" ; then
13877
13878         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13879 fi
13880
13881 if test -n "$cf_new_extra_cppflags" ; then
13882
13883         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13884 fi
13885
13886                 ;;
13887         esac
13888         ;;
13889 esac
13890
13891 if test "$with_dbmalloc" = yes ; then
13892         echo "$as_me:13892: checking for dbmalloc.h" >&5
13893 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13894 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13895   echo $ECHO_N "(cached) $ECHO_C" >&6
13896 else
13897   cat >conftest.$ac_ext <<_ACEOF
13898 #line 13898 "configure"
13899 #include "confdefs.h"
13900 #include <dbmalloc.h>
13901 _ACEOF
13902 if { (eval echo "$as_me:13902: \"$ac_cpp conftest.$ac_ext\"") >&5
13903   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13904   ac_status=$?
13905   egrep -v '^ *\+' conftest.er1 >conftest.err
13906   rm -f conftest.er1
13907   cat conftest.err >&5
13908   echo "$as_me:13908: \$? = $ac_status" >&5
13909   (exit $ac_status); } >/dev/null; then
13910   if test -s conftest.err; then
13911     ac_cpp_err=$ac_c_preproc_warn_flag
13912   else
13913     ac_cpp_err=
13914   fi
13915 else
13916   ac_cpp_err=yes
13917 fi
13918 if test -z "$ac_cpp_err"; then
13919   ac_cv_header_dbmalloc_h=yes
13920 else
13921   echo "$as_me: failed program was:" >&5
13922   cat conftest.$ac_ext >&5
13923   ac_cv_header_dbmalloc_h=no
13924 fi
13925 rm -f conftest.err conftest.$ac_ext
13926 fi
13927 echo "$as_me:13927: result: $ac_cv_header_dbmalloc_h" >&5
13928 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13929 if test $ac_cv_header_dbmalloc_h = yes; then
13930
13931 echo "$as_me:13931: checking for debug_malloc in -ldbmalloc" >&5
13932 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13933 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13934   echo $ECHO_N "(cached) $ECHO_C" >&6
13935 else
13936   ac_check_lib_save_LIBS=$LIBS
13937 LIBS="-ldbmalloc  $LIBS"
13938 cat >conftest.$ac_ext <<_ACEOF
13939 #line 13939 "configure"
13940 #include "confdefs.h"
13941
13942 /* Override any gcc2 internal prototype to avoid an error.  */
13943 #ifdef __cplusplus
13944 extern "C"
13945 #endif
13946 /* We use char because int might match the return type of a gcc2
13947    builtin and then its argument prototype would still apply.  */
13948 char debug_malloc ();
13949 int
13950 main ()
13951 {
13952 debug_malloc ();
13953   ;
13954   return 0;
13955 }
13956 _ACEOF
13957 rm -f conftest.$ac_objext conftest$ac_exeext
13958 if { (eval echo "$as_me:13958: \"$ac_link\"") >&5
13959   (eval $ac_link) 2>&5
13960   ac_status=$?
13961   echo "$as_me:13961: \$? = $ac_status" >&5
13962   (exit $ac_status); } &&
13963          { ac_try='test -s conftest$ac_exeext'
13964   { (eval echo "$as_me:13964: \"$ac_try\"") >&5
13965   (eval $ac_try) 2>&5
13966   ac_status=$?
13967   echo "$as_me:13967: \$? = $ac_status" >&5
13968   (exit $ac_status); }; }; then
13969   ac_cv_lib_dbmalloc_debug_malloc=yes
13970 else
13971   echo "$as_me: failed program was:" >&5
13972 cat conftest.$ac_ext >&5
13973 ac_cv_lib_dbmalloc_debug_malloc=no
13974 fi
13975 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13976 LIBS=$ac_check_lib_save_LIBS
13977 fi
13978 echo "$as_me:13978: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13979 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13980 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13981   cat >>confdefs.h <<EOF
13982 #define HAVE_LIBDBMALLOC 1
13983 EOF
13984
13985   LIBS="-ldbmalloc $LIBS"
13986
13987 fi
13988
13989 fi
13990
13991 fi
13992
13993 echo "$as_me:13993: checking if you want to use valgrind for testing" >&5
13994 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13995
13996 # Check whether --with-valgrind or --without-valgrind was given.
13997 if test "${with_valgrind+set}" = set; then
13998   withval="$with_valgrind"
13999
14000 cat >>confdefs.h <<EOF
14001 #define USE_VALGRIND 1
14002 EOF
14003
14004         : ${with_cflags:=-g}
14005         : ${with_no_leaks:=yes}
14006          with_valgrind=yes
14007 else
14008   with_valgrind=
14009 fi;
14010 echo "$as_me:14010: result: ${with_valgrind:-no}" >&5
14011 echo "${ECHO_T}${with_valgrind:-no}" >&6
14012
14013 case .$with_cflags in
14014 (.*-g*)
14015         case .$CFLAGS in
14016         (.*-g*)
14017                 ;;
14018         (*)
14019
14020 cf_fix_cppflags=no
14021 cf_new_cflags=
14022 cf_new_cppflags=
14023 cf_new_extra_cppflags=
14024
14025 for cf_add_cflags in -g
14026 do
14027 case $cf_fix_cppflags in
14028 (no)
14029         case $cf_add_cflags in
14030         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14031                 case $cf_add_cflags in
14032                 (-D*)
14033                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14034
14035                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14036                                 && test -z "${cf_tst_cflags}" \
14037                                 && cf_fix_cppflags=yes
14038
14039                         if test $cf_fix_cppflags = yes ; then
14040                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14041                                 continue
14042                         elif test "${cf_tst_cflags}" = "\"'" ; then
14043                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14044                                 continue
14045                         fi
14046                         ;;
14047                 esac
14048                 case "$CPPFLAGS" in
14049                 (*$cf_add_cflags)
14050                         ;;
14051                 (*)
14052                         case $cf_add_cflags in
14053                         (-D*)
14054                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14055
14056 CPPFLAGS=`echo "$CPPFLAGS" | \
14057         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14058                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14059
14060                                 ;;
14061                         esac
14062                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14063                         ;;
14064                 esac
14065                 ;;
14066         (*)
14067                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14068                 ;;
14069         esac
14070         ;;
14071 (yes)
14072         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14073
14074         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14075
14076         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14077                 && test -z "${cf_tst_cflags}" \
14078                 && cf_fix_cppflags=no
14079         ;;
14080 esac
14081 done
14082
14083 if test -n "$cf_new_cflags" ; then
14084
14085         CFLAGS="$CFLAGS $cf_new_cflags"
14086 fi
14087
14088 if test -n "$cf_new_cppflags" ; then
14089
14090         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14091 fi
14092
14093 if test -n "$cf_new_extra_cppflags" ; then
14094
14095         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14096 fi
14097
14098                 ;;
14099         esac
14100         ;;
14101 esac
14102
14103 echo "$as_me:14103: checking if you want to perform memory-leak testing" >&5
14104 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14105
14106 # Check whether --enable-leaks or --disable-leaks was given.
14107 if test "${enable_leaks+set}" = set; then
14108   enableval="$enable_leaks"
14109   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14110 else
14111   : ${with_no_leaks:=no}
14112 fi;
14113 echo "$as_me:14113: result: $with_no_leaks" >&5
14114 echo "${ECHO_T}$with_no_leaks" >&6
14115
14116 if test "$with_no_leaks" = yes ; then
14117
14118 cat >>confdefs.h <<\EOF
14119 #define NO_LEAKS 1
14120 EOF
14121
14122 cat >>confdefs.h <<\EOF
14123 #define YY_NO_LEAKS 1
14124 EOF
14125
14126 fi
14127
14128 cat >>confdefs.h <<\EOF
14129 #define HAVE_NC_ALLOC_H 1
14130 EOF
14131
14132 ###     use option --enable-expanded to generate certain macros as functions
14133
14134 # Check whether --enable-expanded or --disable-expanded was given.
14135 if test "${enable_expanded+set}" = set; then
14136   enableval="$enable_expanded"
14137   test "x$enableval" = xyes &&
14138 cat >>confdefs.h <<\EOF
14139 #define NCURSES_EXPANDED 1
14140 EOF
14141
14142 fi;
14143
14144 ###     use option --disable-macros to suppress macros in favor of functions
14145
14146 # Check whether --enable-macros or --disable-macros was given.
14147 if test "${enable_macros+set}" = set; then
14148   enableval="$enable_macros"
14149   test "$enableval" = no &&
14150 cat >>confdefs.h <<\EOF
14151 #define NCURSES_NOMACROS 1
14152 EOF
14153
14154 fi;
14155
14156 # Normally we only add trace() to the debug-library.  Allow this to be
14157 # extended to all models of the ncurses library:
14158 cf_all_traces=no
14159 case "$CFLAGS $CPPFLAGS" in
14160 (*-DTRACE*)
14161         cf_all_traces=yes
14162         ;;
14163 esac
14164
14165 echo "$as_me:14165: checking whether to add trace feature to all models" >&5
14166 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14167
14168 # Check whether --with-trace or --without-trace was given.
14169 if test "${with_trace+set}" = set; then
14170   withval="$with_trace"
14171   cf_with_trace=$withval
14172 else
14173   cf_with_trace=$cf_all_traces
14174 fi;
14175 echo "$as_me:14175: result: $cf_with_trace" >&5
14176 echo "${ECHO_T}$cf_with_trace" >&6
14177
14178 if test "x$cf_with_trace" = xyes ; then
14179         LIB_TRACING=all
14180         ADA_TRACE=TRUE
14181
14182 cf_fix_cppflags=no
14183 cf_new_cflags=
14184 cf_new_cppflags=
14185 cf_new_extra_cppflags=
14186
14187 for cf_add_cflags in -DTRACE
14188 do
14189 case $cf_fix_cppflags in
14190 (no)
14191         case $cf_add_cflags in
14192         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14193                 case $cf_add_cflags in
14194                 (-D*)
14195                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14196
14197                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14198                                 && test -z "${cf_tst_cflags}" \
14199                                 && cf_fix_cppflags=yes
14200
14201                         if test $cf_fix_cppflags = yes ; then
14202                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14203                                 continue
14204                         elif test "${cf_tst_cflags}" = "\"'" ; then
14205                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14206                                 continue
14207                         fi
14208                         ;;
14209                 esac
14210                 case "$CPPFLAGS" in
14211                 (*$cf_add_cflags)
14212                         ;;
14213                 (*)
14214                         case $cf_add_cflags in
14215                         (-D*)
14216                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14217
14218 CPPFLAGS=`echo "$CPPFLAGS" | \
14219         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14220                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14221
14222                                 ;;
14223                         esac
14224                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14225                         ;;
14226                 esac
14227                 ;;
14228         (*)
14229                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14230                 ;;
14231         esac
14232         ;;
14233 (yes)
14234         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14235
14236         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14237
14238         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14239                 && test -z "${cf_tst_cflags}" \
14240                 && cf_fix_cppflags=no
14241         ;;
14242 esac
14243 done
14244
14245 if test -n "$cf_new_cflags" ; then
14246
14247         CFLAGS="$CFLAGS $cf_new_cflags"
14248 fi
14249
14250 if test -n "$cf_new_cppflags" ; then
14251
14252         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14253 fi
14254
14255 if test -n "$cf_new_extra_cppflags" ; then
14256
14257         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14258 fi
14259
14260 else
14261         LIB_TRACING=DEBUG
14262         ADA_TRACE=FALSE
14263 fi
14264
14265 echo "$as_me:14265: checking if we want to use GNAT projects" >&5
14266 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14267
14268 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14269 if test "${enable_gnat_projects+set}" = set; then
14270   enableval="$enable_gnat_projects"
14271   test "$enableval" != no && enableval=yes
14272   if test "$enableval" != "yes" ; then
14273     enable_gnat_projects=no
14274   else
14275     enable_gnat_projects=yes
14276   fi
14277 else
14278   enableval=yes
14279   enable_gnat_projects=yes
14280
14281 fi;
14282 echo "$as_me:14282: result: $enable_gnat_projects" >&5
14283 echo "${ECHO_T}$enable_gnat_projects" >&6
14284
14285 ###     Checks for libraries.
14286 case $cf_cv_system_name in
14287 (*mingw32*|*mingw64*)
14288         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14289         LIBS=" -lpsapi $LIBS"
14290         ;;
14291 (*)
14292 echo "$as_me:14292: checking for gettimeofday" >&5
14293 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14294 if test "${ac_cv_func_gettimeofday+set}" = set; then
14295   echo $ECHO_N "(cached) $ECHO_C" >&6
14296 else
14297   cat >conftest.$ac_ext <<_ACEOF
14298 #line 14298 "configure"
14299 #include "confdefs.h"
14300 /* System header to define __stub macros and hopefully few prototypes,
14301     which can conflict with char gettimeofday (); below.  */
14302 #include <assert.h>
14303 /* Override any gcc2 internal prototype to avoid an error.  */
14304 #ifdef __cplusplus
14305 extern "C"
14306 #endif
14307 /* We use char because int might match the return type of a gcc2
14308    builtin and then its argument prototype would still apply.  */
14309 char gettimeofday ();
14310 char (*f) ();
14311
14312 int
14313 main ()
14314 {
14315 /* The GNU C library defines this for functions which it implements
14316     to always fail with ENOSYS.  Some functions are actually named
14317     something starting with __ and the normal name is an alias.  */
14318 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14319 choke me
14320 #else
14321 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14322 #endif
14323
14324   ;
14325   return 0;
14326 }
14327 _ACEOF
14328 rm -f conftest.$ac_objext conftest$ac_exeext
14329 if { (eval echo "$as_me:14329: \"$ac_link\"") >&5
14330   (eval $ac_link) 2>&5
14331   ac_status=$?
14332   echo "$as_me:14332: \$? = $ac_status" >&5
14333   (exit $ac_status); } &&
14334          { ac_try='test -s conftest$ac_exeext'
14335   { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336   (eval $ac_try) 2>&5
14337   ac_status=$?
14338   echo "$as_me:14338: \$? = $ac_status" >&5
14339   (exit $ac_status); }; }; then
14340   ac_cv_func_gettimeofday=yes
14341 else
14342   echo "$as_me: failed program was:" >&5
14343 cat conftest.$ac_ext >&5
14344 ac_cv_func_gettimeofday=no
14345 fi
14346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14347 fi
14348 echo "$as_me:14348: result: $ac_cv_func_gettimeofday" >&5
14349 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14350 if test $ac_cv_func_gettimeofday = yes; then
14351
14352 cat >>confdefs.h <<\EOF
14353 #define HAVE_GETTIMEOFDAY 1
14354 EOF
14355
14356 else
14357
14358 echo "$as_me:14358: checking for gettimeofday in -lbsd" >&5
14359 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14360 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14361   echo $ECHO_N "(cached) $ECHO_C" >&6
14362 else
14363   ac_check_lib_save_LIBS=$LIBS
14364 LIBS="-lbsd  $LIBS"
14365 cat >conftest.$ac_ext <<_ACEOF
14366 #line 14366 "configure"
14367 #include "confdefs.h"
14368
14369 /* Override any gcc2 internal prototype to avoid an error.  */
14370 #ifdef __cplusplus
14371 extern "C"
14372 #endif
14373 /* We use char because int might match the return type of a gcc2
14374    builtin and then its argument prototype would still apply.  */
14375 char gettimeofday ();
14376 int
14377 main ()
14378 {
14379 gettimeofday ();
14380   ;
14381   return 0;
14382 }
14383 _ACEOF
14384 rm -f conftest.$ac_objext conftest$ac_exeext
14385 if { (eval echo "$as_me:14385: \"$ac_link\"") >&5
14386   (eval $ac_link) 2>&5
14387   ac_status=$?
14388   echo "$as_me:14388: \$? = $ac_status" >&5
14389   (exit $ac_status); } &&
14390          { ac_try='test -s conftest$ac_exeext'
14391   { (eval echo "$as_me:14391: \"$ac_try\"") >&5
14392   (eval $ac_try) 2>&5
14393   ac_status=$?
14394   echo "$as_me:14394: \$? = $ac_status" >&5
14395   (exit $ac_status); }; }; then
14396   ac_cv_lib_bsd_gettimeofday=yes
14397 else
14398   echo "$as_me: failed program was:" >&5
14399 cat conftest.$ac_ext >&5
14400 ac_cv_lib_bsd_gettimeofday=no
14401 fi
14402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14403 LIBS=$ac_check_lib_save_LIBS
14404 fi
14405 echo "$as_me:14405: result: $ac_cv_lib_bsd_gettimeofday" >&5
14406 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14407 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14408
14409 cat >>confdefs.h <<\EOF
14410 #define HAVE_GETTIMEOFDAY 1
14411 EOF
14412
14413 cf_add_libs="-lbsd"
14414 # Filter out duplicates - this happens with badly-designed ".pc" files...
14415 for cf_add_1lib in $LIBS
14416 do
14417         for cf_add_2lib in $cf_add_libs
14418         do
14419                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14420                 then
14421                         cf_add_1lib=
14422                         break
14423                 fi
14424         done
14425         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14426 done
14427 LIBS="$cf_add_libs"
14428
14429 fi
14430
14431 fi
14432         ;;
14433 esac
14434
14435 echo "$as_me:14435: checking if -lm needed for math functions" >&5
14436 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14437 if test "${cf_cv_need_libm+set}" = set; then
14438   echo $ECHO_N "(cached) $ECHO_C" >&6
14439 else
14440
14441         cat >conftest.$ac_ext <<_ACEOF
14442 #line 14442 "configure"
14443 #include "confdefs.h"
14444
14445         #include <stdio.h>
14446         #include <math.h>
14447
14448 int
14449 main ()
14450 {
14451 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14452   ;
14453   return 0;
14454 }
14455 _ACEOF
14456 rm -f conftest.$ac_objext conftest$ac_exeext
14457 if { (eval echo "$as_me:14457: \"$ac_link\"") >&5
14458   (eval $ac_link) 2>&5
14459   ac_status=$?
14460   echo "$as_me:14460: \$? = $ac_status" >&5
14461   (exit $ac_status); } &&
14462          { ac_try='test -s conftest$ac_exeext'
14463   { (eval echo "$as_me:14463: \"$ac_try\"") >&5
14464   (eval $ac_try) 2>&5
14465   ac_status=$?
14466   echo "$as_me:14466: \$? = $ac_status" >&5
14467   (exit $ac_status); }; }; then
14468   cf_cv_need_libm=no
14469 else
14470   echo "$as_me: failed program was:" >&5
14471 cat conftest.$ac_ext >&5
14472 cf_cv_need_libm=yes
14473 fi
14474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14475 fi
14476 echo "$as_me:14476: result: $cf_cv_need_libm" >&5
14477 echo "${ECHO_T}$cf_cv_need_libm" >&6
14478 if test "$cf_cv_need_libm" = yes
14479 then
14480 MATH_LIB=-lm
14481 fi
14482
14483 ###     Checks for header files.
14484 echo "$as_me:14484: checking for ANSI C header files" >&5
14485 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14486 if test "${ac_cv_header_stdc+set}" = set; then
14487   echo $ECHO_N "(cached) $ECHO_C" >&6
14488 else
14489   cat >conftest.$ac_ext <<_ACEOF
14490 #line 14490 "configure"
14491 #include "confdefs.h"
14492 #include <stdlib.h>
14493 #include <stdarg.h>
14494 #include <string.h>
14495 #include <float.h>
14496
14497 _ACEOF
14498 if { (eval echo "$as_me:14498: \"$ac_cpp conftest.$ac_ext\"") >&5
14499   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14500   ac_status=$?
14501   egrep -v '^ *\+' conftest.er1 >conftest.err
14502   rm -f conftest.er1
14503   cat conftest.err >&5
14504   echo "$as_me:14504: \$? = $ac_status" >&5
14505   (exit $ac_status); } >/dev/null; then
14506   if test -s conftest.err; then
14507     ac_cpp_err=$ac_c_preproc_warn_flag
14508   else
14509     ac_cpp_err=
14510   fi
14511 else
14512   ac_cpp_err=yes
14513 fi
14514 if test -z "$ac_cpp_err"; then
14515   ac_cv_header_stdc=yes
14516 else
14517   echo "$as_me: failed program was:" >&5
14518   cat conftest.$ac_ext >&5
14519   ac_cv_header_stdc=no
14520 fi
14521 rm -f conftest.err conftest.$ac_ext
14522
14523 if test $ac_cv_header_stdc = yes; then
14524   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14525   cat >conftest.$ac_ext <<_ACEOF
14526 #line 14526 "configure"
14527 #include "confdefs.h"
14528 #include <string.h>
14529
14530 _ACEOF
14531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14532   egrep "memchr" >/dev/null 2>&1; then
14533   :
14534 else
14535   ac_cv_header_stdc=no
14536 fi
14537 rm -rf conftest*
14538
14539 fi
14540
14541 if test $ac_cv_header_stdc = yes; then
14542   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14543   cat >conftest.$ac_ext <<_ACEOF
14544 #line 14544 "configure"
14545 #include "confdefs.h"
14546 #include <stdlib.h>
14547
14548 _ACEOF
14549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14550   egrep "free" >/dev/null 2>&1; then
14551   :
14552 else
14553   ac_cv_header_stdc=no
14554 fi
14555 rm -rf conftest*
14556
14557 fi
14558
14559 if test $ac_cv_header_stdc = yes; then
14560   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14561   if test "$cross_compiling" = yes; then
14562   :
14563 else
14564   cat >conftest.$ac_ext <<_ACEOF
14565 #line 14565 "configure"
14566 #include "confdefs.h"
14567 #include <ctype.h>
14568 #if ((' ' & 0x0FF) == 0x020)
14569 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14570 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14571 #else
14572 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14573                      || ('j' <= (c) && (c) <= 'r') \
14574                      || ('s' <= (c) && (c) <= 'z'))
14575 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14576 #endif
14577
14578 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14579 int
14580 main ()
14581 {
14582   int i;
14583   for (i = 0; i < 256; i++)
14584     if (XOR (islower (i), ISLOWER (i))
14585         || toupper (i) != TOUPPER (i))
14586       $ac_main_return(2);
14587   $ac_main_return (0);
14588 }
14589 _ACEOF
14590 rm -f conftest$ac_exeext
14591 if { (eval echo "$as_me:14591: \"$ac_link\"") >&5
14592   (eval $ac_link) 2>&5
14593   ac_status=$?
14594   echo "$as_me:14594: \$? = $ac_status" >&5
14595   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14596   { (eval echo "$as_me:14596: \"$ac_try\"") >&5
14597   (eval $ac_try) 2>&5
14598   ac_status=$?
14599   echo "$as_me:14599: \$? = $ac_status" >&5
14600   (exit $ac_status); }; }; then
14601   :
14602 else
14603   echo "$as_me: program exited with status $ac_status" >&5
14604 echo "$as_me: failed program was:" >&5
14605 cat conftest.$ac_ext >&5
14606 ac_cv_header_stdc=no
14607 fi
14608 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14609 fi
14610 fi
14611 fi
14612 echo "$as_me:14612: result: $ac_cv_header_stdc" >&5
14613 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14614 if test $ac_cv_header_stdc = yes; then
14615
14616 cat >>confdefs.h <<\EOF
14617 #define STDC_HEADERS 1
14618 EOF
14619
14620 fi
14621
14622 ac_header_dirent=no
14623 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14624   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14625 echo "$as_me:14625: checking for $ac_hdr that defines DIR" >&5
14626 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14627 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14628   echo $ECHO_N "(cached) $ECHO_C" >&6
14629 else
14630   cat >conftest.$ac_ext <<_ACEOF
14631 #line 14631 "configure"
14632 #include "confdefs.h"
14633 #include <sys/types.h>
14634 #include <$ac_hdr>
14635
14636 int
14637 main ()
14638 {
14639 if ((DIR *) 0)
14640 return 0;
14641   ;
14642   return 0;
14643 }
14644 _ACEOF
14645 rm -f conftest.$ac_objext
14646 if { (eval echo "$as_me:14646: \"$ac_compile\"") >&5
14647   (eval $ac_compile) 2>&5
14648   ac_status=$?
14649   echo "$as_me:14649: \$? = $ac_status" >&5
14650   (exit $ac_status); } &&
14651          { ac_try='test -s conftest.$ac_objext'
14652   { (eval echo "$as_me:14652: \"$ac_try\"") >&5
14653   (eval $ac_try) 2>&5
14654   ac_status=$?
14655   echo "$as_me:14655: \$? = $ac_status" >&5
14656   (exit $ac_status); }; }; then
14657   eval "$as_ac_Header=yes"
14658 else
14659   echo "$as_me: failed program was:" >&5
14660 cat conftest.$ac_ext >&5
14661 eval "$as_ac_Header=no"
14662 fi
14663 rm -f conftest.$ac_objext conftest.$ac_ext
14664 fi
14665 echo "$as_me:14665: result: `eval echo '${'$as_ac_Header'}'`" >&5
14666 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14667 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14668   cat >>confdefs.h <<EOF
14669 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14670 EOF
14671
14672 ac_header_dirent=$ac_hdr; break
14673 fi
14674
14675 done
14676 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14677 if test $ac_header_dirent = dirent.h; then
14678   echo "$as_me:14678: checking for opendir in -ldir" >&5
14679 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14680 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14681   echo $ECHO_N "(cached) $ECHO_C" >&6
14682 else
14683   ac_check_lib_save_LIBS=$LIBS
14684 LIBS="-ldir  $LIBS"
14685 cat >conftest.$ac_ext <<_ACEOF
14686 #line 14686 "configure"
14687 #include "confdefs.h"
14688
14689 /* Override any gcc2 internal prototype to avoid an error.  */
14690 #ifdef __cplusplus
14691 extern "C"
14692 #endif
14693 /* We use char because int might match the return type of a gcc2
14694    builtin and then its argument prototype would still apply.  */
14695 char opendir ();
14696 int
14697 main ()
14698 {
14699 opendir ();
14700   ;
14701   return 0;
14702 }
14703 _ACEOF
14704 rm -f conftest.$ac_objext conftest$ac_exeext
14705 if { (eval echo "$as_me:14705: \"$ac_link\"") >&5
14706   (eval $ac_link) 2>&5
14707   ac_status=$?
14708   echo "$as_me:14708: \$? = $ac_status" >&5
14709   (exit $ac_status); } &&
14710          { ac_try='test -s conftest$ac_exeext'
14711   { (eval echo "$as_me:14711: \"$ac_try\"") >&5
14712   (eval $ac_try) 2>&5
14713   ac_status=$?
14714   echo "$as_me:14714: \$? = $ac_status" >&5
14715   (exit $ac_status); }; }; then
14716   ac_cv_lib_dir_opendir=yes
14717 else
14718   echo "$as_me: failed program was:" >&5
14719 cat conftest.$ac_ext >&5
14720 ac_cv_lib_dir_opendir=no
14721 fi
14722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14723 LIBS=$ac_check_lib_save_LIBS
14724 fi
14725 echo "$as_me:14725: result: $ac_cv_lib_dir_opendir" >&5
14726 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14727 if test $ac_cv_lib_dir_opendir = yes; then
14728   LIBS="$LIBS -ldir"
14729 fi
14730
14731 else
14732   echo "$as_me:14732: checking for opendir in -lx" >&5
14733 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14734 if test "${ac_cv_lib_x_opendir+set}" = set; then
14735   echo $ECHO_N "(cached) $ECHO_C" >&6
14736 else
14737   ac_check_lib_save_LIBS=$LIBS
14738 LIBS="-lx  $LIBS"
14739 cat >conftest.$ac_ext <<_ACEOF
14740 #line 14740 "configure"
14741 #include "confdefs.h"
14742
14743 /* Override any gcc2 internal prototype to avoid an error.  */
14744 #ifdef __cplusplus
14745 extern "C"
14746 #endif
14747 /* We use char because int might match the return type of a gcc2
14748    builtin and then its argument prototype would still apply.  */
14749 char opendir ();
14750 int
14751 main ()
14752 {
14753 opendir ();
14754   ;
14755   return 0;
14756 }
14757 _ACEOF
14758 rm -f conftest.$ac_objext conftest$ac_exeext
14759 if { (eval echo "$as_me:14759: \"$ac_link\"") >&5
14760   (eval $ac_link) 2>&5
14761   ac_status=$?
14762   echo "$as_me:14762: \$? = $ac_status" >&5
14763   (exit $ac_status); } &&
14764          { ac_try='test -s conftest$ac_exeext'
14765   { (eval echo "$as_me:14765: \"$ac_try\"") >&5
14766   (eval $ac_try) 2>&5
14767   ac_status=$?
14768   echo "$as_me:14768: \$? = $ac_status" >&5
14769   (exit $ac_status); }; }; then
14770   ac_cv_lib_x_opendir=yes
14771 else
14772   echo "$as_me: failed program was:" >&5
14773 cat conftest.$ac_ext >&5
14774 ac_cv_lib_x_opendir=no
14775 fi
14776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14777 LIBS=$ac_check_lib_save_LIBS
14778 fi
14779 echo "$as_me:14779: result: $ac_cv_lib_x_opendir" >&5
14780 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14781 if test $ac_cv_lib_x_opendir = yes; then
14782   LIBS="$LIBS -lx"
14783 fi
14784
14785 fi
14786
14787 echo "$as_me:14787: checking whether time.h and sys/time.h may both be included" >&5
14788 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14789 if test "${ac_cv_header_time+set}" = set; then
14790   echo $ECHO_N "(cached) $ECHO_C" >&6
14791 else
14792   cat >conftest.$ac_ext <<_ACEOF
14793 #line 14793 "configure"
14794 #include "confdefs.h"
14795 #include <sys/types.h>
14796 #include <sys/time.h>
14797 #include <time.h>
14798
14799 int
14800 main ()
14801 {
14802 if ((struct tm *) 0)
14803 return 0;
14804   ;
14805   return 0;
14806 }
14807 _ACEOF
14808 rm -f conftest.$ac_objext
14809 if { (eval echo "$as_me:14809: \"$ac_compile\"") >&5
14810   (eval $ac_compile) 2>&5
14811   ac_status=$?
14812   echo "$as_me:14812: \$? = $ac_status" >&5
14813   (exit $ac_status); } &&
14814          { ac_try='test -s conftest.$ac_objext'
14815   { (eval echo "$as_me:14815: \"$ac_try\"") >&5
14816   (eval $ac_try) 2>&5
14817   ac_status=$?
14818   echo "$as_me:14818: \$? = $ac_status" >&5
14819   (exit $ac_status); }; }; then
14820   ac_cv_header_time=yes
14821 else
14822   echo "$as_me: failed program was:" >&5
14823 cat conftest.$ac_ext >&5
14824 ac_cv_header_time=no
14825 fi
14826 rm -f conftest.$ac_objext conftest.$ac_ext
14827 fi
14828 echo "$as_me:14828: result: $ac_cv_header_time" >&5
14829 echo "${ECHO_T}$ac_cv_header_time" >&6
14830 if test $ac_cv_header_time = yes; then
14831
14832 cat >>confdefs.h <<\EOF
14833 #define TIME_WITH_SYS_TIME 1
14834 EOF
14835
14836 fi
14837
14838 cf_regex_func=no
14839
14840 cf_regex_libs="regex re"
14841 case $host_os in
14842 (mingw*)
14843         cf_regex_libs="gnurx $cf_regex_libs"
14844         ;;
14845 esac
14846
14847 echo "$as_me:14847: checking for regcomp" >&5
14848 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14849 if test "${ac_cv_func_regcomp+set}" = set; then
14850   echo $ECHO_N "(cached) $ECHO_C" >&6
14851 else
14852   cat >conftest.$ac_ext <<_ACEOF
14853 #line 14853 "configure"
14854 #include "confdefs.h"
14855 /* System header to define __stub macros and hopefully few prototypes,
14856     which can conflict with char regcomp (); below.  */
14857 #include <assert.h>
14858 /* Override any gcc2 internal prototype to avoid an error.  */
14859 #ifdef __cplusplus
14860 extern "C"
14861 #endif
14862 /* We use char because int might match the return type of a gcc2
14863    builtin and then its argument prototype would still apply.  */
14864 char regcomp ();
14865 char (*f) ();
14866
14867 int
14868 main ()
14869 {
14870 /* The GNU C library defines this for functions which it implements
14871     to always fail with ENOSYS.  Some functions are actually named
14872     something starting with __ and the normal name is an alias.  */
14873 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14874 choke me
14875 #else
14876 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14877 #endif
14878
14879   ;
14880   return 0;
14881 }
14882 _ACEOF
14883 rm -f conftest.$ac_objext conftest$ac_exeext
14884 if { (eval echo "$as_me:14884: \"$ac_link\"") >&5
14885   (eval $ac_link) 2>&5
14886   ac_status=$?
14887   echo "$as_me:14887: \$? = $ac_status" >&5
14888   (exit $ac_status); } &&
14889          { ac_try='test -s conftest$ac_exeext'
14890   { (eval echo "$as_me:14890: \"$ac_try\"") >&5
14891   (eval $ac_try) 2>&5
14892   ac_status=$?
14893   echo "$as_me:14893: \$? = $ac_status" >&5
14894   (exit $ac_status); }; }; then
14895   ac_cv_func_regcomp=yes
14896 else
14897   echo "$as_me: failed program was:" >&5
14898 cat conftest.$ac_ext >&5
14899 ac_cv_func_regcomp=no
14900 fi
14901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14902 fi
14903 echo "$as_me:14903: result: $ac_cv_func_regcomp" >&5
14904 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14905 if test $ac_cv_func_regcomp = yes; then
14906   cf_regex_func=regcomp
14907 else
14908
14909         for cf_regex_lib in $cf_regex_libs
14910         do
14911                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14912 echo "$as_me:14912: checking for regcomp in -l$cf_regex_lib" >&5
14913 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14914 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14915   echo $ECHO_N "(cached) $ECHO_C" >&6
14916 else
14917   ac_check_lib_save_LIBS=$LIBS
14918 LIBS="-l$cf_regex_lib  $LIBS"
14919 cat >conftest.$ac_ext <<_ACEOF
14920 #line 14920 "configure"
14921 #include "confdefs.h"
14922
14923 /* Override any gcc2 internal prototype to avoid an error.  */
14924 #ifdef __cplusplus
14925 extern "C"
14926 #endif
14927 /* We use char because int might match the return type of a gcc2
14928    builtin and then its argument prototype would still apply.  */
14929 char regcomp ();
14930 int
14931 main ()
14932 {
14933 regcomp ();
14934   ;
14935   return 0;
14936 }
14937 _ACEOF
14938 rm -f conftest.$ac_objext conftest$ac_exeext
14939 if { (eval echo "$as_me:14939: \"$ac_link\"") >&5
14940   (eval $ac_link) 2>&5
14941   ac_status=$?
14942   echo "$as_me:14942: \$? = $ac_status" >&5
14943   (exit $ac_status); } &&
14944          { ac_try='test -s conftest$ac_exeext'
14945   { (eval echo "$as_me:14945: \"$ac_try\"") >&5
14946   (eval $ac_try) 2>&5
14947   ac_status=$?
14948   echo "$as_me:14948: \$? = $ac_status" >&5
14949   (exit $ac_status); }; }; then
14950   eval "$as_ac_Lib=yes"
14951 else
14952   echo "$as_me: failed program was:" >&5
14953 cat conftest.$ac_ext >&5
14954 eval "$as_ac_Lib=no"
14955 fi
14956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14957 LIBS=$ac_check_lib_save_LIBS
14958 fi
14959 echo "$as_me:14959: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14960 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14961 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14962
14963 cf_add_libs="-l$cf_regex_lib"
14964 # Filter out duplicates - this happens with badly-designed ".pc" files...
14965 for cf_add_1lib in $LIBS
14966 do
14967         for cf_add_2lib in $cf_add_libs
14968         do
14969                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14970                 then
14971                         cf_add_1lib=
14972                         break
14973                 fi
14974         done
14975         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14976 done
14977 LIBS="$cf_add_libs"
14978
14979                                 cf_regex_func=regcomp
14980                                 break
14981 fi
14982
14983         done
14984
14985 fi
14986
14987 if test "$cf_regex_func" = no ; then
14988         echo "$as_me:14988: checking for compile" >&5
14989 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14990 if test "${ac_cv_func_compile+set}" = set; then
14991   echo $ECHO_N "(cached) $ECHO_C" >&6
14992 else
14993   cat >conftest.$ac_ext <<_ACEOF
14994 #line 14994 "configure"
14995 #include "confdefs.h"
14996 /* System header to define __stub macros and hopefully few prototypes,
14997     which can conflict with char compile (); below.  */
14998 #include <assert.h>
14999 /* Override any gcc2 internal prototype to avoid an error.  */
15000 #ifdef __cplusplus
15001 extern "C"
15002 #endif
15003 /* We use char because int might match the return type of a gcc2
15004    builtin and then its argument prototype would still apply.  */
15005 char compile ();
15006 char (*f) ();
15007
15008 int
15009 main ()
15010 {
15011 /* The GNU C library defines this for functions which it implements
15012     to always fail with ENOSYS.  Some functions are actually named
15013     something starting with __ and the normal name is an alias.  */
15014 #if defined (__stub_compile) || defined (__stub___compile)
15015 choke me
15016 #else
15017 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15018 #endif
15019
15020   ;
15021   return 0;
15022 }
15023 _ACEOF
15024 rm -f conftest.$ac_objext conftest$ac_exeext
15025 if { (eval echo "$as_me:15025: \"$ac_link\"") >&5
15026   (eval $ac_link) 2>&5
15027   ac_status=$?
15028   echo "$as_me:15028: \$? = $ac_status" >&5
15029   (exit $ac_status); } &&
15030          { ac_try='test -s conftest$ac_exeext'
15031   { (eval echo "$as_me:15031: \"$ac_try\"") >&5
15032   (eval $ac_try) 2>&5
15033   ac_status=$?
15034   echo "$as_me:15034: \$? = $ac_status" >&5
15035   (exit $ac_status); }; }; then
15036   ac_cv_func_compile=yes
15037 else
15038   echo "$as_me: failed program was:" >&5
15039 cat conftest.$ac_ext >&5
15040 ac_cv_func_compile=no
15041 fi
15042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15043 fi
15044 echo "$as_me:15044: result: $ac_cv_func_compile" >&5
15045 echo "${ECHO_T}$ac_cv_func_compile" >&6
15046 if test $ac_cv_func_compile = yes; then
15047   cf_regex_func=compile
15048 else
15049
15050                 echo "$as_me:15050: checking for compile in -lgen" >&5
15051 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15052 if test "${ac_cv_lib_gen_compile+set}" = set; then
15053   echo $ECHO_N "(cached) $ECHO_C" >&6
15054 else
15055   ac_check_lib_save_LIBS=$LIBS
15056 LIBS="-lgen  $LIBS"
15057 cat >conftest.$ac_ext <<_ACEOF
15058 #line 15058 "configure"
15059 #include "confdefs.h"
15060
15061 /* Override any gcc2 internal prototype to avoid an error.  */
15062 #ifdef __cplusplus
15063 extern "C"
15064 #endif
15065 /* We use char because int might match the return type of a gcc2
15066    builtin and then its argument prototype would still apply.  */
15067 char compile ();
15068 int
15069 main ()
15070 {
15071 compile ();
15072   ;
15073   return 0;
15074 }
15075 _ACEOF
15076 rm -f conftest.$ac_objext conftest$ac_exeext
15077 if { (eval echo "$as_me:15077: \"$ac_link\"") >&5
15078   (eval $ac_link) 2>&5
15079   ac_status=$?
15080   echo "$as_me:15080: \$? = $ac_status" >&5
15081   (exit $ac_status); } &&
15082          { ac_try='test -s conftest$ac_exeext'
15083   { (eval echo "$as_me:15083: \"$ac_try\"") >&5
15084   (eval $ac_try) 2>&5
15085   ac_status=$?
15086   echo "$as_me:15086: \$? = $ac_status" >&5
15087   (exit $ac_status); }; }; then
15088   ac_cv_lib_gen_compile=yes
15089 else
15090   echo "$as_me: failed program was:" >&5
15091 cat conftest.$ac_ext >&5
15092 ac_cv_lib_gen_compile=no
15093 fi
15094 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15095 LIBS=$ac_check_lib_save_LIBS
15096 fi
15097 echo "$as_me:15097: result: $ac_cv_lib_gen_compile" >&5
15098 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15099 if test $ac_cv_lib_gen_compile = yes; then
15100
15101 cf_add_libs="-lgen"
15102 # Filter out duplicates - this happens with badly-designed ".pc" files...
15103 for cf_add_1lib in $LIBS
15104 do
15105         for cf_add_2lib in $cf_add_libs
15106         do
15107                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15108                 then
15109                         cf_add_1lib=
15110                         break
15111                 fi
15112         done
15113         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15114 done
15115 LIBS="$cf_add_libs"
15116
15117                                 cf_regex_func=compile
15118 fi
15119
15120 fi
15121
15122 fi
15123
15124 if test "$cf_regex_func" = no ; then
15125         { echo "$as_me:15125: WARNING: cannot find regular expression library" >&5
15126 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15127 fi
15128
15129 echo "$as_me:15129: checking for regular-expression headers" >&5
15130 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15131 if test "${cf_cv_regex_hdrs+set}" = set; then
15132   echo $ECHO_N "(cached) $ECHO_C" >&6
15133 else
15134
15135 cf_cv_regex_hdrs=no
15136 case $cf_regex_func in
15137 (compile)
15138         for cf_regex_hdr in regexp.h regexpr.h
15139         do
15140                 cat >conftest.$ac_ext <<_ACEOF
15141 #line 15141 "configure"
15142 #include "confdefs.h"
15143 #include <$cf_regex_hdr>
15144 int
15145 main ()
15146 {
15147
15148                         char *p = compile("", "", "", 0);
15149                         int x = step("", "");
15150
15151   ;
15152   return 0;
15153 }
15154 _ACEOF
15155 rm -f conftest.$ac_objext conftest$ac_exeext
15156 if { (eval echo "$as_me:15156: \"$ac_link\"") >&5
15157   (eval $ac_link) 2>&5
15158   ac_status=$?
15159   echo "$as_me:15159: \$? = $ac_status" >&5
15160   (exit $ac_status); } &&
15161          { ac_try='test -s conftest$ac_exeext'
15162   { (eval echo "$as_me:15162: \"$ac_try\"") >&5
15163   (eval $ac_try) 2>&5
15164   ac_status=$?
15165   echo "$as_me:15165: \$? = $ac_status" >&5
15166   (exit $ac_status); }; }; then
15167
15168                         cf_cv_regex_hdrs=$cf_regex_hdr
15169                         break
15170
15171 else
15172   echo "$as_me: failed program was:" >&5
15173 cat conftest.$ac_ext >&5
15174 fi
15175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15176         done
15177         ;;
15178 (*)
15179         for cf_regex_hdr in regex.h
15180         do
15181                 cat >conftest.$ac_ext <<_ACEOF
15182 #line 15182 "configure"
15183 #include "confdefs.h"
15184 #include <sys/types.h>
15185 #include <$cf_regex_hdr>
15186 int
15187 main ()
15188 {
15189
15190                         regex_t *p;
15191                         int x = regcomp(p, "", 0);
15192                         int y = regexec(p, "", 0, 0, 0);
15193                         regfree(p);
15194
15195   ;
15196   return 0;
15197 }
15198 _ACEOF
15199 rm -f conftest.$ac_objext conftest$ac_exeext
15200 if { (eval echo "$as_me:15200: \"$ac_link\"") >&5
15201   (eval $ac_link) 2>&5
15202   ac_status=$?
15203   echo "$as_me:15203: \$? = $ac_status" >&5
15204   (exit $ac_status); } &&
15205          { ac_try='test -s conftest$ac_exeext'
15206   { (eval echo "$as_me:15206: \"$ac_try\"") >&5
15207   (eval $ac_try) 2>&5
15208   ac_status=$?
15209   echo "$as_me:15209: \$? = $ac_status" >&5
15210   (exit $ac_status); }; }; then
15211
15212                         cf_cv_regex_hdrs=$cf_regex_hdr
15213                         break
15214
15215 else
15216   echo "$as_me: failed program was:" >&5
15217 cat conftest.$ac_ext >&5
15218 fi
15219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15220         done
15221         ;;
15222 esac
15223
15224 fi
15225 echo "$as_me:15225: result: $cf_cv_regex_hdrs" >&5
15226 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15227
15228 case $cf_cv_regex_hdrs in
15229         (no)            { echo "$as_me:15229: WARNING: no regular expression header found" >&5
15230 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15231         (regex.h)
15232 cat >>confdefs.h <<\EOF
15233 #define HAVE_REGEX_H_FUNCS 1
15234 EOF
15235  ;;
15236         (regexp.h)
15237 cat >>confdefs.h <<\EOF
15238 #define HAVE_REGEXP_H_FUNCS 1
15239 EOF
15240  ;;
15241         (regexpr.h)
15242 cat >>confdefs.h <<\EOF
15243 #define HAVE_REGEXPR_H_FUNCS 1
15244 EOF
15245  ;;
15246 esac
15247
15248 for ac_header in \
15249 fcntl.h \
15250 getopt.h \
15251 limits.h \
15252 locale.h \
15253 math.h \
15254 poll.h \
15255 sys/bsdtypes.h \
15256 sys/ioctl.h \
15257 sys/param.h \
15258 sys/poll.h \
15259 sys/select.h \
15260 sys/time.h \
15261 sys/times.h \
15262 ttyent.h \
15263 unistd.h \
15264 wctype.h \
15265
15266 do
15267 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15268 echo "$as_me:15268: checking for $ac_header" >&5
15269 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15270 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15271   echo $ECHO_N "(cached) $ECHO_C" >&6
15272 else
15273   cat >conftest.$ac_ext <<_ACEOF
15274 #line 15274 "configure"
15275 #include "confdefs.h"
15276 #include <$ac_header>
15277 _ACEOF
15278 if { (eval echo "$as_me:15278: \"$ac_cpp conftest.$ac_ext\"") >&5
15279   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15280   ac_status=$?
15281   egrep -v '^ *\+' conftest.er1 >conftest.err
15282   rm -f conftest.er1
15283   cat conftest.err >&5
15284   echo "$as_me:15284: \$? = $ac_status" >&5
15285   (exit $ac_status); } >/dev/null; then
15286   if test -s conftest.err; then
15287     ac_cpp_err=$ac_c_preproc_warn_flag
15288   else
15289     ac_cpp_err=
15290   fi
15291 else
15292   ac_cpp_err=yes
15293 fi
15294 if test -z "$ac_cpp_err"; then
15295   eval "$as_ac_Header=yes"
15296 else
15297   echo "$as_me: failed program was:" >&5
15298   cat conftest.$ac_ext >&5
15299   eval "$as_ac_Header=no"
15300 fi
15301 rm -f conftest.err conftest.$ac_ext
15302 fi
15303 echo "$as_me:15303: result: `eval echo '${'$as_ac_Header'}'`" >&5
15304 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15305 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15306   cat >>confdefs.h <<EOF
15307 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15308 EOF
15309
15310 fi
15311 done
15312
15313 for ac_header in unistd.h getopt.h
15314 do
15315 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15316 echo "$as_me:15316: checking for $ac_header" >&5
15317 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15318 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15319   echo $ECHO_N "(cached) $ECHO_C" >&6
15320 else
15321   cat >conftest.$ac_ext <<_ACEOF
15322 #line 15322 "configure"
15323 #include "confdefs.h"
15324 #include <$ac_header>
15325 _ACEOF
15326 if { (eval echo "$as_me:15326: \"$ac_cpp conftest.$ac_ext\"") >&5
15327   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15328   ac_status=$?
15329   egrep -v '^ *\+' conftest.er1 >conftest.err
15330   rm -f conftest.er1
15331   cat conftest.err >&5
15332   echo "$as_me:15332: \$? = $ac_status" >&5
15333   (exit $ac_status); } >/dev/null; then
15334   if test -s conftest.err; then
15335     ac_cpp_err=$ac_c_preproc_warn_flag
15336   else
15337     ac_cpp_err=
15338   fi
15339 else
15340   ac_cpp_err=yes
15341 fi
15342 if test -z "$ac_cpp_err"; then
15343   eval "$as_ac_Header=yes"
15344 else
15345   echo "$as_me: failed program was:" >&5
15346   cat conftest.$ac_ext >&5
15347   eval "$as_ac_Header=no"
15348 fi
15349 rm -f conftest.err conftest.$ac_ext
15350 fi
15351 echo "$as_me:15351: result: `eval echo '${'$as_ac_Header'}'`" >&5
15352 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15353 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15354   cat >>confdefs.h <<EOF
15355 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15356 EOF
15357
15358 fi
15359 done
15360
15361 echo "$as_me:15361: checking for header declaring getopt variables" >&5
15362 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15363 if test "${cf_cv_getopt_header+set}" = set; then
15364   echo $ECHO_N "(cached) $ECHO_C" >&6
15365 else
15366
15367 cf_cv_getopt_header=none
15368 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15369 do
15370 cat >conftest.$ac_ext <<_ACEOF
15371 #line 15371 "configure"
15372 #include "confdefs.h"
15373
15374 #include <$cf_header>
15375 int
15376 main ()
15377 {
15378 int x = optind; char *y = optarg
15379   ;
15380   return 0;
15381 }
15382 _ACEOF
15383 rm -f conftest.$ac_objext
15384 if { (eval echo "$as_me:15384: \"$ac_compile\"") >&5
15385   (eval $ac_compile) 2>&5
15386   ac_status=$?
15387   echo "$as_me:15387: \$? = $ac_status" >&5
15388   (exit $ac_status); } &&
15389          { ac_try='test -s conftest.$ac_objext'
15390   { (eval echo "$as_me:15390: \"$ac_try\"") >&5
15391   (eval $ac_try) 2>&5
15392   ac_status=$?
15393   echo "$as_me:15393: \$? = $ac_status" >&5
15394   (exit $ac_status); }; }; then
15395   cf_cv_getopt_header=$cf_header
15396  break
15397 else
15398   echo "$as_me: failed program was:" >&5
15399 cat conftest.$ac_ext >&5
15400 fi
15401 rm -f conftest.$ac_objext conftest.$ac_ext
15402 done
15403
15404 fi
15405 echo "$as_me:15405: result: $cf_cv_getopt_header" >&5
15406 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15407 if test $cf_cv_getopt_header != none ; then
15408
15409 cat >>confdefs.h <<\EOF
15410 #define HAVE_GETOPT_HEADER 1
15411 EOF
15412
15413 fi
15414 if test $cf_cv_getopt_header = getopt.h ; then
15415
15416 cat >>confdefs.h <<\EOF
15417 #define NEED_GETOPT_H 1
15418 EOF
15419
15420 fi
15421
15422 # check for ISC (this may also define _POSIX_SOURCE)
15423 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15424 if test "x$ISC" = xyes ; then
15425
15426 echo "$as_me:15426: checking for main in -lcposix" >&5
15427 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15428 if test "${ac_cv_lib_cposix_main+set}" = set; then
15429   echo $ECHO_N "(cached) $ECHO_C" >&6
15430 else
15431   ac_check_lib_save_LIBS=$LIBS
15432 LIBS="-lcposix  $LIBS"
15433 cat >conftest.$ac_ext <<_ACEOF
15434 #line 15434 "configure"
15435 #include "confdefs.h"
15436
15437 int
15438 main ()
15439 {
15440 main ();
15441   ;
15442   return 0;
15443 }
15444 _ACEOF
15445 rm -f conftest.$ac_objext conftest$ac_exeext
15446 if { (eval echo "$as_me:15446: \"$ac_link\"") >&5
15447   (eval $ac_link) 2>&5
15448   ac_status=$?
15449   echo "$as_me:15449: \$? = $ac_status" >&5
15450   (exit $ac_status); } &&
15451          { ac_try='test -s conftest$ac_exeext'
15452   { (eval echo "$as_me:15452: \"$ac_try\"") >&5
15453   (eval $ac_try) 2>&5
15454   ac_status=$?
15455   echo "$as_me:15455: \$? = $ac_status" >&5
15456   (exit $ac_status); }; }; then
15457   ac_cv_lib_cposix_main=yes
15458 else
15459   echo "$as_me: failed program was:" >&5
15460 cat conftest.$ac_ext >&5
15461 ac_cv_lib_cposix_main=no
15462 fi
15463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15464 LIBS=$ac_check_lib_save_LIBS
15465 fi
15466 echo "$as_me:15466: result: $ac_cv_lib_cposix_main" >&5
15467 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15468 if test $ac_cv_lib_cposix_main = yes; then
15469   cat >>confdefs.h <<EOF
15470 #define HAVE_LIBCPOSIX 1
15471 EOF
15472
15473   LIBS="-lcposix $LIBS"
15474
15475 fi
15476
15477         echo "$as_me:15477: checking for bzero in -linet" >&5
15478 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15479 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15480   echo $ECHO_N "(cached) $ECHO_C" >&6
15481 else
15482   ac_check_lib_save_LIBS=$LIBS
15483 LIBS="-linet  $LIBS"
15484 cat >conftest.$ac_ext <<_ACEOF
15485 #line 15485 "configure"
15486 #include "confdefs.h"
15487
15488 /* Override any gcc2 internal prototype to avoid an error.  */
15489 #ifdef __cplusplus
15490 extern "C"
15491 #endif
15492 /* We use char because int might match the return type of a gcc2
15493    builtin and then its argument prototype would still apply.  */
15494 char bzero ();
15495 int
15496 main ()
15497 {
15498 bzero ();
15499   ;
15500   return 0;
15501 }
15502 _ACEOF
15503 rm -f conftest.$ac_objext conftest$ac_exeext
15504 if { (eval echo "$as_me:15504: \"$ac_link\"") >&5
15505   (eval $ac_link) 2>&5
15506   ac_status=$?
15507   echo "$as_me:15507: \$? = $ac_status" >&5
15508   (exit $ac_status); } &&
15509          { ac_try='test -s conftest$ac_exeext'
15510   { (eval echo "$as_me:15510: \"$ac_try\"") >&5
15511   (eval $ac_try) 2>&5
15512   ac_status=$?
15513   echo "$as_me:15513: \$? = $ac_status" >&5
15514   (exit $ac_status); }; }; then
15515   ac_cv_lib_inet_bzero=yes
15516 else
15517   echo "$as_me: failed program was:" >&5
15518 cat conftest.$ac_ext >&5
15519 ac_cv_lib_inet_bzero=no
15520 fi
15521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15522 LIBS=$ac_check_lib_save_LIBS
15523 fi
15524 echo "$as_me:15524: result: $ac_cv_lib_inet_bzero" >&5
15525 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15526 if test $ac_cv_lib_inet_bzero = yes; then
15527
15528 cf_add_libs="-linet"
15529 # Filter out duplicates - this happens with badly-designed ".pc" files...
15530 for cf_add_1lib in $LIBS
15531 do
15532         for cf_add_2lib in $cf_add_libs
15533         do
15534                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15535                 then
15536                         cf_add_1lib=
15537                         break
15538                 fi
15539         done
15540         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15541 done
15542 LIBS="$cf_add_libs"
15543
15544 fi
15545 fi
15546
15547 echo "$as_me:15547: checking if sys/time.h works with sys/select.h" >&5
15548 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15549 if test "${cf_cv_sys_time_select+set}" = set; then
15550   echo $ECHO_N "(cached) $ECHO_C" >&6
15551 else
15552
15553 cat >conftest.$ac_ext <<_ACEOF
15554 #line 15554 "configure"
15555 #include "confdefs.h"
15556
15557 #include <sys/types.h>
15558 #ifdef HAVE_SYS_TIME_H
15559 #include <sys/time.h>
15560 #endif
15561 #ifdef HAVE_SYS_SELECT_H
15562 #include <sys/select.h>
15563 #endif
15564
15565 int
15566 main ()
15567 {
15568
15569   ;
15570   return 0;
15571 }
15572 _ACEOF
15573 rm -f conftest.$ac_objext
15574 if { (eval echo "$as_me:15574: \"$ac_compile\"") >&5
15575   (eval $ac_compile) 2>&5
15576   ac_status=$?
15577   echo "$as_me:15577: \$? = $ac_status" >&5
15578   (exit $ac_status); } &&
15579          { ac_try='test -s conftest.$ac_objext'
15580   { (eval echo "$as_me:15580: \"$ac_try\"") >&5
15581   (eval $ac_try) 2>&5
15582   ac_status=$?
15583   echo "$as_me:15583: \$? = $ac_status" >&5
15584   (exit $ac_status); }; }; then
15585   cf_cv_sys_time_select=yes
15586 else
15587   echo "$as_me: failed program was:" >&5
15588 cat conftest.$ac_ext >&5
15589 cf_cv_sys_time_select=no
15590 fi
15591 rm -f conftest.$ac_objext conftest.$ac_ext
15592
15593 fi
15594
15595 echo "$as_me:15595: result: $cf_cv_sys_time_select" >&5
15596 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15597 test "$cf_cv_sys_time_select" = yes &&
15598 cat >>confdefs.h <<\EOF
15599 #define HAVE_SYS_TIME_SELECT 1
15600 EOF
15601
15602 ###     checks for compiler characteristics
15603 ac_ext=c
15604 ac_cpp='$CPP $CPPFLAGS'
15605 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15606 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15607 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15608 ac_main_return=return
15609
15610 echo "$as_me:15610: checking for an ANSI C-conforming const" >&5
15611 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15612 if test "${ac_cv_c_const+set}" = set; then
15613   echo $ECHO_N "(cached) $ECHO_C" >&6
15614 else
15615   cat >conftest.$ac_ext <<_ACEOF
15616 #line 15616 "configure"
15617 #include "confdefs.h"
15618
15619 int
15620 main ()
15621 {
15622 /* FIXME: Include the comments suggested by Paul. */
15623 #ifndef __cplusplus
15624   /* Ultrix mips cc rejects this.  */
15625   typedef int charset[2];
15626   const charset x;
15627   /* SunOS 4.1.1 cc rejects this.  */
15628   char const *const *ccp;
15629   char **p;
15630   /* NEC SVR4.0.2 mips cc rejects this.  */
15631   struct point {int x, y;};
15632   static struct point const zero = {0,0};
15633   /* AIX XL C 1.02.0.0 rejects this.
15634      It does not let you subtract one const X* pointer from another in
15635      an arm of an if-expression whose if-part is not a constant
15636      expression */
15637   const char *g = "string";
15638   ccp = &g + (g ? g-g : 0);
15639   /* HPUX 7.0 cc rejects these. */
15640   ++ccp;
15641   p = (char**) ccp;
15642   ccp = (char const *const *) p;
15643   { /* SCO 3.2v4 cc rejects this.  */
15644     char *t;
15645     char const *s = 0 ? (char *) 0 : (char const *) 0;
15646
15647     *t++ = 0;
15648   }
15649   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15650     int x[] = {25, 17};
15651     const int *foo = &x[0];
15652     ++foo;
15653   }
15654   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15655     typedef const int *iptr;
15656     iptr p = 0;
15657     ++p;
15658   }
15659   { /* AIX XL C 1.02.0.0 rejects this saying
15660        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15661     struct s { int j; const int *ap[3]; };
15662     struct s *b; b->j = 5;
15663   }
15664   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15665     const int foo = 10;
15666   }
15667 #endif
15668
15669   ;
15670   return 0;
15671 }
15672 _ACEOF
15673 rm -f conftest.$ac_objext
15674 if { (eval echo "$as_me:15674: \"$ac_compile\"") >&5
15675   (eval $ac_compile) 2>&5
15676   ac_status=$?
15677   echo "$as_me:15677: \$? = $ac_status" >&5
15678   (exit $ac_status); } &&
15679          { ac_try='test -s conftest.$ac_objext'
15680   { (eval echo "$as_me:15680: \"$ac_try\"") >&5
15681   (eval $ac_try) 2>&5
15682   ac_status=$?
15683   echo "$as_me:15683: \$? = $ac_status" >&5
15684   (exit $ac_status); }; }; then
15685   ac_cv_c_const=yes
15686 else
15687   echo "$as_me: failed program was:" >&5
15688 cat conftest.$ac_ext >&5
15689 ac_cv_c_const=no
15690 fi
15691 rm -f conftest.$ac_objext conftest.$ac_ext
15692 fi
15693 echo "$as_me:15693: result: $ac_cv_c_const" >&5
15694 echo "${ECHO_T}$ac_cv_c_const" >&6
15695 if test $ac_cv_c_const = no; then
15696
15697 cat >>confdefs.h <<\EOF
15698 #define const
15699 EOF
15700
15701 fi
15702
15703 echo "$as_me:15703: checking for inline" >&5
15704 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15705 if test "${ac_cv_c_inline+set}" = set; then
15706   echo $ECHO_N "(cached) $ECHO_C" >&6
15707 else
15708   ac_cv_c_inline=no
15709 for ac_kw in inline __inline__ __inline; do
15710   cat >conftest.$ac_ext <<_ACEOF
15711 #line 15711 "configure"
15712 #include "confdefs.h"
15713 #ifndef __cplusplus
15714 static $ac_kw int static_foo () {return 0; }
15715 $ac_kw int foo () {return 0; }
15716 #endif
15717
15718 _ACEOF
15719 rm -f conftest.$ac_objext
15720 if { (eval echo "$as_me:15720: \"$ac_compile\"") >&5
15721   (eval $ac_compile) 2>&5
15722   ac_status=$?
15723   echo "$as_me:15723: \$? = $ac_status" >&5
15724   (exit $ac_status); } &&
15725          { ac_try='test -s conftest.$ac_objext'
15726   { (eval echo "$as_me:15726: \"$ac_try\"") >&5
15727   (eval $ac_try) 2>&5
15728   ac_status=$?
15729   echo "$as_me:15729: \$? = $ac_status" >&5
15730   (exit $ac_status); }; }; then
15731   ac_cv_c_inline=$ac_kw; break
15732 else
15733   echo "$as_me: failed program was:" >&5
15734 cat conftest.$ac_ext >&5
15735 fi
15736 rm -f conftest.$ac_objext conftest.$ac_ext
15737 done
15738
15739 fi
15740 echo "$as_me:15740: result: $ac_cv_c_inline" >&5
15741 echo "${ECHO_T}$ac_cv_c_inline" >&6
15742 case $ac_cv_c_inline in
15743   inline | yes) ;;
15744   no)
15745 cat >>confdefs.h <<\EOF
15746 #define inline
15747 EOF
15748  ;;
15749   *)  cat >>confdefs.h <<EOF
15750 #define inline $ac_cv_c_inline
15751 EOF
15752  ;;
15753 esac
15754
15755 NCURSES_INLINE=
15756 if test "$ac_cv_c_inline" != no ; then
15757         NCURSES_INLINE=inline
15758         if test "$INTEL_COMPILER" = yes
15759         then
15760                 :
15761         elif test "$CLANG_COMPILER" = yes
15762         then
15763                 :
15764         elif test "$GCC" = yes
15765         then
15766                 echo "$as_me:15766: checking if $CC supports options to tune inlining" >&5
15767 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15768 if test "${cf_cv_gcc_inline+set}" = set; then
15769   echo $ECHO_N "(cached) $ECHO_C" >&6
15770 else
15771
15772                 cf_save_CFLAGS=$CFLAGS
15773                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15774                 cat >conftest.$ac_ext <<_ACEOF
15775 #line 15775 "configure"
15776 #include "confdefs.h"
15777 inline int foo(void) { return 1; }
15778 int
15779 main ()
15780 {
15781 ${cf_cv_main_return:-return} foo()
15782   ;
15783   return 0;
15784 }
15785 _ACEOF
15786 rm -f conftest.$ac_objext
15787 if { (eval echo "$as_me:15787: \"$ac_compile\"") >&5
15788   (eval $ac_compile) 2>&5
15789   ac_status=$?
15790   echo "$as_me:15790: \$? = $ac_status" >&5
15791   (exit $ac_status); } &&
15792          { ac_try='test -s conftest.$ac_objext'
15793   { (eval echo "$as_me:15793: \"$ac_try\"") >&5
15794   (eval $ac_try) 2>&5
15795   ac_status=$?
15796   echo "$as_me:15796: \$? = $ac_status" >&5
15797   (exit $ac_status); }; }; then
15798   cf_cv_gcc_inline=yes
15799 else
15800   echo "$as_me: failed program was:" >&5
15801 cat conftest.$ac_ext >&5
15802 cf_cv_gcc_inline=no
15803 fi
15804 rm -f conftest.$ac_objext conftest.$ac_ext
15805                 CFLAGS=$cf_save_CFLAGS
15806
15807 fi
15808 echo "$as_me:15808: result: $cf_cv_gcc_inline" >&5
15809 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15810                 if test "$cf_cv_gcc_inline" = yes ; then
15811
15812 cf_fix_cppflags=no
15813 cf_new_cflags=
15814 cf_new_cppflags=
15815 cf_new_extra_cppflags=
15816
15817 for cf_add_cflags in --param max-inline-insns-single=1200
15818 do
15819 case $cf_fix_cppflags in
15820 (no)
15821         case $cf_add_cflags in
15822         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15823                 case $cf_add_cflags in
15824                 (-D*)
15825                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15826
15827                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15828                                 && test -z "${cf_tst_cflags}" \
15829                                 && cf_fix_cppflags=yes
15830
15831                         if test $cf_fix_cppflags = yes ; then
15832                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15833                                 continue
15834                         elif test "${cf_tst_cflags}" = "\"'" ; then
15835                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15836                                 continue
15837                         fi
15838                         ;;
15839                 esac
15840                 case "$CPPFLAGS" in
15841                 (*$cf_add_cflags)
15842                         ;;
15843                 (*)
15844                         case $cf_add_cflags in
15845                         (-D*)
15846                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15847
15848 CPPFLAGS=`echo "$CPPFLAGS" | \
15849         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15850                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15851
15852                                 ;;
15853                         esac
15854                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15855                         ;;
15856                 esac
15857                 ;;
15858         (*)
15859                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15860                 ;;
15861         esac
15862         ;;
15863 (yes)
15864         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15865
15866         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15867
15868         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15869                 && test -z "${cf_tst_cflags}" \
15870                 && cf_fix_cppflags=no
15871         ;;
15872 esac
15873 done
15874
15875 if test -n "$cf_new_cflags" ; then
15876
15877         CFLAGS="$CFLAGS $cf_new_cflags"
15878 fi
15879
15880 if test -n "$cf_new_cppflags" ; then
15881
15882         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15883 fi
15884
15885 if test -n "$cf_new_extra_cppflags" ; then
15886
15887         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15888 fi
15889
15890                 fi
15891         fi
15892 fi
15893
15894 echo "$as_me:15894: checking for signal global datatype" >&5
15895 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15896 if test "${cf_cv_sig_atomic_t+set}" = set; then
15897   echo $ECHO_N "(cached) $ECHO_C" >&6
15898 else
15899
15900         for cf_type in \
15901                 "volatile sig_atomic_t" \
15902                 "sig_atomic_t" \
15903                 "int"
15904         do
15905         cat >conftest.$ac_ext <<_ACEOF
15906 #line 15906 "configure"
15907 #include "confdefs.h"
15908
15909 #include <sys/types.h>
15910 #include <signal.h>
15911 #include <stdio.h>
15912
15913 extern $cf_type x;
15914 $cf_type x;
15915 static void handler(int sig)
15916 {
15917         x = 5;
15918 }
15919 int
15920 main ()
15921 {
15922 signal(SIGINT, handler);
15923                  x = 1
15924   ;
15925   return 0;
15926 }
15927 _ACEOF
15928 rm -f conftest.$ac_objext
15929 if { (eval echo "$as_me:15929: \"$ac_compile\"") >&5
15930   (eval $ac_compile) 2>&5
15931   ac_status=$?
15932   echo "$as_me:15932: \$? = $ac_status" >&5
15933   (exit $ac_status); } &&
15934          { ac_try='test -s conftest.$ac_objext'
15935   { (eval echo "$as_me:15935: \"$ac_try\"") >&5
15936   (eval $ac_try) 2>&5
15937   ac_status=$?
15938   echo "$as_me:15938: \$? = $ac_status" >&5
15939   (exit $ac_status); }; }; then
15940   cf_cv_sig_atomic_t=$cf_type
15941 else
15942   echo "$as_me: failed program was:" >&5
15943 cat conftest.$ac_ext >&5
15944 cf_cv_sig_atomic_t=no
15945 fi
15946 rm -f conftest.$ac_objext conftest.$ac_ext
15947                 test "$cf_cv_sig_atomic_t" != no && break
15948         done
15949
15950 fi
15951
15952 echo "$as_me:15952: result: $cf_cv_sig_atomic_t" >&5
15953 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15954 test "$cf_cv_sig_atomic_t" != no &&
15955 cat >>confdefs.h <<EOF
15956 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15957 EOF
15958
15959 if test $NCURSES_CHTYPE = auto ; then
15960
15961 echo "$as_me:15961: checking for type of chtype" >&5
15962 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15963 if test "${cf_cv_typeof_chtype+set}" = set; then
15964   echo $ECHO_N "(cached) $ECHO_C" >&6
15965 else
15966
15967                 if test "$cross_compiling" = yes; then
15968   cf_cv_typeof_chtype=long
15969 else
15970   cat >conftest.$ac_ext <<_ACEOF
15971 #line 15971 "configure"
15972 #include "confdefs.h"
15973
15974 #define WANT_BITS 31
15975 #include <stdio.h>
15976 int main()
15977 {
15978         FILE *fp = fopen("cf_test.out", "w");
15979         if (fp != 0) {
15980                 char *result = "long";
15981                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15982                         int n;
15983                         unsigned int x, y;
15984                         for (n = 0; n < WANT_BITS; n++) {
15985                                 x = (1 << n);
15986                                 y = (x >> n);
15987                                 if (y != 1 || x == 0) {
15988                                         x = 0;
15989                                         break;
15990                                 }
15991                         }
15992                         /*
15993                          * If x is nonzero, an int is big enough for the bits
15994                          * that we want.
15995                          */
15996                         result = (x != 0) ? "int" : "long";
15997                 }
15998                 fputs(result, fp);
15999                 fclose(fp);
16000         }
16001         ${cf_cv_main_return:-return}(0);
16002 }
16003
16004 _ACEOF
16005 rm -f conftest$ac_exeext
16006 if { (eval echo "$as_me:16006: \"$ac_link\"") >&5
16007   (eval $ac_link) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16011   { (eval echo "$as_me:16011: \"$ac_try\"") >&5
16012   (eval $ac_try) 2>&5
16013   ac_status=$?
16014   echo "$as_me:16014: \$? = $ac_status" >&5
16015   (exit $ac_status); }; }; then
16016   cf_cv_typeof_chtype=`cat cf_test.out`
16017 else
16018   echo "$as_me: program exited with status $ac_status" >&5
16019 echo "$as_me: failed program was:" >&5
16020 cat conftest.$ac_ext >&5
16021 cf_cv_typeof_chtype=long
16022 fi
16023 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16024 fi
16025                 rm -f cf_test.out
16026
16027 fi
16028
16029 echo "$as_me:16029: result: $cf_cv_typeof_chtype" >&5
16030 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16031
16032 cat >>confdefs.h <<EOF
16033 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16034 EOF
16035
16036 else
16037         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16038 fi
16039 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16040
16041 echo "$as_me:16041: checking if unsigned literals are legal" >&5
16042 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16043 if test "${cf_cv_unsigned_literals+set}" = set; then
16044   echo $ECHO_N "(cached) $ECHO_C" >&6
16045 else
16046
16047         cat >conftest.$ac_ext <<_ACEOF
16048 #line 16048 "configure"
16049 #include "confdefs.h"
16050
16051 int
16052 main ()
16053 {
16054 long x = 1L + 1UL + 1U + 1
16055   ;
16056   return 0;
16057 }
16058 _ACEOF
16059 rm -f conftest.$ac_objext
16060 if { (eval echo "$as_me:16060: \"$ac_compile\"") >&5
16061   (eval $ac_compile) 2>&5
16062   ac_status=$?
16063   echo "$as_me:16063: \$? = $ac_status" >&5
16064   (exit $ac_status); } &&
16065          { ac_try='test -s conftest.$ac_objext'
16066   { (eval echo "$as_me:16066: \"$ac_try\"") >&5
16067   (eval $ac_try) 2>&5
16068   ac_status=$?
16069   echo "$as_me:16069: \$? = $ac_status" >&5
16070   (exit $ac_status); }; }; then
16071   cf_cv_unsigned_literals=yes
16072 else
16073   echo "$as_me: failed program was:" >&5
16074 cat conftest.$ac_ext >&5
16075 cf_cv_unsigned_literals=no
16076 fi
16077 rm -f conftest.$ac_objext conftest.$ac_ext
16078
16079 fi
16080
16081 echo "$as_me:16081: result: $cf_cv_unsigned_literals" >&5
16082 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16083
16084 cf_cv_1UL="1"
16085 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16086 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16087
16088 if test $NCURSES_MMASK_T = auto ; then
16089         cf_cv_typeof_mmask_t=long
16090 else
16091         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16092 fi
16093 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16094
16095 ###     Checks for external-data
16096
16097 echo "$as_me:16097: checking if external errno is declared" >&5
16098 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16099 if test "${cf_cv_dcl_errno+set}" = set; then
16100   echo $ECHO_N "(cached) $ECHO_C" >&6
16101 else
16102
16103         cat >conftest.$ac_ext <<_ACEOF
16104 #line 16104 "configure"
16105 #include "confdefs.h"
16106
16107 #ifdef HAVE_STDLIB_H
16108 #include <stdlib.h>
16109 #endif
16110 #include <stdio.h>
16111 #include <sys/types.h>
16112 #include <errno.h>
16113 int
16114 main ()
16115 {
16116 int x = (int) errno
16117   ;
16118   return 0;
16119 }
16120 _ACEOF
16121 rm -f conftest.$ac_objext
16122 if { (eval echo "$as_me:16122: \"$ac_compile\"") >&5
16123   (eval $ac_compile) 2>&5
16124   ac_status=$?
16125   echo "$as_me:16125: \$? = $ac_status" >&5
16126   (exit $ac_status); } &&
16127          { ac_try='test -s conftest.$ac_objext'
16128   { (eval echo "$as_me:16128: \"$ac_try\"") >&5
16129   (eval $ac_try) 2>&5
16130   ac_status=$?
16131   echo "$as_me:16131: \$? = $ac_status" >&5
16132   (exit $ac_status); }; }; then
16133   cf_cv_dcl_errno=yes
16134 else
16135   echo "$as_me: failed program was:" >&5
16136 cat conftest.$ac_ext >&5
16137 cf_cv_dcl_errno=no
16138 fi
16139 rm -f conftest.$ac_objext conftest.$ac_ext
16140
16141 fi
16142 echo "$as_me:16142: result: $cf_cv_dcl_errno" >&5
16143 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16144
16145 if test "$cf_cv_dcl_errno" = no ; then
16146
16147 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16148
16149         cat >>confdefs.h <<EOF
16150 #define $cf_result 1
16151 EOF
16152
16153 fi
16154
16155 # It's possible (for near-UNIX clones) that the data doesn't exist
16156
16157 echo "$as_me:16157: checking if external errno exists" >&5
16158 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16159 if test "${cf_cv_have_errno+set}" = set; then
16160   echo $ECHO_N "(cached) $ECHO_C" >&6
16161 else
16162
16163         cat >conftest.$ac_ext <<_ACEOF
16164 #line 16164 "configure"
16165 #include "confdefs.h"
16166
16167 #undef errno
16168 extern int errno;
16169
16170 int
16171 main ()
16172 {
16173 errno = 2
16174   ;
16175   return 0;
16176 }
16177 _ACEOF
16178 rm -f conftest.$ac_objext conftest$ac_exeext
16179 if { (eval echo "$as_me:16179: \"$ac_link\"") >&5
16180   (eval $ac_link) 2>&5
16181   ac_status=$?
16182   echo "$as_me:16182: \$? = $ac_status" >&5
16183   (exit $ac_status); } &&
16184          { ac_try='test -s conftest$ac_exeext'
16185   { (eval echo "$as_me:16185: \"$ac_try\"") >&5
16186   (eval $ac_try) 2>&5
16187   ac_status=$?
16188   echo "$as_me:16188: \$? = $ac_status" >&5
16189   (exit $ac_status); }; }; then
16190   cf_cv_have_errno=yes
16191 else
16192   echo "$as_me: failed program was:" >&5
16193 cat conftest.$ac_ext >&5
16194 cf_cv_have_errno=no
16195 fi
16196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16197
16198 fi
16199 echo "$as_me:16199: result: $cf_cv_have_errno" >&5
16200 echo "${ECHO_T}$cf_cv_have_errno" >&6
16201
16202 if test "$cf_cv_have_errno" = yes ; then
16203
16204 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16205
16206         cat >>confdefs.h <<EOF
16207 #define $cf_result 1
16208 EOF
16209
16210 fi
16211
16212 echo "$as_me:16212: checking if data-only library module links" >&5
16213 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16214 if test "${cf_cv_link_dataonly+set}" = set; then
16215   echo $ECHO_N "(cached) $ECHO_C" >&6
16216 else
16217
16218         rm -f conftest.a
16219         cat >conftest.$ac_ext <<EOF
16220 #line 16220 "configure"
16221 int     testdata[3] = { 123, 456, 789 };
16222 EOF
16223         if { (eval echo "$as_me:16223: \"$ac_compile\"") >&5
16224   (eval $ac_compile) 2>&5
16225   ac_status=$?
16226   echo "$as_me:16226: \$? = $ac_status" >&5
16227   (exit $ac_status); } ; then
16228                 mv conftest.o data.o && \
16229                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16230         fi
16231         rm -f conftest.$ac_ext data.o
16232         cat >conftest.$ac_ext <<EOF
16233 #line 16233 "configure"
16234 int     testfunc()
16235 {
16236 #if defined(NeXT)
16237         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16238 #else
16239         extern int testdata[3];
16240         return testdata[0] == 123
16241            &&  testdata[1] == 456
16242            &&  testdata[2] == 789;
16243 #endif
16244 }
16245 EOF
16246         if { (eval echo "$as_me:16246: \"$ac_compile\"") >&5
16247   (eval $ac_compile) 2>&5
16248   ac_status=$?
16249   echo "$as_me:16249: \$? = $ac_status" >&5
16250   (exit $ac_status); }; then
16251                 mv conftest.o func.o && \
16252                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16253         fi
16254         rm -f conftest.$ac_ext func.o
16255         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16256         cf_saveLIBS="$LIBS"
16257         LIBS="conftest.a $LIBS"
16258         if test "$cross_compiling" = yes; then
16259   cf_cv_link_dataonly=unknown
16260 else
16261   cat >conftest.$ac_ext <<_ACEOF
16262 #line 16262 "configure"
16263 #include "confdefs.h"
16264
16265         int main()
16266         {
16267                 extern int testfunc();
16268                 ${cf_cv_main_return:-return} (!testfunc());
16269         }
16270
16271 _ACEOF
16272 rm -f conftest$ac_exeext
16273 if { (eval echo "$as_me:16273: \"$ac_link\"") >&5
16274   (eval $ac_link) 2>&5
16275   ac_status=$?
16276   echo "$as_me:16276: \$? = $ac_status" >&5
16277   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16278   { (eval echo "$as_me:16278: \"$ac_try\"") >&5
16279   (eval $ac_try) 2>&5
16280   ac_status=$?
16281   echo "$as_me:16281: \$? = $ac_status" >&5
16282   (exit $ac_status); }; }; then
16283   cf_cv_link_dataonly=yes
16284 else
16285   echo "$as_me: program exited with status $ac_status" >&5
16286 echo "$as_me: failed program was:" >&5
16287 cat conftest.$ac_ext >&5
16288 cf_cv_link_dataonly=no
16289 fi
16290 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16291 fi
16292         LIBS="$cf_saveLIBS"
16293
16294 fi
16295
16296 echo "$as_me:16296: result: $cf_cv_link_dataonly" >&5
16297 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16298
16299 if test "$cf_cv_link_dataonly" = no ; then
16300
16301 cat >>confdefs.h <<\EOF
16302 #define BROKEN_LINKER 1
16303 EOF
16304
16305         BROKEN_LINKER=1
16306 fi
16307
16308 ###     Checks for library functions.
16309
16310 for ac_func in \
16311 getcwd \
16312 getegid \
16313 geteuid \
16314 getopt \
16315 getttynam \
16316 issetugid \
16317 poll \
16318 putenv \
16319 remove \
16320 select \
16321 setbuf \
16322 setbuffer \
16323 setenv \
16324 setvbuf \
16325 sigaction \
16326 sigvec \
16327 strdup \
16328 strstr \
16329 tcgetpgrp \
16330 times \
16331 vsnprintf \
16332
16333 do
16334 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16335 echo "$as_me:16335: checking for $ac_func" >&5
16336 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16337 if eval "test \"\${$as_ac_var+set}\" = set"; then
16338   echo $ECHO_N "(cached) $ECHO_C" >&6
16339 else
16340   cat >conftest.$ac_ext <<_ACEOF
16341 #line 16341 "configure"
16342 #include "confdefs.h"
16343 /* System header to define __stub macros and hopefully few prototypes,
16344     which can conflict with char $ac_func (); below.  */
16345 #include <assert.h>
16346 /* Override any gcc2 internal prototype to avoid an error.  */
16347 #ifdef __cplusplus
16348 extern "C"
16349 #endif
16350 /* We use char because int might match the return type of a gcc2
16351    builtin and then its argument prototype would still apply.  */
16352 char $ac_func ();
16353 char (*f) ();
16354
16355 int
16356 main ()
16357 {
16358 /* The GNU C library defines this for functions which it implements
16359     to always fail with ENOSYS.  Some functions are actually named
16360     something starting with __ and the normal name is an alias.  */
16361 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16362 choke me
16363 #else
16364 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16365 #endif
16366
16367   ;
16368   return 0;
16369 }
16370 _ACEOF
16371 rm -f conftest.$ac_objext conftest$ac_exeext
16372 if { (eval echo "$as_me:16372: \"$ac_link\"") >&5
16373   (eval $ac_link) 2>&5
16374   ac_status=$?
16375   echo "$as_me:16375: \$? = $ac_status" >&5
16376   (exit $ac_status); } &&
16377          { ac_try='test -s conftest$ac_exeext'
16378   { (eval echo "$as_me:16378: \"$ac_try\"") >&5
16379   (eval $ac_try) 2>&5
16380   ac_status=$?
16381   echo "$as_me:16381: \$? = $ac_status" >&5
16382   (exit $ac_status); }; }; then
16383   eval "$as_ac_var=yes"
16384 else
16385   echo "$as_me: failed program was:" >&5
16386 cat conftest.$ac_ext >&5
16387 eval "$as_ac_var=no"
16388 fi
16389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16390 fi
16391 echo "$as_me:16391: result: `eval echo '${'$as_ac_var'}'`" >&5
16392 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16393 if test `eval echo '${'$as_ac_var'}'` = yes; then
16394   cat >>confdefs.h <<EOF
16395 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16396 EOF
16397
16398 fi
16399 done
16400
16401 if test "x$ac_cv_func_getopt" = xno &&
16402    test "x$cf_with_progs$cf_with_tests" != xnono; then
16403         { { echo "$as_me:16403: error: getopt is required for building programs" >&5
16404 echo "$as_me: error: getopt is required for building programs" >&2;}
16405    { (exit 1); exit 1; }; }
16406 fi
16407
16408 if test "x$with_getcap" = "xyes" ; then
16409
16410 echo "$as_me:16410: checking for terminal-capability database functions" >&5
16411 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16412 if test "${cf_cv_cgetent+set}" = set; then
16413   echo $ECHO_N "(cached) $ECHO_C" >&6
16414 else
16415
16416 cat >conftest.$ac_ext <<_ACEOF
16417 #line 16417 "configure"
16418 #include "confdefs.h"
16419
16420 #include <stdlib.h>
16421 int
16422 main ()
16423 {
16424
16425         char temp[128];
16426         char *buf = temp;
16427         char *db_array = temp;
16428         cgetent(&buf, &db_array, "vt100");
16429         cgetcap(buf, "tc", '=');
16430         cgetmatch(buf, "tc");
16431
16432   ;
16433   return 0;
16434 }
16435 _ACEOF
16436 rm -f conftest.$ac_objext conftest$ac_exeext
16437 if { (eval echo "$as_me:16437: \"$ac_link\"") >&5
16438   (eval $ac_link) 2>&5
16439   ac_status=$?
16440   echo "$as_me:16440: \$? = $ac_status" >&5
16441   (exit $ac_status); } &&
16442          { ac_try='test -s conftest$ac_exeext'
16443   { (eval echo "$as_me:16443: \"$ac_try\"") >&5
16444   (eval $ac_try) 2>&5
16445   ac_status=$?
16446   echo "$as_me:16446: \$? = $ac_status" >&5
16447   (exit $ac_status); }; }; then
16448   cf_cv_cgetent=yes
16449 else
16450   echo "$as_me: failed program was:" >&5
16451 cat conftest.$ac_ext >&5
16452 cf_cv_cgetent=no
16453 fi
16454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16455
16456 fi
16457 echo "$as_me:16457: result: $cf_cv_cgetent" >&5
16458 echo "${ECHO_T}$cf_cv_cgetent" >&6
16459
16460 if test "$cf_cv_cgetent" = yes
16461 then
16462
16463 cat >>confdefs.h <<\EOF
16464 #define HAVE_BSD_CGETENT 1
16465 EOF
16466
16467 echo "$as_me:16467: checking if cgetent uses const parameter" >&5
16468 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16469 if test "${cf_cv_cgetent_const+set}" = set; then
16470   echo $ECHO_N "(cached) $ECHO_C" >&6
16471 else
16472
16473 cat >conftest.$ac_ext <<_ACEOF
16474 #line 16474 "configure"
16475 #include "confdefs.h"
16476
16477 #include <stdlib.h>
16478 int
16479 main ()
16480 {
16481
16482         char temp[128];
16483         char *buf = temp;
16484 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16485         const char *db_array = temp;
16486         cgetent(&buf, &db_array, "vt100");
16487 #endif
16488         cgetcap(buf, "tc", '=');
16489         cgetmatch(buf, "tc");
16490
16491   ;
16492   return 0;
16493 }
16494 _ACEOF
16495 rm -f conftest.$ac_objext conftest$ac_exeext
16496 if { (eval echo "$as_me:16496: \"$ac_link\"") >&5
16497   (eval $ac_link) 2>&5
16498   ac_status=$?
16499   echo "$as_me:16499: \$? = $ac_status" >&5
16500   (exit $ac_status); } &&
16501          { ac_try='test -s conftest$ac_exeext'
16502   { (eval echo "$as_me:16502: \"$ac_try\"") >&5
16503   (eval $ac_try) 2>&5
16504   ac_status=$?
16505   echo "$as_me:16505: \$? = $ac_status" >&5
16506   (exit $ac_status); }; }; then
16507   cf_cv_cgetent_const=yes
16508 else
16509   echo "$as_me: failed program was:" >&5
16510 cat conftest.$ac_ext >&5
16511 cf_cv_cgetent_const=no
16512 fi
16513 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16514
16515 fi
16516 echo "$as_me:16516: result: $cf_cv_cgetent_const" >&5
16517 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16518         if test "$cf_cv_cgetent_const" = yes
16519         then
16520
16521 cat >>confdefs.h <<EOF
16522 #define CGETENT_CONST const
16523 EOF
16524
16525         fi
16526 fi
16527
16528 fi
16529
16530 echo "$as_me:16530: checking for isascii" >&5
16531 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16532 if test "${cf_cv_have_isascii+set}" = set; then
16533   echo $ECHO_N "(cached) $ECHO_C" >&6
16534 else
16535
16536         cat >conftest.$ac_ext <<_ACEOF
16537 #line 16537 "configure"
16538 #include "confdefs.h"
16539 #include <ctype.h>
16540 int
16541 main ()
16542 {
16543 int x = isascii(' ')
16544   ;
16545   return 0;
16546 }
16547 _ACEOF
16548 rm -f conftest.$ac_objext conftest$ac_exeext
16549 if { (eval echo "$as_me:16549: \"$ac_link\"") >&5
16550   (eval $ac_link) 2>&5
16551   ac_status=$?
16552   echo "$as_me:16552: \$? = $ac_status" >&5
16553   (exit $ac_status); } &&
16554          { ac_try='test -s conftest$ac_exeext'
16555   { (eval echo "$as_me:16555: \"$ac_try\"") >&5
16556   (eval $ac_try) 2>&5
16557   ac_status=$?
16558   echo "$as_me:16558: \$? = $ac_status" >&5
16559   (exit $ac_status); }; }; then
16560   cf_cv_have_isascii=yes
16561 else
16562   echo "$as_me: failed program was:" >&5
16563 cat conftest.$ac_ext >&5
16564 cf_cv_have_isascii=no
16565 fi
16566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16567
16568 fi
16569 echo "$as_me:16569: result: $cf_cv_have_isascii" >&5
16570 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16571 test "$cf_cv_have_isascii" = yes &&
16572 cat >>confdefs.h <<\EOF
16573 #define HAVE_ISASCII 1
16574 EOF
16575
16576 if test "$ac_cv_func_sigaction" = yes; then
16577 echo "$as_me:16577: checking whether sigaction needs _POSIX_SOURCE" >&5
16578 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16579 cat >conftest.$ac_ext <<_ACEOF
16580 #line 16580 "configure"
16581 #include "confdefs.h"
16582
16583 #include <sys/types.h>
16584 #include <signal.h>
16585 int
16586 main ()
16587 {
16588 struct sigaction act
16589   ;
16590   return 0;
16591 }
16592 _ACEOF
16593 rm -f conftest.$ac_objext
16594 if { (eval echo "$as_me:16594: \"$ac_compile\"") >&5
16595   (eval $ac_compile) 2>&5
16596   ac_status=$?
16597   echo "$as_me:16597: \$? = $ac_status" >&5
16598   (exit $ac_status); } &&
16599          { ac_try='test -s conftest.$ac_objext'
16600   { (eval echo "$as_me:16600: \"$ac_try\"") >&5
16601   (eval $ac_try) 2>&5
16602   ac_status=$?
16603   echo "$as_me:16603: \$? = $ac_status" >&5
16604   (exit $ac_status); }; }; then
16605   sigact_bad=no
16606 else
16607   echo "$as_me: failed program was:" >&5
16608 cat conftest.$ac_ext >&5
16609
16610 cat >conftest.$ac_ext <<_ACEOF
16611 #line 16611 "configure"
16612 #include "confdefs.h"
16613
16614 #define _POSIX_SOURCE
16615 #include <sys/types.h>
16616 #include <signal.h>
16617 int
16618 main ()
16619 {
16620 struct sigaction act
16621   ;
16622   return 0;
16623 }
16624 _ACEOF
16625 rm -f conftest.$ac_objext
16626 if { (eval echo "$as_me:16626: \"$ac_compile\"") >&5
16627   (eval $ac_compile) 2>&5
16628   ac_status=$?
16629   echo "$as_me:16629: \$? = $ac_status" >&5
16630   (exit $ac_status); } &&
16631          { ac_try='test -s conftest.$ac_objext'
16632   { (eval echo "$as_me:16632: \"$ac_try\"") >&5
16633   (eval $ac_try) 2>&5
16634   ac_status=$?
16635   echo "$as_me:16635: \$? = $ac_status" >&5
16636   (exit $ac_status); }; }; then
16637   sigact_bad=yes
16638
16639 cat >>confdefs.h <<\EOF
16640 #define _POSIX_SOURCE 1
16641 EOF
16642
16643 else
16644   echo "$as_me: failed program was:" >&5
16645 cat conftest.$ac_ext >&5
16646 sigact_bad=unknown
16647 fi
16648 rm -f conftest.$ac_objext conftest.$ac_ext
16649 fi
16650 rm -f conftest.$ac_objext conftest.$ac_ext
16651 echo "$as_me:16651: result: $sigact_bad" >&5
16652 echo "${ECHO_T}$sigact_bad" >&6
16653 fi
16654
16655 echo "$as_me:16655: checking if nanosleep really works" >&5
16656 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16657 if test "${cf_cv_func_nanosleep+set}" = set; then
16658   echo $ECHO_N "(cached) $ECHO_C" >&6
16659 else
16660
16661 if test "$cross_compiling" = yes; then
16662   cf_cv_func_nanosleep=unknown
16663 else
16664   cat >conftest.$ac_ext <<_ACEOF
16665 #line 16665 "configure"
16666 #include "confdefs.h"
16667
16668 #include <stdio.h>
16669 #include <errno.h>
16670 #include <time.h>
16671
16672 #ifdef HAVE_SYS_TIME_H
16673 #include <sys/time.h>
16674 #endif
16675
16676 int main() {
16677         struct timespec ts1, ts2;
16678         int code;
16679         ts1.tv_sec  = 0;
16680         ts1.tv_nsec = 750000000;
16681         ts2.tv_sec  = 0;
16682         ts2.tv_nsec = 0;
16683         errno = 0;
16684         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16685         ${cf_cv_main_return:-return}(code != 0);
16686 }
16687
16688 _ACEOF
16689 rm -f conftest$ac_exeext
16690 if { (eval echo "$as_me:16690: \"$ac_link\"") >&5
16691   (eval $ac_link) 2>&5
16692   ac_status=$?
16693   echo "$as_me:16693: \$? = $ac_status" >&5
16694   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16695   { (eval echo "$as_me:16695: \"$ac_try\"") >&5
16696   (eval $ac_try) 2>&5
16697   ac_status=$?
16698   echo "$as_me:16698: \$? = $ac_status" >&5
16699   (exit $ac_status); }; }; then
16700   cf_cv_func_nanosleep=yes
16701 else
16702   echo "$as_me: program exited with status $ac_status" >&5
16703 echo "$as_me: failed program was:" >&5
16704 cat conftest.$ac_ext >&5
16705 cf_cv_func_nanosleep=no
16706 fi
16707 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16708 fi
16709 fi
16710 echo "$as_me:16710: result: $cf_cv_func_nanosleep" >&5
16711 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16712
16713 test "$cf_cv_func_nanosleep" = "yes" &&
16714 cat >>confdefs.h <<\EOF
16715 #define HAVE_NANOSLEEP 1
16716 EOF
16717
16718 for ac_header in \
16719 termio.h \
16720 termios.h \
16721 unistd.h \
16722
16723 do
16724 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16725 echo "$as_me:16725: checking for $ac_header" >&5
16726 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16727 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16728   echo $ECHO_N "(cached) $ECHO_C" >&6
16729 else
16730   cat >conftest.$ac_ext <<_ACEOF
16731 #line 16731 "configure"
16732 #include "confdefs.h"
16733 #include <$ac_header>
16734 _ACEOF
16735 if { (eval echo "$as_me:16735: \"$ac_cpp conftest.$ac_ext\"") >&5
16736   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16737   ac_status=$?
16738   egrep -v '^ *\+' conftest.er1 >conftest.err
16739   rm -f conftest.er1
16740   cat conftest.err >&5
16741   echo "$as_me:16741: \$? = $ac_status" >&5
16742   (exit $ac_status); } >/dev/null; then
16743   if test -s conftest.err; then
16744     ac_cpp_err=$ac_c_preproc_warn_flag
16745   else
16746     ac_cpp_err=
16747   fi
16748 else
16749   ac_cpp_err=yes
16750 fi
16751 if test -z "$ac_cpp_err"; then
16752   eval "$as_ac_Header=yes"
16753 else
16754   echo "$as_me: failed program was:" >&5
16755   cat conftest.$ac_ext >&5
16756   eval "$as_ac_Header=no"
16757 fi
16758 rm -f conftest.err conftest.$ac_ext
16759 fi
16760 echo "$as_me:16760: result: `eval echo '${'$as_ac_Header'}'`" >&5
16761 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16762 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16763   cat >>confdefs.h <<EOF
16764 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16765 EOF
16766
16767 fi
16768 done
16769
16770 if test "$ISC" = yes ; then
16771
16772 for ac_header in sys/termio.h
16773 do
16774 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16775 echo "$as_me:16775: checking for $ac_header" >&5
16776 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16777 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16778   echo $ECHO_N "(cached) $ECHO_C" >&6
16779 else
16780   cat >conftest.$ac_ext <<_ACEOF
16781 #line 16781 "configure"
16782 #include "confdefs.h"
16783 #include <$ac_header>
16784 _ACEOF
16785 if { (eval echo "$as_me:16785: \"$ac_cpp conftest.$ac_ext\"") >&5
16786   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16787   ac_status=$?
16788   egrep -v '^ *\+' conftest.er1 >conftest.err
16789   rm -f conftest.er1
16790   cat conftest.err >&5
16791   echo "$as_me:16791: \$? = $ac_status" >&5
16792   (exit $ac_status); } >/dev/null; then
16793   if test -s conftest.err; then
16794     ac_cpp_err=$ac_c_preproc_warn_flag
16795   else
16796     ac_cpp_err=
16797   fi
16798 else
16799   ac_cpp_err=yes
16800 fi
16801 if test -z "$ac_cpp_err"; then
16802   eval "$as_ac_Header=yes"
16803 else
16804   echo "$as_me: failed program was:" >&5
16805   cat conftest.$ac_ext >&5
16806   eval "$as_ac_Header=no"
16807 fi
16808 rm -f conftest.err conftest.$ac_ext
16809 fi
16810 echo "$as_me:16810: result: `eval echo '${'$as_ac_Header'}'`" >&5
16811 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16812 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16813   cat >>confdefs.h <<EOF
16814 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16815 EOF
16816
16817 fi
16818 done
16819
16820 fi
16821 if test "$ac_cv_header_termios_h" = yes ; then
16822         case "$CFLAGS $CPPFLAGS" in
16823         (*-D_POSIX_SOURCE*)
16824                 termios_bad=dunno ;;
16825         (*)     termios_bad=maybe ;;
16826         esac
16827         if test "$termios_bad" = maybe ; then
16828         echo "$as_me:16828: checking whether termios.h needs _POSIX_SOURCE" >&5
16829 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16830         cat >conftest.$ac_ext <<_ACEOF
16831 #line 16831 "configure"
16832 #include "confdefs.h"
16833 #include <termios.h>
16834 int
16835 main ()
16836 {
16837 struct termios foo; int x = foo.c_iflag
16838   ;
16839   return 0;
16840 }
16841 _ACEOF
16842 rm -f conftest.$ac_objext
16843 if { (eval echo "$as_me:16843: \"$ac_compile\"") >&5
16844   (eval $ac_compile) 2>&5
16845   ac_status=$?
16846   echo "$as_me:16846: \$? = $ac_status" >&5
16847   (exit $ac_status); } &&
16848          { ac_try='test -s conftest.$ac_objext'
16849   { (eval echo "$as_me:16849: \"$ac_try\"") >&5
16850   (eval $ac_try) 2>&5
16851   ac_status=$?
16852   echo "$as_me:16852: \$? = $ac_status" >&5
16853   (exit $ac_status); }; }; then
16854   termios_bad=no
16855 else
16856   echo "$as_me: failed program was:" >&5
16857 cat conftest.$ac_ext >&5
16858
16859                 cat >conftest.$ac_ext <<_ACEOF
16860 #line 16860 "configure"
16861 #include "confdefs.h"
16862
16863 #define _POSIX_SOURCE
16864 #include <termios.h>
16865 int
16866 main ()
16867 {
16868 struct termios foo; int x = foo.c_iflag
16869   ;
16870   return 0;
16871 }
16872 _ACEOF
16873 rm -f conftest.$ac_objext
16874 if { (eval echo "$as_me:16874: \"$ac_compile\"") >&5
16875   (eval $ac_compile) 2>&5
16876   ac_status=$?
16877   echo "$as_me:16877: \$? = $ac_status" >&5
16878   (exit $ac_status); } &&
16879          { ac_try='test -s conftest.$ac_objext'
16880   { (eval echo "$as_me:16880: \"$ac_try\"") >&5
16881   (eval $ac_try) 2>&5
16882   ac_status=$?
16883   echo "$as_me:16883: \$? = $ac_status" >&5
16884   (exit $ac_status); }; }; then
16885   termios_bad=unknown
16886 else
16887   echo "$as_me: failed program was:" >&5
16888 cat conftest.$ac_ext >&5
16889 termios_bad=yes
16890 cat >>confdefs.h <<\EOF
16891 #define _POSIX_SOURCE 1
16892 EOF
16893
16894 fi
16895 rm -f conftest.$ac_objext conftest.$ac_ext
16896
16897 fi
16898 rm -f conftest.$ac_objext conftest.$ac_ext
16899         echo "$as_me:16899: result: $termios_bad" >&5
16900 echo "${ECHO_T}$termios_bad" >&6
16901         fi
16902 fi
16903
16904 echo "$as_me:16904: checking for tcgetattr" >&5
16905 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16906 if test "${cf_cv_have_tcgetattr+set}" = set; then
16907   echo $ECHO_N "(cached) $ECHO_C" >&6
16908 else
16909
16910 cat >conftest.$ac_ext <<_ACEOF
16911 #line 16911 "configure"
16912 #include "confdefs.h"
16913
16914 #include <sys/types.h>
16915 #ifdef HAVE_UNISTD_H
16916 #include <unistd.h>
16917 #endif
16918 #ifdef HAVE_TERMIOS_H
16919 #include <termios.h>
16920 #define TTY struct termios
16921 #else
16922 #ifdef HAVE_TERMIO_H
16923 #include <termio.h>
16924 #define TTY struct termio
16925 #endif
16926 #endif
16927
16928 int
16929 main ()
16930 {
16931
16932 TTY foo;
16933 tcgetattr(1, &foo);
16934   ;
16935   return 0;
16936 }
16937 _ACEOF
16938 rm -f conftest.$ac_objext conftest$ac_exeext
16939 if { (eval echo "$as_me:16939: \"$ac_link\"") >&5
16940   (eval $ac_link) 2>&5
16941   ac_status=$?
16942   echo "$as_me:16942: \$? = $ac_status" >&5
16943   (exit $ac_status); } &&
16944          { ac_try='test -s conftest$ac_exeext'
16945   { (eval echo "$as_me:16945: \"$ac_try\"") >&5
16946   (eval $ac_try) 2>&5
16947   ac_status=$?
16948   echo "$as_me:16948: \$? = $ac_status" >&5
16949   (exit $ac_status); }; }; then
16950   cf_cv_have_tcgetattr=yes
16951 else
16952   echo "$as_me: failed program was:" >&5
16953 cat conftest.$ac_ext >&5
16954 cf_cv_have_tcgetattr=no
16955 fi
16956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16957 fi
16958 echo "$as_me:16958: result: $cf_cv_have_tcgetattr" >&5
16959 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16960 test "$cf_cv_have_tcgetattr" = yes &&
16961 cat >>confdefs.h <<\EOF
16962 #define HAVE_TCGETATTR 1
16963 EOF
16964
16965 echo "$as_me:16965: checking for vsscanf function or workaround" >&5
16966 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16967 if test "${cf_cv_func_vsscanf+set}" = set; then
16968   echo $ECHO_N "(cached) $ECHO_C" >&6
16969 else
16970
16971 cat >conftest.$ac_ext <<_ACEOF
16972 #line 16972 "configure"
16973 #include "confdefs.h"
16974
16975 #include <stdarg.h>
16976 #include <stdio.h>
16977 int
16978 main ()
16979 {
16980
16981         va_list ap;
16982         vsscanf("from", "%d", ap)
16983   ;
16984   return 0;
16985 }
16986 _ACEOF
16987 rm -f conftest.$ac_objext conftest$ac_exeext
16988 if { (eval echo "$as_me:16988: \"$ac_link\"") >&5
16989   (eval $ac_link) 2>&5
16990   ac_status=$?
16991   echo "$as_me:16991: \$? = $ac_status" >&5
16992   (exit $ac_status); } &&
16993          { ac_try='test -s conftest$ac_exeext'
16994   { (eval echo "$as_me:16994: \"$ac_try\"") >&5
16995   (eval $ac_try) 2>&5
16996   ac_status=$?
16997   echo "$as_me:16997: \$? = $ac_status" >&5
16998   (exit $ac_status); }; }; then
16999   cf_cv_func_vsscanf=vsscanf
17000 else
17001   echo "$as_me: failed program was:" >&5
17002 cat conftest.$ac_ext >&5
17003
17004 cat >conftest.$ac_ext <<_ACEOF
17005 #line 17005 "configure"
17006 #include "confdefs.h"
17007
17008 #include <stdarg.h>
17009 #include <stdio.h>
17010 int
17011 main ()
17012 {
17013
17014         FILE strbuf;
17015         char *str = "from";
17016
17017         strbuf._flag = _IOREAD;
17018         strbuf._ptr = strbuf._base = (unsigned char *) str;
17019         strbuf._cnt = strlen(str);
17020         strbuf._file = _NFILE;
17021         return (vfscanf(&strbuf, "%d", ap))
17022   ;
17023   return 0;
17024 }
17025 _ACEOF
17026 rm -f conftest.$ac_objext conftest$ac_exeext
17027 if { (eval echo "$as_me:17027: \"$ac_link\"") >&5
17028   (eval $ac_link) 2>&5
17029   ac_status=$?
17030   echo "$as_me:17030: \$? = $ac_status" >&5
17031   (exit $ac_status); } &&
17032          { ac_try='test -s conftest$ac_exeext'
17033   { (eval echo "$as_me:17033: \"$ac_try\"") >&5
17034   (eval $ac_try) 2>&5
17035   ac_status=$?
17036   echo "$as_me:17036: \$? = $ac_status" >&5
17037   (exit $ac_status); }; }; then
17038   cf_cv_func_vsscanf=vfscanf
17039 else
17040   echo "$as_me: failed program was:" >&5
17041 cat conftest.$ac_ext >&5
17042
17043 cat >conftest.$ac_ext <<_ACEOF
17044 #line 17044 "configure"
17045 #include "confdefs.h"
17046
17047 #include <stdarg.h>
17048 #include <stdio.h>
17049 int
17050 main ()
17051 {
17052
17053         FILE strbuf;
17054         char *str = "from";
17055
17056         strbuf._flag = _IOREAD;
17057         strbuf._ptr = strbuf._base = (unsigned char *) str;
17058         strbuf._cnt = strlen(str);
17059         strbuf._file = _NFILE;
17060         return (_doscan(&strbuf, "%d", ap))
17061   ;
17062   return 0;
17063 }
17064 _ACEOF
17065 rm -f conftest.$ac_objext conftest$ac_exeext
17066 if { (eval echo "$as_me:17066: \"$ac_link\"") >&5
17067   (eval $ac_link) 2>&5
17068   ac_status=$?
17069   echo "$as_me:17069: \$? = $ac_status" >&5
17070   (exit $ac_status); } &&
17071          { ac_try='test -s conftest$ac_exeext'
17072   { (eval echo "$as_me:17072: \"$ac_try\"") >&5
17073   (eval $ac_try) 2>&5
17074   ac_status=$?
17075   echo "$as_me:17075: \$? = $ac_status" >&5
17076   (exit $ac_status); }; }; then
17077   cf_cv_func_vsscanf=_doscan
17078 else
17079   echo "$as_me: failed program was:" >&5
17080 cat conftest.$ac_ext >&5
17081
17082 cf_cv_func_vsscanf=no
17083 fi
17084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17085 fi
17086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17087 fi
17088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17089 fi
17090 echo "$as_me:17090: result: $cf_cv_func_vsscanf" >&5
17091 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17092
17093 case $cf_cv_func_vsscanf in
17094 (vsscanf)
17095 cat >>confdefs.h <<\EOF
17096 #define HAVE_VSSCANF 1
17097 EOF
17098 ;;
17099 (vfscanf)
17100 cat >>confdefs.h <<\EOF
17101 #define HAVE_VFSCANF 1
17102 EOF
17103 ;;
17104 (_doscan)
17105 cat >>confdefs.h <<\EOF
17106 #define HAVE__DOSCAN 1
17107 EOF
17108 ;;
17109 esac
17110
17111 echo "$as_me:17111: checking for working mkstemp" >&5
17112 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17113 if test "${cf_cv_func_mkstemp+set}" = set; then
17114   echo $ECHO_N "(cached) $ECHO_C" >&6
17115 else
17116
17117 rm -rf conftest*
17118 if test "$cross_compiling" = yes; then
17119   cf_cv_func_mkstemp=maybe
17120 else
17121   cat >conftest.$ac_ext <<_ACEOF
17122 #line 17122 "configure"
17123 #include "confdefs.h"
17124
17125 #include <sys/types.h>
17126 #include <stdlib.h>
17127 #include <stdio.h>
17128 #include <string.h>
17129 #include <sys/stat.h>
17130 int main()
17131 {
17132         char *tmpl = "conftestXXXXXX";
17133         char name[2][80];
17134         int n;
17135         int result = 0;
17136         int fd;
17137         struct stat sb;
17138
17139         umask(077);
17140         for (n = 0; n < 2; ++n) {
17141                 strcpy(name[n], tmpl);
17142                 if ((fd = mkstemp(name[n])) >= 0) {
17143                         if (!strcmp(name[n], tmpl)
17144                          || stat(name[n], &sb) != 0
17145                          || (sb.st_mode & S_IFMT) != S_IFREG
17146                          || (sb.st_mode & 077) != 0) {
17147                                 result = 1;
17148                         }
17149                         close(fd);
17150                 }
17151         }
17152         if (result == 0
17153          && !strcmp(name[0], name[1]))
17154                 result = 1;
17155         ${cf_cv_main_return:-return}(result);
17156 }
17157
17158 _ACEOF
17159 rm -f conftest$ac_exeext
17160 if { (eval echo "$as_me:17160: \"$ac_link\"") >&5
17161   (eval $ac_link) 2>&5
17162   ac_status=$?
17163   echo "$as_me:17163: \$? = $ac_status" >&5
17164   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17165   { (eval echo "$as_me:17165: \"$ac_try\"") >&5
17166   (eval $ac_try) 2>&5
17167   ac_status=$?
17168   echo "$as_me:17168: \$? = $ac_status" >&5
17169   (exit $ac_status); }; }; then
17170   cf_cv_func_mkstemp=yes
17171
17172 else
17173   echo "$as_me: program exited with status $ac_status" >&5
17174 echo "$as_me: failed program was:" >&5
17175 cat conftest.$ac_ext >&5
17176 cf_cv_func_mkstemp=no
17177
17178 fi
17179 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17180 fi
17181
17182 fi
17183 echo "$as_me:17183: result: $cf_cv_func_mkstemp" >&5
17184 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17185 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17186         echo "$as_me:17186: checking for mkstemp" >&5
17187 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17188 if test "${ac_cv_func_mkstemp+set}" = set; then
17189   echo $ECHO_N "(cached) $ECHO_C" >&6
17190 else
17191   cat >conftest.$ac_ext <<_ACEOF
17192 #line 17192 "configure"
17193 #include "confdefs.h"
17194 /* System header to define __stub macros and hopefully few prototypes,
17195     which can conflict with char mkstemp (); below.  */
17196 #include <assert.h>
17197 /* Override any gcc2 internal prototype to avoid an error.  */
17198 #ifdef __cplusplus
17199 extern "C"
17200 #endif
17201 /* We use char because int might match the return type of a gcc2
17202    builtin and then its argument prototype would still apply.  */
17203 char mkstemp ();
17204 char (*f) ();
17205
17206 int
17207 main ()
17208 {
17209 /* The GNU C library defines this for functions which it implements
17210     to always fail with ENOSYS.  Some functions are actually named
17211     something starting with __ and the normal name is an alias.  */
17212 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17213 choke me
17214 #else
17215 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17216 #endif
17217
17218   ;
17219   return 0;
17220 }
17221 _ACEOF
17222 rm -f conftest.$ac_objext conftest$ac_exeext
17223 if { (eval echo "$as_me:17223: \"$ac_link\"") >&5
17224   (eval $ac_link) 2>&5
17225   ac_status=$?
17226   echo "$as_me:17226: \$? = $ac_status" >&5
17227   (exit $ac_status); } &&
17228          { ac_try='test -s conftest$ac_exeext'
17229   { (eval echo "$as_me:17229: \"$ac_try\"") >&5
17230   (eval $ac_try) 2>&5
17231   ac_status=$?
17232   echo "$as_me:17232: \$? = $ac_status" >&5
17233   (exit $ac_status); }; }; then
17234   ac_cv_func_mkstemp=yes
17235 else
17236   echo "$as_me: failed program was:" >&5
17237 cat conftest.$ac_ext >&5
17238 ac_cv_func_mkstemp=no
17239 fi
17240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17241 fi
17242 echo "$as_me:17242: result: $ac_cv_func_mkstemp" >&5
17243 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17244
17245 fi
17246 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17247
17248 cat >>confdefs.h <<\EOF
17249 #define HAVE_MKSTEMP 1
17250 EOF
17251
17252 fi
17253
17254 # setup for prototype of fallback for vsscanf()
17255
17256 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17257         HAVE_VSSCANF=1
17258 else
17259         HAVE_VSSCANF=0
17260 fi
17261
17262 if test "x$cross_compiling" = xyes ; then
17263         { echo "$as_me:17263: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17264 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17265 else
17266         echo "$as_me:17266: checking whether setvbuf arguments are reversed" >&5
17267 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17268 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17269   echo $ECHO_N "(cached) $ECHO_C" >&6
17270 else
17271   if test "$cross_compiling" = yes; then
17272   { { echo "$as_me:17272: error: cannot run test program while cross compiling" >&5
17273 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17274    { (exit 1); exit 1; }; }
17275 else
17276   cat >conftest.$ac_ext <<_ACEOF
17277 #line 17277 "configure"
17278 #include "confdefs.h"
17279 #include <stdio.h>
17280 /* If setvbuf has the reversed format, exit 0. */
17281 int
17282 main ()
17283 {
17284   /* This call has the arguments reversed.
17285      A reversed system may check and see that the address of main
17286      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17287   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17288     $ac_main_return(1);
17289   putc('\r', stdout);
17290   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17291 }
17292 _ACEOF
17293 rm -f conftest$ac_exeext
17294 if { (eval echo "$as_me:17294: \"$ac_link\"") >&5
17295   (eval $ac_link) 2>&5
17296   ac_status=$?
17297   echo "$as_me:17297: \$? = $ac_status" >&5
17298   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17299   { (eval echo "$as_me:17299: \"$ac_try\"") >&5
17300   (eval $ac_try) 2>&5
17301   ac_status=$?
17302   echo "$as_me:17302: \$? = $ac_status" >&5
17303   (exit $ac_status); }; }; then
17304   ac_cv_func_setvbuf_reversed=yes
17305 else
17306   echo "$as_me: program exited with status $ac_status" >&5
17307 echo "$as_me: failed program was:" >&5
17308 cat conftest.$ac_ext >&5
17309 ac_cv_func_setvbuf_reversed=no
17310 fi
17311 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17312 fi
17313 rm -f core core.* *.core
17314 fi
17315 echo "$as_me:17315: result: $ac_cv_func_setvbuf_reversed" >&5
17316 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17317 if test $ac_cv_func_setvbuf_reversed = yes; then
17318
17319 cat >>confdefs.h <<\EOF
17320 #define SETVBUF_REVERSED 1
17321 EOF
17322
17323 fi
17324
17325 fi
17326 echo "$as_me:17326: checking for intptr_t" >&5
17327 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17328 if test "${ac_cv_type_intptr_t+set}" = set; then
17329   echo $ECHO_N "(cached) $ECHO_C" >&6
17330 else
17331   cat >conftest.$ac_ext <<_ACEOF
17332 #line 17332 "configure"
17333 #include "confdefs.h"
17334 $ac_includes_default
17335 int
17336 main ()
17337 {
17338 if ((intptr_t *) 0)
17339   return 0;
17340 if (sizeof (intptr_t))
17341   return 0;
17342   ;
17343   return 0;
17344 }
17345 _ACEOF
17346 rm -f conftest.$ac_objext
17347 if { (eval echo "$as_me:17347: \"$ac_compile\"") >&5
17348   (eval $ac_compile) 2>&5
17349   ac_status=$?
17350   echo "$as_me:17350: \$? = $ac_status" >&5
17351   (exit $ac_status); } &&
17352          { ac_try='test -s conftest.$ac_objext'
17353   { (eval echo "$as_me:17353: \"$ac_try\"") >&5
17354   (eval $ac_try) 2>&5
17355   ac_status=$?
17356   echo "$as_me:17356: \$? = $ac_status" >&5
17357   (exit $ac_status); }; }; then
17358   ac_cv_type_intptr_t=yes
17359 else
17360   echo "$as_me: failed program was:" >&5
17361 cat conftest.$ac_ext >&5
17362 ac_cv_type_intptr_t=no
17363 fi
17364 rm -f conftest.$ac_objext conftest.$ac_ext
17365 fi
17366 echo "$as_me:17366: result: $ac_cv_type_intptr_t" >&5
17367 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17368 if test $ac_cv_type_intptr_t = yes; then
17369   :
17370 else
17371
17372 cat >>confdefs.h <<EOF
17373 #define intptr_t long
17374 EOF
17375
17376 fi
17377
17378 echo "$as_me:17378: checking for ssize_t" >&5
17379 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17380 if test "${ac_cv_type_ssize_t+set}" = set; then
17381   echo $ECHO_N "(cached) $ECHO_C" >&6
17382 else
17383   cat >conftest.$ac_ext <<_ACEOF
17384 #line 17384 "configure"
17385 #include "confdefs.h"
17386 $ac_includes_default
17387 int
17388 main ()
17389 {
17390 if ((ssize_t *) 0)
17391   return 0;
17392 if (sizeof (ssize_t))
17393   return 0;
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   ac_cv_type_ssize_t=yes
17411 else
17412   echo "$as_me: failed program was:" >&5
17413 cat conftest.$ac_ext >&5
17414 ac_cv_type_ssize_t=no
17415 fi
17416 rm -f conftest.$ac_objext conftest.$ac_ext
17417 fi
17418 echo "$as_me:17418: result: $ac_cv_type_ssize_t" >&5
17419 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17420 if test $ac_cv_type_ssize_t = yes; then
17421   :
17422 else
17423
17424 cat >>confdefs.h <<EOF
17425 #define ssize_t int
17426 EOF
17427
17428 fi
17429
17430 echo "$as_me:17430: checking for type sigaction_t" >&5
17431 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17432 if test "${cf_cv_type_sigaction+set}" = set; then
17433   echo $ECHO_N "(cached) $ECHO_C" >&6
17434 else
17435
17436         cat >conftest.$ac_ext <<_ACEOF
17437 #line 17437 "configure"
17438 #include "confdefs.h"
17439
17440 #include <signal.h>
17441 int
17442 main ()
17443 {
17444 sigaction_t x
17445   ;
17446   return 0;
17447 }
17448 _ACEOF
17449 rm -f conftest.$ac_objext
17450 if { (eval echo "$as_me:17450: \"$ac_compile\"") >&5
17451   (eval $ac_compile) 2>&5
17452   ac_status=$?
17453   echo "$as_me:17453: \$? = $ac_status" >&5
17454   (exit $ac_status); } &&
17455          { ac_try='test -s conftest.$ac_objext'
17456   { (eval echo "$as_me:17456: \"$ac_try\"") >&5
17457   (eval $ac_try) 2>&5
17458   ac_status=$?
17459   echo "$as_me:17459: \$? = $ac_status" >&5
17460   (exit $ac_status); }; }; then
17461   cf_cv_type_sigaction=yes
17462 else
17463   echo "$as_me: failed program was:" >&5
17464 cat conftest.$ac_ext >&5
17465 cf_cv_type_sigaction=no
17466 fi
17467 rm -f conftest.$ac_objext conftest.$ac_ext
17468 fi
17469
17470 echo "$as_me:17470: result: $cf_cv_type_sigaction" >&5
17471 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17472 test "$cf_cv_type_sigaction" = yes &&
17473 cat >>confdefs.h <<\EOF
17474 #define HAVE_TYPE_SIGACTION 1
17475 EOF
17476
17477 echo "$as_me:17477: checking declaration of size-change" >&5
17478 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17479 if test "${cf_cv_sizechange+set}" = set; then
17480   echo $ECHO_N "(cached) $ECHO_C" >&6
17481 else
17482
17483         cf_cv_sizechange=unknown
17484         cf_save_CPPFLAGS="$CPPFLAGS"
17485
17486 for cf_opts in "" "NEED_PTEM_H"
17487 do
17488
17489         CPPFLAGS="$cf_save_CPPFLAGS"
17490         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17491         cat >conftest.$ac_ext <<_ACEOF
17492 #line 17492 "configure"
17493 #include "confdefs.h"
17494 #include <sys/types.h>
17495 #ifdef HAVE_TERMIOS_H
17496 #include <termios.h>
17497 #else
17498 #ifdef HAVE_TERMIO_H
17499 #include <termio.h>
17500 #endif
17501 #endif
17502 #ifdef NEED_PTEM_H
17503 /* This is a workaround for SCO:  they neglected to define struct winsize in
17504  * termios.h -- it's only in termio.h and ptem.h
17505  */
17506 #include        <sys/stream.h>
17507 #include        <sys/ptem.h>
17508 #endif
17509 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17510 #include <sys/ioctl.h>
17511 #endif
17512
17513 int
17514 main ()
17515 {
17516
17517 #ifdef TIOCGSIZE
17518         struct ttysize win;     /* FIXME: what system is this? */
17519         int y = win.ts_lines;
17520         int x = win.ts_cols;
17521 #else
17522 #ifdef TIOCGWINSZ
17523         struct winsize win;
17524         int y = win.ws_row;
17525         int x = win.ws_col;
17526 #else
17527         no TIOCGSIZE or TIOCGWINSZ
17528 #endif /* TIOCGWINSZ */
17529 #endif /* TIOCGSIZE */
17530
17531   ;
17532   return 0;
17533 }
17534 _ACEOF
17535 rm -f conftest.$ac_objext
17536 if { (eval echo "$as_me:17536: \"$ac_compile\"") >&5
17537   (eval $ac_compile) 2>&5
17538   ac_status=$?
17539   echo "$as_me:17539: \$? = $ac_status" >&5
17540   (exit $ac_status); } &&
17541          { ac_try='test -s conftest.$ac_objext'
17542   { (eval echo "$as_me:17542: \"$ac_try\"") >&5
17543   (eval $ac_try) 2>&5
17544   ac_status=$?
17545   echo "$as_me:17545: \$? = $ac_status" >&5
17546   (exit $ac_status); }; }; then
17547   cf_cv_sizechange=yes
17548 else
17549   echo "$as_me: failed program was:" >&5
17550 cat conftest.$ac_ext >&5
17551 cf_cv_sizechange=no
17552 fi
17553 rm -f conftest.$ac_objext conftest.$ac_ext
17554
17555         CPPFLAGS="$cf_save_CPPFLAGS"
17556         if test "$cf_cv_sizechange" = yes ; then
17557                 echo "size-change succeeded ($cf_opts)" >&5
17558                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17559                 break
17560         fi
17561 done
17562
17563 fi
17564 echo "$as_me:17564: result: $cf_cv_sizechange" >&5
17565 echo "${ECHO_T}$cf_cv_sizechange" >&6
17566 if test "$cf_cv_sizechange" != no ; then
17567
17568 cat >>confdefs.h <<\EOF
17569 #define HAVE_SIZECHANGE 1
17570 EOF
17571
17572         case $cf_cv_sizechange in
17573         (NEED*)
17574                 cat >>confdefs.h <<EOF
17575 #define $cf_cv_sizechange  1
17576 EOF
17577
17578                 ;;
17579         esac
17580 fi
17581
17582 echo "$as_me:17582: checking for memmove" >&5
17583 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17584 if test "${ac_cv_func_memmove+set}" = set; then
17585   echo $ECHO_N "(cached) $ECHO_C" >&6
17586 else
17587   cat >conftest.$ac_ext <<_ACEOF
17588 #line 17588 "configure"
17589 #include "confdefs.h"
17590 /* System header to define __stub macros and hopefully few prototypes,
17591     which can conflict with char memmove (); below.  */
17592 #include <assert.h>
17593 /* Override any gcc2 internal prototype to avoid an error.  */
17594 #ifdef __cplusplus
17595 extern "C"
17596 #endif
17597 /* We use char because int might match the return type of a gcc2
17598    builtin and then its argument prototype would still apply.  */
17599 char memmove ();
17600 char (*f) ();
17601
17602 int
17603 main ()
17604 {
17605 /* The GNU C library defines this for functions which it implements
17606     to always fail with ENOSYS.  Some functions are actually named
17607     something starting with __ and the normal name is an alias.  */
17608 #if defined (__stub_memmove) || defined (__stub___memmove)
17609 choke me
17610 #else
17611 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17612 #endif
17613
17614   ;
17615   return 0;
17616 }
17617 _ACEOF
17618 rm -f conftest.$ac_objext conftest$ac_exeext
17619 if { (eval echo "$as_me:17619: \"$ac_link\"") >&5
17620   (eval $ac_link) 2>&5
17621   ac_status=$?
17622   echo "$as_me:17622: \$? = $ac_status" >&5
17623   (exit $ac_status); } &&
17624          { ac_try='test -s conftest$ac_exeext'
17625   { (eval echo "$as_me:17625: \"$ac_try\"") >&5
17626   (eval $ac_try) 2>&5
17627   ac_status=$?
17628   echo "$as_me:17628: \$? = $ac_status" >&5
17629   (exit $ac_status); }; }; then
17630   ac_cv_func_memmove=yes
17631 else
17632   echo "$as_me: failed program was:" >&5
17633 cat conftest.$ac_ext >&5
17634 ac_cv_func_memmove=no
17635 fi
17636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17637 fi
17638 echo "$as_me:17638: result: $ac_cv_func_memmove" >&5
17639 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17640 if test $ac_cv_func_memmove = yes; then
17641   :
17642 else
17643
17644 echo "$as_me:17644: checking for bcopy" >&5
17645 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17646 if test "${ac_cv_func_bcopy+set}" = set; then
17647   echo $ECHO_N "(cached) $ECHO_C" >&6
17648 else
17649   cat >conftest.$ac_ext <<_ACEOF
17650 #line 17650 "configure"
17651 #include "confdefs.h"
17652 /* System header to define __stub macros and hopefully few prototypes,
17653     which can conflict with char bcopy (); below.  */
17654 #include <assert.h>
17655 /* Override any gcc2 internal prototype to avoid an error.  */
17656 #ifdef __cplusplus
17657 extern "C"
17658 #endif
17659 /* We use char because int might match the return type of a gcc2
17660    builtin and then its argument prototype would still apply.  */
17661 char bcopy ();
17662 char (*f) ();
17663
17664 int
17665 main ()
17666 {
17667 /* The GNU C library defines this for functions which it implements
17668     to always fail with ENOSYS.  Some functions are actually named
17669     something starting with __ and the normal name is an alias.  */
17670 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17671 choke me
17672 #else
17673 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17674 #endif
17675
17676   ;
17677   return 0;
17678 }
17679 _ACEOF
17680 rm -f conftest.$ac_objext conftest$ac_exeext
17681 if { (eval echo "$as_me:17681: \"$ac_link\"") >&5
17682   (eval $ac_link) 2>&5
17683   ac_status=$?
17684   echo "$as_me:17684: \$? = $ac_status" >&5
17685   (exit $ac_status); } &&
17686          { ac_try='test -s conftest$ac_exeext'
17687   { (eval echo "$as_me:17687: \"$ac_try\"") >&5
17688   (eval $ac_try) 2>&5
17689   ac_status=$?
17690   echo "$as_me:17690: \$? = $ac_status" >&5
17691   (exit $ac_status); }; }; then
17692   ac_cv_func_bcopy=yes
17693 else
17694   echo "$as_me: failed program was:" >&5
17695 cat conftest.$ac_ext >&5
17696 ac_cv_func_bcopy=no
17697 fi
17698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17699 fi
17700 echo "$as_me:17700: result: $ac_cv_func_bcopy" >&5
17701 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17702 if test $ac_cv_func_bcopy = yes; then
17703
17704         echo "$as_me:17704: checking if bcopy does overlapping moves" >&5
17705 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17706 if test "${cf_cv_good_bcopy+set}" = set; then
17707   echo $ECHO_N "(cached) $ECHO_C" >&6
17708 else
17709
17710                 if test "$cross_compiling" = yes; then
17711   cf_cv_good_bcopy=unknown
17712 else
17713   cat >conftest.$ac_ext <<_ACEOF
17714 #line 17714 "configure"
17715 #include "confdefs.h"
17716
17717 int main() {
17718         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17719         char temp[40];
17720         bcopy(data, temp, sizeof(data));
17721         bcopy(temp+10, temp, 15);
17722         bcopy(temp+5, temp+15, 10);
17723         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17724 }
17725
17726 _ACEOF
17727 rm -f conftest$ac_exeext
17728 if { (eval echo "$as_me:17728: \"$ac_link\"") >&5
17729   (eval $ac_link) 2>&5
17730   ac_status=$?
17731   echo "$as_me:17731: \$? = $ac_status" >&5
17732   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17733   { (eval echo "$as_me:17733: \"$ac_try\"") >&5
17734   (eval $ac_try) 2>&5
17735   ac_status=$?
17736   echo "$as_me:17736: \$? = $ac_status" >&5
17737   (exit $ac_status); }; }; then
17738   cf_cv_good_bcopy=yes
17739 else
17740   echo "$as_me: program exited with status $ac_status" >&5
17741 echo "$as_me: failed program was:" >&5
17742 cat conftest.$ac_ext >&5
17743 cf_cv_good_bcopy=no
17744 fi
17745 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17746 fi
17747
17748 fi
17749 echo "$as_me:17749: result: $cf_cv_good_bcopy" >&5
17750 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17751
17752 else
17753   cf_cv_good_bcopy=no
17754 fi
17755
17756         if test "$cf_cv_good_bcopy" = yes ; then
17757
17758 cat >>confdefs.h <<\EOF
17759 #define USE_OK_BCOPY 1
17760 EOF
17761
17762         else
17763
17764 cat >>confdefs.h <<\EOF
17765 #define USE_MY_MEMMOVE 1
17766 EOF
17767
17768         fi
17769
17770 fi
17771
17772 echo "$as_me:17772: checking if poll really works" >&5
17773 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17774 if test "${cf_cv_working_poll+set}" = set; then
17775   echo $ECHO_N "(cached) $ECHO_C" >&6
17776 else
17777
17778 if test "$cross_compiling" = yes; then
17779   cf_cv_working_poll=unknown
17780 else
17781   cat >conftest.$ac_ext <<_ACEOF
17782 #line 17782 "configure"
17783 #include "confdefs.h"
17784
17785 #include <stdlib.h>
17786 #include <stdio.h>
17787 #include <unistd.h>
17788 #include <fcntl.h>
17789 #ifdef HAVE_POLL_H
17790 #include <poll.h>
17791 #else
17792 #include <sys/poll.h>
17793 #endif
17794 int main() {
17795         struct pollfd myfds;
17796         int ret;
17797
17798         /* check for Darwin bug with respect to "devices" */
17799         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17800         if (myfds.fd < 0)
17801                 myfds.fd = 0;
17802         myfds.events = POLLIN;
17803         myfds.revents = 0;
17804
17805         ret = poll(&myfds, 1, 100);
17806
17807         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17808                 ret = -1;
17809         } else {
17810                 int fd = 0;
17811                 if (!isatty(fd)) {
17812                         fd = open("/dev/tty", 2);       /* O_RDWR */
17813                 }
17814
17815                 if (fd >= 0) {
17816                         /* also check with standard input */
17817                         myfds.fd = fd;
17818                         myfds.events = POLLIN;
17819                         myfds.revents = 0;
17820                         ret = poll(&myfds, 1, 100);
17821                 } else {
17822                         ret = -1;
17823                 }
17824         }
17825         ${cf_cv_main_return:-return}(ret < 0);
17826 }
17827 _ACEOF
17828 rm -f conftest$ac_exeext
17829 if { (eval echo "$as_me:17829: \"$ac_link\"") >&5
17830   (eval $ac_link) 2>&5
17831   ac_status=$?
17832   echo "$as_me:17832: \$? = $ac_status" >&5
17833   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17834   { (eval echo "$as_me:17834: \"$ac_try\"") >&5
17835   (eval $ac_try) 2>&5
17836   ac_status=$?
17837   echo "$as_me:17837: \$? = $ac_status" >&5
17838   (exit $ac_status); }; }; then
17839   cf_cv_working_poll=yes
17840 else
17841   echo "$as_me: program exited with status $ac_status" >&5
17842 echo "$as_me: failed program was:" >&5
17843 cat conftest.$ac_ext >&5
17844 cf_cv_working_poll=no
17845 fi
17846 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17847 fi
17848 fi
17849 echo "$as_me:17849: result: $cf_cv_working_poll" >&5
17850 echo "${ECHO_T}$cf_cv_working_poll" >&6
17851 test "$cf_cv_working_poll" = "yes" &&
17852 cat >>confdefs.h <<\EOF
17853 #define HAVE_WORKING_POLL 1
17854 EOF
17855
17856 echo "$as_me:17856: checking for va_copy" >&5
17857 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17858 if test "${cf_cv_have_va_copy+set}" = set; then
17859   echo $ECHO_N "(cached) $ECHO_C" >&6
17860 else
17861
17862 cat >conftest.$ac_ext <<_ACEOF
17863 #line 17863 "configure"
17864 #include "confdefs.h"
17865
17866 #include <stdarg.h>
17867
17868 int
17869 main ()
17870 {
17871
17872         static va_list dst;
17873         static va_list src;
17874         va_copy(dst, src)
17875   ;
17876   return 0;
17877 }
17878 _ACEOF
17879 rm -f conftest.$ac_objext conftest$ac_exeext
17880 if { (eval echo "$as_me:17880: \"$ac_link\"") >&5
17881   (eval $ac_link) 2>&5
17882   ac_status=$?
17883   echo "$as_me:17883: \$? = $ac_status" >&5
17884   (exit $ac_status); } &&
17885          { ac_try='test -s conftest$ac_exeext'
17886   { (eval echo "$as_me:17886: \"$ac_try\"") >&5
17887   (eval $ac_try) 2>&5
17888   ac_status=$?
17889   echo "$as_me:17889: \$? = $ac_status" >&5
17890   (exit $ac_status); }; }; then
17891   cf_cv_have_va_copy=yes
17892 else
17893   echo "$as_me: failed program was:" >&5
17894 cat conftest.$ac_ext >&5
17895 cf_cv_have_va_copy=no
17896 fi
17897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17898 fi
17899 echo "$as_me:17899: result: $cf_cv_have_va_copy" >&5
17900 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17901
17902 test "$cf_cv_have_va_copy" = yes &&
17903 cat >>confdefs.h <<\EOF
17904 #define HAVE_VA_COPY 1
17905 EOF
17906
17907 echo "$as_me:17907: checking for __va_copy" >&5
17908 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17909 if test "${cf_cv_have___va_copy+set}" = set; then
17910   echo $ECHO_N "(cached) $ECHO_C" >&6
17911 else
17912
17913 cat >conftest.$ac_ext <<_ACEOF
17914 #line 17914 "configure"
17915 #include "confdefs.h"
17916
17917 #include <stdarg.h>
17918
17919 int
17920 main ()
17921 {
17922
17923         static va_list dst;
17924         static va_list src;
17925         __va_copy(dst, src)
17926   ;
17927   return 0;
17928 }
17929 _ACEOF
17930 rm -f conftest.$ac_objext conftest$ac_exeext
17931 if { (eval echo "$as_me:17931: \"$ac_link\"") >&5
17932   (eval $ac_link) 2>&5
17933   ac_status=$?
17934   echo "$as_me:17934: \$? = $ac_status" >&5
17935   (exit $ac_status); } &&
17936          { ac_try='test -s conftest$ac_exeext'
17937   { (eval echo "$as_me:17937: \"$ac_try\"") >&5
17938   (eval $ac_try) 2>&5
17939   ac_status=$?
17940   echo "$as_me:17940: \$? = $ac_status" >&5
17941   (exit $ac_status); }; }; then
17942   cf_cv_have___va_copy=yes
17943 else
17944   echo "$as_me: failed program was:" >&5
17945 cat conftest.$ac_ext >&5
17946 cf_cv_have___va_copy=no
17947 fi
17948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17949 fi
17950 echo "$as_me:17950: result: $cf_cv_have___va_copy" >&5
17951 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17952
17953 test "$cf_cv_have___va_copy" = yes &&
17954 cat >>confdefs.h <<\EOF
17955 #define HAVE___VA_COPY 1
17956 EOF
17957
17958 echo "$as_me:17958: checking for pid_t" >&5
17959 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17960 if test "${ac_cv_type_pid_t+set}" = set; then
17961   echo $ECHO_N "(cached) $ECHO_C" >&6
17962 else
17963   cat >conftest.$ac_ext <<_ACEOF
17964 #line 17964 "configure"
17965 #include "confdefs.h"
17966 $ac_includes_default
17967 int
17968 main ()
17969 {
17970 if ((pid_t *) 0)
17971   return 0;
17972 if (sizeof (pid_t))
17973   return 0;
17974   ;
17975   return 0;
17976 }
17977 _ACEOF
17978 rm -f conftest.$ac_objext
17979 if { (eval echo "$as_me:17979: \"$ac_compile\"") >&5
17980   (eval $ac_compile) 2>&5
17981   ac_status=$?
17982   echo "$as_me:17982: \$? = $ac_status" >&5
17983   (exit $ac_status); } &&
17984          { ac_try='test -s conftest.$ac_objext'
17985   { (eval echo "$as_me:17985: \"$ac_try\"") >&5
17986   (eval $ac_try) 2>&5
17987   ac_status=$?
17988   echo "$as_me:17988: \$? = $ac_status" >&5
17989   (exit $ac_status); }; }; then
17990   ac_cv_type_pid_t=yes
17991 else
17992   echo "$as_me: failed program was:" >&5
17993 cat conftest.$ac_ext >&5
17994 ac_cv_type_pid_t=no
17995 fi
17996 rm -f conftest.$ac_objext conftest.$ac_ext
17997 fi
17998 echo "$as_me:17998: result: $ac_cv_type_pid_t" >&5
17999 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18000 if test $ac_cv_type_pid_t = yes; then
18001   :
18002 else
18003
18004 cat >>confdefs.h <<EOF
18005 #define pid_t int
18006 EOF
18007
18008 fi
18009
18010 for ac_header in unistd.h vfork.h
18011 do
18012 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18013 echo "$as_me:18013: checking for $ac_header" >&5
18014 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18015 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18016   echo $ECHO_N "(cached) $ECHO_C" >&6
18017 else
18018   cat >conftest.$ac_ext <<_ACEOF
18019 #line 18019 "configure"
18020 #include "confdefs.h"
18021 #include <$ac_header>
18022 _ACEOF
18023 if { (eval echo "$as_me:18023: \"$ac_cpp conftest.$ac_ext\"") >&5
18024   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18025   ac_status=$?
18026   egrep -v '^ *\+' conftest.er1 >conftest.err
18027   rm -f conftest.er1
18028   cat conftest.err >&5
18029   echo "$as_me:18029: \$? = $ac_status" >&5
18030   (exit $ac_status); } >/dev/null; then
18031   if test -s conftest.err; then
18032     ac_cpp_err=$ac_c_preproc_warn_flag
18033   else
18034     ac_cpp_err=
18035   fi
18036 else
18037   ac_cpp_err=yes
18038 fi
18039 if test -z "$ac_cpp_err"; then
18040   eval "$as_ac_Header=yes"
18041 else
18042   echo "$as_me: failed program was:" >&5
18043   cat conftest.$ac_ext >&5
18044   eval "$as_ac_Header=no"
18045 fi
18046 rm -f conftest.err conftest.$ac_ext
18047 fi
18048 echo "$as_me:18048: result: `eval echo '${'$as_ac_Header'}'`" >&5
18049 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18050 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18051   cat >>confdefs.h <<EOF
18052 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18053 EOF
18054
18055 fi
18056 done
18057
18058 for ac_func in fork vfork
18059 do
18060 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18061 echo "$as_me:18061: checking for $ac_func" >&5
18062 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18063 if eval "test \"\${$as_ac_var+set}\" = set"; then
18064   echo $ECHO_N "(cached) $ECHO_C" >&6
18065 else
18066   cat >conftest.$ac_ext <<_ACEOF
18067 #line 18067 "configure"
18068 #include "confdefs.h"
18069 /* System header to define __stub macros and hopefully few prototypes,
18070     which can conflict with char $ac_func (); below.  */
18071 #include <assert.h>
18072 /* Override any gcc2 internal prototype to avoid an error.  */
18073 #ifdef __cplusplus
18074 extern "C"
18075 #endif
18076 /* We use char because int might match the return type of a gcc2
18077    builtin and then its argument prototype would still apply.  */
18078 char $ac_func ();
18079 char (*f) ();
18080
18081 int
18082 main ()
18083 {
18084 /* The GNU C library defines this for functions which it implements
18085     to always fail with ENOSYS.  Some functions are actually named
18086     something starting with __ and the normal name is an alias.  */
18087 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18088 choke me
18089 #else
18090 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18091 #endif
18092
18093   ;
18094   return 0;
18095 }
18096 _ACEOF
18097 rm -f conftest.$ac_objext conftest$ac_exeext
18098 if { (eval echo "$as_me:18098: \"$ac_link\"") >&5
18099   (eval $ac_link) 2>&5
18100   ac_status=$?
18101   echo "$as_me:18101: \$? = $ac_status" >&5
18102   (exit $ac_status); } &&
18103          { ac_try='test -s conftest$ac_exeext'
18104   { (eval echo "$as_me:18104: \"$ac_try\"") >&5
18105   (eval $ac_try) 2>&5
18106   ac_status=$?
18107   echo "$as_me:18107: \$? = $ac_status" >&5
18108   (exit $ac_status); }; }; then
18109   eval "$as_ac_var=yes"
18110 else
18111   echo "$as_me: failed program was:" >&5
18112 cat conftest.$ac_ext >&5
18113 eval "$as_ac_var=no"
18114 fi
18115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18116 fi
18117 echo "$as_me:18117: result: `eval echo '${'$as_ac_var'}'`" >&5
18118 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18119 if test `eval echo '${'$as_ac_var'}'` = yes; then
18120   cat >>confdefs.h <<EOF
18121 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18122 EOF
18123
18124 fi
18125 done
18126
18127 ac_cv_func_fork_works=$ac_cv_func_fork
18128 if test "x$ac_cv_func_fork" = xyes; then
18129   echo "$as_me:18129: checking for working fork" >&5
18130 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18131 if test "${ac_cv_func_fork_works+set}" = set; then
18132   echo $ECHO_N "(cached) $ECHO_C" >&6
18133 else
18134   if test "$cross_compiling" = yes; then
18135   ac_cv_func_fork_works=cross
18136 else
18137   cat >conftest.$ac_ext <<_ACEOF
18138 /* By Rüdiger Kuhlmann. */
18139       #include <sys/types.h>
18140       #if HAVE_UNISTD_H
18141       # include <unistd.h>
18142       #endif
18143       /* Some systems only have a dummy stub for fork() */
18144       int main ()
18145       {
18146         if (fork() < 0)
18147           $ac_main_return (1);
18148         $ac_main_return (0);
18149       }
18150 _ACEOF
18151 rm -f conftest$ac_exeext
18152 if { (eval echo "$as_me:18152: \"$ac_link\"") >&5
18153   (eval $ac_link) 2>&5
18154   ac_status=$?
18155   echo "$as_me:18155: \$? = $ac_status" >&5
18156   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18157   { (eval echo "$as_me:18157: \"$ac_try\"") >&5
18158   (eval $ac_try) 2>&5
18159   ac_status=$?
18160   echo "$as_me:18160: \$? = $ac_status" >&5
18161   (exit $ac_status); }; }; then
18162   ac_cv_func_fork_works=yes
18163 else
18164   echo "$as_me: program exited with status $ac_status" >&5
18165 echo "$as_me: failed program was:" >&5
18166 cat conftest.$ac_ext >&5
18167 ac_cv_func_fork_works=no
18168 fi
18169 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18170 fi
18171 fi
18172 echo "$as_me:18172: result: $ac_cv_func_fork_works" >&5
18173 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18174
18175 fi
18176 if test "x$ac_cv_func_fork_works" = xcross; then
18177   case $host in
18178     *-*-amigaos* | *-*-msdosdjgpp*)
18179       # Override, as these systems have only a dummy fork() stub
18180       ac_cv_func_fork_works=no
18181       ;;
18182     *)
18183       ac_cv_func_fork_works=yes
18184       ;;
18185   esac
18186   { echo "$as_me:18186: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18187 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18188 fi
18189 ac_cv_func_vfork_works=$ac_cv_func_vfork
18190 if test "x$ac_cv_func_vfork" = xyes; then
18191   echo "$as_me:18191: checking for working vfork" >&5
18192 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18193 if test "${ac_cv_func_vfork_works+set}" = set; then
18194   echo $ECHO_N "(cached) $ECHO_C" >&6
18195 else
18196   if test "$cross_compiling" = yes; then
18197   ac_cv_func_vfork_works=cross
18198 else
18199   cat >conftest.$ac_ext <<_ACEOF
18200 #line 18200 "configure"
18201 #include "confdefs.h"
18202 /* Thanks to Paul Eggert for this test.  */
18203 #include <stdio.h>
18204 #include <sys/types.h>
18205 #include <sys/stat.h>
18206 #if HAVE_UNISTD_H
18207 # include <unistd.h>
18208 #endif
18209 #if HAVE_VFORK_H
18210 # include <vfork.h>
18211 #endif
18212 /* On some sparc systems, changes by the child to local and incoming
18213    argument registers are propagated back to the parent.  The compiler
18214    is told about this with #include <vfork.h>, but some compilers
18215    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18216    static variable whose address is put into a register that is
18217    clobbered by the vfork.  */
18218 static
18219 #ifdef __cplusplus
18220 sparc_address_test (int arg)
18221 # else
18222 sparc_address_test (arg) int arg;
18223 #endif
18224 {
18225   static pid_t child;
18226   if (!child) {
18227     child = vfork ();
18228     if (child < 0) {
18229       perror ("vfork");
18230       _exit(2);
18231     }
18232     if (!child) {
18233       arg = getpid();
18234       write(-1, "", 0);
18235       _exit (arg);
18236     }
18237   }
18238 }
18239
18240 int
18241 main ()
18242 {
18243   pid_t parent = getpid ();
18244   pid_t child;
18245
18246   sparc_address_test ();
18247
18248   child = vfork ();
18249
18250   if (child == 0) {
18251     /* Here is another test for sparc vfork register problems.  This
18252        test uses lots of local variables, at least as many local
18253        variables as main has allocated so far including compiler
18254        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18255        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18256        reuse the register of parent for one of the local variables,
18257        since it will think that parent can't possibly be used any more
18258        in this routine.  Assigning to the local variable will thus
18259        munge parent in the parent process.  */
18260     pid_t
18261       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18262       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18263     /* Convince the compiler that p..p7 are live; otherwise, it might
18264        use the same hardware register for all 8 local variables.  */
18265     if (p != p1 || p != p2 || p != p3 || p != p4
18266         || p != p5 || p != p6 || p != p7)
18267       _exit(1);
18268
18269     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18270        from child file descriptors.  If the child closes a descriptor
18271        before it execs or exits, this munges the parent's descriptor
18272        as well.  Test for this by closing stdout in the child.  */
18273     _exit(close(fileno(stdout)) != 0);
18274   } else {
18275     int status;
18276     struct stat st;
18277
18278     while (wait(&status) != child)
18279       ;
18280     $ac_main_return(
18281          /* Was there some problem with vforking?  */
18282          child < 0
18283
18284          /* Did the child fail?  (This shouldn't happen.)  */
18285          || status
18286
18287          /* Did the vfork/compiler bug occur?  */
18288          || parent != getpid()
18289
18290          /* Did the file descriptor bug occur?  */
18291          || fstat(fileno(stdout), &st) != 0
18292          );
18293   }
18294 }
18295 _ACEOF
18296 rm -f conftest$ac_exeext
18297 if { (eval echo "$as_me:18297: \"$ac_link\"") >&5
18298   (eval $ac_link) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18302   { (eval echo "$as_me:18302: \"$ac_try\"") >&5
18303   (eval $ac_try) 2>&5
18304   ac_status=$?
18305   echo "$as_me:18305: \$? = $ac_status" >&5
18306   (exit $ac_status); }; }; then
18307   ac_cv_func_vfork_works=yes
18308 else
18309   echo "$as_me: program exited with status $ac_status" >&5
18310 echo "$as_me: failed program was:" >&5
18311 cat conftest.$ac_ext >&5
18312 ac_cv_func_vfork_works=no
18313 fi
18314 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18315 fi
18316 fi
18317 echo "$as_me:18317: result: $ac_cv_func_vfork_works" >&5
18318 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18319
18320 fi;
18321 if test "x$ac_cv_func_fork_works" = xcross; then
18322   ac_cv_func_vfork_works=ac_cv_func_vfork
18323   { echo "$as_me:18323: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18324 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18325 fi
18326
18327 if test "x$ac_cv_func_vfork_works" = xyes; then
18328
18329 cat >>confdefs.h <<\EOF
18330 #define HAVE_WORKING_VFORK 1
18331 EOF
18332
18333 else
18334
18335 cat >>confdefs.h <<\EOF
18336 #define vfork fork
18337 EOF
18338
18339 fi
18340 if test "x$ac_cv_func_fork_works" = xyes; then
18341
18342 cat >>confdefs.h <<\EOF
18343 #define HAVE_WORKING_FORK 1
18344 EOF
18345
18346 fi
18347
18348 # special check for test/ditto.c
18349
18350 echo "$as_me:18350: checking for openpty in -lutil" >&5
18351 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18352 if test "${ac_cv_lib_util_openpty+set}" = set; then
18353   echo $ECHO_N "(cached) $ECHO_C" >&6
18354 else
18355   ac_check_lib_save_LIBS=$LIBS
18356 LIBS="-lutil  $LIBS"
18357 cat >conftest.$ac_ext <<_ACEOF
18358 #line 18358 "configure"
18359 #include "confdefs.h"
18360
18361 /* Override any gcc2 internal prototype to avoid an error.  */
18362 #ifdef __cplusplus
18363 extern "C"
18364 #endif
18365 /* We use char because int might match the return type of a gcc2
18366    builtin and then its argument prototype would still apply.  */
18367 char openpty ();
18368 int
18369 main ()
18370 {
18371 openpty ();
18372   ;
18373   return 0;
18374 }
18375 _ACEOF
18376 rm -f conftest.$ac_objext conftest$ac_exeext
18377 if { (eval echo "$as_me:18377: \"$ac_link\"") >&5
18378   (eval $ac_link) 2>&5
18379   ac_status=$?
18380   echo "$as_me:18380: \$? = $ac_status" >&5
18381   (exit $ac_status); } &&
18382          { ac_try='test -s conftest$ac_exeext'
18383   { (eval echo "$as_me:18383: \"$ac_try\"") >&5
18384   (eval $ac_try) 2>&5
18385   ac_status=$?
18386   echo "$as_me:18386: \$? = $ac_status" >&5
18387   (exit $ac_status); }; }; then
18388   ac_cv_lib_util_openpty=yes
18389 else
18390   echo "$as_me: failed program was:" >&5
18391 cat conftest.$ac_ext >&5
18392 ac_cv_lib_util_openpty=no
18393 fi
18394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18395 LIBS=$ac_check_lib_save_LIBS
18396 fi
18397 echo "$as_me:18397: result: $ac_cv_lib_util_openpty" >&5
18398 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18399 if test $ac_cv_lib_util_openpty = yes; then
18400   cf_cv_lib_util=yes
18401 else
18402   cf_cv_lib_util=no
18403 fi
18404
18405 echo "$as_me:18405: checking for openpty header" >&5
18406 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18407 if test "${cf_cv_func_openpty+set}" = set; then
18408   echo $ECHO_N "(cached) $ECHO_C" >&6
18409 else
18410
18411         cf_save_LIBS="$LIBS"
18412         test $cf_cv_lib_util = yes &&
18413 cf_add_libs="-lutil"
18414 # Filter out duplicates - this happens with badly-designed ".pc" files...
18415 for cf_add_1lib in $LIBS
18416 do
18417         for cf_add_2lib in $cf_add_libs
18418         do
18419                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18420                 then
18421                         cf_add_1lib=
18422                         break
18423                 fi
18424         done
18425         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18426 done
18427 LIBS="$cf_add_libs"
18428
18429         for cf_header in pty.h libutil.h util.h
18430         do
18431         cat >conftest.$ac_ext <<_ACEOF
18432 #line 18432 "configure"
18433 #include "confdefs.h"
18434
18435 #include <$cf_header>
18436
18437 int
18438 main ()
18439 {
18440
18441         int x = openpty((int *)0, (int *)0, (char *)0,
18442                                    (struct termios *)0, (struct winsize *)0);
18443
18444   ;
18445   return 0;
18446 }
18447 _ACEOF
18448 rm -f conftest.$ac_objext conftest$ac_exeext
18449 if { (eval echo "$as_me:18449: \"$ac_link\"") >&5
18450   (eval $ac_link) 2>&5
18451   ac_status=$?
18452   echo "$as_me:18452: \$? = $ac_status" >&5
18453   (exit $ac_status); } &&
18454          { ac_try='test -s conftest$ac_exeext'
18455   { (eval echo "$as_me:18455: \"$ac_try\"") >&5
18456   (eval $ac_try) 2>&5
18457   ac_status=$?
18458   echo "$as_me:18458: \$? = $ac_status" >&5
18459   (exit $ac_status); }; }; then
18460
18461                 cf_cv_func_openpty=$cf_header
18462                 break
18463
18464 else
18465   echo "$as_me: failed program was:" >&5
18466 cat conftest.$ac_ext >&5
18467
18468                 cf_cv_func_openpty=no
18469
18470 fi
18471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18472         done
18473         LIBS="$cf_save_LIBS"
18474
18475 fi
18476 echo "$as_me:18476: result: $cf_cv_func_openpty" >&5
18477 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18478
18479 if test "$cf_cv_func_openpty" != no ; then
18480
18481 cat >>confdefs.h <<EOF
18482 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18483 EOF
18484
18485 cat >>confdefs.h <<\EOF
18486 #define USE_XTERM_PTY 1
18487 EOF
18488
18489         if test "x$cf_cv_lib_util" = xyes ; then
18490
18491 cf_add_libs="-lutil"
18492 # Filter out duplicates - this happens with badly-designed ".pc" files...
18493 for cf_add_1lib in $TEST_LIBS
18494 do
18495         for cf_add_2lib in $cf_add_libs
18496         do
18497                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18498                 then
18499                         cf_add_1lib=
18500                         break
18501                 fi
18502         done
18503         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18504 done
18505 TEST_LIBS="$cf_add_libs"
18506
18507         fi
18508 fi
18509
18510 if test "$with_hashed_db" != no ; then
18511
18512 cat >>confdefs.h <<\EOF
18513 #define USE_HASHED_DB 1
18514 EOF
18515
18516 case $with_hashed_db in
18517 (yes|*able*)
18518         ;;
18519 (*)
18520         if test -d "$with_hashed_db" ; then
18521
18522 if test -n "$with_hashed_db/include" ; then
18523   for cf_add_incdir in $with_hashed_db/include
18524   do
18525         while test $cf_add_incdir != /usr/include
18526         do
18527           if test -d $cf_add_incdir
18528           then
18529                 cf_have_incdir=no
18530                 if test -n "$CFLAGS$CPPFLAGS" ; then
18531                   # a loop is needed to ensure we can add subdirs of existing dirs
18532                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18533                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18534                           cf_have_incdir=yes; break
18535                         fi
18536                   done
18537                 fi
18538
18539                 if test "$cf_have_incdir" = no ; then
18540                   if test "$cf_add_incdir" = /usr/local/include ; then
18541                         if test "$GCC" = yes
18542                         then
18543                           cf_save_CPPFLAGS=$CPPFLAGS
18544                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18545                           cat >conftest.$ac_ext <<_ACEOF
18546 #line 18546 "configure"
18547 #include "confdefs.h"
18548 #include <stdio.h>
18549 int
18550 main ()
18551 {
18552 printf("Hello")
18553   ;
18554   return 0;
18555 }
18556 _ACEOF
18557 rm -f conftest.$ac_objext
18558 if { (eval echo "$as_me:18558: \"$ac_compile\"") >&5
18559   (eval $ac_compile) 2>&5
18560   ac_status=$?
18561   echo "$as_me:18561: \$? = $ac_status" >&5
18562   (exit $ac_status); } &&
18563          { ac_try='test -s conftest.$ac_objext'
18564   { (eval echo "$as_me:18564: \"$ac_try\"") >&5
18565   (eval $ac_try) 2>&5
18566   ac_status=$?
18567   echo "$as_me:18567: \$? = $ac_status" >&5
18568   (exit $ac_status); }; }; then
18569   :
18570 else
18571   echo "$as_me: failed program was:" >&5
18572 cat conftest.$ac_ext >&5
18573 cf_have_incdir=yes
18574 fi
18575 rm -f conftest.$ac_objext conftest.$ac_ext
18576                           CPPFLAGS=$cf_save_CPPFLAGS
18577                         fi
18578                   fi
18579                 fi
18580
18581                 if test "$cf_have_incdir" = no ; then
18582                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18583
18584 echo "${as_me:-configure}:18584: testing adding $cf_add_incdir to include-path ..." 1>&5
18585
18586                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18587
18588                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18589                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18590                   cf_add_incdir="$cf_top_incdir"
18591                 else
18592                   break
18593                 fi
18594           fi
18595         done
18596   done
18597 fi
18598
18599 if test -n "$with_hashed_db/lib" ; then
18600         for cf_add_libdir in $with_hashed_db/lib
18601         do
18602                 if test $cf_add_libdir = /usr/lib ; then
18603                         :
18604                 elif test -d $cf_add_libdir
18605                 then
18606                         cf_have_libdir=no
18607                         if test -n "$LDFLAGS$LIBS" ; then
18608                                 # a loop is needed to ensure we can add subdirs of existing dirs
18609                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18610                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18611                                                 cf_have_libdir=yes; break
18612                                         fi
18613                                 done
18614                         fi
18615                         if test "$cf_have_libdir" = no ; then
18616                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18617
18618 echo "${as_me:-configure}:18618: testing adding $cf_add_libdir to library-path ..." 1>&5
18619
18620                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18621                         fi
18622                 fi
18623         done
18624 fi
18625
18626         else
18627                 case "$with_hashed_db" in
18628                 (./*|../*|/*)
18629                         { echo "$as_me:18629: WARNING: no such directory $with_hashed_db" >&5
18630 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18631                         ;;
18632                 (*)
18633
18634 cf_search=
18635
18636 test "x$prefix" != "xNONE" && \
18637 test -d "$prefix" && \
18638  {
18639         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18640         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18641         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18642         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18643         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18644         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18645 }
18646
18647 for cf_subdir_prefix in \
18648         /usr \
18649         /usr/local \
18650         /usr/pkg \
18651         /opt \
18652         /opt/local \
18653         $HOME
18654 do
18655
18656 test "x$cf_subdir_prefix" != "x$prefix" && \
18657 test -d "$cf_subdir_prefix" && \
18658 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18659         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18660         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18661         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18662         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18663         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18664         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"
18665 }
18666
18667 done
18668
18669         for cf_item in $cf_search
18670         do
18671                 case $cf_item in
18672                 (*/$with_hashed_db)
18673
18674 if test -n "$cf_item" ; then
18675   for cf_add_incdir in $cf_item
18676   do
18677         while test $cf_add_incdir != /usr/include
18678         do
18679           if test -d $cf_add_incdir
18680           then
18681                 cf_have_incdir=no
18682                 if test -n "$CFLAGS$CPPFLAGS" ; then
18683                   # a loop is needed to ensure we can add subdirs of existing dirs
18684                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18685                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18686                           cf_have_incdir=yes; break
18687                         fi
18688                   done
18689                 fi
18690
18691                 if test "$cf_have_incdir" = no ; then
18692                   if test "$cf_add_incdir" = /usr/local/include ; then
18693                         if test "$GCC" = yes
18694                         then
18695                           cf_save_CPPFLAGS=$CPPFLAGS
18696                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18697                           cat >conftest.$ac_ext <<_ACEOF
18698 #line 18698 "configure"
18699 #include "confdefs.h"
18700 #include <stdio.h>
18701 int
18702 main ()
18703 {
18704 printf("Hello")
18705   ;
18706   return 0;
18707 }
18708 _ACEOF
18709 rm -f conftest.$ac_objext
18710 if { (eval echo "$as_me:18710: \"$ac_compile\"") >&5
18711   (eval $ac_compile) 2>&5
18712   ac_status=$?
18713   echo "$as_me:18713: \$? = $ac_status" >&5
18714   (exit $ac_status); } &&
18715          { ac_try='test -s conftest.$ac_objext'
18716   { (eval echo "$as_me:18716: \"$ac_try\"") >&5
18717   (eval $ac_try) 2>&5
18718   ac_status=$?
18719   echo "$as_me:18719: \$? = $ac_status" >&5
18720   (exit $ac_status); }; }; then
18721   :
18722 else
18723   echo "$as_me: failed program was:" >&5
18724 cat conftest.$ac_ext >&5
18725 cf_have_incdir=yes
18726 fi
18727 rm -f conftest.$ac_objext conftest.$ac_ext
18728                           CPPFLAGS=$cf_save_CPPFLAGS
18729                         fi
18730                   fi
18731                 fi
18732
18733                 if test "$cf_have_incdir" = no ; then
18734                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18735
18736 echo "${as_me:-configure}:18736: testing adding $cf_add_incdir to include-path ..." 1>&5
18737
18738                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18739
18740                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18741                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18742                   cf_add_incdir="$cf_top_incdir"
18743                 else
18744                   break
18745                 fi
18746           fi
18747         done
18748   done
18749 fi
18750
18751                         ;;
18752                 esac
18753         done
18754
18755 cf_search=
18756
18757 test "x$prefix" != "xNONE" && \
18758 test -d "$prefix" && \
18759  {
18760         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18761         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18762         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18763         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18764         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18765         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18766 }
18767
18768 for cf_subdir_prefix in \
18769         /usr \
18770         /usr/local \
18771         /usr/pkg \
18772         /opt \
18773         /opt/local \
18774         $HOME
18775 do
18776
18777 test "x$cf_subdir_prefix" != "x$prefix" && \
18778 test -d "$cf_subdir_prefix" && \
18779 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18780         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18781         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18782         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18783         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18784         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18785         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"
18786 }
18787
18788 done
18789
18790         for cf_item in $cf_search
18791         do
18792                 case $cf_item in
18793                 (*/$with_hashed_db)
18794
18795 if test -n "$cf_item" ; then
18796         for cf_add_libdir in $cf_item
18797         do
18798                 if test $cf_add_libdir = /usr/lib ; then
18799                         :
18800                 elif test -d $cf_add_libdir
18801                 then
18802                         cf_have_libdir=no
18803                         if test -n "$LDFLAGS$LIBS" ; then
18804                                 # a loop is needed to ensure we can add subdirs of existing dirs
18805                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18806                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18807                                                 cf_have_libdir=yes; break
18808                                         fi
18809                                 done
18810                         fi
18811                         if test "$cf_have_libdir" = no ; then
18812                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18813
18814 echo "${as_me:-configure}:18814: testing adding $cf_add_libdir to library-path ..." 1>&5
18815
18816                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18817                         fi
18818                 fi
18819         done
18820 fi
18821
18822                         ;;
18823                 esac
18824         done
18825
18826                         ;;
18827                 esac
18828         fi
18829 esac
18830
18831 echo "$as_me:18831: checking for db.h" >&5
18832 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18833 if test "${ac_cv_header_db_h+set}" = set; then
18834   echo $ECHO_N "(cached) $ECHO_C" >&6
18835 else
18836   cat >conftest.$ac_ext <<_ACEOF
18837 #line 18837 "configure"
18838 #include "confdefs.h"
18839 #include <db.h>
18840 _ACEOF
18841 if { (eval echo "$as_me:18841: \"$ac_cpp conftest.$ac_ext\"") >&5
18842   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18843   ac_status=$?
18844   egrep -v '^ *\+' conftest.er1 >conftest.err
18845   rm -f conftest.er1
18846   cat conftest.err >&5
18847   echo "$as_me:18847: \$? = $ac_status" >&5
18848   (exit $ac_status); } >/dev/null; then
18849   if test -s conftest.err; then
18850     ac_cpp_err=$ac_c_preproc_warn_flag
18851   else
18852     ac_cpp_err=
18853   fi
18854 else
18855   ac_cpp_err=yes
18856 fi
18857 if test -z "$ac_cpp_err"; then
18858   ac_cv_header_db_h=yes
18859 else
18860   echo "$as_me: failed program was:" >&5
18861   cat conftest.$ac_ext >&5
18862   ac_cv_header_db_h=no
18863 fi
18864 rm -f conftest.err conftest.$ac_ext
18865 fi
18866 echo "$as_me:18866: result: $ac_cv_header_db_h" >&5
18867 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18868 if test $ac_cv_header_db_h = yes; then
18869
18870 echo "$as_me:18870: checking for version of db" >&5
18871 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18872 if test "${cf_cv_hashed_db_version+set}" = set; then
18873   echo $ECHO_N "(cached) $ECHO_C" >&6
18874 else
18875
18876 cf_cv_hashed_db_version=unknown
18877
18878 for cf_db_version in 1 2 3 4 5 6
18879 do
18880
18881 echo "${as_me:-configure}:18881: testing checking for db version $cf_db_version ..." 1>&5
18882
18883         cat >conftest.$ac_ext <<_ACEOF
18884 #line 18884 "configure"
18885 #include "confdefs.h"
18886
18887 $ac_includes_default
18888 #include <db.h>
18889
18890 #ifdef DB_VERSION_MAJOR
18891         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18892 #if $cf_db_version == DB_VERSION_MAJOR
18893         /* ok */
18894 #else
18895         make an error
18896 #endif
18897 #else
18898 #if $cf_db_version == 1
18899         /* ok: assuming this is DB 1.8.5 */
18900 #else
18901         make an error
18902 #endif
18903 #endif
18904
18905 int
18906 main ()
18907 {
18908 DBT *foo = 0
18909   ;
18910   return 0;
18911 }
18912 _ACEOF
18913 rm -f conftest.$ac_objext
18914 if { (eval echo "$as_me:18914: \"$ac_compile\"") >&5
18915   (eval $ac_compile) 2>&5
18916   ac_status=$?
18917   echo "$as_me:18917: \$? = $ac_status" >&5
18918   (exit $ac_status); } &&
18919          { ac_try='test -s conftest.$ac_objext'
18920   { (eval echo "$as_me:18920: \"$ac_try\"") >&5
18921   (eval $ac_try) 2>&5
18922   ac_status=$?
18923   echo "$as_me:18923: \$? = $ac_status" >&5
18924   (exit $ac_status); }; }; then
18925
18926         cf_cv_hashed_db_version=$cf_db_version
18927         break
18928
18929 else
18930   echo "$as_me: failed program was:" >&5
18931 cat conftest.$ac_ext >&5
18932 fi
18933 rm -f conftest.$ac_objext conftest.$ac_ext
18934 done
18935
18936 fi
18937 echo "$as_me:18937: result: $cf_cv_hashed_db_version" >&5
18938 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18939
18940 if test "$cf_cv_hashed_db_version" = unknown ; then
18941         { { echo "$as_me:18941: error: Cannot determine version of db" >&5
18942 echo "$as_me: error: Cannot determine version of db" >&2;}
18943    { (exit 1); exit 1; }; }
18944 else
18945
18946 echo "$as_me:18946: checking for db libraries" >&5
18947 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18948 if test "${cf_cv_hashed_db_libs+set}" = set; then
18949   echo $ECHO_N "(cached) $ECHO_C" >&6
18950 else
18951
18952 cf_cv_hashed_db_libs=unknown
18953 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18954 do
18955         cf_save_libs="$LIBS"
18956         if test -n "$cf_db_libs"; then
18957
18958 cf_add_libs="-l$cf_db_libs"
18959 # Filter out duplicates - this happens with badly-designed ".pc" files...
18960 for cf_add_1lib in $LIBS
18961 do
18962         for cf_add_2lib in $cf_add_libs
18963         do
18964                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18965                 then
18966                         cf_add_1lib=
18967                         break
18968                 fi
18969         done
18970         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18971 done
18972 LIBS="$cf_add_libs"
18973
18974         fi
18975
18976 echo "${as_me:-configure}:18976: testing checking for library "$cf_db_libs" ..." 1>&5
18977
18978         cat >conftest.$ac_ext <<_ACEOF
18979 #line 18979 "configure"
18980 #include "confdefs.h"
18981
18982 $ac_includes_default
18983 #include <db.h>
18984
18985 int
18986 main ()
18987 {
18988
18989         char *path = "/tmp/foo";
18990 #ifdef DB_VERSION_MAJOR
18991 #if DB_VERSION_MAJOR >= 4
18992         DB *result = 0;
18993         db_create(&result, NULL, 0);
18994         result->open(result,
18995                 NULL,
18996                 path,
18997                 path,
18998                 DB_HASH,
18999                 DB_CREATE,
19000                 0644);
19001 #elif DB_VERSION_MAJOR >= 3
19002         DB *result = 0;
19003         db_create(&result, NULL, 0);
19004         result->open(result,
19005                 path,
19006                 path,
19007                 DB_HASH,
19008                 DB_CREATE,
19009                 0644);
19010 #elif DB_VERSION_MAJOR >= 2
19011         DB *result = 0;
19012         db_open(path,
19013                 DB_HASH,
19014                 DB_CREATE,
19015                 0644,
19016                 (DB_ENV *) 0,
19017                 (DB_INFO *) 0,
19018                 &result);
19019 #endif /* DB_VERSION_MAJOR */
19020 #else
19021         DB *result = dbopen(path,
19022                      2,
19023                      0644,
19024                      DB_HASH,
19025                      0);
19026 #endif
19027         ${cf_cv_main_return:-return}(result != 0)
19028
19029   ;
19030   return 0;
19031 }
19032 _ACEOF
19033 rm -f conftest.$ac_objext conftest$ac_exeext
19034 if { (eval echo "$as_me:19034: \"$ac_link\"") >&5
19035   (eval $ac_link) 2>&5
19036   ac_status=$?
19037   echo "$as_me:19037: \$? = $ac_status" >&5
19038   (exit $ac_status); } &&
19039          { ac_try='test -s conftest$ac_exeext'
19040   { (eval echo "$as_me:19040: \"$ac_try\"") >&5
19041   (eval $ac_try) 2>&5
19042   ac_status=$?
19043   echo "$as_me:19043: \$? = $ac_status" >&5
19044   (exit $ac_status); }; }; then
19045
19046         if test -n "$cf_db_libs" ; then
19047                 cf_cv_hashed_db_libs=$cf_db_libs
19048         else
19049                 cf_cv_hashed_db_libs=default
19050         fi
19051         LIBS="$cf_save_libs"
19052         break
19053
19054 else
19055   echo "$as_me: failed program was:" >&5
19056 cat conftest.$ac_ext >&5
19057 fi
19058 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19059         LIBS="$cf_save_libs"
19060 done
19061
19062 fi
19063 echo "$as_me:19063: result: $cf_cv_hashed_db_libs" >&5
19064 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19065
19066         if test "$cf_cv_hashed_db_libs" = unknown ; then
19067                 { { echo "$as_me:19067: error: Cannot determine library for db" >&5
19068 echo "$as_me: error: Cannot determine library for db" >&2;}
19069    { (exit 1); exit 1; }; }
19070         elif test "$cf_cv_hashed_db_libs" != default ; then
19071
19072 cf_add_libs="-l$cf_cv_hashed_db_libs"
19073 # Filter out duplicates - this happens with badly-designed ".pc" files...
19074 for cf_add_1lib in $LIBS
19075 do
19076         for cf_add_2lib in $cf_add_libs
19077         do
19078                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19079                 then
19080                         cf_add_1lib=
19081                         break
19082                 fi
19083         done
19084         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19085 done
19086 LIBS="$cf_add_libs"
19087
19088         fi
19089 fi
19090
19091 else
19092
19093         { { echo "$as_me:19093: error: Cannot find db.h" >&5
19094 echo "$as_me: error: Cannot find db.h" >&2;}
19095    { (exit 1); exit 1; }; }
19096
19097 fi
19098
19099 fi
19100
19101 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19102         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19103         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19104 fi
19105
19106 # Just in case, check if the C compiler has a bool type.
19107
19108 echo "$as_me:19108: checking if we should include stdbool.h" >&5
19109 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19110
19111 if test "${cf_cv_header_stdbool_h+set}" = set; then
19112   echo $ECHO_N "(cached) $ECHO_C" >&6
19113 else
19114
19115         cat >conftest.$ac_ext <<_ACEOF
19116 #line 19116 "configure"
19117 #include "confdefs.h"
19118
19119 int
19120 main ()
19121 {
19122 bool foo = false
19123   ;
19124   return 0;
19125 }
19126 _ACEOF
19127 rm -f conftest.$ac_objext
19128 if { (eval echo "$as_me:19128: \"$ac_compile\"") >&5
19129   (eval $ac_compile) 2>&5
19130   ac_status=$?
19131   echo "$as_me:19131: \$? = $ac_status" >&5
19132   (exit $ac_status); } &&
19133          { ac_try='test -s conftest.$ac_objext'
19134   { (eval echo "$as_me:19134: \"$ac_try\"") >&5
19135   (eval $ac_try) 2>&5
19136   ac_status=$?
19137   echo "$as_me:19137: \$? = $ac_status" >&5
19138   (exit $ac_status); }; }; then
19139   cf_cv_header_stdbool_h=0
19140 else
19141   echo "$as_me: failed program was:" >&5
19142 cat conftest.$ac_ext >&5
19143 cat >conftest.$ac_ext <<_ACEOF
19144 #line 19144 "configure"
19145 #include "confdefs.h"
19146
19147 #ifndef __BEOS__
19148 #include <stdbool.h>
19149 #endif
19150
19151 int
19152 main ()
19153 {
19154 bool foo = false
19155   ;
19156   return 0;
19157 }
19158 _ACEOF
19159 rm -f conftest.$ac_objext
19160 if { (eval echo "$as_me:19160: \"$ac_compile\"") >&5
19161   (eval $ac_compile) 2>&5
19162   ac_status=$?
19163   echo "$as_me:19163: \$? = $ac_status" >&5
19164   (exit $ac_status); } &&
19165          { ac_try='test -s conftest.$ac_objext'
19166   { (eval echo "$as_me:19166: \"$ac_try\"") >&5
19167   (eval $ac_try) 2>&5
19168   ac_status=$?
19169   echo "$as_me:19169: \$? = $ac_status" >&5
19170   (exit $ac_status); }; }; then
19171   cf_cv_header_stdbool_h=1
19172 else
19173   echo "$as_me: failed program was:" >&5
19174 cat conftest.$ac_ext >&5
19175 cf_cv_header_stdbool_h=0
19176 fi
19177 rm -f conftest.$ac_objext conftest.$ac_ext
19178 fi
19179 rm -f conftest.$ac_objext conftest.$ac_ext
19180 fi
19181
19182 if test "$cf_cv_header_stdbool_h" = 1
19183 then    echo "$as_me:19183: result: yes" >&5
19184 echo "${ECHO_T}yes" >&6
19185 else    echo "$as_me:19185: result: no" >&5
19186 echo "${ECHO_T}no" >&6
19187 fi
19188
19189 echo "$as_me:19189: checking for builtin bool type" >&5
19190 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19191
19192 if test "${cf_cv_cc_bool_type+set}" = set; then
19193   echo $ECHO_N "(cached) $ECHO_C" >&6
19194 else
19195
19196         cat >conftest.$ac_ext <<_ACEOF
19197 #line 19197 "configure"
19198 #include "confdefs.h"
19199
19200 #include <stdio.h>
19201 #include <sys/types.h>
19202
19203 int
19204 main ()
19205 {
19206 bool x = false
19207   ;
19208   return 0;
19209 }
19210 _ACEOF
19211 rm -f conftest.$ac_objext
19212 if { (eval echo "$as_me:19212: \"$ac_compile\"") >&5
19213   (eval $ac_compile) 2>&5
19214   ac_status=$?
19215   echo "$as_me:19215: \$? = $ac_status" >&5
19216   (exit $ac_status); } &&
19217          { ac_try='test -s conftest.$ac_objext'
19218   { (eval echo "$as_me:19218: \"$ac_try\"") >&5
19219   (eval $ac_try) 2>&5
19220   ac_status=$?
19221   echo "$as_me:19221: \$? = $ac_status" >&5
19222   (exit $ac_status); }; }; then
19223   cf_cv_cc_bool_type=1
19224 else
19225   echo "$as_me: failed program was:" >&5
19226 cat conftest.$ac_ext >&5
19227 cf_cv_cc_bool_type=0
19228 fi
19229 rm -f conftest.$ac_objext conftest.$ac_ext
19230
19231 fi
19232
19233 if test "$cf_cv_cc_bool_type" = 1
19234 then    echo "$as_me:19234: result: yes" >&5
19235 echo "${ECHO_T}yes" >&6
19236 else    echo "$as_me:19236: result: no" >&5
19237 echo "${ECHO_T}no" >&6
19238 fi
19239
19240 # Check for C++ compiler characteristics (and ensure that it's there!)
19241 if test -n "$CXX" ; then
19242         ac_ext=cc
19243 ac_cpp='$CXXCPP $CPPFLAGS'
19244 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19245 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19246 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19247 ac_main_return=return
19248
19249 if test -n "$GXX" ; then
19250 case $cf_cv_system_name in
19251 (os2*)
19252         cf_stdcpp_libname=stdcpp
19253         ;;
19254 (*)
19255         cf_stdcpp_libname=stdc++
19256         ;;
19257 esac
19258 echo "$as_me:19258: checking for library $cf_stdcpp_libname" >&5
19259 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19260 if test "${cf_cv_libstdcpp+set}" = set; then
19261   echo $ECHO_N "(cached) $ECHO_C" >&6
19262 else
19263
19264         cf_save="$LIBS"
19265
19266 cf_add_libs="-l$cf_stdcpp_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 <strstream.h>
19287 int
19288 main ()
19289 {
19290
19291 char buf[80];
19292 strstreambuf foo(buf, sizeof(buf))
19293
19294   ;
19295   return 0;
19296 }
19297 _ACEOF
19298 rm -f conftest.$ac_objext conftest$ac_exeext
19299 if { (eval echo "$as_me:19299: \"$ac_link\"") >&5
19300   (eval $ac_link) 2>&5
19301   ac_status=$?
19302   echo "$as_me:19302: \$? = $ac_status" >&5
19303   (exit $ac_status); } &&
19304          { ac_try='test -s conftest$ac_exeext'
19305   { (eval echo "$as_me:19305: \"$ac_try\"") >&5
19306   (eval $ac_try) 2>&5
19307   ac_status=$?
19308   echo "$as_me:19308: \$? = $ac_status" >&5
19309   (exit $ac_status); }; }; then
19310   cf_cv_libstdcpp=yes
19311 else
19312   echo "$as_me: failed program was:" >&5
19313 cat conftest.$ac_ext >&5
19314 cf_cv_libstdcpp=no
19315 fi
19316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19317         LIBS="$cf_save"
19318
19319 fi
19320 echo "$as_me:19320: result: $cf_cv_libstdcpp" >&5
19321 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19322 test "$cf_cv_libstdcpp" = yes &&
19323 cf_add_libs="-l$cf_stdcpp_libname"
19324 # Filter out duplicates - this happens with badly-designed ".pc" files...
19325 for cf_add_1lib in $CXXLIBS
19326 do
19327         for cf_add_2lib in $cf_add_libs
19328         do
19329                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19330                 then
19331                         cf_add_1lib=
19332                         break
19333                 fi
19334         done
19335         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19336 done
19337 CXXLIBS="$cf_add_libs"
19338
19339 fi
19340
19341         echo "$as_me:19341: checking whether $CXX understands -c and -o together" >&5
19342 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19343 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19344   echo $ECHO_N "(cached) $ECHO_C" >&6
19345 else
19346
19347 cat > conftest.$ac_ext <<CF_EOF
19348 #include <stdio.h>
19349 int main()
19350 {
19351         ${cf_cv_main_return:-return}(0);
19352 }
19353 CF_EOF
19354 # We do the test twice because some compilers refuse to overwrite an
19355 # existing .o file with -o, though they will create one.
19356 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19357 if { (eval echo "$as_me:19357: \"$ac_try\"") >&5
19358   (eval $ac_try) 2>&5
19359   ac_status=$?
19360   echo "$as_me:19360: \$? = $ac_status" >&5
19361   (exit $ac_status); } &&
19362   test -f conftest2.$ac_objext && { (eval echo "$as_me:19362: \"$ac_try\"") >&5
19363   (eval $ac_try) 2>&5
19364   ac_status=$?
19365   echo "$as_me:19365: \$? = $ac_status" >&5
19366   (exit $ac_status); };
19367 then
19368   eval cf_cv_prog_CXX_c_o=yes
19369 else
19370   eval cf_cv_prog_CXX_c_o=no
19371 fi
19372 rm -rf conftest*
19373
19374 fi
19375 if test $cf_cv_prog_CXX_c_o = yes; then
19376   echo "$as_me:19376: result: yes" >&5
19377 echo "${ECHO_T}yes" >&6
19378 else
19379   echo "$as_me:19379: result: no" >&5
19380 echo "${ECHO_T}no" >&6
19381 fi
19382
19383         case $GXX_VERSION in
19384         (1*|2.0-6*)
19385                 cf_cxx_library=yes
19386                 ;;
19387         (*-2.7*|2.7*)
19388
19389 cf_cxx_library=unknown
19390 case $cf_cv_system_name in
19391 (os2*)
19392         cf_gpp_libname=gpp
19393         ;;
19394 (*)
19395         cf_gpp_libname=g++
19396         ;;
19397 esac
19398 if test "$GXX" = yes; then
19399         echo "$as_me:19399: checking for lib$cf_gpp_libname" >&5
19400 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19401         cf_save="$LIBS"
19402
19403 cf_add_libs="-l$cf_gpp_libname"
19404 # Filter out duplicates - this happens with badly-designed ".pc" files...
19405 for cf_add_1lib in $LIBS
19406 do
19407         for cf_add_2lib in $cf_add_libs
19408         do
19409                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19410                 then
19411                         cf_add_1lib=
19412                         break
19413                 fi
19414         done
19415         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19416 done
19417 LIBS="$cf_add_libs"
19418
19419         cat >conftest.$ac_ext <<_ACEOF
19420 #line 19420 "configure"
19421 #include "confdefs.h"
19422
19423 #include <$cf_gpp_libname/builtin.h>
19424
19425 int
19426 main ()
19427 {
19428 two_arg_error_handler_t foo2 = lib_error_handler
19429   ;
19430   return 0;
19431 }
19432 _ACEOF
19433 rm -f conftest.$ac_objext conftest$ac_exeext
19434 if { (eval echo "$as_me:19434: \"$ac_link\"") >&5
19435   (eval $ac_link) 2>&5
19436   ac_status=$?
19437   echo "$as_me:19437: \$? = $ac_status" >&5
19438   (exit $ac_status); } &&
19439          { ac_try='test -s conftest$ac_exeext'
19440   { (eval echo "$as_me:19440: \"$ac_try\"") >&5
19441   (eval $ac_try) 2>&5
19442   ac_status=$?
19443   echo "$as_me:19443: \$? = $ac_status" >&5
19444   (exit $ac_status); }; }; then
19445   cf_cxx_library=yes
19446
19447 cf_add_libs="-l$cf_gpp_libname"
19448 # Filter out duplicates - this happens with badly-designed ".pc" files...
19449 for cf_add_1lib in $CXXLIBS
19450 do
19451         for cf_add_2lib in $cf_add_libs
19452         do
19453                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19454                 then
19455                         cf_add_1lib=
19456                         break
19457                 fi
19458         done
19459         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19460 done
19461 CXXLIBS="$cf_add_libs"
19462
19463          if test "$cf_gpp_libname" = cpp ; then
19464
19465 cat >>confdefs.h <<\EOF
19466 #define HAVE_GPP_BUILTIN_H 1
19467 EOF
19468
19469          else
19470
19471 cat >>confdefs.h <<\EOF
19472 #define HAVE_GXX_BUILTIN_H 1
19473 EOF
19474
19475          fi
19476 else
19477   echo "$as_me: failed program was:" >&5
19478 cat conftest.$ac_ext >&5
19479 cat >conftest.$ac_ext <<_ACEOF
19480 #line 19480 "configure"
19481 #include "confdefs.h"
19482
19483 #include <builtin.h>
19484
19485 int
19486 main ()
19487 {
19488 two_arg_error_handler_t foo2 = lib_error_handler
19489   ;
19490   return 0;
19491 }
19492 _ACEOF
19493 rm -f conftest.$ac_objext conftest$ac_exeext
19494 if { (eval echo "$as_me:19494: \"$ac_link\"") >&5
19495   (eval $ac_link) 2>&5
19496   ac_status=$?
19497   echo "$as_me:19497: \$? = $ac_status" >&5
19498   (exit $ac_status); } &&
19499          { ac_try='test -s conftest$ac_exeext'
19500   { (eval echo "$as_me:19500: \"$ac_try\"") >&5
19501   (eval $ac_try) 2>&5
19502   ac_status=$?
19503   echo "$as_me:19503: \$? = $ac_status" >&5
19504   (exit $ac_status); }; }; then
19505   cf_cxx_library=yes
19506
19507 cf_add_libs="-l$cf_gpp_libname"
19508 # Filter out duplicates - this happens with badly-designed ".pc" files...
19509 for cf_add_1lib in $CXXLIBS
19510 do
19511         for cf_add_2lib in $cf_add_libs
19512         do
19513                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19514                 then
19515                         cf_add_1lib=
19516                         break
19517                 fi
19518         done
19519         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19520 done
19521 CXXLIBS="$cf_add_libs"
19522
19523 cat >>confdefs.h <<\EOF
19524 #define HAVE_BUILTIN_H 1
19525 EOF
19526
19527 else
19528   echo "$as_me: failed program was:" >&5
19529 cat conftest.$ac_ext >&5
19530 cf_cxx_library=no
19531 fi
19532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19533 fi
19534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19535         LIBS="$cf_save"
19536         echo "$as_me:19536: result: $cf_cxx_library" >&5
19537 echo "${ECHO_T}$cf_cxx_library" >&6
19538 fi
19539
19540                 ;;
19541         (*)
19542                 cf_cxx_library=no
19543                 ;;
19544         esac
19545
19546         ac_ext=cc
19547 ac_cpp='$CXXCPP $CPPFLAGS'
19548 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19549 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19550 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19551 ac_main_return=return
19552 echo "$as_me:19552: checking how to run the C++ preprocessor" >&5
19553 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19554 if test -z "$CXXCPP"; then
19555   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19556   echo $ECHO_N "(cached) $ECHO_C" >&6
19557 else
19558       # Double quotes because CXXCPP needs to be expanded
19559     for CXXCPP in "$CXX -E" "/lib/cpp"
19560     do
19561       ac_preproc_ok=false
19562 for ac_cxx_preproc_warn_flag in '' yes
19563 do
19564   # Use a header file that comes with gcc, so configuring glibc
19565   # with a fresh cross-compiler works.
19566   # On the NeXT, cc -E runs the code through the compiler's parser,
19567   # not just through cpp. "Syntax error" is here to catch this case.
19568   cat >conftest.$ac_ext <<_ACEOF
19569 #line 19569 "configure"
19570 #include "confdefs.h"
19571 #include <assert.h>
19572                      Syntax error
19573 _ACEOF
19574 if { (eval echo "$as_me:19574: \"$ac_cpp conftest.$ac_ext\"") >&5
19575   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19576   ac_status=$?
19577   egrep -v '^ *\+' conftest.er1 >conftest.err
19578   rm -f conftest.er1
19579   cat conftest.err >&5
19580   echo "$as_me:19580: \$? = $ac_status" >&5
19581   (exit $ac_status); } >/dev/null; then
19582   if test -s conftest.err; then
19583     ac_cpp_err=$ac_cxx_preproc_warn_flag
19584   else
19585     ac_cpp_err=
19586   fi
19587 else
19588   ac_cpp_err=yes
19589 fi
19590 if test -z "$ac_cpp_err"; then
19591   :
19592 else
19593   echo "$as_me: failed program was:" >&5
19594   cat conftest.$ac_ext >&5
19595   # Broken: fails on valid input.
19596 continue
19597 fi
19598 rm -f conftest.err conftest.$ac_ext
19599
19600   # OK, works on sane cases.  Now check whether non-existent headers
19601   # can be detected and how.
19602   cat >conftest.$ac_ext <<_ACEOF
19603 #line 19603 "configure"
19604 #include "confdefs.h"
19605 #include <ac_nonexistent.h>
19606 _ACEOF
19607 if { (eval echo "$as_me:19607: \"$ac_cpp conftest.$ac_ext\"") >&5
19608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19609   ac_status=$?
19610   egrep -v '^ *\+' conftest.er1 >conftest.err
19611   rm -f conftest.er1
19612   cat conftest.err >&5
19613   echo "$as_me:19613: \$? = $ac_status" >&5
19614   (exit $ac_status); } >/dev/null; then
19615   if test -s conftest.err; then
19616     ac_cpp_err=$ac_cxx_preproc_warn_flag
19617   else
19618     ac_cpp_err=
19619   fi
19620 else
19621   ac_cpp_err=yes
19622 fi
19623 if test -z "$ac_cpp_err"; then
19624   # Broken: success on invalid input.
19625 continue
19626 else
19627   echo "$as_me: failed program was:" >&5
19628   cat conftest.$ac_ext >&5
19629   # Passes both tests.
19630 ac_preproc_ok=:
19631 break
19632 fi
19633 rm -f conftest.err conftest.$ac_ext
19634
19635 done
19636 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19637 rm -f conftest.err conftest.$ac_ext
19638 if $ac_preproc_ok; then
19639   break
19640 fi
19641
19642     done
19643     ac_cv_prog_CXXCPP=$CXXCPP
19644
19645 fi
19646   CXXCPP=$ac_cv_prog_CXXCPP
19647 else
19648   ac_cv_prog_CXXCPP=$CXXCPP
19649 fi
19650 echo "$as_me:19650: result: $CXXCPP" >&5
19651 echo "${ECHO_T}$CXXCPP" >&6
19652 ac_preproc_ok=false
19653 for ac_cxx_preproc_warn_flag in '' yes
19654 do
19655   # Use a header file that comes with gcc, so configuring glibc
19656   # with a fresh cross-compiler works.
19657   # On the NeXT, cc -E runs the code through the compiler's parser,
19658   # not just through cpp. "Syntax error" is here to catch this case.
19659   cat >conftest.$ac_ext <<_ACEOF
19660 #line 19660 "configure"
19661 #include "confdefs.h"
19662 #include <assert.h>
19663                      Syntax error
19664 _ACEOF
19665 if { (eval echo "$as_me:19665: \"$ac_cpp conftest.$ac_ext\"") >&5
19666   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19667   ac_status=$?
19668   egrep -v '^ *\+' conftest.er1 >conftest.err
19669   rm -f conftest.er1
19670   cat conftest.err >&5
19671   echo "$as_me:19671: \$? = $ac_status" >&5
19672   (exit $ac_status); } >/dev/null; then
19673   if test -s conftest.err; then
19674     ac_cpp_err=$ac_cxx_preproc_warn_flag
19675   else
19676     ac_cpp_err=
19677   fi
19678 else
19679   ac_cpp_err=yes
19680 fi
19681 if test -z "$ac_cpp_err"; then
19682   :
19683 else
19684   echo "$as_me: failed program was:" >&5
19685   cat conftest.$ac_ext >&5
19686   # Broken: fails on valid input.
19687 continue
19688 fi
19689 rm -f conftest.err conftest.$ac_ext
19690
19691   # OK, works on sane cases.  Now check whether non-existent headers
19692   # can be detected and how.
19693   cat >conftest.$ac_ext <<_ACEOF
19694 #line 19694 "configure"
19695 #include "confdefs.h"
19696 #include <ac_nonexistent.h>
19697 _ACEOF
19698 if { (eval echo "$as_me:19698: \"$ac_cpp conftest.$ac_ext\"") >&5
19699   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19700   ac_status=$?
19701   egrep -v '^ *\+' conftest.er1 >conftest.err
19702   rm -f conftest.er1
19703   cat conftest.err >&5
19704   echo "$as_me:19704: \$? = $ac_status" >&5
19705   (exit $ac_status); } >/dev/null; then
19706   if test -s conftest.err; then
19707     ac_cpp_err=$ac_cxx_preproc_warn_flag
19708   else
19709     ac_cpp_err=
19710   fi
19711 else
19712   ac_cpp_err=yes
19713 fi
19714 if test -z "$ac_cpp_err"; then
19715   # Broken: success on invalid input.
19716 continue
19717 else
19718   echo "$as_me: failed program was:" >&5
19719   cat conftest.$ac_ext >&5
19720   # Passes both tests.
19721 ac_preproc_ok=:
19722 break
19723 fi
19724 rm -f conftest.err conftest.$ac_ext
19725
19726 done
19727 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19728 rm -f conftest.err conftest.$ac_ext
19729 if $ac_preproc_ok; then
19730   :
19731 else
19732   { { echo "$as_me:19732: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19733 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19734    { (exit 1); exit 1; }; }
19735 fi
19736
19737 ac_ext=cc
19738 ac_cpp='$CXXCPP $CPPFLAGS'
19739 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19740 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19741 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19742 ac_main_return=return
19743
19744 for ac_header in typeinfo
19745 do
19746 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19747 echo "$as_me:19747: checking for $ac_header" >&5
19748 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19750   echo $ECHO_N "(cached) $ECHO_C" >&6
19751 else
19752   cat >conftest.$ac_ext <<_ACEOF
19753 #line 19753 "configure"
19754 #include "confdefs.h"
19755 #include <$ac_header>
19756 _ACEOF
19757 if { (eval echo "$as_me:19757: \"$ac_cpp conftest.$ac_ext\"") >&5
19758   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19759   ac_status=$?
19760   egrep -v '^ *\+' conftest.er1 >conftest.err
19761   rm -f conftest.er1
19762   cat conftest.err >&5
19763   echo "$as_me:19763: \$? = $ac_status" >&5
19764   (exit $ac_status); } >/dev/null; then
19765   if test -s conftest.err; then
19766     ac_cpp_err=$ac_cxx_preproc_warn_flag
19767   else
19768     ac_cpp_err=
19769   fi
19770 else
19771   ac_cpp_err=yes
19772 fi
19773 if test -z "$ac_cpp_err"; then
19774   eval "$as_ac_Header=yes"
19775 else
19776   echo "$as_me: failed program was:" >&5
19777   cat conftest.$ac_ext >&5
19778   eval "$as_ac_Header=no"
19779 fi
19780 rm -f conftest.err conftest.$ac_ext
19781 fi
19782 echo "$as_me:19782: result: `eval echo '${'$as_ac_Header'}'`" >&5
19783 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19784 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19785   cat >>confdefs.h <<EOF
19786 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19787 EOF
19788
19789 fi
19790 done
19791
19792 for ac_header in iostream
19793 do
19794 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19795 echo "$as_me:19795: checking for $ac_header" >&5
19796 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19797 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19798   echo $ECHO_N "(cached) $ECHO_C" >&6
19799 else
19800   cat >conftest.$ac_ext <<_ACEOF
19801 #line 19801 "configure"
19802 #include "confdefs.h"
19803 #include <$ac_header>
19804 _ACEOF
19805 if { (eval echo "$as_me:19805: \"$ac_cpp conftest.$ac_ext\"") >&5
19806   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19807   ac_status=$?
19808   egrep -v '^ *\+' conftest.er1 >conftest.err
19809   rm -f conftest.er1
19810   cat conftest.err >&5
19811   echo "$as_me:19811: \$? = $ac_status" >&5
19812   (exit $ac_status); } >/dev/null; then
19813   if test -s conftest.err; then
19814     ac_cpp_err=$ac_cxx_preproc_warn_flag
19815   else
19816     ac_cpp_err=
19817   fi
19818 else
19819   ac_cpp_err=yes
19820 fi
19821 if test -z "$ac_cpp_err"; then
19822   eval "$as_ac_Header=yes"
19823 else
19824   echo "$as_me: failed program was:" >&5
19825   cat conftest.$ac_ext >&5
19826   eval "$as_ac_Header=no"
19827 fi
19828 rm -f conftest.err conftest.$ac_ext
19829 fi
19830 echo "$as_me:19830: result: `eval echo '${'$as_ac_Header'}'`" >&5
19831 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19832 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19833   cat >>confdefs.h <<EOF
19834 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19835 EOF
19836
19837 fi
19838 done
19839
19840 if test x"$ac_cv_header_iostream" = xyes ; then
19841         echo "$as_me:19841: checking if iostream uses std-namespace" >&5
19842 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19843         cat >conftest.$ac_ext <<_ACEOF
19844 #line 19844 "configure"
19845 #include "confdefs.h"
19846
19847 #include <iostream>
19848 using std::endl;
19849 using std::cerr;
19850 int
19851 main ()
19852 {
19853
19854 cerr << "testing" << endl;
19855
19856   ;
19857   return 0;
19858 }
19859 _ACEOF
19860 rm -f conftest.$ac_objext
19861 if { (eval echo "$as_me:19861: \"$ac_compile\"") >&5
19862   (eval $ac_compile) 2>&5
19863   ac_status=$?
19864   echo "$as_me:19864: \$? = $ac_status" >&5
19865   (exit $ac_status); } &&
19866          { ac_try='test -s conftest.$ac_objext'
19867   { (eval echo "$as_me:19867: \"$ac_try\"") >&5
19868   (eval $ac_try) 2>&5
19869   ac_status=$?
19870   echo "$as_me:19870: \$? = $ac_status" >&5
19871   (exit $ac_status); }; }; then
19872   cf_iostream_namespace=yes
19873 else
19874   echo "$as_me: failed program was:" >&5
19875 cat conftest.$ac_ext >&5
19876 cf_iostream_namespace=no
19877 fi
19878 rm -f conftest.$ac_objext conftest.$ac_ext
19879         echo "$as_me:19879: result: $cf_iostream_namespace" >&5
19880 echo "${ECHO_T}$cf_iostream_namespace" >&6
19881         if test "$cf_iostream_namespace" = yes ; then
19882
19883 cat >>confdefs.h <<\EOF
19884 #define IOSTREAM_NAMESPACE 1
19885 EOF
19886
19887         fi
19888 fi
19889
19890 echo "$as_me:19890: checking if we should include stdbool.h" >&5
19891 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19892
19893 if test "${cf_cv_header_stdbool_h+set}" = set; then
19894   echo $ECHO_N "(cached) $ECHO_C" >&6
19895 else
19896
19897         cat >conftest.$ac_ext <<_ACEOF
19898 #line 19898 "configure"
19899 #include "confdefs.h"
19900
19901 int
19902 main ()
19903 {
19904 bool foo = false
19905   ;
19906   return 0;
19907 }
19908 _ACEOF
19909 rm -f conftest.$ac_objext
19910 if { (eval echo "$as_me:19910: \"$ac_compile\"") >&5
19911   (eval $ac_compile) 2>&5
19912   ac_status=$?
19913   echo "$as_me:19913: \$? = $ac_status" >&5
19914   (exit $ac_status); } &&
19915          { ac_try='test -s conftest.$ac_objext'
19916   { (eval echo "$as_me:19916: \"$ac_try\"") >&5
19917   (eval $ac_try) 2>&5
19918   ac_status=$?
19919   echo "$as_me:19919: \$? = $ac_status" >&5
19920   (exit $ac_status); }; }; then
19921   cf_cv_header_stdbool_h=0
19922 else
19923   echo "$as_me: failed program was:" >&5
19924 cat conftest.$ac_ext >&5
19925 cat >conftest.$ac_ext <<_ACEOF
19926 #line 19926 "configure"
19927 #include "confdefs.h"
19928
19929 #ifndef __BEOS__
19930 #include <stdbool.h>
19931 #endif
19932
19933 int
19934 main ()
19935 {
19936 bool foo = false
19937   ;
19938   return 0;
19939 }
19940 _ACEOF
19941 rm -f conftest.$ac_objext
19942 if { (eval echo "$as_me:19942: \"$ac_compile\"") >&5
19943   (eval $ac_compile) 2>&5
19944   ac_status=$?
19945   echo "$as_me:19945: \$? = $ac_status" >&5
19946   (exit $ac_status); } &&
19947          { ac_try='test -s conftest.$ac_objext'
19948   { (eval echo "$as_me:19948: \"$ac_try\"") >&5
19949   (eval $ac_try) 2>&5
19950   ac_status=$?
19951   echo "$as_me:19951: \$? = $ac_status" >&5
19952   (exit $ac_status); }; }; then
19953   cf_cv_header_stdbool_h=1
19954 else
19955   echo "$as_me: failed program was:" >&5
19956 cat conftest.$ac_ext >&5
19957 cf_cv_header_stdbool_h=0
19958 fi
19959 rm -f conftest.$ac_objext conftest.$ac_ext
19960 fi
19961 rm -f conftest.$ac_objext conftest.$ac_ext
19962 fi
19963
19964 if test "$cf_cv_header_stdbool_h" = 1
19965 then    echo "$as_me:19965: result: yes" >&5
19966 echo "${ECHO_T}yes" >&6
19967 else    echo "$as_me:19967: result: no" >&5
19968 echo "${ECHO_T}no" >&6
19969 fi
19970
19971 echo "$as_me:19971: checking for builtin bool type" >&5
19972 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19973
19974 if test "${cf_cv_builtin_bool+set}" = set; then
19975   echo $ECHO_N "(cached) $ECHO_C" >&6
19976 else
19977
19978         cat >conftest.$ac_ext <<_ACEOF
19979 #line 19979 "configure"
19980 #include "confdefs.h"
19981
19982 #include <stdio.h>
19983 #include <sys/types.h>
19984
19985 int
19986 main ()
19987 {
19988 bool x = false
19989   ;
19990   return 0;
19991 }
19992 _ACEOF
19993 rm -f conftest.$ac_objext
19994 if { (eval echo "$as_me:19994: \"$ac_compile\"") >&5
19995   (eval $ac_compile) 2>&5
19996   ac_status=$?
19997   echo "$as_me:19997: \$? = $ac_status" >&5
19998   (exit $ac_status); } &&
19999          { ac_try='test -s conftest.$ac_objext'
20000   { (eval echo "$as_me:20000: \"$ac_try\"") >&5
20001   (eval $ac_try) 2>&5
20002   ac_status=$?
20003   echo "$as_me:20003: \$? = $ac_status" >&5
20004   (exit $ac_status); }; }; then
20005   cf_cv_builtin_bool=1
20006 else
20007   echo "$as_me: failed program was:" >&5
20008 cat conftest.$ac_ext >&5
20009 cf_cv_builtin_bool=0
20010 fi
20011 rm -f conftest.$ac_objext conftest.$ac_ext
20012
20013 fi
20014
20015 if test "$cf_cv_builtin_bool" = 1
20016 then    echo "$as_me:20016: result: yes" >&5
20017 echo "${ECHO_T}yes" >&6
20018 else    echo "$as_me:20018: result: no" >&5
20019 echo "${ECHO_T}no" >&6
20020 fi
20021
20022 echo "$as_me:20022: checking for size of bool" >&5
20023 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20024 if test "${cf_cv_type_of_bool+set}" = set; then
20025   echo $ECHO_N "(cached) $ECHO_C" >&6
20026 else
20027
20028         rm -f cf_test.out
20029         if test "$cross_compiling" = yes; then
20030   cf_cv_type_of_bool=unknown
20031 else
20032   cat >conftest.$ac_ext <<_ACEOF
20033 #line 20033 "configure"
20034 #include "confdefs.h"
20035
20036 #include <stdlib.h>
20037 #include <stdio.h>
20038
20039 #if defined(__cplusplus)
20040
20041 #ifdef HAVE_GXX_BUILTIN_H
20042 #include <g++/builtin.h>
20043 #elif HAVE_GPP_BUILTIN_H
20044 #include <gpp/builtin.h>
20045 #elif HAVE_BUILTIN_H
20046 #include <builtin.h>
20047 #endif
20048
20049 #else
20050
20051 #if $cf_cv_header_stdbool_h
20052 #include <stdbool.h>
20053 #endif
20054
20055 #endif
20056
20057 int main()
20058 {
20059         FILE *fp = fopen("cf_test.out", "w");
20060         if (fp != 0) {
20061                 bool x = true;
20062                 if ((bool)(-x) >= 0)
20063                         fputs("unsigned ", fp);
20064                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20065                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20066                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20067                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20068                 fclose(fp);
20069         }
20070         ${cf_cv_main_return:-return}(0);
20071 }
20072
20073 _ACEOF
20074 rm -f conftest$ac_exeext
20075 if { (eval echo "$as_me:20075: \"$ac_link\"") >&5
20076   (eval $ac_link) 2>&5
20077   ac_status=$?
20078   echo "$as_me:20078: \$? = $ac_status" >&5
20079   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20080   { (eval echo "$as_me:20080: \"$ac_try\"") >&5
20081   (eval $ac_try) 2>&5
20082   ac_status=$?
20083   echo "$as_me:20083: \$? = $ac_status" >&5
20084   (exit $ac_status); }; }; then
20085   cf_cv_type_of_bool=`cat cf_test.out`
20086                  if test -z "$cf_cv_type_of_bool"; then
20087                    cf_cv_type_of_bool=unknown
20088                  fi
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_type_of_bool=unknown
20094 fi
20095 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20096 fi
20097
20098 fi
20099
20100         rm -f cf_test.out
20101 echo "$as_me:20101: result: $cf_cv_type_of_bool" >&5
20102 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20103 if test "$cf_cv_type_of_bool" = unknown ; then
20104         case .$NCURSES_BOOL in
20105         (.auto|.) NCURSES_BOOL=unsigned;;
20106         esac
20107         { echo "$as_me:20107: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20108 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20109         cf_cv_type_of_bool=$NCURSES_BOOL
20110 fi
20111
20112 echo "$as_me:20112: checking for special defines needed for etip.h" >&5
20113 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20114 cf_save_CXXFLAGS="$CXXFLAGS"
20115 cf_result="none"
20116
20117 # etip.h includes ncurses.h which includes ncurses_dll.h
20118 # But ncurses_dll.h is generated - fix here.
20119 test -d include || mkdir include
20120 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
20121
20122 for cf_math in "" MATH_H
20123 do
20124 for cf_excp in "" MATH_EXCEPTION
20125 do
20126         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20127         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20128         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20129 cat >conftest.$ac_ext <<_ACEOF
20130 #line 20130 "configure"
20131 #include "confdefs.h"
20132
20133 #include <etip.h.in>
20134
20135 int
20136 main ()
20137 {
20138
20139   ;
20140   return 0;
20141 }
20142 _ACEOF
20143 rm -f conftest.$ac_objext
20144 if { (eval echo "$as_me:20144: \"$ac_compile\"") >&5
20145   (eval $ac_compile) 2>&5
20146   ac_status=$?
20147   echo "$as_me:20147: \$? = $ac_status" >&5
20148   (exit $ac_status); } &&
20149          { ac_try='test -s conftest.$ac_objext'
20150   { (eval echo "$as_me:20150: \"$ac_try\"") >&5
20151   (eval $ac_try) 2>&5
20152   ac_status=$?
20153   echo "$as_me:20153: \$? = $ac_status" >&5
20154   (exit $ac_status); }; }; then
20155
20156         test -n "$cf_math" && cat >>confdefs.h <<EOF
20157 #define ETIP_NEEDS_${cf_math} 1
20158 EOF
20159
20160         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20161 #define ETIP_NEEDS_${cf_excp} 1
20162 EOF
20163
20164         cf_result="$cf_math $cf_excp"
20165         break 2
20166
20167 else
20168   echo "$as_me: failed program was:" >&5
20169 cat conftest.$ac_ext >&5
20170 fi
20171 rm -f conftest.$ac_objext conftest.$ac_ext
20172 done
20173 done
20174 echo "$as_me:20174: result: $cf_result" >&5
20175 echo "${ECHO_T}$cf_result" >&6
20176 CXXFLAGS="$cf_save_CXXFLAGS"
20177
20178 if test -n "$CXX"; then
20179 echo "$as_me:20179: checking if $CXX accepts parameter initialization" >&5
20180 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20181 if test "${cf_cv_cpp_param_init+set}" = set; then
20182   echo $ECHO_N "(cached) $ECHO_C" >&6
20183 else
20184
20185         ac_ext=cc
20186 ac_cpp='$CXXCPP $CPPFLAGS'
20187 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20188 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20189 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20190 ac_main_return=return
20191
20192         if test "$cross_compiling" = yes; then
20193   cf_cv_cpp_param_init=unknown
20194 else
20195   cat >conftest.$ac_ext <<_ACEOF
20196 #line 20196 "configure"
20197 #include "confdefs.h"
20198
20199 class TEST {
20200 private:
20201         int value;
20202 public:
20203         TEST(int x = 1);
20204         ~TEST();
20205 };
20206
20207 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20208 {
20209         value = x;
20210 }
20211 int main() { }
20212
20213 _ACEOF
20214 rm -f conftest$ac_exeext
20215 if { (eval echo "$as_me:20215: \"$ac_link\"") >&5
20216   (eval $ac_link) 2>&5
20217   ac_status=$?
20218   echo "$as_me:20218: \$? = $ac_status" >&5
20219   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20220   { (eval echo "$as_me:20220: \"$ac_try\"") >&5
20221   (eval $ac_try) 2>&5
20222   ac_status=$?
20223   echo "$as_me:20223: \$? = $ac_status" >&5
20224   (exit $ac_status); }; }; then
20225   cf_cv_cpp_param_init=yes
20226 else
20227   echo "$as_me: program exited with status $ac_status" >&5
20228 echo "$as_me: failed program was:" >&5
20229 cat conftest.$ac_ext >&5
20230 cf_cv_cpp_param_init=no
20231 fi
20232 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20233 fi
20234         ac_ext=cc
20235 ac_cpp='$CXXCPP $CPPFLAGS'
20236 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20237 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20238 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20239 ac_main_return=return
20240
20241 fi
20242 echo "$as_me:20242: result: $cf_cv_cpp_param_init" >&5
20243 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20244 fi
20245 test "$cf_cv_cpp_param_init" = yes &&
20246 cat >>confdefs.h <<\EOF
20247 #define CPP_HAS_PARAM_INIT 1
20248 EOF
20249
20250 if test -n "$CXX"; then
20251
20252 echo "$as_me:20252: checking if $CXX accepts static_cast" >&5
20253 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20254 if test "${cf_cv_cpp_static_cast+set}" = set; then
20255   echo $ECHO_N "(cached) $ECHO_C" >&6
20256 else
20257
20258         ac_ext=cc
20259 ac_cpp='$CXXCPP $CPPFLAGS'
20260 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20261 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20262 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20263 ac_main_return=return
20264
20265         cat >conftest.$ac_ext <<_ACEOF
20266 #line 20266 "configure"
20267 #include "confdefs.h"
20268
20269 class NCursesPanel
20270 {
20271 public:
20272   NCursesPanel(int nlines,
20273                int ncols,
20274                int begin_y = 0,
20275                int begin_x = 0)
20276   {
20277   }
20278   NCursesPanel();
20279   ~NCursesPanel();
20280 };
20281
20282 template<class T> class NCursesUserPanel : public NCursesPanel
20283 {
20284 public:
20285   NCursesUserPanel (int nlines,
20286                     int ncols,
20287                     int begin_y = 0,
20288                     int begin_x = 0,
20289                     const T* p_UserData = static_cast<T*>(0))
20290     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20291   {
20292   };
20293   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20294   {
20295   };
20296
20297   virtual ~NCursesUserPanel() {};
20298 };
20299
20300 int
20301 main ()
20302 {
20303
20304         const char* p_UserData = static_cast<char*>(0)
20305   ;
20306   return 0;
20307 }
20308 _ACEOF
20309 rm -f conftest.$ac_objext
20310 if { (eval echo "$as_me:20310: \"$ac_compile\"") >&5
20311   (eval $ac_compile) 2>&5
20312   ac_status=$?
20313   echo "$as_me:20313: \$? = $ac_status" >&5
20314   (exit $ac_status); } &&
20315          { ac_try='test -s conftest.$ac_objext'
20316   { (eval echo "$as_me:20316: \"$ac_try\"") >&5
20317   (eval $ac_try) 2>&5
20318   ac_status=$?
20319   echo "$as_me:20319: \$? = $ac_status" >&5
20320   (exit $ac_status); }; }; then
20321   cf_cv_cpp_static_cast=yes
20322 else
20323   echo "$as_me: failed program was:" >&5
20324 cat conftest.$ac_ext >&5
20325 cf_cv_cpp_static_cast=no
20326 fi
20327 rm -f conftest.$ac_objext conftest.$ac_ext
20328
20329         ac_ext=cc
20330 ac_cpp='$CXXCPP $CPPFLAGS'
20331 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20332 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20333 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20334 ac_main_return=return
20335
20336 fi
20337 echo "$as_me:20337: result: $cf_cv_cpp_static_cast" >&5
20338 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20339
20340 fi
20341
20342 test "$cf_cv_cpp_static_cast" = yes &&
20343 cat >>confdefs.h <<\EOF
20344 #define CPP_HAS_STATIC_CAST 1
20345 EOF
20346
20347         CXX_AR='$(AR)'
20348         CXX_ARFLAGS='$(ARFLAGS)'
20349         case $cf_cv_system_name in
20350         (irix*)
20351             if test "$GXX" != yes ; then
20352                 CXX_AR='$(CXX)'
20353                 CXX_ARFLAGS='-ar -o'
20354             fi
20355             ;;
20356         (sco3.2v5*)
20357             CXXLDFLAGS="-u main"
20358             ;;
20359         (solaris2*)
20360             if test "$GXX" != yes ; then
20361                 CXX_AR='$(CXX)'
20362                 CXX_ARFLAGS='-xar -o'
20363             fi
20364             ;;
20365         esac
20366
20367 else
20368         cf_cxx_library=no
20369         cf_cv_builtin_bool=1
20370
20371         # Just because we are not configuring against C++ right now does not
20372         # mean that a user will not want to use C++.  Some distributors disable
20373         # the C++ portion of this configuration as a shortcut (or just to avoid
20374         # compiling the demo in the c++ directory).  So we need a reasonable
20375         # default for the 'bool' type.
20376         #
20377         # Caveat: since the storage of the bool type is not standardized, it
20378         # may change.
20379
20380         if test "$NCURSES_BOOL" != auto ; then
20381                 cf_cv_type_of_bool=$NCURSES_BOOL
20382                 cf_cv_header_stdbool_h=0
20383         else
20384                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20385
20386 echo "$as_me:20386: checking for size of bool" >&5
20387 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20388 if test "${cf_cv_type_of_bool+set}" = set; then
20389   echo $ECHO_N "(cached) $ECHO_C" >&6
20390 else
20391
20392         rm -f cf_test.out
20393         if test "$cross_compiling" = yes; then
20394   cf_cv_type_of_bool=unknown
20395 else
20396   cat >conftest.$ac_ext <<_ACEOF
20397 #line 20397 "configure"
20398 #include "confdefs.h"
20399
20400 #include <stdlib.h>
20401 #include <stdio.h>
20402
20403 #if defined(__cplusplus)
20404
20405 #ifdef HAVE_GXX_BUILTIN_H
20406 #include <g++/builtin.h>
20407 #elif HAVE_GPP_BUILTIN_H
20408 #include <gpp/builtin.h>
20409 #elif HAVE_BUILTIN_H
20410 #include <builtin.h>
20411 #endif
20412
20413 #else
20414
20415 #if $cf_cv_header_stdbool_h
20416 #include <stdbool.h>
20417 #endif
20418
20419 #endif
20420
20421 int main()
20422 {
20423         FILE *fp = fopen("cf_test.out", "w");
20424         if (fp != 0) {
20425                 bool x = true;
20426                 if ((bool)(-x) >= 0)
20427                         fputs("unsigned ", fp);
20428                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20429                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20430                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20431                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20432                 fclose(fp);
20433         }
20434         ${cf_cv_main_return:-return}(0);
20435 }
20436
20437 _ACEOF
20438 rm -f conftest$ac_exeext
20439 if { (eval echo "$as_me:20439: \"$ac_link\"") >&5
20440   (eval $ac_link) 2>&5
20441   ac_status=$?
20442   echo "$as_me:20442: \$? = $ac_status" >&5
20443   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20444   { (eval echo "$as_me:20444: \"$ac_try\"") >&5
20445   (eval $ac_try) 2>&5
20446   ac_status=$?
20447   echo "$as_me:20447: \$? = $ac_status" >&5
20448   (exit $ac_status); }; }; then
20449   cf_cv_type_of_bool=`cat cf_test.out`
20450                  if test -z "$cf_cv_type_of_bool"; then
20451                    cf_cv_type_of_bool=unknown
20452                  fi
20453 else
20454   echo "$as_me: program exited with status $ac_status" >&5
20455 echo "$as_me: failed program was:" >&5
20456 cat conftest.$ac_ext >&5
20457 cf_cv_type_of_bool=unknown
20458 fi
20459 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20460 fi
20461
20462 fi
20463
20464         rm -f cf_test.out
20465 echo "$as_me:20465: result: $cf_cv_type_of_bool" >&5
20466 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20467 if test "$cf_cv_type_of_bool" = unknown ; then
20468         case .$NCURSES_BOOL in
20469         (.auto|.) NCURSES_BOOL=unsigned;;
20470         esac
20471         { echo "$as_me:20471: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20472 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20473         cf_cv_type_of_bool=$NCURSES_BOOL
20474 fi
20475
20476                 else
20477                         echo "$as_me:20477: checking for fallback type of bool" >&5
20478 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20479                         case "$host_cpu" in
20480                         (i?86)  cf_cv_type_of_bool=char ;;
20481                         (*)     cf_cv_type_of_bool=int  ;;
20482                         esac
20483                         echo "$as_me:20483: result: $cf_cv_type_of_bool" >&5
20484 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20485                 fi
20486         fi
20487 fi
20488
20489 # If the C compiler did not declare bool, and we did not determine that the C++
20490 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20491 # ncurses library use the same type as C++ bool.  Note that this allows one to
20492 # specify the type of bool in a configure-script option and postpone
20493 # integration with the C++ compiler provided that the types are compatible.
20494 USE_CXX_BOOL=1
20495 if test $cf_cv_cc_bool_type = 1
20496 then
20497         # oops: C has a bool.  Unlikely, but C++ could differ.
20498         USE_CXX_BOOL=0
20499 elif test $cf_cv_builtin_bool = 0
20500 then
20501         # C++ has no bool
20502         USE_CXX_BOOL=0
20503 else
20504         # this is the normal case
20505         USE_CXX_BOOL='defined(__cplusplus)'
20506 fi
20507
20508 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20509
20510         if test "$cf_with_ada" != "no" ; then
20511                 if test "$with_libtool" != "no"; then
20512                         { echo "$as_me:20512: WARNING: libtool does not support Ada - disabling feature" >&5
20513 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20514                         cf_with_ada=no
20515                 fi
20516         fi
20517
20518         if test "$cf_with_ada" != "no" ; then
20519
20520 cf_ada_make=gnatmake
20521 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20522 set dummy $cf_ada_make; ac_word=$2
20523 echo "$as_me:20523: checking for $ac_word" >&5
20524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20525 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20526   echo $ECHO_N "(cached) $ECHO_C" >&6
20527 else
20528   if test -n "$gnat_exists"; then
20529   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20530 else
20531   ac_save_IFS=$IFS; IFS=$ac_path_separator
20532 ac_dummy="$PATH"
20533 for ac_dir in $ac_dummy; do
20534   IFS=$ac_save_IFS
20535   test -z "$ac_dir" && ac_dir=.
20536   $as_executable_p "$ac_dir/$ac_word" || continue
20537 ac_cv_prog_gnat_exists="yes"
20538 echo "$as_me:20538: found $ac_dir/$ac_word" >&5
20539 break
20540 done
20541
20542   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20543 fi
20544 fi
20545 gnat_exists=$ac_cv_prog_gnat_exists
20546 if test -n "$gnat_exists"; then
20547   echo "$as_me:20547: result: $gnat_exists" >&5
20548 echo "${ECHO_T}$gnat_exists" >&6
20549 else
20550   echo "$as_me:20550: result: no" >&5
20551 echo "${ECHO_T}no" >&6
20552 fi
20553
20554 if test "$ac_cv_prog_gnat_exists" = no; then
20555         cf_ada_make=
20556         cf_cv_prog_gnat_correct=no
20557 else
20558
20559 echo "$as_me:20559: checking for gnat version" >&5
20560 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20561 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20562         grep '[0-9].[0-9][0-9]*' |\
20563         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20564 echo "$as_me:20564: result: $cf_gnat_version" >&5
20565 echo "${ECHO_T}$cf_gnat_version" >&6
20566
20567 case $cf_gnat_version in
20568 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20569         cf_cv_prog_gnat_correct=yes
20570         ;;
20571 (*)
20572         { echo "$as_me:20572: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20573 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20574         cf_cv_prog_gnat_correct=no
20575         ;;
20576 esac
20577
20578         # Extract the first word of "m4", so it can be a program name with args.
20579 set dummy m4; ac_word=$2
20580 echo "$as_me:20580: checking for $ac_word" >&5
20581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20582 if test "${ac_cv_prog_M4_exists+set}" = set; then
20583   echo $ECHO_N "(cached) $ECHO_C" >&6
20584 else
20585   if test -n "$M4_exists"; then
20586   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20587 else
20588   ac_save_IFS=$IFS; IFS=$ac_path_separator
20589 ac_dummy="$PATH"
20590 for ac_dir in $ac_dummy; do
20591   IFS=$ac_save_IFS
20592   test -z "$ac_dir" && ac_dir=.
20593   $as_executable_p "$ac_dir/$ac_word" || continue
20594 ac_cv_prog_M4_exists="yes"
20595 echo "$as_me:20595: found $ac_dir/$ac_word" >&5
20596 break
20597 done
20598
20599   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20600 fi
20601 fi
20602 M4_exists=$ac_cv_prog_M4_exists
20603 if test -n "$M4_exists"; then
20604   echo "$as_me:20604: result: $M4_exists" >&5
20605 echo "${ECHO_T}$M4_exists" >&6
20606 else
20607   echo "$as_me:20607: result: no" >&5
20608 echo "${ECHO_T}no" >&6
20609 fi
20610
20611         if test "$ac_cv_prog_M4_exists" = no; then
20612                 cf_cv_prog_gnat_correct=no
20613                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20614         fi
20615         if test "$cf_cv_prog_gnat_correct" = yes; then
20616                 echo "$as_me:20616: checking if GNAT works" >&5
20617 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20618
20619 rm -rf conftest* *~conftest*
20620 cat >>conftest.ads <<CF_EOF
20621 procedure conftest;
20622 CF_EOF
20623 cat >>conftest.adb <<CF_EOF
20624 with Text_IO;
20625 with GNAT.OS_Lib;
20626 procedure conftest is
20627 begin
20628    Text_IO.Put ("Hello World");
20629    Text_IO.New_Line;
20630    GNAT.OS_Lib.OS_Exit (0);
20631 end conftest;
20632 CF_EOF
20633 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20634    if ( ./conftest 1>&5 2>&1 ) ; then
20635       cf_cv_prog_gnat_correct=yes
20636    else
20637       cf_cv_prog_gnat_correct=no
20638    fi
20639 else
20640    cf_cv_prog_gnat_correct=no
20641 fi
20642 rm -rf conftest* *~conftest*
20643
20644                 echo "$as_me:20644: result: $cf_cv_prog_gnat_correct" >&5
20645 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20646         fi
20647 fi
20648
20649                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20650
20651         ADAFLAGS="$ADAFLAGS -gnatpn"
20652
20653         echo "$as_me:20653: checking optimization options for ADAFLAGS" >&5
20654 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20655         case "$CFLAGS" in
20656         (*-g*)
20657
20658         ADAFLAGS="$ADAFLAGS -g"
20659
20660                 ;;
20661         esac
20662         case "$CFLAGS" in
20663         (*-O*)
20664                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20665
20666         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20667
20668                 ;;
20669         esac
20670         echo "$as_me:20670: result: $ADAFLAGS" >&5
20671 echo "${ECHO_T}$ADAFLAGS" >&6
20672
20673 echo "$as_me:20673: checking if GNATPREP supports -T option" >&5
20674 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20675 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20676   echo $ECHO_N "(cached) $ECHO_C" >&6
20677 else
20678
20679 cf_cv_gnatprep_opt_t=no
20680 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20681
20682 fi
20683 echo "$as_me:20683: result: $cf_cv_gnatprep_opt_t" >&5
20684 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20685 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20686
20687 echo "$as_me:20687: checking if GNAT supports generics" >&5
20688 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20689 case $cf_gnat_version in
20690 (3.[1-9]*|[4-9].*)
20691         cf_gnat_generics=yes
20692         ;;
20693 (*)
20694         cf_gnat_generics=no
20695         ;;
20696 esac
20697 echo "$as_me:20697: result: $cf_gnat_generics" >&5
20698 echo "${ECHO_T}$cf_gnat_generics" >&6
20699
20700 if test "$cf_gnat_generics" = yes
20701 then
20702         cf_compile_generics=generics
20703         cf_generic_objects="\${GENOBJS}"
20704 else
20705         cf_compile_generics=
20706         cf_generic_objects=
20707 fi
20708
20709 echo "$as_me:20709: checking if GNAT supports SIGINT" >&5
20710 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20711 if test "${cf_cv_gnat_sigint+set}" = set; then
20712   echo $ECHO_N "(cached) $ECHO_C" >&6
20713 else
20714
20715 rm -rf conftest* *~conftest*
20716 cat >>conftest.ads <<CF_EOF
20717 with Ada.Interrupts.Names;
20718
20719 package ConfTest is
20720
20721    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20722    pragma Unreserve_All_Interrupts;
20723    pragma Warnings (On);
20724
20725    protected Process is
20726       procedure Stop;
20727       function Continue return Boolean;
20728       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20729    private
20730       Done : Boolean := False;
20731    end Process;
20732
20733 end ConfTest;
20734 CF_EOF
20735 cat >>conftest.adb <<CF_EOF
20736 package body ConfTest is
20737    protected body Process is
20738       procedure Stop is
20739       begin
20740          Done := True;
20741       end Stop;
20742       function Continue return Boolean is
20743       begin
20744          return not Done;
20745       end Continue;
20746    end Process;
20747 end ConfTest;
20748 CF_EOF
20749 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20750       cf_cv_gnat_sigint=yes
20751 else
20752    cf_cv_gnat_sigint=no
20753 fi
20754 rm -rf conftest* *~conftest*
20755
20756 fi
20757 echo "$as_me:20757: result: $cf_cv_gnat_sigint" >&5
20758 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20759
20760 if test $cf_cv_gnat_sigint = yes ; then
20761         USE_GNAT_SIGINT=""
20762 else
20763         USE_GNAT_SIGINT="#"
20764 fi
20765
20766 cf_gnat_libraries=no
20767 cf_gnat_projects=no
20768
20769 if test "$enable_gnat_projects" != no ; then
20770 echo "$as_me:20770: checking if GNAT supports project files" >&5
20771 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20772 case $cf_gnat_version in
20773 (3.[0-9]*)
20774         ;;
20775 (*)
20776         case $cf_cv_system_name in
20777         (cygwin*|msys*)
20778                 ;;
20779         (*)
20780                 mkdir conftest.src conftest.bin conftest.lib
20781                 cd conftest.src
20782                 rm -rf conftest* *~conftest*
20783                 cat >>library.gpr <<CF_EOF
20784 project Library is
20785   Kind := External ("LIB_KIND");
20786   for Library_Name use "ConfTest";
20787   for Object_Dir use ".";
20788   for Library_ALI_Dir use External("LIBRARY_DIR");
20789   for Library_Version use External ("SONAME");
20790   for Library_Kind use Kind;
20791   for Library_Dir use External("BUILD_DIR");
20792   Source_Dir := External ("SOURCE_DIR");
20793   for Source_Dirs use (Source_Dir);
20794 end Library;
20795 CF_EOF
20796                 cat >>confpackage.ads <<CF_EOF
20797 package ConfPackage is
20798    procedure conftest;
20799 end ConfPackage;
20800 CF_EOF
20801                 cat >>confpackage.adb <<CF_EOF
20802 with Text_IO;
20803 package body ConfPackage is
20804    procedure conftest is
20805    begin
20806       Text_IO.Put ("Hello World");
20807       Text_IO.New_Line;
20808    end conftest;
20809 end ConfPackage;
20810 CF_EOF
20811                 if ( $cf_ada_make $ADAFLAGS \
20812                                 -Plibrary.gpr \
20813                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20814                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20815                                 -XSOURCE_DIR=`pwd` \
20816                                 -XSONAME=libConfTest.so.1 \
20817                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20818                         cf_gnat_projects=yes
20819                 fi
20820                 cd ..
20821                 if test -f conftest.lib/confpackage.ali
20822                 then
20823                         cf_gnat_libraries=yes
20824                 fi
20825                 rm -rf conftest* *~conftest*
20826                 ;;
20827         esac
20828         ;;
20829 esac
20830 echo "$as_me:20830: result: $cf_gnat_projects" >&5
20831 echo "${ECHO_T}$cf_gnat_projects" >&6
20832 fi # enable_gnat_projects
20833
20834 if test $cf_gnat_projects = yes
20835 then
20836         echo "$as_me:20836: checking if GNAT supports libraries" >&5
20837 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20838         echo "$as_me:20838: result: $cf_gnat_libraries" >&5
20839 echo "${ECHO_T}$cf_gnat_libraries" >&6
20840 fi
20841
20842 if test "$cf_gnat_projects" = yes
20843 then
20844         USE_OLD_MAKERULES="#"
20845         USE_GNAT_PROJECTS=""
20846 else
20847         USE_OLD_MAKERULES=""
20848         USE_GNAT_PROJECTS="#"
20849 fi
20850
20851 if test "$cf_gnat_libraries" = yes
20852 then
20853         USE_GNAT_LIBRARIES=""
20854 else
20855         USE_GNAT_LIBRARIES="#"
20856 fi
20857
20858 echo "$as_me:20858: checking for ada-compiler" >&5
20859 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20860
20861 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20862 if test "${with_ada_compiler+set}" = set; then
20863   withval="$with_ada_compiler"
20864   cf_ada_compiler=$withval
20865 else
20866   cf_ada_compiler=gnatmake
20867 fi;
20868
20869 echo "$as_me:20869: result: $cf_ada_compiler" >&5
20870 echo "${ECHO_T}$cf_ada_compiler" >&6
20871
20872                         cf_ada_package=terminal_interface
20873
20874 echo "$as_me:20874: checking for ada-include" >&5
20875 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20876
20877 # Check whether --with-ada-include or --without-ada-include was given.
20878 if test "${with_ada_include+set}" = set; then
20879   withval="$with_ada_include"
20880
20881 else
20882   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20883 fi; if test -n "$prefix/share/ada/adainclude" ; then
20884
20885 if test "x$prefix" != xNONE; then
20886         cf_path_syntax="$prefix"
20887 else
20888         cf_path_syntax="$ac_default_prefix"
20889 fi
20890
20891 case ".$withval" in
20892 (.\$\(*\)*|.\'*\'*)
20893         ;;
20894 (..|./*|.\\*)
20895         ;;
20896 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
20897         ;;
20898 (.\${*prefix}*|.\${*dir}*)
20899         eval withval="$withval"
20900         case ".$withval" in
20901         (.NONE/*)
20902                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20903                 ;;
20904         esac
20905         ;;
20906 (.no|.NONE/*)
20907         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20908         ;;
20909 (*)
20910         { { echo "$as_me:20910: error: expected a pathname, not \"$withval\"" >&5
20911 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20912    { (exit 1); exit 1; }; }
20913         ;;
20914 esac
20915
20916 fi
20917 eval ADA_INCLUDE="$withval"
20918
20919 echo "$as_me:20919: result: $ADA_INCLUDE" >&5
20920 echo "${ECHO_T}$ADA_INCLUDE" >&6
20921
20922 echo "$as_me:20922: checking for ada-objects" >&5
20923 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20924
20925 # Check whether --with-ada-objects or --without-ada-objects was given.
20926 if test "${with_ada_objects+set}" = set; then
20927   withval="$with_ada_objects"
20928
20929 else
20930   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20931 fi; if test -n "$prefix/lib/ada/adalib" ; then
20932
20933 if test "x$prefix" != xNONE; then
20934         cf_path_syntax="$prefix"
20935 else
20936         cf_path_syntax="$ac_default_prefix"
20937 fi
20938
20939 case ".$withval" in
20940 (.\$\(*\)*|.\'*\'*)
20941         ;;
20942 (..|./*|.\\*)
20943         ;;
20944 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
20945         ;;
20946 (.\${*prefix}*|.\${*dir}*)
20947         eval withval="$withval"
20948         case ".$withval" in
20949         (.NONE/*)
20950                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20951                 ;;
20952         esac
20953         ;;
20954 (.no|.NONE/*)
20955         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20956         ;;
20957 (*)
20958         { { echo "$as_me:20958: error: expected a pathname, not \"$withval\"" >&5
20959 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20960    { (exit 1); exit 1; }; }
20961         ;;
20962 esac
20963
20964 fi
20965 eval ADA_OBJECTS="$withval"
20966
20967 echo "$as_me:20967: result: $ADA_OBJECTS" >&5
20968 echo "${ECHO_T}$ADA_OBJECTS" >&6
20969
20970 echo "$as_me:20970: checking if an Ada95 shared-library should be built" >&5
20971 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20972
20973 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20974 if test "${with_ada_sharedlib+set}" = set; then
20975   withval="$with_ada_sharedlib"
20976   with_ada_sharedlib=$withval
20977 else
20978   with_ada_sharedlib=no
20979 fi;
20980 echo "$as_me:20980: result: $with_ada_sharedlib" >&5
20981 echo "${ECHO_T}$with_ada_sharedlib" >&6
20982
20983 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20984 MAKE_ADA_SHAREDLIB="#"
20985
20986 if test "x$with_ada_sharedlib" != xno
20987 then
20988         MAKE_ADA_SHAREDLIB=
20989         if test "x$with_ada_sharedlib" != xyes
20990         then
20991                 ADA_SHAREDLIB="$with_ada_sharedlib"
20992         fi
20993 fi
20994
20995                 fi
20996         fi
20997 else
20998         cf_with_ada=no
20999 fi
21000
21001 # do this "late" to avoid conflict with header-checks
21002 if test "x$with_widec" = xyes ; then
21003         echo "$as_me:21003: checking for wchar_t" >&5
21004 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21005 if test "${ac_cv_type_wchar_t+set}" = set; then
21006   echo $ECHO_N "(cached) $ECHO_C" >&6
21007 else
21008   cat >conftest.$ac_ext <<_ACEOF
21009 #line 21009 "configure"
21010 #include "confdefs.h"
21011 $ac_includes_default
21012 int
21013 main ()
21014 {
21015 if ((wchar_t *) 0)
21016   return 0;
21017 if (sizeof (wchar_t))
21018   return 0;
21019   ;
21020   return 0;
21021 }
21022 _ACEOF
21023 rm -f conftest.$ac_objext
21024 if { (eval echo "$as_me:21024: \"$ac_compile\"") >&5
21025   (eval $ac_compile) 2>&5
21026   ac_status=$?
21027   echo "$as_me:21027: \$? = $ac_status" >&5
21028   (exit $ac_status); } &&
21029          { ac_try='test -s conftest.$ac_objext'
21030   { (eval echo "$as_me:21030: \"$ac_try\"") >&5
21031   (eval $ac_try) 2>&5
21032   ac_status=$?
21033   echo "$as_me:21033: \$? = $ac_status" >&5
21034   (exit $ac_status); }; }; then
21035   ac_cv_type_wchar_t=yes
21036 else
21037   echo "$as_me: failed program was:" >&5
21038 cat conftest.$ac_ext >&5
21039 ac_cv_type_wchar_t=no
21040 fi
21041 rm -f conftest.$ac_objext conftest.$ac_ext
21042 fi
21043 echo "$as_me:21043: result: $ac_cv_type_wchar_t" >&5
21044 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21045
21046 echo "$as_me:21046: checking size of wchar_t" >&5
21047 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21048 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21049   echo $ECHO_N "(cached) $ECHO_C" >&6
21050 else
21051   if test "$ac_cv_type_wchar_t" = yes; then
21052   if test "$cross_compiling" = yes; then
21053   # Depending upon the size, compute the lo and hi bounds.
21054 cat >conftest.$ac_ext <<_ACEOF
21055 #line 21055 "configure"
21056 #include "confdefs.h"
21057 $ac_includes_default
21058 int
21059 main ()
21060 {
21061 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21062   ;
21063   return 0;
21064 }
21065 _ACEOF
21066 rm -f conftest.$ac_objext
21067 if { (eval echo "$as_me:21067: \"$ac_compile\"") >&5
21068   (eval $ac_compile) 2>&5
21069   ac_status=$?
21070   echo "$as_me:21070: \$? = $ac_status" >&5
21071   (exit $ac_status); } &&
21072          { ac_try='test -s conftest.$ac_objext'
21073   { (eval echo "$as_me:21073: \"$ac_try\"") >&5
21074   (eval $ac_try) 2>&5
21075   ac_status=$?
21076   echo "$as_me:21076: \$? = $ac_status" >&5
21077   (exit $ac_status); }; }; then
21078   ac_lo=0 ac_mid=0
21079   while :; do
21080     cat >conftest.$ac_ext <<_ACEOF
21081 #line 21081 "configure"
21082 #include "confdefs.h"
21083 $ac_includes_default
21084 int
21085 main ()
21086 {
21087 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21088   ;
21089   return 0;
21090 }
21091 _ACEOF
21092 rm -f conftest.$ac_objext
21093 if { (eval echo "$as_me:21093: \"$ac_compile\"") >&5
21094   (eval $ac_compile) 2>&5
21095   ac_status=$?
21096   echo "$as_me:21096: \$? = $ac_status" >&5
21097   (exit $ac_status); } &&
21098          { ac_try='test -s conftest.$ac_objext'
21099   { (eval echo "$as_me:21099: \"$ac_try\"") >&5
21100   (eval $ac_try) 2>&5
21101   ac_status=$?
21102   echo "$as_me:21102: \$? = $ac_status" >&5
21103   (exit $ac_status); }; }; then
21104   ac_hi=$ac_mid; break
21105 else
21106   echo "$as_me: failed program was:" >&5
21107 cat conftest.$ac_ext >&5
21108 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21109 fi
21110 rm -f conftest.$ac_objext conftest.$ac_ext
21111   done
21112 else
21113   echo "$as_me: failed program was:" >&5
21114 cat conftest.$ac_ext >&5
21115 ac_hi=-1 ac_mid=-1
21116   while :; do
21117     cat >conftest.$ac_ext <<_ACEOF
21118 #line 21118 "configure"
21119 #include "confdefs.h"
21120 $ac_includes_default
21121 int
21122 main ()
21123 {
21124 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21125   ;
21126   return 0;
21127 }
21128 _ACEOF
21129 rm -f conftest.$ac_objext
21130 if { (eval echo "$as_me:21130: \"$ac_compile\"") >&5
21131   (eval $ac_compile) 2>&5
21132   ac_status=$?
21133   echo "$as_me:21133: \$? = $ac_status" >&5
21134   (exit $ac_status); } &&
21135          { ac_try='test -s conftest.$ac_objext'
21136   { (eval echo "$as_me:21136: \"$ac_try\"") >&5
21137   (eval $ac_try) 2>&5
21138   ac_status=$?
21139   echo "$as_me:21139: \$? = $ac_status" >&5
21140   (exit $ac_status); }; }; then
21141   ac_lo=$ac_mid; break
21142 else
21143   echo "$as_me: failed program was:" >&5
21144 cat conftest.$ac_ext >&5
21145 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21146 fi
21147 rm -f conftest.$ac_objext conftest.$ac_ext
21148   done
21149 fi
21150 rm -f conftest.$ac_objext conftest.$ac_ext
21151 # Binary search between lo and hi bounds.
21152 while test "x$ac_lo" != "x$ac_hi"; do
21153   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21154   cat >conftest.$ac_ext <<_ACEOF
21155 #line 21155 "configure"
21156 #include "confdefs.h"
21157 $ac_includes_default
21158 int
21159 main ()
21160 {
21161 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21162   ;
21163   return 0;
21164 }
21165 _ACEOF
21166 rm -f conftest.$ac_objext
21167 if { (eval echo "$as_me:21167: \"$ac_compile\"") >&5
21168   (eval $ac_compile) 2>&5
21169   ac_status=$?
21170   echo "$as_me:21170: \$? = $ac_status" >&5
21171   (exit $ac_status); } &&
21172          { ac_try='test -s conftest.$ac_objext'
21173   { (eval echo "$as_me:21173: \"$ac_try\"") >&5
21174   (eval $ac_try) 2>&5
21175   ac_status=$?
21176   echo "$as_me:21176: \$? = $ac_status" >&5
21177   (exit $ac_status); }; }; then
21178   ac_hi=$ac_mid
21179 else
21180   echo "$as_me: failed program was:" >&5
21181 cat conftest.$ac_ext >&5
21182 ac_lo=`expr $ac_mid + 1`
21183 fi
21184 rm -f conftest.$ac_objext conftest.$ac_ext
21185 done
21186 ac_cv_sizeof_wchar_t=$ac_lo
21187 else
21188   if test "$cross_compiling" = yes; then
21189   { { echo "$as_me:21189: error: cannot run test program while cross compiling" >&5
21190 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21191    { (exit 1); exit 1; }; }
21192 else
21193   cat >conftest.$ac_ext <<_ACEOF
21194 #line 21194 "configure"
21195 #include "confdefs.h"
21196 $ac_includes_default
21197 int
21198 main ()
21199 {
21200 FILE *f = fopen ("conftest.val", "w");
21201 if (!f)
21202   $ac_main_return (1);
21203 fprintf (f, "%d", (sizeof (wchar_t)));
21204 fclose (f);
21205   ;
21206   return 0;
21207 }
21208 _ACEOF
21209 rm -f conftest$ac_exeext
21210 if { (eval echo "$as_me:21210: \"$ac_link\"") >&5
21211   (eval $ac_link) 2>&5
21212   ac_status=$?
21213   echo "$as_me:21213: \$? = $ac_status" >&5
21214   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21215   { (eval echo "$as_me:21215: \"$ac_try\"") >&5
21216   (eval $ac_try) 2>&5
21217   ac_status=$?
21218   echo "$as_me:21218: \$? = $ac_status" >&5
21219   (exit $ac_status); }; }; then
21220   ac_cv_sizeof_wchar_t=`cat conftest.val`
21221 else
21222   echo "$as_me: program exited with status $ac_status" >&5
21223 echo "$as_me: failed program was:" >&5
21224 cat conftest.$ac_ext >&5
21225 fi
21226 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21227 fi
21228 fi
21229 rm -f conftest.val
21230 else
21231   ac_cv_sizeof_wchar_t=0
21232 fi
21233 fi
21234 echo "$as_me:21234: result: $ac_cv_sizeof_wchar_t" >&5
21235 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21236 cat >>confdefs.h <<EOF
21237 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21238 EOF
21239
21240 fi
21241
21242 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21243 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21244 ###
21245 ### ticlib modules may be a separate library, otherwise contained in termlib.
21246 ### termlib modules may be a separate library, otherwise contained in ncurses.
21247 ###
21248 ### The of "+" or " " between the tokens controls the way the script
21249 ### chooses to split module lists into libraries.
21250 ###
21251 ### (see CF_LIB_RULES).
21252 echo "$as_me:21252: checking for library subsets" >&5
21253 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21254 LIB_SUBSETS=
21255
21256 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21257         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21258         if test "$with_ticlib" != no ; then
21259                 LIB_SUBSETS="${LIB_SUBSETS} "
21260         else
21261                 LIB_SUBSETS="${LIB_SUBSETS}+"
21262         fi
21263 fi
21264
21265 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21266 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21267
21268 if test "$with_termlib" != no ; then
21269         LIB_SUBSETS="${LIB_SUBSETS} "
21270 else
21271         LIB_SUBSETS="${LIB_SUBSETS}+"
21272 fi
21273
21274 LIB_SUBSETS="${LIB_SUBSETS}base"
21275
21276 # Most term-driver calls are to tinfo, but some like init_pair are to the
21277 # base library (so it resides in base).
21278 if test "$with_term_driver" != no ; then
21279         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21280         case $cf_cv_system_name in
21281         (*mingw32*|*mingw64*)
21282                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21283                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21284                 ;;
21285         (*)
21286                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21287                 ;;
21288         esac
21289 fi
21290
21291 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21292 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21293
21294 echo "$as_me:21294: result: $LIB_SUBSETS" >&5
21295 echo "${ECHO_T}$LIB_SUBSETS" >&6
21296
21297 ### Construct the list of include-directories to be generated
21298
21299 if test "$srcdir" != "."; then
21300         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21301 fi
21302 CPPFLAGS="-I../include $CPPFLAGS"
21303 if test "$srcdir" != "."; then
21304         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21305 fi
21306 CPPFLAGS="-I. $CPPFLAGS"
21307
21308 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21309 if test "$srcdir" != "."; then
21310         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21311 fi
21312 if test "$GCC" != yes; then
21313         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21314 elif test "$includedir" != "/usr/include"; then
21315         if test "$includedir" = '${prefix}/include' ; then
21316                 if test x$prefix != x/usr ; then
21317                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21318                 fi
21319         else
21320                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21321         fi
21322 fi
21323
21324 ### Build up pieces for makefile rules
21325 echo "$as_me:21325: checking default library suffix" >&5
21326 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21327
21328         case $DFT_LWR_MODEL in
21329         (libtool) DFT_ARG_SUFFIX=''   ;;
21330         (normal)  DFT_ARG_SUFFIX=''   ;;
21331         (debug)   DFT_ARG_SUFFIX='_g' ;;
21332         (profile) DFT_ARG_SUFFIX='_p' ;;
21333         (shared)  DFT_ARG_SUFFIX=''   ;;
21334         esac
21335         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21336 echo "$as_me:21336: result: $DFT_ARG_SUFFIX" >&5
21337 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21338
21339 echo "$as_me:21339: checking default library-dependency suffix" >&5
21340 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21341
21342         case X$DFT_LWR_MODEL in
21343         (Xlibtool)
21344                 DFT_LIB_SUFFIX='.la'
21345                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21346                 ;;
21347         (Xdebug)
21348                 DFT_LIB_SUFFIX='_g.a'
21349                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21350                 ;;
21351         (Xprofile)
21352                 DFT_LIB_SUFFIX='_p.a'
21353                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21354                 ;;
21355         (Xshared)
21356                 case $cf_cv_system_name in
21357                 (aix[5-7]*)
21358                         DFT_LIB_SUFFIX='.so'
21359                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21360                         ;;
21361                 (cygwin*|msys*|mingw*)
21362                         DFT_LIB_SUFFIX='.dll'
21363                         DFT_DEP_SUFFIX='.dll.a'
21364                         ;;
21365                 (darwin*)
21366                         DFT_LIB_SUFFIX='.dylib'
21367                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21368                         ;;
21369                 (hpux*)
21370                         case $target in
21371                         (ia64*)
21372                                 DFT_LIB_SUFFIX='.so'
21373                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21374                                 ;;
21375                         (*)
21376                                 DFT_LIB_SUFFIX='.sl'
21377                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21378                                 ;;
21379                         esac
21380                         ;;
21381                 (*)
21382                         DFT_LIB_SUFFIX='.so'
21383                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21384                         ;;
21385                 esac
21386                 ;;
21387         (*)
21388                 DFT_LIB_SUFFIX='.a'
21389                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21390                 ;;
21391         esac
21392         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21393         then
21394                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21395                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21396         fi
21397 echo "$as_me:21397: result: $DFT_DEP_SUFFIX" >&5
21398 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21399
21400 echo "$as_me:21400: checking default object directory" >&5
21401 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21402
21403         case $DFT_LWR_MODEL in
21404         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21405         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21406         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21407         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21408         (shared)
21409                 case $cf_cv_system_name in
21410                 (cygwin|msys)
21411                         DFT_OBJ_SUBDIR='objects' ;;
21412                 (*)
21413                         DFT_OBJ_SUBDIR='obj_s' ;;
21414                 esac
21415         esac
21416 echo "$as_me:21416: result: $DFT_OBJ_SUBDIR" >&5
21417 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21418
21419 if test "x$cf_with_cxx" = xyes ; then
21420 echo "$as_me:21420: checking c++ library-dependency suffix" >&5
21421 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21422 if test "$with_libtool" != "no"; then
21423         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21424         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21425 elif test "$with_shared_cxx" != "no"; then
21426         # also for g++ users...
21427         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21428 else
21429         # we normally make a static library because C/C++ library rules differ
21430
21431         case Xnormal in
21432         (Xlibtool)
21433                 CXX_LIB_SUFFIX='.la'
21434                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21435                 ;;
21436         (Xdebug)
21437                 CXX_LIB_SUFFIX='_g.a'
21438                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21439                 ;;
21440         (Xprofile)
21441                 CXX_LIB_SUFFIX='_p.a'
21442                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21443                 ;;
21444         (Xshared)
21445                 case $cf_cv_system_name in
21446                 (aix[5-7]*)
21447                         CXX_LIB_SUFFIX='.so'
21448                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21449                         ;;
21450                 (cygwin*|msys*|mingw*)
21451                         CXX_LIB_SUFFIX='.dll'
21452                         CXX_DEP_SUFFIX='.dll.a'
21453                         ;;
21454                 (darwin*)
21455                         CXX_LIB_SUFFIX='.dylib'
21456                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21457                         ;;
21458                 (hpux*)
21459                         case $target in
21460                         (ia64*)
21461                                 CXX_LIB_SUFFIX='.so'
21462                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21463                                 ;;
21464                         (*)
21465                                 CXX_LIB_SUFFIX='.sl'
21466                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21467                                 ;;
21468                         esac
21469                         ;;
21470                 (*)
21471                         CXX_LIB_SUFFIX='.so'
21472                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21473                         ;;
21474                 esac
21475                 ;;
21476         (*)
21477                 CXX_LIB_SUFFIX='.a'
21478                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21479                 ;;
21480         esac
21481         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21482         then
21483                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21484                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21485         fi
21486
21487 fi
21488 echo "$as_me:21488: result: $CXX_LIB_SUFFIX" >&5
21489 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21490
21491 fi
21492
21493 # do not want -ldl in build except as needed for -lncurses dependency
21494 if test "x$with_dlsym" = xyes ; then
21495 if test $DFT_LWR_MODEL = shared || \
21496    test $DFT_LWR_MODEL = libtool ; then
21497
21498 # remove dl library from $LIBS
21499 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21500
21501 fi
21502 fi
21503 ### Set up low-level terminfo dependencies for makefiles.
21504
21505 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21506 # do not need libdl
21507 TICS_LIST=
21508 if test "x$with_dlsym" = xyes ; then
21509
21510 # remove dl library from $SHLIB_LIST
21511 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21512
21513 fi
21514
21515 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21516 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21517 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21518 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21519 then
21520         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21521 fi
21522
21523 if test "$with_ticlib" != no ; then
21524
21525         if test "x$with_ticlib" != xyes ; then
21526                 TICS_NAME=$with_ticlib
21527                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21528                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21529                 TICS_LIB_SUFFIX="${with_ticlib}"
21530         else
21531                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21532                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21533                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21534         fi
21535         TICS_LDFLAGS="-L${LIB_DIR}"
21536         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21537 else
21538         TICS_LDFLAGS="-L${LIB_DIR}"
21539         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21540 fi
21541
21542 if test "$with_termlib" != no ; then
21543
21544         if test "x$with_termlib" != xyes ; then
21545                 TINFO_NAME=$with_termlib
21546                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21547                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21548                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21549                 TINFO_LIB_SUFFIX="${with_termlib}"
21550         else
21551                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21552                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21553                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21554                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21555         fi
21556
21557         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21558         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21559         if test "$DFT_LWR_MODEL" = "libtool"; then
21560                 TEST_ARGS="${TEST_DEPS}"
21561                 TEST_ARG2="${TEST_DEP2}"
21562                 TINFO_LDFLAGS="-L${LIB_DIR}"
21563                 TINFO_LIBS="$TEST_ARGS"
21564                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21565                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21566         else
21567                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21568                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21569                 if test "x$with_term_driver" != xno ; then
21570                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21571                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21572                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21573                 else
21574                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21575                         TINFO_LIBS="$TEST_ARGS"
21576                 fi
21577                 TINFO_LDFLAGS="-L${LIB_DIR}"
21578                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21579         fi
21580 else
21581         # the next lines are needed for linking libtic over libncurses
21582         TINFO_NAME=${LIB_NAME}
21583         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21584         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21585         if test "x$with_tic_depends" = xyes ; then
21586                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21587         else
21588                 TICS_LIST="$SHLIB_LIST"
21589         fi
21590
21591         TINFO_LDFLAGS="-L${LIB_DIR}"
21592         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21593 fi
21594
21595 if test "$DFT_LWR_MODEL" = shared ; then
21596         case $cf_cv_system_name in
21597         (cygwin*|msys*)
21598                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21599                 TINFO_SUFFIX=.dll
21600                 ;;
21601         esac
21602 fi
21603
21604 if test "x$with_dlsym" = xyes ; then
21605
21606 # remove dl library from $TICS_LIST
21607 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21608
21609 fi
21610
21611 if test "$DFT_LWR_MODEL" = "libtool"; then
21612         OBJEXT=lo
21613 fi
21614
21615 # needed for Ada95
21616 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21617
21618 case $DFT_LWR_MODEL in
21619 (normal|debug|profile)
21620
21621 if test "$GCC" = yes ; then
21622         case $cf_cv_system_name in
21623         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21624                 LDFLAGS_STATIC=
21625                 LDFLAGS_SHARED=
21626                 ;;
21627         (*)     # normally, except when broken
21628                 LDFLAGS_STATIC=-static
21629                 LDFLAGS_SHARED=-dynamic
21630                 ;;
21631         esac
21632 else
21633         case $cf_cv_system_name in
21634         (aix[4-7]*)     # from ld manpage
21635                 LDFLAGS_STATIC=-bstatic
21636                 LDFLAGS_SHARED=-bdynamic
21637                 ;;
21638         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21639                 # We could also use just "archive" and "shared".
21640                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21641                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21642                 ;;
21643         (irix*)         # from ld manpage IRIX64
21644                 LDFLAGS_STATIC=-Bstatic
21645                 LDFLAGS_SHARED=-Bdynamic
21646                 ;;
21647         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21648                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21649                 LDFLAGS_STATIC=-noso
21650                 LDFLAGS_SHARED=-so_archive
21651                 ;;
21652         (solaris2*)
21653                 LDFLAGS_STATIC=-Bstatic
21654                 LDFLAGS_SHARED=-Bdynamic
21655                 ;;
21656         esac
21657 fi
21658
21659 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21660 then
21661         echo "$as_me:21661: checking if linker supports switching between static/dynamic" >&5
21662 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21663
21664         rm -f libconftest.a
21665         cat >conftest.$ac_ext <<EOF
21666 #line 21666 "configure"
21667 #include <stdio.h>
21668 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21669 EOF
21670         if { (eval echo "$as_me:21670: \"$ac_compile\"") >&5
21671   (eval $ac_compile) 2>&5
21672   ac_status=$?
21673   echo "$as_me:21673: \$? = $ac_status" >&5
21674   (exit $ac_status); } ; then
21675                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21676                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21677         fi
21678         rm -f conftest.*
21679
21680         cf_save_LIBS="$LIBS"
21681
21682         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21683         cat >conftest.$ac_ext <<_ACEOF
21684 #line 21684 "configure"
21685 #include "confdefs.h"
21686
21687 #line 21687 "configure"
21688 #include <stdio.h>
21689 int cf_ldflags_static(FILE *fp);
21690
21691 int
21692 main ()
21693 {
21694
21695         return cf_ldflags_static(stdin);
21696
21697   ;
21698   return 0;
21699 }
21700 _ACEOF
21701 rm -f conftest.$ac_objext conftest$ac_exeext
21702 if { (eval echo "$as_me:21702: \"$ac_link\"") >&5
21703   (eval $ac_link) 2>&5
21704   ac_status=$?
21705   echo "$as_me:21705: \$? = $ac_status" >&5
21706   (exit $ac_status); } &&
21707          { ac_try='test -s conftest$ac_exeext'
21708   { (eval echo "$as_me:21708: \"$ac_try\"") >&5
21709   (eval $ac_try) 2>&5
21710   ac_status=$?
21711   echo "$as_me:21711: \$? = $ac_status" >&5
21712   (exit $ac_status); }; }; then
21713
21714         # some linkers simply ignore the -dynamic
21715         case x`file conftest$ac_exeext 2>/dev/null` in
21716         (*static*)
21717                 cf_ldflags_static=no
21718                 ;;
21719         (*)
21720                 cf_ldflags_static=yes
21721                 ;;
21722         esac
21723
21724 else
21725   echo "$as_me: failed program was:" >&5
21726 cat conftest.$ac_ext >&5
21727 cf_ldflags_static=no
21728 fi
21729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21730
21731         rm -f libconftest.*
21732         LIBS="$cf_save_LIBS"
21733
21734         echo "$as_me:21734: result: $cf_ldflags_static" >&5
21735 echo "${ECHO_T}$cf_ldflags_static" >&6
21736
21737         if test $cf_ldflags_static != yes
21738         then
21739                 LDFLAGS_STATIC=
21740                 LDFLAGS_SHARED=
21741         fi
21742 else
21743         LDFLAGS_STATIC=
21744         LDFLAGS_SHARED=
21745 fi
21746
21747         ;;
21748 esac
21749
21750 echo "$as_me:21750: checking where we will install curses.h" >&5
21751 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21752
21753 includesubdir=
21754 if test "$with_overwrite" = no && \
21755  ( test "x$includedir" = 'x${prefix}/include' || \
21756    test "x$includedir" = "x${prefix}/include" )
21757 then
21758         includesubdir="/ncurses${USE_LIB_SUFFIX}"
21759 fi
21760 echo "$as_me:21760: result: ${includedir}${includesubdir}" >&5
21761 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21762
21763 ### Resolve a conflict between normal and wide-curses by forcing applications
21764 ### that will need libutf8 to add it to their configure script.
21765 if test "$with_overwrite" != no ; then
21766 if test "$NCURSES_LIBUTF8" = 1 ; then
21767         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21768         { echo "$as_me:21768: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21769 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21770 fi
21771 fi
21772 WITH_OVERWRITE=$with_overwrite
21773
21774 # used to separate tack out of the tree
21775 NCURSES_TREE=
21776
21777 ### predefined stuff for the test programs
21778
21779 cat >>confdefs.h <<\EOF
21780 #define HAVE_SLK_COLOR 1
21781 EOF
21782
21783 ### Construct the list of subdirectories for which we'll customize makefiles
21784 ### with the appropriate compile-rules.
21785
21786 echo "$as_me:21786: checking for src modules" >&5
21787 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21788
21789 # dependencies and linker-arguments for test-programs
21790 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21791 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21792 if test "$DFT_LWR_MODEL" = "libtool"; then
21793         TEST_ARGS="${TEST_DEPS}"
21794         TEST_ARG2="${TEST_DEP2}"
21795 else
21796         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21797         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21798 fi
21799
21800 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
21801 cf_cv_src_modules=
21802 for cf_dir in $modules_to_build
21803 do
21804         if test -f $srcdir/$cf_dir/modules; then
21805
21806                 # We may/may not have tack in the distribution, though the
21807                 # makefile is.
21808                 if test $cf_dir = tack ; then
21809                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21810                                 continue
21811                         fi
21812                 fi
21813
21814                 if test -z "$cf_cv_src_modules"; then
21815                         cf_cv_src_modules=$cf_dir
21816                 else
21817                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21818                 fi
21819
21820                 # Make the ncurses_cfg.h file record the library interface files as
21821                 # well.  These are header files that are the same name as their
21822                 # directory.  Ncurses is the only library that does not follow
21823                 # that pattern.
21824                 if test $cf_dir = tack ; then
21825                         continue
21826                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21827
21828 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21829
21830                         cat >>confdefs.h <<EOF
21831 #define HAVE_${cf_have_include}_H 1
21832 EOF
21833
21834                         cat >>confdefs.h <<EOF
21835 #define HAVE_LIB${cf_have_include} 1
21836 EOF
21837
21838                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21839                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21840                         if test "$DFT_LWR_MODEL" = "libtool"; then
21841                                 TEST_ARGS="${TEST_DEPS}"
21842                                 TEST_ARG2="${TEST_DEP2}"
21843                         else
21844                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
21845                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
21846                         fi
21847                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
21848                 fi
21849         fi
21850 done
21851 echo "$as_me:21851: result: $cf_cv_src_modules" >&5
21852 echo "${ECHO_T}$cf_cv_src_modules" >&6
21853
21854 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21855 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21856
21857 SRC_SUBDIRS=
21858 if test "x$cf_with_manpages" != xno ; then
21859         SRC_SUBDIRS="$SRC_SUBDIRS man"
21860 fi
21861 SRC_SUBDIRS="$SRC_SUBDIRS include"
21862 for cf_dir in $cf_cv_src_modules
21863 do
21864         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21865 done
21866 if test "x$cf_with_tests" != "xno" ; then
21867         SRC_SUBDIRS="$SRC_SUBDIRS test"
21868 fi
21869 # always make this, to install the ncurses-config script
21870 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21871 if test "$cf_with_cxx_binding" != no; then
21872         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
21873         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21874 fi
21875
21876 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21877 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21878
21879 ADA_SUBDIRS=
21880 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21881         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21882         ADA_SUBDIRS="gen src"
21883         if test "x$cf_with_tests" != "xno" ; then
21884                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21885         fi
21886 fi
21887
21888 SUB_MAKEFILES=
21889 for cf_dir in $SRC_SUBDIRS
21890 do
21891         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21892 done
21893
21894 if test -n "$ADA_SUBDIRS"; then
21895         for cf_dir in $ADA_SUBDIRS
21896         do
21897                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21898         done
21899
21900 fi
21901
21902 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21903    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21904    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
21905 fi
21906
21907 DIRS_TO_MAKE="lib"
21908 for cf_item in $cf_list_models
21909 do
21910
21911         case $cf_item in
21912         (libtool) cf_subdir='obj_lo'  ;;
21913         (normal)  cf_subdir='objects' ;;
21914         (debug)   cf_subdir='obj_g' ;;
21915         (profile) cf_subdir='obj_p' ;;
21916         (shared)
21917                 case $cf_cv_system_name in
21918                 (cygwin|msys)
21919                         cf_subdir='objects' ;;
21920                 (*)
21921                         cf_subdir='obj_s' ;;
21922                 esac
21923         esac
21924
21925         for cf_item2 in $DIRS_TO_MAKE
21926         do
21927                 test $cf_item2 = $cf_subdir && break
21928         done
21929         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21930 done
21931 for cf_dir in $DIRS_TO_MAKE
21932 do
21933         test ! -d $cf_dir && mkdir $cf_dir
21934 done
21935
21936 # symbols that differ when compiling Ada95 by itself.
21937 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21938
21939 # values to use as strings
21940
21941 cat >>confdefs.h <<EOF
21942 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21943 EOF
21944
21945 cat >>confdefs.h <<EOF
21946 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21947 EOF
21948
21949 ### Now that we're done running tests, add the compiler-warnings, if any
21950
21951 cf_fix_cppflags=no
21952 cf_new_cflags=
21953 cf_new_cppflags=
21954 cf_new_extra_cppflags=
21955
21956 for cf_add_cflags in $EXTRA_CFLAGS
21957 do
21958 case $cf_fix_cppflags in
21959 (no)
21960         case $cf_add_cflags in
21961         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21962                 case $cf_add_cflags in
21963                 (-D*)
21964                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21965
21966                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21967                                 && test -z "${cf_tst_cflags}" \
21968                                 && cf_fix_cppflags=yes
21969
21970                         if test $cf_fix_cppflags = yes ; then
21971                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21972                                 continue
21973                         elif test "${cf_tst_cflags}" = "\"'" ; then
21974                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21975                                 continue
21976                         fi
21977                         ;;
21978                 esac
21979                 case "$CPPFLAGS" in
21980                 (*$cf_add_cflags)
21981                         ;;
21982                 (*)
21983                         case $cf_add_cflags in
21984                         (-D*)
21985                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21986
21987 CPPFLAGS=`echo "$CPPFLAGS" | \
21988         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21989                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21990
21991                                 ;;
21992                         esac
21993                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21994                         ;;
21995                 esac
21996                 ;;
21997         (*)
21998                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21999                 ;;
22000         esac
22001         ;;
22002 (yes)
22003         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22004
22005         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22006
22007         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22008                 && test -z "${cf_tst_cflags}" \
22009                 && cf_fix_cppflags=no
22010         ;;
22011 esac
22012 done
22013
22014 if test -n "$cf_new_cflags" ; then
22015
22016         CFLAGS="$CFLAGS $cf_new_cflags"
22017 fi
22018
22019 if test -n "$cf_new_cppflags" ; then
22020
22021         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22022 fi
22023
22024 if test -n "$cf_new_extra_cppflags" ; then
22025
22026         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22027 fi
22028
22029 ### Define substitutions for header files to avoid name-pollution
22030
22031 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22032         HAVE_TCGETATTR=1
22033 else
22034         HAVE_TCGETATTR=0
22035 fi
22036
22037 if test "x$ac_cv_header_stdint_h" = xyes ; then
22038         HAVE_STDINT_H=1
22039 else
22040         HAVE_STDINT_H=0
22041 fi
22042
22043 if test "x$ac_cv_header_termio_h" = xyes ; then
22044         HAVE_TERMIO_H=1
22045 else
22046         HAVE_TERMIO_H=0
22047 fi
22048
22049 if test "x$ac_cv_header_termios_h" = xyes ; then
22050         HAVE_TERMIOS_H=1
22051 else
22052         HAVE_TERMIOS_H=0
22053 fi
22054
22055 ################################################################################
22056 test "x$use_database" = xyes && \
22057 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22058
22059 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22060 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22061
22062 if test "x$enable_pc_files" = xyes ; then \
22063 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22064 MAKE_PC_FILES=
22065 else
22066 MAKE_PC_FILES="#"
22067 fi
22068
22069 # Extract the first word of "tic", so it can be a program name with args.
22070 set dummy tic; ac_word=$2
22071 echo "$as_me:22071: checking for $ac_word" >&5
22072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22073 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22074   echo $ECHO_N "(cached) $ECHO_C" >&6
22075 else
22076   case $TIC_PATH in
22077   [\\/]* | ?:[\\/]*)
22078   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22079   ;;
22080   *)
22081   ac_save_IFS=$IFS; IFS=$ac_path_separator
22082 ac_dummy="$PATH:/usr/local/ncurses/bin"
22083 for ac_dir in $ac_dummy; do
22084   IFS=$ac_save_IFS
22085   test -z "$ac_dir" && ac_dir=.
22086   if $as_executable_p "$ac_dir/$ac_word"; then
22087    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22088    echo "$as_me:22088: found $ac_dir/$ac_word" >&5
22089    break
22090 fi
22091 done
22092
22093   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22094   ;;
22095 esac
22096 fi
22097 TIC_PATH=$ac_cv_path_TIC_PATH
22098
22099 if test -n "$TIC_PATH"; then
22100   echo "$as_me:22100: result: $TIC_PATH" >&5
22101 echo "${ECHO_T}$TIC_PATH" >&6
22102 else
22103   echo "$as_me:22103: result: no" >&5
22104 echo "${ECHO_T}no" >&6
22105 fi
22106
22107 if test -n "$FALLBACK_LIST"
22108 then
22109         if test "$TIC_PATH" = unknown
22110         then
22111                 { echo "$as_me:22111: WARNING: no tic program found for fallbacks" >&5
22112 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22113         fi
22114 fi
22115
22116 if test "x$cf_with_tests" != xno ; then
22117         MAKE_TESTS=
22118 else
22119         MAKE_TESTS="#"
22120 fi
22121
22122 ADAHTML_DIR=../../doc/html/ada
22123
22124 # these could be configurable, but are not currently
22125 PANEL_NAME=panel
22126 MENU_NAME=menu
22127 FORM_NAME=form
22128 CXX_NAME=ncurses++
22129
22130 # workaround for g++ versus Solaris (20131116)
22131 case $cf_cv_system_name in
22132 (solaris2*)
22133         case "x$CPPFLAGS" in
22134         (*-D_XOPEN_SOURCE_EXTENDED*)
22135                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22136
22137 echo "${as_me:-configure}:22137: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22138
22139                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22140                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22141                 ;;
22142         esac
22143         ;;
22144 esac
22145
22146 # Help to automatically enable the extended curses features when using either
22147 # the *-config or the ".pc" files by adding defines.
22148 echo "$as_me:22148: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22149 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22150 PKG_CFLAGS=
22151 for cf_loop1 in $CPPFLAGS_after_XOPEN
22152 do
22153         cf_found=no
22154         for cf_loop2 in $CPPFLAGS_before_XOPEN
22155         do
22156                 if test "x$cf_loop1" = "x$cf_loop2"
22157                 then
22158                         cf_found=yes
22159                         break
22160                 fi
22161         done
22162         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22163 done
22164 echo "$as_me:22164: result: $PKG_CFLAGS" >&5
22165 echo "${ECHO_T}$PKG_CFLAGS" >&6
22166
22167 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22168 case "x$NCURSES_OSPEED" in
22169 (*short*)
22170         cf_compatible=1
22171         ;;
22172 (*)
22173         cf_compatible=0
22174         ;;
22175 esac
22176
22177 cat >>confdefs.h <<EOF
22178 #define NCURSES_OSPEED_COMPAT $cf_compatible
22179 EOF
22180
22181 case "x$cf_cv_typeof_chtype" in
22182 (xshort|xint|xlong)
22183         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22184         ;;
22185 esac
22186
22187 case "x$cf_cv_typeof_mmask_t" in
22188 (xshort|xint|xlong)
22189         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22190         ;;
22191 esac
22192
22193 # substitute into misc/Makefile to suppress
22194 # (un)install.data from the
22195 # (un)install rules.
22196 if test "x$cf_with_db_install" = "xno"; then
22197         MISC_INSTALL_DATA=
22198         MISC_UNINSTALL_DATA=
22199 else
22200         MISC_INSTALL_DATA=install.data
22201         MISC_UNINSTALL_DATA=uninstall.data
22202 fi
22203
22204 SUB_SCRIPTS=
22205
22206 if test -n "$PACKAGE"
22207 then
22208         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22209         export PACKAGE
22210         echo "package: $PACKAGE"
22211 fi
22212
22213 UNALTERED_SYMS=
22214 cf_filter_syms=no
22215
22216 if test -n "$RESULTING_SYMS"
22217 then
22218         case $cf_cv_abi_version in
22219         ([6789])
22220                 test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22221
22222 echo "${as_me:-configure}:22222: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22223
22224                 cf_filter_syms=yes
22225                 ;;
22226         (*)
22227                 test -n "$verbose" && echo "    will map symbols to default ABI" 1>&6
22228
22229 echo "${as_me:-configure}:22229: testing will map symbols to default ABI ..." 1>&5
22230
22231                 ;;
22232         esac
22233 fi
22234
22235 if test "x$WILDCARD_SYMS" = xno
22236 then
22237         cf_filter_syms=yes
22238 fi
22239
22240 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22241 if test $cf_filter_syms = yes
22242 then
22243         RESULTING_SYMS=resulting.map
22244 fi
22245
22246 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"
22247 ac_config_commands="$ac_config_commands default"
22248 cat >confcache <<\_ACEOF
22249 # This file is a shell script that caches the results of configure
22250 # tests run on this system so they can be shared between configure
22251 # scripts and configure runs, see configure's option --config-cache.
22252 # It is not useful on other systems.  If it contains results you don't
22253 # want to keep, you may remove or edit it.
22254 #
22255 # config.status only pays attention to the cache file if you give it
22256 # the --recheck option to rerun configure.
22257 #
22258 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22259 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22260 # following values.
22261
22262 _ACEOF
22263
22264 # The following way of writing the cache mishandles newlines in values,
22265 # but we know of no workaround that is simple, portable, and efficient.
22266 # So, don't put newlines in cache variables' values.
22267 # Ultrix sh set writes to stderr and can't be redirected directly,
22268 # and sets the high bit in the cache file unless we assign to the vars.
22269 {
22270   (set) 2>&1 |
22271     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22272     *ac_space=\ *)
22273       # `set' does not quote correctly, so add quotes (double-quote
22274       # substitution turns \\\\ into \\, and sed turns \\ into \).
22275       sed -n \
22276         "s/'/'\\\\''/g;
22277           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22278       ;;
22279     *)
22280       # `set' quotes correctly as required by POSIX, so do not add quotes.
22281       sed -n \
22282         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22283       ;;
22284     esac;
22285 } |
22286   sed '
22287      t clear
22288      : clear
22289      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22290      t end
22291      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22292      : end' >>confcache
22293 if cmp -s $cache_file confcache; then :; else
22294   if test -w $cache_file; then
22295     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22296     cat confcache >$cache_file
22297   else
22298     echo "not updating unwritable cache $cache_file"
22299   fi
22300 fi
22301 rm -f confcache
22302
22303 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22304 # Let make expand exec_prefix.
22305 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22306
22307 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22308 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22309 # trailing colons and then remove the whole line if VPATH becomes empty
22310 # (actually we leave an empty line to preserve line numbers).
22311 if test "x$srcdir" = x.; then
22312   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22313 s/:*\$(srcdir):*/:/;
22314 s/:*\${srcdir}:*/:/;
22315 s/:*@srcdir@:*/:/;
22316 s/^\([^=]*=[    ]*\):*/\1/;
22317 s/:*$//;
22318 s/^[^=]*=[      ]*$//;
22319 }'
22320 fi
22321
22322 DEFS=-DHAVE_CONFIG_H
22323
22324 : ${CONFIG_STATUS=./config.status}
22325 ac_clean_files_save=$ac_clean_files
22326 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22327 { echo "$as_me:22327: creating $CONFIG_STATUS" >&5
22328 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22329 cat >$CONFIG_STATUS <<_ACEOF
22330 #! $SHELL
22331 # Generated automatically by configure.
22332 # Run this file to recreate the current configuration.
22333 # Compiler output produced by configure, useful for debugging
22334 # configure, is in config.log if it exists.
22335
22336 debug=false
22337 SHELL=\${CONFIG_SHELL-$SHELL}
22338 ac_cs_invocation="\$0 \$@"
22339
22340 _ACEOF
22341
22342 cat >>$CONFIG_STATUS <<\_ACEOF
22343 # Be Bourne compatible
22344 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22345   emulate sh
22346   NULLCMD=:
22347 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22348   set -o posix
22349 fi
22350
22351 # Name of the executable.
22352 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22353
22354 if expr a : '\(a\)' >/dev/null 2>&1; then
22355   as_expr=expr
22356 else
22357   as_expr=false
22358 fi
22359
22360 rm -f conf$$ conf$$.exe conf$$.file
22361 echo >conf$$.file
22362 if ln -s conf$$.file conf$$ 2>/dev/null; then
22363   # We could just check for DJGPP; but this test a) works b) is more generic
22364   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22365   if test -f conf$$.exe; then
22366     # Don't use ln at all; we don't have any links
22367     as_ln_s='cp -p'
22368   else
22369     as_ln_s='ln -s'
22370   fi
22371 elif ln conf$$.file conf$$ 2>/dev/null; then
22372   as_ln_s=ln
22373 else
22374   as_ln_s='cp -p'
22375 fi
22376 rm -f conf$$ conf$$.exe conf$$.file
22377
22378 as_executable_p="test -f"
22379
22380 # Support unset when possible.
22381 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22382   as_unset=unset
22383 else
22384   as_unset=false
22385 fi
22386
22387 # NLS nuisances.
22388 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22389 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22390 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22391 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22392 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22393 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22394 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22395 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22396
22397 # IFS
22398 # We need space, tab and new line, in precisely that order.
22399 as_nl='
22400 '
22401 IFS="   $as_nl"
22402
22403 # CDPATH.
22404 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22405
22406 exec 6>&1
22407
22408 _ACEOF
22409
22410 # Files that config.status was made for.
22411 if test -n "$ac_config_files"; then
22412   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22413 fi
22414
22415 if test -n "$ac_config_headers"; then
22416   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22417 fi
22418
22419 if test -n "$ac_config_links"; then
22420   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22421 fi
22422
22423 if test -n "$ac_config_commands"; then
22424   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22425 fi
22426
22427 cat >>$CONFIG_STATUS <<\EOF
22428
22429 ac_cs_usage="\
22430 \`$as_me' instantiates files from templates according to the
22431 current configuration.
22432
22433 Usage: $0 [OPTIONS] [FILE]...
22434
22435   -h, --help       print this help, then exit
22436   -V, --version    print version number, then exit
22437   -d, --debug      don't remove temporary files
22438       --recheck    update $as_me by reconfiguring in the same conditions
22439   --file=FILE[:TEMPLATE]
22440                    instantiate the configuration file FILE
22441   --header=FILE[:TEMPLATE]
22442                    instantiate the configuration header FILE
22443
22444 Configuration files:
22445 $config_files
22446
22447 Configuration headers:
22448 $config_headers
22449
22450 Configuration commands:
22451 $config_commands
22452
22453 Report bugs to <dickey@invisible-island.net>."
22454 EOF
22455
22456 cat >>$CONFIG_STATUS <<EOF
22457 ac_cs_version="\\
22458 config.status
22459 configured by $0, generated by GNU Autoconf 2.52.20141204,
22460   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22461
22462 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22463 Free Software Foundation, Inc.
22464 This config.status script is free software; the Free Software Foundation
22465 gives unlimited permission to copy, distribute and modify it."
22466 srcdir=$srcdir
22467 INSTALL="$INSTALL"
22468 EOF
22469
22470 cat >>$CONFIG_STATUS <<\EOF
22471 # If no file are specified by the user, then we need to provide default
22472 # value.  By we need to know if files were specified by the user.
22473 ac_need_defaults=:
22474 while test $# != 0
22475 do
22476   case $1 in
22477   --*=*)
22478     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22479     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22480     shift
22481     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22482     shift
22483     ;;
22484   -*);;
22485   *) # This is not an option, so the user has probably given explicit
22486      # arguments.
22487      ac_need_defaults=false;;
22488   esac
22489
22490   case $1 in
22491   # Handling of the options.
22492 EOF
22493 cat >>$CONFIG_STATUS <<EOF
22494   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22495     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22496     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22497 EOF
22498 cat >>$CONFIG_STATUS <<\EOF
22499   --version | --vers* | -V )
22500     echo "$ac_cs_version"; exit 0 ;;
22501   --he | --h)
22502     # Conflict between --help and --header
22503     { { echo "$as_me:22503: error: ambiguous option: $1
22504 Try \`$0 --help' for more information." >&5
22505 echo "$as_me: error: ambiguous option: $1
22506 Try \`$0 --help' for more information." >&2;}
22507    { (exit 1); exit 1; }; };;
22508   --help | --hel | -h )
22509     echo "$ac_cs_usage"; exit 0 ;;
22510   --debug | --d* | -d )
22511     debug=: ;;
22512   --file | --fil | --fi | --f )
22513     shift
22514     CONFIG_FILES="$CONFIG_FILES $1"
22515     ac_need_defaults=false;;
22516   --header | --heade | --head | --hea )
22517     shift
22518     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22519     ac_need_defaults=false;;
22520
22521   # This is an error.
22522   -*) { { echo "$as_me:22522: error: unrecognized option: $1
22523 Try \`$0 --help' for more information." >&5
22524 echo "$as_me: error: unrecognized option: $1
22525 Try \`$0 --help' for more information." >&2;}
22526    { (exit 1); exit 1; }; } ;;
22527
22528   *) ac_config_targets="$ac_config_targets $1" ;;
22529
22530   esac
22531   shift
22532 done
22533
22534 exec 5>>config.log
22535 cat >&5 << _ACEOF
22536
22537 ## ----------------------- ##
22538 ## Running config.status.  ##
22539 ## ----------------------- ##
22540
22541 This file was extended by $as_me 2.52.20141204, executed with
22542   CONFIG_FILES    = $CONFIG_FILES
22543   CONFIG_HEADERS  = $CONFIG_HEADERS
22544   CONFIG_LINKS    = $CONFIG_LINKS
22545   CONFIG_COMMANDS = $CONFIG_COMMANDS
22546   > $ac_cs_invocation
22547 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22548
22549 _ACEOF
22550 EOF
22551
22552 cat >>$CONFIG_STATUS <<EOF
22553 #
22554 # INIT-COMMANDS section.
22555 #
22556
22557 ### Special initialization commands, used to pass information from the
22558 ### configuration-run into config.status
22559
22560 AWK="$AWK"
22561 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22562 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22563 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22564 ECHO_LD="$ECHO_LD"
22565 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22566 LDCONFIG="$LDCONFIG"
22567 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22568 LIB_NAME="$LIB_NAME"
22569 LIB_PREFIX="$LIB_PREFIX"
22570 LIB_SUBSETS="$LIB_SUBSETS"
22571 LIB_SUFFIX="$LIB_SUFFIX"
22572 LIB_TRACING="$LIB_TRACING"
22573 LN_S="$LN_S"
22574 MAKE_TERMINFO="$MAKE_TERMINFO"
22575 NCURSES_MAJOR="$NCURSES_MAJOR"
22576 NCURSES_MINOR="$NCURSES_MINOR"
22577 NCURSES_OSPEED="$NCURSES_OSPEED"
22578 NCURSES_PATCH="$NCURSES_PATCH"
22579 SRC_SUBDIRS="$SRC_SUBDIRS"
22580 TERMINFO="$TERMINFO"
22581 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22582 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22583 TICS_NAME="$TICS_NAME"
22584 TIC_PATH="$TIC_PATH"
22585 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22586 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22587 TINFO_NAME="$TINFO_NAME"
22588 TINFO_SUFFIX="$TINFO_SUFFIX"
22589 UNALTERED_SYMS="$UNALTERED_SYMS"
22590 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22591 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22592 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22593 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22594 WILDCARD_SYMS="$WILDCARD_SYMS"
22595 WITH_CURSES_H="$with_curses_h"
22596 WITH_ECHO="${enable_echo:=yes}"
22597 WITH_OVERWRITE="$with_overwrite"
22598 cf_LIST_MODELS="$cf_list_models"
22599 cf_cv_abi_version="$cf_cv_abi_version"
22600 cf_cv_do_relink="$cf_cv_do_relink"
22601 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22602 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22603 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22604 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22605 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22606 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22607 cf_cv_rel_version="$cf_cv_rel_version"
22608 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22609 cf_cv_shared_soname='$cf_cv_shared_soname'
22610 cf_cv_shlib_version="$cf_cv_shlib_version"
22611 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22612 cf_cv_system_name="$cf_cv_system_name"
22613 cf_cv_term_driver="$with_term_driver"
22614 cf_with_ada="$cf_with_ada"
22615 cf_with_cxx_binding="$cf_with_cxx_binding"
22616 cf_with_db_install="$cf_with_db_install"
22617 cf_with_manpages="$cf_with_manpages"
22618 cf_with_tests="$cf_with_tests"
22619 host="$host"
22620 target="$target"
22621 with_shared_cxx="$with_shared_cxx"
22622
22623 EOF
22624
22625 cat >>$CONFIG_STATUS <<\EOF
22626 for ac_config_target in $ac_config_targets
22627 do
22628   case "$ac_config_target" in
22629   # Handling of arguments.
22630   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22631   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22632   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22633   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22634   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22635   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22636   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22637   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22638   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22639   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22640   *) { { echo "$as_me:22640: error: invalid argument: $ac_config_target" >&5
22641 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22642    { (exit 1); exit 1; }; };;
22643   esac
22644 done
22645
22646 # If the user did not use the arguments to specify the items to instantiate,
22647 # then the envvar interface is used.  Set only those that are not.
22648 # We use the long form for the default assignment because of an extremely
22649 # bizarre bug on SunOS 4.1.3.
22650 if $ac_need_defaults; then
22651   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22652   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22653   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22654 fi
22655
22656 # Create a temporary directory, and hook for its removal unless debugging.
22657 $debug ||
22658 {
22659   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22660   trap '{ (exit 1); exit 1; }' 1 2 13 15
22661 }
22662
22663 # Create a (secure) tmp directory for tmp files.
22664 : ${TMPDIR=/tmp}
22665 {
22666   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22667   test -n "$tmp" && test -d "$tmp"
22668 }  ||
22669 {
22670   tmp=$TMPDIR/cs$$-$RANDOM
22671   (umask 077 && mkdir $tmp)
22672 } ||
22673 {
22674    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22675    { (exit 1); exit 1; }
22676 }
22677
22678 EOF
22679
22680 cat >>$CONFIG_STATUS <<EOF
22681
22682 #
22683 # CONFIG_FILES section.
22684 #
22685
22686 # No need to generate the scripts if there are no CONFIG_FILES.
22687 # This happens for instance when ./config.status config.h
22688 if test -n "\$CONFIG_FILES"; then
22689   # Protect against being on the right side of a sed subst in config.status.
22690   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22691    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22692 s,@SHELL@,$SHELL,;t t
22693 s,@exec_prefix@,$exec_prefix,;t t
22694 s,@prefix@,$prefix,;t t
22695 s,@program_transform_name@,$program_transform_name,;t t
22696 s,@bindir@,$bindir,;t t
22697 s,@sbindir@,$sbindir,;t t
22698 s,@libexecdir@,$libexecdir,;t t
22699 s,@datarootdir@,$datarootdir,;t t
22700 s,@datadir@,$datadir,;t t
22701 s,@sysconfdir@,$sysconfdir,;t t
22702 s,@sharedstatedir@,$sharedstatedir,;t t
22703 s,@localstatedir@,$localstatedir,;t t
22704 s,@libdir@,$libdir,;t t
22705 s,@includedir@,$includedir,;t t
22706 s,@oldincludedir@,$oldincludedir,;t t
22707 s,@infodir@,$infodir,;t t
22708 s,@mandir@,$mandir,;t t
22709 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22710 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22711 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22712 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22713 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22714 s,@build_alias@,$build_alias,;t t
22715 s,@host_alias@,$host_alias,;t t
22716 s,@target_alias@,$target_alias,;t t
22717 s,@ECHO_C@,$ECHO_C,;t t
22718 s,@ECHO_N@,$ECHO_N,;t t
22719 s,@ECHO_T@,$ECHO_T,;t t
22720 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22721 s,@DEFS@,$DEFS,;t t
22722 s,@LIBS@,$LIBS,;t t
22723 s,@top_builddir@,$top_builddir,;t t
22724 s,@EGREP@,$EGREP,;t t
22725 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22726 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22727 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22728 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22729 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22730 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22731 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22732 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22733 s,@VERSION@,$VERSION,;t t
22734 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22735 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22736 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22737 s,@PACKAGE@,$PACKAGE,;t t
22738 s,@build@,$build,;t t
22739 s,@build_cpu@,$build_cpu,;t t
22740 s,@build_vendor@,$build_vendor,;t t
22741 s,@build_os@,$build_os,;t t
22742 s,@host@,$host,;t t
22743 s,@host_cpu@,$host_cpu,;t t
22744 s,@host_vendor@,$host_vendor,;t t
22745 s,@host_os@,$host_os,;t t
22746 s,@target@,$target,;t t
22747 s,@target_cpu@,$target_cpu,;t t
22748 s,@target_vendor@,$target_vendor,;t t
22749 s,@target_os@,$target_os,;t t
22750 s,@CC@,$CC,;t t
22751 s,@CFLAGS@,$CFLAGS,;t t
22752 s,@LDFLAGS@,$LDFLAGS,;t t
22753 s,@CPPFLAGS@,$CPPFLAGS,;t t
22754 s,@ac_ct_CC@,$ac_ct_CC,;t t
22755 s,@EXEEXT@,$EXEEXT,;t t
22756 s,@OBJEXT@,$OBJEXT,;t t
22757 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22758 s,@CPP@,$CPP,;t t
22759 s,@LDCONFIG@,$LDCONFIG,;t t
22760 s,@CXX@,$CXX,;t t
22761 s,@CXXFLAGS@,$CXXFLAGS,;t t
22762 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22763 s,@AWK@,$AWK,;t t
22764 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22765 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22766 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22767 s,@LINT@,$LINT,;t t
22768 s,@LINT_OPTS@,$LINT_OPTS,;t t
22769 s,@LN_S@,$LN_S,;t t
22770 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22771 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22772 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22773 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22774 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22775 s,@SET_MAKE@,$SET_MAKE,;t t
22776 s,@CTAGS@,$CTAGS,;t t
22777 s,@ETAGS@,$ETAGS,;t t
22778 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22779 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22780 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22781 s,@RANLIB@,$RANLIB,;t t
22782 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22783 s,@LD@,$LD,;t t
22784 s,@ac_ct_LD@,$ac_ct_LD,;t t
22785 s,@AR@,$AR,;t t
22786 s,@ac_ct_AR@,$ac_ct_AR,;t t
22787 s,@NM@,$NM,;t t
22788 s,@ac_ct_NM@,$ac_ct_NM,;t t
22789 s,@ARFLAGS@,$ARFLAGS,;t t
22790 s,@DESTDIR@,$DESTDIR,;t t
22791 s,@BUILD_CC@,$BUILD_CC,;t t
22792 s,@BUILD_CPP@,$BUILD_CPP,;t t
22793 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22794 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22795 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22796 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22797 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22798 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22799 s,@cf_list_models@,$cf_list_models,;t t
22800 s,@ABI_VERSION@,$ABI_VERSION,;t t
22801 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22802 s,@LIBTOOL@,$LIBTOOL,;t t
22803 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22804 s,@LT_UNDEF@,$LT_UNDEF,;t t
22805 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22806 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22807 s,@LIB_CREATE@,$LIB_CREATE,;t t
22808 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22809 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22810 s,@LIB_PREP@,$LIB_PREP,;t t
22811 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22812 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22813 s,@LIB_LINK@,$LIB_LINK,;t t
22814 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22815 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22816 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22817 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22818 s,@TICS_NAME@,$TICS_NAME,;t t
22819 s,@TINFO_NAME@,$TINFO_NAME,;t t
22820 s,@LIB_NAME@,$LIB_NAME,;t t
22821 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22822 s,@CC_G_OPT@,$CC_G_OPT,;t t
22823 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22824 s,@LD_MODEL@,$LD_MODEL,;t t
22825 s,@shlibdir@,$shlibdir,;t t
22826 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22827 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22828 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22829 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22830 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22831 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22832 s,@LINK_PROGS@,$LINK_PROGS,;t t
22833 s,@LINK_TESTS@,$LINK_TESTS,;t t
22834 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22835 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22836 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22837 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22838 s,@RPATH_LIST@,$RPATH_LIST,;t t
22839 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22840 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22841 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22842 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22843 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22844 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
22845 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22846 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22847 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22848 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22849 s,@XTERM_KBS@,$XTERM_KBS,;t t
22850 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22851 s,@TERMINFO@,$TERMINFO,;t t
22852 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22853 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22854 s,@TERMPATH@,$TERMPATH,;t t
22855 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22856 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22857 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22858 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22859 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22860 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22861 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22862 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22863 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22864 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22865 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22866 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22867 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22868 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22869 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22870 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22871 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22872 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22873 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22874 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22875 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22876 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22877 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22878 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22879 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22880 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22881 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22882 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22883 s,@PTHREAD@,$PTHREAD,;t t
22884 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22885 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22886 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22887 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22888 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22889 s,@ECHO_LT@,$ECHO_LT,;t t
22890 s,@ECHO_LD@,$ECHO_LD,;t t
22891 s,@RULE_CC@,$RULE_CC,;t t
22892 s,@SHOW_CC@,$SHOW_CC,;t t
22893 s,@ECHO_CC@,$ECHO_CC,;t t
22894 s,@ECHO_LINK@,$ECHO_LINK,;t t
22895 s,@ADAFLAGS@,$ADAFLAGS,;t t
22896 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22897 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22898 s,@ADA_TRACE@,$ADA_TRACE,;t t
22899 s,@MATH_LIB@,$MATH_LIB,;t t
22900 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22901 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22902 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22903 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22904 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22905 s,@TEST_LIBS@,$TEST_LIBS,;t t
22906 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22907 s,@CXXCPP@,$CXXCPP,;t t
22908 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22909 s,@CXX_AR@,$CXX_AR,;t t
22910 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22911 s,@CXXLIBS@,$CXXLIBS,;t t
22912 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22913 s,@gnat_exists@,$gnat_exists,;t t
22914 s,@M4_exists@,$M4_exists,;t t
22915 s,@cf_ada_make@,$cf_ada_make,;t t
22916 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22917 s,@cf_compile_generics@,$cf_compile_generics,;t t
22918 s,@cf_generic_objects@,$cf_generic_objects,;t t
22919 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22920 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22921 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22922 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22923 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22924 s,@cf_ada_package@,$cf_ada_package,;t t
22925 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22926 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22927 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22928 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22929 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22930 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22931 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22932 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22933 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22934 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
22935 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
22936 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
22937 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22938 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22939 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22940 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22941 s,@TICS_LIBS@,$TICS_LIBS,;t t
22942 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22943 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22944 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22945 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22946 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22947 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22948 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22949 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22950 s,@includesubdir@,$includesubdir,;t t
22951 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22952 s,@TICS_LIST@,$TICS_LIST,;t t
22953 s,@TINFO_LIST@,$TINFO_LIST,;t t
22954 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22955 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22956 s,@TEST_ARGS@,$TEST_ARGS,;t t
22957 s,@TEST_DEPS@,$TEST_DEPS,;t t
22958 s,@TEST_ARG2@,$TEST_ARG2,;t t
22959 s,@TEST_DEP2@,$TEST_DEP2,;t t
22960 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22961 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22962 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22963 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22964 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22965 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22966 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22967 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22968 s,@cross_compiling@,$cross_compiling,;t t
22969 s,@TIC_PATH@,$TIC_PATH,;t t
22970 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22971 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22972 s,@PANEL_NAME@,$PANEL_NAME,;t t
22973 s,@MENU_NAME@,$MENU_NAME,;t t
22974 s,@FORM_NAME@,$FORM_NAME,;t t
22975 s,@CXX_NAME@,$CXX_NAME,;t t
22976 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
22977 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22978 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22979 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
22980 CEOF
22981
22982 EOF
22983
22984   cat >>$CONFIG_STATUS <<\EOF
22985   # Split the substitutions into bite-sized pieces for seds with
22986   # small command number limits, like on Digital OSF/1 and HP-UX.
22987   ac_max_sed_lines=48
22988   ac_sed_frag=1 # Number of current file.
22989   ac_beg=1 # First line for current file.
22990   ac_end=$ac_max_sed_lines # Line after last line for current file.
22991   ac_more_lines=:
22992   ac_sed_cmds=
22993   while $ac_more_lines; do
22994     if test $ac_beg -gt 1; then
22995       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22996     else
22997       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22998     fi
22999     if test ! -s $tmp/subs.frag; then
23000       ac_more_lines=false
23001     else
23002       # The purpose of the label and of the branching condition is to
23003       # speed up the sed processing (if there are no `@' at all, there
23004       # is no need to browse any of the substitutions).
23005       # These are the two extra sed commands mentioned above.
23006       (echo ':t
23007   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23008       if test -z "$ac_sed_cmds"; then
23009         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23010       else
23011         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23012       fi
23013       ac_sed_frag=`expr $ac_sed_frag + 1`
23014       ac_beg=$ac_end
23015       ac_end=`expr $ac_end + $ac_max_sed_lines`
23016     fi
23017   done
23018   if test -z "$ac_sed_cmds"; then
23019     ac_sed_cmds=cat
23020   fi
23021 fi # test -n "$CONFIG_FILES"
23022
23023 EOF
23024 cat >>$CONFIG_STATUS <<\EOF
23025 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23026   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23027   case $ac_file in
23028   - | *:- | *:-:* ) # input from stdin
23029         cat >$tmp/stdin
23030         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23031         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23032   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23033         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23034   * )   ac_file_in=$ac_file.in ;;
23035   esac
23036
23037   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23038   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23039          X"$ac_file" : 'X\(//\)[^/]' \| \
23040          X"$ac_file" : 'X\(//\)$' \| \
23041          X"$ac_file" : 'X\(/\)' \| \
23042          .     : '\(.\)' 2>/dev/null ||
23043 echo X"$ac_file" |
23044     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23045           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23046           /^X\(\/\/\)$/{ s//\1/; q; }
23047           /^X\(\/\).*/{ s//\1/; q; }
23048           s/.*/./; q'`
23049   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23050     { case "$ac_dir" in
23051   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23052   *)                      as_incr_dir=.;;
23053 esac
23054 as_dummy="$ac_dir"
23055 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23056   case $as_mkdir_dir in
23057     # Skip DOS drivespec
23058     ?:) as_incr_dir=$as_mkdir_dir ;;
23059     *)
23060       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23061       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23062     ;;
23063   esac
23064 done; }
23065
23066     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23067     # A "../" for each directory in $ac_dir_suffix.
23068     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23069   else
23070     ac_dir_suffix= ac_dots=
23071   fi
23072
23073   case $srcdir in
23074   .)  ac_srcdir=.
23075       if test -z "$ac_dots"; then
23076          ac_top_srcdir=.
23077       else
23078          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23079       fi ;;
23080   [\\/]* | ?:[\\/]* )
23081       ac_srcdir=$srcdir$ac_dir_suffix;
23082       ac_top_srcdir=$srcdir ;;
23083   *) # Relative path.
23084     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23085     ac_top_srcdir=$ac_dots$srcdir ;;
23086   esac
23087
23088   case $INSTALL in
23089   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23090   *) ac_INSTALL=$ac_dots$INSTALL ;;
23091   esac
23092
23093   if test x"$ac_file" != x-; then
23094     { echo "$as_me:23094: creating $ac_file" >&5
23095 echo "$as_me: creating $ac_file" >&6;}
23096     rm -f "$ac_file"
23097   fi
23098   # Let's still pretend it is `configure' which instantiates (i.e., don't
23099   # use $as_me), people would be surprised to read:
23100   #    /* config.h.  Generated automatically by config.status.  */
23101   configure_input="Generated automatically from `echo $ac_file_in |
23102                                                  sed 's,.*/,,'` by configure."
23103
23104   # First look for the input files in the build tree, otherwise in the
23105   # src tree.
23106   ac_file_inputs=`IFS=:
23107     for f in $ac_file_in; do
23108       case $f in
23109       -) echo $tmp/stdin ;;
23110       [\\/$]*)
23111          # Absolute (can't be DOS-style, as IFS=:)
23112          test -f "$f" || { { echo "$as_me:23112: error: cannot find input file: $f" >&5
23113 echo "$as_me: error: cannot find input file: $f" >&2;}
23114    { (exit 1); exit 1; }; }
23115          echo $f;;
23116       *) # Relative
23117          if test -f "$f"; then
23118            # Build tree
23119            echo $f
23120          elif test -f "$srcdir/$f"; then
23121            # Source tree
23122            echo $srcdir/$f
23123          else
23124            # /dev/null tree
23125            { { echo "$as_me:23125: error: cannot find input file: $f" >&5
23126 echo "$as_me: error: cannot find input file: $f" >&2;}
23127    { (exit 1); exit 1; }; }
23128          fi;;
23129       esac
23130     done` || { (exit 1); exit 1; }
23131 EOF
23132 cat >>$CONFIG_STATUS <<\EOF
23133   ac_warn_datarootdir=no
23134   if test x"$ac_file" != x-; then
23135     for ac_item in $ac_file_inputs
23136     do
23137       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23138       if test -n "$ac_seen"; then
23139         ac_used=`grep '@datarootdir@' $ac_item`
23140         if test -z "$ac_used"; then
23141           { echo "$as_me:23141: WARNING: datarootdir was used implicitly but not set:
23142 $ac_seen" >&5
23143 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23144 $ac_seen" >&2;}
23145           ac_warn_datarootdir=yes
23146         fi
23147       fi
23148       ac_seen=`grep '${datarootdir}' $ac_item`
23149       if test -n "$ac_seen"; then
23150         { echo "$as_me:23150: WARNING: datarootdir was used explicitly but not set:
23151 $ac_seen" >&5
23152 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23153 $ac_seen" >&2;}
23154         ac_warn_datarootdir=yes
23155       fi
23156     done
23157   fi
23158
23159 if test "x$ac_warn_datarootdir" = xyes; then
23160   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23161 fi
23162
23163 EOF
23164 cat >>$CONFIG_STATUS <<EOF
23165   sed "$ac_vpsub
23166 $extrasub
23167 EOF
23168 cat >>$CONFIG_STATUS <<\EOF
23169 :t
23170 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23171 s,@configure_input@,$configure_input,;t t
23172 s,@srcdir@,$ac_srcdir,;t t
23173 s,@top_srcdir@,$ac_top_srcdir,;t t
23174 s,@INSTALL@,$ac_INSTALL,;t t
23175 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23176   rm -f $tmp/stdin
23177   if test x"$ac_file" != x-; then
23178     cp $tmp/out $ac_file
23179
23180     for ac_name in prefix exec_prefix datarootdir
23181     do
23182         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23183         if test -n "$ac_seen"; then
23184             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23185             if test -z "$ac_init"; then
23186               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23187               { echo "$as_me:23187: WARNING: Variable $ac_name is used but was not set:
23188 $ac_seen" >&5
23189 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23190 $ac_seen" >&2;}
23191             fi
23192         fi
23193     done
23194     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23195     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23196     if test -s $tmp/out; then
23197       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23198       { echo "$as_me:23198: WARNING: Some variables may not be substituted:
23199 $ac_seen" >&5
23200 echo "$as_me: WARNING: Some variables may not be substituted:
23201 $ac_seen" >&2;}
23202     fi
23203   else
23204     cat $tmp/out
23205   fi
23206   rm -f $tmp/out
23207
23208 done
23209 EOF
23210 cat >>$CONFIG_STATUS <<\EOF
23211
23212 #
23213 # CONFIG_HEADER section.
23214 #
23215
23216 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23217 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23218 #
23219 # ac_d sets the value in "#define NAME VALUE" lines.
23220 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23221 ac_dB='[        ].*$,\1#\2'
23222 ac_dC=' '
23223 ac_dD=',;t'
23224 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23225 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23226 ac_iB='\([      ]\),\1#\2define\3'
23227 ac_iC=' '
23228 ac_iD='\4,;t'
23229 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23230 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23231 ac_uB='$,\1#\2define\3'
23232 ac_uC=' '
23233 ac_uD=',;t'
23234
23235 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23236   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23237   case $ac_file in
23238   - | *:- | *:-:* ) # input from stdin
23239         cat >$tmp/stdin
23240         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23241         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23242   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23243         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23244   * )   ac_file_in=$ac_file.in ;;
23245   esac
23246
23247   test x"$ac_file" != x- && { echo "$as_me:23247: creating $ac_file" >&5
23248 echo "$as_me: creating $ac_file" >&6;}
23249
23250   # First look for the input files in the build tree, otherwise in the
23251   # src tree.
23252   ac_file_inputs=`IFS=:
23253     for f in $ac_file_in; do
23254       case $f in
23255       -) echo $tmp/stdin ;;
23256       [\\/$]*)
23257          # Absolute (can't be DOS-style, as IFS=:)
23258          test -f "$f" || { { echo "$as_me:23258: error: cannot find input file: $f" >&5
23259 echo "$as_me: error: cannot find input file: $f" >&2;}
23260    { (exit 1); exit 1; }; }
23261          echo $f;;
23262       *) # Relative
23263          if test -f "$f"; then
23264            # Build tree
23265            echo $f
23266          elif test -f "$srcdir/$f"; then
23267            # Source tree
23268            echo $srcdir/$f
23269          else
23270            # /dev/null tree
23271            { { echo "$as_me:23271: error: cannot find input file: $f" >&5
23272 echo "$as_me: error: cannot find input file: $f" >&2;}
23273    { (exit 1); exit 1; }; }
23274          fi;;
23275       esac
23276     done` || { (exit 1); exit 1; }
23277   # Remove the trailing spaces.
23278   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23279
23280 EOF
23281
23282 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23283 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23284 # be either 'cat' or 'sort'.
23285 cat confdefs.h | uniq >conftest.vals
23286
23287 # Break up conftest.vals because some shells have a limit on
23288 # the size of here documents, and old seds have small limits too.
23289
23290 rm -f conftest.tail
23291 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23292 while grep . conftest.vals >/dev/null
23293 do
23294   # Write chunks of a limited-size here document to conftest.frag.
23295   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23296   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23297   echo 'CEOF' >> $CONFIG_STATUS
23298   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23299   rm -f conftest.vals
23300   mv conftest.tail conftest.vals
23301 done
23302 rm -f conftest.vals
23303
23304 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23305 # marker @DEFS@.
23306 echo '  cat >> conftest.edit <<CEOF
23307 /@DEFS@/r conftest.frag
23308 /@DEFS@/d
23309 CEOF
23310 sed -f conftest.edit $tmp/in > $tmp/out
23311 rm -f $tmp/in
23312 mv $tmp/out $tmp/in
23313 rm -f conftest.edit conftest.frag
23314 ' >> $CONFIG_STATUS
23315
23316 cat >>$CONFIG_STATUS <<\EOF
23317   # Let's still pretend it is `configure' which instantiates (i.e., don't
23318   # use $as_me), people would be surprised to read:
23319   #    /* config.h.  Generated automatically by config.status.  */
23320   if test x"$ac_file" = x-; then
23321     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23322   else
23323     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23324   fi
23325   cat $tmp/in >>$tmp/config.h
23326   rm -f $tmp/in
23327   if test x"$ac_file" != x-; then
23328     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23329       { echo "$as_me:23329: $ac_file is unchanged" >&5
23330 echo "$as_me: $ac_file is unchanged" >&6;}
23331     else
23332       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23333          X"$ac_file" : 'X\(//\)[^/]' \| \
23334          X"$ac_file" : 'X\(//\)$' \| \
23335          X"$ac_file" : 'X\(/\)' \| \
23336          .     : '\(.\)' 2>/dev/null ||
23337 echo X"$ac_file" |
23338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23339           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23340           /^X\(\/\/\)$/{ s//\1/; q; }
23341           /^X\(\/\).*/{ s//\1/; q; }
23342           s/.*/./; q'`
23343       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23344         { case "$ac_dir" in
23345   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23346   *)                      as_incr_dir=.;;
23347 esac
23348 as_dummy="$ac_dir"
23349 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23350   case $as_mkdir_dir in
23351     # Skip DOS drivespec
23352     ?:) as_incr_dir=$as_mkdir_dir ;;
23353     *)
23354       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23355       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23356     ;;
23357   esac
23358 done; }
23359
23360       fi
23361       rm -f $ac_file
23362       mv $tmp/config.h $ac_file
23363     fi
23364   else
23365     cat $tmp/config.h
23366     rm -f $tmp/config.h
23367   fi
23368 done
23369 EOF
23370 cat >>$CONFIG_STATUS <<\EOF
23371 #
23372 # CONFIG_COMMANDS section.
23373 #
23374 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23375   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23376   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23377
23378   case $ac_dest in
23379     default )
23380 if test "x$cf_with_tests" != xno ; then
23381
23382 for cf_dir in test
23383 do
23384         if test ! -d $srcdir/$cf_dir; then
23385                 continue
23386         elif test -f $srcdir/$cf_dir/programs; then
23387                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23388         fi
23389 done
23390
23391 fi
23392
23393 cf_prefix=$LIB_PREFIX
23394
23395 case $cf_cv_shlib_version in
23396 (cygdll|msysdll|mingw)
23397         TINFO_NAME=$TINFO_ARG_SUFFIX
23398         TINFO_SUFFIX=.dll
23399         ;;
23400 esac
23401
23402 if test -n "$TINFO_SUFFIX" ; then
23403         case $TINFO_SUFFIX in
23404         (tw*)
23405                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23406                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23407                 ;;
23408         (t*)
23409                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23410                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23411                 ;;
23412         (w*)
23413                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23414                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23415                 ;;
23416         esac
23417 fi
23418
23419 for cf_dir in $SRC_SUBDIRS
23420 do
23421         if test ! -d $srcdir/$cf_dir ; then
23422                 continue
23423         elif test -f $srcdir/$cf_dir/modules; then
23424
23425                 SHARED_LIB=
23426                 Libs_To_Make=
23427
23428                 cf_sed_options=
23429                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23430                 then
23431                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23432                 fi
23433
23434                 if test "x$WILDCARD_SYMS" = xno
23435                 then
23436                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23437                 fi
23438
23439                 if test "x$cf_sed_options" != "x"
23440                 then
23441                         cat >>$cf_dir/Makefile <<CF_EOF
23442
23443 # Generated by CF_LIB_RULES
23444 resulting.map: $UNALTERED_SYMS
23445         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23446
23447 clean::
23448         rm -f resulting.map
23449 CF_EOF
23450                 fi
23451
23452                 for cf_item in $cf_LIST_MODELS
23453                 do
23454
23455         case X$cf_item in
23456         (Xlibtool)
23457                 cf_suffix='.la'
23458                 cf_depsuf=$cf_suffix
23459                 ;;
23460         (Xdebug)
23461                 cf_suffix='_g.a'
23462                 cf_depsuf=$cf_suffix
23463                 ;;
23464         (Xprofile)
23465                 cf_suffix='_p.a'
23466                 cf_depsuf=$cf_suffix
23467                 ;;
23468         (Xshared)
23469                 case $cf_cv_system_name in
23470                 (aix[5-7]*)
23471                         cf_suffix='.so'
23472                         cf_depsuf=$cf_suffix
23473                         ;;
23474                 (cygwin*|msys*|mingw*)
23475                         cf_suffix='.dll'
23476                         cf_depsuf='.dll.a'
23477                         ;;
23478                 (darwin*)
23479                         cf_suffix='.dylib'
23480                         cf_depsuf=$cf_suffix
23481                         ;;
23482                 (hpux*)
23483                         case $target in
23484                         (ia64*)
23485                                 cf_suffix='.so'
23486                                 cf_depsuf=$cf_suffix
23487                                 ;;
23488                         (*)
23489                                 cf_suffix='.sl'
23490                                 cf_depsuf=$cf_suffix
23491                                 ;;
23492                         esac
23493                         ;;
23494                 (*)
23495                         cf_suffix='.so'
23496                         cf_depsuf=$cf_suffix
23497                         ;;
23498                 esac
23499                 ;;
23500         (*)
23501                 cf_suffix='.a'
23502                 cf_depsuf=$cf_suffix
23503                 ;;
23504         esac
23505         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23506         then
23507                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23508                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23509         fi
23510
23511                         cf_libname=$cf_dir
23512                         test "$cf_dir" = c++ && cf_libname=ncurses++
23513                         if test $cf_item = shared ; then
23514                                 if test -n "${LIB_SUFFIX}"
23515                                 then
23516                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23517                                 else
23518                                         cf_shared_suffix="$cf_suffix"
23519                                 fi
23520                                 if test "$cf_cv_do_symlinks" = yes ; then
23521                                         cf_version_name=
23522
23523                                         case "$cf_cv_shlib_version" in
23524                                         (rel)
23525                                                 cf_version_name=REL_VERSION
23526                                                 ;;
23527                                         (abi)
23528                                                 cf_version_name=ABI_VERSION
23529                                                 ;;
23530                                         esac
23531
23532                                         if test -n "$cf_version_name"
23533                                         then
23534                                                 case "$cf_cv_system_name" in
23535                                                 (darwin*)
23536                                                         # "w", etc?
23537                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23538                                                         ;;
23539                                                 (*)
23540                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23541                                                         ;;
23542                                                 esac
23543                                         fi
23544                                         if test -n "${USE_LIB_SUFFIX}"
23545                                         then
23546                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23547                                         else
23548                                                 cf_shared_suffix="$cf_suffix"
23549                                         fi
23550                                 fi
23551                                 # cygwin needs import library, and has unique naming convention
23552                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23553                                 # use 'cyg' prefix for shared lib.
23554                                 case $cf_cv_shlib_version in
23555                                 (cygdll)
23556                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23557                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23558                                         ;;
23559                                 (msysdll)
23560                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23561                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23562                                         ;;
23563                                 (mingw)
23564                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23565                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23566                                         ;;
23567                                 (*)
23568                                         cf_add_lib=
23569                                         ;;
23570                                 esac
23571                                 if test -n "$cf_add_lib"
23572                                 then
23573                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23574                                         continue
23575                                 fi
23576                         fi
23577                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23578                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23579                 done
23580
23581                 if test $cf_dir = ncurses ; then
23582                         cf_subsets="$LIB_SUBSETS"
23583                         cf_r_parts="$cf_subsets"
23584                         cf_liblist="$Libs_To_Make"
23585
23586                         while test -n "$cf_r_parts"
23587                         do
23588                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23589                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23590                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23591                                         cf_add_lib=
23592                                         case $cf_l_parts in
23593                                         (*termlib*)
23594                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23595                                                 ;;
23596                                         (*ticlib*)
23597                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23598                                                 ;;
23599                                         (*)
23600                                                 break
23601                                                 ;;
23602                                         esac
23603                                         if test -n "$cf_add_lib"; then
23604                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23605                                         fi
23606                                 else
23607                                         break
23608                                 fi
23609                         done
23610                 else
23611                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23612                 fi
23613
23614                 if test $cf_dir = c++; then
23615                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23616                                 cf_list=
23617                                 for cf_item in $Libs_To_Make
23618                                 do
23619                                         case $cf_item in
23620                                         (*.a)
23621                                                 ;;
23622                                         (*)
23623                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23624                                                 ;;
23625                                         esac
23626                                         for cf_test in $cf_list
23627                                         do
23628                                                 if test "$cf_test" = "$cf_item"
23629                                                 then
23630                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23631                                                         cf_item=
23632                                                         break
23633                                                 fi
23634                                         done
23635                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23636                                 done
23637                                 Libs_To_Make="$cf_list"
23638                         fi
23639                 fi
23640
23641                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23642                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23643                         $cf_dir/Makefile >$cf_dir/Makefile.out
23644                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23645
23646                 $AWK -f $srcdir/mk-0th.awk \
23647                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23648                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23649
23650                 for cf_subset in $cf_subsets
23651                 do
23652                         cf_subdirs=
23653                         for cf_item in $cf_LIST_MODELS
23654                         do
23655
23656                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23657
23658 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23659
23660                         CXX_MODEL=$cf_ITEM
23661                         if test "$CXX_MODEL" = SHARED; then
23662                                 case $cf_cv_shlib_version in
23663                                 (cygdll|msysdll|mingw)
23664                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23665
23666 echo "${as_me:-configure}:23666: testing overriding CXX_MODEL to SHARED ..." 1>&5
23667
23668                                         with_shared_cxx=yes
23669                                         ;;
23670                                 (*)
23671                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23672                                         ;;
23673                                 esac
23674                         fi
23675
23676         case X$cf_item in
23677         (Xlibtool)
23678                 cf_suffix='.la'
23679                 cf_depsuf=$cf_suffix
23680                 ;;
23681         (Xdebug)
23682                 cf_suffix='_g.a'
23683                 cf_depsuf=$cf_suffix
23684                 ;;
23685         (Xprofile)
23686                 cf_suffix='_p.a'
23687                 cf_depsuf=$cf_suffix
23688                 ;;
23689         (Xshared)
23690                 case $cf_cv_system_name in
23691                 (aix[5-7]*)
23692                         cf_suffix='.so'
23693                         cf_depsuf=$cf_suffix
23694                         ;;
23695                 (cygwin*|msys*|mingw*)
23696                         cf_suffix='.dll'
23697                         cf_depsuf='.dll.a'
23698                         ;;
23699                 (darwin*)
23700                         cf_suffix='.dylib'
23701                         cf_depsuf=$cf_suffix
23702                         ;;
23703                 (hpux*)
23704                         case $target in
23705                         (ia64*)
23706                                 cf_suffix='.so'
23707                                 cf_depsuf=$cf_suffix
23708                                 ;;
23709                         (*)
23710                                 cf_suffix='.sl'
23711                                 cf_depsuf=$cf_suffix
23712                                 ;;
23713                         esac
23714                         ;;
23715                 (*)
23716                         cf_suffix='.so'
23717                         cf_depsuf=$cf_suffix
23718                         ;;
23719                 esac
23720                 ;;
23721         (*)
23722                 cf_suffix='.a'
23723                 cf_depsuf=$cf_suffix
23724                 ;;
23725         esac
23726         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23727         then
23728                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23729                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23730         fi
23731
23732         case $cf_item in
23733         (libtool) cf_subdir='obj_lo'  ;;
23734         (normal)  cf_subdir='objects' ;;
23735         (debug)   cf_subdir='obj_g' ;;
23736         (profile) cf_subdir='obj_p' ;;
23737         (shared)
23738                 case $cf_cv_system_name in
23739                 (cygwin|msys)
23740                         cf_subdir='objects' ;;
23741                 (*)
23742                         cf_subdir='obj_s' ;;
23743                 esac
23744         esac
23745
23746                         # Test for case where we build libtinfo with a different name.
23747                         cf_libname=$cf_dir
23748                         if test $cf_dir = ncurses ; then
23749                                 case $cf_subset in
23750                                 (*base*)
23751                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
23752                                         ;;
23753                                 (*termlib*)
23754                                         cf_libname=$TINFO_LIB_SUFFIX
23755                                         ;;
23756                                 (ticlib*)
23757                                         cf_libname=$TICS_LIB_SUFFIX
23758                                         ;;
23759                                 esac
23760                         elif test $cf_dir = c++ ; then
23761                                 cf_libname=ncurses++$USE_LIB_SUFFIX
23762                         else
23763                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23764                         fi
23765                         if test -n "${USE_ARG_SUFFIX}" ; then
23766                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23767                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23768                         fi
23769
23770                         # These dependencies really are for development, not
23771                         # builds, but they are useful in porting, too.
23772                         cf_depend="../include/ncurses_cfg.h"
23773                         if test "$srcdir" = "."; then
23774                                 cf_reldir="."
23775                         else
23776                                 cf_reldir="\${srcdir}"
23777                         fi
23778
23779                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23780                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23781                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23782                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23783                         fi
23784
23785                         cf_dir_suffix=
23786                         old_cf_suffix="$cf_suffix"
23787                         if test "$cf_cv_shlib_version_infix" = yes ; then
23788                         if test -n "$USE_LIB_SUFFIX" ; then
23789                                 case $USE_LIB_SUFFIX in
23790                                 (tw*)
23791                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23792                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
23793                                         cf_dir_suffix=tw
23794                                         ;;
23795                                 (t*)
23796                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23797                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
23798                                         cf_dir_suffix=t
23799                                         ;;
23800                                 (w*)
23801                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23802                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
23803                                         cf_dir_suffix=w
23804                                         ;;
23805                                 (*)
23806                                         cf_libname=`echo $cf_libname | sed 's/$//'`
23807                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
23808                                         cf_dir_suffix=
23809                                         ;;
23810                                 esac
23811                         fi
23812                         fi
23813
23814                         $AWK -f $srcdir/mk-1st.awk \
23815                                 name=${cf_libname}${cf_dir_suffix} \
23816                                 traces=$LIB_TRACING \
23817                                 MODEL=$cf_ITEM \
23818                                 CXX_MODEL=$CXX_MODEL \
23819                                 model=$cf_subdir \
23820                                 prefix=$cf_prefix \
23821                                 suffix=$cf_suffix \
23822                                 subset=$cf_subset \
23823                                 driver=$cf_cv_term_driver \
23824                                 SymLink="$LN_S" \
23825                                 TermlibRoot=$TINFO_NAME \
23826                                 TermlibSuffix=$TINFO_SUFFIX \
23827                                 ShlibVer=$cf_cv_shlib_version \
23828                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23829                                 ReLink=${cf_cv_do_relink:-no} \
23830                                 DoLinks=$cf_cv_do_symlinks \
23831                                 rmSoLocs=$cf_cv_rm_so_locs \
23832                                 ldconfig="$LDCONFIG" \
23833                                 overwrite=$WITH_OVERWRITE \
23834                                 depend="$cf_depend" \
23835                                 host="$host" \
23836                                 libtool_version="$LIBTOOL_VERSION" \
23837                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23838
23839                         cf_suffix="$old_cf_suffix"
23840
23841                         for cf_subdir2 in $cf_subdirs lib
23842                         do
23843                                 test $cf_subdir = $cf_subdir2 && break
23844                         done
23845                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23846                         $AWK -f $srcdir/mk-2nd.awk \
23847                                 name=$cf_dir \
23848                                 traces=$LIB_TRACING \
23849                                 MODEL=$cf_ITEM \
23850                                 model=$cf_subdir \
23851                                 subset=$cf_subset \
23852                                 srcdir=$srcdir \
23853                                 echo=$WITH_ECHO \
23854                                 crenames=$cf_cv_prog_CC_c_o \
23855                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23856                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23857                         cf_subdirs="$cf_subdirs $cf_subdir"
23858                         done
23859                 done
23860         fi
23861
23862         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23863 done
23864
23865 for cf_dir in $SRC_SUBDIRS
23866 do
23867         if test ! -d $srcdir/$cf_dir ; then
23868                 continue
23869         fi
23870
23871         if test -f $cf_dir/Makefile ; then
23872                 case "$cf_dir" in
23873                 (Ada95)
23874                         echo 'libs \' >> Makefile
23875                         echo 'install.libs \' >> Makefile
23876                         echo 'uninstall.libs ::' >> Makefile
23877                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23878                         ;;
23879                 esac
23880         fi
23881
23882         if test -f $srcdir/$cf_dir/modules; then
23883                 echo >> Makefile
23884                 if test -f $srcdir/$cf_dir/headers; then
23885 cat >> Makefile <<CF_EOF
23886 install.includes \\
23887 uninstall.includes \\
23888 CF_EOF
23889                 fi
23890 if test "$cf_dir" != "c++" ; then
23891 echo 'lint \' >> Makefile
23892 fi
23893 cat >> Makefile <<CF_EOF
23894 libs \\
23895 lintlib \\
23896 install.libs \\
23897 uninstall.libs \\
23898 install.$cf_dir \\
23899 uninstall.$cf_dir ::
23900         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23901 CF_EOF
23902         elif test -f $srcdir/$cf_dir/headers; then
23903 cat >> Makefile <<CF_EOF
23904
23905 libs \\
23906 install.libs \\
23907 uninstall.libs \\
23908 install.includes \\
23909 uninstall.includes ::
23910         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23911 CF_EOF
23912 fi
23913 done
23914
23915 if test "x$cf_with_db_install" = xyes; then
23916 cat >> Makefile <<CF_EOF
23917
23918 install.libs uninstall.libs \\
23919 install.data uninstall.data ::
23920 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23921 CF_EOF
23922 else
23923 cat >> Makefile <<CF_EOF
23924
23925 install.libs uninstall.libs ::
23926         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23927 CF_EOF
23928 fi
23929
23930 if test "x$cf_with_manpages" = xyes; then
23931 cat >> Makefile <<CF_EOF
23932
23933 install.man \\
23934 uninstall.man ::
23935         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23936 CF_EOF
23937 fi
23938
23939 cat >> Makefile <<CF_EOF
23940
23941 distclean ::
23942         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23943         rm -f headers.sh headers.sed mk_shared_lib.sh
23944         rm -f edit_man.* man_alias.*
23945         rm -rf \${DIRS_TO_MAKE}
23946 CF_EOF
23947
23948 # Special case: tack's manpage lives in its own directory.
23949 if test "x$cf_with_manpages" = xyes; then
23950 if test -d tack ; then
23951 if test -f $srcdir/$tack.h; then
23952 cat >> Makefile <<CF_EOF
23953
23954 install.man \\
23955 uninstall.man ::
23956         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23957 CF_EOF
23958 fi
23959 fi
23960 fi
23961
23962 rm -f headers.sed headers.sh
23963
23964 echo creating headers.sh
23965 cat >headers.sh <<CF_EOF
23966 #! /bin/sh
23967 # This shell script is generated by the 'configure' script.  It is invoked in a
23968 # subdirectory of the build tree.  It generates a sed-script in the parent
23969 # directory that is used to adjust includes for header files that reside in a
23970 # subdirectory of /usr/include, etc.
23971 PRG=""
23972 while test \$# != 3
23973 do
23974 PRG="\$PRG \$1"; shift
23975 done
23976 DST=\$1
23977 REF=\$2
23978 SRC=\$3
23979 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23980 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23981 echo installing \$SRC in \$DST
23982 CF_EOF
23983
23984 if test $WITH_CURSES_H = yes; then
23985         cat >>headers.sh <<CF_EOF
23986 case \$DST in
23987 (/*/include/*)
23988         END=\`basename \$DST\`
23989         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23990         do
23991                 NAME=\`basename \$i\`
23992                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23993         done
23994         ;;
23995 (*)
23996         echo "" >> \$TMPSED
23997         ;;
23998 esac
23999 CF_EOF
24000
24001 else
24002         cat >>headers.sh <<CF_EOF
24003 case \$DST in
24004 (/*/include/*)
24005         END=\`basename \$DST\`
24006         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24007         do
24008                 NAME=\`basename \$i\`
24009                 if test "\$NAME" = "curses.h"
24010                 then
24011                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24012                         NAME=ncurses.h
24013                 fi
24014                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24015         done
24016         ;;
24017 (*)
24018         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24019         ;;
24020 esac
24021 CF_EOF
24022 fi
24023 cat >>headers.sh <<CF_EOF
24024 rm -f \$TMPSRC
24025 sed -f \$TMPSED \$SRC > \$TMPSRC
24026 NAME=\`basename \$SRC\`
24027 CF_EOF
24028 if test $WITH_CURSES_H != yes; then
24029         cat >>headers.sh <<CF_EOF
24030 test "\$NAME" = "curses.h" && NAME=ncurses.h
24031 CF_EOF
24032 fi
24033 cat >>headers.sh <<CF_EOF
24034 # Just in case someone gzip'd manpages, remove the conflicting copy.
24035 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24036
24037 eval \$PRG \$TMPSRC \$DST/\$NAME
24038 rm -f \$TMPSRC \$TMPSED
24039 CF_EOF
24040
24041 chmod 0755 headers.sh
24042
24043 for cf_dir in $SRC_SUBDIRS
24044 do
24045         if test ! -d $srcdir/$cf_dir ; then
24046                 continue
24047         fi
24048
24049         if test -f $srcdir/$cf_dir/headers; then
24050                 $AWK -f $srcdir/mk-hdr.awk \
24051                         subset="$LIB_SUBSETS" \
24052                         compat="$WITH_CURSES_H" \
24053                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24054         fi
24055
24056         if test -f $srcdir/$cf_dir/modules; then
24057                 if test "$cf_dir" != "c++" ; then
24058                         cat >>$cf_dir/Makefile <<"CF_EOF"
24059 depend : ${AUTO_SRC}
24060         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24061
24062 # DO NOT DELETE THIS LINE -- make depend depends on it.
24063 CF_EOF
24064                 fi
24065         fi
24066 done
24067
24068 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24069 if test -z "$USE_OLD_MAKERULES" ; then
24070         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24071 fi
24072 fi
24073  ;;
24074   esac
24075 done
24076 EOF
24077
24078 cat >>$CONFIG_STATUS <<\EOF
24079
24080 { (exit 0); exit 0; }
24081 EOF
24082 chmod +x $CONFIG_STATUS
24083 ac_clean_files=$ac_clean_files_save
24084
24085 # configure is writing to config.log, and then calls config.status.
24086 # config.status does its own redirection, appending to config.log.
24087 # Unfortunately, on DOS this fails, as config.log is still kept open
24088 # by configure, so config.status won't be able to write to it; its
24089 # output is simply discarded.  So we exec the FD to /dev/null,
24090 # effectively closing config.log, so it can be properly (re)opened and
24091 # appended to by config.status.  When coming back to configure, we
24092 # need to make the FD available again.
24093 if test "$no_create" != yes; then
24094   ac_cs_success=:
24095   exec 5>/dev/null
24096   $SHELL $CONFIG_STATUS || ac_cs_success=false
24097   exec 5>>config.log
24098   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24099   # would make configure fail if this is the last instruction.
24100   $ac_cs_success || { (exit 1); exit 1; }
24101 fi
24102 ${MAKE:-make} preinstall