]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
8e1e66b776844da62fc6144289894e7a3df5d872
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.600 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --disable-overwrite     leave out the link to -lcurses
751   --disable-database      do not use terminfo, only fallbacks/termcap
752   --with-database=XXX     specify terminfo source to install
753   --with-hashed-db        specify hashed-database library
754   --with-fallbacks=XXX    specify list of fallback terminal descriptions
755   --without-xterm-new     specify if xterm terminfo should be old version
756   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
757   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
758   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
759   --disable-big-core      assume machine has little memory
760   --disable-big-strings   assume compiler has only standard-size strings
761   --enable-termcap        compile in termcap fallback support
762   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
763   --enable-getcap         fast termcap load, no xrefs to terminfo
764   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
765   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
766   --disable-root-environ  restrict environment when running as root
767   --enable-symlinks       make tic use symbolic links not hard links
768   --enable-broken_linker  compile with broken-linker support code
769   --enable-bsdpad         recognize BSD-style prefix padding
770   --enable-widec          compile with wide-char/UTF-8 code
771   --disable-lp64          allow chtype to be long (ignore _LP64)
772   --disable-largefile     omit support for large files
773   --disable-tparm-varargs compile tparm() without varargs interface
774   --disable-tic-depends   link tic library without explicit dependency on ncurses library
775   --with-bool=TYPE        override fallback type of bool variable
776   --with-caps=alt         compile with alternate Caps file
777   --with-chtype=TYPE      override type of chtype
778   --with-ospeed=TYPE      override type of ospeed variable
779   --with-mmask-t=TYPE     override type of mmask_t
780   --with-ccharw-max=XXX   override size CCHARW_MAX
781   --with-tparm-arg=TYPE   override parameter type of tparm
782   --with-rcs-ids          compile-in RCS identifiers
783 Options to Specify How Manpages are Installed:
784   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
785                           optionally formatted/catonly, e.g., gzip,formatted
786   --with-manpage-renames  specify manpage-renaming
787   --with-manpage-aliases  specify manpage-aliases using .so
788   --with-manpage-symlinks specify manpage-aliases using symlinks
789   --with-manpage-tbl      specify manpage processing with tbl
790 Extensions:
791   --disable-ext-funcs     disable function-extensions
792   --enable-sp-funcs       enable experimental SCREEN-extensions
793   --enable-term-driver    enable experimental terminal-driver
794   --enable-const          compile with extra/non-standard const
795   --enable-ext-colors     compile for 256-color support
796   --enable-ext-mouse      compile for extended mouse-encoding
797   --enable-ext-putwin     compile with extended putwin/screendump
798   --enable-no-padding     compile with $NCURSES_NO_PADDING code
799   --enable-signed-char    compile using signed Boolean's in term.h
800   --enable-sigwinch       compile with SIGWINCH handler
801   --enable-tcap-names     compile with user-definable terminal capabilities
802 Development Code:
803   --without-develop       disable development options
804   --enable-hard-tabs      compile with hard-tabs code
805   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
806 Experimental Code:
807   --disable-assumed-color do not assume anything about default-colors
808   --disable-hashmap       compile without hashmap scrolling-optimization
809   --enable-colorfgbg      compile-in experimental $COLORFGBG code
810   --enable-interop        compile-in experimental interop bindings
811   --with-pthread          use POSIX thread library
812   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
813   --enable-weak-symbols   enable weak-symbols for pthreads
814   --enable-reentrant      compile with experimental reentrant code
815   --with-wrap-prefix=XXX  override prefix used for public variables
816   --enable-safe-sprintf   compile with experimental safe-sprintf code
817   --disable-scroll-hints  compile without scroll-hints code
818   --enable-wgetch-events  compile with experimental wgetch-events code
819 Testing/development Options:
820   --disable-echo          do not display "compiling" commands
821   --enable-warnings       build: turn on GCC compiler warnings
822   --enable-string-hacks   work around bogus compiler/loader warnings
823   --enable-assertions     test: turn on generation of assertion code
824   --with-dmalloc          test: use Gray Watson's dmalloc library
825   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
826   --with-valgrind         test: use valgrind
827   --disable-leaks         test: free permanent memory, analyze leaks
828   --enable-expanded       test: generate functions for certain macros
829   --disable-macros        test: use functions rather than macros
830   --with-trace            test: add trace() function to all models of ncurses
831   --disable-gnat-projects test: disable GNAT projects even if usable
832 Ada95 Binding Options:
833   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
834   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
835   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
836   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
837
838 Some influential environment variables:
839   CC          C compiler command
840   CFLAGS      C compiler flags
841   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
842               nonstandard directory <lib dir>
843   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
844               headers in a nonstandard directory <include dir>
845   CPP         C preprocessor
846   CXX         C++ compiler command
847   CXXFLAGS    C++ compiler flags
848   CXXCPP      C++ preprocessor
849
850 Use these variables to override the choices made by `configure' or to help
851 it to find libraries and programs with nonstandard names/locations.
852
853 EOF
854 fi
855
856 if test "$ac_init_help" = "recursive"; then
857   # If there are subdirs, report their specific --help.
858   ac_popdir=`pwd`
859   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
860     cd $ac_subdir
861     # A "../" for each directory in /$ac_subdir.
862     ac_dots=`echo $ac_subdir |
863              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
864
865     case $srcdir in
866     .) # No --srcdir option.  We are building in place.
867       ac_sub_srcdir=$srcdir ;;
868     [\\/]* | ?:[\\/]* ) # Absolute path.
869       ac_sub_srcdir=$srcdir/$ac_subdir ;;
870     *) # Relative path.
871       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
872     esac
873
874     # Check for guested configure; otherwise get Cygnus style configure.
875     if test -f $ac_sub_srcdir/configure.gnu; then
876       echo
877       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
878     elif test -f $ac_sub_srcdir/configure; then
879       echo
880       $SHELL $ac_sub_srcdir/configure  --help=recursive
881     elif test -f $ac_sub_srcdir/configure.ac ||
882            test -f $ac_sub_srcdir/configure.in; then
883       echo
884       $ac_configure --help
885     else
886       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
887     fi
888     cd $ac_popdir
889   done
890 fi
891
892 test -n "$ac_init_help" && exit 0
893 if $ac_init_version; then
894   cat <<\EOF
895
896 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
897 Free Software Foundation, Inc.
898 This configure script is free software; the Free Software Foundation
899 gives unlimited permission to copy, distribute and modify it.
900 EOF
901   exit 0
902 fi
903 exec 5>config.log
904 cat >&5 <<EOF
905 This file contains any messages produced by compilers while
906 running configure, to aid debugging if configure makes a mistake.
907
908 It was created by $as_me, which was
909 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
910
911   $ $0 $@
912
913 EOF
914 {
915 cat <<_ASUNAME
916 ## ---------- ##
917 ## Platform.  ##
918 ## ---------- ##
919
920 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
921 uname -m = `(uname -m) 2>/dev/null || echo unknown`
922 uname -r = `(uname -r) 2>/dev/null || echo unknown`
923 uname -s = `(uname -s) 2>/dev/null || echo unknown`
924 uname -v = `(uname -v) 2>/dev/null || echo unknown`
925
926 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
927 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
928
929 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
930 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
931 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
932 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
933 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
934 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
935 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
936
937 PATH = $PATH
938
939 _ASUNAME
940 } >&5
941
942 cat >&5 <<EOF
943 ## ------------ ##
944 ## Core tests.  ##
945 ## ------------ ##
946
947 EOF
948
949 # Keep a trace of the command line.
950 # Strip out --no-create and --no-recursion so they do not pile up.
951 # Also quote any args containing shell meta-characters.
952 ac_configure_args=
953 ac_sep=
954 for ac_arg
955 do
956   case $ac_arg in
957   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
958   | --no-cr | --no-c) ;;
959   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
960   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
961   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
962     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
963     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
964     ac_sep=" " ;;
965   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
966      ac_sep=" " ;;
967   esac
968   # Get rid of the leading space.
969 done
970
971 # When interrupted or exit'd, cleanup temporary files, and complete
972 # config.log.  We remove comments because anyway the quotes in there
973 # would cause problems or look ugly.
974 trap 'exit_status=$?
975   # Save into config.log some information that might help in debugging.
976   echo >&5
977   echo "## ----------------- ##" >&5
978   echo "## Cache variables.  ##" >&5
979   echo "## ----------------- ##" >&5
980   echo >&5
981   # The following way of writing the cache mishandles newlines in values,
982 {
983   (set) 2>&1 |
984     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
985     *ac_space=\ *)
986       sed -n \
987         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
988           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
989       ;;
990     *)
991       sed -n \
992         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
993       ;;
994     esac;
995 } >&5
996   sed "/^$/d" confdefs.h >conftest.log
997   if test -s conftest.log; then
998     echo >&5
999     echo "## ------------ ##" >&5
1000     echo "## confdefs.h.  ##" >&5
1001     echo "## ------------ ##" >&5
1002     echo >&5
1003     cat conftest.log >&5
1004   fi
1005   (echo; echo) >&5
1006   test "$ac_signal" != 0 &&
1007     echo "$as_me: caught signal $ac_signal" >&5
1008   echo "$as_me: exit $exit_status" >&5
1009   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1010     exit $exit_status
1011      ' 0
1012 for ac_signal in 1 2 13 15; do
1013   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1014 done
1015 ac_signal=0
1016
1017 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1018 rm -rf conftest* confdefs.h
1019 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1020 echo >confdefs.h
1021
1022 # Let the site file select an alternate cache file if it wants to.
1023 # Prefer explicitly selected file to automatically selected ones.
1024 if test -z "$CONFIG_SITE"; then
1025   if test "x$prefix" != xNONE; then
1026     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1027   else
1028     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1029   fi
1030 fi
1031 for ac_site_file in $CONFIG_SITE; do
1032   if test -r "$ac_site_file"; then
1033     { echo "$as_me:1033: loading site script $ac_site_file" >&5
1034 echo "$as_me: loading site script $ac_site_file" >&6;}
1035     cat "$ac_site_file" >&5
1036     . "$ac_site_file"
1037   fi
1038 done
1039
1040 if test -r "$cache_file"; then
1041   # Some versions of bash will fail to source /dev/null (special
1042   # files actually), so we avoid doing that.
1043   if test -f "$cache_file"; then
1044     { echo "$as_me:1044: loading cache $cache_file" >&5
1045 echo "$as_me: loading cache $cache_file" >&6;}
1046     case $cache_file in
1047       [\\/]* | ?:[\\/]* ) . $cache_file;;
1048       *)                      . ./$cache_file;;
1049     esac
1050   fi
1051 else
1052   { echo "$as_me:1052: creating cache $cache_file" >&5
1053 echo "$as_me: creating cache $cache_file" >&6;}
1054   >$cache_file
1055 fi
1056
1057 # Check that the precious variables saved in the cache have kept the same
1058 # value.
1059 ac_cache_corrupted=false
1060 for ac_var in `(set) 2>&1 |
1061                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1062   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1063   eval ac_new_set=\$ac_env_${ac_var}_set
1064   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1065   eval ac_new_val="\$ac_env_${ac_var}_value"
1066   case $ac_old_set,$ac_new_set in
1067     set,)
1068       { echo "$as_me:1068: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1069 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1070       ac_cache_corrupted=: ;;
1071     ,set)
1072       { echo "$as_me:1072: error: \`$ac_var' was not set in the previous run" >&5
1073 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1074       ac_cache_corrupted=: ;;
1075     ,);;
1076     *)
1077       if test "x$ac_old_val" != "x$ac_new_val"; then
1078         { echo "$as_me:1078: error: \`$ac_var' has changed since the previous run:" >&5
1079 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1080         { echo "$as_me:1080:   former value:  $ac_old_val" >&5
1081 echo "$as_me:   former value:  $ac_old_val" >&2;}
1082         { echo "$as_me:1082:   current value: $ac_new_val" >&5
1083 echo "$as_me:   current value: $ac_new_val" >&2;}
1084         ac_cache_corrupted=:
1085       fi;;
1086   esac
1087   # Pass precious variables to config.status.  It doesn't matter if
1088   # we pass some twice (in addition to the command line arguments).
1089   if test "$ac_new_set" = set; then
1090     case $ac_new_val in
1091     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1092       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1093       ac_configure_args="$ac_configure_args '$ac_arg'"
1094       ;;
1095     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1096        ;;
1097     esac
1098   fi
1099 done
1100 if $ac_cache_corrupted; then
1101   { echo "$as_me:1101: error: changes in the environment can compromise the build" >&5
1102 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1103   { { echo "$as_me:1103: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1104 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1105    { (exit 1); exit 1; }; }
1106 fi
1107
1108 ac_ext=c
1109 ac_cpp='$CPP $CPPFLAGS'
1110 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1111 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1112 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1113 ac_main_return=return
1114
1115 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1116   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1117                    ECHO_T='     ' ;;
1118   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1119   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1120 esac
1121 echo "#! $SHELL" >conftest.sh
1122 echo  "exit 0"   >>conftest.sh
1123 chmod +x conftest.sh
1124 if { (echo "$as_me:1124: PATH=\".;.\"; conftest.sh") >&5
1125   (PATH=".;."; conftest.sh) 2>&5
1126   ac_status=$?
1127   echo "$as_me:1127: \$? = $ac_status" >&5
1128   (exit $ac_status); }; then
1129   ac_path_separator=';'
1130 else
1131   ac_path_separator=:
1132 fi
1133 PATH_SEPARATOR="$ac_path_separator"
1134 rm -f conftest.sh
1135
1136 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1137
1138 top_builddir=`pwd`
1139
1140 echo "$as_me:1140: checking for egrep" >&5
1141 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1142 if test "${ac_cv_prog_egrep+set}" = set; then
1143   echo $ECHO_N "(cached) $ECHO_C" >&6
1144 else
1145   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1146     then ac_cv_prog_egrep='grep -E'
1147     else ac_cv_prog_egrep='egrep'
1148     fi
1149 fi
1150 echo "$as_me:1150: result: $ac_cv_prog_egrep" >&5
1151 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1152  EGREP=$ac_cv_prog_egrep
1153
1154 test -z "$EGREP" && { { echo "$as_me:1154: error: No egrep program found" >&5
1155 echo "$as_me: error: No egrep program found" >&2;}
1156    { (exit 1); exit 1; }; }
1157
1158 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1159 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 cf_cv_abi_version=${NCURSES_MAJOR}
1162 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1163 cf_cv_timestamp=`date`
1164 echo "$as_me:1164: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1165 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1166
1167 if test -f $srcdir/VERSION ; then
1168         echo "$as_me:1168: checking for package version" >&5
1169 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1170
1171         # if there are not enough fields, cut returns the last one...
1172         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1173         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1174         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1175
1176         # this is how CF_BUNDLED_INTL uses $VERSION:
1177         VERSION="$cf_field1"
1178
1179         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1180         test -z "$VERSION_MAJOR" && { { echo "$as_me:1180: error: missing major-version" >&5
1181 echo "$as_me: error: missing major-version" >&2;}
1182    { (exit 1); exit 1; }; }
1183
1184         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1185         test -z "$VERSION_MINOR" && { { echo "$as_me:1185: error: missing minor-version" >&5
1186 echo "$as_me: error: missing minor-version" >&2;}
1187    { (exit 1); exit 1; }; }
1188
1189         echo "$as_me:1189: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1190 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1191
1192         echo "$as_me:1192: checking for package patch date" >&5
1193 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1194         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1195         case .$VERSION_PATCH in
1196         .)
1197                 { { echo "$as_me:1197: error: missing patch-date $VERSION_PATCH" >&5
1198 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1199    { (exit 1); exit 1; }; }
1200                 ;;
1201         .[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1202                 ;;
1203         *)
1204                 { { echo "$as_me:1204: error: illegal patch-date $VERSION_PATCH" >&5
1205 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1206    { (exit 1); exit 1; }; }
1207                 ;;
1208         esac
1209         echo "$as_me:1209: result: $VERSION_PATCH" >&5
1210 echo "${ECHO_T}$VERSION_PATCH" >&6
1211 else
1212         { { echo "$as_me:1212: error: did not find $srcdir/VERSION" >&5
1213 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1214    { (exit 1); exit 1; }; }
1215 fi
1216
1217 # show the actual data that we have for versions:
1218 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1219
1220 echo "${as_me:-configure}:1220: testing ABI VERSION $VERSION ..." 1>&5
1221
1222 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1223
1224 echo "${as_me:-configure}:1224: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1225
1226 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1227
1228 echo "${as_me:-configure}:1228: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1229
1230 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1231
1232 echo "${as_me:-configure}:1232: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1233
1234         cf_PACKAGE=NCURSES
1235         PACKAGE=ncurses
1236
1237 cat >>confdefs.h <<EOF
1238 #define PACKAGE "$PACKAGE"
1239 EOF
1240
1241 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1242
1243         cat >>confdefs.h <<EOF
1244 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1245 EOF
1246
1247         cat >>confdefs.h <<EOF
1248 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1249 EOF
1250
1251 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1252
1253 # Check whether --with-rel-version or --without-rel-version was given.
1254 if test "${with_rel_version+set}" = set; then
1255   withval="$with_rel_version"
1256   { echo "$as_me:1256: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1257 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1258  cf_cv_rel_version=$withval
1259 fi;
1260
1261  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1262  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1263
1264 if test -n "$NCURSES_MAJOR" ; then
1265   case $NCURSES_MAJOR in #(vi
1266   [0-9]*) #(vi
1267         ;;
1268   *)
1269         { { echo "$as_me:1269: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1270 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1271    { (exit 1); exit 1; }; }
1272         ;;
1273   esac
1274 else
1275   { { echo "$as_me:1275: error: Release major-version value is empty" >&5
1276 echo "$as_me: error: Release major-version value is empty" >&2;}
1277    { (exit 1); exit 1; }; }
1278 fi
1279
1280 if test -n "$NCURSES_MINOR" ; then
1281   case $NCURSES_MINOR in #(vi
1282   [0-9]*) #(vi
1283         ;;
1284   *)
1285         { { echo "$as_me:1285: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1286 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1287    { (exit 1); exit 1; }; }
1288         ;;
1289   esac
1290 else
1291   { { echo "$as_me:1291: error: Release minor-version value is empty" >&5
1292 echo "$as_me: error: Release minor-version value is empty" >&2;}
1293    { (exit 1); exit 1; }; }
1294 fi
1295
1296 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1297
1298 # Check whether --with-abi-version or --without-abi-version was given.
1299 if test "${with_abi_version+set}" = set; then
1300   withval="$with_abi_version"
1301   { echo "$as_me:1301: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1302 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1303  cf_cv_abi_version=$withval
1304 fi;
1305
1306 if test -n "$cf_cv_abi_version" ; then
1307   case $cf_cv_abi_version in #(vi
1308   [0-9]*) #(vi
1309         ;;
1310   *)
1311         { { echo "$as_me:1311: error: ABI version is not a number: $cf_cv_abi_version" >&5
1312 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1313    { (exit 1); exit 1; }; }
1314         ;;
1315   esac
1316 else
1317   { { echo "$as_me:1317: error: ABI version value is empty" >&5
1318 echo "$as_me: error: ABI version value is empty" >&2;}
1319    { (exit 1); exit 1; }; }
1320 fi
1321
1322 ac_aux_dir=
1323 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1324   if test -f $ac_dir/install-sh; then
1325     ac_aux_dir=$ac_dir
1326     ac_install_sh="$ac_aux_dir/install-sh -c"
1327     break
1328   elif test -f $ac_dir/install.sh; then
1329     ac_aux_dir=$ac_dir
1330     ac_install_sh="$ac_aux_dir/install.sh -c"
1331     break
1332   elif test -f $ac_dir/shtool; then
1333     ac_aux_dir=$ac_dir
1334     ac_install_sh="$ac_aux_dir/shtool install -c"
1335     break
1336   fi
1337 done
1338 if test -z "$ac_aux_dir"; then
1339   { { echo "$as_me:1339: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1340 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1341    { (exit 1); exit 1; }; }
1342 fi
1343 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1344 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1345 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1346
1347 # Make sure we can run config.sub.
1348 $ac_config_sub sun4 >/dev/null 2>&1 ||
1349   { { echo "$as_me:1349: error: cannot run $ac_config_sub" >&5
1350 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1351    { (exit 1); exit 1; }; }
1352
1353 echo "$as_me:1353: checking build system type" >&5
1354 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1355 if test "${ac_cv_build+set}" = set; then
1356   echo $ECHO_N "(cached) $ECHO_C" >&6
1357 else
1358   ac_cv_build_alias=$build_alias
1359 test -z "$ac_cv_build_alias" &&
1360   ac_cv_build_alias=`$ac_config_guess`
1361 test -z "$ac_cv_build_alias" &&
1362   { { echo "$as_me:1362: error: cannot guess build type; you must specify one" >&5
1363 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1364    { (exit 1); exit 1; }; }
1365 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1366   { { echo "$as_me:1366: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1367 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1368    { (exit 1); exit 1; }; }
1369
1370 fi
1371 echo "$as_me:1371: result: $ac_cv_build" >&5
1372 echo "${ECHO_T}$ac_cv_build" >&6
1373 build=$ac_cv_build
1374 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1375 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1376 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1377
1378 echo "$as_me:1378: checking host system type" >&5
1379 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1380 if test "${ac_cv_host+set}" = set; then
1381   echo $ECHO_N "(cached) $ECHO_C" >&6
1382 else
1383   ac_cv_host_alias=$host_alias
1384 test -z "$ac_cv_host_alias" &&
1385   ac_cv_host_alias=$ac_cv_build_alias
1386 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1387   { { echo "$as_me:1387: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1388 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1389    { (exit 1); exit 1; }; }
1390
1391 fi
1392 echo "$as_me:1392: result: $ac_cv_host" >&5
1393 echo "${ECHO_T}$ac_cv_host" >&6
1394 host=$ac_cv_host
1395 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1396 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1397 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1398
1399 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1400         echo "$as_me:1400: checking target system type" >&5
1401 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1402 if test "${ac_cv_target+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_target_alias=$target_alias
1406 test "x$ac_cv_target_alias" = "x" &&
1407   ac_cv_target_alias=$ac_cv_host_alias
1408 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1409   { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1410 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1411    { (exit 1); exit 1; }; }
1412
1413 fi
1414 echo "$as_me:1414: result: $ac_cv_target" >&5
1415 echo "${ECHO_T}$ac_cv_target" >&6
1416 target=$ac_cv_target
1417 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1420
1421 # The aliases save the names the user supplied, while $host etc.
1422 # will get canonicalized.
1423 test -n "$target_alias" &&
1424   test "$program_prefix$program_suffix$program_transform_name" = \
1425     NONENONEs,x,x, &&
1426   program_prefix=${target_alias}-
1427         system_name="$host_os"
1428 else
1429         system_name="`(uname -s -r) 2>/dev/null`"
1430         if test -z "$system_name" ; then
1431                 system_name="`(hostname) 2>/dev/null`"
1432         fi
1433 fi
1434 test -n "$system_name" &&
1435 cat >>confdefs.h <<EOF
1436 #define SYSTEM_NAME "$system_name"
1437 EOF
1438
1439 if test "${cf_cv_system_name+set}" = set; then
1440   echo $ECHO_N "(cached) $ECHO_C" >&6
1441 else
1442   cf_cv_system_name="$system_name"
1443 fi
1444
1445 test -z "$system_name" && system_name="$cf_cv_system_name"
1446 test -n "$cf_cv_system_name" && echo "$as_me:1446: result: Configuring for $cf_cv_system_name" >&5
1447 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1448
1449 if test ".$system_name" != ".$cf_cv_system_name" ; then
1450         echo "$as_me:1450: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1451 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1452         { { echo "$as_me:1452: error: \"Please remove config.cache and try again.\"" >&5
1453 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1454    { (exit 1); exit 1; }; }
1455 fi
1456
1457 # Check whether --with-system-type or --without-system-type was given.
1458 if test "${with_system_type+set}" = set; then
1459   withval="$with_system_type"
1460   { echo "$as_me:1460: WARNING: overriding system type to $withval" >&5
1461 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1462         cf_cv_system_name=$withval
1463         host_os=$withval
1464
1465 fi;
1466
1467 ###     Save the given $CFLAGS to allow user-override.
1468 cf_user_CFLAGS="$CFLAGS"
1469
1470 ###     Default install-location
1471
1472 echo "$as_me:1472: checking for prefix" >&5
1473 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1474 if test "x$prefix" = "xNONE" ; then
1475         case "$cf_cv_system_name" in
1476                 # non-vendor systems don't have a conflict
1477         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1478                 prefix=/usr
1479                 ;;
1480         *)      prefix=$ac_default_prefix
1481                 ;;
1482         esac
1483 fi
1484 echo "$as_me:1484: result: $prefix" >&5
1485 echo "${ECHO_T}$prefix" >&6
1486
1487 if test "x$prefix" = "xNONE" ; then
1488 echo "$as_me:1488: checking for default include-directory" >&5
1489 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1490 test -n "$verbose" && echo 1>&6
1491 for cf_symbol in \
1492         $includedir \
1493         $includedir/ncurses \
1494         $prefix/include \
1495         $prefix/include/ncurses \
1496         /usr/local/include \
1497         /usr/local/include/ncurses \
1498         /usr/include \
1499         /usr/include/ncurses
1500 do
1501         cf_dir=`eval echo $cf_symbol`
1502         if test -f $cf_dir/curses.h ; then
1503         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1504                 includedir="$cf_symbol"
1505                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1506                 break
1507         fi
1508         fi
1509         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1510 done
1511 echo "$as_me:1511: result: $includedir" >&5
1512 echo "${ECHO_T}$includedir" >&6
1513 fi
1514
1515 ###     Checks for programs.
1516
1517 # Check whether --with-ada or --without-ada was given.
1518 if test "${with_ada+set}" = set; then
1519   withval="$with_ada"
1520   cf_with_ada=$withval
1521 else
1522   cf_with_ada=yes
1523 fi;
1524 if test "x$cf_with_ada" = xyes
1525 then
1526         cf_PROG_CC="gnatgcc gcc cc"
1527 else
1528         cf_PROG_CC="gcc cc"
1529 fi
1530
1531 ac_ext=c
1532 ac_cpp='$CPP $CPPFLAGS'
1533 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1534 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1535 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1536 ac_main_return=return
1537 if test -n "$ac_tool_prefix"; then
1538   for ac_prog in $cf_PROG_CC
1539   do
1540     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1541 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1542 echo "$as_me:1542: checking for $ac_word" >&5
1543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1544 if test "${ac_cv_prog_CC+set}" = set; then
1545   echo $ECHO_N "(cached) $ECHO_C" >&6
1546 else
1547   if test -n "$CC"; then
1548   ac_cv_prog_CC="$CC" # Let the user override the test.
1549 else
1550   ac_save_IFS=$IFS; IFS=$ac_path_separator
1551 ac_dummy="$PATH"
1552 for ac_dir in $ac_dummy; do
1553   IFS=$ac_save_IFS
1554   test -z "$ac_dir" && ac_dir=.
1555   $as_executable_p "$ac_dir/$ac_word" || continue
1556 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1557 echo "$as_me:1557: found $ac_dir/$ac_word" >&5
1558 break
1559 done
1560
1561 fi
1562 fi
1563 CC=$ac_cv_prog_CC
1564 if test -n "$CC"; then
1565   echo "$as_me:1565: result: $CC" >&5
1566 echo "${ECHO_T}$CC" >&6
1567 else
1568   echo "$as_me:1568: result: no" >&5
1569 echo "${ECHO_T}no" >&6
1570 fi
1571
1572     test -n "$CC" && break
1573   done
1574 fi
1575 if test -z "$CC"; then
1576   ac_ct_CC=$CC
1577   for ac_prog in $cf_PROG_CC
1578 do
1579   # Extract the first word of "$ac_prog", so it can be a program name with args.
1580 set dummy $ac_prog; ac_word=$2
1581 echo "$as_me:1581: checking for $ac_word" >&5
1582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1583 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1584   echo $ECHO_N "(cached) $ECHO_C" >&6
1585 else
1586   if test -n "$ac_ct_CC"; then
1587   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1588 else
1589   ac_save_IFS=$IFS; IFS=$ac_path_separator
1590 ac_dummy="$PATH"
1591 for ac_dir in $ac_dummy; do
1592   IFS=$ac_save_IFS
1593   test -z "$ac_dir" && ac_dir=.
1594   $as_executable_p "$ac_dir/$ac_word" || continue
1595 ac_cv_prog_ac_ct_CC="$ac_prog"
1596 echo "$as_me:1596: found $ac_dir/$ac_word" >&5
1597 break
1598 done
1599
1600 fi
1601 fi
1602 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1603 if test -n "$ac_ct_CC"; then
1604   echo "$as_me:1604: result: $ac_ct_CC" >&5
1605 echo "${ECHO_T}$ac_ct_CC" >&6
1606 else
1607   echo "$as_me:1607: result: no" >&5
1608 echo "${ECHO_T}no" >&6
1609 fi
1610
1611   test -n "$ac_ct_CC" && break
1612 done
1613
1614   CC=$ac_ct_CC
1615 fi
1616
1617 test -z "$CC" && { { echo "$as_me:1617: error: no acceptable cc found in \$PATH" >&5
1618 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1619    { (exit 1); exit 1; }; }
1620
1621 # Provide some information about the compiler.
1622 echo "$as_me:1622:" \
1623      "checking for C compiler version" >&5
1624 ac_compiler=`set X $ac_compile; echo $2`
1625 { (eval echo "$as_me:1625: \"$ac_compiler --version </dev/null >&5\"") >&5
1626   (eval $ac_compiler --version </dev/null >&5) 2>&5
1627   ac_status=$?
1628   echo "$as_me:1628: \$? = $ac_status" >&5
1629   (exit $ac_status); }
1630 { (eval echo "$as_me:1630: \"$ac_compiler -v </dev/null >&5\"") >&5
1631   (eval $ac_compiler -v </dev/null >&5) 2>&5
1632   ac_status=$?
1633   echo "$as_me:1633: \$? = $ac_status" >&5
1634   (exit $ac_status); }
1635 { (eval echo "$as_me:1635: \"$ac_compiler -V </dev/null >&5\"") >&5
1636   (eval $ac_compiler -V </dev/null >&5) 2>&5
1637   ac_status=$?
1638   echo "$as_me:1638: \$? = $ac_status" >&5
1639   (exit $ac_status); }
1640
1641 cat >conftest.$ac_ext <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1644
1645 int
1646 main ()
1647 {
1648
1649   ;
1650   return 0;
1651 }
1652 _ACEOF
1653 ac_clean_files_save=$ac_clean_files
1654 ac_clean_files="$ac_clean_files a.out a.exe"
1655 # Try to create an executable without -o first, disregard a.out.
1656 # It will help us diagnose broken compilers, and finding out an intuition
1657 # of exeext.
1658 echo "$as_me:1658: checking for C compiler default output" >&5
1659 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1660 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1661 if { (eval echo "$as_me:1661: \"$ac_link_default\"") >&5
1662   (eval $ac_link_default) 2>&5
1663   ac_status=$?
1664   echo "$as_me:1664: \$? = $ac_status" >&5
1665   (exit $ac_status); }; then
1666   # Find the output, starting from the most likely.  This scheme is
1667 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1668 # resort.
1669 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1670                 ls a.out conftest 2>/dev/null;
1671                 ls a.* conftest.* 2>/dev/null`; do
1672   case $ac_file in
1673     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1674     a.out ) # We found the default executable, but exeext='' is most
1675             # certainly right.
1676             break;;
1677     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1678           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1679           export ac_cv_exeext
1680           break;;
1681     * ) break;;
1682   esac
1683 done
1684 else
1685   echo "$as_me: failed program was:" >&5
1686 cat conftest.$ac_ext >&5
1687 { { echo "$as_me:1687: error: C compiler cannot create executables" >&5
1688 echo "$as_me: error: C compiler cannot create executables" >&2;}
1689    { (exit 77); exit 77; }; }
1690 fi
1691
1692 ac_exeext=$ac_cv_exeext
1693 echo "$as_me:1693: result: $ac_file" >&5
1694 echo "${ECHO_T}$ac_file" >&6
1695
1696 # Check the compiler produces executables we can run.  If not, either
1697 # the compiler is broken, or we cross compile.
1698 echo "$as_me:1698: checking whether the C compiler works" >&5
1699 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1700 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1701 # If not cross compiling, check that we can run a simple program.
1702 if test "$cross_compiling" != yes; then
1703   if { ac_try='./$ac_file'
1704   { (eval echo "$as_me:1704: \"$ac_try\"") >&5
1705   (eval $ac_try) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }; }; then
1709     cross_compiling=no
1710   else
1711     if test "$cross_compiling" = maybe; then
1712         cross_compiling=yes
1713     else
1714         { { echo "$as_me:1714: error: cannot run C compiled programs.
1715 If you meant to cross compile, use \`--host'." >&5
1716 echo "$as_me: error: cannot run C compiled programs.
1717 If you meant to cross compile, use \`--host'." >&2;}
1718    { (exit 1); exit 1; }; }
1719     fi
1720   fi
1721 fi
1722 echo "$as_me:1722: result: yes" >&5
1723 echo "${ECHO_T}yes" >&6
1724
1725 rm -f a.out a.exe conftest$ac_cv_exeext
1726 ac_clean_files=$ac_clean_files_save
1727 # Check the compiler produces executables we can run.  If not, either
1728 # the compiler is broken, or we cross compile.
1729 echo "$as_me:1729: checking whether we are cross compiling" >&5
1730 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1731 echo "$as_me:1731: result: $cross_compiling" >&5
1732 echo "${ECHO_T}$cross_compiling" >&6
1733
1734 echo "$as_me:1734: checking for executable suffix" >&5
1735 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1736 if { (eval echo "$as_me:1736: \"$ac_link\"") >&5
1737   (eval $ac_link) 2>&5
1738   ac_status=$?
1739   echo "$as_me:1739: \$? = $ac_status" >&5
1740   (exit $ac_status); }; then
1741   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1742 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1743 # work properly (i.e., refer to `conftest.exe'), while it won't with
1744 # `rm'.
1745 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1746   case $ac_file in
1747     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1748     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1749           export ac_cv_exeext
1750           break;;
1751     * ) break;;
1752   esac
1753 done
1754 else
1755   { { echo "$as_me:1755: error: cannot compute EXEEXT: cannot compile and link" >&5
1756 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1757    { (exit 1); exit 1; }; }
1758 fi
1759
1760 rm -f conftest$ac_cv_exeext
1761 echo "$as_me:1761: result: $ac_cv_exeext" >&5
1762 echo "${ECHO_T}$ac_cv_exeext" >&6
1763
1764 rm -f conftest.$ac_ext
1765 EXEEXT=$ac_cv_exeext
1766 ac_exeext=$EXEEXT
1767 echo "$as_me:1767: checking for object suffix" >&5
1768 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1769 if test "${ac_cv_objext+set}" = set; then
1770   echo $ECHO_N "(cached) $ECHO_C" >&6
1771 else
1772   cat >conftest.$ac_ext <<_ACEOF
1773 #line 1773 "configure"
1774 #include "confdefs.h"
1775
1776 int
1777 main ()
1778 {
1779
1780   ;
1781   return 0;
1782 }
1783 _ACEOF
1784 rm -f conftest.o conftest.obj
1785 if { (eval echo "$as_me:1785: \"$ac_compile\"") >&5
1786   (eval $ac_compile) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); }; then
1790   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1791   case $ac_file in
1792     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1793     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1794        break;;
1795   esac
1796 done
1797 else
1798   echo "$as_me: failed program was:" >&5
1799 cat conftest.$ac_ext >&5
1800 { { echo "$as_me:1800: error: cannot compute OBJEXT: cannot compile" >&5
1801 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1802    { (exit 1); exit 1; }; }
1803 fi
1804
1805 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1806 fi
1807 echo "$as_me:1807: result: $ac_cv_objext" >&5
1808 echo "${ECHO_T}$ac_cv_objext" >&6
1809 OBJEXT=$ac_cv_objext
1810 ac_objext=$OBJEXT
1811 echo "$as_me:1811: checking whether we are using the GNU C compiler" >&5
1812 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1813 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1814   echo $ECHO_N "(cached) $ECHO_C" >&6
1815 else
1816   cat >conftest.$ac_ext <<_ACEOF
1817 #line 1817 "configure"
1818 #include "confdefs.h"
1819
1820 int
1821 main ()
1822 {
1823 #ifndef __GNUC__
1824        choke me
1825 #endif
1826
1827   ;
1828   return 0;
1829 }
1830 _ACEOF
1831 rm -f conftest.$ac_objext
1832 if { (eval echo "$as_me:1832: \"$ac_compile\"") >&5
1833   (eval $ac_compile) 2>&5
1834   ac_status=$?
1835   echo "$as_me:1835: \$? = $ac_status" >&5
1836   (exit $ac_status); } &&
1837          { ac_try='test -s conftest.$ac_objext'
1838   { (eval echo "$as_me:1838: \"$ac_try\"") >&5
1839   (eval $ac_try) 2>&5
1840   ac_status=$?
1841   echo "$as_me:1841: \$? = $ac_status" >&5
1842   (exit $ac_status); }; }; then
1843   ac_compiler_gnu=yes
1844 else
1845   echo "$as_me: failed program was:" >&5
1846 cat conftest.$ac_ext >&5
1847 ac_compiler_gnu=no
1848 fi
1849 rm -f conftest.$ac_objext conftest.$ac_ext
1850 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1851
1852 fi
1853 echo "$as_me:1853: result: $ac_cv_c_compiler_gnu" >&5
1854 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1855 GCC=`test $ac_compiler_gnu = yes && echo yes`
1856 ac_test_CFLAGS=${CFLAGS+set}
1857 ac_save_CFLAGS=$CFLAGS
1858 CFLAGS="-g"
1859 echo "$as_me:1859: checking whether $CC accepts -g" >&5
1860 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1861 if test "${ac_cv_prog_cc_g+set}" = set; then
1862   echo $ECHO_N "(cached) $ECHO_C" >&6
1863 else
1864   cat >conftest.$ac_ext <<_ACEOF
1865 #line 1865 "configure"
1866 #include "confdefs.h"
1867
1868 int
1869 main ()
1870 {
1871
1872   ;
1873   return 0;
1874 }
1875 _ACEOF
1876 rm -f conftest.$ac_objext
1877 if { (eval echo "$as_me:1877: \"$ac_compile\"") >&5
1878   (eval $ac_compile) 2>&5
1879   ac_status=$?
1880   echo "$as_me:1880: \$? = $ac_status" >&5
1881   (exit $ac_status); } &&
1882          { ac_try='test -s conftest.$ac_objext'
1883   { (eval echo "$as_me:1883: \"$ac_try\"") >&5
1884   (eval $ac_try) 2>&5
1885   ac_status=$?
1886   echo "$as_me:1886: \$? = $ac_status" >&5
1887   (exit $ac_status); }; }; then
1888   ac_cv_prog_cc_g=yes
1889 else
1890   echo "$as_me: failed program was:" >&5
1891 cat conftest.$ac_ext >&5
1892 ac_cv_prog_cc_g=no
1893 fi
1894 rm -f conftest.$ac_objext conftest.$ac_ext
1895 fi
1896 echo "$as_me:1896: result: $ac_cv_prog_cc_g" >&5
1897 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1898 if test "$ac_test_CFLAGS" = set; then
1899   CFLAGS=$ac_save_CFLAGS
1900 elif test $ac_cv_prog_cc_g = yes; then
1901   if test "$GCC" = yes; then
1902     CFLAGS="-g -O2"
1903   else
1904     CFLAGS="-g"
1905   fi
1906 else
1907   if test "$GCC" = yes; then
1908     CFLAGS="-O2"
1909   else
1910     CFLAGS=
1911   fi
1912 fi
1913 # Some people use a C++ compiler to compile C.  Since we use `exit',
1914 # in C++ we need to declare it.  In case someone uses the same compiler
1915 # for both compiling C and C++ we need to have the C++ compiler decide
1916 # the declaration of exit, since it's the most demanding environment.
1917 cat >conftest.$ac_ext <<_ACEOF
1918 #ifndef __cplusplus
1919   choke me
1920 #endif
1921 _ACEOF
1922 rm -f conftest.$ac_objext
1923 if { (eval echo "$as_me:1923: \"$ac_compile\"") >&5
1924   (eval $ac_compile) 2>&5
1925   ac_status=$?
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit $ac_status); } &&
1928          { ac_try='test -s conftest.$ac_objext'
1929   { (eval echo "$as_me:1929: \"$ac_try\"") >&5
1930   (eval $ac_try) 2>&5
1931   ac_status=$?
1932   echo "$as_me:1932: \$? = $ac_status" >&5
1933   (exit $ac_status); }; }; then
1934   for ac_declaration in \
1935    ''\
1936    '#include <stdlib.h>' \
1937    'extern "C" void std::exit (int) throw (); using std::exit;' \
1938    'extern "C" void std::exit (int); using std::exit;' \
1939    'extern "C" void exit (int) throw ();' \
1940    'extern "C" void exit (int);' \
1941    'void exit (int);'
1942 do
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946 #include <stdlib.h>
1947 $ac_declaration
1948 int
1949 main ()
1950 {
1951 exit (42);
1952   ;
1953   return 0;
1954 }
1955 _ACEOF
1956 rm -f conftest.$ac_objext
1957 if { (eval echo "$as_me:1957: \"$ac_compile\"") >&5
1958   (eval $ac_compile) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); } &&
1962          { ac_try='test -s conftest.$ac_objext'
1963   { (eval echo "$as_me:1963: \"$ac_try\"") >&5
1964   (eval $ac_try) 2>&5
1965   ac_status=$?
1966   echo "$as_me:1966: \$? = $ac_status" >&5
1967   (exit $ac_status); }; }; then
1968   :
1969 else
1970   echo "$as_me: failed program was:" >&5
1971 cat conftest.$ac_ext >&5
1972 continue
1973 fi
1974 rm -f conftest.$ac_objext conftest.$ac_ext
1975   cat >conftest.$ac_ext <<_ACEOF
1976 #line 1976 "configure"
1977 #include "confdefs.h"
1978 $ac_declaration
1979 int
1980 main ()
1981 {
1982 exit (42);
1983   ;
1984   return 0;
1985 }
1986 _ACEOF
1987 rm -f conftest.$ac_objext
1988 if { (eval echo "$as_me:1988: \"$ac_compile\"") >&5
1989   (eval $ac_compile) 2>&5
1990   ac_status=$?
1991   echo "$as_me:1991: \$? = $ac_status" >&5
1992   (exit $ac_status); } &&
1993          { ac_try='test -s conftest.$ac_objext'
1994   { (eval echo "$as_me:1994: \"$ac_try\"") >&5
1995   (eval $ac_try) 2>&5
1996   ac_status=$?
1997   echo "$as_me:1997: \$? = $ac_status" >&5
1998   (exit $ac_status); }; }; then
1999   break
2000 else
2001   echo "$as_me: failed program was:" >&5
2002 cat conftest.$ac_ext >&5
2003 fi
2004 rm -f conftest.$ac_objext conftest.$ac_ext
2005 done
2006 rm -rf conftest*
2007 if test -n "$ac_declaration"; then
2008   echo '#ifdef __cplusplus' >>confdefs.h
2009   echo $ac_declaration      >>confdefs.h
2010   echo '#endif'             >>confdefs.h
2011 fi
2012
2013 else
2014   echo "$as_me: failed program was:" >&5
2015 cat conftest.$ac_ext >&5
2016 fi
2017 rm -f conftest.$ac_objext conftest.$ac_ext
2018 ac_ext=c
2019 ac_cpp='$CPP $CPPFLAGS'
2020 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2021 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2022 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2023 ac_main_return=return
2024
2025 GCC_VERSION=none
2026 if test "$GCC" = yes ; then
2027         echo "$as_me:2027: checking version of $CC" >&5
2028 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2029         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.].*//'`"
2030         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2031         echo "$as_me:2031: result: $GCC_VERSION" >&5
2032 echo "${ECHO_T}$GCC_VERSION" >&6
2033 fi
2034
2035 echo "$as_me:2035: checking for $CC option to accept ANSI C" >&5
2036 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2037 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2038   echo $ECHO_N "(cached) $ECHO_C" >&6
2039 else
2040   ac_cv_prog_cc_stdc=no
2041 ac_save_CC=$CC
2042 cat >conftest.$ac_ext <<_ACEOF
2043 #line 2043 "configure"
2044 #include "confdefs.h"
2045 #include <stdarg.h>
2046 #include <stdio.h>
2047 #include <sys/types.h>
2048 #include <sys/stat.h>
2049 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2050 struct buf { int x; };
2051 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2052 static char *e (p, i)
2053      char **p;
2054      int i;
2055 {
2056   return p[i];
2057 }
2058 static char *f (char * (*g) (char **, int), char **p, ...)
2059 {
2060   char *s;
2061   va_list v;
2062   va_start (v,p);
2063   s = g (p, va_arg (v,int));
2064   va_end (v);
2065   return s;
2066 }
2067 int test (int i, double x);
2068 struct s1 {int (*f) (int a);};
2069 struct s2 {int (*f) (double a);};
2070 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2071 int argc;
2072 char **argv;
2073 int
2074 main ()
2075 {
2076 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2077   ;
2078   return 0;
2079 }
2080 _ACEOF
2081 # Don't try gcc -ansi; that turns off useful extensions and
2082 # breaks some systems' header files.
2083 # AIX                   -qlanglvl=ansi
2084 # Ultrix and OSF/1      -std1
2085 # HP-UX 10.20 and later -Ae
2086 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2087 # SVR4                  -Xc -D__EXTENSIONS__
2088 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2089 do
2090   CC="$ac_save_CC $ac_arg"
2091   rm -f conftest.$ac_objext
2092 if { (eval echo "$as_me:2092: \"$ac_compile\"") >&5
2093   (eval $ac_compile) 2>&5
2094   ac_status=$?
2095   echo "$as_me:2095: \$? = $ac_status" >&5
2096   (exit $ac_status); } &&
2097          { ac_try='test -s conftest.$ac_objext'
2098   { (eval echo "$as_me:2098: \"$ac_try\"") >&5
2099   (eval $ac_try) 2>&5
2100   ac_status=$?
2101   echo "$as_me:2101: \$? = $ac_status" >&5
2102   (exit $ac_status); }; }; then
2103   ac_cv_prog_cc_stdc=$ac_arg
2104 break
2105 else
2106   echo "$as_me: failed program was:" >&5
2107 cat conftest.$ac_ext >&5
2108 fi
2109 rm -f conftest.$ac_objext
2110 done
2111 rm -f conftest.$ac_ext conftest.$ac_objext
2112 CC=$ac_save_CC
2113
2114 fi
2115
2116 case "x$ac_cv_prog_cc_stdc" in
2117   x|xno)
2118     echo "$as_me:2118: result: none needed" >&5
2119 echo "${ECHO_T}none needed" >&6 ;;
2120   *)
2121     echo "$as_me:2121: result: $ac_cv_prog_cc_stdc" >&5
2122 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2123     CC="$CC $ac_cv_prog_cc_stdc" ;;
2124 esac
2125
2126 # This should have been defined by AC_PROG_CC
2127 : ${CC:=cc}
2128
2129 echo "$as_me:2129: checking \$CC variable" >&5
2130 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2131 case "$CC" in #(vi
2132 *[\ \   ]-[IUD]*)
2133         echo "$as_me:2133: result: broken" >&5
2134 echo "${ECHO_T}broken" >&6
2135         { echo "$as_me:2135: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2136 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2137         # humor him...
2138         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2139         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2140
2141 cf_fix_cppflags=no
2142 cf_new_cflags=
2143 cf_new_cppflags=
2144 cf_new_extra_cppflags=
2145
2146 for cf_add_cflags in $cf_flags
2147 do
2148 case $cf_fix_cppflags in
2149 no)
2150         case $cf_add_cflags in #(vi
2151         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2152                 case $cf_add_cflags in
2153                 -D*)
2154                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2155
2156                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2157                                 && test -z "${cf_tst_cflags}" \
2158                                 && cf_fix_cppflags=yes
2159
2160                         if test $cf_fix_cppflags = yes ; then
2161                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2162                                 continue
2163                         elif test "${cf_tst_cflags}" = "\"'" ; then
2164                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2165                                 continue
2166                         fi
2167                         ;;
2168                 esac
2169                 case "$CPPFLAGS" in
2170                 *$cf_add_cflags) #(vi
2171                         ;;
2172                 *) #(vi
2173                         case $cf_add_cflags in #(vi
2174                         -D*)
2175                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2176
2177 CPPFLAGS=`echo "$CPPFLAGS" | \
2178         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2179                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2180
2181                                 ;;
2182                         esac
2183                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2184                         ;;
2185                 esac
2186                 ;;
2187         *)
2188                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2189                 ;;
2190         esac
2191         ;;
2192 yes)
2193         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2194
2195         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2196
2197         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2198                 && test -z "${cf_tst_cflags}" \
2199                 && cf_fix_cppflags=no
2200         ;;
2201 esac
2202 done
2203
2204 if test -n "$cf_new_cflags" ; then
2205
2206         CFLAGS="$CFLAGS $cf_new_cflags"
2207 fi
2208
2209 if test -n "$cf_new_cppflags" ; then
2210
2211         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2212 fi
2213
2214 if test -n "$cf_new_extra_cppflags" ; then
2215
2216         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2217 fi
2218
2219         ;;
2220 *)
2221         echo "$as_me:2221: result: ok" >&5
2222 echo "${ECHO_T}ok" >&6
2223         ;;
2224 esac
2225
2226 ac_ext=c
2227 ac_cpp='$CPP $CPPFLAGS'
2228 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2229 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2230 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2231 ac_main_return=return
2232 echo "$as_me:2232: checking how to run the C preprocessor" >&5
2233 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2234 # On Suns, sometimes $CPP names a directory.
2235 if test -n "$CPP" && test -d "$CPP"; then
2236   CPP=
2237 fi
2238 if test -z "$CPP"; then
2239   if test "${ac_cv_prog_CPP+set}" = set; then
2240   echo $ECHO_N "(cached) $ECHO_C" >&6
2241 else
2242       # Double quotes because CPP needs to be expanded
2243     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2244     do
2245       ac_preproc_ok=false
2246 for ac_c_preproc_warn_flag in '' yes
2247 do
2248   # Use a header file that comes with gcc, so configuring glibc
2249   # with a fresh cross-compiler works.
2250   # On the NeXT, cc -E runs the code through the compiler's parser,
2251   # not just through cpp. "Syntax error" is here to catch this case.
2252   cat >conftest.$ac_ext <<_ACEOF
2253 #line 2253 "configure"
2254 #include "confdefs.h"
2255 #include <assert.h>
2256                      Syntax error
2257 _ACEOF
2258 if { (eval echo "$as_me:2258: \"$ac_cpp conftest.$ac_ext\"") >&5
2259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2260   ac_status=$?
2261   egrep -v '^ *\+' conftest.er1 >conftest.err
2262   rm -f conftest.er1
2263   cat conftest.err >&5
2264   echo "$as_me:2264: \$? = $ac_status" >&5
2265   (exit $ac_status); } >/dev/null; then
2266   if test -s conftest.err; then
2267     ac_cpp_err=$ac_c_preproc_warn_flag
2268   else
2269     ac_cpp_err=
2270   fi
2271 else
2272   ac_cpp_err=yes
2273 fi
2274 if test -z "$ac_cpp_err"; then
2275   :
2276 else
2277   echo "$as_me: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279   # Broken: fails on valid input.
2280 continue
2281 fi
2282 rm -f conftest.err conftest.$ac_ext
2283
2284   # OK, works on sane cases.  Now check whether non-existent headers
2285   # can be detected and how.
2286   cat >conftest.$ac_ext <<_ACEOF
2287 #line 2287 "configure"
2288 #include "confdefs.h"
2289 #include <ac_nonexistent.h>
2290 _ACEOF
2291 if { (eval echo "$as_me:2291: \"$ac_cpp conftest.$ac_ext\"") >&5
2292   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2293   ac_status=$?
2294   egrep -v '^ *\+' conftest.er1 >conftest.err
2295   rm -f conftest.er1
2296   cat conftest.err >&5
2297   echo "$as_me:2297: \$? = $ac_status" >&5
2298   (exit $ac_status); } >/dev/null; then
2299   if test -s conftest.err; then
2300     ac_cpp_err=$ac_c_preproc_warn_flag
2301   else
2302     ac_cpp_err=
2303   fi
2304 else
2305   ac_cpp_err=yes
2306 fi
2307 if test -z "$ac_cpp_err"; then
2308   # Broken: success on invalid input.
2309 continue
2310 else
2311   echo "$as_me: failed program was:" >&5
2312   cat conftest.$ac_ext >&5
2313   # Passes both tests.
2314 ac_preproc_ok=:
2315 break
2316 fi
2317 rm -f conftest.err conftest.$ac_ext
2318
2319 done
2320 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2321 rm -f conftest.err conftest.$ac_ext
2322 if $ac_preproc_ok; then
2323   break
2324 fi
2325
2326     done
2327     ac_cv_prog_CPP=$CPP
2328
2329 fi
2330   CPP=$ac_cv_prog_CPP
2331 else
2332   ac_cv_prog_CPP=$CPP
2333 fi
2334 echo "$as_me:2334: result: $CPP" >&5
2335 echo "${ECHO_T}$CPP" >&6
2336 ac_preproc_ok=false
2337 for ac_c_preproc_warn_flag in '' yes
2338 do
2339   # Use a header file that comes with gcc, so configuring glibc
2340   # with a fresh cross-compiler works.
2341   # On the NeXT, cc -E runs the code through the compiler's parser,
2342   # not just through cpp. "Syntax error" is here to catch this case.
2343   cat >conftest.$ac_ext <<_ACEOF
2344 #line 2344 "configure"
2345 #include "confdefs.h"
2346 #include <assert.h>
2347                      Syntax error
2348 _ACEOF
2349 if { (eval echo "$as_me:2349: \"$ac_cpp conftest.$ac_ext\"") >&5
2350   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2351   ac_status=$?
2352   egrep -v '^ *\+' conftest.er1 >conftest.err
2353   rm -f conftest.er1
2354   cat conftest.err >&5
2355   echo "$as_me:2355: \$? = $ac_status" >&5
2356   (exit $ac_status); } >/dev/null; then
2357   if test -s conftest.err; then
2358     ac_cpp_err=$ac_c_preproc_warn_flag
2359   else
2360     ac_cpp_err=
2361   fi
2362 else
2363   ac_cpp_err=yes
2364 fi
2365 if test -z "$ac_cpp_err"; then
2366   :
2367 else
2368   echo "$as_me: failed program was:" >&5
2369   cat conftest.$ac_ext >&5
2370   # Broken: fails on valid input.
2371 continue
2372 fi
2373 rm -f conftest.err conftest.$ac_ext
2374
2375   # OK, works on sane cases.  Now check whether non-existent headers
2376   # can be detected and how.
2377   cat >conftest.$ac_ext <<_ACEOF
2378 #line 2378 "configure"
2379 #include "confdefs.h"
2380 #include <ac_nonexistent.h>
2381 _ACEOF
2382 if { (eval echo "$as_me:2382: \"$ac_cpp conftest.$ac_ext\"") >&5
2383   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2384   ac_status=$?
2385   egrep -v '^ *\+' conftest.er1 >conftest.err
2386   rm -f conftest.er1
2387   cat conftest.err >&5
2388   echo "$as_me:2388: \$? = $ac_status" >&5
2389   (exit $ac_status); } >/dev/null; then
2390   if test -s conftest.err; then
2391     ac_cpp_err=$ac_c_preproc_warn_flag
2392   else
2393     ac_cpp_err=
2394   fi
2395 else
2396   ac_cpp_err=yes
2397 fi
2398 if test -z "$ac_cpp_err"; then
2399   # Broken: success on invalid input.
2400 continue
2401 else
2402   echo "$as_me: failed program was:" >&5
2403   cat conftest.$ac_ext >&5
2404   # Passes both tests.
2405 ac_preproc_ok=:
2406 break
2407 fi
2408 rm -f conftest.err conftest.$ac_ext
2409
2410 done
2411 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2412 rm -f conftest.err conftest.$ac_ext
2413 if $ac_preproc_ok; then
2414   :
2415 else
2416   { { echo "$as_me:2416: error: C preprocessor \"$CPP\" fails sanity check" >&5
2417 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2418    { (exit 1); exit 1; }; }
2419 fi
2420
2421 ac_ext=c
2422 ac_cpp='$CPP $CPPFLAGS'
2423 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2424 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2425 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2426 ac_main_return=return
2427
2428 if test $ac_cv_c_compiler_gnu = yes; then
2429     echo "$as_me:2429: checking whether $CC needs -traditional" >&5
2430 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2431 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2432   echo $ECHO_N "(cached) $ECHO_C" >&6
2433 else
2434     ac_pattern="Autoconf.*'x'"
2435   cat >conftest.$ac_ext <<_ACEOF
2436 #line 2436 "configure"
2437 #include "confdefs.h"
2438 #include <sgtty.h>
2439 int Autoconf = TIOCGETP;
2440 _ACEOF
2441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2442   egrep "$ac_pattern" >/dev/null 2>&1; then
2443   ac_cv_prog_gcc_traditional=yes
2444 else
2445   ac_cv_prog_gcc_traditional=no
2446 fi
2447 rm -rf conftest*
2448
2449   if test $ac_cv_prog_gcc_traditional = no; then
2450     cat >conftest.$ac_ext <<_ACEOF
2451 #line 2451 "configure"
2452 #include "confdefs.h"
2453 #include <termio.h>
2454 int Autoconf = TCGETA;
2455 _ACEOF
2456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2457   egrep "$ac_pattern" >/dev/null 2>&1; then
2458   ac_cv_prog_gcc_traditional=yes
2459 fi
2460 rm -rf conftest*
2461
2462   fi
2463 fi
2464 echo "$as_me:2464: result: $ac_cv_prog_gcc_traditional" >&5
2465 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2466   if test $ac_cv_prog_gcc_traditional = yes; then
2467     CC="$CC -traditional"
2468   fi
2469 fi
2470
2471 echo "$as_me:2471: checking whether $CC understands -c and -o together" >&5
2472 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2473 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2474   echo $ECHO_N "(cached) $ECHO_C" >&6
2475 else
2476
2477 cat > conftest.$ac_ext <<CF_EOF
2478 #include <stdio.h>
2479 int main()
2480 {
2481         ${cf_cv_main_return:-return}(0);
2482 }
2483 CF_EOF
2484 # We do the test twice because some compilers refuse to overwrite an
2485 # existing .o file with -o, though they will create one.
2486 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2487 if { (eval echo "$as_me:2487: \"$ac_try\"") >&5
2488   (eval $ac_try) 2>&5
2489   ac_status=$?
2490   echo "$as_me:2490: \$? = $ac_status" >&5
2491   (exit $ac_status); } &&
2492   test -f conftest2.$ac_objext && { (eval echo "$as_me:2492: \"$ac_try\"") >&5
2493   (eval $ac_try) 2>&5
2494   ac_status=$?
2495   echo "$as_me:2495: \$? = $ac_status" >&5
2496   (exit $ac_status); };
2497 then
2498   eval cf_cv_prog_CC_c_o=yes
2499 else
2500   eval cf_cv_prog_CC_c_o=no
2501 fi
2502 rm -rf conftest*
2503
2504 fi
2505 if test $cf_cv_prog_CC_c_o = yes; then
2506   echo "$as_me:2506: result: yes" >&5
2507 echo "${ECHO_T}yes" >&6
2508 else
2509   echo "$as_me:2509: result: no" >&5
2510 echo "${ECHO_T}no" >&6
2511 fi
2512
2513 if test "$cross_compiling" = yes ; then
2514   LDCONFIG=:
2515 else
2516 case "$cf_cv_system_name" in #(vi
2517 dragonfly*|mirbsd*|freebsd*) #(vi
2518   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2519   ;;
2520 *) LDPATH=$PATH:/sbin:/usr/sbin
2521   # Extract the first word of "ldconfig", so it can be a program name with args.
2522 set dummy ldconfig; ac_word=$2
2523 echo "$as_me:2523: checking for $ac_word" >&5
2524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2525 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2526   echo $ECHO_N "(cached) $ECHO_C" >&6
2527 else
2528   case $LDCONFIG in
2529   [\\/]* | ?:[\\/]*)
2530   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2531   ;;
2532   *)
2533   ac_save_IFS=$IFS; IFS=$ac_path_separator
2534 ac_dummy="$LDPATH"
2535 for ac_dir in $ac_dummy; do
2536   IFS=$ac_save_IFS
2537   test -z "$ac_dir" && ac_dir=.
2538   if $as_executable_p "$ac_dir/$ac_word"; then
2539    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2540    echo "$as_me:2540: found $ac_dir/$ac_word" >&5
2541    break
2542 fi
2543 done
2544
2545   ;;
2546 esac
2547 fi
2548 LDCONFIG=$ac_cv_path_LDCONFIG
2549
2550 if test -n "$LDCONFIG"; then
2551   echo "$as_me:2551: result: $LDCONFIG" >&5
2552 echo "${ECHO_T}$LDCONFIG" >&6
2553 else
2554   echo "$as_me:2554: result: no" >&5
2555 echo "${ECHO_T}no" >&6
2556 fi
2557
2558   ;;
2559 esac
2560 fi
2561
2562 echo "$as_me:2562: checking if you want to ensure bool is consistent with C++" >&5
2563 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2564
2565 # Check whether --with-cxx or --without-cxx was given.
2566 if test "${with_cxx+set}" = set; then
2567   withval="$with_cxx"
2568   cf_with_cxx=$withval
2569 else
2570   cf_with_cxx=yes
2571 fi;
2572 echo "$as_me:2572: result: $cf_with_cxx" >&5
2573 echo "${ECHO_T}$cf_with_cxx" >&6
2574 if test "X$cf_with_cxx" = Xno ; then
2575         CXX=""
2576         GXX=""
2577 else
2578         # with autoconf 2.13, we can change the error to a warning:
2579                 ac_ext=cc
2580 ac_cpp='$CXXCPP $CPPFLAGS'
2581 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2582 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2583 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2584 ac_main_return=return
2585 if test -n "$ac_tool_prefix"; then
2586   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2587   do
2588     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2589 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2590 echo "$as_me:2590: checking for $ac_word" >&5
2591 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2592 if test "${ac_cv_prog_CXX+set}" = set; then
2593   echo $ECHO_N "(cached) $ECHO_C" >&6
2594 else
2595   if test -n "$CXX"; then
2596   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2597 else
2598   ac_save_IFS=$IFS; IFS=$ac_path_separator
2599 ac_dummy="$PATH"
2600 for ac_dir in $ac_dummy; do
2601   IFS=$ac_save_IFS
2602   test -z "$ac_dir" && ac_dir=.
2603   $as_executable_p "$ac_dir/$ac_word" || continue
2604 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2605 echo "$as_me:2605: found $ac_dir/$ac_word" >&5
2606 break
2607 done
2608
2609 fi
2610 fi
2611 CXX=$ac_cv_prog_CXX
2612 if test -n "$CXX"; then
2613   echo "$as_me:2613: result: $CXX" >&5
2614 echo "${ECHO_T}$CXX" >&6
2615 else
2616   echo "$as_me:2616: result: no" >&5
2617 echo "${ECHO_T}no" >&6
2618 fi
2619
2620     test -n "$CXX" && break
2621   done
2622 fi
2623 if test -z "$CXX"; then
2624   ac_ct_CXX=$CXX
2625   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2626 do
2627   # Extract the first word of "$ac_prog", so it can be a program name with args.
2628 set dummy $ac_prog; ac_word=$2
2629 echo "$as_me:2629: checking for $ac_word" >&5
2630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2631 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2632   echo $ECHO_N "(cached) $ECHO_C" >&6
2633 else
2634   if test -n "$ac_ct_CXX"; then
2635   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2636 else
2637   ac_save_IFS=$IFS; IFS=$ac_path_separator
2638 ac_dummy="$PATH"
2639 for ac_dir in $ac_dummy; do
2640   IFS=$ac_save_IFS
2641   test -z "$ac_dir" && ac_dir=.
2642   $as_executable_p "$ac_dir/$ac_word" || continue
2643 ac_cv_prog_ac_ct_CXX="$ac_prog"
2644 echo "$as_me:2644: found $ac_dir/$ac_word" >&5
2645 break
2646 done
2647
2648 fi
2649 fi
2650 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2651 if test -n "$ac_ct_CXX"; then
2652   echo "$as_me:2652: result: $ac_ct_CXX" >&5
2653 echo "${ECHO_T}$ac_ct_CXX" >&6
2654 else
2655   echo "$as_me:2655: result: no" >&5
2656 echo "${ECHO_T}no" >&6
2657 fi
2658
2659   test -n "$ac_ct_CXX" && break
2660 done
2661 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2662
2663   CXX=$ac_ct_CXX
2664 fi
2665
2666 # Provide some information about the compiler.
2667 echo "$as_me:2667:" \
2668      "checking for C++ compiler version" >&5
2669 ac_compiler=`set X $ac_compile; echo $2`
2670 { (eval echo "$as_me:2670: \"$ac_compiler --version </dev/null >&5\"") >&5
2671   (eval $ac_compiler --version </dev/null >&5) 2>&5
2672   ac_status=$?
2673   echo "$as_me:2673: \$? = $ac_status" >&5
2674   (exit $ac_status); }
2675 { (eval echo "$as_me:2675: \"$ac_compiler -v </dev/null >&5\"") >&5
2676   (eval $ac_compiler -v </dev/null >&5) 2>&5
2677   ac_status=$?
2678   echo "$as_me:2678: \$? = $ac_status" >&5
2679   (exit $ac_status); }
2680 { (eval echo "$as_me:2680: \"$ac_compiler -V </dev/null >&5\"") >&5
2681   (eval $ac_compiler -V </dev/null >&5) 2>&5
2682   ac_status=$?
2683   echo "$as_me:2683: \$? = $ac_status" >&5
2684   (exit $ac_status); }
2685
2686 echo "$as_me:2686: checking whether we are using the GNU C++ compiler" >&5
2687 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2688 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2689   echo $ECHO_N "(cached) $ECHO_C" >&6
2690 else
2691   cat >conftest.$ac_ext <<_ACEOF
2692 #line 2692 "configure"
2693 #include "confdefs.h"
2694
2695 int
2696 main ()
2697 {
2698 #ifndef __GNUC__
2699        choke me
2700 #endif
2701
2702   ;
2703   return 0;
2704 }
2705 _ACEOF
2706 rm -f conftest.$ac_objext
2707 if { (eval echo "$as_me:2707: \"$ac_compile\"") >&5
2708   (eval $ac_compile) 2>&5
2709   ac_status=$?
2710   echo "$as_me:2710: \$? = $ac_status" >&5
2711   (exit $ac_status); } &&
2712          { ac_try='test -s conftest.$ac_objext'
2713   { (eval echo "$as_me:2713: \"$ac_try\"") >&5
2714   (eval $ac_try) 2>&5
2715   ac_status=$?
2716   echo "$as_me:2716: \$? = $ac_status" >&5
2717   (exit $ac_status); }; }; then
2718   ac_compiler_gnu=yes
2719 else
2720   echo "$as_me: failed program was:" >&5
2721 cat conftest.$ac_ext >&5
2722 ac_compiler_gnu=no
2723 fi
2724 rm -f conftest.$ac_objext conftest.$ac_ext
2725 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2726
2727 fi
2728 echo "$as_me:2728: result: $ac_cv_cxx_compiler_gnu" >&5
2729 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2730 GXX=`test $ac_compiler_gnu = yes && echo yes`
2731 ac_test_CXXFLAGS=${CXXFLAGS+set}
2732 ac_save_CXXFLAGS=$CXXFLAGS
2733 CXXFLAGS="-g"
2734 echo "$as_me:2734: checking whether $CXX accepts -g" >&5
2735 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2736 if test "${ac_cv_prog_cxx_g+set}" = set; then
2737   echo $ECHO_N "(cached) $ECHO_C" >&6
2738 else
2739   cat >conftest.$ac_ext <<_ACEOF
2740 #line 2740 "configure"
2741 #include "confdefs.h"
2742
2743 int
2744 main ()
2745 {
2746
2747   ;
2748   return 0;
2749 }
2750 _ACEOF
2751 rm -f conftest.$ac_objext
2752 if { (eval echo "$as_me:2752: \"$ac_compile\"") >&5
2753   (eval $ac_compile) 2>&5
2754   ac_status=$?
2755   echo "$as_me:2755: \$? = $ac_status" >&5
2756   (exit $ac_status); } &&
2757          { ac_try='test -s conftest.$ac_objext'
2758   { (eval echo "$as_me:2758: \"$ac_try\"") >&5
2759   (eval $ac_try) 2>&5
2760   ac_status=$?
2761   echo "$as_me:2761: \$? = $ac_status" >&5
2762   (exit $ac_status); }; }; then
2763   ac_cv_prog_cxx_g=yes
2764 else
2765   echo "$as_me: failed program was:" >&5
2766 cat conftest.$ac_ext >&5
2767 ac_cv_prog_cxx_g=no
2768 fi
2769 rm -f conftest.$ac_objext conftest.$ac_ext
2770 fi
2771 echo "$as_me:2771: result: $ac_cv_prog_cxx_g" >&5
2772 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2773 if test "$ac_test_CXXFLAGS" = set; then
2774   CXXFLAGS=$ac_save_CXXFLAGS
2775 elif test $ac_cv_prog_cxx_g = yes; then
2776   if test "$GXX" = yes; then
2777     CXXFLAGS="-g -O2"
2778   else
2779     CXXFLAGS="-g"
2780   fi
2781 else
2782   if test "$GXX" = yes; then
2783     CXXFLAGS="-O2"
2784   else
2785     CXXFLAGS=
2786   fi
2787 fi
2788 for ac_declaration in \
2789    ''\
2790    '#include <stdlib.h>' \
2791    'extern "C" void std::exit (int) throw (); using std::exit;' \
2792    'extern "C" void std::exit (int); using std::exit;' \
2793    'extern "C" void exit (int) throw ();' \
2794    'extern "C" void exit (int);' \
2795    'void exit (int);'
2796 do
2797   cat >conftest.$ac_ext <<_ACEOF
2798 #line 2798 "configure"
2799 #include "confdefs.h"
2800 #include <stdlib.h>
2801 $ac_declaration
2802 int
2803 main ()
2804 {
2805 exit (42);
2806   ;
2807   return 0;
2808 }
2809 _ACEOF
2810 rm -f conftest.$ac_objext
2811 if { (eval echo "$as_me:2811: \"$ac_compile\"") >&5
2812   (eval $ac_compile) 2>&5
2813   ac_status=$?
2814   echo "$as_me:2814: \$? = $ac_status" >&5
2815   (exit $ac_status); } &&
2816          { ac_try='test -s conftest.$ac_objext'
2817   { (eval echo "$as_me:2817: \"$ac_try\"") >&5
2818   (eval $ac_try) 2>&5
2819   ac_status=$?
2820   echo "$as_me:2820: \$? = $ac_status" >&5
2821   (exit $ac_status); }; }; then
2822   :
2823 else
2824   echo "$as_me: failed program was:" >&5
2825 cat conftest.$ac_ext >&5
2826 continue
2827 fi
2828 rm -f conftest.$ac_objext conftest.$ac_ext
2829   cat >conftest.$ac_ext <<_ACEOF
2830 #line 2830 "configure"
2831 #include "confdefs.h"
2832 $ac_declaration
2833 int
2834 main ()
2835 {
2836 exit (42);
2837   ;
2838   return 0;
2839 }
2840 _ACEOF
2841 rm -f conftest.$ac_objext
2842 if { (eval echo "$as_me:2842: \"$ac_compile\"") >&5
2843   (eval $ac_compile) 2>&5
2844   ac_status=$?
2845   echo "$as_me:2845: \$? = $ac_status" >&5
2846   (exit $ac_status); } &&
2847          { ac_try='test -s conftest.$ac_objext'
2848   { (eval echo "$as_me:2848: \"$ac_try\"") >&5
2849   (eval $ac_try) 2>&5
2850   ac_status=$?
2851   echo "$as_me:2851: \$? = $ac_status" >&5
2852   (exit $ac_status); }; }; then
2853   break
2854 else
2855   echo "$as_me: failed program was:" >&5
2856 cat conftest.$ac_ext >&5
2857 fi
2858 rm -f conftest.$ac_objext conftest.$ac_ext
2859 done
2860 rm -rf conftest*
2861 if test -n "$ac_declaration"; then
2862   echo '#ifdef __cplusplus' >>confdefs.h
2863   echo $ac_declaration      >>confdefs.h
2864   echo '#endif'             >>confdefs.h
2865 fi
2866
2867 ac_ext=c
2868 ac_cpp='$CPP $CPPFLAGS'
2869 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2870 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2871 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2872 ac_main_return=return
2873
2874         ac_ext=cc
2875 ac_cpp='$CXXCPP $CPPFLAGS'
2876 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2877 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2878 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2879 ac_main_return=return
2880
2881         if test "x$cf_with_cxx" != xno
2882         then
2883                 # Several of the C++ configurations do not work, particularly when
2884                 # cross-compiling (20140913 -TD)
2885                 echo "$as_me:2885: checking if $CXX works" >&5
2886 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2887
2888                 save_CPPFLAGS="$CPPFLAGS"
2889                 eval cf_includedir=${includedir}
2890                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2891
2892 cat >conftest.$ac_ext <<_ACEOF
2893 #line 2893 "configure"
2894 #include "confdefs.h"
2895
2896 #include <stdlib.h>
2897 #include <stdio.h>
2898
2899 int
2900 main ()
2901 {
2902
2903                 printf("Hello world!\n")
2904
2905   ;
2906   return 0;
2907 }
2908 _ACEOF
2909 rm -f conftest.$ac_objext
2910 if { (eval echo "$as_me:2910: \"$ac_compile\"") >&5
2911   (eval $ac_compile) 2>&5
2912   ac_status=$?
2913   echo "$as_me:2913: \$? = $ac_status" >&5
2914   (exit $ac_status); } &&
2915          { ac_try='test -s conftest.$ac_objext'
2916   { (eval echo "$as_me:2916: \"$ac_try\"") >&5
2917   (eval $ac_try) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); }; }; then
2921   cf_cxx_works=yes
2922 else
2923   echo "$as_me: failed program was:" >&5
2924 cat conftest.$ac_ext >&5
2925 cf_cxx_works=no
2926 fi
2927 rm -f conftest.$ac_objext conftest.$ac_ext
2928                 CPPFLAGS="$save_CPPFLAGS"
2929
2930                 echo "$as_me:2930: result: $cf_cxx_works" >&5
2931 echo "${ECHO_T}$cf_cxx_works" >&6
2932                 if test "x$cf_cxx_works" = xno
2933                 then
2934                         { echo "$as_me:2934: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2935 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2936                         cf_with_cxx=no; CXX=""; GXX="";
2937                 fi
2938         fi
2939         ac_ext=c
2940 ac_cpp='$CPP $CPPFLAGS'
2941 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2942 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2943 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2944 ac_main_return=return
2945
2946         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2947         if test "$CXX" = "g++" ; then
2948                 # Extract the first word of "g++", so it can be a program name with args.
2949 set dummy g++; ac_word=$2
2950 echo "$as_me:2950: checking for $ac_word" >&5
2951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2952 if test "${ac_cv_path_CXX+set}" = set; then
2953   echo $ECHO_N "(cached) $ECHO_C" >&6
2954 else
2955   case $CXX in
2956   [\\/]* | ?:[\\/]*)
2957   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2958   ;;
2959   *)
2960   ac_save_IFS=$IFS; IFS=$ac_path_separator
2961 ac_dummy="$PATH"
2962 for ac_dir in $ac_dummy; do
2963   IFS=$ac_save_IFS
2964   test -z "$ac_dir" && ac_dir=.
2965   if $as_executable_p "$ac_dir/$ac_word"; then
2966    ac_cv_path_CXX="$ac_dir/$ac_word"
2967    echo "$as_me:2967: found $ac_dir/$ac_word" >&5
2968    break
2969 fi
2970 done
2971
2972   ;;
2973 esac
2974 fi
2975 CXX=$ac_cv_path_CXX
2976
2977 if test -n "$CXX"; then
2978   echo "$as_me:2978: result: $CXX" >&5
2979 echo "${ECHO_T}$CXX" >&6
2980 else
2981   echo "$as_me:2981: result: no" >&5
2982 echo "${ECHO_T}no" >&6
2983 fi
2984
2985         fi
2986         case "x$CXX" in #(vi
2987         x|xg++)
2988                 { echo "$as_me:2988: WARNING: You don't have any C++ compiler, too bad" >&5
2989 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2990                 cf_with_cxx=no; CXX=""; GXX="";
2991                 ;;
2992         esac
2993 fi
2994
2995 GXX_VERSION=none
2996 if test "$GXX" = yes; then
2997         echo "$as_me:2997: checking version of ${CXX:-g++}" >&5
2998 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2999         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3000         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3001         echo "$as_me:3001: result: $GXX_VERSION" >&5
3002 echo "${ECHO_T}$GXX_VERSION" >&6
3003 fi
3004
3005 case $GXX_VERSION in
3006 1*|2.[0-6]*)
3007         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3008         # cf_cxx_library=no
3009         { echo "$as_me:3009: WARNING: templates do not work" >&5
3010 echo "$as_me: WARNING: templates do not work" >&2;}
3011         ;;
3012 esac
3013
3014 echo "$as_me:3014: checking if you want to build C++ binding and demo" >&5
3015 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3016
3017 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3018 if test "${with_cxx_binding+set}" = set; then
3019   withval="$with_cxx_binding"
3020   cf_with_cxx_binding=$withval
3021 else
3022   cf_with_cxx_binding=$cf_with_cxx
3023 fi;
3024 echo "$as_me:3024: result: $cf_with_cxx_binding" >&5
3025 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3026
3027 echo "$as_me:3027: checking if you want to build with Ada95" >&5
3028 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3029 echo "$as_me:3029: result: $cf_with_ada" >&5
3030 echo "${ECHO_T}$cf_with_ada" >&6
3031
3032 echo "$as_me:3032: checking if you want to install terminal database" >&5
3033 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3034
3035 # Check whether --enable-db-install or --disable-db-install was given.
3036 if test "${enable_db_install+set}" = set; then
3037   enableval="$enable_db_install"
3038   cf_with_db_install=$enableval
3039 else
3040   cf_with_db_install=yes
3041 fi;
3042 echo "$as_me:3042: result: $cf_with_db_install" >&5
3043 echo "${ECHO_T}$cf_with_db_install" >&6
3044
3045 echo "$as_me:3045: checking if you want to install manpages" >&5
3046 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3047
3048 # Check whether --with-manpages or --without-manpages was given.
3049 if test "${with_manpages+set}" = set; then
3050   withval="$with_manpages"
3051   cf_with_manpages=$withval
3052 else
3053   cf_with_manpages=yes
3054 fi;
3055 echo "$as_me:3055: result: $cf_with_manpages" >&5
3056 echo "${ECHO_T}$cf_with_manpages" >&6
3057
3058 echo "$as_me:3058: checking if you want to build programs such as tic" >&5
3059 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3060
3061 # Check whether --with-progs or --without-progs was given.
3062 if test "${with_progs+set}" = set; then
3063   withval="$with_progs"
3064   cf_with_progs=$withval
3065 else
3066   cf_with_progs=yes
3067 fi;
3068 echo "$as_me:3068: result: $cf_with_progs" >&5
3069 echo "${ECHO_T}$cf_with_progs" >&6
3070
3071 echo "$as_me:3071: checking if you want to build test-programs" >&5
3072 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3073
3074 # Check whether --with-tests or --without-tests was given.
3075 if test "${with_tests+set}" = set; then
3076   withval="$with_tests"
3077   cf_with_tests=$withval
3078 else
3079   cf_with_tests=yes
3080 fi;
3081 echo "$as_me:3081: result: $cf_with_tests" >&5
3082 echo "${ECHO_T}$cf_with_tests" >&6
3083
3084 echo "$as_me:3084: checking if you wish to install curses.h" >&5
3085 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3086
3087 # Check whether --with-curses-h or --without-curses-h was given.
3088 if test "${with_curses_h+set}" = set; then
3089   withval="$with_curses_h"
3090   with_curses_h=$withval
3091 else
3092   with_curses_h=yes
3093 fi;
3094 echo "$as_me:3094: result: $with_curses_h" >&5
3095 echo "${ECHO_T}$with_curses_h" >&6
3096
3097 modules_to_build="ncurses"
3098 if test "X$cf_with_progs" != Xno ; then
3099 modules_to_build="$modules_to_build progs tack"
3100 fi
3101 modules_to_build="$modules_to_build panel menu form"
3102
3103 test "$program_prefix" != NONE &&
3104   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3105 # Use a double $ so make ignores it.
3106 test "$program_suffix" != NONE &&
3107   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3108 # Double any \ or $.  echo might interpret backslashes.
3109 # By default was `s,x,x', remove it if useless.
3110 cat <<\_ACEOF >conftest.sed
3111 s/[\\$]/&&/g;s/;s,x,x,$//
3112 _ACEOF
3113 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3114 rm conftest.sed
3115
3116 for ac_prog in mawk gawk nawk awk
3117 do
3118   # Extract the first word of "$ac_prog", so it can be a program name with args.
3119 set dummy $ac_prog; ac_word=$2
3120 echo "$as_me:3120: checking for $ac_word" >&5
3121 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3122 if test "${ac_cv_prog_AWK+set}" = set; then
3123   echo $ECHO_N "(cached) $ECHO_C" >&6
3124 else
3125   if test -n "$AWK"; then
3126   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3127 else
3128   ac_save_IFS=$IFS; IFS=$ac_path_separator
3129 ac_dummy="$PATH"
3130 for ac_dir in $ac_dummy; do
3131   IFS=$ac_save_IFS
3132   test -z "$ac_dir" && ac_dir=.
3133   $as_executable_p "$ac_dir/$ac_word" || continue
3134 ac_cv_prog_AWK="$ac_prog"
3135 echo "$as_me:3135: found $ac_dir/$ac_word" >&5
3136 break
3137 done
3138
3139 fi
3140 fi
3141 AWK=$ac_cv_prog_AWK
3142 if test -n "$AWK"; then
3143   echo "$as_me:3143: result: $AWK" >&5
3144 echo "${ECHO_T}$AWK" >&6
3145 else
3146   echo "$as_me:3146: result: no" >&5
3147 echo "${ECHO_T}no" >&6
3148 fi
3149
3150   test -n "$AWK" && break
3151 done
3152
3153 test -z "$AWK" && { { echo "$as_me:3153: error: No awk program found" >&5
3154 echo "$as_me: error: No awk program found" >&2;}
3155    { (exit 1); exit 1; }; }
3156
3157 echo "$as_me:3157: checking for egrep" >&5
3158 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3159 if test "${ac_cv_prog_egrep+set}" = set; then
3160   echo $ECHO_N "(cached) $ECHO_C" >&6
3161 else
3162   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3163     then ac_cv_prog_egrep='grep -E'
3164     else ac_cv_prog_egrep='egrep'
3165     fi
3166 fi
3167 echo "$as_me:3167: result: $ac_cv_prog_egrep" >&5
3168 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3169  EGREP=$ac_cv_prog_egrep
3170
3171 test -z "$EGREP" && { { echo "$as_me:3171: error: No egrep program found" >&5
3172 echo "$as_me: error: No egrep program found" >&2;}
3173    { (exit 1); exit 1; }; }
3174
3175 # Find a good install program.  We prefer a C program (faster),
3176 # so one script is as good as another.  But avoid the broken or
3177 # incompatible versions:
3178 # SysV /etc/install, /usr/sbin/install
3179 # SunOS /usr/etc/install
3180 # IRIX /sbin/install
3181 # AIX /bin/install
3182 # AmigaOS /C/install, which installs bootblocks on floppy discs
3183 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3184 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3185 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3186 # ./install, which can be erroneously created by make from ./install.sh.
3187 echo "$as_me:3187: checking for a BSD compatible install" >&5
3188 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3189 if test -z "$INSTALL"; then
3190 if test "${ac_cv_path_install+set}" = set; then
3191   echo $ECHO_N "(cached) $ECHO_C" >&6
3192 else
3193     ac_save_IFS=$IFS; IFS=$ac_path_separator
3194   for ac_dir in $PATH; do
3195     IFS=$ac_save_IFS
3196     # Account for people who put trailing slashes in PATH elements.
3197     case $ac_dir/ in
3198     / | ./ | .// | /cC/* \
3199     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3200     | /usr/ucb/* ) ;;
3201     *)
3202       # OSF1 and SCO ODT 3.0 have their own names for install.
3203       # Don't use installbsd from OSF since it installs stuff as root
3204       # by default.
3205       for ac_prog in ginstall scoinst install; do
3206         if $as_executable_p "$ac_dir/$ac_prog"; then
3207           if test $ac_prog = install &&
3208             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3209             # AIX install.  It has an incompatible calling convention.
3210             :
3211           elif test $ac_prog = install &&
3212             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3213             # program-specific install script used by HP pwplus--don't use.
3214             :
3215           else
3216             ac_cv_path_install="$ac_dir/$ac_prog -c"
3217             break 2
3218           fi
3219         fi
3220       done
3221       ;;
3222     esac
3223   done
3224
3225 fi
3226   if test "${ac_cv_path_install+set}" = set; then
3227     INSTALL=$ac_cv_path_install
3228   else
3229     # As a last resort, use the slow shell script.  We don't cache a
3230     # path for INSTALL within a source directory, because that will
3231     # break other packages using the cache if that directory is
3232     # removed, or if the path is relative.
3233     INSTALL=$ac_install_sh
3234   fi
3235 fi
3236 echo "$as_me:3236: result: $INSTALL" >&5
3237 echo "${ECHO_T}$INSTALL" >&6
3238
3239 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3240 # It thinks the first close brace ends the variable substitution.
3241 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3242
3243 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3244
3245 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3246
3247 case $INSTALL in
3248 /*)
3249   ;;
3250 *)
3251   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3252   test -z "$cf_dir" && cf_dir=.
3253   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3254   ;;
3255 esac
3256
3257 for ac_prog in tdlint lint alint splint lclint
3258 do
3259   # Extract the first word of "$ac_prog", so it can be a program name with args.
3260 set dummy $ac_prog; ac_word=$2
3261 echo "$as_me:3261: checking for $ac_word" >&5
3262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3263 if test "${ac_cv_prog_LINT+set}" = set; then
3264   echo $ECHO_N "(cached) $ECHO_C" >&6
3265 else
3266   if test -n "$LINT"; then
3267   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3268 else
3269   ac_save_IFS=$IFS; IFS=$ac_path_separator
3270 ac_dummy="$PATH"
3271 for ac_dir in $ac_dummy; do
3272   IFS=$ac_save_IFS
3273   test -z "$ac_dir" && ac_dir=.
3274   $as_executable_p "$ac_dir/$ac_word" || continue
3275 ac_cv_prog_LINT="$ac_prog"
3276 echo "$as_me:3276: found $ac_dir/$ac_word" >&5
3277 break
3278 done
3279
3280 fi
3281 fi
3282 LINT=$ac_cv_prog_LINT
3283 if test -n "$LINT"; then
3284   echo "$as_me:3284: result: $LINT" >&5
3285 echo "${ECHO_T}$LINT" >&6
3286 else
3287   echo "$as_me:3287: result: no" >&5
3288 echo "${ECHO_T}no" >&6
3289 fi
3290
3291   test -n "$LINT" && break
3292 done
3293
3294 echo "$as_me:3294: checking whether ln -s works" >&5
3295 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3296 LN_S=$as_ln_s
3297 if test "$LN_S" = "ln -s"; then
3298   echo "$as_me:3298: result: yes" >&5
3299 echo "${ECHO_T}yes" >&6
3300 else
3301   echo "$as_me:3301: result: no, using $LN_S" >&5
3302 echo "${ECHO_T}no, using $LN_S" >&6
3303 fi
3304
3305 echo "$as_me:3305: checking if $LN_S -f options work" >&5
3306 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3307
3308 rm -f conf$$.src conf$$dst
3309 echo >conf$$.dst
3310 echo first >conf$$.src
3311 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3312         cf_prog_ln_sf=yes
3313 else
3314         cf_prog_ln_sf=no
3315 fi
3316 rm -f conf$$.dst conf$$src
3317 echo "$as_me:3317: result: $cf_prog_ln_sf" >&5
3318 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3319
3320 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3321
3322 echo "$as_me:3322: checking for long file names" >&5
3323 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3324 if test "${ac_cv_sys_long_file_names+set}" = set; then
3325   echo $ECHO_N "(cached) $ECHO_C" >&6
3326 else
3327   ac_cv_sys_long_file_names=yes
3328 # Test for long file names in all the places we know might matter:
3329 #      .                the current directory, where building will happen
3330 #      $prefix/lib      where we will be installing things
3331 #      $exec_prefix/lib likewise
3332 # eval it to expand exec_prefix.
3333 #      $TMPDIR          if set, where it might want to write temporary files
3334 # if $TMPDIR is not set:
3335 #      /tmp             where it might want to write temporary files
3336 #      /var/tmp         likewise
3337 #      /usr/tmp         likewise
3338 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3339   ac_tmpdirs=$TMPDIR
3340 else
3341   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3342 fi
3343 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3344   test -d $ac_dir || continue
3345   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3346   ac_xdir=$ac_dir/cf$$
3347   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3348   ac_tf1=$ac_xdir/conftest9012345
3349   ac_tf2=$ac_xdir/conftest9012346
3350   (echo 1 >$ac_tf1) 2>/dev/null
3351   (echo 2 >$ac_tf2) 2>/dev/null
3352   ac_val=`cat $ac_tf1 2>/dev/null`
3353   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3354     ac_cv_sys_long_file_names=no
3355     rm -rf $ac_xdir 2>/dev/null
3356     break
3357   fi
3358   rm -rf $ac_xdir 2>/dev/null
3359 done
3360 fi
3361 echo "$as_me:3361: result: $ac_cv_sys_long_file_names" >&5
3362 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3363 if test $ac_cv_sys_long_file_names = yes; then
3364
3365 cat >>confdefs.h <<\EOF
3366 #define HAVE_LONG_FILE_NAMES 1
3367 EOF
3368
3369 fi
3370
3371 # if we find pkg-config, check if we should install the ".pc" files.
3372
3373 echo "$as_me:3373: checking if you want to use pkg-config" >&5
3374 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3375
3376 # Check whether --with-pkg-config or --without-pkg-config was given.
3377 if test "${with_pkg_config+set}" = set; then
3378   withval="$with_pkg_config"
3379   cf_pkg_config=$withval
3380 else
3381   cf_pkg_config=yes
3382 fi;
3383 echo "$as_me:3383: result: $cf_pkg_config" >&5
3384 echo "${ECHO_T}$cf_pkg_config" >&6
3385
3386 case $cf_pkg_config in #(vi
3387 no) #(vi
3388         PKG_CONFIG=none
3389         ;;
3390 yes) #(vi
3391
3392 if test -n "$ac_tool_prefix"; then
3393   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3394 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3395 echo "$as_me:3395: checking for $ac_word" >&5
3396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3397 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3398   echo $ECHO_N "(cached) $ECHO_C" >&6
3399 else
3400   case $PKG_CONFIG in
3401   [\\/]* | ?:[\\/]*)
3402   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3403   ;;
3404   *)
3405   ac_save_IFS=$IFS; IFS=$ac_path_separator
3406 ac_dummy="$PATH"
3407 for ac_dir in $ac_dummy; do
3408   IFS=$ac_save_IFS
3409   test -z "$ac_dir" && ac_dir=.
3410   if $as_executable_p "$ac_dir/$ac_word"; then
3411    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3412    echo "$as_me:3412: found $ac_dir/$ac_word" >&5
3413    break
3414 fi
3415 done
3416
3417   ;;
3418 esac
3419 fi
3420 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3421
3422 if test -n "$PKG_CONFIG"; then
3423   echo "$as_me:3423: result: $PKG_CONFIG" >&5
3424 echo "${ECHO_T}$PKG_CONFIG" >&6
3425 else
3426   echo "$as_me:3426: result: no" >&5
3427 echo "${ECHO_T}no" >&6
3428 fi
3429
3430 fi
3431 if test -z "$ac_cv_path_PKG_CONFIG"; then
3432   ac_pt_PKG_CONFIG=$PKG_CONFIG
3433   # Extract the first word of "pkg-config", so it can be a program name with args.
3434 set dummy pkg-config; ac_word=$2
3435 echo "$as_me:3435: checking for $ac_word" >&5
3436 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3437 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3438   echo $ECHO_N "(cached) $ECHO_C" >&6
3439 else
3440   case $ac_pt_PKG_CONFIG in
3441   [\\/]* | ?:[\\/]*)
3442   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3443   ;;
3444   *)
3445   ac_save_IFS=$IFS; IFS=$ac_path_separator
3446 ac_dummy="$PATH"
3447 for ac_dir in $ac_dummy; do
3448   IFS=$ac_save_IFS
3449   test -z "$ac_dir" && ac_dir=.
3450   if $as_executable_p "$ac_dir/$ac_word"; then
3451    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3452    echo "$as_me:3452: found $ac_dir/$ac_word" >&5
3453    break
3454 fi
3455 done
3456
3457   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3458   ;;
3459 esac
3460 fi
3461 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3462
3463 if test -n "$ac_pt_PKG_CONFIG"; then
3464   echo "$as_me:3464: result: $ac_pt_PKG_CONFIG" >&5
3465 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3466 else
3467   echo "$as_me:3467: result: no" >&5
3468 echo "${ECHO_T}no" >&6
3469 fi
3470
3471   PKG_CONFIG=$ac_pt_PKG_CONFIG
3472 else
3473   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3474 fi
3475
3476         ;;
3477 *)
3478         PKG_CONFIG=$withval
3479         ;;
3480 esac
3481
3482 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3483 if test "$PKG_CONFIG" != none ; then
3484
3485 if test "x$prefix" != xNONE; then
3486   cf_path_syntax="$prefix"
3487 else
3488   cf_path_syntax="$ac_default_prefix"
3489 fi
3490
3491 case ".$PKG_CONFIG" in #(vi
3492 .\$\(*\)*|.\'*\'*) #(vi
3493   ;;
3494 ..|./*|.\\*) #(vi
3495   ;;
3496 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3497   ;;
3498 .\${*prefix}*|.\${*dir}*) #(vi
3499   eval PKG_CONFIG="$PKG_CONFIG"
3500   case ".$PKG_CONFIG" in #(vi
3501   .NONE/*)
3502     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3503     ;;
3504   esac
3505   ;; #(vi
3506 .no|.NONE/*)
3507   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3508   ;;
3509 *)
3510   { { echo "$as_me:3510: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3511 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3512    { (exit 1); exit 1; }; }
3513   ;;
3514 esac
3515
3516 else
3517         { echo "$as_me:3517: WARNING: pkg-config is not installed" >&5
3518 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3519 fi
3520
3521 echo "$as_me:3521: checking for $PKG_CONFIG library directory" >&5
3522 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3523
3524 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3525 if test "${with_pkg_config_libdir+set}" = set; then
3526   withval="$with_pkg_config_libdir"
3527   PKG_CONFIG_LIBDIR=$withval
3528 else
3529   PKG_CONFIG_LIBDIR=yes
3530 fi;
3531
3532 case x$PKG_CONFIG_LIBDIR in #(vi
3533 x/*) #(vi
3534         ;;
3535 xyes) #(vi
3536         # Look for the library directory using the same prefix as the executable
3537         if test "x$PKG_CONFIG" = xnone
3538         then
3539                 cf_path=$prefix
3540         else
3541                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3542         fi
3543
3544         # If you don't like using the default architecture, you have to specify the
3545         # intended library directory and corresponding compiler/linker options.
3546         #
3547         # This case allows for Debian's 2014-flavor of multiarch, along with the
3548         # most common variations before that point.  Some other variants spell the
3549         # directory differently, e.g., "pkg-config", and put it in unusual places.
3550         # pkg-config has always been poorly standardized, which is ironic...
3551         case x`(arch) 2>/dev/null` in #(vi
3552         *64) #(vi
3553                 cf_search_path="\
3554                         $cf_path/lib/*64-linux-gnu \
3555                         $cf_path/share \
3556                         $cf_path/lib64 \
3557                         $cf_path/lib32 \
3558                         $cf_path/lib"
3559                 ;;
3560         *)
3561                 cf_search_path="\
3562                         $cf_path/lib/*-linux-gnu \
3563                         $cf_path/share \
3564                         $cf_path/lib32 \
3565                         $cf_path/lib \
3566                         $cf_path/libdata"
3567                 ;;
3568         esac
3569
3570         test -n "$verbose" && echo "    list..." 1>&6
3571
3572 echo "${as_me:-configure}:3572: testing list... ..." 1>&5
3573
3574         for cf_config in $cf_search_path
3575         do
3576                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3577
3578 echo "${as_me:-configure}:3578: testing checking $cf_config/pkgconfig ..." 1>&5
3579
3580                 if test -d $cf_config/pkgconfig
3581                 then
3582                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3583                         echo "$as_me:3583: checking done" >&5
3584 echo $ECHO_N "checking done... $ECHO_C" >&6
3585                         break
3586                 fi
3587         done
3588         ;;
3589 *)
3590         ;;
3591 esac
3592
3593 echo "$as_me:3593: result: $PKG_CONFIG_LIBDIR" >&5
3594 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3595
3596 if test "x$PKG_CONFIG" != xnone
3597 then
3598         echo "$as_me:3598: checking if we should install .pc files for $PKG_CONFIG" >&5
3599 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3600 else
3601         echo "$as_me:3601: checking if we should install .pc files" >&5
3602 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3603 fi
3604
3605 # Check whether --enable-pc-files or --disable-pc-files was given.
3606 if test "${enable_pc_files+set}" = set; then
3607   enableval="$enable_pc_files"
3608   enable_pc_files=$enableval
3609 else
3610   enable_pc_files=no
3611 fi;
3612 echo "$as_me:3612: result: $enable_pc_files" >&5
3613 echo "${ECHO_T}$enable_pc_files" >&6
3614
3615 if test "x$enable_pc_files" != xno
3616 then
3617         case "x$PKG_CONFIG_LIBDIR" in #(vi
3618         xno|xyes) #(vi
3619                 { echo "$as_me:3619: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3620 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3621                 MAKE_PC_FILES="#"
3622                 ;;
3623         *)
3624
3625 if test "x$prefix" != xNONE; then
3626   cf_path_syntax="$prefix"
3627 else
3628   cf_path_syntax="$ac_default_prefix"
3629 fi
3630
3631 case ".$PKG_CONFIG_LIBDIR" in #(vi
3632 .\$\(*\)*|.\'*\'*) #(vi
3633   ;;
3634 ..|./*|.\\*) #(vi
3635   ;;
3636 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3637   ;;
3638 .\${*prefix}*|.\${*dir}*) #(vi
3639   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3640   case ".$PKG_CONFIG_LIBDIR" in #(vi
3641   .NONE/*)
3642     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3643     ;;
3644   esac
3645   ;; #(vi
3646 .no|.NONE/*)
3647   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3648   ;;
3649 *)
3650   { { echo "$as_me:3650: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3651 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3652    { (exit 1); exit 1; }; }
3653   ;;
3654 esac
3655
3656                 MAKE_PC_FILES=
3657                 ;;
3658         esac
3659 else
3660         MAKE_PC_FILES="#"
3661 fi
3662
3663 if test -z "$MAKE_PC_FILES"
3664 then
3665         echo "$as_me:3665: checking for suffix to add to pc-files" >&5
3666 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3667
3668 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3669 if test "${with_pc_suffix+set}" = set; then
3670   withval="$with_pc_suffix"
3671   case "x$withval" in #(vi
3672         xyes|xno) #(vi
3673                 PC_MODULE_SUFFIX=
3674                 ;;
3675         *)      PC_MODULE_SUFFIX="$withval"
3676                 ;;
3677         esac
3678 fi;
3679         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3680         echo "$as_me:3680: result: $PC_MODULE_SUFFIX" >&5
3681 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3682         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3683
3684 fi
3685
3686 echo "$as_me:3686: checking if we should assume mixed-case filenames" >&5
3687 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3688
3689 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3690 if test "${enable_mixed_case+set}" = set; then
3691   enableval="$enable_mixed_case"
3692   enable_mixedcase=$enableval
3693 else
3694   enable_mixedcase=auto
3695 fi;
3696 echo "$as_me:3696: result: $enable_mixedcase" >&5
3697 echo "${ECHO_T}$enable_mixedcase" >&6
3698 if test "$enable_mixedcase" = "auto" ; then
3699
3700 echo "$as_me:3700: checking if filesystem supports mixed-case filenames" >&5
3701 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3702 if test "${cf_cv_mixedcase+set}" = set; then
3703   echo $ECHO_N "(cached) $ECHO_C" >&6
3704 else
3705
3706 if test "$cross_compiling" = yes ; then
3707         case $target_alias in #(vi
3708         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3709                 cf_cv_mixedcase=no
3710                 ;;
3711         *)
3712                 cf_cv_mixedcase=yes
3713                 ;;
3714         esac
3715 else
3716         rm -f conftest CONFTEST
3717         echo test >conftest
3718         if test -f CONFTEST ; then
3719                 cf_cv_mixedcase=no
3720         else
3721                 cf_cv_mixedcase=yes
3722         fi
3723         rm -f conftest CONFTEST
3724 fi
3725
3726 fi
3727 echo "$as_me:3727: result: $cf_cv_mixedcase" >&5
3728 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3729 test "$cf_cv_mixedcase" = yes &&
3730 cat >>confdefs.h <<\EOF
3731 #define MIXEDCASE_FILENAMES 1
3732 EOF
3733
3734 else
3735     cf_cv_mixedcase=$enable_mixedcase
3736     if test "x$enable_mixedcase" = "xyes" ; then
3737
3738 cat >>confdefs.h <<\EOF
3739 #define MIXEDCASE_FILENAMES 1
3740 EOF
3741
3742     fi
3743 fi
3744
3745 # do this after mixed-case option (tags/TAGS is not as important as tic).
3746 echo "$as_me:3746: checking whether ${MAKE-make} sets \${MAKE}" >&5
3747 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3748 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3749 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3750   echo $ECHO_N "(cached) $ECHO_C" >&6
3751 else
3752   cat >conftest.make <<\EOF
3753 all:
3754         @echo 'ac_maketemp="${MAKE}"'
3755 EOF
3756 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3757 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3758 if test -n "$ac_maketemp"; then
3759   eval ac_cv_prog_make_${ac_make}_set=yes
3760 else
3761   eval ac_cv_prog_make_${ac_make}_set=no
3762 fi
3763 rm -f conftest.make
3764 fi
3765 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3766   echo "$as_me:3766: result: yes" >&5
3767 echo "${ECHO_T}yes" >&6
3768   SET_MAKE=
3769 else
3770   echo "$as_me:3770: result: no" >&5
3771 echo "${ECHO_T}no" >&6
3772   SET_MAKE="MAKE=${MAKE-make}"
3773 fi
3774
3775 for ac_prog in exctags ctags
3776 do
3777   # Extract the first word of "$ac_prog", so it can be a program name with args.
3778 set dummy $ac_prog; ac_word=$2
3779 echo "$as_me:3779: checking for $ac_word" >&5
3780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3781 if test "${ac_cv_prog_CTAGS+set}" = set; then
3782   echo $ECHO_N "(cached) $ECHO_C" >&6
3783 else
3784   if test -n "$CTAGS"; then
3785   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3786 else
3787   ac_save_IFS=$IFS; IFS=$ac_path_separator
3788 ac_dummy="$PATH"
3789 for ac_dir in $ac_dummy; do
3790   IFS=$ac_save_IFS
3791   test -z "$ac_dir" && ac_dir=.
3792   $as_executable_p "$ac_dir/$ac_word" || continue
3793 ac_cv_prog_CTAGS="$ac_prog"
3794 echo "$as_me:3794: found $ac_dir/$ac_word" >&5
3795 break
3796 done
3797
3798 fi
3799 fi
3800 CTAGS=$ac_cv_prog_CTAGS
3801 if test -n "$CTAGS"; then
3802   echo "$as_me:3802: result: $CTAGS" >&5
3803 echo "${ECHO_T}$CTAGS" >&6
3804 else
3805   echo "$as_me:3805: result: no" >&5
3806 echo "${ECHO_T}no" >&6
3807 fi
3808
3809   test -n "$CTAGS" && break
3810 done
3811
3812 for ac_prog in exetags etags
3813 do
3814   # Extract the first word of "$ac_prog", so it can be a program name with args.
3815 set dummy $ac_prog; ac_word=$2
3816 echo "$as_me:3816: checking for $ac_word" >&5
3817 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3818 if test "${ac_cv_prog_ETAGS+set}" = set; then
3819   echo $ECHO_N "(cached) $ECHO_C" >&6
3820 else
3821   if test -n "$ETAGS"; then
3822   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3823 else
3824   ac_save_IFS=$IFS; IFS=$ac_path_separator
3825 ac_dummy="$PATH"
3826 for ac_dir in $ac_dummy; do
3827   IFS=$ac_save_IFS
3828   test -z "$ac_dir" && ac_dir=.
3829   $as_executable_p "$ac_dir/$ac_word" || continue
3830 ac_cv_prog_ETAGS="$ac_prog"
3831 echo "$as_me:3831: found $ac_dir/$ac_word" >&5
3832 break
3833 done
3834
3835 fi
3836 fi
3837 ETAGS=$ac_cv_prog_ETAGS
3838 if test -n "$ETAGS"; then
3839   echo "$as_me:3839: result: $ETAGS" >&5
3840 echo "${ECHO_T}$ETAGS" >&6
3841 else
3842   echo "$as_me:3842: result: no" >&5
3843 echo "${ECHO_T}no" >&6
3844 fi
3845
3846   test -n "$ETAGS" && break
3847 done
3848
3849 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3850 set dummy ${CTAGS:-ctags}; ac_word=$2
3851 echo "$as_me:3851: checking for $ac_word" >&5
3852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3853 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3854   echo $ECHO_N "(cached) $ECHO_C" >&6
3855 else
3856   if test -n "$MAKE_LOWER_TAGS"; then
3857   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3858 else
3859   ac_save_IFS=$IFS; IFS=$ac_path_separator
3860 ac_dummy="$PATH"
3861 for ac_dir in $ac_dummy; do
3862   IFS=$ac_save_IFS
3863   test -z "$ac_dir" && ac_dir=.
3864   $as_executable_p "$ac_dir/$ac_word" || continue
3865 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3866 echo "$as_me:3866: found $ac_dir/$ac_word" >&5
3867 break
3868 done
3869
3870   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3871 fi
3872 fi
3873 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3874 if test -n "$MAKE_LOWER_TAGS"; then
3875   echo "$as_me:3875: result: $MAKE_LOWER_TAGS" >&5
3876 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3877 else
3878   echo "$as_me:3878: result: no" >&5
3879 echo "${ECHO_T}no" >&6
3880 fi
3881
3882 if test "$cf_cv_mixedcase" = yes ; then
3883         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3884 set dummy ${ETAGS:-etags}; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$MAKE_UPPER_TAGS"; then
3891   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3905 fi
3906 fi
3907 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3908 if test -n "$MAKE_UPPER_TAGS"; then
3909   echo "$as_me:3909: result: $MAKE_UPPER_TAGS" >&5
3910 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3911 else
3912   echo "$as_me:3912: result: no" >&5
3913 echo "${ECHO_T}no" >&6
3914 fi
3915
3916 else
3917         MAKE_UPPER_TAGS=no
3918 fi
3919
3920 if test "$MAKE_UPPER_TAGS" = yes ; then
3921         MAKE_UPPER_TAGS=
3922 else
3923         MAKE_UPPER_TAGS="#"
3924 fi
3925
3926 if test "$MAKE_LOWER_TAGS" = yes ; then
3927         MAKE_LOWER_TAGS=
3928 else
3929         MAKE_LOWER_TAGS="#"
3930 fi
3931
3932 echo "$as_me:3932: checking for makeflags variable" >&5
3933 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3934 if test "${cf_cv_makeflags+set}" = set; then
3935   echo $ECHO_N "(cached) $ECHO_C" >&6
3936 else
3937
3938         cf_cv_makeflags=''
3939         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3940         do
3941                 cat >cf_makeflags.tmp <<CF_EOF
3942 SHELL = /bin/sh
3943 all :
3944         @ echo '.$cf_option'
3945 CF_EOF
3946                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3947                 case "$cf_result" in
3948                 .*k|.*kw)
3949                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3950                         case "$cf_result" in
3951                         .*CC=*) cf_cv_makeflags=
3952                                 ;;
3953                         *)      cf_cv_makeflags=$cf_option
3954                                 ;;
3955                         esac
3956                         break
3957                         ;;
3958                 .-)     ;;
3959                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3960                         ;;
3961                 esac
3962         done
3963         rm -f cf_makeflags.tmp
3964
3965 fi
3966 echo "$as_me:3966: result: $cf_cv_makeflags" >&5
3967 echo "${ECHO_T}$cf_cv_makeflags" >&6
3968
3969 if test -n "$ac_tool_prefix"; then
3970   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3971 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3972 echo "$as_me:3972: checking for $ac_word" >&5
3973 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3974 if test "${ac_cv_prog_RANLIB+set}" = set; then
3975   echo $ECHO_N "(cached) $ECHO_C" >&6
3976 else
3977   if test -n "$RANLIB"; then
3978   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3979 else
3980   ac_save_IFS=$IFS; IFS=$ac_path_separator
3981 ac_dummy="$PATH"
3982 for ac_dir in $ac_dummy; do
3983   IFS=$ac_save_IFS
3984   test -z "$ac_dir" && ac_dir=.
3985   $as_executable_p "$ac_dir/$ac_word" || continue
3986 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3987 echo "$as_me:3987: found $ac_dir/$ac_word" >&5
3988 break
3989 done
3990
3991 fi
3992 fi
3993 RANLIB=$ac_cv_prog_RANLIB
3994 if test -n "$RANLIB"; then
3995   echo "$as_me:3995: result: $RANLIB" >&5
3996 echo "${ECHO_T}$RANLIB" >&6
3997 else
3998   echo "$as_me:3998: result: no" >&5
3999 echo "${ECHO_T}no" >&6
4000 fi
4001
4002 fi
4003 if test -z "$ac_cv_prog_RANLIB"; then
4004   ac_ct_RANLIB=$RANLIB
4005   # Extract the first word of "ranlib", so it can be a program name with args.
4006 set dummy ranlib; ac_word=$2
4007 echo "$as_me:4007: checking for $ac_word" >&5
4008 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4009 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4010   echo $ECHO_N "(cached) $ECHO_C" >&6
4011 else
4012   if test -n "$ac_ct_RANLIB"; then
4013   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4014 else
4015   ac_save_IFS=$IFS; IFS=$ac_path_separator
4016 ac_dummy="$PATH"
4017 for ac_dir in $ac_dummy; do
4018   IFS=$ac_save_IFS
4019   test -z "$ac_dir" && ac_dir=.
4020   $as_executable_p "$ac_dir/$ac_word" || continue
4021 ac_cv_prog_ac_ct_RANLIB="ranlib"
4022 echo "$as_me:4022: found $ac_dir/$ac_word" >&5
4023 break
4024 done
4025
4026   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4027 fi
4028 fi
4029 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4030 if test -n "$ac_ct_RANLIB"; then
4031   echo "$as_me:4031: result: $ac_ct_RANLIB" >&5
4032 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4033 else
4034   echo "$as_me:4034: result: no" >&5
4035 echo "${ECHO_T}no" >&6
4036 fi
4037
4038   RANLIB=$ac_ct_RANLIB
4039 else
4040   RANLIB="$ac_cv_prog_RANLIB"
4041 fi
4042
4043 if test -n "$ac_tool_prefix"; then
4044   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4045 set dummy ${ac_tool_prefix}ld; ac_word=$2
4046 echo "$as_me:4046: checking for $ac_word" >&5
4047 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4048 if test "${ac_cv_prog_LD+set}" = set; then
4049   echo $ECHO_N "(cached) $ECHO_C" >&6
4050 else
4051   if test -n "$LD"; then
4052   ac_cv_prog_LD="$LD" # Let the user override the test.
4053 else
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   $as_executable_p "$ac_dir/$ac_word" || continue
4060 ac_cv_prog_LD="${ac_tool_prefix}ld"
4061 echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062 break
4063 done
4064
4065 fi
4066 fi
4067 LD=$ac_cv_prog_LD
4068 if test -n "$LD"; then
4069   echo "$as_me:4069: result: $LD" >&5
4070 echo "${ECHO_T}$LD" >&6
4071 else
4072   echo "$as_me:4072: result: no" >&5
4073 echo "${ECHO_T}no" >&6
4074 fi
4075
4076 fi
4077 if test -z "$ac_cv_prog_LD"; then
4078   ac_ct_LD=$LD
4079   # Extract the first word of "ld", so it can be a program name with args.
4080 set dummy ld; ac_word=$2
4081 echo "$as_me:4081: checking for $ac_word" >&5
4082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4083 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4084   echo $ECHO_N "(cached) $ECHO_C" >&6
4085 else
4086   if test -n "$ac_ct_LD"; then
4087   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4088 else
4089   ac_save_IFS=$IFS; IFS=$ac_path_separator
4090 ac_dummy="$PATH"
4091 for ac_dir in $ac_dummy; do
4092   IFS=$ac_save_IFS
4093   test -z "$ac_dir" && ac_dir=.
4094   $as_executable_p "$ac_dir/$ac_word" || continue
4095 ac_cv_prog_ac_ct_LD="ld"
4096 echo "$as_me:4096: found $ac_dir/$ac_word" >&5
4097 break
4098 done
4099
4100   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4101 fi
4102 fi
4103 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4104 if test -n "$ac_ct_LD"; then
4105   echo "$as_me:4105: result: $ac_ct_LD" >&5
4106 echo "${ECHO_T}$ac_ct_LD" >&6
4107 else
4108   echo "$as_me:4108: result: no" >&5
4109 echo "${ECHO_T}no" >&6
4110 fi
4111
4112   LD=$ac_ct_LD
4113 else
4114   LD="$ac_cv_prog_LD"
4115 fi
4116
4117 if test -n "$ac_tool_prefix"; then
4118   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4119 set dummy ${ac_tool_prefix}ar; ac_word=$2
4120 echo "$as_me:4120: checking for $ac_word" >&5
4121 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4122 if test "${ac_cv_prog_AR+set}" = set; then
4123   echo $ECHO_N "(cached) $ECHO_C" >&6
4124 else
4125   if test -n "$AR"; then
4126   ac_cv_prog_AR="$AR" # Let the user override the test.
4127 else
4128   ac_save_IFS=$IFS; IFS=$ac_path_separator
4129 ac_dummy="$PATH"
4130 for ac_dir in $ac_dummy; do
4131   IFS=$ac_save_IFS
4132   test -z "$ac_dir" && ac_dir=.
4133   $as_executable_p "$ac_dir/$ac_word" || continue
4134 ac_cv_prog_AR="${ac_tool_prefix}ar"
4135 echo "$as_me:4135: found $ac_dir/$ac_word" >&5
4136 break
4137 done
4138
4139 fi
4140 fi
4141 AR=$ac_cv_prog_AR
4142 if test -n "$AR"; then
4143   echo "$as_me:4143: result: $AR" >&5
4144 echo "${ECHO_T}$AR" >&6
4145 else
4146   echo "$as_me:4146: result: no" >&5
4147 echo "${ECHO_T}no" >&6
4148 fi
4149
4150 fi
4151 if test -z "$ac_cv_prog_AR"; then
4152   ac_ct_AR=$AR
4153   # Extract the first word of "ar", so it can be a program name with args.
4154 set dummy ar; ac_word=$2
4155 echo "$as_me:4155: checking for $ac_word" >&5
4156 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4157 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4158   echo $ECHO_N "(cached) $ECHO_C" >&6
4159 else
4160   if test -n "$ac_ct_AR"; then
4161   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4162 else
4163   ac_save_IFS=$IFS; IFS=$ac_path_separator
4164 ac_dummy="$PATH"
4165 for ac_dir in $ac_dummy; do
4166   IFS=$ac_save_IFS
4167   test -z "$ac_dir" && ac_dir=.
4168   $as_executable_p "$ac_dir/$ac_word" || continue
4169 ac_cv_prog_ac_ct_AR="ar"
4170 echo "$as_me:4170: found $ac_dir/$ac_word" >&5
4171 break
4172 done
4173
4174   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4175 fi
4176 fi
4177 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4178 if test -n "$ac_ct_AR"; then
4179   echo "$as_me:4179: result: $ac_ct_AR" >&5
4180 echo "${ECHO_T}$ac_ct_AR" >&6
4181 else
4182   echo "$as_me:4182: result: no" >&5
4183 echo "${ECHO_T}no" >&6
4184 fi
4185
4186   AR=$ac_ct_AR
4187 else
4188   AR="$ac_cv_prog_AR"
4189 fi
4190
4191 if test -n "$ac_tool_prefix"; then
4192   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4193 set dummy ${ac_tool_prefix}nm; ac_word=$2
4194 echo "$as_me:4194: checking for $ac_word" >&5
4195 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4196 if test "${ac_cv_prog_NM+set}" = set; then
4197   echo $ECHO_N "(cached) $ECHO_C" >&6
4198 else
4199   if test -n "$NM"; then
4200   ac_cv_prog_NM="$NM" # Let the user override the test.
4201 else
4202   ac_save_IFS=$IFS; IFS=$ac_path_separator
4203 ac_dummy="$PATH"
4204 for ac_dir in $ac_dummy; do
4205   IFS=$ac_save_IFS
4206   test -z "$ac_dir" && ac_dir=.
4207   $as_executable_p "$ac_dir/$ac_word" || continue
4208 ac_cv_prog_NM="${ac_tool_prefix}nm"
4209 echo "$as_me:4209: found $ac_dir/$ac_word" >&5
4210 break
4211 done
4212
4213 fi
4214 fi
4215 NM=$ac_cv_prog_NM
4216 if test -n "$NM"; then
4217   echo "$as_me:4217: result: $NM" >&5
4218 echo "${ECHO_T}$NM" >&6
4219 else
4220   echo "$as_me:4220: result: no" >&5
4221 echo "${ECHO_T}no" >&6
4222 fi
4223
4224 fi
4225 if test -z "$ac_cv_prog_NM"; then
4226   ac_ct_NM=$NM
4227   # Extract the first word of "nm", so it can be a program name with args.
4228 set dummy nm; ac_word=$2
4229 echo "$as_me:4229: checking for $ac_word" >&5
4230 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4231 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4232   echo $ECHO_N "(cached) $ECHO_C" >&6
4233 else
4234   if test -n "$ac_ct_NM"; then
4235   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4236 else
4237   ac_save_IFS=$IFS; IFS=$ac_path_separator
4238 ac_dummy="$PATH"
4239 for ac_dir in $ac_dummy; do
4240   IFS=$ac_save_IFS
4241   test -z "$ac_dir" && ac_dir=.
4242   $as_executable_p "$ac_dir/$ac_word" || continue
4243 ac_cv_prog_ac_ct_NM="nm"
4244 echo "$as_me:4244: found $ac_dir/$ac_word" >&5
4245 break
4246 done
4247
4248   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4249 fi
4250 fi
4251 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4252 if test -n "$ac_ct_NM"; then
4253   echo "$as_me:4253: result: $ac_ct_NM" >&5
4254 echo "${ECHO_T}$ac_ct_NM" >&6
4255 else
4256   echo "$as_me:4256: result: no" >&5
4257 echo "${ECHO_T}no" >&6
4258 fi
4259
4260   NM=$ac_ct_NM
4261 else
4262   NM="$ac_cv_prog_NM"
4263 fi
4264
4265 if test -n "$ac_tool_prefix"; then
4266   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4267 set dummy ${ac_tool_prefix}ar; ac_word=$2
4268 echo "$as_me:4268: checking for $ac_word" >&5
4269 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4270 if test "${ac_cv_prog_AR+set}" = set; then
4271   echo $ECHO_N "(cached) $ECHO_C" >&6
4272 else
4273   if test -n "$AR"; then
4274   ac_cv_prog_AR="$AR" # Let the user override the test.
4275 else
4276   ac_save_IFS=$IFS; IFS=$ac_path_separator
4277 ac_dummy="$PATH"
4278 for ac_dir in $ac_dummy; do
4279   IFS=$ac_save_IFS
4280   test -z "$ac_dir" && ac_dir=.
4281   $as_executable_p "$ac_dir/$ac_word" || continue
4282 ac_cv_prog_AR="${ac_tool_prefix}ar"
4283 echo "$as_me:4283: found $ac_dir/$ac_word" >&5
4284 break
4285 done
4286
4287 fi
4288 fi
4289 AR=$ac_cv_prog_AR
4290 if test -n "$AR"; then
4291   echo "$as_me:4291: result: $AR" >&5
4292 echo "${ECHO_T}$AR" >&6
4293 else
4294   echo "$as_me:4294: result: no" >&5
4295 echo "${ECHO_T}no" >&6
4296 fi
4297
4298 fi
4299 if test -z "$ac_cv_prog_AR"; then
4300   ac_ct_AR=$AR
4301   # Extract the first word of "ar", so it can be a program name with args.
4302 set dummy ar; ac_word=$2
4303 echo "$as_me:4303: checking for $ac_word" >&5
4304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4305 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4306   echo $ECHO_N "(cached) $ECHO_C" >&6
4307 else
4308   if test -n "$ac_ct_AR"; then
4309   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4310 else
4311   ac_save_IFS=$IFS; IFS=$ac_path_separator
4312 ac_dummy="$PATH"
4313 for ac_dir in $ac_dummy; do
4314   IFS=$ac_save_IFS
4315   test -z "$ac_dir" && ac_dir=.
4316   $as_executable_p "$ac_dir/$ac_word" || continue
4317 ac_cv_prog_ac_ct_AR="ar"
4318 echo "$as_me:4318: found $ac_dir/$ac_word" >&5
4319 break
4320 done
4321
4322   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4323 fi
4324 fi
4325 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4326 if test -n "$ac_ct_AR"; then
4327   echo "$as_me:4327: result: $ac_ct_AR" >&5
4328 echo "${ECHO_T}$ac_ct_AR" >&6
4329 else
4330   echo "$as_me:4330: result: no" >&5
4331 echo "${ECHO_T}no" >&6
4332 fi
4333
4334   AR=$ac_ct_AR
4335 else
4336   AR="$ac_cv_prog_AR"
4337 fi
4338
4339 echo "$as_me:4339: checking for options to update archives" >&5
4340 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4341 if test "${cf_cv_ar_flags+set}" = set; then
4342   echo $ECHO_N "(cached) $ECHO_C" >&6
4343 else
4344
4345         cf_cv_ar_flags=unknown
4346         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4347         do
4348
4349                 # check if $ARFLAGS already contains this choice
4350                 if test "x$ARFLAGS" != "x" ; then
4351                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4352                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4353                                 cf_cv_ar_flags=
4354                                 break
4355                         fi
4356                 fi
4357
4358                 rm -f conftest.$ac_cv_objext
4359                 rm -f conftest.a
4360
4361                 cat >conftest.$ac_ext <<EOF
4362 #line 4362 "configure"
4363 int     testdata[3] = { 123, 456, 789 };
4364 EOF
4365                 if { (eval echo "$as_me:4365: \"$ac_compile\"") >&5
4366   (eval $ac_compile) 2>&5
4367   ac_status=$?
4368   echo "$as_me:4368: \$? = $ac_status" >&5
4369   (exit $ac_status); } ; then
4370                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4371                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4372                         if test -f conftest.a ; then
4373                                 cf_cv_ar_flags=$cf_ar_flags
4374                                 break
4375                         fi
4376                 else
4377                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4378
4379 echo "${as_me:-configure}:4379: testing cannot compile test-program ..." 1>&5
4380
4381                         break
4382                 fi
4383         done
4384         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4385
4386 fi
4387 echo "$as_me:4387: result: $cf_cv_ar_flags" >&5
4388 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4389
4390 if test -n "$ARFLAGS" ; then
4391         if test -n "$cf_cv_ar_flags" ; then
4392                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4393         fi
4394 else
4395         ARFLAGS=$cf_cv_ar_flags
4396 fi
4397
4398 echo "$as_me:4398: checking if you have specified an install-prefix" >&5
4399 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4400
4401 # Check whether --with-install-prefix or --without-install-prefix was given.
4402 if test "${with_install_prefix+set}" = set; then
4403   withval="$with_install_prefix"
4404   case "x$withval" in #(vi
4405         xyes|xno) #(vi
4406                 ;;
4407         *)      DESTDIR="$withval"
4408                 ;;
4409         esac
4410 fi;
4411 echo "$as_me:4411: result: $DESTDIR" >&5
4412 echo "${ECHO_T}$DESTDIR" >&6
4413
4414 ###############################################################################
4415
4416 # If we're cross-compiling, allow the user to override the tools and their
4417 # options.  The configure script is oriented toward identifying the host
4418 # compiler, etc., but we need a build compiler to generate parts of the source.
4419
4420 if test "$cross_compiling" = yes ; then
4421
4422         # defaults that we might want to override
4423         : ${BUILD_CFLAGS:=''}
4424         : ${BUILD_CPPFLAGS:=''}
4425         : ${BUILD_LDFLAGS:=''}
4426         : ${BUILD_LIBS:=''}
4427         : ${BUILD_EXEEXT:='$x'}
4428         : ${BUILD_OBJEXT:='o'}
4429
4430 # Check whether --with-build-cc or --without-build-cc was given.
4431 if test "${with_build_cc+set}" = set; then
4432   withval="$with_build_cc"
4433   BUILD_CC="$withval"
4434 else
4435   for ac_prog in gcc cc cl
4436 do
4437   # Extract the first word of "$ac_prog", so it can be a program name with args.
4438 set dummy $ac_prog; ac_word=$2
4439 echo "$as_me:4439: checking for $ac_word" >&5
4440 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4441 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4442   echo $ECHO_N "(cached) $ECHO_C" >&6
4443 else
4444   if test -n "$BUILD_CC"; then
4445   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4446 else
4447   ac_save_IFS=$IFS; IFS=$ac_path_separator
4448 ac_dummy="$PATH"
4449 for ac_dir in $ac_dummy; do
4450   IFS=$ac_save_IFS
4451   test -z "$ac_dir" && ac_dir=.
4452   $as_executable_p "$ac_dir/$ac_word" || continue
4453 ac_cv_prog_BUILD_CC="$ac_prog"
4454 echo "$as_me:4454: found $ac_dir/$ac_word" >&5
4455 break
4456 done
4457
4458 fi
4459 fi
4460 BUILD_CC=$ac_cv_prog_BUILD_CC
4461 if test -n "$BUILD_CC"; then
4462   echo "$as_me:4462: result: $BUILD_CC" >&5
4463 echo "${ECHO_T}$BUILD_CC" >&6
4464 else
4465   echo "$as_me:4465: result: no" >&5
4466 echo "${ECHO_T}no" >&6
4467 fi
4468
4469   test -n "$BUILD_CC" && break
4470 done
4471
4472 fi;
4473         echo "$as_me:4473: checking for native build C compiler" >&5
4474 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4475         echo "$as_me:4475: result: $BUILD_CC" >&5
4476 echo "${ECHO_T}$BUILD_CC" >&6
4477
4478         echo "$as_me:4478: checking for native build C preprocessor" >&5
4479 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4480
4481 # Check whether --with-build-cpp or --without-build-cpp was given.
4482 if test "${with_build_cpp+set}" = set; then
4483   withval="$with_build_cpp"
4484   BUILD_CPP="$withval"
4485 else
4486   BUILD_CPP='${BUILD_CC} -E'
4487 fi;
4488         echo "$as_me:4488: result: $BUILD_CPP" >&5
4489 echo "${ECHO_T}$BUILD_CPP" >&6
4490
4491         echo "$as_me:4491: checking for native build C flags" >&5
4492 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4493
4494 # Check whether --with-build-cflags or --without-build-cflags was given.
4495 if test "${with_build_cflags+set}" = set; then
4496   withval="$with_build_cflags"
4497   BUILD_CFLAGS="$withval"
4498 fi;
4499         echo "$as_me:4499: result: $BUILD_CFLAGS" >&5
4500 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4501
4502         echo "$as_me:4502: checking for native build C preprocessor-flags" >&5
4503 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4504
4505 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4506 if test "${with_build_cppflags+set}" = set; then
4507   withval="$with_build_cppflags"
4508   BUILD_CPPFLAGS="$withval"
4509 fi;
4510         echo "$as_me:4510: result: $BUILD_CPPFLAGS" >&5
4511 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4512
4513         echo "$as_me:4513: checking for native build linker-flags" >&5
4514 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4515
4516 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4517 if test "${with_build_ldflags+set}" = set; then
4518   withval="$with_build_ldflags"
4519   BUILD_LDFLAGS="$withval"
4520 fi;
4521         echo "$as_me:4521: result: $BUILD_LDFLAGS" >&5
4522 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4523
4524         echo "$as_me:4524: checking for native build linker-libraries" >&5
4525 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4526
4527 # Check whether --with-build-libs or --without-build-libs was given.
4528 if test "${with_build_libs+set}" = set; then
4529   withval="$with_build_libs"
4530   BUILD_LIBS="$withval"
4531 fi;
4532         echo "$as_me:4532: result: $BUILD_LIBS" >&5
4533 echo "${ECHO_T}$BUILD_LIBS" >&6
4534
4535         # this assumes we're on Unix.
4536         BUILD_EXEEXT=
4537         BUILD_OBJEXT=o
4538
4539         : ${BUILD_CC:='${CC}'}
4540
4541         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4542                 { { echo "$as_me:4542: error: Cross-build requires two compilers.
4543 Use --with-build-cc to specify the native compiler." >&5
4544 echo "$as_me: error: Cross-build requires two compilers.
4545 Use --with-build-cc to specify the native compiler." >&2;}
4546    { (exit 1); exit 1; }; }
4547         fi
4548
4549 else
4550         : ${BUILD_CC:='${CC}'}
4551         : ${BUILD_CPP:='${CPP}'}
4552         : ${BUILD_CFLAGS:='${CFLAGS}'}
4553         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4554         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4555         : ${BUILD_LIBS:='${LIBS}'}
4556         : ${BUILD_EXEEXT:='$x'}
4557         : ${BUILD_OBJEXT:='o'}
4558 fi
4559
4560 ###############################################################################
4561
4562 ### Options to allow the user to specify the set of libraries which are used.
4563 ### Use "--without-normal --with-shared" to allow the default model to be
4564 ### shared, for example.
4565 cf_list_models=""
4566
4567 echo "$as_me:4567: checking if libtool -version-number should be used" >&5
4568 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4569
4570 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4571 if test "${enable_libtool_version+set}" = set; then
4572   enableval="$enable_libtool_version"
4573   test "$enableval" != no && enableval=yes
4574   if test "$enableval" != "yes" ; then
4575     cf_libtool_version=no
4576   else
4577     cf_libtool_version=yes
4578   fi
4579 else
4580   enableval=yes
4581   cf_libtool_version=yes
4582
4583 fi;
4584 echo "$as_me:4584: result: $cf_libtool_version" >&5
4585 echo "${ECHO_T}$cf_libtool_version" >&6
4586
4587 if test "$cf_libtool_version" = yes ; then
4588         LIBTOOL_VERSION="-version-number"
4589 else
4590         LIBTOOL_VERSION="-version-info"
4591         case "x$VERSION" in #(vi
4592         x) #(vi
4593                 { echo "$as_me:4593: WARNING: VERSION was not set" >&5
4594 echo "$as_me: WARNING: VERSION was not set" >&2;}
4595                 ;;
4596         x*.*.*)
4597                 ABI_VERSION="$VERSION"
4598                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4599
4600 echo "${as_me:-configure}:4600: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4601
4602                 ;;
4603         x*:*:*)
4604                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4605                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4606
4607 echo "${as_me:-configure}:4607: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4608
4609                 ;;
4610         *)
4611                 { echo "$as_me:4611: WARNING: unexpected VERSION value: $VERSION" >&5
4612 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4613                 ;;
4614         esac
4615 fi
4616
4617 LIBTOOL=
4618
4619 # common library maintenance symbols that are convenient for libtool scripts:
4620 LIB_CREATE='${AR} -cr'
4621 LIB_OBJECT='${OBJECTS}'
4622 LIB_SUFFIX=.a
4623 LIB_PREP="$RANLIB"
4624
4625 # symbols used to prop libtool up to enable it to determine what it should be
4626 # doing:
4627 LIB_CLEAN=
4628 LIB_COMPILE=
4629 LIB_LINK='${CC}'
4630 LIB_INSTALL=
4631 LIB_UNINSTALL=
4632
4633 echo "$as_me:4633: checking if you want to build libraries with libtool" >&5
4634 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4635
4636 # Check whether --with-libtool or --without-libtool was given.
4637 if test "${with_libtool+set}" = set; then
4638   withval="$with_libtool"
4639   with_libtool=$withval
4640 else
4641   with_libtool=no
4642 fi;
4643 echo "$as_me:4643: result: $with_libtool" >&5
4644 echo "${ECHO_T}$with_libtool" >&6
4645 if test "$with_libtool" != "no"; then
4646
4647         if test "$with_libtool" != "yes" ; then
4648
4649 if test "x$prefix" != xNONE; then
4650   cf_path_syntax="$prefix"
4651 else
4652   cf_path_syntax="$ac_default_prefix"
4653 fi
4654
4655 case ".$with_libtool" in #(vi
4656 .\$\(*\)*|.\'*\'*) #(vi
4657   ;;
4658 ..|./*|.\\*) #(vi
4659   ;;
4660 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4661   ;;
4662 .\${*prefix}*|.\${*dir}*) #(vi
4663   eval with_libtool="$with_libtool"
4664   case ".$with_libtool" in #(vi
4665   .NONE/*)
4666     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4667     ;;
4668   esac
4669   ;; #(vi
4670 .no|.NONE/*)
4671   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4672   ;;
4673 *)
4674   { { echo "$as_me:4674: error: expected a pathname, not \"$with_libtool\"" >&5
4675 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4676    { (exit 1); exit 1; }; }
4677   ;;
4678 esac
4679
4680                 LIBTOOL=$with_libtool
4681         else
4682                 if test -n "$ac_tool_prefix"; then
4683   for ac_prog in libtool glibtool
4684   do
4685     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4686 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4687 echo "$as_me:4687: checking for $ac_word" >&5
4688 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4689 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4690   echo $ECHO_N "(cached) $ECHO_C" >&6
4691 else
4692   if test -n "$LIBTOOL"; then
4693   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4694 else
4695   ac_save_IFS=$IFS; IFS=$ac_path_separator
4696 ac_dummy="$PATH"
4697 for ac_dir in $ac_dummy; do
4698   IFS=$ac_save_IFS
4699   test -z "$ac_dir" && ac_dir=.
4700   $as_executable_p "$ac_dir/$ac_word" || continue
4701 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4702 echo "$as_me:4702: found $ac_dir/$ac_word" >&5
4703 break
4704 done
4705
4706 fi
4707 fi
4708 LIBTOOL=$ac_cv_prog_LIBTOOL
4709 if test -n "$LIBTOOL"; then
4710   echo "$as_me:4710: result: $LIBTOOL" >&5
4711 echo "${ECHO_T}$LIBTOOL" >&6
4712 else
4713   echo "$as_me:4713: result: no" >&5
4714 echo "${ECHO_T}no" >&6
4715 fi
4716
4717     test -n "$LIBTOOL" && break
4718   done
4719 fi
4720 if test -z "$LIBTOOL"; then
4721   ac_ct_LIBTOOL=$LIBTOOL
4722   for ac_prog in libtool glibtool
4723 do
4724   # Extract the first word of "$ac_prog", so it can be a program name with args.
4725 set dummy $ac_prog; ac_word=$2
4726 echo "$as_me:4726: checking for $ac_word" >&5
4727 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4728 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4729   echo $ECHO_N "(cached) $ECHO_C" >&6
4730 else
4731   if test -n "$ac_ct_LIBTOOL"; then
4732   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4733 else
4734   ac_save_IFS=$IFS; IFS=$ac_path_separator
4735 ac_dummy="$PATH"
4736 for ac_dir in $ac_dummy; do
4737   IFS=$ac_save_IFS
4738   test -z "$ac_dir" && ac_dir=.
4739   $as_executable_p "$ac_dir/$ac_word" || continue
4740 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4741 echo "$as_me:4741: found $ac_dir/$ac_word" >&5
4742 break
4743 done
4744
4745 fi
4746 fi
4747 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4748 if test -n "$ac_ct_LIBTOOL"; then
4749   echo "$as_me:4749: result: $ac_ct_LIBTOOL" >&5
4750 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4751 else
4752   echo "$as_me:4752: result: no" >&5
4753 echo "${ECHO_T}no" >&6
4754 fi
4755
4756   test -n "$ac_ct_LIBTOOL" && break
4757 done
4758 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4759
4760   LIBTOOL=$ac_ct_LIBTOOL
4761 fi
4762
4763 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4764 then
4765         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.].*//'`
4766 else
4767         cf_cv_libtool_version=
4768 fi
4769 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4770
4771                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4772                 then
4773
4774 unset ac_cv_prog_ac_ct_LIBTOOL
4775 unset ac_ct_LIBTOOL
4776 unset LIBTOOL
4777
4778                         if test -n "$ac_tool_prefix"; then
4779   for ac_prog in glibtool
4780   do
4781     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4782 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4783 echo "$as_me:4783: checking for $ac_word" >&5
4784 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4785 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4786   echo $ECHO_N "(cached) $ECHO_C" >&6
4787 else
4788   if test -n "$LIBTOOL"; then
4789   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4790 else
4791   ac_save_IFS=$IFS; IFS=$ac_path_separator
4792 ac_dummy="$PATH"
4793 for ac_dir in $ac_dummy; do
4794   IFS=$ac_save_IFS
4795   test -z "$ac_dir" && ac_dir=.
4796   $as_executable_p "$ac_dir/$ac_word" || continue
4797 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4798 echo "$as_me:4798: found $ac_dir/$ac_word" >&5
4799 break
4800 done
4801
4802 fi
4803 fi
4804 LIBTOOL=$ac_cv_prog_LIBTOOL
4805 if test -n "$LIBTOOL"; then
4806   echo "$as_me:4806: result: $LIBTOOL" >&5
4807 echo "${ECHO_T}$LIBTOOL" >&6
4808 else
4809   echo "$as_me:4809: result: no" >&5
4810 echo "${ECHO_T}no" >&6
4811 fi
4812
4813     test -n "$LIBTOOL" && break
4814   done
4815 fi
4816 if test -z "$LIBTOOL"; then
4817   ac_ct_LIBTOOL=$LIBTOOL
4818   for ac_prog in glibtool
4819 do
4820   # Extract the first word of "$ac_prog", so it can be a program name with args.
4821 set dummy $ac_prog; ac_word=$2
4822 echo "$as_me:4822: checking for $ac_word" >&5
4823 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4824 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4825   echo $ECHO_N "(cached) $ECHO_C" >&6
4826 else
4827   if test -n "$ac_ct_LIBTOOL"; then
4828   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4829 else
4830   ac_save_IFS=$IFS; IFS=$ac_path_separator
4831 ac_dummy="$PATH"
4832 for ac_dir in $ac_dummy; do
4833   IFS=$ac_save_IFS
4834   test -z "$ac_dir" && ac_dir=.
4835   $as_executable_p "$ac_dir/$ac_word" || continue
4836 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4837 echo "$as_me:4837: found $ac_dir/$ac_word" >&5
4838 break
4839 done
4840
4841 fi
4842 fi
4843 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4844 if test -n "$ac_ct_LIBTOOL"; then
4845   echo "$as_me:4845: result: $ac_ct_LIBTOOL" >&5
4846 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4847 else
4848   echo "$as_me:4848: result: no" >&5
4849 echo "${ECHO_T}no" >&6
4850 fi
4851
4852   test -n "$ac_ct_LIBTOOL" && break
4853 done
4854 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4855
4856   LIBTOOL=$ac_ct_LIBTOOL
4857 fi
4858
4859 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4860 then
4861         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.].*//'`
4862 else
4863         cf_cv_libtool_version=
4864 fi
4865 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4866
4867                 fi
4868         fi
4869         if test -z "$LIBTOOL" ; then
4870                 { { echo "$as_me:4870: error: Cannot find libtool" >&5
4871 echo "$as_me: error: Cannot find libtool" >&2;}
4872    { (exit 1); exit 1; }; }
4873         fi
4874         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4875         LIB_OBJECT='${OBJECTS:.o=.lo}'
4876         LIB_SUFFIX=.la
4877         LIB_CLEAN='${LIBTOOL} --mode=clean'
4878         LIB_COMPILE='${LIBTOOL} --mode=compile'
4879         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4880         LIB_INSTALL='${LIBTOOL} --mode=install'
4881         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4882         LIB_PREP=:
4883
4884 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4885 then
4886         echo "$as_me:4886: checking version of $LIBTOOL" >&5
4887 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4888
4889 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4890 then
4891         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.].*//'`
4892 else
4893         cf_cv_libtool_version=
4894 fi
4895 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4896
4897         echo "$as_me:4897: result: $cf_cv_libtool_version" >&5
4898 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4899         if test -z "$cf_cv_libtool_version" ; then
4900                 { { echo "$as_me:4900: error: This is not GNU libtool" >&5
4901 echo "$as_me: error: This is not GNU libtool" >&2;}
4902    { (exit 1); exit 1; }; }
4903         fi
4904 else
4905         { { echo "$as_me:4905: error: GNU libtool has not been found" >&5
4906 echo "$as_me: error: GNU libtool has not been found" >&2;}
4907    { (exit 1); exit 1; }; }
4908 fi
4909
4910         # special hack to add -no-undefined (which libtool should do for itself)
4911         LT_UNDEF=
4912         case "$cf_cv_system_name" in #(vi
4913         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4914                 LT_UNDEF=-no-undefined
4915                 ;;
4916         esac
4917
4918         # special hack to add --tag option for C++ compiler
4919         case $cf_cv_libtool_version in #(vi
4920         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4921                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4922                 LIBTOOL="$LIBTOOL --tag=CC"
4923                 ;;
4924         *)
4925                 LIBTOOL_CXX="$LIBTOOL"
4926                 ;;
4927         esac
4928 else
4929         LIBTOOL=""
4930         LIBTOOL_CXX=""
4931 fi
4932
4933 test -z "$LIBTOOL" && ECHO_LT=
4934
4935 if test "$with_libtool" != "no" ; then
4936
4937 cf_list_models="$cf_list_models libtool"
4938
4939 else
4940
4941 echo "$as_me:4941: checking if you want to build shared libraries" >&5
4942 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4943
4944 # Check whether --with-shared or --without-shared was given.
4945 if test "${with_shared+set}" = set; then
4946   withval="$with_shared"
4947   with_shared=$withval
4948 else
4949   with_shared=no
4950 fi;
4951 echo "$as_me:4951: result: $with_shared" >&5
4952 echo "${ECHO_T}$with_shared" >&6
4953 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4954
4955 echo "$as_me:4955: checking if you want to build static libraries" >&5
4956 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4957
4958 # Check whether --with-normal or --without-normal was given.
4959 if test "${with_normal+set}" = set; then
4960   withval="$with_normal"
4961   with_normal=$withval
4962 else
4963   with_normal=yes
4964 fi;
4965 echo "$as_me:4965: result: $with_normal" >&5
4966 echo "${ECHO_T}$with_normal" >&6
4967 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4968
4969 echo "$as_me:4969: checking if you want to build debug libraries" >&5
4970 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4971
4972 # Check whether --with-debug or --without-debug was given.
4973 if test "${with_debug+set}" = set; then
4974   withval="$with_debug"
4975   with_debug=$withval
4976 else
4977   with_debug=yes
4978 fi;
4979 echo "$as_me:4979: result: $with_debug" >&5
4980 echo "${ECHO_T}$with_debug" >&6
4981 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4982
4983 echo "$as_me:4983: checking if you want to build profiling libraries" >&5
4984 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4985
4986 # Check whether --with-profile or --without-profile was given.
4987 if test "${with_profile+set}" = set; then
4988   withval="$with_profile"
4989   with_profile=$withval
4990 else
4991   with_profile=no
4992 fi;
4993 echo "$as_me:4993: result: $with_profile" >&5
4994 echo "${ECHO_T}$with_profile" >&6
4995 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4996
4997 fi
4998
4999 if test "X$cf_with_cxx_binding" != Xno; then
5000 if test "x$with_shared" = "xyes"; then
5001 echo "$as_me:5001: checking if you want to build C++ shared libraries" >&5
5002 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5003
5004 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5005 if test "${with_cxx_shared+set}" = set; then
5006   withval="$with_cxx_shared"
5007   with_shared_cxx=$withval
5008 else
5009   with_shared_cxx=no
5010 fi;
5011 echo "$as_me:5011: result: $with_shared_cxx" >&5
5012 echo "${ECHO_T}$with_shared_cxx" >&6
5013 fi
5014 fi
5015
5016 ###############################################################################
5017
5018 echo "$as_me:5018: checking for specified models" >&5
5019 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5020 test -z "$cf_list_models" && cf_list_models=normal
5021 test "$with_libtool" != "no" && cf_list_models=libtool
5022 echo "$as_me:5022: result: $cf_list_models" >&5
5023 echo "${ECHO_T}$cf_list_models" >&6
5024
5025 ### Use the first model as the default, and save its suffix for use in building
5026 ### up test-applications.
5027 echo "$as_me:5027: checking for default model" >&5
5028 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5029 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5030 echo "$as_me:5030: result: $DFT_LWR_MODEL" >&5
5031 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5032
5033 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5034
5035 TICS_NAME=tic
5036
5037 TINFO_NAME=tinfo
5038
5039 LIB_NAME=ncurses
5040
5041 LIB_DIR=../lib
5042 LIB_2ND=../../lib
5043
5044 echo "$as_me:5044: checking if you want to have a library-prefix" >&5
5045 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5046
5047 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5048 if test "${with_lib_prefix+set}" = set; then
5049   withval="$with_lib_prefix"
5050   with_lib_prefix=$withval
5051 else
5052   with_lib_prefix=auto
5053 fi;
5054 echo "$as_me:5054: result: $with_lib_prefix" >&5
5055 echo "${ECHO_T}$with_lib_prefix" >&6
5056
5057 if test $with_lib_prefix = auto
5058 then
5059
5060         case $cf_cv_system_name in #(vi
5061         OS/2*|os2*) #(vi
5062         LIB_PREFIX=''
5063         ;;
5064         *)      LIB_PREFIX='lib'
5065         ;;
5066         esac
5067 cf_prefix=$LIB_PREFIX
5068
5069 elif test $with_lib_prefix = no
5070 then
5071         LIB_PREFIX=
5072 else
5073         LIB_PREFIX=$with_lib_prefix
5074 fi
5075
5076 LIB_SUFFIX=
5077
5078         echo "$as_me:5078: checking for PATH separator" >&5
5079 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5080         case $cf_cv_system_name in
5081         os2*)   PATH_SEPARATOR=';'  ;;
5082         *)      ${PATH_SEPARATOR:=':'}  ;;
5083         esac
5084
5085         echo "$as_me:5085: result: $PATH_SEPARATOR" >&5
5086 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5087
5088 ###############################################################################
5089
5090 echo "$as_me:5090: checking if you want to build a separate terminfo library" >&5
5091 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5092
5093 # Check whether --with-termlib or --without-termlib was given.
5094 if test "${with_termlib+set}" = set; then
5095   withval="$with_termlib"
5096   with_termlib=$withval
5097 else
5098   with_termlib=no
5099 fi;
5100 echo "$as_me:5100: result: $with_termlib" >&5
5101 echo "${ECHO_T}$with_termlib" >&6
5102
5103 echo "$as_me:5103: checking if you want to build a separate tic library" >&5
5104 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5105
5106 # Check whether --with-ticlib or --without-ticlib was given.
5107 if test "${with_ticlib+set}" = set; then
5108   withval="$with_ticlib"
5109   with_ticlib=$withval
5110 else
5111   with_ticlib=no
5112 fi;
5113 echo "$as_me:5113: result: $with_ticlib" >&5
5114 echo "${ECHO_T}$with_ticlib" >&6
5115
5116 ### Checks for special libraries, must be done up-front.
5117 SHLIB_LIST=""
5118
5119 echo "$as_me:5119: checking if you want to link with the GPM mouse library" >&5
5120 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5121
5122 # Check whether --with-gpm or --without-gpm was given.
5123 if test "${with_gpm+set}" = set; then
5124   withval="$with_gpm"
5125   with_gpm=$withval
5126 else
5127   with_gpm=maybe
5128 fi;
5129 echo "$as_me:5129: result: $with_gpm" >&5
5130 echo "${ECHO_T}$with_gpm" >&6
5131
5132 if test "$with_gpm" != no ; then
5133         echo "$as_me:5133: checking for gpm.h" >&5
5134 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5135 if test "${ac_cv_header_gpm_h+set}" = set; then
5136   echo $ECHO_N "(cached) $ECHO_C" >&6
5137 else
5138   cat >conftest.$ac_ext <<_ACEOF
5139 #line 5139 "configure"
5140 #include "confdefs.h"
5141 #include <gpm.h>
5142 _ACEOF
5143 if { (eval echo "$as_me:5143: \"$ac_cpp conftest.$ac_ext\"") >&5
5144   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5145   ac_status=$?
5146   egrep -v '^ *\+' conftest.er1 >conftest.err
5147   rm -f conftest.er1
5148   cat conftest.err >&5
5149   echo "$as_me:5149: \$? = $ac_status" >&5
5150   (exit $ac_status); } >/dev/null; then
5151   if test -s conftest.err; then
5152     ac_cpp_err=$ac_c_preproc_warn_flag
5153   else
5154     ac_cpp_err=
5155   fi
5156 else
5157   ac_cpp_err=yes
5158 fi
5159 if test -z "$ac_cpp_err"; then
5160   ac_cv_header_gpm_h=yes
5161 else
5162   echo "$as_me: failed program was:" >&5
5163   cat conftest.$ac_ext >&5
5164   ac_cv_header_gpm_h=no
5165 fi
5166 rm -f conftest.err conftest.$ac_ext
5167 fi
5168 echo "$as_me:5168: result: $ac_cv_header_gpm_h" >&5
5169 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5170 if test $ac_cv_header_gpm_h = yes; then
5171
5172 cat >>confdefs.h <<\EOF
5173 #define HAVE_GPM_H 1
5174 EOF
5175
5176                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5177                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5178
5179 echo "${as_me:-configure}:5179: testing assuming we really have GPM library ..." 1>&5
5180
5181 cat >>confdefs.h <<\EOF
5182 #define HAVE_LIBGPM 1
5183 EOF
5184
5185                 else
5186                         echo "$as_me:5186: checking for Gpm_Open in -lgpm" >&5
5187 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5188 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5189   echo $ECHO_N "(cached) $ECHO_C" >&6
5190 else
5191   ac_check_lib_save_LIBS=$LIBS
5192 LIBS="-lgpm  $LIBS"
5193 cat >conftest.$ac_ext <<_ACEOF
5194 #line 5194 "configure"
5195 #include "confdefs.h"
5196
5197 /* Override any gcc2 internal prototype to avoid an error.  */
5198 #ifdef __cplusplus
5199 extern "C"
5200 #endif
5201 /* We use char because int might match the return type of a gcc2
5202    builtin and then its argument prototype would still apply.  */
5203 char Gpm_Open ();
5204 int
5205 main ()
5206 {
5207 Gpm_Open ();
5208   ;
5209   return 0;
5210 }
5211 _ACEOF
5212 rm -f conftest.$ac_objext conftest$ac_exeext
5213 if { (eval echo "$as_me:5213: \"$ac_link\"") >&5
5214   (eval $ac_link) 2>&5
5215   ac_status=$?
5216   echo "$as_me:5216: \$? = $ac_status" >&5
5217   (exit $ac_status); } &&
5218          { ac_try='test -s conftest$ac_exeext'
5219   { (eval echo "$as_me:5219: \"$ac_try\"") >&5
5220   (eval $ac_try) 2>&5
5221   ac_status=$?
5222   echo "$as_me:5222: \$? = $ac_status" >&5
5223   (exit $ac_status); }; }; then
5224   ac_cv_lib_gpm_Gpm_Open=yes
5225 else
5226   echo "$as_me: failed program was:" >&5
5227 cat conftest.$ac_ext >&5
5228 ac_cv_lib_gpm_Gpm_Open=no
5229 fi
5230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5231 LIBS=$ac_check_lib_save_LIBS
5232 fi
5233 echo "$as_me:5233: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5234 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5235 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5236   :
5237 else
5238
5239                                 { { echo "$as_me:5239: error: Cannot link with GPM library" >&5
5240 echo "$as_me: error: Cannot link with GPM library" >&2;}
5241    { (exit 1); exit 1; }; }
5242                 fi
5243                 with_gpm=yes
5244
5245 fi
5246
5247 else
5248
5249                 test "$with_gpm" != maybe && { echo "$as_me:5249: WARNING: Cannot find GPM header" >&5
5250 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5251                 with_gpm=no
5252
5253 fi
5254
5255 fi
5256
5257 if test "$with_gpm" != no ; then
5258         echo "$as_me:5258: checking if you want to load GPM dynamically" >&5
5259 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5260
5261 # Check whether --with-dlsym or --without-dlsym was given.
5262 if test "${with_dlsym+set}" = set; then
5263   withval="$with_dlsym"
5264   with_dlsym=$withval
5265 else
5266   with_dlsym=yes
5267 fi;
5268         echo "$as_me:5268: result: $with_dlsym" >&5
5269 echo "${ECHO_T}$with_dlsym" >&6
5270         if test "x$with_dlsym" = xyes ; then
5271
5272 cf_have_dlsym=no
5273 echo "$as_me:5273: checking for dlsym" >&5
5274 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5275 if test "${ac_cv_func_dlsym+set}" = set; then
5276   echo $ECHO_N "(cached) $ECHO_C" >&6
5277 else
5278   cat >conftest.$ac_ext <<_ACEOF
5279 #line 5279 "configure"
5280 #include "confdefs.h"
5281 /* System header to define __stub macros and hopefully few prototypes,
5282     which can conflict with char dlsym (); below.  */
5283 #include <assert.h>
5284 /* Override any gcc2 internal prototype to avoid an error.  */
5285 #ifdef __cplusplus
5286 extern "C"
5287 #endif
5288 /* We use char because int might match the return type of a gcc2
5289    builtin and then its argument prototype would still apply.  */
5290 char dlsym ();
5291 char (*f) ();
5292
5293 int
5294 main ()
5295 {
5296 /* The GNU C library defines this for functions which it implements
5297     to always fail with ENOSYS.  Some functions are actually named
5298     something starting with __ and the normal name is an alias.  */
5299 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5300 choke me
5301 #else
5302 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5303 #endif
5304
5305   ;
5306   return 0;
5307 }
5308 _ACEOF
5309 rm -f conftest.$ac_objext conftest$ac_exeext
5310 if { (eval echo "$as_me:5310: \"$ac_link\"") >&5
5311   (eval $ac_link) 2>&5
5312   ac_status=$?
5313   echo "$as_me:5313: \$? = $ac_status" >&5
5314   (exit $ac_status); } &&
5315          { ac_try='test -s conftest$ac_exeext'
5316   { (eval echo "$as_me:5316: \"$ac_try\"") >&5
5317   (eval $ac_try) 2>&5
5318   ac_status=$?
5319   echo "$as_me:5319: \$? = $ac_status" >&5
5320   (exit $ac_status); }; }; then
5321   ac_cv_func_dlsym=yes
5322 else
5323   echo "$as_me: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5325 ac_cv_func_dlsym=no
5326 fi
5327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5328 fi
5329 echo "$as_me:5329: result: $ac_cv_func_dlsym" >&5
5330 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5331 if test $ac_cv_func_dlsym = yes; then
5332   cf_have_dlsym=yes
5333 else
5334
5335 cf_have_libdl=no
5336 echo "$as_me:5336: checking for dlsym in -ldl" >&5
5337 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5338 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5339   echo $ECHO_N "(cached) $ECHO_C" >&6
5340 else
5341   ac_check_lib_save_LIBS=$LIBS
5342 LIBS="-ldl  $LIBS"
5343 cat >conftest.$ac_ext <<_ACEOF
5344 #line 5344 "configure"
5345 #include "confdefs.h"
5346
5347 /* Override any gcc2 internal prototype to avoid an error.  */
5348 #ifdef __cplusplus
5349 extern "C"
5350 #endif
5351 /* We use char because int might match the return type of a gcc2
5352    builtin and then its argument prototype would still apply.  */
5353 char dlsym ();
5354 int
5355 main ()
5356 {
5357 dlsym ();
5358   ;
5359   return 0;
5360 }
5361 _ACEOF
5362 rm -f conftest.$ac_objext conftest$ac_exeext
5363 if { (eval echo "$as_me:5363: \"$ac_link\"") >&5
5364   (eval $ac_link) 2>&5
5365   ac_status=$?
5366   echo "$as_me:5366: \$? = $ac_status" >&5
5367   (exit $ac_status); } &&
5368          { ac_try='test -s conftest$ac_exeext'
5369   { (eval echo "$as_me:5369: \"$ac_try\"") >&5
5370   (eval $ac_try) 2>&5
5371   ac_status=$?
5372   echo "$as_me:5372: \$? = $ac_status" >&5
5373   (exit $ac_status); }; }; then
5374   ac_cv_lib_dl_dlsym=yes
5375 else
5376   echo "$as_me: failed program was:" >&5
5377 cat conftest.$ac_ext >&5
5378 ac_cv_lib_dl_dlsym=no
5379 fi
5380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5381 LIBS=$ac_check_lib_save_LIBS
5382 fi
5383 echo "$as_me:5383: result: $ac_cv_lib_dl_dlsym" >&5
5384 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5385 if test $ac_cv_lib_dl_dlsym = yes; then
5386
5387         cf_have_dlsym=yes
5388         cf_have_libdl=yes
5389 fi
5390
5391 fi
5392
5393 if test "$cf_have_dlsym" = yes ; then
5394         test "$cf_have_libdl" = yes &&
5395 cf_add_libs="-ldl"
5396 # Filter out duplicates - this happens with badly-designed ".pc" files...
5397 for cf_add_1lib in $LIBS
5398 do
5399         for cf_add_2lib in $cf_add_libs
5400         do
5401                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5402                 then
5403                         cf_add_1lib=
5404                         break
5405                 fi
5406         done
5407         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5408 done
5409 LIBS="$cf_add_libs"
5410
5411         echo "$as_me:5411: checking whether able to link to dl*() functions" >&5
5412 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5413         cat >conftest.$ac_ext <<_ACEOF
5414 #line 5414 "configure"
5415 #include "confdefs.h"
5416 #include <dlfcn.h>
5417 int
5418 main ()
5419 {
5420
5421                 void *obj;
5422                 if ((obj = dlopen("filename", 0)) != 0) {
5423                         if (dlsym(obj, "symbolname") == 0) {
5424                         dlclose(obj);
5425                         }
5426                 }
5427   ;
5428   return 0;
5429 }
5430 _ACEOF
5431 rm -f conftest.$ac_objext conftest$ac_exeext
5432 if { (eval echo "$as_me:5432: \"$ac_link\"") >&5
5433   (eval $ac_link) 2>&5
5434   ac_status=$?
5435   echo "$as_me:5435: \$? = $ac_status" >&5
5436   (exit $ac_status); } &&
5437          { ac_try='test -s conftest$ac_exeext'
5438   { (eval echo "$as_me:5438: \"$ac_try\"") >&5
5439   (eval $ac_try) 2>&5
5440   ac_status=$?
5441   echo "$as_me:5441: \$? = $ac_status" >&5
5442   (exit $ac_status); }; }; then
5443
5444 cat >>confdefs.h <<\EOF
5445 #define HAVE_LIBDL 1
5446 EOF
5447
5448 else
5449   echo "$as_me: failed program was:" >&5
5450 cat conftest.$ac_ext >&5
5451
5452                 { { echo "$as_me:5452: error: Cannot link test program for libdl" >&5
5453 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5454    { (exit 1); exit 1; }; }
5455 fi
5456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5457         echo "$as_me:5457: result: ok" >&5
5458 echo "${ECHO_T}ok" >&6
5459 else
5460         { { echo "$as_me:5460: error: Cannot find dlsym function" >&5
5461 echo "$as_me: error: Cannot find dlsym function" >&2;}
5462    { (exit 1); exit 1; }; }
5463 fi
5464
5465                 if test "x$with_gpm" != xyes ; then
5466                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5467
5468 echo "${as_me:-configure}:5468: testing assuming soname for gpm is $with_gpm ..." 1>&5
5469
5470                         cf_cv_gpm_soname="$with_gpm"
5471                 else
5472
5473 echo "$as_me:5473: checking for soname of gpm library" >&5
5474 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5475 if test "${cf_cv_gpm_soname+set}" = set; then
5476   echo $ECHO_N "(cached) $ECHO_C" >&6
5477 else
5478
5479 cf_cv_gpm_soname=unknown
5480 if test "$cross_compiling" != yes ; then
5481 cat >conftest.$ac_ext <<CF_EOF
5482 #include <gpm.h>
5483 int main()
5484 {
5485 if (Gpm_Open(0,0)) Gpm_Close();
5486         ${cf_cv_main_return:-return}(0);
5487 }
5488 CF_EOF
5489 cf_save_LIBS="$LIBS"
5490
5491 cf_add_libs="-lgpm"
5492 # Filter out duplicates - this happens with badly-designed ".pc" files...
5493 for cf_add_1lib in $LIBS
5494 do
5495         for cf_add_2lib in $cf_add_libs
5496         do
5497                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5498                 then
5499                         cf_add_1lib=
5500                         break
5501                 fi
5502         done
5503         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5504 done
5505 LIBS="$cf_add_libs"
5506
5507         if { (eval echo "$as_me:5507: \"$ac_compile\"") >&5
5508   (eval $ac_compile) 2>&5
5509   ac_status=$?
5510   echo "$as_me:5510: \$? = $ac_status" >&5
5511   (exit $ac_status); } ; then
5512                 if { (eval echo "$as_me:5512: \"$ac_link\"") >&5
5513   (eval $ac_link) 2>&5
5514   ac_status=$?
5515   echo "$as_me:5515: \$? = $ac_status" >&5
5516   (exit $ac_status); } ; then
5517                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5518                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5519                 fi
5520         fi
5521 rm -rf conftest*
5522 LIBS="$cf_save_LIBS"
5523 fi
5524
5525 fi
5526 echo "$as_me:5526: result: $cf_cv_gpm_soname" >&5
5527 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5528
5529                 fi
5530                 test "$cf_cv_gpm_soname" != "unknown" &&
5531 cat >>confdefs.h <<EOF
5532 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5533 EOF
5534
5535                 SHLIB_LIST="-ldl $SHLIB_LIST"
5536         else
5537                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5538
5539 cf_add_libs="-lgpm"
5540 # Filter out duplicates - this happens with badly-designed ".pc" files...
5541 for cf_add_1lib in $TEST_LIBS
5542 do
5543         for cf_add_2lib in $cf_add_libs
5544         do
5545                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5546                 then
5547                         cf_add_1lib=
5548                         break
5549                 fi
5550         done
5551         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5552 done
5553 TEST_LIBS="$cf_add_libs"
5554
5555         fi
5556
5557 cat >>confdefs.h <<\EOF
5558 #define HAVE_LIBGPM 1
5559 EOF
5560
5561 echo "$as_me:5561: checking for Gpm_Wgetch in -lgpm" >&5
5562 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5563 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5564   echo $ECHO_N "(cached) $ECHO_C" >&6
5565 else
5566   ac_check_lib_save_LIBS=$LIBS
5567 LIBS="-lgpm  $LIBS"
5568 cat >conftest.$ac_ext <<_ACEOF
5569 #line 5569 "configure"
5570 #include "confdefs.h"
5571
5572 /* Override any gcc2 internal prototype to avoid an error.  */
5573 #ifdef __cplusplus
5574 extern "C"
5575 #endif
5576 /* We use char because int might match the return type of a gcc2
5577    builtin and then its argument prototype would still apply.  */
5578 char Gpm_Wgetch ();
5579 int
5580 main ()
5581 {
5582 Gpm_Wgetch ();
5583   ;
5584   return 0;
5585 }
5586 _ACEOF
5587 rm -f conftest.$ac_objext conftest$ac_exeext
5588 if { (eval echo "$as_me:5588: \"$ac_link\"") >&5
5589   (eval $ac_link) 2>&5
5590   ac_status=$?
5591   echo "$as_me:5591: \$? = $ac_status" >&5
5592   (exit $ac_status); } &&
5593          { ac_try='test -s conftest$ac_exeext'
5594   { (eval echo "$as_me:5594: \"$ac_try\"") >&5
5595   (eval $ac_try) 2>&5
5596   ac_status=$?
5597   echo "$as_me:5597: \$? = $ac_status" >&5
5598   (exit $ac_status); }; }; then
5599   ac_cv_lib_gpm_Gpm_Wgetch=yes
5600 else
5601   echo "$as_me: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603 ac_cv_lib_gpm_Gpm_Wgetch=no
5604 fi
5605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5606 LIBS=$ac_check_lib_save_LIBS
5607 fi
5608 echo "$as_me:5608: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5609 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5610 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5611
5612 echo "$as_me:5612: checking if GPM is weakly bound to curses library" >&5
5613 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5614 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5615   echo $ECHO_N "(cached) $ECHO_C" >&6
5616 else
5617
5618 cf_cv_check_gpm_wgetch=unknown
5619 if test "$cross_compiling" != yes ; then
5620
5621 cat >conftest.$ac_ext <<CF_EOF
5622 #include <gpm.h>
5623 int main()
5624 {
5625         Gpm_Wgetch();
5626         ${cf_cv_main_return:-return}(0);
5627 }
5628 CF_EOF
5629
5630         cf_save_LIBS="$LIBS"
5631         # This only works if we can look at the symbol table.  If a shared
5632         # library is stripped for install, we cannot use that.  So we're forced
5633         # to rely on the static library, noting that some packagers may not
5634         # include it.
5635         LIBS="-static -lgpm -dynamic $LIBS"
5636         if { (eval echo "$as_me:5636: \"$ac_compile\"") >&5
5637   (eval $ac_compile) 2>&5
5638   ac_status=$?
5639   echo "$as_me:5639: \$? = $ac_status" >&5
5640   (exit $ac_status); } ; then
5641                 if { (eval echo "$as_me:5641: \"$ac_link\"") >&5
5642   (eval $ac_link) 2>&5
5643   ac_status=$?
5644   echo "$as_me:5644: \$? = $ac_status" >&5
5645   (exit $ac_status); } ; then
5646                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5647                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5648                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5649                 fi
5650         fi
5651         rm -rf conftest*
5652         LIBS="$cf_save_LIBS"
5653 fi
5654
5655 fi
5656 echo "$as_me:5656: result: $cf_cv_check_gpm_wgetch" >&5
5657 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5658
5659 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5660         { echo "$as_me:5660: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5661 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5662 fi
5663
5664 fi
5665
5666 fi
5667
5668 # not everyone has "test -c"
5669 if test -c /dev/sysmouse 2>/dev/null ; then
5670 echo "$as_me:5670: checking if you want to use sysmouse" >&5
5671 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5672
5673 # Check whether --with-sysmouse or --without-sysmouse was given.
5674 if test "${with_sysmouse+set}" = set; then
5675   withval="$with_sysmouse"
5676   cf_with_sysmouse=$withval
5677 else
5678   cf_with_sysmouse=maybe
5679 fi;
5680         if test "$cf_with_sysmouse" != no ; then
5681         cat >conftest.$ac_ext <<_ACEOF
5682 #line 5682 "configure"
5683 #include "confdefs.h"
5684
5685 #include <osreldate.h>
5686 #if (__FreeBSD_version >= 400017)
5687 #include <sys/consio.h>
5688 #include <sys/fbio.h>
5689 #else
5690 #include <machine/console.h>
5691 #endif
5692
5693 int
5694 main ()
5695 {
5696
5697         struct mouse_info the_mouse;
5698         ioctl(0, CONS_MOUSECTL, &the_mouse);
5699
5700   ;
5701   return 0;
5702 }
5703 _ACEOF
5704 rm -f conftest.$ac_objext
5705 if { (eval echo "$as_me:5705: \"$ac_compile\"") >&5
5706   (eval $ac_compile) 2>&5
5707   ac_status=$?
5708   echo "$as_me:5708: \$? = $ac_status" >&5
5709   (exit $ac_status); } &&
5710          { ac_try='test -s conftest.$ac_objext'
5711   { (eval echo "$as_me:5711: \"$ac_try\"") >&5
5712   (eval $ac_try) 2>&5
5713   ac_status=$?
5714   echo "$as_me:5714: \$? = $ac_status" >&5
5715   (exit $ac_status); }; }; then
5716   cf_with_sysmouse=yes
5717 else
5718   echo "$as_me: failed program was:" >&5
5719 cat conftest.$ac_ext >&5
5720 cf_with_sysmouse=no
5721 fi
5722 rm -f conftest.$ac_objext conftest.$ac_ext
5723         fi
5724 echo "$as_me:5724: result: $cf_with_sysmouse" >&5
5725 echo "${ECHO_T}$cf_with_sysmouse" >&6
5726 test "$cf_with_sysmouse" = yes &&
5727 cat >>confdefs.h <<\EOF
5728 #define USE_SYSMOUSE 1
5729 EOF
5730
5731 fi
5732
5733 if test X"$CC_G_OPT" = X"" ; then
5734         CC_G_OPT='-g'
5735         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5736 fi
5737
5738 if test X"$CXX_G_OPT" = X"" ; then
5739         CXX_G_OPT='-g'
5740         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5741 fi
5742
5743 echo "$as_me:5743: checking for default loader flags" >&5
5744 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5745 case $DFT_LWR_MODEL in
5746 libtool) LD_MODEL=''   ;;
5747 normal)  LD_MODEL=''   ;;
5748 debug)   LD_MODEL=$CC_G_OPT ;;
5749 profile) LD_MODEL='-pg';;
5750 shared)  LD_MODEL=''   ;;
5751 esac
5752 echo "$as_me:5752: result: $LD_MODEL" >&5
5753 echo "${ECHO_T}$LD_MODEL" >&6
5754
5755 case $DFT_LWR_MODEL in
5756 shared)
5757
5758 echo "$as_me:5758: checking if rpath option should be used" >&5
5759 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5760
5761 # Check whether --enable-rpath or --disable-rpath was given.
5762 if test "${enable_rpath+set}" = set; then
5763   enableval="$enable_rpath"
5764   cf_cv_enable_rpath=$enableval
5765 else
5766   cf_cv_enable_rpath=no
5767 fi;
5768 echo "$as_me:5768: result: $cf_cv_enable_rpath" >&5
5769 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5770
5771 echo "$as_me:5771: checking if shared libraries should be relinked during install" >&5
5772 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5773
5774 # Check whether --enable-relink or --disable-relink was given.
5775 if test "${enable_relink+set}" = set; then
5776   enableval="$enable_relink"
5777   cf_cv_do_relink=$enableval
5778 else
5779   cf_cv_do_relink=yes
5780 fi;
5781 echo "$as_me:5781: result: $cf_cv_do_relink" >&5
5782 echo "${ECHO_T}$cf_cv_do_relink" >&6
5783         ;;
5784 esac
5785
5786 # we will build libraries one-level down.
5787 rel_builddir=..
5788
5789 LD_RPATH_OPT=
5790 echo "$as_me:5790: checking for an rpath option" >&5
5791 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5792 case $cf_cv_system_name in #(vi
5793 irix*) #(vi
5794         if test "$GCC" = yes; then
5795                 LD_RPATH_OPT="-Wl,-rpath,"
5796         else
5797                 LD_RPATH_OPT="-rpath "
5798         fi
5799         ;;
5800 linux*|gnu*|k*bsd*-gnu) #(vi
5801         LD_RPATH_OPT="-Wl,-rpath,"
5802         ;;
5803 openbsd[2-9].*|mirbsd*) #(vi
5804         LD_RPATH_OPT="-Wl,-rpath,"
5805         ;;
5806 dragonfly*|freebsd*) #(vi
5807         LD_RPATH_OPT="-rpath "
5808         ;;
5809 netbsd*) #(vi
5810         LD_RPATH_OPT="-Wl,-rpath,"
5811         ;;
5812 osf*|mls+*) #(vi
5813         LD_RPATH_OPT="-rpath "
5814         ;;
5815 solaris2*) #(vi
5816         LD_RPATH_OPT="-R"
5817         ;;
5818 *)
5819         ;;
5820 esac
5821 echo "$as_me:5821: result: $LD_RPATH_OPT" >&5
5822 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5823
5824 case "x$LD_RPATH_OPT" in #(vi
5825 x-R*)
5826         echo "$as_me:5826: checking if we need a space after rpath option" >&5
5827 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5828         cf_save_LIBS="$LIBS"
5829
5830 cf_add_libs="${LD_RPATH_OPT}$libdir"
5831 # Filter out duplicates - this happens with badly-designed ".pc" files...
5832 for cf_add_1lib in $LIBS
5833 do
5834         for cf_add_2lib in $cf_add_libs
5835         do
5836                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5837                 then
5838                         cf_add_1lib=
5839                         break
5840                 fi
5841         done
5842         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5843 done
5844 LIBS="$cf_add_libs"
5845
5846         cat >conftest.$ac_ext <<_ACEOF
5847 #line 5847 "configure"
5848 #include "confdefs.h"
5849
5850 int
5851 main ()
5852 {
5853
5854   ;
5855   return 0;
5856 }
5857 _ACEOF
5858 rm -f conftest.$ac_objext conftest$ac_exeext
5859 if { (eval echo "$as_me:5859: \"$ac_link\"") >&5
5860   (eval $ac_link) 2>&5
5861   ac_status=$?
5862   echo "$as_me:5862: \$? = $ac_status" >&5
5863   (exit $ac_status); } &&
5864          { ac_try='test -s conftest$ac_exeext'
5865   { (eval echo "$as_me:5865: \"$ac_try\"") >&5
5866   (eval $ac_try) 2>&5
5867   ac_status=$?
5868   echo "$as_me:5868: \$? = $ac_status" >&5
5869   (exit $ac_status); }; }; then
5870   cf_rpath_space=no
5871 else
5872   echo "$as_me: failed program was:" >&5
5873 cat conftest.$ac_ext >&5
5874 cf_rpath_space=yes
5875 fi
5876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5877         LIBS="$cf_save_LIBS"
5878         echo "$as_me:5878: result: $cf_rpath_space" >&5
5879 echo "${ECHO_T}$cf_rpath_space" >&6
5880         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5881         ;;
5882 esac
5883
5884         RM_SHARED_OPTS=
5885         LOCAL_LDFLAGS=
5886         LOCAL_LDFLAGS2=
5887         LD_SHARED_OPTS=
5888         INSTALL_LIB="-m 644"
5889         : ${rel_builddir:=.}
5890
5891         shlibdir=$libdir
5892
5893         MAKE_DLLS="#"
5894
5895         cf_cv_do_symlinks=no
5896         cf_ld_rpath_opt=
5897         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5898
5899         echo "$as_me:5899: checking if release/abi version should be used for shared libs" >&5
5900 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5901
5902 # Check whether --with-shlib-version or --without-shlib-version was given.
5903 if test "${with_shlib_version+set}" = set; then
5904   withval="$with_shlib_version"
5905   test -z "$withval" && withval=auto
5906         case $withval in #(vi
5907         yes) #(vi
5908                 cf_cv_shlib_version=auto
5909                 ;;
5910         rel|abi|auto|no) #(vi
5911                 cf_cv_shlib_version=$withval
5912                 ;;
5913         *)
5914                 { { echo "$as_me:5914: error: option value must be one of: rel, abi, auto or no" >&5
5915 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5916    { (exit 1); exit 1; }; }
5917                 ;;
5918         esac
5919
5920 else
5921   cf_cv_shlib_version=auto
5922 fi;
5923         echo "$as_me:5923: result: $cf_cv_shlib_version" >&5
5924 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5925
5926         cf_cv_rm_so_locs=no
5927         cf_try_cflags=
5928
5929         # Some less-capable ports of gcc support only -fpic
5930         CC_SHARED_OPTS=
5931         if test "$GCC" = yes
5932         then
5933                 echo "$as_me:5933: checking which $CC option to use" >&5
5934 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5935                 cf_save_CFLAGS="$CFLAGS"
5936                 for CC_SHARED_OPTS in -fPIC -fpic ''
5937                 do
5938                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5939                         cat >conftest.$ac_ext <<_ACEOF
5940 #line 5940 "configure"
5941 #include "confdefs.h"
5942 #include <stdio.h>
5943 int
5944 main ()
5945 {
5946 int x = 1
5947   ;
5948   return 0;
5949 }
5950 _ACEOF
5951 rm -f conftest.$ac_objext
5952 if { (eval echo "$as_me:5952: \"$ac_compile\"") >&5
5953   (eval $ac_compile) 2>&5
5954   ac_status=$?
5955   echo "$as_me:5955: \$? = $ac_status" >&5
5956   (exit $ac_status); } &&
5957          { ac_try='test -s conftest.$ac_objext'
5958   { (eval echo "$as_me:5958: \"$ac_try\"") >&5
5959   (eval $ac_try) 2>&5
5960   ac_status=$?
5961   echo "$as_me:5961: \$? = $ac_status" >&5
5962   (exit $ac_status); }; }; then
5963   break
5964 else
5965   echo "$as_me: failed program was:" >&5
5966 cat conftest.$ac_ext >&5
5967 fi
5968 rm -f conftest.$ac_objext conftest.$ac_ext
5969                 done
5970                 echo "$as_me:5970: result: $CC_SHARED_OPTS" >&5
5971 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5972                 CFLAGS="$cf_save_CFLAGS"
5973         fi
5974
5975         cf_cv_shlib_version_infix=no
5976
5977         case $cf_cv_system_name in #(vi
5978         aix4.3-9*|aix[5-7]*) #(vi
5979                 if test "$GCC" = yes; then
5980                         CC_SHARED_OPTS=
5981                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5982                 else
5983                         # CC_SHARED_OPTS='-qpic=large -G'
5984                         # perhaps "-bM:SRE -bnoentry -bexpall"
5985                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5986                 fi
5987                 ;;
5988         beos*) #(vi
5989                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5990                 ;;
5991         cygwin*) #(vi
5992                 CC_SHARED_OPTS=
5993                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5994                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5995                 cf_cv_shlib_version=cygdll
5996                 cf_cv_shlib_version_infix=cygdll
5997                 shlibdir=$bindir
5998                 MAKE_DLLS=
5999                 cat >mk_shared_lib.sh <<-CF_EOF
6000                 #!/bin/sh
6001                 SHARED_LIB=\$1
6002                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6003                 shift
6004                 cat <<-EOF
6005                 Linking shared library
6006                 ** SHARED_LIB \$SHARED_LIB
6007                 ** IMPORT_LIB \$IMPORT_LIB
6008 EOF
6009                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6010 CF_EOF
6011                 chmod +x mk_shared_lib.sh
6012                 ;;
6013         msys*) #(vi
6014                 CC_SHARED_OPTS=
6015                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6016                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6017                 cf_cv_shlib_version=msysdll
6018                 cf_cv_shlib_version_infix=msysdll
6019                 shlibdir=$bindir
6020                 MAKE_DLLS=
6021                 cat >mk_shared_lib.sh <<-CF_EOF
6022                 #!/bin/sh
6023                 SHARED_LIB=\$1
6024                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6025                 shift
6026                 cat <<-EOF
6027                 Linking shared library
6028                 ** SHARED_LIB \$SHARED_LIB
6029                 ** IMPORT_LIB \$IMPORT_LIB
6030 EOF
6031                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6032 CF_EOF
6033                 chmod +x mk_shared_lib.sh
6034                 ;;
6035         darwin*) #(vi
6036                 cf_try_cflags="no-cpp-precomp"
6037                 CC_SHARED_OPTS="-dynamic"
6038                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6039                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6040                 cf_cv_shlib_version_infix=yes
6041                 echo "$as_me:6041: checking if ld -search_paths_first works" >&5
6042 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6043 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6044   echo $ECHO_N "(cached) $ECHO_C" >&6
6045 else
6046
6047                         cf_save_LDFLAGS=$LDFLAGS
6048                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6049                         cat >conftest.$ac_ext <<_ACEOF
6050 #line 6050 "configure"
6051 #include "confdefs.h"
6052
6053 int
6054 main ()
6055 {
6056 int i;
6057   ;
6058   return 0;
6059 }
6060 _ACEOF
6061 rm -f conftest.$ac_objext conftest$ac_exeext
6062 if { (eval echo "$as_me:6062: \"$ac_link\"") >&5
6063   (eval $ac_link) 2>&5
6064   ac_status=$?
6065   echo "$as_me:6065: \$? = $ac_status" >&5
6066   (exit $ac_status); } &&
6067          { ac_try='test -s conftest$ac_exeext'
6068   { (eval echo "$as_me:6068: \"$ac_try\"") >&5
6069   (eval $ac_try) 2>&5
6070   ac_status=$?
6071   echo "$as_me:6071: \$? = $ac_status" >&5
6072   (exit $ac_status); }; }; then
6073   cf_cv_ldflags_search_paths_first=yes
6074 else
6075   echo "$as_me: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6077 cf_cv_ldflags_search_paths_first=no
6078 fi
6079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6080                                 LDFLAGS=$cf_save_LDFLAGS
6081 fi
6082 echo "$as_me:6082: result: $cf_cv_ldflags_search_paths_first" >&5
6083 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6084                 if test $cf_cv_ldflags_search_paths_first = yes; then
6085                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6086                 fi
6087                 ;;
6088         hpux[7-8]*) #(vi
6089                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6090                 if test "$GCC" != yes; then
6091                         CC_SHARED_OPTS='+Z'
6092                 fi
6093                 MK_SHARED_LIB='${LD} -b -o $@'
6094                 INSTALL_LIB="-m 555"
6095                 ;;
6096         hpux*) #(vi
6097                 # (tested with gcc 2.7.2 -- I don't have c89)
6098                 if test "$GCC" = yes; then
6099                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6100                 else
6101                         CC_SHARED_OPTS='+Z'
6102                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6103                 fi
6104                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6105                 # HP-UX shared libraries must be executable, and should be
6106                 # readonly to exploit a quirk in the memory manager.
6107                 INSTALL_LIB="-m 555"
6108                 ;;
6109         interix*)
6110                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6111                 if test "$cf_cv_shlib_version" = rel; then
6112                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6113                 else
6114                         cf_shared_soname='`basename `'
6115                 fi
6116                 CC_SHARED_OPTS=
6117                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6118                 ;;
6119         irix*) #(vi
6120                 if test "$cf_cv_enable_rpath" = yes ; then
6121                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6122                 fi
6123                 # tested with IRIX 5.2 and 'cc'.
6124                 if test "$GCC" != yes; then
6125                         CC_SHARED_OPTS='-KPIC'
6126                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6127                 else
6128                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6129                 fi
6130                 cf_cv_rm_so_locs=yes
6131                 ;;
6132         linux*|gnu*|k*bsd*-gnu) #(vi
6133                 if test "$DFT_LWR_MODEL" = "shared" ; then
6134                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6135                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6136                 fi
6137                 if test "$cf_cv_enable_rpath" = yes ; then
6138                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6139                 fi
6140
6141         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6142         if test "$cf_cv_shlib_version" = rel; then
6143                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6144         else
6145                 cf_cv_shared_soname='`basename $@`'
6146         fi
6147
6148                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6149                 ;;
6150         mingw*) #(vi
6151                 cf_cv_shlib_version=mingw
6152                 cf_cv_shlib_version_infix=mingw
6153                 shlibdir=$bindir
6154                 MAKE_DLLS=
6155                 if test "$DFT_LWR_MODEL" = "shared" ; then
6156                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6157                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6158                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6159                 fi
6160                 CC_SHARED_OPTS=
6161                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6162                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6163                 cat >mk_shared_lib.sh <<-CF_EOF
6164                 #!/bin/sh
6165                 SHARED_LIB=\$1
6166                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6167                 shift
6168                 cat <<-EOF
6169                 Linking shared library
6170                 ** SHARED_LIB \$SHARED_LIB
6171                 ** IMPORT_LIB \$IMPORT_LIB
6172 EOF
6173                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6174 CF_EOF
6175                 chmod +x mk_shared_lib.sh
6176                 ;;
6177         openbsd[2-9].*|mirbsd*) #(vi
6178                 if test "$DFT_LWR_MODEL" = "shared" ; then
6179                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6180                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6181                 fi
6182                 if test "$cf_cv_enable_rpath" = yes ; then
6183                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6184                 fi
6185                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6186
6187         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6188         if test "$cf_cv_shlib_version" = rel; then
6189                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6190         else
6191                 cf_cv_shared_soname='`basename $@`'
6192         fi
6193
6194                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6195                 ;;
6196         nto-qnx*|openbsd*|freebsd[12].*) #(vi
6197                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6198                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6199                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6200                 ;;
6201         dragonfly*|freebsd*) #(vi
6202                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6203                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6204                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6205                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6206                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6207                 fi
6208
6209         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6210         if test "$cf_cv_shlib_version" = rel; then
6211                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6212         else
6213                 cf_cv_shared_soname='`basename $@`'
6214         fi
6215
6216                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6217                 ;;
6218         netbsd*) #(vi
6219                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6220                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6221                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6222                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6223                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6224                         if test "$cf_cv_shlib_version" = auto; then
6225                         if test -f /usr/libexec/ld.elf_so; then
6226                                 cf_cv_shlib_version=abi
6227                         else
6228                                 cf_cv_shlib_version=rel
6229                         fi
6230                         fi
6231
6232         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6233         if test "$cf_cv_shlib_version" = rel; then
6234                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6235         else
6236                 cf_cv_shared_soname='`basename $@`'
6237         fi
6238
6239                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6240                 else
6241                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6242                 fi
6243                 ;;
6244         osf*|mls+*) #(vi
6245                 # tested with OSF/1 V3.2 and 'cc'
6246                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6247                 # link with shared libs).
6248                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6249                 case $host_os in #(vi
6250                 osf4*)
6251                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6252                         ;;
6253                 esac
6254                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6255                 if test "$DFT_LWR_MODEL" = "shared" ; then
6256                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6257                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6258                 fi
6259                 cf_cv_rm_so_locs=yes
6260                 ;;
6261         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6262                 # tested with osr5.0.5
6263                 if test "$GCC" != yes; then
6264                         CC_SHARED_OPTS='-belf -KPIC'
6265                 fi
6266                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6267                 if test "$cf_cv_enable_rpath" = yes ; then
6268                         # only way is to set LD_RUN_PATH but no switch for it
6269                         RUN_PATH=$libdir
6270                 fi
6271                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6272                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6273                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6274                 ;;
6275         sunos4*) #(vi
6276                 # tested with SunOS 4.1.1 and gcc 2.7.0
6277                 if test "$GCC" != yes; then
6278                         CC_SHARED_OPTS='-KPIC'
6279                 fi
6280                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6281                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6282                 ;;
6283         solaris2*) #(vi
6284                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6285                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6286                 if test "$DFT_LWR_MODEL" = "shared" ; then
6287                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6288                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6289                 fi
6290                 if test "$cf_cv_enable_rpath" = yes ; then
6291                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6292                 fi
6293
6294         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6295         if test "$cf_cv_shlib_version" = rel; then
6296                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6297         else
6298                 cf_cv_shared_soname='`basename $@`'
6299         fi
6300
6301                 if test "$GCC" != yes; then
6302                         cf_save_CFLAGS="$CFLAGS"
6303                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6304                         do
6305                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6306                                 cat >conftest.$ac_ext <<_ACEOF
6307 #line 6307 "configure"
6308 #include "confdefs.h"
6309 #include <stdio.h>
6310 int
6311 main ()
6312 {
6313 printf("Hello\n");
6314   ;
6315   return 0;
6316 }
6317 _ACEOF
6318 rm -f conftest.$ac_objext
6319 if { (eval echo "$as_me:6319: \"$ac_compile\"") >&5
6320   (eval $ac_compile) 2>&5
6321   ac_status=$?
6322   echo "$as_me:6322: \$? = $ac_status" >&5
6323   (exit $ac_status); } &&
6324          { ac_try='test -s conftest.$ac_objext'
6325   { (eval echo "$as_me:6325: \"$ac_try\"") >&5
6326   (eval $ac_try) 2>&5
6327   ac_status=$?
6328   echo "$as_me:6328: \$? = $ac_status" >&5
6329   (exit $ac_status); }; }; then
6330   break
6331 else
6332   echo "$as_me: failed program was:" >&5
6333 cat conftest.$ac_ext >&5
6334 fi
6335 rm -f conftest.$ac_objext conftest.$ac_ext
6336                         done
6337                         CFLAGS="$cf_save_CFLAGS"
6338                         CC_SHARED_OPTS=$cf_shared_opts
6339                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6340                 else
6341                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6342                 fi
6343                 ;;
6344         sysv5uw7*|unix_sv*) #(vi
6345                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6346                 if test "$GCC" != yes; then
6347                         CC_SHARED_OPTS='-KPIC'
6348                 fi
6349                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6350                 ;;
6351         *)
6352                 CC_SHARED_OPTS='unknown'
6353                 MK_SHARED_LIB='echo unknown'
6354                 ;;
6355         esac
6356
6357         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6358         case "$cf_cv_shlib_version" in #(vi
6359         rel|abi)
6360                 case "$MK_SHARED_LIB" in #(vi
6361                 *'-o $@') #(vi
6362                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6363                         ;;
6364                 *)
6365                         { echo "$as_me:6365: WARNING: ignored --with-shlib-version" >&5
6366 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6367                         ;;
6368                 esac
6369                 ;;
6370         esac
6371
6372         if test -n "$cf_try_cflags"
6373         then
6374 cat > conftest.$ac_ext <<EOF
6375 #line 6375 "${as_me:-configure}"
6376 #include <stdio.h>
6377 int main(int argc, char *argv[])
6378 {
6379         printf("hello\n");
6380         return (argv[argc-1] == 0) ;
6381 }
6382 EOF
6383                 cf_save_CFLAGS="$CFLAGS"
6384                 for cf_opt in $cf_try_cflags
6385                 do
6386                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6387                         echo "$as_me:6387: checking if CFLAGS option -$cf_opt works" >&5
6388 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6389                         if { (eval echo "$as_me:6389: \"$ac_compile\"") >&5
6390   (eval $ac_compile) 2>&5
6391   ac_status=$?
6392   echo "$as_me:6392: \$? = $ac_status" >&5
6393   (exit $ac_status); }; then
6394                                 echo "$as_me:6394: result: yes" >&5
6395 echo "${ECHO_T}yes" >&6
6396                                 cf_save_CFLAGS="$CFLAGS"
6397                         else
6398                                 echo "$as_me:6398: result: no" >&5
6399 echo "${ECHO_T}no" >&6
6400                         fi
6401                 done
6402                 CFLAGS="$cf_save_CFLAGS"
6403         fi
6404
6405         # RPATH_LIST is a colon-separated list of directories
6406         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6407         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6408
6409         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6410
6411         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6412
6413 echo "${as_me:-configure}:6413: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6414
6415         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6416
6417 echo "${as_me:-configure}:6417: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6418
6419 for model in $cf_list_models; do
6420         case $model in #(vi
6421         libtool)
6422
6423 echo "$as_me:6423: checking for additional libtool options" >&5
6424 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6425
6426 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6427 if test "${with_libtool_opts+set}" = set; then
6428   withval="$with_libtool_opts"
6429   with_libtool_opts=$withval
6430 else
6431   with_libtool_opts=no
6432 fi;
6433 echo "$as_me:6433: result: $with_libtool_opts" >&5
6434 echo "${ECHO_T}$with_libtool_opts" >&6
6435
6436 case .$with_libtool_opts in
6437 .yes|.no|.)
6438         ;;
6439 *)
6440         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6441         ;;
6442 esac
6443
6444 echo "$as_me:6444: checking if exported-symbols file should be used" >&5
6445 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6446
6447 # Check whether --with-export-syms or --without-export-syms was given.
6448 if test "${with_export_syms+set}" = set; then
6449   withval="$with_export_syms"
6450   with_export_syms=$withval
6451 else
6452   with_export_syms=no
6453 fi;
6454 if test "x$with_export_syms" = xyes
6455 then
6456         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6457
6458 fi
6459 echo "$as_me:6459: result: $with_export_syms" >&5
6460 echo "${ECHO_T}$with_export_syms" >&6
6461 if test "x$with_export_syms" != xno
6462 then
6463         EXPORT_SYMS="-export-symbols $with_export_syms"
6464
6465 fi
6466
6467                 ;;
6468         shared) #(vi
6469                 if test "$CC_SHARED_OPTS" = "unknown"; then
6470                         { { echo "$as_me:6470: error: Shared libraries are not supported in this version" >&5
6471 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6472    { (exit 1); exit 1; }; }
6473                 fi
6474
6475 echo "$as_me:6475: checking if versioned-symbols file should be used" >&5
6476 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6477
6478 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6479 if test "${with_versioned_syms+set}" = set; then
6480   withval="$with_versioned_syms"
6481   with_versioned_syms=$withval
6482 else
6483   with_versioned_syms=no
6484 fi;
6485 if test "x$with_versioned_syms" = xyes
6486 then
6487         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6488
6489 fi
6490 echo "$as_me:6490: result: $with_versioned_syms" >&5
6491 echo "${ECHO_T}$with_versioned_syms" >&6
6492
6493 RESULTING_SYMS=
6494 VERSIONED_SYMS=
6495 WILDCARD_SYMS=
6496
6497 if test "x$with_versioned_syms" != xno
6498 then
6499         RESULTING_SYMS=$with_versioned_syms
6500         case "x$MK_SHARED_LIB" in
6501         *-Wl,*) #(vi
6502                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6503                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6504                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6505
6506 echo "${as_me:-configure}:6506: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6507
6508                 ;;
6509         *-dy\ *) #(vi
6510                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6511                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6512                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6513
6514 echo "${as_me:-configure}:6514: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6515
6516                 ;;
6517         *)
6518                 { echo "$as_me:6518: WARNING: this system does not support versioned-symbols" >&5
6519 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6520                 ;;
6521         esac
6522
6523         # Linux ld can selectively override scope, e.g., of symbols beginning with
6524         # "_" by first declaring some as global, and then using a wildcard to
6525         # declare the others as local.  Some other loaders cannot do this.  Check
6526         # by constructing a (very) simple shared library and inspecting its
6527         # symbols.
6528         if test "x$VERSIONED_SYMS" != "x"
6529         then
6530                 echo "$as_me:6530: checking if wildcards can be used to selectively omit symbols" >&5
6531 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6532                 WILDCARD_SYMS=no
6533
6534                 # make sources
6535                 rm -f conftest.*
6536
6537                 cat >conftest.ver <<EOF
6538 module_1.0 {
6539 global:
6540         globalf1;
6541 local:
6542         localf1;
6543 };
6544 module_2.0 {
6545 global:
6546         globalf2;
6547 local:
6548         localf2;
6549         _*;
6550 } module_1.0;
6551 submodule_1.0 {
6552 global:
6553         subglobalf1;
6554         _ismissing;
6555 local:
6556         sublocalf1;
6557 };
6558 submodule_2.0 {
6559 global:
6560         subglobalf2;
6561 local:
6562         sublocalf2;
6563         _*;
6564 } submodule_1.0;
6565 EOF
6566                 cat >conftest.$ac_ext <<EOF
6567 #line 6567 "configure"
6568 int     _ismissing(void) { return 1; }
6569 int     _localf1(void) { return 1; }
6570 int     _localf2(void) { return 2; }
6571 int     globalf1(void) { return 1; }
6572 int     globalf2(void) { return 2; }
6573 int     _sublocalf1(void) { return 1; }
6574 int     _sublocalf2(void) { return 2; }
6575 int     subglobalf1(void) { return 1; }
6576 int     subglobalf2(void) { return 2; }
6577 EOF
6578                 cat >conftest.mk <<EOF
6579 CC=${CC}
6580 CFLAGS=${CFLAGS}
6581 CPPFLAGS=${CPPFLAGS}
6582 LDFLAGS=${LDFLAGS}
6583 LIBS=${LIBS}
6584 VERSIONED_SYMS=${VERSIONED_SYMS}
6585 RESULTING_SYMS=conftest.ver
6586 MK_SHARED_LIB=${MK_SHARED_LIB}
6587 conftest.so: conftest.$ac_cv_objext
6588                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6589 EOF
6590
6591                 # compile source, make library
6592                 if make -f conftest.mk 2>&5 >/dev/null
6593                 then
6594                         # test for missing symbol
6595                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6596                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6597                 fi
6598                 echo "$as_me:6598: result: $WILDCARD_SYMS" >&5
6599 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6600                 rm -f conftest.*
6601         fi
6602 fi
6603
6604                 ;;
6605         esac
6606 done
6607
6608 # pretend that ncurses==ncursesw==ncursest
6609 echo "$as_me:6609: checking if you want to disable library suffixes" >&5
6610 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6611
6612 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6613 if test "${enable_lib_suffixes+set}" = set; then
6614   enableval="$enable_lib_suffixes"
6615   test "$enableval" != no && enableval=yes
6616   if test "$enableval" != "yes" ; then
6617     disable_lib_suffixes=yes
6618   else
6619     disable_lib_suffixes=no
6620   fi
6621 else
6622   enableval=yes
6623   disable_lib_suffixes=no
6624
6625 fi;
6626 echo "$as_me:6626: result: $disable_lib_suffixes" >&5
6627 echo "${ECHO_T}$disable_lib_suffixes" >&6
6628
6629 ### If we're building with rpath, try to link non-standard libs that way too.
6630 if test "$DFT_LWR_MODEL" = "shared"; then
6631
6632 echo "$as_me:6632: checking if rpath-hack should be disabled" >&5
6633 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6634
6635 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6636 if test "${enable_rpath_hack+set}" = set; then
6637   enableval="$enable_rpath_hack"
6638   test "$enableval" != no && enableval=yes
6639   if test "$enableval" != "yes" ; then
6640     cf_disable_rpath_hack=yes
6641   else
6642     cf_disable_rpath_hack=no
6643   fi
6644 else
6645   enableval=yes
6646   cf_disable_rpath_hack=no
6647
6648 fi;
6649 echo "$as_me:6649: result: $cf_disable_rpath_hack" >&5
6650 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6651 if test "$cf_disable_rpath_hack" = no ; then
6652
6653 echo "$as_me:6653: checking for updated LDFLAGS" >&5
6654 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6655 if test -n "$LD_RPATH_OPT" ; then
6656         echo "$as_me:6656: result: maybe" >&5
6657 echo "${ECHO_T}maybe" >&6
6658
6659         for ac_prog in ldd
6660 do
6661   # Extract the first word of "$ac_prog", so it can be a program name with args.
6662 set dummy $ac_prog; ac_word=$2
6663 echo "$as_me:6663: checking for $ac_word" >&5
6664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6665 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6666   echo $ECHO_N "(cached) $ECHO_C" >&6
6667 else
6668   if test -n "$cf_ldd_prog"; then
6669   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6670 else
6671   ac_save_IFS=$IFS; IFS=$ac_path_separator
6672 ac_dummy="$PATH"
6673 for ac_dir in $ac_dummy; do
6674   IFS=$ac_save_IFS
6675   test -z "$ac_dir" && ac_dir=.
6676   $as_executable_p "$ac_dir/$ac_word" || continue
6677 ac_cv_prog_cf_ldd_prog="$ac_prog"
6678 echo "$as_me:6678: found $ac_dir/$ac_word" >&5
6679 break
6680 done
6681
6682 fi
6683 fi
6684 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6685 if test -n "$cf_ldd_prog"; then
6686   echo "$as_me:6686: result: $cf_ldd_prog" >&5
6687 echo "${ECHO_T}$cf_ldd_prog" >&6
6688 else
6689   echo "$as_me:6689: result: no" >&5
6690 echo "${ECHO_T}no" >&6
6691 fi
6692
6693   test -n "$cf_ldd_prog" && break
6694 done
6695 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6696
6697         cf_rpath_list="/usr/lib /lib"
6698         if test "$cf_ldd_prog" != no
6699         then
6700                 cf_rpath_oops=
6701
6702 cat >conftest.$ac_ext <<_ACEOF
6703 #line 6703 "configure"
6704 #include "confdefs.h"
6705 #include <stdio.h>
6706 int
6707 main ()
6708 {
6709 printf("Hello");
6710   ;
6711   return 0;
6712 }
6713 _ACEOF
6714 rm -f conftest.$ac_objext conftest$ac_exeext
6715 if { (eval echo "$as_me:6715: \"$ac_link\"") >&5
6716   (eval $ac_link) 2>&5
6717   ac_status=$?
6718   echo "$as_me:6718: \$? = $ac_status" >&5
6719   (exit $ac_status); } &&
6720          { ac_try='test -s conftest$ac_exeext'
6721   { (eval echo "$as_me:6721: \"$ac_try\"") >&5
6722   (eval $ac_try) 2>&5
6723   ac_status=$?
6724   echo "$as_me:6724: \$? = $ac_status" >&5
6725   (exit $ac_status); }; }; then
6726   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6727                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6728 else
6729   echo "$as_me: failed program was:" >&5
6730 cat conftest.$ac_ext >&5
6731 fi
6732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6733
6734                 # If we passed the link-test, but get a "not found" on a given library,
6735                 # this could be due to inept reconfiguration of gcc to make it only
6736                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6737                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6738                 # /usr/local libraries.
6739                 if test -n "$cf_rpath_oops"
6740                 then
6741                         for cf_rpath_src in $cf_rpath_oops
6742                         do
6743                                 for cf_rpath_dir in \
6744                                         /usr/local \
6745                                         /usr/pkg \
6746                                         /opt/sfw
6747                                 do
6748                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6749                                         then
6750                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6751
6752 echo "${as_me:-configure}:6752: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6753
6754                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6755                                                 break
6756                                         fi
6757                                 done
6758                         done
6759                 fi
6760         fi
6761
6762         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6763
6764 echo "${as_me:-configure}:6764: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6765
6766 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6767
6768 echo "${as_me:-configure}:6768: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6769
6770 cf_rpath_dst=
6771 for cf_rpath_src in $LDFLAGS
6772 do
6773         case $cf_rpath_src in #(vi
6774         -L*) #(vi
6775
6776                 # check if this refers to a directory which we will ignore
6777                 cf_rpath_skip=no
6778                 if test -n "$cf_rpath_list"
6779                 then
6780                         for cf_rpath_item in $cf_rpath_list
6781                         do
6782                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6783                                 then
6784                                         cf_rpath_skip=yes
6785                                         break
6786                                 fi
6787                         done
6788                 fi
6789
6790                 if test "$cf_rpath_skip" = no
6791                 then
6792                         # transform the option
6793                         if test "$LD_RPATH_OPT" = "-R " ; then
6794                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6795                         else
6796                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6797                         fi
6798
6799                         # if we have not already added this, add it now
6800                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6801                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6802                         then
6803                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6804
6805 echo "${as_me:-configure}:6805: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6806
6807                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6808                         fi
6809                 fi
6810                 ;;
6811         esac
6812         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6813 done
6814 LDFLAGS=$cf_rpath_dst
6815
6816 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6817
6818 echo "${as_me:-configure}:6818: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6819
6820 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6821
6822 echo "${as_me:-configure}:6822: testing ...checking LIBS $LIBS ..." 1>&5
6823
6824 cf_rpath_dst=
6825 for cf_rpath_src in $LIBS
6826 do
6827         case $cf_rpath_src in #(vi
6828         -L*) #(vi
6829
6830                 # check if this refers to a directory which we will ignore
6831                 cf_rpath_skip=no
6832                 if test -n "$cf_rpath_list"
6833                 then
6834                         for cf_rpath_item in $cf_rpath_list
6835                         do
6836                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6837                                 then
6838                                         cf_rpath_skip=yes
6839                                         break
6840                                 fi
6841                         done
6842                 fi
6843
6844                 if test "$cf_rpath_skip" = no
6845                 then
6846                         # transform the option
6847                         if test "$LD_RPATH_OPT" = "-R " ; then
6848                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6849                         else
6850                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6851                         fi
6852
6853                         # if we have not already added this, add it now
6854                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6855                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6856                         then
6857                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6858
6859 echo "${as_me:-configure}:6859: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6860
6861                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6862                         fi
6863                 fi
6864                 ;;
6865         esac
6866         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6867 done
6868 LIBS=$cf_rpath_dst
6869
6870 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6871
6872 echo "${as_me:-configure}:6872: testing ...checked LIBS $LIBS ..." 1>&5
6873
6874         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6875
6876 echo "${as_me:-configure}:6876: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6877
6878 else
6879         echo "$as_me:6879: result: no" >&5
6880 echo "${ECHO_T}no" >&6
6881 fi
6882
6883 fi
6884
6885 fi
6886
6887 ###############################################################################
6888
6889 ###     use option --disable-overwrite to leave out the link to -lcurses
6890 echo "$as_me:6890: checking if you wish to install ncurses overwriting curses" >&5
6891 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6892
6893 # Check whether --enable-overwrite or --disable-overwrite was given.
6894 if test "${enable_overwrite+set}" = set; then
6895   enableval="$enable_overwrite"
6896   with_overwrite=$enableval
6897 else
6898   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6899 fi;
6900 echo "$as_me:6900: result: $with_overwrite" >&5
6901 echo "${ECHO_T}$with_overwrite" >&6
6902
6903 echo "$as_me:6903: checking if external terminfo-database is used" >&5
6904 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6905
6906 # Check whether --enable-database or --disable-database was given.
6907 if test "${enable_database+set}" = set; then
6908   enableval="$enable_database"
6909   use_database=$enableval
6910 else
6911   use_database=yes
6912 fi;
6913 echo "$as_me:6913: result: $use_database" >&5
6914 echo "${ECHO_T}$use_database" >&6
6915
6916 case $host_os in #(vi
6917 os2*) #(vi
6918         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6919         ;;
6920 *) #(vi
6921         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6922         ;;
6923 esac
6924
6925 NCURSES_USE_DATABASE=0
6926 if test "$use_database" != no ; then
6927         NCURSES_USE_DATABASE=1
6928
6929         echo "$as_me:6929: checking which terminfo source-file will be installed" >&5
6930 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6931
6932 # Check whether --with-database or --without-database was given.
6933 if test "${with_database+set}" = set; then
6934   withval="$with_database"
6935   TERMINFO_SRC=$withval
6936 fi;
6937         echo "$as_me:6937: result: $TERMINFO_SRC" >&5
6938 echo "${ECHO_T}$TERMINFO_SRC" >&6
6939
6940         echo "$as_me:6940: checking whether to use hashed database instead of directory/tree" >&5
6941 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6942
6943 # Check whether --with-hashed-db or --without-hashed-db was given.
6944 if test "${with_hashed_db+set}" = set; then
6945   withval="$with_hashed_db"
6946
6947 else
6948   with_hashed_db=no
6949 fi;
6950         echo "$as_me:6950: result: $with_hashed_db" >&5
6951 echo "${ECHO_T}$with_hashed_db" >&6
6952 else
6953         with_hashed_db=no
6954 fi
6955
6956 echo "$as_me:6956: checking for list of fallback descriptions" >&5
6957 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6958
6959 # Check whether --with-fallbacks or --without-fallbacks was given.
6960 if test "${with_fallbacks+set}" = set; then
6961   withval="$with_fallbacks"
6962   with_fallback=$withval
6963 else
6964   with_fallback=
6965 fi;
6966 echo "$as_me:6966: result: $with_fallback" >&5
6967 echo "${ECHO_T}$with_fallback" >&6
6968 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6969
6970 echo "$as_me:6970: checking if you want modern xterm or antique" >&5
6971 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6972
6973 # Check whether --with-xterm-new or --without-xterm-new was given.
6974 if test "${with_xterm_new+set}" = set; then
6975   withval="$with_xterm_new"
6976   with_xterm_new=$withval
6977 else
6978   with_xterm_new=yes
6979 fi;
6980 case $with_xterm_new in
6981 no)     with_xterm_new=xterm-old;;
6982 *)      with_xterm_new=xterm-new;;
6983 esac
6984 echo "$as_me:6984: result: $with_xterm_new" >&5
6985 echo "${ECHO_T}$with_xterm_new" >&6
6986 WHICH_XTERM=$with_xterm_new
6987
6988 echo "$as_me:6988: checking if xterm backspace sends BS or DEL" >&5
6989 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6990
6991 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6992 if test "${with_xterm_kbs+set}" = set; then
6993   withval="$with_xterm_kbs"
6994   with_xterm_kbs=$withval
6995 else
6996   with_xterm_kbs=BS
6997 fi;
6998 case x$with_xterm_kbs in
6999 xyes|xno|xBS|xbs|x8)
7000         with_xterm_kbs=BS
7001         ;;
7002 xDEL|xdel|x127)
7003         with_xterm_kbs=DEL
7004         ;;
7005 *)
7006         with_xterm_kbs=$withval
7007         ;;
7008 esac
7009 echo "$as_me:7009: result: $with_xterm_kbs" >&5
7010 echo "${ECHO_T}$with_xterm_kbs" >&6
7011 XTERM_KBS=$with_xterm_kbs
7012
7013 MAKE_TERMINFO=
7014 if test "$use_database" = no ; then
7015         TERMINFO="${datadir}/terminfo"
7016         MAKE_TERMINFO="#"
7017 else
7018
7019 echo "$as_me:7019: checking for list of terminfo directories" >&5
7020 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7021
7022 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7023 if test "${with_terminfo_dirs+set}" = set; then
7024   withval="$with_terminfo_dirs"
7025
7026 else
7027   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7028 fi;
7029 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7030 cf_dst_path=
7031 for cf_src_path in $withval
7032 do
7033
7034 if test "x$prefix" != xNONE; then
7035   cf_path_syntax="$prefix"
7036 else
7037   cf_path_syntax="$ac_default_prefix"
7038 fi
7039
7040 case ".$cf_src_path" in #(vi
7041 .\$\(*\)*|.\'*\'*) #(vi
7042   ;;
7043 ..|./*|.\\*) #(vi
7044   ;;
7045 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7046   ;;
7047 .\${*prefix}*|.\${*dir}*) #(vi
7048   eval cf_src_path="$cf_src_path"
7049   case ".$cf_src_path" in #(vi
7050   .NONE/*)
7051     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7052     ;;
7053   esac
7054   ;; #(vi
7055 .no|.NONE/*)
7056   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7057   ;;
7058 *)
7059   { { echo "$as_me:7059: error: expected a pathname, not \"$cf_src_path\"" >&5
7060 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7061    { (exit 1); exit 1; }; }
7062   ;;
7063 esac
7064
7065   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7066   cf_dst_path="${cf_dst_path}${cf_src_path}"
7067 done
7068 IFS="$ac_save_ifs"
7069
7070 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7071 # so we have to check/work around.  We do prefer the result of "eval"...
7072 eval cf_dst_eval="$cf_dst_path"
7073 case "x$cf_dst_eval" in #(vi
7074 xNONE*) #(vi
7075         TERMINFO_DIRS=$cf_dst_path
7076         ;;
7077 *)
7078         TERMINFO_DIRS="$cf_dst_eval"
7079         ;;
7080 esac
7081
7082 echo "$as_me:7082: result: $TERMINFO_DIRS" >&5
7083 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7084 test -n "$TERMINFO_DIRS" &&
7085 cat >>confdefs.h <<EOF
7086 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7087 EOF
7088
7089 echo "$as_me:7089: checking for default terminfo directory" >&5
7090 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7091
7092 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7093 if test "${with_default_terminfo_dir+set}" = set; then
7094   withval="$with_default_terminfo_dir"
7095
7096 else
7097   withval="${TERMINFO:-${datadir}/terminfo}"
7098 fi; if test -n "${datadir}/terminfo" ; then
7099
7100 if test "x$prefix" != xNONE; then
7101   cf_path_syntax="$prefix"
7102 else
7103   cf_path_syntax="$ac_default_prefix"
7104 fi
7105
7106 case ".$withval" in #(vi
7107 .\$\(*\)*|.\'*\'*) #(vi
7108   ;;
7109 ..|./*|.\\*) #(vi
7110   ;;
7111 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7112   ;;
7113 .\${*prefix}*|.\${*dir}*) #(vi
7114   eval withval="$withval"
7115   case ".$withval" in #(vi
7116   .NONE/*)
7117     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7118     ;;
7119   esac
7120   ;; #(vi
7121 .no|.NONE/*)
7122   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7123   ;;
7124 *)
7125   { { echo "$as_me:7125: error: expected a pathname, not \"$withval\"" >&5
7126 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7127    { (exit 1); exit 1; }; }
7128   ;;
7129 esac
7130
7131 fi
7132 eval TERMINFO="$withval"
7133
7134 echo "$as_me:7134: result: $TERMINFO" >&5
7135 echo "${ECHO_T}$TERMINFO" >&6
7136
7137 cat >>confdefs.h <<EOF
7138 #define TERMINFO "$TERMINFO"
7139 EOF
7140
7141 fi
7142
7143 ###     use option --disable-big-core to make tic run on small machines
7144 ###     We need 4Mb, check if we can allocate 50% more than that.
7145 echo "$as_me:7145: checking if big-core option selected" >&5
7146 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7147
7148 # Check whether --enable-big-core or --disable-big-core was given.
7149 if test "${enable_big_core+set}" = set; then
7150   enableval="$enable_big_core"
7151   with_big_core=$enableval
7152 else
7153   if test "$cross_compiling" = yes; then
7154   with_big_core=no
7155 else
7156   cat >conftest.$ac_ext <<_ACEOF
7157 #line 7157 "configure"
7158 #include "confdefs.h"
7159
7160 #include <stdlib.h>
7161 #include <string.h>
7162 int main() {
7163         unsigned long n = 6000000L;
7164         char *s = malloc(n);
7165         if (s != 0)
7166                 s[0] = s[n-1] = 0;
7167         ${cf_cv_main_return:-return}(s == 0);
7168 }
7169 _ACEOF
7170 rm -f conftest$ac_exeext
7171 if { (eval echo "$as_me:7171: \"$ac_link\"") >&5
7172   (eval $ac_link) 2>&5
7173   ac_status=$?
7174   echo "$as_me:7174: \$? = $ac_status" >&5
7175   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7176   { (eval echo "$as_me:7176: \"$ac_try\"") >&5
7177   (eval $ac_try) 2>&5
7178   ac_status=$?
7179   echo "$as_me:7179: \$? = $ac_status" >&5
7180   (exit $ac_status); }; }; then
7181   with_big_core=yes
7182 else
7183   echo "$as_me: program exited with status $ac_status" >&5
7184 echo "$as_me: failed program was:" >&5
7185 cat conftest.$ac_ext >&5
7186 with_big_core=no
7187 fi
7188 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7189 fi
7190 fi;
7191 echo "$as_me:7191: result: $with_big_core" >&5
7192 echo "${ECHO_T}$with_big_core" >&6
7193 test "x$with_big_core" = "xyes" &&
7194 cat >>confdefs.h <<\EOF
7195 #define HAVE_BIG_CORE 1
7196 EOF
7197
7198 ### ISO C only guarantees 512-char strings, we have tables which load faster
7199 ### when constructed using "big" strings.  More than the C compiler, the awk
7200 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7201 echo "$as_me:7201: checking if big-strings option selected" >&5
7202 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7203
7204 # Check whether --enable-big-strings or --disable-big-strings was given.
7205 if test "${enable_big_strings+set}" = set; then
7206   enableval="$enable_big_strings"
7207   with_big_strings=$enableval
7208 else
7209
7210         case x$AWK in #(vi
7211         x)
7212                 eval with_big_strings=no
7213                 ;;
7214         *) #(vi
7215                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7216                         | $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
7217                         eval with_big_strings=yes
7218                 else
7219                         eval with_big_strings=no
7220                 fi
7221                 ;;
7222         esac
7223
7224 fi;
7225 echo "$as_me:7225: result: $with_big_strings" >&5
7226 echo "${ECHO_T}$with_big_strings" >&6
7227
7228 USE_BIG_STRINGS=0
7229 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7230
7231 ###     use option --enable-termcap to compile in the termcap fallback support
7232 echo "$as_me:7232: checking if you want termcap-fallback support" >&5
7233 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7234
7235 # Check whether --enable-termcap or --disable-termcap was given.
7236 if test "${enable_termcap+set}" = set; then
7237   enableval="$enable_termcap"
7238   with_termcap=$enableval
7239 else
7240   with_termcap=no
7241 fi;
7242 echo "$as_me:7242: result: $with_termcap" >&5
7243 echo "${ECHO_T}$with_termcap" >&6
7244
7245 NCURSES_USE_TERMCAP=0
7246 if test "x$with_termcap" != "xyes" ; then
7247         if test "$use_database" = no ; then
7248                 if test -z "$with_fallback" ; then
7249                         { { echo "$as_me:7249: error: You have disabled the database w/o specifying fallbacks" >&5
7250 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7251    { (exit 1); exit 1; }; }
7252                 fi
7253         fi
7254
7255 cat >>confdefs.h <<\EOF
7256 #define PURE_TERMINFO 1
7257 EOF
7258
7259 else
7260
7261         if test "$with_ticlib" != no ; then
7262                 { { echo "$as_me:7262: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7263 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7264    { (exit 1); exit 1; }; }
7265         fi
7266
7267         NCURSES_USE_TERMCAP=1
7268         echo "$as_me:7268: checking for list of termcap files" >&5
7269 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7270
7271 # Check whether --with-termpath or --without-termpath was given.
7272 if test "${with_termpath+set}" = set; then
7273   withval="$with_termpath"
7274
7275 else
7276   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7277 fi;
7278 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7279 cf_dst_path=
7280 for cf_src_path in $withval
7281 do
7282
7283 if test "x$prefix" != xNONE; then
7284   cf_path_syntax="$prefix"
7285 else
7286   cf_path_syntax="$ac_default_prefix"
7287 fi
7288
7289 case ".$cf_src_path" in #(vi
7290 .\$\(*\)*|.\'*\'*) #(vi
7291   ;;
7292 ..|./*|.\\*) #(vi
7293   ;;
7294 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7295   ;;
7296 .\${*prefix}*|.\${*dir}*) #(vi
7297   eval cf_src_path="$cf_src_path"
7298   case ".$cf_src_path" in #(vi
7299   .NONE/*)
7300     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7301     ;;
7302   esac
7303   ;; #(vi
7304 .no|.NONE/*)
7305   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7306   ;;
7307 *)
7308   { { echo "$as_me:7308: error: expected a pathname, not \"$cf_src_path\"" >&5
7309 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7310    { (exit 1); exit 1; }; }
7311   ;;
7312 esac
7313
7314   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7315   cf_dst_path="${cf_dst_path}${cf_src_path}"
7316 done
7317 IFS="$ac_save_ifs"
7318
7319 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7320 # so we have to check/work around.  We do prefer the result of "eval"...
7321 eval cf_dst_eval="$cf_dst_path"
7322 case "x$cf_dst_eval" in #(vi
7323 xNONE*) #(vi
7324         TERMPATH=$cf_dst_path
7325         ;;
7326 *)
7327         TERMPATH="$cf_dst_eval"
7328         ;;
7329 esac
7330
7331         echo "$as_me:7331: result: $TERMPATH" >&5
7332 echo "${ECHO_T}$TERMPATH" >&6
7333         test -n "$TERMPATH" &&
7334 cat >>confdefs.h <<EOF
7335 #define TERMPATH "$TERMPATH"
7336 EOF
7337
7338         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7339         echo "$as_me:7339: checking if fast termcap-loader is needed" >&5
7340 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7341
7342 # Check whether --enable-getcap or --disable-getcap was given.
7343 if test "${enable_getcap+set}" = set; then
7344   enableval="$enable_getcap"
7345   with_getcap=$enableval
7346 else
7347   with_getcap=no
7348 fi;
7349         echo "$as_me:7349: result: $with_getcap" >&5
7350 echo "${ECHO_T}$with_getcap" >&6
7351         test "x$with_getcap" = "xyes" &&
7352 cat >>confdefs.h <<\EOF
7353 #define USE_GETCAP 1
7354 EOF
7355
7356         echo "$as_me:7356: checking if translated termcaps will be cached in ~/.terminfo" >&5
7357 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7358
7359 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7360 if test "${enable_getcap_cache+set}" = set; then
7361   enableval="$enable_getcap_cache"
7362   with_getcap_cache=$enableval
7363 else
7364   with_getcap_cache=no
7365 fi;
7366         echo "$as_me:7366: result: $with_getcap_cache" >&5
7367 echo "${ECHO_T}$with_getcap_cache" >&6
7368         test "x$with_getcap_cache" = "xyes" &&
7369 cat >>confdefs.h <<\EOF
7370 #define USE_GETCAP_CACHE 1
7371 EOF
7372
7373 fi
7374
7375 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7376 echo "$as_me:7376: checking if ~/.terminfo is wanted" >&5
7377 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7378
7379 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7380 if test "${enable_home_terminfo+set}" = set; then
7381   enableval="$enable_home_terminfo"
7382   with_home_terminfo=$enableval
7383 else
7384   with_home_terminfo=yes
7385 fi;
7386 echo "$as_me:7386: result: $with_home_terminfo" >&5
7387 echo "${ECHO_T}$with_home_terminfo" >&6
7388 test "x$with_home_terminfo" = "xyes" &&
7389 cat >>confdefs.h <<\EOF
7390 #define USE_HOME_TERMINFO 1
7391 EOF
7392
7393 echo "$as_me:7393: checking if you want to use restricted environment when running as root" >&5
7394 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7395
7396 # Check whether --enable-root-environ or --disable-root-environ was given.
7397 if test "${enable_root_environ+set}" = set; then
7398   enableval="$enable_root_environ"
7399   with_root_environ=$enableval
7400 else
7401   with_root_environ=yes
7402 fi;
7403 echo "$as_me:7403: result: $with_root_environ" >&5
7404 echo "${ECHO_T}$with_root_environ" >&6
7405 test "x$with_root_environ" = xyes &&
7406 cat >>confdefs.h <<\EOF
7407 #define USE_ROOT_ENVIRON 1
7408 EOF
7409
7410 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7411 ###   to reduce storage requirements for the terminfo database.
7412
7413 for ac_func in \
7414         remove \
7415         unlink
7416 do
7417 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7418 echo "$as_me:7418: checking for $ac_func" >&5
7419 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7420 if eval "test \"\${$as_ac_var+set}\" = set"; then
7421   echo $ECHO_N "(cached) $ECHO_C" >&6
7422 else
7423   cat >conftest.$ac_ext <<_ACEOF
7424 #line 7424 "configure"
7425 #include "confdefs.h"
7426 /* System header to define __stub macros and hopefully few prototypes,
7427     which can conflict with char $ac_func (); below.  */
7428 #include <assert.h>
7429 /* Override any gcc2 internal prototype to avoid an error.  */
7430 #ifdef __cplusplus
7431 extern "C"
7432 #endif
7433 /* We use char because int might match the return type of a gcc2
7434    builtin and then its argument prototype would still apply.  */
7435 char $ac_func ();
7436 char (*f) ();
7437
7438 int
7439 main ()
7440 {
7441 /* The GNU C library defines this for functions which it implements
7442     to always fail with ENOSYS.  Some functions are actually named
7443     something starting with __ and the normal name is an alias.  */
7444 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7445 choke me
7446 #else
7447 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7448 #endif
7449
7450   ;
7451   return 0;
7452 }
7453 _ACEOF
7454 rm -f conftest.$ac_objext conftest$ac_exeext
7455 if { (eval echo "$as_me:7455: \"$ac_link\"") >&5
7456   (eval $ac_link) 2>&5
7457   ac_status=$?
7458   echo "$as_me:7458: \$? = $ac_status" >&5
7459   (exit $ac_status); } &&
7460          { ac_try='test -s conftest$ac_exeext'
7461   { (eval echo "$as_me:7461: \"$ac_try\"") >&5
7462   (eval $ac_try) 2>&5
7463   ac_status=$?
7464   echo "$as_me:7464: \$? = $ac_status" >&5
7465   (exit $ac_status); }; }; then
7466   eval "$as_ac_var=yes"
7467 else
7468   echo "$as_me: failed program was:" >&5
7469 cat conftest.$ac_ext >&5
7470 eval "$as_ac_var=no"
7471 fi
7472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7473 fi
7474 echo "$as_me:7474: result: `eval echo '${'$as_ac_var'}'`" >&5
7475 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7476 if test `eval echo '${'$as_ac_var'}'` = yes; then
7477   cat >>confdefs.h <<EOF
7478 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7479 EOF
7480
7481 fi
7482 done
7483
7484 if test "$cross_compiling" = yes ; then
7485
7486 for ac_func in \
7487                 link \
7488                 symlink
7489 do
7490 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7491 echo "$as_me:7491: checking for $ac_func" >&5
7492 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7493 if eval "test \"\${$as_ac_var+set}\" = set"; then
7494   echo $ECHO_N "(cached) $ECHO_C" >&6
7495 else
7496   cat >conftest.$ac_ext <<_ACEOF
7497 #line 7497 "configure"
7498 #include "confdefs.h"
7499 /* System header to define __stub macros and hopefully few prototypes,
7500     which can conflict with char $ac_func (); below.  */
7501 #include <assert.h>
7502 /* Override any gcc2 internal prototype to avoid an error.  */
7503 #ifdef __cplusplus
7504 extern "C"
7505 #endif
7506 /* We use char because int might match the return type of a gcc2
7507    builtin and then its argument prototype would still apply.  */
7508 char $ac_func ();
7509 char (*f) ();
7510
7511 int
7512 main ()
7513 {
7514 /* The GNU C library defines this for functions which it implements
7515     to always fail with ENOSYS.  Some functions are actually named
7516     something starting with __ and the normal name is an alias.  */
7517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7518 choke me
7519 #else
7520 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7521 #endif
7522
7523   ;
7524   return 0;
7525 }
7526 _ACEOF
7527 rm -f conftest.$ac_objext conftest$ac_exeext
7528 if { (eval echo "$as_me:7528: \"$ac_link\"") >&5
7529   (eval $ac_link) 2>&5
7530   ac_status=$?
7531   echo "$as_me:7531: \$? = $ac_status" >&5
7532   (exit $ac_status); } &&
7533          { ac_try='test -s conftest$ac_exeext'
7534   { (eval echo "$as_me:7534: \"$ac_try\"") >&5
7535   (eval $ac_try) 2>&5
7536   ac_status=$?
7537   echo "$as_me:7537: \$? = $ac_status" >&5
7538   (exit $ac_status); }; }; then
7539   eval "$as_ac_var=yes"
7540 else
7541   echo "$as_me: failed program was:" >&5
7542 cat conftest.$ac_ext >&5
7543 eval "$as_ac_var=no"
7544 fi
7545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7546 fi
7547 echo "$as_me:7547: result: `eval echo '${'$as_ac_var'}'`" >&5
7548 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7549 if test `eval echo '${'$as_ac_var'}'` = yes; then
7550   cat >>confdefs.h <<EOF
7551 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7552 EOF
7553
7554 fi
7555 done
7556
7557 else
7558         echo "$as_me:7558: checking if link/symlink functions work" >&5
7559 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7560 if test "${cf_cv_link_funcs+set}" = set; then
7561   echo $ECHO_N "(cached) $ECHO_C" >&6
7562 else
7563
7564                 cf_cv_link_funcs=
7565                 for cf_func in link symlink ; do
7566                         if test "$cross_compiling" = yes; then
7567
7568                         eval 'ac_cv_func_'$cf_func'=error'
7569 else
7570   cat >conftest.$ac_ext <<_ACEOF
7571 #line 7571 "configure"
7572 #include "confdefs.h"
7573
7574 #include <sys/types.h>
7575 #include <sys/stat.h>
7576 #ifdef HAVE_UNISTD_H
7577 #include <unistd.h>
7578 #endif
7579 int main()
7580 {
7581         int fail = 0;
7582         char *src = "config.log";
7583         char *dst = "conftest.chk";
7584         struct stat src_sb;
7585         struct stat dst_sb;
7586
7587         stat(src, &src_sb);
7588         fail = ($cf_func("config.log", "conftest.chk") < 0)
7589             || (stat(dst, &dst_sb) < 0)
7590             || (dst_sb.st_mtime != src_sb.st_mtime);
7591 #ifdef HAVE_UNLINK
7592         unlink(dst);
7593 #else
7594         remove(dst);
7595 #endif
7596         ${cf_cv_main_return:-return} (fail);
7597 }
7598
7599 _ACEOF
7600 rm -f conftest$ac_exeext
7601 if { (eval echo "$as_me:7601: \"$ac_link\"") >&5
7602   (eval $ac_link) 2>&5
7603   ac_status=$?
7604   echo "$as_me:7604: \$? = $ac_status" >&5
7605   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7606   { (eval echo "$as_me:7606: \"$ac_try\"") >&5
7607   (eval $ac_try) 2>&5
7608   ac_status=$?
7609   echo "$as_me:7609: \$? = $ac_status" >&5
7610   (exit $ac_status); }; }; then
7611
7612                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7613                         eval 'ac_cv_func_'$cf_func'=yes'
7614 else
7615   echo "$as_me: program exited with status $ac_status" >&5
7616 echo "$as_me: failed program was:" >&5
7617 cat conftest.$ac_ext >&5
7618
7619                         eval 'ac_cv_func_'$cf_func'=no'
7620 fi
7621 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7622 fi
7623                 done
7624                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7625
7626 fi
7627 echo "$as_me:7627: result: $cf_cv_link_funcs" >&5
7628 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7629         test "$ac_cv_func_link"    = yes &&
7630 cat >>confdefs.h <<\EOF
7631 #define HAVE_LINK 1
7632 EOF
7633
7634         test "$ac_cv_func_symlink" = yes &&
7635 cat >>confdefs.h <<\EOF
7636 #define HAVE_SYMLINK 1
7637 EOF
7638
7639 fi
7640
7641 with_links=no
7642 with_symlinks=no
7643
7644 # soft links (symbolic links) are useful for some systems where hard links do
7645 # not work, or to make it simpler to copy terminfo trees around.
7646 if test "x$ac_cv_func_symlink" = xyes ; then
7647     echo "$as_me:7647: checking if tic should use symbolic links" >&5
7648 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7649
7650 # Check whether --enable-symlinks or --disable-symlinks was given.
7651 if test "${enable_symlinks+set}" = set; then
7652   enableval="$enable_symlinks"
7653   with_symlinks=$enableval
7654 else
7655   with_symlinks=no
7656 fi;
7657     echo "$as_me:7657: result: $with_symlinks" >&5
7658 echo "${ECHO_T}$with_symlinks" >&6
7659 fi
7660
7661 # If we have hard links and did not choose to use soft links instead, there is
7662 # no reason to make this choice optional - use the hard links.
7663 if test "$with_symlinks" = no ; then
7664     echo "$as_me:7664: checking if tic should use hard links" >&5
7665 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7666     if test "x$ac_cv_func_link" = xyes ; then
7667         with_links=yes
7668     else
7669         with_links=no
7670     fi
7671     echo "$as_me:7671: result: $with_links" >&5
7672 echo "${ECHO_T}$with_links" >&6
7673 fi
7674
7675 test "x$with_links" = xyes &&
7676 cat >>confdefs.h <<\EOF
7677 #define USE_LINKS 1
7678 EOF
7679
7680 test "x$with_symlinks" = xyes &&
7681 cat >>confdefs.h <<\EOF
7682 #define USE_SYMLINKS 1
7683 EOF
7684
7685 ###   use option --enable-broken-linker to force on use of broken-linker support
7686 echo "$as_me:7686: checking if you want broken-linker support code" >&5
7687 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7688
7689 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7690 if test "${enable_broken_linker+set}" = set; then
7691   enableval="$enable_broken_linker"
7692   with_broken_linker=$enableval
7693 else
7694   with_broken_linker=${BROKEN_LINKER:-no}
7695 fi;
7696 echo "$as_me:7696: result: $with_broken_linker" >&5
7697 echo "${ECHO_T}$with_broken_linker" >&6
7698
7699 BROKEN_LINKER=0
7700 if test "x$with_broken_linker" = xyes ; then
7701
7702 cat >>confdefs.h <<\EOF
7703 #define BROKEN_LINKER 1
7704 EOF
7705
7706         BROKEN_LINKER=1
7707 elif test "$DFT_LWR_MODEL" = shared ; then
7708         case $cf_cv_system_name in #(vi
7709         cygwin*)
7710
7711 cat >>confdefs.h <<\EOF
7712 #define BROKEN_LINKER 1
7713 EOF
7714
7715                 BROKEN_LINKER=1
7716                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7717
7718 echo "${as_me:-configure}:7718: testing cygwin linker is broken anyway ..." 1>&5
7719
7720                 ;;
7721         esac
7722 fi
7723
7724 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7725 echo "$as_me:7725: checking if tputs should process BSD-style prefix padding" >&5
7726 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7727
7728 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7729 if test "${enable_bsdpad+set}" = set; then
7730   enableval="$enable_bsdpad"
7731   with_bsdpad=$enableval
7732 else
7733   with_bsdpad=no
7734 fi;
7735 echo "$as_me:7735: result: $with_bsdpad" >&5
7736 echo "${ECHO_T}$with_bsdpad" >&6
7737 test "x$with_bsdpad" = xyes &&
7738 cat >>confdefs.h <<\EOF
7739 #define BSD_TPUTS 1
7740 EOF
7741
7742 ###   use option --enable-widec to turn on use of wide-character support
7743 NCURSES_CH_T=chtype
7744 NCURSES_LIBUTF8=0
7745
7746 NEED_WCHAR_H=0
7747 NCURSES_MBSTATE_T=0
7748 NCURSES_WCHAR_T=0
7749 NCURSES_WINT_T=0
7750
7751 # Check to define _XOPEN_SOURCE "automatically"
7752 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7753
7754 cf_XOPEN_SOURCE=500
7755 cf_POSIX_C_SOURCE=199506L
7756 cf_xopen_source=
7757
7758 case $host_os in #(vi
7759 aix[4-7]*) #(vi
7760         cf_xopen_source="-D_ALL_SOURCE"
7761         ;;
7762 cygwin|msys) #(vi
7763         cf_XOPEN_SOURCE=600
7764         ;;
7765 darwin[0-8].*) #(vi
7766         cf_xopen_source="-D_APPLE_C_SOURCE"
7767         ;;
7768 darwin*) #(vi
7769         cf_xopen_source="-D_DARWIN_C_SOURCE"
7770         cf_XOPEN_SOURCE=
7771         ;;
7772 freebsd*|dragonfly*) #(vi
7773         # 5.x headers associate
7774         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7775         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7776         cf_POSIX_C_SOURCE=200112L
7777         cf_XOPEN_SOURCE=600
7778         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7779         ;;
7780 hpux11*) #(vi
7781         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7782         ;;
7783 hpux*) #(vi
7784         cf_xopen_source="-D_HPUX_SOURCE"
7785         ;;
7786 irix[56].*) #(vi
7787         cf_xopen_source="-D_SGI_SOURCE"
7788         cf_XOPEN_SOURCE=
7789         ;;
7790 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7791
7792 echo "$as_me:7792: checking if we must define _GNU_SOURCE" >&5
7793 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7794 if test "${cf_cv_gnu_source+set}" = set; then
7795   echo $ECHO_N "(cached) $ECHO_C" >&6
7796 else
7797
7798 cat >conftest.$ac_ext <<_ACEOF
7799 #line 7799 "configure"
7800 #include "confdefs.h"
7801 #include <sys/types.h>
7802 int
7803 main ()
7804 {
7805
7806 #ifndef _XOPEN_SOURCE
7807 make an error
7808 #endif
7809   ;
7810   return 0;
7811 }
7812 _ACEOF
7813 rm -f conftest.$ac_objext
7814 if { (eval echo "$as_me:7814: \"$ac_compile\"") >&5
7815   (eval $ac_compile) 2>&5
7816   ac_status=$?
7817   echo "$as_me:7817: \$? = $ac_status" >&5
7818   (exit $ac_status); } &&
7819          { ac_try='test -s conftest.$ac_objext'
7820   { (eval echo "$as_me:7820: \"$ac_try\"") >&5
7821   (eval $ac_try) 2>&5
7822   ac_status=$?
7823   echo "$as_me:7823: \$? = $ac_status" >&5
7824   (exit $ac_status); }; }; then
7825   cf_cv_gnu_source=no
7826 else
7827   echo "$as_me: failed program was:" >&5
7828 cat conftest.$ac_ext >&5
7829 cf_save="$CPPFLAGS"
7830          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7831          cat >conftest.$ac_ext <<_ACEOF
7832 #line 7832 "configure"
7833 #include "confdefs.h"
7834 #include <sys/types.h>
7835 int
7836 main ()
7837 {
7838
7839 #ifdef _XOPEN_SOURCE
7840 make an error
7841 #endif
7842   ;
7843   return 0;
7844 }
7845 _ACEOF
7846 rm -f conftest.$ac_objext
7847 if { (eval echo "$as_me:7847: \"$ac_compile\"") >&5
7848   (eval $ac_compile) 2>&5
7849   ac_status=$?
7850   echo "$as_me:7850: \$? = $ac_status" >&5
7851   (exit $ac_status); } &&
7852          { ac_try='test -s conftest.$ac_objext'
7853   { (eval echo "$as_me:7853: \"$ac_try\"") >&5
7854   (eval $ac_try) 2>&5
7855   ac_status=$?
7856   echo "$as_me:7856: \$? = $ac_status" >&5
7857   (exit $ac_status); }; }; then
7858   cf_cv_gnu_source=no
7859 else
7860   echo "$as_me: failed program was:" >&5
7861 cat conftest.$ac_ext >&5
7862 cf_cv_gnu_source=yes
7863 fi
7864 rm -f conftest.$ac_objext conftest.$ac_ext
7865         CPPFLAGS="$cf_save"
7866
7867 fi
7868 rm -f conftest.$ac_objext conftest.$ac_ext
7869
7870 fi
7871 echo "$as_me:7871: result: $cf_cv_gnu_source" >&5
7872 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7873 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7874
7875         ;;
7876 minix*) #(vi
7877         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7878         ;;
7879 mirbsd*) #(vi
7880         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7881         cf_XOPEN_SOURCE=
7882
7883 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7884
7885 cf_save_CFLAGS="$CFLAGS"
7886 cf_save_CPPFLAGS="$CPPFLAGS"
7887
7888 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7889         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7890                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7891
7892 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7893         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7894                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7895
7896 echo "$as_me:7896: checking if we should define _POSIX_C_SOURCE" >&5
7897 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7898 if test "${cf_cv_posix_c_source+set}" = set; then
7899   echo $ECHO_N "(cached) $ECHO_C" >&6
7900 else
7901
7902 echo "${as_me:-configure}:7902: testing if the symbol is already defined go no further ..." 1>&5
7903
7904         cat >conftest.$ac_ext <<_ACEOF
7905 #line 7905 "configure"
7906 #include "confdefs.h"
7907 #include <sys/types.h>
7908 int
7909 main ()
7910 {
7911
7912 #ifndef _POSIX_C_SOURCE
7913 make an error
7914 #endif
7915   ;
7916   return 0;
7917 }
7918 _ACEOF
7919 rm -f conftest.$ac_objext
7920 if { (eval echo "$as_me:7920: \"$ac_compile\"") >&5
7921   (eval $ac_compile) 2>&5
7922   ac_status=$?
7923   echo "$as_me:7923: \$? = $ac_status" >&5
7924   (exit $ac_status); } &&
7925          { ac_try='test -s conftest.$ac_objext'
7926   { (eval echo "$as_me:7926: \"$ac_try\"") >&5
7927   (eval $ac_try) 2>&5
7928   ac_status=$?
7929   echo "$as_me:7929: \$? = $ac_status" >&5
7930   (exit $ac_status); }; }; then
7931   cf_cv_posix_c_source=no
7932 else
7933   echo "$as_me: failed program was:" >&5
7934 cat conftest.$ac_ext >&5
7935 cf_want_posix_source=no
7936          case .$cf_POSIX_C_SOURCE in #(vi
7937          .[12]??*) #(vi
7938                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7939                 ;;
7940          .2) #(vi
7941                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7942                 cf_want_posix_source=yes
7943                 ;;
7944          .*)
7945                 cf_want_posix_source=yes
7946                 ;;
7947          esac
7948          if test "$cf_want_posix_source" = yes ; then
7949                 cat >conftest.$ac_ext <<_ACEOF
7950 #line 7950 "configure"
7951 #include "confdefs.h"
7952 #include <sys/types.h>
7953 int
7954 main ()
7955 {
7956
7957 #ifdef _POSIX_SOURCE
7958 make an error
7959 #endif
7960   ;
7961   return 0;
7962 }
7963 _ACEOF
7964 rm -f conftest.$ac_objext
7965 if { (eval echo "$as_me:7965: \"$ac_compile\"") >&5
7966   (eval $ac_compile) 2>&5
7967   ac_status=$?
7968   echo "$as_me:7968: \$? = $ac_status" >&5
7969   (exit $ac_status); } &&
7970          { ac_try='test -s conftest.$ac_objext'
7971   { (eval echo "$as_me:7971: \"$ac_try\"") >&5
7972   (eval $ac_try) 2>&5
7973   ac_status=$?
7974   echo "$as_me:7974: \$? = $ac_status" >&5
7975   (exit $ac_status); }; }; then
7976   :
7977 else
7978   echo "$as_me: failed program was:" >&5
7979 cat conftest.$ac_ext >&5
7980 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7981 fi
7982 rm -f conftest.$ac_objext conftest.$ac_ext
7983          fi
7984
7985 echo "${as_me:-configure}:7985: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7986
7987          CFLAGS="$cf_trim_CFLAGS"
7988          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7989
7990 echo "${as_me:-configure}:7990: testing if the second compile does not leave our definition intact error ..." 1>&5
7991
7992          cat >conftest.$ac_ext <<_ACEOF
7993 #line 7993 "configure"
7994 #include "confdefs.h"
7995 #include <sys/types.h>
7996 int
7997 main ()
7998 {
7999
8000 #ifndef _POSIX_C_SOURCE
8001 make an error
8002 #endif
8003   ;
8004   return 0;
8005 }
8006 _ACEOF
8007 rm -f conftest.$ac_objext
8008 if { (eval echo "$as_me:8008: \"$ac_compile\"") >&5
8009   (eval $ac_compile) 2>&5
8010   ac_status=$?
8011   echo "$as_me:8011: \$? = $ac_status" >&5
8012   (exit $ac_status); } &&
8013          { ac_try='test -s conftest.$ac_objext'
8014   { (eval echo "$as_me:8014: \"$ac_try\"") >&5
8015   (eval $ac_try) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit $ac_status); }; }; then
8019   :
8020 else
8021   echo "$as_me: failed program was:" >&5
8022 cat conftest.$ac_ext >&5
8023 cf_cv_posix_c_source=no
8024 fi
8025 rm -f conftest.$ac_objext conftest.$ac_ext
8026          CFLAGS="$cf_save_CFLAGS"
8027          CPPFLAGS="$cf_save_CPPFLAGS"
8028
8029 fi
8030 rm -f conftest.$ac_objext conftest.$ac_ext
8031
8032 fi
8033 echo "$as_me:8033: result: $cf_cv_posix_c_source" >&5
8034 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8035
8036 if test "$cf_cv_posix_c_source" != no ; then
8037         CFLAGS="$cf_trim_CFLAGS"
8038         CPPFLAGS="$cf_trim_CPPFLAGS"
8039
8040 cf_fix_cppflags=no
8041 cf_new_cflags=
8042 cf_new_cppflags=
8043 cf_new_extra_cppflags=
8044
8045 for cf_add_cflags in $cf_cv_posix_c_source
8046 do
8047 case $cf_fix_cppflags in
8048 no)
8049         case $cf_add_cflags in #(vi
8050         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8051                 case $cf_add_cflags in
8052                 -D*)
8053                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8054
8055                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8056                                 && test -z "${cf_tst_cflags}" \
8057                                 && cf_fix_cppflags=yes
8058
8059                         if test $cf_fix_cppflags = yes ; then
8060                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8061                                 continue
8062                         elif test "${cf_tst_cflags}" = "\"'" ; then
8063                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8064                                 continue
8065                         fi
8066                         ;;
8067                 esac
8068                 case "$CPPFLAGS" in
8069                 *$cf_add_cflags) #(vi
8070                         ;;
8071                 *) #(vi
8072                         case $cf_add_cflags in #(vi
8073                         -D*)
8074                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8075
8076 CPPFLAGS=`echo "$CPPFLAGS" | \
8077         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8078                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8079
8080                                 ;;
8081                         esac
8082                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8083                         ;;
8084                 esac
8085                 ;;
8086         *)
8087                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8088                 ;;
8089         esac
8090         ;;
8091 yes)
8092         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8093
8094         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8095
8096         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8097                 && test -z "${cf_tst_cflags}" \
8098                 && cf_fix_cppflags=no
8099         ;;
8100 esac
8101 done
8102
8103 if test -n "$cf_new_cflags" ; then
8104
8105         CFLAGS="$CFLAGS $cf_new_cflags"
8106 fi
8107
8108 if test -n "$cf_new_cppflags" ; then
8109
8110         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8111 fi
8112
8113 if test -n "$cf_new_extra_cppflags" ; then
8114
8115         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8116 fi
8117
8118 fi
8119
8120         ;;
8121 netbsd*) #(vi
8122         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8123         ;;
8124 openbsd[4-9]*) #(vi
8125         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8126         cf_xopen_source="-D_BSD_SOURCE"
8127         cf_XOPEN_SOURCE=600
8128         ;;
8129 openbsd*) #(vi
8130         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8131         ;;
8132 osf[45]*) #(vi
8133         cf_xopen_source="-D_OSF_SOURCE"
8134         ;;
8135 nto-qnx*) #(vi
8136         cf_xopen_source="-D_QNX_SOURCE"
8137         ;;
8138 sco*) #(vi
8139         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8140         ;;
8141 solaris2.*) #(vi
8142         cf_xopen_source="-D__EXTENSIONS__"
8143         cf_cv_xopen_source=broken
8144         ;;
8145 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8146         cf_XOPEN_SOURCE=
8147         cf_POSIX_C_SOURCE=
8148         ;;
8149 *)
8150
8151 echo "$as_me:8151: checking if we should define _XOPEN_SOURCE" >&5
8152 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8153 if test "${cf_cv_xopen_source+set}" = set; then
8154   echo $ECHO_N "(cached) $ECHO_C" >&6
8155 else
8156
8157         cat >conftest.$ac_ext <<_ACEOF
8158 #line 8158 "configure"
8159 #include "confdefs.h"
8160
8161 #include <stdlib.h>
8162 #include <string.h>
8163 #include <sys/types.h>
8164
8165 int
8166 main ()
8167 {
8168
8169 #ifndef _XOPEN_SOURCE
8170 make an error
8171 #endif
8172   ;
8173   return 0;
8174 }
8175 _ACEOF
8176 rm -f conftest.$ac_objext
8177 if { (eval echo "$as_me:8177: \"$ac_compile\"") >&5
8178   (eval $ac_compile) 2>&5
8179   ac_status=$?
8180   echo "$as_me:8180: \$? = $ac_status" >&5
8181   (exit $ac_status); } &&
8182          { ac_try='test -s conftest.$ac_objext'
8183   { (eval echo "$as_me:8183: \"$ac_try\"") >&5
8184   (eval $ac_try) 2>&5
8185   ac_status=$?
8186   echo "$as_me:8186: \$? = $ac_status" >&5
8187   (exit $ac_status); }; }; then
8188   cf_cv_xopen_source=no
8189 else
8190   echo "$as_me: failed program was:" >&5
8191 cat conftest.$ac_ext >&5
8192 cf_save="$CPPFLAGS"
8193          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8194          cat >conftest.$ac_ext <<_ACEOF
8195 #line 8195 "configure"
8196 #include "confdefs.h"
8197
8198 #include <stdlib.h>
8199 #include <string.h>
8200 #include <sys/types.h>
8201
8202 int
8203 main ()
8204 {
8205
8206 #ifdef _XOPEN_SOURCE
8207 make an error
8208 #endif
8209   ;
8210   return 0;
8211 }
8212 _ACEOF
8213 rm -f conftest.$ac_objext
8214 if { (eval echo "$as_me:8214: \"$ac_compile\"") >&5
8215   (eval $ac_compile) 2>&5
8216   ac_status=$?
8217   echo "$as_me:8217: \$? = $ac_status" >&5
8218   (exit $ac_status); } &&
8219          { ac_try='test -s conftest.$ac_objext'
8220   { (eval echo "$as_me:8220: \"$ac_try\"") >&5
8221   (eval $ac_try) 2>&5
8222   ac_status=$?
8223   echo "$as_me:8223: \$? = $ac_status" >&5
8224   (exit $ac_status); }; }; then
8225   cf_cv_xopen_source=no
8226 else
8227   echo "$as_me: failed program was:" >&5
8228 cat conftest.$ac_ext >&5
8229 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8230 fi
8231 rm -f conftest.$ac_objext conftest.$ac_ext
8232         CPPFLAGS="$cf_save"
8233
8234 fi
8235 rm -f conftest.$ac_objext conftest.$ac_ext
8236
8237 fi
8238 echo "$as_me:8238: result: $cf_cv_xopen_source" >&5
8239 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8240
8241 if test "$cf_cv_xopen_source" != no ; then
8242
8243 CFLAGS=`echo "$CFLAGS" | \
8244         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8245                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8246
8247 CPPFLAGS=`echo "$CPPFLAGS" | \
8248         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8249                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8250
8251         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8252
8253 cf_fix_cppflags=no
8254 cf_new_cflags=
8255 cf_new_cppflags=
8256 cf_new_extra_cppflags=
8257
8258 for cf_add_cflags in $cf_temp_xopen_source
8259 do
8260 case $cf_fix_cppflags in
8261 no)
8262         case $cf_add_cflags in #(vi
8263         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8264                 case $cf_add_cflags in
8265                 -D*)
8266                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8267
8268                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8269                                 && test -z "${cf_tst_cflags}" \
8270                                 && cf_fix_cppflags=yes
8271
8272                         if test $cf_fix_cppflags = yes ; then
8273                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8274                                 continue
8275                         elif test "${cf_tst_cflags}" = "\"'" ; then
8276                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8277                                 continue
8278                         fi
8279                         ;;
8280                 esac
8281                 case "$CPPFLAGS" in
8282                 *$cf_add_cflags) #(vi
8283                         ;;
8284                 *) #(vi
8285                         case $cf_add_cflags in #(vi
8286                         -D*)
8287                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8288
8289 CPPFLAGS=`echo "$CPPFLAGS" | \
8290         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8291                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8292
8293                                 ;;
8294                         esac
8295                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8296                         ;;
8297                 esac
8298                 ;;
8299         *)
8300                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8301                 ;;
8302         esac
8303         ;;
8304 yes)
8305         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8306
8307         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8308
8309         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8310                 && test -z "${cf_tst_cflags}" \
8311                 && cf_fix_cppflags=no
8312         ;;
8313 esac
8314 done
8315
8316 if test -n "$cf_new_cflags" ; then
8317
8318         CFLAGS="$CFLAGS $cf_new_cflags"
8319 fi
8320
8321 if test -n "$cf_new_cppflags" ; then
8322
8323         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8324 fi
8325
8326 if test -n "$cf_new_extra_cppflags" ; then
8327
8328         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8329 fi
8330
8331 fi
8332
8333 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8334
8335 cf_save_CFLAGS="$CFLAGS"
8336 cf_save_CPPFLAGS="$CPPFLAGS"
8337
8338 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8339         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8340                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8341
8342 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8343         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8344                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8345
8346 echo "$as_me:8346: checking if we should define _POSIX_C_SOURCE" >&5
8347 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8348 if test "${cf_cv_posix_c_source+set}" = set; then
8349   echo $ECHO_N "(cached) $ECHO_C" >&6
8350 else
8351
8352 echo "${as_me:-configure}:8352: testing if the symbol is already defined go no further ..." 1>&5
8353
8354         cat >conftest.$ac_ext <<_ACEOF
8355 #line 8355 "configure"
8356 #include "confdefs.h"
8357 #include <sys/types.h>
8358 int
8359 main ()
8360 {
8361
8362 #ifndef _POSIX_C_SOURCE
8363 make an error
8364 #endif
8365   ;
8366   return 0;
8367 }
8368 _ACEOF
8369 rm -f conftest.$ac_objext
8370 if { (eval echo "$as_me:8370: \"$ac_compile\"") >&5
8371   (eval $ac_compile) 2>&5
8372   ac_status=$?
8373   echo "$as_me:8373: \$? = $ac_status" >&5
8374   (exit $ac_status); } &&
8375          { ac_try='test -s conftest.$ac_objext'
8376   { (eval echo "$as_me:8376: \"$ac_try\"") >&5
8377   (eval $ac_try) 2>&5
8378   ac_status=$?
8379   echo "$as_me:8379: \$? = $ac_status" >&5
8380   (exit $ac_status); }; }; then
8381   cf_cv_posix_c_source=no
8382 else
8383   echo "$as_me: failed program was:" >&5
8384 cat conftest.$ac_ext >&5
8385 cf_want_posix_source=no
8386          case .$cf_POSIX_C_SOURCE in #(vi
8387          .[12]??*) #(vi
8388                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8389                 ;;
8390          .2) #(vi
8391                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8392                 cf_want_posix_source=yes
8393                 ;;
8394          .*)
8395                 cf_want_posix_source=yes
8396                 ;;
8397          esac
8398          if test "$cf_want_posix_source" = yes ; then
8399                 cat >conftest.$ac_ext <<_ACEOF
8400 #line 8400 "configure"
8401 #include "confdefs.h"
8402 #include <sys/types.h>
8403 int
8404 main ()
8405 {
8406
8407 #ifdef _POSIX_SOURCE
8408 make an error
8409 #endif
8410   ;
8411   return 0;
8412 }
8413 _ACEOF
8414 rm -f conftest.$ac_objext
8415 if { (eval echo "$as_me:8415: \"$ac_compile\"") >&5
8416   (eval $ac_compile) 2>&5
8417   ac_status=$?
8418   echo "$as_me:8418: \$? = $ac_status" >&5
8419   (exit $ac_status); } &&
8420          { ac_try='test -s conftest.$ac_objext'
8421   { (eval echo "$as_me:8421: \"$ac_try\"") >&5
8422   (eval $ac_try) 2>&5
8423   ac_status=$?
8424   echo "$as_me:8424: \$? = $ac_status" >&5
8425   (exit $ac_status); }; }; then
8426   :
8427 else
8428   echo "$as_me: failed program was:" >&5
8429 cat conftest.$ac_ext >&5
8430 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8431 fi
8432 rm -f conftest.$ac_objext conftest.$ac_ext
8433          fi
8434
8435 echo "${as_me:-configure}:8435: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8436
8437          CFLAGS="$cf_trim_CFLAGS"
8438          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8439
8440 echo "${as_me:-configure}:8440: testing if the second compile does not leave our definition intact error ..." 1>&5
8441
8442          cat >conftest.$ac_ext <<_ACEOF
8443 #line 8443 "configure"
8444 #include "confdefs.h"
8445 #include <sys/types.h>
8446 int
8447 main ()
8448 {
8449
8450 #ifndef _POSIX_C_SOURCE
8451 make an error
8452 #endif
8453   ;
8454   return 0;
8455 }
8456 _ACEOF
8457 rm -f conftest.$ac_objext
8458 if { (eval echo "$as_me:8458: \"$ac_compile\"") >&5
8459   (eval $ac_compile) 2>&5
8460   ac_status=$?
8461   echo "$as_me:8461: \$? = $ac_status" >&5
8462   (exit $ac_status); } &&
8463          { ac_try='test -s conftest.$ac_objext'
8464   { (eval echo "$as_me:8464: \"$ac_try\"") >&5
8465   (eval $ac_try) 2>&5
8466   ac_status=$?
8467   echo "$as_me:8467: \$? = $ac_status" >&5
8468   (exit $ac_status); }; }; then
8469   :
8470 else
8471   echo "$as_me: failed program was:" >&5
8472 cat conftest.$ac_ext >&5
8473 cf_cv_posix_c_source=no
8474 fi
8475 rm -f conftest.$ac_objext conftest.$ac_ext
8476          CFLAGS="$cf_save_CFLAGS"
8477          CPPFLAGS="$cf_save_CPPFLAGS"
8478
8479 fi
8480 rm -f conftest.$ac_objext conftest.$ac_ext
8481
8482 fi
8483 echo "$as_me:8483: result: $cf_cv_posix_c_source" >&5
8484 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8485
8486 if test "$cf_cv_posix_c_source" != no ; then
8487         CFLAGS="$cf_trim_CFLAGS"
8488         CPPFLAGS="$cf_trim_CPPFLAGS"
8489
8490 cf_fix_cppflags=no
8491 cf_new_cflags=
8492 cf_new_cppflags=
8493 cf_new_extra_cppflags=
8494
8495 for cf_add_cflags in $cf_cv_posix_c_source
8496 do
8497 case $cf_fix_cppflags in
8498 no)
8499         case $cf_add_cflags in #(vi
8500         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8501                 case $cf_add_cflags in
8502                 -D*)
8503                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8504
8505                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8506                                 && test -z "${cf_tst_cflags}" \
8507                                 && cf_fix_cppflags=yes
8508
8509                         if test $cf_fix_cppflags = yes ; then
8510                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8511                                 continue
8512                         elif test "${cf_tst_cflags}" = "\"'" ; then
8513                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8514                                 continue
8515                         fi
8516                         ;;
8517                 esac
8518                 case "$CPPFLAGS" in
8519                 *$cf_add_cflags) #(vi
8520                         ;;
8521                 *) #(vi
8522                         case $cf_add_cflags in #(vi
8523                         -D*)
8524                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8525
8526 CPPFLAGS=`echo "$CPPFLAGS" | \
8527         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8528                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8529
8530                                 ;;
8531                         esac
8532                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8533                         ;;
8534                 esac
8535                 ;;
8536         *)
8537                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8538                 ;;
8539         esac
8540         ;;
8541 yes)
8542         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8543
8544         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8545
8546         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8547                 && test -z "${cf_tst_cflags}" \
8548                 && cf_fix_cppflags=no
8549         ;;
8550 esac
8551 done
8552
8553 if test -n "$cf_new_cflags" ; then
8554
8555         CFLAGS="$CFLAGS $cf_new_cflags"
8556 fi
8557
8558 if test -n "$cf_new_cppflags" ; then
8559
8560         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8561 fi
8562
8563 if test -n "$cf_new_extra_cppflags" ; then
8564
8565         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8566 fi
8567
8568 fi
8569
8570         ;;
8571 esac
8572
8573 if test -n "$cf_xopen_source" ; then
8574
8575 cf_fix_cppflags=no
8576 cf_new_cflags=
8577 cf_new_cppflags=
8578 cf_new_extra_cppflags=
8579
8580 for cf_add_cflags in $cf_xopen_source
8581 do
8582 case $cf_fix_cppflags in
8583 no)
8584         case $cf_add_cflags in #(vi
8585         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8586                 case $cf_add_cflags in
8587                 -D*)
8588                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8589
8590                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8591                                 && test -z "${cf_tst_cflags}" \
8592                                 && cf_fix_cppflags=yes
8593
8594                         if test $cf_fix_cppflags = yes ; then
8595                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8596                                 continue
8597                         elif test "${cf_tst_cflags}" = "\"'" ; then
8598                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8599                                 continue
8600                         fi
8601                         ;;
8602                 esac
8603                 case "$CPPFLAGS" in
8604                 *$cf_add_cflags) #(vi
8605                         ;;
8606                 *) #(vi
8607                         case $cf_add_cflags in #(vi
8608                         -D*)
8609                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8610
8611 CPPFLAGS=`echo "$CPPFLAGS" | \
8612         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8613                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8614
8615                                 ;;
8616                         esac
8617                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8618                         ;;
8619                 esac
8620                 ;;
8621         *)
8622                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8623                 ;;
8624         esac
8625         ;;
8626 yes)
8627         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8628
8629         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8630
8631         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8632                 && test -z "${cf_tst_cflags}" \
8633                 && cf_fix_cppflags=no
8634         ;;
8635 esac
8636 done
8637
8638 if test -n "$cf_new_cflags" ; then
8639         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8640
8641 echo "${as_me:-configure}:8641: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8642
8643         CFLAGS="$CFLAGS $cf_new_cflags"
8644 fi
8645
8646 if test -n "$cf_new_cppflags" ; then
8647         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8648
8649 echo "${as_me:-configure}:8649: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8650
8651         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8652 fi
8653
8654 if test -n "$cf_new_extra_cppflags" ; then
8655         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8656
8657 echo "${as_me:-configure}:8657: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8658
8659         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8660 fi
8661
8662 fi
8663
8664 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8665         echo "$as_me:8665: checking if _XOPEN_SOURCE really is set" >&5
8666 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8667         cat >conftest.$ac_ext <<_ACEOF
8668 #line 8668 "configure"
8669 #include "confdefs.h"
8670 #include <stdlib.h>
8671 int
8672 main ()
8673 {
8674
8675 #ifndef _XOPEN_SOURCE
8676 make an error
8677 #endif
8678   ;
8679   return 0;
8680 }
8681 _ACEOF
8682 rm -f conftest.$ac_objext
8683 if { (eval echo "$as_me:8683: \"$ac_compile\"") >&5
8684   (eval $ac_compile) 2>&5
8685   ac_status=$?
8686   echo "$as_me:8686: \$? = $ac_status" >&5
8687   (exit $ac_status); } &&
8688          { ac_try='test -s conftest.$ac_objext'
8689   { (eval echo "$as_me:8689: \"$ac_try\"") >&5
8690   (eval $ac_try) 2>&5
8691   ac_status=$?
8692   echo "$as_me:8692: \$? = $ac_status" >&5
8693   (exit $ac_status); }; }; then
8694   cf_XOPEN_SOURCE_set=yes
8695 else
8696   echo "$as_me: failed program was:" >&5
8697 cat conftest.$ac_ext >&5
8698 cf_XOPEN_SOURCE_set=no
8699 fi
8700 rm -f conftest.$ac_objext conftest.$ac_ext
8701         echo "$as_me:8701: result: $cf_XOPEN_SOURCE_set" >&5
8702 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8703         if test $cf_XOPEN_SOURCE_set = yes
8704         then
8705                 cat >conftest.$ac_ext <<_ACEOF
8706 #line 8706 "configure"
8707 #include "confdefs.h"
8708 #include <stdlib.h>
8709 int
8710 main ()
8711 {
8712
8713 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8714 make an error
8715 #endif
8716   ;
8717   return 0;
8718 }
8719 _ACEOF
8720 rm -f conftest.$ac_objext
8721 if { (eval echo "$as_me:8721: \"$ac_compile\"") >&5
8722   (eval $ac_compile) 2>&5
8723   ac_status=$?
8724   echo "$as_me:8724: \$? = $ac_status" >&5
8725   (exit $ac_status); } &&
8726          { ac_try='test -s conftest.$ac_objext'
8727   { (eval echo "$as_me:8727: \"$ac_try\"") >&5
8728   (eval $ac_try) 2>&5
8729   ac_status=$?
8730   echo "$as_me:8730: \$? = $ac_status" >&5
8731   (exit $ac_status); }; }; then
8732   cf_XOPEN_SOURCE_set_ok=yes
8733 else
8734   echo "$as_me: failed program was:" >&5
8735 cat conftest.$ac_ext >&5
8736 cf_XOPEN_SOURCE_set_ok=no
8737 fi
8738 rm -f conftest.$ac_objext conftest.$ac_ext
8739                 if test $cf_XOPEN_SOURCE_set_ok = no
8740                 then
8741                         { echo "$as_me:8741: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8742 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8743                 fi
8744         else
8745
8746 echo "$as_me:8746: checking if we should define _XOPEN_SOURCE" >&5
8747 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8748 if test "${cf_cv_xopen_source+set}" = set; then
8749   echo $ECHO_N "(cached) $ECHO_C" >&6
8750 else
8751
8752         cat >conftest.$ac_ext <<_ACEOF
8753 #line 8753 "configure"
8754 #include "confdefs.h"
8755
8756 #include <stdlib.h>
8757 #include <string.h>
8758 #include <sys/types.h>
8759
8760 int
8761 main ()
8762 {
8763
8764 #ifndef _XOPEN_SOURCE
8765 make an error
8766 #endif
8767   ;
8768   return 0;
8769 }
8770 _ACEOF
8771 rm -f conftest.$ac_objext
8772 if { (eval echo "$as_me:8772: \"$ac_compile\"") >&5
8773   (eval $ac_compile) 2>&5
8774   ac_status=$?
8775   echo "$as_me:8775: \$? = $ac_status" >&5
8776   (exit $ac_status); } &&
8777          { ac_try='test -s conftest.$ac_objext'
8778   { (eval echo "$as_me:8778: \"$ac_try\"") >&5
8779   (eval $ac_try) 2>&5
8780   ac_status=$?
8781   echo "$as_me:8781: \$? = $ac_status" >&5
8782   (exit $ac_status); }; }; then
8783   cf_cv_xopen_source=no
8784 else
8785   echo "$as_me: failed program was:" >&5
8786 cat conftest.$ac_ext >&5
8787 cf_save="$CPPFLAGS"
8788          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8789          cat >conftest.$ac_ext <<_ACEOF
8790 #line 8790 "configure"
8791 #include "confdefs.h"
8792
8793 #include <stdlib.h>
8794 #include <string.h>
8795 #include <sys/types.h>
8796
8797 int
8798 main ()
8799 {
8800
8801 #ifdef _XOPEN_SOURCE
8802 make an error
8803 #endif
8804   ;
8805   return 0;
8806 }
8807 _ACEOF
8808 rm -f conftest.$ac_objext
8809 if { (eval echo "$as_me:8809: \"$ac_compile\"") >&5
8810   (eval $ac_compile) 2>&5
8811   ac_status=$?
8812   echo "$as_me:8812: \$? = $ac_status" >&5
8813   (exit $ac_status); } &&
8814          { ac_try='test -s conftest.$ac_objext'
8815   { (eval echo "$as_me:8815: \"$ac_try\"") >&5
8816   (eval $ac_try) 2>&5
8817   ac_status=$?
8818   echo "$as_me:8818: \$? = $ac_status" >&5
8819   (exit $ac_status); }; }; then
8820   cf_cv_xopen_source=no
8821 else
8822   echo "$as_me: failed program was:" >&5
8823 cat conftest.$ac_ext >&5
8824 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8825 fi
8826 rm -f conftest.$ac_objext conftest.$ac_ext
8827         CPPFLAGS="$cf_save"
8828
8829 fi
8830 rm -f conftest.$ac_objext conftest.$ac_ext
8831
8832 fi
8833 echo "$as_me:8833: result: $cf_cv_xopen_source" >&5
8834 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8835
8836 if test "$cf_cv_xopen_source" != no ; then
8837
8838 CFLAGS=`echo "$CFLAGS" | \
8839         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8840                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8841
8842 CPPFLAGS=`echo "$CPPFLAGS" | \
8843         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8844                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8845
8846         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8847
8848 cf_fix_cppflags=no
8849 cf_new_cflags=
8850 cf_new_cppflags=
8851 cf_new_extra_cppflags=
8852
8853 for cf_add_cflags in $cf_temp_xopen_source
8854 do
8855 case $cf_fix_cppflags in
8856 no)
8857         case $cf_add_cflags in #(vi
8858         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8859                 case $cf_add_cflags in
8860                 -D*)
8861                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8862
8863                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8864                                 && test -z "${cf_tst_cflags}" \
8865                                 && cf_fix_cppflags=yes
8866
8867                         if test $cf_fix_cppflags = yes ; then
8868                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8869                                 continue
8870                         elif test "${cf_tst_cflags}" = "\"'" ; then
8871                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8872                                 continue
8873                         fi
8874                         ;;
8875                 esac
8876                 case "$CPPFLAGS" in
8877                 *$cf_add_cflags) #(vi
8878                         ;;
8879                 *) #(vi
8880                         case $cf_add_cflags in #(vi
8881                         -D*)
8882                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8883
8884 CPPFLAGS=`echo "$CPPFLAGS" | \
8885         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8886                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8887
8888                                 ;;
8889                         esac
8890                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8891                         ;;
8892                 esac
8893                 ;;
8894         *)
8895                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8896                 ;;
8897         esac
8898         ;;
8899 yes)
8900         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8901
8902         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8903
8904         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8905                 && test -z "${cf_tst_cflags}" \
8906                 && cf_fix_cppflags=no
8907         ;;
8908 esac
8909 done
8910
8911 if test -n "$cf_new_cflags" ; then
8912
8913         CFLAGS="$CFLAGS $cf_new_cflags"
8914 fi
8915
8916 if test -n "$cf_new_cppflags" ; then
8917
8918         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8919 fi
8920
8921 if test -n "$cf_new_extra_cppflags" ; then
8922
8923         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8924 fi
8925
8926 fi
8927
8928         fi
8929 fi
8930
8931 CPPFLAGS_after_XOPEN="$CPPFLAGS"
8932
8933 # Work around breakage on OS X
8934
8935 echo "$as_me:8935: checking if SIGWINCH is defined" >&5
8936 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8937 if test "${cf_cv_define_sigwinch+set}" = set; then
8938   echo $ECHO_N "(cached) $ECHO_C" >&6
8939 else
8940
8941         cat >conftest.$ac_ext <<_ACEOF
8942 #line 8942 "configure"
8943 #include "confdefs.h"
8944
8945 #include <sys/types.h>
8946 #include <sys/signal.h>
8947
8948 int
8949 main ()
8950 {
8951 int x = SIGWINCH
8952   ;
8953   return 0;
8954 }
8955 _ACEOF
8956 rm -f conftest.$ac_objext
8957 if { (eval echo "$as_me:8957: \"$ac_compile\"") >&5
8958   (eval $ac_compile) 2>&5
8959   ac_status=$?
8960   echo "$as_me:8960: \$? = $ac_status" >&5
8961   (exit $ac_status); } &&
8962          { ac_try='test -s conftest.$ac_objext'
8963   { (eval echo "$as_me:8963: \"$ac_try\"") >&5
8964   (eval $ac_try) 2>&5
8965   ac_status=$?
8966   echo "$as_me:8966: \$? = $ac_status" >&5
8967   (exit $ac_status); }; }; then
8968   cf_cv_define_sigwinch=yes
8969 else
8970   echo "$as_me: failed program was:" >&5
8971 cat conftest.$ac_ext >&5
8972 cat >conftest.$ac_ext <<_ACEOF
8973 #line 8973 "configure"
8974 #include "confdefs.h"
8975
8976 #undef _XOPEN_SOURCE
8977 #undef _POSIX_SOURCE
8978 #undef _POSIX_C_SOURCE
8979 #include <sys/types.h>
8980 #include <sys/signal.h>
8981
8982 int
8983 main ()
8984 {
8985 int x = SIGWINCH
8986   ;
8987   return 0;
8988 }
8989 _ACEOF
8990 rm -f conftest.$ac_objext
8991 if { (eval echo "$as_me:8991: \"$ac_compile\"") >&5
8992   (eval $ac_compile) 2>&5
8993   ac_status=$?
8994   echo "$as_me:8994: \$? = $ac_status" >&5
8995   (exit $ac_status); } &&
8996          { ac_try='test -s conftest.$ac_objext'
8997   { (eval echo "$as_me:8997: \"$ac_try\"") >&5
8998   (eval $ac_try) 2>&5
8999   ac_status=$?
9000   echo "$as_me:9000: \$? = $ac_status" >&5
9001   (exit $ac_status); }; }; then
9002   cf_cv_define_sigwinch=maybe
9003 else
9004   echo "$as_me: failed program was:" >&5
9005 cat conftest.$ac_ext >&5
9006 cf_cv_define_sigwinch=no
9007 fi
9008 rm -f conftest.$ac_objext conftest.$ac_ext
9009
9010 fi
9011 rm -f conftest.$ac_objext conftest.$ac_ext
9012
9013 fi
9014 echo "$as_me:9014: result: $cf_cv_define_sigwinch" >&5
9015 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9016
9017 if test "$cf_cv_define_sigwinch" = maybe ; then
9018 echo "$as_me:9018: checking for actual SIGWINCH definition" >&5
9019 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9020 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9021   echo $ECHO_N "(cached) $ECHO_C" >&6
9022 else
9023
9024 cf_cv_fixup_sigwinch=unknown
9025 cf_sigwinch=32
9026 while test $cf_sigwinch != 1
9027 do
9028         cat >conftest.$ac_ext <<_ACEOF
9029 #line 9029 "configure"
9030 #include "confdefs.h"
9031
9032 #undef _XOPEN_SOURCE
9033 #undef _POSIX_SOURCE
9034 #undef _POSIX_C_SOURCE
9035 #include <sys/types.h>
9036 #include <sys/signal.h>
9037
9038 int
9039 main ()
9040 {
9041
9042 #if SIGWINCH != $cf_sigwinch
9043 make an error
9044 #endif
9045 int x = SIGWINCH
9046   ;
9047   return 0;
9048 }
9049 _ACEOF
9050 rm -f conftest.$ac_objext
9051 if { (eval echo "$as_me:9051: \"$ac_compile\"") >&5
9052   (eval $ac_compile) 2>&5
9053   ac_status=$?
9054   echo "$as_me:9054: \$? = $ac_status" >&5
9055   (exit $ac_status); } &&
9056          { ac_try='test -s conftest.$ac_objext'
9057   { (eval echo "$as_me:9057: \"$ac_try\"") >&5
9058   (eval $ac_try) 2>&5
9059   ac_status=$?
9060   echo "$as_me:9060: \$? = $ac_status" >&5
9061   (exit $ac_status); }; }; then
9062   cf_cv_fixup_sigwinch=$cf_sigwinch
9063          break
9064 else
9065   echo "$as_me: failed program was:" >&5
9066 cat conftest.$ac_ext >&5
9067 fi
9068 rm -f conftest.$ac_objext conftest.$ac_ext
9069
9070 cf_sigwinch=`expr $cf_sigwinch - 1`
9071 done
9072
9073 fi
9074 echo "$as_me:9074: result: $cf_cv_fixup_sigwinch" >&5
9075 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9076
9077         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9078                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9079         fi
9080 fi
9081
9082 # Checks for CODESET support.
9083
9084   echo "$as_me:9084: checking for nl_langinfo and CODESET" >&5
9085 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9086 if test "${am_cv_langinfo_codeset+set}" = set; then
9087   echo $ECHO_N "(cached) $ECHO_C" >&6
9088 else
9089   cat >conftest.$ac_ext <<_ACEOF
9090 #line 9090 "configure"
9091 #include "confdefs.h"
9092 #include <langinfo.h>
9093 int
9094 main ()
9095 {
9096 char* cs = nl_langinfo(CODESET);
9097   ;
9098   return 0;
9099 }
9100 _ACEOF
9101 rm -f conftest.$ac_objext conftest$ac_exeext
9102 if { (eval echo "$as_me:9102: \"$ac_link\"") >&5
9103   (eval $ac_link) 2>&5
9104   ac_status=$?
9105   echo "$as_me:9105: \$? = $ac_status" >&5
9106   (exit $ac_status); } &&
9107          { ac_try='test -s conftest$ac_exeext'
9108   { (eval echo "$as_me:9108: \"$ac_try\"") >&5
9109   (eval $ac_try) 2>&5
9110   ac_status=$?
9111   echo "$as_me:9111: \$? = $ac_status" >&5
9112   (exit $ac_status); }; }; then
9113   am_cv_langinfo_codeset=yes
9114 else
9115   echo "$as_me: failed program was:" >&5
9116 cat conftest.$ac_ext >&5
9117 am_cv_langinfo_codeset=no
9118 fi
9119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9120
9121 fi
9122 echo "$as_me:9122: result: $am_cv_langinfo_codeset" >&5
9123 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9124   if test $am_cv_langinfo_codeset = yes; then
9125
9126 cat >>confdefs.h <<\EOF
9127 #define HAVE_LANGINFO_CODESET 1
9128 EOF
9129
9130   fi
9131
9132 # use these variables to work around a defect in gcc's fixincludes.
9133 NCURSES_OK_WCHAR_T=
9134 NCURSES_OK_WINT_T=
9135
9136 echo "$as_me:9136: checking if you want wide-character code" >&5
9137 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9138
9139 # Check whether --enable-widec or --disable-widec was given.
9140 if test "${enable_widec+set}" = set; then
9141   enableval="$enable_widec"
9142   with_widec=$enableval
9143 else
9144   with_widec=no
9145 fi;
9146 echo "$as_me:9146: result: $with_widec" >&5
9147 echo "${ECHO_T}$with_widec" >&6
9148 if test "x$with_widec" = xyes ; then
9149         if test "x$disable_lib_suffixes" = xno ; then
9150                 LIB_SUFFIX="w${LIB_SUFFIX}"
9151         fi
9152
9153 cat >>confdefs.h <<\EOF
9154 #define USE_WIDEC_SUPPORT 1
9155 EOF
9156
9157 cat >>confdefs.h <<\EOF
9158 #define NCURSES_WIDECHAR 1
9159 EOF
9160
9161 echo "$as_me:9161: checking if wchar.h can be used as is" >&5
9162 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9163 if test "${cf_cv_wchar_h_okay+set}" = set; then
9164   echo $ECHO_N "(cached) $ECHO_C" >&6
9165 else
9166
9167 cat >conftest.$ac_ext <<_ACEOF
9168 #line 9168 "configure"
9169 #include "confdefs.h"
9170
9171 #include <stdlib.h>
9172 #include <wchar.h>
9173
9174 int
9175 main ()
9176 {
9177
9178         wint_t foo = 0;
9179         int bar = iswpunct(foo)
9180   ;
9181   return 0;
9182 }
9183 _ACEOF
9184 rm -f conftest.$ac_objext
9185 if { (eval echo "$as_me:9185: \"$ac_compile\"") >&5
9186   (eval $ac_compile) 2>&5
9187   ac_status=$?
9188   echo "$as_me:9188: \$? = $ac_status" >&5
9189   (exit $ac_status); } &&
9190          { ac_try='test -s conftest.$ac_objext'
9191   { (eval echo "$as_me:9191: \"$ac_try\"") >&5
9192   (eval $ac_try) 2>&5
9193   ac_status=$?
9194   echo "$as_me:9194: \$? = $ac_status" >&5
9195   (exit $ac_status); }; }; then
9196   cf_cv_wchar_h_okay=yes
9197 else
9198   echo "$as_me: failed program was:" >&5
9199 cat conftest.$ac_ext >&5
9200 cf_cv_wchar_h_okay=no
9201 fi
9202 rm -f conftest.$ac_objext conftest.$ac_ext
9203 fi
9204 echo "$as_me:9204: result: $cf_cv_wchar_h_okay" >&5
9205 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9206
9207 if test $cf_cv_wchar_h_okay = no
9208 then
9209
9210 echo "$as_me:9210: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9211 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9212 cat >conftest.$ac_ext <<_ACEOF
9213 #line 9213 "configure"
9214 #include "confdefs.h"
9215 #include <sys/types.h>
9216
9217 int
9218 main ()
9219 {
9220
9221 #ifndef _XOPEN_SOURCE_EXTENDED
9222 make an error
9223 #endif
9224   ;
9225   return 0;
9226 }
9227 _ACEOF
9228 rm -f conftest.$ac_objext
9229 if { (eval echo "$as_me:9229: \"$ac_compile\"") >&5
9230   (eval $ac_compile) 2>&5
9231   ac_status=$?
9232   echo "$as_me:9232: \$? = $ac_status" >&5
9233   (exit $ac_status); } &&
9234          { ac_try='test -s conftest.$ac_objext'
9235   { (eval echo "$as_me:9235: \"$ac_try\"") >&5
9236   (eval $ac_try) 2>&5
9237   ac_status=$?
9238   echo "$as_me:9238: \$? = $ac_status" >&5
9239   (exit $ac_status); }; }; then
9240   cf_result=no
9241 else
9242   echo "$as_me: failed program was:" >&5
9243 cat conftest.$ac_ext >&5
9244 cf_result=yes
9245 fi
9246 rm -f conftest.$ac_objext conftest.$ac_ext
9247 echo "$as_me:9247: result: $cf_result" >&5
9248 echo "${ECHO_T}$cf_result" >&6
9249
9250 if test "$cf_result" = yes ; then
9251         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9252 elif test "x" != "x" ; then
9253         echo "$as_me:9253: checking checking for compatible value versus " >&5
9254 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9255         cat >conftest.$ac_ext <<_ACEOF
9256 #line 9256 "configure"
9257 #include "confdefs.h"
9258 #include <sys/types.h>
9259
9260 int
9261 main ()
9262 {
9263
9264 #if _XOPEN_SOURCE_EXTENDED- < 0
9265 make an error
9266 #endif
9267   ;
9268   return 0;
9269 }
9270 _ACEOF
9271 rm -f conftest.$ac_objext
9272 if { (eval echo "$as_me:9272: \"$ac_compile\"") >&5
9273   (eval $ac_compile) 2>&5
9274   ac_status=$?
9275   echo "$as_me:9275: \$? = $ac_status" >&5
9276   (exit $ac_status); } &&
9277          { ac_try='test -s conftest.$ac_objext'
9278   { (eval echo "$as_me:9278: \"$ac_try\"") >&5
9279   (eval $ac_try) 2>&5
9280   ac_status=$?
9281   echo "$as_me:9281: \$? = $ac_status" >&5
9282   (exit $ac_status); }; }; then
9283   cf_result=yes
9284 else
9285   echo "$as_me: failed program was:" >&5
9286 cat conftest.$ac_ext >&5
9287 cf_result=no
9288 fi
9289 rm -f conftest.$ac_objext conftest.$ac_ext
9290         echo "$as_me:9290: result: $cf_result" >&5
9291 echo "${ECHO_T}$cf_result" >&6
9292         if test "$cf_result" = no ; then
9293                 # perhaps we can override it - try...
9294                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9295         fi
9296 fi
9297
9298 fi
9299
9300         # with_overwrite=no
9301         NCURSES_CH_T=cchar_t
9302
9303 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9304 do
9305 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9306 echo "$as_me:9306: checking for $ac_func" >&5
9307 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9308 if eval "test \"\${$as_ac_var+set}\" = set"; then
9309   echo $ECHO_N "(cached) $ECHO_C" >&6
9310 else
9311   cat >conftest.$ac_ext <<_ACEOF
9312 #line 9312 "configure"
9313 #include "confdefs.h"
9314 /* System header to define __stub macros and hopefully few prototypes,
9315     which can conflict with char $ac_func (); below.  */
9316 #include <assert.h>
9317 /* Override any gcc2 internal prototype to avoid an error.  */
9318 #ifdef __cplusplus
9319 extern "C"
9320 #endif
9321 /* We use char because int might match the return type of a gcc2
9322    builtin and then its argument prototype would still apply.  */
9323 char $ac_func ();
9324 char (*f) ();
9325
9326 int
9327 main ()
9328 {
9329 /* The GNU C library defines this for functions which it implements
9330     to always fail with ENOSYS.  Some functions are actually named
9331     something starting with __ and the normal name is an alias.  */
9332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9333 choke me
9334 #else
9335 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9336 #endif
9337
9338   ;
9339   return 0;
9340 }
9341 _ACEOF
9342 rm -f conftest.$ac_objext conftest$ac_exeext
9343 if { (eval echo "$as_me:9343: \"$ac_link\"") >&5
9344   (eval $ac_link) 2>&5
9345   ac_status=$?
9346   echo "$as_me:9346: \$? = $ac_status" >&5
9347   (exit $ac_status); } &&
9348          { ac_try='test -s conftest$ac_exeext'
9349   { (eval echo "$as_me:9349: \"$ac_try\"") >&5
9350   (eval $ac_try) 2>&5
9351   ac_status=$?
9352   echo "$as_me:9352: \$? = $ac_status" >&5
9353   (exit $ac_status); }; }; then
9354   eval "$as_ac_var=yes"
9355 else
9356   echo "$as_me: failed program was:" >&5
9357 cat conftest.$ac_ext >&5
9358 eval "$as_ac_var=no"
9359 fi
9360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9361 fi
9362 echo "$as_me:9362: result: `eval echo '${'$as_ac_var'}'`" >&5
9363 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9364 if test `eval echo '${'$as_ac_var'}'` = yes; then
9365   cat >>confdefs.h <<EOF
9366 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9367 EOF
9368
9369 fi
9370 done
9371
9372         if test "x$ac_cv_func_putwc" != xyes ; then
9373
9374 echo "$as_me:9374: checking for multibyte character support" >&5
9375 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9376 if test "${cf_cv_utf8_lib+set}" = set; then
9377   echo $ECHO_N "(cached) $ECHO_C" >&6
9378 else
9379
9380         cf_save_LIBS="$LIBS"
9381         cat >conftest.$ac_ext <<_ACEOF
9382 #line 9382 "configure"
9383 #include "confdefs.h"
9384
9385 #include <stdlib.h>
9386 int
9387 main ()
9388 {
9389 putwc(0,0);
9390   ;
9391   return 0;
9392 }
9393 _ACEOF
9394 rm -f conftest.$ac_objext conftest$ac_exeext
9395 if { (eval echo "$as_me:9395: \"$ac_link\"") >&5
9396   (eval $ac_link) 2>&5
9397   ac_status=$?
9398   echo "$as_me:9398: \$? = $ac_status" >&5
9399   (exit $ac_status); } &&
9400          { ac_try='test -s conftest$ac_exeext'
9401   { (eval echo "$as_me:9401: \"$ac_try\"") >&5
9402   (eval $ac_try) 2>&5
9403   ac_status=$?
9404   echo "$as_me:9404: \$? = $ac_status" >&5
9405   (exit $ac_status); }; }; then
9406   cf_cv_utf8_lib=yes
9407 else
9408   echo "$as_me: failed program was:" >&5
9409 cat conftest.$ac_ext >&5
9410
9411 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9412 # will be set on completion of the AC_TRY_LINK below.
9413 cf_cv_header_path_utf8=
9414 cf_cv_library_path_utf8=
9415
9416 echo "${as_me:-configure}:9416: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9417
9418 cf_save_LIBS="$LIBS"
9419
9420 cat >conftest.$ac_ext <<_ACEOF
9421 #line 9421 "configure"
9422 #include "confdefs.h"
9423
9424 #include <libutf8.h>
9425 int
9426 main ()
9427 {
9428 putwc(0,0);
9429   ;
9430   return 0;
9431 }
9432 _ACEOF
9433 rm -f conftest.$ac_objext conftest$ac_exeext
9434 if { (eval echo "$as_me:9434: \"$ac_link\"") >&5
9435   (eval $ac_link) 2>&5
9436   ac_status=$?
9437   echo "$as_me:9437: \$? = $ac_status" >&5
9438   (exit $ac_status); } &&
9439          { ac_try='test -s conftest$ac_exeext'
9440   { (eval echo "$as_me:9440: \"$ac_try\"") >&5
9441   (eval $ac_try) 2>&5
9442   ac_status=$?
9443   echo "$as_me:9443: \$? = $ac_status" >&5
9444   (exit $ac_status); }; }; then
9445
9446         cf_cv_find_linkage_utf8=yes
9447         cf_cv_header_path_utf8=/usr/include
9448         cf_cv_library_path_utf8=/usr/lib
9449
9450 else
9451   echo "$as_me: failed program was:" >&5
9452 cat conftest.$ac_ext >&5
9453
9454 LIBS="-lutf8  $cf_save_LIBS"
9455
9456 cat >conftest.$ac_ext <<_ACEOF
9457 #line 9457 "configure"
9458 #include "confdefs.h"
9459
9460 #include <libutf8.h>
9461 int
9462 main ()
9463 {
9464 putwc(0,0);
9465   ;
9466   return 0;
9467 }
9468 _ACEOF
9469 rm -f conftest.$ac_objext conftest$ac_exeext
9470 if { (eval echo "$as_me:9470: \"$ac_link\"") >&5
9471   (eval $ac_link) 2>&5
9472   ac_status=$?
9473   echo "$as_me:9473: \$? = $ac_status" >&5
9474   (exit $ac_status); } &&
9475          { ac_try='test -s conftest$ac_exeext'
9476   { (eval echo "$as_me:9476: \"$ac_try\"") >&5
9477   (eval $ac_try) 2>&5
9478   ac_status=$?
9479   echo "$as_me:9479: \$? = $ac_status" >&5
9480   (exit $ac_status); }; }; then
9481
9482         cf_cv_find_linkage_utf8=yes
9483         cf_cv_header_path_utf8=/usr/include
9484         cf_cv_library_path_utf8=/usr/lib
9485         cf_cv_library_file_utf8="-lutf8"
9486
9487 else
9488   echo "$as_me: failed program was:" >&5
9489 cat conftest.$ac_ext >&5
9490
9491         cf_cv_find_linkage_utf8=no
9492         LIBS="$cf_save_LIBS"
9493
9494     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9495
9496 echo "${as_me:-configure}:9496: testing find linkage for utf8 library ..." 1>&5
9497
9498 echo "${as_me:-configure}:9498: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9499
9500     cf_save_CPPFLAGS="$CPPFLAGS"
9501     cf_test_CPPFLAGS="$CPPFLAGS"
9502
9503 cf_search=
9504
9505 # collect the current set of include-directories from compiler flags
9506 cf_header_path_list=""
9507 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9508         for cf_header_path in $CPPFLAGS $CFLAGS
9509         do
9510                 case $cf_header_path in #(vi
9511                 -I*)
9512                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9513
9514 test "x$cf_header_path" != "xNONE" && \
9515 test -d "$cf_header_path" && \
9516  {
9517         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9518         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9519         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9520         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9521         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9522         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9523 }
9524
9525                         cf_header_path_list="$cf_header_path_list $cf_search"
9526                         ;;
9527                 esac
9528         done
9529 fi
9530
9531 # add the variations for the package we are looking for
9532
9533 cf_search=
9534
9535 test "x$prefix" != "xNONE" && \
9536 test -d "$prefix" && \
9537  {
9538         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9539         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9540         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9541         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9542         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9543         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9544 }
9545
9546 for cf_subdir_prefix in \
9547         /usr \
9548         /usr/local \
9549         /usr/pkg \
9550         /opt \
9551         /opt/local \
9552         $HOME
9553 do
9554
9555 test "x$cf_subdir_prefix" != "x$prefix" && \
9556 test -d "$cf_subdir_prefix" && \
9557 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9558         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9559         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9560         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9561         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9562         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9563         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9564 }
9565
9566 done
9567
9568 test "$includedir" != NONE && \
9569 test "$includedir" != "/usr/include" && \
9570 test -d "$includedir" && {
9571         test -d $includedir &&    cf_search="$cf_search $includedir"
9572         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9573 }
9574
9575 test "$oldincludedir" != NONE && \
9576 test "$oldincludedir" != "/usr/include" && \
9577 test -d "$oldincludedir" && {
9578         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9579         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9580 }
9581
9582 cf_search="$cf_search $cf_header_path_list"
9583
9584     for cf_cv_header_path_utf8 in $cf_search
9585     do
9586       if test -d $cf_cv_header_path_utf8 ; then
9587         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9588
9589 echo "${as_me:-configure}:9589: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9590
9591         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9592         cat >conftest.$ac_ext <<_ACEOF
9593 #line 9593 "configure"
9594 #include "confdefs.h"
9595
9596 #include <libutf8.h>
9597 int
9598 main ()
9599 {
9600 putwc(0,0);
9601   ;
9602   return 0;
9603 }
9604 _ACEOF
9605 rm -f conftest.$ac_objext
9606 if { (eval echo "$as_me:9606: \"$ac_compile\"") >&5
9607   (eval $ac_compile) 2>&5
9608   ac_status=$?
9609   echo "$as_me:9609: \$? = $ac_status" >&5
9610   (exit $ac_status); } &&
9611          { ac_try='test -s conftest.$ac_objext'
9612   { (eval echo "$as_me:9612: \"$ac_try\"") >&5
9613   (eval $ac_try) 2>&5
9614   ac_status=$?
9615   echo "$as_me:9615: \$? = $ac_status" >&5
9616   (exit $ac_status); }; }; then
9617
9618             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9619
9620 echo "${as_me:-configure}:9620: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9621
9622             cf_cv_find_linkage_utf8=maybe
9623             cf_test_CPPFLAGS="$CPPFLAGS"
9624             break
9625 else
9626   echo "$as_me: failed program was:" >&5
9627 cat conftest.$ac_ext >&5
9628
9629             CPPFLAGS="$cf_save_CPPFLAGS"
9630
9631 fi
9632 rm -f conftest.$ac_objext conftest.$ac_ext
9633       fi
9634     done
9635
9636     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9637
9638 echo "${as_me:-configure}:9638: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9639
9640       cf_save_LIBS="$LIBS"
9641       cf_save_LDFLAGS="$LDFLAGS"
9642
9643       if test "$cf_cv_find_linkage_utf8" != yes ; then
9644
9645 cf_search=
9646 cf_library_path_list=""
9647 if test -n "${LDFLAGS}${LIBS}" ; then
9648         for cf_library_path in $LDFLAGS $LIBS
9649         do
9650                 case $cf_library_path in #(vi
9651                 -L*)
9652                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9653
9654 test "x$cf_library_path" != "xNONE" && \
9655 test -d "$cf_library_path" && \
9656  {
9657         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9658         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9659         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9660         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9661         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9662         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9663 }
9664
9665                         cf_library_path_list="$cf_library_path_list $cf_search"
9666                         ;;
9667                 esac
9668         done
9669 fi
9670
9671 cf_search=
9672
9673 test "x$prefix" != "xNONE" && \
9674 test -d "$prefix" && \
9675  {
9676         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9677         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9678         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9679         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9680         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9681         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9682 }
9683
9684 for cf_subdir_prefix in \
9685         /usr \
9686         /usr/local \
9687         /usr/pkg \
9688         /opt \
9689         /opt/local \
9690         $HOME
9691 do
9692
9693 test "x$cf_subdir_prefix" != "x$prefix" && \
9694 test -d "$cf_subdir_prefix" && \
9695 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9696         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9697         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9698         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9699         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9700         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9701         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9702 }
9703
9704 done
9705
9706 cf_search="$cf_library_path_list $cf_search"
9707
9708         for cf_cv_library_path_utf8 in $cf_search
9709         do
9710           if test -d $cf_cv_library_path_utf8 ; then
9711             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9712
9713 echo "${as_me:-configure}:9713: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9714
9715             CPPFLAGS="$cf_test_CPPFLAGS"
9716             LIBS="-lutf8  $cf_save_LIBS"
9717             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9718             cat >conftest.$ac_ext <<_ACEOF
9719 #line 9719 "configure"
9720 #include "confdefs.h"
9721
9722 #include <libutf8.h>
9723 int
9724 main ()
9725 {
9726 putwc(0,0);
9727   ;
9728   return 0;
9729 }
9730 _ACEOF
9731 rm -f conftest.$ac_objext conftest$ac_exeext
9732 if { (eval echo "$as_me:9732: \"$ac_link\"") >&5
9733   (eval $ac_link) 2>&5
9734   ac_status=$?
9735   echo "$as_me:9735: \$? = $ac_status" >&5
9736   (exit $ac_status); } &&
9737          { ac_try='test -s conftest$ac_exeext'
9738   { (eval echo "$as_me:9738: \"$ac_try\"") >&5
9739   (eval $ac_try) 2>&5
9740   ac_status=$?
9741   echo "$as_me:9741: \$? = $ac_status" >&5
9742   (exit $ac_status); }; }; then
9743
9744                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9745
9746 echo "${as_me:-configure}:9746: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9747
9748                 cf_cv_find_linkage_utf8=yes
9749                 cf_cv_library_file_utf8="-lutf8"
9750                 break
9751 else
9752   echo "$as_me: failed program was:" >&5
9753 cat conftest.$ac_ext >&5
9754
9755                 CPPFLAGS="$cf_save_CPPFLAGS"
9756                 LIBS="$cf_save_LIBS"
9757                 LDFLAGS="$cf_save_LDFLAGS"
9758
9759 fi
9760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9761           fi
9762         done
9763         CPPFLAGS="$cf_save_CPPFLAGS"
9764         LDFLAGS="$cf_save_LDFLAGS"
9765       fi
9766
9767     else
9768       cf_cv_find_linkage_utf8=no
9769     fi
9770
9771 fi
9772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9773
9774 fi
9775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9776
9777 LIBS="$cf_save_LIBS"
9778
9779 if test "$cf_cv_find_linkage_utf8" = yes ; then
9780 cf_cv_utf8_lib=add-on
9781 else
9782 cf_cv_utf8_lib=no
9783 fi
9784
9785 fi
9786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9787 fi
9788 echo "$as_me:9788: result: $cf_cv_utf8_lib" >&5
9789 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9790
9791 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9792 # ncurses/ncursesw:
9793 if test "$cf_cv_utf8_lib" = "add-on" ; then
9794
9795 cat >>confdefs.h <<\EOF
9796 #define HAVE_LIBUTF8_H 1
9797 EOF
9798
9799 if test -n "$cf_cv_header_path_utf8" ; then
9800   for cf_add_incdir in $cf_cv_header_path_utf8
9801   do
9802         while test $cf_add_incdir != /usr/include
9803         do
9804           if test -d $cf_add_incdir
9805           then
9806                 cf_have_incdir=no
9807                 if test -n "$CFLAGS$CPPFLAGS" ; then
9808                   # a loop is needed to ensure we can add subdirs of existing dirs
9809                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9810                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9811                           cf_have_incdir=yes; break
9812                         fi
9813                   done
9814                 fi
9815
9816                 if test "$cf_have_incdir" = no ; then
9817                   if test "$cf_add_incdir" = /usr/local/include ; then
9818                         if test "$GCC" = yes
9819                         then
9820                           cf_save_CPPFLAGS=$CPPFLAGS
9821                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9822                           cat >conftest.$ac_ext <<_ACEOF
9823 #line 9823 "configure"
9824 #include "confdefs.h"
9825 #include <stdio.h>
9826 int
9827 main ()
9828 {
9829 printf("Hello")
9830   ;
9831   return 0;
9832 }
9833 _ACEOF
9834 rm -f conftest.$ac_objext
9835 if { (eval echo "$as_me:9835: \"$ac_compile\"") >&5
9836   (eval $ac_compile) 2>&5
9837   ac_status=$?
9838   echo "$as_me:9838: \$? = $ac_status" >&5
9839   (exit $ac_status); } &&
9840          { ac_try='test -s conftest.$ac_objext'
9841   { (eval echo "$as_me:9841: \"$ac_try\"") >&5
9842   (eval $ac_try) 2>&5
9843   ac_status=$?
9844   echo "$as_me:9844: \$? = $ac_status" >&5
9845   (exit $ac_status); }; }; then
9846   :
9847 else
9848   echo "$as_me: failed program was:" >&5
9849 cat conftest.$ac_ext >&5
9850 cf_have_incdir=yes
9851 fi
9852 rm -f conftest.$ac_objext conftest.$ac_ext
9853                           CPPFLAGS=$cf_save_CPPFLAGS
9854                         fi
9855                   fi
9856                 fi
9857
9858                 if test "$cf_have_incdir" = no ; then
9859                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9860
9861 echo "${as_me:-configure}:9861: testing adding $cf_add_incdir to include-path ..." 1>&5
9862
9863                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9864
9865                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9866                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9867                   cf_add_incdir="$cf_top_incdir"
9868                 else
9869                   break
9870                 fi
9871           fi
9872         done
9873   done
9874 fi
9875
9876 if test -n "$cf_cv_library_path_utf8" ; then
9877   for cf_add_libdir in $cf_cv_library_path_utf8
9878   do
9879     if test $cf_add_libdir = /usr/lib ; then
9880       :
9881     elif test -d $cf_add_libdir
9882     then
9883       cf_have_libdir=no
9884       if test -n "$LDFLAGS$LIBS" ; then
9885         # a loop is needed to ensure we can add subdirs of existing dirs
9886         for cf_test_libdir in $LDFLAGS $LIBS ; do
9887           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9888             cf_have_libdir=yes; break
9889           fi
9890         done
9891       fi
9892       if test "$cf_have_libdir" = no ; then
9893         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9894
9895 echo "${as_me:-configure}:9895: testing adding $cf_add_libdir to library-path ..." 1>&5
9896
9897         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9898       fi
9899     fi
9900   done
9901 fi
9902
9903 cf_add_libs="$cf_cv_library_file_utf8"
9904 # Filter out duplicates - this happens with badly-designed ".pc" files...
9905 for cf_add_1lib in $LIBS
9906 do
9907         for cf_add_2lib in $cf_add_libs
9908         do
9909                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9910                 then
9911                         cf_add_1lib=
9912                         break
9913                 fi
9914         done
9915         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9916 done
9917 LIBS="$cf_add_libs"
9918
9919 fi
9920
9921                 if test "$cf_cv_utf8_lib" != no ; then
9922                         NCURSES_LIBUTF8=1
9923                 fi
9924         fi
9925
9926 # This is needed on Tru64 5.0 to declare mbstate_t
9927 echo "$as_me:9927: checking if we must include wchar.h to declare mbstate_t" >&5
9928 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9929 if test "${cf_cv_mbstate_t+set}" = set; then
9930   echo $ECHO_N "(cached) $ECHO_C" >&6
9931 else
9932
9933 cat >conftest.$ac_ext <<_ACEOF
9934 #line 9934 "configure"
9935 #include "confdefs.h"
9936
9937 #include <stdlib.h>
9938 #include <stdarg.h>
9939 #include <stdio.h>
9940 #ifdef HAVE_LIBUTF8_H
9941 #include <libutf8.h>
9942 #endif
9943 int
9944 main ()
9945 {
9946 mbstate_t state
9947   ;
9948   return 0;
9949 }
9950 _ACEOF
9951 rm -f conftest.$ac_objext
9952 if { (eval echo "$as_me:9952: \"$ac_compile\"") >&5
9953   (eval $ac_compile) 2>&5
9954   ac_status=$?
9955   echo "$as_me:9955: \$? = $ac_status" >&5
9956   (exit $ac_status); } &&
9957          { ac_try='test -s conftest.$ac_objext'
9958   { (eval echo "$as_me:9958: \"$ac_try\"") >&5
9959   (eval $ac_try) 2>&5
9960   ac_status=$?
9961   echo "$as_me:9961: \$? = $ac_status" >&5
9962   (exit $ac_status); }; }; then
9963   cf_cv_mbstate_t=no
9964 else
9965   echo "$as_me: failed program was:" >&5
9966 cat conftest.$ac_ext >&5
9967 cat >conftest.$ac_ext <<_ACEOF
9968 #line 9968 "configure"
9969 #include "confdefs.h"
9970
9971 #include <stdlib.h>
9972 #include <stdarg.h>
9973 #include <stdio.h>
9974 #include <wchar.h>
9975 #ifdef HAVE_LIBUTF8_H
9976 #include <libutf8.h>
9977 #endif
9978 int
9979 main ()
9980 {
9981 mbstate_t value
9982   ;
9983   return 0;
9984 }
9985 _ACEOF
9986 rm -f conftest.$ac_objext
9987 if { (eval echo "$as_me:9987: \"$ac_compile\"") >&5
9988   (eval $ac_compile) 2>&5
9989   ac_status=$?
9990   echo "$as_me:9990: \$? = $ac_status" >&5
9991   (exit $ac_status); } &&
9992          { ac_try='test -s conftest.$ac_objext'
9993   { (eval echo "$as_me:9993: \"$ac_try\"") >&5
9994   (eval $ac_try) 2>&5
9995   ac_status=$?
9996   echo "$as_me:9996: \$? = $ac_status" >&5
9997   (exit $ac_status); }; }; then
9998   cf_cv_mbstate_t=yes
9999 else
10000   echo "$as_me: failed program was:" >&5
10001 cat conftest.$ac_ext >&5
10002 cf_cv_mbstate_t=unknown
10003 fi
10004 rm -f conftest.$ac_objext conftest.$ac_ext
10005 fi
10006 rm -f conftest.$ac_objext conftest.$ac_ext
10007 fi
10008 echo "$as_me:10008: result: $cf_cv_mbstate_t" >&5
10009 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10010
10011 if test "$cf_cv_mbstate_t" = yes ; then
10012
10013 cat >>confdefs.h <<\EOF
10014 #define NEED_WCHAR_H 1
10015 EOF
10016
10017         NEED_WCHAR_H=1
10018 fi
10019
10020 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10021 if test "$cf_cv_mbstate_t" = unknown ; then
10022         NCURSES_MBSTATE_T=1
10023 fi
10024
10025 # This is needed on Tru64 5.0 to declare wchar_t
10026 echo "$as_me:10026: checking if we must include wchar.h to declare wchar_t" >&5
10027 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10028 if test "${cf_cv_wchar_t+set}" = set; then
10029   echo $ECHO_N "(cached) $ECHO_C" >&6
10030 else
10031
10032 cat >conftest.$ac_ext <<_ACEOF
10033 #line 10033 "configure"
10034 #include "confdefs.h"
10035
10036 #include <stdlib.h>
10037 #include <stdarg.h>
10038 #include <stdio.h>
10039 #ifdef HAVE_LIBUTF8_H
10040 #include <libutf8.h>
10041 #endif
10042 int
10043 main ()
10044 {
10045 wchar_t state
10046   ;
10047   return 0;
10048 }
10049 _ACEOF
10050 rm -f conftest.$ac_objext
10051 if { (eval echo "$as_me:10051: \"$ac_compile\"") >&5
10052   (eval $ac_compile) 2>&5
10053   ac_status=$?
10054   echo "$as_me:10054: \$? = $ac_status" >&5
10055   (exit $ac_status); } &&
10056          { ac_try='test -s conftest.$ac_objext'
10057   { (eval echo "$as_me:10057: \"$ac_try\"") >&5
10058   (eval $ac_try) 2>&5
10059   ac_status=$?
10060   echo "$as_me:10060: \$? = $ac_status" >&5
10061   (exit $ac_status); }; }; then
10062   cf_cv_wchar_t=no
10063 else
10064   echo "$as_me: failed program was:" >&5
10065 cat conftest.$ac_ext >&5
10066 cat >conftest.$ac_ext <<_ACEOF
10067 #line 10067 "configure"
10068 #include "confdefs.h"
10069
10070 #include <stdlib.h>
10071 #include <stdarg.h>
10072 #include <stdio.h>
10073 #include <wchar.h>
10074 #ifdef HAVE_LIBUTF8_H
10075 #include <libutf8.h>
10076 #endif
10077 int
10078 main ()
10079 {
10080 wchar_t value
10081   ;
10082   return 0;
10083 }
10084 _ACEOF
10085 rm -f conftest.$ac_objext
10086 if { (eval echo "$as_me:10086: \"$ac_compile\"") >&5
10087   (eval $ac_compile) 2>&5
10088   ac_status=$?
10089   echo "$as_me:10089: \$? = $ac_status" >&5
10090   (exit $ac_status); } &&
10091          { ac_try='test -s conftest.$ac_objext'
10092   { (eval echo "$as_me:10092: \"$ac_try\"") >&5
10093   (eval $ac_try) 2>&5
10094   ac_status=$?
10095   echo "$as_me:10095: \$? = $ac_status" >&5
10096   (exit $ac_status); }; }; then
10097   cf_cv_wchar_t=yes
10098 else
10099   echo "$as_me: failed program was:" >&5
10100 cat conftest.$ac_ext >&5
10101 cf_cv_wchar_t=unknown
10102 fi
10103 rm -f conftest.$ac_objext conftest.$ac_ext
10104 fi
10105 rm -f conftest.$ac_objext conftest.$ac_ext
10106 fi
10107 echo "$as_me:10107: result: $cf_cv_wchar_t" >&5
10108 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10109
10110 if test "$cf_cv_wchar_t" = yes ; then
10111
10112 cat >>confdefs.h <<\EOF
10113 #define NEED_WCHAR_H 1
10114 EOF
10115
10116         NEED_WCHAR_H=1
10117 fi
10118
10119 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10120 if test "$cf_cv_wchar_t" = unknown ; then
10121         NCURSES_WCHAR_T=1
10122 fi
10123
10124 # if we find wchar_t in either place, use substitution to provide a fallback.
10125 if test "$cf_cv_wchar_t" != unknown ; then
10126         NCURSES_OK_WCHAR_T=1
10127 fi
10128
10129 # This is needed on Tru64 5.0 to declare wint_t
10130 echo "$as_me:10130: checking if we must include wchar.h to declare wint_t" >&5
10131 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10132 if test "${cf_cv_wint_t+set}" = set; then
10133   echo $ECHO_N "(cached) $ECHO_C" >&6
10134 else
10135
10136 cat >conftest.$ac_ext <<_ACEOF
10137 #line 10137 "configure"
10138 #include "confdefs.h"
10139
10140 #include <stdlib.h>
10141 #include <stdarg.h>
10142 #include <stdio.h>
10143 #ifdef HAVE_LIBUTF8_H
10144 #include <libutf8.h>
10145 #endif
10146 int
10147 main ()
10148 {
10149 wint_t state
10150   ;
10151   return 0;
10152 }
10153 _ACEOF
10154 rm -f conftest.$ac_objext
10155 if { (eval echo "$as_me:10155: \"$ac_compile\"") >&5
10156   (eval $ac_compile) 2>&5
10157   ac_status=$?
10158   echo "$as_me:10158: \$? = $ac_status" >&5
10159   (exit $ac_status); } &&
10160          { ac_try='test -s conftest.$ac_objext'
10161   { (eval echo "$as_me:10161: \"$ac_try\"") >&5
10162   (eval $ac_try) 2>&5
10163   ac_status=$?
10164   echo "$as_me:10164: \$? = $ac_status" >&5
10165   (exit $ac_status); }; }; then
10166   cf_cv_wint_t=no
10167 else
10168   echo "$as_me: failed program was:" >&5
10169 cat conftest.$ac_ext >&5
10170 cat >conftest.$ac_ext <<_ACEOF
10171 #line 10171 "configure"
10172 #include "confdefs.h"
10173
10174 #include <stdlib.h>
10175 #include <stdarg.h>
10176 #include <stdio.h>
10177 #include <wchar.h>
10178 #ifdef HAVE_LIBUTF8_H
10179 #include <libutf8.h>
10180 #endif
10181 int
10182 main ()
10183 {
10184 wint_t value
10185   ;
10186   return 0;
10187 }
10188 _ACEOF
10189 rm -f conftest.$ac_objext
10190 if { (eval echo "$as_me:10190: \"$ac_compile\"") >&5
10191   (eval $ac_compile) 2>&5
10192   ac_status=$?
10193   echo "$as_me:10193: \$? = $ac_status" >&5
10194   (exit $ac_status); } &&
10195          { ac_try='test -s conftest.$ac_objext'
10196   { (eval echo "$as_me:10196: \"$ac_try\"") >&5
10197   (eval $ac_try) 2>&5
10198   ac_status=$?
10199   echo "$as_me:10199: \$? = $ac_status" >&5
10200   (exit $ac_status); }; }; then
10201   cf_cv_wint_t=yes
10202 else
10203   echo "$as_me: failed program was:" >&5
10204 cat conftest.$ac_ext >&5
10205 cf_cv_wint_t=unknown
10206 fi
10207 rm -f conftest.$ac_objext conftest.$ac_ext
10208 fi
10209 rm -f conftest.$ac_objext conftest.$ac_ext
10210 fi
10211 echo "$as_me:10211: result: $cf_cv_wint_t" >&5
10212 echo "${ECHO_T}$cf_cv_wint_t" >&6
10213
10214 if test "$cf_cv_wint_t" = yes ; then
10215
10216 cat >>confdefs.h <<\EOF
10217 #define NEED_WCHAR_H 1
10218 EOF
10219
10220         NEED_WCHAR_H=1
10221 fi
10222
10223 # if we do not find wint_t in either place, use substitution to provide a fallback.
10224 if test "$cf_cv_wint_t" = unknown ; then
10225         NCURSES_WINT_T=1
10226 fi
10227
10228 # if we find wint_t in either place, use substitution to provide a fallback.
10229 if test "$cf_cv_wint_t" != unknown ; then
10230         NCURSES_OK_WINT_T=1
10231 fi
10232
10233         if test "$NCURSES_MBSTATE_T" != 0; then
10234
10235 cat >>confdefs.h <<\EOF
10236 #define NEED_MBSTATE_T_DEF 1
10237 EOF
10238
10239         fi
10240 fi
10241
10242 ###   use option --disable-lp64 to allow long chtype
10243 case $cf_cv_abi_version in
10244 [345]*)
10245         default_with_lp64=no
10246         ;;
10247 *)
10248         default_with_lp64=yes
10249         ;;
10250 esac
10251
10252 echo "$as_me:10252: checking whether to enable _LP64 definition in curses.h" >&5
10253 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10254
10255 # Check whether --enable-lp64 or --disable-lp64 was given.
10256 if test "${enable_lp64+set}" = set; then
10257   enableval="$enable_lp64"
10258   with_lp64=$enableval
10259 else
10260   with_lp64=$default_with_lp64
10261 fi;
10262 echo "$as_me:10262: result: $with_lp64" >&5
10263 echo "${ECHO_T}$with_lp64" >&6
10264
10265 if test "x$with_lp64" = xyes ; then
10266         cf_cv_enable_lp64=1
10267 else
10268         cf_cv_enable_lp64=0
10269 fi
10270
10271 # Check whether --enable-largefile or --disable-largefile was given.
10272 if test "${enable_largefile+set}" = set; then
10273   enableval="$enable_largefile"
10274
10275 fi;
10276 if test "$enable_largefile" != no; then
10277
10278   echo "$as_me:10278: checking for special C compiler options needed for large files" >&5
10279 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10280 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10281   echo $ECHO_N "(cached) $ECHO_C" >&6
10282 else
10283   ac_cv_sys_largefile_CC=no
10284      if test "$GCC" != yes; then
10285        ac_save_CC=$CC
10286        while :; do
10287          # IRIX 6.2 and later do not support large files by default,
10288          # so use the C compiler's -n32 option if that helps.
10289          cat >conftest.$ac_ext <<_ACEOF
10290 #line 10290 "configure"
10291 #include "confdefs.h"
10292 #include <sys/types.h>
10293  /* Check that off_t can represent 2**63 - 1 correctly.
10294     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10295     since some C++ compilers masquerading as C compilers
10296     incorrectly reject 9223372036854775807.  */
10297 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10298   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10299                        && LARGE_OFF_T % 2147483647 == 1)
10300                       ? 1 : -1];
10301 int
10302 main ()
10303 {
10304
10305   ;
10306   return 0;
10307 }
10308 _ACEOF
10309          rm -f conftest.$ac_objext
10310 if { (eval echo "$as_me:10310: \"$ac_compile\"") >&5
10311   (eval $ac_compile) 2>&5
10312   ac_status=$?
10313   echo "$as_me:10313: \$? = $ac_status" >&5
10314   (exit $ac_status); } &&
10315          { ac_try='test -s conftest.$ac_objext'
10316   { (eval echo "$as_me:10316: \"$ac_try\"") >&5
10317   (eval $ac_try) 2>&5
10318   ac_status=$?
10319   echo "$as_me:10319: \$? = $ac_status" >&5
10320   (exit $ac_status); }; }; then
10321   break
10322 else
10323   echo "$as_me: failed program was:" >&5
10324 cat conftest.$ac_ext >&5
10325 fi
10326 rm -f conftest.$ac_objext
10327          CC="$CC -n32"
10328          rm -f conftest.$ac_objext
10329 if { (eval echo "$as_me:10329: \"$ac_compile\"") >&5
10330   (eval $ac_compile) 2>&5
10331   ac_status=$?
10332   echo "$as_me:10332: \$? = $ac_status" >&5
10333   (exit $ac_status); } &&
10334          { ac_try='test -s conftest.$ac_objext'
10335   { (eval echo "$as_me:10335: \"$ac_try\"") >&5
10336   (eval $ac_try) 2>&5
10337   ac_status=$?
10338   echo "$as_me:10338: \$? = $ac_status" >&5
10339   (exit $ac_status); }; }; then
10340   ac_cv_sys_largefile_CC=' -n32'; break
10341 else
10342   echo "$as_me: failed program was:" >&5
10343 cat conftest.$ac_ext >&5
10344 fi
10345 rm -f conftest.$ac_objext
10346          break
10347        done
10348        CC=$ac_save_CC
10349        rm -f conftest.$ac_ext
10350     fi
10351 fi
10352 echo "$as_me:10352: result: $ac_cv_sys_largefile_CC" >&5
10353 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10354   if test "$ac_cv_sys_largefile_CC" != no; then
10355     CC=$CC$ac_cv_sys_largefile_CC
10356   fi
10357
10358   echo "$as_me:10358: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10359 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10360 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10361   echo $ECHO_N "(cached) $ECHO_C" >&6
10362 else
10363   while :; do
10364   ac_cv_sys_file_offset_bits=no
10365   cat >conftest.$ac_ext <<_ACEOF
10366 #line 10366 "configure"
10367 #include "confdefs.h"
10368 #include <sys/types.h>
10369  /* Check that off_t can represent 2**63 - 1 correctly.
10370     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10371     since some C++ compilers masquerading as C compilers
10372     incorrectly reject 9223372036854775807.  */
10373 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10374   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10375                        && LARGE_OFF_T % 2147483647 == 1)
10376                       ? 1 : -1];
10377 int
10378 main ()
10379 {
10380
10381   ;
10382   return 0;
10383 }
10384 _ACEOF
10385 rm -f conftest.$ac_objext
10386 if { (eval echo "$as_me:10386: \"$ac_compile\"") >&5
10387   (eval $ac_compile) 2>&5
10388   ac_status=$?
10389   echo "$as_me:10389: \$? = $ac_status" >&5
10390   (exit $ac_status); } &&
10391          { ac_try='test -s conftest.$ac_objext'
10392   { (eval echo "$as_me:10392: \"$ac_try\"") >&5
10393   (eval $ac_try) 2>&5
10394   ac_status=$?
10395   echo "$as_me:10395: \$? = $ac_status" >&5
10396   (exit $ac_status); }; }; then
10397   break
10398 else
10399   echo "$as_me: failed program was:" >&5
10400 cat conftest.$ac_ext >&5
10401 fi
10402 rm -f conftest.$ac_objext conftest.$ac_ext
10403   cat >conftest.$ac_ext <<_ACEOF
10404 #line 10404 "configure"
10405 #include "confdefs.h"
10406 #define _FILE_OFFSET_BITS 64
10407 #include <sys/types.h>
10408  /* Check that off_t can represent 2**63 - 1 correctly.
10409     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10410     since some C++ compilers masquerading as C compilers
10411     incorrectly reject 9223372036854775807.  */
10412 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10413   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10414                        && LARGE_OFF_T % 2147483647 == 1)
10415                       ? 1 : -1];
10416 int
10417 main ()
10418 {
10419
10420   ;
10421   return 0;
10422 }
10423 _ACEOF
10424 rm -f conftest.$ac_objext
10425 if { (eval echo "$as_me:10425: \"$ac_compile\"") >&5
10426   (eval $ac_compile) 2>&5
10427   ac_status=$?
10428   echo "$as_me:10428: \$? = $ac_status" >&5
10429   (exit $ac_status); } &&
10430          { ac_try='test -s conftest.$ac_objext'
10431   { (eval echo "$as_me:10431: \"$ac_try\"") >&5
10432   (eval $ac_try) 2>&5
10433   ac_status=$?
10434   echo "$as_me:10434: \$? = $ac_status" >&5
10435   (exit $ac_status); }; }; then
10436   ac_cv_sys_file_offset_bits=64; break
10437 else
10438   echo "$as_me: failed program was:" >&5
10439 cat conftest.$ac_ext >&5
10440 fi
10441 rm -f conftest.$ac_objext conftest.$ac_ext
10442   break
10443 done
10444 fi
10445 echo "$as_me:10445: result: $ac_cv_sys_file_offset_bits" >&5
10446 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10447 if test "$ac_cv_sys_file_offset_bits" != no; then
10448
10449 cat >>confdefs.h <<EOF
10450 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10451 EOF
10452
10453 fi
10454 rm -rf conftest*
10455   echo "$as_me:10455: checking for _LARGE_FILES value needed for large files" >&5
10456 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10457 if test "${ac_cv_sys_large_files+set}" = set; then
10458   echo $ECHO_N "(cached) $ECHO_C" >&6
10459 else
10460   while :; do
10461   ac_cv_sys_large_files=no
10462   cat >conftest.$ac_ext <<_ACEOF
10463 #line 10463 "configure"
10464 #include "confdefs.h"
10465 #include <sys/types.h>
10466  /* Check that off_t can represent 2**63 - 1 correctly.
10467     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10468     since some C++ compilers masquerading as C compilers
10469     incorrectly reject 9223372036854775807.  */
10470 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10471   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10472                        && LARGE_OFF_T % 2147483647 == 1)
10473                       ? 1 : -1];
10474 int
10475 main ()
10476 {
10477
10478   ;
10479   return 0;
10480 }
10481 _ACEOF
10482 rm -f conftest.$ac_objext
10483 if { (eval echo "$as_me:10483: \"$ac_compile\"") >&5
10484   (eval $ac_compile) 2>&5
10485   ac_status=$?
10486   echo "$as_me:10486: \$? = $ac_status" >&5
10487   (exit $ac_status); } &&
10488          { ac_try='test -s conftest.$ac_objext'
10489   { (eval echo "$as_me:10489: \"$ac_try\"") >&5
10490   (eval $ac_try) 2>&5
10491   ac_status=$?
10492   echo "$as_me:10492: \$? = $ac_status" >&5
10493   (exit $ac_status); }; }; then
10494   break
10495 else
10496   echo "$as_me: failed program was:" >&5
10497 cat conftest.$ac_ext >&5
10498 fi
10499 rm -f conftest.$ac_objext conftest.$ac_ext
10500   cat >conftest.$ac_ext <<_ACEOF
10501 #line 10501 "configure"
10502 #include "confdefs.h"
10503 #define _LARGE_FILES 1
10504 #include <sys/types.h>
10505  /* Check that off_t can represent 2**63 - 1 correctly.
10506     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10507     since some C++ compilers masquerading as C compilers
10508     incorrectly reject 9223372036854775807.  */
10509 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10510   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10511                        && LARGE_OFF_T % 2147483647 == 1)
10512                       ? 1 : -1];
10513 int
10514 main ()
10515 {
10516
10517   ;
10518   return 0;
10519 }
10520 _ACEOF
10521 rm -f conftest.$ac_objext
10522 if { (eval echo "$as_me:10522: \"$ac_compile\"") >&5
10523   (eval $ac_compile) 2>&5
10524   ac_status=$?
10525   echo "$as_me:10525: \$? = $ac_status" >&5
10526   (exit $ac_status); } &&
10527          { ac_try='test -s conftest.$ac_objext'
10528   { (eval echo "$as_me:10528: \"$ac_try\"") >&5
10529   (eval $ac_try) 2>&5
10530   ac_status=$?
10531   echo "$as_me:10531: \$? = $ac_status" >&5
10532   (exit $ac_status); }; }; then
10533   ac_cv_sys_large_files=1; break
10534 else
10535   echo "$as_me: failed program was:" >&5
10536 cat conftest.$ac_ext >&5
10537 fi
10538 rm -f conftest.$ac_objext conftest.$ac_ext
10539   break
10540 done
10541 fi
10542 echo "$as_me:10542: result: $ac_cv_sys_large_files" >&5
10543 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10544 if test "$ac_cv_sys_large_files" != no; then
10545
10546 cat >>confdefs.h <<EOF
10547 #define _LARGE_FILES $ac_cv_sys_large_files
10548 EOF
10549
10550 fi
10551 rm -rf conftest*
10552 fi
10553
10554     if test "$enable_largefile" != no ; then
10555         echo "$as_me:10555: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10556 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10557 if test "${ac_cv_sys_largefile_source+set}" = set; then
10558   echo $ECHO_N "(cached) $ECHO_C" >&6
10559 else
10560   while :; do
10561   ac_cv_sys_largefile_source=no
10562   cat >conftest.$ac_ext <<_ACEOF
10563 #line 10563 "configure"
10564 #include "confdefs.h"
10565 #include <stdio.h>
10566 int
10567 main ()
10568 {
10569 return !fseeko;
10570   ;
10571   return 0;
10572 }
10573 _ACEOF
10574 rm -f conftest.$ac_objext
10575 if { (eval echo "$as_me:10575: \"$ac_compile\"") >&5
10576   (eval $ac_compile) 2>&5
10577   ac_status=$?
10578   echo "$as_me:10578: \$? = $ac_status" >&5
10579   (exit $ac_status); } &&
10580          { ac_try='test -s conftest.$ac_objext'
10581   { (eval echo "$as_me:10581: \"$ac_try\"") >&5
10582   (eval $ac_try) 2>&5
10583   ac_status=$?
10584   echo "$as_me:10584: \$? = $ac_status" >&5
10585   (exit $ac_status); }; }; then
10586   break
10587 else
10588   echo "$as_me: failed program was:" >&5
10589 cat conftest.$ac_ext >&5
10590 fi
10591 rm -f conftest.$ac_objext conftest.$ac_ext
10592   cat >conftest.$ac_ext <<_ACEOF
10593 #line 10593 "configure"
10594 #include "confdefs.h"
10595 #define _LARGEFILE_SOURCE 1
10596 #include <stdio.h>
10597 int
10598 main ()
10599 {
10600 return !fseeko;
10601   ;
10602   return 0;
10603 }
10604 _ACEOF
10605 rm -f conftest.$ac_objext
10606 if { (eval echo "$as_me:10606: \"$ac_compile\"") >&5
10607   (eval $ac_compile) 2>&5
10608   ac_status=$?
10609   echo "$as_me:10609: \$? = $ac_status" >&5
10610   (exit $ac_status); } &&
10611          { ac_try='test -s conftest.$ac_objext'
10612   { (eval echo "$as_me:10612: \"$ac_try\"") >&5
10613   (eval $ac_try) 2>&5
10614   ac_status=$?
10615   echo "$as_me:10615: \$? = $ac_status" >&5
10616   (exit $ac_status); }; }; then
10617   ac_cv_sys_largefile_source=1; break
10618 else
10619   echo "$as_me: failed program was:" >&5
10620 cat conftest.$ac_ext >&5
10621 fi
10622 rm -f conftest.$ac_objext conftest.$ac_ext
10623   break
10624 done
10625 fi
10626 echo "$as_me:10626: result: $ac_cv_sys_largefile_source" >&5
10627 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10628 if test "$ac_cv_sys_largefile_source" != no; then
10629
10630 cat >>confdefs.h <<EOF
10631 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10632 EOF
10633
10634 fi
10635 rm -rf conftest*
10636
10637 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10638 # in glibc 2.1.3, but that breaks too many other things.
10639 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10640 echo "$as_me:10640: checking for fseeko" >&5
10641 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10642 if test "${ac_cv_func_fseeko+set}" = set; then
10643   echo $ECHO_N "(cached) $ECHO_C" >&6
10644 else
10645   cat >conftest.$ac_ext <<_ACEOF
10646 #line 10646 "configure"
10647 #include "confdefs.h"
10648 #include <stdio.h>
10649 int
10650 main ()
10651 {
10652 return fseeko && fseeko (stdin, 0, 0);
10653   ;
10654   return 0;
10655 }
10656 _ACEOF
10657 rm -f conftest.$ac_objext conftest$ac_exeext
10658 if { (eval echo "$as_me:10658: \"$ac_link\"") >&5
10659   (eval $ac_link) 2>&5
10660   ac_status=$?
10661   echo "$as_me:10661: \$? = $ac_status" >&5
10662   (exit $ac_status); } &&
10663          { ac_try='test -s conftest$ac_exeext'
10664   { (eval echo "$as_me:10664: \"$ac_try\"") >&5
10665   (eval $ac_try) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit $ac_status); }; }; then
10669   ac_cv_func_fseeko=yes
10670 else
10671   echo "$as_me: failed program was:" >&5
10672 cat conftest.$ac_ext >&5
10673 ac_cv_func_fseeko=no
10674 fi
10675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10676 fi
10677 echo "$as_me:10677: result: $ac_cv_func_fseeko" >&5
10678 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10679 if test $ac_cv_func_fseeko = yes; then
10680
10681 cat >>confdefs.h <<\EOF
10682 #define HAVE_FSEEKO 1
10683 EOF
10684
10685 fi
10686
10687         # Normally we would collect these definitions in the config.h,
10688         # but (like _XOPEN_SOURCE), some environments rely on having these
10689         # defined before any of the system headers are included.  Another
10690         # case comes up with C++, e.g., on AIX the compiler compiles the
10691         # header files by themselves before looking at the body files it is
10692         # told to compile.  For ncurses, those header files do not include
10693         # the config.h
10694         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10695         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10696         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10697
10698         echo "$as_me:10698: checking whether to use struct dirent64" >&5
10699 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10700 if test "${cf_cv_struct_dirent64+set}" = set; then
10701   echo $ECHO_N "(cached) $ECHO_C" >&6
10702 else
10703
10704                 cat >conftest.$ac_ext <<_ACEOF
10705 #line 10705 "configure"
10706 #include "confdefs.h"
10707
10708 #include <sys/types.h>
10709 #include <dirent.h>
10710
10711 int
10712 main ()
10713 {
10714
10715                 /* if transitional largefile support is setup, this is true */
10716                 extern struct dirent64 * readdir(DIR *);
10717                 struct dirent64 *x = readdir((DIR *)0);
10718                 struct dirent *y = readdir((DIR *)0);
10719                 int z = x - y;
10720
10721   ;
10722   return 0;
10723 }
10724 _ACEOF
10725 rm -f conftest.$ac_objext
10726 if { (eval echo "$as_me:10726: \"$ac_compile\"") >&5
10727   (eval $ac_compile) 2>&5
10728   ac_status=$?
10729   echo "$as_me:10729: \$? = $ac_status" >&5
10730   (exit $ac_status); } &&
10731          { ac_try='test -s conftest.$ac_objext'
10732   { (eval echo "$as_me:10732: \"$ac_try\"") >&5
10733   (eval $ac_try) 2>&5
10734   ac_status=$?
10735   echo "$as_me:10735: \$? = $ac_status" >&5
10736   (exit $ac_status); }; }; then
10737   cf_cv_struct_dirent64=yes
10738 else
10739   echo "$as_me: failed program was:" >&5
10740 cat conftest.$ac_ext >&5
10741 cf_cv_struct_dirent64=no
10742 fi
10743 rm -f conftest.$ac_objext conftest.$ac_ext
10744
10745 fi
10746 echo "$as_me:10746: result: $cf_cv_struct_dirent64" >&5
10747 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10748         test "$cf_cv_struct_dirent64" = yes &&
10749 cat >>confdefs.h <<\EOF
10750 #define HAVE_STRUCT_DIRENT64 1
10751 EOF
10752
10753     fi
10754
10755 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10756 echo "$as_me:10756: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10757 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10758
10759 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10760 if test "${enable_tparm_varargs+set}" = set; then
10761   enableval="$enable_tparm_varargs"
10762   with_tparm_varargs=$enableval
10763 else
10764   with_tparm_varargs=yes
10765 fi;
10766 echo "$as_me:10766: result: $with_tparm_varargs" >&5
10767 echo "${ECHO_T}$with_tparm_varargs" >&6
10768 NCURSES_TPARM_VARARGS=0
10769 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10770
10771 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10772 if test "$with_ticlib" != no ; then
10773 echo "$as_me:10773: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10774 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10775
10776 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10777 if test "${enable_tic_depends+set}" = set; then
10778   enableval="$enable_tic_depends"
10779   with_tic_depends=$enableval
10780 else
10781   with_tic_depends=yes
10782 fi;
10783 echo "$as_me:10783: result: $with_tic_depends" >&5
10784 echo "${ECHO_T}$with_tic_depends" >&6
10785 else
10786         with_tic_depends=no
10787 fi
10788
10789 ###   use option --with-bool to override bool's type
10790 echo "$as_me:10790: checking for type of bool" >&5
10791 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10792
10793 # Check whether --with-bool or --without-bool was given.
10794 if test "${with_bool+set}" = set; then
10795   withval="$with_bool"
10796   NCURSES_BOOL="$withval"
10797 else
10798   NCURSES_BOOL=auto
10799 fi;
10800 echo "$as_me:10800: result: $NCURSES_BOOL" >&5
10801 echo "${ECHO_T}$NCURSES_BOOL" >&6
10802
10803 echo "$as_me:10803: checking for alternate terminal capabilities file" >&5
10804 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10805
10806 # Check whether --with-caps or --without-caps was given.
10807 if test "${with_caps+set}" = set; then
10808   withval="$with_caps"
10809   TERMINFO_CAPS=Caps.$withval
10810 else
10811   TERMINFO_CAPS=Caps
10812 fi;
10813 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10814 echo "$as_me:10814: result: $TERMINFO_CAPS" >&5
10815 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10816
10817 ###   use option --with-chtype to override chtype's type
10818 echo "$as_me:10818: checking for type of chtype" >&5
10819 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10820
10821 # Check whether --with-chtype or --without-chtype was given.
10822 if test "${with_chtype+set}" = set; then
10823   withval="$with_chtype"
10824   NCURSES_CHTYPE="$withval"
10825 else
10826   NCURSES_CHTYPE=auto
10827 fi;
10828 echo "$as_me:10828: result: $NCURSES_CHTYPE" >&5
10829 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10830
10831 ###   use option --with-ospeed to override ospeed's type
10832 echo "$as_me:10832: checking for type of ospeed" >&5
10833 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10834
10835 # Check whether --with-ospeed or --without-ospeed was given.
10836 if test "${with_ospeed+set}" = set; then
10837   withval="$with_ospeed"
10838   NCURSES_OSPEED="$withval"
10839 else
10840   NCURSES_OSPEED=short
10841 fi;
10842 echo "$as_me:10842: result: $NCURSES_OSPEED" >&5
10843 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10844
10845 ###   use option --with-mmask-t to override mmask_t's type
10846 echo "$as_me:10846: checking for type of mmask_t" >&5
10847 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10848
10849 # Check whether --with-mmask-t or --without-mmask-t was given.
10850 if test "${with_mmask_t+set}" = set; then
10851   withval="$with_mmask_t"
10852   NCURSES_MMASK_T="$withval"
10853 else
10854   NCURSES_MMASK_T=auto
10855 fi;
10856 echo "$as_me:10856: result: $NCURSES_MMASK_T" >&5
10857 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10858
10859 ###   use option --with-ccharw-max to override CCHARW_MAX size
10860 echo "$as_me:10860: checking for size CCHARW_MAX" >&5
10861 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10862
10863 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10864 if test "${with_ccharw_max+set}" = set; then
10865   withval="$with_ccharw_max"
10866   NCURSES_CCHARW_MAX="$withval"
10867 else
10868   NCURSES_CCHARW_MAX=5
10869 fi;
10870 echo "$as_me:10870: result: $NCURSES_CCHARW_MAX" >&5
10871 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10872
10873 ###   use option --with-tparm-arg to override tparm's argument type
10874 echo "$as_me:10874: checking for type of tparm args" >&5
10875 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10876
10877 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10878 if test "${with_tparm_arg+set}" = set; then
10879   withval="$with_tparm_arg"
10880   NCURSES_TPARM_ARG="$withval"
10881 else
10882   NCURSES_TPARM_ARG=long
10883 fi;
10884 echo "$as_me:10884: result: $NCURSES_TPARM_ARG" >&5
10885 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10886
10887 ### Enable compiling-in rcs id's
10888 echo "$as_me:10888: checking if RCS identifiers should be compiled-in" >&5
10889 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10890
10891 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10892 if test "${with_rcs_ids+set}" = set; then
10893   withval="$with_rcs_ids"
10894   with_rcs_ids=$withval
10895 else
10896   with_rcs_ids=no
10897 fi;
10898 echo "$as_me:10898: result: $with_rcs_ids" >&5
10899 echo "${ECHO_T}$with_rcs_ids" >&6
10900 test "x$with_rcs_ids" = xyes &&
10901 cat >>confdefs.h <<\EOF
10902 #define USE_RCS_IDS 1
10903 EOF
10904
10905 ###############################################################################
10906
10907 echo "$as_me:10907: checking format of man-pages" >&5
10908 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10909
10910 # Check whether --with-manpage-format or --without-manpage-format was given.
10911 if test "${with_manpage_format+set}" = set; then
10912   withval="$with_manpage_format"
10913   MANPAGE_FORMAT=$withval
10914 else
10915   MANPAGE_FORMAT=unknown
10916 fi;
10917
10918 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10919 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10920
10921 cf_unknown=
10922
10923 case $MANPAGE_FORMAT in
10924 unknown)
10925   if test -z "$MANPATH" ; then
10926     MANPATH="/usr/man:/usr/share/man"
10927   fi
10928
10929   # look for the 'date' man-page (it's most likely to be installed!)
10930   MANPAGE_FORMAT=
10931   cf_preform=no
10932   cf_catonly=yes
10933   cf_example=date
10934
10935   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10936   for cf_dir in $MANPATH; do
10937     test -z "$cf_dir" && cf_dir=/usr/man
10938     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
10939     do
10940       cf_test=`echo $cf_name | sed -e 's/*//'`
10941       if test "x$cf_test" = "x$cf_name" ; then
10942
10943         case "$cf_name" in
10944         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10945         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10946         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10947         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10948         esac
10949
10950         case "$cf_name" in
10951         $cf_dir/man*)
10952           cf_catonly=no
10953           ;;
10954         $cf_dir/cat*)
10955           cf_preform=yes
10956           ;;
10957         esac
10958         break
10959       fi
10960
10961       # if we found a match in either man* or cat*, stop looking
10962       if test -n "$MANPAGE_FORMAT" ; then
10963         cf_found=no
10964         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10965         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10966         case "$cf_name" in
10967         $cf_dir/cat*)
10968           cf_found=yes
10969           ;;
10970         esac
10971         test $cf_found=yes && break
10972       fi
10973     done
10974     # only check the first directory in $MANPATH where we find manpages
10975     if test -n "$MANPAGE_FORMAT" ; then
10976        break
10977     fi
10978   done
10979   # if we did not find the example, just assume it is normal
10980   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10981   IFS="$ac_save_ifs"
10982   ;;
10983 *)
10984   for cf_option in $MANPAGE_FORMAT; do
10985      case $cf_option in #(vi
10986      gzip|compress|BSDI|normal|formatted|catonly)
10987        ;;
10988      *)
10989        cf_unknown="$cf_unknown $cf_option"
10990        ;;
10991      esac
10992   done
10993   ;;
10994 esac
10995
10996 echo "$as_me:10996: result: $MANPAGE_FORMAT" >&5
10997 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10998 if test -n "$cf_unknown" ; then
10999   { echo "$as_me:10999: WARNING: Unexpected manpage-format $cf_unknown" >&5
11000 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11001 fi
11002
11003 echo "$as_me:11003: checking for manpage renaming" >&5
11004 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11005
11006 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11007 if test "${with_manpage_renames+set}" = set; then
11008   withval="$with_manpage_renames"
11009   MANPAGE_RENAMES=$withval
11010 else
11011   MANPAGE_RENAMES=yes
11012 fi;
11013
11014 case ".$MANPAGE_RENAMES" in #(vi
11015 .no) #(vi
11016   ;;
11017 .|.yes)
11018   # Debian 'man' program?
11019   if test -f /etc/debian_version ; then
11020     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11021   else
11022     MANPAGE_RENAMES=no
11023   fi
11024   ;;
11025 esac
11026
11027 if test "$MANPAGE_RENAMES" != no ; then
11028   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11029     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11030   elif test ! -f $MANPAGE_RENAMES ; then
11031     { { echo "$as_me:11031: error: not a filename: $MANPAGE_RENAMES" >&5
11032 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11033    { (exit 1); exit 1; }; }
11034   fi
11035
11036   test ! -d man && mkdir man
11037
11038   # Construct a sed-script to perform renaming within man-pages
11039   if test -n "$MANPAGE_RENAMES" ; then
11040     test ! -d man && mkdir man
11041     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11042   fi
11043 fi
11044
11045 echo "$as_me:11045: result: $MANPAGE_RENAMES" >&5
11046 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11047
11048 echo "$as_me:11048: checking if manpage aliases will be installed" >&5
11049 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11050
11051 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11052 if test "${with_manpage_aliases+set}" = set; then
11053   withval="$with_manpage_aliases"
11054   MANPAGE_ALIASES=$withval
11055 else
11056   MANPAGE_ALIASES=yes
11057 fi;
11058
11059 echo "$as_me:11059: result: $MANPAGE_ALIASES" >&5
11060 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11061
11062 case "x$LN_S" in #(vi
11063 xln*) #(vi
11064         cf_use_symlinks=yes
11065         ;;
11066 *)
11067         cf_use_symlinks=no
11068         ;;
11069 esac
11070
11071 MANPAGE_SYMLINKS=no
11072 if test "$MANPAGE_ALIASES" = yes ; then
11073 echo "$as_me:11073: checking if manpage symlinks should be used" >&5
11074 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11075
11076 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11077 if test "${with_manpage_symlinks+set}" = set; then
11078   withval="$with_manpage_symlinks"
11079   MANPAGE_SYMLINKS=$withval
11080 else
11081   MANPAGE_SYMLINKS=$cf_use_symlinks
11082 fi;
11083
11084 if test "$$cf_use_symlinks" = no; then
11085 if test "$MANPAGE_SYMLINKS" = yes ; then
11086         { echo "$as_me:11086: WARNING: cannot make symlinks" >&5
11087 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11088         MANPAGE_SYMLINKS=no
11089 fi
11090 fi
11091
11092 echo "$as_me:11092: result: $MANPAGE_SYMLINKS" >&5
11093 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11094 fi
11095
11096 echo "$as_me:11096: checking for manpage tbl" >&5
11097 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11098
11099 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11100 if test "${with_manpage_tbl+set}" = set; then
11101   withval="$with_manpage_tbl"
11102   MANPAGE_TBL=$withval
11103 else
11104   MANPAGE_TBL=no
11105 fi;
11106
11107 echo "$as_me:11107: result: $MANPAGE_TBL" >&5
11108 echo "${ECHO_T}$MANPAGE_TBL" >&6
11109
11110   if test "$prefix" = "NONE" ; then
11111      cf_prefix="$ac_default_prefix"
11112   else
11113      cf_prefix="$prefix"
11114   fi
11115
11116   case "$MANPAGE_FORMAT" in # (vi
11117   *catonly*) # (vi
11118     cf_format=yes
11119     cf_inboth=no
11120     ;;
11121   *formatted*) # (vi
11122     cf_format=yes
11123     cf_inboth=yes
11124     ;;
11125   *)
11126     cf_format=no
11127     cf_inboth=no
11128     ;;
11129   esac
11130
11131 test ! -d man && mkdir man
11132
11133 cf_so_strip=
11134 cf_compress=
11135 case "$MANPAGE_FORMAT" in #(vi
11136 *compress*) #(vi
11137         cf_so_strip="Z"
11138         cf_compress=compress
11139   ;;
11140 *gzip*)
11141         cf_so_strip="gz"
11142         cf_compress=gzip
11143   ;;
11144 esac
11145
11146 cf_edit_man=./edit_man.sh
11147 cf_man_alias=`pwd`/man_alias.sed
11148
11149 cat >$cf_edit_man <<CF_EOF
11150 #! /bin/sh
11151 # this script is generated by the configure-script CF_MAN_PAGES macro.
11152
11153 prefix="$cf_prefix"
11154 datarootdir="$datarootdir"
11155 datadir="$datadir"
11156
11157 NCURSES_MAJOR="$NCURSES_MAJOR"
11158 NCURSES_MINOR="$NCURSES_MINOR"
11159 NCURSES_PATCH="$NCURSES_PATCH"
11160
11161 NCURSES_OSPEED="$NCURSES_OSPEED"
11162 TERMINFO="$TERMINFO"
11163
11164 INSTALL="$INSTALL"
11165 INSTALL_DATA="$INSTALL_DATA"
11166
11167 transform="$program_transform_name"
11168
11169 TMP=\${TMPDIR:=/tmp}/man\$\$
11170 trap "rm -f \$TMP" 0 1 2 5 15
11171
11172 form=\$1
11173 shift || exit 1
11174
11175 verb=\$1
11176 shift || exit 1
11177
11178 mandir=\$1
11179 shift || exit 1
11180
11181 srcdir=\$1
11182 top_srcdir=\$srcdir/..
11183 shift || exit 1
11184
11185 if test "\$form" = normal ; then
11186         if test "$cf_format" = yes ; then
11187         if test "$cf_inboth" = no ; then
11188                 sh \$0 format \$verb \$mandir \$srcdir \$*
11189                 exit $?
11190         fi
11191         fi
11192         cf_subdir=\$mandir/man
11193         cf_tables=$MANPAGE_TBL
11194 else
11195         cf_subdir=\$mandir/cat
11196         cf_tables=yes
11197 fi
11198
11199 # process the list of source-files
11200 for i in \$* ; do
11201 case \$i in #(vi
11202 *.orig|*.rej) ;; #(vi
11203 *.[0-9]*)
11204         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11205         if test \$verb = installing ; then
11206         if test ! -d \$cf_subdir\${section} ; then
11207                 mkdir -p \$cf_subdir\$section
11208         fi
11209         fi
11210
11211         # replace variables in man page
11212         if test ! -f $cf_man_alias ; then
11213 cat >>$cf_man_alias <<-CF_EOF2
11214                 s,@DATADIR@,\$datadir,g
11215                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11216                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11217                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11218                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11219                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11220                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11221 CF_EOF
11222
11223         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11224         do
11225                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11226                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11227 cat >>$cf_edit_man <<-CF_EOF
11228                 s,@$cf_NAME@,$cf_name,g
11229 CF_EOF
11230         done
11231
11232 cat >>$cf_edit_man <<CF_EOF
11233 CF_EOF2
11234                 echo "...made $cf_man_alias"
11235         fi
11236
11237         aliases=
11238         cf_source=\`basename \$i\`
11239         inalias=\$cf_source
11240         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11241         if test ! -f \$inalias ; then
11242                 echo .. skipped \$cf_source
11243                 continue
11244         fi
11245 CF_EOF
11246
11247 if test "$MANPAGE_ALIASES" != no ; then
11248 cat >>$cf_edit_man <<CF_EOF
11249         nCurses=ignore.3x
11250         test $with_curses_h = yes && nCurses=ncurses.3x
11251         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11252 CF_EOF
11253 fi
11254
11255 if test "$MANPAGE_RENAMES" = no ; then
11256 cat >>$cf_edit_man <<CF_EOF
11257         # perform program transformations for section 1 man pages
11258         if test \$section = 1 ; then
11259                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11260         else
11261                 cf_target=\$cf_subdir\${section}/\$cf_source
11262         fi
11263 CF_EOF
11264 else
11265 cat >>$cf_edit_man <<CF_EOF
11266         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11267         if test -z "\$cf_target" ; then
11268                 echo '? missing rename for '\$cf_source
11269                 cf_target="\$cf_source"
11270         fi
11271         cf_target="\$cf_subdir\${section}/\${cf_target}"
11272
11273 CF_EOF
11274 fi
11275
11276 cat >>$cf_edit_man <<CF_EOF
11277         sed     -f $cf_man_alias \\
11278 CF_EOF
11279
11280 if test -f $MANPAGE_RENAMES ; then
11281 cat >>$cf_edit_man <<CF_EOF
11282                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11283 CF_EOF
11284 else
11285 cat >>$cf_edit_man <<CF_EOF
11286                 < \$i >\$TMP
11287 CF_EOF
11288 fi
11289
11290 cat >>$cf_edit_man <<CF_EOF
11291 if test \$cf_tables = yes ; then
11292         tbl \$TMP >\$TMP.out
11293         mv \$TMP.out \$TMP
11294 fi
11295 CF_EOF
11296
11297 if test $with_overwrite != yes ; then
11298 cat >>$cf_edit_man <<CF_EOF
11299         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11300         mv \$TMP.out \$TMP
11301 CF_EOF
11302 fi
11303
11304 if test $with_curses_h != yes ; then
11305 cat >>$cf_edit_man <<CF_EOF
11306         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11307         mv \$TMP.out \$TMP
11308 CF_EOF
11309 fi
11310
11311 cat >>$cf_edit_man <<CF_EOF
11312         if test \$form = format ; then
11313                 nroff -man \$TMP >\$TMP.out
11314                 mv \$TMP.out \$TMP
11315         fi
11316 CF_EOF
11317
11318 if test -n "$cf_compress" ; then
11319 cat >>$cf_edit_man <<CF_EOF
11320         if test \$verb = installing ; then
11321         if ( $cf_compress -f \$TMP )
11322         then
11323                 mv \$TMP.$cf_so_strip \$TMP
11324         fi
11325         fi
11326         cf_target="\$cf_target.$cf_so_strip"
11327 CF_EOF
11328 fi
11329
11330 case "$MANPAGE_FORMAT" in #(vi
11331 *BSDI*)
11332 cat >>$cf_edit_man <<CF_EOF
11333         if test \$form = format ; then
11334                 # BSDI installs only .0 suffixes in the cat directories
11335                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11336         fi
11337 CF_EOF
11338   ;;
11339 esac
11340
11341 cat >>$cf_edit_man <<CF_EOF
11342         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11343         if test \$verb = installing ; then
11344                 echo \$verb \$cf_target
11345                 \$INSTALL_DATA \$TMP \$cf_target
11346                 test -d \$cf_subdir\${section} &&
11347                 test -n "\$aliases" && (
11348                         cd \$cf_subdir\${section} && (
11349                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11350                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11351                                 cf_target=\`basename \$cf_target\`
11352                                 for cf_alias in \$aliases
11353                                 do
11354                                         if test \$section = 1 ; then
11355                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11356                                         fi
11357
11358                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11359                                                 if test -f \$cf_alias\${suffix} ; then
11360                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11361                                                         then
11362                                                                 continue
11363                                                         fi
11364                                                 fi
11365                                                 echo .. \$verb alias \$cf_alias\${suffix}
11366 CF_EOF
11367 case "x$LN_S" in #(vi
11368 *-f) #(vi
11369 cat >>$cf_edit_man <<CF_EOF
11370                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11371 CF_EOF
11372         ;;
11373 *)
11374 cat >>$cf_edit_man <<CF_EOF
11375                                                 rm -f \$cf_alias\${suffix}
11376                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11377 CF_EOF
11378         ;;
11379 esac
11380 cat >>$cf_edit_man <<CF_EOF
11381                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11382                                                 echo ".so \$cf_source" >\$TMP
11383 CF_EOF
11384 if test -n "$cf_compress" ; then
11385 cat >>$cf_edit_man <<CF_EOF
11386                                                 if test -n "$cf_so_strip" ; then
11387                                                         $cf_compress -f \$TMP
11388                                                         mv \$TMP.$cf_so_strip \$TMP
11389                                                 fi
11390 CF_EOF
11391 fi
11392 cat >>$cf_edit_man <<CF_EOF
11393                                                 echo .. \$verb alias \$cf_alias\${suffix}
11394                                                 rm -f \$cf_alias\${suffix}
11395                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11396                                         fi
11397                                 done
11398                         )
11399                 )
11400         elif test \$verb = removing ; then
11401                 test -f \$cf_target && (
11402                         echo \$verb \$cf_target
11403                         rm -f \$cf_target
11404                 )
11405                 test -d \$cf_subdir\${section} &&
11406                 test -n "\$aliases" && (
11407                         cd \$cf_subdir\${section} && (
11408                                 for cf_alias in \$aliases
11409                                 do
11410                                         if test \$section = 1 ; then
11411                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11412                                         fi
11413
11414                                         echo .. \$verb alias \$cf_alias\${suffix}
11415                                         rm -f \$cf_alias\${suffix}
11416                                 done
11417                         )
11418                 )
11419         else
11420 #               echo ".hy 0"
11421                 cat \$TMP
11422         fi
11423         ;;
11424 esac
11425 done
11426
11427 if test $cf_inboth = yes ; then
11428 if test \$form != format ; then
11429         sh \$0 format \$verb \$mandir \$srcdir \$*
11430 fi
11431 fi
11432
11433 exit 0
11434 CF_EOF
11435 chmod 755 $cf_edit_man
11436
11437 ###############################################################################
11438
11439 ### Note that some functions (such as const) are normally disabled anyway.
11440 echo "$as_me:11440: checking if you want to build with function extensions" >&5
11441 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11442
11443 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11444 if test "${enable_ext_funcs+set}" = set; then
11445   enableval="$enable_ext_funcs"
11446   with_ext_funcs=$enableval
11447 else
11448   with_ext_funcs=yes
11449 fi;
11450 echo "$as_me:11450: result: $with_ext_funcs" >&5
11451 echo "${ECHO_T}$with_ext_funcs" >&6
11452 if test "x$with_ext_funcs" = xyes ; then
11453         NCURSES_EXT_FUNCS=1
11454
11455 cat >>confdefs.h <<\EOF
11456 #define HAVE_ASSUME_DEFAULT_COLORS 1
11457 EOF
11458
11459 cat >>confdefs.h <<\EOF
11460 #define HAVE_CURSES_VERSION 1
11461 EOF
11462
11463 cat >>confdefs.h <<\EOF
11464 #define HAVE_HAS_KEY 1
11465 EOF
11466
11467 cat >>confdefs.h <<\EOF
11468 #define HAVE_RESIZETERM 1
11469 EOF
11470
11471 cat >>confdefs.h <<\EOF
11472 #define HAVE_RESIZE_TERM 1
11473 EOF
11474
11475 cat >>confdefs.h <<\EOF
11476 #define HAVE_TERM_ENTRY_H 1
11477 EOF
11478
11479 cat >>confdefs.h <<\EOF
11480 #define HAVE_USE_DEFAULT_COLORS 1
11481 EOF
11482
11483 cat >>confdefs.h <<\EOF
11484 #define HAVE_USE_SCREEN 1
11485 EOF
11486
11487 cat >>confdefs.h <<\EOF
11488 #define HAVE_USE_WINDOW 1
11489 EOF
11490
11491 cat >>confdefs.h <<\EOF
11492 #define HAVE_WRESIZE 1
11493 EOF
11494
11495 cat >>confdefs.h <<\EOF
11496 #define NCURSES_EXT_FUNCS 1
11497 EOF
11498
11499         GENERATED_EXT_FUNCS=generated
11500 else
11501         NCURSES_EXT_FUNCS=0
11502         GENERATED_EXT_FUNCS=
11503 fi
11504
11505 echo "$as_me:11505: checking if you want to build with experimental SCREEN extensions" >&5
11506 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11507
11508 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11509 if test "${enable_sp_funcs+set}" = set; then
11510   enableval="$enable_sp_funcs"
11511   with_sp_funcs=$enableval
11512 else
11513   with_sp_funcs=no
11514 fi;
11515 echo "$as_me:11515: result: $with_sp_funcs" >&5
11516 echo "${ECHO_T}$with_sp_funcs" >&6
11517 if test "x$with_sp_funcs" = xyes ; then
11518         NCURSES_SP_FUNCS=1
11519
11520 cat >>confdefs.h <<\EOF
11521 #define NCURSES_SP_FUNCS 1
11522 EOF
11523
11524         GENERATED_SP_FUNCS=generated
11525 else
11526         NCURSES_SP_FUNCS=0
11527         GENERATED_SP_FUNCS=
11528 fi
11529
11530 echo "$as_me:11530: checking if you want to build with experimental terminal-driver" >&5
11531 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11532
11533 # Check whether --enable-term-driver or --disable-term-driver was given.
11534 if test "${enable_term_driver+set}" = set; then
11535   enableval="$enable_term_driver"
11536   with_term_driver=$enableval
11537 else
11538   with_term_driver=no
11539 fi;
11540 echo "$as_me:11540: result: $with_term_driver" >&5
11541 echo "${ECHO_T}$with_term_driver" >&6
11542 if test "x$with_term_driver" = xyes ; then
11543
11544 cat >>confdefs.h <<\EOF
11545 #define USE_TERM_DRIVER 1
11546 EOF
11547
11548         if test "x$with_sp_funcs" != xyes ; then
11549                 { { echo "$as_me:11549: error: The term-driver option relies upon sp-funcs" >&5
11550 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11551    { (exit 1); exit 1; }; }
11552         fi
11553 fi
11554
11555 ###   use option --enable-const to turn on use of const beyond that in XSI.
11556 echo "$as_me:11556: checking for extended use of const keyword" >&5
11557 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11558
11559 # Check whether --enable-const or --disable-const was given.
11560 if test "${enable_const+set}" = set; then
11561   enableval="$enable_const"
11562   with_ext_const=$enableval
11563 else
11564   with_ext_const=no
11565 fi;
11566 echo "$as_me:11566: result: $with_ext_const" >&5
11567 echo "${ECHO_T}$with_ext_const" >&6
11568 NCURSES_CONST='/*nothing*/'
11569 if test "x$with_ext_const" = xyes ; then
11570         NCURSES_CONST=const
11571 fi
11572
11573 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11574 echo "$as_me:11574: checking if you want to use extended colors" >&5
11575 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11576
11577 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11578 if test "${enable_ext_colors+set}" = set; then
11579   enableval="$enable_ext_colors"
11580   with_ext_colors=$enableval
11581 else
11582   with_ext_colors=no
11583 fi;
11584 echo "$as_me:11584: result: $with_ext_colors" >&5
11585 echo "${ECHO_T}$with_ext_colors" >&6
11586 NCURSES_EXT_COLORS=0
11587 if test "x$with_ext_colors" = xyes ; then
11588         if test "x$with_widec" != xyes ; then
11589                 { { echo "$as_me:11589: error: This option applies only to wide-character library" >&5
11590 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11591    { (exit 1); exit 1; }; }
11592         else
11593                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11594
11595 if test "${with_abi_version+set}" != set; then
11596         case $cf_cv_rel_version in
11597         5.*)
11598                 cf_cv_rel_version=6.0
11599                 cf_cv_abi_version=6
11600                 { echo "$as_me:11600: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11601 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11602                 ;;
11603         esac
11604 fi
11605
11606         fi
11607         NCURSES_EXT_COLORS=1
11608
11609 cat >>confdefs.h <<\EOF
11610 #define NCURSES_EXT_COLORS 1
11611 EOF
11612
11613 fi
11614
11615 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11616 echo "$as_me:11616: checking if you want to use extended mouse encoding" >&5
11617 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11618
11619 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11620 if test "${enable_ext_mouse+set}" = set; then
11621   enableval="$enable_ext_mouse"
11622   with_ext_mouse=$enableval
11623 else
11624   with_ext_mouse=no
11625 fi;
11626 echo "$as_me:11626: result: $with_ext_mouse" >&5
11627 echo "${ECHO_T}$with_ext_mouse" >&6
11628 NCURSES_MOUSE_VERSION=1
11629 if test "x$with_ext_mouse" = xyes ; then
11630         NCURSES_MOUSE_VERSION=2
11631
11632 if test "${with_abi_version+set}" != set; then
11633         case $cf_cv_rel_version in
11634         5.*)
11635                 cf_cv_rel_version=6.0
11636                 cf_cv_abi_version=6
11637                 { echo "$as_me:11637: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11638 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11639                 ;;
11640         esac
11641 fi
11642
11643 fi
11644
11645 ###   use option --enable-ext-putwin to turn on extended screendumps
11646 echo "$as_me:11646: checking if you want to use extended putwin/screendump" >&5
11647 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11648
11649 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11650 if test "${enable_ext_colors+set}" = set; then
11651   enableval="$enable_ext_colors"
11652   with_ext_putwin=$enableval
11653 else
11654   with_ext_putwin=no
11655 fi;
11656 echo "$as_me:11656: result: $with_ext_putwin" >&5
11657 echo "${ECHO_T}$with_ext_putwin" >&6
11658 if test "x$with_ext_putwin" = xyes ; then
11659
11660 cat >>confdefs.h <<\EOF
11661 #define NCURSES_EXT_PUTWIN 1
11662 EOF
11663
11664 fi
11665
11666 echo "$as_me:11666: checking if you want \$NCURSES_NO_PADDING code" >&5
11667 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11668
11669 # Check whether --enable-no-padding or --disable-no-padding was given.
11670 if test "${enable_no_padding+set}" = set; then
11671   enableval="$enable_no_padding"
11672   with_no_padding=$enableval
11673 else
11674   with_no_padding=$with_ext_funcs
11675 fi;
11676 echo "$as_me:11676: result: $with_no_padding" >&5
11677 echo "${ECHO_T}$with_no_padding" >&6
11678 test "x$with_no_padding" = xyes &&
11679 cat >>confdefs.h <<\EOF
11680 #define NCURSES_NO_PADDING 1
11681 EOF
11682
11683 echo "$as_me:11683: checking for ANSI C header files" >&5
11684 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11685 if test "${ac_cv_header_stdc+set}" = set; then
11686   echo $ECHO_N "(cached) $ECHO_C" >&6
11687 else
11688   cat >conftest.$ac_ext <<_ACEOF
11689 #line 11689 "configure"
11690 #include "confdefs.h"
11691 #include <stdlib.h>
11692 #include <stdarg.h>
11693 #include <string.h>
11694 #include <float.h>
11695
11696 _ACEOF
11697 if { (eval echo "$as_me:11697: \"$ac_cpp conftest.$ac_ext\"") >&5
11698   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11699   ac_status=$?
11700   egrep -v '^ *\+' conftest.er1 >conftest.err
11701   rm -f conftest.er1
11702   cat conftest.err >&5
11703   echo "$as_me:11703: \$? = $ac_status" >&5
11704   (exit $ac_status); } >/dev/null; then
11705   if test -s conftest.err; then
11706     ac_cpp_err=$ac_c_preproc_warn_flag
11707   else
11708     ac_cpp_err=
11709   fi
11710 else
11711   ac_cpp_err=yes
11712 fi
11713 if test -z "$ac_cpp_err"; then
11714   ac_cv_header_stdc=yes
11715 else
11716   echo "$as_me: failed program was:" >&5
11717   cat conftest.$ac_ext >&5
11718   ac_cv_header_stdc=no
11719 fi
11720 rm -f conftest.err conftest.$ac_ext
11721
11722 if test $ac_cv_header_stdc = yes; then
11723   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11724   cat >conftest.$ac_ext <<_ACEOF
11725 #line 11725 "configure"
11726 #include "confdefs.h"
11727 #include <string.h>
11728
11729 _ACEOF
11730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11731   egrep "memchr" >/dev/null 2>&1; then
11732   :
11733 else
11734   ac_cv_header_stdc=no
11735 fi
11736 rm -rf conftest*
11737
11738 fi
11739
11740 if test $ac_cv_header_stdc = yes; then
11741   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11742   cat >conftest.$ac_ext <<_ACEOF
11743 #line 11743 "configure"
11744 #include "confdefs.h"
11745 #include <stdlib.h>
11746
11747 _ACEOF
11748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11749   egrep "free" >/dev/null 2>&1; then
11750   :
11751 else
11752   ac_cv_header_stdc=no
11753 fi
11754 rm -rf conftest*
11755
11756 fi
11757
11758 if test $ac_cv_header_stdc = yes; then
11759   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11760   if test "$cross_compiling" = yes; then
11761   :
11762 else
11763   cat >conftest.$ac_ext <<_ACEOF
11764 #line 11764 "configure"
11765 #include "confdefs.h"
11766 #include <ctype.h>
11767 #if ((' ' & 0x0FF) == 0x020)
11768 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11769 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11770 #else
11771 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11772                      || ('j' <= (c) && (c) <= 'r') \
11773                      || ('s' <= (c) && (c) <= 'z'))
11774 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11775 #endif
11776
11777 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11778 int
11779 main ()
11780 {
11781   int i;
11782   for (i = 0; i < 256; i++)
11783     if (XOR (islower (i), ISLOWER (i))
11784         || toupper (i) != TOUPPER (i))
11785       $ac_main_return(2);
11786   $ac_main_return (0);
11787 }
11788 _ACEOF
11789 rm -f conftest$ac_exeext
11790 if { (eval echo "$as_me:11790: \"$ac_link\"") >&5
11791   (eval $ac_link) 2>&5
11792   ac_status=$?
11793   echo "$as_me:11793: \$? = $ac_status" >&5
11794   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11795   { (eval echo "$as_me:11795: \"$ac_try\"") >&5
11796   (eval $ac_try) 2>&5
11797   ac_status=$?
11798   echo "$as_me:11798: \$? = $ac_status" >&5
11799   (exit $ac_status); }; }; then
11800   :
11801 else
11802   echo "$as_me: program exited with status $ac_status" >&5
11803 echo "$as_me: failed program was:" >&5
11804 cat conftest.$ac_ext >&5
11805 ac_cv_header_stdc=no
11806 fi
11807 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11808 fi
11809 fi
11810 fi
11811 echo "$as_me:11811: result: $ac_cv_header_stdc" >&5
11812 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11813 if test $ac_cv_header_stdc = yes; then
11814
11815 cat >>confdefs.h <<\EOF
11816 #define STDC_HEADERS 1
11817 EOF
11818
11819 fi
11820
11821 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11822
11823 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11824                   inttypes.h stdint.h unistd.h
11825 do
11826 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11827 echo "$as_me:11827: checking for $ac_header" >&5
11828 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11829 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11830   echo $ECHO_N "(cached) $ECHO_C" >&6
11831 else
11832   cat >conftest.$ac_ext <<_ACEOF
11833 #line 11833 "configure"
11834 #include "confdefs.h"
11835 $ac_includes_default
11836 #include <$ac_header>
11837 _ACEOF
11838 rm -f conftest.$ac_objext
11839 if { (eval echo "$as_me:11839: \"$ac_compile\"") >&5
11840   (eval $ac_compile) 2>&5
11841   ac_status=$?
11842   echo "$as_me:11842: \$? = $ac_status" >&5
11843   (exit $ac_status); } &&
11844          { ac_try='test -s conftest.$ac_objext'
11845   { (eval echo "$as_me:11845: \"$ac_try\"") >&5
11846   (eval $ac_try) 2>&5
11847   ac_status=$?
11848   echo "$as_me:11848: \$? = $ac_status" >&5
11849   (exit $ac_status); }; }; then
11850   eval "$as_ac_Header=yes"
11851 else
11852   echo "$as_me: failed program was:" >&5
11853 cat conftest.$ac_ext >&5
11854 eval "$as_ac_Header=no"
11855 fi
11856 rm -f conftest.$ac_objext conftest.$ac_ext
11857 fi
11858 echo "$as_me:11858: result: `eval echo '${'$as_ac_Header'}'`" >&5
11859 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11860 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11861   cat >>confdefs.h <<EOF
11862 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11863 EOF
11864
11865 fi
11866 done
11867
11868 echo "$as_me:11868: checking for signed char" >&5
11869 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11870 if test "${ac_cv_type_signed_char+set}" = set; then
11871   echo $ECHO_N "(cached) $ECHO_C" >&6
11872 else
11873   cat >conftest.$ac_ext <<_ACEOF
11874 #line 11874 "configure"
11875 #include "confdefs.h"
11876 $ac_includes_default
11877 int
11878 main ()
11879 {
11880 if ((signed char *) 0)
11881   return 0;
11882 if (sizeof (signed char))
11883   return 0;
11884   ;
11885   return 0;
11886 }
11887 _ACEOF
11888 rm -f conftest.$ac_objext
11889 if { (eval echo "$as_me:11889: \"$ac_compile\"") >&5
11890   (eval $ac_compile) 2>&5
11891   ac_status=$?
11892   echo "$as_me:11892: \$? = $ac_status" >&5
11893   (exit $ac_status); } &&
11894          { ac_try='test -s conftest.$ac_objext'
11895   { (eval echo "$as_me:11895: \"$ac_try\"") >&5
11896   (eval $ac_try) 2>&5
11897   ac_status=$?
11898   echo "$as_me:11898: \$? = $ac_status" >&5
11899   (exit $ac_status); }; }; then
11900   ac_cv_type_signed_char=yes
11901 else
11902   echo "$as_me: failed program was:" >&5
11903 cat conftest.$ac_ext >&5
11904 ac_cv_type_signed_char=no
11905 fi
11906 rm -f conftest.$ac_objext conftest.$ac_ext
11907 fi
11908 echo "$as_me:11908: result: $ac_cv_type_signed_char" >&5
11909 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11910
11911 echo "$as_me:11911: checking size of signed char" >&5
11912 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11913 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11914   echo $ECHO_N "(cached) $ECHO_C" >&6
11915 else
11916   if test "$ac_cv_type_signed_char" = yes; then
11917   if test "$cross_compiling" = yes; then
11918   # Depending upon the size, compute the lo and hi bounds.
11919 cat >conftest.$ac_ext <<_ACEOF
11920 #line 11920 "configure"
11921 #include "confdefs.h"
11922 $ac_includes_default
11923 int
11924 main ()
11925 {
11926 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11927   ;
11928   return 0;
11929 }
11930 _ACEOF
11931 rm -f conftest.$ac_objext
11932 if { (eval echo "$as_me:11932: \"$ac_compile\"") >&5
11933   (eval $ac_compile) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); } &&
11937          { ac_try='test -s conftest.$ac_objext'
11938   { (eval echo "$as_me:11938: \"$ac_try\"") >&5
11939   (eval $ac_try) 2>&5
11940   ac_status=$?
11941   echo "$as_me:11941: \$? = $ac_status" >&5
11942   (exit $ac_status); }; }; then
11943   ac_lo=0 ac_mid=0
11944   while :; do
11945     cat >conftest.$ac_ext <<_ACEOF
11946 #line 11946 "configure"
11947 #include "confdefs.h"
11948 $ac_includes_default
11949 int
11950 main ()
11951 {
11952 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11953   ;
11954   return 0;
11955 }
11956 _ACEOF
11957 rm -f conftest.$ac_objext
11958 if { (eval echo "$as_me:11958: \"$ac_compile\"") >&5
11959   (eval $ac_compile) 2>&5
11960   ac_status=$?
11961   echo "$as_me:11961: \$? = $ac_status" >&5
11962   (exit $ac_status); } &&
11963          { ac_try='test -s conftest.$ac_objext'
11964   { (eval echo "$as_me:11964: \"$ac_try\"") >&5
11965   (eval $ac_try) 2>&5
11966   ac_status=$?
11967   echo "$as_me:11967: \$? = $ac_status" >&5
11968   (exit $ac_status); }; }; then
11969   ac_hi=$ac_mid; break
11970 else
11971   echo "$as_me: failed program was:" >&5
11972 cat conftest.$ac_ext >&5
11973 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11974 fi
11975 rm -f conftest.$ac_objext conftest.$ac_ext
11976   done
11977 else
11978   echo "$as_me: failed program was:" >&5
11979 cat conftest.$ac_ext >&5
11980 ac_hi=-1 ac_mid=-1
11981   while :; do
11982     cat >conftest.$ac_ext <<_ACEOF
11983 #line 11983 "configure"
11984 #include "confdefs.h"
11985 $ac_includes_default
11986 int
11987 main ()
11988 {
11989 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11990   ;
11991   return 0;
11992 }
11993 _ACEOF
11994 rm -f conftest.$ac_objext
11995 if { (eval echo "$as_me:11995: \"$ac_compile\"") >&5
11996   (eval $ac_compile) 2>&5
11997   ac_status=$?
11998   echo "$as_me:11998: \$? = $ac_status" >&5
11999   (exit $ac_status); } &&
12000          { ac_try='test -s conftest.$ac_objext'
12001   { (eval echo "$as_me:12001: \"$ac_try\"") >&5
12002   (eval $ac_try) 2>&5
12003   ac_status=$?
12004   echo "$as_me:12004: \$? = $ac_status" >&5
12005   (exit $ac_status); }; }; then
12006   ac_lo=$ac_mid; break
12007 else
12008   echo "$as_me: failed program was:" >&5
12009 cat conftest.$ac_ext >&5
12010 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12011 fi
12012 rm -f conftest.$ac_objext conftest.$ac_ext
12013   done
12014 fi
12015 rm -f conftest.$ac_objext conftest.$ac_ext
12016 # Binary search between lo and hi bounds.
12017 while test "x$ac_lo" != "x$ac_hi"; do
12018   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12019   cat >conftest.$ac_ext <<_ACEOF
12020 #line 12020 "configure"
12021 #include "confdefs.h"
12022 $ac_includes_default
12023 int
12024 main ()
12025 {
12026 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12027   ;
12028   return 0;
12029 }
12030 _ACEOF
12031 rm -f conftest.$ac_objext
12032 if { (eval echo "$as_me:12032: \"$ac_compile\"") >&5
12033   (eval $ac_compile) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit $ac_status); } &&
12037          { ac_try='test -s conftest.$ac_objext'
12038   { (eval echo "$as_me:12038: \"$ac_try\"") >&5
12039   (eval $ac_try) 2>&5
12040   ac_status=$?
12041   echo "$as_me:12041: \$? = $ac_status" >&5
12042   (exit $ac_status); }; }; then
12043   ac_hi=$ac_mid
12044 else
12045   echo "$as_me: failed program was:" >&5
12046 cat conftest.$ac_ext >&5
12047 ac_lo=`expr $ac_mid + 1`
12048 fi
12049 rm -f conftest.$ac_objext conftest.$ac_ext
12050 done
12051 ac_cv_sizeof_signed_char=$ac_lo
12052 else
12053   if test "$cross_compiling" = yes; then
12054   { { echo "$as_me:12054: error: cannot run test program while cross compiling" >&5
12055 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12056    { (exit 1); exit 1; }; }
12057 else
12058   cat >conftest.$ac_ext <<_ACEOF
12059 #line 12059 "configure"
12060 #include "confdefs.h"
12061 $ac_includes_default
12062 int
12063 main ()
12064 {
12065 FILE *f = fopen ("conftest.val", "w");
12066 if (!f)
12067   $ac_main_return (1);
12068 fprintf (f, "%d", (sizeof (signed char)));
12069 fclose (f);
12070   ;
12071   return 0;
12072 }
12073 _ACEOF
12074 rm -f conftest$ac_exeext
12075 if { (eval echo "$as_me:12075: \"$ac_link\"") >&5
12076   (eval $ac_link) 2>&5
12077   ac_status=$?
12078   echo "$as_me:12078: \$? = $ac_status" >&5
12079   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12080   { (eval echo "$as_me:12080: \"$ac_try\"") >&5
12081   (eval $ac_try) 2>&5
12082   ac_status=$?
12083   echo "$as_me:12083: \$? = $ac_status" >&5
12084   (exit $ac_status); }; }; then
12085   ac_cv_sizeof_signed_char=`cat conftest.val`
12086 else
12087   echo "$as_me: program exited with status $ac_status" >&5
12088 echo "$as_me: failed program was:" >&5
12089 cat conftest.$ac_ext >&5
12090 fi
12091 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12092 fi
12093 fi
12094 rm -f conftest.val
12095 else
12096   ac_cv_sizeof_signed_char=0
12097 fi
12098 fi
12099 echo "$as_me:12099: result: $ac_cv_sizeof_signed_char" >&5
12100 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12101 cat >>confdefs.h <<EOF
12102 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12103 EOF
12104
12105 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12106         NCURSES_SBOOL="signed char"
12107 else
12108         NCURSES_SBOOL="char"
12109 fi
12110 echo "$as_me:12110: checking if you want to use signed Boolean array in term.h" >&5
12111 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12112
12113 # Check whether --enable-signed-char or --disable-signed-char was given.
12114 if test "${enable_signed_char+set}" = set; then
12115   enableval="$enable_signed_char"
12116   with_signed_char=$enableval
12117 else
12118   with_signed_char=no
12119 fi;
12120 echo "$as_me:12120: result: $with_signed_char" >&5
12121 echo "${ECHO_T}$with_signed_char" >&6
12122 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12123
12124 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12125 echo "$as_me:12125: checking if you want SIGWINCH handler" >&5
12126 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12127
12128 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12129 if test "${enable_sigwinch+set}" = set; then
12130   enableval="$enable_sigwinch"
12131   with_sigwinch=$enableval
12132 else
12133   with_sigwinch=$with_ext_funcs
12134 fi;
12135 echo "$as_me:12135: result: $with_sigwinch" >&5
12136 echo "${ECHO_T}$with_sigwinch" >&6
12137 test "x$with_sigwinch" = xyes &&
12138 cat >>confdefs.h <<\EOF
12139 #define USE_SIGWINCH 1
12140 EOF
12141
12142 ###   use option --enable-tcap-names to allow user to define new capabilities
12143 echo "$as_me:12143: checking if you want user-definable terminal capabilities like termcap" >&5
12144 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12145
12146 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12147 if test "${enable_tcap_names+set}" = set; then
12148   enableval="$enable_tcap_names"
12149   with_tcap_names=$enableval
12150 else
12151   with_tcap_names=$with_ext_funcs
12152 fi;
12153 echo "$as_me:12153: result: $with_tcap_names" >&5
12154 echo "${ECHO_T}$with_tcap_names" >&6
12155 NCURSES_XNAMES=0
12156 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12157
12158 ###############################################################################
12159 # These options are relatively safe to experiment with.
12160
12161 echo "$as_me:12161: checking if you want all development code" >&5
12162 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12163
12164 # Check whether --with-develop or --without-develop was given.
12165 if test "${with_develop+set}" = set; then
12166   withval="$with_develop"
12167   with_develop=$withval
12168 else
12169   with_develop=no
12170 fi;
12171 echo "$as_me:12171: result: $with_develop" >&5
12172 echo "${ECHO_T}$with_develop" >&6
12173
12174 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12175 echo "$as_me:12175: checking if you want hard-tabs code" >&5
12176 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12177
12178 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12179 if test "${enable_hard_tabs+set}" = set; then
12180   enableval="$enable_hard_tabs"
12181
12182 else
12183   enable_hard_tabs=$with_develop
12184 fi;
12185 echo "$as_me:12185: result: $enable_hard_tabs" >&5
12186 echo "${ECHO_T}$enable_hard_tabs" >&6
12187 test "x$enable_hard_tabs" = xyes &&
12188 cat >>confdefs.h <<\EOF
12189 #define USE_HARD_TABS 1
12190 EOF
12191
12192 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12193 echo "$as_me:12193: checking if you want limited support for xmc" >&5
12194 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12195
12196 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12197 if test "${enable_xmc_glitch+set}" = set; then
12198   enableval="$enable_xmc_glitch"
12199
12200 else
12201   enable_xmc_glitch=$with_develop
12202 fi;
12203 echo "$as_me:12203: result: $enable_xmc_glitch" >&5
12204 echo "${ECHO_T}$enable_xmc_glitch" >&6
12205 test "x$enable_xmc_glitch" = xyes &&
12206 cat >>confdefs.h <<\EOF
12207 #define USE_XMC_SUPPORT 1
12208 EOF
12209
12210 ###############################################################################
12211 # These are just experimental, probably should not be in a package:
12212
12213 echo "$as_me:12213: checking if you do not want to assume colors are white-on-black" >&5
12214 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12215
12216 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12217 if test "${enable_assumed_color+set}" = set; then
12218   enableval="$enable_assumed_color"
12219   with_assumed_color=$enableval
12220 else
12221   with_assumed_color=yes
12222 fi;
12223 echo "$as_me:12223: result: $with_assumed_color" >&5
12224 echo "${ECHO_T}$with_assumed_color" >&6
12225 test "x$with_assumed_color" = xyes &&
12226 cat >>confdefs.h <<\EOF
12227 #define USE_ASSUMED_COLOR 1
12228 EOF
12229
12230 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12231 echo "$as_me:12231: checking if you want hashmap scrolling-optimization code" >&5
12232 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12233
12234 # Check whether --enable-hashmap or --disable-hashmap was given.
12235 if test "${enable_hashmap+set}" = set; then
12236   enableval="$enable_hashmap"
12237   with_hashmap=$enableval
12238 else
12239   with_hashmap=yes
12240 fi;
12241 echo "$as_me:12241: result: $with_hashmap" >&5
12242 echo "${ECHO_T}$with_hashmap" >&6
12243 test "x$with_hashmap" = xyes &&
12244 cat >>confdefs.h <<\EOF
12245 #define USE_HASHMAP 1
12246 EOF
12247
12248 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12249 echo "$as_me:12249: checking if you want colorfgbg code" >&5
12250 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12251
12252 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12253 if test "${enable_colorfgbg+set}" = set; then
12254   enableval="$enable_colorfgbg"
12255   with_colorfgbg=$enableval
12256 else
12257   with_colorfgbg=no
12258 fi;
12259 echo "$as_me:12259: result: $with_colorfgbg" >&5
12260 echo "${ECHO_T}$with_colorfgbg" >&6
12261 test "x$with_colorfgbg" = xyes &&
12262 cat >>confdefs.h <<\EOF
12263 #define USE_COLORFGBG 1
12264 EOF
12265
12266 ###   use option --enable-interop to turn on use of bindings used for interop
12267 echo "$as_me:12267: checking if you want interop bindings" >&5
12268 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12269
12270 # Check whether --enable-interop or --disable-interop was given.
12271 if test "${enable_interop+set}" = set; then
12272   enableval="$enable_interop"
12273   with_exp_interop=$enableval
12274 else
12275   with_exp_interop=no
12276 fi;
12277 echo "$as_me:12277: result: $with_exp_interop" >&5
12278 echo "${ECHO_T}$with_exp_interop" >&6
12279
12280 NCURSES_INTEROP_FUNCS=0
12281 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12282
12283 # This is still experimental (20080329), but should ultimately be moved to
12284 # the script-block --with-normal, etc.
12285
12286 echo "$as_me:12286: checking if you want to link with the pthread library" >&5
12287 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12288
12289 # Check whether --with-pthread or --without-pthread was given.
12290 if test "${with_pthread+set}" = set; then
12291   withval="$with_pthread"
12292   with_pthread=$withval
12293 else
12294   with_pthread=no
12295 fi;
12296 echo "$as_me:12296: result: $with_pthread" >&5
12297 echo "${ECHO_T}$with_pthread" >&6
12298
12299 if test "$with_pthread" != no ; then
12300     echo "$as_me:12300: checking for pthread.h" >&5
12301 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12302 if test "${ac_cv_header_pthread_h+set}" = set; then
12303   echo $ECHO_N "(cached) $ECHO_C" >&6
12304 else
12305   cat >conftest.$ac_ext <<_ACEOF
12306 #line 12306 "configure"
12307 #include "confdefs.h"
12308 #include <pthread.h>
12309 _ACEOF
12310 if { (eval echo "$as_me:12310: \"$ac_cpp conftest.$ac_ext\"") >&5
12311   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12312   ac_status=$?
12313   egrep -v '^ *\+' conftest.er1 >conftest.err
12314   rm -f conftest.er1
12315   cat conftest.err >&5
12316   echo "$as_me:12316: \$? = $ac_status" >&5
12317   (exit $ac_status); } >/dev/null; then
12318   if test -s conftest.err; then
12319     ac_cpp_err=$ac_c_preproc_warn_flag
12320   else
12321     ac_cpp_err=
12322   fi
12323 else
12324   ac_cpp_err=yes
12325 fi
12326 if test -z "$ac_cpp_err"; then
12327   ac_cv_header_pthread_h=yes
12328 else
12329   echo "$as_me: failed program was:" >&5
12330   cat conftest.$ac_ext >&5
12331   ac_cv_header_pthread_h=no
12332 fi
12333 rm -f conftest.err conftest.$ac_ext
12334 fi
12335 echo "$as_me:12335: result: $ac_cv_header_pthread_h" >&5
12336 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12337 if test $ac_cv_header_pthread_h = yes; then
12338
12339 cat >>confdefs.h <<\EOF
12340 #define HAVE_PTHREADS_H 1
12341 EOF
12342
12343         for cf_lib_pthread in pthread c_r
12344         do
12345             echo "$as_me:12345: checking if we can link with the $cf_lib_pthread library" >&5
12346 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12347             cf_save_LIBS="$LIBS"
12348
12349 cf_add_libs="-l$cf_lib_pthread"
12350 # Filter out duplicates - this happens with badly-designed ".pc" files...
12351 for cf_add_1lib in $LIBS
12352 do
12353         for cf_add_2lib in $cf_add_libs
12354         do
12355                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12356                 then
12357                         cf_add_1lib=
12358                         break
12359                 fi
12360         done
12361         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12362 done
12363 LIBS="$cf_add_libs"
12364
12365             cat >conftest.$ac_ext <<_ACEOF
12366 #line 12366 "configure"
12367 #include "confdefs.h"
12368
12369 #include <pthread.h>
12370
12371 int
12372 main ()
12373 {
12374
12375                 int rc = pthread_create(0,0,0,0);
12376                 int r2 = pthread_mutexattr_settype(0, 0);
12377
12378   ;
12379   return 0;
12380 }
12381 _ACEOF
12382 rm -f conftest.$ac_objext conftest$ac_exeext
12383 if { (eval echo "$as_me:12383: \"$ac_link\"") >&5
12384   (eval $ac_link) 2>&5
12385   ac_status=$?
12386   echo "$as_me:12386: \$? = $ac_status" >&5
12387   (exit $ac_status); } &&
12388          { ac_try='test -s conftest$ac_exeext'
12389   { (eval echo "$as_me:12389: \"$ac_try\"") >&5
12390   (eval $ac_try) 2>&5
12391   ac_status=$?
12392   echo "$as_me:12392: \$? = $ac_status" >&5
12393   (exit $ac_status); }; }; then
12394   with_pthread=yes
12395 else
12396   echo "$as_me: failed program was:" >&5
12397 cat conftest.$ac_ext >&5
12398 with_pthread=no
12399 fi
12400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12401             LIBS="$cf_save_LIBS"
12402             echo "$as_me:12402: result: $with_pthread" >&5
12403 echo "${ECHO_T}$with_pthread" >&6
12404             test "$with_pthread" = yes && break
12405         done
12406
12407         if test "$with_pthread" = yes ; then
12408
12409 cf_add_libs="-l$cf_lib_pthread"
12410 # Filter out duplicates - this happens with badly-designed ".pc" files...
12411 for cf_add_1lib in $LIBS
12412 do
12413         for cf_add_2lib in $cf_add_libs
12414         do
12415                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12416                 then
12417                         cf_add_1lib=
12418                         break
12419                 fi
12420         done
12421         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12422 done
12423 LIBS="$cf_add_libs"
12424
12425 cat >>confdefs.h <<\EOF
12426 #define HAVE_LIBPTHREADS 1
12427 EOF
12428
12429         else
12430             { { echo "$as_me:12430: error: Cannot link with pthread library" >&5
12431 echo "$as_me: error: Cannot link with pthread library" >&2;}
12432    { (exit 1); exit 1; }; }
12433         fi
12434
12435 fi
12436
12437 fi
12438
12439 if test "x$with_pthread" != xno; then
12440         echo "$as_me:12440: checking for pthread_kill" >&5
12441 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12442 if test "${ac_cv_func_pthread_kill+set}" = set; then
12443   echo $ECHO_N "(cached) $ECHO_C" >&6
12444 else
12445   cat >conftest.$ac_ext <<_ACEOF
12446 #line 12446 "configure"
12447 #include "confdefs.h"
12448 /* System header to define __stub macros and hopefully few prototypes,
12449     which can conflict with char pthread_kill (); below.  */
12450 #include <assert.h>
12451 /* Override any gcc2 internal prototype to avoid an error.  */
12452 #ifdef __cplusplus
12453 extern "C"
12454 #endif
12455 /* We use char because int might match the return type of a gcc2
12456    builtin and then its argument prototype would still apply.  */
12457 char pthread_kill ();
12458 char (*f) ();
12459
12460 int
12461 main ()
12462 {
12463 /* The GNU C library defines this for functions which it implements
12464     to always fail with ENOSYS.  Some functions are actually named
12465     something starting with __ and the normal name is an alias.  */
12466 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12467 choke me
12468 #else
12469 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12470 #endif
12471
12472   ;
12473   return 0;
12474 }
12475 _ACEOF
12476 rm -f conftest.$ac_objext conftest$ac_exeext
12477 if { (eval echo "$as_me:12477: \"$ac_link\"") >&5
12478   (eval $ac_link) 2>&5
12479   ac_status=$?
12480   echo "$as_me:12480: \$? = $ac_status" >&5
12481   (exit $ac_status); } &&
12482          { ac_try='test -s conftest$ac_exeext'
12483   { (eval echo "$as_me:12483: \"$ac_try\"") >&5
12484   (eval $ac_try) 2>&5
12485   ac_status=$?
12486   echo "$as_me:12486: \$? = $ac_status" >&5
12487   (exit $ac_status); }; }; then
12488   ac_cv_func_pthread_kill=yes
12489 else
12490   echo "$as_me: failed program was:" >&5
12491 cat conftest.$ac_ext >&5
12492 ac_cv_func_pthread_kill=no
12493 fi
12494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12495 fi
12496 echo "$as_me:12496: result: $ac_cv_func_pthread_kill" >&5
12497 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12498 if test $ac_cv_func_pthread_kill = yes; then
12499
12500                 echo "$as_me:12500: checking if you want to allow EINTR in wgetch with pthreads" >&5
12501 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12502
12503 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12504 if test "${enable_pthreads_eintr+set}" = set; then
12505   enableval="$enable_pthreads_eintr"
12506   use_pthreads_eintr=$enableval
12507 else
12508   use_pthreads_eintr=no
12509 fi;
12510                 echo "$as_me:12510: result: $use_pthreads_eintr" >&5
12511 echo "${ECHO_T}$use_pthreads_eintr" >&6
12512                 if test "x$use_pthreads_eintr" = xyes ; then
12513
12514 cat >>confdefs.h <<\EOF
12515 #define USE_PTHREADS_EINTR 1
12516 EOF
12517
12518                 fi
12519 fi
12520
12521         echo "$as_me:12521: checking if you want to use weak-symbols for pthreads" >&5
12522 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12523
12524 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12525 if test "${enable_weak_symbols+set}" = set; then
12526   enableval="$enable_weak_symbols"
12527   use_weak_symbols=$enableval
12528 else
12529   use_weak_symbols=no
12530 fi;
12531         echo "$as_me:12531: result: $use_weak_symbols" >&5
12532 echo "${ECHO_T}$use_weak_symbols" >&6
12533         if test "x$use_weak_symbols" = xyes ; then
12534
12535 echo "$as_me:12535: checking if $CC supports weak symbols" >&5
12536 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12537 if test "${cf_cv_weak_symbols+set}" = set; then
12538   echo $ECHO_N "(cached) $ECHO_C" >&6
12539 else
12540
12541 cat >conftest.$ac_ext <<_ACEOF
12542 #line 12542 "configure"
12543 #include "confdefs.h"
12544
12545 #include <stdio.h>
12546 int
12547 main ()
12548 {
12549
12550 #if defined(__GNUC__)
12551 #  if defined __USE_ISOC99
12552 #    define _cat_pragma(exp)    _Pragma(#exp)
12553 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12554 #  else
12555 #    define _weak_pragma(exp)
12556 #  endif
12557 #  define _declare(name)        __extension__ extern __typeof__(name) name
12558 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12559 #endif
12560
12561 weak_symbol(fopen);
12562
12563   ;
12564   return 0;
12565 }
12566 _ACEOF
12567 rm -f conftest.$ac_objext
12568 if { (eval echo "$as_me:12568: \"$ac_compile\"") >&5
12569   (eval $ac_compile) 2>&5
12570   ac_status=$?
12571   echo "$as_me:12571: \$? = $ac_status" >&5
12572   (exit $ac_status); } &&
12573          { ac_try='test -s conftest.$ac_objext'
12574   { (eval echo "$as_me:12574: \"$ac_try\"") >&5
12575   (eval $ac_try) 2>&5
12576   ac_status=$?
12577   echo "$as_me:12577: \$? = $ac_status" >&5
12578   (exit $ac_status); }; }; then
12579   cf_cv_weak_symbols=yes
12580 else
12581   echo "$as_me: failed program was:" >&5
12582 cat conftest.$ac_ext >&5
12583 cf_cv_weak_symbols=no
12584 fi
12585 rm -f conftest.$ac_objext conftest.$ac_ext
12586
12587 fi
12588 echo "$as_me:12588: result: $cf_cv_weak_symbols" >&5
12589 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12590
12591         else
12592                 cf_cv_weak_symbols=no
12593         fi
12594
12595         if test "x$cf_cv_weak_symbols" = xyes ; then
12596
12597 cat >>confdefs.h <<\EOF
12598 #define USE_WEAK_SYMBOLS 1
12599 EOF
12600
12601         fi
12602 fi
12603
12604 PTHREAD=
12605 if test "x$with_pthread" = "xyes" ; then
12606
12607 cat >>confdefs.h <<\EOF
12608 #define USE_PTHREADS 1
12609 EOF
12610
12611     enable_reentrant=yes
12612     if test "x$cf_cv_weak_symbols" = xyes ; then
12613         PTHREAD=-lpthread
12614     fi
12615 fi
12616
12617 # Reentrant code has to be opaque; there's little advantage to making ncurses
12618 # opaque outside of that, so there is no --enable-opaque option.  We can use
12619 # this option without --with-pthreads, but this will be always set for
12620 # pthreads.
12621 echo "$as_me:12621: checking if you want experimental reentrant code" >&5
12622 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12623
12624 # Check whether --enable-reentrant or --disable-reentrant was given.
12625 if test "${enable_reentrant+set}" = set; then
12626   enableval="$enable_reentrant"
12627   with_reentrant=$enableval
12628 else
12629   with_reentrant=no
12630 fi;
12631 echo "$as_me:12631: result: $with_reentrant" >&5
12632 echo "${ECHO_T}$with_reentrant" >&6
12633 if test "x$with_reentrant" = xyes ; then
12634         cf_cv_enable_reentrant=1
12635         cf_cv_enable_opaque="NCURSES_INTERNALS"
12636         NCURSES_OPAQUE=1
12637         NCURSES_SIZE_T=int
12638         if test "x$cf_cv_weak_symbols" = xyes ; then
12639
12640 # remove pthread library from $LIBS
12641 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12642
12643 cf_add_libs="-lpthread"
12644 # Filter out duplicates - this happens with badly-designed ".pc" files...
12645 for cf_add_1lib in $TEST_LIBS
12646 do
12647         for cf_add_2lib in $cf_add_libs
12648         do
12649                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12650                 then
12651                         cf_add_1lib=
12652                         break
12653                 fi
12654         done
12655         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12656 done
12657 TEST_LIBS="$cf_add_libs"
12658
12659 cf_add_libs="-lpthread"
12660 # Filter out duplicates - this happens with badly-designed ".pc" files...
12661 for cf_add_1lib in $TEST_LIBS2
12662 do
12663         for cf_add_2lib in $cf_add_libs
12664         do
12665                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12666                 then
12667                         cf_add_1lib=
12668                         break
12669                 fi
12670         done
12671         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12672 done
12673 TEST_LIBS2="$cf_add_libs"
12674
12675         else
12676                 # when not using weak symbols but with_reentrant,
12677                 # add 't' to the library suffix on all platforms
12678                 # except cygwin, where we only do that if ALSO
12679                 # compiling with full thread support.
12680                 case "$host" in
12681                 *cygwin* | *msys*) #(vi
12682                         if test "$with_pthread" = "yes" ; then
12683                                 if test "x$disable_lib_suffixes" = "xno" ; then
12684                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12685                                 fi
12686                         fi ;;
12687                 *)
12688                         if test "x$disable_lib_suffixes" = "xno" ; then
12689                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12690                         fi
12691                         ;;
12692                 esac
12693         fi
12694
12695 cat >>confdefs.h <<\EOF
12696 #define USE_REENTRANT 1
12697 EOF
12698
12699 if test "${with_abi_version+set}" != set; then
12700         case $cf_cv_rel_version in
12701         5.*)
12702                 cf_cv_rel_version=6.0
12703                 cf_cv_abi_version=6
12704                 { echo "$as_me:12704: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12705 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12706                 ;;
12707         esac
12708 fi
12709
12710 else
12711         cf_cv_enable_reentrant=0
12712         cf_cv_enable_opaque="NCURSES_OPAQUE"
12713         NCURSES_OPAQUE=0
12714         NCURSES_SIZE_T=short
12715 fi
12716
12717 ### Allow using a different wrap-prefix
12718 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12719         echo "$as_me:12719: checking for prefix used to wrap public variables" >&5
12720 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12721
12722 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12723 if test "${with_wrap_prefix+set}" = set; then
12724   withval="$with_wrap_prefix"
12725   NCURSES_WRAP_PREFIX=$withval
12726 else
12727   NCURSES_WRAP_PREFIX=_nc_
12728 fi;
12729         echo "$as_me:12729: result: $NCURSES_WRAP_PREFIX" >&5
12730 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12731 else
12732         NCURSES_WRAP_PREFIX=_nc_
12733 fi
12734
12735 cat >>confdefs.h <<EOF
12736 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12737 EOF
12738
12739 echo "$as_me:12739: checking if you want experimental safe-sprintf code" >&5
12740 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12741
12742 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12743 if test "${enable_safe_sprintf+set}" = set; then
12744   enableval="$enable_safe_sprintf"
12745   with_safe_sprintf=$enableval
12746 else
12747   with_safe_sprintf=no
12748 fi;
12749 echo "$as_me:12749: result: $with_safe_sprintf" >&5
12750 echo "${ECHO_T}$with_safe_sprintf" >&6
12751 test "x$with_safe_sprintf" = xyes &&
12752 cat >>confdefs.h <<\EOF
12753 #define USE_SAFE_SPRINTF 1
12754 EOF
12755
12756 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12757 # when hashmap is used scroll hints are useless
12758 if test "$with_hashmap" = no ; then
12759 echo "$as_me:12759: checking if you want to experiment without scrolling-hints code" >&5
12760 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12761
12762 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12763 if test "${enable_scroll_hints+set}" = set; then
12764   enableval="$enable_scroll_hints"
12765   with_scroll_hints=$enableval
12766 else
12767   with_scroll_hints=yes
12768 fi;
12769 echo "$as_me:12769: result: $with_scroll_hints" >&5
12770 echo "${ECHO_T}$with_scroll_hints" >&6
12771 test "x$with_scroll_hints" = xyes &&
12772 cat >>confdefs.h <<\EOF
12773 #define USE_SCROLL_HINTS 1
12774 EOF
12775
12776 fi
12777
12778 echo "$as_me:12778: checking if you want experimental wgetch-events code" >&5
12779 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12780
12781 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12782 if test "${enable_wgetch_events+set}" = set; then
12783   enableval="$enable_wgetch_events"
12784   with_wgetch_events=$enableval
12785 else
12786   with_wgetch_events=no
12787 fi;
12788 echo "$as_me:12788: result: $with_wgetch_events" >&5
12789 echo "${ECHO_T}$with_wgetch_events" >&6
12790 test "x$with_wgetch_events" = xyes &&
12791 cat >>confdefs.h <<\EOF
12792 #define NCURSES_WGETCH_EVENTS 1
12793 EOF
12794
12795 ###############################################################################
12796
12797 ###     use option --disable-echo to suppress full display compiling commands
12798
12799 echo "$as_me:12799: checking if you want to see long compiling messages" >&5
12800 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12801
12802 # Check whether --enable-echo or --disable-echo was given.
12803 if test "${enable_echo+set}" = set; then
12804   enableval="$enable_echo"
12805   test "$enableval" != no && enableval=yes
12806   if test "$enableval" != "yes" ; then
12807
12808     ECHO_LT='--silent'
12809     ECHO_LD='@echo linking $@;'
12810     RULE_CC='@echo compiling $<'
12811     SHOW_CC='@echo compiling $@'
12812     ECHO_CC='@'
12813
12814   else
12815
12816     ECHO_LT=''
12817     ECHO_LD=''
12818     RULE_CC=''
12819     SHOW_CC=''
12820     ECHO_CC=''
12821
12822   fi
12823 else
12824   enableval=yes
12825
12826     ECHO_LT=''
12827     ECHO_LD=''
12828     RULE_CC=''
12829     SHOW_CC=''
12830     ECHO_CC=''
12831
12832 fi;
12833 echo "$as_me:12833: result: $enableval" >&5
12834 echo "${ECHO_T}$enableval" >&6
12835
12836 if test "x$enable_echo" = xyes; then
12837         ECHO_LINK=
12838 else
12839         ECHO_LINK='@ echo linking $@ ... ;'
12840         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12841         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12842 fi
12843
12844 ###     use option --enable-warnings to turn on all gcc warnings
12845 echo "$as_me:12845: checking if you want to see compiler warnings" >&5
12846 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12847
12848 # Check whether --enable-warnings or --disable-warnings was given.
12849 if test "${enable_warnings+set}" = set; then
12850   enableval="$enable_warnings"
12851   with_warnings=$enableval
12852 fi;
12853 echo "$as_me:12853: result: $with_warnings" >&5
12854 echo "${ECHO_T}$with_warnings" >&6
12855
12856 if test "x$with_warnings" = "xyes"; then
12857
12858         ADAFLAGS="$ADAFLAGS -gnatg"
12859
12860 INTEL_COMPILER=no
12861
12862 if test "$GCC" = yes ; then
12863         case $host_os in
12864         linux*|gnu*)
12865                 echo "$as_me:12865: checking if this is really Intel C compiler" >&5
12866 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12867                 cf_save_CFLAGS="$CFLAGS"
12868                 CFLAGS="$CFLAGS -no-gcc"
12869                 cat >conftest.$ac_ext <<_ACEOF
12870 #line 12870 "configure"
12871 #include "confdefs.h"
12872
12873 int
12874 main ()
12875 {
12876
12877 #ifdef __INTEL_COMPILER
12878 #else
12879 make an error
12880 #endif
12881
12882   ;
12883   return 0;
12884 }
12885 _ACEOF
12886 rm -f conftest.$ac_objext
12887 if { (eval echo "$as_me:12887: \"$ac_compile\"") >&5
12888   (eval $ac_compile) 2>&5
12889   ac_status=$?
12890   echo "$as_me:12890: \$? = $ac_status" >&5
12891   (exit $ac_status); } &&
12892          { ac_try='test -s conftest.$ac_objext'
12893   { (eval echo "$as_me:12893: \"$ac_try\"") >&5
12894   (eval $ac_try) 2>&5
12895   ac_status=$?
12896   echo "$as_me:12896: \$? = $ac_status" >&5
12897   (exit $ac_status); }; }; then
12898   INTEL_COMPILER=yes
12899 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12900
12901 else
12902   echo "$as_me: failed program was:" >&5
12903 cat conftest.$ac_ext >&5
12904 fi
12905 rm -f conftest.$ac_objext conftest.$ac_ext
12906                 CFLAGS="$cf_save_CFLAGS"
12907                 echo "$as_me:12907: result: $INTEL_COMPILER" >&5
12908 echo "${ECHO_T}$INTEL_COMPILER" >&6
12909                 ;;
12910         esac
12911 fi
12912
12913 CLANG_COMPILER=no
12914
12915 if test "$GCC" = yes ; then
12916         echo "$as_me:12916: checking if this is really Clang C compiler" >&5
12917 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12918         cf_save_CFLAGS="$CFLAGS"
12919         CFLAGS="$CFLAGS -Qunused-arguments"
12920         cat >conftest.$ac_ext <<_ACEOF
12921 #line 12921 "configure"
12922 #include "confdefs.h"
12923
12924 int
12925 main ()
12926 {
12927
12928 #ifdef __clang__
12929 #else
12930 make an error
12931 #endif
12932
12933   ;
12934   return 0;
12935 }
12936 _ACEOF
12937 rm -f conftest.$ac_objext
12938 if { (eval echo "$as_me:12938: \"$ac_compile\"") >&5
12939   (eval $ac_compile) 2>&5
12940   ac_status=$?
12941   echo "$as_me:12941: \$? = $ac_status" >&5
12942   (exit $ac_status); } &&
12943          { ac_try='test -s conftest.$ac_objext'
12944   { (eval echo "$as_me:12944: \"$ac_try\"") >&5
12945   (eval $ac_try) 2>&5
12946   ac_status=$?
12947   echo "$as_me:12947: \$? = $ac_status" >&5
12948   (exit $ac_status); }; }; then
12949   CLANG_COMPILER=yes
12950 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12951
12952 else
12953   echo "$as_me: failed program was:" >&5
12954 cat conftest.$ac_ext >&5
12955 fi
12956 rm -f conftest.$ac_objext conftest.$ac_ext
12957         CFLAGS="$cf_save_CFLAGS"
12958         echo "$as_me:12958: result: $CLANG_COMPILER" >&5
12959 echo "${ECHO_T}$CLANG_COMPILER" >&6
12960 fi
12961
12962 cat > conftest.$ac_ext <<EOF
12963 #line 12963 "${as_me:-configure}"
12964 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12965 EOF
12966
12967 if test "$INTEL_COMPILER" = yes
12968 then
12969 # The "-wdXXX" options suppress warnings:
12970 # remark #1419: external declaration in primary source file
12971 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12972 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12973 # remark #193: zero used for undefined preprocessing identifier
12974 # remark #593: variable "curs_sb_left_arrow" was set but never used
12975 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12976 # remark #869: parameter "tw" was never referenced
12977 # remark #981: operands are evaluated in unspecified order
12978 # warning #279: controlling expression is constant
12979
12980         { echo "$as_me:12980: checking for $CC warning options..." >&5
12981 echo "$as_me: checking for $CC warning options..." >&6;}
12982         cf_save_CFLAGS="$CFLAGS"
12983         EXTRA_CFLAGS="-Wall"
12984         for cf_opt in \
12985                 wd1419 \
12986                 wd1683 \
12987                 wd1684 \
12988                 wd193 \
12989                 wd593 \
12990                 wd279 \
12991                 wd810 \
12992                 wd869 \
12993                 wd981
12994         do
12995                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12996                 if { (eval echo "$as_me:12996: \"$ac_compile\"") >&5
12997   (eval $ac_compile) 2>&5
12998   ac_status=$?
12999   echo "$as_me:12999: \$? = $ac_status" >&5
13000   (exit $ac_status); }; then
13001                         test -n "$verbose" && echo "$as_me:13001: result: ... -$cf_opt" >&5
13002 echo "${ECHO_T}... -$cf_opt" >&6
13003                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13004                 fi
13005         done
13006         CFLAGS="$cf_save_CFLAGS"
13007
13008 elif test "$GCC" = yes
13009 then
13010         { echo "$as_me:13010: checking for $CC warning options..." >&5
13011 echo "$as_me: checking for $CC warning options..." >&6;}
13012         cf_save_CFLAGS="$CFLAGS"
13013         EXTRA_CFLAGS=
13014         cf_warn_CONST=""
13015         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13016         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13017         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13018         for cf_opt in W Wall \
13019                 Wbad-function-cast \
13020                 Wcast-align \
13021                 Wcast-qual \
13022                 Wdeclaration-after-statement \
13023                 Wextra \
13024                 Winline \
13025                 Wmissing-declarations \
13026                 Wmissing-prototypes \
13027                 Wnested-externs \
13028                 Wpointer-arith \
13029                 Wshadow \
13030                 Wstrict-prototypes \
13031                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13032         do
13033                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13034                 if { (eval echo "$as_me:13034: \"$ac_compile\"") >&5
13035   (eval $ac_compile) 2>&5
13036   ac_status=$?
13037   echo "$as_me:13037: \$? = $ac_status" >&5
13038   (exit $ac_status); }; then
13039                         test -n "$verbose" && echo "$as_me:13039: result: ... -$cf_opt" >&5
13040 echo "${ECHO_T}... -$cf_opt" >&6
13041                         case $cf_opt in #(vi
13042                         Wcast-qual) #(vi
13043                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13044                                 ;;
13045                         Winline) #(vi
13046                                 case $GCC_VERSION in
13047                                 [34].*)
13048                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13049
13050 echo "${as_me:-configure}:13050: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13051
13052                                         continue;;
13053                                 esac
13054                                 ;;
13055                         Wpointer-arith) #(vi
13056                                 case $GCC_VERSION in
13057                                 [12].*)
13058                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13059
13060 echo "${as_me:-configure}:13060: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13061
13062                                         continue;;
13063                                 esac
13064                                 ;;
13065                         esac
13066                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13067                 fi
13068         done
13069         CFLAGS="$cf_save_CFLAGS"
13070 fi
13071 rm -rf conftest*
13072
13073         if test "x$cf_with_cxx" = xyes ; then
13074
13075 INTEL_CPLUSPLUS=no
13076
13077 if test "$GCC" = yes ; then
13078         case $host_os in
13079         linux*|gnu*)
13080                 echo "$as_me:13080: checking if this is really Intel C++ compiler" >&5
13081 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13082                 cf_save_CFLAGS="$CXXFLAGS"
13083                 CXXFLAGS="$CXXFLAGS -no-gcc"
13084                 cat >conftest.$ac_ext <<_ACEOF
13085 #line 13085 "configure"
13086 #include "confdefs.h"
13087
13088 int
13089 main ()
13090 {
13091
13092 #ifdef __INTEL_COMPILER
13093 #else
13094 make an error
13095 #endif
13096
13097   ;
13098   return 0;
13099 }
13100 _ACEOF
13101 rm -f conftest.$ac_objext
13102 if { (eval echo "$as_me:13102: \"$ac_compile\"") >&5
13103   (eval $ac_compile) 2>&5
13104   ac_status=$?
13105   echo "$as_me:13105: \$? = $ac_status" >&5
13106   (exit $ac_status); } &&
13107          { ac_try='test -s conftest.$ac_objext'
13108   { (eval echo "$as_me:13108: \"$ac_try\"") >&5
13109   (eval $ac_try) 2>&5
13110   ac_status=$?
13111   echo "$as_me:13111: \$? = $ac_status" >&5
13112   (exit $ac_status); }; }; then
13113   INTEL_CPLUSPLUS=yes
13114 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13115
13116 else
13117   echo "$as_me: failed program was:" >&5
13118 cat conftest.$ac_ext >&5
13119 fi
13120 rm -f conftest.$ac_objext conftest.$ac_ext
13121                 CXXFLAGS="$cf_save_CFLAGS"
13122                 echo "$as_me:13122: result: $INTEL_CPLUSPLUS" >&5
13123 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13124                 ;;
13125         esac
13126 fi
13127
13128 CLANG_CPLUSPLUS=no
13129
13130 if test "$GCC" = yes ; then
13131         echo "$as_me:13131: checking if this is really Clang C++ compiler" >&5
13132 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13133         cf_save_CFLAGS="$CXXFLAGS"
13134         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13135         cat >conftest.$ac_ext <<_ACEOF
13136 #line 13136 "configure"
13137 #include "confdefs.h"
13138
13139 int
13140 main ()
13141 {
13142
13143 #ifdef __clang__
13144 #else
13145 make an error
13146 #endif
13147
13148   ;
13149   return 0;
13150 }
13151 _ACEOF
13152 rm -f conftest.$ac_objext
13153 if { (eval echo "$as_me:13153: \"$ac_compile\"") >&5
13154   (eval $ac_compile) 2>&5
13155   ac_status=$?
13156   echo "$as_me:13156: \$? = $ac_status" >&5
13157   (exit $ac_status); } &&
13158          { ac_try='test -s conftest.$ac_objext'
13159   { (eval echo "$as_me:13159: \"$ac_try\"") >&5
13160   (eval $ac_try) 2>&5
13161   ac_status=$?
13162   echo "$as_me:13162: \$? = $ac_status" >&5
13163   (exit $ac_status); }; }; then
13164   CLANG_CPLUSPLUS=yes
13165 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13166
13167 else
13168   echo "$as_me: failed program was:" >&5
13169 cat conftest.$ac_ext >&5
13170 fi
13171 rm -f conftest.$ac_objext conftest.$ac_ext
13172         CXXFLAGS="$cf_save_CFLAGS"
13173         echo "$as_me:13173: result: $CLANG_CPLUSPLUS" >&5
13174 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13175 fi
13176
13177 ac_ext=cc
13178 ac_cpp='$CXXCPP $CPPFLAGS'
13179 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13180 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13181 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13182 ac_main_return=return
13183
13184 cat > conftest.$ac_ext <<EOF
13185 #line 13185 "configure"
13186 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13187 EOF
13188
13189 if test "$INTEL_CPLUSPLUS" = yes
13190 then
13191 # The "-wdXXX" options suppress warnings:
13192 # remark #1419: external declaration in primary source file
13193 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13194 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13195 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13196 # remark #193: zero used for undefined preprocessing identifier
13197 # remark #593: variable "curs_sb_left_arrow" was set but never used
13198 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13199 # remark #869: parameter "tw" was never referenced
13200 # remark #981: operands are evaluated in unspecified order
13201 # warning #269: invalid format string conversion
13202
13203         { echo "$as_me:13203: checking for $CC warning options..." >&5
13204 echo "$as_me: checking for $CC warning options..." >&6;}
13205         cf_save_CXXFLAGS="$CXXFLAGS"
13206         EXTRA_CXXFLAGS="-Wall"
13207         for cf_opt in \
13208                 wd1419 \
13209                 wd1682 \
13210                 wd1683 \
13211                 wd1684 \
13212                 wd193 \
13213                 wd279 \
13214                 wd593 \
13215                 wd810 \
13216                 wd869 \
13217                 wd981
13218         do
13219                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13220                 if { (eval echo "$as_me:13220: \"$ac_compile\"") >&5
13221   (eval $ac_compile) 2>&5
13222   ac_status=$?
13223   echo "$as_me:13223: \$? = $ac_status" >&5
13224   (exit $ac_status); }; then
13225                         test -n "$verbose" && echo "$as_me:13225: result: ... -$cf_opt" >&5
13226 echo "${ECHO_T}... -$cf_opt" >&6
13227                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13228                 fi
13229         done
13230         CXXFLAGS="$cf_save_CXXFLAGS"
13231
13232 elif test "$GXX" = yes
13233 then
13234         { echo "$as_me:13234: checking for $CXX warning options..." >&5
13235 echo "$as_me: checking for $CXX warning options..." >&6;}
13236         cf_save_CXXFLAGS="$CXXFLAGS"
13237         EXTRA_CXXFLAGS="-W -Wall"
13238         cf_gxx_extra_warnings=""
13239         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13240         case "$GCC_VERSION" in
13241         [1-2].*)
13242                 ;;
13243         *)
13244                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13245                 ;;
13246         esac
13247         for cf_opt in \
13248                 Wabi \
13249                 fabi-version=0 \
13250                 Wextra \
13251                 Wignored-qualifiers \
13252                 Wlogical-op \
13253                 Woverloaded-virtual \
13254                 Wsign-promo \
13255                 Wsynth \
13256                 Wold-style-cast \
13257                 Wcast-align \
13258                 Wcast-qual \
13259                 Wpointer-arith \
13260                 Wshadow \
13261                 Wundef $cf_gxx_extra_warnings Wno-unused
13262         do
13263                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13264                 if { (eval echo "$as_me:13264: \"$ac_compile\"") >&5
13265   (eval $ac_compile) 2>&5
13266   ac_status=$?
13267   echo "$as_me:13267: \$? = $ac_status" >&5
13268   (exit $ac_status); }; then
13269                         test -n "$verbose" && echo "$as_me:13269: result: ... -$cf_opt" >&5
13270 echo "${ECHO_T}... -$cf_opt" >&6
13271                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13272                 else
13273                         test -n "$verbose" && echo "$as_me:13273: result: ... no -$cf_opt" >&5
13274 echo "${ECHO_T}... no -$cf_opt" >&6
13275                 fi
13276         done
13277         CXXFLAGS="$cf_save_CXXFLAGS"
13278 fi
13279
13280 rm -rf conftest*
13281 ac_ext=c
13282 ac_cpp='$CPP $CPPFLAGS'
13283 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13284 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13285 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13286 ac_main_return=return
13287
13288         fi
13289 fi
13290
13291 if test "$GCC" = yes
13292 then
13293 cat > conftest.i <<EOF
13294 #ifndef GCC_PRINTF
13295 #define GCC_PRINTF 0
13296 #endif
13297 #ifndef GCC_SCANF
13298 #define GCC_SCANF 0
13299 #endif
13300 #ifndef GCC_NORETURN
13301 #define GCC_NORETURN /* nothing */
13302 #endif
13303 #ifndef GCC_UNUSED
13304 #define GCC_UNUSED /* nothing */
13305 #endif
13306 EOF
13307 if test "$GCC" = yes
13308 then
13309         { echo "$as_me:13309: checking for $CC __attribute__ directives..." >&5
13310 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13311 cat > conftest.$ac_ext <<EOF
13312 #line 13312 "${as_me:-configure}"
13313 #include "confdefs.h"
13314 #include "conftest.h"
13315 #include "conftest.i"
13316 #if     GCC_PRINTF
13317 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13318 #else
13319 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13320 #endif
13321 #if     GCC_SCANF
13322 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13323 #else
13324 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13325 #endif
13326 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13327 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13328 extern void foo(void) GCC_NORETURN;
13329 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13330 EOF
13331         cf_printf_attribute=no
13332         cf_scanf_attribute=no
13333         for cf_attribute in scanf printf unused noreturn
13334         do
13335
13336 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13337
13338                 cf_directive="__attribute__(($cf_attribute))"
13339                 echo "checking for $CC $cf_directive" 1>&5
13340
13341                 case $cf_attribute in #(vi
13342                 printf) #(vi
13343                         cf_printf_attribute=yes
13344                         cat >conftest.h <<EOF
13345 #define GCC_$cf_ATTRIBUTE 1
13346 EOF
13347                         ;;
13348                 scanf) #(vi
13349                         cf_scanf_attribute=yes
13350                         cat >conftest.h <<EOF
13351 #define GCC_$cf_ATTRIBUTE 1
13352 EOF
13353                         ;;
13354                 *) #(vi
13355                         cat >conftest.h <<EOF
13356 #define GCC_$cf_ATTRIBUTE $cf_directive
13357 EOF
13358                         ;;
13359                 esac
13360
13361                 if { (eval echo "$as_me:13361: \"$ac_compile\"") >&5
13362   (eval $ac_compile) 2>&5
13363   ac_status=$?
13364   echo "$as_me:13364: \$? = $ac_status" >&5
13365   (exit $ac_status); }; then
13366                         test -n "$verbose" && echo "$as_me:13366: result: ... $cf_attribute" >&5
13367 echo "${ECHO_T}... $cf_attribute" >&6
13368                         cat conftest.h >>confdefs.h
13369                         case $cf_attribute in #(vi
13370                         noreturn) #(vi
13371
13372 cat >>confdefs.h <<EOF
13373 #define GCC_NORETURN $cf_directive
13374 EOF
13375
13376                                 ;;
13377                         printf) #(vi
13378                                 cf_value='/* nothing */'
13379                                 if test "$cf_printf_attribute" != no ; then
13380                                         cf_value='__attribute__((format(printf,fmt,var)))'
13381
13382 cat >>confdefs.h <<\EOF
13383 #define GCC_PRINTF 1
13384 EOF
13385
13386                                 fi
13387
13388 cat >>confdefs.h <<EOF
13389 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13390 EOF
13391
13392                                 ;;
13393                         scanf) #(vi
13394                                 cf_value='/* nothing */'
13395                                 if test "$cf_scanf_attribute" != no ; then
13396                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13397
13398 cat >>confdefs.h <<\EOF
13399 #define GCC_SCANF 1
13400 EOF
13401
13402                                 fi
13403
13404 cat >>confdefs.h <<EOF
13405 #define GCC_SCANFLIKE(fmt,var) $cf_value
13406 EOF
13407
13408                                 ;;
13409                         unused) #(vi
13410
13411 cat >>confdefs.h <<EOF
13412 #define GCC_UNUSED $cf_directive
13413 EOF
13414
13415                                 ;;
13416                         esac
13417                 fi
13418         done
13419 else
13420         fgrep define conftest.i >>confdefs.h
13421 fi
13422 rm -rf conftest*
13423 fi
13424
13425 echo "$as_me:13425: checking if you want to work around bogus compiler/loader warnings" >&5
13426 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13427
13428 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13429 if test "${enable_string_hacks+set}" = set; then
13430   enableval="$enable_string_hacks"
13431   with_string_hacks=$enableval
13432 else
13433   with_string_hacks=no
13434 fi;
13435 echo "$as_me:13435: result: $with_string_hacks" >&5
13436 echo "${ECHO_T}$with_string_hacks" >&6
13437
13438 if test "x$with_string_hacks" = "xyes"; then
13439
13440 cat >>confdefs.h <<\EOF
13441 #define USE_STRING_HACKS 1
13442 EOF
13443
13444         { echo "$as_me:13444: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13445 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13446
13447 for ac_func in strlcat strlcpy snprintf
13448 do
13449 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13450 echo "$as_me:13450: checking for $ac_func" >&5
13451 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13452 if eval "test \"\${$as_ac_var+set}\" = set"; then
13453   echo $ECHO_N "(cached) $ECHO_C" >&6
13454 else
13455   cat >conftest.$ac_ext <<_ACEOF
13456 #line 13456 "configure"
13457 #include "confdefs.h"
13458 /* System header to define __stub macros and hopefully few prototypes,
13459     which can conflict with char $ac_func (); below.  */
13460 #include <assert.h>
13461 /* Override any gcc2 internal prototype to avoid an error.  */
13462 #ifdef __cplusplus
13463 extern "C"
13464 #endif
13465 /* We use char because int might match the return type of a gcc2
13466    builtin and then its argument prototype would still apply.  */
13467 char $ac_func ();
13468 char (*f) ();
13469
13470 int
13471 main ()
13472 {
13473 /* The GNU C library defines this for functions which it implements
13474     to always fail with ENOSYS.  Some functions are actually named
13475     something starting with __ and the normal name is an alias.  */
13476 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13477 choke me
13478 #else
13479 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13480 #endif
13481
13482   ;
13483   return 0;
13484 }
13485 _ACEOF
13486 rm -f conftest.$ac_objext conftest$ac_exeext
13487 if { (eval echo "$as_me:13487: \"$ac_link\"") >&5
13488   (eval $ac_link) 2>&5
13489   ac_status=$?
13490   echo "$as_me:13490: \$? = $ac_status" >&5
13491   (exit $ac_status); } &&
13492          { ac_try='test -s conftest$ac_exeext'
13493   { (eval echo "$as_me:13493: \"$ac_try\"") >&5
13494   (eval $ac_try) 2>&5
13495   ac_status=$?
13496   echo "$as_me:13496: \$? = $ac_status" >&5
13497   (exit $ac_status); }; }; then
13498   eval "$as_ac_var=yes"
13499 else
13500   echo "$as_me: failed program was:" >&5
13501 cat conftest.$ac_ext >&5
13502 eval "$as_ac_var=no"
13503 fi
13504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13505 fi
13506 echo "$as_me:13506: result: `eval echo '${'$as_ac_var'}'`" >&5
13507 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13508 if test `eval echo '${'$as_ac_var'}'` = yes; then
13509   cat >>confdefs.h <<EOF
13510 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13511 EOF
13512
13513 fi
13514 done
13515
13516 fi
13517
13518 ###     use option --enable-assertions to turn on generation of assertion code
13519 echo "$as_me:13519: checking if you want to enable runtime assertions" >&5
13520 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13521
13522 # Check whether --enable-assertions or --disable-assertions was given.
13523 if test "${enable_assertions+set}" = set; then
13524   enableval="$enable_assertions"
13525   with_assertions=$enableval
13526 else
13527   with_assertions=no
13528 fi;
13529 echo "$as_me:13529: result: $with_assertions" >&5
13530 echo "${ECHO_T}$with_assertions" >&6
13531 if test -n "$GCC"
13532 then
13533         if test "$with_assertions" = no
13534         then
13535                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13536         else
13537
13538         ADAFLAGS="$ADAFLAGS -gnata"
13539
13540         fi
13541 fi
13542
13543 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13544
13545 echo "$as_me:13545: checking if you want to use dmalloc for testing" >&5
13546 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13547
13548 # Check whether --with-dmalloc or --without-dmalloc was given.
13549 if test "${with_dmalloc+set}" = set; then
13550   withval="$with_dmalloc"
13551
13552 cat >>confdefs.h <<EOF
13553 #define USE_DMALLOC 1
13554 EOF
13555
13556         : ${with_cflags:=-g}
13557         : ${with_no_leaks:=yes}
13558          with_dmalloc=yes
13559 else
13560   with_dmalloc=
13561 fi;
13562 echo "$as_me:13562: result: ${with_dmalloc:-no}" >&5
13563 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13564
13565 case .$with_cflags in #(vi
13566 .*-g*)
13567         case .$CFLAGS in #(vi
13568         .*-g*) #(vi
13569                 ;;
13570         *)
13571
13572 cf_fix_cppflags=no
13573 cf_new_cflags=
13574 cf_new_cppflags=
13575 cf_new_extra_cppflags=
13576
13577 for cf_add_cflags in -g
13578 do
13579 case $cf_fix_cppflags in
13580 no)
13581         case $cf_add_cflags in #(vi
13582         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13583                 case $cf_add_cflags in
13584                 -D*)
13585                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13586
13587                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13588                                 && test -z "${cf_tst_cflags}" \
13589                                 && cf_fix_cppflags=yes
13590
13591                         if test $cf_fix_cppflags = yes ; then
13592                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13593                                 continue
13594                         elif test "${cf_tst_cflags}" = "\"'" ; then
13595                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13596                                 continue
13597                         fi
13598                         ;;
13599                 esac
13600                 case "$CPPFLAGS" in
13601                 *$cf_add_cflags) #(vi
13602                         ;;
13603                 *) #(vi
13604                         case $cf_add_cflags in #(vi
13605                         -D*)
13606                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13607
13608 CPPFLAGS=`echo "$CPPFLAGS" | \
13609         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13610                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13611
13612                                 ;;
13613                         esac
13614                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13615                         ;;
13616                 esac
13617                 ;;
13618         *)
13619                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13620                 ;;
13621         esac
13622         ;;
13623 yes)
13624         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13625
13626         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13627
13628         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13629                 && test -z "${cf_tst_cflags}" \
13630                 && cf_fix_cppflags=no
13631         ;;
13632 esac
13633 done
13634
13635 if test -n "$cf_new_cflags" ; then
13636
13637         CFLAGS="$CFLAGS $cf_new_cflags"
13638 fi
13639
13640 if test -n "$cf_new_cppflags" ; then
13641
13642         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13643 fi
13644
13645 if test -n "$cf_new_extra_cppflags" ; then
13646
13647         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13648 fi
13649
13650                 ;;
13651         esac
13652         ;;
13653 esac
13654
13655 if test "$with_dmalloc" = yes ; then
13656         echo "$as_me:13656: checking for dmalloc.h" >&5
13657 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13658 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13659   echo $ECHO_N "(cached) $ECHO_C" >&6
13660 else
13661   cat >conftest.$ac_ext <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13664 #include <dmalloc.h>
13665 _ACEOF
13666 if { (eval echo "$as_me:13666: \"$ac_cpp conftest.$ac_ext\"") >&5
13667   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13668   ac_status=$?
13669   egrep -v '^ *\+' conftest.er1 >conftest.err
13670   rm -f conftest.er1
13671   cat conftest.err >&5
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); } >/dev/null; then
13674   if test -s conftest.err; then
13675     ac_cpp_err=$ac_c_preproc_warn_flag
13676   else
13677     ac_cpp_err=
13678   fi
13679 else
13680   ac_cpp_err=yes
13681 fi
13682 if test -z "$ac_cpp_err"; then
13683   ac_cv_header_dmalloc_h=yes
13684 else
13685   echo "$as_me: failed program was:" >&5
13686   cat conftest.$ac_ext >&5
13687   ac_cv_header_dmalloc_h=no
13688 fi
13689 rm -f conftest.err conftest.$ac_ext
13690 fi
13691 echo "$as_me:13691: result: $ac_cv_header_dmalloc_h" >&5
13692 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13693 if test $ac_cv_header_dmalloc_h = yes; then
13694
13695 echo "$as_me:13695: checking for dmalloc_debug in -ldmalloc" >&5
13696 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13697 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13698   echo $ECHO_N "(cached) $ECHO_C" >&6
13699 else
13700   ac_check_lib_save_LIBS=$LIBS
13701 LIBS="-ldmalloc  $LIBS"
13702 cat >conftest.$ac_ext <<_ACEOF
13703 #line 13703 "configure"
13704 #include "confdefs.h"
13705
13706 /* Override any gcc2 internal prototype to avoid an error.  */
13707 #ifdef __cplusplus
13708 extern "C"
13709 #endif
13710 /* We use char because int might match the return type of a gcc2
13711    builtin and then its argument prototype would still apply.  */
13712 char dmalloc_debug ();
13713 int
13714 main ()
13715 {
13716 dmalloc_debug ();
13717   ;
13718   return 0;
13719 }
13720 _ACEOF
13721 rm -f conftest.$ac_objext conftest$ac_exeext
13722 if { (eval echo "$as_me:13722: \"$ac_link\"") >&5
13723   (eval $ac_link) 2>&5
13724   ac_status=$?
13725   echo "$as_me:13725: \$? = $ac_status" >&5
13726   (exit $ac_status); } &&
13727          { ac_try='test -s conftest$ac_exeext'
13728   { (eval echo "$as_me:13728: \"$ac_try\"") >&5
13729   (eval $ac_try) 2>&5
13730   ac_status=$?
13731   echo "$as_me:13731: \$? = $ac_status" >&5
13732   (exit $ac_status); }; }; then
13733   ac_cv_lib_dmalloc_dmalloc_debug=yes
13734 else
13735   echo "$as_me: failed program was:" >&5
13736 cat conftest.$ac_ext >&5
13737 ac_cv_lib_dmalloc_dmalloc_debug=no
13738 fi
13739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13740 LIBS=$ac_check_lib_save_LIBS
13741 fi
13742 echo "$as_me:13742: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13743 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13744 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13745   cat >>confdefs.h <<EOF
13746 #define HAVE_LIBDMALLOC 1
13747 EOF
13748
13749   LIBS="-ldmalloc $LIBS"
13750
13751 fi
13752
13753 fi
13754
13755 fi
13756
13757 echo "$as_me:13757: checking if you want to use dbmalloc for testing" >&5
13758 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13759
13760 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13761 if test "${with_dbmalloc+set}" = set; then
13762   withval="$with_dbmalloc"
13763
13764 cat >>confdefs.h <<EOF
13765 #define USE_DBMALLOC 1
13766 EOF
13767
13768         : ${with_cflags:=-g}
13769         : ${with_no_leaks:=yes}
13770          with_dbmalloc=yes
13771 else
13772   with_dbmalloc=
13773 fi;
13774 echo "$as_me:13774: result: ${with_dbmalloc:-no}" >&5
13775 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13776
13777 case .$with_cflags in #(vi
13778 .*-g*)
13779         case .$CFLAGS in #(vi
13780         .*-g*) #(vi
13781                 ;;
13782         *)
13783
13784 cf_fix_cppflags=no
13785 cf_new_cflags=
13786 cf_new_cppflags=
13787 cf_new_extra_cppflags=
13788
13789 for cf_add_cflags in -g
13790 do
13791 case $cf_fix_cppflags in
13792 no)
13793         case $cf_add_cflags in #(vi
13794         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13795                 case $cf_add_cflags in
13796                 -D*)
13797                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13798
13799                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13800                                 && test -z "${cf_tst_cflags}" \
13801                                 && cf_fix_cppflags=yes
13802
13803                         if test $cf_fix_cppflags = yes ; then
13804                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13805                                 continue
13806                         elif test "${cf_tst_cflags}" = "\"'" ; then
13807                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13808                                 continue
13809                         fi
13810                         ;;
13811                 esac
13812                 case "$CPPFLAGS" in
13813                 *$cf_add_cflags) #(vi
13814                         ;;
13815                 *) #(vi
13816                         case $cf_add_cflags in #(vi
13817                         -D*)
13818                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13819
13820 CPPFLAGS=`echo "$CPPFLAGS" | \
13821         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13822                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13823
13824                                 ;;
13825                         esac
13826                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13827                         ;;
13828                 esac
13829                 ;;
13830         *)
13831                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13832                 ;;
13833         esac
13834         ;;
13835 yes)
13836         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13837
13838         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13839
13840         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13841                 && test -z "${cf_tst_cflags}" \
13842                 && cf_fix_cppflags=no
13843         ;;
13844 esac
13845 done
13846
13847 if test -n "$cf_new_cflags" ; then
13848
13849         CFLAGS="$CFLAGS $cf_new_cflags"
13850 fi
13851
13852 if test -n "$cf_new_cppflags" ; then
13853
13854         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13855 fi
13856
13857 if test -n "$cf_new_extra_cppflags" ; then
13858
13859         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13860 fi
13861
13862                 ;;
13863         esac
13864         ;;
13865 esac
13866
13867 if test "$with_dbmalloc" = yes ; then
13868         echo "$as_me:13868: checking for dbmalloc.h" >&5
13869 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13870 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13871   echo $ECHO_N "(cached) $ECHO_C" >&6
13872 else
13873   cat >conftest.$ac_ext <<_ACEOF
13874 #line 13874 "configure"
13875 #include "confdefs.h"
13876 #include <dbmalloc.h>
13877 _ACEOF
13878 if { (eval echo "$as_me:13878: \"$ac_cpp conftest.$ac_ext\"") >&5
13879   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13880   ac_status=$?
13881   egrep -v '^ *\+' conftest.er1 >conftest.err
13882   rm -f conftest.er1
13883   cat conftest.err >&5
13884   echo "$as_me:13884: \$? = $ac_status" >&5
13885   (exit $ac_status); } >/dev/null; then
13886   if test -s conftest.err; then
13887     ac_cpp_err=$ac_c_preproc_warn_flag
13888   else
13889     ac_cpp_err=
13890   fi
13891 else
13892   ac_cpp_err=yes
13893 fi
13894 if test -z "$ac_cpp_err"; then
13895   ac_cv_header_dbmalloc_h=yes
13896 else
13897   echo "$as_me: failed program was:" >&5
13898   cat conftest.$ac_ext >&5
13899   ac_cv_header_dbmalloc_h=no
13900 fi
13901 rm -f conftest.err conftest.$ac_ext
13902 fi
13903 echo "$as_me:13903: result: $ac_cv_header_dbmalloc_h" >&5
13904 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13905 if test $ac_cv_header_dbmalloc_h = yes; then
13906
13907 echo "$as_me:13907: checking for debug_malloc in -ldbmalloc" >&5
13908 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13909 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13910   echo $ECHO_N "(cached) $ECHO_C" >&6
13911 else
13912   ac_check_lib_save_LIBS=$LIBS
13913 LIBS="-ldbmalloc  $LIBS"
13914 cat >conftest.$ac_ext <<_ACEOF
13915 #line 13915 "configure"
13916 #include "confdefs.h"
13917
13918 /* Override any gcc2 internal prototype to avoid an error.  */
13919 #ifdef __cplusplus
13920 extern "C"
13921 #endif
13922 /* We use char because int might match the return type of a gcc2
13923    builtin and then its argument prototype would still apply.  */
13924 char debug_malloc ();
13925 int
13926 main ()
13927 {
13928 debug_malloc ();
13929   ;
13930   return 0;
13931 }
13932 _ACEOF
13933 rm -f conftest.$ac_objext conftest$ac_exeext
13934 if { (eval echo "$as_me:13934: \"$ac_link\"") >&5
13935   (eval $ac_link) 2>&5
13936   ac_status=$?
13937   echo "$as_me:13937: \$? = $ac_status" >&5
13938   (exit $ac_status); } &&
13939          { ac_try='test -s conftest$ac_exeext'
13940   { (eval echo "$as_me:13940: \"$ac_try\"") >&5
13941   (eval $ac_try) 2>&5
13942   ac_status=$?
13943   echo "$as_me:13943: \$? = $ac_status" >&5
13944   (exit $ac_status); }; }; then
13945   ac_cv_lib_dbmalloc_debug_malloc=yes
13946 else
13947   echo "$as_me: failed program was:" >&5
13948 cat conftest.$ac_ext >&5
13949 ac_cv_lib_dbmalloc_debug_malloc=no
13950 fi
13951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13952 LIBS=$ac_check_lib_save_LIBS
13953 fi
13954 echo "$as_me:13954: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13955 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13956 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13957   cat >>confdefs.h <<EOF
13958 #define HAVE_LIBDBMALLOC 1
13959 EOF
13960
13961   LIBS="-ldbmalloc $LIBS"
13962
13963 fi
13964
13965 fi
13966
13967 fi
13968
13969 echo "$as_me:13969: checking if you want to use valgrind for testing" >&5
13970 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13971
13972 # Check whether --with-valgrind or --without-valgrind was given.
13973 if test "${with_valgrind+set}" = set; then
13974   withval="$with_valgrind"
13975
13976 cat >>confdefs.h <<EOF
13977 #define USE_VALGRIND 1
13978 EOF
13979
13980         : ${with_cflags:=-g}
13981         : ${with_no_leaks:=yes}
13982          with_valgrind=yes
13983 else
13984   with_valgrind=
13985 fi;
13986 echo "$as_me:13986: result: ${with_valgrind:-no}" >&5
13987 echo "${ECHO_T}${with_valgrind:-no}" >&6
13988
13989 case .$with_cflags in #(vi
13990 .*-g*)
13991         case .$CFLAGS in #(vi
13992         .*-g*) #(vi
13993                 ;;
13994         *)
13995
13996 cf_fix_cppflags=no
13997 cf_new_cflags=
13998 cf_new_cppflags=
13999 cf_new_extra_cppflags=
14000
14001 for cf_add_cflags in -g
14002 do
14003 case $cf_fix_cppflags in
14004 no)
14005         case $cf_add_cflags in #(vi
14006         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14007                 case $cf_add_cflags in
14008                 -D*)
14009                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14010
14011                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14012                                 && test -z "${cf_tst_cflags}" \
14013                                 && cf_fix_cppflags=yes
14014
14015                         if test $cf_fix_cppflags = yes ; then
14016                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14017                                 continue
14018                         elif test "${cf_tst_cflags}" = "\"'" ; then
14019                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14020                                 continue
14021                         fi
14022                         ;;
14023                 esac
14024                 case "$CPPFLAGS" in
14025                 *$cf_add_cflags) #(vi
14026                         ;;
14027                 *) #(vi
14028                         case $cf_add_cflags in #(vi
14029                         -D*)
14030                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14031
14032 CPPFLAGS=`echo "$CPPFLAGS" | \
14033         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14034                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14035
14036                                 ;;
14037                         esac
14038                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14039                         ;;
14040                 esac
14041                 ;;
14042         *)
14043                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14044                 ;;
14045         esac
14046         ;;
14047 yes)
14048         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14049
14050         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14051
14052         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14053                 && test -z "${cf_tst_cflags}" \
14054                 && cf_fix_cppflags=no
14055         ;;
14056 esac
14057 done
14058
14059 if test -n "$cf_new_cflags" ; then
14060
14061         CFLAGS="$CFLAGS $cf_new_cflags"
14062 fi
14063
14064 if test -n "$cf_new_cppflags" ; then
14065
14066         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14067 fi
14068
14069 if test -n "$cf_new_extra_cppflags" ; then
14070
14071         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14072 fi
14073
14074                 ;;
14075         esac
14076         ;;
14077 esac
14078
14079 echo "$as_me:14079: checking if you want to perform memory-leak testing" >&5
14080 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14081
14082 # Check whether --enable-leaks or --disable-leaks was given.
14083 if test "${enable_leaks+set}" = set; then
14084   enableval="$enable_leaks"
14085   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14086 else
14087   : ${with_no_leaks:=no}
14088 fi;
14089 echo "$as_me:14089: result: $with_no_leaks" >&5
14090 echo "${ECHO_T}$with_no_leaks" >&6
14091
14092 if test "$with_no_leaks" = yes ; then
14093
14094 cat >>confdefs.h <<\EOF
14095 #define NO_LEAKS 1
14096 EOF
14097
14098 cat >>confdefs.h <<\EOF
14099 #define YY_NO_LEAKS 1
14100 EOF
14101
14102 fi
14103
14104 cat >>confdefs.h <<\EOF
14105 #define HAVE_NC_ALLOC_H 1
14106 EOF
14107
14108 ###     use option --enable-expanded to generate certain macros as functions
14109
14110 # Check whether --enable-expanded or --disable-expanded was given.
14111 if test "${enable_expanded+set}" = set; then
14112   enableval="$enable_expanded"
14113   test "x$enableval" = xyes &&
14114 cat >>confdefs.h <<\EOF
14115 #define NCURSES_EXPANDED 1
14116 EOF
14117
14118 fi;
14119
14120 ###     use option --disable-macros to suppress macros in favor of functions
14121
14122 # Check whether --enable-macros or --disable-macros was given.
14123 if test "${enable_macros+set}" = set; then
14124   enableval="$enable_macros"
14125   test "$enableval" = no &&
14126 cat >>confdefs.h <<\EOF
14127 #define NCURSES_NOMACROS 1
14128 EOF
14129
14130 fi;
14131
14132 # Normally we only add trace() to the debug-library.  Allow this to be
14133 # extended to all models of the ncurses library:
14134 cf_all_traces=no
14135 case "$CFLAGS $CPPFLAGS" in
14136 *-DTRACE*)
14137         cf_all_traces=yes
14138         ;;
14139 esac
14140
14141 echo "$as_me:14141: checking whether to add trace feature to all models" >&5
14142 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14143
14144 # Check whether --with-trace or --without-trace was given.
14145 if test "${with_trace+set}" = set; then
14146   withval="$with_trace"
14147   cf_with_trace=$withval
14148 else
14149   cf_with_trace=$cf_all_traces
14150 fi;
14151 echo "$as_me:14151: result: $cf_with_trace" >&5
14152 echo "${ECHO_T}$cf_with_trace" >&6
14153
14154 if test "x$cf_with_trace" = xyes ; then
14155         LIB_TRACING=all
14156         ADA_TRACE=TRUE
14157
14158 cf_fix_cppflags=no
14159 cf_new_cflags=
14160 cf_new_cppflags=
14161 cf_new_extra_cppflags=
14162
14163 for cf_add_cflags in -DTRACE
14164 do
14165 case $cf_fix_cppflags in
14166 no)
14167         case $cf_add_cflags in #(vi
14168         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14169                 case $cf_add_cflags in
14170                 -D*)
14171                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14172
14173                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14174                                 && test -z "${cf_tst_cflags}" \
14175                                 && cf_fix_cppflags=yes
14176
14177                         if test $cf_fix_cppflags = yes ; then
14178                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14179                                 continue
14180                         elif test "${cf_tst_cflags}" = "\"'" ; then
14181                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14182                                 continue
14183                         fi
14184                         ;;
14185                 esac
14186                 case "$CPPFLAGS" in
14187                 *$cf_add_cflags) #(vi
14188                         ;;
14189                 *) #(vi
14190                         case $cf_add_cflags in #(vi
14191                         -D*)
14192                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14193
14194 CPPFLAGS=`echo "$CPPFLAGS" | \
14195         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14196                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14197
14198                                 ;;
14199                         esac
14200                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14201                         ;;
14202                 esac
14203                 ;;
14204         *)
14205                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14206                 ;;
14207         esac
14208         ;;
14209 yes)
14210         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14211
14212         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14213
14214         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14215                 && test -z "${cf_tst_cflags}" \
14216                 && cf_fix_cppflags=no
14217         ;;
14218 esac
14219 done
14220
14221 if test -n "$cf_new_cflags" ; then
14222
14223         CFLAGS="$CFLAGS $cf_new_cflags"
14224 fi
14225
14226 if test -n "$cf_new_cppflags" ; then
14227
14228         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14229 fi
14230
14231 if test -n "$cf_new_extra_cppflags" ; then
14232
14233         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14234 fi
14235
14236 else
14237         LIB_TRACING=DEBUG
14238         ADA_TRACE=FALSE
14239 fi
14240
14241 echo "$as_me:14241: checking if we want to use GNAT projects" >&5
14242 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14243
14244 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14245 if test "${enable_gnat_projects+set}" = set; then
14246   enableval="$enable_gnat_projects"
14247   test "$enableval" != no && enableval=yes
14248   if test "$enableval" != "yes" ; then
14249     enable_gnat_projects=no
14250   else
14251     enable_gnat_projects=yes
14252   fi
14253 else
14254   enableval=yes
14255   enable_gnat_projects=yes
14256
14257 fi;
14258 echo "$as_me:14258: result: $enable_gnat_projects" >&5
14259 echo "${ECHO_T}$enable_gnat_projects" >&6
14260
14261 ###     Checks for libraries.
14262 case $cf_cv_system_name in #(vi
14263 *mingw32*|*mingw64*) #(vi
14264         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14265         LIBS=" -lpsapi $LIBS"
14266         ;;
14267 *)
14268 echo "$as_me:14268: checking for gettimeofday" >&5
14269 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14270 if test "${ac_cv_func_gettimeofday+set}" = set; then
14271   echo $ECHO_N "(cached) $ECHO_C" >&6
14272 else
14273   cat >conftest.$ac_ext <<_ACEOF
14274 #line 14274 "configure"
14275 #include "confdefs.h"
14276 /* System header to define __stub macros and hopefully few prototypes,
14277     which can conflict with char gettimeofday (); below.  */
14278 #include <assert.h>
14279 /* Override any gcc2 internal prototype to avoid an error.  */
14280 #ifdef __cplusplus
14281 extern "C"
14282 #endif
14283 /* We use char because int might match the return type of a gcc2
14284    builtin and then its argument prototype would still apply.  */
14285 char gettimeofday ();
14286 char (*f) ();
14287
14288 int
14289 main ()
14290 {
14291 /* The GNU C library defines this for functions which it implements
14292     to always fail with ENOSYS.  Some functions are actually named
14293     something starting with __ and the normal name is an alias.  */
14294 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14295 choke me
14296 #else
14297 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14298 #endif
14299
14300   ;
14301   return 0;
14302 }
14303 _ACEOF
14304 rm -f conftest.$ac_objext conftest$ac_exeext
14305 if { (eval echo "$as_me:14305: \"$ac_link\"") >&5
14306   (eval $ac_link) 2>&5
14307   ac_status=$?
14308   echo "$as_me:14308: \$? = $ac_status" >&5
14309   (exit $ac_status); } &&
14310          { ac_try='test -s conftest$ac_exeext'
14311   { (eval echo "$as_me:14311: \"$ac_try\"") >&5
14312   (eval $ac_try) 2>&5
14313   ac_status=$?
14314   echo "$as_me:14314: \$? = $ac_status" >&5
14315   (exit $ac_status); }; }; then
14316   ac_cv_func_gettimeofday=yes
14317 else
14318   echo "$as_me: failed program was:" >&5
14319 cat conftest.$ac_ext >&5
14320 ac_cv_func_gettimeofday=no
14321 fi
14322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14323 fi
14324 echo "$as_me:14324: result: $ac_cv_func_gettimeofday" >&5
14325 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14326 if test $ac_cv_func_gettimeofday = yes; then
14327
14328 cat >>confdefs.h <<\EOF
14329 #define HAVE_GETTIMEOFDAY 1
14330 EOF
14331
14332 else
14333
14334 echo "$as_me:14334: checking for gettimeofday in -lbsd" >&5
14335 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14336 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14337   echo $ECHO_N "(cached) $ECHO_C" >&6
14338 else
14339   ac_check_lib_save_LIBS=$LIBS
14340 LIBS="-lbsd  $LIBS"
14341 cat >conftest.$ac_ext <<_ACEOF
14342 #line 14342 "configure"
14343 #include "confdefs.h"
14344
14345 /* Override any gcc2 internal prototype to avoid an error.  */
14346 #ifdef __cplusplus
14347 extern "C"
14348 #endif
14349 /* We use char because int might match the return type of a gcc2
14350    builtin and then its argument prototype would still apply.  */
14351 char gettimeofday ();
14352 int
14353 main ()
14354 {
14355 gettimeofday ();
14356   ;
14357   return 0;
14358 }
14359 _ACEOF
14360 rm -f conftest.$ac_objext conftest$ac_exeext
14361 if { (eval echo "$as_me:14361: \"$ac_link\"") >&5
14362   (eval $ac_link) 2>&5
14363   ac_status=$?
14364   echo "$as_me:14364: \$? = $ac_status" >&5
14365   (exit $ac_status); } &&
14366          { ac_try='test -s conftest$ac_exeext'
14367   { (eval echo "$as_me:14367: \"$ac_try\"") >&5
14368   (eval $ac_try) 2>&5
14369   ac_status=$?
14370   echo "$as_me:14370: \$? = $ac_status" >&5
14371   (exit $ac_status); }; }; then
14372   ac_cv_lib_bsd_gettimeofday=yes
14373 else
14374   echo "$as_me: failed program was:" >&5
14375 cat conftest.$ac_ext >&5
14376 ac_cv_lib_bsd_gettimeofday=no
14377 fi
14378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14379 LIBS=$ac_check_lib_save_LIBS
14380 fi
14381 echo "$as_me:14381: result: $ac_cv_lib_bsd_gettimeofday" >&5
14382 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14383 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14384
14385 cat >>confdefs.h <<\EOF
14386 #define HAVE_GETTIMEOFDAY 1
14387 EOF
14388
14389 cf_add_libs="-lbsd"
14390 # Filter out duplicates - this happens with badly-designed ".pc" files...
14391 for cf_add_1lib in $LIBS
14392 do
14393         for cf_add_2lib in $cf_add_libs
14394         do
14395                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14396                 then
14397                         cf_add_1lib=
14398                         break
14399                 fi
14400         done
14401         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14402 done
14403 LIBS="$cf_add_libs"
14404
14405 fi
14406
14407 fi
14408         ;;
14409 esac
14410
14411 echo "$as_me:14411: checking if -lm needed for math functions" >&5
14412 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14413 if test "${cf_cv_need_libm+set}" = set; then
14414   echo $ECHO_N "(cached) $ECHO_C" >&6
14415 else
14416
14417         cat >conftest.$ac_ext <<_ACEOF
14418 #line 14418 "configure"
14419 #include "confdefs.h"
14420
14421         #include <stdio.h>
14422         #include <math.h>
14423
14424 int
14425 main ()
14426 {
14427 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14428   ;
14429   return 0;
14430 }
14431 _ACEOF
14432 rm -f conftest.$ac_objext conftest$ac_exeext
14433 if { (eval echo "$as_me:14433: \"$ac_link\"") >&5
14434   (eval $ac_link) 2>&5
14435   ac_status=$?
14436   echo "$as_me:14436: \$? = $ac_status" >&5
14437   (exit $ac_status); } &&
14438          { ac_try='test -s conftest$ac_exeext'
14439   { (eval echo "$as_me:14439: \"$ac_try\"") >&5
14440   (eval $ac_try) 2>&5
14441   ac_status=$?
14442   echo "$as_me:14442: \$? = $ac_status" >&5
14443   (exit $ac_status); }; }; then
14444   cf_cv_need_libm=no
14445 else
14446   echo "$as_me: failed program was:" >&5
14447 cat conftest.$ac_ext >&5
14448 cf_cv_need_libm=yes
14449 fi
14450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14451 fi
14452 echo "$as_me:14452: result: $cf_cv_need_libm" >&5
14453 echo "${ECHO_T}$cf_cv_need_libm" >&6
14454 if test "$cf_cv_need_libm" = yes
14455 then
14456 MATH_LIB=-lm
14457 fi
14458
14459 ###     Checks for header files.
14460 echo "$as_me:14460: checking for ANSI C header files" >&5
14461 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14462 if test "${ac_cv_header_stdc+set}" = set; then
14463   echo $ECHO_N "(cached) $ECHO_C" >&6
14464 else
14465   cat >conftest.$ac_ext <<_ACEOF
14466 #line 14466 "configure"
14467 #include "confdefs.h"
14468 #include <stdlib.h>
14469 #include <stdarg.h>
14470 #include <string.h>
14471 #include <float.h>
14472
14473 _ACEOF
14474 if { (eval echo "$as_me:14474: \"$ac_cpp conftest.$ac_ext\"") >&5
14475   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14476   ac_status=$?
14477   egrep -v '^ *\+' conftest.er1 >conftest.err
14478   rm -f conftest.er1
14479   cat conftest.err >&5
14480   echo "$as_me:14480: \$? = $ac_status" >&5
14481   (exit $ac_status); } >/dev/null; then
14482   if test -s conftest.err; then
14483     ac_cpp_err=$ac_c_preproc_warn_flag
14484   else
14485     ac_cpp_err=
14486   fi
14487 else
14488   ac_cpp_err=yes
14489 fi
14490 if test -z "$ac_cpp_err"; then
14491   ac_cv_header_stdc=yes
14492 else
14493   echo "$as_me: failed program was:" >&5
14494   cat conftest.$ac_ext >&5
14495   ac_cv_header_stdc=no
14496 fi
14497 rm -f conftest.err conftest.$ac_ext
14498
14499 if test $ac_cv_header_stdc = yes; then
14500   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14501   cat >conftest.$ac_ext <<_ACEOF
14502 #line 14502 "configure"
14503 #include "confdefs.h"
14504 #include <string.h>
14505
14506 _ACEOF
14507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14508   egrep "memchr" >/dev/null 2>&1; then
14509   :
14510 else
14511   ac_cv_header_stdc=no
14512 fi
14513 rm -rf conftest*
14514
14515 fi
14516
14517 if test $ac_cv_header_stdc = yes; then
14518   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14519   cat >conftest.$ac_ext <<_ACEOF
14520 #line 14520 "configure"
14521 #include "confdefs.h"
14522 #include <stdlib.h>
14523
14524 _ACEOF
14525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14526   egrep "free" >/dev/null 2>&1; then
14527   :
14528 else
14529   ac_cv_header_stdc=no
14530 fi
14531 rm -rf conftest*
14532
14533 fi
14534
14535 if test $ac_cv_header_stdc = yes; then
14536   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14537   if test "$cross_compiling" = yes; then
14538   :
14539 else
14540   cat >conftest.$ac_ext <<_ACEOF
14541 #line 14541 "configure"
14542 #include "confdefs.h"
14543 #include <ctype.h>
14544 #if ((' ' & 0x0FF) == 0x020)
14545 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14546 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14547 #else
14548 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14549                      || ('j' <= (c) && (c) <= 'r') \
14550                      || ('s' <= (c) && (c) <= 'z'))
14551 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14552 #endif
14553
14554 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14555 int
14556 main ()
14557 {
14558   int i;
14559   for (i = 0; i < 256; i++)
14560     if (XOR (islower (i), ISLOWER (i))
14561         || toupper (i) != TOUPPER (i))
14562       $ac_main_return(2);
14563   $ac_main_return (0);
14564 }
14565 _ACEOF
14566 rm -f conftest$ac_exeext
14567 if { (eval echo "$as_me:14567: \"$ac_link\"") >&5
14568   (eval $ac_link) 2>&5
14569   ac_status=$?
14570   echo "$as_me:14570: \$? = $ac_status" >&5
14571   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14572   { (eval echo "$as_me:14572: \"$ac_try\"") >&5
14573   (eval $ac_try) 2>&5
14574   ac_status=$?
14575   echo "$as_me:14575: \$? = $ac_status" >&5
14576   (exit $ac_status); }; }; then
14577   :
14578 else
14579   echo "$as_me: program exited with status $ac_status" >&5
14580 echo "$as_me: failed program was:" >&5
14581 cat conftest.$ac_ext >&5
14582 ac_cv_header_stdc=no
14583 fi
14584 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14585 fi
14586 fi
14587 fi
14588 echo "$as_me:14588: result: $ac_cv_header_stdc" >&5
14589 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14590 if test $ac_cv_header_stdc = yes; then
14591
14592 cat >>confdefs.h <<\EOF
14593 #define STDC_HEADERS 1
14594 EOF
14595
14596 fi
14597
14598 ac_header_dirent=no
14599 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14600   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14601 echo "$as_me:14601: checking for $ac_hdr that defines DIR" >&5
14602 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14603 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14604   echo $ECHO_N "(cached) $ECHO_C" >&6
14605 else
14606   cat >conftest.$ac_ext <<_ACEOF
14607 #line 14607 "configure"
14608 #include "confdefs.h"
14609 #include <sys/types.h>
14610 #include <$ac_hdr>
14611
14612 int
14613 main ()
14614 {
14615 if ((DIR *) 0)
14616 return 0;
14617   ;
14618   return 0;
14619 }
14620 _ACEOF
14621 rm -f conftest.$ac_objext
14622 if { (eval echo "$as_me:14622: \"$ac_compile\"") >&5
14623   (eval $ac_compile) 2>&5
14624   ac_status=$?
14625   echo "$as_me:14625: \$? = $ac_status" >&5
14626   (exit $ac_status); } &&
14627          { ac_try='test -s conftest.$ac_objext'
14628   { (eval echo "$as_me:14628: \"$ac_try\"") >&5
14629   (eval $ac_try) 2>&5
14630   ac_status=$?
14631   echo "$as_me:14631: \$? = $ac_status" >&5
14632   (exit $ac_status); }; }; then
14633   eval "$as_ac_Header=yes"
14634 else
14635   echo "$as_me: failed program was:" >&5
14636 cat conftest.$ac_ext >&5
14637 eval "$as_ac_Header=no"
14638 fi
14639 rm -f conftest.$ac_objext conftest.$ac_ext
14640 fi
14641 echo "$as_me:14641: result: `eval echo '${'$as_ac_Header'}'`" >&5
14642 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14643 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14644   cat >>confdefs.h <<EOF
14645 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14646 EOF
14647
14648 ac_header_dirent=$ac_hdr; break
14649 fi
14650
14651 done
14652 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14653 if test $ac_header_dirent = dirent.h; then
14654   echo "$as_me:14654: checking for opendir in -ldir" >&5
14655 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14656 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14657   echo $ECHO_N "(cached) $ECHO_C" >&6
14658 else
14659   ac_check_lib_save_LIBS=$LIBS
14660 LIBS="-ldir  $LIBS"
14661 cat >conftest.$ac_ext <<_ACEOF
14662 #line 14662 "configure"
14663 #include "confdefs.h"
14664
14665 /* Override any gcc2 internal prototype to avoid an error.  */
14666 #ifdef __cplusplus
14667 extern "C"
14668 #endif
14669 /* We use char because int might match the return type of a gcc2
14670    builtin and then its argument prototype would still apply.  */
14671 char opendir ();
14672 int
14673 main ()
14674 {
14675 opendir ();
14676   ;
14677   return 0;
14678 }
14679 _ACEOF
14680 rm -f conftest.$ac_objext conftest$ac_exeext
14681 if { (eval echo "$as_me:14681: \"$ac_link\"") >&5
14682   (eval $ac_link) 2>&5
14683   ac_status=$?
14684   echo "$as_me:14684: \$? = $ac_status" >&5
14685   (exit $ac_status); } &&
14686          { ac_try='test -s conftest$ac_exeext'
14687   { (eval echo "$as_me:14687: \"$ac_try\"") >&5
14688   (eval $ac_try) 2>&5
14689   ac_status=$?
14690   echo "$as_me:14690: \$? = $ac_status" >&5
14691   (exit $ac_status); }; }; then
14692   ac_cv_lib_dir_opendir=yes
14693 else
14694   echo "$as_me: failed program was:" >&5
14695 cat conftest.$ac_ext >&5
14696 ac_cv_lib_dir_opendir=no
14697 fi
14698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14699 LIBS=$ac_check_lib_save_LIBS
14700 fi
14701 echo "$as_me:14701: result: $ac_cv_lib_dir_opendir" >&5
14702 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14703 if test $ac_cv_lib_dir_opendir = yes; then
14704   LIBS="$LIBS -ldir"
14705 fi
14706
14707 else
14708   echo "$as_me:14708: checking for opendir in -lx" >&5
14709 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14710 if test "${ac_cv_lib_x_opendir+set}" = set; then
14711   echo $ECHO_N "(cached) $ECHO_C" >&6
14712 else
14713   ac_check_lib_save_LIBS=$LIBS
14714 LIBS="-lx  $LIBS"
14715 cat >conftest.$ac_ext <<_ACEOF
14716 #line 14716 "configure"
14717 #include "confdefs.h"
14718
14719 /* Override any gcc2 internal prototype to avoid an error.  */
14720 #ifdef __cplusplus
14721 extern "C"
14722 #endif
14723 /* We use char because int might match the return type of a gcc2
14724    builtin and then its argument prototype would still apply.  */
14725 char opendir ();
14726 int
14727 main ()
14728 {
14729 opendir ();
14730   ;
14731   return 0;
14732 }
14733 _ACEOF
14734 rm -f conftest.$ac_objext conftest$ac_exeext
14735 if { (eval echo "$as_me:14735: \"$ac_link\"") >&5
14736   (eval $ac_link) 2>&5
14737   ac_status=$?
14738   echo "$as_me:14738: \$? = $ac_status" >&5
14739   (exit $ac_status); } &&
14740          { ac_try='test -s conftest$ac_exeext'
14741   { (eval echo "$as_me:14741: \"$ac_try\"") >&5
14742   (eval $ac_try) 2>&5
14743   ac_status=$?
14744   echo "$as_me:14744: \$? = $ac_status" >&5
14745   (exit $ac_status); }; }; then
14746   ac_cv_lib_x_opendir=yes
14747 else
14748   echo "$as_me: failed program was:" >&5
14749 cat conftest.$ac_ext >&5
14750 ac_cv_lib_x_opendir=no
14751 fi
14752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14753 LIBS=$ac_check_lib_save_LIBS
14754 fi
14755 echo "$as_me:14755: result: $ac_cv_lib_x_opendir" >&5
14756 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14757 if test $ac_cv_lib_x_opendir = yes; then
14758   LIBS="$LIBS -lx"
14759 fi
14760
14761 fi
14762
14763 echo "$as_me:14763: checking whether time.h and sys/time.h may both be included" >&5
14764 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14765 if test "${ac_cv_header_time+set}" = set; then
14766   echo $ECHO_N "(cached) $ECHO_C" >&6
14767 else
14768   cat >conftest.$ac_ext <<_ACEOF
14769 #line 14769 "configure"
14770 #include "confdefs.h"
14771 #include <sys/types.h>
14772 #include <sys/time.h>
14773 #include <time.h>
14774
14775 int
14776 main ()
14777 {
14778 if ((struct tm *) 0)
14779 return 0;
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784 rm -f conftest.$ac_objext
14785 if { (eval echo "$as_me:14785: \"$ac_compile\"") >&5
14786   (eval $ac_compile) 2>&5
14787   ac_status=$?
14788   echo "$as_me:14788: \$? = $ac_status" >&5
14789   (exit $ac_status); } &&
14790          { ac_try='test -s conftest.$ac_objext'
14791   { (eval echo "$as_me:14791: \"$ac_try\"") >&5
14792   (eval $ac_try) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); }; }; then
14796   ac_cv_header_time=yes
14797 else
14798   echo "$as_me: failed program was:" >&5
14799 cat conftest.$ac_ext >&5
14800 ac_cv_header_time=no
14801 fi
14802 rm -f conftest.$ac_objext conftest.$ac_ext
14803 fi
14804 echo "$as_me:14804: result: $ac_cv_header_time" >&5
14805 echo "${ECHO_T}$ac_cv_header_time" >&6
14806 if test $ac_cv_header_time = yes; then
14807
14808 cat >>confdefs.h <<\EOF
14809 #define TIME_WITH_SYS_TIME 1
14810 EOF
14811
14812 fi
14813
14814 cf_regex_func=no
14815
14816 cf_regex_libs="regex re"
14817 case $host_os in #(vi
14818 mingw*)
14819         cf_regex_libs="gnurx $cf_regex_libs"
14820         ;;
14821 esac
14822
14823 echo "$as_me:14823: checking for regcomp" >&5
14824 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14825 if test "${ac_cv_func_regcomp+set}" = set; then
14826   echo $ECHO_N "(cached) $ECHO_C" >&6
14827 else
14828   cat >conftest.$ac_ext <<_ACEOF
14829 #line 14829 "configure"
14830 #include "confdefs.h"
14831 /* System header to define __stub macros and hopefully few prototypes,
14832     which can conflict with char regcomp (); below.  */
14833 #include <assert.h>
14834 /* Override any gcc2 internal prototype to avoid an error.  */
14835 #ifdef __cplusplus
14836 extern "C"
14837 #endif
14838 /* We use char because int might match the return type of a gcc2
14839    builtin and then its argument prototype would still apply.  */
14840 char regcomp ();
14841 char (*f) ();
14842
14843 int
14844 main ()
14845 {
14846 /* The GNU C library defines this for functions which it implements
14847     to always fail with ENOSYS.  Some functions are actually named
14848     something starting with __ and the normal name is an alias.  */
14849 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14850 choke me
14851 #else
14852 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14853 #endif
14854
14855   ;
14856   return 0;
14857 }
14858 _ACEOF
14859 rm -f conftest.$ac_objext conftest$ac_exeext
14860 if { (eval echo "$as_me:14860: \"$ac_link\"") >&5
14861   (eval $ac_link) 2>&5
14862   ac_status=$?
14863   echo "$as_me:14863: \$? = $ac_status" >&5
14864   (exit $ac_status); } &&
14865          { ac_try='test -s conftest$ac_exeext'
14866   { (eval echo "$as_me:14866: \"$ac_try\"") >&5
14867   (eval $ac_try) 2>&5
14868   ac_status=$?
14869   echo "$as_me:14869: \$? = $ac_status" >&5
14870   (exit $ac_status); }; }; then
14871   ac_cv_func_regcomp=yes
14872 else
14873   echo "$as_me: failed program was:" >&5
14874 cat conftest.$ac_ext >&5
14875 ac_cv_func_regcomp=no
14876 fi
14877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14878 fi
14879 echo "$as_me:14879: result: $ac_cv_func_regcomp" >&5
14880 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14881 if test $ac_cv_func_regcomp = yes; then
14882   cf_regex_func=regcomp
14883 else
14884
14885         for cf_regex_lib in $cf_regex_libs
14886         do
14887                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14888 echo "$as_me:14888: checking for regcomp in -l$cf_regex_lib" >&5
14889 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14890 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14891   echo $ECHO_N "(cached) $ECHO_C" >&6
14892 else
14893   ac_check_lib_save_LIBS=$LIBS
14894 LIBS="-l$cf_regex_lib  $LIBS"
14895 cat >conftest.$ac_ext <<_ACEOF
14896 #line 14896 "configure"
14897 #include "confdefs.h"
14898
14899 /* Override any gcc2 internal prototype to avoid an error.  */
14900 #ifdef __cplusplus
14901 extern "C"
14902 #endif
14903 /* We use char because int might match the return type of a gcc2
14904    builtin and then its argument prototype would still apply.  */
14905 char regcomp ();
14906 int
14907 main ()
14908 {
14909 regcomp ();
14910   ;
14911   return 0;
14912 }
14913 _ACEOF
14914 rm -f conftest.$ac_objext conftest$ac_exeext
14915 if { (eval echo "$as_me:14915: \"$ac_link\"") >&5
14916   (eval $ac_link) 2>&5
14917   ac_status=$?
14918   echo "$as_me:14918: \$? = $ac_status" >&5
14919   (exit $ac_status); } &&
14920          { ac_try='test -s conftest$ac_exeext'
14921   { (eval echo "$as_me:14921: \"$ac_try\"") >&5
14922   (eval $ac_try) 2>&5
14923   ac_status=$?
14924   echo "$as_me:14924: \$? = $ac_status" >&5
14925   (exit $ac_status); }; }; then
14926   eval "$as_ac_Lib=yes"
14927 else
14928   echo "$as_me: failed program was:" >&5
14929 cat conftest.$ac_ext >&5
14930 eval "$as_ac_Lib=no"
14931 fi
14932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14933 LIBS=$ac_check_lib_save_LIBS
14934 fi
14935 echo "$as_me:14935: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14936 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14937 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14938
14939 cf_add_libs="-l$cf_regex_lib"
14940 # Filter out duplicates - this happens with badly-designed ".pc" files...
14941 for cf_add_1lib in $LIBS
14942 do
14943         for cf_add_2lib in $cf_add_libs
14944         do
14945                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14946                 then
14947                         cf_add_1lib=
14948                         break
14949                 fi
14950         done
14951         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14952 done
14953 LIBS="$cf_add_libs"
14954
14955                                 cf_regex_func=regcomp
14956                                 break
14957 fi
14958
14959         done
14960
14961 fi
14962
14963 if test "$cf_regex_func" = no ; then
14964         echo "$as_me:14964: checking for compile" >&5
14965 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14966 if test "${ac_cv_func_compile+set}" = set; then
14967   echo $ECHO_N "(cached) $ECHO_C" >&6
14968 else
14969   cat >conftest.$ac_ext <<_ACEOF
14970 #line 14970 "configure"
14971 #include "confdefs.h"
14972 /* System header to define __stub macros and hopefully few prototypes,
14973     which can conflict with char compile (); below.  */
14974 #include <assert.h>
14975 /* Override any gcc2 internal prototype to avoid an error.  */
14976 #ifdef __cplusplus
14977 extern "C"
14978 #endif
14979 /* We use char because int might match the return type of a gcc2
14980    builtin and then its argument prototype would still apply.  */
14981 char compile ();
14982 char (*f) ();
14983
14984 int
14985 main ()
14986 {
14987 /* The GNU C library defines this for functions which it implements
14988     to always fail with ENOSYS.  Some functions are actually named
14989     something starting with __ and the normal name is an alias.  */
14990 #if defined (__stub_compile) || defined (__stub___compile)
14991 choke me
14992 #else
14993 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14994 #endif
14995
14996   ;
14997   return 0;
14998 }
14999 _ACEOF
15000 rm -f conftest.$ac_objext conftest$ac_exeext
15001 if { (eval echo "$as_me:15001: \"$ac_link\"") >&5
15002   (eval $ac_link) 2>&5
15003   ac_status=$?
15004   echo "$as_me:15004: \$? = $ac_status" >&5
15005   (exit $ac_status); } &&
15006          { ac_try='test -s conftest$ac_exeext'
15007   { (eval echo "$as_me:15007: \"$ac_try\"") >&5
15008   (eval $ac_try) 2>&5
15009   ac_status=$?
15010   echo "$as_me:15010: \$? = $ac_status" >&5
15011   (exit $ac_status); }; }; then
15012   ac_cv_func_compile=yes
15013 else
15014   echo "$as_me: failed program was:" >&5
15015 cat conftest.$ac_ext >&5
15016 ac_cv_func_compile=no
15017 fi
15018 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15019 fi
15020 echo "$as_me:15020: result: $ac_cv_func_compile" >&5
15021 echo "${ECHO_T}$ac_cv_func_compile" >&6
15022 if test $ac_cv_func_compile = yes; then
15023   cf_regex_func=compile
15024 else
15025
15026                 echo "$as_me:15026: checking for compile in -lgen" >&5
15027 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15028 if test "${ac_cv_lib_gen_compile+set}" = set; then
15029   echo $ECHO_N "(cached) $ECHO_C" >&6
15030 else
15031   ac_check_lib_save_LIBS=$LIBS
15032 LIBS="-lgen  $LIBS"
15033 cat >conftest.$ac_ext <<_ACEOF
15034 #line 15034 "configure"
15035 #include "confdefs.h"
15036
15037 /* Override any gcc2 internal prototype to avoid an error.  */
15038 #ifdef __cplusplus
15039 extern "C"
15040 #endif
15041 /* We use char because int might match the return type of a gcc2
15042    builtin and then its argument prototype would still apply.  */
15043 char compile ();
15044 int
15045 main ()
15046 {
15047 compile ();
15048   ;
15049   return 0;
15050 }
15051 _ACEOF
15052 rm -f conftest.$ac_objext conftest$ac_exeext
15053 if { (eval echo "$as_me:15053: \"$ac_link\"") >&5
15054   (eval $ac_link) 2>&5
15055   ac_status=$?
15056   echo "$as_me:15056: \$? = $ac_status" >&5
15057   (exit $ac_status); } &&
15058          { ac_try='test -s conftest$ac_exeext'
15059   { (eval echo "$as_me:15059: \"$ac_try\"") >&5
15060   (eval $ac_try) 2>&5
15061   ac_status=$?
15062   echo "$as_me:15062: \$? = $ac_status" >&5
15063   (exit $ac_status); }; }; then
15064   ac_cv_lib_gen_compile=yes
15065 else
15066   echo "$as_me: failed program was:" >&5
15067 cat conftest.$ac_ext >&5
15068 ac_cv_lib_gen_compile=no
15069 fi
15070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15071 LIBS=$ac_check_lib_save_LIBS
15072 fi
15073 echo "$as_me:15073: result: $ac_cv_lib_gen_compile" >&5
15074 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15075 if test $ac_cv_lib_gen_compile = yes; then
15076
15077 cf_add_libs="-lgen"
15078 # Filter out duplicates - this happens with badly-designed ".pc" files...
15079 for cf_add_1lib in $LIBS
15080 do
15081         for cf_add_2lib in $cf_add_libs
15082         do
15083                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15084                 then
15085                         cf_add_1lib=
15086                         break
15087                 fi
15088         done
15089         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15090 done
15091 LIBS="$cf_add_libs"
15092
15093                                 cf_regex_func=compile
15094 fi
15095
15096 fi
15097
15098 fi
15099
15100 if test "$cf_regex_func" = no ; then
15101         { echo "$as_me:15101: WARNING: cannot find regular expression library" >&5
15102 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15103 fi
15104
15105 echo "$as_me:15105: checking for regular-expression headers" >&5
15106 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15107 if test "${cf_cv_regex_hdrs+set}" = set; then
15108   echo $ECHO_N "(cached) $ECHO_C" >&6
15109 else
15110
15111 cf_cv_regex_hdrs=no
15112 case $cf_regex_func in #(vi
15113 compile) #(vi
15114         for cf_regex_hdr in regexp.h regexpr.h
15115         do
15116                 cat >conftest.$ac_ext <<_ACEOF
15117 #line 15117 "configure"
15118 #include "confdefs.h"
15119 #include <$cf_regex_hdr>
15120 int
15121 main ()
15122 {
15123
15124                         char *p = compile("", "", "", 0);
15125                         int x = step("", "");
15126
15127   ;
15128   return 0;
15129 }
15130 _ACEOF
15131 rm -f conftest.$ac_objext conftest$ac_exeext
15132 if { (eval echo "$as_me:15132: \"$ac_link\"") >&5
15133   (eval $ac_link) 2>&5
15134   ac_status=$?
15135   echo "$as_me:15135: \$? = $ac_status" >&5
15136   (exit $ac_status); } &&
15137          { ac_try='test -s conftest$ac_exeext'
15138   { (eval echo "$as_me:15138: \"$ac_try\"") >&5
15139   (eval $ac_try) 2>&5
15140   ac_status=$?
15141   echo "$as_me:15141: \$? = $ac_status" >&5
15142   (exit $ac_status); }; }; then
15143
15144                         cf_cv_regex_hdrs=$cf_regex_hdr
15145                         break
15146
15147 else
15148   echo "$as_me: failed program was:" >&5
15149 cat conftest.$ac_ext >&5
15150 fi
15151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15152         done
15153         ;;
15154 *)
15155         for cf_regex_hdr in regex.h
15156         do
15157                 cat >conftest.$ac_ext <<_ACEOF
15158 #line 15158 "configure"
15159 #include "confdefs.h"
15160 #include <sys/types.h>
15161 #include <$cf_regex_hdr>
15162 int
15163 main ()
15164 {
15165
15166                         regex_t *p;
15167                         int x = regcomp(p, "", 0);
15168                         int y = regexec(p, "", 0, 0, 0);
15169                         regfree(p);
15170
15171   ;
15172   return 0;
15173 }
15174 _ACEOF
15175 rm -f conftest.$ac_objext conftest$ac_exeext
15176 if { (eval echo "$as_me:15176: \"$ac_link\"") >&5
15177   (eval $ac_link) 2>&5
15178   ac_status=$?
15179   echo "$as_me:15179: \$? = $ac_status" >&5
15180   (exit $ac_status); } &&
15181          { ac_try='test -s conftest$ac_exeext'
15182   { (eval echo "$as_me:15182: \"$ac_try\"") >&5
15183   (eval $ac_try) 2>&5
15184   ac_status=$?
15185   echo "$as_me:15185: \$? = $ac_status" >&5
15186   (exit $ac_status); }; }; then
15187
15188                         cf_cv_regex_hdrs=$cf_regex_hdr
15189                         break
15190
15191 else
15192   echo "$as_me: failed program was:" >&5
15193 cat conftest.$ac_ext >&5
15194 fi
15195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15196         done
15197         ;;
15198 esac
15199
15200 fi
15201 echo "$as_me:15201: result: $cf_cv_regex_hdrs" >&5
15202 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15203
15204 case $cf_cv_regex_hdrs in #(vi
15205     no)        { echo "$as_me:15205: WARNING: no regular expression header found" >&5
15206 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
15207     regex.h)
15208 cat >>confdefs.h <<\EOF
15209 #define HAVE_REGEX_H_FUNCS 1
15210 EOF
15211  ;; #(vi
15212     regexp.h)
15213 cat >>confdefs.h <<\EOF
15214 #define HAVE_REGEXP_H_FUNCS 1
15215 EOF
15216  ;; #(vi
15217     regexpr.h)
15218 cat >>confdefs.h <<\EOF
15219 #define HAVE_REGEXPR_H_FUNCS 1
15220 EOF
15221  ;;
15222 esac
15223
15224 for ac_header in \
15225 fcntl.h \
15226 getopt.h \
15227 limits.h \
15228 locale.h \
15229 math.h \
15230 poll.h \
15231 sys/bsdtypes.h \
15232 sys/ioctl.h \
15233 sys/param.h \
15234 sys/poll.h \
15235 sys/select.h \
15236 sys/time.h \
15237 sys/times.h \
15238 ttyent.h \
15239 unistd.h \
15240 wctype.h \
15241
15242 do
15243 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15244 echo "$as_me:15244: checking for $ac_header" >&5
15245 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15246 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15247   echo $ECHO_N "(cached) $ECHO_C" >&6
15248 else
15249   cat >conftest.$ac_ext <<_ACEOF
15250 #line 15250 "configure"
15251 #include "confdefs.h"
15252 #include <$ac_header>
15253 _ACEOF
15254 if { (eval echo "$as_me:15254: \"$ac_cpp conftest.$ac_ext\"") >&5
15255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15256   ac_status=$?
15257   egrep -v '^ *\+' conftest.er1 >conftest.err
15258   rm -f conftest.er1
15259   cat conftest.err >&5
15260   echo "$as_me:15260: \$? = $ac_status" >&5
15261   (exit $ac_status); } >/dev/null; then
15262   if test -s conftest.err; then
15263     ac_cpp_err=$ac_c_preproc_warn_flag
15264   else
15265     ac_cpp_err=
15266   fi
15267 else
15268   ac_cpp_err=yes
15269 fi
15270 if test -z "$ac_cpp_err"; then
15271   eval "$as_ac_Header=yes"
15272 else
15273   echo "$as_me: failed program was:" >&5
15274   cat conftest.$ac_ext >&5
15275   eval "$as_ac_Header=no"
15276 fi
15277 rm -f conftest.err conftest.$ac_ext
15278 fi
15279 echo "$as_me:15279: result: `eval echo '${'$as_ac_Header'}'`" >&5
15280 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15281 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15282   cat >>confdefs.h <<EOF
15283 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15284 EOF
15285
15286 fi
15287 done
15288
15289 for ac_header in unistd.h getopt.h
15290 do
15291 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15292 echo "$as_me:15292: checking for $ac_header" >&5
15293 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15294 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15295   echo $ECHO_N "(cached) $ECHO_C" >&6
15296 else
15297   cat >conftest.$ac_ext <<_ACEOF
15298 #line 15298 "configure"
15299 #include "confdefs.h"
15300 #include <$ac_header>
15301 _ACEOF
15302 if { (eval echo "$as_me:15302: \"$ac_cpp conftest.$ac_ext\"") >&5
15303   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15304   ac_status=$?
15305   egrep -v '^ *\+' conftest.er1 >conftest.err
15306   rm -f conftest.er1
15307   cat conftest.err >&5
15308   echo "$as_me:15308: \$? = $ac_status" >&5
15309   (exit $ac_status); } >/dev/null; then
15310   if test -s conftest.err; then
15311     ac_cpp_err=$ac_c_preproc_warn_flag
15312   else
15313     ac_cpp_err=
15314   fi
15315 else
15316   ac_cpp_err=yes
15317 fi
15318 if test -z "$ac_cpp_err"; then
15319   eval "$as_ac_Header=yes"
15320 else
15321   echo "$as_me: failed program was:" >&5
15322   cat conftest.$ac_ext >&5
15323   eval "$as_ac_Header=no"
15324 fi
15325 rm -f conftest.err conftest.$ac_ext
15326 fi
15327 echo "$as_me:15327: result: `eval echo '${'$as_ac_Header'}'`" >&5
15328 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15329 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15330   cat >>confdefs.h <<EOF
15331 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15332 EOF
15333
15334 fi
15335 done
15336
15337 echo "$as_me:15337: checking for header declaring getopt variables" >&5
15338 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15339 if test "${cf_cv_getopt_header+set}" = set; then
15340   echo $ECHO_N "(cached) $ECHO_C" >&6
15341 else
15342
15343 cf_cv_getopt_header=none
15344 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15345 do
15346 cat >conftest.$ac_ext <<_ACEOF
15347 #line 15347 "configure"
15348 #include "confdefs.h"
15349
15350 #include <$cf_header>
15351 int
15352 main ()
15353 {
15354 int x = optind; char *y = optarg
15355   ;
15356   return 0;
15357 }
15358 _ACEOF
15359 rm -f conftest.$ac_objext
15360 if { (eval echo "$as_me:15360: \"$ac_compile\"") >&5
15361   (eval $ac_compile) 2>&5
15362   ac_status=$?
15363   echo "$as_me:15363: \$? = $ac_status" >&5
15364   (exit $ac_status); } &&
15365          { ac_try='test -s conftest.$ac_objext'
15366   { (eval echo "$as_me:15366: \"$ac_try\"") >&5
15367   (eval $ac_try) 2>&5
15368   ac_status=$?
15369   echo "$as_me:15369: \$? = $ac_status" >&5
15370   (exit $ac_status); }; }; then
15371   cf_cv_getopt_header=$cf_header
15372  break
15373 else
15374   echo "$as_me: failed program was:" >&5
15375 cat conftest.$ac_ext >&5
15376 fi
15377 rm -f conftest.$ac_objext conftest.$ac_ext
15378 done
15379
15380 fi
15381 echo "$as_me:15381: result: $cf_cv_getopt_header" >&5
15382 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15383 if test $cf_cv_getopt_header != none ; then
15384
15385 cat >>confdefs.h <<\EOF
15386 #define HAVE_GETOPT_HEADER 1
15387 EOF
15388
15389 fi
15390 if test $cf_cv_getopt_header = getopt.h ; then
15391
15392 cat >>confdefs.h <<\EOF
15393 #define NEED_GETOPT_H 1
15394 EOF
15395
15396 fi
15397
15398 # check for ISC (this may also define _POSIX_SOURCE)
15399 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15400 if test "x$ISC" = xyes ; then
15401
15402 echo "$as_me:15402: checking for main in -lcposix" >&5
15403 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15404 if test "${ac_cv_lib_cposix_main+set}" = set; then
15405   echo $ECHO_N "(cached) $ECHO_C" >&6
15406 else
15407   ac_check_lib_save_LIBS=$LIBS
15408 LIBS="-lcposix  $LIBS"
15409 cat >conftest.$ac_ext <<_ACEOF
15410 #line 15410 "configure"
15411 #include "confdefs.h"
15412
15413 int
15414 main ()
15415 {
15416 main ();
15417   ;
15418   return 0;
15419 }
15420 _ACEOF
15421 rm -f conftest.$ac_objext conftest$ac_exeext
15422 if { (eval echo "$as_me:15422: \"$ac_link\"") >&5
15423   (eval $ac_link) 2>&5
15424   ac_status=$?
15425   echo "$as_me:15425: \$? = $ac_status" >&5
15426   (exit $ac_status); } &&
15427          { ac_try='test -s conftest$ac_exeext'
15428   { (eval echo "$as_me:15428: \"$ac_try\"") >&5
15429   (eval $ac_try) 2>&5
15430   ac_status=$?
15431   echo "$as_me:15431: \$? = $ac_status" >&5
15432   (exit $ac_status); }; }; then
15433   ac_cv_lib_cposix_main=yes
15434 else
15435   echo "$as_me: failed program was:" >&5
15436 cat conftest.$ac_ext >&5
15437 ac_cv_lib_cposix_main=no
15438 fi
15439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15440 LIBS=$ac_check_lib_save_LIBS
15441 fi
15442 echo "$as_me:15442: result: $ac_cv_lib_cposix_main" >&5
15443 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15444 if test $ac_cv_lib_cposix_main = yes; then
15445   cat >>confdefs.h <<EOF
15446 #define HAVE_LIBCPOSIX 1
15447 EOF
15448
15449   LIBS="-lcposix $LIBS"
15450
15451 fi
15452
15453         echo "$as_me:15453: checking for bzero in -linet" >&5
15454 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15455 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15456   echo $ECHO_N "(cached) $ECHO_C" >&6
15457 else
15458   ac_check_lib_save_LIBS=$LIBS
15459 LIBS="-linet  $LIBS"
15460 cat >conftest.$ac_ext <<_ACEOF
15461 #line 15461 "configure"
15462 #include "confdefs.h"
15463
15464 /* Override any gcc2 internal prototype to avoid an error.  */
15465 #ifdef __cplusplus
15466 extern "C"
15467 #endif
15468 /* We use char because int might match the return type of a gcc2
15469    builtin and then its argument prototype would still apply.  */
15470 char bzero ();
15471 int
15472 main ()
15473 {
15474 bzero ();
15475   ;
15476   return 0;
15477 }
15478 _ACEOF
15479 rm -f conftest.$ac_objext conftest$ac_exeext
15480 if { (eval echo "$as_me:15480: \"$ac_link\"") >&5
15481   (eval $ac_link) 2>&5
15482   ac_status=$?
15483   echo "$as_me:15483: \$? = $ac_status" >&5
15484   (exit $ac_status); } &&
15485          { ac_try='test -s conftest$ac_exeext'
15486   { (eval echo "$as_me:15486: \"$ac_try\"") >&5
15487   (eval $ac_try) 2>&5
15488   ac_status=$?
15489   echo "$as_me:15489: \$? = $ac_status" >&5
15490   (exit $ac_status); }; }; then
15491   ac_cv_lib_inet_bzero=yes
15492 else
15493   echo "$as_me: failed program was:" >&5
15494 cat conftest.$ac_ext >&5
15495 ac_cv_lib_inet_bzero=no
15496 fi
15497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15498 LIBS=$ac_check_lib_save_LIBS
15499 fi
15500 echo "$as_me:15500: result: $ac_cv_lib_inet_bzero" >&5
15501 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15502 if test $ac_cv_lib_inet_bzero = yes; then
15503
15504 cf_add_libs="-linet"
15505 # Filter out duplicates - this happens with badly-designed ".pc" files...
15506 for cf_add_1lib in $LIBS
15507 do
15508         for cf_add_2lib in $cf_add_libs
15509         do
15510                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15511                 then
15512                         cf_add_1lib=
15513                         break
15514                 fi
15515         done
15516         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15517 done
15518 LIBS="$cf_add_libs"
15519
15520 fi
15521 fi
15522
15523 echo "$as_me:15523: checking if sys/time.h works with sys/select.h" >&5
15524 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15525 if test "${cf_cv_sys_time_select+set}" = set; then
15526   echo $ECHO_N "(cached) $ECHO_C" >&6
15527 else
15528
15529 cat >conftest.$ac_ext <<_ACEOF
15530 #line 15530 "configure"
15531 #include "confdefs.h"
15532
15533 #include <sys/types.h>
15534 #ifdef HAVE_SYS_TIME_H
15535 #include <sys/time.h>
15536 #endif
15537 #ifdef HAVE_SYS_SELECT_H
15538 #include <sys/select.h>
15539 #endif
15540
15541 int
15542 main ()
15543 {
15544
15545   ;
15546   return 0;
15547 }
15548 _ACEOF
15549 rm -f conftest.$ac_objext
15550 if { (eval echo "$as_me:15550: \"$ac_compile\"") >&5
15551   (eval $ac_compile) 2>&5
15552   ac_status=$?
15553   echo "$as_me:15553: \$? = $ac_status" >&5
15554   (exit $ac_status); } &&
15555          { ac_try='test -s conftest.$ac_objext'
15556   { (eval echo "$as_me:15556: \"$ac_try\"") >&5
15557   (eval $ac_try) 2>&5
15558   ac_status=$?
15559   echo "$as_me:15559: \$? = $ac_status" >&5
15560   (exit $ac_status); }; }; then
15561   cf_cv_sys_time_select=yes
15562 else
15563   echo "$as_me: failed program was:" >&5
15564 cat conftest.$ac_ext >&5
15565 cf_cv_sys_time_select=no
15566 fi
15567 rm -f conftest.$ac_objext conftest.$ac_ext
15568
15569 fi
15570
15571 echo "$as_me:15571: result: $cf_cv_sys_time_select" >&5
15572 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15573 test "$cf_cv_sys_time_select" = yes &&
15574 cat >>confdefs.h <<\EOF
15575 #define HAVE_SYS_TIME_SELECT 1
15576 EOF
15577
15578 ###     checks for compiler characteristics
15579 ac_ext=c
15580 ac_cpp='$CPP $CPPFLAGS'
15581 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15582 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15583 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15584 ac_main_return=return
15585
15586 echo "$as_me:15586: checking for an ANSI C-conforming const" >&5
15587 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15588 if test "${ac_cv_c_const+set}" = set; then
15589   echo $ECHO_N "(cached) $ECHO_C" >&6
15590 else
15591   cat >conftest.$ac_ext <<_ACEOF
15592 #line 15592 "configure"
15593 #include "confdefs.h"
15594
15595 int
15596 main ()
15597 {
15598 /* FIXME: Include the comments suggested by Paul. */
15599 #ifndef __cplusplus
15600   /* Ultrix mips cc rejects this.  */
15601   typedef int charset[2];
15602   const charset x;
15603   /* SunOS 4.1.1 cc rejects this.  */
15604   char const *const *ccp;
15605   char **p;
15606   /* NEC SVR4.0.2 mips cc rejects this.  */
15607   struct point {int x, y;};
15608   static struct point const zero = {0,0};
15609   /* AIX XL C 1.02.0.0 rejects this.
15610      It does not let you subtract one const X* pointer from another in
15611      an arm of an if-expression whose if-part is not a constant
15612      expression */
15613   const char *g = "string";
15614   ccp = &g + (g ? g-g : 0);
15615   /* HPUX 7.0 cc rejects these. */
15616   ++ccp;
15617   p = (char**) ccp;
15618   ccp = (char const *const *) p;
15619   { /* SCO 3.2v4 cc rejects this.  */
15620     char *t;
15621     char const *s = 0 ? (char *) 0 : (char const *) 0;
15622
15623     *t++ = 0;
15624   }
15625   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15626     int x[] = {25, 17};
15627     const int *foo = &x[0];
15628     ++foo;
15629   }
15630   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15631     typedef const int *iptr;
15632     iptr p = 0;
15633     ++p;
15634   }
15635   { /* AIX XL C 1.02.0.0 rejects this saying
15636        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15637     struct s { int j; const int *ap[3]; };
15638     struct s *b; b->j = 5;
15639   }
15640   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15641     const int foo = 10;
15642   }
15643 #endif
15644
15645   ;
15646   return 0;
15647 }
15648 _ACEOF
15649 rm -f conftest.$ac_objext
15650 if { (eval echo "$as_me:15650: \"$ac_compile\"") >&5
15651   (eval $ac_compile) 2>&5
15652   ac_status=$?
15653   echo "$as_me:15653: \$? = $ac_status" >&5
15654   (exit $ac_status); } &&
15655          { ac_try='test -s conftest.$ac_objext'
15656   { (eval echo "$as_me:15656: \"$ac_try\"") >&5
15657   (eval $ac_try) 2>&5
15658   ac_status=$?
15659   echo "$as_me:15659: \$? = $ac_status" >&5
15660   (exit $ac_status); }; }; then
15661   ac_cv_c_const=yes
15662 else
15663   echo "$as_me: failed program was:" >&5
15664 cat conftest.$ac_ext >&5
15665 ac_cv_c_const=no
15666 fi
15667 rm -f conftest.$ac_objext conftest.$ac_ext
15668 fi
15669 echo "$as_me:15669: result: $ac_cv_c_const" >&5
15670 echo "${ECHO_T}$ac_cv_c_const" >&6
15671 if test $ac_cv_c_const = no; then
15672
15673 cat >>confdefs.h <<\EOF
15674 #define const
15675 EOF
15676
15677 fi
15678
15679 echo "$as_me:15679: checking for inline" >&5
15680 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15681 if test "${ac_cv_c_inline+set}" = set; then
15682   echo $ECHO_N "(cached) $ECHO_C" >&6
15683 else
15684   ac_cv_c_inline=no
15685 for ac_kw in inline __inline__ __inline; do
15686   cat >conftest.$ac_ext <<_ACEOF
15687 #line 15687 "configure"
15688 #include "confdefs.h"
15689 #ifndef __cplusplus
15690 static $ac_kw int static_foo () {return 0; }
15691 $ac_kw int foo () {return 0; }
15692 #endif
15693
15694 _ACEOF
15695 rm -f conftest.$ac_objext
15696 if { (eval echo "$as_me:15696: \"$ac_compile\"") >&5
15697   (eval $ac_compile) 2>&5
15698   ac_status=$?
15699   echo "$as_me:15699: \$? = $ac_status" >&5
15700   (exit $ac_status); } &&
15701          { ac_try='test -s conftest.$ac_objext'
15702   { (eval echo "$as_me:15702: \"$ac_try\"") >&5
15703   (eval $ac_try) 2>&5
15704   ac_status=$?
15705   echo "$as_me:15705: \$? = $ac_status" >&5
15706   (exit $ac_status); }; }; then
15707   ac_cv_c_inline=$ac_kw; break
15708 else
15709   echo "$as_me: failed program was:" >&5
15710 cat conftest.$ac_ext >&5
15711 fi
15712 rm -f conftest.$ac_objext conftest.$ac_ext
15713 done
15714
15715 fi
15716 echo "$as_me:15716: result: $ac_cv_c_inline" >&5
15717 echo "${ECHO_T}$ac_cv_c_inline" >&6
15718 case $ac_cv_c_inline in
15719   inline | yes) ;;
15720   no)
15721 cat >>confdefs.h <<\EOF
15722 #define inline
15723 EOF
15724  ;;
15725   *)  cat >>confdefs.h <<EOF
15726 #define inline $ac_cv_c_inline
15727 EOF
15728  ;;
15729 esac
15730
15731 NCURSES_INLINE=
15732 if test "$ac_cv_c_inline" != no ; then
15733   NCURSES_INLINE=inline
15734   if test "$INTEL_COMPILER" = yes
15735   then
15736     :
15737   elif test "$CLANG_COMPILER" = yes
15738   then
15739     :
15740   elif test "$GCC" = yes
15741   then
15742     echo "$as_me:15742: checking if $CC supports options to tune inlining" >&5
15743 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15744 if test "${cf_cv_gcc_inline+set}" = set; then
15745   echo $ECHO_N "(cached) $ECHO_C" >&6
15746 else
15747
15748       cf_save_CFLAGS=$CFLAGS
15749       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15750       cat >conftest.$ac_ext <<_ACEOF
15751 #line 15751 "configure"
15752 #include "confdefs.h"
15753 inline int foo(void) { return 1; }
15754 int
15755 main ()
15756 {
15757 ${cf_cv_main_return:-return} foo()
15758   ;
15759   return 0;
15760 }
15761 _ACEOF
15762 rm -f conftest.$ac_objext
15763 if { (eval echo "$as_me:15763: \"$ac_compile\"") >&5
15764   (eval $ac_compile) 2>&5
15765   ac_status=$?
15766   echo "$as_me:15766: \$? = $ac_status" >&5
15767   (exit $ac_status); } &&
15768          { ac_try='test -s conftest.$ac_objext'
15769   { (eval echo "$as_me:15769: \"$ac_try\"") >&5
15770   (eval $ac_try) 2>&5
15771   ac_status=$?
15772   echo "$as_me:15772: \$? = $ac_status" >&5
15773   (exit $ac_status); }; }; then
15774   cf_cv_gcc_inline=yes
15775 else
15776   echo "$as_me: failed program was:" >&5
15777 cat conftest.$ac_ext >&5
15778 cf_cv_gcc_inline=no
15779 fi
15780 rm -f conftest.$ac_objext conftest.$ac_ext
15781       CFLAGS=$cf_save_CFLAGS
15782
15783 fi
15784 echo "$as_me:15784: result: $cf_cv_gcc_inline" >&5
15785 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15786     if test "$cf_cv_gcc_inline" = yes ; then
15787
15788 cf_fix_cppflags=no
15789 cf_new_cflags=
15790 cf_new_cppflags=
15791 cf_new_extra_cppflags=
15792
15793 for cf_add_cflags in --param max-inline-insns-single=1200
15794 do
15795 case $cf_fix_cppflags in
15796 no)
15797         case $cf_add_cflags in #(vi
15798         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15799                 case $cf_add_cflags in
15800                 -D*)
15801                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15802
15803                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15804                                 && test -z "${cf_tst_cflags}" \
15805                                 && cf_fix_cppflags=yes
15806
15807                         if test $cf_fix_cppflags = yes ; then
15808                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15809                                 continue
15810                         elif test "${cf_tst_cflags}" = "\"'" ; then
15811                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15812                                 continue
15813                         fi
15814                         ;;
15815                 esac
15816                 case "$CPPFLAGS" in
15817                 *$cf_add_cflags) #(vi
15818                         ;;
15819                 *) #(vi
15820                         case $cf_add_cflags in #(vi
15821                         -D*)
15822                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15823
15824 CPPFLAGS=`echo "$CPPFLAGS" | \
15825         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15826                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15827
15828                                 ;;
15829                         esac
15830                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15831                         ;;
15832                 esac
15833                 ;;
15834         *)
15835                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15836                 ;;
15837         esac
15838         ;;
15839 yes)
15840         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15841
15842         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15843
15844         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15845                 && test -z "${cf_tst_cflags}" \
15846                 && cf_fix_cppflags=no
15847         ;;
15848 esac
15849 done
15850
15851 if test -n "$cf_new_cflags" ; then
15852
15853         CFLAGS="$CFLAGS $cf_new_cflags"
15854 fi
15855
15856 if test -n "$cf_new_cppflags" ; then
15857
15858         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15859 fi
15860
15861 if test -n "$cf_new_extra_cppflags" ; then
15862
15863         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15864 fi
15865
15866     fi
15867   fi
15868 fi
15869
15870 echo "$as_me:15870: checking for signal global datatype" >&5
15871 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15872 if test "${cf_cv_sig_atomic_t+set}" = set; then
15873   echo $ECHO_N "(cached) $ECHO_C" >&6
15874 else
15875
15876         for cf_type in \
15877                 "volatile sig_atomic_t" \
15878                 "sig_atomic_t" \
15879                 "int"
15880         do
15881         cat >conftest.$ac_ext <<_ACEOF
15882 #line 15882 "configure"
15883 #include "confdefs.h"
15884
15885 #include <sys/types.h>
15886 #include <signal.h>
15887 #include <stdio.h>
15888
15889 extern $cf_type x;
15890 $cf_type x;
15891 static void handler(int sig)
15892 {
15893         x = 5;
15894 }
15895 int
15896 main ()
15897 {
15898 signal(SIGINT, handler);
15899                  x = 1
15900   ;
15901   return 0;
15902 }
15903 _ACEOF
15904 rm -f conftest.$ac_objext
15905 if { (eval echo "$as_me:15905: \"$ac_compile\"") >&5
15906   (eval $ac_compile) 2>&5
15907   ac_status=$?
15908   echo "$as_me:15908: \$? = $ac_status" >&5
15909   (exit $ac_status); } &&
15910          { ac_try='test -s conftest.$ac_objext'
15911   { (eval echo "$as_me:15911: \"$ac_try\"") >&5
15912   (eval $ac_try) 2>&5
15913   ac_status=$?
15914   echo "$as_me:15914: \$? = $ac_status" >&5
15915   (exit $ac_status); }; }; then
15916   cf_cv_sig_atomic_t=$cf_type
15917 else
15918   echo "$as_me: failed program was:" >&5
15919 cat conftest.$ac_ext >&5
15920 cf_cv_sig_atomic_t=no
15921 fi
15922 rm -f conftest.$ac_objext conftest.$ac_ext
15923                 test "$cf_cv_sig_atomic_t" != no && break
15924         done
15925
15926 fi
15927
15928 echo "$as_me:15928: result: $cf_cv_sig_atomic_t" >&5
15929 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15930 test "$cf_cv_sig_atomic_t" != no &&
15931 cat >>confdefs.h <<EOF
15932 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15933 EOF
15934
15935 if test $NCURSES_CHTYPE = auto ; then
15936
15937 echo "$as_me:15937: checking for type of chtype" >&5
15938 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15939 if test "${cf_cv_typeof_chtype+set}" = set; then
15940   echo $ECHO_N "(cached) $ECHO_C" >&6
15941 else
15942
15943                 if test "$cross_compiling" = yes; then
15944   cf_cv_typeof_chtype=long
15945 else
15946   cat >conftest.$ac_ext <<_ACEOF
15947 #line 15947 "configure"
15948 #include "confdefs.h"
15949
15950 #define WANT_BITS 31
15951 #include <stdio.h>
15952 int main()
15953 {
15954         FILE *fp = fopen("cf_test.out", "w");
15955         if (fp != 0) {
15956                 char *result = "long";
15957                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15958                         int n;
15959                         unsigned int x, y;
15960                         for (n = 0; n < WANT_BITS; n++) {
15961                                 x = (1 << n);
15962                                 y = (x >> n);
15963                                 if (y != 1 || x == 0) {
15964                                         x = 0;
15965                                         break;
15966                                 }
15967                         }
15968                         /*
15969                          * If x is nonzero, an int is big enough for the bits
15970                          * that we want.
15971                          */
15972                         result = (x != 0) ? "int" : "long";
15973                 }
15974                 fputs(result, fp);
15975                 fclose(fp);
15976         }
15977         ${cf_cv_main_return:-return}(0);
15978 }
15979
15980 _ACEOF
15981 rm -f conftest$ac_exeext
15982 if { (eval echo "$as_me:15982: \"$ac_link\"") >&5
15983   (eval $ac_link) 2>&5
15984   ac_status=$?
15985   echo "$as_me:15985: \$? = $ac_status" >&5
15986   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15987   { (eval echo "$as_me:15987: \"$ac_try\"") >&5
15988   (eval $ac_try) 2>&5
15989   ac_status=$?
15990   echo "$as_me:15990: \$? = $ac_status" >&5
15991   (exit $ac_status); }; }; then
15992   cf_cv_typeof_chtype=`cat cf_test.out`
15993 else
15994   echo "$as_me: program exited with status $ac_status" >&5
15995 echo "$as_me: failed program was:" >&5
15996 cat conftest.$ac_ext >&5
15997 cf_cv_typeof_chtype=long
15998 fi
15999 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16000 fi
16001                 rm -f cf_test.out
16002
16003 fi
16004
16005 echo "$as_me:16005: result: $cf_cv_typeof_chtype" >&5
16006 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16007
16008 cat >>confdefs.h <<EOF
16009 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16010 EOF
16011
16012 else
16013         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16014 fi
16015 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16016
16017 echo "$as_me:16017: checking if unsigned literals are legal" >&5
16018 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16019 if test "${cf_cv_unsigned_literals+set}" = set; then
16020   echo $ECHO_N "(cached) $ECHO_C" >&6
16021 else
16022
16023         cat >conftest.$ac_ext <<_ACEOF
16024 #line 16024 "configure"
16025 #include "confdefs.h"
16026
16027 int
16028 main ()
16029 {
16030 long x = 1L + 1UL + 1U + 1
16031   ;
16032   return 0;
16033 }
16034 _ACEOF
16035 rm -f conftest.$ac_objext
16036 if { (eval echo "$as_me:16036: \"$ac_compile\"") >&5
16037   (eval $ac_compile) 2>&5
16038   ac_status=$?
16039   echo "$as_me:16039: \$? = $ac_status" >&5
16040   (exit $ac_status); } &&
16041          { ac_try='test -s conftest.$ac_objext'
16042   { (eval echo "$as_me:16042: \"$ac_try\"") >&5
16043   (eval $ac_try) 2>&5
16044   ac_status=$?
16045   echo "$as_me:16045: \$? = $ac_status" >&5
16046   (exit $ac_status); }; }; then
16047   cf_cv_unsigned_literals=yes
16048 else
16049   echo "$as_me: failed program was:" >&5
16050 cat conftest.$ac_ext >&5
16051 cf_cv_unsigned_literals=no
16052 fi
16053 rm -f conftest.$ac_objext conftest.$ac_ext
16054
16055 fi
16056
16057 echo "$as_me:16057: result: $cf_cv_unsigned_literals" >&5
16058 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16059
16060 cf_cv_1UL="1"
16061 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16062 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16063
16064 if test $NCURSES_MMASK_T = auto ; then
16065         cf_cv_typeof_mmask_t=long
16066 else
16067         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16068 fi
16069 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16070
16071 ###     Checks for external-data
16072
16073 echo "$as_me:16073: checking if external errno is declared" >&5
16074 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16075 if test "${cf_cv_dcl_errno+set}" = set; then
16076   echo $ECHO_N "(cached) $ECHO_C" >&6
16077 else
16078
16079     cat >conftest.$ac_ext <<_ACEOF
16080 #line 16080 "configure"
16081 #include "confdefs.h"
16082
16083 #ifdef HAVE_STDLIB_H
16084 #include <stdlib.h>
16085 #endif
16086 #include <stdio.h>
16087 #include <sys/types.h>
16088 #include <errno.h>
16089 int
16090 main ()
16091 {
16092 int x = (int) errno
16093   ;
16094   return 0;
16095 }
16096 _ACEOF
16097 rm -f conftest.$ac_objext
16098 if { (eval echo "$as_me:16098: \"$ac_compile\"") >&5
16099   (eval $ac_compile) 2>&5
16100   ac_status=$?
16101   echo "$as_me:16101: \$? = $ac_status" >&5
16102   (exit $ac_status); } &&
16103          { ac_try='test -s conftest.$ac_objext'
16104   { (eval echo "$as_me:16104: \"$ac_try\"") >&5
16105   (eval $ac_try) 2>&5
16106   ac_status=$?
16107   echo "$as_me:16107: \$? = $ac_status" >&5
16108   (exit $ac_status); }; }; then
16109   cf_cv_dcl_errno=yes
16110 else
16111   echo "$as_me: failed program was:" >&5
16112 cat conftest.$ac_ext >&5
16113 cf_cv_dcl_errno=no
16114 fi
16115 rm -f conftest.$ac_objext conftest.$ac_ext
16116
16117 fi
16118 echo "$as_me:16118: result: $cf_cv_dcl_errno" >&5
16119 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16120
16121 if test "$cf_cv_dcl_errno" = no ; then
16122
16123 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16124
16125     cat >>confdefs.h <<EOF
16126 #define $cf_result 1
16127 EOF
16128
16129 fi
16130
16131 # It's possible (for near-UNIX clones) that the data doesn't exist
16132
16133 echo "$as_me:16133: checking if external errno exists" >&5
16134 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16135 if test "${cf_cv_have_errno+set}" = set; then
16136   echo $ECHO_N "(cached) $ECHO_C" >&6
16137 else
16138
16139     cat >conftest.$ac_ext <<_ACEOF
16140 #line 16140 "configure"
16141 #include "confdefs.h"
16142
16143 #undef errno
16144 extern int errno;
16145
16146 int
16147 main ()
16148 {
16149 errno = 2
16150   ;
16151   return 0;
16152 }
16153 _ACEOF
16154 rm -f conftest.$ac_objext conftest$ac_exeext
16155 if { (eval echo "$as_me:16155: \"$ac_link\"") >&5
16156   (eval $ac_link) 2>&5
16157   ac_status=$?
16158   echo "$as_me:16158: \$? = $ac_status" >&5
16159   (exit $ac_status); } &&
16160          { ac_try='test -s conftest$ac_exeext'
16161   { (eval echo "$as_me:16161: \"$ac_try\"") >&5
16162   (eval $ac_try) 2>&5
16163   ac_status=$?
16164   echo "$as_me:16164: \$? = $ac_status" >&5
16165   (exit $ac_status); }; }; then
16166   cf_cv_have_errno=yes
16167 else
16168   echo "$as_me: failed program was:" >&5
16169 cat conftest.$ac_ext >&5
16170 cf_cv_have_errno=no
16171 fi
16172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16173
16174 fi
16175 echo "$as_me:16175: result: $cf_cv_have_errno" >&5
16176 echo "${ECHO_T}$cf_cv_have_errno" >&6
16177
16178 if test "$cf_cv_have_errno" = yes ; then
16179
16180 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16181
16182     cat >>confdefs.h <<EOF
16183 #define $cf_result 1
16184 EOF
16185
16186 fi
16187
16188 echo "$as_me:16188: checking if data-only library module links" >&5
16189 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16190 if test "${cf_cv_link_dataonly+set}" = set; then
16191   echo $ECHO_N "(cached) $ECHO_C" >&6
16192 else
16193
16194         rm -f conftest.a
16195         cat >conftest.$ac_ext <<EOF
16196 #line 16196 "configure"
16197 int     testdata[3] = { 123, 456, 789 };
16198 EOF
16199         if { (eval echo "$as_me:16199: \"$ac_compile\"") >&5
16200   (eval $ac_compile) 2>&5
16201   ac_status=$?
16202   echo "$as_me:16202: \$? = $ac_status" >&5
16203   (exit $ac_status); } ; then
16204                 mv conftest.o data.o && \
16205                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16206         fi
16207         rm -f conftest.$ac_ext data.o
16208         cat >conftest.$ac_ext <<EOF
16209 #line 16209 "configure"
16210 int     testfunc()
16211 {
16212 #if defined(NeXT)
16213         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16214 #else
16215         extern int testdata[3];
16216         return testdata[0] == 123
16217            &&  testdata[1] == 456
16218            &&  testdata[2] == 789;
16219 #endif
16220 }
16221 EOF
16222         if { (eval echo "$as_me:16222: \"$ac_compile\"") >&5
16223   (eval $ac_compile) 2>&5
16224   ac_status=$?
16225   echo "$as_me:16225: \$? = $ac_status" >&5
16226   (exit $ac_status); }; then
16227                 mv conftest.o func.o && \
16228                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16229         fi
16230         rm -f conftest.$ac_ext func.o
16231         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16232         cf_saveLIBS="$LIBS"
16233         LIBS="conftest.a $LIBS"
16234         if test "$cross_compiling" = yes; then
16235   cf_cv_link_dataonly=unknown
16236 else
16237   cat >conftest.$ac_ext <<_ACEOF
16238 #line 16238 "configure"
16239 #include "confdefs.h"
16240
16241         int main()
16242         {
16243                 extern int testfunc();
16244                 ${cf_cv_main_return:-return} (!testfunc());
16245         }
16246
16247 _ACEOF
16248 rm -f conftest$ac_exeext
16249 if { (eval echo "$as_me:16249: \"$ac_link\"") >&5
16250   (eval $ac_link) 2>&5
16251   ac_status=$?
16252   echo "$as_me:16252: \$? = $ac_status" >&5
16253   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16254   { (eval echo "$as_me:16254: \"$ac_try\"") >&5
16255   (eval $ac_try) 2>&5
16256   ac_status=$?
16257   echo "$as_me:16257: \$? = $ac_status" >&5
16258   (exit $ac_status); }; }; then
16259   cf_cv_link_dataonly=yes
16260 else
16261   echo "$as_me: program exited with status $ac_status" >&5
16262 echo "$as_me: failed program was:" >&5
16263 cat conftest.$ac_ext >&5
16264 cf_cv_link_dataonly=no
16265 fi
16266 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16267 fi
16268         LIBS="$cf_saveLIBS"
16269
16270 fi
16271
16272 echo "$as_me:16272: result: $cf_cv_link_dataonly" >&5
16273 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16274
16275 if test "$cf_cv_link_dataonly" = no ; then
16276
16277 cat >>confdefs.h <<\EOF
16278 #define BROKEN_LINKER 1
16279 EOF
16280
16281         BROKEN_LINKER=1
16282 fi
16283
16284 ###     Checks for library functions.
16285
16286 for ac_func in \
16287 getcwd \
16288 getegid \
16289 geteuid \
16290 getopt \
16291 getttynam \
16292 issetugid \
16293 poll \
16294 putenv \
16295 remove \
16296 select \
16297 setbuf \
16298 setbuffer \
16299 setenv \
16300 setvbuf \
16301 sigaction \
16302 sigvec \
16303 strdup \
16304 strstr \
16305 tcgetpgrp \
16306 times \
16307 vsnprintf \
16308
16309 do
16310 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16311 echo "$as_me:16311: checking for $ac_func" >&5
16312 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16313 if eval "test \"\${$as_ac_var+set}\" = set"; then
16314   echo $ECHO_N "(cached) $ECHO_C" >&6
16315 else
16316   cat >conftest.$ac_ext <<_ACEOF
16317 #line 16317 "configure"
16318 #include "confdefs.h"
16319 /* System header to define __stub macros and hopefully few prototypes,
16320     which can conflict with char $ac_func (); below.  */
16321 #include <assert.h>
16322 /* Override any gcc2 internal prototype to avoid an error.  */
16323 #ifdef __cplusplus
16324 extern "C"
16325 #endif
16326 /* We use char because int might match the return type of a gcc2
16327    builtin and then its argument prototype would still apply.  */
16328 char $ac_func ();
16329 char (*f) ();
16330
16331 int
16332 main ()
16333 {
16334 /* The GNU C library defines this for functions which it implements
16335     to always fail with ENOSYS.  Some functions are actually named
16336     something starting with __ and the normal name is an alias.  */
16337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16338 choke me
16339 #else
16340 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16341 #endif
16342
16343   ;
16344   return 0;
16345 }
16346 _ACEOF
16347 rm -f conftest.$ac_objext conftest$ac_exeext
16348 if { (eval echo "$as_me:16348: \"$ac_link\"") >&5
16349   (eval $ac_link) 2>&5
16350   ac_status=$?
16351   echo "$as_me:16351: \$? = $ac_status" >&5
16352   (exit $ac_status); } &&
16353          { ac_try='test -s conftest$ac_exeext'
16354   { (eval echo "$as_me:16354: \"$ac_try\"") >&5
16355   (eval $ac_try) 2>&5
16356   ac_status=$?
16357   echo "$as_me:16357: \$? = $ac_status" >&5
16358   (exit $ac_status); }; }; then
16359   eval "$as_ac_var=yes"
16360 else
16361   echo "$as_me: failed program was:" >&5
16362 cat conftest.$ac_ext >&5
16363 eval "$as_ac_var=no"
16364 fi
16365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16366 fi
16367 echo "$as_me:16367: result: `eval echo '${'$as_ac_var'}'`" >&5
16368 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16369 if test `eval echo '${'$as_ac_var'}'` = yes; then
16370   cat >>confdefs.h <<EOF
16371 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16372 EOF
16373
16374 fi
16375 done
16376
16377 if test "x$ac_cv_func_getopt" = xno &&
16378    test "x$cf_with_progs$cf_with_tests" != xnono; then
16379         { { echo "$as_me:16379: error: getopt is required for building programs" >&5
16380 echo "$as_me: error: getopt is required for building programs" >&2;}
16381    { (exit 1); exit 1; }; }
16382 fi
16383
16384 if test "x$with_getcap" = "xyes" ; then
16385
16386 echo "$as_me:16386: checking for terminal-capability database functions" >&5
16387 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16388 if test "${cf_cv_cgetent+set}" = set; then
16389   echo $ECHO_N "(cached) $ECHO_C" >&6
16390 else
16391
16392 cat >conftest.$ac_ext <<_ACEOF
16393 #line 16393 "configure"
16394 #include "confdefs.h"
16395
16396 #include <stdlib.h>
16397 int
16398 main ()
16399 {
16400
16401         char temp[128];
16402         char *buf = temp;
16403         char *db_array = temp;
16404         cgetent(&buf, &db_array, "vt100");
16405         cgetcap(buf, "tc", '=');
16406         cgetmatch(buf, "tc");
16407
16408   ;
16409   return 0;
16410 }
16411 _ACEOF
16412 rm -f conftest.$ac_objext conftest$ac_exeext
16413 if { (eval echo "$as_me:16413: \"$ac_link\"") >&5
16414   (eval $ac_link) 2>&5
16415   ac_status=$?
16416   echo "$as_me:16416: \$? = $ac_status" >&5
16417   (exit $ac_status); } &&
16418          { ac_try='test -s conftest$ac_exeext'
16419   { (eval echo "$as_me:16419: \"$ac_try\"") >&5
16420   (eval $ac_try) 2>&5
16421   ac_status=$?
16422   echo "$as_me:16422: \$? = $ac_status" >&5
16423   (exit $ac_status); }; }; then
16424   cf_cv_cgetent=yes
16425 else
16426   echo "$as_me: failed program was:" >&5
16427 cat conftest.$ac_ext >&5
16428 cf_cv_cgetent=no
16429 fi
16430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16431
16432 fi
16433 echo "$as_me:16433: result: $cf_cv_cgetent" >&5
16434 echo "${ECHO_T}$cf_cv_cgetent" >&6
16435
16436 if test "$cf_cv_cgetent" = yes
16437 then
16438
16439 cat >>confdefs.h <<\EOF
16440 #define HAVE_BSD_CGETENT 1
16441 EOF
16442
16443 echo "$as_me:16443: checking if cgetent uses const parameter" >&5
16444 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16445 if test "${cf_cv_cgetent_const+set}" = set; then
16446   echo $ECHO_N "(cached) $ECHO_C" >&6
16447 else
16448
16449 cat >conftest.$ac_ext <<_ACEOF
16450 #line 16450 "configure"
16451 #include "confdefs.h"
16452
16453 #include <stdlib.h>
16454 int
16455 main ()
16456 {
16457
16458         char temp[128];
16459         char *buf = temp;
16460 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16461         const char *db_array = temp;
16462         cgetent(&buf, &db_array, "vt100");
16463 #endif
16464         cgetcap(buf, "tc", '=');
16465         cgetmatch(buf, "tc");
16466
16467   ;
16468   return 0;
16469 }
16470 _ACEOF
16471 rm -f conftest.$ac_objext conftest$ac_exeext
16472 if { (eval echo "$as_me:16472: \"$ac_link\"") >&5
16473   (eval $ac_link) 2>&5
16474   ac_status=$?
16475   echo "$as_me:16475: \$? = $ac_status" >&5
16476   (exit $ac_status); } &&
16477          { ac_try='test -s conftest$ac_exeext'
16478   { (eval echo "$as_me:16478: \"$ac_try\"") >&5
16479   (eval $ac_try) 2>&5
16480   ac_status=$?
16481   echo "$as_me:16481: \$? = $ac_status" >&5
16482   (exit $ac_status); }; }; then
16483   cf_cv_cgetent_const=yes
16484 else
16485   echo "$as_me: failed program was:" >&5
16486 cat conftest.$ac_ext >&5
16487 cf_cv_cgetent_const=no
16488 fi
16489 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16490
16491 fi
16492 echo "$as_me:16492: result: $cf_cv_cgetent_const" >&5
16493 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16494         if test "$cf_cv_cgetent_const" = yes
16495         then
16496
16497 cat >>confdefs.h <<EOF
16498 #define CGETENT_CONST const
16499 EOF
16500
16501         fi
16502 fi
16503
16504 fi
16505
16506 echo "$as_me:16506: checking for isascii" >&5
16507 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16508 if test "${cf_cv_have_isascii+set}" = set; then
16509   echo $ECHO_N "(cached) $ECHO_C" >&6
16510 else
16511
16512         cat >conftest.$ac_ext <<_ACEOF
16513 #line 16513 "configure"
16514 #include "confdefs.h"
16515 #include <ctype.h>
16516 int
16517 main ()
16518 {
16519 int x = isascii(' ')
16520   ;
16521   return 0;
16522 }
16523 _ACEOF
16524 rm -f conftest.$ac_objext conftest$ac_exeext
16525 if { (eval echo "$as_me:16525: \"$ac_link\"") >&5
16526   (eval $ac_link) 2>&5
16527   ac_status=$?
16528   echo "$as_me:16528: \$? = $ac_status" >&5
16529   (exit $ac_status); } &&
16530          { ac_try='test -s conftest$ac_exeext'
16531   { (eval echo "$as_me:16531: \"$ac_try\"") >&5
16532   (eval $ac_try) 2>&5
16533   ac_status=$?
16534   echo "$as_me:16534: \$? = $ac_status" >&5
16535   (exit $ac_status); }; }; then
16536   cf_cv_have_isascii=yes
16537 else
16538   echo "$as_me: failed program was:" >&5
16539 cat conftest.$ac_ext >&5
16540 cf_cv_have_isascii=no
16541 fi
16542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16543
16544 fi
16545 echo "$as_me:16545: result: $cf_cv_have_isascii" >&5
16546 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16547 test "$cf_cv_have_isascii" = yes &&
16548 cat >>confdefs.h <<\EOF
16549 #define HAVE_ISASCII 1
16550 EOF
16551
16552 if test "$ac_cv_func_sigaction" = yes; then
16553 echo "$as_me:16553: checking whether sigaction needs _POSIX_SOURCE" >&5
16554 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16555 cat >conftest.$ac_ext <<_ACEOF
16556 #line 16556 "configure"
16557 #include "confdefs.h"
16558
16559 #include <sys/types.h>
16560 #include <signal.h>
16561 int
16562 main ()
16563 {
16564 struct sigaction act
16565   ;
16566   return 0;
16567 }
16568 _ACEOF
16569 rm -f conftest.$ac_objext
16570 if { (eval echo "$as_me:16570: \"$ac_compile\"") >&5
16571   (eval $ac_compile) 2>&5
16572   ac_status=$?
16573   echo "$as_me:16573: \$? = $ac_status" >&5
16574   (exit $ac_status); } &&
16575          { ac_try='test -s conftest.$ac_objext'
16576   { (eval echo "$as_me:16576: \"$ac_try\"") >&5
16577   (eval $ac_try) 2>&5
16578   ac_status=$?
16579   echo "$as_me:16579: \$? = $ac_status" >&5
16580   (exit $ac_status); }; }; then
16581   sigact_bad=no
16582 else
16583   echo "$as_me: failed program was:" >&5
16584 cat conftest.$ac_ext >&5
16585
16586 cat >conftest.$ac_ext <<_ACEOF
16587 #line 16587 "configure"
16588 #include "confdefs.h"
16589
16590 #define _POSIX_SOURCE
16591 #include <sys/types.h>
16592 #include <signal.h>
16593 int
16594 main ()
16595 {
16596 struct sigaction act
16597   ;
16598   return 0;
16599 }
16600 _ACEOF
16601 rm -f conftest.$ac_objext
16602 if { (eval echo "$as_me:16602: \"$ac_compile\"") >&5
16603   (eval $ac_compile) 2>&5
16604   ac_status=$?
16605   echo "$as_me:16605: \$? = $ac_status" >&5
16606   (exit $ac_status); } &&
16607          { ac_try='test -s conftest.$ac_objext'
16608   { (eval echo "$as_me:16608: \"$ac_try\"") >&5
16609   (eval $ac_try) 2>&5
16610   ac_status=$?
16611   echo "$as_me:16611: \$? = $ac_status" >&5
16612   (exit $ac_status); }; }; then
16613   sigact_bad=yes
16614
16615 cat >>confdefs.h <<\EOF
16616 #define _POSIX_SOURCE 1
16617 EOF
16618
16619 else
16620   echo "$as_me: failed program was:" >&5
16621 cat conftest.$ac_ext >&5
16622 sigact_bad=unknown
16623 fi
16624 rm -f conftest.$ac_objext conftest.$ac_ext
16625 fi
16626 rm -f conftest.$ac_objext conftest.$ac_ext
16627 echo "$as_me:16627: result: $sigact_bad" >&5
16628 echo "${ECHO_T}$sigact_bad" >&6
16629 fi
16630
16631 echo "$as_me:16631: checking if nanosleep really works" >&5
16632 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16633 if test "${cf_cv_func_nanosleep+set}" = set; then
16634   echo $ECHO_N "(cached) $ECHO_C" >&6
16635 else
16636
16637 if test "$cross_compiling" = yes; then
16638   cf_cv_func_nanosleep=unknown
16639 else
16640   cat >conftest.$ac_ext <<_ACEOF
16641 #line 16641 "configure"
16642 #include "confdefs.h"
16643
16644 #include <stdio.h>
16645 #include <errno.h>
16646 #include <time.h>
16647
16648 #ifdef HAVE_SYS_TIME_H
16649 #include <sys/time.h>
16650 #endif
16651
16652 int main() {
16653         struct timespec ts1, ts2;
16654         int code;
16655         ts1.tv_sec  = 0;
16656         ts1.tv_nsec = 750000000;
16657         ts2.tv_sec  = 0;
16658         ts2.tv_nsec = 0;
16659         errno = 0;
16660         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16661         ${cf_cv_main_return:-return}(code != 0);
16662 }
16663
16664 _ACEOF
16665 rm -f conftest$ac_exeext
16666 if { (eval echo "$as_me:16666: \"$ac_link\"") >&5
16667   (eval $ac_link) 2>&5
16668   ac_status=$?
16669   echo "$as_me:16669: \$? = $ac_status" >&5
16670   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16671   { (eval echo "$as_me:16671: \"$ac_try\"") >&5
16672   (eval $ac_try) 2>&5
16673   ac_status=$?
16674   echo "$as_me:16674: \$? = $ac_status" >&5
16675   (exit $ac_status); }; }; then
16676   cf_cv_func_nanosleep=yes
16677 else
16678   echo "$as_me: program exited with status $ac_status" >&5
16679 echo "$as_me: failed program was:" >&5
16680 cat conftest.$ac_ext >&5
16681 cf_cv_func_nanosleep=no
16682 fi
16683 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16684 fi
16685 fi
16686 echo "$as_me:16686: result: $cf_cv_func_nanosleep" >&5
16687 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16688
16689 test "$cf_cv_func_nanosleep" = "yes" &&
16690 cat >>confdefs.h <<\EOF
16691 #define HAVE_NANOSLEEP 1
16692 EOF
16693
16694 for ac_header in \
16695 termio.h \
16696 termios.h \
16697 unistd.h \
16698
16699 do
16700 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16701 echo "$as_me:16701: checking for $ac_header" >&5
16702 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16703 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16704   echo $ECHO_N "(cached) $ECHO_C" >&6
16705 else
16706   cat >conftest.$ac_ext <<_ACEOF
16707 #line 16707 "configure"
16708 #include "confdefs.h"
16709 #include <$ac_header>
16710 _ACEOF
16711 if { (eval echo "$as_me:16711: \"$ac_cpp conftest.$ac_ext\"") >&5
16712   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16713   ac_status=$?
16714   egrep -v '^ *\+' conftest.er1 >conftest.err
16715   rm -f conftest.er1
16716   cat conftest.err >&5
16717   echo "$as_me:16717: \$? = $ac_status" >&5
16718   (exit $ac_status); } >/dev/null; then
16719   if test -s conftest.err; then
16720     ac_cpp_err=$ac_c_preproc_warn_flag
16721   else
16722     ac_cpp_err=
16723   fi
16724 else
16725   ac_cpp_err=yes
16726 fi
16727 if test -z "$ac_cpp_err"; then
16728   eval "$as_ac_Header=yes"
16729 else
16730   echo "$as_me: failed program was:" >&5
16731   cat conftest.$ac_ext >&5
16732   eval "$as_ac_Header=no"
16733 fi
16734 rm -f conftest.err conftest.$ac_ext
16735 fi
16736 echo "$as_me:16736: result: `eval echo '${'$as_ac_Header'}'`" >&5
16737 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16738 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16739   cat >>confdefs.h <<EOF
16740 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16741 EOF
16742
16743 fi
16744 done
16745
16746 if test "$ISC" = yes ; then
16747
16748 for ac_header in sys/termio.h
16749 do
16750 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16751 echo "$as_me:16751: checking for $ac_header" >&5
16752 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16753 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16754   echo $ECHO_N "(cached) $ECHO_C" >&6
16755 else
16756   cat >conftest.$ac_ext <<_ACEOF
16757 #line 16757 "configure"
16758 #include "confdefs.h"
16759 #include <$ac_header>
16760 _ACEOF
16761 if { (eval echo "$as_me:16761: \"$ac_cpp conftest.$ac_ext\"") >&5
16762   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16763   ac_status=$?
16764   egrep -v '^ *\+' conftest.er1 >conftest.err
16765   rm -f conftest.er1
16766   cat conftest.err >&5
16767   echo "$as_me:16767: \$? = $ac_status" >&5
16768   (exit $ac_status); } >/dev/null; then
16769   if test -s conftest.err; then
16770     ac_cpp_err=$ac_c_preproc_warn_flag
16771   else
16772     ac_cpp_err=
16773   fi
16774 else
16775   ac_cpp_err=yes
16776 fi
16777 if test -z "$ac_cpp_err"; then
16778   eval "$as_ac_Header=yes"
16779 else
16780   echo "$as_me: failed program was:" >&5
16781   cat conftest.$ac_ext >&5
16782   eval "$as_ac_Header=no"
16783 fi
16784 rm -f conftest.err conftest.$ac_ext
16785 fi
16786 echo "$as_me:16786: result: `eval echo '${'$as_ac_Header'}'`" >&5
16787 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16788 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16789   cat >>confdefs.h <<EOF
16790 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16791 EOF
16792
16793 fi
16794 done
16795
16796 fi
16797 if test "$ac_cv_header_termios_h" = yes ; then
16798         case "$CFLAGS $CPPFLAGS" in
16799         *-D_POSIX_SOURCE*)
16800                 termios_bad=dunno ;;
16801         *)      termios_bad=maybe ;;
16802         esac
16803         if test "$termios_bad" = maybe ; then
16804         echo "$as_me:16804: checking whether termios.h needs _POSIX_SOURCE" >&5
16805 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16806         cat >conftest.$ac_ext <<_ACEOF
16807 #line 16807 "configure"
16808 #include "confdefs.h"
16809 #include <termios.h>
16810 int
16811 main ()
16812 {
16813 struct termios foo; int x = foo.c_iflag
16814   ;
16815   return 0;
16816 }
16817 _ACEOF
16818 rm -f conftest.$ac_objext
16819 if { (eval echo "$as_me:16819: \"$ac_compile\"") >&5
16820   (eval $ac_compile) 2>&5
16821   ac_status=$?
16822   echo "$as_me:16822: \$? = $ac_status" >&5
16823   (exit $ac_status); } &&
16824          { ac_try='test -s conftest.$ac_objext'
16825   { (eval echo "$as_me:16825: \"$ac_try\"") >&5
16826   (eval $ac_try) 2>&5
16827   ac_status=$?
16828   echo "$as_me:16828: \$? = $ac_status" >&5
16829   (exit $ac_status); }; }; then
16830   termios_bad=no
16831 else
16832   echo "$as_me: failed program was:" >&5
16833 cat conftest.$ac_ext >&5
16834
16835                 cat >conftest.$ac_ext <<_ACEOF
16836 #line 16836 "configure"
16837 #include "confdefs.h"
16838
16839 #define _POSIX_SOURCE
16840 #include <termios.h>
16841 int
16842 main ()
16843 {
16844 struct termios foo; int x = foo.c_iflag
16845   ;
16846   return 0;
16847 }
16848 _ACEOF
16849 rm -f conftest.$ac_objext
16850 if { (eval echo "$as_me:16850: \"$ac_compile\"") >&5
16851   (eval $ac_compile) 2>&5
16852   ac_status=$?
16853   echo "$as_me:16853: \$? = $ac_status" >&5
16854   (exit $ac_status); } &&
16855          { ac_try='test -s conftest.$ac_objext'
16856   { (eval echo "$as_me:16856: \"$ac_try\"") >&5
16857   (eval $ac_try) 2>&5
16858   ac_status=$?
16859   echo "$as_me:16859: \$? = $ac_status" >&5
16860   (exit $ac_status); }; }; then
16861   termios_bad=unknown
16862 else
16863   echo "$as_me: failed program was:" >&5
16864 cat conftest.$ac_ext >&5
16865 termios_bad=yes
16866 cat >>confdefs.h <<\EOF
16867 #define _POSIX_SOURCE 1
16868 EOF
16869
16870 fi
16871 rm -f conftest.$ac_objext conftest.$ac_ext
16872
16873 fi
16874 rm -f conftest.$ac_objext conftest.$ac_ext
16875         echo "$as_me:16875: result: $termios_bad" >&5
16876 echo "${ECHO_T}$termios_bad" >&6
16877         fi
16878 fi
16879
16880 echo "$as_me:16880: checking for tcgetattr" >&5
16881 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16882 if test "${cf_cv_have_tcgetattr+set}" = set; then
16883   echo $ECHO_N "(cached) $ECHO_C" >&6
16884 else
16885
16886 cat >conftest.$ac_ext <<_ACEOF
16887 #line 16887 "configure"
16888 #include "confdefs.h"
16889
16890 #include <sys/types.h>
16891 #ifdef HAVE_UNISTD_H
16892 #include <unistd.h>
16893 #endif
16894 #ifdef HAVE_TERMIOS_H
16895 #include <termios.h>
16896 #define TTY struct termios
16897 #else
16898 #ifdef HAVE_TERMIO_H
16899 #include <termio.h>
16900 #define TTY struct termio
16901 #endif
16902 #endif
16903
16904 int
16905 main ()
16906 {
16907
16908 TTY foo;
16909 tcgetattr(1, &foo);
16910   ;
16911   return 0;
16912 }
16913 _ACEOF
16914 rm -f conftest.$ac_objext conftest$ac_exeext
16915 if { (eval echo "$as_me:16915: \"$ac_link\"") >&5
16916   (eval $ac_link) 2>&5
16917   ac_status=$?
16918   echo "$as_me:16918: \$? = $ac_status" >&5
16919   (exit $ac_status); } &&
16920          { ac_try='test -s conftest$ac_exeext'
16921   { (eval echo "$as_me:16921: \"$ac_try\"") >&5
16922   (eval $ac_try) 2>&5
16923   ac_status=$?
16924   echo "$as_me:16924: \$? = $ac_status" >&5
16925   (exit $ac_status); }; }; then
16926   cf_cv_have_tcgetattr=yes
16927 else
16928   echo "$as_me: failed program was:" >&5
16929 cat conftest.$ac_ext >&5
16930 cf_cv_have_tcgetattr=no
16931 fi
16932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16933 fi
16934 echo "$as_me:16934: result: $cf_cv_have_tcgetattr" >&5
16935 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16936 test "$cf_cv_have_tcgetattr" = yes &&
16937 cat >>confdefs.h <<\EOF
16938 #define HAVE_TCGETATTR 1
16939 EOF
16940
16941 echo "$as_me:16941: checking for vsscanf function or workaround" >&5
16942 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16943 if test "${cf_cv_func_vsscanf+set}" = set; then
16944   echo $ECHO_N "(cached) $ECHO_C" >&6
16945 else
16946
16947 cat >conftest.$ac_ext <<_ACEOF
16948 #line 16948 "configure"
16949 #include "confdefs.h"
16950
16951 #include <stdarg.h>
16952 #include <stdio.h>
16953 int
16954 main ()
16955 {
16956
16957         va_list ap;
16958         vsscanf("from", "%d", ap)
16959   ;
16960   return 0;
16961 }
16962 _ACEOF
16963 rm -f conftest.$ac_objext conftest$ac_exeext
16964 if { (eval echo "$as_me:16964: \"$ac_link\"") >&5
16965   (eval $ac_link) 2>&5
16966   ac_status=$?
16967   echo "$as_me:16967: \$? = $ac_status" >&5
16968   (exit $ac_status); } &&
16969          { ac_try='test -s conftest$ac_exeext'
16970   { (eval echo "$as_me:16970: \"$ac_try\"") >&5
16971   (eval $ac_try) 2>&5
16972   ac_status=$?
16973   echo "$as_me:16973: \$? = $ac_status" >&5
16974   (exit $ac_status); }; }; then
16975   cf_cv_func_vsscanf=vsscanf
16976 else
16977   echo "$as_me: failed program was:" >&5
16978 cat conftest.$ac_ext >&5
16979
16980 cat >conftest.$ac_ext <<_ACEOF
16981 #line 16981 "configure"
16982 #include "confdefs.h"
16983
16984 #include <stdarg.h>
16985 #include <stdio.h>
16986 int
16987 main ()
16988 {
16989
16990     FILE strbuf;
16991     char *str = "from";
16992
16993     strbuf._flag = _IOREAD;
16994     strbuf._ptr = strbuf._base = (unsigned char *) str;
16995     strbuf._cnt = strlen(str);
16996     strbuf._file = _NFILE;
16997     return (vfscanf(&strbuf, "%d", ap))
16998   ;
16999   return 0;
17000 }
17001 _ACEOF
17002 rm -f conftest.$ac_objext conftest$ac_exeext
17003 if { (eval echo "$as_me:17003: \"$ac_link\"") >&5
17004   (eval $ac_link) 2>&5
17005   ac_status=$?
17006   echo "$as_me:17006: \$? = $ac_status" >&5
17007   (exit $ac_status); } &&
17008          { ac_try='test -s conftest$ac_exeext'
17009   { (eval echo "$as_me:17009: \"$ac_try\"") >&5
17010   (eval $ac_try) 2>&5
17011   ac_status=$?
17012   echo "$as_me:17012: \$? = $ac_status" >&5
17013   (exit $ac_status); }; }; then
17014   cf_cv_func_vsscanf=vfscanf
17015 else
17016   echo "$as_me: failed program was:" >&5
17017 cat conftest.$ac_ext >&5
17018
17019 cat >conftest.$ac_ext <<_ACEOF
17020 #line 17020 "configure"
17021 #include "confdefs.h"
17022
17023 #include <stdarg.h>
17024 #include <stdio.h>
17025 int
17026 main ()
17027 {
17028
17029     FILE strbuf;
17030     char *str = "from";
17031
17032     strbuf._flag = _IOREAD;
17033     strbuf._ptr = strbuf._base = (unsigned char *) str;
17034     strbuf._cnt = strlen(str);
17035     strbuf._file = _NFILE;
17036     return (_doscan(&strbuf, "%d", ap))
17037   ;
17038   return 0;
17039 }
17040 _ACEOF
17041 rm -f conftest.$ac_objext conftest$ac_exeext
17042 if { (eval echo "$as_me:17042: \"$ac_link\"") >&5
17043   (eval $ac_link) 2>&5
17044   ac_status=$?
17045   echo "$as_me:17045: \$? = $ac_status" >&5
17046   (exit $ac_status); } &&
17047          { ac_try='test -s conftest$ac_exeext'
17048   { (eval echo "$as_me:17048: \"$ac_try\"") >&5
17049   (eval $ac_try) 2>&5
17050   ac_status=$?
17051   echo "$as_me:17051: \$? = $ac_status" >&5
17052   (exit $ac_status); }; }; then
17053   cf_cv_func_vsscanf=_doscan
17054 else
17055   echo "$as_me: failed program was:" >&5
17056 cat conftest.$ac_ext >&5
17057
17058 cf_cv_func_vsscanf=no
17059 fi
17060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17061 fi
17062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17063 fi
17064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17065 fi
17066 echo "$as_me:17066: result: $cf_cv_func_vsscanf" >&5
17067 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17068
17069 case $cf_cv_func_vsscanf in #(vi
17070 vsscanf)
17071 cat >>confdefs.h <<\EOF
17072 #define HAVE_VSSCANF 1
17073 EOF
17074 ;; #(vi
17075 vfscanf)
17076 cat >>confdefs.h <<\EOF
17077 #define HAVE_VFSCANF 1
17078 EOF
17079 ;; #(vi
17080 _doscan)
17081 cat >>confdefs.h <<\EOF
17082 #define HAVE__DOSCAN 1
17083 EOF
17084 ;;
17085 esac
17086
17087 echo "$as_me:17087: checking for working mkstemp" >&5
17088 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17089 if test "${cf_cv_func_mkstemp+set}" = set; then
17090   echo $ECHO_N "(cached) $ECHO_C" >&6
17091 else
17092
17093 rm -rf conftest*
17094 if test "$cross_compiling" = yes; then
17095   cf_cv_func_mkstemp=maybe
17096 else
17097   cat >conftest.$ac_ext <<_ACEOF
17098 #line 17098 "configure"
17099 #include "confdefs.h"
17100
17101 #include <sys/types.h>
17102 #include <stdlib.h>
17103 #include <stdio.h>
17104 #include <string.h>
17105 #include <sys/stat.h>
17106 int main()
17107 {
17108         char *tmpl = "conftestXXXXXX";
17109         char name[2][80];
17110         int n;
17111         int result = 0;
17112         int fd;
17113         struct stat sb;
17114
17115         umask(077);
17116         for (n = 0; n < 2; ++n) {
17117                 strcpy(name[n], tmpl);
17118                 if ((fd = mkstemp(name[n])) >= 0) {
17119                         if (!strcmp(name[n], tmpl)
17120                          || stat(name[n], &sb) != 0
17121                          || (sb.st_mode & S_IFMT) != S_IFREG
17122                          || (sb.st_mode & 077) != 0) {
17123                                 result = 1;
17124                         }
17125                         close(fd);
17126                 }
17127         }
17128         if (result == 0
17129          && !strcmp(name[0], name[1]))
17130                 result = 1;
17131         ${cf_cv_main_return:-return}(result);
17132 }
17133
17134 _ACEOF
17135 rm -f conftest$ac_exeext
17136 if { (eval echo "$as_me:17136: \"$ac_link\"") >&5
17137   (eval $ac_link) 2>&5
17138   ac_status=$?
17139   echo "$as_me:17139: \$? = $ac_status" >&5
17140   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17141   { (eval echo "$as_me:17141: \"$ac_try\"") >&5
17142   (eval $ac_try) 2>&5
17143   ac_status=$?
17144   echo "$as_me:17144: \$? = $ac_status" >&5
17145   (exit $ac_status); }; }; then
17146   cf_cv_func_mkstemp=yes
17147
17148 else
17149   echo "$as_me: program exited with status $ac_status" >&5
17150 echo "$as_me: failed program was:" >&5
17151 cat conftest.$ac_ext >&5
17152 cf_cv_func_mkstemp=no
17153
17154 fi
17155 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17156 fi
17157
17158 fi
17159 echo "$as_me:17159: result: $cf_cv_func_mkstemp" >&5
17160 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17161 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17162         echo "$as_me:17162: checking for mkstemp" >&5
17163 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17164 if test "${ac_cv_func_mkstemp+set}" = set; then
17165   echo $ECHO_N "(cached) $ECHO_C" >&6
17166 else
17167   cat >conftest.$ac_ext <<_ACEOF
17168 #line 17168 "configure"
17169 #include "confdefs.h"
17170 /* System header to define __stub macros and hopefully few prototypes,
17171     which can conflict with char mkstemp (); below.  */
17172 #include <assert.h>
17173 /* Override any gcc2 internal prototype to avoid an error.  */
17174 #ifdef __cplusplus
17175 extern "C"
17176 #endif
17177 /* We use char because int might match the return type of a gcc2
17178    builtin and then its argument prototype would still apply.  */
17179 char mkstemp ();
17180 char (*f) ();
17181
17182 int
17183 main ()
17184 {
17185 /* The GNU C library defines this for functions which it implements
17186     to always fail with ENOSYS.  Some functions are actually named
17187     something starting with __ and the normal name is an alias.  */
17188 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17189 choke me
17190 #else
17191 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17192 #endif
17193
17194   ;
17195   return 0;
17196 }
17197 _ACEOF
17198 rm -f conftest.$ac_objext conftest$ac_exeext
17199 if { (eval echo "$as_me:17199: \"$ac_link\"") >&5
17200   (eval $ac_link) 2>&5
17201   ac_status=$?
17202   echo "$as_me:17202: \$? = $ac_status" >&5
17203   (exit $ac_status); } &&
17204          { ac_try='test -s conftest$ac_exeext'
17205   { (eval echo "$as_me:17205: \"$ac_try\"") >&5
17206   (eval $ac_try) 2>&5
17207   ac_status=$?
17208   echo "$as_me:17208: \$? = $ac_status" >&5
17209   (exit $ac_status); }; }; then
17210   ac_cv_func_mkstemp=yes
17211 else
17212   echo "$as_me: failed program was:" >&5
17213 cat conftest.$ac_ext >&5
17214 ac_cv_func_mkstemp=no
17215 fi
17216 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17217 fi
17218 echo "$as_me:17218: result: $ac_cv_func_mkstemp" >&5
17219 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17220
17221 fi
17222 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17223
17224 cat >>confdefs.h <<\EOF
17225 #define HAVE_MKSTEMP 1
17226 EOF
17227
17228 fi
17229
17230 # setup for prototype of fallback for vsscanf()
17231
17232 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17233         HAVE_VSSCANF=1
17234 else
17235         HAVE_VSSCANF=0
17236 fi
17237
17238 if test "x$cross_compiling" = xyes ; then
17239         { echo "$as_me:17239: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17240 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17241 else
17242         echo "$as_me:17242: checking whether setvbuf arguments are reversed" >&5
17243 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17244 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17245   echo $ECHO_N "(cached) $ECHO_C" >&6
17246 else
17247   if test "$cross_compiling" = yes; then
17248   { { echo "$as_me:17248: error: cannot run test program while cross compiling" >&5
17249 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17250    { (exit 1); exit 1; }; }
17251 else
17252   cat >conftest.$ac_ext <<_ACEOF
17253 #line 17253 "configure"
17254 #include "confdefs.h"
17255 #include <stdio.h>
17256 /* If setvbuf has the reversed format, exit 0. */
17257 int
17258 main ()
17259 {
17260   /* This call has the arguments reversed.
17261      A reversed system may check and see that the address of main
17262      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17263   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17264     $ac_main_return(1);
17265   putc('\r', stdout);
17266   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17267 }
17268 _ACEOF
17269 rm -f conftest$ac_exeext
17270 if { (eval echo "$as_me:17270: \"$ac_link\"") >&5
17271   (eval $ac_link) 2>&5
17272   ac_status=$?
17273   echo "$as_me:17273: \$? = $ac_status" >&5
17274   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17275   { (eval echo "$as_me:17275: \"$ac_try\"") >&5
17276   (eval $ac_try) 2>&5
17277   ac_status=$?
17278   echo "$as_me:17278: \$? = $ac_status" >&5
17279   (exit $ac_status); }; }; then
17280   ac_cv_func_setvbuf_reversed=yes
17281 else
17282   echo "$as_me: program exited with status $ac_status" >&5
17283 echo "$as_me: failed program was:" >&5
17284 cat conftest.$ac_ext >&5
17285 ac_cv_func_setvbuf_reversed=no
17286 fi
17287 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17288 fi
17289 rm -f core core.* *.core
17290 fi
17291 echo "$as_me:17291: result: $ac_cv_func_setvbuf_reversed" >&5
17292 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17293 if test $ac_cv_func_setvbuf_reversed = yes; then
17294
17295 cat >>confdefs.h <<\EOF
17296 #define SETVBUF_REVERSED 1
17297 EOF
17298
17299 fi
17300
17301 fi
17302 echo "$as_me:17302: checking for intptr_t" >&5
17303 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17304 if test "${ac_cv_type_intptr_t+set}" = set; then
17305   echo $ECHO_N "(cached) $ECHO_C" >&6
17306 else
17307   cat >conftest.$ac_ext <<_ACEOF
17308 #line 17308 "configure"
17309 #include "confdefs.h"
17310 $ac_includes_default
17311 int
17312 main ()
17313 {
17314 if ((intptr_t *) 0)
17315   return 0;
17316 if (sizeof (intptr_t))
17317   return 0;
17318   ;
17319   return 0;
17320 }
17321 _ACEOF
17322 rm -f conftest.$ac_objext
17323 if { (eval echo "$as_me:17323: \"$ac_compile\"") >&5
17324   (eval $ac_compile) 2>&5
17325   ac_status=$?
17326   echo "$as_me:17326: \$? = $ac_status" >&5
17327   (exit $ac_status); } &&
17328          { ac_try='test -s conftest.$ac_objext'
17329   { (eval echo "$as_me:17329: \"$ac_try\"") >&5
17330   (eval $ac_try) 2>&5
17331   ac_status=$?
17332   echo "$as_me:17332: \$? = $ac_status" >&5
17333   (exit $ac_status); }; }; then
17334   ac_cv_type_intptr_t=yes
17335 else
17336   echo "$as_me: failed program was:" >&5
17337 cat conftest.$ac_ext >&5
17338 ac_cv_type_intptr_t=no
17339 fi
17340 rm -f conftest.$ac_objext conftest.$ac_ext
17341 fi
17342 echo "$as_me:17342: result: $ac_cv_type_intptr_t" >&5
17343 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17344 if test $ac_cv_type_intptr_t = yes; then
17345   :
17346 else
17347
17348 cat >>confdefs.h <<EOF
17349 #define intptr_t long
17350 EOF
17351
17352 fi
17353
17354 echo "$as_me:17354: checking for ssize_t" >&5
17355 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17356 if test "${ac_cv_type_ssize_t+set}" = set; then
17357   echo $ECHO_N "(cached) $ECHO_C" >&6
17358 else
17359   cat >conftest.$ac_ext <<_ACEOF
17360 #line 17360 "configure"
17361 #include "confdefs.h"
17362 $ac_includes_default
17363 int
17364 main ()
17365 {
17366 if ((ssize_t *) 0)
17367   return 0;
17368 if (sizeof (ssize_t))
17369   return 0;
17370   ;
17371   return 0;
17372 }
17373 _ACEOF
17374 rm -f conftest.$ac_objext
17375 if { (eval echo "$as_me:17375: \"$ac_compile\"") >&5
17376   (eval $ac_compile) 2>&5
17377   ac_status=$?
17378   echo "$as_me:17378: \$? = $ac_status" >&5
17379   (exit $ac_status); } &&
17380          { ac_try='test -s conftest.$ac_objext'
17381   { (eval echo "$as_me:17381: \"$ac_try\"") >&5
17382   (eval $ac_try) 2>&5
17383   ac_status=$?
17384   echo "$as_me:17384: \$? = $ac_status" >&5
17385   (exit $ac_status); }; }; then
17386   ac_cv_type_ssize_t=yes
17387 else
17388   echo "$as_me: failed program was:" >&5
17389 cat conftest.$ac_ext >&5
17390 ac_cv_type_ssize_t=no
17391 fi
17392 rm -f conftest.$ac_objext conftest.$ac_ext
17393 fi
17394 echo "$as_me:17394: result: $ac_cv_type_ssize_t" >&5
17395 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17396 if test $ac_cv_type_ssize_t = yes; then
17397   :
17398 else
17399
17400 cat >>confdefs.h <<EOF
17401 #define ssize_t int
17402 EOF
17403
17404 fi
17405
17406 echo "$as_me:17406: checking for type sigaction_t" >&5
17407 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17408 if test "${cf_cv_type_sigaction+set}" = set; then
17409   echo $ECHO_N "(cached) $ECHO_C" >&6
17410 else
17411
17412         cat >conftest.$ac_ext <<_ACEOF
17413 #line 17413 "configure"
17414 #include "confdefs.h"
17415
17416 #include <signal.h>
17417 int
17418 main ()
17419 {
17420 sigaction_t x
17421   ;
17422   return 0;
17423 }
17424 _ACEOF
17425 rm -f conftest.$ac_objext
17426 if { (eval echo "$as_me:17426: \"$ac_compile\"") >&5
17427   (eval $ac_compile) 2>&5
17428   ac_status=$?
17429   echo "$as_me:17429: \$? = $ac_status" >&5
17430   (exit $ac_status); } &&
17431          { ac_try='test -s conftest.$ac_objext'
17432   { (eval echo "$as_me:17432: \"$ac_try\"") >&5
17433   (eval $ac_try) 2>&5
17434   ac_status=$?
17435   echo "$as_me:17435: \$? = $ac_status" >&5
17436   (exit $ac_status); }; }; then
17437   cf_cv_type_sigaction=yes
17438 else
17439   echo "$as_me: failed program was:" >&5
17440 cat conftest.$ac_ext >&5
17441 cf_cv_type_sigaction=no
17442 fi
17443 rm -f conftest.$ac_objext conftest.$ac_ext
17444 fi
17445
17446 echo "$as_me:17446: result: $cf_cv_type_sigaction" >&5
17447 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17448 test "$cf_cv_type_sigaction" = yes &&
17449 cat >>confdefs.h <<\EOF
17450 #define HAVE_TYPE_SIGACTION 1
17451 EOF
17452
17453 echo "$as_me:17453: checking declaration of size-change" >&5
17454 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17455 if test "${cf_cv_sizechange+set}" = set; then
17456   echo $ECHO_N "(cached) $ECHO_C" >&6
17457 else
17458
17459     cf_cv_sizechange=unknown
17460     cf_save_CPPFLAGS="$CPPFLAGS"
17461
17462 for cf_opts in "" "NEED_PTEM_H"
17463 do
17464
17465     CPPFLAGS="$cf_save_CPPFLAGS"
17466     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17467     cat >conftest.$ac_ext <<_ACEOF
17468 #line 17468 "configure"
17469 #include "confdefs.h"
17470 #include <sys/types.h>
17471 #ifdef HAVE_TERMIOS_H
17472 #include <termios.h>
17473 #else
17474 #ifdef HAVE_TERMIO_H
17475 #include <termio.h>
17476 #endif
17477 #endif
17478 #ifdef NEED_PTEM_H
17479 /* This is a workaround for SCO:  they neglected to define struct winsize in
17480  * termios.h -- it's only in termio.h and ptem.h
17481  */
17482 #include        <sys/stream.h>
17483 #include        <sys/ptem.h>
17484 #endif
17485 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17486 #include <sys/ioctl.h>
17487 #endif
17488
17489 int
17490 main ()
17491 {
17492
17493 #ifdef TIOCGSIZE
17494         struct ttysize win;     /* FIXME: what system is this? */
17495         int y = win.ts_lines;
17496         int x = win.ts_cols;
17497 #else
17498 #ifdef TIOCGWINSZ
17499         struct winsize win;
17500         int y = win.ws_row;
17501         int x = win.ws_col;
17502 #else
17503         no TIOCGSIZE or TIOCGWINSZ
17504 #endif /* TIOCGWINSZ */
17505 #endif /* TIOCGSIZE */
17506
17507   ;
17508   return 0;
17509 }
17510 _ACEOF
17511 rm -f conftest.$ac_objext
17512 if { (eval echo "$as_me:17512: \"$ac_compile\"") >&5
17513   (eval $ac_compile) 2>&5
17514   ac_status=$?
17515   echo "$as_me:17515: \$? = $ac_status" >&5
17516   (exit $ac_status); } &&
17517          { ac_try='test -s conftest.$ac_objext'
17518   { (eval echo "$as_me:17518: \"$ac_try\"") >&5
17519   (eval $ac_try) 2>&5
17520   ac_status=$?
17521   echo "$as_me:17521: \$? = $ac_status" >&5
17522   (exit $ac_status); }; }; then
17523   cf_cv_sizechange=yes
17524 else
17525   echo "$as_me: failed program was:" >&5
17526 cat conftest.$ac_ext >&5
17527 cf_cv_sizechange=no
17528 fi
17529 rm -f conftest.$ac_objext conftest.$ac_ext
17530
17531         CPPFLAGS="$cf_save_CPPFLAGS"
17532         if test "$cf_cv_sizechange" = yes ; then
17533                 echo "size-change succeeded ($cf_opts)" >&5
17534                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17535                 break
17536         fi
17537 done
17538
17539 fi
17540 echo "$as_me:17540: result: $cf_cv_sizechange" >&5
17541 echo "${ECHO_T}$cf_cv_sizechange" >&6
17542 if test "$cf_cv_sizechange" != no ; then
17543
17544 cat >>confdefs.h <<\EOF
17545 #define HAVE_SIZECHANGE 1
17546 EOF
17547
17548         case $cf_cv_sizechange in #(vi
17549         NEED*)
17550                 cat >>confdefs.h <<EOF
17551 #define $cf_cv_sizechange  1
17552 EOF
17553
17554                 ;;
17555         esac
17556 fi
17557
17558 echo "$as_me:17558: checking for memmove" >&5
17559 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17560 if test "${ac_cv_func_memmove+set}" = set; then
17561   echo $ECHO_N "(cached) $ECHO_C" >&6
17562 else
17563   cat >conftest.$ac_ext <<_ACEOF
17564 #line 17564 "configure"
17565 #include "confdefs.h"
17566 /* System header to define __stub macros and hopefully few prototypes,
17567     which can conflict with char memmove (); below.  */
17568 #include <assert.h>
17569 /* Override any gcc2 internal prototype to avoid an error.  */
17570 #ifdef __cplusplus
17571 extern "C"
17572 #endif
17573 /* We use char because int might match the return type of a gcc2
17574    builtin and then its argument prototype would still apply.  */
17575 char memmove ();
17576 char (*f) ();
17577
17578 int
17579 main ()
17580 {
17581 /* The GNU C library defines this for functions which it implements
17582     to always fail with ENOSYS.  Some functions are actually named
17583     something starting with __ and the normal name is an alias.  */
17584 #if defined (__stub_memmove) || defined (__stub___memmove)
17585 choke me
17586 #else
17587 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17588 #endif
17589
17590   ;
17591   return 0;
17592 }
17593 _ACEOF
17594 rm -f conftest.$ac_objext conftest$ac_exeext
17595 if { (eval echo "$as_me:17595: \"$ac_link\"") >&5
17596   (eval $ac_link) 2>&5
17597   ac_status=$?
17598   echo "$as_me:17598: \$? = $ac_status" >&5
17599   (exit $ac_status); } &&
17600          { ac_try='test -s conftest$ac_exeext'
17601   { (eval echo "$as_me:17601: \"$ac_try\"") >&5
17602   (eval $ac_try) 2>&5
17603   ac_status=$?
17604   echo "$as_me:17604: \$? = $ac_status" >&5
17605   (exit $ac_status); }; }; then
17606   ac_cv_func_memmove=yes
17607 else
17608   echo "$as_me: failed program was:" >&5
17609 cat conftest.$ac_ext >&5
17610 ac_cv_func_memmove=no
17611 fi
17612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17613 fi
17614 echo "$as_me:17614: result: $ac_cv_func_memmove" >&5
17615 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17616 if test $ac_cv_func_memmove = yes; then
17617   :
17618 else
17619
17620 echo "$as_me:17620: checking for bcopy" >&5
17621 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17622 if test "${ac_cv_func_bcopy+set}" = set; then
17623   echo $ECHO_N "(cached) $ECHO_C" >&6
17624 else
17625   cat >conftest.$ac_ext <<_ACEOF
17626 #line 17626 "configure"
17627 #include "confdefs.h"
17628 /* System header to define __stub macros and hopefully few prototypes,
17629     which can conflict with char bcopy (); below.  */
17630 #include <assert.h>
17631 /* Override any gcc2 internal prototype to avoid an error.  */
17632 #ifdef __cplusplus
17633 extern "C"
17634 #endif
17635 /* We use char because int might match the return type of a gcc2
17636    builtin and then its argument prototype would still apply.  */
17637 char bcopy ();
17638 char (*f) ();
17639
17640 int
17641 main ()
17642 {
17643 /* The GNU C library defines this for functions which it implements
17644     to always fail with ENOSYS.  Some functions are actually named
17645     something starting with __ and the normal name is an alias.  */
17646 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17647 choke me
17648 #else
17649 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17650 #endif
17651
17652   ;
17653   return 0;
17654 }
17655 _ACEOF
17656 rm -f conftest.$ac_objext conftest$ac_exeext
17657 if { (eval echo "$as_me:17657: \"$ac_link\"") >&5
17658   (eval $ac_link) 2>&5
17659   ac_status=$?
17660   echo "$as_me:17660: \$? = $ac_status" >&5
17661   (exit $ac_status); } &&
17662          { ac_try='test -s conftest$ac_exeext'
17663   { (eval echo "$as_me:17663: \"$ac_try\"") >&5
17664   (eval $ac_try) 2>&5
17665   ac_status=$?
17666   echo "$as_me:17666: \$? = $ac_status" >&5
17667   (exit $ac_status); }; }; then
17668   ac_cv_func_bcopy=yes
17669 else
17670   echo "$as_me: failed program was:" >&5
17671 cat conftest.$ac_ext >&5
17672 ac_cv_func_bcopy=no
17673 fi
17674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17675 fi
17676 echo "$as_me:17676: result: $ac_cv_func_bcopy" >&5
17677 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17678 if test $ac_cv_func_bcopy = yes; then
17679
17680         echo "$as_me:17680: checking if bcopy does overlapping moves" >&5
17681 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17682 if test "${cf_cv_good_bcopy+set}" = set; then
17683   echo $ECHO_N "(cached) $ECHO_C" >&6
17684 else
17685
17686                 if test "$cross_compiling" = yes; then
17687   cf_cv_good_bcopy=unknown
17688 else
17689   cat >conftest.$ac_ext <<_ACEOF
17690 #line 17690 "configure"
17691 #include "confdefs.h"
17692
17693 int main() {
17694         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17695         char temp[40];
17696         bcopy(data, temp, sizeof(data));
17697         bcopy(temp+10, temp, 15);
17698         bcopy(temp+5, temp+15, 10);
17699         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17700 }
17701
17702 _ACEOF
17703 rm -f conftest$ac_exeext
17704 if { (eval echo "$as_me:17704: \"$ac_link\"") >&5
17705   (eval $ac_link) 2>&5
17706   ac_status=$?
17707   echo "$as_me:17707: \$? = $ac_status" >&5
17708   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17709   { (eval echo "$as_me:17709: \"$ac_try\"") >&5
17710   (eval $ac_try) 2>&5
17711   ac_status=$?
17712   echo "$as_me:17712: \$? = $ac_status" >&5
17713   (exit $ac_status); }; }; then
17714   cf_cv_good_bcopy=yes
17715 else
17716   echo "$as_me: program exited with status $ac_status" >&5
17717 echo "$as_me: failed program was:" >&5
17718 cat conftest.$ac_ext >&5
17719 cf_cv_good_bcopy=no
17720 fi
17721 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17722 fi
17723
17724 fi
17725 echo "$as_me:17725: result: $cf_cv_good_bcopy" >&5
17726 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17727
17728 else
17729   cf_cv_good_bcopy=no
17730 fi
17731
17732         if test "$cf_cv_good_bcopy" = yes ; then
17733
17734 cat >>confdefs.h <<\EOF
17735 #define USE_OK_BCOPY 1
17736 EOF
17737
17738         else
17739
17740 cat >>confdefs.h <<\EOF
17741 #define USE_MY_MEMMOVE 1
17742 EOF
17743
17744         fi
17745
17746 fi
17747
17748 echo "$as_me:17748: checking if poll really works" >&5
17749 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17750 if test "${cf_cv_working_poll+set}" = set; then
17751   echo $ECHO_N "(cached) $ECHO_C" >&6
17752 else
17753
17754 if test "$cross_compiling" = yes; then
17755   cf_cv_working_poll=unknown
17756 else
17757   cat >conftest.$ac_ext <<_ACEOF
17758 #line 17758 "configure"
17759 #include "confdefs.h"
17760
17761 #include <stdlib.h>
17762 #include <stdio.h>
17763 #include <unistd.h>
17764 #include <fcntl.h>
17765 #ifdef HAVE_POLL_H
17766 #include <poll.h>
17767 #else
17768 #include <sys/poll.h>
17769 #endif
17770 int main() {
17771         struct pollfd myfds;
17772         int ret;
17773
17774         /* check for Darwin bug with respect to "devices" */
17775         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17776         if (myfds.fd < 0)
17777                 myfds.fd = 0;
17778         myfds.events = POLLIN;
17779         myfds.revents = 0;
17780
17781         ret = poll(&myfds, 1, 100);
17782
17783         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17784                 ret = -1;
17785         } else {
17786                 int fd = 0;
17787                 if (!isatty(fd)) {
17788                         fd = open("/dev/tty", 2);       /* O_RDWR */
17789                 }
17790
17791                 if (fd >= 0) {
17792                         /* also check with standard input */
17793                         myfds.fd = fd;
17794                         myfds.events = POLLIN;
17795                         myfds.revents = 0;
17796                         ret = poll(&myfds, 1, 100);
17797                 } else {
17798                         ret = -1;
17799                 }
17800         }
17801         ${cf_cv_main_return:-return}(ret < 0);
17802 }
17803 _ACEOF
17804 rm -f conftest$ac_exeext
17805 if { (eval echo "$as_me:17805: \"$ac_link\"") >&5
17806   (eval $ac_link) 2>&5
17807   ac_status=$?
17808   echo "$as_me:17808: \$? = $ac_status" >&5
17809   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17810   { (eval echo "$as_me:17810: \"$ac_try\"") >&5
17811   (eval $ac_try) 2>&5
17812   ac_status=$?
17813   echo "$as_me:17813: \$? = $ac_status" >&5
17814   (exit $ac_status); }; }; then
17815   cf_cv_working_poll=yes
17816 else
17817   echo "$as_me: program exited with status $ac_status" >&5
17818 echo "$as_me: failed program was:" >&5
17819 cat conftest.$ac_ext >&5
17820 cf_cv_working_poll=no
17821 fi
17822 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17823 fi
17824 fi
17825 echo "$as_me:17825: result: $cf_cv_working_poll" >&5
17826 echo "${ECHO_T}$cf_cv_working_poll" >&6
17827 test "$cf_cv_working_poll" = "yes" &&
17828 cat >>confdefs.h <<\EOF
17829 #define HAVE_WORKING_POLL 1
17830 EOF
17831
17832 echo "$as_me:17832: checking for va_copy" >&5
17833 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17834 if test "${cf_cv_have_va_copy+set}" = set; then
17835   echo $ECHO_N "(cached) $ECHO_C" >&6
17836 else
17837
17838 cat >conftest.$ac_ext <<_ACEOF
17839 #line 17839 "configure"
17840 #include "confdefs.h"
17841
17842 #include <stdarg.h>
17843
17844 int
17845 main ()
17846 {
17847
17848         static va_list dst;
17849         static va_list src;
17850         va_copy(dst, src)
17851   ;
17852   return 0;
17853 }
17854 _ACEOF
17855 rm -f conftest.$ac_objext conftest$ac_exeext
17856 if { (eval echo "$as_me:17856: \"$ac_link\"") >&5
17857   (eval $ac_link) 2>&5
17858   ac_status=$?
17859   echo "$as_me:17859: \$? = $ac_status" >&5
17860   (exit $ac_status); } &&
17861          { ac_try='test -s conftest$ac_exeext'
17862   { (eval echo "$as_me:17862: \"$ac_try\"") >&5
17863   (eval $ac_try) 2>&5
17864   ac_status=$?
17865   echo "$as_me:17865: \$? = $ac_status" >&5
17866   (exit $ac_status); }; }; then
17867   cf_cv_have_va_copy=yes
17868 else
17869   echo "$as_me: failed program was:" >&5
17870 cat conftest.$ac_ext >&5
17871 cf_cv_have_va_copy=no
17872 fi
17873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17874 fi
17875 echo "$as_me:17875: result: $cf_cv_have_va_copy" >&5
17876 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17877
17878 test "$cf_cv_have_va_copy" = yes &&
17879 cat >>confdefs.h <<\EOF
17880 #define HAVE_VA_COPY 1
17881 EOF
17882
17883 echo "$as_me:17883: checking for __va_copy" >&5
17884 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17885 if test "${cf_cv_have___va_copy+set}" = set; then
17886   echo $ECHO_N "(cached) $ECHO_C" >&6
17887 else
17888
17889 cat >conftest.$ac_ext <<_ACEOF
17890 #line 17890 "configure"
17891 #include "confdefs.h"
17892
17893 #include <stdarg.h>
17894
17895 int
17896 main ()
17897 {
17898
17899         static va_list dst;
17900         static va_list src;
17901         __va_copy(dst, src)
17902   ;
17903   return 0;
17904 }
17905 _ACEOF
17906 rm -f conftest.$ac_objext conftest$ac_exeext
17907 if { (eval echo "$as_me:17907: \"$ac_link\"") >&5
17908   (eval $ac_link) 2>&5
17909   ac_status=$?
17910   echo "$as_me:17910: \$? = $ac_status" >&5
17911   (exit $ac_status); } &&
17912          { ac_try='test -s conftest$ac_exeext'
17913   { (eval echo "$as_me:17913: \"$ac_try\"") >&5
17914   (eval $ac_try) 2>&5
17915   ac_status=$?
17916   echo "$as_me:17916: \$? = $ac_status" >&5
17917   (exit $ac_status); }; }; then
17918   cf_cv_have___va_copy=yes
17919 else
17920   echo "$as_me: failed program was:" >&5
17921 cat conftest.$ac_ext >&5
17922 cf_cv_have___va_copy=no
17923 fi
17924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17925 fi
17926 echo "$as_me:17926: result: $cf_cv_have___va_copy" >&5
17927 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17928
17929 test "$cf_cv_have___va_copy" = yes &&
17930 cat >>confdefs.h <<\EOF
17931 #define HAVE___VA_COPY 1
17932 EOF
17933
17934 echo "$as_me:17934: checking for pid_t" >&5
17935 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17936 if test "${ac_cv_type_pid_t+set}" = set; then
17937   echo $ECHO_N "(cached) $ECHO_C" >&6
17938 else
17939   cat >conftest.$ac_ext <<_ACEOF
17940 #line 17940 "configure"
17941 #include "confdefs.h"
17942 $ac_includes_default
17943 int
17944 main ()
17945 {
17946 if ((pid_t *) 0)
17947   return 0;
17948 if (sizeof (pid_t))
17949   return 0;
17950   ;
17951   return 0;
17952 }
17953 _ACEOF
17954 rm -f conftest.$ac_objext
17955 if { (eval echo "$as_me:17955: \"$ac_compile\"") >&5
17956   (eval $ac_compile) 2>&5
17957   ac_status=$?
17958   echo "$as_me:17958: \$? = $ac_status" >&5
17959   (exit $ac_status); } &&
17960          { ac_try='test -s conftest.$ac_objext'
17961   { (eval echo "$as_me:17961: \"$ac_try\"") >&5
17962   (eval $ac_try) 2>&5
17963   ac_status=$?
17964   echo "$as_me:17964: \$? = $ac_status" >&5
17965   (exit $ac_status); }; }; then
17966   ac_cv_type_pid_t=yes
17967 else
17968   echo "$as_me: failed program was:" >&5
17969 cat conftest.$ac_ext >&5
17970 ac_cv_type_pid_t=no
17971 fi
17972 rm -f conftest.$ac_objext conftest.$ac_ext
17973 fi
17974 echo "$as_me:17974: result: $ac_cv_type_pid_t" >&5
17975 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17976 if test $ac_cv_type_pid_t = yes; then
17977   :
17978 else
17979
17980 cat >>confdefs.h <<EOF
17981 #define pid_t int
17982 EOF
17983
17984 fi
17985
17986 for ac_header in unistd.h vfork.h
17987 do
17988 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17989 echo "$as_me:17989: checking for $ac_header" >&5
17990 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17991 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17992   echo $ECHO_N "(cached) $ECHO_C" >&6
17993 else
17994   cat >conftest.$ac_ext <<_ACEOF
17995 #line 17995 "configure"
17996 #include "confdefs.h"
17997 #include <$ac_header>
17998 _ACEOF
17999 if { (eval echo "$as_me:17999: \"$ac_cpp conftest.$ac_ext\"") >&5
18000   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18001   ac_status=$?
18002   egrep -v '^ *\+' conftest.er1 >conftest.err
18003   rm -f conftest.er1
18004   cat conftest.err >&5
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); } >/dev/null; then
18007   if test -s conftest.err; then
18008     ac_cpp_err=$ac_c_preproc_warn_flag
18009   else
18010     ac_cpp_err=
18011   fi
18012 else
18013   ac_cpp_err=yes
18014 fi
18015 if test -z "$ac_cpp_err"; then
18016   eval "$as_ac_Header=yes"
18017 else
18018   echo "$as_me: failed program was:" >&5
18019   cat conftest.$ac_ext >&5
18020   eval "$as_ac_Header=no"
18021 fi
18022 rm -f conftest.err conftest.$ac_ext
18023 fi
18024 echo "$as_me:18024: result: `eval echo '${'$as_ac_Header'}'`" >&5
18025 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18026 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18027   cat >>confdefs.h <<EOF
18028 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18029 EOF
18030
18031 fi
18032 done
18033
18034 for ac_func in fork vfork
18035 do
18036 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18037 echo "$as_me:18037: checking for $ac_func" >&5
18038 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18039 if eval "test \"\${$as_ac_var+set}\" = set"; then
18040   echo $ECHO_N "(cached) $ECHO_C" >&6
18041 else
18042   cat >conftest.$ac_ext <<_ACEOF
18043 #line 18043 "configure"
18044 #include "confdefs.h"
18045 /* System header to define __stub macros and hopefully few prototypes,
18046     which can conflict with char $ac_func (); below.  */
18047 #include <assert.h>
18048 /* Override any gcc2 internal prototype to avoid an error.  */
18049 #ifdef __cplusplus
18050 extern "C"
18051 #endif
18052 /* We use char because int might match the return type of a gcc2
18053    builtin and then its argument prototype would still apply.  */
18054 char $ac_func ();
18055 char (*f) ();
18056
18057 int
18058 main ()
18059 {
18060 /* The GNU C library defines this for functions which it implements
18061     to always fail with ENOSYS.  Some functions are actually named
18062     something starting with __ and the normal name is an alias.  */
18063 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18064 choke me
18065 #else
18066 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18067 #endif
18068
18069   ;
18070   return 0;
18071 }
18072 _ACEOF
18073 rm -f conftest.$ac_objext conftest$ac_exeext
18074 if { (eval echo "$as_me:18074: \"$ac_link\"") >&5
18075   (eval $ac_link) 2>&5
18076   ac_status=$?
18077   echo "$as_me:18077: \$? = $ac_status" >&5
18078   (exit $ac_status); } &&
18079          { ac_try='test -s conftest$ac_exeext'
18080   { (eval echo "$as_me:18080: \"$ac_try\"") >&5
18081   (eval $ac_try) 2>&5
18082   ac_status=$?
18083   echo "$as_me:18083: \$? = $ac_status" >&5
18084   (exit $ac_status); }; }; then
18085   eval "$as_ac_var=yes"
18086 else
18087   echo "$as_me: failed program was:" >&5
18088 cat conftest.$ac_ext >&5
18089 eval "$as_ac_var=no"
18090 fi
18091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18092 fi
18093 echo "$as_me:18093: result: `eval echo '${'$as_ac_var'}'`" >&5
18094 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18095 if test `eval echo '${'$as_ac_var'}'` = yes; then
18096   cat >>confdefs.h <<EOF
18097 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18098 EOF
18099
18100 fi
18101 done
18102
18103 ac_cv_func_fork_works=$ac_cv_func_fork
18104 if test "x$ac_cv_func_fork" = xyes; then
18105   echo "$as_me:18105: checking for working fork" >&5
18106 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18107 if test "${ac_cv_func_fork_works+set}" = set; then
18108   echo $ECHO_N "(cached) $ECHO_C" >&6
18109 else
18110   if test "$cross_compiling" = yes; then
18111   ac_cv_func_fork_works=cross
18112 else
18113   cat >conftest.$ac_ext <<_ACEOF
18114 /* By Rüdiger Kuhlmann. */
18115       #include <sys/types.h>
18116       #if HAVE_UNISTD_H
18117       # include <unistd.h>
18118       #endif
18119       /* Some systems only have a dummy stub for fork() */
18120       int main ()
18121       {
18122         if (fork() < 0)
18123           $ac_main_return (1);
18124         $ac_main_return (0);
18125       }
18126 _ACEOF
18127 rm -f conftest$ac_exeext
18128 if { (eval echo "$as_me:18128: \"$ac_link\"") >&5
18129   (eval $ac_link) 2>&5
18130   ac_status=$?
18131   echo "$as_me:18131: \$? = $ac_status" >&5
18132   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18133   { (eval echo "$as_me:18133: \"$ac_try\"") >&5
18134   (eval $ac_try) 2>&5
18135   ac_status=$?
18136   echo "$as_me:18136: \$? = $ac_status" >&5
18137   (exit $ac_status); }; }; then
18138   ac_cv_func_fork_works=yes
18139 else
18140   echo "$as_me: program exited with status $ac_status" >&5
18141 echo "$as_me: failed program was:" >&5
18142 cat conftest.$ac_ext >&5
18143 ac_cv_func_fork_works=no
18144 fi
18145 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18146 fi
18147 fi
18148 echo "$as_me:18148: result: $ac_cv_func_fork_works" >&5
18149 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18150
18151 fi
18152 if test "x$ac_cv_func_fork_works" = xcross; then
18153   case $host in
18154     *-*-amigaos* | *-*-msdosdjgpp*)
18155       # Override, as these systems have only a dummy fork() stub
18156       ac_cv_func_fork_works=no
18157       ;;
18158     *)
18159       ac_cv_func_fork_works=yes
18160       ;;
18161   esac
18162   { echo "$as_me:18162: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18163 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18164 fi
18165 ac_cv_func_vfork_works=$ac_cv_func_vfork
18166 if test "x$ac_cv_func_vfork" = xyes; then
18167   echo "$as_me:18167: checking for working vfork" >&5
18168 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18169 if test "${ac_cv_func_vfork_works+set}" = set; then
18170   echo $ECHO_N "(cached) $ECHO_C" >&6
18171 else
18172   if test "$cross_compiling" = yes; then
18173   ac_cv_func_vfork_works=cross
18174 else
18175   cat >conftest.$ac_ext <<_ACEOF
18176 #line 18176 "configure"
18177 #include "confdefs.h"
18178 /* Thanks to Paul Eggert for this test.  */
18179 #include <stdio.h>
18180 #include <sys/types.h>
18181 #include <sys/stat.h>
18182 #if HAVE_UNISTD_H
18183 # include <unistd.h>
18184 #endif
18185 #if HAVE_VFORK_H
18186 # include <vfork.h>
18187 #endif
18188 /* On some sparc systems, changes by the child to local and incoming
18189    argument registers are propagated back to the parent.  The compiler
18190    is told about this with #include <vfork.h>, but some compilers
18191    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18192    static variable whose address is put into a register that is
18193    clobbered by the vfork.  */
18194 static
18195 #ifdef __cplusplus
18196 sparc_address_test (int arg)
18197 # else
18198 sparc_address_test (arg) int arg;
18199 #endif
18200 {
18201   static pid_t child;
18202   if (!child) {
18203     child = vfork ();
18204     if (child < 0) {
18205       perror ("vfork");
18206       _exit(2);
18207     }
18208     if (!child) {
18209       arg = getpid();
18210       write(-1, "", 0);
18211       _exit (arg);
18212     }
18213   }
18214 }
18215
18216 int
18217 main ()
18218 {
18219   pid_t parent = getpid ();
18220   pid_t child;
18221
18222   sparc_address_test ();
18223
18224   child = vfork ();
18225
18226   if (child == 0) {
18227     /* Here is another test for sparc vfork register problems.  This
18228        test uses lots of local variables, at least as many local
18229        variables as main has allocated so far including compiler
18230        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18231        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18232        reuse the register of parent for one of the local variables,
18233        since it will think that parent can't possibly be used any more
18234        in this routine.  Assigning to the local variable will thus
18235        munge parent in the parent process.  */
18236     pid_t
18237       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18238       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18239     /* Convince the compiler that p..p7 are live; otherwise, it might
18240        use the same hardware register for all 8 local variables.  */
18241     if (p != p1 || p != p2 || p != p3 || p != p4
18242         || p != p5 || p != p6 || p != p7)
18243       _exit(1);
18244
18245     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18246        from child file descriptors.  If the child closes a descriptor
18247        before it execs or exits, this munges the parent's descriptor
18248        as well.  Test for this by closing stdout in the child.  */
18249     _exit(close(fileno(stdout)) != 0);
18250   } else {
18251     int status;
18252     struct stat st;
18253
18254     while (wait(&status) != child)
18255       ;
18256     $ac_main_return(
18257          /* Was there some problem with vforking?  */
18258          child < 0
18259
18260          /* Did the child fail?  (This shouldn't happen.)  */
18261          || status
18262
18263          /* Did the vfork/compiler bug occur?  */
18264          || parent != getpid()
18265
18266          /* Did the file descriptor bug occur?  */
18267          || fstat(fileno(stdout), &st) != 0
18268          );
18269   }
18270 }
18271 _ACEOF
18272 rm -f conftest$ac_exeext
18273 if { (eval echo "$as_me:18273: \"$ac_link\"") >&5
18274   (eval $ac_link) 2>&5
18275   ac_status=$?
18276   echo "$as_me:18276: \$? = $ac_status" >&5
18277   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18278   { (eval echo "$as_me:18278: \"$ac_try\"") >&5
18279   (eval $ac_try) 2>&5
18280   ac_status=$?
18281   echo "$as_me:18281: \$? = $ac_status" >&5
18282   (exit $ac_status); }; }; then
18283   ac_cv_func_vfork_works=yes
18284 else
18285   echo "$as_me: program exited with status $ac_status" >&5
18286 echo "$as_me: failed program was:" >&5
18287 cat conftest.$ac_ext >&5
18288 ac_cv_func_vfork_works=no
18289 fi
18290 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18291 fi
18292 fi
18293 echo "$as_me:18293: result: $ac_cv_func_vfork_works" >&5
18294 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18295
18296 fi;
18297 if test "x$ac_cv_func_fork_works" = xcross; then
18298   ac_cv_func_vfork_works=ac_cv_func_vfork
18299   { echo "$as_me:18299: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18300 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18301 fi
18302
18303 if test "x$ac_cv_func_vfork_works" = xyes; then
18304
18305 cat >>confdefs.h <<\EOF
18306 #define HAVE_WORKING_VFORK 1
18307 EOF
18308
18309 else
18310
18311 cat >>confdefs.h <<\EOF
18312 #define vfork fork
18313 EOF
18314
18315 fi
18316 if test "x$ac_cv_func_fork_works" = xyes; then
18317
18318 cat >>confdefs.h <<\EOF
18319 #define HAVE_WORKING_FORK 1
18320 EOF
18321
18322 fi
18323
18324 # special check for test/ditto.c
18325
18326 echo "$as_me:18326: checking for openpty in -lutil" >&5
18327 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18328 if test "${ac_cv_lib_util_openpty+set}" = set; then
18329   echo $ECHO_N "(cached) $ECHO_C" >&6
18330 else
18331   ac_check_lib_save_LIBS=$LIBS
18332 LIBS="-lutil  $LIBS"
18333 cat >conftest.$ac_ext <<_ACEOF
18334 #line 18334 "configure"
18335 #include "confdefs.h"
18336
18337 /* Override any gcc2 internal prototype to avoid an error.  */
18338 #ifdef __cplusplus
18339 extern "C"
18340 #endif
18341 /* We use char because int might match the return type of a gcc2
18342    builtin and then its argument prototype would still apply.  */
18343 char openpty ();
18344 int
18345 main ()
18346 {
18347 openpty ();
18348   ;
18349   return 0;
18350 }
18351 _ACEOF
18352 rm -f conftest.$ac_objext conftest$ac_exeext
18353 if { (eval echo "$as_me:18353: \"$ac_link\"") >&5
18354   (eval $ac_link) 2>&5
18355   ac_status=$?
18356   echo "$as_me:18356: \$? = $ac_status" >&5
18357   (exit $ac_status); } &&
18358          { ac_try='test -s conftest$ac_exeext'
18359   { (eval echo "$as_me:18359: \"$ac_try\"") >&5
18360   (eval $ac_try) 2>&5
18361   ac_status=$?
18362   echo "$as_me:18362: \$? = $ac_status" >&5
18363   (exit $ac_status); }; }; then
18364   ac_cv_lib_util_openpty=yes
18365 else
18366   echo "$as_me: failed program was:" >&5
18367 cat conftest.$ac_ext >&5
18368 ac_cv_lib_util_openpty=no
18369 fi
18370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18371 LIBS=$ac_check_lib_save_LIBS
18372 fi
18373 echo "$as_me:18373: result: $ac_cv_lib_util_openpty" >&5
18374 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18375 if test $ac_cv_lib_util_openpty = yes; then
18376   cf_cv_lib_util=yes
18377 else
18378   cf_cv_lib_util=no
18379 fi
18380
18381 echo "$as_me:18381: checking for openpty header" >&5
18382 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18383 if test "${cf_cv_func_openpty+set}" = set; then
18384   echo $ECHO_N "(cached) $ECHO_C" >&6
18385 else
18386
18387     cf_save_LIBS="$LIBS"
18388     test $cf_cv_lib_util = yes &&
18389 cf_add_libs="-lutil"
18390 # Filter out duplicates - this happens with badly-designed ".pc" files...
18391 for cf_add_1lib in $LIBS
18392 do
18393         for cf_add_2lib in $cf_add_libs
18394         do
18395                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18396                 then
18397                         cf_add_1lib=
18398                         break
18399                 fi
18400         done
18401         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18402 done
18403 LIBS="$cf_add_libs"
18404
18405     for cf_header in pty.h libutil.h util.h
18406     do
18407     cat >conftest.$ac_ext <<_ACEOF
18408 #line 18408 "configure"
18409 #include "confdefs.h"
18410
18411 #include <$cf_header>
18412
18413 int
18414 main ()
18415 {
18416
18417     int x = openpty((int *)0, (int *)0, (char *)0,
18418                    (struct termios *)0, (struct winsize *)0);
18419
18420   ;
18421   return 0;
18422 }
18423 _ACEOF
18424 rm -f conftest.$ac_objext conftest$ac_exeext
18425 if { (eval echo "$as_me:18425: \"$ac_link\"") >&5
18426   (eval $ac_link) 2>&5
18427   ac_status=$?
18428   echo "$as_me:18428: \$? = $ac_status" >&5
18429   (exit $ac_status); } &&
18430          { ac_try='test -s conftest$ac_exeext'
18431   { (eval echo "$as_me:18431: \"$ac_try\"") >&5
18432   (eval $ac_try) 2>&5
18433   ac_status=$?
18434   echo "$as_me:18434: \$? = $ac_status" >&5
18435   (exit $ac_status); }; }; then
18436
18437         cf_cv_func_openpty=$cf_header
18438         break
18439
18440 else
18441   echo "$as_me: failed program was:" >&5
18442 cat conftest.$ac_ext >&5
18443
18444         cf_cv_func_openpty=no
18445
18446 fi
18447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18448     done
18449     LIBS="$cf_save_LIBS"
18450
18451 fi
18452 echo "$as_me:18452: result: $cf_cv_func_openpty" >&5
18453 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18454
18455 if test "$cf_cv_func_openpty" != no ; then
18456
18457 cat >>confdefs.h <<EOF
18458 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18459 EOF
18460
18461 cat >>confdefs.h <<\EOF
18462 #define USE_XTERM_PTY 1
18463 EOF
18464
18465     if test "x$cf_cv_lib_util" = xyes ; then
18466
18467 cf_add_libs="-lutil"
18468 # Filter out duplicates - this happens with badly-designed ".pc" files...
18469 for cf_add_1lib in $TEST_LIBS
18470 do
18471         for cf_add_2lib in $cf_add_libs
18472         do
18473                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18474                 then
18475                         cf_add_1lib=
18476                         break
18477                 fi
18478         done
18479         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18480 done
18481 TEST_LIBS="$cf_add_libs"
18482
18483     fi
18484 fi
18485
18486 if test "$with_hashed_db" != no ; then
18487
18488 cat >>confdefs.h <<\EOF
18489 #define USE_HASHED_DB 1
18490 EOF
18491
18492 case $with_hashed_db in #(vi
18493 yes|*able*) #(vi
18494     ;;
18495 *)
18496     if test -d "$with_hashed_db" ; then
18497
18498 if test -n "$with_hashed_db/include" ; then
18499   for cf_add_incdir in $with_hashed_db/include
18500   do
18501         while test $cf_add_incdir != /usr/include
18502         do
18503           if test -d $cf_add_incdir
18504           then
18505                 cf_have_incdir=no
18506                 if test -n "$CFLAGS$CPPFLAGS" ; then
18507                   # a loop is needed to ensure we can add subdirs of existing dirs
18508                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18509                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18510                           cf_have_incdir=yes; break
18511                         fi
18512                   done
18513                 fi
18514
18515                 if test "$cf_have_incdir" = no ; then
18516                   if test "$cf_add_incdir" = /usr/local/include ; then
18517                         if test "$GCC" = yes
18518                         then
18519                           cf_save_CPPFLAGS=$CPPFLAGS
18520                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18521                           cat >conftest.$ac_ext <<_ACEOF
18522 #line 18522 "configure"
18523 #include "confdefs.h"
18524 #include <stdio.h>
18525 int
18526 main ()
18527 {
18528 printf("Hello")
18529   ;
18530   return 0;
18531 }
18532 _ACEOF
18533 rm -f conftest.$ac_objext
18534 if { (eval echo "$as_me:18534: \"$ac_compile\"") >&5
18535   (eval $ac_compile) 2>&5
18536   ac_status=$?
18537   echo "$as_me:18537: \$? = $ac_status" >&5
18538   (exit $ac_status); } &&
18539          { ac_try='test -s conftest.$ac_objext'
18540   { (eval echo "$as_me:18540: \"$ac_try\"") >&5
18541   (eval $ac_try) 2>&5
18542   ac_status=$?
18543   echo "$as_me:18543: \$? = $ac_status" >&5
18544   (exit $ac_status); }; }; then
18545   :
18546 else
18547   echo "$as_me: failed program was:" >&5
18548 cat conftest.$ac_ext >&5
18549 cf_have_incdir=yes
18550 fi
18551 rm -f conftest.$ac_objext conftest.$ac_ext
18552                           CPPFLAGS=$cf_save_CPPFLAGS
18553                         fi
18554                   fi
18555                 fi
18556
18557                 if test "$cf_have_incdir" = no ; then
18558                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18559
18560 echo "${as_me:-configure}:18560: testing adding $cf_add_incdir to include-path ..." 1>&5
18561
18562                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18563
18564                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18565                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18566                   cf_add_incdir="$cf_top_incdir"
18567                 else
18568                   break
18569                 fi
18570           fi
18571         done
18572   done
18573 fi
18574
18575 if test -n "$with_hashed_db/lib" ; then
18576   for cf_add_libdir in $with_hashed_db/lib
18577   do
18578     if test $cf_add_libdir = /usr/lib ; then
18579       :
18580     elif test -d $cf_add_libdir
18581     then
18582       cf_have_libdir=no
18583       if test -n "$LDFLAGS$LIBS" ; then
18584         # a loop is needed to ensure we can add subdirs of existing dirs
18585         for cf_test_libdir in $LDFLAGS $LIBS ; do
18586           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18587             cf_have_libdir=yes; break
18588           fi
18589         done
18590       fi
18591       if test "$cf_have_libdir" = no ; then
18592         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18593
18594 echo "${as_me:-configure}:18594: testing adding $cf_add_libdir to library-path ..." 1>&5
18595
18596         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18597       fi
18598     fi
18599   done
18600 fi
18601
18602         else
18603                 case "$with_hashed_db" in #(vi
18604                 ./*|../*|/*)
18605                         { echo "$as_me:18605: WARNING: no such directory $with_hashed_db" >&5
18606 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18607                         ;; #(vi
18608                 *)
18609
18610 cf_search=
18611
18612 test "x$prefix" != "xNONE" && \
18613 test -d "$prefix" && \
18614  {
18615         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18616         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18617         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18618         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18619         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18620         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18621 }
18622
18623 for cf_subdir_prefix in \
18624         /usr \
18625         /usr/local \
18626         /usr/pkg \
18627         /opt \
18628         /opt/local \
18629         $HOME
18630 do
18631
18632 test "x$cf_subdir_prefix" != "x$prefix" && \
18633 test -d "$cf_subdir_prefix" && \
18634 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18635         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18636         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18637         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18638         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18639         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18640         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"
18641 }
18642
18643 done
18644
18645         for cf_item in $cf_search
18646         do
18647                 case $cf_item in #(vi
18648                 */$with_hashed_db)
18649
18650 if test -n "$cf_item" ; then
18651   for cf_add_incdir in $cf_item
18652   do
18653         while test $cf_add_incdir != /usr/include
18654         do
18655           if test -d $cf_add_incdir
18656           then
18657                 cf_have_incdir=no
18658                 if test -n "$CFLAGS$CPPFLAGS" ; then
18659                   # a loop is needed to ensure we can add subdirs of existing dirs
18660                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18661                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18662                           cf_have_incdir=yes; break
18663                         fi
18664                   done
18665                 fi
18666
18667                 if test "$cf_have_incdir" = no ; then
18668                   if test "$cf_add_incdir" = /usr/local/include ; then
18669                         if test "$GCC" = yes
18670                         then
18671                           cf_save_CPPFLAGS=$CPPFLAGS
18672                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18673                           cat >conftest.$ac_ext <<_ACEOF
18674 #line 18674 "configure"
18675 #include "confdefs.h"
18676 #include <stdio.h>
18677 int
18678 main ()
18679 {
18680 printf("Hello")
18681   ;
18682   return 0;
18683 }
18684 _ACEOF
18685 rm -f conftest.$ac_objext
18686 if { (eval echo "$as_me:18686: \"$ac_compile\"") >&5
18687   (eval $ac_compile) 2>&5
18688   ac_status=$?
18689   echo "$as_me:18689: \$? = $ac_status" >&5
18690   (exit $ac_status); } &&
18691          { ac_try='test -s conftest.$ac_objext'
18692   { (eval echo "$as_me:18692: \"$ac_try\"") >&5
18693   (eval $ac_try) 2>&5
18694   ac_status=$?
18695   echo "$as_me:18695: \$? = $ac_status" >&5
18696   (exit $ac_status); }; }; then
18697   :
18698 else
18699   echo "$as_me: failed program was:" >&5
18700 cat conftest.$ac_ext >&5
18701 cf_have_incdir=yes
18702 fi
18703 rm -f conftest.$ac_objext conftest.$ac_ext
18704                           CPPFLAGS=$cf_save_CPPFLAGS
18705                         fi
18706                   fi
18707                 fi
18708
18709                 if test "$cf_have_incdir" = no ; then
18710                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18711
18712 echo "${as_me:-configure}:18712: testing adding $cf_add_incdir to include-path ..." 1>&5
18713
18714                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18715
18716                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18717                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18718                   cf_add_incdir="$cf_top_incdir"
18719                 else
18720                   break
18721                 fi
18722           fi
18723         done
18724   done
18725 fi
18726
18727                         ;;
18728                 esac
18729         done
18730
18731 cf_search=
18732
18733 test "x$prefix" != "xNONE" && \
18734 test -d "$prefix" && \
18735  {
18736         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18737         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18738         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18739         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18740         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18741         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18742 }
18743
18744 for cf_subdir_prefix in \
18745         /usr \
18746         /usr/local \
18747         /usr/pkg \
18748         /opt \
18749         /opt/local \
18750         $HOME
18751 do
18752
18753 test "x$cf_subdir_prefix" != "x$prefix" && \
18754 test -d "$cf_subdir_prefix" && \
18755 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18756         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18757         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18758         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18759         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18760         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18761         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"
18762 }
18763
18764 done
18765
18766         for cf_item in $cf_search
18767         do
18768                 case $cf_item in #(vi
18769                 */$with_hashed_db)
18770
18771 if test -n "$cf_item" ; then
18772   for cf_add_libdir in $cf_item
18773   do
18774     if test $cf_add_libdir = /usr/lib ; then
18775       :
18776     elif test -d $cf_add_libdir
18777     then
18778       cf_have_libdir=no
18779       if test -n "$LDFLAGS$LIBS" ; then
18780         # a loop is needed to ensure we can add subdirs of existing dirs
18781         for cf_test_libdir in $LDFLAGS $LIBS ; do
18782           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18783             cf_have_libdir=yes; break
18784           fi
18785         done
18786       fi
18787       if test "$cf_have_libdir" = no ; then
18788         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18789
18790 echo "${as_me:-configure}:18790: testing adding $cf_add_libdir to library-path ..." 1>&5
18791
18792         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18793       fi
18794     fi
18795   done
18796 fi
18797
18798                         ;;
18799                 esac
18800         done
18801
18802                         ;;
18803                 esac
18804     fi
18805 esac
18806
18807 echo "$as_me:18807: checking for db.h" >&5
18808 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18809 if test "${ac_cv_header_db_h+set}" = set; then
18810   echo $ECHO_N "(cached) $ECHO_C" >&6
18811 else
18812   cat >conftest.$ac_ext <<_ACEOF
18813 #line 18813 "configure"
18814 #include "confdefs.h"
18815 #include <db.h>
18816 _ACEOF
18817 if { (eval echo "$as_me:18817: \"$ac_cpp conftest.$ac_ext\"") >&5
18818   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18819   ac_status=$?
18820   egrep -v '^ *\+' conftest.er1 >conftest.err
18821   rm -f conftest.er1
18822   cat conftest.err >&5
18823   echo "$as_me:18823: \$? = $ac_status" >&5
18824   (exit $ac_status); } >/dev/null; then
18825   if test -s conftest.err; then
18826     ac_cpp_err=$ac_c_preproc_warn_flag
18827   else
18828     ac_cpp_err=
18829   fi
18830 else
18831   ac_cpp_err=yes
18832 fi
18833 if test -z "$ac_cpp_err"; then
18834   ac_cv_header_db_h=yes
18835 else
18836   echo "$as_me: failed program was:" >&5
18837   cat conftest.$ac_ext >&5
18838   ac_cv_header_db_h=no
18839 fi
18840 rm -f conftest.err conftest.$ac_ext
18841 fi
18842 echo "$as_me:18842: result: $ac_cv_header_db_h" >&5
18843 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18844 if test $ac_cv_header_db_h = yes; then
18845
18846 echo "$as_me:18846: checking for version of db" >&5
18847 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18848 if test "${cf_cv_hashed_db_version+set}" = set; then
18849   echo $ECHO_N "(cached) $ECHO_C" >&6
18850 else
18851
18852 cf_cv_hashed_db_version=unknown
18853
18854 for cf_db_version in 1 2 3 4 5 6
18855 do
18856
18857 echo "${as_me:-configure}:18857: testing checking for db version $cf_db_version ..." 1>&5
18858
18859         cat >conftest.$ac_ext <<_ACEOF
18860 #line 18860 "configure"
18861 #include "confdefs.h"
18862
18863 $ac_includes_default
18864 #include <db.h>
18865
18866 #ifdef DB_VERSION_MAJOR
18867         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18868 #if $cf_db_version == DB_VERSION_MAJOR
18869         /* ok */
18870 #else
18871         make an error
18872 #endif
18873 #else
18874 #if $cf_db_version == 1
18875         /* ok: assuming this is DB 1.8.5 */
18876 #else
18877         make an error
18878 #endif
18879 #endif
18880
18881 int
18882 main ()
18883 {
18884 DBT *foo = 0
18885   ;
18886   return 0;
18887 }
18888 _ACEOF
18889 rm -f conftest.$ac_objext
18890 if { (eval echo "$as_me:18890: \"$ac_compile\"") >&5
18891   (eval $ac_compile) 2>&5
18892   ac_status=$?
18893   echo "$as_me:18893: \$? = $ac_status" >&5
18894   (exit $ac_status); } &&
18895          { ac_try='test -s conftest.$ac_objext'
18896   { (eval echo "$as_me:18896: \"$ac_try\"") >&5
18897   (eval $ac_try) 2>&5
18898   ac_status=$?
18899   echo "$as_me:18899: \$? = $ac_status" >&5
18900   (exit $ac_status); }; }; then
18901
18902         cf_cv_hashed_db_version=$cf_db_version
18903         break
18904
18905 else
18906   echo "$as_me: failed program was:" >&5
18907 cat conftest.$ac_ext >&5
18908 fi
18909 rm -f conftest.$ac_objext conftest.$ac_ext
18910 done
18911
18912 fi
18913 echo "$as_me:18913: result: $cf_cv_hashed_db_version" >&5
18914 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18915
18916 if test "$cf_cv_hashed_db_version" = unknown ; then
18917         { { echo "$as_me:18917: error: Cannot determine version of db" >&5
18918 echo "$as_me: error: Cannot determine version of db" >&2;}
18919    { (exit 1); exit 1; }; }
18920 else
18921
18922 echo "$as_me:18922: checking for db libraries" >&5
18923 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18924 if test "${cf_cv_hashed_db_libs+set}" = set; then
18925   echo $ECHO_N "(cached) $ECHO_C" >&6
18926 else
18927
18928 cf_cv_hashed_db_libs=unknown
18929 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18930 do
18931         cf_save_libs="$LIBS"
18932         if test -n "$cf_db_libs"; then
18933
18934 cf_add_libs="-l$cf_db_libs"
18935 # Filter out duplicates - this happens with badly-designed ".pc" files...
18936 for cf_add_1lib in $LIBS
18937 do
18938         for cf_add_2lib in $cf_add_libs
18939         do
18940                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18941                 then
18942                         cf_add_1lib=
18943                         break
18944                 fi
18945         done
18946         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18947 done
18948 LIBS="$cf_add_libs"
18949
18950         fi
18951
18952 echo "${as_me:-configure}:18952: testing checking for library "$cf_db_libs" ..." 1>&5
18953
18954         cat >conftest.$ac_ext <<_ACEOF
18955 #line 18955 "configure"
18956 #include "confdefs.h"
18957
18958 $ac_includes_default
18959 #include <db.h>
18960
18961 int
18962 main ()
18963 {
18964
18965         char *path = "/tmp/foo";
18966 #ifdef DB_VERSION_MAJOR
18967 #if DB_VERSION_MAJOR >= 4
18968         DB *result = 0;
18969         db_create(&result, NULL, 0);
18970         result->open(result,
18971                 NULL,
18972                 path,
18973                 path,
18974                 DB_HASH,
18975                 DB_CREATE,
18976                 0644);
18977 #elif DB_VERSION_MAJOR >= 3
18978         DB *result = 0;
18979         db_create(&result, NULL, 0);
18980         result->open(result,
18981                 path,
18982                 path,
18983                 DB_HASH,
18984                 DB_CREATE,
18985                 0644);
18986 #elif DB_VERSION_MAJOR >= 2
18987         DB *result = 0;
18988         db_open(path,
18989                 DB_HASH,
18990                 DB_CREATE,
18991                 0644,
18992                 (DB_ENV *) 0,
18993                 (DB_INFO *) 0,
18994                 &result);
18995 #endif /* DB_VERSION_MAJOR */
18996 #else
18997         DB *result = dbopen(path,
18998                      2,
18999                      0644,
19000                      DB_HASH,
19001                      0);
19002 #endif
19003         ${cf_cv_main_return:-return}(result != 0)
19004
19005   ;
19006   return 0;
19007 }
19008 _ACEOF
19009 rm -f conftest.$ac_objext conftest$ac_exeext
19010 if { (eval echo "$as_me:19010: \"$ac_link\"") >&5
19011   (eval $ac_link) 2>&5
19012   ac_status=$?
19013   echo "$as_me:19013: \$? = $ac_status" >&5
19014   (exit $ac_status); } &&
19015          { ac_try='test -s conftest$ac_exeext'
19016   { (eval echo "$as_me:19016: \"$ac_try\"") >&5
19017   (eval $ac_try) 2>&5
19018   ac_status=$?
19019   echo "$as_me:19019: \$? = $ac_status" >&5
19020   (exit $ac_status); }; }; then
19021
19022         if test -n "$cf_db_libs" ; then
19023                 cf_cv_hashed_db_libs=$cf_db_libs
19024         else
19025                 cf_cv_hashed_db_libs=default
19026         fi
19027         LIBS="$cf_save_libs"
19028         break
19029
19030 else
19031   echo "$as_me: failed program was:" >&5
19032 cat conftest.$ac_ext >&5
19033 fi
19034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19035         LIBS="$cf_save_libs"
19036 done
19037
19038 fi
19039 echo "$as_me:19039: result: $cf_cv_hashed_db_libs" >&5
19040 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19041
19042         if test "$cf_cv_hashed_db_libs" = unknown ; then
19043                 { { echo "$as_me:19043: error: Cannot determine library for db" >&5
19044 echo "$as_me: error: Cannot determine library for db" >&2;}
19045    { (exit 1); exit 1; }; }
19046         elif test "$cf_cv_hashed_db_libs" != default ; then
19047
19048 cf_add_libs="-l$cf_cv_hashed_db_libs"
19049 # Filter out duplicates - this happens with badly-designed ".pc" files...
19050 for cf_add_1lib in $LIBS
19051 do
19052         for cf_add_2lib in $cf_add_libs
19053         do
19054                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19055                 then
19056                         cf_add_1lib=
19057                         break
19058                 fi
19059         done
19060         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19061 done
19062 LIBS="$cf_add_libs"
19063
19064         fi
19065 fi
19066
19067 else
19068
19069         { { echo "$as_me:19069: error: Cannot find db.h" >&5
19070 echo "$as_me: error: Cannot find db.h" >&2;}
19071    { (exit 1); exit 1; }; }
19072
19073 fi
19074
19075 fi
19076
19077 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19078         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19079         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19080 fi
19081
19082 # Just in case, check if the C compiler has a bool type.
19083
19084 echo "$as_me:19084: checking if we should include stdbool.h" >&5
19085 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19086
19087 if test "${cf_cv_header_stdbool_h+set}" = set; then
19088   echo $ECHO_N "(cached) $ECHO_C" >&6
19089 else
19090
19091         cat >conftest.$ac_ext <<_ACEOF
19092 #line 19092 "configure"
19093 #include "confdefs.h"
19094
19095 int
19096 main ()
19097 {
19098 bool foo = false
19099   ;
19100   return 0;
19101 }
19102 _ACEOF
19103 rm -f conftest.$ac_objext
19104 if { (eval echo "$as_me:19104: \"$ac_compile\"") >&5
19105   (eval $ac_compile) 2>&5
19106   ac_status=$?
19107   echo "$as_me:19107: \$? = $ac_status" >&5
19108   (exit $ac_status); } &&
19109          { ac_try='test -s conftest.$ac_objext'
19110   { (eval echo "$as_me:19110: \"$ac_try\"") >&5
19111   (eval $ac_try) 2>&5
19112   ac_status=$?
19113   echo "$as_me:19113: \$? = $ac_status" >&5
19114   (exit $ac_status); }; }; then
19115   cf_cv_header_stdbool_h=0
19116 else
19117   echo "$as_me: failed program was:" >&5
19118 cat conftest.$ac_ext >&5
19119 cat >conftest.$ac_ext <<_ACEOF
19120 #line 19120 "configure"
19121 #include "confdefs.h"
19122
19123 #ifndef __BEOS__
19124 #include <stdbool.h>
19125 #endif
19126
19127 int
19128 main ()
19129 {
19130 bool foo = false
19131   ;
19132   return 0;
19133 }
19134 _ACEOF
19135 rm -f conftest.$ac_objext
19136 if { (eval echo "$as_me:19136: \"$ac_compile\"") >&5
19137   (eval $ac_compile) 2>&5
19138   ac_status=$?
19139   echo "$as_me:19139: \$? = $ac_status" >&5
19140   (exit $ac_status); } &&
19141          { ac_try='test -s conftest.$ac_objext'
19142   { (eval echo "$as_me:19142: \"$ac_try\"") >&5
19143   (eval $ac_try) 2>&5
19144   ac_status=$?
19145   echo "$as_me:19145: \$? = $ac_status" >&5
19146   (exit $ac_status); }; }; then
19147   cf_cv_header_stdbool_h=1
19148 else
19149   echo "$as_me: failed program was:" >&5
19150 cat conftest.$ac_ext >&5
19151 cf_cv_header_stdbool_h=0
19152 fi
19153 rm -f conftest.$ac_objext conftest.$ac_ext
19154 fi
19155 rm -f conftest.$ac_objext conftest.$ac_ext
19156 fi
19157
19158 if test "$cf_cv_header_stdbool_h" = 1
19159 then    echo "$as_me:19159: result: yes" >&5
19160 echo "${ECHO_T}yes" >&6
19161 else    echo "$as_me:19161: result: no" >&5
19162 echo "${ECHO_T}no" >&6
19163 fi
19164
19165 echo "$as_me:19165: checking for builtin bool type" >&5
19166 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19167
19168 if test "${cf_cv_cc_bool_type+set}" = set; then
19169   echo $ECHO_N "(cached) $ECHO_C" >&6
19170 else
19171
19172         cat >conftest.$ac_ext <<_ACEOF
19173 #line 19173 "configure"
19174 #include "confdefs.h"
19175
19176 #include <stdio.h>
19177 #include <sys/types.h>
19178
19179 int
19180 main ()
19181 {
19182 bool x = false
19183   ;
19184   return 0;
19185 }
19186 _ACEOF
19187 rm -f conftest.$ac_objext
19188 if { (eval echo "$as_me:19188: \"$ac_compile\"") >&5
19189   (eval $ac_compile) 2>&5
19190   ac_status=$?
19191   echo "$as_me:19191: \$? = $ac_status" >&5
19192   (exit $ac_status); } &&
19193          { ac_try='test -s conftest.$ac_objext'
19194   { (eval echo "$as_me:19194: \"$ac_try\"") >&5
19195   (eval $ac_try) 2>&5
19196   ac_status=$?
19197   echo "$as_me:19197: \$? = $ac_status" >&5
19198   (exit $ac_status); }; }; then
19199   cf_cv_cc_bool_type=1
19200 else
19201   echo "$as_me: failed program was:" >&5
19202 cat conftest.$ac_ext >&5
19203 cf_cv_cc_bool_type=0
19204 fi
19205 rm -f conftest.$ac_objext conftest.$ac_ext
19206
19207 fi
19208
19209 if test "$cf_cv_cc_bool_type" = 1
19210 then    echo "$as_me:19210: result: yes" >&5
19211 echo "${ECHO_T}yes" >&6
19212 else    echo "$as_me:19212: result: no" >&5
19213 echo "${ECHO_T}no" >&6
19214 fi
19215
19216 # Check for C++ compiler characteristics (and ensure that it's there!)
19217 if test -n "$CXX" ; then
19218         ac_ext=cc
19219 ac_cpp='$CXXCPP $CPPFLAGS'
19220 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19221 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19222 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19223 ac_main_return=return
19224
19225 if test -n "$GXX" ; then
19226 case $cf_cv_system_name in #(vi
19227 os2*) #(vi
19228         cf_stdcpp_libname=stdcpp
19229         ;;
19230 *)
19231         cf_stdcpp_libname=stdc++
19232         ;;
19233 esac
19234 echo "$as_me:19234: checking for library $cf_stdcpp_libname" >&5
19235 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19236 if test "${cf_cv_libstdcpp+set}" = set; then
19237   echo $ECHO_N "(cached) $ECHO_C" >&6
19238 else
19239
19240         cf_save="$LIBS"
19241
19242 cf_add_libs="-l$cf_stdcpp_libname"
19243 # Filter out duplicates - this happens with badly-designed ".pc" files...
19244 for cf_add_1lib in $LIBS
19245 do
19246         for cf_add_2lib in $cf_add_libs
19247         do
19248                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19249                 then
19250                         cf_add_1lib=
19251                         break
19252                 fi
19253         done
19254         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19255 done
19256 LIBS="$cf_add_libs"
19257
19258 cat >conftest.$ac_ext <<_ACEOF
19259 #line 19259 "configure"
19260 #include "confdefs.h"
19261
19262 #include <strstream.h>
19263 int
19264 main ()
19265 {
19266
19267 char buf[80];
19268 strstreambuf foo(buf, sizeof(buf))
19269
19270   ;
19271   return 0;
19272 }
19273 _ACEOF
19274 rm -f conftest.$ac_objext conftest$ac_exeext
19275 if { (eval echo "$as_me:19275: \"$ac_link\"") >&5
19276   (eval $ac_link) 2>&5
19277   ac_status=$?
19278   echo "$as_me:19278: \$? = $ac_status" >&5
19279   (exit $ac_status); } &&
19280          { ac_try='test -s conftest$ac_exeext'
19281   { (eval echo "$as_me:19281: \"$ac_try\"") >&5
19282   (eval $ac_try) 2>&5
19283   ac_status=$?
19284   echo "$as_me:19284: \$? = $ac_status" >&5
19285   (exit $ac_status); }; }; then
19286   cf_cv_libstdcpp=yes
19287 else
19288   echo "$as_me: failed program was:" >&5
19289 cat conftest.$ac_ext >&5
19290 cf_cv_libstdcpp=no
19291 fi
19292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19293         LIBS="$cf_save"
19294
19295 fi
19296 echo "$as_me:19296: result: $cf_cv_libstdcpp" >&5
19297 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19298 test "$cf_cv_libstdcpp" = yes &&
19299 cf_add_libs="-l$cf_stdcpp_libname"
19300 # Filter out duplicates - this happens with badly-designed ".pc" files...
19301 for cf_add_1lib in $CXXLIBS
19302 do
19303         for cf_add_2lib in $cf_add_libs
19304         do
19305                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19306                 then
19307                         cf_add_1lib=
19308                         break
19309                 fi
19310         done
19311         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19312 done
19313 CXXLIBS="$cf_add_libs"
19314
19315 fi
19316
19317         echo "$as_me:19317: checking whether $CXX understands -c and -o together" >&5
19318 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19319 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19320   echo $ECHO_N "(cached) $ECHO_C" >&6
19321 else
19322
19323 cat > conftest.$ac_ext <<CF_EOF
19324 #include <stdio.h>
19325 int main()
19326 {
19327         ${cf_cv_main_return:-return}(0);
19328 }
19329 CF_EOF
19330 # We do the test twice because some compilers refuse to overwrite an
19331 # existing .o file with -o, though they will create one.
19332 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19333 if { (eval echo "$as_me:19333: \"$ac_try\"") >&5
19334   (eval $ac_try) 2>&5
19335   ac_status=$?
19336   echo "$as_me:19336: \$? = $ac_status" >&5
19337   (exit $ac_status); } &&
19338   test -f conftest2.$ac_objext && { (eval echo "$as_me:19338: \"$ac_try\"") >&5
19339   (eval $ac_try) 2>&5
19340   ac_status=$?
19341   echo "$as_me:19341: \$? = $ac_status" >&5
19342   (exit $ac_status); };
19343 then
19344   eval cf_cv_prog_CXX_c_o=yes
19345 else
19346   eval cf_cv_prog_CXX_c_o=no
19347 fi
19348 rm -rf conftest*
19349
19350 fi
19351 if test $cf_cv_prog_CXX_c_o = yes; then
19352   echo "$as_me:19352: result: yes" >&5
19353 echo "${ECHO_T}yes" >&6
19354 else
19355   echo "$as_me:19355: result: no" >&5
19356 echo "${ECHO_T}no" >&6
19357 fi
19358
19359         case $GXX_VERSION in
19360         1*|2.0-6*)
19361                 cf_cxx_library=yes
19362                 ;;
19363         *-2.7*|2.7*)
19364
19365 cf_cxx_library=unknown
19366 case $cf_cv_system_name in #(vi
19367 os2*) #(vi
19368         cf_gpp_libname=gpp
19369         ;;
19370 *)
19371         cf_gpp_libname=g++
19372         ;;
19373 esac
19374 if test "$GXX" = yes; then
19375         echo "$as_me:19375: checking for lib$cf_gpp_libname" >&5
19376 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19377         cf_save="$LIBS"
19378
19379 cf_add_libs="-l$cf_gpp_libname"
19380 # Filter out duplicates - this happens with badly-designed ".pc" files...
19381 for cf_add_1lib in $LIBS
19382 do
19383         for cf_add_2lib in $cf_add_libs
19384         do
19385                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19386                 then
19387                         cf_add_1lib=
19388                         break
19389                 fi
19390         done
19391         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19392 done
19393 LIBS="$cf_add_libs"
19394
19395         cat >conftest.$ac_ext <<_ACEOF
19396 #line 19396 "configure"
19397 #include "confdefs.h"
19398
19399 #include <$cf_gpp_libname/builtin.h>
19400
19401 int
19402 main ()
19403 {
19404 two_arg_error_handler_t foo2 = lib_error_handler
19405   ;
19406   return 0;
19407 }
19408 _ACEOF
19409 rm -f conftest.$ac_objext conftest$ac_exeext
19410 if { (eval echo "$as_me:19410: \"$ac_link\"") >&5
19411   (eval $ac_link) 2>&5
19412   ac_status=$?
19413   echo "$as_me:19413: \$? = $ac_status" >&5
19414   (exit $ac_status); } &&
19415          { ac_try='test -s conftest$ac_exeext'
19416   { (eval echo "$as_me:19416: \"$ac_try\"") >&5
19417   (eval $ac_try) 2>&5
19418   ac_status=$?
19419   echo "$as_me:19419: \$? = $ac_status" >&5
19420   (exit $ac_status); }; }; then
19421   cf_cxx_library=yes
19422
19423 cf_add_libs="-l$cf_gpp_libname"
19424 # Filter out duplicates - this happens with badly-designed ".pc" files...
19425 for cf_add_1lib in $CXXLIBS
19426 do
19427         for cf_add_2lib in $cf_add_libs
19428         do
19429                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19430                 then
19431                         cf_add_1lib=
19432                         break
19433                 fi
19434         done
19435         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19436 done
19437 CXXLIBS="$cf_add_libs"
19438
19439          if test "$cf_gpp_libname" = cpp ; then
19440
19441 cat >>confdefs.h <<\EOF
19442 #define HAVE_GPP_BUILTIN_H 1
19443 EOF
19444
19445          else
19446
19447 cat >>confdefs.h <<\EOF
19448 #define HAVE_GXX_BUILTIN_H 1
19449 EOF
19450
19451          fi
19452 else
19453   echo "$as_me: failed program was:" >&5
19454 cat conftest.$ac_ext >&5
19455 cat >conftest.$ac_ext <<_ACEOF
19456 #line 19456 "configure"
19457 #include "confdefs.h"
19458
19459 #include <builtin.h>
19460
19461 int
19462 main ()
19463 {
19464 two_arg_error_handler_t foo2 = lib_error_handler
19465   ;
19466   return 0;
19467 }
19468 _ACEOF
19469 rm -f conftest.$ac_objext conftest$ac_exeext
19470 if { (eval echo "$as_me:19470: \"$ac_link\"") >&5
19471   (eval $ac_link) 2>&5
19472   ac_status=$?
19473   echo "$as_me:19473: \$? = $ac_status" >&5
19474   (exit $ac_status); } &&
19475          { ac_try='test -s conftest$ac_exeext'
19476   { (eval echo "$as_me:19476: \"$ac_try\"") >&5
19477   (eval $ac_try) 2>&5
19478   ac_status=$?
19479   echo "$as_me:19479: \$? = $ac_status" >&5
19480   (exit $ac_status); }; }; then
19481   cf_cxx_library=yes
19482
19483 cf_add_libs="-l$cf_gpp_libname"
19484 # Filter out duplicates - this happens with badly-designed ".pc" files...
19485 for cf_add_1lib in $CXXLIBS
19486 do
19487         for cf_add_2lib in $cf_add_libs
19488         do
19489                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19490                 then
19491                         cf_add_1lib=
19492                         break
19493                 fi
19494         done
19495         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19496 done
19497 CXXLIBS="$cf_add_libs"
19498
19499 cat >>confdefs.h <<\EOF
19500 #define HAVE_BUILTIN_H 1
19501 EOF
19502
19503 else
19504   echo "$as_me: failed program was:" >&5
19505 cat conftest.$ac_ext >&5
19506 cf_cxx_library=no
19507 fi
19508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19509 fi
19510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19511         LIBS="$cf_save"
19512         echo "$as_me:19512: result: $cf_cxx_library" >&5
19513 echo "${ECHO_T}$cf_cxx_library" >&6
19514 fi
19515
19516                 ;;
19517         *)
19518                 cf_cxx_library=no
19519                 ;;
19520         esac
19521
19522         ac_ext=cc
19523 ac_cpp='$CXXCPP $CPPFLAGS'
19524 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19525 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19526 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19527 ac_main_return=return
19528 echo "$as_me:19528: checking how to run the C++ preprocessor" >&5
19529 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19530 if test -z "$CXXCPP"; then
19531   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19532   echo $ECHO_N "(cached) $ECHO_C" >&6
19533 else
19534       # Double quotes because CXXCPP needs to be expanded
19535     for CXXCPP in "$CXX -E" "/lib/cpp"
19536     do
19537       ac_preproc_ok=false
19538 for ac_cxx_preproc_warn_flag in '' yes
19539 do
19540   # Use a header file that comes with gcc, so configuring glibc
19541   # with a fresh cross-compiler works.
19542   # On the NeXT, cc -E runs the code through the compiler's parser,
19543   # not just through cpp. "Syntax error" is here to catch this case.
19544   cat >conftest.$ac_ext <<_ACEOF
19545 #line 19545 "configure"
19546 #include "confdefs.h"
19547 #include <assert.h>
19548                      Syntax error
19549 _ACEOF
19550 if { (eval echo "$as_me:19550: \"$ac_cpp conftest.$ac_ext\"") >&5
19551   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19552   ac_status=$?
19553   egrep -v '^ *\+' conftest.er1 >conftest.err
19554   rm -f conftest.er1
19555   cat conftest.err >&5
19556   echo "$as_me:19556: \$? = $ac_status" >&5
19557   (exit $ac_status); } >/dev/null; then
19558   if test -s conftest.err; then
19559     ac_cpp_err=$ac_cxx_preproc_warn_flag
19560   else
19561     ac_cpp_err=
19562   fi
19563 else
19564   ac_cpp_err=yes
19565 fi
19566 if test -z "$ac_cpp_err"; then
19567   :
19568 else
19569   echo "$as_me: failed program was:" >&5
19570   cat conftest.$ac_ext >&5
19571   # Broken: fails on valid input.
19572 continue
19573 fi
19574 rm -f conftest.err conftest.$ac_ext
19575
19576   # OK, works on sane cases.  Now check whether non-existent headers
19577   # can be detected and how.
19578   cat >conftest.$ac_ext <<_ACEOF
19579 #line 19579 "configure"
19580 #include "confdefs.h"
19581 #include <ac_nonexistent.h>
19582 _ACEOF
19583 if { (eval echo "$as_me:19583: \"$ac_cpp conftest.$ac_ext\"") >&5
19584   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19585   ac_status=$?
19586   egrep -v '^ *\+' conftest.er1 >conftest.err
19587   rm -f conftest.er1
19588   cat conftest.err >&5
19589   echo "$as_me:19589: \$? = $ac_status" >&5
19590   (exit $ac_status); } >/dev/null; then
19591   if test -s conftest.err; then
19592     ac_cpp_err=$ac_cxx_preproc_warn_flag
19593   else
19594     ac_cpp_err=
19595   fi
19596 else
19597   ac_cpp_err=yes
19598 fi
19599 if test -z "$ac_cpp_err"; then
19600   # Broken: success on invalid input.
19601 continue
19602 else
19603   echo "$as_me: failed program was:" >&5
19604   cat conftest.$ac_ext >&5
19605   # Passes both tests.
19606 ac_preproc_ok=:
19607 break
19608 fi
19609 rm -f conftest.err conftest.$ac_ext
19610
19611 done
19612 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19613 rm -f conftest.err conftest.$ac_ext
19614 if $ac_preproc_ok; then
19615   break
19616 fi
19617
19618     done
19619     ac_cv_prog_CXXCPP=$CXXCPP
19620
19621 fi
19622   CXXCPP=$ac_cv_prog_CXXCPP
19623 else
19624   ac_cv_prog_CXXCPP=$CXXCPP
19625 fi
19626 echo "$as_me:19626: result: $CXXCPP" >&5
19627 echo "${ECHO_T}$CXXCPP" >&6
19628 ac_preproc_ok=false
19629 for ac_cxx_preproc_warn_flag in '' yes
19630 do
19631   # Use a header file that comes with gcc, so configuring glibc
19632   # with a fresh cross-compiler works.
19633   # On the NeXT, cc -E runs the code through the compiler's parser,
19634   # not just through cpp. "Syntax error" is here to catch this case.
19635   cat >conftest.$ac_ext <<_ACEOF
19636 #line 19636 "configure"
19637 #include "confdefs.h"
19638 #include <assert.h>
19639                      Syntax error
19640 _ACEOF
19641 if { (eval echo "$as_me:19641: \"$ac_cpp conftest.$ac_ext\"") >&5
19642   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19643   ac_status=$?
19644   egrep -v '^ *\+' conftest.er1 >conftest.err
19645   rm -f conftest.er1
19646   cat conftest.err >&5
19647   echo "$as_me:19647: \$? = $ac_status" >&5
19648   (exit $ac_status); } >/dev/null; then
19649   if test -s conftest.err; then
19650     ac_cpp_err=$ac_cxx_preproc_warn_flag
19651   else
19652     ac_cpp_err=
19653   fi
19654 else
19655   ac_cpp_err=yes
19656 fi
19657 if test -z "$ac_cpp_err"; then
19658   :
19659 else
19660   echo "$as_me: failed program was:" >&5
19661   cat conftest.$ac_ext >&5
19662   # Broken: fails on valid input.
19663 continue
19664 fi
19665 rm -f conftest.err conftest.$ac_ext
19666
19667   # OK, works on sane cases.  Now check whether non-existent headers
19668   # can be detected and how.
19669   cat >conftest.$ac_ext <<_ACEOF
19670 #line 19670 "configure"
19671 #include "confdefs.h"
19672 #include <ac_nonexistent.h>
19673 _ACEOF
19674 if { (eval echo "$as_me:19674: \"$ac_cpp conftest.$ac_ext\"") >&5
19675   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19676   ac_status=$?
19677   egrep -v '^ *\+' conftest.er1 >conftest.err
19678   rm -f conftest.er1
19679   cat conftest.err >&5
19680   echo "$as_me:19680: \$? = $ac_status" >&5
19681   (exit $ac_status); } >/dev/null; then
19682   if test -s conftest.err; then
19683     ac_cpp_err=$ac_cxx_preproc_warn_flag
19684   else
19685     ac_cpp_err=
19686   fi
19687 else
19688   ac_cpp_err=yes
19689 fi
19690 if test -z "$ac_cpp_err"; then
19691   # Broken: success on invalid input.
19692 continue
19693 else
19694   echo "$as_me: failed program was:" >&5
19695   cat conftest.$ac_ext >&5
19696   # Passes both tests.
19697 ac_preproc_ok=:
19698 break
19699 fi
19700 rm -f conftest.err conftest.$ac_ext
19701
19702 done
19703 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19704 rm -f conftest.err conftest.$ac_ext
19705 if $ac_preproc_ok; then
19706   :
19707 else
19708   { { echo "$as_me:19708: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19709 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19710    { (exit 1); exit 1; }; }
19711 fi
19712
19713 ac_ext=cc
19714 ac_cpp='$CXXCPP $CPPFLAGS'
19715 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19716 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19717 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19718 ac_main_return=return
19719
19720 for ac_header in typeinfo
19721 do
19722 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19723 echo "$as_me:19723: checking for $ac_header" >&5
19724 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19725 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19726   echo $ECHO_N "(cached) $ECHO_C" >&6
19727 else
19728   cat >conftest.$ac_ext <<_ACEOF
19729 #line 19729 "configure"
19730 #include "confdefs.h"
19731 #include <$ac_header>
19732 _ACEOF
19733 if { (eval echo "$as_me:19733: \"$ac_cpp conftest.$ac_ext\"") >&5
19734   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19735   ac_status=$?
19736   egrep -v '^ *\+' conftest.er1 >conftest.err
19737   rm -f conftest.er1
19738   cat conftest.err >&5
19739   echo "$as_me:19739: \$? = $ac_status" >&5
19740   (exit $ac_status); } >/dev/null; then
19741   if test -s conftest.err; then
19742     ac_cpp_err=$ac_cxx_preproc_warn_flag
19743   else
19744     ac_cpp_err=
19745   fi
19746 else
19747   ac_cpp_err=yes
19748 fi
19749 if test -z "$ac_cpp_err"; then
19750   eval "$as_ac_Header=yes"
19751 else
19752   echo "$as_me: failed program was:" >&5
19753   cat conftest.$ac_ext >&5
19754   eval "$as_ac_Header=no"
19755 fi
19756 rm -f conftest.err conftest.$ac_ext
19757 fi
19758 echo "$as_me:19758: result: `eval echo '${'$as_ac_Header'}'`" >&5
19759 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19760 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19761   cat >>confdefs.h <<EOF
19762 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19763 EOF
19764
19765 fi
19766 done
19767
19768 for ac_header in iostream
19769 do
19770 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19771 echo "$as_me:19771: checking for $ac_header" >&5
19772 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19773 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19774   echo $ECHO_N "(cached) $ECHO_C" >&6
19775 else
19776   cat >conftest.$ac_ext <<_ACEOF
19777 #line 19777 "configure"
19778 #include "confdefs.h"
19779 #include <$ac_header>
19780 _ACEOF
19781 if { (eval echo "$as_me:19781: \"$ac_cpp conftest.$ac_ext\"") >&5
19782   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19783   ac_status=$?
19784   egrep -v '^ *\+' conftest.er1 >conftest.err
19785   rm -f conftest.er1
19786   cat conftest.err >&5
19787   echo "$as_me:19787: \$? = $ac_status" >&5
19788   (exit $ac_status); } >/dev/null; then
19789   if test -s conftest.err; then
19790     ac_cpp_err=$ac_cxx_preproc_warn_flag
19791   else
19792     ac_cpp_err=
19793   fi
19794 else
19795   ac_cpp_err=yes
19796 fi
19797 if test -z "$ac_cpp_err"; then
19798   eval "$as_ac_Header=yes"
19799 else
19800   echo "$as_me: failed program was:" >&5
19801   cat conftest.$ac_ext >&5
19802   eval "$as_ac_Header=no"
19803 fi
19804 rm -f conftest.err conftest.$ac_ext
19805 fi
19806 echo "$as_me:19806: result: `eval echo '${'$as_ac_Header'}'`" >&5
19807 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19808 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19809   cat >>confdefs.h <<EOF
19810 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19811 EOF
19812
19813 fi
19814 done
19815
19816 if test x"$ac_cv_header_iostream" = xyes ; then
19817         echo "$as_me:19817: checking if iostream uses std-namespace" >&5
19818 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19819         cat >conftest.$ac_ext <<_ACEOF
19820 #line 19820 "configure"
19821 #include "confdefs.h"
19822
19823 #include <iostream>
19824 using std::endl;
19825 using std::cerr;
19826 int
19827 main ()
19828 {
19829
19830 cerr << "testing" << endl;
19831
19832   ;
19833   return 0;
19834 }
19835 _ACEOF
19836 rm -f conftest.$ac_objext
19837 if { (eval echo "$as_me:19837: \"$ac_compile\"") >&5
19838   (eval $ac_compile) 2>&5
19839   ac_status=$?
19840   echo "$as_me:19840: \$? = $ac_status" >&5
19841   (exit $ac_status); } &&
19842          { ac_try='test -s conftest.$ac_objext'
19843   { (eval echo "$as_me:19843: \"$ac_try\"") >&5
19844   (eval $ac_try) 2>&5
19845   ac_status=$?
19846   echo "$as_me:19846: \$? = $ac_status" >&5
19847   (exit $ac_status); }; }; then
19848   cf_iostream_namespace=yes
19849 else
19850   echo "$as_me: failed program was:" >&5
19851 cat conftest.$ac_ext >&5
19852 cf_iostream_namespace=no
19853 fi
19854 rm -f conftest.$ac_objext conftest.$ac_ext
19855         echo "$as_me:19855: result: $cf_iostream_namespace" >&5
19856 echo "${ECHO_T}$cf_iostream_namespace" >&6
19857         if test "$cf_iostream_namespace" = yes ; then
19858
19859 cat >>confdefs.h <<\EOF
19860 #define IOSTREAM_NAMESPACE 1
19861 EOF
19862
19863         fi
19864 fi
19865
19866 echo "$as_me:19866: checking if we should include stdbool.h" >&5
19867 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19868
19869 if test "${cf_cv_header_stdbool_h+set}" = set; then
19870   echo $ECHO_N "(cached) $ECHO_C" >&6
19871 else
19872
19873         cat >conftest.$ac_ext <<_ACEOF
19874 #line 19874 "configure"
19875 #include "confdefs.h"
19876
19877 int
19878 main ()
19879 {
19880 bool foo = false
19881   ;
19882   return 0;
19883 }
19884 _ACEOF
19885 rm -f conftest.$ac_objext
19886 if { (eval echo "$as_me:19886: \"$ac_compile\"") >&5
19887   (eval $ac_compile) 2>&5
19888   ac_status=$?
19889   echo "$as_me:19889: \$? = $ac_status" >&5
19890   (exit $ac_status); } &&
19891          { ac_try='test -s conftest.$ac_objext'
19892   { (eval echo "$as_me:19892: \"$ac_try\"") >&5
19893   (eval $ac_try) 2>&5
19894   ac_status=$?
19895   echo "$as_me:19895: \$? = $ac_status" >&5
19896   (exit $ac_status); }; }; then
19897   cf_cv_header_stdbool_h=0
19898 else
19899   echo "$as_me: failed program was:" >&5
19900 cat conftest.$ac_ext >&5
19901 cat >conftest.$ac_ext <<_ACEOF
19902 #line 19902 "configure"
19903 #include "confdefs.h"
19904
19905 #ifndef __BEOS__
19906 #include <stdbool.h>
19907 #endif
19908
19909 int
19910 main ()
19911 {
19912 bool foo = false
19913   ;
19914   return 0;
19915 }
19916 _ACEOF
19917 rm -f conftest.$ac_objext
19918 if { (eval echo "$as_me:19918: \"$ac_compile\"") >&5
19919   (eval $ac_compile) 2>&5
19920   ac_status=$?
19921   echo "$as_me:19921: \$? = $ac_status" >&5
19922   (exit $ac_status); } &&
19923          { ac_try='test -s conftest.$ac_objext'
19924   { (eval echo "$as_me:19924: \"$ac_try\"") >&5
19925   (eval $ac_try) 2>&5
19926   ac_status=$?
19927   echo "$as_me:19927: \$? = $ac_status" >&5
19928   (exit $ac_status); }; }; then
19929   cf_cv_header_stdbool_h=1
19930 else
19931   echo "$as_me: failed program was:" >&5
19932 cat conftest.$ac_ext >&5
19933 cf_cv_header_stdbool_h=0
19934 fi
19935 rm -f conftest.$ac_objext conftest.$ac_ext
19936 fi
19937 rm -f conftest.$ac_objext conftest.$ac_ext
19938 fi
19939
19940 if test "$cf_cv_header_stdbool_h" = 1
19941 then    echo "$as_me:19941: result: yes" >&5
19942 echo "${ECHO_T}yes" >&6
19943 else    echo "$as_me:19943: result: no" >&5
19944 echo "${ECHO_T}no" >&6
19945 fi
19946
19947 echo "$as_me:19947: checking for builtin bool type" >&5
19948 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19949
19950 if test "${cf_cv_builtin_bool+set}" = set; then
19951   echo $ECHO_N "(cached) $ECHO_C" >&6
19952 else
19953
19954         cat >conftest.$ac_ext <<_ACEOF
19955 #line 19955 "configure"
19956 #include "confdefs.h"
19957
19958 #include <stdio.h>
19959 #include <sys/types.h>
19960
19961 int
19962 main ()
19963 {
19964 bool x = false
19965   ;
19966   return 0;
19967 }
19968 _ACEOF
19969 rm -f conftest.$ac_objext
19970 if { (eval echo "$as_me:19970: \"$ac_compile\"") >&5
19971   (eval $ac_compile) 2>&5
19972   ac_status=$?
19973   echo "$as_me:19973: \$? = $ac_status" >&5
19974   (exit $ac_status); } &&
19975          { ac_try='test -s conftest.$ac_objext'
19976   { (eval echo "$as_me:19976: \"$ac_try\"") >&5
19977   (eval $ac_try) 2>&5
19978   ac_status=$?
19979   echo "$as_me:19979: \$? = $ac_status" >&5
19980   (exit $ac_status); }; }; then
19981   cf_cv_builtin_bool=1
19982 else
19983   echo "$as_me: failed program was:" >&5
19984 cat conftest.$ac_ext >&5
19985 cf_cv_builtin_bool=0
19986 fi
19987 rm -f conftest.$ac_objext conftest.$ac_ext
19988
19989 fi
19990
19991 if test "$cf_cv_builtin_bool" = 1
19992 then    echo "$as_me:19992: result: yes" >&5
19993 echo "${ECHO_T}yes" >&6
19994 else    echo "$as_me:19994: result: no" >&5
19995 echo "${ECHO_T}no" >&6
19996 fi
19997
19998 echo "$as_me:19998: checking for size of bool" >&5
19999 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20000 if test "${cf_cv_type_of_bool+set}" = set; then
20001   echo $ECHO_N "(cached) $ECHO_C" >&6
20002 else
20003
20004         rm -f cf_test.out
20005         if test "$cross_compiling" = yes; then
20006   cf_cv_type_of_bool=unknown
20007 else
20008   cat >conftest.$ac_ext <<_ACEOF
20009 #line 20009 "configure"
20010 #include "confdefs.h"
20011
20012 #include <stdlib.h>
20013 #include <stdio.h>
20014
20015 #if defined(__cplusplus)
20016
20017 #ifdef HAVE_GXX_BUILTIN_H
20018 #include <g++/builtin.h>
20019 #elif HAVE_GPP_BUILTIN_H
20020 #include <gpp/builtin.h>
20021 #elif HAVE_BUILTIN_H
20022 #include <builtin.h>
20023 #endif
20024
20025 #else
20026
20027 #if $cf_cv_header_stdbool_h
20028 #include <stdbool.h>
20029 #endif
20030
20031 #endif
20032
20033 int main()
20034 {
20035         FILE *fp = fopen("cf_test.out", "w");
20036         if (fp != 0) {
20037                 bool x = true;
20038                 if ((bool)(-x) >= 0)
20039                         fputs("unsigned ", fp);
20040                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20041                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20042                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20043                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20044                 fclose(fp);
20045         }
20046         ${cf_cv_main_return:-return}(0);
20047 }
20048
20049 _ACEOF
20050 rm -f conftest$ac_exeext
20051 if { (eval echo "$as_me:20051: \"$ac_link\"") >&5
20052   (eval $ac_link) 2>&5
20053   ac_status=$?
20054   echo "$as_me:20054: \$? = $ac_status" >&5
20055   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20056   { (eval echo "$as_me:20056: \"$ac_try\"") >&5
20057   (eval $ac_try) 2>&5
20058   ac_status=$?
20059   echo "$as_me:20059: \$? = $ac_status" >&5
20060   (exit $ac_status); }; }; then
20061   cf_cv_type_of_bool=`cat cf_test.out`
20062                  if test -z "$cf_cv_type_of_bool"; then
20063                    cf_cv_type_of_bool=unknown
20064                  fi
20065 else
20066   echo "$as_me: program exited with status $ac_status" >&5
20067 echo "$as_me: failed program was:" >&5
20068 cat conftest.$ac_ext >&5
20069 cf_cv_type_of_bool=unknown
20070 fi
20071 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20072 fi
20073
20074 fi
20075
20076         rm -f cf_test.out
20077 echo "$as_me:20077: result: $cf_cv_type_of_bool" >&5
20078 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20079 if test "$cf_cv_type_of_bool" = unknown ; then
20080         case .$NCURSES_BOOL in #(vi
20081         .auto|.) NCURSES_BOOL=unsigned;;
20082         esac
20083         { echo "$as_me:20083: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20084 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20085         cf_cv_type_of_bool=$NCURSES_BOOL
20086 fi
20087
20088 echo "$as_me:20088: checking for special defines needed for etip.h" >&5
20089 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20090 cf_save_CXXFLAGS="$CXXFLAGS"
20091 cf_result="none"
20092
20093 # etip.h includes ncurses.h which includes ncurses_dll.h
20094 # But ncurses_dll.h is generated - fix here.
20095 test -d include || mkdir include
20096 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
20097
20098 for cf_math in "" MATH_H
20099 do
20100 for cf_excp in "" MATH_EXCEPTION
20101 do
20102         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20103         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20104         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20105 cat >conftest.$ac_ext <<_ACEOF
20106 #line 20106 "configure"
20107 #include "confdefs.h"
20108
20109 #include <etip.h.in>
20110
20111 int
20112 main ()
20113 {
20114
20115   ;
20116   return 0;
20117 }
20118 _ACEOF
20119 rm -f conftest.$ac_objext
20120 if { (eval echo "$as_me:20120: \"$ac_compile\"") >&5
20121   (eval $ac_compile) 2>&5
20122   ac_status=$?
20123   echo "$as_me:20123: \$? = $ac_status" >&5
20124   (exit $ac_status); } &&
20125          { ac_try='test -s conftest.$ac_objext'
20126   { (eval echo "$as_me:20126: \"$ac_try\"") >&5
20127   (eval $ac_try) 2>&5
20128   ac_status=$?
20129   echo "$as_me:20129: \$? = $ac_status" >&5
20130   (exit $ac_status); }; }; then
20131
20132         test -n "$cf_math" && cat >>confdefs.h <<EOF
20133 #define ETIP_NEEDS_${cf_math} 1
20134 EOF
20135
20136         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20137 #define ETIP_NEEDS_${cf_excp} 1
20138 EOF
20139
20140         cf_result="$cf_math $cf_excp"
20141         break 2
20142
20143 else
20144   echo "$as_me: failed program was:" >&5
20145 cat conftest.$ac_ext >&5
20146 fi
20147 rm -f conftest.$ac_objext conftest.$ac_ext
20148 done
20149 done
20150 echo "$as_me:20150: result: $cf_result" >&5
20151 echo "${ECHO_T}$cf_result" >&6
20152 CXXFLAGS="$cf_save_CXXFLAGS"
20153
20154 if test -n "$CXX"; then
20155 echo "$as_me:20155: checking if $CXX accepts parameter initialization" >&5
20156 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20157 if test "${cf_cv_cpp_param_init+set}" = set; then
20158   echo $ECHO_N "(cached) $ECHO_C" >&6
20159 else
20160
20161         ac_ext=cc
20162 ac_cpp='$CXXCPP $CPPFLAGS'
20163 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20164 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20165 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20166 ac_main_return=return
20167
20168         if test "$cross_compiling" = yes; then
20169   cf_cv_cpp_param_init=unknown
20170 else
20171   cat >conftest.$ac_ext <<_ACEOF
20172 #line 20172 "configure"
20173 #include "confdefs.h"
20174
20175 class TEST {
20176 private:
20177         int value;
20178 public:
20179         TEST(int x = 1);
20180         ~TEST();
20181 };
20182
20183 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20184 {
20185         value = x;
20186 }
20187 int main() { }
20188
20189 _ACEOF
20190 rm -f conftest$ac_exeext
20191 if { (eval echo "$as_me:20191: \"$ac_link\"") >&5
20192   (eval $ac_link) 2>&5
20193   ac_status=$?
20194   echo "$as_me:20194: \$? = $ac_status" >&5
20195   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20196   { (eval echo "$as_me:20196: \"$ac_try\"") >&5
20197   (eval $ac_try) 2>&5
20198   ac_status=$?
20199   echo "$as_me:20199: \$? = $ac_status" >&5
20200   (exit $ac_status); }; }; then
20201   cf_cv_cpp_param_init=yes
20202 else
20203   echo "$as_me: program exited with status $ac_status" >&5
20204 echo "$as_me: failed program was:" >&5
20205 cat conftest.$ac_ext >&5
20206 cf_cv_cpp_param_init=no
20207 fi
20208 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20209 fi
20210         ac_ext=cc
20211 ac_cpp='$CXXCPP $CPPFLAGS'
20212 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20213 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20214 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20215 ac_main_return=return
20216
20217 fi
20218 echo "$as_me:20218: result: $cf_cv_cpp_param_init" >&5
20219 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20220 fi
20221 test "$cf_cv_cpp_param_init" = yes &&
20222 cat >>confdefs.h <<\EOF
20223 #define CPP_HAS_PARAM_INIT 1
20224 EOF
20225
20226 if test -n "$CXX"; then
20227
20228 echo "$as_me:20228: checking if $CXX accepts static_cast" >&5
20229 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20230 if test "${cf_cv_cpp_static_cast+set}" = set; then
20231   echo $ECHO_N "(cached) $ECHO_C" >&6
20232 else
20233
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         cat >conftest.$ac_ext <<_ACEOF
20242 #line 20242 "configure"
20243 #include "confdefs.h"
20244
20245 class NCursesPanel
20246 {
20247 public:
20248   NCursesPanel(int nlines,
20249                int ncols,
20250                int begin_y = 0,
20251                int begin_x = 0)
20252   {
20253   }
20254   NCursesPanel();
20255   ~NCursesPanel();
20256 };
20257
20258 template<class T> class NCursesUserPanel : public NCursesPanel
20259 {
20260 public:
20261   NCursesUserPanel (int nlines,
20262                     int ncols,
20263                     int begin_y = 0,
20264                     int begin_x = 0,
20265                     const T* p_UserData = static_cast<T*>(0))
20266     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20267   {
20268   };
20269   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20270   {
20271   };
20272
20273   virtual ~NCursesUserPanel() {};
20274 };
20275
20276 int
20277 main ()
20278 {
20279
20280         const char* p_UserData = static_cast<char*>(0)
20281   ;
20282   return 0;
20283 }
20284 _ACEOF
20285 rm -f conftest.$ac_objext
20286 if { (eval echo "$as_me:20286: \"$ac_compile\"") >&5
20287   (eval $ac_compile) 2>&5
20288   ac_status=$?
20289   echo "$as_me:20289: \$? = $ac_status" >&5
20290   (exit $ac_status); } &&
20291          { ac_try='test -s conftest.$ac_objext'
20292   { (eval echo "$as_me:20292: \"$ac_try\"") >&5
20293   (eval $ac_try) 2>&5
20294   ac_status=$?
20295   echo "$as_me:20295: \$? = $ac_status" >&5
20296   (exit $ac_status); }; }; then
20297   cf_cv_cpp_static_cast=yes
20298 else
20299   echo "$as_me: failed program was:" >&5
20300 cat conftest.$ac_ext >&5
20301 cf_cv_cpp_static_cast=no
20302 fi
20303 rm -f conftest.$ac_objext conftest.$ac_ext
20304
20305         ac_ext=cc
20306 ac_cpp='$CXXCPP $CPPFLAGS'
20307 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20308 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20309 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20310 ac_main_return=return
20311
20312 fi
20313 echo "$as_me:20313: result: $cf_cv_cpp_static_cast" >&5
20314 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20315
20316 fi
20317
20318 test "$cf_cv_cpp_static_cast" = yes &&
20319 cat >>confdefs.h <<\EOF
20320 #define CPP_HAS_STATIC_CAST 1
20321 EOF
20322
20323         CXX_AR='$(AR)'
20324         CXX_ARFLAGS='$(ARFLAGS)'
20325         case $cf_cv_system_name in #(vi
20326         irix*) #(vi
20327             if test "$GXX" != yes ; then
20328                 CXX_AR='$(CXX)'
20329                 CXX_ARFLAGS='-ar -o'
20330             fi
20331             ;;
20332         sco3.2v5*) #(vi
20333             CXXLDFLAGS="-u main"
20334             ;;
20335         solaris2*)
20336             if test "$GXX" != yes ; then
20337                 CXX_AR='$(CXX)'
20338                 CXX_ARFLAGS='-xar -o'
20339             fi
20340             ;;
20341         esac
20342
20343 else
20344         cf_cxx_library=no
20345         cf_cv_builtin_bool=1
20346
20347         # Just because we are not configuring against C++ right now does not
20348         # mean that a user will not want to use C++.  Some distributors disable
20349         # the C++ portion of this configuration as a shortcut (or just to avoid
20350         # compiling the demo in the c++ directory).  So we need a reasonable
20351         # default for the 'bool' type.
20352         #
20353         # Caveat: since the storage of the bool type is not standardized, it
20354         # may change.
20355
20356         if test "$NCURSES_BOOL" != auto ; then
20357                 cf_cv_type_of_bool=$NCURSES_BOOL
20358                 cf_cv_header_stdbool_h=0
20359         else
20360                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20361
20362 echo "$as_me:20362: checking for size of bool" >&5
20363 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20364 if test "${cf_cv_type_of_bool+set}" = set; then
20365   echo $ECHO_N "(cached) $ECHO_C" >&6
20366 else
20367
20368         rm -f cf_test.out
20369         if test "$cross_compiling" = yes; then
20370   cf_cv_type_of_bool=unknown
20371 else
20372   cat >conftest.$ac_ext <<_ACEOF
20373 #line 20373 "configure"
20374 #include "confdefs.h"
20375
20376 #include <stdlib.h>
20377 #include <stdio.h>
20378
20379 #if defined(__cplusplus)
20380
20381 #ifdef HAVE_GXX_BUILTIN_H
20382 #include <g++/builtin.h>
20383 #elif HAVE_GPP_BUILTIN_H
20384 #include <gpp/builtin.h>
20385 #elif HAVE_BUILTIN_H
20386 #include <builtin.h>
20387 #endif
20388
20389 #else
20390
20391 #if $cf_cv_header_stdbool_h
20392 #include <stdbool.h>
20393 #endif
20394
20395 #endif
20396
20397 int main()
20398 {
20399         FILE *fp = fopen("cf_test.out", "w");
20400         if (fp != 0) {
20401                 bool x = true;
20402                 if ((bool)(-x) >= 0)
20403                         fputs("unsigned ", fp);
20404                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20405                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20406                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20407                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20408                 fclose(fp);
20409         }
20410         ${cf_cv_main_return:-return}(0);
20411 }
20412
20413 _ACEOF
20414 rm -f conftest$ac_exeext
20415 if { (eval echo "$as_me:20415: \"$ac_link\"") >&5
20416   (eval $ac_link) 2>&5
20417   ac_status=$?
20418   echo "$as_me:20418: \$? = $ac_status" >&5
20419   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20420   { (eval echo "$as_me:20420: \"$ac_try\"") >&5
20421   (eval $ac_try) 2>&5
20422   ac_status=$?
20423   echo "$as_me:20423: \$? = $ac_status" >&5
20424   (exit $ac_status); }; }; then
20425   cf_cv_type_of_bool=`cat cf_test.out`
20426                  if test -z "$cf_cv_type_of_bool"; then
20427                    cf_cv_type_of_bool=unknown
20428                  fi
20429 else
20430   echo "$as_me: program exited with status $ac_status" >&5
20431 echo "$as_me: failed program was:" >&5
20432 cat conftest.$ac_ext >&5
20433 cf_cv_type_of_bool=unknown
20434 fi
20435 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20436 fi
20437
20438 fi
20439
20440         rm -f cf_test.out
20441 echo "$as_me:20441: result: $cf_cv_type_of_bool" >&5
20442 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20443 if test "$cf_cv_type_of_bool" = unknown ; then
20444         case .$NCURSES_BOOL in #(vi
20445         .auto|.) NCURSES_BOOL=unsigned;;
20446         esac
20447         { echo "$as_me:20447: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20448 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20449         cf_cv_type_of_bool=$NCURSES_BOOL
20450 fi
20451
20452                 else
20453                         echo "$as_me:20453: checking for fallback type of bool" >&5
20454 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20455                         case "$host_cpu" in #(vi
20456                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20457                         *)      cf_cv_type_of_bool=int  ;;
20458                         esac
20459                         echo "$as_me:20459: result: $cf_cv_type_of_bool" >&5
20460 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20461                 fi
20462         fi
20463 fi
20464
20465 # If the C compiler did not declare bool, and we did not determine that the C++
20466 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20467 # ncurses library use the same type as C++ bool.  Note that this allows one to
20468 # specify the type of bool in a configure-script option and postpone
20469 # integration with the C++ compiler provided that the types are compatible.
20470 USE_CXX_BOOL=1
20471 if test $cf_cv_cc_bool_type = 1
20472 then
20473         # oops: C has a bool.  Unlikely, but C++ could differ.
20474         USE_CXX_BOOL=0
20475 elif test $cf_cv_builtin_bool = 0
20476 then
20477         # C++ has no bool
20478         USE_CXX_BOOL=0
20479 else
20480         # this is the normal case
20481         USE_CXX_BOOL='defined(__cplusplus)'
20482 fi
20483
20484 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20485
20486         if test "$cf_with_ada" != "no" ; then
20487                 if test "$with_libtool" != "no"; then
20488                         { echo "$as_me:20488: WARNING: libtool does not support Ada - disabling feature" >&5
20489 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20490                         cf_with_ada=no
20491                 fi
20492         fi
20493
20494         if test "$cf_with_ada" != "no" ; then
20495
20496 cf_ada_make=gnatmake
20497 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20498 set dummy $cf_ada_make; ac_word=$2
20499 echo "$as_me:20499: checking for $ac_word" >&5
20500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20501 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20502   echo $ECHO_N "(cached) $ECHO_C" >&6
20503 else
20504   if test -n "$gnat_exists"; then
20505   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20506 else
20507   ac_save_IFS=$IFS; IFS=$ac_path_separator
20508 ac_dummy="$PATH"
20509 for ac_dir in $ac_dummy; do
20510   IFS=$ac_save_IFS
20511   test -z "$ac_dir" && ac_dir=.
20512   $as_executable_p "$ac_dir/$ac_word" || continue
20513 ac_cv_prog_gnat_exists="yes"
20514 echo "$as_me:20514: found $ac_dir/$ac_word" >&5
20515 break
20516 done
20517
20518   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20519 fi
20520 fi
20521 gnat_exists=$ac_cv_prog_gnat_exists
20522 if test -n "$gnat_exists"; then
20523   echo "$as_me:20523: result: $gnat_exists" >&5
20524 echo "${ECHO_T}$gnat_exists" >&6
20525 else
20526   echo "$as_me:20526: result: no" >&5
20527 echo "${ECHO_T}no" >&6
20528 fi
20529
20530 if test "$ac_cv_prog_gnat_exists" = no; then
20531    cf_ada_make=
20532    cf_cv_prog_gnat_correct=no
20533 else
20534
20535 echo "$as_me:20535: checking for gnat version" >&5
20536 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20537 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20538         grep '[0-9].[0-9][0-9]*' |\
20539     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20540 echo "$as_me:20540: result: $cf_gnat_version" >&5
20541 echo "${ECHO_T}$cf_gnat_version" >&6
20542
20543 case $cf_gnat_version in #(vi
20544 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20545         cf_cv_prog_gnat_correct=yes
20546         ;;
20547 *)
20548         { echo "$as_me:20548: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20549 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20550         cf_cv_prog_gnat_correct=no
20551         ;;
20552 esac
20553
20554    # Extract the first word of "m4", so it can be a program name with args.
20555 set dummy m4; ac_word=$2
20556 echo "$as_me:20556: checking for $ac_word" >&5
20557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20558 if test "${ac_cv_prog_M4_exists+set}" = set; then
20559   echo $ECHO_N "(cached) $ECHO_C" >&6
20560 else
20561   if test -n "$M4_exists"; then
20562   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20563 else
20564   ac_save_IFS=$IFS; IFS=$ac_path_separator
20565 ac_dummy="$PATH"
20566 for ac_dir in $ac_dummy; do
20567   IFS=$ac_save_IFS
20568   test -z "$ac_dir" && ac_dir=.
20569   $as_executable_p "$ac_dir/$ac_word" || continue
20570 ac_cv_prog_M4_exists="yes"
20571 echo "$as_me:20571: found $ac_dir/$ac_word" >&5
20572 break
20573 done
20574
20575   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20576 fi
20577 fi
20578 M4_exists=$ac_cv_prog_M4_exists
20579 if test -n "$M4_exists"; then
20580   echo "$as_me:20580: result: $M4_exists" >&5
20581 echo "${ECHO_T}$M4_exists" >&6
20582 else
20583   echo "$as_me:20583: result: no" >&5
20584 echo "${ECHO_T}no" >&6
20585 fi
20586
20587    if test "$ac_cv_prog_M4_exists" = no; then
20588       cf_cv_prog_gnat_correct=no
20589       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20590    fi
20591    if test "$cf_cv_prog_gnat_correct" = yes; then
20592       echo "$as_me:20592: checking if GNAT works" >&5
20593 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20594
20595 rm -rf conftest* *~conftest*
20596 cat >>conftest.ads <<CF_EOF
20597 procedure conftest;
20598 CF_EOF
20599 cat >>conftest.adb <<CF_EOF
20600 with Text_IO;
20601 with GNAT.OS_Lib;
20602 procedure conftest is
20603 begin
20604    Text_IO.Put ("Hello World");
20605    Text_IO.New_Line;
20606    GNAT.OS_Lib.OS_Exit (0);
20607 end conftest;
20608 CF_EOF
20609 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20610    if ( ./conftest 1>&5 2>&1 ) ; then
20611       cf_cv_prog_gnat_correct=yes
20612    else
20613       cf_cv_prog_gnat_correct=no
20614    fi
20615 else
20616    cf_cv_prog_gnat_correct=no
20617 fi
20618 rm -rf conftest* *~conftest*
20619
20620       echo "$as_me:20620: result: $cf_cv_prog_gnat_correct" >&5
20621 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20622    fi
20623 fi
20624
20625                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20626
20627         ADAFLAGS="$ADAFLAGS -gnatpn"
20628
20629         echo "$as_me:20629: checking optimization options for ADAFLAGS" >&5
20630 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20631         case "$CFLAGS" in
20632         *-g*)
20633
20634         ADAFLAGS="$ADAFLAGS -g"
20635
20636                 ;;
20637         esac
20638         case "$CFLAGS" in
20639         *-O*)
20640                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20641
20642         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20643
20644                 ;;
20645         esac
20646         echo "$as_me:20646: result: $ADAFLAGS" >&5
20647 echo "${ECHO_T}$ADAFLAGS" >&6
20648
20649 echo "$as_me:20649: checking if GNATPREP supports -T option" >&5
20650 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20651 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20652   echo $ECHO_N "(cached) $ECHO_C" >&6
20653 else
20654
20655 cf_cv_gnatprep_opt_t=no
20656 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20657
20658 fi
20659 echo "$as_me:20659: result: $cf_cv_gnatprep_opt_t" >&5
20660 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20661 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20662
20663 echo "$as_me:20663: checking if GNAT supports generics" >&5
20664 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20665 case $cf_gnat_version in #(vi
20666 3.[1-9]*|[4-9].*) #(vi
20667         cf_gnat_generics=yes
20668         ;;
20669 *)
20670         cf_gnat_generics=no
20671         ;;
20672 esac
20673 echo "$as_me:20673: result: $cf_gnat_generics" >&5
20674 echo "${ECHO_T}$cf_gnat_generics" >&6
20675
20676 if test "$cf_gnat_generics" = yes
20677 then
20678         cf_compile_generics=generics
20679         cf_generic_objects="\${GENOBJS}"
20680 else
20681         cf_compile_generics=
20682         cf_generic_objects=
20683 fi
20684
20685 echo "$as_me:20685: checking if GNAT supports SIGINT" >&5
20686 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20687 if test "${cf_cv_gnat_sigint+set}" = set; then
20688   echo $ECHO_N "(cached) $ECHO_C" >&6
20689 else
20690
20691 rm -rf conftest* *~conftest*
20692 cat >>conftest.ads <<CF_EOF
20693 with Ada.Interrupts.Names;
20694
20695 package ConfTest is
20696
20697    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20698    pragma Unreserve_All_Interrupts;
20699    pragma Warnings (On);
20700
20701    protected Process is
20702       procedure Stop;
20703       function Continue return Boolean;
20704       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20705    private
20706       Done : Boolean := False;
20707    end Process;
20708
20709 end ConfTest;
20710 CF_EOF
20711 cat >>conftest.adb <<CF_EOF
20712 package body ConfTest is
20713    protected body Process is
20714       procedure Stop is
20715       begin
20716          Done := True;
20717       end Stop;
20718       function Continue return Boolean is
20719       begin
20720          return not Done;
20721       end Continue;
20722    end Process;
20723 end ConfTest;
20724 CF_EOF
20725 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20726       cf_cv_gnat_sigint=yes
20727 else
20728    cf_cv_gnat_sigint=no
20729 fi
20730 rm -rf conftest* *~conftest*
20731
20732 fi
20733 echo "$as_me:20733: result: $cf_cv_gnat_sigint" >&5
20734 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20735
20736 if test $cf_cv_gnat_sigint = yes ; then
20737         USE_GNAT_SIGINT=""
20738 else
20739         USE_GNAT_SIGINT="#"
20740 fi
20741
20742 cf_gnat_libraries=no
20743 cf_gnat_projects=no
20744
20745 if test "$enable_gnat_projects" != no ; then
20746 echo "$as_me:20746: checking if GNAT supports project files" >&5
20747 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20748 case $cf_gnat_version in #(vi
20749 3.[0-9]*) #(vi
20750         ;;
20751 *)
20752         case $cf_cv_system_name in #(vi
20753         cygwin*|msys*) #(vi
20754                 ;;
20755         *)
20756                 mkdir conftest.src conftest.bin conftest.lib
20757                 cd conftest.src
20758                 rm -rf conftest* *~conftest*
20759                 cat >>library.gpr <<CF_EOF
20760 project Library is
20761   Kind := External ("LIB_KIND");
20762   for Library_Name use "ConfTest";
20763   for Object_Dir use ".";
20764   for Library_ALI_Dir use External("LIBRARY_DIR");
20765   for Library_Version use External ("SONAME");
20766   for Library_Kind use Kind;
20767   for Library_Dir use External("BUILD_DIR");
20768   Source_Dir := External ("SOURCE_DIR");
20769   for Source_Dirs use (Source_Dir);
20770 end Library;
20771 CF_EOF
20772                 cat >>confpackage.ads <<CF_EOF
20773 package ConfPackage is
20774    procedure conftest;
20775 end ConfPackage;
20776 CF_EOF
20777                 cat >>confpackage.adb <<CF_EOF
20778 with Text_IO;
20779 package body ConfPackage is
20780    procedure conftest is
20781    begin
20782       Text_IO.Put ("Hello World");
20783       Text_IO.New_Line;
20784    end conftest;
20785 end ConfPackage;
20786 CF_EOF
20787                 if ( $cf_ada_make $ADAFLAGS \
20788                                 -Plibrary.gpr \
20789                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20790                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20791                                 -XSOURCE_DIR=`pwd` \
20792                                 -XSONAME=libConfTest.so.1 \
20793                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20794                         cf_gnat_projects=yes
20795                 fi
20796                 cd ..
20797                 if test -f conftest.lib/confpackage.ali
20798                 then
20799                         cf_gnat_libraries=yes
20800                 fi
20801                 rm -rf conftest* *~conftest*
20802                 ;;
20803         esac
20804         ;;
20805 esac
20806 echo "$as_me:20806: result: $cf_gnat_projects" >&5
20807 echo "${ECHO_T}$cf_gnat_projects" >&6
20808 fi # enable_gnat_projects
20809
20810 if test $cf_gnat_projects = yes
20811 then
20812         echo "$as_me:20812: checking if GNAT supports libraries" >&5
20813 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20814         echo "$as_me:20814: result: $cf_gnat_libraries" >&5
20815 echo "${ECHO_T}$cf_gnat_libraries" >&6
20816 fi
20817
20818 if test "$cf_gnat_projects" = yes
20819 then
20820         USE_OLD_MAKERULES="#"
20821         USE_GNAT_PROJECTS=""
20822 else
20823         USE_OLD_MAKERULES=""
20824         USE_GNAT_PROJECTS="#"
20825 fi
20826
20827 if test "$cf_gnat_libraries" = yes
20828 then
20829         USE_GNAT_LIBRARIES=""
20830 else
20831         USE_GNAT_LIBRARIES="#"
20832 fi
20833
20834 echo "$as_me:20834: checking for ada-compiler" >&5
20835 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20836
20837 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20838 if test "${with_ada_compiler+set}" = set; then
20839   withval="$with_ada_compiler"
20840   cf_ada_compiler=$withval
20841 else
20842   cf_ada_compiler=gnatmake
20843 fi;
20844
20845 echo "$as_me:20845: result: $cf_ada_compiler" >&5
20846 echo "${ECHO_T}$cf_ada_compiler" >&6
20847
20848                         cf_ada_package=terminal_interface
20849
20850 echo "$as_me:20850: checking for ada-include" >&5
20851 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20852
20853 # Check whether --with-ada-include or --without-ada-include was given.
20854 if test "${with_ada_include+set}" = set; then
20855   withval="$with_ada_include"
20856
20857 else
20858   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20859 fi; if test -n "$prefix/share/ada/adainclude" ; then
20860
20861 if test "x$prefix" != xNONE; then
20862   cf_path_syntax="$prefix"
20863 else
20864   cf_path_syntax="$ac_default_prefix"
20865 fi
20866
20867 case ".$withval" in #(vi
20868 .\$\(*\)*|.\'*\'*) #(vi
20869   ;;
20870 ..|./*|.\\*) #(vi
20871   ;;
20872 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20873   ;;
20874 .\${*prefix}*|.\${*dir}*) #(vi
20875   eval withval="$withval"
20876   case ".$withval" in #(vi
20877   .NONE/*)
20878     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20879     ;;
20880   esac
20881   ;; #(vi
20882 .no|.NONE/*)
20883   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20884   ;;
20885 *)
20886   { { echo "$as_me:20886: error: expected a pathname, not \"$withval\"" >&5
20887 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20888    { (exit 1); exit 1; }; }
20889   ;;
20890 esac
20891
20892 fi
20893 eval ADA_INCLUDE="$withval"
20894
20895 echo "$as_me:20895: result: $ADA_INCLUDE" >&5
20896 echo "${ECHO_T}$ADA_INCLUDE" >&6
20897
20898 echo "$as_me:20898: checking for ada-objects" >&5
20899 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20900
20901 # Check whether --with-ada-objects or --without-ada-objects was given.
20902 if test "${with_ada_objects+set}" = set; then
20903   withval="$with_ada_objects"
20904
20905 else
20906   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20907 fi; if test -n "$prefix/lib/ada/adalib" ; then
20908
20909 if test "x$prefix" != xNONE; then
20910   cf_path_syntax="$prefix"
20911 else
20912   cf_path_syntax="$ac_default_prefix"
20913 fi
20914
20915 case ".$withval" in #(vi
20916 .\$\(*\)*|.\'*\'*) #(vi
20917   ;;
20918 ..|./*|.\\*) #(vi
20919   ;;
20920 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20921   ;;
20922 .\${*prefix}*|.\${*dir}*) #(vi
20923   eval withval="$withval"
20924   case ".$withval" in #(vi
20925   .NONE/*)
20926     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20927     ;;
20928   esac
20929   ;; #(vi
20930 .no|.NONE/*)
20931   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20932   ;;
20933 *)
20934   { { echo "$as_me:20934: error: expected a pathname, not \"$withval\"" >&5
20935 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20936    { (exit 1); exit 1; }; }
20937   ;;
20938 esac
20939
20940 fi
20941 eval ADA_OBJECTS="$withval"
20942
20943 echo "$as_me:20943: result: $ADA_OBJECTS" >&5
20944 echo "${ECHO_T}$ADA_OBJECTS" >&6
20945
20946 echo "$as_me:20946: checking if an Ada95 shared-library should be built" >&5
20947 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20948
20949 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20950 if test "${with_ada_sharedlib+set}" = set; then
20951   withval="$with_ada_sharedlib"
20952   with_ada_sharedlib=$withval
20953 else
20954   with_ada_sharedlib=no
20955 fi;
20956 echo "$as_me:20956: result: $with_ada_sharedlib" >&5
20957 echo "${ECHO_T}$with_ada_sharedlib" >&6
20958
20959 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20960 MAKE_ADA_SHAREDLIB="#"
20961
20962 if test "x$with_ada_sharedlib" != xno
20963 then
20964         MAKE_ADA_SHAREDLIB=
20965         if test "x$with_ada_sharedlib" != xyes
20966         then
20967                 ADA_SHAREDLIB="$with_ada_sharedlib"
20968         fi
20969 fi
20970
20971                 fi
20972         fi
20973 else
20974         cf_with_ada=no
20975 fi
20976
20977 # do this "late" to avoid conflict with header-checks
20978 if test "x$with_widec" = xyes ; then
20979         echo "$as_me:20979: checking for wchar_t" >&5
20980 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20981 if test "${ac_cv_type_wchar_t+set}" = set; then
20982   echo $ECHO_N "(cached) $ECHO_C" >&6
20983 else
20984   cat >conftest.$ac_ext <<_ACEOF
20985 #line 20985 "configure"
20986 #include "confdefs.h"
20987 $ac_includes_default
20988 int
20989 main ()
20990 {
20991 if ((wchar_t *) 0)
20992   return 0;
20993 if (sizeof (wchar_t))
20994   return 0;
20995   ;
20996   return 0;
20997 }
20998 _ACEOF
20999 rm -f conftest.$ac_objext
21000 if { (eval echo "$as_me:21000: \"$ac_compile\"") >&5
21001   (eval $ac_compile) 2>&5
21002   ac_status=$?
21003   echo "$as_me:21003: \$? = $ac_status" >&5
21004   (exit $ac_status); } &&
21005          { ac_try='test -s conftest.$ac_objext'
21006   { (eval echo "$as_me:21006: \"$ac_try\"") >&5
21007   (eval $ac_try) 2>&5
21008   ac_status=$?
21009   echo "$as_me:21009: \$? = $ac_status" >&5
21010   (exit $ac_status); }; }; then
21011   ac_cv_type_wchar_t=yes
21012 else
21013   echo "$as_me: failed program was:" >&5
21014 cat conftest.$ac_ext >&5
21015 ac_cv_type_wchar_t=no
21016 fi
21017 rm -f conftest.$ac_objext conftest.$ac_ext
21018 fi
21019 echo "$as_me:21019: result: $ac_cv_type_wchar_t" >&5
21020 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21021
21022 echo "$as_me:21022: checking size of wchar_t" >&5
21023 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21024 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21025   echo $ECHO_N "(cached) $ECHO_C" >&6
21026 else
21027   if test "$ac_cv_type_wchar_t" = yes; then
21028   if test "$cross_compiling" = yes; then
21029   # Depending upon the size, compute the lo and hi bounds.
21030 cat >conftest.$ac_ext <<_ACEOF
21031 #line 21031 "configure"
21032 #include "confdefs.h"
21033 $ac_includes_default
21034 int
21035 main ()
21036 {
21037 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21038   ;
21039   return 0;
21040 }
21041 _ACEOF
21042 rm -f conftest.$ac_objext
21043 if { (eval echo "$as_me:21043: \"$ac_compile\"") >&5
21044   (eval $ac_compile) 2>&5
21045   ac_status=$?
21046   echo "$as_me:21046: \$? = $ac_status" >&5
21047   (exit $ac_status); } &&
21048          { ac_try='test -s conftest.$ac_objext'
21049   { (eval echo "$as_me:21049: \"$ac_try\"") >&5
21050   (eval $ac_try) 2>&5
21051   ac_status=$?
21052   echo "$as_me:21052: \$? = $ac_status" >&5
21053   (exit $ac_status); }; }; then
21054   ac_lo=0 ac_mid=0
21055   while :; do
21056     cat >conftest.$ac_ext <<_ACEOF
21057 #line 21057 "configure"
21058 #include "confdefs.h"
21059 $ac_includes_default
21060 int
21061 main ()
21062 {
21063 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21064   ;
21065   return 0;
21066 }
21067 _ACEOF
21068 rm -f conftest.$ac_objext
21069 if { (eval echo "$as_me:21069: \"$ac_compile\"") >&5
21070   (eval $ac_compile) 2>&5
21071   ac_status=$?
21072   echo "$as_me:21072: \$? = $ac_status" >&5
21073   (exit $ac_status); } &&
21074          { ac_try='test -s conftest.$ac_objext'
21075   { (eval echo "$as_me:21075: \"$ac_try\"") >&5
21076   (eval $ac_try) 2>&5
21077   ac_status=$?
21078   echo "$as_me:21078: \$? = $ac_status" >&5
21079   (exit $ac_status); }; }; then
21080   ac_hi=$ac_mid; break
21081 else
21082   echo "$as_me: failed program was:" >&5
21083 cat conftest.$ac_ext >&5
21084 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21085 fi
21086 rm -f conftest.$ac_objext conftest.$ac_ext
21087   done
21088 else
21089   echo "$as_me: failed program was:" >&5
21090 cat conftest.$ac_ext >&5
21091 ac_hi=-1 ac_mid=-1
21092   while :; do
21093     cat >conftest.$ac_ext <<_ACEOF
21094 #line 21094 "configure"
21095 #include "confdefs.h"
21096 $ac_includes_default
21097 int
21098 main ()
21099 {
21100 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21101   ;
21102   return 0;
21103 }
21104 _ACEOF
21105 rm -f conftest.$ac_objext
21106 if { (eval echo "$as_me:21106: \"$ac_compile\"") >&5
21107   (eval $ac_compile) 2>&5
21108   ac_status=$?
21109   echo "$as_me:21109: \$? = $ac_status" >&5
21110   (exit $ac_status); } &&
21111          { ac_try='test -s conftest.$ac_objext'
21112   { (eval echo "$as_me:21112: \"$ac_try\"") >&5
21113   (eval $ac_try) 2>&5
21114   ac_status=$?
21115   echo "$as_me:21115: \$? = $ac_status" >&5
21116   (exit $ac_status); }; }; then
21117   ac_lo=$ac_mid; break
21118 else
21119   echo "$as_me: failed program was:" >&5
21120 cat conftest.$ac_ext >&5
21121 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21122 fi
21123 rm -f conftest.$ac_objext conftest.$ac_ext
21124   done
21125 fi
21126 rm -f conftest.$ac_objext conftest.$ac_ext
21127 # Binary search between lo and hi bounds.
21128 while test "x$ac_lo" != "x$ac_hi"; do
21129   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21130   cat >conftest.$ac_ext <<_ACEOF
21131 #line 21131 "configure"
21132 #include "confdefs.h"
21133 $ac_includes_default
21134 int
21135 main ()
21136 {
21137 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21138   ;
21139   return 0;
21140 }
21141 _ACEOF
21142 rm -f conftest.$ac_objext
21143 if { (eval echo "$as_me:21143: \"$ac_compile\"") >&5
21144   (eval $ac_compile) 2>&5
21145   ac_status=$?
21146   echo "$as_me:21146: \$? = $ac_status" >&5
21147   (exit $ac_status); } &&
21148          { ac_try='test -s conftest.$ac_objext'
21149   { (eval echo "$as_me:21149: \"$ac_try\"") >&5
21150   (eval $ac_try) 2>&5
21151   ac_status=$?
21152   echo "$as_me:21152: \$? = $ac_status" >&5
21153   (exit $ac_status); }; }; then
21154   ac_hi=$ac_mid
21155 else
21156   echo "$as_me: failed program was:" >&5
21157 cat conftest.$ac_ext >&5
21158 ac_lo=`expr $ac_mid + 1`
21159 fi
21160 rm -f conftest.$ac_objext conftest.$ac_ext
21161 done
21162 ac_cv_sizeof_wchar_t=$ac_lo
21163 else
21164   if test "$cross_compiling" = yes; then
21165   { { echo "$as_me:21165: error: cannot run test program while cross compiling" >&5
21166 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21167    { (exit 1); exit 1; }; }
21168 else
21169   cat >conftest.$ac_ext <<_ACEOF
21170 #line 21170 "configure"
21171 #include "confdefs.h"
21172 $ac_includes_default
21173 int
21174 main ()
21175 {
21176 FILE *f = fopen ("conftest.val", "w");
21177 if (!f)
21178   $ac_main_return (1);
21179 fprintf (f, "%d", (sizeof (wchar_t)));
21180 fclose (f);
21181   ;
21182   return 0;
21183 }
21184 _ACEOF
21185 rm -f conftest$ac_exeext
21186 if { (eval echo "$as_me:21186: \"$ac_link\"") >&5
21187   (eval $ac_link) 2>&5
21188   ac_status=$?
21189   echo "$as_me:21189: \$? = $ac_status" >&5
21190   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21191   { (eval echo "$as_me:21191: \"$ac_try\"") >&5
21192   (eval $ac_try) 2>&5
21193   ac_status=$?
21194   echo "$as_me:21194: \$? = $ac_status" >&5
21195   (exit $ac_status); }; }; then
21196   ac_cv_sizeof_wchar_t=`cat conftest.val`
21197 else
21198   echo "$as_me: program exited with status $ac_status" >&5
21199 echo "$as_me: failed program was:" >&5
21200 cat conftest.$ac_ext >&5
21201 fi
21202 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21203 fi
21204 fi
21205 rm -f conftest.val
21206 else
21207   ac_cv_sizeof_wchar_t=0
21208 fi
21209 fi
21210 echo "$as_me:21210: result: $ac_cv_sizeof_wchar_t" >&5
21211 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21212 cat >>confdefs.h <<EOF
21213 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21214 EOF
21215
21216 fi
21217
21218 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21219 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21220 ###
21221 ### ticlib modules may be a separate library, otherwise contained in termlib.
21222 ### termlib modules may be a separate library, otherwise contained in ncurses.
21223 ###
21224 ### The of "+" or " " between the tokens controls the way the script
21225 ### chooses to split module lists into libraries.
21226 ###
21227 ### (see CF_LIB_RULES).
21228 echo "$as_me:21228: checking for library subsets" >&5
21229 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21230 LIB_SUBSETS=
21231
21232 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21233         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21234         if test "$with_ticlib" != no ; then
21235                 LIB_SUBSETS="${LIB_SUBSETS} "
21236         else
21237                 LIB_SUBSETS="${LIB_SUBSETS}+"
21238         fi
21239 fi
21240
21241 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21242 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21243
21244 if test "$with_termlib" != no ; then
21245         LIB_SUBSETS="${LIB_SUBSETS} "
21246 else
21247         LIB_SUBSETS="${LIB_SUBSETS}+"
21248 fi
21249
21250 LIB_SUBSETS="${LIB_SUBSETS}base"
21251
21252 # Most term-driver calls are to tinfo, but some like init_pair are to the
21253 # base library (so it resides in base).
21254 if test "$with_term_driver" != no ; then
21255         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21256         case $cf_cv_system_name in #(vi
21257         *mingw32*|*mingw64*) #(vi
21258                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21259                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21260                 ;;
21261         *) #(vi
21262                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21263                 ;;
21264         esac
21265 fi
21266
21267 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21268 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21269
21270 echo "$as_me:21270: result: $LIB_SUBSETS" >&5
21271 echo "${ECHO_T}$LIB_SUBSETS" >&6
21272
21273 ### Construct the list of include-directories to be generated
21274
21275 if test "$srcdir" != "."; then
21276         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21277 fi
21278 CPPFLAGS="-I../include $CPPFLAGS"
21279 if test "$srcdir" != "."; then
21280         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21281 fi
21282 CPPFLAGS="-I. $CPPFLAGS"
21283
21284 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21285 if test "$srcdir" != "."; then
21286         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21287 fi
21288 if test "$GCC" != yes; then
21289         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21290 elif test "$includedir" != "/usr/include"; then
21291         if test "$includedir" = '${prefix}/include' ; then
21292                 if test x$prefix != x/usr ; then
21293                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21294                 fi
21295         else
21296                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21297         fi
21298 fi
21299
21300 ### Build up pieces for makefile rules
21301 echo "$as_me:21301: checking default library suffix" >&5
21302 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21303
21304         case $DFT_LWR_MODEL in
21305         libtool) DFT_ARG_SUFFIX=''   ;;
21306         normal)  DFT_ARG_SUFFIX=''   ;;
21307         debug)   DFT_ARG_SUFFIX='_g' ;;
21308         profile) DFT_ARG_SUFFIX='_p' ;;
21309         shared)  DFT_ARG_SUFFIX=''   ;;
21310         esac
21311         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21312 echo "$as_me:21312: result: $DFT_ARG_SUFFIX" >&5
21313 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21314
21315 echo "$as_me:21315: checking default library-dependency suffix" >&5
21316 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21317
21318         case X$DFT_LWR_MODEL in #(vi
21319         Xlibtool) #(vi
21320                 DFT_LIB_SUFFIX='.la'
21321                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21322                 ;;
21323         Xdebug) #(vi
21324                 DFT_LIB_SUFFIX='_g.a'
21325                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21326                 ;;
21327         Xprofile) #(vi
21328                 DFT_LIB_SUFFIX='_p.a'
21329                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21330                 ;;
21331         Xshared) #(vi
21332                 case $cf_cv_system_name in
21333                 aix[5-7]*) #(vi
21334                         DFT_LIB_SUFFIX='.so'
21335                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21336                         ;;
21337                 cygwin*|msys*|mingw*) #(vi
21338                         DFT_LIB_SUFFIX='.dll'
21339                         DFT_DEP_SUFFIX='.dll.a'
21340                         ;;
21341                 darwin*) #(vi
21342                         DFT_LIB_SUFFIX='.dylib'
21343                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21344                         ;;
21345                 hpux*) #(vi
21346                         case $target in
21347                         ia64*) #(vi
21348                                 DFT_LIB_SUFFIX='.so'
21349                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21350                                 ;;
21351                         *) #(vi
21352                                 DFT_LIB_SUFFIX='.sl'
21353                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21354                                 ;;
21355                         esac
21356                         ;;
21357                 *) #(vi
21358                         DFT_LIB_SUFFIX='.so'
21359                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21360                         ;;
21361                 esac
21362                 ;;
21363         *)
21364                 DFT_LIB_SUFFIX='.a'
21365                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21366                 ;;
21367         esac
21368         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21369         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21370 echo "$as_me:21370: result: $DFT_DEP_SUFFIX" >&5
21371 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21372
21373 echo "$as_me:21373: checking default object directory" >&5
21374 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21375
21376         case $DFT_LWR_MODEL in
21377         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21378         normal)  DFT_OBJ_SUBDIR='objects' ;;
21379         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21380         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21381         shared)
21382                 case $cf_cv_system_name in #(vi
21383                 cygwin|msys) #(vi
21384                         DFT_OBJ_SUBDIR='objects' ;;
21385                 *)
21386                         DFT_OBJ_SUBDIR='obj_s' ;;
21387                 esac
21388         esac
21389 echo "$as_me:21389: result: $DFT_OBJ_SUBDIR" >&5
21390 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21391
21392 if test "x$cf_with_cxx" = xyes ; then
21393 echo "$as_me:21393: checking c++ library-dependency suffix" >&5
21394 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21395 if test "$with_libtool" != "no"; then
21396         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21397         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21398 elif test "$with_shared_cxx" != "no"; then
21399         # also for g++ users...
21400         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21401 else
21402         # we normally make a static library because C/C++ library rules differ
21403
21404         case Xnormal in #(vi
21405         Xlibtool) #(vi
21406                 CXX_LIB_SUFFIX='.la'
21407                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21408                 ;;
21409         Xdebug) #(vi
21410                 CXX_LIB_SUFFIX='_g.a'
21411                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21412                 ;;
21413         Xprofile) #(vi
21414                 CXX_LIB_SUFFIX='_p.a'
21415                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21416                 ;;
21417         Xshared) #(vi
21418                 case $cf_cv_system_name in
21419                 aix[5-7]*) #(vi
21420                         CXX_LIB_SUFFIX='.so'
21421                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21422                         ;;
21423                 cygwin*|msys*|mingw*) #(vi
21424                         CXX_LIB_SUFFIX='.dll'
21425                         CXX_DEP_SUFFIX='.dll.a'
21426                         ;;
21427                 darwin*) #(vi
21428                         CXX_LIB_SUFFIX='.dylib'
21429                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21430                         ;;
21431                 hpux*) #(vi
21432                         case $target in
21433                         ia64*) #(vi
21434                                 CXX_LIB_SUFFIX='.so'
21435                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21436                                 ;;
21437                         *) #(vi
21438                                 CXX_LIB_SUFFIX='.sl'
21439                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21440                                 ;;
21441                         esac
21442                         ;;
21443                 *) #(vi
21444                         CXX_LIB_SUFFIX='.so'
21445                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21446                         ;;
21447                 esac
21448                 ;;
21449         *)
21450                 CXX_LIB_SUFFIX='.a'
21451                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21452                 ;;
21453         esac
21454         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21455         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21456
21457 fi
21458 echo "$as_me:21458: result: $CXX_LIB_SUFFIX" >&5
21459 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21460
21461 fi
21462
21463 # do not want -ldl in build except as needed for -lncurses dependency
21464 if test "x$with_dlsym" = xyes ; then
21465 if test $DFT_LWR_MODEL = shared || \
21466    test $DFT_LWR_MODEL = libtool ; then
21467
21468 # remove dl library from $LIBS
21469 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21470
21471 fi
21472 fi
21473 ### Set up low-level terminfo dependencies for makefiles.
21474
21475 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21476 # do not need libdl
21477 TICS_LIST=
21478 if test "x$with_dlsym" = xyes ; then
21479
21480 # remove dl library from $SHLIB_LIST
21481 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21482
21483 fi
21484
21485 if test "$with_ticlib" != no ; then
21486
21487         if test "x$with_ticlib" != xyes ; then
21488                 TICS_NAME=$with_ticlib
21489                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21490                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21491                 TICS_LIB_SUFFIX="${with_ticlib}"
21492         else
21493                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21494                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21495                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21496         fi
21497         TICS_LDFLAGS="-L${LIB_DIR}"
21498         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21499 else
21500         TICS_LDFLAGS="-L${LIB_DIR}"
21501         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21502 fi
21503
21504 if test "$with_termlib" != no ; then
21505
21506         if test "x$with_termlib" != xyes ; then
21507                 TINFO_NAME=$with_termlib
21508                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21509                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21510                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21511                 TINFO_LIB_SUFFIX="${with_termlib}"
21512         else
21513                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21514                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21515                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21516                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21517         fi
21518
21519         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21520         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21521         if test "$DFT_LWR_MODEL" = "libtool"; then
21522                 TEST_ARGS="${TEST_DEPS}"
21523                 TEST_ARG2="${TEST_DEP2}"
21524                 TINFO_LDFLAGS="-L${LIB_DIR}"
21525                 TINFO_LIBS="$TEST_ARGS"
21526                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21527                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21528         else
21529                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21530                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21531                 if test "x$with_term_driver" != xno ; then
21532                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21533                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21534                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21535                 else
21536                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21537                         TINFO_LIBS="$TEST_ARGS"
21538                 fi
21539                 TINFO_LDFLAGS="-L${LIB_DIR}"
21540                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21541         fi
21542 else
21543         # the next lines are needed for linking libtic over libncurses
21544         TINFO_NAME=${LIB_NAME}
21545         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21546         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21547         if test "x$with_tic_depends" = xyes ; then
21548                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21549         else
21550                 TICS_LIST="$SHLIB_LIST"
21551         fi
21552
21553         TINFO_LDFLAGS="-L${LIB_DIR}"
21554         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21555 fi
21556
21557 if test "$DFT_LWR_MODEL" = shared ; then
21558         case $cf_cv_system_name in #(vi
21559         cygwin*|msys*)
21560                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21561                 TINFO_SUFFIX=.dll
21562                 ;;
21563         esac
21564 fi
21565
21566 if test "x$with_dlsym" = xyes ; then
21567
21568 # remove dl library from $TICS_LIST
21569 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21570
21571 fi
21572
21573 if test "$DFT_LWR_MODEL" = "libtool"; then
21574     OBJEXT=lo
21575 fi
21576
21577 # needed for Ada95
21578 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21579
21580 case $DFT_LWR_MODEL in
21581 normal|debug|profile)
21582
21583 if test "$GCC" = yes ; then
21584         case $cf_cv_system_name in #(
21585         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21586                 LDFLAGS_STATIC=
21587                 LDFLAGS_SHARED=
21588                 ;;
21589     *)  #( normally, except when broken
21590         LDFLAGS_STATIC=-static
21591         LDFLAGS_SHARED=-dynamic
21592         ;;
21593     esac
21594 else
21595         case $cf_cv_system_name in #(
21596         aix[4-7]*)      #( from ld manpage
21597                 LDFLAGS_STATIC=-bstatic
21598                 LDFLAGS_SHARED=-bdynamic
21599                 ;;
21600         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21601                 # We could also use just "archive" and "shared".
21602                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21603                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21604                 ;;
21605         irix*)          #( from ld manpage IRIX64
21606                 LDFLAGS_STATIC=-Bstatic
21607                 LDFLAGS_SHARED=-Bdynamic
21608                 ;;
21609         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21610                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21611                 LDFLAGS_STATIC=-noso
21612                 LDFLAGS_SHARED=-so_archive
21613                 ;;
21614         solaris2*)
21615                 LDFLAGS_STATIC=-Bstatic
21616                 LDFLAGS_SHARED=-Bdynamic
21617                 ;;
21618         esac
21619 fi
21620
21621 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21622 then
21623         echo "$as_me:21623: checking if linker supports switching between static/dynamic" >&5
21624 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21625
21626         rm -f libconftest.a
21627         cat >conftest.$ac_ext <<EOF
21628 #line 21628 "configure"
21629 #include <stdio.h>
21630 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21631 EOF
21632         if { (eval echo "$as_me:21632: \"$ac_compile\"") >&5
21633   (eval $ac_compile) 2>&5
21634   ac_status=$?
21635   echo "$as_me:21635: \$? = $ac_status" >&5
21636   (exit $ac_status); } ; then
21637                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21638                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21639         fi
21640         rm -f conftest.*
21641
21642         cf_save_LIBS="$LIBS"
21643
21644         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21645         cat >conftest.$ac_ext <<_ACEOF
21646 #line 21646 "configure"
21647 #include "confdefs.h"
21648
21649 #line 21649 "configure"
21650 #include <stdio.h>
21651 int cf_ldflags_static(FILE *fp);
21652
21653 int
21654 main ()
21655 {
21656
21657         return cf_ldflags_static(stdin);
21658
21659   ;
21660   return 0;
21661 }
21662 _ACEOF
21663 rm -f conftest.$ac_objext conftest$ac_exeext
21664 if { (eval echo "$as_me:21664: \"$ac_link\"") >&5
21665   (eval $ac_link) 2>&5
21666   ac_status=$?
21667   echo "$as_me:21667: \$? = $ac_status" >&5
21668   (exit $ac_status); } &&
21669          { ac_try='test -s conftest$ac_exeext'
21670   { (eval echo "$as_me:21670: \"$ac_try\"") >&5
21671   (eval $ac_try) 2>&5
21672   ac_status=$?
21673   echo "$as_me:21673: \$? = $ac_status" >&5
21674   (exit $ac_status); }; }; then
21675
21676         # some linkers simply ignore the -dynamic
21677         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21678         *static*) # (vi
21679                 cf_ldflags_static=no
21680                 ;;
21681         *)
21682                 cf_ldflags_static=yes
21683                 ;;
21684         esac
21685
21686 else
21687   echo "$as_me: failed program was:" >&5
21688 cat conftest.$ac_ext >&5
21689 cf_ldflags_static=no
21690 fi
21691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21692
21693         rm -f libconftest.*
21694         LIBS="$cf_save_LIBS"
21695
21696         echo "$as_me:21696: result: $cf_ldflags_static" >&5
21697 echo "${ECHO_T}$cf_ldflags_static" >&6
21698
21699         if test $cf_ldflags_static != yes
21700         then
21701                 LDFLAGS_STATIC=
21702                 LDFLAGS_SHARED=
21703         fi
21704 else
21705         LDFLAGS_STATIC=
21706         LDFLAGS_SHARED=
21707 fi
21708
21709         ;;
21710 esac
21711
21712 echo "$as_me:21712: checking where we will install curses.h" >&5
21713 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21714
21715 includesubdir=
21716 if test "$with_overwrite" = no && \
21717  ( test "x$includedir" = 'x${prefix}/include' || \
21718    test "x$includedir" = "x${prefix}/include" )
21719 then
21720         includesubdir="/ncurses${LIB_SUFFIX}"
21721 fi
21722 echo "$as_me:21722: result: ${includedir}${includesubdir}" >&5
21723 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21724
21725 ### Resolve a conflict between normal and wide-curses by forcing applications
21726 ### that will need libutf8 to add it to their configure script.
21727 if test "$with_overwrite" != no ; then
21728 if test "$NCURSES_LIBUTF8" = 1 ; then
21729         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21730         { echo "$as_me:21730: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21731 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21732 fi
21733 fi
21734 WITH_OVERWRITE=$with_overwrite
21735
21736 # used to separate tack out of the tree
21737 NCURSES_TREE=
21738
21739 ### predefined stuff for the test programs
21740
21741 cat >>confdefs.h <<\EOF
21742 #define HAVE_SLK_COLOR 1
21743 EOF
21744
21745 ### Construct the list of subdirectories for which we'll customize makefiles
21746 ### with the appropriate compile-rules.
21747
21748 echo "$as_me:21748: checking for src modules" >&5
21749 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21750
21751 # dependencies and linker-arguments for test-programs
21752 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21753 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21754 if test "$DFT_LWR_MODEL" = "libtool"; then
21755         TEST_ARGS="${TEST_DEPS}"
21756         TEST_ARG2="${TEST_DEP2}"
21757 else
21758         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21759         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21760 fi
21761
21762 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21763 cf_cv_src_modules=
21764 for cf_dir in $modules_to_build
21765 do
21766         if test -f $srcdir/$cf_dir/modules; then
21767
21768                 # We may/may not have tack in the distribution, though the
21769                 # makefile is.
21770                 if test $cf_dir = tack ; then
21771                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21772                                 continue
21773                         fi
21774                 fi
21775
21776                 if test -z "$cf_cv_src_modules"; then
21777                         cf_cv_src_modules=$cf_dir
21778                 else
21779                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21780                 fi
21781
21782                 # Make the ncurses_cfg.h file record the library interface files as
21783                 # well.  These are header files that are the same name as their
21784                 # directory.  Ncurses is the only library that does not follow
21785                 # that pattern.
21786                 if test $cf_dir = tack ; then
21787                         continue
21788                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21789
21790 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21791
21792                         cat >>confdefs.h <<EOF
21793 #define HAVE_${cf_have_include}_H 1
21794 EOF
21795
21796                         cat >>confdefs.h <<EOF
21797 #define HAVE_LIB${cf_have_include} 1
21798 EOF
21799
21800                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21801                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21802                         if test "$DFT_LWR_MODEL" = "libtool"; then
21803                                 TEST_ARGS="${TEST_DEPS}"
21804                                 TEST_ARG2="${TEST_DEP2}"
21805                         else
21806                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21807                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21808                         fi
21809                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21810                 fi
21811         fi
21812 done
21813 echo "$as_me:21813: result: $cf_cv_src_modules" >&5
21814 echo "${ECHO_T}$cf_cv_src_modules" >&6
21815
21816 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21817 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21818
21819 SRC_SUBDIRS=
21820 if test "x$cf_with_manpages" != xno ; then
21821         SRC_SUBDIRS="$SRC_SUBDIRS man"
21822 fi
21823 SRC_SUBDIRS="$SRC_SUBDIRS include"
21824 for cf_dir in $cf_cv_src_modules
21825 do
21826         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21827 done
21828 if test "x$cf_with_tests" != "xno" ; then
21829         SRC_SUBDIRS="$SRC_SUBDIRS test"
21830 fi
21831 # always make this, to install the ncurses-config script
21832 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21833 if test "$cf_with_cxx_binding" != no; then
21834         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21835         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21836 fi
21837
21838 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21839 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21840
21841 ADA_SUBDIRS=
21842 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21843         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21844         ADA_SUBDIRS="gen src"
21845         if test "x$cf_with_tests" != "xno" ; then
21846                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21847         fi
21848 fi
21849
21850 SUB_MAKEFILES=
21851 for cf_dir in $SRC_SUBDIRS
21852 do
21853         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21854 done
21855
21856 if test -n "$ADA_SUBDIRS"; then
21857         for cf_dir in $ADA_SUBDIRS
21858         do
21859                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21860         done
21861
21862 fi
21863
21864 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21865    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21866    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21867 fi
21868
21869 DIRS_TO_MAKE="lib"
21870 for cf_item in $cf_list_models
21871 do
21872
21873         case $cf_item in
21874         libtool) cf_subdir='obj_lo'  ;;
21875         normal)  cf_subdir='objects' ;;
21876         debug)   cf_subdir='obj_g' ;;
21877         profile) cf_subdir='obj_p' ;;
21878         shared)
21879                 case $cf_cv_system_name in #(vi
21880                 cygwin|msys) #(vi
21881                         cf_subdir='objects' ;;
21882                 *)
21883                         cf_subdir='obj_s' ;;
21884                 esac
21885         esac
21886
21887         for cf_item2 in $DIRS_TO_MAKE
21888         do
21889                 test $cf_item2 = $cf_subdir && break
21890         done
21891         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21892 done
21893 for cf_dir in $DIRS_TO_MAKE
21894 do
21895         test ! -d $cf_dir && mkdir $cf_dir
21896 done
21897
21898 # symbols that differ when compiling Ada95 by itself.
21899 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21900
21901 # values to use as strings
21902
21903 cat >>confdefs.h <<EOF
21904 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21905 EOF
21906
21907 cat >>confdefs.h <<EOF
21908 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21909 EOF
21910
21911 ### Now that we're done running tests, add the compiler-warnings, if any
21912
21913 cf_fix_cppflags=no
21914 cf_new_cflags=
21915 cf_new_cppflags=
21916 cf_new_extra_cppflags=
21917
21918 for cf_add_cflags in $EXTRA_CFLAGS
21919 do
21920 case $cf_fix_cppflags in
21921 no)
21922         case $cf_add_cflags in #(vi
21923         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21924                 case $cf_add_cflags in
21925                 -D*)
21926                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21927
21928                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21929                                 && test -z "${cf_tst_cflags}" \
21930                                 && cf_fix_cppflags=yes
21931
21932                         if test $cf_fix_cppflags = yes ; then
21933                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21934                                 continue
21935                         elif test "${cf_tst_cflags}" = "\"'" ; then
21936                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21937                                 continue
21938                         fi
21939                         ;;
21940                 esac
21941                 case "$CPPFLAGS" in
21942                 *$cf_add_cflags) #(vi
21943                         ;;
21944                 *) #(vi
21945                         case $cf_add_cflags in #(vi
21946                         -D*)
21947                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21948
21949 CPPFLAGS=`echo "$CPPFLAGS" | \
21950         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21951                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21952
21953                                 ;;
21954                         esac
21955                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21956                         ;;
21957                 esac
21958                 ;;
21959         *)
21960                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21961                 ;;
21962         esac
21963         ;;
21964 yes)
21965         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21966
21967         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21968
21969         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21970                 && test -z "${cf_tst_cflags}" \
21971                 && cf_fix_cppflags=no
21972         ;;
21973 esac
21974 done
21975
21976 if test -n "$cf_new_cflags" ; then
21977
21978         CFLAGS="$CFLAGS $cf_new_cflags"
21979 fi
21980
21981 if test -n "$cf_new_cppflags" ; then
21982
21983         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21984 fi
21985
21986 if test -n "$cf_new_extra_cppflags" ; then
21987
21988         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21989 fi
21990
21991 ### Define substitutions for header files to avoid name-pollution
21992
21993 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21994         HAVE_TCGETATTR=1
21995 else
21996         HAVE_TCGETATTR=0
21997 fi
21998
21999 if test "x$ac_cv_header_stdint_h" = xyes ; then
22000         HAVE_STDINT_H=1
22001 else
22002         HAVE_STDINT_H=0
22003 fi
22004
22005 if test "x$ac_cv_header_termio_h" = xyes ; then
22006         HAVE_TERMIO_H=1
22007 else
22008         HAVE_TERMIO_H=0
22009 fi
22010
22011 if test "x$ac_cv_header_termios_h" = xyes ; then
22012         HAVE_TERMIOS_H=1
22013 else
22014         HAVE_TERMIOS_H=0
22015 fi
22016
22017 ################################################################################
22018 test "x$use_database" = xyes && \
22019 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22020
22021 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22022 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
22023
22024 if test "x$enable_pc_files" = xyes ; then \
22025 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22026 MAKE_PC_FILES=
22027 else
22028 MAKE_PC_FILES="#"
22029 fi
22030
22031 # Extract the first word of "tic", so it can be a program name with args.
22032 set dummy tic; ac_word=$2
22033 echo "$as_me:22033: checking for $ac_word" >&5
22034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22035 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22036   echo $ECHO_N "(cached) $ECHO_C" >&6
22037 else
22038   case $TIC_PATH in
22039   [\\/]* | ?:[\\/]*)
22040   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22041   ;;
22042   *)
22043   ac_save_IFS=$IFS; IFS=$ac_path_separator
22044 ac_dummy="$PATH:/usr/local/ncurses/bin"
22045 for ac_dir in $ac_dummy; do
22046   IFS=$ac_save_IFS
22047   test -z "$ac_dir" && ac_dir=.
22048   if $as_executable_p "$ac_dir/$ac_word"; then
22049    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22050    echo "$as_me:22050: found $ac_dir/$ac_word" >&5
22051    break
22052 fi
22053 done
22054
22055   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22056   ;;
22057 esac
22058 fi
22059 TIC_PATH=$ac_cv_path_TIC_PATH
22060
22061 if test -n "$TIC_PATH"; then
22062   echo "$as_me:22062: result: $TIC_PATH" >&5
22063 echo "${ECHO_T}$TIC_PATH" >&6
22064 else
22065   echo "$as_me:22065: result: no" >&5
22066 echo "${ECHO_T}no" >&6
22067 fi
22068
22069 if test -n "$FALLBACK_LIST"
22070 then
22071         if test "$TIC_PATH" = unknown
22072         then
22073                 { echo "$as_me:22073: WARNING: no tic program found for fallbacks" >&5
22074 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22075         fi
22076 fi
22077
22078 if test "x$cf_with_tests" != xno ; then
22079         MAKE_TESTS=
22080 else
22081         MAKE_TESTS="#"
22082 fi
22083
22084 ADAHTML_DIR=../../doc/html/ada
22085
22086 # these could be configurable, but are not currently
22087 PANEL_NAME=panel
22088 MENU_NAME=menu
22089 FORM_NAME=form
22090 CXX_NAME=ncurses++
22091
22092 # workaround for g++ versus Solaris (20131116)
22093 case $cf_cv_system_name in #(vi
22094 solaris2*)
22095         case "x$CPPFLAGS" in #(vi
22096         *-D_XOPEN_SOURCE_EXTENDED*)
22097                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22098
22099 echo "${as_me:-configure}:22099: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22100
22101                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22102                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22103                 ;;
22104         esac
22105         ;;
22106 esac
22107
22108 # Help to automatically enable the extended curses features when using either
22109 # the *-config or the ".pc" files by adding defines.
22110 echo "$as_me:22110: checking for defines to add to ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config script" >&5
22111 echo $ECHO_N "checking for defines to add to ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config script... $ECHO_C" >&6
22112 PKG_CFLAGS=
22113 for cf_loop1 in $CPPFLAGS_after_XOPEN
22114 do
22115         cf_found=no
22116         for cf_loop2 in $CPPFLAGS_before_XOPEN
22117         do
22118                 if test "x$cf_loop1" = "x$cf_loop2"
22119                 then
22120                         cf_found=yes
22121                         break
22122                 fi
22123         done
22124         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22125 done
22126 echo "$as_me:22126: result: $PKG_CFLAGS" >&5
22127 echo "${ECHO_T}$PKG_CFLAGS" >&6
22128
22129 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22130 case "x$NCURSES_OSPEED" in #(vi
22131 *short*) #(vi
22132         cf_compatible=1
22133         ;;
22134 *)
22135         cf_compatible=0
22136         ;;
22137 esac
22138
22139 cat >>confdefs.h <<EOF
22140 #define NCURSES_OSPEED_COMPAT $cf_compatible
22141 EOF
22142
22143 case "x$cf_cv_typeof_chtype" in
22144 xshort|xint|xlong)
22145         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22146         ;;
22147 esac
22148
22149 case "x$cf_cv_typeof_mmask_t" in
22150 xshort|xint|xlong)
22151         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22152         ;;
22153 esac
22154
22155 # substitute into misc/Makefile to suppress
22156 # (un)install.data from the
22157 # (un)install rules.
22158 if test "x$cf_with_db_install" = "xno"; then
22159         MISC_INSTALL_DATA=
22160         MISC_UNINSTALL_DATA=
22161 else
22162         MISC_INSTALL_DATA=install.data
22163         MISC_UNINSTALL_DATA=uninstall.data
22164 fi
22165
22166 SUB_SCRIPTS=
22167
22168 if test -n "$PACKAGE"
22169 then
22170         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22171         export PACKAGE
22172         echo "package: $PACKAGE"
22173 fi
22174
22175 UNALTERED_SYMS=
22176 cf_filter_syms=no
22177
22178 if test -n "$RESULTING_SYMS"
22179 then
22180         case $cf_cv_abi_version in
22181         [6789])
22182                 test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22183
22184 echo "${as_me:-configure}:22184: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22185
22186                 cf_filter_syms=yes
22187                 ;;
22188         *)
22189                 test -n "$verbose" && echo "    will map symbols to default ABI" 1>&6
22190
22191 echo "${as_me:-configure}:22191: testing will map symbols to default ABI ..." 1>&5
22192
22193                 ;;
22194         esac
22195 fi
22196
22197 if test "x$WILDCARD_SYMS" = xno
22198 then
22199         cf_filter_syms=yes
22200 fi
22201
22202 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22203 if test $cf_filter_syms = yes
22204 then
22205         RESULTING_SYMS=resulting.map
22206 fi
22207
22208 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"
22209 ac_config_commands="$ac_config_commands default"
22210 cat >confcache <<\_ACEOF
22211 # This file is a shell script that caches the results of configure
22212 # tests run on this system so they can be shared between configure
22213 # scripts and configure runs, see configure's option --config-cache.
22214 # It is not useful on other systems.  If it contains results you don't
22215 # want to keep, you may remove or edit it.
22216 #
22217 # config.status only pays attention to the cache file if you give it
22218 # the --recheck option to rerun configure.
22219 #
22220 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22221 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22222 # following values.
22223
22224 _ACEOF
22225
22226 # The following way of writing the cache mishandles newlines in values,
22227 # but we know of no workaround that is simple, portable, and efficient.
22228 # So, don't put newlines in cache variables' values.
22229 # Ultrix sh set writes to stderr and can't be redirected directly,
22230 # and sets the high bit in the cache file unless we assign to the vars.
22231 {
22232   (set) 2>&1 |
22233     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22234     *ac_space=\ *)
22235       # `set' does not quote correctly, so add quotes (double-quote
22236       # substitution turns \\\\ into \\, and sed turns \\ into \).
22237       sed -n \
22238         "s/'/'\\\\''/g;
22239           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22240       ;;
22241     *)
22242       # `set' quotes correctly as required by POSIX, so do not add quotes.
22243       sed -n \
22244         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22245       ;;
22246     esac;
22247 } |
22248   sed '
22249      t clear
22250      : clear
22251      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22252      t end
22253      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22254      : end' >>confcache
22255 if cmp -s $cache_file confcache; then :; else
22256   if test -w $cache_file; then
22257     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22258     cat confcache >$cache_file
22259   else
22260     echo "not updating unwritable cache $cache_file"
22261   fi
22262 fi
22263 rm -f confcache
22264
22265 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22266 # Let make expand exec_prefix.
22267 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22268
22269 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22270 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22271 # trailing colons and then remove the whole line if VPATH becomes empty
22272 # (actually we leave an empty line to preserve line numbers).
22273 if test "x$srcdir" = x.; then
22274   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22275 s/:*\$(srcdir):*/:/;
22276 s/:*\${srcdir}:*/:/;
22277 s/:*@srcdir@:*/:/;
22278 s/^\([^=]*=[    ]*\):*/\1/;
22279 s/:*$//;
22280 s/^[^=]*=[      ]*$//;
22281 }'
22282 fi
22283
22284 DEFS=-DHAVE_CONFIG_H
22285
22286 : ${CONFIG_STATUS=./config.status}
22287 ac_clean_files_save=$ac_clean_files
22288 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22289 { echo "$as_me:22289: creating $CONFIG_STATUS" >&5
22290 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22291 cat >$CONFIG_STATUS <<_ACEOF
22292 #! $SHELL
22293 # Generated automatically by configure.
22294 # Run this file to recreate the current configuration.
22295 # Compiler output produced by configure, useful for debugging
22296 # configure, is in config.log if it exists.
22297
22298 debug=false
22299 SHELL=\${CONFIG_SHELL-$SHELL}
22300 ac_cs_invocation="\$0 \$@"
22301
22302 _ACEOF
22303
22304 cat >>$CONFIG_STATUS <<\_ACEOF
22305 # Be Bourne compatible
22306 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22307   emulate sh
22308   NULLCMD=:
22309 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22310   set -o posix
22311 fi
22312
22313 # Name of the executable.
22314 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22315
22316 if expr a : '\(a\)' >/dev/null 2>&1; then
22317   as_expr=expr
22318 else
22319   as_expr=false
22320 fi
22321
22322 rm -f conf$$ conf$$.exe conf$$.file
22323 echo >conf$$.file
22324 if ln -s conf$$.file conf$$ 2>/dev/null; then
22325   # We could just check for DJGPP; but this test a) works b) is more generic
22326   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22327   if test -f conf$$.exe; then
22328     # Don't use ln at all; we don't have any links
22329     as_ln_s='cp -p'
22330   else
22331     as_ln_s='ln -s'
22332   fi
22333 elif ln conf$$.file conf$$ 2>/dev/null; then
22334   as_ln_s=ln
22335 else
22336   as_ln_s='cp -p'
22337 fi
22338 rm -f conf$$ conf$$.exe conf$$.file
22339
22340 as_executable_p="test -f"
22341
22342 # Support unset when possible.
22343 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22344   as_unset=unset
22345 else
22346   as_unset=false
22347 fi
22348
22349 # NLS nuisances.
22350 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22351 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22352 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22353 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22354 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22355 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22356 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22357 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22358
22359 # IFS
22360 # We need space, tab and new line, in precisely that order.
22361 as_nl='
22362 '
22363 IFS="   $as_nl"
22364
22365 # CDPATH.
22366 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22367
22368 exec 6>&1
22369
22370 _ACEOF
22371
22372 # Files that config.status was made for.
22373 if test -n "$ac_config_files"; then
22374   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22375 fi
22376
22377 if test -n "$ac_config_headers"; then
22378   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22379 fi
22380
22381 if test -n "$ac_config_links"; then
22382   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22383 fi
22384
22385 if test -n "$ac_config_commands"; then
22386   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22387 fi
22388
22389 cat >>$CONFIG_STATUS <<\EOF
22390
22391 ac_cs_usage="\
22392 \`$as_me' instantiates files from templates according to the
22393 current configuration.
22394
22395 Usage: $0 [OPTIONS] [FILE]...
22396
22397   -h, --help       print this help, then exit
22398   -V, --version    print version number, then exit
22399   -d, --debug      don't remove temporary files
22400       --recheck    update $as_me by reconfiguring in the same conditions
22401   --file=FILE[:TEMPLATE]
22402                    instantiate the configuration file FILE
22403   --header=FILE[:TEMPLATE]
22404                    instantiate the configuration header FILE
22405
22406 Configuration files:
22407 $config_files
22408
22409 Configuration headers:
22410 $config_headers
22411
22412 Configuration commands:
22413 $config_commands
22414
22415 Report bugs to <dickey@invisible-island.net>."
22416 EOF
22417
22418 cat >>$CONFIG_STATUS <<EOF
22419 ac_cs_version="\\
22420 config.status
22421 configured by $0, generated by GNU Autoconf 2.52.20141204,
22422   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22423
22424 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22425 Free Software Foundation, Inc.
22426 This config.status script is free software; the Free Software Foundation
22427 gives unlimited permission to copy, distribute and modify it."
22428 srcdir=$srcdir
22429 INSTALL="$INSTALL"
22430 EOF
22431
22432 cat >>$CONFIG_STATUS <<\EOF
22433 # If no file are specified by the user, then we need to provide default
22434 # value.  By we need to know if files were specified by the user.
22435 ac_need_defaults=:
22436 while test $# != 0
22437 do
22438   case $1 in
22439   --*=*)
22440     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22441     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22442     shift
22443     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22444     shift
22445     ;;
22446   -*);;
22447   *) # This is not an option, so the user has probably given explicit
22448      # arguments.
22449      ac_need_defaults=false;;
22450   esac
22451
22452   case $1 in
22453   # Handling of the options.
22454 EOF
22455 cat >>$CONFIG_STATUS <<EOF
22456   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22457     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22458     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22459 EOF
22460 cat >>$CONFIG_STATUS <<\EOF
22461   --version | --vers* | -V )
22462     echo "$ac_cs_version"; exit 0 ;;
22463   --he | --h)
22464     # Conflict between --help and --header
22465     { { echo "$as_me:22465: error: ambiguous option: $1
22466 Try \`$0 --help' for more information." >&5
22467 echo "$as_me: error: ambiguous option: $1
22468 Try \`$0 --help' for more information." >&2;}
22469    { (exit 1); exit 1; }; };;
22470   --help | --hel | -h )
22471     echo "$ac_cs_usage"; exit 0 ;;
22472   --debug | --d* | -d )
22473     debug=: ;;
22474   --file | --fil | --fi | --f )
22475     shift
22476     CONFIG_FILES="$CONFIG_FILES $1"
22477     ac_need_defaults=false;;
22478   --header | --heade | --head | --hea )
22479     shift
22480     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22481     ac_need_defaults=false;;
22482
22483   # This is an error.
22484   -*) { { echo "$as_me:22484: error: unrecognized option: $1
22485 Try \`$0 --help' for more information." >&5
22486 echo "$as_me: error: unrecognized option: $1
22487 Try \`$0 --help' for more information." >&2;}
22488    { (exit 1); exit 1; }; } ;;
22489
22490   *) ac_config_targets="$ac_config_targets $1" ;;
22491
22492   esac
22493   shift
22494 done
22495
22496 exec 5>>config.log
22497 cat >&5 << _ACEOF
22498
22499 ## ----------------------- ##
22500 ## Running config.status.  ##
22501 ## ----------------------- ##
22502
22503 This file was extended by $as_me 2.52.20141204, executed with
22504   CONFIG_FILES    = $CONFIG_FILES
22505   CONFIG_HEADERS  = $CONFIG_HEADERS
22506   CONFIG_LINKS    = $CONFIG_LINKS
22507   CONFIG_COMMANDS = $CONFIG_COMMANDS
22508   > $ac_cs_invocation
22509 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22510
22511 _ACEOF
22512 EOF
22513
22514 cat >>$CONFIG_STATUS <<EOF
22515 #
22516 # INIT-COMMANDS section.
22517 #
22518
22519 ### Special initialization commands, used to pass information from the
22520 ### configuration-run into config.status
22521
22522 AWK="$AWK"
22523 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22524 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22525 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22526 ECHO_LD="$ECHO_LD"
22527 LDCONFIG="$LDCONFIG"
22528 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22529 LIB_NAME="$LIB_NAME"
22530 LIB_PREFIX="$LIB_PREFIX"
22531 LIB_SUBSETS="$LIB_SUBSETS"
22532 LIB_SUFFIX="$LIB_SUFFIX"
22533 LIB_TRACING="$LIB_TRACING"
22534 LN_S="$LN_S"
22535 MAKE_TERMINFO="$MAKE_TERMINFO"
22536 NCURSES_MAJOR="$NCURSES_MAJOR"
22537 NCURSES_MINOR="$NCURSES_MINOR"
22538 NCURSES_OSPEED="$NCURSES_OSPEED"
22539 NCURSES_PATCH="$NCURSES_PATCH"
22540 SRC_SUBDIRS="$SRC_SUBDIRS"
22541 TERMINFO="$TERMINFO"
22542 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22543 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22544 TICS_NAME="$TICS_NAME"
22545 TIC_PATH="$TIC_PATH"
22546 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22547 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22548 TINFO_NAME="$TINFO_NAME"
22549 TINFO_SUFFIX="$TINFO_SUFFIX"
22550 UNALTERED_SYMS="$UNALTERED_SYMS"
22551 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22552 WILDCARD_SYMS="$WILDCARD_SYMS"
22553 WITH_CURSES_H="$with_curses_h"
22554 WITH_ECHO="${enable_echo:=yes}"
22555 WITH_OVERWRITE="$with_overwrite"
22556 cf_LIST_MODELS="$cf_list_models"
22557 cf_cv_abi_version="$cf_cv_abi_version"
22558 cf_cv_do_relink="$cf_cv_do_relink"
22559 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22560 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22561 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22562 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22563 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22564 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22565 cf_cv_rel_version="$cf_cv_rel_version"
22566 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22567 cf_cv_shared_soname='$cf_cv_shared_soname'
22568 cf_cv_shlib_version="$cf_cv_shlib_version"
22569 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22570 cf_cv_system_name="$cf_cv_system_name"
22571 cf_cv_term_driver="$with_term_driver"
22572 cf_with_ada="$cf_with_ada"
22573 cf_with_cxx_binding="$cf_with_cxx_binding"
22574 cf_with_db_install="$cf_with_db_install"
22575 cf_with_manpages="$cf_with_manpages"
22576 cf_with_tests="$cf_with_tests"
22577 host="$host"
22578 target="$target"
22579 with_shared_cxx="$with_shared_cxx"
22580
22581 EOF
22582
22583 cat >>$CONFIG_STATUS <<\EOF
22584 for ac_config_target in $ac_config_targets
22585 do
22586   case "$ac_config_target" in
22587   # Handling of arguments.
22588   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22589   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22590   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22591   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22592   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22593   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22594   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22595   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22596   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22597   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22598   *) { { echo "$as_me:22598: error: invalid argument: $ac_config_target" >&5
22599 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22600    { (exit 1); exit 1; }; };;
22601   esac
22602 done
22603
22604 # If the user did not use the arguments to specify the items to instantiate,
22605 # then the envvar interface is used.  Set only those that are not.
22606 # We use the long form for the default assignment because of an extremely
22607 # bizarre bug on SunOS 4.1.3.
22608 if $ac_need_defaults; then
22609   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22610   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22611   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22612 fi
22613
22614 # Create a temporary directory, and hook for its removal unless debugging.
22615 $debug ||
22616 {
22617   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22618   trap '{ (exit 1); exit 1; }' 1 2 13 15
22619 }
22620
22621 # Create a (secure) tmp directory for tmp files.
22622 : ${TMPDIR=/tmp}
22623 {
22624   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22625   test -n "$tmp" && test -d "$tmp"
22626 }  ||
22627 {
22628   tmp=$TMPDIR/cs$$-$RANDOM
22629   (umask 077 && mkdir $tmp)
22630 } ||
22631 {
22632    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22633    { (exit 1); exit 1; }
22634 }
22635
22636 EOF
22637
22638 cat >>$CONFIG_STATUS <<EOF
22639
22640 #
22641 # CONFIG_FILES section.
22642 #
22643
22644 # No need to generate the scripts if there are no CONFIG_FILES.
22645 # This happens for instance when ./config.status config.h
22646 if test -n "\$CONFIG_FILES"; then
22647   # Protect against being on the right side of a sed subst in config.status.
22648   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22649    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22650 s,@SHELL@,$SHELL,;t t
22651 s,@exec_prefix@,$exec_prefix,;t t
22652 s,@prefix@,$prefix,;t t
22653 s,@program_transform_name@,$program_transform_name,;t t
22654 s,@bindir@,$bindir,;t t
22655 s,@sbindir@,$sbindir,;t t
22656 s,@libexecdir@,$libexecdir,;t t
22657 s,@datarootdir@,$datarootdir,;t t
22658 s,@datadir@,$datadir,;t t
22659 s,@sysconfdir@,$sysconfdir,;t t
22660 s,@sharedstatedir@,$sharedstatedir,;t t
22661 s,@localstatedir@,$localstatedir,;t t
22662 s,@libdir@,$libdir,;t t
22663 s,@includedir@,$includedir,;t t
22664 s,@oldincludedir@,$oldincludedir,;t t
22665 s,@infodir@,$infodir,;t t
22666 s,@mandir@,$mandir,;t t
22667 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22668 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22669 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22670 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22671 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22672 s,@build_alias@,$build_alias,;t t
22673 s,@host_alias@,$host_alias,;t t
22674 s,@target_alias@,$target_alias,;t t
22675 s,@ECHO_C@,$ECHO_C,;t t
22676 s,@ECHO_N@,$ECHO_N,;t t
22677 s,@ECHO_T@,$ECHO_T,;t t
22678 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22679 s,@DEFS@,$DEFS,;t t
22680 s,@LIBS@,$LIBS,;t t
22681 s,@top_builddir@,$top_builddir,;t t
22682 s,@EGREP@,$EGREP,;t t
22683 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22684 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22685 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22686 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22687 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22688 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22689 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22690 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22691 s,@VERSION@,$VERSION,;t t
22692 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22693 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22694 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22695 s,@PACKAGE@,$PACKAGE,;t t
22696 s,@build@,$build,;t t
22697 s,@build_cpu@,$build_cpu,;t t
22698 s,@build_vendor@,$build_vendor,;t t
22699 s,@build_os@,$build_os,;t t
22700 s,@host@,$host,;t t
22701 s,@host_cpu@,$host_cpu,;t t
22702 s,@host_vendor@,$host_vendor,;t t
22703 s,@host_os@,$host_os,;t t
22704 s,@target@,$target,;t t
22705 s,@target_cpu@,$target_cpu,;t t
22706 s,@target_vendor@,$target_vendor,;t t
22707 s,@target_os@,$target_os,;t t
22708 s,@CC@,$CC,;t t
22709 s,@CFLAGS@,$CFLAGS,;t t
22710 s,@LDFLAGS@,$LDFLAGS,;t t
22711 s,@CPPFLAGS@,$CPPFLAGS,;t t
22712 s,@ac_ct_CC@,$ac_ct_CC,;t t
22713 s,@EXEEXT@,$EXEEXT,;t t
22714 s,@OBJEXT@,$OBJEXT,;t t
22715 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22716 s,@CPP@,$CPP,;t t
22717 s,@LDCONFIG@,$LDCONFIG,;t t
22718 s,@CXX@,$CXX,;t t
22719 s,@CXXFLAGS@,$CXXFLAGS,;t t
22720 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22721 s,@AWK@,$AWK,;t t
22722 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22723 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22724 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22725 s,@LINT@,$LINT,;t t
22726 s,@LINT_OPTS@,$LINT_OPTS,;t t
22727 s,@LN_S@,$LN_S,;t t
22728 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22729 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22730 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22731 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22732 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22733 s,@SET_MAKE@,$SET_MAKE,;t t
22734 s,@CTAGS@,$CTAGS,;t t
22735 s,@ETAGS@,$ETAGS,;t t
22736 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22737 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22738 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22739 s,@RANLIB@,$RANLIB,;t t
22740 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22741 s,@LD@,$LD,;t t
22742 s,@ac_ct_LD@,$ac_ct_LD,;t t
22743 s,@AR@,$AR,;t t
22744 s,@ac_ct_AR@,$ac_ct_AR,;t t
22745 s,@NM@,$NM,;t t
22746 s,@ac_ct_NM@,$ac_ct_NM,;t t
22747 s,@ARFLAGS@,$ARFLAGS,;t t
22748 s,@DESTDIR@,$DESTDIR,;t t
22749 s,@BUILD_CC@,$BUILD_CC,;t t
22750 s,@BUILD_CPP@,$BUILD_CPP,;t t
22751 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22752 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22753 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22754 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22755 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22756 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22757 s,@cf_list_models@,$cf_list_models,;t t
22758 s,@ABI_VERSION@,$ABI_VERSION,;t t
22759 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22760 s,@LIBTOOL@,$LIBTOOL,;t t
22761 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22762 s,@LT_UNDEF@,$LT_UNDEF,;t t
22763 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22764 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22765 s,@LIB_CREATE@,$LIB_CREATE,;t t
22766 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22767 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22768 s,@LIB_PREP@,$LIB_PREP,;t t
22769 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22770 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22771 s,@LIB_LINK@,$LIB_LINK,;t t
22772 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22773 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22774 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22775 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22776 s,@TICS_NAME@,$TICS_NAME,;t t
22777 s,@TINFO_NAME@,$TINFO_NAME,;t t
22778 s,@LIB_NAME@,$LIB_NAME,;t t
22779 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22780 s,@CC_G_OPT@,$CC_G_OPT,;t t
22781 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22782 s,@LD_MODEL@,$LD_MODEL,;t t
22783 s,@shlibdir@,$shlibdir,;t t
22784 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22785 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22786 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22787 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22788 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22789 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22790 s,@LINK_PROGS@,$LINK_PROGS,;t t
22791 s,@LINK_TESTS@,$LINK_TESTS,;t t
22792 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22793 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22794 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22795 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22796 s,@RPATH_LIST@,$RPATH_LIST,;t t
22797 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22798 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22799 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22800 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22801 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22802 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22803 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22804 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22805 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22806 s,@XTERM_KBS@,$XTERM_KBS,;t t
22807 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22808 s,@TERMINFO@,$TERMINFO,;t t
22809 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22810 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22811 s,@TERMPATH@,$TERMPATH,;t t
22812 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22813 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22814 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22815 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22816 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22817 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22818 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22819 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22820 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22821 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22822 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22823 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22824 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22825 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22826 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22827 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22828 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22829 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22830 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22831 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22832 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22833 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22834 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22835 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22836 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22837 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22838 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22839 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22840 s,@PTHREAD@,$PTHREAD,;t t
22841 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22842 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22843 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22844 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22845 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22846 s,@ECHO_LT@,$ECHO_LT,;t t
22847 s,@ECHO_LD@,$ECHO_LD,;t t
22848 s,@RULE_CC@,$RULE_CC,;t t
22849 s,@SHOW_CC@,$SHOW_CC,;t t
22850 s,@ECHO_CC@,$ECHO_CC,;t t
22851 s,@ECHO_LINK@,$ECHO_LINK,;t t
22852 s,@ADAFLAGS@,$ADAFLAGS,;t t
22853 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22854 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22855 s,@ADA_TRACE@,$ADA_TRACE,;t t
22856 s,@MATH_LIB@,$MATH_LIB,;t t
22857 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22858 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22859 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22860 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22861 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22862 s,@TEST_LIBS@,$TEST_LIBS,;t t
22863 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22864 s,@CXXCPP@,$CXXCPP,;t t
22865 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22866 s,@CXX_AR@,$CXX_AR,;t t
22867 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22868 s,@CXXLIBS@,$CXXLIBS,;t t
22869 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22870 s,@gnat_exists@,$gnat_exists,;t t
22871 s,@M4_exists@,$M4_exists,;t t
22872 s,@cf_ada_make@,$cf_ada_make,;t t
22873 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22874 s,@cf_compile_generics@,$cf_compile_generics,;t t
22875 s,@cf_generic_objects@,$cf_generic_objects,;t t
22876 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22877 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22878 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22879 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22880 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22881 s,@cf_ada_package@,$cf_ada_package,;t t
22882 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22883 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22884 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22885 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22886 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22887 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22888 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22889 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22890 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22891 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22892 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22893 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22894 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22895 s,@TICS_LIBS@,$TICS_LIBS,;t t
22896 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22897 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22898 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22899 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22900 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22901 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22902 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22903 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22904 s,@includesubdir@,$includesubdir,;t t
22905 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22906 s,@TICS_LIST@,$TICS_LIST,;t t
22907 s,@TINFO_LIST@,$TINFO_LIST,;t t
22908 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22909 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22910 s,@TEST_ARGS@,$TEST_ARGS,;t t
22911 s,@TEST_DEPS@,$TEST_DEPS,;t t
22912 s,@TEST_ARG2@,$TEST_ARG2,;t t
22913 s,@TEST_DEP2@,$TEST_DEP2,;t t
22914 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22915 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22916 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22917 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22918 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22919 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22920 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22921 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22922 s,@cross_compiling@,$cross_compiling,;t t
22923 s,@TIC_PATH@,$TIC_PATH,;t t
22924 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22925 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22926 s,@PANEL_NAME@,$PANEL_NAME,;t t
22927 s,@MENU_NAME@,$MENU_NAME,;t t
22928 s,@FORM_NAME@,$FORM_NAME,;t t
22929 s,@CXX_NAME@,$CXX_NAME,;t t
22930 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
22931 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22932 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22933 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
22934 CEOF
22935
22936 EOF
22937
22938   cat >>$CONFIG_STATUS <<\EOF
22939   # Split the substitutions into bite-sized pieces for seds with
22940   # small command number limits, like on Digital OSF/1 and HP-UX.
22941   ac_max_sed_lines=48
22942   ac_sed_frag=1 # Number of current file.
22943   ac_beg=1 # First line for current file.
22944   ac_end=$ac_max_sed_lines # Line after last line for current file.
22945   ac_more_lines=:
22946   ac_sed_cmds=
22947   while $ac_more_lines; do
22948     if test $ac_beg -gt 1; then
22949       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22950     else
22951       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22952     fi
22953     if test ! -s $tmp/subs.frag; then
22954       ac_more_lines=false
22955     else
22956       # The purpose of the label and of the branching condition is to
22957       # speed up the sed processing (if there are no `@' at all, there
22958       # is no need to browse any of the substitutions).
22959       # These are the two extra sed commands mentioned above.
22960       (echo ':t
22961   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22962       if test -z "$ac_sed_cmds"; then
22963         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22964       else
22965         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22966       fi
22967       ac_sed_frag=`expr $ac_sed_frag + 1`
22968       ac_beg=$ac_end
22969       ac_end=`expr $ac_end + $ac_max_sed_lines`
22970     fi
22971   done
22972   if test -z "$ac_sed_cmds"; then
22973     ac_sed_cmds=cat
22974   fi
22975 fi # test -n "$CONFIG_FILES"
22976
22977 EOF
22978 cat >>$CONFIG_STATUS <<\EOF
22979 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22980   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22981   case $ac_file in
22982   - | *:- | *:-:* ) # input from stdin
22983         cat >$tmp/stdin
22984         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22985         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22986   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22987         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22988   * )   ac_file_in=$ac_file.in ;;
22989   esac
22990
22991   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22992   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22993          X"$ac_file" : 'X\(//\)[^/]' \| \
22994          X"$ac_file" : 'X\(//\)$' \| \
22995          X"$ac_file" : 'X\(/\)' \| \
22996          .     : '\(.\)' 2>/dev/null ||
22997 echo X"$ac_file" |
22998     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22999           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23000           /^X\(\/\/\)$/{ s//\1/; q; }
23001           /^X\(\/\).*/{ s//\1/; q; }
23002           s/.*/./; q'`
23003   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23004     { case "$ac_dir" in
23005   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23006   *)                      as_incr_dir=.;;
23007 esac
23008 as_dummy="$ac_dir"
23009 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23010   case $as_mkdir_dir in
23011     # Skip DOS drivespec
23012     ?:) as_incr_dir=$as_mkdir_dir ;;
23013     *)
23014       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23015       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23016     ;;
23017   esac
23018 done; }
23019
23020     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23021     # A "../" for each directory in $ac_dir_suffix.
23022     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23023   else
23024     ac_dir_suffix= ac_dots=
23025   fi
23026
23027   case $srcdir in
23028   .)  ac_srcdir=.
23029       if test -z "$ac_dots"; then
23030          ac_top_srcdir=.
23031       else
23032          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23033       fi ;;
23034   [\\/]* | ?:[\\/]* )
23035       ac_srcdir=$srcdir$ac_dir_suffix;
23036       ac_top_srcdir=$srcdir ;;
23037   *) # Relative path.
23038     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23039     ac_top_srcdir=$ac_dots$srcdir ;;
23040   esac
23041
23042   case $INSTALL in
23043   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23044   *) ac_INSTALL=$ac_dots$INSTALL ;;
23045   esac
23046
23047   if test x"$ac_file" != x-; then
23048     { echo "$as_me:23048: creating $ac_file" >&5
23049 echo "$as_me: creating $ac_file" >&6;}
23050     rm -f "$ac_file"
23051   fi
23052   # Let's still pretend it is `configure' which instantiates (i.e., don't
23053   # use $as_me), people would be surprised to read:
23054   #    /* config.h.  Generated automatically by config.status.  */
23055   configure_input="Generated automatically from `echo $ac_file_in |
23056                                                  sed 's,.*/,,'` by configure."
23057
23058   # First look for the input files in the build tree, otherwise in the
23059   # src tree.
23060   ac_file_inputs=`IFS=:
23061     for f in $ac_file_in; do
23062       case $f in
23063       -) echo $tmp/stdin ;;
23064       [\\/$]*)
23065          # Absolute (can't be DOS-style, as IFS=:)
23066          test -f "$f" || { { echo "$as_me:23066: error: cannot find input file: $f" >&5
23067 echo "$as_me: error: cannot find input file: $f" >&2;}
23068    { (exit 1); exit 1; }; }
23069          echo $f;;
23070       *) # Relative
23071          if test -f "$f"; then
23072            # Build tree
23073            echo $f
23074          elif test -f "$srcdir/$f"; then
23075            # Source tree
23076            echo $srcdir/$f
23077          else
23078            # /dev/null tree
23079            { { echo "$as_me:23079: error: cannot find input file: $f" >&5
23080 echo "$as_me: error: cannot find input file: $f" >&2;}
23081    { (exit 1); exit 1; }; }
23082          fi;;
23083       esac
23084     done` || { (exit 1); exit 1; }
23085 EOF
23086 cat >>$CONFIG_STATUS <<\EOF
23087   ac_warn_datarootdir=no
23088   if test x"$ac_file" != x-; then
23089     for ac_item in $ac_file_inputs
23090     do
23091       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23092       if test -n "$ac_seen"; then
23093         ac_used=`grep '@datarootdir@' $ac_item`
23094         if test -z "$ac_used"; then
23095           { echo "$as_me:23095: WARNING: datarootdir was used implicitly but not set:
23096 $ac_seen" >&5
23097 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23098 $ac_seen" >&2;}
23099           ac_warn_datarootdir=yes
23100         fi
23101       fi
23102       ac_seen=`grep '${datarootdir}' $ac_item`
23103       if test -n "$ac_seen"; then
23104         { echo "$as_me:23104: WARNING: datarootdir was used explicitly but not set:
23105 $ac_seen" >&5
23106 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23107 $ac_seen" >&2;}
23108         ac_warn_datarootdir=yes
23109       fi
23110     done
23111   fi
23112
23113 if test "x$ac_warn_datarootdir" = xyes; then
23114   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23115 fi
23116
23117 EOF
23118 cat >>$CONFIG_STATUS <<EOF
23119   sed "$ac_vpsub
23120 $extrasub
23121 EOF
23122 cat >>$CONFIG_STATUS <<\EOF
23123 :t
23124 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23125 s,@configure_input@,$configure_input,;t t
23126 s,@srcdir@,$ac_srcdir,;t t
23127 s,@top_srcdir@,$ac_top_srcdir,;t t
23128 s,@INSTALL@,$ac_INSTALL,;t t
23129 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23130   rm -f $tmp/stdin
23131   if test x"$ac_file" != x-; then
23132     cp $tmp/out $ac_file
23133
23134     for ac_name in prefix exec_prefix datarootdir
23135     do
23136         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23137         if test -n "$ac_seen"; then
23138             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23139             if test -z "$ac_init"; then
23140               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23141               { echo "$as_me:23141: WARNING: Variable $ac_name is used but was not set:
23142 $ac_seen" >&5
23143 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23144 $ac_seen" >&2;}
23145             fi
23146         fi
23147     done
23148     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23149     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23150     if test -s $tmp/out; then
23151       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23152       { echo "$as_me:23152: WARNING: Some variables may not be substituted:
23153 $ac_seen" >&5
23154 echo "$as_me: WARNING: Some variables may not be substituted:
23155 $ac_seen" >&2;}
23156     fi
23157   else
23158     cat $tmp/out
23159   fi
23160   rm -f $tmp/out
23161
23162 done
23163 EOF
23164 cat >>$CONFIG_STATUS <<\EOF
23165
23166 #
23167 # CONFIG_HEADER section.
23168 #
23169
23170 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23171 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23172 #
23173 # ac_d sets the value in "#define NAME VALUE" lines.
23174 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23175 ac_dB='[        ].*$,\1#\2'
23176 ac_dC=' '
23177 ac_dD=',;t'
23178 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23179 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23180 ac_iB='\([      ]\),\1#\2define\3'
23181 ac_iC=' '
23182 ac_iD='\4,;t'
23183 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23184 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23185 ac_uB='$,\1#\2define\3'
23186 ac_uC=' '
23187 ac_uD=',;t'
23188
23189 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23190   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23191   case $ac_file in
23192   - | *:- | *:-:* ) # input from stdin
23193         cat >$tmp/stdin
23194         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23195         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23196   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23197         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23198   * )   ac_file_in=$ac_file.in ;;
23199   esac
23200
23201   test x"$ac_file" != x- && { echo "$as_me:23201: creating $ac_file" >&5
23202 echo "$as_me: creating $ac_file" >&6;}
23203
23204   # First look for the input files in the build tree, otherwise in the
23205   # src tree.
23206   ac_file_inputs=`IFS=:
23207     for f in $ac_file_in; do
23208       case $f in
23209       -) echo $tmp/stdin ;;
23210       [\\/$]*)
23211          # Absolute (can't be DOS-style, as IFS=:)
23212          test -f "$f" || { { echo "$as_me:23212: error: cannot find input file: $f" >&5
23213 echo "$as_me: error: cannot find input file: $f" >&2;}
23214    { (exit 1); exit 1; }; }
23215          echo $f;;
23216       *) # Relative
23217          if test -f "$f"; then
23218            # Build tree
23219            echo $f
23220          elif test -f "$srcdir/$f"; then
23221            # Source tree
23222            echo $srcdir/$f
23223          else
23224            # /dev/null tree
23225            { { echo "$as_me:23225: error: cannot find input file: $f" >&5
23226 echo "$as_me: error: cannot find input file: $f" >&2;}
23227    { (exit 1); exit 1; }; }
23228          fi;;
23229       esac
23230     done` || { (exit 1); exit 1; }
23231   # Remove the trailing spaces.
23232   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23233
23234 EOF
23235
23236 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23237 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23238 # be either 'cat' or 'sort'.
23239 cat confdefs.h | uniq >conftest.vals
23240
23241 # Break up conftest.vals because some shells have a limit on
23242 # the size of here documents, and old seds have small limits too.
23243
23244 rm -f conftest.tail
23245 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23246 while grep . conftest.vals >/dev/null
23247 do
23248   # Write chunks of a limited-size here document to conftest.frag.
23249   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23250   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23251   echo 'CEOF' >> $CONFIG_STATUS
23252   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23253   rm -f conftest.vals
23254   mv conftest.tail conftest.vals
23255 done
23256 rm -f conftest.vals
23257
23258 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23259 # marker @DEFS@.
23260 echo '  cat >> conftest.edit <<CEOF
23261 /@DEFS@/r conftest.frag
23262 /@DEFS@/d
23263 CEOF
23264 sed -f conftest.edit $tmp/in > $tmp/out
23265 rm -f $tmp/in
23266 mv $tmp/out $tmp/in
23267 rm -f conftest.edit conftest.frag
23268 ' >> $CONFIG_STATUS
23269
23270 cat >>$CONFIG_STATUS <<\EOF
23271   # Let's still pretend it is `configure' which instantiates (i.e., don't
23272   # use $as_me), people would be surprised to read:
23273   #    /* config.h.  Generated automatically by config.status.  */
23274   if test x"$ac_file" = x-; then
23275     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23276   else
23277     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23278   fi
23279   cat $tmp/in >>$tmp/config.h
23280   rm -f $tmp/in
23281   if test x"$ac_file" != x-; then
23282     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23283       { echo "$as_me:23283: $ac_file is unchanged" >&5
23284 echo "$as_me: $ac_file is unchanged" >&6;}
23285     else
23286       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23287          X"$ac_file" : 'X\(//\)[^/]' \| \
23288          X"$ac_file" : 'X\(//\)$' \| \
23289          X"$ac_file" : 'X\(/\)' \| \
23290          .     : '\(.\)' 2>/dev/null ||
23291 echo X"$ac_file" |
23292     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23293           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23294           /^X\(\/\/\)$/{ s//\1/; q; }
23295           /^X\(\/\).*/{ s//\1/; q; }
23296           s/.*/./; q'`
23297       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23298         { case "$ac_dir" in
23299   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23300   *)                      as_incr_dir=.;;
23301 esac
23302 as_dummy="$ac_dir"
23303 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23304   case $as_mkdir_dir in
23305     # Skip DOS drivespec
23306     ?:) as_incr_dir=$as_mkdir_dir ;;
23307     *)
23308       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23309       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23310     ;;
23311   esac
23312 done; }
23313
23314       fi
23315       rm -f $ac_file
23316       mv $tmp/config.h $ac_file
23317     fi
23318   else
23319     cat $tmp/config.h
23320     rm -f $tmp/config.h
23321   fi
23322 done
23323 EOF
23324 cat >>$CONFIG_STATUS <<\EOF
23325 #
23326 # CONFIG_COMMANDS section.
23327 #
23328 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23329   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23330   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23331
23332   case $ac_dest in
23333     default )
23334 if test "x$cf_with_tests" != xno ; then
23335
23336 for cf_dir in test
23337 do
23338         if test ! -d $srcdir/$cf_dir; then
23339                 continue
23340         elif test -f $srcdir/$cf_dir/programs; then
23341                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23342         fi
23343 done
23344
23345 fi
23346
23347 cf_prefix=$LIB_PREFIX
23348
23349 case $cf_cv_shlib_version in #(vi
23350 cygdll|msysdll|mingw)
23351         TINFO_NAME=$TINFO_ARG_SUFFIX
23352         TINFO_SUFFIX=.dll
23353         ;;
23354 esac
23355
23356 if test -n "$TINFO_SUFFIX" ; then
23357         case $TINFO_SUFFIX in
23358         tw*)
23359                 TINFO_NAME="${TINFO_NAME}tw"
23360                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
23361                 ;;
23362         t*)
23363                 TINFO_NAME="${TINFO_NAME}t"
23364                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
23365                 ;;
23366         w*)
23367                 TINFO_NAME="${TINFO_NAME}w"
23368                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
23369                 ;;
23370         esac
23371 fi
23372
23373 for cf_dir in $SRC_SUBDIRS
23374 do
23375         if test ! -d $srcdir/$cf_dir ; then
23376                 continue
23377         elif test -f $srcdir/$cf_dir/modules; then
23378
23379                 SHARED_LIB=
23380                 Libs_To_Make=
23381
23382                 cf_sed_options=
23383                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23384                 then
23385                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23386                 fi
23387
23388                 if test "x$WILDCARD_SYMS" = xno
23389                 then
23390                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23391                 fi
23392
23393                 if test "x$cf_sed_options" != "x"
23394                 then
23395                         cat >>$cf_dir/Makefile <<CF_EOF
23396
23397 # Generated by CF_LIB_RULES
23398 resulting.map: $UNALTERED_SYMS
23399         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23400
23401 clean::
23402         rm -f resulting.map
23403 CF_EOF
23404                 fi
23405
23406                 for cf_item in $cf_LIST_MODELS
23407                 do
23408
23409         case X$cf_item in #(vi
23410         Xlibtool) #(vi
23411                 cf_suffix='.la'
23412                 cf_depsuf=$cf_suffix
23413                 ;;
23414         Xdebug) #(vi
23415                 cf_suffix='_g.a'
23416                 cf_depsuf=$cf_suffix
23417                 ;;
23418         Xprofile) #(vi
23419                 cf_suffix='_p.a'
23420                 cf_depsuf=$cf_suffix
23421                 ;;
23422         Xshared) #(vi
23423                 case $cf_cv_system_name in
23424                 aix[5-7]*) #(vi
23425                         cf_suffix='.so'
23426                         cf_depsuf=$cf_suffix
23427                         ;;
23428                 cygwin*|msys*|mingw*) #(vi
23429                         cf_suffix='.dll'
23430                         cf_depsuf='.dll.a'
23431                         ;;
23432                 darwin*) #(vi
23433                         cf_suffix='.dylib'
23434                         cf_depsuf=$cf_suffix
23435                         ;;
23436                 hpux*) #(vi
23437                         case $target in
23438                         ia64*) #(vi
23439                                 cf_suffix='.so'
23440                                 cf_depsuf=$cf_suffix
23441                                 ;;
23442                         *) #(vi
23443                                 cf_suffix='.sl'
23444                                 cf_depsuf=$cf_suffix
23445                                 ;;
23446                         esac
23447                         ;;
23448                 *) #(vi
23449                         cf_suffix='.so'
23450                         cf_depsuf=$cf_suffix
23451                         ;;
23452                 esac
23453                 ;;
23454         *)
23455                 cf_suffix='.a'
23456                 cf_depsuf=$cf_suffix
23457                 ;;
23458         esac
23459         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23460         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23461
23462                         cf_libname=$cf_dir
23463                         test "$cf_dir" = c++ && cf_libname=ncurses++
23464                         if test $cf_item = shared ; then
23465                                 if test -n "${LIB_SUFFIX}"
23466                                 then
23467                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23468                                 else
23469                                         cf_shared_suffix="$cf_suffix"
23470                                 fi
23471                                 if test "$cf_cv_do_symlinks" = yes ; then
23472                                         cf_version_name=
23473
23474                                         case "$cf_cv_shlib_version" in #(vi
23475                                         rel) #(vi
23476                                                 cf_version_name=REL_VERSION
23477                                                 ;;
23478                                         abi)
23479                                                 cf_version_name=ABI_VERSION
23480                                                 ;;
23481                                         esac
23482
23483                                         if test -n "$cf_version_name"
23484                                         then
23485                                                 case "$cf_cv_system_name" in #(vi
23486                                                 darwin*)
23487                                                         # "w", etc?
23488                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23489                                                         ;; #(vi
23490                                                 *)
23491                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23492                                                         ;;
23493                                                 esac
23494                                         fi
23495                                         if test -n "${LIB_SUFFIX}"
23496                                         then
23497                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23498                                         else
23499                                                 cf_shared_suffix="$cf_suffix"
23500                                         fi
23501                                 fi
23502                                 # cygwin needs import library, and has unique naming convention
23503                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23504                                 # use 'cyg' prefix for shared lib.
23505                                 case $cf_cv_shlib_version in #(vi
23506                                 cygdll) #(vi
23507                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23508                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23509                                         continue
23510                                         ;;
23511                                 msysdll) #(vi
23512                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23513                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23514                                         continue
23515                                         ;;
23516                                 mingw)
23517                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23518                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23519                                         continue
23520                                         ;;
23521                                 esac
23522                         fi
23523                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23524                 done
23525
23526                 if test $cf_dir = ncurses ; then
23527                         cf_subsets="$LIB_SUBSETS"
23528                         cf_r_parts="$cf_subsets"
23529                         cf_liblist="$Libs_To_Make"
23530
23531                         while test -n "$cf_r_parts"
23532                         do
23533                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23534                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23535                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23536                                         cf_item=
23537                                         case $cf_l_parts in #(vi
23538                                         *termlib*) #(vi
23539                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23540                                                 ;;
23541                                         *ticlib*)
23542                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23543                                                 ;;
23544                                         *)
23545                                                 break
23546                                                 ;;
23547                                         esac
23548                                         if test -n "$cf_item"; then
23549                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23550                                         fi
23551                                 else
23552                                         break
23553                                 fi
23554                         done
23555                 else
23556                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23557                 fi
23558
23559                 if test $cf_dir = c++; then
23560                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23561                                 cf_list=
23562                                 for cf_item in $Libs_To_Make
23563                                 do
23564                                         case $cf_item in
23565                                         *.a)
23566                                                 ;;
23567                                         *)
23568                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23569                                                 ;;
23570                                         esac
23571                                         for cf_test in $cf_list
23572                                         do
23573                                                 if test "$cf_test" = "$cf_item"
23574                                                 then
23575                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23576                                                         cf_item=
23577                                                         break
23578                                                 fi
23579                                         done
23580                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23581                                 done
23582                                 Libs_To_Make="$cf_list"
23583                         fi
23584                 fi
23585
23586                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23587                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23588                         $cf_dir/Makefile >$cf_dir/Makefile.out
23589                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23590
23591                 $AWK -f $srcdir/mk-0th.awk \
23592                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23593                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23594
23595                 for cf_subset in $cf_subsets
23596                 do
23597                         cf_subdirs=
23598                         for cf_item in $cf_LIST_MODELS
23599                         do
23600
23601                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23602
23603 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23604
23605                         CXX_MODEL=$cf_ITEM
23606                         if test "$CXX_MODEL" = SHARED; then
23607                                 case $cf_cv_shlib_version in #(vi
23608                                 cygdll|msysdll|mingw) #(vi
23609                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23610
23611 echo "${as_me:-configure}:23611: testing overriding CXX_MODEL to SHARED ..." 1>&5
23612
23613                                         with_shared_cxx=yes
23614                                         ;;
23615                                 *)
23616                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23617                                         ;;
23618                                 esac
23619                         fi
23620
23621         case X$cf_item in #(vi
23622         Xlibtool) #(vi
23623                 cf_suffix='.la'
23624                 cf_depsuf=$cf_suffix
23625                 ;;
23626         Xdebug) #(vi
23627                 cf_suffix='_g.a'
23628                 cf_depsuf=$cf_suffix
23629                 ;;
23630         Xprofile) #(vi
23631                 cf_suffix='_p.a'
23632                 cf_depsuf=$cf_suffix
23633                 ;;
23634         Xshared) #(vi
23635                 case $cf_cv_system_name in
23636                 aix[5-7]*) #(vi
23637                         cf_suffix='.so'
23638                         cf_depsuf=$cf_suffix
23639                         ;;
23640                 cygwin*|msys*|mingw*) #(vi
23641                         cf_suffix='.dll'
23642                         cf_depsuf='.dll.a'
23643                         ;;
23644                 darwin*) #(vi
23645                         cf_suffix='.dylib'
23646                         cf_depsuf=$cf_suffix
23647                         ;;
23648                 hpux*) #(vi
23649                         case $target in
23650                         ia64*) #(vi
23651                                 cf_suffix='.so'
23652                                 cf_depsuf=$cf_suffix
23653                                 ;;
23654                         *) #(vi
23655                                 cf_suffix='.sl'
23656                                 cf_depsuf=$cf_suffix
23657                                 ;;
23658                         esac
23659                         ;;
23660                 *) #(vi
23661                         cf_suffix='.so'
23662                         cf_depsuf=$cf_suffix
23663                         ;;
23664                 esac
23665                 ;;
23666         *)
23667                 cf_suffix='.a'
23668                 cf_depsuf=$cf_suffix
23669                 ;;
23670         esac
23671         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23672         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23673
23674         case $cf_item in
23675         libtool) cf_subdir='obj_lo'  ;;
23676         normal)  cf_subdir='objects' ;;
23677         debug)   cf_subdir='obj_g' ;;
23678         profile) cf_subdir='obj_p' ;;
23679         shared)
23680                 case $cf_cv_system_name in #(vi
23681                 cygwin|msys) #(vi
23682                         cf_subdir='objects' ;;
23683                 *)
23684                         cf_subdir='obj_s' ;;
23685                 esac
23686         esac
23687
23688                         # Test for case where we build libtinfo with a different name.
23689                         cf_libname=$cf_dir
23690                         if test $cf_dir = ncurses ; then
23691                                 case $cf_subset in
23692                                 *base*)
23693                                         cf_libname=${cf_libname}$LIB_SUFFIX
23694                                         ;;
23695                                 *termlib*)
23696                                         cf_libname=$TINFO_LIB_SUFFIX
23697                                         ;;
23698                                 ticlib*)
23699                                         cf_libname=$TICS_LIB_SUFFIX
23700                                         ;;
23701                                 esac
23702                         elif test $cf_dir = c++ ; then
23703                                 cf_libname=ncurses++$LIB_SUFFIX
23704                         else
23705                                 cf_libname=${cf_libname}$LIB_SUFFIX
23706                         fi
23707                         if test -n "${DFT_ARG_SUFFIX}" ; then
23708                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23709                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23710                         fi
23711
23712                         # These dependencies really are for development, not
23713                         # builds, but they are useful in porting, too.
23714                         cf_depend="../include/ncurses_cfg.h"
23715                         if test "$srcdir" = "."; then
23716                                 cf_reldir="."
23717                         else
23718                                 cf_reldir="\${srcdir}"
23719                         fi
23720
23721                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23722                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23723                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23724                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23725                         fi
23726
23727                         cf_dir_suffix=
23728                         old_cf_suffix="$cf_suffix"
23729                         if test "$cf_cv_shlib_version_infix" = yes ; then
23730                         if test -n "$LIB_SUFFIX" ; then
23731                                 case $LIB_SUFFIX in
23732                                 tw*)
23733                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23734                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23735                                         cf_dir_suffix=tw
23736                                         ;;
23737                                 t*)
23738                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23739                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23740                                         cf_dir_suffix=t
23741                                         ;;
23742                                 w*)
23743                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23744                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23745                                         cf_dir_suffix=w
23746                                         ;;
23747                                 esac
23748                         fi
23749                         fi
23750
23751                         $AWK -f $srcdir/mk-1st.awk \
23752                                 name=${cf_libname}${cf_dir_suffix} \
23753                                 traces=$LIB_TRACING \
23754                                 MODEL=$cf_ITEM \
23755                                 CXX_MODEL=$CXX_MODEL \
23756                                 model=$cf_subdir \
23757                                 prefix=$cf_prefix \
23758                                 suffix=$cf_suffix \
23759                                 subset=$cf_subset \
23760                                 driver=$cf_cv_term_driver \
23761                                 SymLink="$LN_S" \
23762                                 TermlibRoot=$TINFO_NAME \
23763                                 TermlibSuffix=$TINFO_SUFFIX \
23764                                 ShlibVer=$cf_cv_shlib_version \
23765                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23766                                 ReLink=${cf_cv_do_relink:-no} \
23767                                 DoLinks=$cf_cv_do_symlinks \
23768                                 rmSoLocs=$cf_cv_rm_so_locs \
23769                                 ldconfig="$LDCONFIG" \
23770                                 overwrite=$WITH_OVERWRITE \
23771                                 depend="$cf_depend" \
23772                                 host="$host" \
23773                                 libtool_version="$LIBTOOL_VERSION" \
23774                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23775
23776                         cf_suffix="$old_cf_suffix"
23777
23778                         for cf_subdir2 in $cf_subdirs lib
23779                         do
23780                                 test $cf_subdir = $cf_subdir2 && break
23781                         done
23782                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23783                         $AWK -f $srcdir/mk-2nd.awk \
23784                                 name=$cf_dir \
23785                                 traces=$LIB_TRACING \
23786                                 MODEL=$cf_ITEM \
23787                                 model=$cf_subdir \
23788                                 subset=$cf_subset \
23789                                 srcdir=$srcdir \
23790                                 echo=$WITH_ECHO \
23791                                 crenames=$cf_cv_prog_CC_c_o \
23792                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23793                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23794                         cf_subdirs="$cf_subdirs $cf_subdir"
23795                         done
23796                 done
23797         fi
23798
23799         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23800 done
23801
23802 for cf_dir in $SRC_SUBDIRS
23803 do
23804         if test ! -d $srcdir/$cf_dir ; then
23805                 continue
23806         fi
23807
23808         if test -f $cf_dir/Makefile ; then
23809                 case "$cf_dir" in
23810                 Ada95) #(vi
23811                         echo 'libs \' >> Makefile
23812                         echo 'install.libs \' >> Makefile
23813                         echo 'uninstall.libs ::' >> Makefile
23814                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23815                         ;;
23816                 esac
23817         fi
23818
23819         if test -f $srcdir/$cf_dir/modules; then
23820                 echo >> Makefile
23821                 if test -f $srcdir/$cf_dir/headers; then
23822 cat >> Makefile <<CF_EOF
23823 install.includes \\
23824 uninstall.includes \\
23825 CF_EOF
23826                 fi
23827 if test "$cf_dir" != "c++" ; then
23828 echo 'lint \' >> Makefile
23829 fi
23830 cat >> Makefile <<CF_EOF
23831 libs \\
23832 lintlib \\
23833 install.libs \\
23834 uninstall.libs \\
23835 install.$cf_dir \\
23836 uninstall.$cf_dir ::
23837         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23838 CF_EOF
23839         elif test -f $srcdir/$cf_dir/headers; then
23840 cat >> Makefile <<CF_EOF
23841
23842 libs \\
23843 install.libs \\
23844 uninstall.libs \\
23845 install.includes \\
23846 uninstall.includes ::
23847         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23848 CF_EOF
23849 fi
23850 done
23851
23852 if test "x$cf_with_db_install" = xyes; then
23853 cat >> Makefile <<CF_EOF
23854
23855 install.libs uninstall.libs \\
23856 install.data uninstall.data ::
23857 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23858 CF_EOF
23859 else
23860 cat >> Makefile <<CF_EOF
23861
23862 install.libs uninstall.libs ::
23863         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23864 CF_EOF
23865 fi
23866
23867 if test "x$cf_with_manpages" = xyes; then
23868 cat >> Makefile <<CF_EOF
23869
23870 install.man \\
23871 uninstall.man ::
23872         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23873 CF_EOF
23874 fi
23875
23876 cat >> Makefile <<CF_EOF
23877
23878 distclean ::
23879         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23880         rm -f headers.sh headers.sed mk_shared_lib.sh
23881         rm -f edit_man.* man_alias.*
23882         rm -rf \${DIRS_TO_MAKE}
23883 CF_EOF
23884
23885 # Special case: tack's manpage lives in its own directory.
23886 if test "x$cf_with_manpages" = xyes; then
23887 if test -d tack ; then
23888 if test -f $srcdir/$tack.h; then
23889 cat >> Makefile <<CF_EOF
23890
23891 install.man \\
23892 uninstall.man ::
23893         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23894 CF_EOF
23895 fi
23896 fi
23897 fi
23898
23899 rm -f headers.sed headers.sh
23900
23901 echo creating headers.sh
23902 cat >headers.sh <<CF_EOF
23903 #! /bin/sh
23904 # This shell script is generated by the 'configure' script.  It is invoked in a
23905 # subdirectory of the build tree.  It generates a sed-script in the parent
23906 # directory that is used to adjust includes for header files that reside in a
23907 # subdirectory of /usr/include, etc.
23908 PRG=""
23909 while test \$# != 3
23910 do
23911 PRG="\$PRG \$1"; shift
23912 done
23913 DST=\$1
23914 REF=\$2
23915 SRC=\$3
23916 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23917 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23918 echo installing \$SRC in \$DST
23919 CF_EOF
23920
23921 if test $WITH_CURSES_H = yes; then
23922         cat >>headers.sh <<CF_EOF
23923 case \$DST in
23924 /*/include/*)
23925         END=\`basename \$DST\`
23926         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23927         do
23928                 NAME=\`basename \$i\`
23929                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23930         done
23931         ;;
23932 *)
23933         echo "" >> \$TMPSED
23934         ;;
23935 esac
23936 CF_EOF
23937
23938 else
23939         cat >>headers.sh <<CF_EOF
23940 case \$DST in
23941 /*/include/*)
23942         END=\`basename \$DST\`
23943         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23944         do
23945                 NAME=\`basename \$i\`
23946                 if test "\$NAME" = "curses.h"
23947                 then
23948                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23949                         NAME=ncurses.h
23950                 fi
23951                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23952         done
23953         ;;
23954 *)
23955         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23956         ;;
23957 esac
23958 CF_EOF
23959 fi
23960 cat >>headers.sh <<CF_EOF
23961 rm -f \$TMPSRC
23962 sed -f \$TMPSED \$SRC > \$TMPSRC
23963 NAME=\`basename \$SRC\`
23964 CF_EOF
23965 if test $WITH_CURSES_H != yes; then
23966         cat >>headers.sh <<CF_EOF
23967 test "\$NAME" = "curses.h" && NAME=ncurses.h
23968 CF_EOF
23969 fi
23970 cat >>headers.sh <<CF_EOF
23971 # Just in case someone gzip'd manpages, remove the conflicting copy.
23972 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23973
23974 eval \$PRG \$TMPSRC \$DST/\$NAME
23975 rm -f \$TMPSRC \$TMPSED
23976 CF_EOF
23977
23978 chmod 0755 headers.sh
23979
23980 for cf_dir in $SRC_SUBDIRS
23981 do
23982         if test ! -d $srcdir/$cf_dir ; then
23983                 continue
23984         fi
23985
23986         if test -f $srcdir/$cf_dir/headers; then
23987                 $AWK -f $srcdir/mk-hdr.awk \
23988                         subset="$LIB_SUBSETS" \
23989                         compat="$WITH_CURSES_H" \
23990                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23991         fi
23992
23993         if test -f $srcdir/$cf_dir/modules; then
23994                 if test "$cf_dir" != "c++" ; then
23995                         cat >>$cf_dir/Makefile <<"CF_EOF"
23996 depend : ${AUTO_SRC}
23997         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23998
23999 # DO NOT DELETE THIS LINE -- make depend depends on it.
24000 CF_EOF
24001                 fi
24002         fi
24003 done
24004
24005 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24006 if test -z "$USE_OLD_MAKERULES" ; then
24007         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24008 fi
24009 fi
24010  ;;
24011   esac
24012 done
24013 EOF
24014
24015 cat >>$CONFIG_STATUS <<\EOF
24016
24017 { (exit 0); exit 0; }
24018 EOF
24019 chmod +x $CONFIG_STATUS
24020 ac_clean_files=$ac_clean_files_save
24021
24022 # configure is writing to config.log, and then calls config.status.
24023 # config.status does its own redirection, appending to config.log.
24024 # Unfortunately, on DOS this fails, as config.log is still kept open
24025 # by configure, so config.status won't be able to write to it; its
24026 # output is simply discarded.  So we exec the FD to /dev/null,
24027 # effectively closing config.log, so it can be properly (re)opened and
24028 # appended to by config.status.  When coming back to configure, we
24029 # need to make the FD available again.
24030 if test "$no_create" != yes; then
24031   ac_cs_success=:
24032   exec 5>/dev/null
24033   $SHELL $CONFIG_STATUS || ac_cs_success=false
24034   exec 5>>config.log
24035   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24036   # would make configure fail if this is the last instruction.
24037   $ac_cs_success || { (exit 1); exit 1; }
24038 fi
24039 ${MAKE:-make} preinstall