]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20161210
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.633 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20150926.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --with-extra-suffix=X   append extra suffix to header/library paths
751   --disable-overwrite     put headers in subdir, omit link to -lcurses
752   --disable-database      do not use terminfo, only fallbacks/termcap
753   --with-database=XXX     specify terminfo source to install
754   --with-hashed-db        specify hashed-database library
755   --with-fallbacks=XXX    specify list of fallback terminal descriptions
756   --without-xterm-new     specify if xterm terminfo should be old version
757   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
758   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760   --disable-big-core      assume machine has little memory
761   --disable-big-strings   assume compiler has only standard-size strings
762   --enable-termcap        compile in termcap fallback support
763   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764   --enable-getcap         fast termcap load, no xrefs to terminfo
765   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
766   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767   --disable-root-environ  restrict environment when running as root
768   --enable-symlinks       make tic use symbolic links not hard links
769   --enable-broken_linker  compile with broken-linker support code
770   --enable-bsdpad         recognize BSD-style prefix padding
771   --enable-widec          compile with wide-char/UTF-8 code
772   --disable-lp64          allow chtype to be long (ignore _LP64)
773   --disable-largefile     omit support for large files
774   --disable-tparm-varargs compile tparm() without varargs interface
775   --disable-tic-depends   link tic library without explicit dependency on ncurses library
776   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
777   --with-bool=TYPE        override fallback type of bool variable
778   --with-caps=alt         compile with alternate Caps file
779   --with-chtype=TYPE      override type of chtype
780   --with-ospeed=TYPE      override type of ospeed variable
781   --with-mmask-t=TYPE     override type of mmask_t
782   --with-ccharw-max=XXX   override size CCHARW_MAX
783   --with-tparm-arg=TYPE   override parameter type of tparm
784   --with-rcs-ids          compile-in RCS identifiers
785 Options to Specify How Manpages are Installed:
786   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
787                           optionally formatted/catonly, e.g., gzip,formatted
788   --with-manpage-renames  specify manpage-renaming
789   --with-manpage-aliases  specify manpage-aliases using .so
790   --with-manpage-symlinks specify manpage-aliases using symlinks
791   --with-manpage-tbl      specify manpage processing with tbl
792 Extensions:
793   --disable-ext-funcs     disable function-extensions
794   --enable-sp-funcs       enable SCREEN-extensions
795   --enable-term-driver    enable terminal-driver
796   --enable-const          compile with extra/non-standard const
797   --enable-ext-colors     compile for 256-color support
798   --enable-ext-mouse      compile for extended mouse-encoding
799   --enable-ext-putwin     compile with extended putwin/screendump
800   --enable-no-padding     compile with $NCURSES_NO_PADDING code
801   --enable-signed-char    compile using signed Boolean's in term.h
802   --enable-sigwinch       compile with SIGWINCH handler
803   --enable-tcap-names     compile with user-definable terminal capabilities
804 Development Code:
805   --without-develop       disable development options
806   --enable-hard-tabs      compile with hard-tabs code
807   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
808 Experimental Code:
809   --disable-assumed-color do not assume anything about default-colors
810   --disable-hashmap       compile without hashmap scrolling-optimization
811   --enable-colorfgbg      compile-in experimental $COLORFGBG code
812   --enable-interop        compile-in interop bindings
813   --with-pthread          use POSIX thread library
814   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
815   --enable-weak-symbols   enable weak-symbols for pthreads
816   --enable-reentrant      compile with reentrant code
817   --with-wrap-prefix=XXX  override prefix used for public variables
818   --enable-safe-sprintf   compile with experimental safe-sprintf code
819   --disable-scroll-hints  compile without scroll-hints code
820   --enable-wgetch-events  compile with wgetch-events code
821 Testing/development Options:
822   --disable-echo          do not display "compiling" commands
823   --enable-warnings       build: turn on GCC compiler warnings
824   --enable-string-hacks   work around bogus compiler/loader warnings
825   --enable-assertions     test: turn on generation of assertion code
826   --with-dmalloc          test: use Gray Watson's dmalloc library
827   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
828   --with-valgrind         test: use valgrind
829   --disable-leaks         test: free permanent memory, analyze leaks
830   --enable-expanded       test: generate functions for certain macros
831   --disable-macros        test: use functions rather than macros
832   --with-trace            test: add trace() function to all models of ncurses
833   --disable-gnat-projects test: disable GNAT projects even if usable
834 Ada95 Binding Options:
835   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
836   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
837   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
838   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
839
840 Some influential environment variables:
841   CC          C compiler command
842   CFLAGS      C compiler flags
843   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
844               nonstandard directory <lib dir>
845   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
846               headers in a nonstandard directory <include dir>
847   CPP         C preprocessor
848   CXX         C++ compiler command
849   CXXFLAGS    C++ compiler flags
850   CXXCPP      C++ preprocessor
851
852 Use these variables to override the choices made by `configure' or to help
853 it to find libraries and programs with nonstandard names/locations.
854
855 EOF
856 fi
857
858 if test "$ac_init_help" = "recursive"; then
859   # If there are subdirs, report their specific --help.
860   ac_popdir=`pwd`
861   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
862     cd $ac_subdir
863     # A "../" for each directory in /$ac_subdir.
864     ac_dots=`echo $ac_subdir |
865              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
866
867     case $srcdir in
868     .) # No --srcdir option.  We are building in place.
869       ac_sub_srcdir=$srcdir ;;
870     [\\/]* | ?:[\\/]* ) # Absolute path.
871       ac_sub_srcdir=$srcdir/$ac_subdir ;;
872     *) # Relative path.
873       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
874     esac
875
876     # Check for guested configure; otherwise get Cygnus style configure.
877     if test -f $ac_sub_srcdir/configure.gnu; then
878       echo
879       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
880     elif test -f $ac_sub_srcdir/configure; then
881       echo
882       $SHELL $ac_sub_srcdir/configure  --help=recursive
883     elif test -f $ac_sub_srcdir/configure.ac ||
884            test -f $ac_sub_srcdir/configure.in; then
885       echo
886       $ac_configure --help
887     else
888       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
889     fi
890     cd $ac_popdir
891   done
892 fi
893
894 test -n "$ac_init_help" && exit 0
895 if $ac_init_version; then
896   cat <<\EOF
897
898 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
899 Free Software Foundation, Inc.
900 This configure script is free software; the Free Software Foundation
901 gives unlimited permission to copy, distribute and modify it.
902 EOF
903   exit 0
904 fi
905 exec 5>config.log
906 cat >&5 <<EOF
907 This file contains any messages produced by compilers while
908 running configure, to aid debugging if configure makes a mistake.
909
910 It was created by $as_me, which was
911 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
912
913   $ $0 $@
914
915 EOF
916 {
917 cat <<_ASUNAME
918 ## ---------- ##
919 ## Platform.  ##
920 ## ---------- ##
921
922 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
923 uname -m = `(uname -m) 2>/dev/null || echo unknown`
924 uname -r = `(uname -r) 2>/dev/null || echo unknown`
925 uname -s = `(uname -s) 2>/dev/null || echo unknown`
926 uname -v = `(uname -v) 2>/dev/null || echo unknown`
927
928 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
929 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
930
931 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
932 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
933 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
934 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
935 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
936 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
937 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
938
939 PATH = $PATH
940
941 _ASUNAME
942 } >&5
943
944 cat >&5 <<EOF
945 ## ------------ ##
946 ## Core tests.  ##
947 ## ------------ ##
948
949 EOF
950
951 # Keep a trace of the command line.
952 # Strip out --no-create and --no-recursion so they do not pile up.
953 # Also quote any args containing shell meta-characters.
954 ac_configure_args=
955 ac_sep=
956 for ac_arg
957 do
958   case $ac_arg in
959   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
960   | --no-cr | --no-c) ;;
961   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
962   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
963   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
964     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
965     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
966     ac_sep=" " ;;
967   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
968      ac_sep=" " ;;
969   esac
970   # Get rid of the leading space.
971 done
972
973 # When interrupted or exit'd, cleanup temporary files, and complete
974 # config.log.  We remove comments because anyway the quotes in there
975 # would cause problems or look ugly.
976 trap 'exit_status=$?
977   # Save into config.log some information that might help in debugging.
978   echo >&5
979   echo "## ----------------- ##" >&5
980   echo "## Cache variables.  ##" >&5
981   echo "## ----------------- ##" >&5
982   echo >&5
983   # The following way of writing the cache mishandles newlines in values,
984 {
985   (set) 2>&1 |
986     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
987     *ac_space=\ *)
988       sed -n \
989         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
990           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
991       ;;
992     *)
993       sed -n \
994         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
995       ;;
996     esac;
997 } >&5
998   sed "/^$/d" confdefs.h >conftest.log
999   if test -s conftest.log; then
1000     echo >&5
1001     echo "## ------------ ##" >&5
1002     echo "## confdefs.h.  ##" >&5
1003     echo "## ------------ ##" >&5
1004     echo >&5
1005     cat conftest.log >&5
1006   fi
1007   (echo; echo) >&5
1008   test "$ac_signal" != 0 &&
1009     echo "$as_me: caught signal $ac_signal" >&5
1010   echo "$as_me: exit $exit_status" >&5
1011   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1012     exit $exit_status
1013      ' 0
1014 for ac_signal in 1 2 13 15; do
1015   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1016 done
1017 ac_signal=0
1018
1019 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1020 rm -rf conftest* confdefs.h
1021 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1022 echo >confdefs.h
1023
1024 # Let the site file select an alternate cache file if it wants to.
1025 # Prefer explicitly selected file to automatically selected ones.
1026 if test -z "$CONFIG_SITE"; then
1027   if test "x$prefix" != xNONE; then
1028     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1029   else
1030     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1031   fi
1032 fi
1033 for ac_site_file in $CONFIG_SITE; do
1034   if test -r "$ac_site_file"; then
1035     { echo "$as_me:1035: loading site script $ac_site_file" >&5
1036 echo "$as_me: loading site script $ac_site_file" >&6;}
1037     cat "$ac_site_file" >&5
1038     . "$ac_site_file"
1039   fi
1040 done
1041
1042 if test -r "$cache_file"; then
1043   # Some versions of bash will fail to source /dev/null (special
1044   # files actually), so we avoid doing that.
1045   if test -f "$cache_file"; then
1046     { echo "$as_me:1046: loading cache $cache_file" >&5
1047 echo "$as_me: loading cache $cache_file" >&6;}
1048     case $cache_file in
1049       [\\/]* | ?:[\\/]* ) . $cache_file;;
1050       *)                      . ./$cache_file;;
1051     esac
1052   fi
1053 else
1054   { echo "$as_me:1054: creating cache $cache_file" >&5
1055 echo "$as_me: creating cache $cache_file" >&6;}
1056   >$cache_file
1057 fi
1058
1059 # Check that the precious variables saved in the cache have kept the same
1060 # value.
1061 ac_cache_corrupted=false
1062 for ac_var in `(set) 2>&1 |
1063                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1064   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1065   eval ac_new_set=\$ac_env_${ac_var}_set
1066   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1067   eval ac_new_val="\$ac_env_${ac_var}_value"
1068   case $ac_old_set,$ac_new_set in
1069     set,)
1070       { echo "$as_me:1070: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1071 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1072       ac_cache_corrupted=: ;;
1073     ,set)
1074       { echo "$as_me:1074: error: \`$ac_var' was not set in the previous run" >&5
1075 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1076       ac_cache_corrupted=: ;;
1077     ,);;
1078     *)
1079       if test "x$ac_old_val" != "x$ac_new_val"; then
1080         { echo "$as_me:1080: error: \`$ac_var' has changed since the previous run:" >&5
1081 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1082         { echo "$as_me:1082:   former value:  $ac_old_val" >&5
1083 echo "$as_me:   former value:  $ac_old_val" >&2;}
1084         { echo "$as_me:1084:   current value: $ac_new_val" >&5
1085 echo "$as_me:   current value: $ac_new_val" >&2;}
1086         ac_cache_corrupted=:
1087       fi;;
1088   esac
1089   # Pass precious variables to config.status.  It doesn't matter if
1090   # we pass some twice (in addition to the command line arguments).
1091   if test "$ac_new_set" = set; then
1092     case $ac_new_val in
1093     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1094       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1095       ac_configure_args="$ac_configure_args '$ac_arg'"
1096       ;;
1097     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1098        ;;
1099     esac
1100   fi
1101 done
1102 if $ac_cache_corrupted; then
1103   { echo "$as_me:1103: error: changes in the environment can compromise the build" >&5
1104 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1105   { { echo "$as_me:1105: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1106 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1107    { (exit 1); exit 1; }; }
1108 fi
1109
1110 ac_ext=c
1111 ac_cpp='$CPP $CPPFLAGS'
1112 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1113 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1114 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1115 ac_main_return=return
1116
1117 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1118   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1119                    ECHO_T='     ' ;;
1120   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1121   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1122 esac
1123 echo "#! $SHELL" >conftest.sh
1124 echo  "exit 0"   >>conftest.sh
1125 chmod +x conftest.sh
1126 if { (echo "$as_me:1126: PATH=\".;.\"; conftest.sh") >&5
1127   (PATH=".;."; conftest.sh) 2>&5
1128   ac_status=$?
1129   echo "$as_me:1129: \$? = $ac_status" >&5
1130   (exit $ac_status); }; then
1131   ac_path_separator=';'
1132 else
1133   ac_path_separator=:
1134 fi
1135 PATH_SEPARATOR="$ac_path_separator"
1136 rm -f conftest.sh
1137
1138 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1139
1140 top_builddir=`pwd`
1141
1142 echo "$as_me:1142: checking for egrep" >&5
1143 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1144 if test "${ac_cv_prog_egrep+set}" = set; then
1145   echo $ECHO_N "(cached) $ECHO_C" >&6
1146 else
1147   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1148                 then ac_cv_prog_egrep='grep -E'
1149                 else ac_cv_prog_egrep='egrep'
1150         fi
1151 fi
1152 echo "$as_me:1152: result: $ac_cv_prog_egrep" >&5
1153 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1154         EGREP=$ac_cv_prog_egrep
1155
1156         test -z "$EGREP" && { { echo "$as_me:1156: error: No egrep program found" >&5
1157 echo "$as_me: error: No egrep program found" >&2;}
1158    { (exit 1); exit 1; }; }
1159
1160 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1163 cf_cv_abi_version=${NCURSES_MAJOR}
1164 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1165 cf_cv_timestamp=`date`
1166 echo "$as_me:1166: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1167 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1168
1169 if test -f $srcdir/VERSION ; then
1170         echo "$as_me:1170: checking for package version" >&5
1171 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1172
1173         # if there are not enough fields, cut returns the last one...
1174         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1175         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1176         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1177
1178         # this is how CF_BUNDLED_INTL uses $VERSION:
1179         VERSION="$cf_field1"
1180
1181         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1182         test -z "$VERSION_MAJOR" && { { echo "$as_me:1182: error: missing major-version" >&5
1183 echo "$as_me: error: missing major-version" >&2;}
1184    { (exit 1); exit 1; }; }
1185
1186         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1187         test -z "$VERSION_MINOR" && { { echo "$as_me:1187: error: missing minor-version" >&5
1188 echo "$as_me: error: missing minor-version" >&2;}
1189    { (exit 1); exit 1; }; }
1190
1191         echo "$as_me:1191: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1192 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1193
1194         echo "$as_me:1194: checking for package patch date" >&5
1195 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1196         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1197         case .$VERSION_PATCH in
1198         (.)
1199                 { { echo "$as_me:1199: error: missing patch-date $VERSION_PATCH" >&5
1200 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1201    { (exit 1); exit 1; }; }
1202                 ;;
1203         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1204                 ;;
1205         (*)
1206                 { { echo "$as_me:1206: error: illegal patch-date $VERSION_PATCH" >&5
1207 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1208    { (exit 1); exit 1; }; }
1209                 ;;
1210         esac
1211         echo "$as_me:1211: result: $VERSION_PATCH" >&5
1212 echo "${ECHO_T}$VERSION_PATCH" >&6
1213 else
1214         { { echo "$as_me:1214: error: did not find $srcdir/VERSION" >&5
1215 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1216    { (exit 1); exit 1; }; }
1217 fi
1218
1219 # show the actual data that we have for versions:
1220 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1221
1222 echo "${as_me:-configure}:1222: testing ABI VERSION $VERSION ..." 1>&5
1223
1224 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1225
1226 echo "${as_me:-configure}:1226: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1227
1228 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1229
1230 echo "${as_me:-configure}:1230: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1231
1232 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1233
1234 echo "${as_me:-configure}:1234: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1235
1236         cf_PACKAGE=NCURSES
1237         PACKAGE=ncurses
1238
1239 cat >>confdefs.h <<EOF
1240 #define PACKAGE "$PACKAGE"
1241 EOF
1242
1243 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1244
1245         cat >>confdefs.h <<EOF
1246 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1247 EOF
1248
1249         cat >>confdefs.h <<EOF
1250 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1251 EOF
1252
1253 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1254
1255 # Check whether --with-rel-version or --without-rel-version was given.
1256 if test "${with_rel_version+set}" = set; then
1257   withval="$with_rel_version"
1258   { echo "$as_me:1258: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1259 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1260  cf_cv_rel_version=$withval
1261 fi;
1262
1263  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1264  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1265
1266 if test -n "$NCURSES_MAJOR" ; then
1267   case $NCURSES_MAJOR in
1268   ([0-9]*)
1269         ;;
1270   (*)
1271         { { echo "$as_me:1271: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1272 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1273    { (exit 1); exit 1; }; }
1274         ;;
1275   esac
1276 else
1277   { { echo "$as_me:1277: error: Release major-version value is empty" >&5
1278 echo "$as_me: error: Release major-version value is empty" >&2;}
1279    { (exit 1); exit 1; }; }
1280 fi
1281
1282 if test -n "$NCURSES_MINOR" ; then
1283   case $NCURSES_MINOR in
1284   ([0-9]*)
1285         ;;
1286   (*)
1287         { { echo "$as_me:1287: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1288 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1289    { (exit 1); exit 1; }; }
1290         ;;
1291   esac
1292 else
1293   { { echo "$as_me:1293: error: Release minor-version value is empty" >&5
1294 echo "$as_me: error: Release minor-version value is empty" >&2;}
1295    { (exit 1); exit 1; }; }
1296 fi
1297
1298 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1299
1300 # Check whether --with-abi-version or --without-abi-version was given.
1301 if test "${with_abi_version+set}" = set; then
1302   withval="$with_abi_version"
1303
1304         if test "x$cf_cv_abi_version" != "x$withval"
1305         then
1306                 { echo "$as_me:1306: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1307 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1308                 case $cf_cv_rel_version in
1309                 (5.*)
1310                         cf_cv_rel_version=$withval.0
1311                         ;;
1312                 (6.*)
1313                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1314                         ;;
1315                 esac
1316         fi
1317         cf_cv_abi_version=$withval
1318 fi;
1319
1320 if test -n "$cf_cv_abi_version" ; then
1321   case $cf_cv_abi_version in
1322   ([0-9]*)
1323         ;;
1324   (*)
1325         { { echo "$as_me:1325: error: ABI version is not a number: $cf_cv_abi_version" >&5
1326 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1327    { (exit 1); exit 1; }; }
1328         ;;
1329   esac
1330 else
1331   { { echo "$as_me:1331: error: ABI version value is empty" >&5
1332 echo "$as_me: error: ABI version value is empty" >&2;}
1333    { (exit 1); exit 1; }; }
1334 fi
1335
1336 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1337 then
1338         case $cf_cv_rel_version in
1339         (5.*)
1340                 cf_cv_rel_version=$with_abi_version.0
1341                 ;;
1342         esac
1343 fi
1344
1345 ac_aux_dir=
1346 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1347   if test -f $ac_dir/install-sh; then
1348     ac_aux_dir=$ac_dir
1349     ac_install_sh="$ac_aux_dir/install-sh -c"
1350     break
1351   elif test -f $ac_dir/install.sh; then
1352     ac_aux_dir=$ac_dir
1353     ac_install_sh="$ac_aux_dir/install.sh -c"
1354     break
1355   elif test -f $ac_dir/shtool; then
1356     ac_aux_dir=$ac_dir
1357     ac_install_sh="$ac_aux_dir/shtool install -c"
1358     break
1359   fi
1360 done
1361 if test -z "$ac_aux_dir"; then
1362   { { echo "$as_me:1362: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1363 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1364    { (exit 1); exit 1; }; }
1365 fi
1366 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1367 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1368 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1369
1370 # Make sure we can run config.sub.
1371 $ac_config_sub sun4 >/dev/null 2>&1 ||
1372   { { echo "$as_me:1372: error: cannot run $ac_config_sub" >&5
1373 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1374    { (exit 1); exit 1; }; }
1375
1376 echo "$as_me:1376: checking build system type" >&5
1377 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1378 if test "${ac_cv_build+set}" = set; then
1379   echo $ECHO_N "(cached) $ECHO_C" >&6
1380 else
1381   ac_cv_build_alias=$build_alias
1382 test -z "$ac_cv_build_alias" &&
1383   ac_cv_build_alias=`$ac_config_guess`
1384 test -z "$ac_cv_build_alias" &&
1385   { { echo "$as_me:1385: error: cannot guess build type; you must specify one" >&5
1386 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1387    { (exit 1); exit 1; }; }
1388 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1389   { { echo "$as_me:1389: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1390 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1391    { (exit 1); exit 1; }; }
1392
1393 fi
1394 echo "$as_me:1394: result: $ac_cv_build" >&5
1395 echo "${ECHO_T}$ac_cv_build" >&6
1396 build=$ac_cv_build
1397 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1398 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1399 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1400
1401 echo "$as_me:1401: checking host system type" >&5
1402 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1403 if test "${ac_cv_host+set}" = set; then
1404   echo $ECHO_N "(cached) $ECHO_C" >&6
1405 else
1406   ac_cv_host_alias=$host_alias
1407 test -z "$ac_cv_host_alias" &&
1408   ac_cv_host_alias=$ac_cv_build_alias
1409 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1410   { { echo "$as_me:1410: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1411 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1412    { (exit 1); exit 1; }; }
1413
1414 fi
1415 echo "$as_me:1415: result: $ac_cv_host" >&5
1416 echo "${ECHO_T}$ac_cv_host" >&6
1417 host=$ac_cv_host
1418 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1423         echo "$as_me:1423: checking target system type" >&5
1424 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1425 if test "${ac_cv_target+set}" = set; then
1426   echo $ECHO_N "(cached) $ECHO_C" >&6
1427 else
1428   ac_cv_target_alias=$target_alias
1429 test "x$ac_cv_target_alias" = "x" &&
1430   ac_cv_target_alias=$ac_cv_host_alias
1431 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1432   { { echo "$as_me:1432: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1433 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1434    { (exit 1); exit 1; }; }
1435
1436 fi
1437 echo "$as_me:1437: result: $ac_cv_target" >&5
1438 echo "${ECHO_T}$ac_cv_target" >&6
1439 target=$ac_cv_target
1440 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1441 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1442 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1443
1444 # The aliases save the names the user supplied, while $host etc.
1445 # will get canonicalized.
1446 test -n "$target_alias" &&
1447   test "$program_prefix$program_suffix$program_transform_name" = \
1448     NONENONEs,x,x, &&
1449   program_prefix=${target_alias}-
1450         system_name="$host_os"
1451 else
1452         system_name="`(uname -s -r) 2>/dev/null`"
1453         if test -z "$system_name" ; then
1454                 system_name="`(hostname) 2>/dev/null`"
1455         fi
1456 fi
1457 test -n "$system_name" &&
1458 cat >>confdefs.h <<EOF
1459 #define SYSTEM_NAME "$system_name"
1460 EOF
1461
1462 if test "${cf_cv_system_name+set}" = set; then
1463   echo $ECHO_N "(cached) $ECHO_C" >&6
1464 else
1465   cf_cv_system_name="$system_name"
1466 fi
1467
1468 test -z "$system_name" && system_name="$cf_cv_system_name"
1469 test -n "$cf_cv_system_name" && echo "$as_me:1469: result: Configuring for $cf_cv_system_name" >&5
1470 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1471
1472 if test ".$system_name" != ".$cf_cv_system_name" ; then
1473         echo "$as_me:1473: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1474 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1475         { { echo "$as_me:1475: error: \"Please remove config.cache and try again.\"" >&5
1476 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1477    { (exit 1); exit 1; }; }
1478 fi
1479
1480 # Check whether --with-system-type or --without-system-type was given.
1481 if test "${with_system_type+set}" = set; then
1482   withval="$with_system_type"
1483   { echo "$as_me:1483: WARNING: overriding system type to $withval" >&5
1484 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1485         cf_cv_system_name=$withval
1486         host_os=$withval
1487
1488 fi;
1489
1490 ###     Save the given $CFLAGS to allow user-override.
1491 cf_user_CFLAGS="$CFLAGS"
1492
1493 ###     Default install-location
1494
1495 echo "$as_me:1495: checking for prefix" >&5
1496 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1497 if test "x$prefix" = "xNONE" ; then
1498         case "$cf_cv_system_name" in
1499                 # non-vendor systems don't have a conflict
1500         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1501                 prefix=/usr
1502                 ;;
1503         (*)     prefix=$ac_default_prefix
1504                 ;;
1505         esac
1506 fi
1507 echo "$as_me:1507: result: $prefix" >&5
1508 echo "${ECHO_T}$prefix" >&6
1509
1510 if test "x$prefix" = "xNONE" ; then
1511 echo "$as_me:1511: checking for default include-directory" >&5
1512 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1513 test -n "$verbose" && echo 1>&6
1514 for cf_symbol in \
1515         $includedir \
1516         $includedir/ncurses \
1517         $prefix/include \
1518         $prefix/include/ncurses \
1519         /usr/local/include \
1520         /usr/local/include/ncurses \
1521         /usr/include \
1522         /usr/include/ncurses
1523 do
1524         cf_dir=`eval echo $cf_symbol`
1525         if test -f $cf_dir/curses.h ; then
1526         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1527                 includedir="$cf_symbol"
1528                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1529                 break
1530         fi
1531         fi
1532         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1533 done
1534 echo "$as_me:1534: result: $includedir" >&5
1535 echo "${ECHO_T}$includedir" >&6
1536 fi
1537
1538 ### Defaults for ncurses ABI
1539
1540 case x$cf_cv_abi_version in
1541 (x[6789])
1542         cf_dft_ext_colors=yes
1543         cf_dft_ext_const=yes
1544         cf_dft_ext_mouse=yes
1545         cf_dft_ext_putwin=yes
1546         cf_dft_ext_spfuncs=yes
1547         cf_dft_filter_syms=yes
1548         cf_dft_chtype=uint32_t
1549         cf_dft_mmask_t=uint32_t
1550         cf_dft_interop=yes
1551         cf_dft_tparm_arg=intptr_t
1552         cf_dft_with_lp64=yes
1553         ;;
1554 (*)
1555         cf_dft_ext_colors=no
1556         cf_dft_ext_const=no
1557         cf_dft_ext_mouse=no
1558         cf_dft_ext_putwin=no
1559         cf_dft_ext_spfuncs=no
1560         cf_dft_filter_syms=no
1561         cf_dft_chtype=auto
1562         cf_dft_mmask_t=auto
1563         cf_dft_interop=no
1564         cf_dft_tparm_arg=long
1565         cf_dft_with_lp64=no
1566         ;;
1567 esac
1568
1569 ###     Checks for programs.
1570
1571 # Check whether --with-ada or --without-ada was given.
1572 if test "${with_ada+set}" = set; then
1573   withval="$with_ada"
1574   cf_with_ada=$withval
1575 else
1576   cf_with_ada=yes
1577 fi;
1578 if test "x$cf_with_ada" = xyes
1579 then
1580         cf_PROG_CC="gnatgcc gcc cc"
1581 else
1582         cf_PROG_CC="gcc cc"
1583 fi
1584
1585 ac_ext=c
1586 ac_cpp='$CPP $CPPFLAGS'
1587 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1588 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1589 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1590 ac_main_return=return
1591 if test -n "$ac_tool_prefix"; then
1592   for ac_prog in $cf_PROG_CC
1593   do
1594     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1595 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1596 echo "$as_me:1596: checking for $ac_word" >&5
1597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1598 if test "${ac_cv_prog_CC+set}" = set; then
1599   echo $ECHO_N "(cached) $ECHO_C" >&6
1600 else
1601   if test -n "$CC"; then
1602   ac_cv_prog_CC="$CC" # Let the user override the test.
1603 else
1604   ac_save_IFS=$IFS; IFS=$ac_path_separator
1605 ac_dummy="$PATH"
1606 for ac_dir in $ac_dummy; do
1607   IFS=$ac_save_IFS
1608   test -z "$ac_dir" && ac_dir=.
1609   $as_executable_p "$ac_dir/$ac_word" || continue
1610 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1611 echo "$as_me:1611: found $ac_dir/$ac_word" >&5
1612 break
1613 done
1614
1615 fi
1616 fi
1617 CC=$ac_cv_prog_CC
1618 if test -n "$CC"; then
1619   echo "$as_me:1619: result: $CC" >&5
1620 echo "${ECHO_T}$CC" >&6
1621 else
1622   echo "$as_me:1622: result: no" >&5
1623 echo "${ECHO_T}no" >&6
1624 fi
1625
1626     test -n "$CC" && break
1627   done
1628 fi
1629 if test -z "$CC"; then
1630   ac_ct_CC=$CC
1631   for ac_prog in $cf_PROG_CC
1632 do
1633   # Extract the first word of "$ac_prog", so it can be a program name with args.
1634 set dummy $ac_prog; ac_word=$2
1635 echo "$as_me:1635: checking for $ac_word" >&5
1636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1638   echo $ECHO_N "(cached) $ECHO_C" >&6
1639 else
1640   if test -n "$ac_ct_CC"; then
1641   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1642 else
1643   ac_save_IFS=$IFS; IFS=$ac_path_separator
1644 ac_dummy="$PATH"
1645 for ac_dir in $ac_dummy; do
1646   IFS=$ac_save_IFS
1647   test -z "$ac_dir" && ac_dir=.
1648   $as_executable_p "$ac_dir/$ac_word" || continue
1649 ac_cv_prog_ac_ct_CC="$ac_prog"
1650 echo "$as_me:1650: found $ac_dir/$ac_word" >&5
1651 break
1652 done
1653
1654 fi
1655 fi
1656 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1657 if test -n "$ac_ct_CC"; then
1658   echo "$as_me:1658: result: $ac_ct_CC" >&5
1659 echo "${ECHO_T}$ac_ct_CC" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$ac_ct_CC" && break
1666 done
1667
1668   CC=$ac_ct_CC
1669 fi
1670
1671 test -z "$CC" && { { echo "$as_me:1671: error: no acceptable cc found in \$PATH" >&5
1672 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1673    { (exit 1); exit 1; }; }
1674
1675 # Provide some information about the compiler.
1676 echo "$as_me:1676:" \
1677      "checking for C compiler version" >&5
1678 ac_compiler=`set X $ac_compile; echo $2`
1679 { (eval echo "$as_me:1679: \"$ac_compiler --version </dev/null >&5\"") >&5
1680   (eval $ac_compiler --version </dev/null >&5) 2>&5
1681   ac_status=$?
1682   echo "$as_me:1682: \$? = $ac_status" >&5
1683   (exit $ac_status); }
1684 { (eval echo "$as_me:1684: \"$ac_compiler -v </dev/null >&5\"") >&5
1685   (eval $ac_compiler -v </dev/null >&5) 2>&5
1686   ac_status=$?
1687   echo "$as_me:1687: \$? = $ac_status" >&5
1688   (exit $ac_status); }
1689 { (eval echo "$as_me:1689: \"$ac_compiler -V </dev/null >&5\"") >&5
1690   (eval $ac_compiler -V </dev/null >&5) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }
1694
1695 cat >conftest.$ac_ext <<_ACEOF
1696 #line 1696 "configure"
1697 #include "confdefs.h"
1698
1699 int
1700 main ()
1701 {
1702
1703   ;
1704   return 0;
1705 }
1706 _ACEOF
1707 ac_clean_files_save=$ac_clean_files
1708 ac_clean_files="$ac_clean_files a.out a.exe"
1709 # Try to create an executable without -o first, disregard a.out.
1710 # It will help us diagnose broken compilers, and finding out an intuition
1711 # of exeext.
1712 echo "$as_me:1712: checking for C compiler default output" >&5
1713 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1714 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1715 if { (eval echo "$as_me:1715: \"$ac_link_default\"") >&5
1716   (eval $ac_link_default) 2>&5
1717   ac_status=$?
1718   echo "$as_me:1718: \$? = $ac_status" >&5
1719   (exit $ac_status); }; then
1720   # Find the output, starting from the most likely.  This scheme is
1721 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1722 # resort.
1723 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1724                 ls a.out conftest 2>/dev/null;
1725                 ls a.* conftest.* 2>/dev/null`; do
1726   case $ac_file in
1727     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1728     a.out ) # We found the default executable, but exeext='' is most
1729             # certainly right.
1730             break;;
1731     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1732           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1733           export ac_cv_exeext
1734           break;;
1735     * ) break;;
1736   esac
1737 done
1738 else
1739   echo "$as_me: failed program was:" >&5
1740 cat conftest.$ac_ext >&5
1741 { { echo "$as_me:1741: error: C compiler cannot create executables" >&5
1742 echo "$as_me: error: C compiler cannot create executables" >&2;}
1743    { (exit 77); exit 77; }; }
1744 fi
1745
1746 ac_exeext=$ac_cv_exeext
1747 echo "$as_me:1747: result: $ac_file" >&5
1748 echo "${ECHO_T}$ac_file" >&6
1749
1750 # Check the compiler produces executables we can run.  If not, either
1751 # the compiler is broken, or we cross compile.
1752 echo "$as_me:1752: checking whether the C compiler works" >&5
1753 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1754 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1755 # If not cross compiling, check that we can run a simple program.
1756 if test "$cross_compiling" != yes; then
1757   if { ac_try='./$ac_file'
1758   { (eval echo "$as_me:1758: \"$ac_try\"") >&5
1759   (eval $ac_try) 2>&5
1760   ac_status=$?
1761   echo "$as_me:1761: \$? = $ac_status" >&5
1762   (exit $ac_status); }; }; then
1763     cross_compiling=no
1764   else
1765     if test "$cross_compiling" = maybe; then
1766         cross_compiling=yes
1767     else
1768         { { echo "$as_me:1768: error: cannot run C compiled programs.
1769 If you meant to cross compile, use \`--host'." >&5
1770 echo "$as_me: error: cannot run C compiled programs.
1771 If you meant to cross compile, use \`--host'." >&2;}
1772    { (exit 1); exit 1; }; }
1773     fi
1774   fi
1775 fi
1776 echo "$as_me:1776: result: yes" >&5
1777 echo "${ECHO_T}yes" >&6
1778
1779 rm -f a.out a.exe conftest$ac_cv_exeext
1780 ac_clean_files=$ac_clean_files_save
1781 # Check the compiler produces executables we can run.  If not, either
1782 # the compiler is broken, or we cross compile.
1783 echo "$as_me:1783: checking whether we are cross compiling" >&5
1784 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1785 echo "$as_me:1785: result: $cross_compiling" >&5
1786 echo "${ECHO_T}$cross_compiling" >&6
1787
1788 echo "$as_me:1788: checking for executable suffix" >&5
1789 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1790 if { (eval echo "$as_me:1790: \"$ac_link\"") >&5
1791   (eval $ac_link) 2>&5
1792   ac_status=$?
1793   echo "$as_me:1793: \$? = $ac_status" >&5
1794   (exit $ac_status); }; then
1795   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1796 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1797 # work properly (i.e., refer to `conftest.exe'), while it won't with
1798 # `rm'.
1799 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1800   case $ac_file in
1801     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1802     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1803           export ac_cv_exeext
1804           break;;
1805     * ) break;;
1806   esac
1807 done
1808 else
1809   { { echo "$as_me:1809: error: cannot compute EXEEXT: cannot compile and link" >&5
1810 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1811    { (exit 1); exit 1; }; }
1812 fi
1813
1814 rm -f conftest$ac_cv_exeext
1815 echo "$as_me:1815: result: $ac_cv_exeext" >&5
1816 echo "${ECHO_T}$ac_cv_exeext" >&6
1817
1818 rm -f conftest.$ac_ext
1819 EXEEXT=$ac_cv_exeext
1820 ac_exeext=$EXEEXT
1821 echo "$as_me:1821: checking for object suffix" >&5
1822 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1823 if test "${ac_cv_objext+set}" = set; then
1824   echo $ECHO_N "(cached) $ECHO_C" >&6
1825 else
1826   cat >conftest.$ac_ext <<_ACEOF
1827 #line 1827 "configure"
1828 #include "confdefs.h"
1829
1830 int
1831 main ()
1832 {
1833
1834   ;
1835   return 0;
1836 }
1837 _ACEOF
1838 rm -f conftest.o conftest.obj
1839 if { (eval echo "$as_me:1839: \"$ac_compile\"") >&5
1840   (eval $ac_compile) 2>&5
1841   ac_status=$?
1842   echo "$as_me:1842: \$? = $ac_status" >&5
1843   (exit $ac_status); }; then
1844   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1845   case $ac_file in
1846     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1847     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1848        break;;
1849   esac
1850 done
1851 else
1852   echo "$as_me: failed program was:" >&5
1853 cat conftest.$ac_ext >&5
1854 { { echo "$as_me:1854: error: cannot compute OBJEXT: cannot compile" >&5
1855 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1856    { (exit 1); exit 1; }; }
1857 fi
1858
1859 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1860 fi
1861 echo "$as_me:1861: result: $ac_cv_objext" >&5
1862 echo "${ECHO_T}$ac_cv_objext" >&6
1863 OBJEXT=$ac_cv_objext
1864 ac_objext=$OBJEXT
1865 echo "$as_me:1865: checking whether we are using the GNU C compiler" >&5
1866 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1867 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1868   echo $ECHO_N "(cached) $ECHO_C" >&6
1869 else
1870   cat >conftest.$ac_ext <<_ACEOF
1871 #line 1871 "configure"
1872 #include "confdefs.h"
1873
1874 int
1875 main ()
1876 {
1877 #ifndef __GNUC__
1878        choke me
1879 #endif
1880
1881   ;
1882   return 0;
1883 }
1884 _ACEOF
1885 rm -f conftest.$ac_objext
1886 if { (eval echo "$as_me:1886: \"$ac_compile\"") >&5
1887   (eval $ac_compile) 2>&5
1888   ac_status=$?
1889   echo "$as_me:1889: \$? = $ac_status" >&5
1890   (exit $ac_status); } &&
1891          { ac_try='test -s conftest.$ac_objext'
1892   { (eval echo "$as_me:1892: \"$ac_try\"") >&5
1893   (eval $ac_try) 2>&5
1894   ac_status=$?
1895   echo "$as_me:1895: \$? = $ac_status" >&5
1896   (exit $ac_status); }; }; then
1897   ac_compiler_gnu=yes
1898 else
1899   echo "$as_me: failed program was:" >&5
1900 cat conftest.$ac_ext >&5
1901 ac_compiler_gnu=no
1902 fi
1903 rm -f conftest.$ac_objext conftest.$ac_ext
1904 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1905
1906 fi
1907 echo "$as_me:1907: result: $ac_cv_c_compiler_gnu" >&5
1908 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1909 GCC=`test $ac_compiler_gnu = yes && echo yes`
1910 ac_test_CFLAGS=${CFLAGS+set}
1911 ac_save_CFLAGS=$CFLAGS
1912 CFLAGS="-g"
1913 echo "$as_me:1913: checking whether $CC accepts -g" >&5
1914 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1915 if test "${ac_cv_prog_cc_g+set}" = set; then
1916   echo $ECHO_N "(cached) $ECHO_C" >&6
1917 else
1918   cat >conftest.$ac_ext <<_ACEOF
1919 #line 1919 "configure"
1920 #include "confdefs.h"
1921
1922 int
1923 main ()
1924 {
1925
1926   ;
1927   return 0;
1928 }
1929 _ACEOF
1930 rm -f conftest.$ac_objext
1931 if { (eval echo "$as_me:1931: \"$ac_compile\"") >&5
1932   (eval $ac_compile) 2>&5
1933   ac_status=$?
1934   echo "$as_me:1934: \$? = $ac_status" >&5
1935   (exit $ac_status); } &&
1936          { ac_try='test -s conftest.$ac_objext'
1937   { (eval echo "$as_me:1937: \"$ac_try\"") >&5
1938   (eval $ac_try) 2>&5
1939   ac_status=$?
1940   echo "$as_me:1940: \$? = $ac_status" >&5
1941   (exit $ac_status); }; }; then
1942   ac_cv_prog_cc_g=yes
1943 else
1944   echo "$as_me: failed program was:" >&5
1945 cat conftest.$ac_ext >&5
1946 ac_cv_prog_cc_g=no
1947 fi
1948 rm -f conftest.$ac_objext conftest.$ac_ext
1949 fi
1950 echo "$as_me:1950: result: $ac_cv_prog_cc_g" >&5
1951 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1952 if test "$ac_test_CFLAGS" = set; then
1953   CFLAGS=$ac_save_CFLAGS
1954 elif test $ac_cv_prog_cc_g = yes; then
1955   if test "$GCC" = yes; then
1956     CFLAGS="-g -O2"
1957   else
1958     CFLAGS="-g"
1959   fi
1960 else
1961   if test "$GCC" = yes; then
1962     CFLAGS="-O2"
1963   else
1964     CFLAGS=
1965   fi
1966 fi
1967 # Some people use a C++ compiler to compile C.  Since we use `exit',
1968 # in C++ we need to declare it.  In case someone uses the same compiler
1969 # for both compiling C and C++ we need to have the C++ compiler decide
1970 # the declaration of exit, since it's the most demanding environment.
1971 cat >conftest.$ac_ext <<_ACEOF
1972 #ifndef __cplusplus
1973   choke me
1974 #endif
1975 _ACEOF
1976 rm -f conftest.$ac_objext
1977 if { (eval echo "$as_me:1977: \"$ac_compile\"") >&5
1978   (eval $ac_compile) 2>&5
1979   ac_status=$?
1980   echo "$as_me:1980: \$? = $ac_status" >&5
1981   (exit $ac_status); } &&
1982          { ac_try='test -s conftest.$ac_objext'
1983   { (eval echo "$as_me:1983: \"$ac_try\"") >&5
1984   (eval $ac_try) 2>&5
1985   ac_status=$?
1986   echo "$as_me:1986: \$? = $ac_status" >&5
1987   (exit $ac_status); }; }; then
1988   for ac_declaration in \
1989    ''\
1990    '#include <stdlib.h>' \
1991    'extern "C" void std::exit (int) throw (); using std::exit;' \
1992    'extern "C" void std::exit (int); using std::exit;' \
1993    'extern "C" void exit (int) throw ();' \
1994    'extern "C" void exit (int);' \
1995    'void exit (int);'
1996 do
1997   cat >conftest.$ac_ext <<_ACEOF
1998 #line 1998 "configure"
1999 #include "confdefs.h"
2000 #include <stdlib.h>
2001 $ac_declaration
2002 int
2003 main ()
2004 {
2005 exit (42);
2006   ;
2007   return 0;
2008 }
2009 _ACEOF
2010 rm -f conftest.$ac_objext
2011 if { (eval echo "$as_me:2011: \"$ac_compile\"") >&5
2012   (eval $ac_compile) 2>&5
2013   ac_status=$?
2014   echo "$as_me:2014: \$? = $ac_status" >&5
2015   (exit $ac_status); } &&
2016          { ac_try='test -s conftest.$ac_objext'
2017   { (eval echo "$as_me:2017: \"$ac_try\"") >&5
2018   (eval $ac_try) 2>&5
2019   ac_status=$?
2020   echo "$as_me:2020: \$? = $ac_status" >&5
2021   (exit $ac_status); }; }; then
2022   :
2023 else
2024   echo "$as_me: failed program was:" >&5
2025 cat conftest.$ac_ext >&5
2026 continue
2027 fi
2028 rm -f conftest.$ac_objext conftest.$ac_ext
2029   cat >conftest.$ac_ext <<_ACEOF
2030 #line 2030 "configure"
2031 #include "confdefs.h"
2032 $ac_declaration
2033 int
2034 main ()
2035 {
2036 exit (42);
2037   ;
2038   return 0;
2039 }
2040 _ACEOF
2041 rm -f conftest.$ac_objext
2042 if { (eval echo "$as_me:2042: \"$ac_compile\"") >&5
2043   (eval $ac_compile) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); } &&
2047          { ac_try='test -s conftest.$ac_objext'
2048   { (eval echo "$as_me:2048: \"$ac_try\"") >&5
2049   (eval $ac_try) 2>&5
2050   ac_status=$?
2051   echo "$as_me:2051: \$? = $ac_status" >&5
2052   (exit $ac_status); }; }; then
2053   break
2054 else
2055   echo "$as_me: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 fi
2058 rm -f conftest.$ac_objext conftest.$ac_ext
2059 done
2060 rm -rf conftest*
2061 if test -n "$ac_declaration"; then
2062   echo '#ifdef __cplusplus' >>confdefs.h
2063   echo $ac_declaration      >>confdefs.h
2064   echo '#endif'             >>confdefs.h
2065 fi
2066
2067 else
2068   echo "$as_me: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
2070 fi
2071 rm -f conftest.$ac_objext conftest.$ac_ext
2072 ac_ext=c
2073 ac_cpp='$CPP $CPPFLAGS'
2074 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2075 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2076 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2077 ac_main_return=return
2078
2079 GCC_VERSION=none
2080 if test "$GCC" = yes ; then
2081         echo "$as_me:2081: checking version of $CC" >&5
2082 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2083         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.].*//'`"
2084         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2085         echo "$as_me:2085: result: $GCC_VERSION" >&5
2086 echo "${ECHO_T}$GCC_VERSION" >&6
2087 fi
2088
2089 echo "$as_me:2089: checking for $CC option to accept ANSI C" >&5
2090 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2091 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2092   echo $ECHO_N "(cached) $ECHO_C" >&6
2093 else
2094   ac_cv_prog_cc_stdc=no
2095 ac_save_CC=$CC
2096 cat >conftest.$ac_ext <<_ACEOF
2097 #line 2097 "configure"
2098 #include "confdefs.h"
2099 #include <stdarg.h>
2100 #include <stdio.h>
2101 #include <sys/types.h>
2102 #include <sys/stat.h>
2103 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2104 struct buf { int x; };
2105 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2106 static char *e (p, i)
2107      char **p;
2108      int i;
2109 {
2110   return p[i];
2111 }
2112 static char *f (char * (*g) (char **, int), char **p, ...)
2113 {
2114   char *s;
2115   va_list v;
2116   va_start (v,p);
2117   s = g (p, va_arg (v,int));
2118   va_end (v);
2119   return s;
2120 }
2121 int test (int i, double x);
2122 struct s1 {int (*f) (int a);};
2123 struct s2 {int (*f) (double a);};
2124 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2125 int argc;
2126 char **argv;
2127 int
2128 main ()
2129 {
2130 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2131   ;
2132   return 0;
2133 }
2134 _ACEOF
2135 # Don't try gcc -ansi; that turns off useful extensions and
2136 # breaks some systems' header files.
2137 # AIX                   -qlanglvl=ansi
2138 # Ultrix and OSF/1      -std1
2139 # HP-UX 10.20 and later -Ae
2140 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2141 # SVR4                  -Xc -D__EXTENSIONS__
2142 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2143 do
2144   CC="$ac_save_CC $ac_arg"
2145   rm -f conftest.$ac_objext
2146 if { (eval echo "$as_me:2146: \"$ac_compile\"") >&5
2147   (eval $ac_compile) 2>&5
2148   ac_status=$?
2149   echo "$as_me:2149: \$? = $ac_status" >&5
2150   (exit $ac_status); } &&
2151          { ac_try='test -s conftest.$ac_objext'
2152   { (eval echo "$as_me:2152: \"$ac_try\"") >&5
2153   (eval $ac_try) 2>&5
2154   ac_status=$?
2155   echo "$as_me:2155: \$? = $ac_status" >&5
2156   (exit $ac_status); }; }; then
2157   ac_cv_prog_cc_stdc=$ac_arg
2158 break
2159 else
2160   echo "$as_me: failed program was:" >&5
2161 cat conftest.$ac_ext >&5
2162 fi
2163 rm -f conftest.$ac_objext
2164 done
2165 rm -f conftest.$ac_ext conftest.$ac_objext
2166 CC=$ac_save_CC
2167
2168 fi
2169
2170 case "x$ac_cv_prog_cc_stdc" in
2171   x|xno)
2172     echo "$as_me:2172: result: none needed" >&5
2173 echo "${ECHO_T}none needed" >&6 ;;
2174   *)
2175     echo "$as_me:2175: result: $ac_cv_prog_cc_stdc" >&5
2176 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2177     CC="$CC $ac_cv_prog_cc_stdc" ;;
2178 esac
2179
2180 # This should have been defined by AC_PROG_CC
2181 : ${CC:=cc}
2182
2183 echo "$as_me:2183: checking \$CC variable" >&5
2184 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2185 case "$CC" in
2186 (*[\ \  ]-*)
2187         echo "$as_me:2187: result: broken" >&5
2188 echo "${ECHO_T}broken" >&6
2189         { echo "$as_me:2189: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2190 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2191         # humor him...
2192         cf_flags=`echo "$CC" | sed -e 's/^.*[   ]\(-[^  ]\)/\1/'`
2193         CC=`echo "$CC " | sed -e 's/[   ]-[^    ].*$//' -e 's/[         ]*$//'`
2194         for cf_arg in $cf_flags
2195         do
2196                 case "x$cf_arg" in
2197                 (x-[IUDfgOW]*)
2198
2199 cf_fix_cppflags=no
2200 cf_new_cflags=
2201 cf_new_cppflags=
2202 cf_new_extra_cppflags=
2203
2204 for cf_add_cflags in $cf_flags
2205 do
2206 case $cf_fix_cppflags in
2207 (no)
2208         case $cf_add_cflags in
2209         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2210                 case $cf_add_cflags in
2211                 (-D*)
2212                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2213
2214                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215                                 && test -z "${cf_tst_cflags}" \
2216                                 && cf_fix_cppflags=yes
2217
2218                         if test $cf_fix_cppflags = yes ; then
2219                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2220                                 continue
2221                         elif test "${cf_tst_cflags}" = "\"'" ; then
2222                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2223                                 continue
2224                         fi
2225                         ;;
2226                 esac
2227                 case "$CPPFLAGS" in
2228                 (*$cf_add_cflags)
2229                         ;;
2230                 (*)
2231                         case $cf_add_cflags in
2232                         (-D*)
2233                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2234
2235 CPPFLAGS=`echo "$CPPFLAGS" | \
2236         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2237                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2238
2239                                 ;;
2240                         esac
2241                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2242                         ;;
2243                 esac
2244                 ;;
2245         (*)
2246                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2247                 ;;
2248         esac
2249         ;;
2250 (yes)
2251         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2252
2253         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2254
2255         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2256                 && test -z "${cf_tst_cflags}" \
2257                 && cf_fix_cppflags=no
2258         ;;
2259 esac
2260 done
2261
2262 if test -n "$cf_new_cflags" ; then
2263
2264         CFLAGS="$CFLAGS $cf_new_cflags"
2265 fi
2266
2267 if test -n "$cf_new_cppflags" ; then
2268
2269         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2270 fi
2271
2272 if test -n "$cf_new_extra_cppflags" ; then
2273
2274         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2275 fi
2276
2277                         ;;
2278                 (*)
2279                         CC="$CC $cf_arg"
2280                         ;;
2281                 esac
2282         done
2283         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2284
2285 echo "${as_me:-configure}:2285: testing resulting CC: '$CC' ..." 1>&5
2286
2287         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2288
2289 echo "${as_me:-configure}:2289: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2290
2291         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2292
2293 echo "${as_me:-configure}:2293: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2294
2295         ;;
2296 (*)
2297         echo "$as_me:2297: result: ok" >&5
2298 echo "${ECHO_T}ok" >&6
2299         ;;
2300 esac
2301
2302 ac_ext=c
2303 ac_cpp='$CPP $CPPFLAGS'
2304 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2305 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2306 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2307 ac_main_return=return
2308 echo "$as_me:2308: checking how to run the C preprocessor" >&5
2309 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2310 # On Suns, sometimes $CPP names a directory.
2311 if test -n "$CPP" && test -d "$CPP"; then
2312   CPP=
2313 fi
2314 if test -z "$CPP"; then
2315   if test "${ac_cv_prog_CPP+set}" = set; then
2316   echo $ECHO_N "(cached) $ECHO_C" >&6
2317 else
2318       # Double quotes because CPP needs to be expanded
2319     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2320     do
2321       ac_preproc_ok=false
2322 for ac_c_preproc_warn_flag in '' yes
2323 do
2324   # Use a header file that comes with gcc, so configuring glibc
2325   # with a fresh cross-compiler works.
2326   # On the NeXT, cc -E runs the code through the compiler's parser,
2327   # not just through cpp. "Syntax error" is here to catch this case.
2328   cat >conftest.$ac_ext <<_ACEOF
2329 #line 2329 "configure"
2330 #include "confdefs.h"
2331 #include <assert.h>
2332                      Syntax error
2333 _ACEOF
2334 if { (eval echo "$as_me:2334: \"$ac_cpp conftest.$ac_ext\"") >&5
2335   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2336   ac_status=$?
2337   egrep -v '^ *\+' conftest.er1 >conftest.err
2338   rm -f conftest.er1
2339   cat conftest.err >&5
2340   echo "$as_me:2340: \$? = $ac_status" >&5
2341   (exit $ac_status); } >/dev/null; then
2342   if test -s conftest.err; then
2343     ac_cpp_err=$ac_c_preproc_warn_flag
2344   else
2345     ac_cpp_err=
2346   fi
2347 else
2348   ac_cpp_err=yes
2349 fi
2350 if test -z "$ac_cpp_err"; then
2351   :
2352 else
2353   echo "$as_me: failed program was:" >&5
2354   cat conftest.$ac_ext >&5
2355   # Broken: fails on valid input.
2356 continue
2357 fi
2358 rm -f conftest.err conftest.$ac_ext
2359
2360   # OK, works on sane cases.  Now check whether non-existent headers
2361   # can be detected and how.
2362   cat >conftest.$ac_ext <<_ACEOF
2363 #line 2363 "configure"
2364 #include "confdefs.h"
2365 #include <ac_nonexistent.h>
2366 _ACEOF
2367 if { (eval echo "$as_me:2367: \"$ac_cpp conftest.$ac_ext\"") >&5
2368   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2369   ac_status=$?
2370   egrep -v '^ *\+' conftest.er1 >conftest.err
2371   rm -f conftest.er1
2372   cat conftest.err >&5
2373   echo "$as_me:2373: \$? = $ac_status" >&5
2374   (exit $ac_status); } >/dev/null; then
2375   if test -s conftest.err; then
2376     ac_cpp_err=$ac_c_preproc_warn_flag
2377   else
2378     ac_cpp_err=
2379   fi
2380 else
2381   ac_cpp_err=yes
2382 fi
2383 if test -z "$ac_cpp_err"; then
2384   # Broken: success on invalid input.
2385 continue
2386 else
2387   echo "$as_me: failed program was:" >&5
2388   cat conftest.$ac_ext >&5
2389   # Passes both tests.
2390 ac_preproc_ok=:
2391 break
2392 fi
2393 rm -f conftest.err conftest.$ac_ext
2394
2395 done
2396 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2397 rm -f conftest.err conftest.$ac_ext
2398 if $ac_preproc_ok; then
2399   break
2400 fi
2401
2402     done
2403     ac_cv_prog_CPP=$CPP
2404
2405 fi
2406   CPP=$ac_cv_prog_CPP
2407 else
2408   ac_cv_prog_CPP=$CPP
2409 fi
2410 echo "$as_me:2410: result: $CPP" >&5
2411 echo "${ECHO_T}$CPP" >&6
2412 ac_preproc_ok=false
2413 for ac_c_preproc_warn_flag in '' yes
2414 do
2415   # Use a header file that comes with gcc, so configuring glibc
2416   # with a fresh cross-compiler works.
2417   # On the NeXT, cc -E runs the code through the compiler's parser,
2418   # not just through cpp. "Syntax error" is here to catch this case.
2419   cat >conftest.$ac_ext <<_ACEOF
2420 #line 2420 "configure"
2421 #include "confdefs.h"
2422 #include <assert.h>
2423                      Syntax error
2424 _ACEOF
2425 if { (eval echo "$as_me:2425: \"$ac_cpp conftest.$ac_ext\"") >&5
2426   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2427   ac_status=$?
2428   egrep -v '^ *\+' conftest.er1 >conftest.err
2429   rm -f conftest.er1
2430   cat conftest.err >&5
2431   echo "$as_me:2431: \$? = $ac_status" >&5
2432   (exit $ac_status); } >/dev/null; then
2433   if test -s conftest.err; then
2434     ac_cpp_err=$ac_c_preproc_warn_flag
2435   else
2436     ac_cpp_err=
2437   fi
2438 else
2439   ac_cpp_err=yes
2440 fi
2441 if test -z "$ac_cpp_err"; then
2442   :
2443 else
2444   echo "$as_me: failed program was:" >&5
2445   cat conftest.$ac_ext >&5
2446   # Broken: fails on valid input.
2447 continue
2448 fi
2449 rm -f conftest.err conftest.$ac_ext
2450
2451   # OK, works on sane cases.  Now check whether non-existent headers
2452   # can be detected and how.
2453   cat >conftest.$ac_ext <<_ACEOF
2454 #line 2454 "configure"
2455 #include "confdefs.h"
2456 #include <ac_nonexistent.h>
2457 _ACEOF
2458 if { (eval echo "$as_me:2458: \"$ac_cpp conftest.$ac_ext\"") >&5
2459   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2460   ac_status=$?
2461   egrep -v '^ *\+' conftest.er1 >conftest.err
2462   rm -f conftest.er1
2463   cat conftest.err >&5
2464   echo "$as_me:2464: \$? = $ac_status" >&5
2465   (exit $ac_status); } >/dev/null; then
2466   if test -s conftest.err; then
2467     ac_cpp_err=$ac_c_preproc_warn_flag
2468   else
2469     ac_cpp_err=
2470   fi
2471 else
2472   ac_cpp_err=yes
2473 fi
2474 if test -z "$ac_cpp_err"; then
2475   # Broken: success on invalid input.
2476 continue
2477 else
2478   echo "$as_me: failed program was:" >&5
2479   cat conftest.$ac_ext >&5
2480   # Passes both tests.
2481 ac_preproc_ok=:
2482 break
2483 fi
2484 rm -f conftest.err conftest.$ac_ext
2485
2486 done
2487 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2488 rm -f conftest.err conftest.$ac_ext
2489 if $ac_preproc_ok; then
2490   :
2491 else
2492   { { echo "$as_me:2492: error: C preprocessor \"$CPP\" fails sanity check" >&5
2493 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2494    { (exit 1); exit 1; }; }
2495 fi
2496
2497 ac_ext=c
2498 ac_cpp='$CPP $CPPFLAGS'
2499 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2500 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2501 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2502 ac_main_return=return
2503
2504 if test $ac_cv_c_compiler_gnu = yes; then
2505     echo "$as_me:2505: checking whether $CC needs -traditional" >&5
2506 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2507 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2508   echo $ECHO_N "(cached) $ECHO_C" >&6
2509 else
2510     ac_pattern="Autoconf.*'x'"
2511   cat >conftest.$ac_ext <<_ACEOF
2512 #line 2512 "configure"
2513 #include "confdefs.h"
2514 #include <sgtty.h>
2515 int Autoconf = TIOCGETP;
2516 _ACEOF
2517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2518   egrep "$ac_pattern" >/dev/null 2>&1; then
2519   ac_cv_prog_gcc_traditional=yes
2520 else
2521   ac_cv_prog_gcc_traditional=no
2522 fi
2523 rm -rf conftest*
2524
2525   if test $ac_cv_prog_gcc_traditional = no; then
2526     cat >conftest.$ac_ext <<_ACEOF
2527 #line 2527 "configure"
2528 #include "confdefs.h"
2529 #include <termio.h>
2530 int Autoconf = TCGETA;
2531 _ACEOF
2532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2533   egrep "$ac_pattern" >/dev/null 2>&1; then
2534   ac_cv_prog_gcc_traditional=yes
2535 fi
2536 rm -rf conftest*
2537
2538   fi
2539 fi
2540 echo "$as_me:2540: result: $ac_cv_prog_gcc_traditional" >&5
2541 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2542   if test $ac_cv_prog_gcc_traditional = yes; then
2543     CC="$CC -traditional"
2544   fi
2545 fi
2546
2547 echo "$as_me:2547: checking whether $CC understands -c and -o together" >&5
2548 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2549 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2550   echo $ECHO_N "(cached) $ECHO_C" >&6
2551 else
2552
2553 cat > conftest.$ac_ext <<CF_EOF
2554 int main()
2555 {
2556         ${cf_cv_main_return:-return}(0);
2557 }
2558 CF_EOF
2559 # We do the test twice because some compilers refuse to overwrite an
2560 # existing .o file with -o, though they will create one.
2561 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2562 if { (eval echo "$as_me:2562: \"$ac_try\"") >&5
2563   (eval $ac_try) 2>&5
2564   ac_status=$?
2565   echo "$as_me:2565: \$? = $ac_status" >&5
2566   (exit $ac_status); } &&
2567   test -f conftest2.$ac_objext && { (eval echo "$as_me:2567: \"$ac_try\"") >&5
2568   (eval $ac_try) 2>&5
2569   ac_status=$?
2570   echo "$as_me:2570: \$? = $ac_status" >&5
2571   (exit $ac_status); };
2572 then
2573   eval cf_cv_prog_CC_c_o=yes
2574 else
2575   eval cf_cv_prog_CC_c_o=no
2576 fi
2577 rm -rf conftest*
2578
2579 fi
2580 if test $cf_cv_prog_CC_c_o = yes; then
2581   echo "$as_me:2581: result: yes" >&5
2582 echo "${ECHO_T}yes" >&6
2583 else
2584   echo "$as_me:2584: result: no" >&5
2585 echo "${ECHO_T}no" >&6
2586 fi
2587
2588 if test "$cross_compiling" = yes ; then
2589         LDCONFIG=:
2590 else
2591         case "$cf_cv_system_name" in
2592         (dragonfly*|mirbsd*|freebsd*)
2593                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2594                 ;;
2595         (*) LDPATH=$PATH:/sbin:/usr/sbin
2596                 # Extract the first word of "ldconfig", so it can be a program name with args.
2597 set dummy ldconfig; ac_word=$2
2598 echo "$as_me:2598: checking for $ac_word" >&5
2599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2600 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2601   echo $ECHO_N "(cached) $ECHO_C" >&6
2602 else
2603   case $LDCONFIG in
2604   [\\/]* | ?:[\\/]*)
2605   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2606   ;;
2607   *)
2608   ac_save_IFS=$IFS; IFS=$ac_path_separator
2609 ac_dummy="$LDPATH"
2610 for ac_dir in $ac_dummy; do
2611   IFS=$ac_save_IFS
2612   test -z "$ac_dir" && ac_dir=.
2613   if $as_executable_p "$ac_dir/$ac_word"; then
2614    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2615    echo "$as_me:2615: found $ac_dir/$ac_word" >&5
2616    break
2617 fi
2618 done
2619
2620   ;;
2621 esac
2622 fi
2623 LDCONFIG=$ac_cv_path_LDCONFIG
2624
2625 if test -n "$LDCONFIG"; then
2626   echo "$as_me:2626: result: $LDCONFIG" >&5
2627 echo "${ECHO_T}$LDCONFIG" >&6
2628 else
2629   echo "$as_me:2629: result: no" >&5
2630 echo "${ECHO_T}no" >&6
2631 fi
2632
2633                 ;;
2634         esac
2635 fi
2636
2637 echo "$as_me:2637: checking if you want to ensure bool is consistent with C++" >&5
2638 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2639
2640 # Check whether --with-cxx or --without-cxx was given.
2641 if test "${with_cxx+set}" = set; then
2642   withval="$with_cxx"
2643   cf_with_cxx=$withval
2644 else
2645   cf_with_cxx=yes
2646 fi;
2647 echo "$as_me:2647: result: $cf_with_cxx" >&5
2648 echo "${ECHO_T}$cf_with_cxx" >&6
2649 if test "X$cf_with_cxx" = Xno ; then
2650         CXX=""
2651         GXX=""
2652 else
2653         # with autoconf 2.13, we can change the error to a warning:
2654                 ac_ext=cc
2655 ac_cpp='$CXXCPP $CPPFLAGS'
2656 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2657 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2658 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2659 ac_main_return=return
2660 if test -n "$ac_tool_prefix"; then
2661   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2662   do
2663     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2664 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2665 echo "$as_me:2665: checking for $ac_word" >&5
2666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2667 if test "${ac_cv_prog_CXX+set}" = set; then
2668   echo $ECHO_N "(cached) $ECHO_C" >&6
2669 else
2670   if test -n "$CXX"; then
2671   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2672 else
2673   ac_save_IFS=$IFS; IFS=$ac_path_separator
2674 ac_dummy="$PATH"
2675 for ac_dir in $ac_dummy; do
2676   IFS=$ac_save_IFS
2677   test -z "$ac_dir" && ac_dir=.
2678   $as_executable_p "$ac_dir/$ac_word" || continue
2679 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2680 echo "$as_me:2680: found $ac_dir/$ac_word" >&5
2681 break
2682 done
2683
2684 fi
2685 fi
2686 CXX=$ac_cv_prog_CXX
2687 if test -n "$CXX"; then
2688   echo "$as_me:2688: result: $CXX" >&5
2689 echo "${ECHO_T}$CXX" >&6
2690 else
2691   echo "$as_me:2691: result: no" >&5
2692 echo "${ECHO_T}no" >&6
2693 fi
2694
2695     test -n "$CXX" && break
2696   done
2697 fi
2698 if test -z "$CXX"; then
2699   ac_ct_CXX=$CXX
2700   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2701 do
2702   # Extract the first word of "$ac_prog", so it can be a program name with args.
2703 set dummy $ac_prog; ac_word=$2
2704 echo "$as_me:2704: checking for $ac_word" >&5
2705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2706 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2707   echo $ECHO_N "(cached) $ECHO_C" >&6
2708 else
2709   if test -n "$ac_ct_CXX"; then
2710   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2711 else
2712   ac_save_IFS=$IFS; IFS=$ac_path_separator
2713 ac_dummy="$PATH"
2714 for ac_dir in $ac_dummy; do
2715   IFS=$ac_save_IFS
2716   test -z "$ac_dir" && ac_dir=.
2717   $as_executable_p "$ac_dir/$ac_word" || continue
2718 ac_cv_prog_ac_ct_CXX="$ac_prog"
2719 echo "$as_me:2719: found $ac_dir/$ac_word" >&5
2720 break
2721 done
2722
2723 fi
2724 fi
2725 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2726 if test -n "$ac_ct_CXX"; then
2727   echo "$as_me:2727: result: $ac_ct_CXX" >&5
2728 echo "${ECHO_T}$ac_ct_CXX" >&6
2729 else
2730   echo "$as_me:2730: result: no" >&5
2731 echo "${ECHO_T}no" >&6
2732 fi
2733
2734   test -n "$ac_ct_CXX" && break
2735 done
2736 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2737
2738   CXX=$ac_ct_CXX
2739 fi
2740
2741 # Provide some information about the compiler.
2742 echo "$as_me:2742:" \
2743      "checking for C++ compiler version" >&5
2744 ac_compiler=`set X $ac_compile; echo $2`
2745 { (eval echo "$as_me:2745: \"$ac_compiler --version </dev/null >&5\"") >&5
2746   (eval $ac_compiler --version </dev/null >&5) 2>&5
2747   ac_status=$?
2748   echo "$as_me:2748: \$? = $ac_status" >&5
2749   (exit $ac_status); }
2750 { (eval echo "$as_me:2750: \"$ac_compiler -v </dev/null >&5\"") >&5
2751   (eval $ac_compiler -v </dev/null >&5) 2>&5
2752   ac_status=$?
2753   echo "$as_me:2753: \$? = $ac_status" >&5
2754   (exit $ac_status); }
2755 { (eval echo "$as_me:2755: \"$ac_compiler -V </dev/null >&5\"") >&5
2756   (eval $ac_compiler -V </dev/null >&5) 2>&5
2757   ac_status=$?
2758   echo "$as_me:2758: \$? = $ac_status" >&5
2759   (exit $ac_status); }
2760
2761 echo "$as_me:2761: checking whether we are using the GNU C++ compiler" >&5
2762 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2763 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2764   echo $ECHO_N "(cached) $ECHO_C" >&6
2765 else
2766   cat >conftest.$ac_ext <<_ACEOF
2767 #line 2767 "configure"
2768 #include "confdefs.h"
2769
2770 int
2771 main ()
2772 {
2773 #ifndef __GNUC__
2774        choke me
2775 #endif
2776
2777   ;
2778   return 0;
2779 }
2780 _ACEOF
2781 rm -f conftest.$ac_objext
2782 if { (eval echo "$as_me:2782: \"$ac_compile\"") >&5
2783   (eval $ac_compile) 2>&5
2784   ac_status=$?
2785   echo "$as_me:2785: \$? = $ac_status" >&5
2786   (exit $ac_status); } &&
2787          { ac_try='test -s conftest.$ac_objext'
2788   { (eval echo "$as_me:2788: \"$ac_try\"") >&5
2789   (eval $ac_try) 2>&5
2790   ac_status=$?
2791   echo "$as_me:2791: \$? = $ac_status" >&5
2792   (exit $ac_status); }; }; then
2793   ac_compiler_gnu=yes
2794 else
2795   echo "$as_me: failed program was:" >&5
2796 cat conftest.$ac_ext >&5
2797 ac_compiler_gnu=no
2798 fi
2799 rm -f conftest.$ac_objext conftest.$ac_ext
2800 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2801
2802 fi
2803 echo "$as_me:2803: result: $ac_cv_cxx_compiler_gnu" >&5
2804 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2805 GXX=`test $ac_compiler_gnu = yes && echo yes`
2806 ac_test_CXXFLAGS=${CXXFLAGS+set}
2807 ac_save_CXXFLAGS=$CXXFLAGS
2808 CXXFLAGS="-g"
2809 echo "$as_me:2809: checking whether $CXX accepts -g" >&5
2810 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2811 if test "${ac_cv_prog_cxx_g+set}" = set; then
2812   echo $ECHO_N "(cached) $ECHO_C" >&6
2813 else
2814   cat >conftest.$ac_ext <<_ACEOF
2815 #line 2815 "configure"
2816 #include "confdefs.h"
2817
2818 int
2819 main ()
2820 {
2821
2822   ;
2823   return 0;
2824 }
2825 _ACEOF
2826 rm -f conftest.$ac_objext
2827 if { (eval echo "$as_me:2827: \"$ac_compile\"") >&5
2828   (eval $ac_compile) 2>&5
2829   ac_status=$?
2830   echo "$as_me:2830: \$? = $ac_status" >&5
2831   (exit $ac_status); } &&
2832          { ac_try='test -s conftest.$ac_objext'
2833   { (eval echo "$as_me:2833: \"$ac_try\"") >&5
2834   (eval $ac_try) 2>&5
2835   ac_status=$?
2836   echo "$as_me:2836: \$? = $ac_status" >&5
2837   (exit $ac_status); }; }; then
2838   ac_cv_prog_cxx_g=yes
2839 else
2840   echo "$as_me: failed program was:" >&5
2841 cat conftest.$ac_ext >&5
2842 ac_cv_prog_cxx_g=no
2843 fi
2844 rm -f conftest.$ac_objext conftest.$ac_ext
2845 fi
2846 echo "$as_me:2846: result: $ac_cv_prog_cxx_g" >&5
2847 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2848 if test "$ac_test_CXXFLAGS" = set; then
2849   CXXFLAGS=$ac_save_CXXFLAGS
2850 elif test $ac_cv_prog_cxx_g = yes; then
2851   if test "$GXX" = yes; then
2852     CXXFLAGS="-g -O2"
2853   else
2854     CXXFLAGS="-g"
2855   fi
2856 else
2857   if test "$GXX" = yes; then
2858     CXXFLAGS="-O2"
2859   else
2860     CXXFLAGS=
2861   fi
2862 fi
2863 for ac_declaration in \
2864    ''\
2865    '#include <stdlib.h>' \
2866    'extern "C" void std::exit (int) throw (); using std::exit;' \
2867    'extern "C" void std::exit (int); using std::exit;' \
2868    'extern "C" void exit (int) throw ();' \
2869    'extern "C" void exit (int);' \
2870    'void exit (int);'
2871 do
2872   cat >conftest.$ac_ext <<_ACEOF
2873 #line 2873 "configure"
2874 #include "confdefs.h"
2875 #include <stdlib.h>
2876 $ac_declaration
2877 int
2878 main ()
2879 {
2880 exit (42);
2881   ;
2882   return 0;
2883 }
2884 _ACEOF
2885 rm -f conftest.$ac_objext
2886 if { (eval echo "$as_me:2886: \"$ac_compile\"") >&5
2887   (eval $ac_compile) 2>&5
2888   ac_status=$?
2889   echo "$as_me:2889: \$? = $ac_status" >&5
2890   (exit $ac_status); } &&
2891          { ac_try='test -s conftest.$ac_objext'
2892   { (eval echo "$as_me:2892: \"$ac_try\"") >&5
2893   (eval $ac_try) 2>&5
2894   ac_status=$?
2895   echo "$as_me:2895: \$? = $ac_status" >&5
2896   (exit $ac_status); }; }; then
2897   :
2898 else
2899   echo "$as_me: failed program was:" >&5
2900 cat conftest.$ac_ext >&5
2901 continue
2902 fi
2903 rm -f conftest.$ac_objext conftest.$ac_ext
2904   cat >conftest.$ac_ext <<_ACEOF
2905 #line 2905 "configure"
2906 #include "confdefs.h"
2907 $ac_declaration
2908 int
2909 main ()
2910 {
2911 exit (42);
2912   ;
2913   return 0;
2914 }
2915 _ACEOF
2916 rm -f conftest.$ac_objext
2917 if { (eval echo "$as_me:2917: \"$ac_compile\"") >&5
2918   (eval $ac_compile) 2>&5
2919   ac_status=$?
2920   echo "$as_me:2920: \$? = $ac_status" >&5
2921   (exit $ac_status); } &&
2922          { ac_try='test -s conftest.$ac_objext'
2923   { (eval echo "$as_me:2923: \"$ac_try\"") >&5
2924   (eval $ac_try) 2>&5
2925   ac_status=$?
2926   echo "$as_me:2926: \$? = $ac_status" >&5
2927   (exit $ac_status); }; }; then
2928   break
2929 else
2930   echo "$as_me: failed program was:" >&5
2931 cat conftest.$ac_ext >&5
2932 fi
2933 rm -f conftest.$ac_objext conftest.$ac_ext
2934 done
2935 rm -rf conftest*
2936 if test -n "$ac_declaration"; then
2937   echo '#ifdef __cplusplus' >>confdefs.h
2938   echo $ac_declaration      >>confdefs.h
2939   echo '#endif'             >>confdefs.h
2940 fi
2941
2942 ac_ext=c
2943 ac_cpp='$CPP $CPPFLAGS'
2944 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2945 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2946 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2947 ac_main_return=return
2948
2949         ac_ext=cc
2950 ac_cpp='$CXXCPP $CPPFLAGS'
2951 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2952 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2953 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2954 ac_main_return=return
2955
2956         if test "x$cf_with_cxx" != xno
2957         then
2958                 # Several of the C++ configurations do not work, particularly when
2959                 # cross-compiling (20140913 -TD)
2960                 echo "$as_me:2960: checking if $CXX works" >&5
2961 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2962
2963                 save_CPPFLAGS="$CPPFLAGS"
2964                 eval cf_includedir=${includedir}
2965                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2966
2967 cat >conftest.$ac_ext <<_ACEOF
2968 #line 2968 "configure"
2969 #include "confdefs.h"
2970
2971 #include <stdlib.h>
2972 #include <stdio.h>
2973
2974 int
2975 main ()
2976 {
2977
2978                 printf("Hello world!\n")
2979
2980   ;
2981   return 0;
2982 }
2983 _ACEOF
2984 rm -f conftest.$ac_objext
2985 if { (eval echo "$as_me:2985: \"$ac_compile\"") >&5
2986   (eval $ac_compile) 2>&5
2987   ac_status=$?
2988   echo "$as_me:2988: \$? = $ac_status" >&5
2989   (exit $ac_status); } &&
2990          { ac_try='test -s conftest.$ac_objext'
2991   { (eval echo "$as_me:2991: \"$ac_try\"") >&5
2992   (eval $ac_try) 2>&5
2993   ac_status=$?
2994   echo "$as_me:2994: \$? = $ac_status" >&5
2995   (exit $ac_status); }; }; then
2996   cf_cxx_works=yes
2997 else
2998   echo "$as_me: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3000 cf_cxx_works=no
3001 fi
3002 rm -f conftest.$ac_objext conftest.$ac_ext
3003                 CPPFLAGS="$save_CPPFLAGS"
3004
3005                 echo "$as_me:3005: result: $cf_cxx_works" >&5
3006 echo "${ECHO_T}$cf_cxx_works" >&6
3007                 if test "x$cf_cxx_works" = xno
3008                 then
3009                         { echo "$as_me:3009: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3010 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3011                         cf_with_cxx=no; CXX=""; GXX="";
3012                 fi
3013         fi
3014         ac_ext=c
3015 ac_cpp='$CPP $CPPFLAGS'
3016 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3017 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3019 ac_main_return=return
3020
3021         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3022         if test "$CXX" = "g++" ; then
3023                 # Extract the first word of "g++", so it can be a program name with args.
3024 set dummy g++; ac_word=$2
3025 echo "$as_me:3025: checking for $ac_word" >&5
3026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3027 if test "${ac_cv_path_CXX+set}" = set; then
3028   echo $ECHO_N "(cached) $ECHO_C" >&6
3029 else
3030   case $CXX in
3031   [\\/]* | ?:[\\/]*)
3032   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3033   ;;
3034   *)
3035   ac_save_IFS=$IFS; IFS=$ac_path_separator
3036 ac_dummy="$PATH"
3037 for ac_dir in $ac_dummy; do
3038   IFS=$ac_save_IFS
3039   test -z "$ac_dir" && ac_dir=.
3040   if $as_executable_p "$ac_dir/$ac_word"; then
3041    ac_cv_path_CXX="$ac_dir/$ac_word"
3042    echo "$as_me:3042: found $ac_dir/$ac_word" >&5
3043    break
3044 fi
3045 done
3046
3047   ;;
3048 esac
3049 fi
3050 CXX=$ac_cv_path_CXX
3051
3052 if test -n "$CXX"; then
3053   echo "$as_me:3053: result: $CXX" >&5
3054 echo "${ECHO_T}$CXX" >&6
3055 else
3056   echo "$as_me:3056: result: no" >&5
3057 echo "${ECHO_T}no" >&6
3058 fi
3059
3060         fi
3061         case "x$CXX" in
3062         (x|xg++)
3063                 { echo "$as_me:3063: WARNING: You don't have any C++ compiler, too bad" >&5
3064 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3065                 cf_with_cxx=no; CXX=""; GXX="";
3066                 ;;
3067         esac
3068 fi
3069
3070 GXX_VERSION=none
3071 if test "$GXX" = yes; then
3072         echo "$as_me:3072: checking version of ${CXX:-g++}" >&5
3073 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3074         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3075         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3076         echo "$as_me:3076: result: $GXX_VERSION" >&5
3077 echo "${ECHO_T}$GXX_VERSION" >&6
3078 fi
3079
3080 case $GXX_VERSION in
3081 (1*|2.[0-6]*)
3082         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3083         # cf_cxx_library=no
3084         { echo "$as_me:3084: WARNING: templates do not work" >&5
3085 echo "$as_me: WARNING: templates do not work" >&2;}
3086         ;;
3087 esac
3088
3089 echo "$as_me:3089: checking if you want to build C++ binding and demo" >&5
3090 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3091
3092 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3093 if test "${with_cxx_binding+set}" = set; then
3094   withval="$with_cxx_binding"
3095   cf_with_cxx_binding=$withval
3096 else
3097   cf_with_cxx_binding=$cf_with_cxx
3098 fi;
3099 echo "$as_me:3099: result: $cf_with_cxx_binding" >&5
3100 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3101
3102 echo "$as_me:3102: checking if you want to build with Ada95" >&5
3103 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3104 echo "$as_me:3104: result: $cf_with_ada" >&5
3105 echo "${ECHO_T}$cf_with_ada" >&6
3106
3107 echo "$as_me:3107: checking if you want to install terminal database" >&5
3108 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3109
3110 # Check whether --enable-db-install or --disable-db-install was given.
3111 if test "${enable_db_install+set}" = set; then
3112   enableval="$enable_db_install"
3113   cf_with_db_install=$enableval
3114 else
3115   cf_with_db_install=yes
3116 fi;
3117 echo "$as_me:3117: result: $cf_with_db_install" >&5
3118 echo "${ECHO_T}$cf_with_db_install" >&6
3119
3120 echo "$as_me:3120: checking if you want to install manpages" >&5
3121 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3122
3123 # Check whether --with-manpages or --without-manpages was given.
3124 if test "${with_manpages+set}" = set; then
3125   withval="$with_manpages"
3126   cf_with_manpages=$withval
3127 else
3128   cf_with_manpages=yes
3129 fi;
3130 echo "$as_me:3130: result: $cf_with_manpages" >&5
3131 echo "${ECHO_T}$cf_with_manpages" >&6
3132
3133 echo "$as_me:3133: checking if you want to build programs such as tic" >&5
3134 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3135
3136 # Check whether --with-progs or --without-progs was given.
3137 if test "${with_progs+set}" = set; then
3138   withval="$with_progs"
3139   cf_with_progs=$withval
3140 else
3141   cf_with_progs=yes
3142 fi;
3143 echo "$as_me:3143: result: $cf_with_progs" >&5
3144 echo "${ECHO_T}$cf_with_progs" >&6
3145
3146 echo "$as_me:3146: checking if you want to build test-programs" >&5
3147 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3148
3149 # Check whether --with-tests or --without-tests was given.
3150 if test "${with_tests+set}" = set; then
3151   withval="$with_tests"
3152   cf_with_tests=$withval
3153 else
3154   cf_with_tests=yes
3155 fi;
3156 echo "$as_me:3156: result: $cf_with_tests" >&5
3157 echo "${ECHO_T}$cf_with_tests" >&6
3158
3159 echo "$as_me:3159: checking if you wish to install curses.h" >&5
3160 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3161
3162 # Check whether --with-curses-h or --without-curses-h was given.
3163 if test "${with_curses_h+set}" = set; then
3164   withval="$with_curses_h"
3165   with_curses_h=$withval
3166 else
3167   with_curses_h=yes
3168 fi;
3169 echo "$as_me:3169: result: $with_curses_h" >&5
3170 echo "${ECHO_T}$with_curses_h" >&6
3171
3172 modules_to_build="ncurses"
3173 if test "X$cf_with_progs" != Xno ; then
3174 modules_to_build="$modules_to_build progs tack"
3175 fi
3176 modules_to_build="$modules_to_build panel menu form"
3177
3178 test "$program_prefix" != NONE &&
3179   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3180 # Use a double $ so make ignores it.
3181 test "$program_suffix" != NONE &&
3182   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3183 # Double any \ or $.  echo might interpret backslashes.
3184 # By default was `s,x,x', remove it if useless.
3185 cat <<\_ACEOF >conftest.sed
3186 s/[\\$]/&&/g;s/;s,x,x,$//
3187 _ACEOF
3188 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3189 rm conftest.sed
3190
3191 for ac_prog in mawk gawk nawk awk
3192 do
3193   # Extract the first word of "$ac_prog", so it can be a program name with args.
3194 set dummy $ac_prog; ac_word=$2
3195 echo "$as_me:3195: checking for $ac_word" >&5
3196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3197 if test "${ac_cv_prog_AWK+set}" = set; then
3198   echo $ECHO_N "(cached) $ECHO_C" >&6
3199 else
3200   if test -n "$AWK"; then
3201   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3202 else
3203   ac_save_IFS=$IFS; IFS=$ac_path_separator
3204 ac_dummy="$PATH"
3205 for ac_dir in $ac_dummy; do
3206   IFS=$ac_save_IFS
3207   test -z "$ac_dir" && ac_dir=.
3208   $as_executable_p "$ac_dir/$ac_word" || continue
3209 ac_cv_prog_AWK="$ac_prog"
3210 echo "$as_me:3210: found $ac_dir/$ac_word" >&5
3211 break
3212 done
3213
3214 fi
3215 fi
3216 AWK=$ac_cv_prog_AWK
3217 if test -n "$AWK"; then
3218   echo "$as_me:3218: result: $AWK" >&5
3219 echo "${ECHO_T}$AWK" >&6
3220 else
3221   echo "$as_me:3221: result: no" >&5
3222 echo "${ECHO_T}no" >&6
3223 fi
3224
3225   test -n "$AWK" && break
3226 done
3227
3228 test -z "$AWK" && { { echo "$as_me:3228: error: No awk program found" >&5
3229 echo "$as_me: error: No awk program found" >&2;}
3230    { (exit 1); exit 1; }; }
3231
3232 echo "$as_me:3232: checking for egrep" >&5
3233 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3234 if test "${ac_cv_prog_egrep+set}" = set; then
3235   echo $ECHO_N "(cached) $ECHO_C" >&6
3236 else
3237   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3238                 then ac_cv_prog_egrep='grep -E'
3239                 else ac_cv_prog_egrep='egrep'
3240         fi
3241 fi
3242 echo "$as_me:3242: result: $ac_cv_prog_egrep" >&5
3243 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3244         EGREP=$ac_cv_prog_egrep
3245
3246         test -z "$EGREP" && { { echo "$as_me:3246: error: No egrep program found" >&5
3247 echo "$as_me: error: No egrep program found" >&2;}
3248    { (exit 1); exit 1; }; }
3249
3250 # Find a good install program.  We prefer a C program (faster),
3251 # so one script is as good as another.  But avoid the broken or
3252 # incompatible versions:
3253 # SysV /etc/install, /usr/sbin/install
3254 # SunOS /usr/etc/install
3255 # IRIX /sbin/install
3256 # AIX /bin/install
3257 # AmigaOS /C/install, which installs bootblocks on floppy discs
3258 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3259 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3260 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3261 # ./install, which can be erroneously created by make from ./install.sh.
3262 echo "$as_me:3262: checking for a BSD compatible install" >&5
3263 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3264 if test -z "$INSTALL"; then
3265 if test "${ac_cv_path_install+set}" = set; then
3266   echo $ECHO_N "(cached) $ECHO_C" >&6
3267 else
3268     ac_save_IFS=$IFS; IFS=$ac_path_separator
3269   for ac_dir in $PATH; do
3270     IFS=$ac_save_IFS
3271     # Account for people who put trailing slashes in PATH elements.
3272     case $ac_dir/ in
3273     / | ./ | .// | /cC/* \
3274     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3275     | /usr/ucb/* ) ;;
3276     *)
3277       # OSF1 and SCO ODT 3.0 have their own names for install.
3278       # Don't use installbsd from OSF since it installs stuff as root
3279       # by default.
3280       for ac_prog in ginstall scoinst install; do
3281         if $as_executable_p "$ac_dir/$ac_prog"; then
3282           if test $ac_prog = install &&
3283             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3284             # AIX install.  It has an incompatible calling convention.
3285             :
3286           elif test $ac_prog = install &&
3287             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3288             # program-specific install script used by HP pwplus--don't use.
3289             :
3290           else
3291             ac_cv_path_install="$ac_dir/$ac_prog -c"
3292             break 2
3293           fi
3294         fi
3295       done
3296       ;;
3297     esac
3298   done
3299
3300 fi
3301   if test "${ac_cv_path_install+set}" = set; then
3302     INSTALL=$ac_cv_path_install
3303   else
3304     # As a last resort, use the slow shell script.  We don't cache a
3305     # path for INSTALL within a source directory, because that will
3306     # break other packages using the cache if that directory is
3307     # removed, or if the path is relative.
3308     INSTALL=$ac_install_sh
3309   fi
3310 fi
3311 echo "$as_me:3311: result: $INSTALL" >&5
3312 echo "${ECHO_T}$INSTALL" >&6
3313
3314 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3315 # It thinks the first close brace ends the variable substitution.
3316 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3317
3318 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3319
3320 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3321
3322 case $INSTALL in
3323 (/*)
3324         ;;
3325 (*)
3326         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3327         test -z "$cf_dir" && cf_dir=.
3328         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3329         ;;
3330 esac
3331
3332 for ac_prog in lint cppcheck splint
3333 do
3334   # Extract the first word of "$ac_prog", so it can be a program name with args.
3335 set dummy $ac_prog; ac_word=$2
3336 echo "$as_me:3336: checking for $ac_word" >&5
3337 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3338 if test "${ac_cv_prog_LINT+set}" = set; then
3339   echo $ECHO_N "(cached) $ECHO_C" >&6
3340 else
3341   if test -n "$LINT"; then
3342   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3343 else
3344   ac_save_IFS=$IFS; IFS=$ac_path_separator
3345 ac_dummy="$PATH"
3346 for ac_dir in $ac_dummy; do
3347   IFS=$ac_save_IFS
3348   test -z "$ac_dir" && ac_dir=.
3349   $as_executable_p "$ac_dir/$ac_word" || continue
3350 ac_cv_prog_LINT="$ac_prog"
3351 echo "$as_me:3351: found $ac_dir/$ac_word" >&5
3352 break
3353 done
3354
3355 fi
3356 fi
3357 LINT=$ac_cv_prog_LINT
3358 if test -n "$LINT"; then
3359   echo "$as_me:3359: result: $LINT" >&5
3360 echo "${ECHO_T}$LINT" >&6
3361 else
3362   echo "$as_me:3362: result: no" >&5
3363 echo "${ECHO_T}no" >&6
3364 fi
3365
3366   test -n "$LINT" && break
3367 done
3368
3369 echo "$as_me:3369: checking whether ln -s works" >&5
3370 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3371 LN_S=$as_ln_s
3372 if test "$LN_S" = "ln -s"; then
3373   echo "$as_me:3373: result: yes" >&5
3374 echo "${ECHO_T}yes" >&6
3375 else
3376   echo "$as_me:3376: result: no, using $LN_S" >&5
3377 echo "${ECHO_T}no, using $LN_S" >&6
3378 fi
3379
3380 echo "$as_me:3380: checking if $LN_S -f options work" >&5
3381 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3382
3383 rm -f conf$$.src conf$$dst
3384 echo >conf$$.dst
3385 echo first >conf$$.src
3386 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3387         cf_prog_ln_sf=yes
3388 else
3389         cf_prog_ln_sf=no
3390 fi
3391 rm -f conf$$.dst conf$$src
3392 echo "$as_me:3392: result: $cf_prog_ln_sf" >&5
3393 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3394
3395 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3396
3397 echo "$as_me:3397: checking for long file names" >&5
3398 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3399 if test "${ac_cv_sys_long_file_names+set}" = set; then
3400   echo $ECHO_N "(cached) $ECHO_C" >&6
3401 else
3402   ac_cv_sys_long_file_names=yes
3403 # Test for long file names in all the places we know might matter:
3404 #      .                the current directory, where building will happen
3405 #      $prefix/lib      where we will be installing things
3406 #      $exec_prefix/lib likewise
3407 # eval it to expand exec_prefix.
3408 #      $TMPDIR          if set, where it might want to write temporary files
3409 # if $TMPDIR is not set:
3410 #      /tmp             where it might want to write temporary files
3411 #      /var/tmp         likewise
3412 #      /usr/tmp         likewise
3413 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3414   ac_tmpdirs=$TMPDIR
3415 else
3416   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3417 fi
3418 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3419   test -d $ac_dir || continue
3420   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3421   ac_xdir=$ac_dir/cf$$
3422   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3423   ac_tf1=$ac_xdir/conftest9012345
3424   ac_tf2=$ac_xdir/conftest9012346
3425   (echo 1 >$ac_tf1) 2>/dev/null
3426   (echo 2 >$ac_tf2) 2>/dev/null
3427   ac_val=`cat $ac_tf1 2>/dev/null`
3428   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3429     ac_cv_sys_long_file_names=no
3430     rm -rf $ac_xdir 2>/dev/null
3431     break
3432   fi
3433   rm -rf $ac_xdir 2>/dev/null
3434 done
3435 fi
3436 echo "$as_me:3436: result: $ac_cv_sys_long_file_names" >&5
3437 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3438 if test $ac_cv_sys_long_file_names = yes; then
3439
3440 cat >>confdefs.h <<\EOF
3441 #define HAVE_LONG_FILE_NAMES 1
3442 EOF
3443
3444 fi
3445
3446 # if we find pkg-config, check if we should install the ".pc" files.
3447
3448 echo "$as_me:3448: checking if you want to use pkg-config" >&5
3449 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3450
3451 # Check whether --with-pkg-config or --without-pkg-config was given.
3452 if test "${with_pkg_config+set}" = set; then
3453   withval="$with_pkg_config"
3454   cf_pkg_config=$withval
3455 else
3456   cf_pkg_config=yes
3457 fi;
3458 echo "$as_me:3458: result: $cf_pkg_config" >&5
3459 echo "${ECHO_T}$cf_pkg_config" >&6
3460
3461 case $cf_pkg_config in
3462 (no)
3463         PKG_CONFIG=none
3464         ;;
3465 (yes)
3466
3467 if test -n "$ac_tool_prefix"; then
3468   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3469 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3470 echo "$as_me:3470: checking for $ac_word" >&5
3471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3472 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3473   echo $ECHO_N "(cached) $ECHO_C" >&6
3474 else
3475   case $PKG_CONFIG in
3476   [\\/]* | ?:[\\/]*)
3477   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3478   ;;
3479   *)
3480   ac_save_IFS=$IFS; IFS=$ac_path_separator
3481 ac_dummy="$PATH"
3482 for ac_dir in $ac_dummy; do
3483   IFS=$ac_save_IFS
3484   test -z "$ac_dir" && ac_dir=.
3485   if $as_executable_p "$ac_dir/$ac_word"; then
3486    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3487    echo "$as_me:3487: found $ac_dir/$ac_word" >&5
3488    break
3489 fi
3490 done
3491
3492   ;;
3493 esac
3494 fi
3495 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3496
3497 if test -n "$PKG_CONFIG"; then
3498   echo "$as_me:3498: result: $PKG_CONFIG" >&5
3499 echo "${ECHO_T}$PKG_CONFIG" >&6
3500 else
3501   echo "$as_me:3501: result: no" >&5
3502 echo "${ECHO_T}no" >&6
3503 fi
3504
3505 fi
3506 if test -z "$ac_cv_path_PKG_CONFIG"; then
3507   ac_pt_PKG_CONFIG=$PKG_CONFIG
3508   # Extract the first word of "pkg-config", so it can be a program name with args.
3509 set dummy pkg-config; ac_word=$2
3510 echo "$as_me:3510: checking for $ac_word" >&5
3511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3512 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3513   echo $ECHO_N "(cached) $ECHO_C" >&6
3514 else
3515   case $ac_pt_PKG_CONFIG in
3516   [\\/]* | ?:[\\/]*)
3517   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3518   ;;
3519   *)
3520   ac_save_IFS=$IFS; IFS=$ac_path_separator
3521 ac_dummy="$PATH"
3522 for ac_dir in $ac_dummy; do
3523   IFS=$ac_save_IFS
3524   test -z "$ac_dir" && ac_dir=.
3525   if $as_executable_p "$ac_dir/$ac_word"; then
3526    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3527    echo "$as_me:3527: found $ac_dir/$ac_word" >&5
3528    break
3529 fi
3530 done
3531
3532   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3533   ;;
3534 esac
3535 fi
3536 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3537
3538 if test -n "$ac_pt_PKG_CONFIG"; then
3539   echo "$as_me:3539: result: $ac_pt_PKG_CONFIG" >&5
3540 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3541 else
3542   echo "$as_me:3542: result: no" >&5
3543 echo "${ECHO_T}no" >&6
3544 fi
3545
3546   PKG_CONFIG=$ac_pt_PKG_CONFIG
3547 else
3548   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3549 fi
3550
3551         ;;
3552 (*)
3553         PKG_CONFIG=$withval
3554         ;;
3555 esac
3556
3557 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3558 if test "$PKG_CONFIG" != none ; then
3559
3560 if test "x$prefix" != xNONE; then
3561         cf_path_syntax="$prefix"
3562 else
3563         cf_path_syntax="$ac_default_prefix"
3564 fi
3565
3566 case ".$PKG_CONFIG" in
3567 (.\$\(*\)*|.\'*\'*)
3568         ;;
3569 (..|./*|.\\*)
3570         ;;
3571 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3572         ;;
3573 (.\${*prefix}*|.\${*dir}*)
3574         eval PKG_CONFIG="$PKG_CONFIG"
3575         case ".$PKG_CONFIG" in
3576         (.NONE/*)
3577                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3578                 ;;
3579         esac
3580         ;;
3581 (.no|.NONE/*)
3582         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3583         ;;
3584 (*)
3585         { { echo "$as_me:3585: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3586 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3587    { (exit 1); exit 1; }; }
3588         ;;
3589 esac
3590
3591 elif test "x$cf_pkg_config" != xno ; then
3592         { echo "$as_me:3592: WARNING: pkg-config is not installed" >&5
3593 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3594 fi
3595
3596 case $PKG_CONFIG in
3597 (no|none|yes)
3598         echo "$as_me:3598: checking for pkg-config library directory" >&5
3599 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3600         ;;
3601 (*)
3602         echo "$as_me:3602: checking for $PKG_CONFIG library directory" >&5
3603 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3604         ;;
3605 esac
3606
3607 PKG_CONFIG_LIBDIR=no
3608
3609 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3610 if test "${with_pkg_config_libdir+set}" = set; then
3611   withval="$with_pkg_config_libdir"
3612   PKG_CONFIG_LIBDIR=$withval
3613 else
3614   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3615 fi;
3616
3617 case x$PKG_CONFIG_LIBDIR in
3618 (x/*)
3619         ;;
3620 (xyes)
3621         # Look for the library directory using the same prefix as the executable
3622         if test "x$PKG_CONFIG" = xnone
3623         then
3624                 cf_path=$prefix
3625         else
3626                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3627         fi
3628
3629         # If you don't like using the default architecture, you have to specify the
3630         # intended library directory and corresponding compiler/linker options.
3631         #
3632         # This case allows for Debian's 2014-flavor of multiarch, along with the
3633         # most common variations before that point.  Some other variants spell the
3634         # directory differently, e.g., "pkg-config", and put it in unusual places.
3635         # pkg-config has always been poorly standardized, which is ironic...
3636         case x`(arch) 2>/dev/null` in
3637         (*64)
3638                 cf_search_path="\
3639                         $cf_path/lib/*64-linux-gnu \
3640                         $cf_path/share \
3641                         $cf_path/lib64 \
3642                         $cf_path/lib32 \
3643                         $cf_path/lib"
3644                 ;;
3645         (*)
3646                 cf_search_path="\
3647                         $cf_path/lib/*-linux-gnu \
3648                         $cf_path/share \
3649                         $cf_path/lib32 \
3650                         $cf_path/lib \
3651                         $cf_path/libdata"
3652                 ;;
3653         esac
3654
3655         test -n "$verbose" && echo "    list..." 1>&6
3656
3657 echo "${as_me:-configure}:3657: testing list... ..." 1>&5
3658
3659         for cf_config in $cf_search_path
3660         do
3661                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3662
3663 echo "${as_me:-configure}:3663: testing checking $cf_config/pkgconfig ..." 1>&5
3664
3665                 if test -d $cf_config/pkgconfig
3666                 then
3667                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3668                         echo "$as_me:3668: checking done" >&5
3669 echo $ECHO_N "checking done... $ECHO_C" >&6
3670                         break
3671                 fi
3672         done
3673         ;;
3674 (*)
3675         ;;
3676 esac
3677
3678 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3679         echo "$as_me:3679: result: $PKG_CONFIG_LIBDIR" >&5
3680 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3681 fi
3682
3683 if test "x$PKG_CONFIG" != xnone
3684 then
3685         echo "$as_me:3685: checking if we should install .pc files for $PKG_CONFIG" >&5
3686 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3687 else
3688         echo "$as_me:3688: checking if we should install .pc files" >&5
3689 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3690 fi
3691
3692 # Check whether --enable-pc-files or --disable-pc-files was given.
3693 if test "${enable_pc_files+set}" = set; then
3694   enableval="$enable_pc_files"
3695   enable_pc_files=$enableval
3696 else
3697   enable_pc_files=no
3698 fi;
3699 echo "$as_me:3699: result: $enable_pc_files" >&5
3700 echo "${ECHO_T}$enable_pc_files" >&6
3701
3702 if test "x$enable_pc_files" != xno
3703 then
3704         MAKE_PC_FILES=
3705         case "x$PKG_CONFIG_LIBDIR" in
3706         (xno|xyes)
3707                 { echo "$as_me:3707: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3708 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3709                 ;;
3710         (*)
3711
3712 if test "x$prefix" != xNONE; then
3713         cf_path_syntax="$prefix"
3714 else
3715         cf_path_syntax="$ac_default_prefix"
3716 fi
3717
3718 case ".$PKG_CONFIG_LIBDIR" in
3719 (.\$\(*\)*|.\'*\'*)
3720         ;;
3721 (..|./*|.\\*)
3722         ;;
3723 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3724         ;;
3725 (.\${*prefix}*|.\${*dir}*)
3726         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3727         case ".$PKG_CONFIG_LIBDIR" in
3728         (.NONE/*)
3729                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3730                 ;;
3731         esac
3732         ;;
3733 (.no|.NONE/*)
3734         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3735         ;;
3736 (*)
3737         { { echo "$as_me:3737: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3738 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3739    { (exit 1); exit 1; }; }
3740         ;;
3741 esac
3742
3743                 ;;
3744         esac
3745 else
3746         MAKE_PC_FILES="#"
3747 fi
3748
3749 if test -z "$MAKE_PC_FILES"
3750 then
3751         echo "$as_me:3751: checking for suffix to add to pc-files" >&5
3752 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3753
3754 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3755 if test "${with_pc_suffix+set}" = set; then
3756   withval="$with_pc_suffix"
3757   case "x$withval" in
3758         (xyes|xno)
3759                 PC_MODULE_SUFFIX=
3760                 ;;
3761         (*)     PC_MODULE_SUFFIX="$withval"
3762                 ;;
3763         esac
3764 fi;
3765         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3766         echo "$as_me:3766: result: $PC_MODULE_SUFFIX" >&5
3767 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3768         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3769
3770 fi
3771
3772 echo "$as_me:3772: checking if we should assume mixed-case filenames" >&5
3773 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3774
3775 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3776 if test "${enable_mixed_case+set}" = set; then
3777   enableval="$enable_mixed_case"
3778   enable_mixedcase=$enableval
3779 else
3780   enable_mixedcase=auto
3781 fi;
3782 echo "$as_me:3782: result: $enable_mixedcase" >&5
3783 echo "${ECHO_T}$enable_mixedcase" >&6
3784 if test "$enable_mixedcase" = "auto" ; then
3785
3786 echo "$as_me:3786: checking if filesystem supports mixed-case filenames" >&5
3787 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3788 if test "${cf_cv_mixedcase+set}" = set; then
3789   echo $ECHO_N "(cached) $ECHO_C" >&6
3790 else
3791
3792 if test "$cross_compiling" = yes ; then
3793         case $target_alias in
3794         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3795                 cf_cv_mixedcase=no
3796                 ;;
3797         (*)
3798                 cf_cv_mixedcase=yes
3799                 ;;
3800         esac
3801 else
3802         rm -f conftest CONFTEST
3803         echo test >conftest
3804         if test -f CONFTEST ; then
3805                 cf_cv_mixedcase=no
3806         else
3807                 cf_cv_mixedcase=yes
3808         fi
3809         rm -f conftest CONFTEST
3810 fi
3811
3812 fi
3813 echo "$as_me:3813: result: $cf_cv_mixedcase" >&5
3814 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3815 test "$cf_cv_mixedcase" = yes &&
3816 cat >>confdefs.h <<\EOF
3817 #define MIXEDCASE_FILENAMES 1
3818 EOF
3819
3820 else
3821         cf_cv_mixedcase=$enable_mixedcase
3822         if test "x$enable_mixedcase" = "xyes" ; then
3823
3824 cat >>confdefs.h <<\EOF
3825 #define MIXEDCASE_FILENAMES 1
3826 EOF
3827
3828         fi
3829 fi
3830
3831 # do this after mixed-case option (tags/TAGS is not as important as tic).
3832 echo "$as_me:3832: checking whether ${MAKE-make} sets \${MAKE}" >&5
3833 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3834 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3835 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3836   echo $ECHO_N "(cached) $ECHO_C" >&6
3837 else
3838   cat >conftest.make <<\EOF
3839 all:
3840         @echo 'ac_maketemp="${MAKE}"'
3841 EOF
3842 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3843 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3844 if test -n "$ac_maketemp"; then
3845   eval ac_cv_prog_make_${ac_make}_set=yes
3846 else
3847   eval ac_cv_prog_make_${ac_make}_set=no
3848 fi
3849 rm -f conftest.make
3850 fi
3851 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3852   echo "$as_me:3852: result: yes" >&5
3853 echo "${ECHO_T}yes" >&6
3854   SET_MAKE=
3855 else
3856   echo "$as_me:3856: result: no" >&5
3857 echo "${ECHO_T}no" >&6
3858   SET_MAKE="MAKE=${MAKE-make}"
3859 fi
3860
3861 for ac_prog in exctags ctags
3862 do
3863   # Extract the first word of "$ac_prog", so it can be a program name with args.
3864 set dummy $ac_prog; ac_word=$2
3865 echo "$as_me:3865: checking for $ac_word" >&5
3866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3867 if test "${ac_cv_prog_CTAGS+set}" = set; then
3868   echo $ECHO_N "(cached) $ECHO_C" >&6
3869 else
3870   if test -n "$CTAGS"; then
3871   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3872 else
3873   ac_save_IFS=$IFS; IFS=$ac_path_separator
3874 ac_dummy="$PATH"
3875 for ac_dir in $ac_dummy; do
3876   IFS=$ac_save_IFS
3877   test -z "$ac_dir" && ac_dir=.
3878   $as_executable_p "$ac_dir/$ac_word" || continue
3879 ac_cv_prog_CTAGS="$ac_prog"
3880 echo "$as_me:3880: found $ac_dir/$ac_word" >&5
3881 break
3882 done
3883
3884 fi
3885 fi
3886 CTAGS=$ac_cv_prog_CTAGS
3887 if test -n "$CTAGS"; then
3888   echo "$as_me:3888: result: $CTAGS" >&5
3889 echo "${ECHO_T}$CTAGS" >&6
3890 else
3891   echo "$as_me:3891: result: no" >&5
3892 echo "${ECHO_T}no" >&6
3893 fi
3894
3895   test -n "$CTAGS" && break
3896 done
3897
3898 for ac_prog in exetags etags
3899 do
3900   # Extract the first word of "$ac_prog", so it can be a program name with args.
3901 set dummy $ac_prog; ac_word=$2
3902 echo "$as_me:3902: checking for $ac_word" >&5
3903 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3904 if test "${ac_cv_prog_ETAGS+set}" = set; then
3905   echo $ECHO_N "(cached) $ECHO_C" >&6
3906 else
3907   if test -n "$ETAGS"; then
3908   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3909 else
3910   ac_save_IFS=$IFS; IFS=$ac_path_separator
3911 ac_dummy="$PATH"
3912 for ac_dir in $ac_dummy; do
3913   IFS=$ac_save_IFS
3914   test -z "$ac_dir" && ac_dir=.
3915   $as_executable_p "$ac_dir/$ac_word" || continue
3916 ac_cv_prog_ETAGS="$ac_prog"
3917 echo "$as_me:3917: found $ac_dir/$ac_word" >&5
3918 break
3919 done
3920
3921 fi
3922 fi
3923 ETAGS=$ac_cv_prog_ETAGS
3924 if test -n "$ETAGS"; then
3925   echo "$as_me:3925: result: $ETAGS" >&5
3926 echo "${ECHO_T}$ETAGS" >&6
3927 else
3928   echo "$as_me:3928: result: no" >&5
3929 echo "${ECHO_T}no" >&6
3930 fi
3931
3932   test -n "$ETAGS" && break
3933 done
3934
3935 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3936 set dummy ${CTAGS:-ctags}; ac_word=$2
3937 echo "$as_me:3937: checking for $ac_word" >&5
3938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3939 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3940   echo $ECHO_N "(cached) $ECHO_C" >&6
3941 else
3942   if test -n "$MAKE_LOWER_TAGS"; then
3943   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3944 else
3945   ac_save_IFS=$IFS; IFS=$ac_path_separator
3946 ac_dummy="$PATH"
3947 for ac_dir in $ac_dummy; do
3948   IFS=$ac_save_IFS
3949   test -z "$ac_dir" && ac_dir=.
3950   $as_executable_p "$ac_dir/$ac_word" || continue
3951 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3952 echo "$as_me:3952: found $ac_dir/$ac_word" >&5
3953 break
3954 done
3955
3956   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3957 fi
3958 fi
3959 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3960 if test -n "$MAKE_LOWER_TAGS"; then
3961   echo "$as_me:3961: result: $MAKE_LOWER_TAGS" >&5
3962 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3963 else
3964   echo "$as_me:3964: result: no" >&5
3965 echo "${ECHO_T}no" >&6
3966 fi
3967
3968 if test "$cf_cv_mixedcase" = yes ; then
3969         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3970 set dummy ${ETAGS:-etags}; ac_word=$2
3971 echo "$as_me:3971: checking for $ac_word" >&5
3972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3973 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3974   echo $ECHO_N "(cached) $ECHO_C" >&6
3975 else
3976   if test -n "$MAKE_UPPER_TAGS"; then
3977   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3978 else
3979   ac_save_IFS=$IFS; IFS=$ac_path_separator
3980 ac_dummy="$PATH"
3981 for ac_dir in $ac_dummy; do
3982   IFS=$ac_save_IFS
3983   test -z "$ac_dir" && ac_dir=.
3984   $as_executable_p "$ac_dir/$ac_word" || continue
3985 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3986 echo "$as_me:3986: found $ac_dir/$ac_word" >&5
3987 break
3988 done
3989
3990   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3991 fi
3992 fi
3993 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3994 if test -n "$MAKE_UPPER_TAGS"; then
3995   echo "$as_me:3995: result: $MAKE_UPPER_TAGS" >&5
3996 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3997 else
3998   echo "$as_me:3998: result: no" >&5
3999 echo "${ECHO_T}no" >&6
4000 fi
4001
4002 else
4003         MAKE_UPPER_TAGS=no
4004 fi
4005
4006 if test "$MAKE_UPPER_TAGS" = yes ; then
4007         MAKE_UPPER_TAGS=
4008 else
4009         MAKE_UPPER_TAGS="#"
4010 fi
4011
4012 if test "$MAKE_LOWER_TAGS" = yes ; then
4013         MAKE_LOWER_TAGS=
4014 else
4015         MAKE_LOWER_TAGS="#"
4016 fi
4017
4018 echo "$as_me:4018: checking for makeflags variable" >&5
4019 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4020 if test "${cf_cv_makeflags+set}" = set; then
4021   echo $ECHO_N "(cached) $ECHO_C" >&6
4022 else
4023
4024         cf_cv_makeflags=''
4025         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4026         do
4027                 cat >cf_makeflags.tmp <<CF_EOF
4028 SHELL = $SHELL
4029 all :
4030         @ echo '.$cf_option'
4031 CF_EOF
4032                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4033                 case "$cf_result" in
4034                 (.*k|.*kw)
4035                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4036                         case "$cf_result" in
4037                         (.*CC=*)        cf_cv_makeflags=
4038                                 ;;
4039                         (*)     cf_cv_makeflags=$cf_option
4040                                 ;;
4041                         esac
4042                         break
4043                         ;;
4044                 (.-)    ;;
4045                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4046                         ;;
4047                 esac
4048         done
4049         rm -f cf_makeflags.tmp
4050
4051 fi
4052 echo "$as_me:4052: result: $cf_cv_makeflags" >&5
4053 echo "${ECHO_T}$cf_cv_makeflags" >&6
4054
4055 if test -n "$ac_tool_prefix"; then
4056   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4057 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4058 echo "$as_me:4058: checking for $ac_word" >&5
4059 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4060 if test "${ac_cv_prog_RANLIB+set}" = set; then
4061   echo $ECHO_N "(cached) $ECHO_C" >&6
4062 else
4063   if test -n "$RANLIB"; then
4064   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4065 else
4066   ac_save_IFS=$IFS; IFS=$ac_path_separator
4067 ac_dummy="$PATH"
4068 for ac_dir in $ac_dummy; do
4069   IFS=$ac_save_IFS
4070   test -z "$ac_dir" && ac_dir=.
4071   $as_executable_p "$ac_dir/$ac_word" || continue
4072 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4073 echo "$as_me:4073: found $ac_dir/$ac_word" >&5
4074 break
4075 done
4076
4077 fi
4078 fi
4079 RANLIB=$ac_cv_prog_RANLIB
4080 if test -n "$RANLIB"; then
4081   echo "$as_me:4081: result: $RANLIB" >&5
4082 echo "${ECHO_T}$RANLIB" >&6
4083 else
4084   echo "$as_me:4084: result: no" >&5
4085 echo "${ECHO_T}no" >&6
4086 fi
4087
4088 fi
4089 if test -z "$ac_cv_prog_RANLIB"; then
4090   ac_ct_RANLIB=$RANLIB
4091   # Extract the first word of "ranlib", so it can be a program name with args.
4092 set dummy ranlib; ac_word=$2
4093 echo "$as_me:4093: checking for $ac_word" >&5
4094 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4095 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4096   echo $ECHO_N "(cached) $ECHO_C" >&6
4097 else
4098   if test -n "$ac_ct_RANLIB"; then
4099   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4100 else
4101   ac_save_IFS=$IFS; IFS=$ac_path_separator
4102 ac_dummy="$PATH"
4103 for ac_dir in $ac_dummy; do
4104   IFS=$ac_save_IFS
4105   test -z "$ac_dir" && ac_dir=.
4106   $as_executable_p "$ac_dir/$ac_word" || continue
4107 ac_cv_prog_ac_ct_RANLIB="ranlib"
4108 echo "$as_me:4108: found $ac_dir/$ac_word" >&5
4109 break
4110 done
4111
4112   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4113 fi
4114 fi
4115 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4116 if test -n "$ac_ct_RANLIB"; then
4117   echo "$as_me:4117: result: $ac_ct_RANLIB" >&5
4118 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4119 else
4120   echo "$as_me:4120: result: no" >&5
4121 echo "${ECHO_T}no" >&6
4122 fi
4123
4124   RANLIB=$ac_ct_RANLIB
4125 else
4126   RANLIB="$ac_cv_prog_RANLIB"
4127 fi
4128
4129 if test -n "$ac_tool_prefix"; then
4130   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4131 set dummy ${ac_tool_prefix}ld; ac_word=$2
4132 echo "$as_me:4132: checking for $ac_word" >&5
4133 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4134 if test "${ac_cv_prog_LD+set}" = set; then
4135   echo $ECHO_N "(cached) $ECHO_C" >&6
4136 else
4137   if test -n "$LD"; then
4138   ac_cv_prog_LD="$LD" # Let the user override the test.
4139 else
4140   ac_save_IFS=$IFS; IFS=$ac_path_separator
4141 ac_dummy="$PATH"
4142 for ac_dir in $ac_dummy; do
4143   IFS=$ac_save_IFS
4144   test -z "$ac_dir" && ac_dir=.
4145   $as_executable_p "$ac_dir/$ac_word" || continue
4146 ac_cv_prog_LD="${ac_tool_prefix}ld"
4147 echo "$as_me:4147: found $ac_dir/$ac_word" >&5
4148 break
4149 done
4150
4151 fi
4152 fi
4153 LD=$ac_cv_prog_LD
4154 if test -n "$LD"; then
4155   echo "$as_me:4155: result: $LD" >&5
4156 echo "${ECHO_T}$LD" >&6
4157 else
4158   echo "$as_me:4158: result: no" >&5
4159 echo "${ECHO_T}no" >&6
4160 fi
4161
4162 fi
4163 if test -z "$ac_cv_prog_LD"; then
4164   ac_ct_LD=$LD
4165   # Extract the first word of "ld", so it can be a program name with args.
4166 set dummy ld; ac_word=$2
4167 echo "$as_me:4167: checking for $ac_word" >&5
4168 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4169 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4170   echo $ECHO_N "(cached) $ECHO_C" >&6
4171 else
4172   if test -n "$ac_ct_LD"; then
4173   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4174 else
4175   ac_save_IFS=$IFS; IFS=$ac_path_separator
4176 ac_dummy="$PATH"
4177 for ac_dir in $ac_dummy; do
4178   IFS=$ac_save_IFS
4179   test -z "$ac_dir" && ac_dir=.
4180   $as_executable_p "$ac_dir/$ac_word" || continue
4181 ac_cv_prog_ac_ct_LD="ld"
4182 echo "$as_me:4182: found $ac_dir/$ac_word" >&5
4183 break
4184 done
4185
4186   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4187 fi
4188 fi
4189 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4190 if test -n "$ac_ct_LD"; then
4191   echo "$as_me:4191: result: $ac_ct_LD" >&5
4192 echo "${ECHO_T}$ac_ct_LD" >&6
4193 else
4194   echo "$as_me:4194: result: no" >&5
4195 echo "${ECHO_T}no" >&6
4196 fi
4197
4198   LD=$ac_ct_LD
4199 else
4200   LD="$ac_cv_prog_LD"
4201 fi
4202
4203 if test -n "$ac_tool_prefix"; then
4204   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4205 set dummy ${ac_tool_prefix}ar; ac_word=$2
4206 echo "$as_me:4206: checking for $ac_word" >&5
4207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4208 if test "${ac_cv_prog_AR+set}" = set; then
4209   echo $ECHO_N "(cached) $ECHO_C" >&6
4210 else
4211   if test -n "$AR"; then
4212   ac_cv_prog_AR="$AR" # Let the user override the test.
4213 else
4214   ac_save_IFS=$IFS; IFS=$ac_path_separator
4215 ac_dummy="$PATH"
4216 for ac_dir in $ac_dummy; do
4217   IFS=$ac_save_IFS
4218   test -z "$ac_dir" && ac_dir=.
4219   $as_executable_p "$ac_dir/$ac_word" || continue
4220 ac_cv_prog_AR="${ac_tool_prefix}ar"
4221 echo "$as_me:4221: found $ac_dir/$ac_word" >&5
4222 break
4223 done
4224
4225 fi
4226 fi
4227 AR=$ac_cv_prog_AR
4228 if test -n "$AR"; then
4229   echo "$as_me:4229: result: $AR" >&5
4230 echo "${ECHO_T}$AR" >&6
4231 else
4232   echo "$as_me:4232: result: no" >&5
4233 echo "${ECHO_T}no" >&6
4234 fi
4235
4236 fi
4237 if test -z "$ac_cv_prog_AR"; then
4238   ac_ct_AR=$AR
4239   # Extract the first word of "ar", so it can be a program name with args.
4240 set dummy ar; ac_word=$2
4241 echo "$as_me:4241: checking for $ac_word" >&5
4242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4243 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4244   echo $ECHO_N "(cached) $ECHO_C" >&6
4245 else
4246   if test -n "$ac_ct_AR"; then
4247   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4248 else
4249   ac_save_IFS=$IFS; IFS=$ac_path_separator
4250 ac_dummy="$PATH"
4251 for ac_dir in $ac_dummy; do
4252   IFS=$ac_save_IFS
4253   test -z "$ac_dir" && ac_dir=.
4254   $as_executable_p "$ac_dir/$ac_word" || continue
4255 ac_cv_prog_ac_ct_AR="ar"
4256 echo "$as_me:4256: found $ac_dir/$ac_word" >&5
4257 break
4258 done
4259
4260   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4261 fi
4262 fi
4263 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4264 if test -n "$ac_ct_AR"; then
4265   echo "$as_me:4265: result: $ac_ct_AR" >&5
4266 echo "${ECHO_T}$ac_ct_AR" >&6
4267 else
4268   echo "$as_me:4268: result: no" >&5
4269 echo "${ECHO_T}no" >&6
4270 fi
4271
4272   AR=$ac_ct_AR
4273 else
4274   AR="$ac_cv_prog_AR"
4275 fi
4276
4277 if test -n "$ac_tool_prefix"; then
4278   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4279 set dummy ${ac_tool_prefix}nm; ac_word=$2
4280 echo "$as_me:4280: checking for $ac_word" >&5
4281 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4282 if test "${ac_cv_prog_NM+set}" = set; then
4283   echo $ECHO_N "(cached) $ECHO_C" >&6
4284 else
4285   if test -n "$NM"; then
4286   ac_cv_prog_NM="$NM" # Let the user override the test.
4287 else
4288   ac_save_IFS=$IFS; IFS=$ac_path_separator
4289 ac_dummy="$PATH"
4290 for ac_dir in $ac_dummy; do
4291   IFS=$ac_save_IFS
4292   test -z "$ac_dir" && ac_dir=.
4293   $as_executable_p "$ac_dir/$ac_word" || continue
4294 ac_cv_prog_NM="${ac_tool_prefix}nm"
4295 echo "$as_me:4295: found $ac_dir/$ac_word" >&5
4296 break
4297 done
4298
4299 fi
4300 fi
4301 NM=$ac_cv_prog_NM
4302 if test -n "$NM"; then
4303   echo "$as_me:4303: result: $NM" >&5
4304 echo "${ECHO_T}$NM" >&6
4305 else
4306   echo "$as_me:4306: result: no" >&5
4307 echo "${ECHO_T}no" >&6
4308 fi
4309
4310 fi
4311 if test -z "$ac_cv_prog_NM"; then
4312   ac_ct_NM=$NM
4313   # Extract the first word of "nm", so it can be a program name with args.
4314 set dummy nm; ac_word=$2
4315 echo "$as_me:4315: checking for $ac_word" >&5
4316 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4317 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4318   echo $ECHO_N "(cached) $ECHO_C" >&6
4319 else
4320   if test -n "$ac_ct_NM"; then
4321   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4322 else
4323   ac_save_IFS=$IFS; IFS=$ac_path_separator
4324 ac_dummy="$PATH"
4325 for ac_dir in $ac_dummy; do
4326   IFS=$ac_save_IFS
4327   test -z "$ac_dir" && ac_dir=.
4328   $as_executable_p "$ac_dir/$ac_word" || continue
4329 ac_cv_prog_ac_ct_NM="nm"
4330 echo "$as_me:4330: found $ac_dir/$ac_word" >&5
4331 break
4332 done
4333
4334   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4335 fi
4336 fi
4337 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4338 if test -n "$ac_ct_NM"; then
4339   echo "$as_me:4339: result: $ac_ct_NM" >&5
4340 echo "${ECHO_T}$ac_ct_NM" >&6
4341 else
4342   echo "$as_me:4342: result: no" >&5
4343 echo "${ECHO_T}no" >&6
4344 fi
4345
4346   NM=$ac_ct_NM
4347 else
4348   NM="$ac_cv_prog_NM"
4349 fi
4350
4351 if test -n "$ac_tool_prefix"; then
4352   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4353 set dummy ${ac_tool_prefix}ar; ac_word=$2
4354 echo "$as_me:4354: checking for $ac_word" >&5
4355 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4356 if test "${ac_cv_prog_AR+set}" = set; then
4357   echo $ECHO_N "(cached) $ECHO_C" >&6
4358 else
4359   if test -n "$AR"; then
4360   ac_cv_prog_AR="$AR" # Let the user override the test.
4361 else
4362   ac_save_IFS=$IFS; IFS=$ac_path_separator
4363 ac_dummy="$PATH"
4364 for ac_dir in $ac_dummy; do
4365   IFS=$ac_save_IFS
4366   test -z "$ac_dir" && ac_dir=.
4367   $as_executable_p "$ac_dir/$ac_word" || continue
4368 ac_cv_prog_AR="${ac_tool_prefix}ar"
4369 echo "$as_me:4369: found $ac_dir/$ac_word" >&5
4370 break
4371 done
4372
4373 fi
4374 fi
4375 AR=$ac_cv_prog_AR
4376 if test -n "$AR"; then
4377   echo "$as_me:4377: result: $AR" >&5
4378 echo "${ECHO_T}$AR" >&6
4379 else
4380   echo "$as_me:4380: result: no" >&5
4381 echo "${ECHO_T}no" >&6
4382 fi
4383
4384 fi
4385 if test -z "$ac_cv_prog_AR"; then
4386   ac_ct_AR=$AR
4387   # Extract the first word of "ar", so it can be a program name with args.
4388 set dummy ar; ac_word=$2
4389 echo "$as_me:4389: checking for $ac_word" >&5
4390 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4391 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4392   echo $ECHO_N "(cached) $ECHO_C" >&6
4393 else
4394   if test -n "$ac_ct_AR"; then
4395   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4396 else
4397   ac_save_IFS=$IFS; IFS=$ac_path_separator
4398 ac_dummy="$PATH"
4399 for ac_dir in $ac_dummy; do
4400   IFS=$ac_save_IFS
4401   test -z "$ac_dir" && ac_dir=.
4402   $as_executable_p "$ac_dir/$ac_word" || continue
4403 ac_cv_prog_ac_ct_AR="ar"
4404 echo "$as_me:4404: found $ac_dir/$ac_word" >&5
4405 break
4406 done
4407
4408   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4409 fi
4410 fi
4411 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4412 if test -n "$ac_ct_AR"; then
4413   echo "$as_me:4413: result: $ac_ct_AR" >&5
4414 echo "${ECHO_T}$ac_ct_AR" >&6
4415 else
4416   echo "$as_me:4416: result: no" >&5
4417 echo "${ECHO_T}no" >&6
4418 fi
4419
4420   AR=$ac_ct_AR
4421 else
4422   AR="$ac_cv_prog_AR"
4423 fi
4424
4425 echo "$as_me:4425: checking for options to update archives" >&5
4426 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4427 if test "${cf_cv_ar_flags+set}" = set; then
4428   echo $ECHO_N "(cached) $ECHO_C" >&6
4429 else
4430
4431         cf_cv_ar_flags=unknown
4432         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4433         do
4434
4435                 # check if $ARFLAGS already contains this choice
4436                 if test "x$ARFLAGS" != "x" ; then
4437                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4438                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4439                                 cf_cv_ar_flags=
4440                                 break
4441                         fi
4442                 fi
4443
4444                 rm -f conftest.$ac_cv_objext
4445                 rm -f conftest.a
4446
4447                 cat >conftest.$ac_ext <<EOF
4448 #line 4448 "configure"
4449 int     testdata[3] = { 123, 456, 789 };
4450 EOF
4451                 if { (eval echo "$as_me:4451: \"$ac_compile\"") >&5
4452   (eval $ac_compile) 2>&5
4453   ac_status=$?
4454   echo "$as_me:4454: \$? = $ac_status" >&5
4455   (exit $ac_status); } ; then
4456                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4457                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4458                         if test -f conftest.a ; then
4459                                 cf_cv_ar_flags=$cf_ar_flags
4460                                 break
4461                         fi
4462                 else
4463                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4464
4465 echo "${as_me:-configure}:4465: testing cannot compile test-program ..." 1>&5
4466
4467                         break
4468                 fi
4469         done
4470         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4471
4472 fi
4473 echo "$as_me:4473: result: $cf_cv_ar_flags" >&5
4474 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4475
4476 if test -n "$ARFLAGS" ; then
4477         if test -n "$cf_cv_ar_flags" ; then
4478                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4479         fi
4480 else
4481         ARFLAGS=$cf_cv_ar_flags
4482 fi
4483
4484 echo "$as_me:4484: checking if you have specified an install-prefix" >&5
4485 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4486
4487 # Check whether --with-install-prefix or --without-install-prefix was given.
4488 if test "${with_install_prefix+set}" = set; then
4489   withval="$with_install_prefix"
4490   case "x$withval" in
4491         (xyes|xno)
4492                 ;;
4493         (*)     DESTDIR="$withval"
4494                 ;;
4495         esac
4496 fi;
4497 echo "$as_me:4497: result: $DESTDIR" >&5
4498 echo "${ECHO_T}$DESTDIR" >&6
4499
4500 ###############################################################################
4501
4502 # If we're cross-compiling, allow the user to override the tools and their
4503 # options.  The configure script is oriented toward identifying the host
4504 # compiler, etc., but we need a build compiler to generate parts of the source.
4505
4506 if test "$cross_compiling" = yes ; then
4507
4508         # defaults that we might want to override
4509         : ${BUILD_CFLAGS:=''}
4510         : ${BUILD_CPPFLAGS:=''}
4511         : ${BUILD_LDFLAGS:=''}
4512         : ${BUILD_LIBS:=''}
4513         : ${BUILD_EXEEXT:='$x'}
4514         : ${BUILD_OBJEXT:='o'}
4515
4516 # Check whether --with-build-cc or --without-build-cc was given.
4517 if test "${with_build_cc+set}" = set; then
4518   withval="$with_build_cc"
4519   BUILD_CC="$withval"
4520 else
4521   for ac_prog in gcc cc cl
4522 do
4523   # Extract the first word of "$ac_prog", so it can be a program name with args.
4524 set dummy $ac_prog; ac_word=$2
4525 echo "$as_me:4525: checking for $ac_word" >&5
4526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4527 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4528   echo $ECHO_N "(cached) $ECHO_C" >&6
4529 else
4530   if test -n "$BUILD_CC"; then
4531   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4532 else
4533   ac_save_IFS=$IFS; IFS=$ac_path_separator
4534 ac_dummy="$PATH"
4535 for ac_dir in $ac_dummy; do
4536   IFS=$ac_save_IFS
4537   test -z "$ac_dir" && ac_dir=.
4538   $as_executable_p "$ac_dir/$ac_word" || continue
4539 ac_cv_prog_BUILD_CC="$ac_prog"
4540 echo "$as_me:4540: found $ac_dir/$ac_word" >&5
4541 break
4542 done
4543
4544 fi
4545 fi
4546 BUILD_CC=$ac_cv_prog_BUILD_CC
4547 if test -n "$BUILD_CC"; then
4548   echo "$as_me:4548: result: $BUILD_CC" >&5
4549 echo "${ECHO_T}$BUILD_CC" >&6
4550 else
4551   echo "$as_me:4551: result: no" >&5
4552 echo "${ECHO_T}no" >&6
4553 fi
4554
4555   test -n "$BUILD_CC" && break
4556 done
4557
4558 fi;
4559         echo "$as_me:4559: checking for native build C compiler" >&5
4560 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4561         echo "$as_me:4561: result: $BUILD_CC" >&5
4562 echo "${ECHO_T}$BUILD_CC" >&6
4563
4564         echo "$as_me:4564: checking for native build C preprocessor" >&5
4565 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4566
4567 # Check whether --with-build-cpp or --without-build-cpp was given.
4568 if test "${with_build_cpp+set}" = set; then
4569   withval="$with_build_cpp"
4570   BUILD_CPP="$withval"
4571 else
4572   BUILD_CPP='${BUILD_CC} -E'
4573 fi;
4574         echo "$as_me:4574: result: $BUILD_CPP" >&5
4575 echo "${ECHO_T}$BUILD_CPP" >&6
4576
4577         echo "$as_me:4577: checking for native build C flags" >&5
4578 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4579
4580 # Check whether --with-build-cflags or --without-build-cflags was given.
4581 if test "${with_build_cflags+set}" = set; then
4582   withval="$with_build_cflags"
4583   BUILD_CFLAGS="$withval"
4584 fi;
4585         echo "$as_me:4585: result: $BUILD_CFLAGS" >&5
4586 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4587
4588         echo "$as_me:4588: checking for native build C preprocessor-flags" >&5
4589 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4590
4591 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4592 if test "${with_build_cppflags+set}" = set; then
4593   withval="$with_build_cppflags"
4594   BUILD_CPPFLAGS="$withval"
4595 fi;
4596         echo "$as_me:4596: result: $BUILD_CPPFLAGS" >&5
4597 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4598
4599         echo "$as_me:4599: checking for native build linker-flags" >&5
4600 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4601
4602 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4603 if test "${with_build_ldflags+set}" = set; then
4604   withval="$with_build_ldflags"
4605   BUILD_LDFLAGS="$withval"
4606 fi;
4607         echo "$as_me:4607: result: $BUILD_LDFLAGS" >&5
4608 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4609
4610         echo "$as_me:4610: checking for native build linker-libraries" >&5
4611 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4612
4613 # Check whether --with-build-libs or --without-build-libs was given.
4614 if test "${with_build_libs+set}" = set; then
4615   withval="$with_build_libs"
4616   BUILD_LIBS="$withval"
4617 fi;
4618         echo "$as_me:4618: result: $BUILD_LIBS" >&5
4619 echo "${ECHO_T}$BUILD_LIBS" >&6
4620
4621         # this assumes we're on Unix.
4622         BUILD_EXEEXT=
4623         BUILD_OBJEXT=o
4624
4625         : ${BUILD_CC:='${CC}'}
4626
4627         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4628                 { { echo "$as_me:4628: error: Cross-build requires two compilers.
4629 Use --with-build-cc to specify the native compiler." >&5
4630 echo "$as_me: error: Cross-build requires two compilers.
4631 Use --with-build-cc to specify the native compiler." >&2;}
4632    { (exit 1); exit 1; }; }
4633         fi
4634
4635 else
4636         : ${BUILD_CC:='${CC}'}
4637         : ${BUILD_CPP:='${CPP}'}
4638         : ${BUILD_CFLAGS:='${CFLAGS}'}
4639         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4640         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4641         : ${BUILD_LIBS:='${LIBS}'}
4642         : ${BUILD_EXEEXT:='$x'}
4643         : ${BUILD_OBJEXT:='o'}
4644 fi
4645
4646 ###############################################################################
4647
4648 ### Options to allow the user to specify the set of libraries which are used.
4649 ### Use "--without-normal --with-shared" to allow the default model to be
4650 ### shared, for example.
4651 cf_list_models=""
4652
4653 echo "$as_me:4653: checking if libtool -version-number should be used" >&5
4654 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4655
4656 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4657 if test "${enable_libtool_version+set}" = set; then
4658   enableval="$enable_libtool_version"
4659   test "$enableval" != no && enableval=yes
4660         if test "$enableval" != "yes" ; then
4661     cf_libtool_version=no
4662         else
4663                 cf_libtool_version=yes
4664         fi
4665 else
4666   enableval=yes
4667         cf_libtool_version=yes
4668
4669 fi;
4670 echo "$as_me:4670: result: $cf_libtool_version" >&5
4671 echo "${ECHO_T}$cf_libtool_version" >&6
4672
4673 if test "$cf_libtool_version" = yes ; then
4674         LIBTOOL_VERSION="-version-number"
4675 else
4676         LIBTOOL_VERSION="-version-info"
4677         case "x$VERSION" in
4678         (x)
4679                 { echo "$as_me:4679: WARNING: VERSION was not set" >&5
4680 echo "$as_me: WARNING: VERSION was not set" >&2;}
4681                 ;;
4682         (x*.*.*)
4683                 ABI_VERSION="$VERSION"
4684                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4685
4686 echo "${as_me:-configure}:4686: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4687
4688                 ;;
4689         (x*:*:*)
4690                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4691                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4692
4693 echo "${as_me:-configure}:4693: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4694
4695                 ;;
4696         (*)
4697                 { echo "$as_me:4697: WARNING: unexpected VERSION value: $VERSION" >&5
4698 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4699                 ;;
4700         esac
4701 fi
4702
4703 LIBTOOL=
4704
4705 # common library maintenance symbols that are convenient for libtool scripts:
4706 LIB_CREATE='${AR} -cr'
4707 LIB_OBJECT='${OBJECTS}'
4708 LIB_SUFFIX=.a
4709 LIB_PREP="$RANLIB"
4710
4711 # symbols used to prop libtool up to enable it to determine what it should be
4712 # doing:
4713 LIB_CLEAN=
4714 LIB_COMPILE=
4715 LIB_LINK='${CC}'
4716 LIB_INSTALL=
4717 LIB_UNINSTALL=
4718
4719 echo "$as_me:4719: checking if you want to build libraries with libtool" >&5
4720 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4721
4722 # Check whether --with-libtool or --without-libtool was given.
4723 if test "${with_libtool+set}" = set; then
4724   withval="$with_libtool"
4725   with_libtool=$withval
4726 else
4727   with_libtool=no
4728 fi;
4729 echo "$as_me:4729: result: $with_libtool" >&5
4730 echo "${ECHO_T}$with_libtool" >&6
4731 if test "$with_libtool" != "no"; then
4732
4733         if test "$with_libtool" != "yes" ; then
4734
4735 if test "x$prefix" != xNONE; then
4736         cf_path_syntax="$prefix"
4737 else
4738         cf_path_syntax="$ac_default_prefix"
4739 fi
4740
4741 case ".$with_libtool" in
4742 (.\$\(*\)*|.\'*\'*)
4743         ;;
4744 (..|./*|.\\*)
4745         ;;
4746 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4747         ;;
4748 (.\${*prefix}*|.\${*dir}*)
4749         eval with_libtool="$with_libtool"
4750         case ".$with_libtool" in
4751         (.NONE/*)
4752                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4753                 ;;
4754         esac
4755         ;;
4756 (.no|.NONE/*)
4757         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4758         ;;
4759 (*)
4760         { { echo "$as_me:4760: error: expected a pathname, not \"$with_libtool\"" >&5
4761 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4762    { (exit 1); exit 1; }; }
4763         ;;
4764 esac
4765
4766                 LIBTOOL=$with_libtool
4767         else
4768                 if test -n "$ac_tool_prefix"; then
4769   for ac_prog in libtool glibtool
4770   do
4771     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4772 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4773 echo "$as_me:4773: checking for $ac_word" >&5
4774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4775 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4776   echo $ECHO_N "(cached) $ECHO_C" >&6
4777 else
4778   if test -n "$LIBTOOL"; then
4779   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4780 else
4781   ac_save_IFS=$IFS; IFS=$ac_path_separator
4782 ac_dummy="$PATH"
4783 for ac_dir in $ac_dummy; do
4784   IFS=$ac_save_IFS
4785   test -z "$ac_dir" && ac_dir=.
4786   $as_executable_p "$ac_dir/$ac_word" || continue
4787 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4788 echo "$as_me:4788: found $ac_dir/$ac_word" >&5
4789 break
4790 done
4791
4792 fi
4793 fi
4794 LIBTOOL=$ac_cv_prog_LIBTOOL
4795 if test -n "$LIBTOOL"; then
4796   echo "$as_me:4796: result: $LIBTOOL" >&5
4797 echo "${ECHO_T}$LIBTOOL" >&6
4798 else
4799   echo "$as_me:4799: result: no" >&5
4800 echo "${ECHO_T}no" >&6
4801 fi
4802
4803     test -n "$LIBTOOL" && break
4804   done
4805 fi
4806 if test -z "$LIBTOOL"; then
4807   ac_ct_LIBTOOL=$LIBTOOL
4808   for ac_prog in libtool glibtool
4809 do
4810   # Extract the first word of "$ac_prog", so it can be a program name with args.
4811 set dummy $ac_prog; ac_word=$2
4812 echo "$as_me:4812: checking for $ac_word" >&5
4813 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4814 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4815   echo $ECHO_N "(cached) $ECHO_C" >&6
4816 else
4817   if test -n "$ac_ct_LIBTOOL"; then
4818   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4819 else
4820   ac_save_IFS=$IFS; IFS=$ac_path_separator
4821 ac_dummy="$PATH"
4822 for ac_dir in $ac_dummy; do
4823   IFS=$ac_save_IFS
4824   test -z "$ac_dir" && ac_dir=.
4825   $as_executable_p "$ac_dir/$ac_word" || continue
4826 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4827 echo "$as_me:4827: found $ac_dir/$ac_word" >&5
4828 break
4829 done
4830
4831 fi
4832 fi
4833 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4834 if test -n "$ac_ct_LIBTOOL"; then
4835   echo "$as_me:4835: result: $ac_ct_LIBTOOL" >&5
4836 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4837 else
4838   echo "$as_me:4838: result: no" >&5
4839 echo "${ECHO_T}no" >&6
4840 fi
4841
4842   test -n "$ac_ct_LIBTOOL" && break
4843 done
4844 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4845
4846   LIBTOOL=$ac_ct_LIBTOOL
4847 fi
4848
4849 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4850 then
4851         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.].*//'`
4852 else
4853         cf_cv_libtool_version=
4854 fi
4855 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4856
4857                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4858                 then
4859
4860 unset ac_cv_prog_ac_ct_LIBTOOL
4861 unset ac_ct_LIBTOOL
4862 unset LIBTOOL
4863
4864                         if test -n "$ac_tool_prefix"; then
4865   for ac_prog in glibtool
4866   do
4867     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4868 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4869 echo "$as_me:4869: checking for $ac_word" >&5
4870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4871 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   if test -n "$LIBTOOL"; then
4875   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4876 else
4877   ac_save_IFS=$IFS; IFS=$ac_path_separator
4878 ac_dummy="$PATH"
4879 for ac_dir in $ac_dummy; do
4880   IFS=$ac_save_IFS
4881   test -z "$ac_dir" && ac_dir=.
4882   $as_executable_p "$ac_dir/$ac_word" || continue
4883 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4884 echo "$as_me:4884: found $ac_dir/$ac_word" >&5
4885 break
4886 done
4887
4888 fi
4889 fi
4890 LIBTOOL=$ac_cv_prog_LIBTOOL
4891 if test -n "$LIBTOOL"; then
4892   echo "$as_me:4892: result: $LIBTOOL" >&5
4893 echo "${ECHO_T}$LIBTOOL" >&6
4894 else
4895   echo "$as_me:4895: result: no" >&5
4896 echo "${ECHO_T}no" >&6
4897 fi
4898
4899     test -n "$LIBTOOL" && break
4900   done
4901 fi
4902 if test -z "$LIBTOOL"; then
4903   ac_ct_LIBTOOL=$LIBTOOL
4904   for ac_prog in glibtool
4905 do
4906   # Extract the first word of "$ac_prog", so it can be a program name with args.
4907 set dummy $ac_prog; ac_word=$2
4908 echo "$as_me:4908: checking for $ac_word" >&5
4909 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4910 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4911   echo $ECHO_N "(cached) $ECHO_C" >&6
4912 else
4913   if test -n "$ac_ct_LIBTOOL"; then
4914   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4915 else
4916   ac_save_IFS=$IFS; IFS=$ac_path_separator
4917 ac_dummy="$PATH"
4918 for ac_dir in $ac_dummy; do
4919   IFS=$ac_save_IFS
4920   test -z "$ac_dir" && ac_dir=.
4921   $as_executable_p "$ac_dir/$ac_word" || continue
4922 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4923 echo "$as_me:4923: found $ac_dir/$ac_word" >&5
4924 break
4925 done
4926
4927 fi
4928 fi
4929 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4930 if test -n "$ac_ct_LIBTOOL"; then
4931   echo "$as_me:4931: result: $ac_ct_LIBTOOL" >&5
4932 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4933 else
4934   echo "$as_me:4934: result: no" >&5
4935 echo "${ECHO_T}no" >&6
4936 fi
4937
4938   test -n "$ac_ct_LIBTOOL" && break
4939 done
4940 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4941
4942   LIBTOOL=$ac_ct_LIBTOOL
4943 fi
4944
4945 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4946 then
4947         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.].*//'`
4948 else
4949         cf_cv_libtool_version=
4950 fi
4951 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4952
4953                 fi
4954         fi
4955         if test -z "$LIBTOOL" ; then
4956                 { { echo "$as_me:4956: error: Cannot find libtool" >&5
4957 echo "$as_me: error: Cannot find libtool" >&2;}
4958    { (exit 1); exit 1; }; }
4959         fi
4960         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4961         LIB_OBJECT='${OBJECTS:.o=.lo}'
4962         LIB_SUFFIX=.la
4963         LIB_CLEAN='${LIBTOOL} --mode=clean'
4964         LIB_COMPILE='${LIBTOOL} --mode=compile'
4965         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4966         LIB_INSTALL='${LIBTOOL} --mode=install'
4967         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4968         LIB_PREP=:
4969
4970 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4971 then
4972         echo "$as_me:4972: checking version of $LIBTOOL" >&5
4973 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4974
4975 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4976 then
4977         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.].*//'`
4978 else
4979         cf_cv_libtool_version=
4980 fi
4981 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4982
4983         echo "$as_me:4983: result: $cf_cv_libtool_version" >&5
4984 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4985         if test -z "$cf_cv_libtool_version" ; then
4986                 { { echo "$as_me:4986: error: This is not GNU libtool" >&5
4987 echo "$as_me: error: This is not GNU libtool" >&2;}
4988    { (exit 1); exit 1; }; }
4989         fi
4990 else
4991         { { echo "$as_me:4991: error: GNU libtool has not been found" >&5
4992 echo "$as_me: error: GNU libtool has not been found" >&2;}
4993    { (exit 1); exit 1; }; }
4994 fi
4995
4996         # special hack to add -no-undefined (which libtool should do for itself)
4997         LT_UNDEF=
4998         case "$cf_cv_system_name" in
4999         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5000                 LT_UNDEF=-no-undefined
5001                 ;;
5002         esac
5003
5004         # special hack to add --tag option for C++ compiler
5005         case $cf_cv_libtool_version in
5006         (1.[5-9]*|[2-9].[0-9.a-z]*)
5007                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5008                 LIBTOOL="$LIBTOOL --tag=CC"
5009                 ;;
5010         (*)
5011                 LIBTOOL_CXX="$LIBTOOL"
5012                 ;;
5013         esac
5014 else
5015         LIBTOOL=""
5016         LIBTOOL_CXX=""
5017 fi
5018
5019 test -z "$LIBTOOL" && ECHO_LT=
5020
5021 if test "$with_libtool" != "no" ; then
5022
5023 cf_list_models="$cf_list_models libtool"
5024
5025 else
5026
5027 echo "$as_me:5027: checking if you want to build shared libraries" >&5
5028 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5029
5030 # Check whether --with-shared or --without-shared was given.
5031 if test "${with_shared+set}" = set; then
5032   withval="$with_shared"
5033   with_shared=$withval
5034 else
5035   with_shared=no
5036 fi;
5037 echo "$as_me:5037: result: $with_shared" >&5
5038 echo "${ECHO_T}$with_shared" >&6
5039 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5040
5041 echo "$as_me:5041: checking if you want to build static libraries" >&5
5042 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5043
5044 # Check whether --with-normal or --without-normal was given.
5045 if test "${with_normal+set}" = set; then
5046   withval="$with_normal"
5047   with_normal=$withval
5048 else
5049   with_normal=yes
5050 fi;
5051 echo "$as_me:5051: result: $with_normal" >&5
5052 echo "${ECHO_T}$with_normal" >&6
5053 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5054
5055 echo "$as_me:5055: checking if you want to build debug libraries" >&5
5056 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5057
5058 # Check whether --with-debug or --without-debug was given.
5059 if test "${with_debug+set}" = set; then
5060   withval="$with_debug"
5061   with_debug=$withval
5062 else
5063   with_debug=yes
5064 fi;
5065 echo "$as_me:5065: result: $with_debug" >&5
5066 echo "${ECHO_T}$with_debug" >&6
5067 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5068
5069 echo "$as_me:5069: checking if you want to build profiling libraries" >&5
5070 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5071
5072 # Check whether --with-profile or --without-profile was given.
5073 if test "${with_profile+set}" = set; then
5074   withval="$with_profile"
5075   with_profile=$withval
5076 else
5077   with_profile=no
5078 fi;
5079 echo "$as_me:5079: result: $with_profile" >&5
5080 echo "${ECHO_T}$with_profile" >&6
5081 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5082
5083 fi
5084
5085 if test "X$cf_with_cxx_binding" != Xno; then
5086 if test "x$with_shared" = "xyes"; then
5087 echo "$as_me:5087: checking if you want to build C++ shared libraries" >&5
5088 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5089
5090 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5091 if test "${with_cxx_shared+set}" = set; then
5092   withval="$with_cxx_shared"
5093   with_shared_cxx=$withval
5094 else
5095   with_shared_cxx=no
5096 fi;
5097 echo "$as_me:5097: result: $with_shared_cxx" >&5
5098 echo "${ECHO_T}$with_shared_cxx" >&6
5099 fi
5100 fi
5101
5102 ###############################################################################
5103
5104 echo "$as_me:5104: checking for specified models" >&5
5105 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5106 test -z "$cf_list_models" && cf_list_models=normal
5107 test "$with_libtool" != "no" && cf_list_models=libtool
5108 echo "$as_me:5108: result: $cf_list_models" >&5
5109 echo "${ECHO_T}$cf_list_models" >&6
5110
5111 ### Use the first model as the default, and save its suffix for use in building
5112 ### up test-applications.
5113 echo "$as_me:5113: checking for default model" >&5
5114 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5115 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5116 echo "$as_me:5116: result: $DFT_LWR_MODEL" >&5
5117 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5118
5119 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5120
5121 TICS_NAME=tic
5122
5123 TINFO_NAME=tinfo
5124
5125 LIB_NAME=ncurses
5126
5127 LIB_DIR=../lib
5128 LIB_2ND=../../lib
5129
5130 echo "$as_me:5130: checking if you want to have a library-prefix" >&5
5131 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5132
5133 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5134 if test "${with_lib_prefix+set}" = set; then
5135   withval="$with_lib_prefix"
5136   with_lib_prefix=$withval
5137 else
5138   with_lib_prefix=auto
5139 fi;
5140 echo "$as_me:5140: result: $with_lib_prefix" >&5
5141 echo "${ECHO_T}$with_lib_prefix" >&6
5142
5143 if test $with_lib_prefix = auto
5144 then
5145
5146         case $cf_cv_system_name in
5147         (OS/2*|os2*)
5148                 if test "$DFT_LWR_MODEL" = libtool; then
5149                         LIB_PREFIX='lib'
5150                 else
5151                         LIB_PREFIX=''
5152                 fi
5153                 ;;
5154         (*)     LIB_PREFIX='lib'
5155                 ;;
5156         esac
5157 cf_prefix=$LIB_PREFIX
5158
5159 elif test $with_lib_prefix = no
5160 then
5161         LIB_PREFIX=
5162 else
5163         LIB_PREFIX=$with_lib_prefix
5164 fi
5165
5166 LIB_SUFFIX=
5167
5168         echo "$as_me:5168: checking for PATH separator" >&5
5169 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5170         case $cf_cv_system_name in
5171         (os2*)  PATH_SEPARATOR=';'  ;;
5172         (*)     ${PATH_SEPARATOR:=':'}  ;;
5173         esac
5174
5175         echo "$as_me:5175: result: $PATH_SEPARATOR" >&5
5176 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5177
5178 ###############################################################################
5179
5180 echo "$as_me:5180: checking if you want to build a separate terminfo library" >&5
5181 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5182
5183 # Check whether --with-termlib or --without-termlib was given.
5184 if test "${with_termlib+set}" = set; then
5185   withval="$with_termlib"
5186   with_termlib=$withval
5187 else
5188   with_termlib=no
5189 fi;
5190 echo "$as_me:5190: result: $with_termlib" >&5
5191 echo "${ECHO_T}$with_termlib" >&6
5192
5193 echo "$as_me:5193: checking if you want to build a separate tic library" >&5
5194 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5195
5196 # Check whether --with-ticlib or --without-ticlib was given.
5197 if test "${with_ticlib+set}" = set; then
5198   withval="$with_ticlib"
5199   with_ticlib=$withval
5200 else
5201   with_ticlib=no
5202 fi;
5203 echo "$as_me:5203: result: $with_ticlib" >&5
5204 echo "${ECHO_T}$with_ticlib" >&6
5205
5206 ### Checks for special libraries, must be done up-front.
5207 SHLIB_LIST=""
5208
5209 echo "$as_me:5209: checking if you want to link with the GPM mouse library" >&5
5210 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5211
5212 # Check whether --with-gpm or --without-gpm was given.
5213 if test "${with_gpm+set}" = set; then
5214   withval="$with_gpm"
5215   with_gpm=$withval
5216 else
5217   with_gpm=maybe
5218 fi;
5219 echo "$as_me:5219: result: $with_gpm" >&5
5220 echo "${ECHO_T}$with_gpm" >&6
5221
5222 if test "$with_gpm" != no ; then
5223         echo "$as_me:5223: checking for gpm.h" >&5
5224 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5225 if test "${ac_cv_header_gpm_h+set}" = set; then
5226   echo $ECHO_N "(cached) $ECHO_C" >&6
5227 else
5228   cat >conftest.$ac_ext <<_ACEOF
5229 #line 5229 "configure"
5230 #include "confdefs.h"
5231 #include <gpm.h>
5232 _ACEOF
5233 if { (eval echo "$as_me:5233: \"$ac_cpp conftest.$ac_ext\"") >&5
5234   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5235   ac_status=$?
5236   egrep -v '^ *\+' conftest.er1 >conftest.err
5237   rm -f conftest.er1
5238   cat conftest.err >&5
5239   echo "$as_me:5239: \$? = $ac_status" >&5
5240   (exit $ac_status); } >/dev/null; then
5241   if test -s conftest.err; then
5242     ac_cpp_err=$ac_c_preproc_warn_flag
5243   else
5244     ac_cpp_err=
5245   fi
5246 else
5247   ac_cpp_err=yes
5248 fi
5249 if test -z "$ac_cpp_err"; then
5250   ac_cv_header_gpm_h=yes
5251 else
5252   echo "$as_me: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254   ac_cv_header_gpm_h=no
5255 fi
5256 rm -f conftest.err conftest.$ac_ext
5257 fi
5258 echo "$as_me:5258: result: $ac_cv_header_gpm_h" >&5
5259 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5260 if test $ac_cv_header_gpm_h = yes; then
5261
5262 cat >>confdefs.h <<\EOF
5263 #define HAVE_GPM_H 1
5264 EOF
5265
5266                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5267                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5268
5269 echo "${as_me:-configure}:5269: testing assuming we really have GPM library ..." 1>&5
5270
5271 cat >>confdefs.h <<\EOF
5272 #define HAVE_LIBGPM 1
5273 EOF
5274
5275                         with_gpm=yes
5276                 else
5277                         echo "$as_me:5277: checking for Gpm_Open in -lgpm" >&5
5278 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5279 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5280   echo $ECHO_N "(cached) $ECHO_C" >&6
5281 else
5282   ac_check_lib_save_LIBS=$LIBS
5283 LIBS="-lgpm  $LIBS"
5284 cat >conftest.$ac_ext <<_ACEOF
5285 #line 5285 "configure"
5286 #include "confdefs.h"
5287
5288 /* Override any gcc2 internal prototype to avoid an error.  */
5289 #ifdef __cplusplus
5290 extern "C"
5291 #endif
5292 /* We use char because int might match the return type of a gcc2
5293    builtin and then its argument prototype would still apply.  */
5294 char Gpm_Open ();
5295 int
5296 main ()
5297 {
5298 Gpm_Open ();
5299   ;
5300   return 0;
5301 }
5302 _ACEOF
5303 rm -f conftest.$ac_objext conftest$ac_exeext
5304 if { (eval echo "$as_me:5304: \"$ac_link\"") >&5
5305   (eval $ac_link) 2>&5
5306   ac_status=$?
5307   echo "$as_me:5307: \$? = $ac_status" >&5
5308   (exit $ac_status); } &&
5309          { ac_try='test -s conftest$ac_exeext'
5310   { (eval echo "$as_me:5310: \"$ac_try\"") >&5
5311   (eval $ac_try) 2>&5
5312   ac_status=$?
5313   echo "$as_me:5313: \$? = $ac_status" >&5
5314   (exit $ac_status); }; }; then
5315   ac_cv_lib_gpm_Gpm_Open=yes
5316 else
5317   echo "$as_me: failed program was:" >&5
5318 cat conftest.$ac_ext >&5
5319 ac_cv_lib_gpm_Gpm_Open=no
5320 fi
5321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5322 LIBS=$ac_check_lib_save_LIBS
5323 fi
5324 echo "$as_me:5324: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5325 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5326 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5327   :
5328 else
5329
5330                                 if test "$with_gpm" = maybe; then
5331                                         { echo "$as_me:5331: WARNING: Cannot link with GPM library" >&5
5332 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5333                                         with_gpm=no
5334                                 else
5335                                         { { echo "$as_me:5335: error: Cannot link with GPM library" >&5
5336 echo "$as_me: error: Cannot link with GPM library" >&2;}
5337    { (exit 1); exit 1; }; }
5338                                 fi
5339
5340 fi
5341
5342                 fi
5343
5344 else
5345
5346                 test "$with_gpm" != maybe && { echo "$as_me:5346: WARNING: Cannot find GPM header" >&5
5347 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5348                 with_gpm=no
5349
5350 fi
5351
5352 fi
5353
5354 if test "$with_gpm" != no ; then
5355         echo "$as_me:5355: checking if you want to load GPM dynamically" >&5
5356 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5357
5358 # Check whether --with-dlsym or --without-dlsym was given.
5359 if test "${with_dlsym+set}" = set; then
5360   withval="$with_dlsym"
5361   with_dlsym=$withval
5362 else
5363   with_dlsym=yes
5364 fi;
5365         echo "$as_me:5365: result: $with_dlsym" >&5
5366 echo "${ECHO_T}$with_dlsym" >&6
5367         if test "x$with_dlsym" = xyes ; then
5368
5369 cf_have_dlsym=no
5370 echo "$as_me:5370: checking for dlsym" >&5
5371 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5372 if test "${ac_cv_func_dlsym+set}" = set; then
5373   echo $ECHO_N "(cached) $ECHO_C" >&6
5374 else
5375   cat >conftest.$ac_ext <<_ACEOF
5376 #line 5376 "configure"
5377 #include "confdefs.h"
5378 /* System header to define __stub macros and hopefully few prototypes,
5379     which can conflict with char dlsym (); below.  */
5380 #include <assert.h>
5381 /* Override any gcc2 internal prototype to avoid an error.  */
5382 #ifdef __cplusplus
5383 extern "C"
5384 #endif
5385 /* We use char because int might match the return type of a gcc2
5386    builtin and then its argument prototype would still apply.  */
5387 char dlsym ();
5388 char (*f) ();
5389
5390 int
5391 main ()
5392 {
5393 /* The GNU C library defines this for functions which it implements
5394     to always fail with ENOSYS.  Some functions are actually named
5395     something starting with __ and the normal name is an alias.  */
5396 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5397 choke me
5398 #else
5399 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5400 #endif
5401
5402   ;
5403   return 0;
5404 }
5405 _ACEOF
5406 rm -f conftest.$ac_objext conftest$ac_exeext
5407 if { (eval echo "$as_me:5407: \"$ac_link\"") >&5
5408   (eval $ac_link) 2>&5
5409   ac_status=$?
5410   echo "$as_me:5410: \$? = $ac_status" >&5
5411   (exit $ac_status); } &&
5412          { ac_try='test -s conftest$ac_exeext'
5413   { (eval echo "$as_me:5413: \"$ac_try\"") >&5
5414   (eval $ac_try) 2>&5
5415   ac_status=$?
5416   echo "$as_me:5416: \$? = $ac_status" >&5
5417   (exit $ac_status); }; }; then
5418   ac_cv_func_dlsym=yes
5419 else
5420   echo "$as_me: failed program was:" >&5
5421 cat conftest.$ac_ext >&5
5422 ac_cv_func_dlsym=no
5423 fi
5424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5425 fi
5426 echo "$as_me:5426: result: $ac_cv_func_dlsym" >&5
5427 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5428 if test $ac_cv_func_dlsym = yes; then
5429   cf_have_dlsym=yes
5430 else
5431
5432 cf_have_libdl=no
5433 echo "$as_me:5433: checking for dlsym in -ldl" >&5
5434 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5435 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5436   echo $ECHO_N "(cached) $ECHO_C" >&6
5437 else
5438   ac_check_lib_save_LIBS=$LIBS
5439 LIBS="-ldl  $LIBS"
5440 cat >conftest.$ac_ext <<_ACEOF
5441 #line 5441 "configure"
5442 #include "confdefs.h"
5443
5444 /* Override any gcc2 internal prototype to avoid an error.  */
5445 #ifdef __cplusplus
5446 extern "C"
5447 #endif
5448 /* We use char because int might match the return type of a gcc2
5449    builtin and then its argument prototype would still apply.  */
5450 char dlsym ();
5451 int
5452 main ()
5453 {
5454 dlsym ();
5455   ;
5456   return 0;
5457 }
5458 _ACEOF
5459 rm -f conftest.$ac_objext conftest$ac_exeext
5460 if { (eval echo "$as_me:5460: \"$ac_link\"") >&5
5461   (eval $ac_link) 2>&5
5462   ac_status=$?
5463   echo "$as_me:5463: \$? = $ac_status" >&5
5464   (exit $ac_status); } &&
5465          { ac_try='test -s conftest$ac_exeext'
5466   { (eval echo "$as_me:5466: \"$ac_try\"") >&5
5467   (eval $ac_try) 2>&5
5468   ac_status=$?
5469   echo "$as_me:5469: \$? = $ac_status" >&5
5470   (exit $ac_status); }; }; then
5471   ac_cv_lib_dl_dlsym=yes
5472 else
5473   echo "$as_me: failed program was:" >&5
5474 cat conftest.$ac_ext >&5
5475 ac_cv_lib_dl_dlsym=no
5476 fi
5477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5478 LIBS=$ac_check_lib_save_LIBS
5479 fi
5480 echo "$as_me:5480: result: $ac_cv_lib_dl_dlsym" >&5
5481 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5482 if test $ac_cv_lib_dl_dlsym = yes; then
5483
5484         cf_have_dlsym=yes
5485         cf_have_libdl=yes
5486 fi
5487
5488 fi
5489
5490 if test "$cf_have_dlsym" = yes ; then
5491         test "$cf_have_libdl" = yes && {
5492 cf_add_libs="-ldl"
5493 # Filter out duplicates - this happens with badly-designed ".pc" files...
5494 for cf_add_1lib in $LIBS
5495 do
5496         for cf_add_2lib in $cf_add_libs
5497         do
5498                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5499                 then
5500                         cf_add_1lib=
5501                         break
5502                 fi
5503         done
5504         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5505 done
5506 LIBS="$cf_add_libs"
5507  }
5508
5509         echo "$as_me:5509: checking whether able to link to dl*() functions" >&5
5510 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5511         cat >conftest.$ac_ext <<_ACEOF
5512 #line 5512 "configure"
5513 #include "confdefs.h"
5514 #include <dlfcn.h>
5515 int
5516 main ()
5517 {
5518
5519                 void *obj;
5520                 if ((obj = dlopen("filename", 0)) != 0) {
5521                         if (dlsym(obj, "symbolname") == 0) {
5522                         dlclose(obj);
5523                         }
5524                 }
5525   ;
5526   return 0;
5527 }
5528 _ACEOF
5529 rm -f conftest.$ac_objext conftest$ac_exeext
5530 if { (eval echo "$as_me:5530: \"$ac_link\"") >&5
5531   (eval $ac_link) 2>&5
5532   ac_status=$?
5533   echo "$as_me:5533: \$? = $ac_status" >&5
5534   (exit $ac_status); } &&
5535          { ac_try='test -s conftest$ac_exeext'
5536   { (eval echo "$as_me:5536: \"$ac_try\"") >&5
5537   (eval $ac_try) 2>&5
5538   ac_status=$?
5539   echo "$as_me:5539: \$? = $ac_status" >&5
5540   (exit $ac_status); }; }; then
5541
5542 cat >>confdefs.h <<\EOF
5543 #define HAVE_LIBDL 1
5544 EOF
5545
5546 else
5547   echo "$as_me: failed program was:" >&5
5548 cat conftest.$ac_ext >&5
5549
5550                 { { echo "$as_me:5550: error: Cannot link test program for libdl" >&5
5551 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5552    { (exit 1); exit 1; }; }
5553 fi
5554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5555         echo "$as_me:5555: result: ok" >&5
5556 echo "${ECHO_T}ok" >&6
5557 else
5558         { { echo "$as_me:5558: error: Cannot find dlsym function" >&5
5559 echo "$as_me: error: Cannot find dlsym function" >&2;}
5560    { (exit 1); exit 1; }; }
5561 fi
5562
5563                 if test "x$with_gpm" != xyes ; then
5564                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5565
5566 echo "${as_me:-configure}:5566: testing assuming soname for gpm is $with_gpm ..." 1>&5
5567
5568                         cf_cv_gpm_soname="$with_gpm"
5569                 else
5570
5571 echo "$as_me:5571: checking for soname of gpm library" >&5
5572 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5573 if test "${cf_cv_gpm_soname+set}" = set; then
5574   echo $ECHO_N "(cached) $ECHO_C" >&6
5575 else
5576
5577 cf_cv_gpm_soname=unknown
5578 if test "$cross_compiling" != yes ; then
5579 cat >conftest.$ac_ext <<CF_EOF
5580 #include <gpm.h>
5581 int main()
5582 {
5583 if (Gpm_Open(0,0)) Gpm_Close();
5584         ${cf_cv_main_return:-return}(0);
5585 }
5586 CF_EOF
5587 cf_save_LIBS="$LIBS"
5588
5589 cf_add_libs="-lgpm"
5590 # Filter out duplicates - this happens with badly-designed ".pc" files...
5591 for cf_add_1lib in $LIBS
5592 do
5593         for cf_add_2lib in $cf_add_libs
5594         do
5595                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5596                 then
5597                         cf_add_1lib=
5598                         break
5599                 fi
5600         done
5601         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5602 done
5603 LIBS="$cf_add_libs"
5604
5605         if { (eval echo "$as_me:5605: \"$ac_compile\"") >&5
5606   (eval $ac_compile) 2>&5
5607   ac_status=$?
5608   echo "$as_me:5608: \$? = $ac_status" >&5
5609   (exit $ac_status); } ; then
5610                 if { (eval echo "$as_me:5610: \"$ac_link\"") >&5
5611   (eval $ac_link) 2>&5
5612   ac_status=$?
5613   echo "$as_me:5613: \$? = $ac_status" >&5
5614   (exit $ac_status); } ; then
5615                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5616                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5617                 fi
5618         fi
5619 rm -rf conftest*
5620 LIBS="$cf_save_LIBS"
5621 fi
5622
5623 fi
5624 echo "$as_me:5624: result: $cf_cv_gpm_soname" >&5
5625 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5626
5627                 fi
5628                 test "$cf_cv_gpm_soname" != "unknown" &&
5629 cat >>confdefs.h <<EOF
5630 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5631 EOF
5632
5633                 SHLIB_LIST="-ldl $SHLIB_LIST"
5634         else
5635                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5636
5637 cf_add_libs="-lgpm"
5638 # Filter out duplicates - this happens with badly-designed ".pc" files...
5639 for cf_add_1lib in $TEST_LIBS
5640 do
5641         for cf_add_2lib in $cf_add_libs
5642         do
5643                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5644                 then
5645                         cf_add_1lib=
5646                         break
5647                 fi
5648         done
5649         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5650 done
5651 TEST_LIBS="$cf_add_libs"
5652
5653         fi
5654
5655 cat >>confdefs.h <<\EOF
5656 #define HAVE_LIBGPM 1
5657 EOF
5658
5659 echo "$as_me:5659: checking for Gpm_Wgetch in -lgpm" >&5
5660 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5661 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5662   echo $ECHO_N "(cached) $ECHO_C" >&6
5663 else
5664   ac_check_lib_save_LIBS=$LIBS
5665 LIBS="-lgpm  $LIBS"
5666 cat >conftest.$ac_ext <<_ACEOF
5667 #line 5667 "configure"
5668 #include "confdefs.h"
5669
5670 /* Override any gcc2 internal prototype to avoid an error.  */
5671 #ifdef __cplusplus
5672 extern "C"
5673 #endif
5674 /* We use char because int might match the return type of a gcc2
5675    builtin and then its argument prototype would still apply.  */
5676 char Gpm_Wgetch ();
5677 int
5678 main ()
5679 {
5680 Gpm_Wgetch ();
5681   ;
5682   return 0;
5683 }
5684 _ACEOF
5685 rm -f conftest.$ac_objext conftest$ac_exeext
5686 if { (eval echo "$as_me:5686: \"$ac_link\"") >&5
5687   (eval $ac_link) 2>&5
5688   ac_status=$?
5689   echo "$as_me:5689: \$? = $ac_status" >&5
5690   (exit $ac_status); } &&
5691          { ac_try='test -s conftest$ac_exeext'
5692   { (eval echo "$as_me:5692: \"$ac_try\"") >&5
5693   (eval $ac_try) 2>&5
5694   ac_status=$?
5695   echo "$as_me:5695: \$? = $ac_status" >&5
5696   (exit $ac_status); }; }; then
5697   ac_cv_lib_gpm_Gpm_Wgetch=yes
5698 else
5699   echo "$as_me: failed program was:" >&5
5700 cat conftest.$ac_ext >&5
5701 ac_cv_lib_gpm_Gpm_Wgetch=no
5702 fi
5703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5704 LIBS=$ac_check_lib_save_LIBS
5705 fi
5706 echo "$as_me:5706: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5707 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5708 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5709
5710 echo "$as_me:5710: checking if GPM is weakly bound to curses library" >&5
5711 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5712 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5713   echo $ECHO_N "(cached) $ECHO_C" >&6
5714 else
5715
5716 cf_cv_check_gpm_wgetch=unknown
5717 if test "$cross_compiling" != yes ; then
5718
5719 cat >conftest.$ac_ext <<CF_EOF
5720 #include <gpm.h>
5721 int main()
5722 {
5723         Gpm_Wgetch();
5724         ${cf_cv_main_return:-return}(0);
5725 }
5726 CF_EOF
5727
5728         cf_save_LIBS="$LIBS"
5729         # This only works if we can look at the symbol table.  If a shared
5730         # library is stripped for install, we cannot use that.  So we're forced
5731         # to rely on the static library, noting that some packagers may not
5732         # include it.
5733         LIBS="-static -lgpm -dynamic $LIBS"
5734         if { (eval echo "$as_me:5734: \"$ac_compile\"") >&5
5735   (eval $ac_compile) 2>&5
5736   ac_status=$?
5737   echo "$as_me:5737: \$? = $ac_status" >&5
5738   (exit $ac_status); } ; then
5739                 if { (eval echo "$as_me:5739: \"$ac_link\"") >&5
5740   (eval $ac_link) 2>&5
5741   ac_status=$?
5742   echo "$as_me:5742: \$? = $ac_status" >&5
5743   (exit $ac_status); } ; then
5744                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5745                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5746                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5747                 fi
5748         fi
5749         rm -rf conftest*
5750         LIBS="$cf_save_LIBS"
5751 fi
5752
5753 fi
5754 echo "$as_me:5754: result: $cf_cv_check_gpm_wgetch" >&5
5755 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5756
5757 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5758         { echo "$as_me:5758: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5759 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5760 fi
5761
5762 fi
5763
5764 fi
5765
5766 # not everyone has "test -c"
5767 if test -c /dev/sysmouse 2>/dev/null ; then
5768 echo "$as_me:5768: checking if you want to use sysmouse" >&5
5769 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5770
5771 # Check whether --with-sysmouse or --without-sysmouse was given.
5772 if test "${with_sysmouse+set}" = set; then
5773   withval="$with_sysmouse"
5774   cf_with_sysmouse=$withval
5775 else
5776   cf_with_sysmouse=maybe
5777 fi;
5778         if test "$cf_with_sysmouse" != no ; then
5779         cat >conftest.$ac_ext <<_ACEOF
5780 #line 5780 "configure"
5781 #include "confdefs.h"
5782
5783 #include <osreldate.h>
5784 #if (__FreeBSD_version >= 400017)
5785 #include <sys/consio.h>
5786 #include <sys/fbio.h>
5787 #else
5788 #include <machine/console.h>
5789 #endif
5790
5791 int
5792 main ()
5793 {
5794
5795         struct mouse_info the_mouse;
5796         ioctl(0, CONS_MOUSECTL, &the_mouse);
5797
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext
5803 if { (eval echo "$as_me:5803: \"$ac_compile\"") >&5
5804   (eval $ac_compile) 2>&5
5805   ac_status=$?
5806   echo "$as_me:5806: \$? = $ac_status" >&5
5807   (exit $ac_status); } &&
5808          { ac_try='test -s conftest.$ac_objext'
5809   { (eval echo "$as_me:5809: \"$ac_try\"") >&5
5810   (eval $ac_try) 2>&5
5811   ac_status=$?
5812   echo "$as_me:5812: \$? = $ac_status" >&5
5813   (exit $ac_status); }; }; then
5814   cf_with_sysmouse=yes
5815 else
5816   echo "$as_me: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 cf_with_sysmouse=no
5819 fi
5820 rm -f conftest.$ac_objext conftest.$ac_ext
5821         fi
5822 echo "$as_me:5822: result: $cf_with_sysmouse" >&5
5823 echo "${ECHO_T}$cf_with_sysmouse" >&6
5824 test "$cf_with_sysmouse" = yes &&
5825 cat >>confdefs.h <<\EOF
5826 #define USE_SYSMOUSE 1
5827 EOF
5828
5829 fi
5830
5831 if test X"$CC_G_OPT" = X"" ; then
5832         CC_G_OPT='-g'
5833         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5834 fi
5835
5836 if test X"$CXX_G_OPT" = X"" ; then
5837         CXX_G_OPT='-g'
5838         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5839 fi
5840
5841 echo "$as_me:5841: checking for default loader flags" >&5
5842 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5843 case $DFT_LWR_MODEL in
5844 (libtool) LD_MODEL=''   ;;
5845 (normal)  LD_MODEL=''   ;;
5846 (debug)   LD_MODEL=$CC_G_OPT ;;
5847 (profile) LD_MODEL='-pg';;
5848 (shared)  LD_MODEL=''   ;;
5849 esac
5850 echo "$as_me:5850: result: $LD_MODEL" >&5
5851 echo "${ECHO_T}$LD_MODEL" >&6
5852
5853 case $DFT_LWR_MODEL in
5854 (shared)
5855
5856 echo "$as_me:5856: checking if rpath option should be used" >&5
5857 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5858
5859 # Check whether --enable-rpath or --disable-rpath was given.
5860 if test "${enable_rpath+set}" = set; then
5861   enableval="$enable_rpath"
5862   cf_cv_enable_rpath=$enableval
5863 else
5864   cf_cv_enable_rpath=no
5865 fi;
5866 echo "$as_me:5866: result: $cf_cv_enable_rpath" >&5
5867 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5868
5869 echo "$as_me:5869: checking if shared libraries should be relinked during install" >&5
5870 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5871
5872 # Check whether --enable-relink or --disable-relink was given.
5873 if test "${enable_relink+set}" = set; then
5874   enableval="$enable_relink"
5875   cf_cv_do_relink=$enableval
5876 else
5877   cf_cv_do_relink=yes
5878 fi;
5879 echo "$as_me:5879: result: $cf_cv_do_relink" >&5
5880 echo "${ECHO_T}$cf_cv_do_relink" >&6
5881         ;;
5882 esac
5883
5884 # we will build libraries one-level down.
5885 rel_builddir=..
5886
5887 LD_RPATH_OPT=
5888 echo "$as_me:5888: checking for an rpath option" >&5
5889 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5890 case $cf_cv_system_name in
5891 (irix*)
5892         if test "$GCC" = yes; then
5893                 LD_RPATH_OPT="-Wl,-rpath,"
5894         else
5895                 LD_RPATH_OPT="-rpath "
5896         fi
5897         ;;
5898 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5899         LD_RPATH_OPT="-Wl,-rpath,"
5900         ;;
5901 (openbsd[2-9].*|mirbsd*)
5902         LD_RPATH_OPT="-Wl,-rpath,"
5903         ;;
5904 (dragonfly*)
5905         LD_RPATH_OPT="-rpath "
5906         ;;
5907 (netbsd*)
5908         LD_RPATH_OPT="-Wl,-rpath,"
5909         ;;
5910 (osf*|mls+*)
5911         LD_RPATH_OPT="-rpath "
5912         ;;
5913 (solaris2*)
5914         LD_RPATH_OPT="-R"
5915         ;;
5916 (*)
5917         ;;
5918 esac
5919 echo "$as_me:5919: result: $LD_RPATH_OPT" >&5
5920 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5921
5922 case "x$LD_RPATH_OPT" in
5923 (x-R*)
5924         echo "$as_me:5924: checking if we need a space after rpath option" >&5
5925 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5926         cf_save_LIBS="$LIBS"
5927
5928 cf_add_libs="${LD_RPATH_OPT}$libdir"
5929 # Filter out duplicates - this happens with badly-designed ".pc" files...
5930 for cf_add_1lib in $LIBS
5931 do
5932         for cf_add_2lib in $cf_add_libs
5933         do
5934                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5935                 then
5936                         cf_add_1lib=
5937                         break
5938                 fi
5939         done
5940         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5941 done
5942 LIBS="$cf_add_libs"
5943
5944         cat >conftest.$ac_ext <<_ACEOF
5945 #line 5945 "configure"
5946 #include "confdefs.h"
5947
5948 int
5949 main ()
5950 {
5951
5952   ;
5953   return 0;
5954 }
5955 _ACEOF
5956 rm -f conftest.$ac_objext conftest$ac_exeext
5957 if { (eval echo "$as_me:5957: \"$ac_link\"") >&5
5958   (eval $ac_link) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); } &&
5962          { ac_try='test -s conftest$ac_exeext'
5963   { (eval echo "$as_me:5963: \"$ac_try\"") >&5
5964   (eval $ac_try) 2>&5
5965   ac_status=$?
5966   echo "$as_me:5966: \$? = $ac_status" >&5
5967   (exit $ac_status); }; }; then
5968   cf_rpath_space=no
5969 else
5970   echo "$as_me: failed program was:" >&5
5971 cat conftest.$ac_ext >&5
5972 cf_rpath_space=yes
5973 fi
5974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5975         LIBS="$cf_save_LIBS"
5976         echo "$as_me:5976: result: $cf_rpath_space" >&5
5977 echo "${ECHO_T}$cf_rpath_space" >&6
5978         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5979         ;;
5980 esac
5981
5982         RM_SHARED_OPTS=
5983         LOCAL_LDFLAGS=
5984         LOCAL_LDFLAGS2=
5985         LD_SHARED_OPTS=
5986         INSTALL_LIB="-m 644"
5987         : ${rel_builddir:=.}
5988
5989         shlibdir=$libdir
5990
5991         MAKE_DLLS="#"
5992
5993         cf_cv_do_symlinks=no
5994         cf_ld_rpath_opt=
5995         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5996
5997         echo "$as_me:5997: checking if release/abi version should be used for shared libs" >&5
5998 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5999
6000 # Check whether --with-shlib-version or --without-shlib-version was given.
6001 if test "${with_shlib_version+set}" = set; then
6002   withval="$with_shlib_version"
6003   test -z "$withval" && withval=auto
6004         case $withval in
6005         (yes)
6006                 cf_cv_shlib_version=auto
6007                 ;;
6008         (rel|abi|auto)
6009                 cf_cv_shlib_version=$withval
6010                 ;;
6011         (*)
6012                 echo "$as_me:6012: result: $withval" >&5
6013 echo "${ECHO_T}$withval" >&6
6014                 { { echo "$as_me:6014: error: option value must be one of: rel, abi, or auto" >&5
6015 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6016    { (exit 1); exit 1; }; }
6017                 ;;
6018         esac
6019
6020 else
6021   cf_cv_shlib_version=auto
6022 fi;
6023         echo "$as_me:6023: result: $cf_cv_shlib_version" >&5
6024 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6025
6026         cf_cv_rm_so_locs=no
6027         cf_try_cflags=
6028
6029         # Some less-capable ports of gcc support only -fpic
6030         CC_SHARED_OPTS=
6031         if test "$GCC" = yes
6032         then
6033                 echo "$as_me:6033: checking which $CC option to use" >&5
6034 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6035                 cf_save_CFLAGS="$CFLAGS"
6036                 for CC_SHARED_OPTS in -fPIC -fpic ''
6037                 do
6038                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6039                         cat >conftest.$ac_ext <<_ACEOF
6040 #line 6040 "configure"
6041 #include "confdefs.h"
6042 #include <stdio.h>
6043 int
6044 main ()
6045 {
6046 int x = 1
6047   ;
6048   return 0;
6049 }
6050 _ACEOF
6051 rm -f conftest.$ac_objext
6052 if { (eval echo "$as_me:6052: \"$ac_compile\"") >&5
6053   (eval $ac_compile) 2>&5
6054   ac_status=$?
6055   echo "$as_me:6055: \$? = $ac_status" >&5
6056   (exit $ac_status); } &&
6057          { ac_try='test -s conftest.$ac_objext'
6058   { (eval echo "$as_me:6058: \"$ac_try\"") >&5
6059   (eval $ac_try) 2>&5
6060   ac_status=$?
6061   echo "$as_me:6061: \$? = $ac_status" >&5
6062   (exit $ac_status); }; }; then
6063   break
6064 else
6065   echo "$as_me: failed program was:" >&5
6066 cat conftest.$ac_ext >&5
6067 fi
6068 rm -f conftest.$ac_objext conftest.$ac_ext
6069                 done
6070                 echo "$as_me:6070: result: $CC_SHARED_OPTS" >&5
6071 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6072                 CFLAGS="$cf_save_CFLAGS"
6073         fi
6074
6075         cf_cv_shlib_version_infix=no
6076
6077         case $cf_cv_system_name in
6078         (aix4.3-9*|aix[5-7]*)
6079                 if test "$GCC" = yes; then
6080                         CC_SHARED_OPTS='-Wl,-brtl'
6081                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6082                 else
6083                         CC_SHARED_OPTS='-brtl'
6084                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6085                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6086                 fi
6087                 ;;
6088         (beos*)
6089                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6090                 ;;
6091         (cygwin*)
6092                 CC_SHARED_OPTS=
6093                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6094                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6095                 cf_cv_shlib_version=cygdll
6096                 cf_cv_shlib_version_infix=cygdll
6097                 shlibdir=$bindir
6098                 MAKE_DLLS=
6099                 cat >mk_shared_lib.sh <<-CF_EOF
6100                 #!$SHELL
6101                 SHARED_LIB=\$1
6102                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6103                 shift
6104                 cat <<-EOF
6105                 Linking shared library
6106                 ** SHARED_LIB \$SHARED_LIB
6107                 ** IMPORT_LIB \$IMPORT_LIB
6108 EOF
6109                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6110 CF_EOF
6111                 chmod +x mk_shared_lib.sh
6112                 ;;
6113         (msys*)
6114                 CC_SHARED_OPTS=
6115                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6116                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6117                 cf_cv_shlib_version=msysdll
6118                 cf_cv_shlib_version_infix=msysdll
6119                 shlibdir=$bindir
6120                 MAKE_DLLS=
6121                 cat >mk_shared_lib.sh <<-CF_EOF
6122                 #!$SHELL
6123                 SHARED_LIB=\$1
6124                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6125                 shift
6126                 cat <<-EOF
6127                 Linking shared library
6128                 ** SHARED_LIB \$SHARED_LIB
6129                 ** IMPORT_LIB \$IMPORT_LIB
6130 EOF
6131                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6132 CF_EOF
6133                 chmod +x mk_shared_lib.sh
6134                 ;;
6135         (darwin*)
6136                 cf_try_cflags="no-cpp-precomp"
6137                 CC_SHARED_OPTS="-dynamic"
6138                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6139                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6140                 cf_cv_shlib_version_infix=yes
6141                 echo "$as_me:6141: checking if ld -search_paths_first works" >&5
6142 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6143 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6144   echo $ECHO_N "(cached) $ECHO_C" >&6
6145 else
6146
6147                         cf_save_LDFLAGS=$LDFLAGS
6148                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6149                         cat >conftest.$ac_ext <<_ACEOF
6150 #line 6150 "configure"
6151 #include "confdefs.h"
6152
6153 int
6154 main ()
6155 {
6156 int i;
6157   ;
6158   return 0;
6159 }
6160 _ACEOF
6161 rm -f conftest.$ac_objext conftest$ac_exeext
6162 if { (eval echo "$as_me:6162: \"$ac_link\"") >&5
6163   (eval $ac_link) 2>&5
6164   ac_status=$?
6165   echo "$as_me:6165: \$? = $ac_status" >&5
6166   (exit $ac_status); } &&
6167          { ac_try='test -s conftest$ac_exeext'
6168   { (eval echo "$as_me:6168: \"$ac_try\"") >&5
6169   (eval $ac_try) 2>&5
6170   ac_status=$?
6171   echo "$as_me:6171: \$? = $ac_status" >&5
6172   (exit $ac_status); }; }; then
6173   cf_cv_ldflags_search_paths_first=yes
6174 else
6175   echo "$as_me: failed program was:" >&5
6176 cat conftest.$ac_ext >&5
6177 cf_cv_ldflags_search_paths_first=no
6178 fi
6179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6180                                 LDFLAGS=$cf_save_LDFLAGS
6181 fi
6182 echo "$as_me:6182: result: $cf_cv_ldflags_search_paths_first" >&5
6183 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6184                 if test $cf_cv_ldflags_search_paths_first = yes; then
6185                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6186                 fi
6187                 ;;
6188         (hpux[7-8]*)
6189                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6190                 if test "$GCC" != yes; then
6191                         CC_SHARED_OPTS='+Z'
6192                 fi
6193                 MK_SHARED_LIB='${LD} -b -o $@'
6194                 INSTALL_LIB="-m 555"
6195                 ;;
6196         (hpux*)
6197                 # (tested with gcc 2.7.2 -- I don't have c89)
6198                 if test "$GCC" = yes; then
6199                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6200                 else
6201                         CC_SHARED_OPTS='+Z'
6202                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6203                 fi
6204                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6205                 # HP-UX shared libraries must be executable, and should be
6206                 # readonly to exploit a quirk in the memory manager.
6207                 INSTALL_LIB="-m 555"
6208                 ;;
6209         (interix*)
6210                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6211                 if test "$cf_cv_shlib_version" = rel; then
6212                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6213                 else
6214                         cf_shared_soname='`basename `'
6215                 fi
6216                 CC_SHARED_OPTS=
6217                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6218                 ;;
6219         (irix*)
6220                 if test "$cf_cv_enable_rpath" = yes ; then
6221                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6222                 fi
6223                 # tested with IRIX 5.2 and 'cc'.
6224                 if test "$GCC" != yes; then
6225                         CC_SHARED_OPTS='-KPIC'
6226                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6227                 else
6228                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6229                 fi
6230                 cf_cv_rm_so_locs=yes
6231                 ;;
6232         (linux*|gnu*|k*bsd*-gnu)
6233                 if test "$DFT_LWR_MODEL" = "shared" ; then
6234                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6235                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6236                 fi
6237                 if test "$cf_cv_enable_rpath" = yes ; then
6238                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6239                 fi
6240
6241         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6242         if test "$cf_cv_shlib_version" = rel; then
6243                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6244         else
6245                 cf_cv_shared_soname='`basename $@`'
6246         fi
6247
6248                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6249                 ;;
6250         (mingw*)
6251                 cf_cv_shlib_version=mingw
6252                 cf_cv_shlib_version_infix=mingw
6253                 shlibdir=$bindir
6254                 MAKE_DLLS=
6255                 if test "$DFT_LWR_MODEL" = "shared" ; then
6256                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6257                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6258                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6259                 fi
6260                 CC_SHARED_OPTS=
6261                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6262                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6263                 cat >mk_shared_lib.sh <<-CF_EOF
6264                 #!$SHELL
6265                 SHARED_LIB=\$1
6266                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6267                 shift
6268                 cat <<-EOF
6269                 Linking shared library
6270                 ** SHARED_LIB \$SHARED_LIB
6271                 ** IMPORT_LIB \$IMPORT_LIB
6272 EOF
6273                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6274 CF_EOF
6275                 chmod +x mk_shared_lib.sh
6276                 ;;
6277         (openbsd[2-9].*|mirbsd*)
6278                 if test "$DFT_LWR_MODEL" = "shared" ; then
6279                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6280                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6281                 fi
6282                 if test "$cf_cv_enable_rpath" = yes ; then
6283                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6284                 fi
6285                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6286
6287         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6288         if test "$cf_cv_shlib_version" = rel; then
6289                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6290         else
6291                 cf_cv_shared_soname='`basename $@`'
6292         fi
6293
6294                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6295                 ;;
6296         (nto-qnx*|openbsd*|freebsd[12].*)
6297                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6298                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6299                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6300                 ;;
6301         (dragonfly*|freebsd*)
6302                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6303                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6304                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6305                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6306                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6307                 fi
6308
6309         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6310         if test "$cf_cv_shlib_version" = rel; then
6311                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6312         else
6313                 cf_cv_shared_soname='`basename $@`'
6314         fi
6315
6316                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6317                 ;;
6318         (netbsd*)
6319                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6320                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6321                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6324                         if test "$cf_cv_shlib_version" = auto; then
6325                         if test -f /usr/libexec/ld.elf_so; then
6326                                 cf_cv_shlib_version=abi
6327                         else
6328                                 cf_cv_shlib_version=rel
6329                         fi
6330                         fi
6331
6332         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6333         if test "$cf_cv_shlib_version" = rel; then
6334                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6335         else
6336                 cf_cv_shared_soname='`basename $@`'
6337         fi
6338
6339                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6340                 else
6341                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6342                 fi
6343                 ;;
6344         (osf*|mls+*)
6345                 # tested with OSF/1 V3.2 and 'cc'
6346                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6347                 # link with shared libs).
6348                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6349                 case $host_os in
6350                 (osf4*)
6351                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6352                         ;;
6353                 esac
6354                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6355                 if test "$DFT_LWR_MODEL" = "shared" ; then
6356                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6357                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6358                 fi
6359                 cf_cv_rm_so_locs=yes
6360                 ;;
6361         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6362                 # tested with osr5.0.5
6363                 if test "$GCC" != yes; then
6364                         CC_SHARED_OPTS='-belf -KPIC'
6365                 fi
6366                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6367                 if test "$cf_cv_enable_rpath" = yes ; then
6368                         # only way is to set LD_RUN_PATH but no switch for it
6369                         RUN_PATH=$libdir
6370                 fi
6371                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6372                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6373                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6374                 ;;
6375         (sunos4*)
6376                 # tested with SunOS 4.1.1 and gcc 2.7.0
6377                 if test "$GCC" != yes; then
6378                         CC_SHARED_OPTS='-KPIC'
6379                 fi
6380                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6381                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6382                 ;;
6383         (solaris2*)
6384                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6385                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6386                 if test "$DFT_LWR_MODEL" = "shared" ; then
6387                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6388                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6389                 fi
6390                 if test "$cf_cv_enable_rpath" = yes ; then
6391                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6392                 fi
6393
6394         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6395         if test "$cf_cv_shlib_version" = rel; then
6396                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6397         else
6398                 cf_cv_shared_soname='`basename $@`'
6399         fi
6400
6401                 if test "$GCC" != yes; then
6402                         cf_save_CFLAGS="$CFLAGS"
6403                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6404                         do
6405                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6406                                 cat >conftest.$ac_ext <<_ACEOF
6407 #line 6407 "configure"
6408 #include "confdefs.h"
6409 #include <stdio.h>
6410 int
6411 main ()
6412 {
6413 printf("Hello\n");
6414   ;
6415   return 0;
6416 }
6417 _ACEOF
6418 rm -f conftest.$ac_objext
6419 if { (eval echo "$as_me:6419: \"$ac_compile\"") >&5
6420   (eval $ac_compile) 2>&5
6421   ac_status=$?
6422   echo "$as_me:6422: \$? = $ac_status" >&5
6423   (exit $ac_status); } &&
6424          { ac_try='test -s conftest.$ac_objext'
6425   { (eval echo "$as_me:6425: \"$ac_try\"") >&5
6426   (eval $ac_try) 2>&5
6427   ac_status=$?
6428   echo "$as_me:6428: \$? = $ac_status" >&5
6429   (exit $ac_status); }; }; then
6430   break
6431 else
6432   echo "$as_me: failed program was:" >&5
6433 cat conftest.$ac_ext >&5
6434 fi
6435 rm -f conftest.$ac_objext conftest.$ac_ext
6436                         done
6437                         CFLAGS="$cf_save_CFLAGS"
6438                         CC_SHARED_OPTS=$cf_shared_opts
6439                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6440                 else
6441                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6442                 fi
6443                 ;;
6444         (sysv5uw7*|unix_sv*)
6445                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6446                 if test "$GCC" != yes; then
6447                         CC_SHARED_OPTS='-KPIC'
6448                 fi
6449                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6450                 ;;
6451         (*)
6452                 CC_SHARED_OPTS='unknown'
6453                 MK_SHARED_LIB='echo unknown'
6454                 ;;
6455         esac
6456
6457         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6458         case "$cf_cv_shlib_version" in
6459         (rel|abi)
6460                 case "$MK_SHARED_LIB" in
6461                 (*'-o $@')
6462                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6463                         ;;
6464                 (*)
6465                         { echo "$as_me:6465: WARNING: ignored --with-shlib-version" >&5
6466 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6467                         ;;
6468                 esac
6469                 ;;
6470         esac
6471
6472         if test -n "$cf_try_cflags"
6473         then
6474 cat > conftest.$ac_ext <<EOF
6475 #line 6475 "${as_me:-configure}"
6476 #include <stdio.h>
6477 int main(int argc, char *argv[])
6478 {
6479         printf("hello\n");
6480         return (argv[argc-1] == 0) ;
6481 }
6482 EOF
6483                 cf_save_CFLAGS="$CFLAGS"
6484                 for cf_opt in $cf_try_cflags
6485                 do
6486                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6487                         echo "$as_me:6487: checking if CFLAGS option -$cf_opt works" >&5
6488 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6489                         if { (eval echo "$as_me:6489: \"$ac_compile\"") >&5
6490   (eval $ac_compile) 2>&5
6491   ac_status=$?
6492   echo "$as_me:6492: \$? = $ac_status" >&5
6493   (exit $ac_status); }; then
6494                                 echo "$as_me:6494: result: yes" >&5
6495 echo "${ECHO_T}yes" >&6
6496                                 cf_save_CFLAGS="$CFLAGS"
6497                         else
6498                                 echo "$as_me:6498: result: no" >&5
6499 echo "${ECHO_T}no" >&6
6500                         fi
6501                 done
6502                 CFLAGS="$cf_save_CFLAGS"
6503         fi
6504
6505         # RPATH_LIST is a colon-separated list of directories
6506         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6507         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6508
6509         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6510
6511         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6512
6513 echo "${as_me:-configure}:6513: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6514
6515         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6516
6517 echo "${as_me:-configure}:6517: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6518
6519 for model in $cf_list_models; do
6520         case $model in
6521         (libtool)
6522
6523 echo "$as_me:6523: checking for additional libtool options" >&5
6524 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6525
6526 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6527 if test "${with_libtool_opts+set}" = set; then
6528   withval="$with_libtool_opts"
6529   with_libtool_opts=$withval
6530 else
6531   with_libtool_opts=no
6532 fi;
6533 echo "$as_me:6533: result: $with_libtool_opts" >&5
6534 echo "${ECHO_T}$with_libtool_opts" >&6
6535
6536 case .$with_libtool_opts in
6537 (.yes|.no|.)
6538         ;;
6539 (*)
6540         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6541         ;;
6542 esac
6543
6544 echo "$as_me:6544: checking if exported-symbols file should be used" >&5
6545 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6546
6547 # Check whether --with-export-syms or --without-export-syms was given.
6548 if test "${with_export_syms+set}" = set; then
6549   withval="$with_export_syms"
6550   with_export_syms=$withval
6551 else
6552   with_export_syms=no
6553 fi;
6554 if test "x$with_export_syms" = xyes
6555 then
6556         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6557
6558 fi
6559 echo "$as_me:6559: result: $with_export_syms" >&5
6560 echo "${ECHO_T}$with_export_syms" >&6
6561 if test "x$with_export_syms" != xno
6562 then
6563         EXPORT_SYMS="-export-symbols $with_export_syms"
6564
6565 fi
6566
6567                 ;;
6568         (shared)
6569                 if test "$CC_SHARED_OPTS" = "unknown"; then
6570                         { { echo "$as_me:6570: error: Shared libraries are not supported in this version" >&5
6571 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6572    { (exit 1); exit 1; }; }
6573                 fi
6574                 # workaround for inept transition to PIE vs PIC...
6575                 echo "$as_me:6575: checking if current CFLAGS link properly" >&5
6576 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6577                 cat >conftest.$ac_ext <<_ACEOF
6578 #line 6578 "configure"
6579 #include "confdefs.h"
6580 #include <stdio.h>
6581 int
6582 main ()
6583 {
6584 printf("Hello work\n");
6585   ;
6586   return 0;
6587 }
6588 _ACEOF
6589 rm -f conftest.$ac_objext conftest$ac_exeext
6590 if { (eval echo "$as_me:6590: \"$ac_link\"") >&5
6591   (eval $ac_link) 2>&5
6592   ac_status=$?
6593   echo "$as_me:6593: \$? = $ac_status" >&5
6594   (exit $ac_status); } &&
6595          { ac_try='test -s conftest$ac_exeext'
6596   { (eval echo "$as_me:6596: \"$ac_try\"") >&5
6597   (eval $ac_try) 2>&5
6598   ac_status=$?
6599   echo "$as_me:6599: \$? = $ac_status" >&5
6600   (exit $ac_status); }; }; then
6601   cf_cflags_work=yes
6602 else
6603   echo "$as_me: failed program was:" >&5
6604 cat conftest.$ac_ext >&5
6605 cf_cflags_work=no
6606 fi
6607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6608                 echo "$as_me:6608: result: $cf_cflags_work" >&5
6609 echo "${ECHO_T}$cf_cflags_work" >&6
6610                 if test "$cf_cflags_work" = no
6611                 then
6612                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6613
6614 echo "${as_me:-configure}:6614: testing try to work around by appending shared-options ..." 1>&5
6615
6616                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6617                 fi
6618
6619 echo "$as_me:6619: checking if versioned-symbols file should be used" >&5
6620 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6621
6622 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6623 if test "${with_versioned_syms+set}" = set; then
6624   withval="$with_versioned_syms"
6625   with_versioned_syms=$withval
6626 else
6627   with_versioned_syms=no
6628 fi;
6629 if test "x$with_versioned_syms" = xyes
6630 then
6631         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6632
6633 fi
6634 echo "$as_me:6634: result: $with_versioned_syms" >&5
6635 echo "${ECHO_T}$with_versioned_syms" >&6
6636
6637 RESULTING_SYMS=
6638 VERSIONED_SYMS=
6639 WILDCARD_SYMS=
6640
6641 if test "x$with_versioned_syms" != xno
6642 then
6643         RESULTING_SYMS=$with_versioned_syms
6644         case "x$MK_SHARED_LIB" in
6645         (*-Wl,*)
6646                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6647                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6648                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6649
6650 echo "${as_me:-configure}:6650: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6651
6652                 ;;
6653         (*-dy\ *)
6654                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6655                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6656                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6657
6658 echo "${as_me:-configure}:6658: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6659
6660                 ;;
6661         (*)
6662                 { echo "$as_me:6662: WARNING: this system does not support versioned-symbols" >&5
6663 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6664                 ;;
6665         esac
6666
6667         # Linux ld can selectively override scope, e.g., of symbols beginning with
6668         # "_" by first declaring some as global, and then using a wildcard to
6669         # declare the others as local.  Some other loaders cannot do this.  Check
6670         # by constructing a (very) simple shared library and inspecting its
6671         # symbols.
6672         if test "x$VERSIONED_SYMS" != "x"
6673         then
6674                 echo "$as_me:6674: checking if wildcards can be used to selectively omit symbols" >&5
6675 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6676                 WILDCARD_SYMS=no
6677
6678                 # make sources
6679                 rm -f conftest.*
6680
6681                 cat >conftest.ver <<EOF
6682 module_1.0 {
6683 global:
6684         globalf1;
6685 local:
6686         localf1;
6687 };
6688 module_2.0 {
6689 global:
6690         globalf2;
6691 local:
6692         localf2;
6693         _*;
6694 } module_1.0;
6695 submodule_1.0 {
6696 global:
6697         subglobalf1;
6698         _ismissing;
6699 local:
6700         sublocalf1;
6701 };
6702 submodule_2.0 {
6703 global:
6704         subglobalf2;
6705 local:
6706         sublocalf2;
6707         _*;
6708 } submodule_1.0;
6709 EOF
6710                 cat >conftest.$ac_ext <<EOF
6711 #line 6711 "configure"
6712 int     _ismissing(void) { return 1; }
6713 int     _localf1(void) { return 1; }
6714 int     _localf2(void) { return 2; }
6715 int     globalf1(void) { return 1; }
6716 int     globalf2(void) { return 2; }
6717 int     _sublocalf1(void) { return 1; }
6718 int     _sublocalf2(void) { return 2; }
6719 int     subglobalf1(void) { return 1; }
6720 int     subglobalf2(void) { return 2; }
6721 EOF
6722                 cat >conftest.mk <<EOF
6723 CC=${CC}
6724 CFLAGS=${CFLAGS}
6725 CPPFLAGS=${CPPFLAGS}
6726 LDFLAGS=${LDFLAGS}
6727 LIBS=${LIBS}
6728 VERSIONED_SYMS=${VERSIONED_SYMS}
6729 RESULTING_SYMS=conftest.ver
6730 MK_SHARED_LIB=${MK_SHARED_LIB}
6731 conftest.so: conftest.$ac_cv_objext
6732                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6733 EOF
6734
6735                 # compile source, make library
6736                 if make -f conftest.mk 2>&5 >/dev/null
6737                 then
6738                         # test for missing symbol in either Data or Text section
6739                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6740                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6741                 fi
6742                 echo "$as_me:6742: result: $WILDCARD_SYMS" >&5
6743 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6744                 rm -f conftest.*
6745         fi
6746 fi
6747
6748                 ;;
6749         esac
6750 done
6751
6752 # pretend that ncurses==ncursesw==ncursest
6753 echo "$as_me:6753: checking if you want to disable library suffixes" >&5
6754 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6755
6756 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6757 if test "${enable_lib_suffixes+set}" = set; then
6758   enableval="$enable_lib_suffixes"
6759   test "$enableval" != no && enableval=yes
6760         if test "$enableval" != "yes" ; then
6761     disable_lib_suffixes=yes
6762         else
6763                 disable_lib_suffixes=no
6764         fi
6765 else
6766   enableval=yes
6767         disable_lib_suffixes=no
6768
6769 fi;
6770 echo "$as_me:6770: result: $disable_lib_suffixes" >&5
6771 echo "${ECHO_T}$disable_lib_suffixes" >&6
6772
6773 ### If we're building with rpath, try to link non-standard libs that way too.
6774 if test "$DFT_LWR_MODEL" = "shared"; then
6775
6776 echo "$as_me:6776: checking if rpath-hack should be disabled" >&5
6777 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6778
6779 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6780 if test "${enable_rpath_hack+set}" = set; then
6781   enableval="$enable_rpath_hack"
6782   test "$enableval" != no && enableval=yes
6783         if test "$enableval" != "yes" ; then
6784     cf_disable_rpath_hack=yes
6785         else
6786                 cf_disable_rpath_hack=no
6787         fi
6788 else
6789   enableval=yes
6790         cf_disable_rpath_hack=no
6791
6792 fi;
6793 echo "$as_me:6793: result: $cf_disable_rpath_hack" >&5
6794 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6795 if test "$cf_disable_rpath_hack" = no ; then
6796
6797 echo "$as_me:6797: checking for updated LDFLAGS" >&5
6798 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6799 if test -n "$LD_RPATH_OPT" ; then
6800         echo "$as_me:6800: result: maybe" >&5
6801 echo "${ECHO_T}maybe" >&6
6802
6803         for ac_prog in ldd
6804 do
6805   # Extract the first word of "$ac_prog", so it can be a program name with args.
6806 set dummy $ac_prog; ac_word=$2
6807 echo "$as_me:6807: checking for $ac_word" >&5
6808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6809 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6810   echo $ECHO_N "(cached) $ECHO_C" >&6
6811 else
6812   if test -n "$cf_ldd_prog"; then
6813   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6814 else
6815   ac_save_IFS=$IFS; IFS=$ac_path_separator
6816 ac_dummy="$PATH"
6817 for ac_dir in $ac_dummy; do
6818   IFS=$ac_save_IFS
6819   test -z "$ac_dir" && ac_dir=.
6820   $as_executable_p "$ac_dir/$ac_word" || continue
6821 ac_cv_prog_cf_ldd_prog="$ac_prog"
6822 echo "$as_me:6822: found $ac_dir/$ac_word" >&5
6823 break
6824 done
6825
6826 fi
6827 fi
6828 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6829 if test -n "$cf_ldd_prog"; then
6830   echo "$as_me:6830: result: $cf_ldd_prog" >&5
6831 echo "${ECHO_T}$cf_ldd_prog" >&6
6832 else
6833   echo "$as_me:6833: result: no" >&5
6834 echo "${ECHO_T}no" >&6
6835 fi
6836
6837   test -n "$cf_ldd_prog" && break
6838 done
6839 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6840
6841         cf_rpath_list="/usr/lib /lib"
6842         if test "$cf_ldd_prog" != no
6843         then
6844                 cf_rpath_oops=
6845
6846 cat >conftest.$ac_ext <<_ACEOF
6847 #line 6847 "configure"
6848 #include "confdefs.h"
6849 #include <stdio.h>
6850 int
6851 main ()
6852 {
6853 printf("Hello");
6854   ;
6855   return 0;
6856 }
6857 _ACEOF
6858 rm -f conftest.$ac_objext conftest$ac_exeext
6859 if { (eval echo "$as_me:6859: \"$ac_link\"") >&5
6860   (eval $ac_link) 2>&5
6861   ac_status=$?
6862   echo "$as_me:6862: \$? = $ac_status" >&5
6863   (exit $ac_status); } &&
6864          { ac_try='test -s conftest$ac_exeext'
6865   { (eval echo "$as_me:6865: \"$ac_try\"") >&5
6866   (eval $ac_try) 2>&5
6867   ac_status=$?
6868   echo "$as_me:6868: \$? = $ac_status" >&5
6869   (exit $ac_status); }; }; then
6870   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6871                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6872 else
6873   echo "$as_me: failed program was:" >&5
6874 cat conftest.$ac_ext >&5
6875 fi
6876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6877
6878                 # If we passed the link-test, but get a "not found" on a given library,
6879                 # this could be due to inept reconfiguration of gcc to make it only
6880                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6881                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6882                 # /usr/local libraries.
6883                 if test -n "$cf_rpath_oops"
6884                 then
6885                         for cf_rpath_src in $cf_rpath_oops
6886                         do
6887                                 for cf_rpath_dir in \
6888                                         /usr/local \
6889                                         /usr/pkg \
6890                                         /opt/sfw
6891                                 do
6892                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6893                                         then
6894                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6895
6896 echo "${as_me:-configure}:6896: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6897
6898                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6899                                                 break
6900                                         fi
6901                                 done
6902                         done
6903                 fi
6904         fi
6905
6906         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6907
6908 echo "${as_me:-configure}:6908: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6909
6910 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6911
6912 echo "${as_me:-configure}:6912: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6913
6914 cf_rpath_dst=
6915 for cf_rpath_src in $LDFLAGS
6916 do
6917         case $cf_rpath_src in
6918         (-L*)
6919
6920                 # check if this refers to a directory which we will ignore
6921                 cf_rpath_skip=no
6922                 if test -n "$cf_rpath_list"
6923                 then
6924                         for cf_rpath_item in $cf_rpath_list
6925                         do
6926                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6927                                 then
6928                                         cf_rpath_skip=yes
6929                                         break
6930                                 fi
6931                         done
6932                 fi
6933
6934                 if test "$cf_rpath_skip" = no
6935                 then
6936                         # transform the option
6937                         if test "$LD_RPATH_OPT" = "-R " ; then
6938                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6939                         else
6940                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6941                         fi
6942
6943                         # if we have not already added this, add it now
6944                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6945                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6946                         then
6947                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6948
6949 echo "${as_me:-configure}:6949: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6950
6951                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6952                         fi
6953                 fi
6954                 ;;
6955         esac
6956         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6957 done
6958 LDFLAGS=$cf_rpath_dst
6959
6960 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6961
6962 echo "${as_me:-configure}:6962: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6963
6964 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6965
6966 echo "${as_me:-configure}:6966: testing ...checking LIBS $LIBS ..." 1>&5
6967
6968 cf_rpath_dst=
6969 for cf_rpath_src in $LIBS
6970 do
6971         case $cf_rpath_src in
6972         (-L*)
6973
6974                 # check if this refers to a directory which we will ignore
6975                 cf_rpath_skip=no
6976                 if test -n "$cf_rpath_list"
6977                 then
6978                         for cf_rpath_item in $cf_rpath_list
6979                         do
6980                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6981                                 then
6982                                         cf_rpath_skip=yes
6983                                         break
6984                                 fi
6985                         done
6986                 fi
6987
6988                 if test "$cf_rpath_skip" = no
6989                 then
6990                         # transform the option
6991                         if test "$LD_RPATH_OPT" = "-R " ; then
6992                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6993                         else
6994                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6995                         fi
6996
6997                         # if we have not already added this, add it now
6998                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6999                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7000                         then
7001                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7002
7003 echo "${as_me:-configure}:7003: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7004
7005                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7006                         fi
7007                 fi
7008                 ;;
7009         esac
7010         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7011 done
7012 LIBS=$cf_rpath_dst
7013
7014 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7015
7016 echo "${as_me:-configure}:7016: testing ...checked LIBS $LIBS ..." 1>&5
7017
7018         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7019
7020 echo "${as_me:-configure}:7020: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7021
7022 else
7023         echo "$as_me:7023: result: no" >&5
7024 echo "${ECHO_T}no" >&6
7025 fi
7026
7027 fi
7028
7029 fi
7030
7031 ###############################################################################
7032
7033 ###     use option --with-extra-suffix to append suffix to headers and libraries
7034 echo "$as_me:7034: checking if you wish to append extra suffix to header/library paths" >&5
7035 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7036 EXTRA_SUFFIX=
7037
7038 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7039 if test "${with_extra_suffix+set}" = set; then
7040   withval="$with_extra_suffix"
7041   case x$withval in
7042         (no)
7043                 ;;
7044         (xyes|x)
7045                 EXTRA_SUFFIX=$cf_cv_abi_version
7046                 ;;
7047         (*)
7048                 EXTRA_SUFFIX=$withval
7049                 ;;
7050         esac
7051
7052 fi;
7053 echo "$as_me:7053: result: $EXTRA_SUFFIX" >&5
7054 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7055
7056 ###     use option --disable-overwrite to leave out the link to -lcurses
7057 echo "$as_me:7057: checking if you wish to install ncurses overwriting curses" >&5
7058 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7059
7060 # Check whether --enable-overwrite or --disable-overwrite was given.
7061 if test "${enable_overwrite+set}" = set; then
7062   enableval="$enable_overwrite"
7063   with_overwrite=$enableval
7064 else
7065   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7066 fi;
7067 echo "$as_me:7067: result: $with_overwrite" >&5
7068 echo "${ECHO_T}$with_overwrite" >&6
7069
7070 echo "$as_me:7070: checking if external terminfo-database is used" >&5
7071 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7072
7073 # Check whether --enable-database or --disable-database was given.
7074 if test "${enable_database+set}" = set; then
7075   enableval="$enable_database"
7076   use_database=$enableval
7077 else
7078   use_database=yes
7079 fi;
7080 echo "$as_me:7080: result: $use_database" >&5
7081 echo "${ECHO_T}$use_database" >&6
7082
7083 case $host_os in
7084 (os2*)
7085         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7086         ;;
7087 (*)
7088         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7089         ;;
7090 esac
7091
7092 NCURSES_USE_DATABASE=0
7093 if test "$use_database" != no ; then
7094         NCURSES_USE_DATABASE=1
7095
7096         echo "$as_me:7096: checking which terminfo source-file will be installed" >&5
7097 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7098
7099 # Check whether --with-database or --without-database was given.
7100 if test "${with_database+set}" = set; then
7101   withval="$with_database"
7102   TERMINFO_SRC=$withval
7103 fi;
7104         echo "$as_me:7104: result: $TERMINFO_SRC" >&5
7105 echo "${ECHO_T}$TERMINFO_SRC" >&6
7106
7107         echo "$as_me:7107: checking whether to use hashed database instead of directory/tree" >&5
7108 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7109
7110 # Check whether --with-hashed-db or --without-hashed-db was given.
7111 if test "${with_hashed_db+set}" = set; then
7112   withval="$with_hashed_db"
7113
7114 else
7115   with_hashed_db=no
7116 fi;
7117         echo "$as_me:7117: result: $with_hashed_db" >&5
7118 echo "${ECHO_T}$with_hashed_db" >&6
7119 else
7120         with_hashed_db=no
7121 fi
7122
7123 echo "$as_me:7123: checking for list of fallback descriptions" >&5
7124 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7125
7126 # Check whether --with-fallbacks or --without-fallbacks was given.
7127 if test "${with_fallbacks+set}" = set; then
7128   withval="$with_fallbacks"
7129   with_fallback=$withval
7130 else
7131   with_fallback=
7132 fi;
7133 echo "$as_me:7133: result: $with_fallback" >&5
7134 echo "${ECHO_T}$with_fallback" >&6
7135 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7136
7137 echo "$as_me:7137: checking if you want modern xterm or antique" >&5
7138 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7139
7140 # Check whether --with-xterm-new or --without-xterm-new was given.
7141 if test "${with_xterm_new+set}" = set; then
7142   withval="$with_xterm_new"
7143   with_xterm_new=$withval
7144 else
7145   with_xterm_new=yes
7146 fi;
7147 case $with_xterm_new in
7148 (no) with_xterm_new=xterm-old;;
7149 (*)      with_xterm_new=xterm-new;;
7150 esac
7151 echo "$as_me:7151: result: $with_xterm_new" >&5
7152 echo "${ECHO_T}$with_xterm_new" >&6
7153 WHICH_XTERM=$with_xterm_new
7154
7155 echo "$as_me:7155: checking if xterm backspace sends BS or DEL" >&5
7156 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7157
7158 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7159 if test "${with_xterm_kbs+set}" = set; then
7160   withval="$with_xterm_kbs"
7161   with_xterm_kbs=$withval
7162 else
7163   with_xterm_kbs=BS
7164 fi;
7165 case x$with_xterm_kbs in
7166 (xyes|xno|xBS|xbs|x8)
7167         with_xterm_kbs=BS
7168         ;;
7169 (xDEL|xdel|x127)
7170         with_xterm_kbs=DEL
7171         ;;
7172 (*)
7173         with_xterm_kbs=$withval
7174         ;;
7175 esac
7176 echo "$as_me:7176: result: $with_xterm_kbs" >&5
7177 echo "${ECHO_T}$with_xterm_kbs" >&6
7178 XTERM_KBS=$with_xterm_kbs
7179
7180 MAKE_TERMINFO=
7181 if test "$use_database" = no ; then
7182         TERMINFO="${datadir}/terminfo"
7183         MAKE_TERMINFO="#"
7184 else
7185
7186 echo "$as_me:7186: checking for list of terminfo directories" >&5
7187 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7188
7189 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7190 if test "${with_terminfo_dirs+set}" = set; then
7191   withval="$with_terminfo_dirs"
7192
7193 else
7194   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7195 fi;
7196 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7197 cf_dst_path=
7198 for cf_src_path in $withval
7199 do
7200
7201 if test "x$prefix" != xNONE; then
7202         cf_path_syntax="$prefix"
7203 else
7204         cf_path_syntax="$ac_default_prefix"
7205 fi
7206
7207 case ".$cf_src_path" in
7208 (.\$\(*\)*|.\'*\'*)
7209         ;;
7210 (..|./*|.\\*)
7211         ;;
7212 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7213         ;;
7214 (.\${*prefix}*|.\${*dir}*)
7215         eval cf_src_path="$cf_src_path"
7216         case ".$cf_src_path" in
7217         (.NONE/*)
7218                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7219                 ;;
7220         esac
7221         ;;
7222 (.no|.NONE/*)
7223         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7224         ;;
7225 (*)
7226         { { echo "$as_me:7226: error: expected a pathname, not \"$cf_src_path\"" >&5
7227 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7228    { (exit 1); exit 1; }; }
7229         ;;
7230 esac
7231
7232   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7233   cf_dst_path="${cf_dst_path}${cf_src_path}"
7234 done
7235 IFS="$ac_save_ifs"
7236
7237 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7238 # so we have to check/work around.  We do prefer the result of "eval"...
7239 eval cf_dst_eval="$cf_dst_path"
7240 case "x$cf_dst_eval" in
7241 (xNONE*)
7242         TERMINFO_DIRS=$cf_dst_path
7243         ;;
7244 (*)
7245         TERMINFO_DIRS="$cf_dst_eval"
7246         ;;
7247 esac
7248
7249 echo "$as_me:7249: result: $TERMINFO_DIRS" >&5
7250 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7251 test -n "$TERMINFO_DIRS" &&
7252 cat >>confdefs.h <<EOF
7253 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7254 EOF
7255
7256 echo "$as_me:7256: checking for default terminfo directory" >&5
7257 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7258
7259 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7260 if test "${with_default_terminfo_dir+set}" = set; then
7261   withval="$with_default_terminfo_dir"
7262
7263 else
7264   withval="${TERMINFO:-${datadir}/terminfo}"
7265 fi; if test -n "${datadir}/terminfo" ; then
7266
7267 if test "x$prefix" != xNONE; then
7268         cf_path_syntax="$prefix"
7269 else
7270         cf_path_syntax="$ac_default_prefix"
7271 fi
7272
7273 case ".$withval" in
7274 (.\$\(*\)*|.\'*\'*)
7275         ;;
7276 (..|./*|.\\*)
7277         ;;
7278 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7279         ;;
7280 (.\${*prefix}*|.\${*dir}*)
7281         eval withval="$withval"
7282         case ".$withval" in
7283         (.NONE/*)
7284                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7285                 ;;
7286         esac
7287         ;;
7288 (.no|.NONE/*)
7289         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7290         ;;
7291 (*)
7292         { { echo "$as_me:7292: error: expected a pathname, not \"$withval\"" >&5
7293 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7294    { (exit 1); exit 1; }; }
7295         ;;
7296 esac
7297
7298 fi
7299 eval TERMINFO="$withval"
7300
7301 echo "$as_me:7301: result: $TERMINFO" >&5
7302 echo "${ECHO_T}$TERMINFO" >&6
7303
7304 cat >>confdefs.h <<EOF
7305 #define TERMINFO "$TERMINFO"
7306 EOF
7307
7308 fi
7309
7310 ###     use option --disable-big-core to make tic run on small machines
7311 ###     We need 4Mb, check if we can allocate 50% more than that.
7312 echo "$as_me:7312: checking if big-core option selected" >&5
7313 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7314
7315 # Check whether --enable-big-core or --disable-big-core was given.
7316 if test "${enable_big_core+set}" = set; then
7317   enableval="$enable_big_core"
7318   with_big_core=$enableval
7319 else
7320   if test "$cross_compiling" = yes; then
7321   with_big_core=no
7322 else
7323   cat >conftest.$ac_ext <<_ACEOF
7324 #line 7324 "configure"
7325 #include "confdefs.h"
7326
7327 #include <stdlib.h>
7328 #include <string.h>
7329 int main() {
7330         unsigned long n = 6000000L;
7331         char *s = malloc(n);
7332         if (s != 0)
7333                 s[0] = s[n-1] = 0;
7334         ${cf_cv_main_return:-return}(s == 0);
7335 }
7336 _ACEOF
7337 rm -f conftest$ac_exeext
7338 if { (eval echo "$as_me:7338: \"$ac_link\"") >&5
7339   (eval $ac_link) 2>&5
7340   ac_status=$?
7341   echo "$as_me:7341: \$? = $ac_status" >&5
7342   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7343   { (eval echo "$as_me:7343: \"$ac_try\"") >&5
7344   (eval $ac_try) 2>&5
7345   ac_status=$?
7346   echo "$as_me:7346: \$? = $ac_status" >&5
7347   (exit $ac_status); }; }; then
7348   with_big_core=yes
7349 else
7350   echo "$as_me: program exited with status $ac_status" >&5
7351 echo "$as_me: failed program was:" >&5
7352 cat conftest.$ac_ext >&5
7353 with_big_core=no
7354 fi
7355 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7356 fi
7357 fi;
7358 echo "$as_me:7358: result: $with_big_core" >&5
7359 echo "${ECHO_T}$with_big_core" >&6
7360 test "x$with_big_core" = "xyes" &&
7361 cat >>confdefs.h <<\EOF
7362 #define HAVE_BIG_CORE 1
7363 EOF
7364
7365 ### ISO C only guarantees 512-char strings, we have tables which load faster
7366 ### when constructed using "big" strings.  More than the C compiler, the awk
7367 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7368 echo "$as_me:7368: checking if big-strings option selected" >&5
7369 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7370
7371 # Check whether --enable-big-strings or --disable-big-strings was given.
7372 if test "${enable_big_strings+set}" = set; then
7373   enableval="$enable_big_strings"
7374   with_big_strings=$enableval
7375 else
7376
7377         case x$AWK in
7378         (x)
7379                 eval with_big_strings=no
7380                 ;;
7381         (*)
7382                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7383                         | $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
7384                         eval with_big_strings=yes
7385                 else
7386                         eval with_big_strings=no
7387                 fi
7388                 ;;
7389         esac
7390
7391 fi;
7392 echo "$as_me:7392: result: $with_big_strings" >&5
7393 echo "${ECHO_T}$with_big_strings" >&6
7394
7395 USE_BIG_STRINGS=0
7396 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7397
7398 ###     use option --enable-termcap to compile in the termcap fallback support
7399 echo "$as_me:7399: checking if you want termcap-fallback support" >&5
7400 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7401
7402 # Check whether --enable-termcap or --disable-termcap was given.
7403 if test "${enable_termcap+set}" = set; then
7404   enableval="$enable_termcap"
7405   with_termcap=$enableval
7406 else
7407   with_termcap=no
7408 fi;
7409 echo "$as_me:7409: result: $with_termcap" >&5
7410 echo "${ECHO_T}$with_termcap" >&6
7411
7412 NCURSES_USE_TERMCAP=0
7413 if test "x$with_termcap" != "xyes" ; then
7414         if test "$use_database" = no ; then
7415                 if test -z "$with_fallback" ; then
7416                         { { echo "$as_me:7416: error: You have disabled the database w/o specifying fallbacks" >&5
7417 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7418    { (exit 1); exit 1; }; }
7419                 fi
7420         fi
7421
7422 cat >>confdefs.h <<\EOF
7423 #define PURE_TERMINFO 1
7424 EOF
7425
7426 else
7427
7428         if test "$with_ticlib" != no ; then
7429                 { { echo "$as_me:7429: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7430 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7431    { (exit 1); exit 1; }; }
7432         fi
7433
7434         NCURSES_USE_TERMCAP=1
7435         echo "$as_me:7435: checking for list of termcap files" >&5
7436 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7437
7438 # Check whether --with-termpath or --without-termpath was given.
7439 if test "${with_termpath+set}" = set; then
7440   withval="$with_termpath"
7441
7442 else
7443   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7444 fi;
7445 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7446 cf_dst_path=
7447 for cf_src_path in $withval
7448 do
7449
7450 if test "x$prefix" != xNONE; then
7451         cf_path_syntax="$prefix"
7452 else
7453         cf_path_syntax="$ac_default_prefix"
7454 fi
7455
7456 case ".$cf_src_path" in
7457 (.\$\(*\)*|.\'*\'*)
7458         ;;
7459 (..|./*|.\\*)
7460         ;;
7461 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7462         ;;
7463 (.\${*prefix}*|.\${*dir}*)
7464         eval cf_src_path="$cf_src_path"
7465         case ".$cf_src_path" in
7466         (.NONE/*)
7467                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7468                 ;;
7469         esac
7470         ;;
7471 (.no|.NONE/*)
7472         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7473         ;;
7474 (*)
7475         { { echo "$as_me:7475: error: expected a pathname, not \"$cf_src_path\"" >&5
7476 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7477    { (exit 1); exit 1; }; }
7478         ;;
7479 esac
7480
7481   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7482   cf_dst_path="${cf_dst_path}${cf_src_path}"
7483 done
7484 IFS="$ac_save_ifs"
7485
7486 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7487 # so we have to check/work around.  We do prefer the result of "eval"...
7488 eval cf_dst_eval="$cf_dst_path"
7489 case "x$cf_dst_eval" in
7490 (xNONE*)
7491         TERMPATH=$cf_dst_path
7492         ;;
7493 (*)
7494         TERMPATH="$cf_dst_eval"
7495         ;;
7496 esac
7497
7498         echo "$as_me:7498: result: $TERMPATH" >&5
7499 echo "${ECHO_T}$TERMPATH" >&6
7500         test -n "$TERMPATH" &&
7501 cat >>confdefs.h <<EOF
7502 #define TERMPATH "$TERMPATH"
7503 EOF
7504
7505         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7506         echo "$as_me:7506: checking if fast termcap-loader is needed" >&5
7507 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7508
7509 # Check whether --enable-getcap or --disable-getcap was given.
7510 if test "${enable_getcap+set}" = set; then
7511   enableval="$enable_getcap"
7512   with_getcap=$enableval
7513 else
7514   with_getcap=no
7515 fi;
7516         echo "$as_me:7516: result: $with_getcap" >&5
7517 echo "${ECHO_T}$with_getcap" >&6
7518         test "x$with_getcap" = "xyes" &&
7519 cat >>confdefs.h <<\EOF
7520 #define USE_GETCAP 1
7521 EOF
7522
7523         echo "$as_me:7523: checking if translated termcaps will be cached in ~/.terminfo" >&5
7524 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7525
7526 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7527 if test "${enable_getcap_cache+set}" = set; then
7528   enableval="$enable_getcap_cache"
7529   with_getcap_cache=$enableval
7530 else
7531   with_getcap_cache=no
7532 fi;
7533         echo "$as_me:7533: result: $with_getcap_cache" >&5
7534 echo "${ECHO_T}$with_getcap_cache" >&6
7535         test "x$with_getcap_cache" = "xyes" &&
7536 cat >>confdefs.h <<\EOF
7537 #define USE_GETCAP_CACHE 1
7538 EOF
7539
7540 fi
7541
7542 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7543 echo "$as_me:7543: checking if ~/.terminfo is wanted" >&5
7544 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7545
7546 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7547 if test "${enable_home_terminfo+set}" = set; then
7548   enableval="$enable_home_terminfo"
7549   with_home_terminfo=$enableval
7550 else
7551   with_home_terminfo=yes
7552 fi;
7553 echo "$as_me:7553: result: $with_home_terminfo" >&5
7554 echo "${ECHO_T}$with_home_terminfo" >&6
7555 test "x$with_home_terminfo" = "xyes" &&
7556 cat >>confdefs.h <<\EOF
7557 #define USE_HOME_TERMINFO 1
7558 EOF
7559
7560 echo "$as_me:7560: checking if you want to use restricted environment when running as root" >&5
7561 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7562
7563 # Check whether --enable-root-environ or --disable-root-environ was given.
7564 if test "${enable_root_environ+set}" = set; then
7565   enableval="$enable_root_environ"
7566   with_root_environ=$enableval
7567 else
7568   with_root_environ=yes
7569 fi;
7570 echo "$as_me:7570: result: $with_root_environ" >&5
7571 echo "${ECHO_T}$with_root_environ" >&6
7572 test "x$with_root_environ" = xyes &&
7573 cat >>confdefs.h <<\EOF
7574 #define USE_ROOT_ENVIRON 1
7575 EOF
7576
7577 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7578 ###   to reduce storage requirements for the terminfo database.
7579
7580 for ac_func in \
7581         remove \
7582         unlink
7583 do
7584 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7585 echo "$as_me:7585: checking for $ac_func" >&5
7586 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7587 if eval "test \"\${$as_ac_var+set}\" = set"; then
7588   echo $ECHO_N "(cached) $ECHO_C" >&6
7589 else
7590   cat >conftest.$ac_ext <<_ACEOF
7591 #line 7591 "configure"
7592 #include "confdefs.h"
7593 /* System header to define __stub macros and hopefully few prototypes,
7594     which can conflict with char $ac_func (); below.  */
7595 #include <assert.h>
7596 /* Override any gcc2 internal prototype to avoid an error.  */
7597 #ifdef __cplusplus
7598 extern "C"
7599 #endif
7600 /* We use char because int might match the return type of a gcc2
7601    builtin and then its argument prototype would still apply.  */
7602 char $ac_func ();
7603 char (*f) ();
7604
7605 int
7606 main ()
7607 {
7608 /* The GNU C library defines this for functions which it implements
7609     to always fail with ENOSYS.  Some functions are actually named
7610     something starting with __ and the normal name is an alias.  */
7611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7612 choke me
7613 #else
7614 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7615 #endif
7616
7617   ;
7618   return 0;
7619 }
7620 _ACEOF
7621 rm -f conftest.$ac_objext conftest$ac_exeext
7622 if { (eval echo "$as_me:7622: \"$ac_link\"") >&5
7623   (eval $ac_link) 2>&5
7624   ac_status=$?
7625   echo "$as_me:7625: \$? = $ac_status" >&5
7626   (exit $ac_status); } &&
7627          { ac_try='test -s conftest$ac_exeext'
7628   { (eval echo "$as_me:7628: \"$ac_try\"") >&5
7629   (eval $ac_try) 2>&5
7630   ac_status=$?
7631   echo "$as_me:7631: \$? = $ac_status" >&5
7632   (exit $ac_status); }; }; then
7633   eval "$as_ac_var=yes"
7634 else
7635   echo "$as_me: failed program was:" >&5
7636 cat conftest.$ac_ext >&5
7637 eval "$as_ac_var=no"
7638 fi
7639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7640 fi
7641 echo "$as_me:7641: result: `eval echo '${'$as_ac_var'}'`" >&5
7642 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7643 if test `eval echo '${'$as_ac_var'}'` = yes; then
7644   cat >>confdefs.h <<EOF
7645 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7646 EOF
7647
7648 fi
7649 done
7650
7651 if test "$cross_compiling" = yes ; then
7652
7653 for ac_func in \
7654                 link \
7655                 symlink
7656 do
7657 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7658 echo "$as_me:7658: checking for $ac_func" >&5
7659 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7660 if eval "test \"\${$as_ac_var+set}\" = set"; then
7661   echo $ECHO_N "(cached) $ECHO_C" >&6
7662 else
7663   cat >conftest.$ac_ext <<_ACEOF
7664 #line 7664 "configure"
7665 #include "confdefs.h"
7666 /* System header to define __stub macros and hopefully few prototypes,
7667     which can conflict with char $ac_func (); below.  */
7668 #include <assert.h>
7669 /* Override any gcc2 internal prototype to avoid an error.  */
7670 #ifdef __cplusplus
7671 extern "C"
7672 #endif
7673 /* We use char because int might match the return type of a gcc2
7674    builtin and then its argument prototype would still apply.  */
7675 char $ac_func ();
7676 char (*f) ();
7677
7678 int
7679 main ()
7680 {
7681 /* The GNU C library defines this for functions which it implements
7682     to always fail with ENOSYS.  Some functions are actually named
7683     something starting with __ and the normal name is an alias.  */
7684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7685 choke me
7686 #else
7687 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7688 #endif
7689
7690   ;
7691   return 0;
7692 }
7693 _ACEOF
7694 rm -f conftest.$ac_objext conftest$ac_exeext
7695 if { (eval echo "$as_me:7695: \"$ac_link\"") >&5
7696   (eval $ac_link) 2>&5
7697   ac_status=$?
7698   echo "$as_me:7698: \$? = $ac_status" >&5
7699   (exit $ac_status); } &&
7700          { ac_try='test -s conftest$ac_exeext'
7701   { (eval echo "$as_me:7701: \"$ac_try\"") >&5
7702   (eval $ac_try) 2>&5
7703   ac_status=$?
7704   echo "$as_me:7704: \$? = $ac_status" >&5
7705   (exit $ac_status); }; }; then
7706   eval "$as_ac_var=yes"
7707 else
7708   echo "$as_me: failed program was:" >&5
7709 cat conftest.$ac_ext >&5
7710 eval "$as_ac_var=no"
7711 fi
7712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7713 fi
7714 echo "$as_me:7714: result: `eval echo '${'$as_ac_var'}'`" >&5
7715 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7716 if test `eval echo '${'$as_ac_var'}'` = yes; then
7717   cat >>confdefs.h <<EOF
7718 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7719 EOF
7720
7721 fi
7722 done
7723
7724 else
7725         echo "$as_me:7725: checking if link/symlink functions work" >&5
7726 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7727 if test "${cf_cv_link_funcs+set}" = set; then
7728   echo $ECHO_N "(cached) $ECHO_C" >&6
7729 else
7730
7731                 cf_cv_link_funcs=
7732                 for cf_func in link symlink ; do
7733                         if test "$cross_compiling" = yes; then
7734
7735                         eval 'ac_cv_func_'$cf_func'=error'
7736 else
7737   cat >conftest.$ac_ext <<_ACEOF
7738 #line 7738 "configure"
7739 #include "confdefs.h"
7740
7741 #include <sys/types.h>
7742 #include <sys/stat.h>
7743 #ifdef HAVE_UNISTD_H
7744 #include <unistd.h>
7745 #endif
7746 int main()
7747 {
7748         int fail = 0;
7749         char *src = "config.log";
7750         char *dst = "conftest.chk";
7751         struct stat src_sb;
7752         struct stat dst_sb;
7753
7754         stat(src, &src_sb);
7755         fail = ($cf_func("config.log", "conftest.chk") < 0)
7756             || (stat(dst, &dst_sb) < 0)
7757             || (dst_sb.st_mtime != src_sb.st_mtime);
7758 #ifdef HAVE_UNLINK
7759         unlink(dst);
7760 #else
7761         remove(dst);
7762 #endif
7763         ${cf_cv_main_return:-return} (fail);
7764 }
7765
7766 _ACEOF
7767 rm -f conftest$ac_exeext
7768 if { (eval echo "$as_me:7768: \"$ac_link\"") >&5
7769   (eval $ac_link) 2>&5
7770   ac_status=$?
7771   echo "$as_me:7771: \$? = $ac_status" >&5
7772   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7773   { (eval echo "$as_me:7773: \"$ac_try\"") >&5
7774   (eval $ac_try) 2>&5
7775   ac_status=$?
7776   echo "$as_me:7776: \$? = $ac_status" >&5
7777   (exit $ac_status); }; }; then
7778
7779                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7780                         eval 'ac_cv_func_'$cf_func'=yes'
7781 else
7782   echo "$as_me: program exited with status $ac_status" >&5
7783 echo "$as_me: failed program was:" >&5
7784 cat conftest.$ac_ext >&5
7785
7786                         eval 'ac_cv_func_'$cf_func'=no'
7787 fi
7788 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7789 fi
7790                 done
7791                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7792
7793 fi
7794 echo "$as_me:7794: result: $cf_cv_link_funcs" >&5
7795 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7796         test "$ac_cv_func_link"    = yes &&
7797 cat >>confdefs.h <<\EOF
7798 #define HAVE_LINK 1
7799 EOF
7800
7801         test "$ac_cv_func_symlink" = yes &&
7802 cat >>confdefs.h <<\EOF
7803 #define HAVE_SYMLINK 1
7804 EOF
7805
7806 fi
7807
7808 with_links=no
7809 with_symlinks=no
7810
7811 # soft links (symbolic links) are useful for some systems where hard links do
7812 # not work, or to make it simpler to copy terminfo trees around.
7813 if test "x$ac_cv_func_symlink" = xyes ; then
7814         echo "$as_me:7814: checking if tic should use symbolic links" >&5
7815 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7816
7817 # Check whether --enable-symlinks or --disable-symlinks was given.
7818 if test "${enable_symlinks+set}" = set; then
7819   enableval="$enable_symlinks"
7820   with_symlinks=$enableval
7821 else
7822   with_symlinks=no
7823 fi;
7824         echo "$as_me:7824: result: $with_symlinks" >&5
7825 echo "${ECHO_T}$with_symlinks" >&6
7826 fi
7827
7828 # If we have hard links and did not choose to use soft links instead, there is
7829 # no reason to make this choice optional - use the hard links.
7830 if test "$with_symlinks" = no ; then
7831         echo "$as_me:7831: checking if tic should use hard links" >&5
7832 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7833         if test "x$ac_cv_func_link" = xyes ; then
7834                 with_links=yes
7835         else
7836                 with_links=no
7837         fi
7838         echo "$as_me:7838: result: $with_links" >&5
7839 echo "${ECHO_T}$with_links" >&6
7840 fi
7841
7842 test "x$with_links" = xyes &&
7843 cat >>confdefs.h <<\EOF
7844 #define USE_LINKS 1
7845 EOF
7846
7847 test "x$with_symlinks" = xyes &&
7848 cat >>confdefs.h <<\EOF
7849 #define USE_SYMLINKS 1
7850 EOF
7851
7852 ###   use option --enable-broken-linker to force on use of broken-linker support
7853 echo "$as_me:7853: checking if you want broken-linker support code" >&5
7854 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7855
7856 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7857 if test "${enable_broken_linker+set}" = set; then
7858   enableval="$enable_broken_linker"
7859   with_broken_linker=$enableval
7860 else
7861   with_broken_linker=${BROKEN_LINKER:-no}
7862 fi;
7863 echo "$as_me:7863: result: $with_broken_linker" >&5
7864 echo "${ECHO_T}$with_broken_linker" >&6
7865
7866 BROKEN_LINKER=0
7867 if test "x$with_broken_linker" = xyes ; then
7868
7869 cat >>confdefs.h <<\EOF
7870 #define BROKEN_LINKER 1
7871 EOF
7872
7873         BROKEN_LINKER=1
7874 elif test "$DFT_LWR_MODEL" = shared ; then
7875         case $cf_cv_system_name in
7876         (cygwin*)
7877
7878 cat >>confdefs.h <<\EOF
7879 #define BROKEN_LINKER 1
7880 EOF
7881
7882                 BROKEN_LINKER=1
7883                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7884
7885 echo "${as_me:-configure}:7885: testing cygwin linker is broken anyway ..." 1>&5
7886
7887                 ;;
7888         esac
7889 fi
7890
7891 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7892 echo "$as_me:7892: checking if tputs should process BSD-style prefix padding" >&5
7893 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7894
7895 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7896 if test "${enable_bsdpad+set}" = set; then
7897   enableval="$enable_bsdpad"
7898   with_bsdpad=$enableval
7899 else
7900   with_bsdpad=no
7901 fi;
7902 echo "$as_me:7902: result: $with_bsdpad" >&5
7903 echo "${ECHO_T}$with_bsdpad" >&6
7904 test "x$with_bsdpad" = xyes &&
7905 cat >>confdefs.h <<\EOF
7906 #define BSD_TPUTS 1
7907 EOF
7908
7909 ###   use option --enable-widec to turn on use of wide-character support
7910 NCURSES_CH_T=chtype
7911 NCURSES_LIBUTF8=0
7912
7913 NEED_WCHAR_H=0
7914 NCURSES_MBSTATE_T=0
7915 NCURSES_WCHAR_T=0
7916 NCURSES_WINT_T=0
7917
7918 # Check to define _XOPEN_SOURCE "automatically"
7919 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7920
7921 cf_XOPEN_SOURCE=500
7922 cf_POSIX_C_SOURCE=199506L
7923 cf_xopen_source=
7924
7925 case $host_os in
7926 (aix[4-7]*)
7927         cf_xopen_source="-D_ALL_SOURCE"
7928         ;;
7929 (msys)
7930         cf_XOPEN_SOURCE=600
7931         ;;
7932 (darwin[0-8].*)
7933         cf_xopen_source="-D_APPLE_C_SOURCE"
7934         ;;
7935 (darwin*)
7936         cf_xopen_source="-D_DARWIN_C_SOURCE"
7937         cf_XOPEN_SOURCE=
7938         ;;
7939 (freebsd*|dragonfly*)
7940         # 5.x headers associate
7941         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7942         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7943         cf_POSIX_C_SOURCE=200112L
7944         cf_XOPEN_SOURCE=600
7945         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7946         ;;
7947 (hpux11*)
7948         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7949         ;;
7950 (hpux*)
7951         cf_xopen_source="-D_HPUX_SOURCE"
7952         ;;
7953 (irix[56].*)
7954         cf_xopen_source="-D_SGI_SOURCE"
7955         cf_XOPEN_SOURCE=
7956         ;;
7957 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
7958
7959 echo "$as_me:7959: checking if we must define _GNU_SOURCE" >&5
7960 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7961 if test "${cf_cv_gnu_source+set}" = set; then
7962   echo $ECHO_N "(cached) $ECHO_C" >&6
7963 else
7964
7965 cat >conftest.$ac_ext <<_ACEOF
7966 #line 7966 "configure"
7967 #include "confdefs.h"
7968 #include <sys/types.h>
7969 int
7970 main ()
7971 {
7972
7973 #ifndef _XOPEN_SOURCE
7974 make an error
7975 #endif
7976   ;
7977   return 0;
7978 }
7979 _ACEOF
7980 rm -f conftest.$ac_objext
7981 if { (eval echo "$as_me:7981: \"$ac_compile\"") >&5
7982   (eval $ac_compile) 2>&5
7983   ac_status=$?
7984   echo "$as_me:7984: \$? = $ac_status" >&5
7985   (exit $ac_status); } &&
7986          { ac_try='test -s conftest.$ac_objext'
7987   { (eval echo "$as_me:7987: \"$ac_try\"") >&5
7988   (eval $ac_try) 2>&5
7989   ac_status=$?
7990   echo "$as_me:7990: \$? = $ac_status" >&5
7991   (exit $ac_status); }; }; then
7992   cf_cv_gnu_source=no
7993 else
7994   echo "$as_me: failed program was:" >&5
7995 cat conftest.$ac_ext >&5
7996 cf_save="$CPPFLAGS"
7997          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7998          cat >conftest.$ac_ext <<_ACEOF
7999 #line 7999 "configure"
8000 #include "confdefs.h"
8001 #include <sys/types.h>
8002 int
8003 main ()
8004 {
8005
8006 #ifdef _XOPEN_SOURCE
8007 make an error
8008 #endif
8009   ;
8010   return 0;
8011 }
8012 _ACEOF
8013 rm -f conftest.$ac_objext
8014 if { (eval echo "$as_me:8014: \"$ac_compile\"") >&5
8015   (eval $ac_compile) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit $ac_status); } &&
8019          { ac_try='test -s conftest.$ac_objext'
8020   { (eval echo "$as_me:8020: \"$ac_try\"") >&5
8021   (eval $ac_try) 2>&5
8022   ac_status=$?
8023   echo "$as_me:8023: \$? = $ac_status" >&5
8024   (exit $ac_status); }; }; then
8025   cf_cv_gnu_source=no
8026 else
8027   echo "$as_me: failed program was:" >&5
8028 cat conftest.$ac_ext >&5
8029 cf_cv_gnu_source=yes
8030 fi
8031 rm -f conftest.$ac_objext conftest.$ac_ext
8032         CPPFLAGS="$cf_save"
8033
8034 fi
8035 rm -f conftest.$ac_objext conftest.$ac_ext
8036
8037 fi
8038 echo "$as_me:8038: result: $cf_cv_gnu_source" >&5
8039 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8040
8041 if test "$cf_cv_gnu_source" = yes
8042 then
8043 echo "$as_me:8043: checking if we should also define _DEFAULT_SOURCE" >&5
8044 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8045 if test "${cf_cv_default_source+set}" = set; then
8046   echo $ECHO_N "(cached) $ECHO_C" >&6
8047 else
8048
8049 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8050         cat >conftest.$ac_ext <<_ACEOF
8051 #line 8051 "configure"
8052 #include "confdefs.h"
8053 #include <sys/types.h>
8054 int
8055 main ()
8056 {
8057
8058 #ifdef _DEFAULT_SOURCE
8059 make an error
8060 #endif
8061   ;
8062   return 0;
8063 }
8064 _ACEOF
8065 rm -f conftest.$ac_objext
8066 if { (eval echo "$as_me:8066: \"$ac_compile\"") >&5
8067   (eval $ac_compile) 2>&5
8068   ac_status=$?
8069   echo "$as_me:8069: \$? = $ac_status" >&5
8070   (exit $ac_status); } &&
8071          { ac_try='test -s conftest.$ac_objext'
8072   { (eval echo "$as_me:8072: \"$ac_try\"") >&5
8073   (eval $ac_try) 2>&5
8074   ac_status=$?
8075   echo "$as_me:8075: \$? = $ac_status" >&5
8076   (exit $ac_status); }; }; then
8077   cf_cv_default_source=no
8078 else
8079   echo "$as_me: failed program was:" >&5
8080 cat conftest.$ac_ext >&5
8081 cf_cv_default_source=yes
8082 fi
8083 rm -f conftest.$ac_objext conftest.$ac_ext
8084
8085 fi
8086 echo "$as_me:8086: result: $cf_cv_default_source" >&5
8087 echo "${ECHO_T}$cf_cv_default_source" >&6
8088 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8089 fi
8090
8091         ;;
8092 (minix*)
8093         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8094         ;;
8095 (mirbsd*)
8096         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8097         cf_XOPEN_SOURCE=
8098
8099 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8100
8101 cf_save_CFLAGS="$CFLAGS"
8102 cf_save_CPPFLAGS="$CPPFLAGS"
8103
8104 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8105         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8106                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8107
8108 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8109         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8110                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8111
8112 echo "$as_me:8112: checking if we should define _POSIX_C_SOURCE" >&5
8113 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8114 if test "${cf_cv_posix_c_source+set}" = set; then
8115   echo $ECHO_N "(cached) $ECHO_C" >&6
8116 else
8117
8118 echo "${as_me:-configure}:8118: testing if the symbol is already defined go no further ..." 1>&5
8119
8120         cat >conftest.$ac_ext <<_ACEOF
8121 #line 8121 "configure"
8122 #include "confdefs.h"
8123 #include <sys/types.h>
8124 int
8125 main ()
8126 {
8127
8128 #ifndef _POSIX_C_SOURCE
8129 make an error
8130 #endif
8131   ;
8132   return 0;
8133 }
8134 _ACEOF
8135 rm -f conftest.$ac_objext
8136 if { (eval echo "$as_me:8136: \"$ac_compile\"") >&5
8137   (eval $ac_compile) 2>&5
8138   ac_status=$?
8139   echo "$as_me:8139: \$? = $ac_status" >&5
8140   (exit $ac_status); } &&
8141          { ac_try='test -s conftest.$ac_objext'
8142   { (eval echo "$as_me:8142: \"$ac_try\"") >&5
8143   (eval $ac_try) 2>&5
8144   ac_status=$?
8145   echo "$as_me:8145: \$? = $ac_status" >&5
8146   (exit $ac_status); }; }; then
8147   cf_cv_posix_c_source=no
8148 else
8149   echo "$as_me: failed program was:" >&5
8150 cat conftest.$ac_ext >&5
8151 cf_want_posix_source=no
8152          case .$cf_POSIX_C_SOURCE in
8153          (.[12]??*)
8154                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8155                 ;;
8156          (.2)
8157                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8158                 cf_want_posix_source=yes
8159                 ;;
8160          (.*)
8161                 cf_want_posix_source=yes
8162                 ;;
8163          esac
8164          if test "$cf_want_posix_source" = yes ; then
8165                 cat >conftest.$ac_ext <<_ACEOF
8166 #line 8166 "configure"
8167 #include "confdefs.h"
8168 #include <sys/types.h>
8169 int
8170 main ()
8171 {
8172
8173 #ifdef _POSIX_SOURCE
8174 make an error
8175 #endif
8176   ;
8177   return 0;
8178 }
8179 _ACEOF
8180 rm -f conftest.$ac_objext
8181 if { (eval echo "$as_me:8181: \"$ac_compile\"") >&5
8182   (eval $ac_compile) 2>&5
8183   ac_status=$?
8184   echo "$as_me:8184: \$? = $ac_status" >&5
8185   (exit $ac_status); } &&
8186          { ac_try='test -s conftest.$ac_objext'
8187   { (eval echo "$as_me:8187: \"$ac_try\"") >&5
8188   (eval $ac_try) 2>&5
8189   ac_status=$?
8190   echo "$as_me:8190: \$? = $ac_status" >&5
8191   (exit $ac_status); }; }; then
8192   :
8193 else
8194   echo "$as_me: failed program was:" >&5
8195 cat conftest.$ac_ext >&5
8196 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8197 fi
8198 rm -f conftest.$ac_objext conftest.$ac_ext
8199          fi
8200
8201 echo "${as_me:-configure}:8201: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8202
8203          CFLAGS="$cf_trim_CFLAGS"
8204          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8205
8206 echo "${as_me:-configure}:8206: testing if the second compile does not leave our definition intact error ..." 1>&5
8207
8208          cat >conftest.$ac_ext <<_ACEOF
8209 #line 8209 "configure"
8210 #include "confdefs.h"
8211 #include <sys/types.h>
8212 int
8213 main ()
8214 {
8215
8216 #ifndef _POSIX_C_SOURCE
8217 make an error
8218 #endif
8219   ;
8220   return 0;
8221 }
8222 _ACEOF
8223 rm -f conftest.$ac_objext
8224 if { (eval echo "$as_me:8224: \"$ac_compile\"") >&5
8225   (eval $ac_compile) 2>&5
8226   ac_status=$?
8227   echo "$as_me:8227: \$? = $ac_status" >&5
8228   (exit $ac_status); } &&
8229          { ac_try='test -s conftest.$ac_objext'
8230   { (eval echo "$as_me:8230: \"$ac_try\"") >&5
8231   (eval $ac_try) 2>&5
8232   ac_status=$?
8233   echo "$as_me:8233: \$? = $ac_status" >&5
8234   (exit $ac_status); }; }; then
8235   :
8236 else
8237   echo "$as_me: failed program was:" >&5
8238 cat conftest.$ac_ext >&5
8239 cf_cv_posix_c_source=no
8240 fi
8241 rm -f conftest.$ac_objext conftest.$ac_ext
8242          CFLAGS="$cf_save_CFLAGS"
8243          CPPFLAGS="$cf_save_CPPFLAGS"
8244
8245 fi
8246 rm -f conftest.$ac_objext conftest.$ac_ext
8247
8248 fi
8249 echo "$as_me:8249: result: $cf_cv_posix_c_source" >&5
8250 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8251
8252 if test "$cf_cv_posix_c_source" != no ; then
8253         CFLAGS="$cf_trim_CFLAGS"
8254         CPPFLAGS="$cf_trim_CPPFLAGS"
8255
8256 cf_fix_cppflags=no
8257 cf_new_cflags=
8258 cf_new_cppflags=
8259 cf_new_extra_cppflags=
8260
8261 for cf_add_cflags in $cf_cv_posix_c_source
8262 do
8263 case $cf_fix_cppflags in
8264 (no)
8265         case $cf_add_cflags in
8266         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8267                 case $cf_add_cflags in
8268                 (-D*)
8269                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8270
8271                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8272                                 && test -z "${cf_tst_cflags}" \
8273                                 && cf_fix_cppflags=yes
8274
8275                         if test $cf_fix_cppflags = yes ; then
8276                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8277                                 continue
8278                         elif test "${cf_tst_cflags}" = "\"'" ; then
8279                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8280                                 continue
8281                         fi
8282                         ;;
8283                 esac
8284                 case "$CPPFLAGS" in
8285                 (*$cf_add_cflags)
8286                         ;;
8287                 (*)
8288                         case $cf_add_cflags in
8289                         (-D*)
8290                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8291
8292 CPPFLAGS=`echo "$CPPFLAGS" | \
8293         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8294                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8295
8296                                 ;;
8297                         esac
8298                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8299                         ;;
8300                 esac
8301                 ;;
8302         (*)
8303                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8304                 ;;
8305         esac
8306         ;;
8307 (yes)
8308         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8309
8310         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8311
8312         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8313                 && test -z "${cf_tst_cflags}" \
8314                 && cf_fix_cppflags=no
8315         ;;
8316 esac
8317 done
8318
8319 if test -n "$cf_new_cflags" ; then
8320
8321         CFLAGS="$CFLAGS $cf_new_cflags"
8322 fi
8323
8324 if test -n "$cf_new_cppflags" ; then
8325
8326         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8327 fi
8328
8329 if test -n "$cf_new_extra_cppflags" ; then
8330
8331         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8332 fi
8333
8334 fi
8335
8336         ;;
8337 (netbsd*)
8338         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8339         ;;
8340 (openbsd[4-9]*)
8341         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8342         cf_xopen_source="-D_BSD_SOURCE"
8343         cf_XOPEN_SOURCE=600
8344         ;;
8345 (openbsd*)
8346         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8347         ;;
8348 (osf[45]*)
8349         cf_xopen_source="-D_OSF_SOURCE"
8350         ;;
8351 (nto-qnx*)
8352         cf_xopen_source="-D_QNX_SOURCE"
8353         ;;
8354 (sco*)
8355         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8356         ;;
8357 (solaris2.*)
8358         cf_xopen_source="-D__EXTENSIONS__"
8359         cf_cv_xopen_source=broken
8360         ;;
8361 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8362         cf_XOPEN_SOURCE=
8363         cf_POSIX_C_SOURCE=
8364         ;;
8365 (*)
8366
8367 echo "$as_me:8367: checking if we should define _XOPEN_SOURCE" >&5
8368 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8369 if test "${cf_cv_xopen_source+set}" = set; then
8370   echo $ECHO_N "(cached) $ECHO_C" >&6
8371 else
8372
8373         cat >conftest.$ac_ext <<_ACEOF
8374 #line 8374 "configure"
8375 #include "confdefs.h"
8376
8377 #include <stdlib.h>
8378 #include <string.h>
8379 #include <sys/types.h>
8380
8381 int
8382 main ()
8383 {
8384
8385 #ifndef _XOPEN_SOURCE
8386 make an error
8387 #endif
8388   ;
8389   return 0;
8390 }
8391 _ACEOF
8392 rm -f conftest.$ac_objext
8393 if { (eval echo "$as_me:8393: \"$ac_compile\"") >&5
8394   (eval $ac_compile) 2>&5
8395   ac_status=$?
8396   echo "$as_me:8396: \$? = $ac_status" >&5
8397   (exit $ac_status); } &&
8398          { ac_try='test -s conftest.$ac_objext'
8399   { (eval echo "$as_me:8399: \"$ac_try\"") >&5
8400   (eval $ac_try) 2>&5
8401   ac_status=$?
8402   echo "$as_me:8402: \$? = $ac_status" >&5
8403   (exit $ac_status); }; }; then
8404   cf_cv_xopen_source=no
8405 else
8406   echo "$as_me: failed program was:" >&5
8407 cat conftest.$ac_ext >&5
8408 cf_save="$CPPFLAGS"
8409          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8410          cat >conftest.$ac_ext <<_ACEOF
8411 #line 8411 "configure"
8412 #include "confdefs.h"
8413
8414 #include <stdlib.h>
8415 #include <string.h>
8416 #include <sys/types.h>
8417
8418 int
8419 main ()
8420 {
8421
8422 #ifdef _XOPEN_SOURCE
8423 make an error
8424 #endif
8425   ;
8426   return 0;
8427 }
8428 _ACEOF
8429 rm -f conftest.$ac_objext
8430 if { (eval echo "$as_me:8430: \"$ac_compile\"") >&5
8431   (eval $ac_compile) 2>&5
8432   ac_status=$?
8433   echo "$as_me:8433: \$? = $ac_status" >&5
8434   (exit $ac_status); } &&
8435          { ac_try='test -s conftest.$ac_objext'
8436   { (eval echo "$as_me:8436: \"$ac_try\"") >&5
8437   (eval $ac_try) 2>&5
8438   ac_status=$?
8439   echo "$as_me:8439: \$? = $ac_status" >&5
8440   (exit $ac_status); }; }; then
8441   cf_cv_xopen_source=no
8442 else
8443   echo "$as_me: failed program was:" >&5
8444 cat conftest.$ac_ext >&5
8445 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8446 fi
8447 rm -f conftest.$ac_objext conftest.$ac_ext
8448         CPPFLAGS="$cf_save"
8449
8450 fi
8451 rm -f conftest.$ac_objext conftest.$ac_ext
8452
8453 fi
8454 echo "$as_me:8454: result: $cf_cv_xopen_source" >&5
8455 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8456
8457 if test "$cf_cv_xopen_source" != no ; then
8458
8459 CFLAGS=`echo "$CFLAGS" | \
8460         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8461                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8462
8463 CPPFLAGS=`echo "$CPPFLAGS" | \
8464         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8465                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8466
8467         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8468
8469 cf_fix_cppflags=no
8470 cf_new_cflags=
8471 cf_new_cppflags=
8472 cf_new_extra_cppflags=
8473
8474 for cf_add_cflags in $cf_temp_xopen_source
8475 do
8476 case $cf_fix_cppflags in
8477 (no)
8478         case $cf_add_cflags in
8479         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8480                 case $cf_add_cflags in
8481                 (-D*)
8482                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8483
8484                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8485                                 && test -z "${cf_tst_cflags}" \
8486                                 && cf_fix_cppflags=yes
8487
8488                         if test $cf_fix_cppflags = yes ; then
8489                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8490                                 continue
8491                         elif test "${cf_tst_cflags}" = "\"'" ; then
8492                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8493                                 continue
8494                         fi
8495                         ;;
8496                 esac
8497                 case "$CPPFLAGS" in
8498                 (*$cf_add_cflags)
8499                         ;;
8500                 (*)
8501                         case $cf_add_cflags in
8502                         (-D*)
8503                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8504
8505 CPPFLAGS=`echo "$CPPFLAGS" | \
8506         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8507                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8508
8509                                 ;;
8510                         esac
8511                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8512                         ;;
8513                 esac
8514                 ;;
8515         (*)
8516                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8517                 ;;
8518         esac
8519         ;;
8520 (yes)
8521         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8522
8523         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8524
8525         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8526                 && test -z "${cf_tst_cflags}" \
8527                 && cf_fix_cppflags=no
8528         ;;
8529 esac
8530 done
8531
8532 if test -n "$cf_new_cflags" ; then
8533
8534         CFLAGS="$CFLAGS $cf_new_cflags"
8535 fi
8536
8537 if test -n "$cf_new_cppflags" ; then
8538
8539         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8540 fi
8541
8542 if test -n "$cf_new_extra_cppflags" ; then
8543
8544         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8545 fi
8546
8547 fi
8548
8549 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8550
8551 cf_save_CFLAGS="$CFLAGS"
8552 cf_save_CPPFLAGS="$CPPFLAGS"
8553
8554 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8555         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8556                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8557
8558 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8559         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8560                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8561
8562 echo "$as_me:8562: checking if we should define _POSIX_C_SOURCE" >&5
8563 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8564 if test "${cf_cv_posix_c_source+set}" = set; then
8565   echo $ECHO_N "(cached) $ECHO_C" >&6
8566 else
8567
8568 echo "${as_me:-configure}:8568: testing if the symbol is already defined go no further ..." 1>&5
8569
8570         cat >conftest.$ac_ext <<_ACEOF
8571 #line 8571 "configure"
8572 #include "confdefs.h"
8573 #include <sys/types.h>
8574 int
8575 main ()
8576 {
8577
8578 #ifndef _POSIX_C_SOURCE
8579 make an error
8580 #endif
8581   ;
8582   return 0;
8583 }
8584 _ACEOF
8585 rm -f conftest.$ac_objext
8586 if { (eval echo "$as_me:8586: \"$ac_compile\"") >&5
8587   (eval $ac_compile) 2>&5
8588   ac_status=$?
8589   echo "$as_me:8589: \$? = $ac_status" >&5
8590   (exit $ac_status); } &&
8591          { ac_try='test -s conftest.$ac_objext'
8592   { (eval echo "$as_me:8592: \"$ac_try\"") >&5
8593   (eval $ac_try) 2>&5
8594   ac_status=$?
8595   echo "$as_me:8595: \$? = $ac_status" >&5
8596   (exit $ac_status); }; }; then
8597   cf_cv_posix_c_source=no
8598 else
8599   echo "$as_me: failed program was:" >&5
8600 cat conftest.$ac_ext >&5
8601 cf_want_posix_source=no
8602          case .$cf_POSIX_C_SOURCE in
8603          (.[12]??*)
8604                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8605                 ;;
8606          (.2)
8607                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8608                 cf_want_posix_source=yes
8609                 ;;
8610          (.*)
8611                 cf_want_posix_source=yes
8612                 ;;
8613          esac
8614          if test "$cf_want_posix_source" = yes ; then
8615                 cat >conftest.$ac_ext <<_ACEOF
8616 #line 8616 "configure"
8617 #include "confdefs.h"
8618 #include <sys/types.h>
8619 int
8620 main ()
8621 {
8622
8623 #ifdef _POSIX_SOURCE
8624 make an error
8625 #endif
8626   ;
8627   return 0;
8628 }
8629 _ACEOF
8630 rm -f conftest.$ac_objext
8631 if { (eval echo "$as_me:8631: \"$ac_compile\"") >&5
8632   (eval $ac_compile) 2>&5
8633   ac_status=$?
8634   echo "$as_me:8634: \$? = $ac_status" >&5
8635   (exit $ac_status); } &&
8636          { ac_try='test -s conftest.$ac_objext'
8637   { (eval echo "$as_me:8637: \"$ac_try\"") >&5
8638   (eval $ac_try) 2>&5
8639   ac_status=$?
8640   echo "$as_me:8640: \$? = $ac_status" >&5
8641   (exit $ac_status); }; }; then
8642   :
8643 else
8644   echo "$as_me: failed program was:" >&5
8645 cat conftest.$ac_ext >&5
8646 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8647 fi
8648 rm -f conftest.$ac_objext conftest.$ac_ext
8649          fi
8650
8651 echo "${as_me:-configure}:8651: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8652
8653          CFLAGS="$cf_trim_CFLAGS"
8654          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8655
8656 echo "${as_me:-configure}:8656: testing if the second compile does not leave our definition intact error ..." 1>&5
8657
8658          cat >conftest.$ac_ext <<_ACEOF
8659 #line 8659 "configure"
8660 #include "confdefs.h"
8661 #include <sys/types.h>
8662 int
8663 main ()
8664 {
8665
8666 #ifndef _POSIX_C_SOURCE
8667 make an error
8668 #endif
8669   ;
8670   return 0;
8671 }
8672 _ACEOF
8673 rm -f conftest.$ac_objext
8674 if { (eval echo "$as_me:8674: \"$ac_compile\"") >&5
8675   (eval $ac_compile) 2>&5
8676   ac_status=$?
8677   echo "$as_me:8677: \$? = $ac_status" >&5
8678   (exit $ac_status); } &&
8679          { ac_try='test -s conftest.$ac_objext'
8680   { (eval echo "$as_me:8680: \"$ac_try\"") >&5
8681   (eval $ac_try) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); }; }; then
8685   :
8686 else
8687   echo "$as_me: failed program was:" >&5
8688 cat conftest.$ac_ext >&5
8689 cf_cv_posix_c_source=no
8690 fi
8691 rm -f conftest.$ac_objext conftest.$ac_ext
8692          CFLAGS="$cf_save_CFLAGS"
8693          CPPFLAGS="$cf_save_CPPFLAGS"
8694
8695 fi
8696 rm -f conftest.$ac_objext conftest.$ac_ext
8697
8698 fi
8699 echo "$as_me:8699: result: $cf_cv_posix_c_source" >&5
8700 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8701
8702 if test "$cf_cv_posix_c_source" != no ; then
8703         CFLAGS="$cf_trim_CFLAGS"
8704         CPPFLAGS="$cf_trim_CPPFLAGS"
8705
8706 cf_fix_cppflags=no
8707 cf_new_cflags=
8708 cf_new_cppflags=
8709 cf_new_extra_cppflags=
8710
8711 for cf_add_cflags in $cf_cv_posix_c_source
8712 do
8713 case $cf_fix_cppflags in
8714 (no)
8715         case $cf_add_cflags in
8716         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8717                 case $cf_add_cflags in
8718                 (-D*)
8719                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8720
8721                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8722                                 && test -z "${cf_tst_cflags}" \
8723                                 && cf_fix_cppflags=yes
8724
8725                         if test $cf_fix_cppflags = yes ; then
8726                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8727                                 continue
8728                         elif test "${cf_tst_cflags}" = "\"'" ; then
8729                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8730                                 continue
8731                         fi
8732                         ;;
8733                 esac
8734                 case "$CPPFLAGS" in
8735                 (*$cf_add_cflags)
8736                         ;;
8737                 (*)
8738                         case $cf_add_cflags in
8739                         (-D*)
8740                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8741
8742 CPPFLAGS=`echo "$CPPFLAGS" | \
8743         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8744                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8745
8746                                 ;;
8747                         esac
8748                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8749                         ;;
8750                 esac
8751                 ;;
8752         (*)
8753                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8754                 ;;
8755         esac
8756         ;;
8757 (yes)
8758         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8759
8760         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8761
8762         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8763                 && test -z "${cf_tst_cflags}" \
8764                 && cf_fix_cppflags=no
8765         ;;
8766 esac
8767 done
8768
8769 if test -n "$cf_new_cflags" ; then
8770
8771         CFLAGS="$CFLAGS $cf_new_cflags"
8772 fi
8773
8774 if test -n "$cf_new_cppflags" ; then
8775
8776         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8777 fi
8778
8779 if test -n "$cf_new_extra_cppflags" ; then
8780
8781         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8782 fi
8783
8784 fi
8785
8786         ;;
8787 esac
8788
8789 if test -n "$cf_xopen_source" ; then
8790
8791 cf_fix_cppflags=no
8792 cf_new_cflags=
8793 cf_new_cppflags=
8794 cf_new_extra_cppflags=
8795
8796 for cf_add_cflags in $cf_xopen_source
8797 do
8798 case $cf_fix_cppflags in
8799 (no)
8800         case $cf_add_cflags in
8801         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8802                 case $cf_add_cflags in
8803                 (-D*)
8804                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8805
8806                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8807                                 && test -z "${cf_tst_cflags}" \
8808                                 && cf_fix_cppflags=yes
8809
8810                         if test $cf_fix_cppflags = yes ; then
8811                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8812                                 continue
8813                         elif test "${cf_tst_cflags}" = "\"'" ; then
8814                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8815                                 continue
8816                         fi
8817                         ;;
8818                 esac
8819                 case "$CPPFLAGS" in
8820                 (*$cf_add_cflags)
8821                         ;;
8822                 (*)
8823                         case $cf_add_cflags in
8824                         (-D*)
8825                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8826
8827 CPPFLAGS=`echo "$CPPFLAGS" | \
8828         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8829                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8830
8831                                 ;;
8832                         esac
8833                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8834                         ;;
8835                 esac
8836                 ;;
8837         (*)
8838                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8839                 ;;
8840         esac
8841         ;;
8842 (yes)
8843         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8844
8845         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8846
8847         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8848                 && test -z "${cf_tst_cflags}" \
8849                 && cf_fix_cppflags=no
8850         ;;
8851 esac
8852 done
8853
8854 if test -n "$cf_new_cflags" ; then
8855         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8856
8857 echo "${as_me:-configure}:8857: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8858
8859         CFLAGS="$CFLAGS $cf_new_cflags"
8860 fi
8861
8862 if test -n "$cf_new_cppflags" ; then
8863         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8864
8865 echo "${as_me:-configure}:8865: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8866
8867         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8868 fi
8869
8870 if test -n "$cf_new_extra_cppflags" ; then
8871         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8872
8873 echo "${as_me:-configure}:8873: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8874
8875         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8876 fi
8877
8878 fi
8879
8880 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8881         echo "$as_me:8881: checking if _XOPEN_SOURCE really is set" >&5
8882 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8883         cat >conftest.$ac_ext <<_ACEOF
8884 #line 8884 "configure"
8885 #include "confdefs.h"
8886 #include <stdlib.h>
8887 int
8888 main ()
8889 {
8890
8891 #ifndef _XOPEN_SOURCE
8892 make an error
8893 #endif
8894   ;
8895   return 0;
8896 }
8897 _ACEOF
8898 rm -f conftest.$ac_objext
8899 if { (eval echo "$as_me:8899: \"$ac_compile\"") >&5
8900   (eval $ac_compile) 2>&5
8901   ac_status=$?
8902   echo "$as_me:8902: \$? = $ac_status" >&5
8903   (exit $ac_status); } &&
8904          { ac_try='test -s conftest.$ac_objext'
8905   { (eval echo "$as_me:8905: \"$ac_try\"") >&5
8906   (eval $ac_try) 2>&5
8907   ac_status=$?
8908   echo "$as_me:8908: \$? = $ac_status" >&5
8909   (exit $ac_status); }; }; then
8910   cf_XOPEN_SOURCE_set=yes
8911 else
8912   echo "$as_me: failed program was:" >&5
8913 cat conftest.$ac_ext >&5
8914 cf_XOPEN_SOURCE_set=no
8915 fi
8916 rm -f conftest.$ac_objext conftest.$ac_ext
8917         echo "$as_me:8917: result: $cf_XOPEN_SOURCE_set" >&5
8918 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8919         if test $cf_XOPEN_SOURCE_set = yes
8920         then
8921                 cat >conftest.$ac_ext <<_ACEOF
8922 #line 8922 "configure"
8923 #include "confdefs.h"
8924 #include <stdlib.h>
8925 int
8926 main ()
8927 {
8928
8929 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8930 make an error
8931 #endif
8932   ;
8933   return 0;
8934 }
8935 _ACEOF
8936 rm -f conftest.$ac_objext
8937 if { (eval echo "$as_me:8937: \"$ac_compile\"") >&5
8938   (eval $ac_compile) 2>&5
8939   ac_status=$?
8940   echo "$as_me:8940: \$? = $ac_status" >&5
8941   (exit $ac_status); } &&
8942          { ac_try='test -s conftest.$ac_objext'
8943   { (eval echo "$as_me:8943: \"$ac_try\"") >&5
8944   (eval $ac_try) 2>&5
8945   ac_status=$?
8946   echo "$as_me:8946: \$? = $ac_status" >&5
8947   (exit $ac_status); }; }; then
8948   cf_XOPEN_SOURCE_set_ok=yes
8949 else
8950   echo "$as_me: failed program was:" >&5
8951 cat conftest.$ac_ext >&5
8952 cf_XOPEN_SOURCE_set_ok=no
8953 fi
8954 rm -f conftest.$ac_objext conftest.$ac_ext
8955                 if test $cf_XOPEN_SOURCE_set_ok = no
8956                 then
8957                         { echo "$as_me:8957: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8958 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8959                 fi
8960         else
8961
8962 echo "$as_me:8962: checking if we should define _XOPEN_SOURCE" >&5
8963 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8964 if test "${cf_cv_xopen_source+set}" = set; then
8965   echo $ECHO_N "(cached) $ECHO_C" >&6
8966 else
8967
8968         cat >conftest.$ac_ext <<_ACEOF
8969 #line 8969 "configure"
8970 #include "confdefs.h"
8971
8972 #include <stdlib.h>
8973 #include <string.h>
8974 #include <sys/types.h>
8975
8976 int
8977 main ()
8978 {
8979
8980 #ifndef _XOPEN_SOURCE
8981 make an error
8982 #endif
8983   ;
8984   return 0;
8985 }
8986 _ACEOF
8987 rm -f conftest.$ac_objext
8988 if { (eval echo "$as_me:8988: \"$ac_compile\"") >&5
8989   (eval $ac_compile) 2>&5
8990   ac_status=$?
8991   echo "$as_me:8991: \$? = $ac_status" >&5
8992   (exit $ac_status); } &&
8993          { ac_try='test -s conftest.$ac_objext'
8994   { (eval echo "$as_me:8994: \"$ac_try\"") >&5
8995   (eval $ac_try) 2>&5
8996   ac_status=$?
8997   echo "$as_me:8997: \$? = $ac_status" >&5
8998   (exit $ac_status); }; }; then
8999   cf_cv_xopen_source=no
9000 else
9001   echo "$as_me: failed program was:" >&5
9002 cat conftest.$ac_ext >&5
9003 cf_save="$CPPFLAGS"
9004          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9005          cat >conftest.$ac_ext <<_ACEOF
9006 #line 9006 "configure"
9007 #include "confdefs.h"
9008
9009 #include <stdlib.h>
9010 #include <string.h>
9011 #include <sys/types.h>
9012
9013 int
9014 main ()
9015 {
9016
9017 #ifdef _XOPEN_SOURCE
9018 make an error
9019 #endif
9020   ;
9021   return 0;
9022 }
9023 _ACEOF
9024 rm -f conftest.$ac_objext
9025 if { (eval echo "$as_me:9025: \"$ac_compile\"") >&5
9026   (eval $ac_compile) 2>&5
9027   ac_status=$?
9028   echo "$as_me:9028: \$? = $ac_status" >&5
9029   (exit $ac_status); } &&
9030          { ac_try='test -s conftest.$ac_objext'
9031   { (eval echo "$as_me:9031: \"$ac_try\"") >&5
9032   (eval $ac_try) 2>&5
9033   ac_status=$?
9034   echo "$as_me:9034: \$? = $ac_status" >&5
9035   (exit $ac_status); }; }; then
9036   cf_cv_xopen_source=no
9037 else
9038   echo "$as_me: failed program was:" >&5
9039 cat conftest.$ac_ext >&5
9040 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9041 fi
9042 rm -f conftest.$ac_objext conftest.$ac_ext
9043         CPPFLAGS="$cf_save"
9044
9045 fi
9046 rm -f conftest.$ac_objext conftest.$ac_ext
9047
9048 fi
9049 echo "$as_me:9049: result: $cf_cv_xopen_source" >&5
9050 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9051
9052 if test "$cf_cv_xopen_source" != no ; then
9053
9054 CFLAGS=`echo "$CFLAGS" | \
9055         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9056                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9057
9058 CPPFLAGS=`echo "$CPPFLAGS" | \
9059         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9060                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9061
9062         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9063
9064 cf_fix_cppflags=no
9065 cf_new_cflags=
9066 cf_new_cppflags=
9067 cf_new_extra_cppflags=
9068
9069 for cf_add_cflags in $cf_temp_xopen_source
9070 do
9071 case $cf_fix_cppflags in
9072 (no)
9073         case $cf_add_cflags in
9074         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9075                 case $cf_add_cflags in
9076                 (-D*)
9077                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9078
9079                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9080                                 && test -z "${cf_tst_cflags}" \
9081                                 && cf_fix_cppflags=yes
9082
9083                         if test $cf_fix_cppflags = yes ; then
9084                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9085                                 continue
9086                         elif test "${cf_tst_cflags}" = "\"'" ; then
9087                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9088                                 continue
9089                         fi
9090                         ;;
9091                 esac
9092                 case "$CPPFLAGS" in
9093                 (*$cf_add_cflags)
9094                         ;;
9095                 (*)
9096                         case $cf_add_cflags in
9097                         (-D*)
9098                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9099
9100 CPPFLAGS=`echo "$CPPFLAGS" | \
9101         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9102                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9103
9104                                 ;;
9105                         esac
9106                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9107                         ;;
9108                 esac
9109                 ;;
9110         (*)
9111                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9112                 ;;
9113         esac
9114         ;;
9115 (yes)
9116         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9117
9118         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9119
9120         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9121                 && test -z "${cf_tst_cflags}" \
9122                 && cf_fix_cppflags=no
9123         ;;
9124 esac
9125 done
9126
9127 if test -n "$cf_new_cflags" ; then
9128
9129         CFLAGS="$CFLAGS $cf_new_cflags"
9130 fi
9131
9132 if test -n "$cf_new_cppflags" ; then
9133
9134         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9135 fi
9136
9137 if test -n "$cf_new_extra_cppflags" ; then
9138
9139         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9140 fi
9141
9142 fi
9143
9144         fi
9145 fi
9146
9147 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9148
9149 # Work around breakage on OS X
9150
9151 echo "$as_me:9151: checking if SIGWINCH is defined" >&5
9152 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9153 if test "${cf_cv_define_sigwinch+set}" = set; then
9154   echo $ECHO_N "(cached) $ECHO_C" >&6
9155 else
9156
9157         cat >conftest.$ac_ext <<_ACEOF
9158 #line 9158 "configure"
9159 #include "confdefs.h"
9160
9161 #include <sys/types.h>
9162 #include <sys/signal.h>
9163
9164 int
9165 main ()
9166 {
9167 int x = SIGWINCH
9168   ;
9169   return 0;
9170 }
9171 _ACEOF
9172 rm -f conftest.$ac_objext
9173 if { (eval echo "$as_me:9173: \"$ac_compile\"") >&5
9174   (eval $ac_compile) 2>&5
9175   ac_status=$?
9176   echo "$as_me:9176: \$? = $ac_status" >&5
9177   (exit $ac_status); } &&
9178          { ac_try='test -s conftest.$ac_objext'
9179   { (eval echo "$as_me:9179: \"$ac_try\"") >&5
9180   (eval $ac_try) 2>&5
9181   ac_status=$?
9182   echo "$as_me:9182: \$? = $ac_status" >&5
9183   (exit $ac_status); }; }; then
9184   cf_cv_define_sigwinch=yes
9185 else
9186   echo "$as_me: failed program was:" >&5
9187 cat conftest.$ac_ext >&5
9188 cat >conftest.$ac_ext <<_ACEOF
9189 #line 9189 "configure"
9190 #include "confdefs.h"
9191
9192 #undef _XOPEN_SOURCE
9193 #undef _POSIX_SOURCE
9194 #undef _POSIX_C_SOURCE
9195 #include <sys/types.h>
9196 #include <sys/signal.h>
9197
9198 int
9199 main ()
9200 {
9201 int x = SIGWINCH
9202   ;
9203   return 0;
9204 }
9205 _ACEOF
9206 rm -f conftest.$ac_objext
9207 if { (eval echo "$as_me:9207: \"$ac_compile\"") >&5
9208   (eval $ac_compile) 2>&5
9209   ac_status=$?
9210   echo "$as_me:9210: \$? = $ac_status" >&5
9211   (exit $ac_status); } &&
9212          { ac_try='test -s conftest.$ac_objext'
9213   { (eval echo "$as_me:9213: \"$ac_try\"") >&5
9214   (eval $ac_try) 2>&5
9215   ac_status=$?
9216   echo "$as_me:9216: \$? = $ac_status" >&5
9217   (exit $ac_status); }; }; then
9218   cf_cv_define_sigwinch=maybe
9219 else
9220   echo "$as_me: failed program was:" >&5
9221 cat conftest.$ac_ext >&5
9222 cf_cv_define_sigwinch=no
9223 fi
9224 rm -f conftest.$ac_objext conftest.$ac_ext
9225
9226 fi
9227 rm -f conftest.$ac_objext conftest.$ac_ext
9228
9229 fi
9230 echo "$as_me:9230: result: $cf_cv_define_sigwinch" >&5
9231 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9232
9233 if test "$cf_cv_define_sigwinch" = maybe ; then
9234 echo "$as_me:9234: checking for actual SIGWINCH definition" >&5
9235 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9236 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9237   echo $ECHO_N "(cached) $ECHO_C" >&6
9238 else
9239
9240 cf_cv_fixup_sigwinch=unknown
9241 cf_sigwinch=32
9242 while test $cf_sigwinch != 1
9243 do
9244         cat >conftest.$ac_ext <<_ACEOF
9245 #line 9245 "configure"
9246 #include "confdefs.h"
9247
9248 #undef _XOPEN_SOURCE
9249 #undef _POSIX_SOURCE
9250 #undef _POSIX_C_SOURCE
9251 #include <sys/types.h>
9252 #include <sys/signal.h>
9253
9254 int
9255 main ()
9256 {
9257
9258 #if SIGWINCH != $cf_sigwinch
9259 make an error
9260 #endif
9261 int x = SIGWINCH
9262   ;
9263   return 0;
9264 }
9265 _ACEOF
9266 rm -f conftest.$ac_objext
9267 if { (eval echo "$as_me:9267: \"$ac_compile\"") >&5
9268   (eval $ac_compile) 2>&5
9269   ac_status=$?
9270   echo "$as_me:9270: \$? = $ac_status" >&5
9271   (exit $ac_status); } &&
9272          { ac_try='test -s conftest.$ac_objext'
9273   { (eval echo "$as_me:9273: \"$ac_try\"") >&5
9274   (eval $ac_try) 2>&5
9275   ac_status=$?
9276   echo "$as_me:9276: \$? = $ac_status" >&5
9277   (exit $ac_status); }; }; then
9278   cf_cv_fixup_sigwinch=$cf_sigwinch
9279          break
9280 else
9281   echo "$as_me: failed program was:" >&5
9282 cat conftest.$ac_ext >&5
9283 fi
9284 rm -f conftest.$ac_objext conftest.$ac_ext
9285
9286 cf_sigwinch=`expr $cf_sigwinch - 1`
9287 done
9288
9289 fi
9290 echo "$as_me:9290: result: $cf_cv_fixup_sigwinch" >&5
9291 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9292
9293         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9294                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9295         fi
9296 fi
9297
9298 # Checks for CODESET support.
9299
9300 echo "$as_me:9300: checking for nl_langinfo and CODESET" >&5
9301 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9302 if test "${am_cv_langinfo_codeset+set}" = set; then
9303   echo $ECHO_N "(cached) $ECHO_C" >&6
9304 else
9305   cat >conftest.$ac_ext <<_ACEOF
9306 #line 9306 "configure"
9307 #include "confdefs.h"
9308 #include <langinfo.h>
9309 int
9310 main ()
9311 {
9312 char* cs = nl_langinfo(CODESET);
9313   ;
9314   return 0;
9315 }
9316 _ACEOF
9317 rm -f conftest.$ac_objext conftest$ac_exeext
9318 if { (eval echo "$as_me:9318: \"$ac_link\"") >&5
9319   (eval $ac_link) 2>&5
9320   ac_status=$?
9321   echo "$as_me:9321: \$? = $ac_status" >&5
9322   (exit $ac_status); } &&
9323          { ac_try='test -s conftest$ac_exeext'
9324   { (eval echo "$as_me:9324: \"$ac_try\"") >&5
9325   (eval $ac_try) 2>&5
9326   ac_status=$?
9327   echo "$as_me:9327: \$? = $ac_status" >&5
9328   (exit $ac_status); }; }; then
9329   am_cv_langinfo_codeset=yes
9330 else
9331   echo "$as_me: failed program was:" >&5
9332 cat conftest.$ac_ext >&5
9333 am_cv_langinfo_codeset=no
9334 fi
9335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9336
9337 fi
9338 echo "$as_me:9338: result: $am_cv_langinfo_codeset" >&5
9339 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9340         if test $am_cv_langinfo_codeset = yes; then
9341
9342 cat >>confdefs.h <<\EOF
9343 #define HAVE_LANGINFO_CODESET 1
9344 EOF
9345
9346         fi
9347
9348 # use these variables to work around a defect in gcc's fixincludes.
9349 NCURSES_OK_WCHAR_T=
9350 NCURSES_OK_WINT_T=
9351
9352 echo "$as_me:9352: checking if you want wide-character code" >&5
9353 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9354
9355 # Check whether --enable-widec or --disable-widec was given.
9356 if test "${enable_widec+set}" = set; then
9357   enableval="$enable_widec"
9358   with_widec=$enableval
9359 else
9360   with_widec=no
9361 fi;
9362 echo "$as_me:9362: result: $with_widec" >&5
9363 echo "${ECHO_T}$with_widec" >&6
9364
9365 NCURSES_WCWIDTH_GRAPHICS=1
9366
9367 if test "x$with_widec" = xyes ; then
9368         if test "x$disable_lib_suffixes" = xno ; then
9369                 LIB_SUFFIX="w${LIB_SUFFIX}"
9370         fi
9371
9372 cat >>confdefs.h <<\EOF
9373 #define USE_WIDEC_SUPPORT 1
9374 EOF
9375
9376 cat >>confdefs.h <<\EOF
9377 #define NCURSES_WIDECHAR 1
9378 EOF
9379
9380 echo "$as_me:9380: checking if wchar.h can be used as is" >&5
9381 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9382 if test "${cf_cv_wchar_h_okay+set}" = set; then
9383   echo $ECHO_N "(cached) $ECHO_C" >&6
9384 else
9385
9386 cat >conftest.$ac_ext <<_ACEOF
9387 #line 9387 "configure"
9388 #include "confdefs.h"
9389
9390 #include <stdlib.h>
9391 #include <wchar.h>
9392
9393 int
9394 main ()
9395 {
9396
9397         wint_t foo = 0;
9398         int bar = iswpunct(foo)
9399   ;
9400   return 0;
9401 }
9402 _ACEOF
9403 rm -f conftest.$ac_objext
9404 if { (eval echo "$as_me:9404: \"$ac_compile\"") >&5
9405   (eval $ac_compile) 2>&5
9406   ac_status=$?
9407   echo "$as_me:9407: \$? = $ac_status" >&5
9408   (exit $ac_status); } &&
9409          { ac_try='test -s conftest.$ac_objext'
9410   { (eval echo "$as_me:9410: \"$ac_try\"") >&5
9411   (eval $ac_try) 2>&5
9412   ac_status=$?
9413   echo "$as_me:9413: \$? = $ac_status" >&5
9414   (exit $ac_status); }; }; then
9415   cf_cv_wchar_h_okay=yes
9416 else
9417   echo "$as_me: failed program was:" >&5
9418 cat conftest.$ac_ext >&5
9419 cf_cv_wchar_h_okay=no
9420 fi
9421 rm -f conftest.$ac_objext conftest.$ac_ext
9422 fi
9423 echo "$as_me:9423: result: $cf_cv_wchar_h_okay" >&5
9424 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9425
9426 if test $cf_cv_wchar_h_okay = no
9427 then
9428
9429 echo "$as_me:9429: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9430 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9431 cat >conftest.$ac_ext <<_ACEOF
9432 #line 9432 "configure"
9433 #include "confdefs.h"
9434 #include <sys/types.h>
9435
9436 int
9437 main ()
9438 {
9439
9440 #ifndef _XOPEN_SOURCE_EXTENDED
9441 make an error
9442 #endif
9443   ;
9444   return 0;
9445 }
9446 _ACEOF
9447 rm -f conftest.$ac_objext
9448 if { (eval echo "$as_me:9448: \"$ac_compile\"") >&5
9449   (eval $ac_compile) 2>&5
9450   ac_status=$?
9451   echo "$as_me:9451: \$? = $ac_status" >&5
9452   (exit $ac_status); } &&
9453          { ac_try='test -s conftest.$ac_objext'
9454   { (eval echo "$as_me:9454: \"$ac_try\"") >&5
9455   (eval $ac_try) 2>&5
9456   ac_status=$?
9457   echo "$as_me:9457: \$? = $ac_status" >&5
9458   (exit $ac_status); }; }; then
9459   cf_result=no
9460 else
9461   echo "$as_me: failed program was:" >&5
9462 cat conftest.$ac_ext >&5
9463 cf_result=yes
9464 fi
9465 rm -f conftest.$ac_objext conftest.$ac_ext
9466 echo "$as_me:9466: result: $cf_result" >&5
9467 echo "${ECHO_T}$cf_result" >&6
9468
9469 if test "$cf_result" = yes ; then
9470         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9471 elif test "x" != "x" ; then
9472         echo "$as_me:9472: checking checking for compatible value versus " >&5
9473 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9474         cat >conftest.$ac_ext <<_ACEOF
9475 #line 9475 "configure"
9476 #include "confdefs.h"
9477 #include <sys/types.h>
9478
9479 int
9480 main ()
9481 {
9482
9483 #if _XOPEN_SOURCE_EXTENDED- < 0
9484 make an error
9485 #endif
9486   ;
9487   return 0;
9488 }
9489 _ACEOF
9490 rm -f conftest.$ac_objext
9491 if { (eval echo "$as_me:9491: \"$ac_compile\"") >&5
9492   (eval $ac_compile) 2>&5
9493   ac_status=$?
9494   echo "$as_me:9494: \$? = $ac_status" >&5
9495   (exit $ac_status); } &&
9496          { ac_try='test -s conftest.$ac_objext'
9497   { (eval echo "$as_me:9497: \"$ac_try\"") >&5
9498   (eval $ac_try) 2>&5
9499   ac_status=$?
9500   echo "$as_me:9500: \$? = $ac_status" >&5
9501   (exit $ac_status); }; }; then
9502   cf_result=yes
9503 else
9504   echo "$as_me: failed program was:" >&5
9505 cat conftest.$ac_ext >&5
9506 cf_result=no
9507 fi
9508 rm -f conftest.$ac_objext conftest.$ac_ext
9509         echo "$as_me:9509: result: $cf_result" >&5
9510 echo "${ECHO_T}$cf_result" >&6
9511         if test "$cf_result" = no ; then
9512                 # perhaps we can override it - try...
9513                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9514         fi
9515 fi
9516
9517 fi
9518
9519 echo "$as_me:9519: checking if wcwidth agrees graphics are single-width" >&5
9520 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9521 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9522   echo $ECHO_N "(cached) $ECHO_C" >&6
9523 else
9524
9525 cat >conftest.in <<CF_EOF
9526 -       VT100 symbols
9527 0x250c  upper left corner
9528 0x2514  lower left corner
9529 0x2510  upper right corner
9530 0x2518  lower right corner
9531 0x251c  tee pointing left
9532 0x2524  tee pointing right
9533 0x2534  tee pointing up
9534 0x252c  tee pointing down
9535 0x2500  horizontal line
9536 0x2502  vertical line
9537 0x253c  large plus or crossover
9538 0x23ba  scan line 1
9539 0x23bd  scan line 9
9540 0x25c6  diamond
9541 0x2592  checker board (stipple)
9542 0x00b0  degree symbol
9543 0x00b1  plus/minus
9544 0x00b7  bullet
9545 -       Teletype 5410v1 symbols
9546 0x2190  arrow pointing left
9547 0x2192  arrow pointing right
9548 0x2193  arrow pointing down
9549 0x2191  arrow pointing up
9550 0x2592  board of squares
9551 0x2603  lantern symbol
9552 0x25ae  solid square block
9553 -       these defaults were invented for ncurses
9554 0x23bb  scan line 3
9555 0x23bc  scan line 7
9556 0x2264  less-than-or-equal-to
9557 0x2265  greater-than-or-equal-to
9558 0x03c0  greek pi
9559 0x2260  not-equal
9560 0x00a3  pound-sterling symbol
9561 -       thick-line-drawing
9562 0x250f  upper left corner
9563 0x2517  lower left corner
9564 0x2513  upper right corner
9565 0x251b  lower right corner
9566 0x2523  tee pointing left
9567 0x252b  tee pointing right
9568 0x253b  tee pointing up
9569 0x2533  tee pointing down
9570 0x2501  horizontal line
9571 0x2503  vertical line
9572 0x254b  large plus or crossover
9573 -       double-line-drawing
9574 0x2554  upper left corner
9575 0x255a  lower left corner
9576 0x2557  upper right corner
9577 0x255d  lower right corner
9578 0x2563  tee pointing left
9579 0x2560  tee pointing right
9580 0x2569  tee pointing up
9581 0x2566  tee pointing down
9582 0x2550  horizontal line
9583 0x2551  vertical line
9584 0x256c  large plus or crossover
9585 CF_EOF
9586 if test "$cross_compiling" = yes; then
9587   cf_cv_wcwidth_graphics=unknown
9588 else
9589   cat >conftest.$ac_ext <<_ACEOF
9590 #line 9590 "configure"
9591 #include "confdefs.h"
9592
9593 #include <locale.h>
9594 #include <stdio.h>
9595 #include <wchar.h>
9596
9597 #define MY_LEN 80
9598
9599 int
9600 main(void)
9601 {
9602         FILE *fp;
9603         int value;
9604         char buffer[MY_LEN + 1];
9605         char notes[MY_LEN + 1];
9606         int totals = 0;
9607         int passed = 0;
9608
9609         if (setlocale(LC_ALL, "en_US.UTF8") ||
9610                 setlocale(LC_ALL, "en_US.UTF-8") ||
9611                 setlocale(LC_ALL, "en_US.utf8") ||
9612                 setlocale(LC_ALL, "en_US.utf-8")) {
9613                 if ((fp = fopen("conftest.in", "r")) != 0) {
9614                         while (fgets(buffer, MY_LEN, fp) != 0) {
9615                                 if (*buffer == '-') {
9616                                         fprintf(stderr, "\t%s", buffer);
9617                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9618                                         ++totals;
9619                                         if (wcwidth(value) == 1)
9620                                                 ++passed;
9621                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9622                                 } else {
9623                                         fprintf(stderr, "?\t%s", buffer);
9624                                 }
9625                         }
9626                 }
9627         }
9628         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9629         return (totals == passed) ? 0 : 1;
9630 }
9631
9632 _ACEOF
9633 rm -f conftest$ac_exeext
9634 if { (eval echo "$as_me:9634: \"$ac_link\"") >&5
9635   (eval $ac_link) 2>&5
9636   ac_status=$?
9637   echo "$as_me:9637: \$? = $ac_status" >&5
9638   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9639   { (eval echo "$as_me:9639: \"$ac_try\"") >&5
9640   (eval $ac_try) 2>&5
9641   ac_status=$?
9642   echo "$as_me:9642: \$? = $ac_status" >&5
9643   (exit $ac_status); }; }; then
9644   cf_cv_wcwidth_graphics=yes
9645 else
9646   echo "$as_me: program exited with status $ac_status" >&5
9647 echo "$as_me: failed program was:" >&5
9648 cat conftest.$ac_ext >&5
9649 cf_cv_wcwidth_graphics=no
9650 fi
9651 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9652 fi
9653
9654 fi
9655 echo "$as_me:9655: result: $cf_cv_wcwidth_graphics" >&5
9656 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9657
9658         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9659
9660         # with_overwrite=no
9661         NCURSES_CH_T=cchar_t
9662
9663 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9664 do
9665 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9666 echo "$as_me:9666: checking for $ac_func" >&5
9667 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9668 if eval "test \"\${$as_ac_var+set}\" = set"; then
9669   echo $ECHO_N "(cached) $ECHO_C" >&6
9670 else
9671   cat >conftest.$ac_ext <<_ACEOF
9672 #line 9672 "configure"
9673 #include "confdefs.h"
9674 /* System header to define __stub macros and hopefully few prototypes,
9675     which can conflict with char $ac_func (); below.  */
9676 #include <assert.h>
9677 /* Override any gcc2 internal prototype to avoid an error.  */
9678 #ifdef __cplusplus
9679 extern "C"
9680 #endif
9681 /* We use char because int might match the return type of a gcc2
9682    builtin and then its argument prototype would still apply.  */
9683 char $ac_func ();
9684 char (*f) ();
9685
9686 int
9687 main ()
9688 {
9689 /* The GNU C library defines this for functions which it implements
9690     to always fail with ENOSYS.  Some functions are actually named
9691     something starting with __ and the normal name is an alias.  */
9692 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9693 choke me
9694 #else
9695 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9696 #endif
9697
9698   ;
9699   return 0;
9700 }
9701 _ACEOF
9702 rm -f conftest.$ac_objext conftest$ac_exeext
9703 if { (eval echo "$as_me:9703: \"$ac_link\"") >&5
9704   (eval $ac_link) 2>&5
9705   ac_status=$?
9706   echo "$as_me:9706: \$? = $ac_status" >&5
9707   (exit $ac_status); } &&
9708          { ac_try='test -s conftest$ac_exeext'
9709   { (eval echo "$as_me:9709: \"$ac_try\"") >&5
9710   (eval $ac_try) 2>&5
9711   ac_status=$?
9712   echo "$as_me:9712: \$? = $ac_status" >&5
9713   (exit $ac_status); }; }; then
9714   eval "$as_ac_var=yes"
9715 else
9716   echo "$as_me: failed program was:" >&5
9717 cat conftest.$ac_ext >&5
9718 eval "$as_ac_var=no"
9719 fi
9720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9721 fi
9722 echo "$as_me:9722: result: `eval echo '${'$as_ac_var'}'`" >&5
9723 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9724 if test `eval echo '${'$as_ac_var'}'` = yes; then
9725   cat >>confdefs.h <<EOF
9726 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9727 EOF
9728
9729 fi
9730 done
9731
9732         if test "x$ac_cv_func_putwc" != xyes ; then
9733
9734 echo "$as_me:9734: checking for multibyte character support" >&5
9735 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9736 if test "${cf_cv_utf8_lib+set}" = set; then
9737   echo $ECHO_N "(cached) $ECHO_C" >&6
9738 else
9739
9740         cf_save_LIBS="$LIBS"
9741         cat >conftest.$ac_ext <<_ACEOF
9742 #line 9742 "configure"
9743 #include "confdefs.h"
9744
9745 #include <stdlib.h>
9746 int
9747 main ()
9748 {
9749 putwc(0,0);
9750   ;
9751   return 0;
9752 }
9753 _ACEOF
9754 rm -f conftest.$ac_objext conftest$ac_exeext
9755 if { (eval echo "$as_me:9755: \"$ac_link\"") >&5
9756   (eval $ac_link) 2>&5
9757   ac_status=$?
9758   echo "$as_me:9758: \$? = $ac_status" >&5
9759   (exit $ac_status); } &&
9760          { ac_try='test -s conftest$ac_exeext'
9761   { (eval echo "$as_me:9761: \"$ac_try\"") >&5
9762   (eval $ac_try) 2>&5
9763   ac_status=$?
9764   echo "$as_me:9764: \$? = $ac_status" >&5
9765   (exit $ac_status); }; }; then
9766   cf_cv_utf8_lib=yes
9767 else
9768   echo "$as_me: failed program was:" >&5
9769 cat conftest.$ac_ext >&5
9770
9771 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9772 # will be set on completion of the AC_TRY_LINK below.
9773 cf_cv_header_path_utf8=
9774 cf_cv_library_path_utf8=
9775
9776 echo "${as_me:-configure}:9776: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9777
9778 cf_save_LIBS="$LIBS"
9779
9780 cat >conftest.$ac_ext <<_ACEOF
9781 #line 9781 "configure"
9782 #include "confdefs.h"
9783
9784 #include <libutf8.h>
9785 int
9786 main ()
9787 {
9788 putwc(0,0);
9789   ;
9790   return 0;
9791 }
9792 _ACEOF
9793 rm -f conftest.$ac_objext conftest$ac_exeext
9794 if { (eval echo "$as_me:9794: \"$ac_link\"") >&5
9795   (eval $ac_link) 2>&5
9796   ac_status=$?
9797   echo "$as_me:9797: \$? = $ac_status" >&5
9798   (exit $ac_status); } &&
9799          { ac_try='test -s conftest$ac_exeext'
9800   { (eval echo "$as_me:9800: \"$ac_try\"") >&5
9801   (eval $ac_try) 2>&5
9802   ac_status=$?
9803   echo "$as_me:9803: \$? = $ac_status" >&5
9804   (exit $ac_status); }; }; then
9805
9806         cf_cv_find_linkage_utf8=yes
9807         cf_cv_header_path_utf8=/usr/include
9808         cf_cv_library_path_utf8=/usr/lib
9809
9810 else
9811   echo "$as_me: failed program was:" >&5
9812 cat conftest.$ac_ext >&5
9813
9814 LIBS="-lutf8  $cf_save_LIBS"
9815
9816 cat >conftest.$ac_ext <<_ACEOF
9817 #line 9817 "configure"
9818 #include "confdefs.h"
9819
9820 #include <libutf8.h>
9821 int
9822 main ()
9823 {
9824 putwc(0,0);
9825   ;
9826   return 0;
9827 }
9828 _ACEOF
9829 rm -f conftest.$ac_objext conftest$ac_exeext
9830 if { (eval echo "$as_me:9830: \"$ac_link\"") >&5
9831   (eval $ac_link) 2>&5
9832   ac_status=$?
9833   echo "$as_me:9833: \$? = $ac_status" >&5
9834   (exit $ac_status); } &&
9835          { ac_try='test -s conftest$ac_exeext'
9836   { (eval echo "$as_me:9836: \"$ac_try\"") >&5
9837   (eval $ac_try) 2>&5
9838   ac_status=$?
9839   echo "$as_me:9839: \$? = $ac_status" >&5
9840   (exit $ac_status); }; }; then
9841
9842         cf_cv_find_linkage_utf8=yes
9843         cf_cv_header_path_utf8=/usr/include
9844         cf_cv_library_path_utf8=/usr/lib
9845         cf_cv_library_file_utf8="-lutf8"
9846
9847 else
9848   echo "$as_me: failed program was:" >&5
9849 cat conftest.$ac_ext >&5
9850
9851         cf_cv_find_linkage_utf8=no
9852         LIBS="$cf_save_LIBS"
9853
9854         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9855
9856 echo "${as_me:-configure}:9856: testing find linkage for utf8 library ..." 1>&5
9857
9858 echo "${as_me:-configure}:9858: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9859
9860         cf_save_CPPFLAGS="$CPPFLAGS"
9861         cf_test_CPPFLAGS="$CPPFLAGS"
9862
9863 cf_search=
9864
9865 # collect the current set of include-directories from compiler flags
9866 cf_header_path_list=""
9867 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9868         for cf_header_path in $CPPFLAGS $CFLAGS
9869         do
9870                 case $cf_header_path in
9871                 (-I*)
9872                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9873
9874 test "x$cf_header_path" != "xNONE" && \
9875 test -d "$cf_header_path" && \
9876  {
9877         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9878         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9879         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9880         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9881         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9882         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9883 }
9884
9885                         cf_header_path_list="$cf_header_path_list $cf_search"
9886                         ;;
9887                 esac
9888         done
9889 fi
9890
9891 # add the variations for the package we are looking for
9892
9893 cf_search=
9894
9895 test "x$prefix" != "xNONE" && \
9896 test -d "$prefix" && \
9897  {
9898         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9899         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9900         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9901         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9902         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9903         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9904 }
9905
9906 for cf_subdir_prefix in \
9907         /usr \
9908         /usr/local \
9909         /usr/pkg \
9910         /opt \
9911         /opt/local \
9912         $HOME
9913 do
9914
9915 test "x$cf_subdir_prefix" != "x$prefix" && \
9916 test -d "$cf_subdir_prefix" && \
9917 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9918         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9919         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9920         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9921         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9922         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9923         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9924 }
9925
9926 done
9927
9928 test "$includedir" != NONE && \
9929 test "$includedir" != "/usr/include" && \
9930 test -d "$includedir" && {
9931         test -d $includedir &&    cf_search="$cf_search $includedir"
9932         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9933 }
9934
9935 test "$oldincludedir" != NONE && \
9936 test "$oldincludedir" != "/usr/include" && \
9937 test -d "$oldincludedir" && {
9938         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9939         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9940 }
9941
9942 cf_search="$cf_search $cf_header_path_list"
9943
9944         for cf_cv_header_path_utf8 in $cf_search
9945         do
9946                 if test -d $cf_cv_header_path_utf8 ; then
9947                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9948
9949 echo "${as_me:-configure}:9949: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9950
9951                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9952                         cat >conftest.$ac_ext <<_ACEOF
9953 #line 9953 "configure"
9954 #include "confdefs.h"
9955
9956 #include <libutf8.h>
9957 int
9958 main ()
9959 {
9960 putwc(0,0);
9961   ;
9962   return 0;
9963 }
9964 _ACEOF
9965 rm -f conftest.$ac_objext
9966 if { (eval echo "$as_me:9966: \"$ac_compile\"") >&5
9967   (eval $ac_compile) 2>&5
9968   ac_status=$?
9969   echo "$as_me:9969: \$? = $ac_status" >&5
9970   (exit $ac_status); } &&
9971          { ac_try='test -s conftest.$ac_objext'
9972   { (eval echo "$as_me:9972: \"$ac_try\"") >&5
9973   (eval $ac_try) 2>&5
9974   ac_status=$?
9975   echo "$as_me:9975: \$? = $ac_status" >&5
9976   (exit $ac_status); }; }; then
9977
9978                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9979
9980 echo "${as_me:-configure}:9980: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9981
9982                                 cf_cv_find_linkage_utf8=maybe
9983                                 cf_test_CPPFLAGS="$CPPFLAGS"
9984                                 break
9985 else
9986   echo "$as_me: failed program was:" >&5
9987 cat conftest.$ac_ext >&5
9988
9989                                 CPPFLAGS="$cf_save_CPPFLAGS"
9990
9991 fi
9992 rm -f conftest.$ac_objext conftest.$ac_ext
9993                 fi
9994         done
9995
9996         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9997
9998 echo "${as_me:-configure}:9998: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9999
10000                 cf_save_LIBS="$LIBS"
10001                 cf_save_LDFLAGS="$LDFLAGS"
10002
10003                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10004
10005 cf_search=
10006 cf_library_path_list=""
10007 if test -n "${LDFLAGS}${LIBS}" ; then
10008         for cf_library_path in $LDFLAGS $LIBS
10009         do
10010                 case $cf_library_path in
10011                 (-L*)
10012                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10013
10014 test "x$cf_library_path" != "xNONE" && \
10015 test -d "$cf_library_path" && \
10016  {
10017         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10018         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10019         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10020         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10021         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10022         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10023 }
10024
10025                         cf_library_path_list="$cf_library_path_list $cf_search"
10026                         ;;
10027                 esac
10028         done
10029 fi
10030
10031 cf_search=
10032
10033 test "x$prefix" != "xNONE" && \
10034 test -d "$prefix" && \
10035  {
10036         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10037         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10038         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10039         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10040         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10041         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10042 }
10043
10044 for cf_subdir_prefix in \
10045         /usr \
10046         /usr/local \
10047         /usr/pkg \
10048         /opt \
10049         /opt/local \
10050         $HOME
10051 do
10052
10053 test "x$cf_subdir_prefix" != "x$prefix" && \
10054 test -d "$cf_subdir_prefix" && \
10055 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10056         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10057         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10058         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10059         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10060         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10061         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10062 }
10063
10064 done
10065
10066 cf_search="$cf_library_path_list $cf_search"
10067
10068                         for cf_cv_library_path_utf8 in $cf_search
10069                         do
10070                                 if test -d $cf_cv_library_path_utf8 ; then
10071                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10072
10073 echo "${as_me:-configure}:10073: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10074
10075                                         CPPFLAGS="$cf_test_CPPFLAGS"
10076                                         LIBS="-lutf8  $cf_save_LIBS"
10077                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10078                                         cat >conftest.$ac_ext <<_ACEOF
10079 #line 10079 "configure"
10080 #include "confdefs.h"
10081
10082 #include <libutf8.h>
10083 int
10084 main ()
10085 {
10086 putwc(0,0);
10087   ;
10088   return 0;
10089 }
10090 _ACEOF
10091 rm -f conftest.$ac_objext conftest$ac_exeext
10092 if { (eval echo "$as_me:10092: \"$ac_link\"") >&5
10093   (eval $ac_link) 2>&5
10094   ac_status=$?
10095   echo "$as_me:10095: \$? = $ac_status" >&5
10096   (exit $ac_status); } &&
10097          { ac_try='test -s conftest$ac_exeext'
10098   { (eval echo "$as_me:10098: \"$ac_try\"") >&5
10099   (eval $ac_try) 2>&5
10100   ac_status=$?
10101   echo "$as_me:10101: \$? = $ac_status" >&5
10102   (exit $ac_status); }; }; then
10103
10104                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10105
10106 echo "${as_me:-configure}:10106: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10107
10108                                         cf_cv_find_linkage_utf8=yes
10109                                         cf_cv_library_file_utf8="-lutf8"
10110                                         break
10111 else
10112   echo "$as_me: failed program was:" >&5
10113 cat conftest.$ac_ext >&5
10114
10115                                         CPPFLAGS="$cf_save_CPPFLAGS"
10116                                         LIBS="$cf_save_LIBS"
10117                                         LDFLAGS="$cf_save_LDFLAGS"
10118
10119 fi
10120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10121                                 fi
10122                         done
10123                         CPPFLAGS="$cf_save_CPPFLAGS"
10124                         LDFLAGS="$cf_save_LDFLAGS"
10125                 fi
10126
10127         else
10128                 cf_cv_find_linkage_utf8=no
10129         fi
10130
10131 fi
10132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10133
10134 fi
10135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10136
10137 LIBS="$cf_save_LIBS"
10138
10139 if test "$cf_cv_find_linkage_utf8" = yes ; then
10140 cf_cv_utf8_lib=add-on
10141 else
10142 cf_cv_utf8_lib=no
10143 fi
10144
10145 fi
10146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10147 fi
10148 echo "$as_me:10148: result: $cf_cv_utf8_lib" >&5
10149 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10150
10151 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10152 # ncurses/ncursesw:
10153 if test "$cf_cv_utf8_lib" = "add-on" ; then
10154
10155 cat >>confdefs.h <<\EOF
10156 #define HAVE_LIBUTF8_H 1
10157 EOF
10158
10159 if test -n "$cf_cv_header_path_utf8" ; then
10160   for cf_add_incdir in $cf_cv_header_path_utf8
10161   do
10162         while test $cf_add_incdir != /usr/include
10163         do
10164           if test -d $cf_add_incdir
10165           then
10166                 cf_have_incdir=no
10167                 if test -n "$CFLAGS$CPPFLAGS" ; then
10168                   # a loop is needed to ensure we can add subdirs of existing dirs
10169                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10170                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10171                           cf_have_incdir=yes; break
10172                         fi
10173                   done
10174                 fi
10175
10176                 if test "$cf_have_incdir" = no ; then
10177                   if test "$cf_add_incdir" = /usr/local/include ; then
10178                         if test "$GCC" = yes
10179                         then
10180                           cf_save_CPPFLAGS=$CPPFLAGS
10181                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10182                           cat >conftest.$ac_ext <<_ACEOF
10183 #line 10183 "configure"
10184 #include "confdefs.h"
10185 #include <stdio.h>
10186 int
10187 main ()
10188 {
10189 printf("Hello")
10190   ;
10191   return 0;
10192 }
10193 _ACEOF
10194 rm -f conftest.$ac_objext
10195 if { (eval echo "$as_me:10195: \"$ac_compile\"") >&5
10196   (eval $ac_compile) 2>&5
10197   ac_status=$?
10198   echo "$as_me:10198: \$? = $ac_status" >&5
10199   (exit $ac_status); } &&
10200          { ac_try='test -s conftest.$ac_objext'
10201   { (eval echo "$as_me:10201: \"$ac_try\"") >&5
10202   (eval $ac_try) 2>&5
10203   ac_status=$?
10204   echo "$as_me:10204: \$? = $ac_status" >&5
10205   (exit $ac_status); }; }; then
10206   :
10207 else
10208   echo "$as_me: failed program was:" >&5
10209 cat conftest.$ac_ext >&5
10210 cf_have_incdir=yes
10211 fi
10212 rm -f conftest.$ac_objext conftest.$ac_ext
10213                           CPPFLAGS=$cf_save_CPPFLAGS
10214                         fi
10215                   fi
10216                 fi
10217
10218                 if test "$cf_have_incdir" = no ; then
10219                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10220
10221 echo "${as_me:-configure}:10221: testing adding $cf_add_incdir to include-path ..." 1>&5
10222
10223                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10224
10225                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10226                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10227                   cf_add_incdir="$cf_top_incdir"
10228                 else
10229                   break
10230                 fi
10231           else
10232                 break
10233           fi
10234         done
10235   done
10236 fi
10237
10238 if test -n "$cf_cv_library_path_utf8" ; then
10239         for cf_add_libdir in $cf_cv_library_path_utf8
10240         do
10241                 if test $cf_add_libdir = /usr/lib ; then
10242                         :
10243                 elif test -d $cf_add_libdir
10244                 then
10245                         cf_have_libdir=no
10246                         if test -n "$LDFLAGS$LIBS" ; then
10247                                 # a loop is needed to ensure we can add subdirs of existing dirs
10248                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10249                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10250                                                 cf_have_libdir=yes; break
10251                                         fi
10252                                 done
10253                         fi
10254                         if test "$cf_have_libdir" = no ; then
10255                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10256
10257 echo "${as_me:-configure}:10257: testing adding $cf_add_libdir to library-path ..." 1>&5
10258
10259                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10260                         fi
10261                 fi
10262         done
10263 fi
10264
10265 cf_add_libs="$cf_cv_library_file_utf8"
10266 # Filter out duplicates - this happens with badly-designed ".pc" files...
10267 for cf_add_1lib in $LIBS
10268 do
10269         for cf_add_2lib in $cf_add_libs
10270         do
10271                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10272                 then
10273                         cf_add_1lib=
10274                         break
10275                 fi
10276         done
10277         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10278 done
10279 LIBS="$cf_add_libs"
10280
10281 fi
10282
10283                 if test "$cf_cv_utf8_lib" != no ; then
10284                         NCURSES_LIBUTF8=1
10285                 fi
10286         fi
10287
10288 # This is needed on Tru64 5.0 to declare mbstate_t
10289 echo "$as_me:10289: checking if we must include wchar.h to declare mbstate_t" >&5
10290 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10291 if test "${cf_cv_mbstate_t+set}" = set; then
10292   echo $ECHO_N "(cached) $ECHO_C" >&6
10293 else
10294
10295 cat >conftest.$ac_ext <<_ACEOF
10296 #line 10296 "configure"
10297 #include "confdefs.h"
10298
10299 #include <stdlib.h>
10300 #include <stdarg.h>
10301 #include <stdio.h>
10302 #ifdef HAVE_LIBUTF8_H
10303 #include <libutf8.h>
10304 #endif
10305 int
10306 main ()
10307 {
10308 mbstate_t state
10309   ;
10310   return 0;
10311 }
10312 _ACEOF
10313 rm -f conftest.$ac_objext
10314 if { (eval echo "$as_me:10314: \"$ac_compile\"") >&5
10315   (eval $ac_compile) 2>&5
10316   ac_status=$?
10317   echo "$as_me:10317: \$? = $ac_status" >&5
10318   (exit $ac_status); } &&
10319          { ac_try='test -s conftest.$ac_objext'
10320   { (eval echo "$as_me:10320: \"$ac_try\"") >&5
10321   (eval $ac_try) 2>&5
10322   ac_status=$?
10323   echo "$as_me:10323: \$? = $ac_status" >&5
10324   (exit $ac_status); }; }; then
10325   cf_cv_mbstate_t=no
10326 else
10327   echo "$as_me: failed program was:" >&5
10328 cat conftest.$ac_ext >&5
10329 cat >conftest.$ac_ext <<_ACEOF
10330 #line 10330 "configure"
10331 #include "confdefs.h"
10332
10333 #include <stdlib.h>
10334 #include <stdarg.h>
10335 #include <stdio.h>
10336 #include <wchar.h>
10337 #ifdef HAVE_LIBUTF8_H
10338 #include <libutf8.h>
10339 #endif
10340 int
10341 main ()
10342 {
10343 mbstate_t value
10344   ;
10345   return 0;
10346 }
10347 _ACEOF
10348 rm -f conftest.$ac_objext
10349 if { (eval echo "$as_me:10349: \"$ac_compile\"") >&5
10350   (eval $ac_compile) 2>&5
10351   ac_status=$?
10352   echo "$as_me:10352: \$? = $ac_status" >&5
10353   (exit $ac_status); } &&
10354          { ac_try='test -s conftest.$ac_objext'
10355   { (eval echo "$as_me:10355: \"$ac_try\"") >&5
10356   (eval $ac_try) 2>&5
10357   ac_status=$?
10358   echo "$as_me:10358: \$? = $ac_status" >&5
10359   (exit $ac_status); }; }; then
10360   cf_cv_mbstate_t=yes
10361 else
10362   echo "$as_me: failed program was:" >&5
10363 cat conftest.$ac_ext >&5
10364 cf_cv_mbstate_t=unknown
10365 fi
10366 rm -f conftest.$ac_objext conftest.$ac_ext
10367 fi
10368 rm -f conftest.$ac_objext conftest.$ac_ext
10369 fi
10370 echo "$as_me:10370: result: $cf_cv_mbstate_t" >&5
10371 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10372
10373 if test "$cf_cv_mbstate_t" = yes ; then
10374
10375 cat >>confdefs.h <<\EOF
10376 #define NEED_WCHAR_H 1
10377 EOF
10378
10379         NEED_WCHAR_H=1
10380 fi
10381
10382 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10383 if test "$cf_cv_mbstate_t" = unknown ; then
10384         NCURSES_MBSTATE_T=1
10385 fi
10386
10387 # This is needed on Tru64 5.0 to declare wchar_t
10388 echo "$as_me:10388: checking if we must include wchar.h to declare wchar_t" >&5
10389 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10390 if test "${cf_cv_wchar_t+set}" = set; then
10391   echo $ECHO_N "(cached) $ECHO_C" >&6
10392 else
10393
10394 cat >conftest.$ac_ext <<_ACEOF
10395 #line 10395 "configure"
10396 #include "confdefs.h"
10397
10398 #include <stdlib.h>
10399 #include <stdarg.h>
10400 #include <stdio.h>
10401 #ifdef HAVE_LIBUTF8_H
10402 #include <libutf8.h>
10403 #endif
10404 int
10405 main ()
10406 {
10407 wchar_t state
10408   ;
10409   return 0;
10410 }
10411 _ACEOF
10412 rm -f conftest.$ac_objext
10413 if { (eval echo "$as_me:10413: \"$ac_compile\"") >&5
10414   (eval $ac_compile) 2>&5
10415   ac_status=$?
10416   echo "$as_me:10416: \$? = $ac_status" >&5
10417   (exit $ac_status); } &&
10418          { ac_try='test -s conftest.$ac_objext'
10419   { (eval echo "$as_me:10419: \"$ac_try\"") >&5
10420   (eval $ac_try) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit $ac_status); }; }; then
10424   cf_cv_wchar_t=no
10425 else
10426   echo "$as_me: failed program was:" >&5
10427 cat conftest.$ac_ext >&5
10428 cat >conftest.$ac_ext <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431
10432 #include <stdlib.h>
10433 #include <stdarg.h>
10434 #include <stdio.h>
10435 #include <wchar.h>
10436 #ifdef HAVE_LIBUTF8_H
10437 #include <libutf8.h>
10438 #endif
10439 int
10440 main ()
10441 {
10442 wchar_t value
10443   ;
10444   return 0;
10445 }
10446 _ACEOF
10447 rm -f conftest.$ac_objext
10448 if { (eval echo "$as_me:10448: \"$ac_compile\"") >&5
10449   (eval $ac_compile) 2>&5
10450   ac_status=$?
10451   echo "$as_me:10451: \$? = $ac_status" >&5
10452   (exit $ac_status); } &&
10453          { ac_try='test -s conftest.$ac_objext'
10454   { (eval echo "$as_me:10454: \"$ac_try\"") >&5
10455   (eval $ac_try) 2>&5
10456   ac_status=$?
10457   echo "$as_me:10457: \$? = $ac_status" >&5
10458   (exit $ac_status); }; }; then
10459   cf_cv_wchar_t=yes
10460 else
10461   echo "$as_me: failed program was:" >&5
10462 cat conftest.$ac_ext >&5
10463 cf_cv_wchar_t=unknown
10464 fi
10465 rm -f conftest.$ac_objext conftest.$ac_ext
10466 fi
10467 rm -f conftest.$ac_objext conftest.$ac_ext
10468 fi
10469 echo "$as_me:10469: result: $cf_cv_wchar_t" >&5
10470 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10471
10472 if test "$cf_cv_wchar_t" = yes ; then
10473
10474 cat >>confdefs.h <<\EOF
10475 #define NEED_WCHAR_H 1
10476 EOF
10477
10478         NEED_WCHAR_H=1
10479 fi
10480
10481 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10482 if test "$cf_cv_wchar_t" = unknown ; then
10483         NCURSES_WCHAR_T=1
10484 fi
10485
10486 # if we find wchar_t in either place, use substitution to provide a fallback.
10487 if test "$cf_cv_wchar_t" != unknown ; then
10488         NCURSES_OK_WCHAR_T=1
10489 fi
10490
10491 # This is needed on Tru64 5.0 to declare wint_t
10492 echo "$as_me:10492: checking if we must include wchar.h to declare wint_t" >&5
10493 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10494 if test "${cf_cv_wint_t+set}" = set; then
10495   echo $ECHO_N "(cached) $ECHO_C" >&6
10496 else
10497
10498 cat >conftest.$ac_ext <<_ACEOF
10499 #line 10499 "configure"
10500 #include "confdefs.h"
10501
10502 #include <stdlib.h>
10503 #include <stdarg.h>
10504 #include <stdio.h>
10505 #ifdef HAVE_LIBUTF8_H
10506 #include <libutf8.h>
10507 #endif
10508 int
10509 main ()
10510 {
10511 wint_t state
10512   ;
10513   return 0;
10514 }
10515 _ACEOF
10516 rm -f conftest.$ac_objext
10517 if { (eval echo "$as_me:10517: \"$ac_compile\"") >&5
10518   (eval $ac_compile) 2>&5
10519   ac_status=$?
10520   echo "$as_me:10520: \$? = $ac_status" >&5
10521   (exit $ac_status); } &&
10522          { ac_try='test -s conftest.$ac_objext'
10523   { (eval echo "$as_me:10523: \"$ac_try\"") >&5
10524   (eval $ac_try) 2>&5
10525   ac_status=$?
10526   echo "$as_me:10526: \$? = $ac_status" >&5
10527   (exit $ac_status); }; }; then
10528   cf_cv_wint_t=no
10529 else
10530   echo "$as_me: failed program was:" >&5
10531 cat conftest.$ac_ext >&5
10532 cat >conftest.$ac_ext <<_ACEOF
10533 #line 10533 "configure"
10534 #include "confdefs.h"
10535
10536 #include <stdlib.h>
10537 #include <stdarg.h>
10538 #include <stdio.h>
10539 #include <wchar.h>
10540 #ifdef HAVE_LIBUTF8_H
10541 #include <libutf8.h>
10542 #endif
10543 int
10544 main ()
10545 {
10546 wint_t value
10547   ;
10548   return 0;
10549 }
10550 _ACEOF
10551 rm -f conftest.$ac_objext
10552 if { (eval echo "$as_me:10552: \"$ac_compile\"") >&5
10553   (eval $ac_compile) 2>&5
10554   ac_status=$?
10555   echo "$as_me:10555: \$? = $ac_status" >&5
10556   (exit $ac_status); } &&
10557          { ac_try='test -s conftest.$ac_objext'
10558   { (eval echo "$as_me:10558: \"$ac_try\"") >&5
10559   (eval $ac_try) 2>&5
10560   ac_status=$?
10561   echo "$as_me:10561: \$? = $ac_status" >&5
10562   (exit $ac_status); }; }; then
10563   cf_cv_wint_t=yes
10564 else
10565   echo "$as_me: failed program was:" >&5
10566 cat conftest.$ac_ext >&5
10567 cf_cv_wint_t=unknown
10568 fi
10569 rm -f conftest.$ac_objext conftest.$ac_ext
10570 fi
10571 rm -f conftest.$ac_objext conftest.$ac_ext
10572 fi
10573 echo "$as_me:10573: result: $cf_cv_wint_t" >&5
10574 echo "${ECHO_T}$cf_cv_wint_t" >&6
10575
10576 if test "$cf_cv_wint_t" = yes ; then
10577
10578 cat >>confdefs.h <<\EOF
10579 #define NEED_WCHAR_H 1
10580 EOF
10581
10582         NEED_WCHAR_H=1
10583 fi
10584
10585 # if we do not find wint_t in either place, use substitution to provide a fallback.
10586 if test "$cf_cv_wint_t" = unknown ; then
10587         NCURSES_WINT_T=1
10588 fi
10589
10590 # if we find wint_t in either place, use substitution to provide a fallback.
10591 if test "$cf_cv_wint_t" != unknown ; then
10592         NCURSES_OK_WINT_T=1
10593 fi
10594
10595         if test "$NCURSES_MBSTATE_T" != 0; then
10596
10597 cat >>confdefs.h <<\EOF
10598 #define NEED_MBSTATE_T_DEF 1
10599 EOF
10600
10601         fi
10602 fi
10603
10604 ###   use option --disable-lp64 to allow long chtype
10605 echo "$as_me:10605: checking whether to enable _LP64 definition in curses.h" >&5
10606 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10607
10608 # Check whether --enable-lp64 or --disable-lp64 was given.
10609 if test "${enable_lp64+set}" = set; then
10610   enableval="$enable_lp64"
10611   with_lp64=$enableval
10612 else
10613   with_lp64=$cf_dft_with_lp64
10614 fi;
10615 echo "$as_me:10615: result: $with_lp64" >&5
10616 echo "${ECHO_T}$with_lp64" >&6
10617
10618 if test "x$with_lp64" = xyes ; then
10619         cf_cv_enable_lp64=1
10620 else
10621         cf_cv_enable_lp64=0
10622 fi
10623
10624 # Check whether --enable-largefile or --disable-largefile was given.
10625 if test "${enable_largefile+set}" = set; then
10626   enableval="$enable_largefile"
10627
10628 fi;
10629 if test "$enable_largefile" != no; then
10630
10631   echo "$as_me:10631: checking for special C compiler options needed for large files" >&5
10632 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10633 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10634   echo $ECHO_N "(cached) $ECHO_C" >&6
10635 else
10636   ac_cv_sys_largefile_CC=no
10637      if test "$GCC" != yes; then
10638        ac_save_CC=$CC
10639        while :; do
10640          # IRIX 6.2 and later do not support large files by default,
10641          # so use the C compiler's -n32 option if that helps.
10642          cat >conftest.$ac_ext <<_ACEOF
10643 #line 10643 "configure"
10644 #include "confdefs.h"
10645 #include <sys/types.h>
10646  /* Check that off_t can represent 2**63 - 1 correctly.
10647     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10648     since some C++ compilers masquerading as C compilers
10649     incorrectly reject 9223372036854775807.  */
10650 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10651   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10652                        && LARGE_OFF_T % 2147483647 == 1)
10653                       ? 1 : -1];
10654 int
10655 main ()
10656 {
10657
10658   ;
10659   return 0;
10660 }
10661 _ACEOF
10662          rm -f conftest.$ac_objext
10663 if { (eval echo "$as_me:10663: \"$ac_compile\"") >&5
10664   (eval $ac_compile) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit $ac_status); } &&
10668          { ac_try='test -s conftest.$ac_objext'
10669   { (eval echo "$as_me:10669: \"$ac_try\"") >&5
10670   (eval $ac_try) 2>&5
10671   ac_status=$?
10672   echo "$as_me:10672: \$? = $ac_status" >&5
10673   (exit $ac_status); }; }; then
10674   break
10675 else
10676   echo "$as_me: failed program was:" >&5
10677 cat conftest.$ac_ext >&5
10678 fi
10679 rm -f conftest.$ac_objext
10680          CC="$CC -n32"
10681          rm -f conftest.$ac_objext
10682 if { (eval echo "$as_me:10682: \"$ac_compile\"") >&5
10683   (eval $ac_compile) 2>&5
10684   ac_status=$?
10685   echo "$as_me:10685: \$? = $ac_status" >&5
10686   (exit $ac_status); } &&
10687          { ac_try='test -s conftest.$ac_objext'
10688   { (eval echo "$as_me:10688: \"$ac_try\"") >&5
10689   (eval $ac_try) 2>&5
10690   ac_status=$?
10691   echo "$as_me:10691: \$? = $ac_status" >&5
10692   (exit $ac_status); }; }; then
10693   ac_cv_sys_largefile_CC=' -n32'; break
10694 else
10695   echo "$as_me: failed program was:" >&5
10696 cat conftest.$ac_ext >&5
10697 fi
10698 rm -f conftest.$ac_objext
10699          break
10700        done
10701        CC=$ac_save_CC
10702        rm -f conftest.$ac_ext
10703     fi
10704 fi
10705 echo "$as_me:10705: result: $ac_cv_sys_largefile_CC" >&5
10706 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10707   if test "$ac_cv_sys_largefile_CC" != no; then
10708     CC=$CC$ac_cv_sys_largefile_CC
10709   fi
10710
10711   echo "$as_me:10711: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10712 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10713 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10714   echo $ECHO_N "(cached) $ECHO_C" >&6
10715 else
10716   while :; do
10717   ac_cv_sys_file_offset_bits=no
10718   cat >conftest.$ac_ext <<_ACEOF
10719 #line 10719 "configure"
10720 #include "confdefs.h"
10721 #include <sys/types.h>
10722  /* Check that off_t can represent 2**63 - 1 correctly.
10723     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10724     since some C++ compilers masquerading as C compilers
10725     incorrectly reject 9223372036854775807.  */
10726 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10727   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10728                        && LARGE_OFF_T % 2147483647 == 1)
10729                       ? 1 : -1];
10730 int
10731 main ()
10732 {
10733
10734   ;
10735   return 0;
10736 }
10737 _ACEOF
10738 rm -f conftest.$ac_objext
10739 if { (eval echo "$as_me:10739: \"$ac_compile\"") >&5
10740   (eval $ac_compile) 2>&5
10741   ac_status=$?
10742   echo "$as_me:10742: \$? = $ac_status" >&5
10743   (exit $ac_status); } &&
10744          { ac_try='test -s conftest.$ac_objext'
10745   { (eval echo "$as_me:10745: \"$ac_try\"") >&5
10746   (eval $ac_try) 2>&5
10747   ac_status=$?
10748   echo "$as_me:10748: \$? = $ac_status" >&5
10749   (exit $ac_status); }; }; then
10750   break
10751 else
10752   echo "$as_me: failed program was:" >&5
10753 cat conftest.$ac_ext >&5
10754 fi
10755 rm -f conftest.$ac_objext conftest.$ac_ext
10756   cat >conftest.$ac_ext <<_ACEOF
10757 #line 10757 "configure"
10758 #include "confdefs.h"
10759 #define _FILE_OFFSET_BITS 64
10760 #include <sys/types.h>
10761  /* Check that off_t can represent 2**63 - 1 correctly.
10762     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10763     since some C++ compilers masquerading as C compilers
10764     incorrectly reject 9223372036854775807.  */
10765 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10766   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10767                        && LARGE_OFF_T % 2147483647 == 1)
10768                       ? 1 : -1];
10769 int
10770 main ()
10771 {
10772
10773   ;
10774   return 0;
10775 }
10776 _ACEOF
10777 rm -f conftest.$ac_objext
10778 if { (eval echo "$as_me:10778: \"$ac_compile\"") >&5
10779   (eval $ac_compile) 2>&5
10780   ac_status=$?
10781   echo "$as_me:10781: \$? = $ac_status" >&5
10782   (exit $ac_status); } &&
10783          { ac_try='test -s conftest.$ac_objext'
10784   { (eval echo "$as_me:10784: \"$ac_try\"") >&5
10785   (eval $ac_try) 2>&5
10786   ac_status=$?
10787   echo "$as_me:10787: \$? = $ac_status" >&5
10788   (exit $ac_status); }; }; then
10789   ac_cv_sys_file_offset_bits=64; break
10790 else
10791   echo "$as_me: failed program was:" >&5
10792 cat conftest.$ac_ext >&5
10793 fi
10794 rm -f conftest.$ac_objext conftest.$ac_ext
10795   break
10796 done
10797 fi
10798 echo "$as_me:10798: result: $ac_cv_sys_file_offset_bits" >&5
10799 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10800 if test "$ac_cv_sys_file_offset_bits" != no; then
10801
10802 cat >>confdefs.h <<EOF
10803 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10804 EOF
10805
10806 fi
10807 rm -rf conftest*
10808   echo "$as_me:10808: checking for _LARGE_FILES value needed for large files" >&5
10809 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10810 if test "${ac_cv_sys_large_files+set}" = set; then
10811   echo $ECHO_N "(cached) $ECHO_C" >&6
10812 else
10813   while :; do
10814   ac_cv_sys_large_files=no
10815   cat >conftest.$ac_ext <<_ACEOF
10816 #line 10816 "configure"
10817 #include "confdefs.h"
10818 #include <sys/types.h>
10819  /* Check that off_t can represent 2**63 - 1 correctly.
10820     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10821     since some C++ compilers masquerading as C compilers
10822     incorrectly reject 9223372036854775807.  */
10823 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10824   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10825                        && LARGE_OFF_T % 2147483647 == 1)
10826                       ? 1 : -1];
10827 int
10828 main ()
10829 {
10830
10831   ;
10832   return 0;
10833 }
10834 _ACEOF
10835 rm -f conftest.$ac_objext
10836 if { (eval echo "$as_me:10836: \"$ac_compile\"") >&5
10837   (eval $ac_compile) 2>&5
10838   ac_status=$?
10839   echo "$as_me:10839: \$? = $ac_status" >&5
10840   (exit $ac_status); } &&
10841          { ac_try='test -s conftest.$ac_objext'
10842   { (eval echo "$as_me:10842: \"$ac_try\"") >&5
10843   (eval $ac_try) 2>&5
10844   ac_status=$?
10845   echo "$as_me:10845: \$? = $ac_status" >&5
10846   (exit $ac_status); }; }; then
10847   break
10848 else
10849   echo "$as_me: failed program was:" >&5
10850 cat conftest.$ac_ext >&5
10851 fi
10852 rm -f conftest.$ac_objext conftest.$ac_ext
10853   cat >conftest.$ac_ext <<_ACEOF
10854 #line 10854 "configure"
10855 #include "confdefs.h"
10856 #define _LARGE_FILES 1
10857 #include <sys/types.h>
10858  /* Check that off_t can represent 2**63 - 1 correctly.
10859     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10860     since some C++ compilers masquerading as C compilers
10861     incorrectly reject 9223372036854775807.  */
10862 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10863   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10864                        && LARGE_OFF_T % 2147483647 == 1)
10865                       ? 1 : -1];
10866 int
10867 main ()
10868 {
10869
10870   ;
10871   return 0;
10872 }
10873 _ACEOF
10874 rm -f conftest.$ac_objext
10875 if { (eval echo "$as_me:10875: \"$ac_compile\"") >&5
10876   (eval $ac_compile) 2>&5
10877   ac_status=$?
10878   echo "$as_me:10878: \$? = $ac_status" >&5
10879   (exit $ac_status); } &&
10880          { ac_try='test -s conftest.$ac_objext'
10881   { (eval echo "$as_me:10881: \"$ac_try\"") >&5
10882   (eval $ac_try) 2>&5
10883   ac_status=$?
10884   echo "$as_me:10884: \$? = $ac_status" >&5
10885   (exit $ac_status); }; }; then
10886   ac_cv_sys_large_files=1; break
10887 else
10888   echo "$as_me: failed program was:" >&5
10889 cat conftest.$ac_ext >&5
10890 fi
10891 rm -f conftest.$ac_objext conftest.$ac_ext
10892   break
10893 done
10894 fi
10895 echo "$as_me:10895: result: $ac_cv_sys_large_files" >&5
10896 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10897 if test "$ac_cv_sys_large_files" != no; then
10898
10899 cat >>confdefs.h <<EOF
10900 #define _LARGE_FILES $ac_cv_sys_large_files
10901 EOF
10902
10903 fi
10904 rm -rf conftest*
10905 fi
10906
10907         if test "$enable_largefile" != no ; then
10908         echo "$as_me:10908: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10909 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10910 if test "${ac_cv_sys_largefile_source+set}" = set; then
10911   echo $ECHO_N "(cached) $ECHO_C" >&6
10912 else
10913   while :; do
10914   ac_cv_sys_largefile_source=no
10915   cat >conftest.$ac_ext <<_ACEOF
10916 #line 10916 "configure"
10917 #include "confdefs.h"
10918 #include <stdio.h>
10919 int
10920 main ()
10921 {
10922 return !fseeko;
10923   ;
10924   return 0;
10925 }
10926 _ACEOF
10927 rm -f conftest.$ac_objext
10928 if { (eval echo "$as_me:10928: \"$ac_compile\"") >&5
10929   (eval $ac_compile) 2>&5
10930   ac_status=$?
10931   echo "$as_me:10931: \$? = $ac_status" >&5
10932   (exit $ac_status); } &&
10933          { ac_try='test -s conftest.$ac_objext'
10934   { (eval echo "$as_me:10934: \"$ac_try\"") >&5
10935   (eval $ac_try) 2>&5
10936   ac_status=$?
10937   echo "$as_me:10937: \$? = $ac_status" >&5
10938   (exit $ac_status); }; }; then
10939   break
10940 else
10941   echo "$as_me: failed program was:" >&5
10942 cat conftest.$ac_ext >&5
10943 fi
10944 rm -f conftest.$ac_objext conftest.$ac_ext
10945   cat >conftest.$ac_ext <<_ACEOF
10946 #line 10946 "configure"
10947 #include "confdefs.h"
10948 #define _LARGEFILE_SOURCE 1
10949 #include <stdio.h>
10950 int
10951 main ()
10952 {
10953 return !fseeko;
10954   ;
10955   return 0;
10956 }
10957 _ACEOF
10958 rm -f conftest.$ac_objext
10959 if { (eval echo "$as_me:10959: \"$ac_compile\"") >&5
10960   (eval $ac_compile) 2>&5
10961   ac_status=$?
10962   echo "$as_me:10962: \$? = $ac_status" >&5
10963   (exit $ac_status); } &&
10964          { ac_try='test -s conftest.$ac_objext'
10965   { (eval echo "$as_me:10965: \"$ac_try\"") >&5
10966   (eval $ac_try) 2>&5
10967   ac_status=$?
10968   echo "$as_me:10968: \$? = $ac_status" >&5
10969   (exit $ac_status); }; }; then
10970   ac_cv_sys_largefile_source=1; break
10971 else
10972   echo "$as_me: failed program was:" >&5
10973 cat conftest.$ac_ext >&5
10974 fi
10975 rm -f conftest.$ac_objext conftest.$ac_ext
10976   break
10977 done
10978 fi
10979 echo "$as_me:10979: result: $ac_cv_sys_largefile_source" >&5
10980 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10981 if test "$ac_cv_sys_largefile_source" != no; then
10982
10983 cat >>confdefs.h <<EOF
10984 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10985 EOF
10986
10987 fi
10988 rm -rf conftest*
10989
10990 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10991 # in glibc 2.1.3, but that breaks too many other things.
10992 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10993 echo "$as_me:10993: checking for fseeko" >&5
10994 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10995 if test "${ac_cv_func_fseeko+set}" = set; then
10996   echo $ECHO_N "(cached) $ECHO_C" >&6
10997 else
10998   cat >conftest.$ac_ext <<_ACEOF
10999 #line 10999 "configure"
11000 #include "confdefs.h"
11001 #include <stdio.h>
11002 int
11003 main ()
11004 {
11005 return fseeko && fseeko (stdin, 0, 0);
11006   ;
11007   return 0;
11008 }
11009 _ACEOF
11010 rm -f conftest.$ac_objext conftest$ac_exeext
11011 if { (eval echo "$as_me:11011: \"$ac_link\"") >&5
11012   (eval $ac_link) 2>&5
11013   ac_status=$?
11014   echo "$as_me:11014: \$? = $ac_status" >&5
11015   (exit $ac_status); } &&
11016          { ac_try='test -s conftest$ac_exeext'
11017   { (eval echo "$as_me:11017: \"$ac_try\"") >&5
11018   (eval $ac_try) 2>&5
11019   ac_status=$?
11020   echo "$as_me:11020: \$? = $ac_status" >&5
11021   (exit $ac_status); }; }; then
11022   ac_cv_func_fseeko=yes
11023 else
11024   echo "$as_me: failed program was:" >&5
11025 cat conftest.$ac_ext >&5
11026 ac_cv_func_fseeko=no
11027 fi
11028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11029 fi
11030 echo "$as_me:11030: result: $ac_cv_func_fseeko" >&5
11031 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11032 if test $ac_cv_func_fseeko = yes; then
11033
11034 cat >>confdefs.h <<\EOF
11035 #define HAVE_FSEEKO 1
11036 EOF
11037
11038 fi
11039
11040         # Normally we would collect these definitions in the config.h,
11041         # but (like _XOPEN_SOURCE), some environments rely on having these
11042         # defined before any of the system headers are included.  Another
11043         # case comes up with C++, e.g., on AIX the compiler compiles the
11044         # header files by themselves before looking at the body files it is
11045         # told to compile.  For ncurses, those header files do not include
11046         # the config.h
11047         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11048         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11049         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11050
11051         echo "$as_me:11051: checking whether to use struct dirent64" >&5
11052 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11053 if test "${cf_cv_struct_dirent64+set}" = set; then
11054   echo $ECHO_N "(cached) $ECHO_C" >&6
11055 else
11056
11057                 cat >conftest.$ac_ext <<_ACEOF
11058 #line 11058 "configure"
11059 #include "confdefs.h"
11060
11061 #include <sys/types.h>
11062 #include <dirent.h>
11063
11064 int
11065 main ()
11066 {
11067
11068                 /* if transitional largefile support is setup, this is true */
11069                 extern struct dirent64 * readdir(DIR *);
11070                 struct dirent64 *x = readdir((DIR *)0);
11071                 struct dirent *y = readdir((DIR *)0);
11072                 int z = x - y;
11073
11074   ;
11075   return 0;
11076 }
11077 _ACEOF
11078 rm -f conftest.$ac_objext
11079 if { (eval echo "$as_me:11079: \"$ac_compile\"") >&5
11080   (eval $ac_compile) 2>&5
11081   ac_status=$?
11082   echo "$as_me:11082: \$? = $ac_status" >&5
11083   (exit $ac_status); } &&
11084          { ac_try='test -s conftest.$ac_objext'
11085   { (eval echo "$as_me:11085: \"$ac_try\"") >&5
11086   (eval $ac_try) 2>&5
11087   ac_status=$?
11088   echo "$as_me:11088: \$? = $ac_status" >&5
11089   (exit $ac_status); }; }; then
11090   cf_cv_struct_dirent64=yes
11091 else
11092   echo "$as_me: failed program was:" >&5
11093 cat conftest.$ac_ext >&5
11094 cf_cv_struct_dirent64=no
11095 fi
11096 rm -f conftest.$ac_objext conftest.$ac_ext
11097
11098 fi
11099 echo "$as_me:11099: result: $cf_cv_struct_dirent64" >&5
11100 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11101         test "$cf_cv_struct_dirent64" = yes &&
11102 cat >>confdefs.h <<\EOF
11103 #define HAVE_STRUCT_DIRENT64 1
11104 EOF
11105
11106         fi
11107
11108 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11109 echo "$as_me:11109: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11110 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11111
11112 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11113 if test "${enable_tparm_varargs+set}" = set; then
11114   enableval="$enable_tparm_varargs"
11115   with_tparm_varargs=$enableval
11116 else
11117   with_tparm_varargs=yes
11118 fi;
11119 echo "$as_me:11119: result: $with_tparm_varargs" >&5
11120 echo "${ECHO_T}$with_tparm_varargs" >&6
11121 NCURSES_TPARM_VARARGS=0
11122 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11123
11124 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11125 if test "$with_ticlib" != no ; then
11126 echo "$as_me:11126: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11127 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11128
11129 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11130 if test "${enable_tic_depends+set}" = set; then
11131   enableval="$enable_tic_depends"
11132   with_tic_depends=$enableval
11133 else
11134   with_tic_depends=yes
11135 fi;
11136 echo "$as_me:11136: result: $with_tic_depends" >&5
11137 echo "${ECHO_T}$with_tic_depends" >&6
11138 else
11139         with_tic_depends=no
11140 fi
11141
11142 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11143 echo "$as_me:11143: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11144 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11145
11146 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11147 if test "${enable_wattr_macros+set}" = set; then
11148   enableval="$enable_wattr_macros"
11149   with_wattr_macros=$enableval
11150 else
11151   with_wattr_macros=yes
11152 fi;
11153 if [ "x$with_wattr_macros" != xyes ]; then
11154         NCURSES_WATTR_MACROS=0
11155         echo "$as_me:11155: result: yes" >&5
11156 echo "${ECHO_T}yes" >&6
11157 else
11158         NCURSES_WATTR_MACROS=1
11159         echo "$as_me:11159: result: no" >&5
11160 echo "${ECHO_T}no" >&6
11161 fi
11162
11163 ###   use option --with-bool to override bool's type
11164 echo "$as_me:11164: checking for type of bool" >&5
11165 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11166
11167 # Check whether --with-bool or --without-bool was given.
11168 if test "${with_bool+set}" = set; then
11169   withval="$with_bool"
11170   NCURSES_BOOL="$withval"
11171 else
11172   NCURSES_BOOL=auto
11173 fi;
11174 echo "$as_me:11174: result: $NCURSES_BOOL" >&5
11175 echo "${ECHO_T}$NCURSES_BOOL" >&6
11176
11177 echo "$as_me:11177: checking for alternate terminal capabilities file" >&5
11178 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11179
11180 # Check whether --with-caps or --without-caps was given.
11181 if test "${with_caps+set}" = set; then
11182   withval="$with_caps"
11183   TERMINFO_CAPS=Caps.$withval
11184 else
11185   TERMINFO_CAPS=Caps
11186 fi;
11187 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11188 echo "$as_me:11188: result: $TERMINFO_CAPS" >&5
11189 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11190
11191 ###   use option --with-chtype to override chtype's type
11192 echo "$as_me:11192: checking for type of chtype" >&5
11193 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11194
11195 # Check whether --with-chtype or --without-chtype was given.
11196 if test "${with_chtype+set}" = set; then
11197   withval="$with_chtype"
11198   NCURSES_CHTYPE="$withval"
11199 else
11200   NCURSES_CHTYPE=$cf_dft_chtype
11201 fi;
11202 echo "$as_me:11202: result: $NCURSES_CHTYPE" >&5
11203 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11204
11205 ###   use option --with-ospeed to override ospeed's type
11206 echo "$as_me:11206: checking for type of ospeed" >&5
11207 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11208
11209 # Check whether --with-ospeed or --without-ospeed was given.
11210 if test "${with_ospeed+set}" = set; then
11211   withval="$with_ospeed"
11212   NCURSES_OSPEED="$withval"
11213 else
11214   NCURSES_OSPEED=short
11215 fi;
11216 echo "$as_me:11216: result: $NCURSES_OSPEED" >&5
11217 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11218
11219 ###   use option --with-mmask-t to override mmask_t's type
11220 echo "$as_me:11220: checking for type of mmask_t" >&5
11221 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11222
11223 # Check whether --with-mmask-t or --without-mmask-t was given.
11224 if test "${with_mmask_t+set}" = set; then
11225   withval="$with_mmask_t"
11226   NCURSES_MMASK_T="$withval"
11227 else
11228   NCURSES_MMASK_T=$cf_dft_mmask_t
11229 fi;
11230 echo "$as_me:11230: result: $NCURSES_MMASK_T" >&5
11231 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11232
11233 ###   use option --with-ccharw-max to override CCHARW_MAX size
11234 echo "$as_me:11234: checking for size CCHARW_MAX" >&5
11235 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11236
11237 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11238 if test "${with_ccharw_max+set}" = set; then
11239   withval="$with_ccharw_max"
11240   NCURSES_CCHARW_MAX="$withval"
11241 else
11242   NCURSES_CCHARW_MAX=5
11243 fi;
11244 echo "$as_me:11244: result: $NCURSES_CCHARW_MAX" >&5
11245 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11246
11247 ###   use option --with-tparm-arg to override tparm's argument type
11248 echo "$as_me:11248: checking for type of tparm args" >&5
11249 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11250
11251 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11252 if test "${with_tparm_arg+set}" = set; then
11253   withval="$with_tparm_arg"
11254   NCURSES_TPARM_ARG="$withval"
11255 else
11256   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11257 fi;
11258 echo "$as_me:11258: result: $NCURSES_TPARM_ARG" >&5
11259 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11260
11261 ### Enable compiling-in rcs id's
11262 echo "$as_me:11262: checking if RCS identifiers should be compiled-in" >&5
11263 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11264
11265 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11266 if test "${with_rcs_ids+set}" = set; then
11267   withval="$with_rcs_ids"
11268   with_rcs_ids=$withval
11269 else
11270   with_rcs_ids=no
11271 fi;
11272 echo "$as_me:11272: result: $with_rcs_ids" >&5
11273 echo "${ECHO_T}$with_rcs_ids" >&6
11274 test "x$with_rcs_ids" = xyes &&
11275 cat >>confdefs.h <<\EOF
11276 #define USE_RCS_IDS 1
11277 EOF
11278
11279 ###############################################################################
11280
11281 echo "$as_me:11281: checking format of man-pages" >&5
11282 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11283
11284 # Check whether --with-manpage-format or --without-manpage-format was given.
11285 if test "${with_manpage_format+set}" = set; then
11286   withval="$with_manpage_format"
11287   MANPAGE_FORMAT=$withval
11288 else
11289   MANPAGE_FORMAT=unknown
11290 fi;
11291
11292 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11293 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11294
11295 cf_unknown=
11296
11297 case $MANPAGE_FORMAT in
11298 (unknown)
11299         if test -z "$MANPATH" ; then
11300                 MANPATH="/usr/man:/usr/share/man"
11301         fi
11302
11303         # look for the 'date' man-page (it's most likely to be installed!)
11304         MANPAGE_FORMAT=
11305         cf_preform=no
11306         cf_catonly=yes
11307         cf_example=date
11308
11309         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11310         for cf_dir in $MANPATH; do
11311                 test -z "$cf_dir" && cf_dir=/usr/man
11312                 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
11313                 do
11314                         cf_test=`echo $cf_name | sed -e 's/*//'`
11315                         if test "x$cf_test" = "x$cf_name" ; then
11316
11317                                 case "$cf_name" in
11318                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11319                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11320                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11321                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11322                                 esac
11323
11324                                 case "$cf_name" in
11325                                 ($cf_dir/man*)
11326                                         cf_catonly=no
11327                                         ;;
11328                                 ($cf_dir/cat*)
11329                                         cf_preform=yes
11330                                         ;;
11331                                 esac
11332                                 break
11333                         fi
11334
11335                         # if we found a match in either man* or cat*, stop looking
11336                         if test -n "$MANPAGE_FORMAT" ; then
11337                                 cf_found=no
11338                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11339                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11340                                 case "$cf_name" in
11341                                 ($cf_dir/cat*)
11342                                         cf_found=yes
11343                                         ;;
11344                                 esac
11345                                 test $cf_found=yes && break
11346                         fi
11347                 done
11348                 # only check the first directory in $MANPATH where we find manpages
11349                 if test -n "$MANPAGE_FORMAT" ; then
11350                         break
11351                 fi
11352         done
11353         # if we did not find the example, just assume it is normal
11354         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11355         IFS="$ac_save_ifs"
11356         ;;
11357 (*)
11358         for cf_option in $MANPAGE_FORMAT; do
11359         case $cf_option in
11360         (gzip|compress|BSDI|normal|formatted|catonly)
11361                 ;;
11362         (*)
11363                 cf_unknown="$cf_unknown $cf_option"
11364                 ;;
11365         esac
11366         done
11367         ;;
11368 esac
11369
11370 echo "$as_me:11370: result: $MANPAGE_FORMAT" >&5
11371 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11372 if test -n "$cf_unknown" ; then
11373         { echo "$as_me:11373: WARNING: Unexpected manpage-format $cf_unknown" >&5
11374 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11375 fi
11376
11377 echo "$as_me:11377: checking for manpage renaming" >&5
11378 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11379
11380 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11381 if test "${with_manpage_renames+set}" = set; then
11382   withval="$with_manpage_renames"
11383   MANPAGE_RENAMES=$withval
11384 else
11385   MANPAGE_RENAMES=yes
11386 fi;
11387
11388 case ".$MANPAGE_RENAMES" in
11389 (.no)
11390         ;;
11391 (.|.yes)
11392         # Debian 'man' program?
11393         if test -f /etc/debian_version ; then
11394                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11395         else
11396                 MANPAGE_RENAMES=no
11397         fi
11398         ;;
11399 esac
11400
11401 if test "$MANPAGE_RENAMES" != no ; then
11402         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11403                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11404         elif test ! -f $MANPAGE_RENAMES ; then
11405                 { { echo "$as_me:11405: error: not a filename: $MANPAGE_RENAMES" >&5
11406 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11407    { (exit 1); exit 1; }; }
11408         fi
11409
11410         test ! -d man && mkdir man
11411
11412         # Construct a sed-script to perform renaming within man-pages
11413         if test -n "$MANPAGE_RENAMES" ; then
11414                 test ! -d man && mkdir man
11415                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11416         fi
11417 fi
11418
11419 echo "$as_me:11419: result: $MANPAGE_RENAMES" >&5
11420 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11421
11422 echo "$as_me:11422: checking if manpage aliases will be installed" >&5
11423 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11424
11425 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11426 if test "${with_manpage_aliases+set}" = set; then
11427   withval="$with_manpage_aliases"
11428   MANPAGE_ALIASES=$withval
11429 else
11430   MANPAGE_ALIASES=yes
11431 fi;
11432
11433 echo "$as_me:11433: result: $MANPAGE_ALIASES" >&5
11434 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11435
11436 case "x$LN_S" in
11437 (xln*)
11438         cf_use_symlinks=yes
11439         ;;
11440 (*)
11441         cf_use_symlinks=no
11442         ;;
11443 esac
11444
11445 MANPAGE_SYMLINKS=no
11446 if test "$MANPAGE_ALIASES" = yes ; then
11447 echo "$as_me:11447: checking if manpage symlinks should be used" >&5
11448 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11449
11450 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11451 if test "${with_manpage_symlinks+set}" = set; then
11452   withval="$with_manpage_symlinks"
11453   MANPAGE_SYMLINKS=$withval
11454 else
11455   MANPAGE_SYMLINKS=$cf_use_symlinks
11456 fi;
11457
11458 if test "$$cf_use_symlinks" = no; then
11459 if test "$MANPAGE_SYMLINKS" = yes ; then
11460         { echo "$as_me:11460: WARNING: cannot make symlinks" >&5
11461 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11462         MANPAGE_SYMLINKS=no
11463 fi
11464 fi
11465
11466 echo "$as_me:11466: result: $MANPAGE_SYMLINKS" >&5
11467 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11468 fi
11469
11470 echo "$as_me:11470: checking for manpage tbl" >&5
11471 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11472
11473 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11474 if test "${with_manpage_tbl+set}" = set; then
11475   withval="$with_manpage_tbl"
11476   MANPAGE_TBL=$withval
11477 else
11478   MANPAGE_TBL=no
11479 fi;
11480
11481 echo "$as_me:11481: result: $MANPAGE_TBL" >&5
11482 echo "${ECHO_T}$MANPAGE_TBL" >&6
11483
11484 if test "$prefix" = "NONE" ; then
11485         cf_prefix="$ac_default_prefix"
11486 else
11487         cf_prefix="$prefix"
11488 fi
11489
11490 case "$MANPAGE_FORMAT" in
11491 (*catonly*)
11492         cf_format=yes
11493         cf_inboth=no
11494         ;;
11495 (*formatted*)
11496         cf_format=yes
11497         cf_inboth=yes
11498         ;;
11499 (*)
11500         cf_format=no
11501         cf_inboth=no
11502         ;;
11503 esac
11504
11505 test ! -d man && mkdir man
11506
11507 cf_so_strip=
11508 cf_compress=
11509 case "$MANPAGE_FORMAT" in
11510 (*compress*)
11511         cf_so_strip="Z"
11512         cf_compress=compress
11513         ;;
11514 (*gzip*)
11515         cf_so_strip="gz"
11516         cf_compress=gzip
11517         ;;
11518 esac
11519
11520 cf_edit_man=./edit_man.sh
11521 cf_man_alias=`pwd`/man_alias.sed
11522
11523 cat >$cf_edit_man <<CF_EOF
11524 #! $SHELL
11525 # this script is generated by the configure-script CF_MAN_PAGES macro.
11526
11527 prefix="$cf_prefix"
11528 datarootdir="$datarootdir"
11529 datadir="$datadir"
11530
11531 NCURSES_MAJOR="$NCURSES_MAJOR"
11532 NCURSES_MINOR="$NCURSES_MINOR"
11533 NCURSES_PATCH="$NCURSES_PATCH"
11534
11535 NCURSES_OSPEED="$NCURSES_OSPEED"
11536 TERMINFO="$TERMINFO"
11537
11538 INSTALL="$INSTALL"
11539 INSTALL_DATA="$INSTALL_DATA"
11540
11541 transform="$program_transform_name"
11542
11543 TMP=\${TMPDIR:=/tmp}/man\$\$
11544 trap "rm -f \$TMP" 0 1 2 5 15
11545
11546 form=\$1
11547 shift || exit 1
11548
11549 verb=\$1
11550 shift || exit 1
11551
11552 mandir=\$1
11553 shift || exit 1
11554
11555 srcdir=\$1
11556 top_srcdir=\$srcdir/..
11557 shift || exit 1
11558
11559 if test "\$form" = normal ; then
11560         if test "$cf_format" = yes ; then
11561         if test "$cf_inboth" = no ; then
11562                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11563                 exit $?
11564         fi
11565         fi
11566         cf_subdir=\$mandir/man
11567         cf_tables=$MANPAGE_TBL
11568 else
11569         cf_subdir=\$mandir/cat
11570         cf_tables=yes
11571 fi
11572
11573 # process the list of source-files
11574 for i in \$* ; do
11575 case \$i in
11576 (*.orig|*.rej) ;;
11577 (*.[0-9]*)
11578         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11579         if test \$verb = installing ; then
11580         if test ! -d \$cf_subdir\${section} ; then
11581                 mkdir -p \$cf_subdir\$section
11582         fi
11583         fi
11584
11585         # replace variables in man page
11586         if test ! -f $cf_man_alias ; then
11587 cat >>$cf_man_alias <<-CF_EOF2
11588                 s,@DATADIR@,\$datadir,g
11589                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11590                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11591                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11592                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11593                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11594                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11595 CF_EOF
11596
11597         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11598         do
11599                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11600                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11601 cat >>$cf_edit_man <<-CF_EOF
11602                 s,@$cf_NAME@,$cf_name,g
11603 CF_EOF
11604         done
11605
11606 cat >>$cf_edit_man <<CF_EOF
11607 CF_EOF2
11608                 echo "...made $cf_man_alias"
11609         fi
11610
11611         aliases=
11612         cf_source=\`basename \$i\`
11613         inalias=\$cf_source
11614         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11615         if test ! -f \$inalias ; then
11616                 echo .. skipped \$cf_source
11617                 continue
11618         fi
11619 CF_EOF
11620
11621 if test "$MANPAGE_ALIASES" != no ; then
11622 cat >>$cf_edit_man <<CF_EOF
11623         nCurses=ignore.3x
11624         test $with_curses_h = yes && nCurses=ncurses.3x
11625         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11626 CF_EOF
11627 fi
11628
11629 if test "$MANPAGE_RENAMES" = no ; then
11630 cat >>$cf_edit_man <<CF_EOF
11631         # perform program transformations for section 1 man pages
11632         if test \$section = 1 ; then
11633                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11634         else
11635                 cf_target=\$cf_subdir\${section}/\$cf_source
11636         fi
11637 CF_EOF
11638 else
11639 cat >>$cf_edit_man <<CF_EOF
11640         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11641         if test -z "\$cf_target" ; then
11642                 echo '? missing rename for '\$cf_source
11643                 cf_target="\$cf_source"
11644         fi
11645         cf_target="\$cf_subdir\${section}/\${cf_target}"
11646
11647 CF_EOF
11648 fi
11649
11650 cat >>$cf_edit_man <<CF_EOF
11651         sed     -f $cf_man_alias \\
11652 CF_EOF
11653
11654 if test -f $MANPAGE_RENAMES ; then
11655 cat >>$cf_edit_man <<CF_EOF
11656                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11657 CF_EOF
11658 else
11659 cat >>$cf_edit_man <<CF_EOF
11660                 < \$i >\$TMP
11661 CF_EOF
11662 fi
11663
11664 cat >>$cf_edit_man <<CF_EOF
11665 if test \$cf_tables = yes ; then
11666         tbl \$TMP >\$TMP.out
11667         mv \$TMP.out \$TMP
11668 fi
11669 CF_EOF
11670
11671 if test $with_overwrite != yes ; then
11672 cat >>$cf_edit_man <<CF_EOF
11673         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11674         mv \$TMP.out \$TMP
11675 CF_EOF
11676 fi
11677
11678 if test $with_curses_h != yes ; then
11679 cat >>$cf_edit_man <<CF_EOF
11680         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11681         mv \$TMP.out \$TMP
11682 CF_EOF
11683 fi
11684
11685 cat >>$cf_edit_man <<CF_EOF
11686         if test \$form = format ; then
11687                 nroff -man \$TMP >\$TMP.out
11688                 mv \$TMP.out \$TMP
11689         fi
11690 CF_EOF
11691
11692 if test -n "$cf_compress" ; then
11693 cat >>$cf_edit_man <<CF_EOF
11694         if test \$verb = installing ; then
11695         if ( $cf_compress -f \$TMP )
11696         then
11697                 mv \$TMP.$cf_so_strip \$TMP
11698         fi
11699         fi
11700         cf_target="\$cf_target.$cf_so_strip"
11701 CF_EOF
11702 fi
11703
11704 case "$MANPAGE_FORMAT" in
11705 (*BSDI*)
11706 cat >>$cf_edit_man <<CF_EOF
11707         if test \$form = format ; then
11708                 # BSDI installs only .0 suffixes in the cat directories
11709                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11710         fi
11711 CF_EOF
11712   ;;
11713 esac
11714
11715 cat >>$cf_edit_man <<CF_EOF
11716         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11717         if test \$verb = installing ; then
11718                 echo \$verb \$cf_target
11719                 \$INSTALL_DATA \$TMP \$cf_target
11720                 test -d \$cf_subdir\${section} &&
11721                 test -n "\$aliases" && (
11722                         cd \$cf_subdir\${section} && (
11723                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11724                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11725                                 cf_target=\`basename \$cf_target\`
11726                                 for cf_alias in \$aliases
11727                                 do
11728                                         if test \$section = 1 ; then
11729                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11730                                         fi
11731
11732                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11733                                                 if test -f \$cf_alias\${suffix} ; then
11734                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11735                                                         then
11736                                                                 continue
11737                                                         fi
11738                                                 fi
11739                                                 echo .. \$verb alias \$cf_alias\${suffix}
11740 CF_EOF
11741 case "x$LN_S" in
11742 (*-f)
11743 cat >>$cf_edit_man <<CF_EOF
11744                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11745 CF_EOF
11746         ;;
11747 (*)
11748 cat >>$cf_edit_man <<CF_EOF
11749                                                 rm -f \$cf_alias\${suffix}
11750                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11751 CF_EOF
11752         ;;
11753 esac
11754 cat >>$cf_edit_man <<CF_EOF
11755                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11756                                                 echo ".so \$cf_source" >\$TMP
11757 CF_EOF
11758 if test -n "$cf_compress" ; then
11759 cat >>$cf_edit_man <<CF_EOF
11760                                                 if test -n "$cf_so_strip" ; then
11761                                                         $cf_compress -f \$TMP
11762                                                         mv \$TMP.$cf_so_strip \$TMP
11763                                                 fi
11764 CF_EOF
11765 fi
11766 cat >>$cf_edit_man <<CF_EOF
11767                                                 echo .. \$verb alias \$cf_alias\${suffix}
11768                                                 rm -f \$cf_alias\${suffix}
11769                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11770                                         fi
11771                                 done
11772                         )
11773                 )
11774         elif test \$verb = removing ; then
11775                 test -f \$cf_target && (
11776                         echo \$verb \$cf_target
11777                         rm -f \$cf_target
11778                 )
11779                 test -d \$cf_subdir\${section} &&
11780                 test -n "\$aliases" && (
11781                         cd \$cf_subdir\${section} && (
11782                                 for cf_alias in \$aliases
11783                                 do
11784                                         if test \$section = 1 ; then
11785                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11786                                         fi
11787
11788                                         echo .. \$verb alias \$cf_alias\${suffix}
11789                                         rm -f \$cf_alias\${suffix}
11790                                 done
11791                         )
11792                 )
11793         else
11794 #               echo ".hy 0"
11795                 cat \$TMP
11796         fi
11797         ;;
11798 esac
11799 done
11800
11801 if test $cf_inboth = yes ; then
11802 if test \$form != format ; then
11803         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11804 fi
11805 fi
11806
11807 exit 0
11808 CF_EOF
11809 chmod 755 $cf_edit_man
11810
11811 ###############################################################################
11812
11813 ### Note that some functions (such as const) are normally disabled anyway.
11814 echo "$as_me:11814: checking if you want to build with function extensions" >&5
11815 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11816
11817 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11818 if test "${enable_ext_funcs+set}" = set; then
11819   enableval="$enable_ext_funcs"
11820   with_ext_funcs=$enableval
11821 else
11822   with_ext_funcs=yes
11823 fi;
11824 echo "$as_me:11824: result: $with_ext_funcs" >&5
11825 echo "${ECHO_T}$with_ext_funcs" >&6
11826 if test "x$with_ext_funcs" = xyes ; then
11827         NCURSES_EXT_FUNCS=1
11828
11829 cat >>confdefs.h <<\EOF
11830 #define HAVE_ASSUME_DEFAULT_COLORS 1
11831 EOF
11832
11833 cat >>confdefs.h <<\EOF
11834 #define HAVE_CURSES_VERSION 1
11835 EOF
11836
11837 cat >>confdefs.h <<\EOF
11838 #define HAVE_HAS_KEY 1
11839 EOF
11840
11841 cat >>confdefs.h <<\EOF
11842 #define HAVE_RESIZETERM 1
11843 EOF
11844
11845 cat >>confdefs.h <<\EOF
11846 #define HAVE_RESIZE_TERM 1
11847 EOF
11848
11849 cat >>confdefs.h <<\EOF
11850 #define HAVE_TERM_ENTRY_H 1
11851 EOF
11852
11853 cat >>confdefs.h <<\EOF
11854 #define HAVE_USE_DEFAULT_COLORS 1
11855 EOF
11856
11857 cat >>confdefs.h <<\EOF
11858 #define HAVE_USE_EXTENDED_NAMES 1
11859 EOF
11860
11861 cat >>confdefs.h <<\EOF
11862 #define HAVE_USE_SCREEN 1
11863 EOF
11864
11865 cat >>confdefs.h <<\EOF
11866 #define HAVE_USE_WINDOW 1
11867 EOF
11868
11869 cat >>confdefs.h <<\EOF
11870 #define HAVE_WRESIZE 1
11871 EOF
11872
11873 cat >>confdefs.h <<\EOF
11874 #define NCURSES_EXT_FUNCS 1
11875 EOF
11876
11877         GENERATED_EXT_FUNCS=generated
11878 else
11879         NCURSES_EXT_FUNCS=0
11880         GENERATED_EXT_FUNCS=
11881 fi
11882
11883 echo "$as_me:11883: checking if you want to build with SCREEN extensions" >&5
11884 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11885
11886 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11887 if test "${enable_sp_funcs+set}" = set; then
11888   enableval="$enable_sp_funcs"
11889   with_sp_funcs=$enableval
11890 else
11891   with_sp_funcs=$cf_dft_ext_spfuncs
11892 fi;
11893 echo "$as_me:11893: result: $with_sp_funcs" >&5
11894 echo "${ECHO_T}$with_sp_funcs" >&6
11895 if test "x$with_sp_funcs" = xyes ; then
11896         NCURSES_SP_FUNCS=1
11897
11898 cat >>confdefs.h <<\EOF
11899 #define NCURSES_SP_FUNCS 1
11900 EOF
11901
11902         GENERATED_SP_FUNCS=generated
11903 else
11904         NCURSES_SP_FUNCS=0
11905         GENERATED_SP_FUNCS=
11906 fi
11907
11908 echo "$as_me:11908: checking if you want to build with terminal-driver" >&5
11909 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11910
11911 # Check whether --enable-term-driver or --disable-term-driver was given.
11912 if test "${enable_term_driver+set}" = set; then
11913   enableval="$enable_term_driver"
11914   with_term_driver=$enableval
11915 else
11916   with_term_driver=no
11917 fi;
11918 echo "$as_me:11918: result: $with_term_driver" >&5
11919 echo "${ECHO_T}$with_term_driver" >&6
11920 if test "x$with_term_driver" = xyes ; then
11921
11922 cat >>confdefs.h <<\EOF
11923 #define USE_TERM_DRIVER 1
11924 EOF
11925
11926         if test "x$with_termlib" != xno ; then
11927                 { { echo "$as_me:11927: error: The term-driver option conflicts with the termlib option" >&5
11928 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11929    { (exit 1); exit 1; }; }
11930         fi
11931         if test "x$with_sp_funcs" != xyes ; then
11932                 { { echo "$as_me:11932: error: The term-driver option relies upon sp-funcs" >&5
11933 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11934    { (exit 1); exit 1; }; }
11935         fi
11936 fi
11937
11938 ###   use option --enable-const to turn on use of const beyond that in XSI.
11939 echo "$as_me:11939: checking for extended use of const keyword" >&5
11940 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11941
11942 # Check whether --enable-const or --disable-const was given.
11943 if test "${enable_const+set}" = set; then
11944   enableval="$enable_const"
11945   with_ext_const=$enableval
11946 else
11947   with_ext_const=$cf_dft_ext_const
11948 fi;
11949 echo "$as_me:11949: result: $with_ext_const" >&5
11950 echo "${ECHO_T}$with_ext_const" >&6
11951 NCURSES_CONST='/*nothing*/'
11952 if test "x$with_ext_const" = xyes ; then
11953         NCURSES_CONST=const
11954 fi
11955
11956 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11957 echo "$as_me:11957: checking if you want to use extended colors" >&5
11958 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11959
11960 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11961 if test "${enable_ext_colors+set}" = set; then
11962   enableval="$enable_ext_colors"
11963   with_ext_colors=$enableval
11964 else
11965   with_ext_colors=$cf_dft_ext_colors
11966 fi;
11967 echo "$as_me:11967: result: $with_ext_colors" >&5
11968 echo "${ECHO_T}$with_ext_colors" >&6
11969 NCURSES_EXT_COLORS=0
11970 if test "x$with_ext_colors" = xyes ; then
11971         if test "x$with_widec" != xyes ; then
11972                 { echo "$as_me:11972: WARNING: This option applies only to wide-character library" >&5
11973 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11974         else
11975                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11976
11977 if test "${with_abi_version+set}" != set; then
11978         case $cf_cv_rel_version in
11979         (5.*)
11980                 cf_cv_rel_version=6.0
11981                 cf_cv_abi_version=6
11982                 { echo "$as_me:11982: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11983 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11984                 ;;
11985         esac
11986 fi
11987
11988                 NCURSES_EXT_COLORS=1
11989
11990 cat >>confdefs.h <<\EOF
11991 #define NCURSES_EXT_COLORS 1
11992 EOF
11993
11994         fi
11995 fi
11996
11997 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11998 echo "$as_me:11998: checking if you want to use extended mouse encoding" >&5
11999 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12000
12001 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12002 if test "${enable_ext_mouse+set}" = set; then
12003   enableval="$enable_ext_mouse"
12004   with_ext_mouse=$enableval
12005 else
12006   with_ext_mouse=$cf_dft_ext_mouse
12007 fi;
12008 echo "$as_me:12008: result: $with_ext_mouse" >&5
12009 echo "${ECHO_T}$with_ext_mouse" >&6
12010 NCURSES_MOUSE_VERSION=1
12011 if test "x$with_ext_mouse" = xyes ; then
12012         NCURSES_MOUSE_VERSION=2
12013
12014 if test "${with_abi_version+set}" != set; then
12015         case $cf_cv_rel_version in
12016         (5.*)
12017                 cf_cv_rel_version=6.0
12018                 cf_cv_abi_version=6
12019                 { echo "$as_me:12019: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12020 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12021                 ;;
12022         esac
12023 fi
12024
12025 fi
12026
12027 ###   use option --enable-ext-putwin to turn on extended screendumps
12028 echo "$as_me:12028: checking if you want to use extended putwin/screendump" >&5
12029 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12030
12031 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12032 if test "${enable_ext_putwin+set}" = set; then
12033   enableval="$enable_ext_putwin"
12034   with_ext_putwin=$enableval
12035 else
12036   with_ext_putwin=$cf_dft_ext_putwin
12037 fi;
12038 echo "$as_me:12038: result: $with_ext_putwin" >&5
12039 echo "${ECHO_T}$with_ext_putwin" >&6
12040 if test "x$with_ext_putwin" = xyes ; then
12041
12042 cat >>confdefs.h <<\EOF
12043 #define NCURSES_EXT_PUTWIN 1
12044 EOF
12045
12046 fi
12047
12048 echo "$as_me:12048: checking if you want \$NCURSES_NO_PADDING code" >&5
12049 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12050
12051 # Check whether --enable-no-padding or --disable-no-padding was given.
12052 if test "${enable_no_padding+set}" = set; then
12053   enableval="$enable_no_padding"
12054   with_no_padding=$enableval
12055 else
12056   with_no_padding=$with_ext_funcs
12057 fi;
12058 echo "$as_me:12058: result: $with_no_padding" >&5
12059 echo "${ECHO_T}$with_no_padding" >&6
12060 test "x$with_no_padding" = xyes &&
12061 cat >>confdefs.h <<\EOF
12062 #define NCURSES_NO_PADDING 1
12063 EOF
12064
12065 echo "$as_me:12065: checking for ANSI C header files" >&5
12066 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12067 if test "${ac_cv_header_stdc+set}" = set; then
12068   echo $ECHO_N "(cached) $ECHO_C" >&6
12069 else
12070   cat >conftest.$ac_ext <<_ACEOF
12071 #line 12071 "configure"
12072 #include "confdefs.h"
12073 #include <stdlib.h>
12074 #include <stdarg.h>
12075 #include <string.h>
12076 #include <float.h>
12077
12078 _ACEOF
12079 if { (eval echo "$as_me:12079: \"$ac_cpp conftest.$ac_ext\"") >&5
12080   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12081   ac_status=$?
12082   egrep -v '^ *\+' conftest.er1 >conftest.err
12083   rm -f conftest.er1
12084   cat conftest.err >&5
12085   echo "$as_me:12085: \$? = $ac_status" >&5
12086   (exit $ac_status); } >/dev/null; then
12087   if test -s conftest.err; then
12088     ac_cpp_err=$ac_c_preproc_warn_flag
12089   else
12090     ac_cpp_err=
12091   fi
12092 else
12093   ac_cpp_err=yes
12094 fi
12095 if test -z "$ac_cpp_err"; then
12096   ac_cv_header_stdc=yes
12097 else
12098   echo "$as_me: failed program was:" >&5
12099   cat conftest.$ac_ext >&5
12100   ac_cv_header_stdc=no
12101 fi
12102 rm -f conftest.err conftest.$ac_ext
12103
12104 if test $ac_cv_header_stdc = yes; then
12105   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12106   cat >conftest.$ac_ext <<_ACEOF
12107 #line 12107 "configure"
12108 #include "confdefs.h"
12109 #include <string.h>
12110
12111 _ACEOF
12112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12113   egrep "memchr" >/dev/null 2>&1; then
12114   :
12115 else
12116   ac_cv_header_stdc=no
12117 fi
12118 rm -rf conftest*
12119
12120 fi
12121
12122 if test $ac_cv_header_stdc = yes; then
12123   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12124   cat >conftest.$ac_ext <<_ACEOF
12125 #line 12125 "configure"
12126 #include "confdefs.h"
12127 #include <stdlib.h>
12128
12129 _ACEOF
12130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12131   egrep "free" >/dev/null 2>&1; then
12132   :
12133 else
12134   ac_cv_header_stdc=no
12135 fi
12136 rm -rf conftest*
12137
12138 fi
12139
12140 if test $ac_cv_header_stdc = yes; then
12141   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12142   if test "$cross_compiling" = yes; then
12143   :
12144 else
12145   cat >conftest.$ac_ext <<_ACEOF
12146 #line 12146 "configure"
12147 #include "confdefs.h"
12148 #include <ctype.h>
12149 #if ((' ' & 0x0FF) == 0x020)
12150 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12151 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12152 #else
12153 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12154                      || ('j' <= (c) && (c) <= 'r') \
12155                      || ('s' <= (c) && (c) <= 'z'))
12156 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12157 #endif
12158
12159 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12160 int
12161 main ()
12162 {
12163   int i;
12164   for (i = 0; i < 256; i++)
12165     if (XOR (islower (i), ISLOWER (i))
12166         || toupper (i) != TOUPPER (i))
12167       $ac_main_return(2);
12168   $ac_main_return (0);
12169 }
12170 _ACEOF
12171 rm -f conftest$ac_exeext
12172 if { (eval echo "$as_me:12172: \"$ac_link\"") >&5
12173   (eval $ac_link) 2>&5
12174   ac_status=$?
12175   echo "$as_me:12175: \$? = $ac_status" >&5
12176   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12177   { (eval echo "$as_me:12177: \"$ac_try\"") >&5
12178   (eval $ac_try) 2>&5
12179   ac_status=$?
12180   echo "$as_me:12180: \$? = $ac_status" >&5
12181   (exit $ac_status); }; }; then
12182   :
12183 else
12184   echo "$as_me: program exited with status $ac_status" >&5
12185 echo "$as_me: failed program was:" >&5
12186 cat conftest.$ac_ext >&5
12187 ac_cv_header_stdc=no
12188 fi
12189 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12190 fi
12191 fi
12192 fi
12193 echo "$as_me:12193: result: $ac_cv_header_stdc" >&5
12194 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12195 if test $ac_cv_header_stdc = yes; then
12196
12197 cat >>confdefs.h <<\EOF
12198 #define STDC_HEADERS 1
12199 EOF
12200
12201 fi
12202
12203 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12204
12205 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12206                   inttypes.h stdint.h unistd.h
12207 do
12208 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12209 echo "$as_me:12209: checking for $ac_header" >&5
12210 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12211 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12212   echo $ECHO_N "(cached) $ECHO_C" >&6
12213 else
12214   cat >conftest.$ac_ext <<_ACEOF
12215 #line 12215 "configure"
12216 #include "confdefs.h"
12217 $ac_includes_default
12218 #include <$ac_header>
12219 _ACEOF
12220 rm -f conftest.$ac_objext
12221 if { (eval echo "$as_me:12221: \"$ac_compile\"") >&5
12222   (eval $ac_compile) 2>&5
12223   ac_status=$?
12224   echo "$as_me:12224: \$? = $ac_status" >&5
12225   (exit $ac_status); } &&
12226          { ac_try='test -s conftest.$ac_objext'
12227   { (eval echo "$as_me:12227: \"$ac_try\"") >&5
12228   (eval $ac_try) 2>&5
12229   ac_status=$?
12230   echo "$as_me:12230: \$? = $ac_status" >&5
12231   (exit $ac_status); }; }; then
12232   eval "$as_ac_Header=yes"
12233 else
12234   echo "$as_me: failed program was:" >&5
12235 cat conftest.$ac_ext >&5
12236 eval "$as_ac_Header=no"
12237 fi
12238 rm -f conftest.$ac_objext conftest.$ac_ext
12239 fi
12240 echo "$as_me:12240: result: `eval echo '${'$as_ac_Header'}'`" >&5
12241 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12242 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12243   cat >>confdefs.h <<EOF
12244 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12245 EOF
12246
12247 fi
12248 done
12249
12250 echo "$as_me:12250: checking for signed char" >&5
12251 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12252 if test "${ac_cv_type_signed_char+set}" = set; then
12253   echo $ECHO_N "(cached) $ECHO_C" >&6
12254 else
12255   cat >conftest.$ac_ext <<_ACEOF
12256 #line 12256 "configure"
12257 #include "confdefs.h"
12258 $ac_includes_default
12259 int
12260 main ()
12261 {
12262 if ((signed char *) 0)
12263   return 0;
12264 if (sizeof (signed char))
12265   return 0;
12266   ;
12267   return 0;
12268 }
12269 _ACEOF
12270 rm -f conftest.$ac_objext
12271 if { (eval echo "$as_me:12271: \"$ac_compile\"") >&5
12272   (eval $ac_compile) 2>&5
12273   ac_status=$?
12274   echo "$as_me:12274: \$? = $ac_status" >&5
12275   (exit $ac_status); } &&
12276          { ac_try='test -s conftest.$ac_objext'
12277   { (eval echo "$as_me:12277: \"$ac_try\"") >&5
12278   (eval $ac_try) 2>&5
12279   ac_status=$?
12280   echo "$as_me:12280: \$? = $ac_status" >&5
12281   (exit $ac_status); }; }; then
12282   ac_cv_type_signed_char=yes
12283 else
12284   echo "$as_me: failed program was:" >&5
12285 cat conftest.$ac_ext >&5
12286 ac_cv_type_signed_char=no
12287 fi
12288 rm -f conftest.$ac_objext conftest.$ac_ext
12289 fi
12290 echo "$as_me:12290: result: $ac_cv_type_signed_char" >&5
12291 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12292
12293 echo "$as_me:12293: checking size of signed char" >&5
12294 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12295 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12296   echo $ECHO_N "(cached) $ECHO_C" >&6
12297 else
12298   if test "$ac_cv_type_signed_char" = yes; then
12299   if test "$cross_compiling" = yes; then
12300   # Depending upon the size, compute the lo and hi bounds.
12301 cat >conftest.$ac_ext <<_ACEOF
12302 #line 12302 "configure"
12303 #include "confdefs.h"
12304 $ac_includes_default
12305 int
12306 main ()
12307 {
12308 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12309   ;
12310   return 0;
12311 }
12312 _ACEOF
12313 rm -f conftest.$ac_objext
12314 if { (eval echo "$as_me:12314: \"$ac_compile\"") >&5
12315   (eval $ac_compile) 2>&5
12316   ac_status=$?
12317   echo "$as_me:12317: \$? = $ac_status" >&5
12318   (exit $ac_status); } &&
12319          { ac_try='test -s conftest.$ac_objext'
12320   { (eval echo "$as_me:12320: \"$ac_try\"") >&5
12321   (eval $ac_try) 2>&5
12322   ac_status=$?
12323   echo "$as_me:12323: \$? = $ac_status" >&5
12324   (exit $ac_status); }; }; then
12325   ac_lo=0 ac_mid=0
12326   while :; do
12327     cat >conftest.$ac_ext <<_ACEOF
12328 #line 12328 "configure"
12329 #include "confdefs.h"
12330 $ac_includes_default
12331 int
12332 main ()
12333 {
12334 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12335   ;
12336   return 0;
12337 }
12338 _ACEOF
12339 rm -f conftest.$ac_objext
12340 if { (eval echo "$as_me:12340: \"$ac_compile\"") >&5
12341   (eval $ac_compile) 2>&5
12342   ac_status=$?
12343   echo "$as_me:12343: \$? = $ac_status" >&5
12344   (exit $ac_status); } &&
12345          { ac_try='test -s conftest.$ac_objext'
12346   { (eval echo "$as_me:12346: \"$ac_try\"") >&5
12347   (eval $ac_try) 2>&5
12348   ac_status=$?
12349   echo "$as_me:12349: \$? = $ac_status" >&5
12350   (exit $ac_status); }; }; then
12351   ac_hi=$ac_mid; break
12352 else
12353   echo "$as_me: failed program was:" >&5
12354 cat conftest.$ac_ext >&5
12355 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12356 fi
12357 rm -f conftest.$ac_objext conftest.$ac_ext
12358   done
12359 else
12360   echo "$as_me: failed program was:" >&5
12361 cat conftest.$ac_ext >&5
12362 ac_hi=-1 ac_mid=-1
12363   while :; do
12364     cat >conftest.$ac_ext <<_ACEOF
12365 #line 12365 "configure"
12366 #include "confdefs.h"
12367 $ac_includes_default
12368 int
12369 main ()
12370 {
12371 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12372   ;
12373   return 0;
12374 }
12375 _ACEOF
12376 rm -f conftest.$ac_objext
12377 if { (eval echo "$as_me:12377: \"$ac_compile\"") >&5
12378   (eval $ac_compile) 2>&5
12379   ac_status=$?
12380   echo "$as_me:12380: \$? = $ac_status" >&5
12381   (exit $ac_status); } &&
12382          { ac_try='test -s conftest.$ac_objext'
12383   { (eval echo "$as_me:12383: \"$ac_try\"") >&5
12384   (eval $ac_try) 2>&5
12385   ac_status=$?
12386   echo "$as_me:12386: \$? = $ac_status" >&5
12387   (exit $ac_status); }; }; then
12388   ac_lo=$ac_mid; break
12389 else
12390   echo "$as_me: failed program was:" >&5
12391 cat conftest.$ac_ext >&5
12392 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12393 fi
12394 rm -f conftest.$ac_objext conftest.$ac_ext
12395   done
12396 fi
12397 rm -f conftest.$ac_objext conftest.$ac_ext
12398 # Binary search between lo and hi bounds.
12399 while test "x$ac_lo" != "x$ac_hi"; do
12400   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12401   cat >conftest.$ac_ext <<_ACEOF
12402 #line 12402 "configure"
12403 #include "confdefs.h"
12404 $ac_includes_default
12405 int
12406 main ()
12407 {
12408 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12409   ;
12410   return 0;
12411 }
12412 _ACEOF
12413 rm -f conftest.$ac_objext
12414 if { (eval echo "$as_me:12414: \"$ac_compile\"") >&5
12415   (eval $ac_compile) 2>&5
12416   ac_status=$?
12417   echo "$as_me:12417: \$? = $ac_status" >&5
12418   (exit $ac_status); } &&
12419          { ac_try='test -s conftest.$ac_objext'
12420   { (eval echo "$as_me:12420: \"$ac_try\"") >&5
12421   (eval $ac_try) 2>&5
12422   ac_status=$?
12423   echo "$as_me:12423: \$? = $ac_status" >&5
12424   (exit $ac_status); }; }; then
12425   ac_hi=$ac_mid
12426 else
12427   echo "$as_me: failed program was:" >&5
12428 cat conftest.$ac_ext >&5
12429 ac_lo=`expr $ac_mid + 1`
12430 fi
12431 rm -f conftest.$ac_objext conftest.$ac_ext
12432 done
12433 ac_cv_sizeof_signed_char=$ac_lo
12434 else
12435   if test "$cross_compiling" = yes; then
12436   { { echo "$as_me:12436: error: cannot run test program while cross compiling" >&5
12437 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12438    { (exit 1); exit 1; }; }
12439 else
12440   cat >conftest.$ac_ext <<_ACEOF
12441 #line 12441 "configure"
12442 #include "confdefs.h"
12443 $ac_includes_default
12444 int
12445 main ()
12446 {
12447 FILE *f = fopen ("conftest.val", "w");
12448 if (!f)
12449   $ac_main_return (1);
12450 fprintf (f, "%d", (sizeof (signed char)));
12451 fclose (f);
12452   ;
12453   return 0;
12454 }
12455 _ACEOF
12456 rm -f conftest$ac_exeext
12457 if { (eval echo "$as_me:12457: \"$ac_link\"") >&5
12458   (eval $ac_link) 2>&5
12459   ac_status=$?
12460   echo "$as_me:12460: \$? = $ac_status" >&5
12461   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12462   { (eval echo "$as_me:12462: \"$ac_try\"") >&5
12463   (eval $ac_try) 2>&5
12464   ac_status=$?
12465   echo "$as_me:12465: \$? = $ac_status" >&5
12466   (exit $ac_status); }; }; then
12467   ac_cv_sizeof_signed_char=`cat conftest.val`
12468 else
12469   echo "$as_me: program exited with status $ac_status" >&5
12470 echo "$as_me: failed program was:" >&5
12471 cat conftest.$ac_ext >&5
12472 fi
12473 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12474 fi
12475 fi
12476 rm -f conftest.val
12477 else
12478   ac_cv_sizeof_signed_char=0
12479 fi
12480 fi
12481 echo "$as_me:12481: result: $ac_cv_sizeof_signed_char" >&5
12482 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12483 cat >>confdefs.h <<EOF
12484 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12485 EOF
12486
12487 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12488         NCURSES_SBOOL="signed char"
12489 else
12490         NCURSES_SBOOL="char"
12491 fi
12492 echo "$as_me:12492: checking if you want to use signed Boolean array in term.h" >&5
12493 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12494
12495 # Check whether --enable-signed-char or --disable-signed-char was given.
12496 if test "${enable_signed_char+set}" = set; then
12497   enableval="$enable_signed_char"
12498   with_signed_char=$enableval
12499 else
12500   with_signed_char=no
12501 fi;
12502 echo "$as_me:12502: result: $with_signed_char" >&5
12503 echo "${ECHO_T}$with_signed_char" >&6
12504 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12505
12506 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12507 echo "$as_me:12507: checking if you want SIGWINCH handler" >&5
12508 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12509
12510 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12511 if test "${enable_sigwinch+set}" = set; then
12512   enableval="$enable_sigwinch"
12513   with_sigwinch=$enableval
12514 else
12515   with_sigwinch=$with_ext_funcs
12516 fi;
12517 echo "$as_me:12517: result: $with_sigwinch" >&5
12518 echo "${ECHO_T}$with_sigwinch" >&6
12519 test "x$with_sigwinch" = xyes &&
12520 cat >>confdefs.h <<\EOF
12521 #define USE_SIGWINCH 1
12522 EOF
12523
12524 ###   use option --enable-tcap-names to allow user to define new capabilities
12525 echo "$as_me:12525: checking if you want user-definable terminal capabilities like termcap" >&5
12526 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12527
12528 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12529 if test "${enable_tcap_names+set}" = set; then
12530   enableval="$enable_tcap_names"
12531   with_tcap_names=$enableval
12532 else
12533   with_tcap_names=$with_ext_funcs
12534 fi;
12535 echo "$as_me:12535: result: $with_tcap_names" >&5
12536 echo "${ECHO_T}$with_tcap_names" >&6
12537 NCURSES_XNAMES=0
12538 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12539
12540 ###############################################################################
12541 # These options are relatively safe to experiment with.
12542
12543 echo "$as_me:12543: checking if you want all development code" >&5
12544 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12545
12546 # Check whether --with-develop or --without-develop was given.
12547 if test "${with_develop+set}" = set; then
12548   withval="$with_develop"
12549   with_develop=$withval
12550 else
12551   with_develop=no
12552 fi;
12553 echo "$as_me:12553: result: $with_develop" >&5
12554 echo "${ECHO_T}$with_develop" >&6
12555
12556 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12557 echo "$as_me:12557: checking if you want hard-tabs code" >&5
12558 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12559
12560 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12561 if test "${enable_hard_tabs+set}" = set; then
12562   enableval="$enable_hard_tabs"
12563
12564 else
12565   enable_hard_tabs=$with_develop
12566 fi;
12567 echo "$as_me:12567: result: $enable_hard_tabs" >&5
12568 echo "${ECHO_T}$enable_hard_tabs" >&6
12569 test "x$enable_hard_tabs" = xyes &&
12570 cat >>confdefs.h <<\EOF
12571 #define USE_HARD_TABS 1
12572 EOF
12573
12574 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12575 echo "$as_me:12575: checking if you want limited support for xmc" >&5
12576 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12577
12578 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12579 if test "${enable_xmc_glitch+set}" = set; then
12580   enableval="$enable_xmc_glitch"
12581
12582 else
12583   enable_xmc_glitch=$with_develop
12584 fi;
12585 echo "$as_me:12585: result: $enable_xmc_glitch" >&5
12586 echo "${ECHO_T}$enable_xmc_glitch" >&6
12587 test "x$enable_xmc_glitch" = xyes &&
12588 cat >>confdefs.h <<\EOF
12589 #define USE_XMC_SUPPORT 1
12590 EOF
12591
12592 ###############################################################################
12593 # These are just experimental, probably should not be in a package:
12594
12595 echo "$as_me:12595: checking if you do not want to assume colors are white-on-black" >&5
12596 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12597
12598 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12599 if test "${enable_assumed_color+set}" = set; then
12600   enableval="$enable_assumed_color"
12601   with_assumed_color=$enableval
12602 else
12603   with_assumed_color=yes
12604 fi;
12605 echo "$as_me:12605: result: $with_assumed_color" >&5
12606 echo "${ECHO_T}$with_assumed_color" >&6
12607 test "x$with_assumed_color" = xyes &&
12608 cat >>confdefs.h <<\EOF
12609 #define USE_ASSUMED_COLOR 1
12610 EOF
12611
12612 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12613 echo "$as_me:12613: checking if you want hashmap scrolling-optimization code" >&5
12614 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12615
12616 # Check whether --enable-hashmap or --disable-hashmap was given.
12617 if test "${enable_hashmap+set}" = set; then
12618   enableval="$enable_hashmap"
12619   with_hashmap=$enableval
12620 else
12621   with_hashmap=yes
12622 fi;
12623 echo "$as_me:12623: result: $with_hashmap" >&5
12624 echo "${ECHO_T}$with_hashmap" >&6
12625 test "x$with_hashmap" = xyes &&
12626 cat >>confdefs.h <<\EOF
12627 #define USE_HASHMAP 1
12628 EOF
12629
12630 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12631 echo "$as_me:12631: checking if you want colorfgbg code" >&5
12632 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12633
12634 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12635 if test "${enable_colorfgbg+set}" = set; then
12636   enableval="$enable_colorfgbg"
12637   with_colorfgbg=$enableval
12638 else
12639   with_colorfgbg=no
12640 fi;
12641 echo "$as_me:12641: result: $with_colorfgbg" >&5
12642 echo "${ECHO_T}$with_colorfgbg" >&6
12643 test "x$with_colorfgbg" = xyes &&
12644 cat >>confdefs.h <<\EOF
12645 #define USE_COLORFGBG 1
12646 EOF
12647
12648 ###   use option --enable-interop to turn on use of bindings used for interop
12649 echo "$as_me:12649: checking if you want interop bindings" >&5
12650 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12651
12652 # Check whether --enable-interop or --disable-interop was given.
12653 if test "${enable_interop+set}" = set; then
12654   enableval="$enable_interop"
12655   with_exp_interop=$enableval
12656 else
12657   with_exp_interop=$cf_dft_interop
12658 fi;
12659 echo "$as_me:12659: result: $with_exp_interop" >&5
12660 echo "${ECHO_T}$with_exp_interop" >&6
12661
12662 NCURSES_INTEROP_FUNCS=0
12663 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12664
12665 # This is still experimental (20080329), but should ultimately be moved to
12666 # the script-block --with-normal, etc.
12667
12668 echo "$as_me:12668: checking if you want to link with the pthread library" >&5
12669 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12670
12671 # Check whether --with-pthread or --without-pthread was given.
12672 if test "${with_pthread+set}" = set; then
12673   withval="$with_pthread"
12674   with_pthread=$withval
12675 else
12676   with_pthread=no
12677 fi;
12678 echo "$as_me:12678: result: $with_pthread" >&5
12679 echo "${ECHO_T}$with_pthread" >&6
12680
12681 if test "$with_pthread" != no ; then
12682         echo "$as_me:12682: checking for pthread.h" >&5
12683 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12684 if test "${ac_cv_header_pthread_h+set}" = set; then
12685   echo $ECHO_N "(cached) $ECHO_C" >&6
12686 else
12687   cat >conftest.$ac_ext <<_ACEOF
12688 #line 12688 "configure"
12689 #include "confdefs.h"
12690 #include <pthread.h>
12691 _ACEOF
12692 if { (eval echo "$as_me:12692: \"$ac_cpp conftest.$ac_ext\"") >&5
12693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12694   ac_status=$?
12695   egrep -v '^ *\+' conftest.er1 >conftest.err
12696   rm -f conftest.er1
12697   cat conftest.err >&5
12698   echo "$as_me:12698: \$? = $ac_status" >&5
12699   (exit $ac_status); } >/dev/null; then
12700   if test -s conftest.err; then
12701     ac_cpp_err=$ac_c_preproc_warn_flag
12702   else
12703     ac_cpp_err=
12704   fi
12705 else
12706   ac_cpp_err=yes
12707 fi
12708 if test -z "$ac_cpp_err"; then
12709   ac_cv_header_pthread_h=yes
12710 else
12711   echo "$as_me: failed program was:" >&5
12712   cat conftest.$ac_ext >&5
12713   ac_cv_header_pthread_h=no
12714 fi
12715 rm -f conftest.err conftest.$ac_ext
12716 fi
12717 echo "$as_me:12717: result: $ac_cv_header_pthread_h" >&5
12718 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12719 if test $ac_cv_header_pthread_h = yes; then
12720
12721 cat >>confdefs.h <<\EOF
12722 #define HAVE_PTHREADS_H 1
12723 EOF
12724
12725         for cf_lib_pthread in pthread c_r
12726         do
12727             echo "$as_me:12727: checking if we can link with the $cf_lib_pthread library" >&5
12728 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12729             cf_save_LIBS="$LIBS"
12730
12731 cf_add_libs="-l$cf_lib_pthread"
12732 # Filter out duplicates - this happens with badly-designed ".pc" files...
12733 for cf_add_1lib in $LIBS
12734 do
12735         for cf_add_2lib in $cf_add_libs
12736         do
12737                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12738                 then
12739                         cf_add_1lib=
12740                         break
12741                 fi
12742         done
12743         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12744 done
12745 LIBS="$cf_add_libs"
12746
12747             cat >conftest.$ac_ext <<_ACEOF
12748 #line 12748 "configure"
12749 #include "confdefs.h"
12750
12751 #include <pthread.h>
12752
12753 int
12754 main ()
12755 {
12756
12757                 int rc = pthread_create(0,0,0,0);
12758                 int r2 = pthread_mutexattr_settype(0, 0);
12759
12760   ;
12761   return 0;
12762 }
12763 _ACEOF
12764 rm -f conftest.$ac_objext conftest$ac_exeext
12765 if { (eval echo "$as_me:12765: \"$ac_link\"") >&5
12766   (eval $ac_link) 2>&5
12767   ac_status=$?
12768   echo "$as_me:12768: \$? = $ac_status" >&5
12769   (exit $ac_status); } &&
12770          { ac_try='test -s conftest$ac_exeext'
12771   { (eval echo "$as_me:12771: \"$ac_try\"") >&5
12772   (eval $ac_try) 2>&5
12773   ac_status=$?
12774   echo "$as_me:12774: \$? = $ac_status" >&5
12775   (exit $ac_status); }; }; then
12776   with_pthread=yes
12777 else
12778   echo "$as_me: failed program was:" >&5
12779 cat conftest.$ac_ext >&5
12780 with_pthread=no
12781 fi
12782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12783             LIBS="$cf_save_LIBS"
12784             echo "$as_me:12784: result: $with_pthread" >&5
12785 echo "${ECHO_T}$with_pthread" >&6
12786             test "$with_pthread" = yes && break
12787         done
12788
12789         if test "$with_pthread" = yes ; then
12790
12791 cf_add_libs="-l$cf_lib_pthread"
12792 # Filter out duplicates - this happens with badly-designed ".pc" files...
12793 for cf_add_1lib in $LIBS
12794 do
12795         for cf_add_2lib in $cf_add_libs
12796         do
12797                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12798                 then
12799                         cf_add_1lib=
12800                         break
12801                 fi
12802         done
12803         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12804 done
12805 LIBS="$cf_add_libs"
12806
12807 cat >>confdefs.h <<\EOF
12808 #define HAVE_LIBPTHREADS 1
12809 EOF
12810
12811         else
12812             { { echo "$as_me:12812: error: Cannot link with pthread library" >&5
12813 echo "$as_me: error: Cannot link with pthread library" >&2;}
12814    { (exit 1); exit 1; }; }
12815         fi
12816
12817 fi
12818
12819 fi
12820
12821 if test "x$with_pthread" != xno; then
12822         echo "$as_me:12822: checking for pthread_kill" >&5
12823 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12824 if test "${ac_cv_func_pthread_kill+set}" = set; then
12825   echo $ECHO_N "(cached) $ECHO_C" >&6
12826 else
12827   cat >conftest.$ac_ext <<_ACEOF
12828 #line 12828 "configure"
12829 #include "confdefs.h"
12830 /* System header to define __stub macros and hopefully few prototypes,
12831     which can conflict with char pthread_kill (); below.  */
12832 #include <assert.h>
12833 /* Override any gcc2 internal prototype to avoid an error.  */
12834 #ifdef __cplusplus
12835 extern "C"
12836 #endif
12837 /* We use char because int might match the return type of a gcc2
12838    builtin and then its argument prototype would still apply.  */
12839 char pthread_kill ();
12840 char (*f) ();
12841
12842 int
12843 main ()
12844 {
12845 /* The GNU C library defines this for functions which it implements
12846     to always fail with ENOSYS.  Some functions are actually named
12847     something starting with __ and the normal name is an alias.  */
12848 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12849 choke me
12850 #else
12851 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12852 #endif
12853
12854   ;
12855   return 0;
12856 }
12857 _ACEOF
12858 rm -f conftest.$ac_objext conftest$ac_exeext
12859 if { (eval echo "$as_me:12859: \"$ac_link\"") >&5
12860   (eval $ac_link) 2>&5
12861   ac_status=$?
12862   echo "$as_me:12862: \$? = $ac_status" >&5
12863   (exit $ac_status); } &&
12864          { ac_try='test -s conftest$ac_exeext'
12865   { (eval echo "$as_me:12865: \"$ac_try\"") >&5
12866   (eval $ac_try) 2>&5
12867   ac_status=$?
12868   echo "$as_me:12868: \$? = $ac_status" >&5
12869   (exit $ac_status); }; }; then
12870   ac_cv_func_pthread_kill=yes
12871 else
12872   echo "$as_me: failed program was:" >&5
12873 cat conftest.$ac_ext >&5
12874 ac_cv_func_pthread_kill=no
12875 fi
12876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12877 fi
12878 echo "$as_me:12878: result: $ac_cv_func_pthread_kill" >&5
12879 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12880 if test $ac_cv_func_pthread_kill = yes; then
12881
12882                 echo "$as_me:12882: checking if you want to allow EINTR in wgetch with pthreads" >&5
12883 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12884
12885 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12886 if test "${enable_pthreads_eintr+set}" = set; then
12887   enableval="$enable_pthreads_eintr"
12888   use_pthreads_eintr=$enableval
12889 else
12890   use_pthreads_eintr=no
12891 fi;
12892                 echo "$as_me:12892: result: $use_pthreads_eintr" >&5
12893 echo "${ECHO_T}$use_pthreads_eintr" >&6
12894                 if test "x$use_pthreads_eintr" = xyes ; then
12895
12896 cat >>confdefs.h <<\EOF
12897 #define USE_PTHREADS_EINTR 1
12898 EOF
12899
12900                 fi
12901 fi
12902
12903         echo "$as_me:12903: checking if you want to use weak-symbols for pthreads" >&5
12904 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12905
12906 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12907 if test "${enable_weak_symbols+set}" = set; then
12908   enableval="$enable_weak_symbols"
12909   use_weak_symbols=$enableval
12910 else
12911   use_weak_symbols=no
12912 fi;
12913         echo "$as_me:12913: result: $use_weak_symbols" >&5
12914 echo "${ECHO_T}$use_weak_symbols" >&6
12915         if test "x$use_weak_symbols" = xyes ; then
12916
12917 echo "$as_me:12917: checking if $CC supports weak symbols" >&5
12918 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12919 if test "${cf_cv_weak_symbols+set}" = set; then
12920   echo $ECHO_N "(cached) $ECHO_C" >&6
12921 else
12922
12923 cat >conftest.$ac_ext <<_ACEOF
12924 #line 12924 "configure"
12925 #include "confdefs.h"
12926
12927 #include <stdio.h>
12928 int
12929 main ()
12930 {
12931
12932 #if defined(__GNUC__)
12933 #  if defined __USE_ISOC99
12934 #    define _cat_pragma(exp)    _Pragma(#exp)
12935 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12936 #  else
12937 #    define _weak_pragma(exp)
12938 #  endif
12939 #  define _declare(name)        __extension__ extern __typeof__(name) name
12940 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12941 #endif
12942
12943 weak_symbol(fopen);
12944
12945   ;
12946   return 0;
12947 }
12948 _ACEOF
12949 rm -f conftest.$ac_objext
12950 if { (eval echo "$as_me:12950: \"$ac_compile\"") >&5
12951   (eval $ac_compile) 2>&5
12952   ac_status=$?
12953   echo "$as_me:12953: \$? = $ac_status" >&5
12954   (exit $ac_status); } &&
12955          { ac_try='test -s conftest.$ac_objext'
12956   { (eval echo "$as_me:12956: \"$ac_try\"") >&5
12957   (eval $ac_try) 2>&5
12958   ac_status=$?
12959   echo "$as_me:12959: \$? = $ac_status" >&5
12960   (exit $ac_status); }; }; then
12961   cf_cv_weak_symbols=yes
12962 else
12963   echo "$as_me: failed program was:" >&5
12964 cat conftest.$ac_ext >&5
12965 cf_cv_weak_symbols=no
12966 fi
12967 rm -f conftest.$ac_objext conftest.$ac_ext
12968
12969 fi
12970 echo "$as_me:12970: result: $cf_cv_weak_symbols" >&5
12971 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12972
12973         else
12974                 cf_cv_weak_symbols=no
12975         fi
12976
12977         if test "x$cf_cv_weak_symbols" = xyes ; then
12978
12979 cat >>confdefs.h <<\EOF
12980 #define USE_WEAK_SYMBOLS 1
12981 EOF
12982
12983         fi
12984 fi
12985
12986 PTHREAD=
12987 if test "x$with_pthread" = "xyes" ; then
12988
12989 cat >>confdefs.h <<\EOF
12990 #define USE_PTHREADS 1
12991 EOF
12992
12993         enable_reentrant=yes
12994         if test "x$cf_cv_weak_symbols" = xyes ; then
12995                 PTHREAD=-lpthread
12996         fi
12997 fi
12998
12999 # Reentrant code has to be opaque; there's little advantage to making ncurses
13000 # opaque outside of that, so there is no --enable-opaque option.  We can use
13001 # this option without --with-pthreads, but this will be always set for
13002 # pthreads.
13003 echo "$as_me:13003: checking if you want reentrant code" >&5
13004 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13005
13006 # Check whether --enable-reentrant or --disable-reentrant was given.
13007 if test "${enable_reentrant+set}" = set; then
13008   enableval="$enable_reentrant"
13009   with_reentrant=$enableval
13010 else
13011   with_reentrant=no
13012 fi;
13013 echo "$as_me:13013: result: $with_reentrant" >&5
13014 echo "${ECHO_T}$with_reentrant" >&6
13015 if test "x$with_reentrant" = xyes ; then
13016         cf_cv_enable_reentrant=1
13017         cf_cv_enable_opaque="NCURSES_INTERNALS"
13018         NCURSES_OPAQUE=1
13019         NCURSES_SIZE_T=int
13020         if test "x$cf_cv_weak_symbols" = xyes ; then
13021
13022 # remove pthread library from $LIBS
13023 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13024
13025 cf_add_libs="-lpthread"
13026 # Filter out duplicates - this happens with badly-designed ".pc" files...
13027 for cf_add_1lib in $TEST_LIBS
13028 do
13029         for cf_add_2lib in $cf_add_libs
13030         do
13031                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13032                 then
13033                         cf_add_1lib=
13034                         break
13035                 fi
13036         done
13037         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13038 done
13039 TEST_LIBS="$cf_add_libs"
13040
13041 cf_add_libs="-lpthread"
13042 # Filter out duplicates - this happens with badly-designed ".pc" files...
13043 for cf_add_1lib in $TEST_LIBS2
13044 do
13045         for cf_add_2lib in $cf_add_libs
13046         do
13047                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13048                 then
13049                         cf_add_1lib=
13050                         break
13051                 fi
13052         done
13053         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13054 done
13055 TEST_LIBS2="$cf_add_libs"
13056
13057         else
13058                 # when not using weak symbols but with_reentrant,
13059                 # add 't' to the library suffix on all platforms
13060                 # except cygwin, where we only do that if ALSO
13061                 # compiling with full thread support.
13062                 case "$host" in
13063                 (*cygwin* | *msys*)
13064                         if test "$with_pthread" = "yes" ; then
13065                                 if test "x$disable_lib_suffixes" = "xno" ; then
13066                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13067                                 fi
13068                         fi ;;
13069                 (*)
13070                         if test "x$disable_lib_suffixes" = "xno" ; then
13071                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13072                         fi
13073                         ;;
13074                 esac
13075         fi
13076
13077 cat >>confdefs.h <<\EOF
13078 #define USE_REENTRANT 1
13079 EOF
13080
13081 if test "${with_abi_version+set}" != set; then
13082         case $cf_cv_rel_version in
13083         (5.*)
13084                 cf_cv_rel_version=6.0
13085                 cf_cv_abi_version=6
13086                 { echo "$as_me:13086: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13087 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13088                 ;;
13089         esac
13090 fi
13091
13092 else
13093         cf_cv_enable_reentrant=0
13094         cf_cv_enable_opaque="NCURSES_OPAQUE"
13095         NCURSES_OPAQUE=0
13096         NCURSES_SIZE_T=short
13097 fi
13098
13099 ### Allow using a different wrap-prefix
13100 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13101         echo "$as_me:13101: checking for prefix used to wrap public variables" >&5
13102 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13103
13104 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13105 if test "${with_wrap_prefix+set}" = set; then
13106   withval="$with_wrap_prefix"
13107   NCURSES_WRAP_PREFIX=$withval
13108 else
13109   NCURSES_WRAP_PREFIX=_nc_
13110 fi;
13111         echo "$as_me:13111: result: $NCURSES_WRAP_PREFIX" >&5
13112 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13113 else
13114         NCURSES_WRAP_PREFIX=_nc_
13115 fi
13116
13117 cat >>confdefs.h <<EOF
13118 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13119 EOF
13120
13121 echo "$as_me:13121: checking if you want experimental safe-sprintf code" >&5
13122 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13123
13124 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13125 if test "${enable_safe_sprintf+set}" = set; then
13126   enableval="$enable_safe_sprintf"
13127   with_safe_sprintf=$enableval
13128 else
13129   with_safe_sprintf=no
13130 fi;
13131 echo "$as_me:13131: result: $with_safe_sprintf" >&5
13132 echo "${ECHO_T}$with_safe_sprintf" >&6
13133 test "x$with_safe_sprintf" = xyes &&
13134 cat >>confdefs.h <<\EOF
13135 #define USE_SAFE_SPRINTF 1
13136 EOF
13137
13138 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13139 # when hashmap is used scroll hints are useless
13140 if test "$with_hashmap" = no ; then
13141 echo "$as_me:13141: checking if you want to experiment without scrolling-hints code" >&5
13142 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13143
13144 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13145 if test "${enable_scroll_hints+set}" = set; then
13146   enableval="$enable_scroll_hints"
13147   with_scroll_hints=$enableval
13148 else
13149   with_scroll_hints=yes
13150 fi;
13151 echo "$as_me:13151: result: $with_scroll_hints" >&5
13152 echo "${ECHO_T}$with_scroll_hints" >&6
13153 test "x$with_scroll_hints" = xyes &&
13154 cat >>confdefs.h <<\EOF
13155 #define USE_SCROLL_HINTS 1
13156 EOF
13157
13158 fi
13159
13160 echo "$as_me:13160: checking if you want wgetch-events code" >&5
13161 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13162
13163 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13164 if test "${enable_wgetch_events+set}" = set; then
13165   enableval="$enable_wgetch_events"
13166   with_wgetch_events=$enableval
13167 else
13168   with_wgetch_events=no
13169 fi;
13170 echo "$as_me:13170: result: $with_wgetch_events" >&5
13171 echo "${ECHO_T}$with_wgetch_events" >&6
13172 test "x$with_wgetch_events" = xyes &&
13173 cat >>confdefs.h <<\EOF
13174 #define NCURSES_WGETCH_EVENTS 1
13175 EOF
13176
13177 ###############################################################################
13178
13179 ###     use option --disable-echo to suppress full display compiling commands
13180
13181 echo "$as_me:13181: checking if you want to see long compiling messages" >&5
13182 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13183
13184 # Check whether --enable-echo or --disable-echo was given.
13185 if test "${enable_echo+set}" = set; then
13186   enableval="$enable_echo"
13187   test "$enableval" != no && enableval=yes
13188         if test "$enableval" != "yes" ; then
13189
13190         ECHO_LT='--silent'
13191         ECHO_LD='@echo linking $@;'
13192         RULE_CC='@echo compiling $<'
13193         SHOW_CC='@echo compiling $@'
13194         ECHO_CC='@'
13195
13196         else
13197
13198         ECHO_LT=''
13199         ECHO_LD=''
13200         RULE_CC=''
13201         SHOW_CC=''
13202         ECHO_CC=''
13203
13204         fi
13205 else
13206   enableval=yes
13207
13208         ECHO_LT=''
13209         ECHO_LD=''
13210         RULE_CC=''
13211         SHOW_CC=''
13212         ECHO_CC=''
13213
13214 fi;
13215 echo "$as_me:13215: result: $enableval" >&5
13216 echo "${ECHO_T}$enableval" >&6
13217
13218 if test "x$enable_echo" = xyes; then
13219         ECHO_LINK=
13220 else
13221         ECHO_LINK='@ echo linking $@ ... ;'
13222         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13223         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13224 fi
13225
13226 ###     use option --enable-warnings to turn on all gcc warnings
13227 echo "$as_me:13227: checking if you want to see compiler warnings" >&5
13228 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13229
13230 # Check whether --enable-warnings or --disable-warnings was given.
13231 if test "${enable_warnings+set}" = set; then
13232   enableval="$enable_warnings"
13233   with_warnings=$enableval
13234 fi;
13235 echo "$as_me:13235: result: $with_warnings" >&5
13236 echo "${ECHO_T}$with_warnings" >&6
13237
13238 if test "x$with_warnings" = "xyes"; then
13239
13240         ADAFLAGS="$ADAFLAGS -gnatg"
13241
13242 INTEL_COMPILER=no
13243
13244 if test "$GCC" = yes ; then
13245         case $host_os in
13246         (linux*|gnu*)
13247                 echo "$as_me:13247: checking if this is really Intel C compiler" >&5
13248 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13249                 cf_save_CFLAGS="$CFLAGS"
13250                 CFLAGS="$CFLAGS -no-gcc"
13251                 cat >conftest.$ac_ext <<_ACEOF
13252 #line 13252 "configure"
13253 #include "confdefs.h"
13254
13255 int
13256 main ()
13257 {
13258
13259 #ifdef __INTEL_COMPILER
13260 #else
13261 make an error
13262 #endif
13263
13264   ;
13265   return 0;
13266 }
13267 _ACEOF
13268 rm -f conftest.$ac_objext
13269 if { (eval echo "$as_me:13269: \"$ac_compile\"") >&5
13270   (eval $ac_compile) 2>&5
13271   ac_status=$?
13272   echo "$as_me:13272: \$? = $ac_status" >&5
13273   (exit $ac_status); } &&
13274          { ac_try='test -s conftest.$ac_objext'
13275   { (eval echo "$as_me:13275: \"$ac_try\"") >&5
13276   (eval $ac_try) 2>&5
13277   ac_status=$?
13278   echo "$as_me:13278: \$? = $ac_status" >&5
13279   (exit $ac_status); }; }; then
13280   INTEL_COMPILER=yes
13281 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13282
13283 else
13284   echo "$as_me: failed program was:" >&5
13285 cat conftest.$ac_ext >&5
13286 fi
13287 rm -f conftest.$ac_objext conftest.$ac_ext
13288                 CFLAGS="$cf_save_CFLAGS"
13289                 echo "$as_me:13289: result: $INTEL_COMPILER" >&5
13290 echo "${ECHO_T}$INTEL_COMPILER" >&6
13291                 ;;
13292         esac
13293 fi
13294
13295 CLANG_COMPILER=no
13296
13297 if test "$GCC" = yes ; then
13298         echo "$as_me:13298: checking if this is really Clang C compiler" >&5
13299 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13300         cf_save_CFLAGS="$CFLAGS"
13301         CFLAGS="$CFLAGS -Qunused-arguments"
13302         cat >conftest.$ac_ext <<_ACEOF
13303 #line 13303 "configure"
13304 #include "confdefs.h"
13305
13306 int
13307 main ()
13308 {
13309
13310 #ifdef __clang__
13311 #else
13312 make an error
13313 #endif
13314
13315   ;
13316   return 0;
13317 }
13318 _ACEOF
13319 rm -f conftest.$ac_objext
13320 if { (eval echo "$as_me:13320: \"$ac_compile\"") >&5
13321   (eval $ac_compile) 2>&5
13322   ac_status=$?
13323   echo "$as_me:13323: \$? = $ac_status" >&5
13324   (exit $ac_status); } &&
13325          { ac_try='test -s conftest.$ac_objext'
13326   { (eval echo "$as_me:13326: \"$ac_try\"") >&5
13327   (eval $ac_try) 2>&5
13328   ac_status=$?
13329   echo "$as_me:13329: \$? = $ac_status" >&5
13330   (exit $ac_status); }; }; then
13331   CLANG_COMPILER=yes
13332 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13333
13334 else
13335   echo "$as_me: failed program was:" >&5
13336 cat conftest.$ac_ext >&5
13337 fi
13338 rm -f conftest.$ac_objext conftest.$ac_ext
13339         CFLAGS="$cf_save_CFLAGS"
13340         echo "$as_me:13340: result: $CLANG_COMPILER" >&5
13341 echo "${ECHO_T}$CLANG_COMPILER" >&6
13342 fi
13343
13344 cat > conftest.$ac_ext <<EOF
13345 #line 13345 "${as_me:-configure}"
13346 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13347 EOF
13348
13349 if test "$INTEL_COMPILER" = yes
13350 then
13351 # The "-wdXXX" options suppress warnings:
13352 # remark #1419: external declaration in primary source file
13353 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13354 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13355 # remark #193: zero used for undefined preprocessing identifier
13356 # remark #593: variable "curs_sb_left_arrow" was set but never used
13357 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13358 # remark #869: parameter "tw" was never referenced
13359 # remark #981: operands are evaluated in unspecified order
13360 # warning #279: controlling expression is constant
13361
13362         { echo "$as_me:13362: checking for $CC warning options..." >&5
13363 echo "$as_me: checking for $CC warning options..." >&6;}
13364         cf_save_CFLAGS="$CFLAGS"
13365         EXTRA_CFLAGS="-Wall"
13366         for cf_opt in \
13367                 wd1419 \
13368                 wd1683 \
13369                 wd1684 \
13370                 wd193 \
13371                 wd593 \
13372                 wd279 \
13373                 wd810 \
13374                 wd869 \
13375                 wd981
13376         do
13377                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13378                 if { (eval echo "$as_me:13378: \"$ac_compile\"") >&5
13379   (eval $ac_compile) 2>&5
13380   ac_status=$?
13381   echo "$as_me:13381: \$? = $ac_status" >&5
13382   (exit $ac_status); }; then
13383                         test -n "$verbose" && echo "$as_me:13383: result: ... -$cf_opt" >&5
13384 echo "${ECHO_T}... -$cf_opt" >&6
13385                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13386                 fi
13387         done
13388         CFLAGS="$cf_save_CFLAGS"
13389
13390 elif test "$GCC" = yes
13391 then
13392         { echo "$as_me:13392: checking for $CC warning options..." >&5
13393 echo "$as_me: checking for $CC warning options..." >&6;}
13394         cf_save_CFLAGS="$CFLAGS"
13395         EXTRA_CFLAGS=
13396         cf_warn_CONST=""
13397         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13398         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13399         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13400         for cf_opt in W Wall \
13401                 Wbad-function-cast \
13402                 Wcast-align \
13403                 Wcast-qual \
13404                 Wdeclaration-after-statement \
13405                 Wextra \
13406                 Winline \
13407                 Wmissing-declarations \
13408                 Wmissing-prototypes \
13409                 Wnested-externs \
13410                 Wpointer-arith \
13411                 Wshadow \
13412                 Wstrict-prototypes \
13413                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13414         do
13415                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13416                 if { (eval echo "$as_me:13416: \"$ac_compile\"") >&5
13417   (eval $ac_compile) 2>&5
13418   ac_status=$?
13419   echo "$as_me:13419: \$? = $ac_status" >&5
13420   (exit $ac_status); }; then
13421                         test -n "$verbose" && echo "$as_me:13421: result: ... -$cf_opt" >&5
13422 echo "${ECHO_T}... -$cf_opt" >&6
13423                         case $cf_opt in
13424                         (Wcast-qual)
13425                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13426                                 ;;
13427                         (Winline)
13428                                 case $GCC_VERSION in
13429                                 ([34].*)
13430                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13431
13432 echo "${as_me:-configure}:13432: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13433
13434                                         continue;;
13435                                 esac
13436                                 ;;
13437                         (Wpointer-arith)
13438                                 case $GCC_VERSION in
13439                                 ([12].*)
13440                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13441
13442 echo "${as_me:-configure}:13442: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13443
13444                                         continue;;
13445                                 esac
13446                                 ;;
13447                         esac
13448                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13449                 fi
13450         done
13451         CFLAGS="$cf_save_CFLAGS"
13452 fi
13453 rm -rf conftest*
13454
13455         if test "x$cf_with_cxx" = xyes ; then
13456
13457 INTEL_CPLUSPLUS=no
13458
13459 if test "$GCC" = yes ; then
13460         case $host_os in
13461         (linux*|gnu*)
13462                 echo "$as_me:13462: checking if this is really Intel C++ compiler" >&5
13463 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13464                 cf_save_CFLAGS="$CXXFLAGS"
13465                 CXXFLAGS="$CXXFLAGS -no-gcc"
13466                 cat >conftest.$ac_ext <<_ACEOF
13467 #line 13467 "configure"
13468 #include "confdefs.h"
13469
13470 int
13471 main ()
13472 {
13473
13474 #ifdef __INTEL_COMPILER
13475 #else
13476 make an error
13477 #endif
13478
13479   ;
13480   return 0;
13481 }
13482 _ACEOF
13483 rm -f conftest.$ac_objext
13484 if { (eval echo "$as_me:13484: \"$ac_compile\"") >&5
13485   (eval $ac_compile) 2>&5
13486   ac_status=$?
13487   echo "$as_me:13487: \$? = $ac_status" >&5
13488   (exit $ac_status); } &&
13489          { ac_try='test -s conftest.$ac_objext'
13490   { (eval echo "$as_me:13490: \"$ac_try\"") >&5
13491   (eval $ac_try) 2>&5
13492   ac_status=$?
13493   echo "$as_me:13493: \$? = $ac_status" >&5
13494   (exit $ac_status); }; }; then
13495   INTEL_CPLUSPLUS=yes
13496 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13497
13498 else
13499   echo "$as_me: failed program was:" >&5
13500 cat conftest.$ac_ext >&5
13501 fi
13502 rm -f conftest.$ac_objext conftest.$ac_ext
13503                 CXXFLAGS="$cf_save_CFLAGS"
13504                 echo "$as_me:13504: result: $INTEL_CPLUSPLUS" >&5
13505 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13506                 ;;
13507         esac
13508 fi
13509
13510 CLANG_CPLUSPLUS=no
13511
13512 if test "$GCC" = yes ; then
13513         echo "$as_me:13513: checking if this is really Clang C++ compiler" >&5
13514 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13515         cf_save_CFLAGS="$CXXFLAGS"
13516         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13517         cat >conftest.$ac_ext <<_ACEOF
13518 #line 13518 "configure"
13519 #include "confdefs.h"
13520
13521 int
13522 main ()
13523 {
13524
13525 #ifdef __clang__
13526 #else
13527 make an error
13528 #endif
13529
13530   ;
13531   return 0;
13532 }
13533 _ACEOF
13534 rm -f conftest.$ac_objext
13535 if { (eval echo "$as_me:13535: \"$ac_compile\"") >&5
13536   (eval $ac_compile) 2>&5
13537   ac_status=$?
13538   echo "$as_me:13538: \$? = $ac_status" >&5
13539   (exit $ac_status); } &&
13540          { ac_try='test -s conftest.$ac_objext'
13541   { (eval echo "$as_me:13541: \"$ac_try\"") >&5
13542   (eval $ac_try) 2>&5
13543   ac_status=$?
13544   echo "$as_me:13544: \$? = $ac_status" >&5
13545   (exit $ac_status); }; }; then
13546   CLANG_CPLUSPLUS=yes
13547 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13548
13549 else
13550   echo "$as_me: failed program was:" >&5
13551 cat conftest.$ac_ext >&5
13552 fi
13553 rm -f conftest.$ac_objext conftest.$ac_ext
13554         CXXFLAGS="$cf_save_CFLAGS"
13555         echo "$as_me:13555: result: $CLANG_CPLUSPLUS" >&5
13556 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13557 fi
13558
13559 ac_ext=cc
13560 ac_cpp='$CXXCPP $CPPFLAGS'
13561 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13562 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13563 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13564 ac_main_return=return
13565
13566 cat > conftest.$ac_ext <<EOF
13567 #line 13567 "configure"
13568 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13569 EOF
13570
13571 if test "$INTEL_CPLUSPLUS" = yes
13572 then
13573 # The "-wdXXX" options suppress warnings:
13574 # remark #1419: external declaration in primary source file
13575 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13576 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13577 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13578 # remark #193: zero used for undefined preprocessing identifier
13579 # remark #593: variable "curs_sb_left_arrow" was set but never used
13580 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13581 # remark #869: parameter "tw" was never referenced
13582 # remark #981: operands are evaluated in unspecified order
13583 # warning #269: invalid format string conversion
13584
13585         { echo "$as_me:13585: checking for $CC warning options..." >&5
13586 echo "$as_me: checking for $CC warning options..." >&6;}
13587         cf_save_CXXFLAGS="$CXXFLAGS"
13588         EXTRA_CXXFLAGS="-Wall"
13589         for cf_opt in \
13590                 wd1419 \
13591                 wd1682 \
13592                 wd1683 \
13593                 wd1684 \
13594                 wd193 \
13595                 wd279 \
13596                 wd593 \
13597                 wd810 \
13598                 wd869 \
13599                 wd981
13600         do
13601                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13602                 if { (eval echo "$as_me:13602: \"$ac_compile\"") >&5
13603   (eval $ac_compile) 2>&5
13604   ac_status=$?
13605   echo "$as_me:13605: \$? = $ac_status" >&5
13606   (exit $ac_status); }; then
13607                         test -n "$verbose" && echo "$as_me:13607: result: ... -$cf_opt" >&5
13608 echo "${ECHO_T}... -$cf_opt" >&6
13609                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13610                 fi
13611         done
13612         CXXFLAGS="$cf_save_CXXFLAGS"
13613
13614 elif test "$GXX" = yes
13615 then
13616         { echo "$as_me:13616: checking for $CXX warning options..." >&5
13617 echo "$as_me: checking for $CXX warning options..." >&6;}
13618         cf_save_CXXFLAGS="$CXXFLAGS"
13619         EXTRA_CXXFLAGS="-W -Wall"
13620         cf_gxx_extra_warnings=""
13621         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13622         case "$GCC_VERSION" in
13623         ([1-2].*)
13624                 ;;
13625         (*)
13626                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13627                 ;;
13628         esac
13629         for cf_opt in \
13630                 Wabi \
13631                 fabi-version=0 \
13632                 Wextra \
13633                 Wignored-qualifiers \
13634                 Wlogical-op \
13635                 Woverloaded-virtual \
13636                 Wsign-promo \
13637                 Wsynth \
13638                 Wold-style-cast \
13639                 Wcast-align \
13640                 Wcast-qual \
13641                 Wpointer-arith \
13642                 Wshadow \
13643                 Wundef $cf_gxx_extra_warnings Wno-unused
13644         do
13645                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13646                 if { (eval echo "$as_me:13646: \"$ac_compile\"") >&5
13647   (eval $ac_compile) 2>&5
13648   ac_status=$?
13649   echo "$as_me:13649: \$? = $ac_status" >&5
13650   (exit $ac_status); }; then
13651                         test -n "$verbose" && echo "$as_me:13651: result: ... -$cf_opt" >&5
13652 echo "${ECHO_T}... -$cf_opt" >&6
13653                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13654                 else
13655                         test -n "$verbose" && echo "$as_me:13655: result: ... no -$cf_opt" >&5
13656 echo "${ECHO_T}... no -$cf_opt" >&6
13657                 fi
13658         done
13659         CXXFLAGS="$cf_save_CXXFLAGS"
13660 fi
13661
13662 rm -rf conftest*
13663 ac_ext=c
13664 ac_cpp='$CPP $CPPFLAGS'
13665 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13666 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13667 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13668 ac_main_return=return
13669
13670         fi
13671 fi
13672
13673 if test "$GCC" = yes
13674 then
13675 cat > conftest.i <<EOF
13676 #ifndef GCC_PRINTF
13677 #define GCC_PRINTF 0
13678 #endif
13679 #ifndef GCC_SCANF
13680 #define GCC_SCANF 0
13681 #endif
13682 #ifndef GCC_NORETURN
13683 #define GCC_NORETURN /* nothing */
13684 #endif
13685 #ifndef GCC_UNUSED
13686 #define GCC_UNUSED /* nothing */
13687 #endif
13688 EOF
13689 if test "$GCC" = yes
13690 then
13691         { echo "$as_me:13691: checking for $CC __attribute__ directives..." >&5
13692 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13693 cat > conftest.$ac_ext <<EOF
13694 #line 13694 "${as_me:-configure}"
13695 #include "confdefs.h"
13696 #include "conftest.h"
13697 #include "conftest.i"
13698 #if     GCC_PRINTF
13699 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13700 #else
13701 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13702 #endif
13703 #if     GCC_SCANF
13704 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13705 #else
13706 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13707 #endif
13708 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13709 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13710 extern void foo(void) GCC_NORETURN;
13711 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13712 EOF
13713         cf_printf_attribute=no
13714         cf_scanf_attribute=no
13715         for cf_attribute in scanf printf unused noreturn
13716         do
13717
13718 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13719
13720                 cf_directive="__attribute__(($cf_attribute))"
13721                 echo "checking for $CC $cf_directive" 1>&5
13722
13723                 case $cf_attribute in
13724                 (printf)
13725                         cf_printf_attribute=yes
13726                         cat >conftest.h <<EOF
13727 #define GCC_$cf_ATTRIBUTE 1
13728 EOF
13729                         ;;
13730                 (scanf)
13731                         cf_scanf_attribute=yes
13732                         cat >conftest.h <<EOF
13733 #define GCC_$cf_ATTRIBUTE 1
13734 EOF
13735                         ;;
13736                 (*)
13737                         cat >conftest.h <<EOF
13738 #define GCC_$cf_ATTRIBUTE $cf_directive
13739 EOF
13740                         ;;
13741                 esac
13742
13743                 if { (eval echo "$as_me:13743: \"$ac_compile\"") >&5
13744   (eval $ac_compile) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit $ac_status); }; then
13748                         test -n "$verbose" && echo "$as_me:13748: result: ... $cf_attribute" >&5
13749 echo "${ECHO_T}... $cf_attribute" >&6
13750                         cat conftest.h >>confdefs.h
13751                         case $cf_attribute in
13752                         (noreturn)
13753
13754 cat >>confdefs.h <<EOF
13755 #define GCC_NORETURN $cf_directive
13756 EOF
13757
13758                                 ;;
13759                         (printf)
13760                                 cf_value='/* nothing */'
13761                                 if test "$cf_printf_attribute" != no ; then
13762                                         cf_value='__attribute__((format(printf,fmt,var)))'
13763
13764 cat >>confdefs.h <<\EOF
13765 #define GCC_PRINTF 1
13766 EOF
13767
13768                                 fi
13769
13770 cat >>confdefs.h <<EOF
13771 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13772 EOF
13773
13774                                 ;;
13775                         (scanf)
13776                                 cf_value='/* nothing */'
13777                                 if test "$cf_scanf_attribute" != no ; then
13778                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13779
13780 cat >>confdefs.h <<\EOF
13781 #define GCC_SCANF 1
13782 EOF
13783
13784                                 fi
13785
13786 cat >>confdefs.h <<EOF
13787 #define GCC_SCANFLIKE(fmt,var) $cf_value
13788 EOF
13789
13790                                 ;;
13791                         (unused)
13792
13793 cat >>confdefs.h <<EOF
13794 #define GCC_UNUSED $cf_directive
13795 EOF
13796
13797                                 ;;
13798                         esac
13799                 fi
13800         done
13801 else
13802         fgrep define conftest.i >>confdefs.h
13803 fi
13804 rm -rf conftest*
13805 fi
13806
13807 echo "$as_me:13807: checking if you want to work around bogus compiler/loader warnings" >&5
13808 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13809
13810 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13811 if test "${enable_string_hacks+set}" = set; then
13812   enableval="$enable_string_hacks"
13813   with_string_hacks=$enableval
13814 else
13815   with_string_hacks=no
13816 fi;
13817 echo "$as_me:13817: result: $with_string_hacks" >&5
13818 echo "${ECHO_T}$with_string_hacks" >&6
13819
13820 if test "x$with_string_hacks" = "xyes"; then
13821
13822 cat >>confdefs.h <<\EOF
13823 #define USE_STRING_HACKS 1
13824 EOF
13825
13826         { echo "$as_me:13826: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13827 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13828         echo "$as_me:13828: checking for strlcat" >&5
13829 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
13830 if test "${ac_cv_func_strlcat+set}" = set; then
13831   echo $ECHO_N "(cached) $ECHO_C" >&6
13832 else
13833   cat >conftest.$ac_ext <<_ACEOF
13834 #line 13834 "configure"
13835 #include "confdefs.h"
13836 /* System header to define __stub macros and hopefully few prototypes,
13837     which can conflict with char strlcat (); below.  */
13838 #include <assert.h>
13839 /* Override any gcc2 internal prototype to avoid an error.  */
13840 #ifdef __cplusplus
13841 extern "C"
13842 #endif
13843 /* We use char because int might match the return type of a gcc2
13844    builtin and then its argument prototype would still apply.  */
13845 char strlcat ();
13846 char (*f) ();
13847
13848 int
13849 main ()
13850 {
13851 /* The GNU C library defines this for functions which it implements
13852     to always fail with ENOSYS.  Some functions are actually named
13853     something starting with __ and the normal name is an alias.  */
13854 #if defined (__stub_strlcat) || defined (__stub___strlcat)
13855 choke me
13856 #else
13857 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13858 #endif
13859
13860   ;
13861   return 0;
13862 }
13863 _ACEOF
13864 rm -f conftest.$ac_objext conftest$ac_exeext
13865 if { (eval echo "$as_me:13865: \"$ac_link\"") >&5
13866   (eval $ac_link) 2>&5
13867   ac_status=$?
13868   echo "$as_me:13868: \$? = $ac_status" >&5
13869   (exit $ac_status); } &&
13870          { ac_try='test -s conftest$ac_exeext'
13871   { (eval echo "$as_me:13871: \"$ac_try\"") >&5
13872   (eval $ac_try) 2>&5
13873   ac_status=$?
13874   echo "$as_me:13874: \$? = $ac_status" >&5
13875   (exit $ac_status); }; }; then
13876   ac_cv_func_strlcat=yes
13877 else
13878   echo "$as_me: failed program was:" >&5
13879 cat conftest.$ac_ext >&5
13880 ac_cv_func_strlcat=no
13881 fi
13882 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13883 fi
13884 echo "$as_me:13884: result: $ac_cv_func_strlcat" >&5
13885 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
13886 if test $ac_cv_func_strlcat = yes; then
13887
13888 cat >>confdefs.h <<\EOF
13889 #define HAVE_STRLCAT 1
13890 EOF
13891
13892 else
13893
13894                 echo "$as_me:13894: checking for strlcat in -lbsd" >&5
13895 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
13896 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
13897   echo $ECHO_N "(cached) $ECHO_C" >&6
13898 else
13899   ac_check_lib_save_LIBS=$LIBS
13900 LIBS="-lbsd  $LIBS"
13901 cat >conftest.$ac_ext <<_ACEOF
13902 #line 13902 "configure"
13903 #include "confdefs.h"
13904
13905 /* Override any gcc2 internal prototype to avoid an error.  */
13906 #ifdef __cplusplus
13907 extern "C"
13908 #endif
13909 /* We use char because int might match the return type of a gcc2
13910    builtin and then its argument prototype would still apply.  */
13911 char strlcat ();
13912 int
13913 main ()
13914 {
13915 strlcat ();
13916   ;
13917   return 0;
13918 }
13919 _ACEOF
13920 rm -f conftest.$ac_objext conftest$ac_exeext
13921 if { (eval echo "$as_me:13921: \"$ac_link\"") >&5
13922   (eval $ac_link) 2>&5
13923   ac_status=$?
13924   echo "$as_me:13924: \$? = $ac_status" >&5
13925   (exit $ac_status); } &&
13926          { ac_try='test -s conftest$ac_exeext'
13927   { (eval echo "$as_me:13927: \"$ac_try\"") >&5
13928   (eval $ac_try) 2>&5
13929   ac_status=$?
13930   echo "$as_me:13930: \$? = $ac_status" >&5
13931   (exit $ac_status); }; }; then
13932   ac_cv_lib_bsd_strlcat=yes
13933 else
13934   echo "$as_me: failed program was:" >&5
13935 cat conftest.$ac_ext >&5
13936 ac_cv_lib_bsd_strlcat=no
13937 fi
13938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13939 LIBS=$ac_check_lib_save_LIBS
13940 fi
13941 echo "$as_me:13941: result: $ac_cv_lib_bsd_strlcat" >&5
13942 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
13943 if test $ac_cv_lib_bsd_strlcat = yes; then
13944
13945 cf_add_libs="-lbsd"
13946 # Filter out duplicates - this happens with badly-designed ".pc" files...
13947 for cf_add_1lib in $LIBS
13948 do
13949         for cf_add_2lib in $cf_add_libs
13950         do
13951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13952                 then
13953                         cf_add_1lib=
13954                         break
13955                 fi
13956         done
13957         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13958 done
13959 LIBS="$cf_add_libs"
13960
13961 for ac_header in bsd/string.h
13962 do
13963 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13964 echo "$as_me:13964: checking for $ac_header" >&5
13965 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13966 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13967   echo $ECHO_N "(cached) $ECHO_C" >&6
13968 else
13969   cat >conftest.$ac_ext <<_ACEOF
13970 #line 13970 "configure"
13971 #include "confdefs.h"
13972 #include <$ac_header>
13973 _ACEOF
13974 if { (eval echo "$as_me:13974: \"$ac_cpp conftest.$ac_ext\"") >&5
13975   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13976   ac_status=$?
13977   egrep -v '^ *\+' conftest.er1 >conftest.err
13978   rm -f conftest.er1
13979   cat conftest.err >&5
13980   echo "$as_me:13980: \$? = $ac_status" >&5
13981   (exit $ac_status); } >/dev/null; then
13982   if test -s conftest.err; then
13983     ac_cpp_err=$ac_c_preproc_warn_flag
13984   else
13985     ac_cpp_err=
13986   fi
13987 else
13988   ac_cpp_err=yes
13989 fi
13990 if test -z "$ac_cpp_err"; then
13991   eval "$as_ac_Header=yes"
13992 else
13993   echo "$as_me: failed program was:" >&5
13994   cat conftest.$ac_ext >&5
13995   eval "$as_ac_Header=no"
13996 fi
13997 rm -f conftest.err conftest.$ac_ext
13998 fi
13999 echo "$as_me:13999: result: `eval echo '${'$as_ac_Header'}'`" >&5
14000 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14001 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14002   cat >>confdefs.h <<EOF
14003 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14004 EOF
14005
14006 fi
14007 done
14008
14009 cat >>confdefs.h <<\EOF
14010 #define HAVE_STRLCAT 1
14011 EOF
14012
14013 fi
14014
14015 fi
14016
14017 for ac_func in strlcpy snprintf
14018 do
14019 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14020 echo "$as_me:14020: checking for $ac_func" >&5
14021 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14022 if eval "test \"\${$as_ac_var+set}\" = set"; then
14023   echo $ECHO_N "(cached) $ECHO_C" >&6
14024 else
14025   cat >conftest.$ac_ext <<_ACEOF
14026 #line 14026 "configure"
14027 #include "confdefs.h"
14028 /* System header to define __stub macros and hopefully few prototypes,
14029     which can conflict with char $ac_func (); below.  */
14030 #include <assert.h>
14031 /* Override any gcc2 internal prototype to avoid an error.  */
14032 #ifdef __cplusplus
14033 extern "C"
14034 #endif
14035 /* We use char because int might match the return type of a gcc2
14036    builtin and then its argument prototype would still apply.  */
14037 char $ac_func ();
14038 char (*f) ();
14039
14040 int
14041 main ()
14042 {
14043 /* The GNU C library defines this for functions which it implements
14044     to always fail with ENOSYS.  Some functions are actually named
14045     something starting with __ and the normal name is an alias.  */
14046 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14047 choke me
14048 #else
14049 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14050 #endif
14051
14052   ;
14053   return 0;
14054 }
14055 _ACEOF
14056 rm -f conftest.$ac_objext conftest$ac_exeext
14057 if { (eval echo "$as_me:14057: \"$ac_link\"") >&5
14058   (eval $ac_link) 2>&5
14059   ac_status=$?
14060   echo "$as_me:14060: \$? = $ac_status" >&5
14061   (exit $ac_status); } &&
14062          { ac_try='test -s conftest$ac_exeext'
14063   { (eval echo "$as_me:14063: \"$ac_try\"") >&5
14064   (eval $ac_try) 2>&5
14065   ac_status=$?
14066   echo "$as_me:14066: \$? = $ac_status" >&5
14067   (exit $ac_status); }; }; then
14068   eval "$as_ac_var=yes"
14069 else
14070   echo "$as_me: failed program was:" >&5
14071 cat conftest.$ac_ext >&5
14072 eval "$as_ac_var=no"
14073 fi
14074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14075 fi
14076 echo "$as_me:14076: result: `eval echo '${'$as_ac_var'}'`" >&5
14077 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14078 if test `eval echo '${'$as_ac_var'}'` = yes; then
14079   cat >>confdefs.h <<EOF
14080 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14081 EOF
14082
14083 fi
14084 done
14085
14086 fi
14087
14088 ###     use option --enable-assertions to turn on generation of assertion code
14089 echo "$as_me:14089: checking if you want to enable runtime assertions" >&5
14090 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14091
14092 # Check whether --enable-assertions or --disable-assertions was given.
14093 if test "${enable_assertions+set}" = set; then
14094   enableval="$enable_assertions"
14095   with_assertions=$enableval
14096 else
14097   with_assertions=no
14098 fi;
14099 echo "$as_me:14099: result: $with_assertions" >&5
14100 echo "${ECHO_T}$with_assertions" >&6
14101 if test -n "$GCC"
14102 then
14103         if test "$with_assertions" = no
14104         then
14105                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14106         else
14107
14108         ADAFLAGS="$ADAFLAGS -gnata"
14109
14110         fi
14111 fi
14112
14113 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14114
14115 echo "$as_me:14115: checking if you want to use dmalloc for testing" >&5
14116 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14117
14118 # Check whether --with-dmalloc or --without-dmalloc was given.
14119 if test "${with_dmalloc+set}" = set; then
14120   withval="$with_dmalloc"
14121
14122 cat >>confdefs.h <<EOF
14123 #define USE_DMALLOC 1
14124 EOF
14125
14126         : ${with_cflags:=-g}
14127         : ${with_no_leaks:=yes}
14128          with_dmalloc=yes
14129 else
14130   with_dmalloc=
14131 fi;
14132 echo "$as_me:14132: result: ${with_dmalloc:-no}" >&5
14133 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14134
14135 case .$with_cflags in
14136 (.*-g*)
14137         case .$CFLAGS in
14138         (.*-g*)
14139                 ;;
14140         (*)
14141
14142 cf_fix_cppflags=no
14143 cf_new_cflags=
14144 cf_new_cppflags=
14145 cf_new_extra_cppflags=
14146
14147 for cf_add_cflags in -g
14148 do
14149 case $cf_fix_cppflags in
14150 (no)
14151         case $cf_add_cflags in
14152         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14153                 case $cf_add_cflags in
14154                 (-D*)
14155                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14156
14157                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14158                                 && test -z "${cf_tst_cflags}" \
14159                                 && cf_fix_cppflags=yes
14160
14161                         if test $cf_fix_cppflags = yes ; then
14162                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14163                                 continue
14164                         elif test "${cf_tst_cflags}" = "\"'" ; then
14165                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14166                                 continue
14167                         fi
14168                         ;;
14169                 esac
14170                 case "$CPPFLAGS" in
14171                 (*$cf_add_cflags)
14172                         ;;
14173                 (*)
14174                         case $cf_add_cflags in
14175                         (-D*)
14176                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14177
14178 CPPFLAGS=`echo "$CPPFLAGS" | \
14179         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14180                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14181
14182                                 ;;
14183                         esac
14184                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14185                         ;;
14186                 esac
14187                 ;;
14188         (*)
14189                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14190                 ;;
14191         esac
14192         ;;
14193 (yes)
14194         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14195
14196         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14197
14198         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14199                 && test -z "${cf_tst_cflags}" \
14200                 && cf_fix_cppflags=no
14201         ;;
14202 esac
14203 done
14204
14205 if test -n "$cf_new_cflags" ; then
14206
14207         CFLAGS="$CFLAGS $cf_new_cflags"
14208 fi
14209
14210 if test -n "$cf_new_cppflags" ; then
14211
14212         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14213 fi
14214
14215 if test -n "$cf_new_extra_cppflags" ; then
14216
14217         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14218 fi
14219
14220                 ;;
14221         esac
14222         ;;
14223 esac
14224
14225 if test "$with_dmalloc" = yes ; then
14226         echo "$as_me:14226: checking for dmalloc.h" >&5
14227 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14228 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14229   echo $ECHO_N "(cached) $ECHO_C" >&6
14230 else
14231   cat >conftest.$ac_ext <<_ACEOF
14232 #line 14232 "configure"
14233 #include "confdefs.h"
14234 #include <dmalloc.h>
14235 _ACEOF
14236 if { (eval echo "$as_me:14236: \"$ac_cpp conftest.$ac_ext\"") >&5
14237   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14238   ac_status=$?
14239   egrep -v '^ *\+' conftest.er1 >conftest.err
14240   rm -f conftest.er1
14241   cat conftest.err >&5
14242   echo "$as_me:14242: \$? = $ac_status" >&5
14243   (exit $ac_status); } >/dev/null; then
14244   if test -s conftest.err; then
14245     ac_cpp_err=$ac_c_preproc_warn_flag
14246   else
14247     ac_cpp_err=
14248   fi
14249 else
14250   ac_cpp_err=yes
14251 fi
14252 if test -z "$ac_cpp_err"; then
14253   ac_cv_header_dmalloc_h=yes
14254 else
14255   echo "$as_me: failed program was:" >&5
14256   cat conftest.$ac_ext >&5
14257   ac_cv_header_dmalloc_h=no
14258 fi
14259 rm -f conftest.err conftest.$ac_ext
14260 fi
14261 echo "$as_me:14261: result: $ac_cv_header_dmalloc_h" >&5
14262 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14263 if test $ac_cv_header_dmalloc_h = yes; then
14264
14265 echo "$as_me:14265: checking for dmalloc_debug in -ldmalloc" >&5
14266 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14267 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14268   echo $ECHO_N "(cached) $ECHO_C" >&6
14269 else
14270   ac_check_lib_save_LIBS=$LIBS
14271 LIBS="-ldmalloc  $LIBS"
14272 cat >conftest.$ac_ext <<_ACEOF
14273 #line 14273 "configure"
14274 #include "confdefs.h"
14275
14276 /* Override any gcc2 internal prototype to avoid an error.  */
14277 #ifdef __cplusplus
14278 extern "C"
14279 #endif
14280 /* We use char because int might match the return type of a gcc2
14281    builtin and then its argument prototype would still apply.  */
14282 char dmalloc_debug ();
14283 int
14284 main ()
14285 {
14286 dmalloc_debug ();
14287   ;
14288   return 0;
14289 }
14290 _ACEOF
14291 rm -f conftest.$ac_objext conftest$ac_exeext
14292 if { (eval echo "$as_me:14292: \"$ac_link\"") >&5
14293   (eval $ac_link) 2>&5
14294   ac_status=$?
14295   echo "$as_me:14295: \$? = $ac_status" >&5
14296   (exit $ac_status); } &&
14297          { ac_try='test -s conftest$ac_exeext'
14298   { (eval echo "$as_me:14298: \"$ac_try\"") >&5
14299   (eval $ac_try) 2>&5
14300   ac_status=$?
14301   echo "$as_me:14301: \$? = $ac_status" >&5
14302   (exit $ac_status); }; }; then
14303   ac_cv_lib_dmalloc_dmalloc_debug=yes
14304 else
14305   echo "$as_me: failed program was:" >&5
14306 cat conftest.$ac_ext >&5
14307 ac_cv_lib_dmalloc_dmalloc_debug=no
14308 fi
14309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14310 LIBS=$ac_check_lib_save_LIBS
14311 fi
14312 echo "$as_me:14312: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14313 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14314 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14315   cat >>confdefs.h <<EOF
14316 #define HAVE_LIBDMALLOC 1
14317 EOF
14318
14319   LIBS="-ldmalloc $LIBS"
14320
14321 fi
14322
14323 fi
14324
14325 fi
14326
14327 echo "$as_me:14327: checking if you want to use dbmalloc for testing" >&5
14328 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14329
14330 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14331 if test "${with_dbmalloc+set}" = set; then
14332   withval="$with_dbmalloc"
14333
14334 cat >>confdefs.h <<EOF
14335 #define USE_DBMALLOC 1
14336 EOF
14337
14338         : ${with_cflags:=-g}
14339         : ${with_no_leaks:=yes}
14340          with_dbmalloc=yes
14341 else
14342   with_dbmalloc=
14343 fi;
14344 echo "$as_me:14344: result: ${with_dbmalloc:-no}" >&5
14345 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14346
14347 case .$with_cflags in
14348 (.*-g*)
14349         case .$CFLAGS in
14350         (.*-g*)
14351                 ;;
14352         (*)
14353
14354 cf_fix_cppflags=no
14355 cf_new_cflags=
14356 cf_new_cppflags=
14357 cf_new_extra_cppflags=
14358
14359 for cf_add_cflags in -g
14360 do
14361 case $cf_fix_cppflags in
14362 (no)
14363         case $cf_add_cflags in
14364         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14365                 case $cf_add_cflags in
14366                 (-D*)
14367                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14368
14369                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14370                                 && test -z "${cf_tst_cflags}" \
14371                                 && cf_fix_cppflags=yes
14372
14373                         if test $cf_fix_cppflags = yes ; then
14374                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14375                                 continue
14376                         elif test "${cf_tst_cflags}" = "\"'" ; then
14377                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14378                                 continue
14379                         fi
14380                         ;;
14381                 esac
14382                 case "$CPPFLAGS" in
14383                 (*$cf_add_cflags)
14384                         ;;
14385                 (*)
14386                         case $cf_add_cflags in
14387                         (-D*)
14388                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14389
14390 CPPFLAGS=`echo "$CPPFLAGS" | \
14391         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14392                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14393
14394                                 ;;
14395                         esac
14396                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14397                         ;;
14398                 esac
14399                 ;;
14400         (*)
14401                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14402                 ;;
14403         esac
14404         ;;
14405 (yes)
14406         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14407
14408         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14409
14410         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14411                 && test -z "${cf_tst_cflags}" \
14412                 && cf_fix_cppflags=no
14413         ;;
14414 esac
14415 done
14416
14417 if test -n "$cf_new_cflags" ; then
14418
14419         CFLAGS="$CFLAGS $cf_new_cflags"
14420 fi
14421
14422 if test -n "$cf_new_cppflags" ; then
14423
14424         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14425 fi
14426
14427 if test -n "$cf_new_extra_cppflags" ; then
14428
14429         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14430 fi
14431
14432                 ;;
14433         esac
14434         ;;
14435 esac
14436
14437 if test "$with_dbmalloc" = yes ; then
14438         echo "$as_me:14438: checking for dbmalloc.h" >&5
14439 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14440 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14441   echo $ECHO_N "(cached) $ECHO_C" >&6
14442 else
14443   cat >conftest.$ac_ext <<_ACEOF
14444 #line 14444 "configure"
14445 #include "confdefs.h"
14446 #include <dbmalloc.h>
14447 _ACEOF
14448 if { (eval echo "$as_me:14448: \"$ac_cpp conftest.$ac_ext\"") >&5
14449   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14450   ac_status=$?
14451   egrep -v '^ *\+' conftest.er1 >conftest.err
14452   rm -f conftest.er1
14453   cat conftest.err >&5
14454   echo "$as_me:14454: \$? = $ac_status" >&5
14455   (exit $ac_status); } >/dev/null; then
14456   if test -s conftest.err; then
14457     ac_cpp_err=$ac_c_preproc_warn_flag
14458   else
14459     ac_cpp_err=
14460   fi
14461 else
14462   ac_cpp_err=yes
14463 fi
14464 if test -z "$ac_cpp_err"; then
14465   ac_cv_header_dbmalloc_h=yes
14466 else
14467   echo "$as_me: failed program was:" >&5
14468   cat conftest.$ac_ext >&5
14469   ac_cv_header_dbmalloc_h=no
14470 fi
14471 rm -f conftest.err conftest.$ac_ext
14472 fi
14473 echo "$as_me:14473: result: $ac_cv_header_dbmalloc_h" >&5
14474 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14475 if test $ac_cv_header_dbmalloc_h = yes; then
14476
14477 echo "$as_me:14477: checking for debug_malloc in -ldbmalloc" >&5
14478 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14479 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14480   echo $ECHO_N "(cached) $ECHO_C" >&6
14481 else
14482   ac_check_lib_save_LIBS=$LIBS
14483 LIBS="-ldbmalloc  $LIBS"
14484 cat >conftest.$ac_ext <<_ACEOF
14485 #line 14485 "configure"
14486 #include "confdefs.h"
14487
14488 /* Override any gcc2 internal prototype to avoid an error.  */
14489 #ifdef __cplusplus
14490 extern "C"
14491 #endif
14492 /* We use char because int might match the return type of a gcc2
14493    builtin and then its argument prototype would still apply.  */
14494 char debug_malloc ();
14495 int
14496 main ()
14497 {
14498 debug_malloc ();
14499   ;
14500   return 0;
14501 }
14502 _ACEOF
14503 rm -f conftest.$ac_objext conftest$ac_exeext
14504 if { (eval echo "$as_me:14504: \"$ac_link\"") >&5
14505   (eval $ac_link) 2>&5
14506   ac_status=$?
14507   echo "$as_me:14507: \$? = $ac_status" >&5
14508   (exit $ac_status); } &&
14509          { ac_try='test -s conftest$ac_exeext'
14510   { (eval echo "$as_me:14510: \"$ac_try\"") >&5
14511   (eval $ac_try) 2>&5
14512   ac_status=$?
14513   echo "$as_me:14513: \$? = $ac_status" >&5
14514   (exit $ac_status); }; }; then
14515   ac_cv_lib_dbmalloc_debug_malloc=yes
14516 else
14517   echo "$as_me: failed program was:" >&5
14518 cat conftest.$ac_ext >&5
14519 ac_cv_lib_dbmalloc_debug_malloc=no
14520 fi
14521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14522 LIBS=$ac_check_lib_save_LIBS
14523 fi
14524 echo "$as_me:14524: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14525 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14526 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14527   cat >>confdefs.h <<EOF
14528 #define HAVE_LIBDBMALLOC 1
14529 EOF
14530
14531   LIBS="-ldbmalloc $LIBS"
14532
14533 fi
14534
14535 fi
14536
14537 fi
14538
14539 echo "$as_me:14539: checking if you want to use valgrind for testing" >&5
14540 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14541
14542 # Check whether --with-valgrind or --without-valgrind was given.
14543 if test "${with_valgrind+set}" = set; then
14544   withval="$with_valgrind"
14545
14546 cat >>confdefs.h <<EOF
14547 #define USE_VALGRIND 1
14548 EOF
14549
14550         : ${with_cflags:=-g}
14551         : ${with_no_leaks:=yes}
14552          with_valgrind=yes
14553 else
14554   with_valgrind=
14555 fi;
14556 echo "$as_me:14556: result: ${with_valgrind:-no}" >&5
14557 echo "${ECHO_T}${with_valgrind:-no}" >&6
14558
14559 case .$with_cflags in
14560 (.*-g*)
14561         case .$CFLAGS in
14562         (.*-g*)
14563                 ;;
14564         (*)
14565
14566 cf_fix_cppflags=no
14567 cf_new_cflags=
14568 cf_new_cppflags=
14569 cf_new_extra_cppflags=
14570
14571 for cf_add_cflags in -g
14572 do
14573 case $cf_fix_cppflags in
14574 (no)
14575         case $cf_add_cflags in
14576         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14577                 case $cf_add_cflags in
14578                 (-D*)
14579                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14580
14581                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14582                                 && test -z "${cf_tst_cflags}" \
14583                                 && cf_fix_cppflags=yes
14584
14585                         if test $cf_fix_cppflags = yes ; then
14586                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14587                                 continue
14588                         elif test "${cf_tst_cflags}" = "\"'" ; then
14589                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14590                                 continue
14591                         fi
14592                         ;;
14593                 esac
14594                 case "$CPPFLAGS" in
14595                 (*$cf_add_cflags)
14596                         ;;
14597                 (*)
14598                         case $cf_add_cflags in
14599                         (-D*)
14600                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14601
14602 CPPFLAGS=`echo "$CPPFLAGS" | \
14603         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14604                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14605
14606                                 ;;
14607                         esac
14608                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14609                         ;;
14610                 esac
14611                 ;;
14612         (*)
14613                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14614                 ;;
14615         esac
14616         ;;
14617 (yes)
14618         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14619
14620         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14621
14622         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14623                 && test -z "${cf_tst_cflags}" \
14624                 && cf_fix_cppflags=no
14625         ;;
14626 esac
14627 done
14628
14629 if test -n "$cf_new_cflags" ; then
14630
14631         CFLAGS="$CFLAGS $cf_new_cflags"
14632 fi
14633
14634 if test -n "$cf_new_cppflags" ; then
14635
14636         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14637 fi
14638
14639 if test -n "$cf_new_extra_cppflags" ; then
14640
14641         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14642 fi
14643
14644                 ;;
14645         esac
14646         ;;
14647 esac
14648
14649 echo "$as_me:14649: checking if you want to perform memory-leak testing" >&5
14650 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14651
14652 # Check whether --enable-leaks or --disable-leaks was given.
14653 if test "${enable_leaks+set}" = set; then
14654   enableval="$enable_leaks"
14655   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14656 else
14657   : ${with_no_leaks:=no}
14658 fi;
14659 echo "$as_me:14659: result: $with_no_leaks" >&5
14660 echo "${ECHO_T}$with_no_leaks" >&6
14661
14662 if test "$with_no_leaks" = yes ; then
14663
14664 cat >>confdefs.h <<\EOF
14665 #define NO_LEAKS 1
14666 EOF
14667
14668 cat >>confdefs.h <<\EOF
14669 #define YY_NO_LEAKS 1
14670 EOF
14671
14672 fi
14673
14674 cat >>confdefs.h <<\EOF
14675 #define HAVE_NC_ALLOC_H 1
14676 EOF
14677
14678 ###     use option --enable-expanded to generate certain macros as functions
14679
14680 # Check whether --enable-expanded or --disable-expanded was given.
14681 if test "${enable_expanded+set}" = set; then
14682   enableval="$enable_expanded"
14683   test "x$enableval" = xyes &&
14684 cat >>confdefs.h <<\EOF
14685 #define NCURSES_EXPANDED 1
14686 EOF
14687
14688 fi;
14689
14690 ###     use option --disable-macros to suppress macros in favor of functions
14691
14692 # Check whether --enable-macros or --disable-macros was given.
14693 if test "${enable_macros+set}" = set; then
14694   enableval="$enable_macros"
14695   test "$enableval" = no &&
14696 cat >>confdefs.h <<\EOF
14697 #define NCURSES_NOMACROS 1
14698 EOF
14699
14700 fi;
14701
14702 # Normally we only add trace() to the debug-library.  Allow this to be
14703 # extended to all models of the ncurses library:
14704 cf_all_traces=no
14705 case "$CFLAGS $CPPFLAGS" in
14706 (*-DTRACE*)
14707         cf_all_traces=yes
14708         ;;
14709 esac
14710
14711 echo "$as_me:14711: checking whether to add trace feature to all models" >&5
14712 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14713
14714 # Check whether --with-trace or --without-trace was given.
14715 if test "${with_trace+set}" = set; then
14716   withval="$with_trace"
14717   cf_with_trace=$withval
14718 else
14719   cf_with_trace=$cf_all_traces
14720 fi;
14721 echo "$as_me:14721: result: $cf_with_trace" >&5
14722 echo "${ECHO_T}$cf_with_trace" >&6
14723
14724 if test "x$cf_with_trace" = xyes ; then
14725         LIB_TRACING=all
14726         ADA_TRACE=TRUE
14727
14728 cf_fix_cppflags=no
14729 cf_new_cflags=
14730 cf_new_cppflags=
14731 cf_new_extra_cppflags=
14732
14733 for cf_add_cflags in -DTRACE
14734 do
14735 case $cf_fix_cppflags in
14736 (no)
14737         case $cf_add_cflags in
14738         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14739                 case $cf_add_cflags in
14740                 (-D*)
14741                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14742
14743                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14744                                 && test -z "${cf_tst_cflags}" \
14745                                 && cf_fix_cppflags=yes
14746
14747                         if test $cf_fix_cppflags = yes ; then
14748                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14749                                 continue
14750                         elif test "${cf_tst_cflags}" = "\"'" ; then
14751                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14752                                 continue
14753                         fi
14754                         ;;
14755                 esac
14756                 case "$CPPFLAGS" in
14757                 (*$cf_add_cflags)
14758                         ;;
14759                 (*)
14760                         case $cf_add_cflags in
14761                         (-D*)
14762                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14763
14764 CPPFLAGS=`echo "$CPPFLAGS" | \
14765         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14766                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14767
14768                                 ;;
14769                         esac
14770                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14771                         ;;
14772                 esac
14773                 ;;
14774         (*)
14775                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14776                 ;;
14777         esac
14778         ;;
14779 (yes)
14780         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14781
14782         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14783
14784         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14785                 && test -z "${cf_tst_cflags}" \
14786                 && cf_fix_cppflags=no
14787         ;;
14788 esac
14789 done
14790
14791 if test -n "$cf_new_cflags" ; then
14792
14793         CFLAGS="$CFLAGS $cf_new_cflags"
14794 fi
14795
14796 if test -n "$cf_new_cppflags" ; then
14797
14798         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14799 fi
14800
14801 if test -n "$cf_new_extra_cppflags" ; then
14802
14803         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14804 fi
14805
14806 else
14807         LIB_TRACING=DEBUG
14808         ADA_TRACE=FALSE
14809 fi
14810
14811 echo "$as_me:14811: checking if we want to use GNAT projects" >&5
14812 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14813
14814 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14815 if test "${enable_gnat_projects+set}" = set; then
14816   enableval="$enable_gnat_projects"
14817   test "$enableval" != no && enableval=yes
14818         if test "$enableval" != "yes" ; then
14819     enable_gnat_projects=no
14820         else
14821                 enable_gnat_projects=yes
14822         fi
14823 else
14824   enableval=yes
14825         enable_gnat_projects=yes
14826
14827 fi;
14828 echo "$as_me:14828: result: $enable_gnat_projects" >&5
14829 echo "${ECHO_T}$enable_gnat_projects" >&6
14830
14831 ###     Checks for libraries.
14832 case $cf_cv_system_name in
14833 (*mingw32*|*mingw64*)
14834         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
14835         LIBS=" -lpsapi $LIBS"
14836         ;;
14837 (*)
14838 echo "$as_me:14838: checking for gettimeofday" >&5
14839 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14840 if test "${ac_cv_func_gettimeofday+set}" = set; then
14841   echo $ECHO_N "(cached) $ECHO_C" >&6
14842 else
14843   cat >conftest.$ac_ext <<_ACEOF
14844 #line 14844 "configure"
14845 #include "confdefs.h"
14846 /* System header to define __stub macros and hopefully few prototypes,
14847     which can conflict with char gettimeofday (); below.  */
14848 #include <assert.h>
14849 /* Override any gcc2 internal prototype to avoid an error.  */
14850 #ifdef __cplusplus
14851 extern "C"
14852 #endif
14853 /* We use char because int might match the return type of a gcc2
14854    builtin and then its argument prototype would still apply.  */
14855 char gettimeofday ();
14856 char (*f) ();
14857
14858 int
14859 main ()
14860 {
14861 /* The GNU C library defines this for functions which it implements
14862     to always fail with ENOSYS.  Some functions are actually named
14863     something starting with __ and the normal name is an alias.  */
14864 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14865 choke me
14866 #else
14867 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14868 #endif
14869
14870   ;
14871   return 0;
14872 }
14873 _ACEOF
14874 rm -f conftest.$ac_objext conftest$ac_exeext
14875 if { (eval echo "$as_me:14875: \"$ac_link\"") >&5
14876   (eval $ac_link) 2>&5
14877   ac_status=$?
14878   echo "$as_me:14878: \$? = $ac_status" >&5
14879   (exit $ac_status); } &&
14880          { ac_try='test -s conftest$ac_exeext'
14881   { (eval echo "$as_me:14881: \"$ac_try\"") >&5
14882   (eval $ac_try) 2>&5
14883   ac_status=$?
14884   echo "$as_me:14884: \$? = $ac_status" >&5
14885   (exit $ac_status); }; }; then
14886   ac_cv_func_gettimeofday=yes
14887 else
14888   echo "$as_me: failed program was:" >&5
14889 cat conftest.$ac_ext >&5
14890 ac_cv_func_gettimeofday=no
14891 fi
14892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14893 fi
14894 echo "$as_me:14894: result: $ac_cv_func_gettimeofday" >&5
14895 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14896 if test $ac_cv_func_gettimeofday = yes; then
14897
14898 cat >>confdefs.h <<\EOF
14899 #define HAVE_GETTIMEOFDAY 1
14900 EOF
14901
14902 else
14903
14904 echo "$as_me:14904: checking for gettimeofday in -lbsd" >&5
14905 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14906 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14907   echo $ECHO_N "(cached) $ECHO_C" >&6
14908 else
14909   ac_check_lib_save_LIBS=$LIBS
14910 LIBS="-lbsd  $LIBS"
14911 cat >conftest.$ac_ext <<_ACEOF
14912 #line 14912 "configure"
14913 #include "confdefs.h"
14914
14915 /* Override any gcc2 internal prototype to avoid an error.  */
14916 #ifdef __cplusplus
14917 extern "C"
14918 #endif
14919 /* We use char because int might match the return type of a gcc2
14920    builtin and then its argument prototype would still apply.  */
14921 char gettimeofday ();
14922 int
14923 main ()
14924 {
14925 gettimeofday ();
14926   ;
14927   return 0;
14928 }
14929 _ACEOF
14930 rm -f conftest.$ac_objext conftest$ac_exeext
14931 if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
14932   (eval $ac_link) 2>&5
14933   ac_status=$?
14934   echo "$as_me:14934: \$? = $ac_status" >&5
14935   (exit $ac_status); } &&
14936          { ac_try='test -s conftest$ac_exeext'
14937   { (eval echo "$as_me:14937: \"$ac_try\"") >&5
14938   (eval $ac_try) 2>&5
14939   ac_status=$?
14940   echo "$as_me:14940: \$? = $ac_status" >&5
14941   (exit $ac_status); }; }; then
14942   ac_cv_lib_bsd_gettimeofday=yes
14943 else
14944   echo "$as_me: failed program was:" >&5
14945 cat conftest.$ac_ext >&5
14946 ac_cv_lib_bsd_gettimeofday=no
14947 fi
14948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14949 LIBS=$ac_check_lib_save_LIBS
14950 fi
14951 echo "$as_me:14951: result: $ac_cv_lib_bsd_gettimeofday" >&5
14952 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14953 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14954
14955 cat >>confdefs.h <<\EOF
14956 #define HAVE_GETTIMEOFDAY 1
14957 EOF
14958
14959 cf_add_libs="-lbsd"
14960 # Filter out duplicates - this happens with badly-designed ".pc" files...
14961 for cf_add_1lib in $LIBS
14962 do
14963         for cf_add_2lib in $cf_add_libs
14964         do
14965                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14966                 then
14967                         cf_add_1lib=
14968                         break
14969                 fi
14970         done
14971         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14972 done
14973 LIBS="$cf_add_libs"
14974
14975 fi
14976
14977 fi
14978         ;;
14979 esac
14980
14981 echo "$as_me:14981: checking if -lm needed for math functions" >&5
14982 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14983 if test "${cf_cv_need_libm+set}" = set; then
14984   echo $ECHO_N "(cached) $ECHO_C" >&6
14985 else
14986
14987         cat >conftest.$ac_ext <<_ACEOF
14988 #line 14988 "configure"
14989 #include "confdefs.h"
14990
14991         #include <stdio.h>
14992         #include <math.h>
14993
14994 int
14995 main ()
14996 {
14997 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14998   ;
14999   return 0;
15000 }
15001 _ACEOF
15002 rm -f conftest.$ac_objext conftest$ac_exeext
15003 if { (eval echo "$as_me:15003: \"$ac_link\"") >&5
15004   (eval $ac_link) 2>&5
15005   ac_status=$?
15006   echo "$as_me:15006: \$? = $ac_status" >&5
15007   (exit $ac_status); } &&
15008          { ac_try='test -s conftest$ac_exeext'
15009   { (eval echo "$as_me:15009: \"$ac_try\"") >&5
15010   (eval $ac_try) 2>&5
15011   ac_status=$?
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); }; }; then
15014   cf_cv_need_libm=no
15015 else
15016   echo "$as_me: failed program was:" >&5
15017 cat conftest.$ac_ext >&5
15018 cf_cv_need_libm=yes
15019 fi
15020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15021 fi
15022 echo "$as_me:15022: result: $cf_cv_need_libm" >&5
15023 echo "${ECHO_T}$cf_cv_need_libm" >&6
15024 if test "$cf_cv_need_libm" = yes
15025 then
15026 MATH_LIB=-lm
15027 fi
15028
15029 ###     Checks for header files.
15030 echo "$as_me:15030: checking for ANSI C header files" >&5
15031 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15032 if test "${ac_cv_header_stdc+set}" = set; then
15033   echo $ECHO_N "(cached) $ECHO_C" >&6
15034 else
15035   cat >conftest.$ac_ext <<_ACEOF
15036 #line 15036 "configure"
15037 #include "confdefs.h"
15038 #include <stdlib.h>
15039 #include <stdarg.h>
15040 #include <string.h>
15041 #include <float.h>
15042
15043 _ACEOF
15044 if { (eval echo "$as_me:15044: \"$ac_cpp conftest.$ac_ext\"") >&5
15045   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15046   ac_status=$?
15047   egrep -v '^ *\+' conftest.er1 >conftest.err
15048   rm -f conftest.er1
15049   cat conftest.err >&5
15050   echo "$as_me:15050: \$? = $ac_status" >&5
15051   (exit $ac_status); } >/dev/null; then
15052   if test -s conftest.err; then
15053     ac_cpp_err=$ac_c_preproc_warn_flag
15054   else
15055     ac_cpp_err=
15056   fi
15057 else
15058   ac_cpp_err=yes
15059 fi
15060 if test -z "$ac_cpp_err"; then
15061   ac_cv_header_stdc=yes
15062 else
15063   echo "$as_me: failed program was:" >&5
15064   cat conftest.$ac_ext >&5
15065   ac_cv_header_stdc=no
15066 fi
15067 rm -f conftest.err conftest.$ac_ext
15068
15069 if test $ac_cv_header_stdc = yes; then
15070   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15071   cat >conftest.$ac_ext <<_ACEOF
15072 #line 15072 "configure"
15073 #include "confdefs.h"
15074 #include <string.h>
15075
15076 _ACEOF
15077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15078   egrep "memchr" >/dev/null 2>&1; then
15079   :
15080 else
15081   ac_cv_header_stdc=no
15082 fi
15083 rm -rf conftest*
15084
15085 fi
15086
15087 if test $ac_cv_header_stdc = yes; then
15088   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15089   cat >conftest.$ac_ext <<_ACEOF
15090 #line 15090 "configure"
15091 #include "confdefs.h"
15092 #include <stdlib.h>
15093
15094 _ACEOF
15095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15096   egrep "free" >/dev/null 2>&1; then
15097   :
15098 else
15099   ac_cv_header_stdc=no
15100 fi
15101 rm -rf conftest*
15102
15103 fi
15104
15105 if test $ac_cv_header_stdc = yes; then
15106   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15107   if test "$cross_compiling" = yes; then
15108   :
15109 else
15110   cat >conftest.$ac_ext <<_ACEOF
15111 #line 15111 "configure"
15112 #include "confdefs.h"
15113 #include <ctype.h>
15114 #if ((' ' & 0x0FF) == 0x020)
15115 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15116 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15117 #else
15118 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15119                      || ('j' <= (c) && (c) <= 'r') \
15120                      || ('s' <= (c) && (c) <= 'z'))
15121 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15122 #endif
15123
15124 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15125 int
15126 main ()
15127 {
15128   int i;
15129   for (i = 0; i < 256; i++)
15130     if (XOR (islower (i), ISLOWER (i))
15131         || toupper (i) != TOUPPER (i))
15132       $ac_main_return(2);
15133   $ac_main_return (0);
15134 }
15135 _ACEOF
15136 rm -f conftest$ac_exeext
15137 if { (eval echo "$as_me:15137: \"$ac_link\"") >&5
15138   (eval $ac_link) 2>&5
15139   ac_status=$?
15140   echo "$as_me:15140: \$? = $ac_status" >&5
15141   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15142   { (eval echo "$as_me:15142: \"$ac_try\"") >&5
15143   (eval $ac_try) 2>&5
15144   ac_status=$?
15145   echo "$as_me:15145: \$? = $ac_status" >&5
15146   (exit $ac_status); }; }; then
15147   :
15148 else
15149   echo "$as_me: program exited with status $ac_status" >&5
15150 echo "$as_me: failed program was:" >&5
15151 cat conftest.$ac_ext >&5
15152 ac_cv_header_stdc=no
15153 fi
15154 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15155 fi
15156 fi
15157 fi
15158 echo "$as_me:15158: result: $ac_cv_header_stdc" >&5
15159 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15160 if test $ac_cv_header_stdc = yes; then
15161
15162 cat >>confdefs.h <<\EOF
15163 #define STDC_HEADERS 1
15164 EOF
15165
15166 fi
15167
15168 ac_header_dirent=no
15169 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15170   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15171 echo "$as_me:15171: checking for $ac_hdr that defines DIR" >&5
15172 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15173 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15174   echo $ECHO_N "(cached) $ECHO_C" >&6
15175 else
15176   cat >conftest.$ac_ext <<_ACEOF
15177 #line 15177 "configure"
15178 #include "confdefs.h"
15179 #include <sys/types.h>
15180 #include <$ac_hdr>
15181
15182 int
15183 main ()
15184 {
15185 if ((DIR *) 0)
15186 return 0;
15187   ;
15188   return 0;
15189 }
15190 _ACEOF
15191 rm -f conftest.$ac_objext
15192 if { (eval echo "$as_me:15192: \"$ac_compile\"") >&5
15193   (eval $ac_compile) 2>&5
15194   ac_status=$?
15195   echo "$as_me:15195: \$? = $ac_status" >&5
15196   (exit $ac_status); } &&
15197          { ac_try='test -s conftest.$ac_objext'
15198   { (eval echo "$as_me:15198: \"$ac_try\"") >&5
15199   (eval $ac_try) 2>&5
15200   ac_status=$?
15201   echo "$as_me:15201: \$? = $ac_status" >&5
15202   (exit $ac_status); }; }; then
15203   eval "$as_ac_Header=yes"
15204 else
15205   echo "$as_me: failed program was:" >&5
15206 cat conftest.$ac_ext >&5
15207 eval "$as_ac_Header=no"
15208 fi
15209 rm -f conftest.$ac_objext conftest.$ac_ext
15210 fi
15211 echo "$as_me:15211: result: `eval echo '${'$as_ac_Header'}'`" >&5
15212 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15213 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15214   cat >>confdefs.h <<EOF
15215 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15216 EOF
15217
15218 ac_header_dirent=$ac_hdr; break
15219 fi
15220
15221 done
15222 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15223 if test $ac_header_dirent = dirent.h; then
15224   echo "$as_me:15224: checking for opendir in -ldir" >&5
15225 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15226 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15227   echo $ECHO_N "(cached) $ECHO_C" >&6
15228 else
15229   ac_check_lib_save_LIBS=$LIBS
15230 LIBS="-ldir  $LIBS"
15231 cat >conftest.$ac_ext <<_ACEOF
15232 #line 15232 "configure"
15233 #include "confdefs.h"
15234
15235 /* Override any gcc2 internal prototype to avoid an error.  */
15236 #ifdef __cplusplus
15237 extern "C"
15238 #endif
15239 /* We use char because int might match the return type of a gcc2
15240    builtin and then its argument prototype would still apply.  */
15241 char opendir ();
15242 int
15243 main ()
15244 {
15245 opendir ();
15246   ;
15247   return 0;
15248 }
15249 _ACEOF
15250 rm -f conftest.$ac_objext conftest$ac_exeext
15251 if { (eval echo "$as_me:15251: \"$ac_link\"") >&5
15252   (eval $ac_link) 2>&5
15253   ac_status=$?
15254   echo "$as_me:15254: \$? = $ac_status" >&5
15255   (exit $ac_status); } &&
15256          { ac_try='test -s conftest$ac_exeext'
15257   { (eval echo "$as_me:15257: \"$ac_try\"") >&5
15258   (eval $ac_try) 2>&5
15259   ac_status=$?
15260   echo "$as_me:15260: \$? = $ac_status" >&5
15261   (exit $ac_status); }; }; then
15262   ac_cv_lib_dir_opendir=yes
15263 else
15264   echo "$as_me: failed program was:" >&5
15265 cat conftest.$ac_ext >&5
15266 ac_cv_lib_dir_opendir=no
15267 fi
15268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15269 LIBS=$ac_check_lib_save_LIBS
15270 fi
15271 echo "$as_me:15271: result: $ac_cv_lib_dir_opendir" >&5
15272 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15273 if test $ac_cv_lib_dir_opendir = yes; then
15274   LIBS="$LIBS -ldir"
15275 fi
15276
15277 else
15278   echo "$as_me:15278: checking for opendir in -lx" >&5
15279 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15280 if test "${ac_cv_lib_x_opendir+set}" = set; then
15281   echo $ECHO_N "(cached) $ECHO_C" >&6
15282 else
15283   ac_check_lib_save_LIBS=$LIBS
15284 LIBS="-lx  $LIBS"
15285 cat >conftest.$ac_ext <<_ACEOF
15286 #line 15286 "configure"
15287 #include "confdefs.h"
15288
15289 /* Override any gcc2 internal prototype to avoid an error.  */
15290 #ifdef __cplusplus
15291 extern "C"
15292 #endif
15293 /* We use char because int might match the return type of a gcc2
15294    builtin and then its argument prototype would still apply.  */
15295 char opendir ();
15296 int
15297 main ()
15298 {
15299 opendir ();
15300   ;
15301   return 0;
15302 }
15303 _ACEOF
15304 rm -f conftest.$ac_objext conftest$ac_exeext
15305 if { (eval echo "$as_me:15305: \"$ac_link\"") >&5
15306   (eval $ac_link) 2>&5
15307   ac_status=$?
15308   echo "$as_me:15308: \$? = $ac_status" >&5
15309   (exit $ac_status); } &&
15310          { ac_try='test -s conftest$ac_exeext'
15311   { (eval echo "$as_me:15311: \"$ac_try\"") >&5
15312   (eval $ac_try) 2>&5
15313   ac_status=$?
15314   echo "$as_me:15314: \$? = $ac_status" >&5
15315   (exit $ac_status); }; }; then
15316   ac_cv_lib_x_opendir=yes
15317 else
15318   echo "$as_me: failed program was:" >&5
15319 cat conftest.$ac_ext >&5
15320 ac_cv_lib_x_opendir=no
15321 fi
15322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15323 LIBS=$ac_check_lib_save_LIBS
15324 fi
15325 echo "$as_me:15325: result: $ac_cv_lib_x_opendir" >&5
15326 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15327 if test $ac_cv_lib_x_opendir = yes; then
15328   LIBS="$LIBS -lx"
15329 fi
15330
15331 fi
15332
15333 echo "$as_me:15333: checking whether time.h and sys/time.h may both be included" >&5
15334 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15335 if test "${ac_cv_header_time+set}" = set; then
15336   echo $ECHO_N "(cached) $ECHO_C" >&6
15337 else
15338   cat >conftest.$ac_ext <<_ACEOF
15339 #line 15339 "configure"
15340 #include "confdefs.h"
15341 #include <sys/types.h>
15342 #include <sys/time.h>
15343 #include <time.h>
15344
15345 int
15346 main ()
15347 {
15348 if ((struct tm *) 0)
15349 return 0;
15350   ;
15351   return 0;
15352 }
15353 _ACEOF
15354 rm -f conftest.$ac_objext
15355 if { (eval echo "$as_me:15355: \"$ac_compile\"") >&5
15356   (eval $ac_compile) 2>&5
15357   ac_status=$?
15358   echo "$as_me:15358: \$? = $ac_status" >&5
15359   (exit $ac_status); } &&
15360          { ac_try='test -s conftest.$ac_objext'
15361   { (eval echo "$as_me:15361: \"$ac_try\"") >&5
15362   (eval $ac_try) 2>&5
15363   ac_status=$?
15364   echo "$as_me:15364: \$? = $ac_status" >&5
15365   (exit $ac_status); }; }; then
15366   ac_cv_header_time=yes
15367 else
15368   echo "$as_me: failed program was:" >&5
15369 cat conftest.$ac_ext >&5
15370 ac_cv_header_time=no
15371 fi
15372 rm -f conftest.$ac_objext conftest.$ac_ext
15373 fi
15374 echo "$as_me:15374: result: $ac_cv_header_time" >&5
15375 echo "${ECHO_T}$ac_cv_header_time" >&6
15376 if test $ac_cv_header_time = yes; then
15377
15378 cat >>confdefs.h <<\EOF
15379 #define TIME_WITH_SYS_TIME 1
15380 EOF
15381
15382 fi
15383
15384 cf_regex_func=no
15385
15386 cf_regex_libs="regex re"
15387 case $host_os in
15388 (mingw*)
15389         cf_regex_libs="gnurx $cf_regex_libs"
15390         ;;
15391 esac
15392
15393 echo "$as_me:15393: checking for regcomp" >&5
15394 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15395 if test "${ac_cv_func_regcomp+set}" = set; then
15396   echo $ECHO_N "(cached) $ECHO_C" >&6
15397 else
15398   cat >conftest.$ac_ext <<_ACEOF
15399 #line 15399 "configure"
15400 #include "confdefs.h"
15401 /* System header to define __stub macros and hopefully few prototypes,
15402     which can conflict with char regcomp (); below.  */
15403 #include <assert.h>
15404 /* Override any gcc2 internal prototype to avoid an error.  */
15405 #ifdef __cplusplus
15406 extern "C"
15407 #endif
15408 /* We use char because int might match the return type of a gcc2
15409    builtin and then its argument prototype would still apply.  */
15410 char regcomp ();
15411 char (*f) ();
15412
15413 int
15414 main ()
15415 {
15416 /* The GNU C library defines this for functions which it implements
15417     to always fail with ENOSYS.  Some functions are actually named
15418     something starting with __ and the normal name is an alias.  */
15419 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15420 choke me
15421 #else
15422 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15423 #endif
15424
15425   ;
15426   return 0;
15427 }
15428 _ACEOF
15429 rm -f conftest.$ac_objext conftest$ac_exeext
15430 if { (eval echo "$as_me:15430: \"$ac_link\"") >&5
15431   (eval $ac_link) 2>&5
15432   ac_status=$?
15433   echo "$as_me:15433: \$? = $ac_status" >&5
15434   (exit $ac_status); } &&
15435          { ac_try='test -s conftest$ac_exeext'
15436   { (eval echo "$as_me:15436: \"$ac_try\"") >&5
15437   (eval $ac_try) 2>&5
15438   ac_status=$?
15439   echo "$as_me:15439: \$? = $ac_status" >&5
15440   (exit $ac_status); }; }; then
15441   ac_cv_func_regcomp=yes
15442 else
15443   echo "$as_me: failed program was:" >&5
15444 cat conftest.$ac_ext >&5
15445 ac_cv_func_regcomp=no
15446 fi
15447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15448 fi
15449 echo "$as_me:15449: result: $ac_cv_func_regcomp" >&5
15450 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15451 if test $ac_cv_func_regcomp = yes; then
15452   cf_regex_func=regcomp
15453 else
15454
15455         for cf_regex_lib in $cf_regex_libs
15456         do
15457                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15458 echo "$as_me:15458: checking for regcomp in -l$cf_regex_lib" >&5
15459 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15460 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15461   echo $ECHO_N "(cached) $ECHO_C" >&6
15462 else
15463   ac_check_lib_save_LIBS=$LIBS
15464 LIBS="-l$cf_regex_lib  $LIBS"
15465 cat >conftest.$ac_ext <<_ACEOF
15466 #line 15466 "configure"
15467 #include "confdefs.h"
15468
15469 /* Override any gcc2 internal prototype to avoid an error.  */
15470 #ifdef __cplusplus
15471 extern "C"
15472 #endif
15473 /* We use char because int might match the return type of a gcc2
15474    builtin and then its argument prototype would still apply.  */
15475 char regcomp ();
15476 int
15477 main ()
15478 {
15479 regcomp ();
15480   ;
15481   return 0;
15482 }
15483 _ACEOF
15484 rm -f conftest.$ac_objext conftest$ac_exeext
15485 if { (eval echo "$as_me:15485: \"$ac_link\"") >&5
15486   (eval $ac_link) 2>&5
15487   ac_status=$?
15488   echo "$as_me:15488: \$? = $ac_status" >&5
15489   (exit $ac_status); } &&
15490          { ac_try='test -s conftest$ac_exeext'
15491   { (eval echo "$as_me:15491: \"$ac_try\"") >&5
15492   (eval $ac_try) 2>&5
15493   ac_status=$?
15494   echo "$as_me:15494: \$? = $ac_status" >&5
15495   (exit $ac_status); }; }; then
15496   eval "$as_ac_Lib=yes"
15497 else
15498   echo "$as_me: failed program was:" >&5
15499 cat conftest.$ac_ext >&5
15500 eval "$as_ac_Lib=no"
15501 fi
15502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15503 LIBS=$ac_check_lib_save_LIBS
15504 fi
15505 echo "$as_me:15505: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15506 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15507 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15508
15509 cf_add_libs="-l$cf_regex_lib"
15510 # Filter out duplicates - this happens with badly-designed ".pc" files...
15511 for cf_add_1lib in $LIBS
15512 do
15513         for cf_add_2lib in $cf_add_libs
15514         do
15515                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15516                 then
15517                         cf_add_1lib=
15518                         break
15519                 fi
15520         done
15521         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15522 done
15523 LIBS="$cf_add_libs"
15524
15525                                 cf_regex_func=regcomp
15526                                 break
15527 fi
15528
15529         done
15530
15531 fi
15532
15533 if test "$cf_regex_func" = no ; then
15534         echo "$as_me:15534: checking for compile" >&5
15535 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15536 if test "${ac_cv_func_compile+set}" = set; then
15537   echo $ECHO_N "(cached) $ECHO_C" >&6
15538 else
15539   cat >conftest.$ac_ext <<_ACEOF
15540 #line 15540 "configure"
15541 #include "confdefs.h"
15542 /* System header to define __stub macros and hopefully few prototypes,
15543     which can conflict with char compile (); below.  */
15544 #include <assert.h>
15545 /* Override any gcc2 internal prototype to avoid an error.  */
15546 #ifdef __cplusplus
15547 extern "C"
15548 #endif
15549 /* We use char because int might match the return type of a gcc2
15550    builtin and then its argument prototype would still apply.  */
15551 char compile ();
15552 char (*f) ();
15553
15554 int
15555 main ()
15556 {
15557 /* The GNU C library defines this for functions which it implements
15558     to always fail with ENOSYS.  Some functions are actually named
15559     something starting with __ and the normal name is an alias.  */
15560 #if defined (__stub_compile) || defined (__stub___compile)
15561 choke me
15562 #else
15563 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15564 #endif
15565
15566   ;
15567   return 0;
15568 }
15569 _ACEOF
15570 rm -f conftest.$ac_objext conftest$ac_exeext
15571 if { (eval echo "$as_me:15571: \"$ac_link\"") >&5
15572   (eval $ac_link) 2>&5
15573   ac_status=$?
15574   echo "$as_me:15574: \$? = $ac_status" >&5
15575   (exit $ac_status); } &&
15576          { ac_try='test -s conftest$ac_exeext'
15577   { (eval echo "$as_me:15577: \"$ac_try\"") >&5
15578   (eval $ac_try) 2>&5
15579   ac_status=$?
15580   echo "$as_me:15580: \$? = $ac_status" >&5
15581   (exit $ac_status); }; }; then
15582   ac_cv_func_compile=yes
15583 else
15584   echo "$as_me: failed program was:" >&5
15585 cat conftest.$ac_ext >&5
15586 ac_cv_func_compile=no
15587 fi
15588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15589 fi
15590 echo "$as_me:15590: result: $ac_cv_func_compile" >&5
15591 echo "${ECHO_T}$ac_cv_func_compile" >&6
15592 if test $ac_cv_func_compile = yes; then
15593   cf_regex_func=compile
15594 else
15595
15596                 echo "$as_me:15596: checking for compile in -lgen" >&5
15597 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15598 if test "${ac_cv_lib_gen_compile+set}" = set; then
15599   echo $ECHO_N "(cached) $ECHO_C" >&6
15600 else
15601   ac_check_lib_save_LIBS=$LIBS
15602 LIBS="-lgen  $LIBS"
15603 cat >conftest.$ac_ext <<_ACEOF
15604 #line 15604 "configure"
15605 #include "confdefs.h"
15606
15607 /* Override any gcc2 internal prototype to avoid an error.  */
15608 #ifdef __cplusplus
15609 extern "C"
15610 #endif
15611 /* We use char because int might match the return type of a gcc2
15612    builtin and then its argument prototype would still apply.  */
15613 char compile ();
15614 int
15615 main ()
15616 {
15617 compile ();
15618   ;
15619   return 0;
15620 }
15621 _ACEOF
15622 rm -f conftest.$ac_objext conftest$ac_exeext
15623 if { (eval echo "$as_me:15623: \"$ac_link\"") >&5
15624   (eval $ac_link) 2>&5
15625   ac_status=$?
15626   echo "$as_me:15626: \$? = $ac_status" >&5
15627   (exit $ac_status); } &&
15628          { ac_try='test -s conftest$ac_exeext'
15629   { (eval echo "$as_me:15629: \"$ac_try\"") >&5
15630   (eval $ac_try) 2>&5
15631   ac_status=$?
15632   echo "$as_me:15632: \$? = $ac_status" >&5
15633   (exit $ac_status); }; }; then
15634   ac_cv_lib_gen_compile=yes
15635 else
15636   echo "$as_me: failed program was:" >&5
15637 cat conftest.$ac_ext >&5
15638 ac_cv_lib_gen_compile=no
15639 fi
15640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15641 LIBS=$ac_check_lib_save_LIBS
15642 fi
15643 echo "$as_me:15643: result: $ac_cv_lib_gen_compile" >&5
15644 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15645 if test $ac_cv_lib_gen_compile = yes; then
15646
15647 cf_add_libs="-lgen"
15648 # Filter out duplicates - this happens with badly-designed ".pc" files...
15649 for cf_add_1lib in $LIBS
15650 do
15651         for cf_add_2lib in $cf_add_libs
15652         do
15653                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15654                 then
15655                         cf_add_1lib=
15656                         break
15657                 fi
15658         done
15659         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15660 done
15661 LIBS="$cf_add_libs"
15662
15663                                 cf_regex_func=compile
15664 fi
15665
15666 fi
15667
15668 fi
15669
15670 if test "$cf_regex_func" = no ; then
15671         { echo "$as_me:15671: WARNING: cannot find regular expression library" >&5
15672 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15673 fi
15674
15675 echo "$as_me:15675: checking for regular-expression headers" >&5
15676 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15677 if test "${cf_cv_regex_hdrs+set}" = set; then
15678   echo $ECHO_N "(cached) $ECHO_C" >&6
15679 else
15680
15681 cf_cv_regex_hdrs=no
15682 case $cf_regex_func in
15683 (compile)
15684         for cf_regex_hdr in regexp.h regexpr.h
15685         do
15686                 cat >conftest.$ac_ext <<_ACEOF
15687 #line 15687 "configure"
15688 #include "confdefs.h"
15689 #include <$cf_regex_hdr>
15690 int
15691 main ()
15692 {
15693
15694                         char *p = compile("", "", "", 0);
15695                         int x = step("", "");
15696
15697   ;
15698   return 0;
15699 }
15700 _ACEOF
15701 rm -f conftest.$ac_objext conftest$ac_exeext
15702 if { (eval echo "$as_me:15702: \"$ac_link\"") >&5
15703   (eval $ac_link) 2>&5
15704   ac_status=$?
15705   echo "$as_me:15705: \$? = $ac_status" >&5
15706   (exit $ac_status); } &&
15707          { ac_try='test -s conftest$ac_exeext'
15708   { (eval echo "$as_me:15708: \"$ac_try\"") >&5
15709   (eval $ac_try) 2>&5
15710   ac_status=$?
15711   echo "$as_me:15711: \$? = $ac_status" >&5
15712   (exit $ac_status); }; }; then
15713
15714                         cf_cv_regex_hdrs=$cf_regex_hdr
15715                         break
15716
15717 else
15718   echo "$as_me: failed program was:" >&5
15719 cat conftest.$ac_ext >&5
15720 fi
15721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15722         done
15723         ;;
15724 (*)
15725         for cf_regex_hdr in regex.h
15726         do
15727                 cat >conftest.$ac_ext <<_ACEOF
15728 #line 15728 "configure"
15729 #include "confdefs.h"
15730 #include <sys/types.h>
15731 #include <$cf_regex_hdr>
15732 int
15733 main ()
15734 {
15735
15736                         regex_t *p;
15737                         int x = regcomp(p, "", 0);
15738                         int y = regexec(p, "", 0, 0, 0);
15739                         regfree(p);
15740
15741   ;
15742   return 0;
15743 }
15744 _ACEOF
15745 rm -f conftest.$ac_objext conftest$ac_exeext
15746 if { (eval echo "$as_me:15746: \"$ac_link\"") >&5
15747   (eval $ac_link) 2>&5
15748   ac_status=$?
15749   echo "$as_me:15749: \$? = $ac_status" >&5
15750   (exit $ac_status); } &&
15751          { ac_try='test -s conftest$ac_exeext'
15752   { (eval echo "$as_me:15752: \"$ac_try\"") >&5
15753   (eval $ac_try) 2>&5
15754   ac_status=$?
15755   echo "$as_me:15755: \$? = $ac_status" >&5
15756   (exit $ac_status); }; }; then
15757
15758                         cf_cv_regex_hdrs=$cf_regex_hdr
15759                         break
15760
15761 else
15762   echo "$as_me: failed program was:" >&5
15763 cat conftest.$ac_ext >&5
15764 fi
15765 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15766         done
15767         ;;
15768 esac
15769
15770 fi
15771 echo "$as_me:15771: result: $cf_cv_regex_hdrs" >&5
15772 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15773
15774 case $cf_cv_regex_hdrs in
15775         (no)            { echo "$as_me:15775: WARNING: no regular expression header found" >&5
15776 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15777         (regex.h)
15778 cat >>confdefs.h <<\EOF
15779 #define HAVE_REGEX_H_FUNCS 1
15780 EOF
15781  ;;
15782         (regexp.h)
15783 cat >>confdefs.h <<\EOF
15784 #define HAVE_REGEXP_H_FUNCS 1
15785 EOF
15786  ;;
15787         (regexpr.h)
15788 cat >>confdefs.h <<\EOF
15789 #define HAVE_REGEXPR_H_FUNCS 1
15790 EOF
15791  ;;
15792 esac
15793
15794 for ac_header in \
15795 fcntl.h \
15796 getopt.h \
15797 limits.h \
15798 locale.h \
15799 math.h \
15800 poll.h \
15801 sys/bsdtypes.h \
15802 sys/ioctl.h \
15803 sys/param.h \
15804 sys/poll.h \
15805 sys/select.h \
15806 sys/time.h \
15807 sys/times.h \
15808 ttyent.h \
15809 unistd.h \
15810 wctype.h \
15811
15812 do
15813 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15814 echo "$as_me:15814: checking for $ac_header" >&5
15815 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15816 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15817   echo $ECHO_N "(cached) $ECHO_C" >&6
15818 else
15819   cat >conftest.$ac_ext <<_ACEOF
15820 #line 15820 "configure"
15821 #include "confdefs.h"
15822 #include <$ac_header>
15823 _ACEOF
15824 if { (eval echo "$as_me:15824: \"$ac_cpp conftest.$ac_ext\"") >&5
15825   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15826   ac_status=$?
15827   egrep -v '^ *\+' conftest.er1 >conftest.err
15828   rm -f conftest.er1
15829   cat conftest.err >&5
15830   echo "$as_me:15830: \$? = $ac_status" >&5
15831   (exit $ac_status); } >/dev/null; then
15832   if test -s conftest.err; then
15833     ac_cpp_err=$ac_c_preproc_warn_flag
15834   else
15835     ac_cpp_err=
15836   fi
15837 else
15838   ac_cpp_err=yes
15839 fi
15840 if test -z "$ac_cpp_err"; then
15841   eval "$as_ac_Header=yes"
15842 else
15843   echo "$as_me: failed program was:" >&5
15844   cat conftest.$ac_ext >&5
15845   eval "$as_ac_Header=no"
15846 fi
15847 rm -f conftest.err conftest.$ac_ext
15848 fi
15849 echo "$as_me:15849: result: `eval echo '${'$as_ac_Header'}'`" >&5
15850 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15851 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15852   cat >>confdefs.h <<EOF
15853 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15854 EOF
15855
15856 fi
15857 done
15858
15859 for ac_header in unistd.h getopt.h
15860 do
15861 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15862 echo "$as_me:15862: checking for $ac_header" >&5
15863 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15864 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15865   echo $ECHO_N "(cached) $ECHO_C" >&6
15866 else
15867   cat >conftest.$ac_ext <<_ACEOF
15868 #line 15868 "configure"
15869 #include "confdefs.h"
15870 #include <$ac_header>
15871 _ACEOF
15872 if { (eval echo "$as_me:15872: \"$ac_cpp conftest.$ac_ext\"") >&5
15873   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15874   ac_status=$?
15875   egrep -v '^ *\+' conftest.er1 >conftest.err
15876   rm -f conftest.er1
15877   cat conftest.err >&5
15878   echo "$as_me:15878: \$? = $ac_status" >&5
15879   (exit $ac_status); } >/dev/null; then
15880   if test -s conftest.err; then
15881     ac_cpp_err=$ac_c_preproc_warn_flag
15882   else
15883     ac_cpp_err=
15884   fi
15885 else
15886   ac_cpp_err=yes
15887 fi
15888 if test -z "$ac_cpp_err"; then
15889   eval "$as_ac_Header=yes"
15890 else
15891   echo "$as_me: failed program was:" >&5
15892   cat conftest.$ac_ext >&5
15893   eval "$as_ac_Header=no"
15894 fi
15895 rm -f conftest.err conftest.$ac_ext
15896 fi
15897 echo "$as_me:15897: result: `eval echo '${'$as_ac_Header'}'`" >&5
15898 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15899 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15900   cat >>confdefs.h <<EOF
15901 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15902 EOF
15903
15904 fi
15905 done
15906
15907 echo "$as_me:15907: checking for header declaring getopt variables" >&5
15908 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15909 if test "${cf_cv_getopt_header+set}" = set; then
15910   echo $ECHO_N "(cached) $ECHO_C" >&6
15911 else
15912
15913 cf_cv_getopt_header=none
15914 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15915 do
15916 cat >conftest.$ac_ext <<_ACEOF
15917 #line 15917 "configure"
15918 #include "confdefs.h"
15919
15920 #include <$cf_header>
15921 int
15922 main ()
15923 {
15924 int x = optind; char *y = optarg
15925   ;
15926   return 0;
15927 }
15928 _ACEOF
15929 rm -f conftest.$ac_objext
15930 if { (eval echo "$as_me:15930: \"$ac_compile\"") >&5
15931   (eval $ac_compile) 2>&5
15932   ac_status=$?
15933   echo "$as_me:15933: \$? = $ac_status" >&5
15934   (exit $ac_status); } &&
15935          { ac_try='test -s conftest.$ac_objext'
15936   { (eval echo "$as_me:15936: \"$ac_try\"") >&5
15937   (eval $ac_try) 2>&5
15938   ac_status=$?
15939   echo "$as_me:15939: \$? = $ac_status" >&5
15940   (exit $ac_status); }; }; then
15941   cf_cv_getopt_header=$cf_header
15942  break
15943 else
15944   echo "$as_me: failed program was:" >&5
15945 cat conftest.$ac_ext >&5
15946 fi
15947 rm -f conftest.$ac_objext conftest.$ac_ext
15948 done
15949
15950 fi
15951 echo "$as_me:15951: result: $cf_cv_getopt_header" >&5
15952 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15953 if test $cf_cv_getopt_header != none ; then
15954
15955 cat >>confdefs.h <<\EOF
15956 #define HAVE_GETOPT_HEADER 1
15957 EOF
15958
15959 fi
15960 if test $cf_cv_getopt_header = getopt.h ; then
15961
15962 cat >>confdefs.h <<\EOF
15963 #define NEED_GETOPT_H 1
15964 EOF
15965
15966 fi
15967
15968 # check for ISC (this may also define _POSIX_SOURCE)
15969 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15970 if test "x$ISC" = xyes ; then
15971
15972 echo "$as_me:15972: checking for main in -lcposix" >&5
15973 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15974 if test "${ac_cv_lib_cposix_main+set}" = set; then
15975   echo $ECHO_N "(cached) $ECHO_C" >&6
15976 else
15977   ac_check_lib_save_LIBS=$LIBS
15978 LIBS="-lcposix  $LIBS"
15979 cat >conftest.$ac_ext <<_ACEOF
15980 #line 15980 "configure"
15981 #include "confdefs.h"
15982
15983 int
15984 main ()
15985 {
15986 main ();
15987   ;
15988   return 0;
15989 }
15990 _ACEOF
15991 rm -f conftest.$ac_objext conftest$ac_exeext
15992 if { (eval echo "$as_me:15992: \"$ac_link\"") >&5
15993   (eval $ac_link) 2>&5
15994   ac_status=$?
15995   echo "$as_me:15995: \$? = $ac_status" >&5
15996   (exit $ac_status); } &&
15997          { ac_try='test -s conftest$ac_exeext'
15998   { (eval echo "$as_me:15998: \"$ac_try\"") >&5
15999   (eval $ac_try) 2>&5
16000   ac_status=$?
16001   echo "$as_me:16001: \$? = $ac_status" >&5
16002   (exit $ac_status); }; }; then
16003   ac_cv_lib_cposix_main=yes
16004 else
16005   echo "$as_me: failed program was:" >&5
16006 cat conftest.$ac_ext >&5
16007 ac_cv_lib_cposix_main=no
16008 fi
16009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16010 LIBS=$ac_check_lib_save_LIBS
16011 fi
16012 echo "$as_me:16012: result: $ac_cv_lib_cposix_main" >&5
16013 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16014 if test $ac_cv_lib_cposix_main = yes; then
16015   cat >>confdefs.h <<EOF
16016 #define HAVE_LIBCPOSIX 1
16017 EOF
16018
16019   LIBS="-lcposix $LIBS"
16020
16021 fi
16022
16023         echo "$as_me:16023: checking for bzero in -linet" >&5
16024 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16025 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16026   echo $ECHO_N "(cached) $ECHO_C" >&6
16027 else
16028   ac_check_lib_save_LIBS=$LIBS
16029 LIBS="-linet  $LIBS"
16030 cat >conftest.$ac_ext <<_ACEOF
16031 #line 16031 "configure"
16032 #include "confdefs.h"
16033
16034 /* Override any gcc2 internal prototype to avoid an error.  */
16035 #ifdef __cplusplus
16036 extern "C"
16037 #endif
16038 /* We use char because int might match the return type of a gcc2
16039    builtin and then its argument prototype would still apply.  */
16040 char bzero ();
16041 int
16042 main ()
16043 {
16044 bzero ();
16045   ;
16046   return 0;
16047 }
16048 _ACEOF
16049 rm -f conftest.$ac_objext conftest$ac_exeext
16050 if { (eval echo "$as_me:16050: \"$ac_link\"") >&5
16051   (eval $ac_link) 2>&5
16052   ac_status=$?
16053   echo "$as_me:16053: \$? = $ac_status" >&5
16054   (exit $ac_status); } &&
16055          { ac_try='test -s conftest$ac_exeext'
16056   { (eval echo "$as_me:16056: \"$ac_try\"") >&5
16057   (eval $ac_try) 2>&5
16058   ac_status=$?
16059   echo "$as_me:16059: \$? = $ac_status" >&5
16060   (exit $ac_status); }; }; then
16061   ac_cv_lib_inet_bzero=yes
16062 else
16063   echo "$as_me: failed program was:" >&5
16064 cat conftest.$ac_ext >&5
16065 ac_cv_lib_inet_bzero=no
16066 fi
16067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16068 LIBS=$ac_check_lib_save_LIBS
16069 fi
16070 echo "$as_me:16070: result: $ac_cv_lib_inet_bzero" >&5
16071 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16072 if test $ac_cv_lib_inet_bzero = yes; then
16073
16074 cf_add_libs="-linet"
16075 # Filter out duplicates - this happens with badly-designed ".pc" files...
16076 for cf_add_1lib in $LIBS
16077 do
16078         for cf_add_2lib in $cf_add_libs
16079         do
16080                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16081                 then
16082                         cf_add_1lib=
16083                         break
16084                 fi
16085         done
16086         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16087 done
16088 LIBS="$cf_add_libs"
16089
16090 fi
16091 fi
16092
16093 echo "$as_me:16093: checking if sys/time.h works with sys/select.h" >&5
16094 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16095 if test "${cf_cv_sys_time_select+set}" = set; then
16096   echo $ECHO_N "(cached) $ECHO_C" >&6
16097 else
16098
16099 cat >conftest.$ac_ext <<_ACEOF
16100 #line 16100 "configure"
16101 #include "confdefs.h"
16102
16103 #include <sys/types.h>
16104 #ifdef HAVE_SYS_TIME_H
16105 #include <sys/time.h>
16106 #endif
16107 #ifdef HAVE_SYS_SELECT_H
16108 #include <sys/select.h>
16109 #endif
16110
16111 int
16112 main ()
16113 {
16114
16115   ;
16116   return 0;
16117 }
16118 _ACEOF
16119 rm -f conftest.$ac_objext
16120 if { (eval echo "$as_me:16120: \"$ac_compile\"") >&5
16121   (eval $ac_compile) 2>&5
16122   ac_status=$?
16123   echo "$as_me:16123: \$? = $ac_status" >&5
16124   (exit $ac_status); } &&
16125          { ac_try='test -s conftest.$ac_objext'
16126   { (eval echo "$as_me:16126: \"$ac_try\"") >&5
16127   (eval $ac_try) 2>&5
16128   ac_status=$?
16129   echo "$as_me:16129: \$? = $ac_status" >&5
16130   (exit $ac_status); }; }; then
16131   cf_cv_sys_time_select=yes
16132 else
16133   echo "$as_me: failed program was:" >&5
16134 cat conftest.$ac_ext >&5
16135 cf_cv_sys_time_select=no
16136 fi
16137 rm -f conftest.$ac_objext conftest.$ac_ext
16138
16139 fi
16140
16141 echo "$as_me:16141: result: $cf_cv_sys_time_select" >&5
16142 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16143 test "$cf_cv_sys_time_select" = yes &&
16144 cat >>confdefs.h <<\EOF
16145 #define HAVE_SYS_TIME_SELECT 1
16146 EOF
16147
16148 ###     checks for compiler characteristics
16149 ac_ext=c
16150 ac_cpp='$CPP $CPPFLAGS'
16151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16154 ac_main_return=return
16155
16156 echo "$as_me:16156: checking for an ANSI C-conforming const" >&5
16157 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16158 if test "${ac_cv_c_const+set}" = set; then
16159   echo $ECHO_N "(cached) $ECHO_C" >&6
16160 else
16161   cat >conftest.$ac_ext <<_ACEOF
16162 #line 16162 "configure"
16163 #include "confdefs.h"
16164
16165 int
16166 main ()
16167 {
16168 /* FIXME: Include the comments suggested by Paul. */
16169 #ifndef __cplusplus
16170   /* Ultrix mips cc rejects this.  */
16171   typedef int charset[2];
16172   const charset x;
16173   /* SunOS 4.1.1 cc rejects this.  */
16174   char const *const *ccp;
16175   char **p;
16176   /* NEC SVR4.0.2 mips cc rejects this.  */
16177   struct point {int x, y;};
16178   static struct point const zero = {0,0};
16179   /* AIX XL C 1.02.0.0 rejects this.
16180      It does not let you subtract one const X* pointer from another in
16181      an arm of an if-expression whose if-part is not a constant
16182      expression */
16183   const char *g = "string";
16184   ccp = &g + (g ? g-g : 0);
16185   /* HPUX 7.0 cc rejects these. */
16186   ++ccp;
16187   p = (char**) ccp;
16188   ccp = (char const *const *) p;
16189   { /* SCO 3.2v4 cc rejects this.  */
16190     char *t;
16191     char const *s = 0 ? (char *) 0 : (char const *) 0;
16192
16193     *t++ = 0;
16194   }
16195   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16196     int x[] = {25, 17};
16197     const int *foo = &x[0];
16198     ++foo;
16199   }
16200   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16201     typedef const int *iptr;
16202     iptr p = 0;
16203     ++p;
16204   }
16205   { /* AIX XL C 1.02.0.0 rejects this saying
16206        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16207     struct s { int j; const int *ap[3]; };
16208     struct s *b; b->j = 5;
16209   }
16210   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16211     const int foo = 10;
16212   }
16213 #endif
16214
16215   ;
16216   return 0;
16217 }
16218 _ACEOF
16219 rm -f conftest.$ac_objext
16220 if { (eval echo "$as_me:16220: \"$ac_compile\"") >&5
16221   (eval $ac_compile) 2>&5
16222   ac_status=$?
16223   echo "$as_me:16223: \$? = $ac_status" >&5
16224   (exit $ac_status); } &&
16225          { ac_try='test -s conftest.$ac_objext'
16226   { (eval echo "$as_me:16226: \"$ac_try\"") >&5
16227   (eval $ac_try) 2>&5
16228   ac_status=$?
16229   echo "$as_me:16229: \$? = $ac_status" >&5
16230   (exit $ac_status); }; }; then
16231   ac_cv_c_const=yes
16232 else
16233   echo "$as_me: failed program was:" >&5
16234 cat conftest.$ac_ext >&5
16235 ac_cv_c_const=no
16236 fi
16237 rm -f conftest.$ac_objext conftest.$ac_ext
16238 fi
16239 echo "$as_me:16239: result: $ac_cv_c_const" >&5
16240 echo "${ECHO_T}$ac_cv_c_const" >&6
16241 if test $ac_cv_c_const = no; then
16242
16243 cat >>confdefs.h <<\EOF
16244 #define const
16245 EOF
16246
16247 fi
16248
16249 echo "$as_me:16249: checking for inline" >&5
16250 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16251 if test "${ac_cv_c_inline+set}" = set; then
16252   echo $ECHO_N "(cached) $ECHO_C" >&6
16253 else
16254   ac_cv_c_inline=no
16255 for ac_kw in inline __inline__ __inline; do
16256   cat >conftest.$ac_ext <<_ACEOF
16257 #line 16257 "configure"
16258 #include "confdefs.h"
16259 #ifndef __cplusplus
16260 static $ac_kw int static_foo () {return 0; }
16261 $ac_kw int foo () {return 0; }
16262 #endif
16263
16264 _ACEOF
16265 rm -f conftest.$ac_objext
16266 if { (eval echo "$as_me:16266: \"$ac_compile\"") >&5
16267   (eval $ac_compile) 2>&5
16268   ac_status=$?
16269   echo "$as_me:16269: \$? = $ac_status" >&5
16270   (exit $ac_status); } &&
16271          { ac_try='test -s conftest.$ac_objext'
16272   { (eval echo "$as_me:16272: \"$ac_try\"") >&5
16273   (eval $ac_try) 2>&5
16274   ac_status=$?
16275   echo "$as_me:16275: \$? = $ac_status" >&5
16276   (exit $ac_status); }; }; then
16277   ac_cv_c_inline=$ac_kw; break
16278 else
16279   echo "$as_me: failed program was:" >&5
16280 cat conftest.$ac_ext >&5
16281 fi
16282 rm -f conftest.$ac_objext conftest.$ac_ext
16283 done
16284
16285 fi
16286 echo "$as_me:16286: result: $ac_cv_c_inline" >&5
16287 echo "${ECHO_T}$ac_cv_c_inline" >&6
16288 case $ac_cv_c_inline in
16289   inline | yes) ;;
16290   no)
16291 cat >>confdefs.h <<\EOF
16292 #define inline
16293 EOF
16294  ;;
16295   *)  cat >>confdefs.h <<EOF
16296 #define inline $ac_cv_c_inline
16297 EOF
16298  ;;
16299 esac
16300
16301 NCURSES_INLINE=
16302 if test "$ac_cv_c_inline" != no ; then
16303         NCURSES_INLINE=inline
16304         if test "$INTEL_COMPILER" = yes
16305         then
16306                 :
16307         elif test "$CLANG_COMPILER" = yes
16308         then
16309                 :
16310         elif test "$GCC" = yes
16311         then
16312                 echo "$as_me:16312: checking if $CC supports options to tune inlining" >&5
16313 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16314 if test "${cf_cv_gcc_inline+set}" = set; then
16315   echo $ECHO_N "(cached) $ECHO_C" >&6
16316 else
16317
16318                 cf_save_CFLAGS=$CFLAGS
16319                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16320                 cat >conftest.$ac_ext <<_ACEOF
16321 #line 16321 "configure"
16322 #include "confdefs.h"
16323 inline int foo(void) { return 1; }
16324 int
16325 main ()
16326 {
16327 ${cf_cv_main_return:-return} foo()
16328   ;
16329   return 0;
16330 }
16331 _ACEOF
16332 rm -f conftest.$ac_objext
16333 if { (eval echo "$as_me:16333: \"$ac_compile\"") >&5
16334   (eval $ac_compile) 2>&5
16335   ac_status=$?
16336   echo "$as_me:16336: \$? = $ac_status" >&5
16337   (exit $ac_status); } &&
16338          { ac_try='test -s conftest.$ac_objext'
16339   { (eval echo "$as_me:16339: \"$ac_try\"") >&5
16340   (eval $ac_try) 2>&5
16341   ac_status=$?
16342   echo "$as_me:16342: \$? = $ac_status" >&5
16343   (exit $ac_status); }; }; then
16344   cf_cv_gcc_inline=yes
16345 else
16346   echo "$as_me: failed program was:" >&5
16347 cat conftest.$ac_ext >&5
16348 cf_cv_gcc_inline=no
16349 fi
16350 rm -f conftest.$ac_objext conftest.$ac_ext
16351                 CFLAGS=$cf_save_CFLAGS
16352
16353 fi
16354 echo "$as_me:16354: result: $cf_cv_gcc_inline" >&5
16355 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16356                 if test "$cf_cv_gcc_inline" = yes ; then
16357
16358 cf_fix_cppflags=no
16359 cf_new_cflags=
16360 cf_new_cppflags=
16361 cf_new_extra_cppflags=
16362
16363 for cf_add_cflags in --param max-inline-insns-single=1200
16364 do
16365 case $cf_fix_cppflags in
16366 (no)
16367         case $cf_add_cflags in
16368         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16369                 case $cf_add_cflags in
16370                 (-D*)
16371                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16372
16373                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16374                                 && test -z "${cf_tst_cflags}" \
16375                                 && cf_fix_cppflags=yes
16376
16377                         if test $cf_fix_cppflags = yes ; then
16378                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16379                                 continue
16380                         elif test "${cf_tst_cflags}" = "\"'" ; then
16381                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16382                                 continue
16383                         fi
16384                         ;;
16385                 esac
16386                 case "$CPPFLAGS" in
16387                 (*$cf_add_cflags)
16388                         ;;
16389                 (*)
16390                         case $cf_add_cflags in
16391                         (-D*)
16392                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16393
16394 CPPFLAGS=`echo "$CPPFLAGS" | \
16395         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16396                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16397
16398                                 ;;
16399                         esac
16400                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16401                         ;;
16402                 esac
16403                 ;;
16404         (*)
16405                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16406                 ;;
16407         esac
16408         ;;
16409 (yes)
16410         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16411
16412         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16413
16414         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16415                 && test -z "${cf_tst_cflags}" \
16416                 && cf_fix_cppflags=no
16417         ;;
16418 esac
16419 done
16420
16421 if test -n "$cf_new_cflags" ; then
16422
16423         CFLAGS="$CFLAGS $cf_new_cflags"
16424 fi
16425
16426 if test -n "$cf_new_cppflags" ; then
16427
16428         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16429 fi
16430
16431 if test -n "$cf_new_extra_cppflags" ; then
16432
16433         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16434 fi
16435
16436                 fi
16437         fi
16438 fi
16439
16440 echo "$as_me:16440: checking for signal global datatype" >&5
16441 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16442 if test "${cf_cv_sig_atomic_t+set}" = set; then
16443   echo $ECHO_N "(cached) $ECHO_C" >&6
16444 else
16445
16446         for cf_type in \
16447                 "volatile sig_atomic_t" \
16448                 "sig_atomic_t" \
16449                 "int"
16450         do
16451         cat >conftest.$ac_ext <<_ACEOF
16452 #line 16452 "configure"
16453 #include "confdefs.h"
16454
16455 #include <sys/types.h>
16456 #include <signal.h>
16457 #include <stdio.h>
16458
16459 extern $cf_type x;
16460 $cf_type x;
16461 static void handler(int sig)
16462 {
16463         x = 5;
16464 }
16465 int
16466 main ()
16467 {
16468 signal(SIGINT, handler);
16469                  x = 1
16470   ;
16471   return 0;
16472 }
16473 _ACEOF
16474 rm -f conftest.$ac_objext
16475 if { (eval echo "$as_me:16475: \"$ac_compile\"") >&5
16476   (eval $ac_compile) 2>&5
16477   ac_status=$?
16478   echo "$as_me:16478: \$? = $ac_status" >&5
16479   (exit $ac_status); } &&
16480          { ac_try='test -s conftest.$ac_objext'
16481   { (eval echo "$as_me:16481: \"$ac_try\"") >&5
16482   (eval $ac_try) 2>&5
16483   ac_status=$?
16484   echo "$as_me:16484: \$? = $ac_status" >&5
16485   (exit $ac_status); }; }; then
16486   cf_cv_sig_atomic_t=$cf_type
16487 else
16488   echo "$as_me: failed program was:" >&5
16489 cat conftest.$ac_ext >&5
16490 cf_cv_sig_atomic_t=no
16491 fi
16492 rm -f conftest.$ac_objext conftest.$ac_ext
16493                 test "$cf_cv_sig_atomic_t" != no && break
16494         done
16495
16496 fi
16497
16498 echo "$as_me:16498: result: $cf_cv_sig_atomic_t" >&5
16499 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16500 test "$cf_cv_sig_atomic_t" != no &&
16501 cat >>confdefs.h <<EOF
16502 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16503 EOF
16504
16505 if test $NCURSES_CHTYPE = auto ; then
16506
16507 echo "$as_me:16507: checking for type of chtype" >&5
16508 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16509 if test "${cf_cv_typeof_chtype+set}" = set; then
16510   echo $ECHO_N "(cached) $ECHO_C" >&6
16511 else
16512
16513                 if test "$cross_compiling" = yes; then
16514   cf_cv_typeof_chtype=long
16515 else
16516   cat >conftest.$ac_ext <<_ACEOF
16517 #line 16517 "configure"
16518 #include "confdefs.h"
16519
16520 #define WANT_BITS 31
16521 #include <stdio.h>
16522 int main()
16523 {
16524         FILE *fp = fopen("cf_test.out", "w");
16525         if (fp != 0) {
16526                 char *result = "long";
16527                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16528                         int n;
16529                         unsigned int x, y;
16530                         for (n = 0; n < WANT_BITS; n++) {
16531                                 x = (1 << n);
16532                                 y = (x >> n);
16533                                 if (y != 1 || x == 0) {
16534                                         x = 0;
16535                                         break;
16536                                 }
16537                         }
16538                         /*
16539                          * If x is nonzero, an int is big enough for the bits
16540                          * that we want.
16541                          */
16542                         result = (x != 0) ? "int" : "long";
16543                 }
16544                 fputs(result, fp);
16545                 fclose(fp);
16546         }
16547         ${cf_cv_main_return:-return}(0);
16548 }
16549
16550 _ACEOF
16551 rm -f conftest$ac_exeext
16552 if { (eval echo "$as_me:16552: \"$ac_link\"") >&5
16553   (eval $ac_link) 2>&5
16554   ac_status=$?
16555   echo "$as_me:16555: \$? = $ac_status" >&5
16556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16557   { (eval echo "$as_me:16557: \"$ac_try\"") >&5
16558   (eval $ac_try) 2>&5
16559   ac_status=$?
16560   echo "$as_me:16560: \$? = $ac_status" >&5
16561   (exit $ac_status); }; }; then
16562   cf_cv_typeof_chtype=`cat cf_test.out`
16563 else
16564   echo "$as_me: program exited with status $ac_status" >&5
16565 echo "$as_me: failed program was:" >&5
16566 cat conftest.$ac_ext >&5
16567 cf_cv_typeof_chtype=long
16568 fi
16569 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16570 fi
16571                 rm -f cf_test.out
16572
16573 fi
16574
16575 echo "$as_me:16575: result: $cf_cv_typeof_chtype" >&5
16576 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16577
16578 cat >>confdefs.h <<EOF
16579 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16580 EOF
16581
16582 else
16583         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16584 fi
16585 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16586
16587 echo "$as_me:16587: checking if unsigned literals are legal" >&5
16588 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16589 if test "${cf_cv_unsigned_literals+set}" = set; then
16590   echo $ECHO_N "(cached) $ECHO_C" >&6
16591 else
16592
16593         cat >conftest.$ac_ext <<_ACEOF
16594 #line 16594 "configure"
16595 #include "confdefs.h"
16596
16597 int
16598 main ()
16599 {
16600 long x = 1L + 1UL + 1U + 1
16601   ;
16602   return 0;
16603 }
16604 _ACEOF
16605 rm -f conftest.$ac_objext
16606 if { (eval echo "$as_me:16606: \"$ac_compile\"") >&5
16607   (eval $ac_compile) 2>&5
16608   ac_status=$?
16609   echo "$as_me:16609: \$? = $ac_status" >&5
16610   (exit $ac_status); } &&
16611          { ac_try='test -s conftest.$ac_objext'
16612   { (eval echo "$as_me:16612: \"$ac_try\"") >&5
16613   (eval $ac_try) 2>&5
16614   ac_status=$?
16615   echo "$as_me:16615: \$? = $ac_status" >&5
16616   (exit $ac_status); }; }; then
16617   cf_cv_unsigned_literals=yes
16618 else
16619   echo "$as_me: failed program was:" >&5
16620 cat conftest.$ac_ext >&5
16621 cf_cv_unsigned_literals=no
16622 fi
16623 rm -f conftest.$ac_objext conftest.$ac_ext
16624
16625 fi
16626
16627 echo "$as_me:16627: result: $cf_cv_unsigned_literals" >&5
16628 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16629
16630 cf_cv_1UL="1"
16631 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16632 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16633
16634 if test $NCURSES_MMASK_T = auto ; then
16635         cf_cv_typeof_mmask_t=long
16636 else
16637         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16638 fi
16639 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16640
16641 ###     Checks for external-data
16642
16643 echo "$as_me:16643: checking if external errno is declared" >&5
16644 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16645 if test "${cf_cv_dcl_errno+set}" = set; then
16646   echo $ECHO_N "(cached) $ECHO_C" >&6
16647 else
16648
16649         cat >conftest.$ac_ext <<_ACEOF
16650 #line 16650 "configure"
16651 #include "confdefs.h"
16652
16653 #ifdef HAVE_STDLIB_H
16654 #include <stdlib.h>
16655 #endif
16656 #include <stdio.h>
16657 #include <sys/types.h>
16658 #include <errno.h>
16659 int
16660 main ()
16661 {
16662 int x = (int) errno
16663   ;
16664   return 0;
16665 }
16666 _ACEOF
16667 rm -f conftest.$ac_objext
16668 if { (eval echo "$as_me:16668: \"$ac_compile\"") >&5
16669   (eval $ac_compile) 2>&5
16670   ac_status=$?
16671   echo "$as_me:16671: \$? = $ac_status" >&5
16672   (exit $ac_status); } &&
16673          { ac_try='test -s conftest.$ac_objext'
16674   { (eval echo "$as_me:16674: \"$ac_try\"") >&5
16675   (eval $ac_try) 2>&5
16676   ac_status=$?
16677   echo "$as_me:16677: \$? = $ac_status" >&5
16678   (exit $ac_status); }; }; then
16679   cf_cv_dcl_errno=yes
16680 else
16681   echo "$as_me: failed program was:" >&5
16682 cat conftest.$ac_ext >&5
16683 cf_cv_dcl_errno=no
16684 fi
16685 rm -f conftest.$ac_objext conftest.$ac_ext
16686
16687 fi
16688 echo "$as_me:16688: result: $cf_cv_dcl_errno" >&5
16689 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16690
16691 if test "$cf_cv_dcl_errno" = no ; then
16692
16693 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16694
16695         cat >>confdefs.h <<EOF
16696 #define $cf_result 1
16697 EOF
16698
16699 fi
16700
16701 # It's possible (for near-UNIX clones) that the data doesn't exist
16702
16703 echo "$as_me:16703: checking if external errno exists" >&5
16704 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16705 if test "${cf_cv_have_errno+set}" = set; then
16706   echo $ECHO_N "(cached) $ECHO_C" >&6
16707 else
16708
16709         cat >conftest.$ac_ext <<_ACEOF
16710 #line 16710 "configure"
16711 #include "confdefs.h"
16712
16713 #undef errno
16714 extern int errno;
16715
16716 int
16717 main ()
16718 {
16719 errno = 2
16720   ;
16721   return 0;
16722 }
16723 _ACEOF
16724 rm -f conftest.$ac_objext conftest$ac_exeext
16725 if { (eval echo "$as_me:16725: \"$ac_link\"") >&5
16726   (eval $ac_link) 2>&5
16727   ac_status=$?
16728   echo "$as_me:16728: \$? = $ac_status" >&5
16729   (exit $ac_status); } &&
16730          { ac_try='test -s conftest$ac_exeext'
16731   { (eval echo "$as_me:16731: \"$ac_try\"") >&5
16732   (eval $ac_try) 2>&5
16733   ac_status=$?
16734   echo "$as_me:16734: \$? = $ac_status" >&5
16735   (exit $ac_status); }; }; then
16736   cf_cv_have_errno=yes
16737 else
16738   echo "$as_me: failed program was:" >&5
16739 cat conftest.$ac_ext >&5
16740 cf_cv_have_errno=no
16741 fi
16742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16743
16744 fi
16745 echo "$as_me:16745: result: $cf_cv_have_errno" >&5
16746 echo "${ECHO_T}$cf_cv_have_errno" >&6
16747
16748 if test "$cf_cv_have_errno" = yes ; then
16749
16750 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16751
16752         cat >>confdefs.h <<EOF
16753 #define $cf_result 1
16754 EOF
16755
16756 fi
16757
16758 echo "$as_me:16758: checking if data-only library module links" >&5
16759 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16760 if test "${cf_cv_link_dataonly+set}" = set; then
16761   echo $ECHO_N "(cached) $ECHO_C" >&6
16762 else
16763
16764         rm -f conftest.a
16765         cat >conftest.$ac_ext <<EOF
16766 #line 16766 "configure"
16767 int     testdata[3] = { 123, 456, 789 };
16768 EOF
16769         if { (eval echo "$as_me:16769: \"$ac_compile\"") >&5
16770   (eval $ac_compile) 2>&5
16771   ac_status=$?
16772   echo "$as_me:16772: \$? = $ac_status" >&5
16773   (exit $ac_status); } ; then
16774                 mv conftest.o data.o && \
16775                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16776         fi
16777         rm -f conftest.$ac_ext data.o
16778         cat >conftest.$ac_ext <<EOF
16779 #line 16779 "configure"
16780 int     testfunc()
16781 {
16782 #if defined(NeXT)
16783         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16784 #else
16785         extern int testdata[3];
16786         return testdata[0] == 123
16787            &&  testdata[1] == 456
16788            &&  testdata[2] == 789;
16789 #endif
16790 }
16791 EOF
16792         if { (eval echo "$as_me:16792: \"$ac_compile\"") >&5
16793   (eval $ac_compile) 2>&5
16794   ac_status=$?
16795   echo "$as_me:16795: \$? = $ac_status" >&5
16796   (exit $ac_status); }; then
16797                 mv conftest.o func.o && \
16798                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16799         fi
16800         rm -f conftest.$ac_ext func.o
16801         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16802         cf_saveLIBS="$LIBS"
16803         LIBS="conftest.a $LIBS"
16804         if test "$cross_compiling" = yes; then
16805   cf_cv_link_dataonly=unknown
16806 else
16807   cat >conftest.$ac_ext <<_ACEOF
16808 #line 16808 "configure"
16809 #include "confdefs.h"
16810
16811         int main()
16812         {
16813                 extern int testfunc();
16814                 ${cf_cv_main_return:-return} (!testfunc());
16815         }
16816
16817 _ACEOF
16818 rm -f conftest$ac_exeext
16819 if { (eval echo "$as_me:16819: \"$ac_link\"") >&5
16820   (eval $ac_link) 2>&5
16821   ac_status=$?
16822   echo "$as_me:16822: \$? = $ac_status" >&5
16823   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16824   { (eval echo "$as_me:16824: \"$ac_try\"") >&5
16825   (eval $ac_try) 2>&5
16826   ac_status=$?
16827   echo "$as_me:16827: \$? = $ac_status" >&5
16828   (exit $ac_status); }; }; then
16829   cf_cv_link_dataonly=yes
16830 else
16831   echo "$as_me: program exited with status $ac_status" >&5
16832 echo "$as_me: failed program was:" >&5
16833 cat conftest.$ac_ext >&5
16834 cf_cv_link_dataonly=no
16835 fi
16836 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16837 fi
16838         LIBS="$cf_saveLIBS"
16839
16840 fi
16841
16842 echo "$as_me:16842: result: $cf_cv_link_dataonly" >&5
16843 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16844
16845 if test "$cf_cv_link_dataonly" = no ; then
16846
16847 cat >>confdefs.h <<\EOF
16848 #define BROKEN_LINKER 1
16849 EOF
16850
16851         BROKEN_LINKER=1
16852 fi
16853
16854 ###     Checks for library functions.
16855
16856 for ac_func in \
16857 getcwd \
16858 getegid \
16859 geteuid \
16860 getopt \
16861 getttynam \
16862 issetugid \
16863 poll \
16864 putenv \
16865 remove \
16866 select \
16867 setbuf \
16868 setbuffer \
16869 setenv \
16870 setvbuf \
16871 sigaction \
16872 sigvec \
16873 strdup \
16874 strstr \
16875 tcgetpgrp \
16876 times \
16877 vsnprintf \
16878
16879 do
16880 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16881 echo "$as_me:16881: checking for $ac_func" >&5
16882 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16883 if eval "test \"\${$as_ac_var+set}\" = set"; then
16884   echo $ECHO_N "(cached) $ECHO_C" >&6
16885 else
16886   cat >conftest.$ac_ext <<_ACEOF
16887 #line 16887 "configure"
16888 #include "confdefs.h"
16889 /* System header to define __stub macros and hopefully few prototypes,
16890     which can conflict with char $ac_func (); below.  */
16891 #include <assert.h>
16892 /* Override any gcc2 internal prototype to avoid an error.  */
16893 #ifdef __cplusplus
16894 extern "C"
16895 #endif
16896 /* We use char because int might match the return type of a gcc2
16897    builtin and then its argument prototype would still apply.  */
16898 char $ac_func ();
16899 char (*f) ();
16900
16901 int
16902 main ()
16903 {
16904 /* The GNU C library defines this for functions which it implements
16905     to always fail with ENOSYS.  Some functions are actually named
16906     something starting with __ and the normal name is an alias.  */
16907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16908 choke me
16909 #else
16910 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16911 #endif
16912
16913   ;
16914   return 0;
16915 }
16916 _ACEOF
16917 rm -f conftest.$ac_objext conftest$ac_exeext
16918 if { (eval echo "$as_me:16918: \"$ac_link\"") >&5
16919   (eval $ac_link) 2>&5
16920   ac_status=$?
16921   echo "$as_me:16921: \$? = $ac_status" >&5
16922   (exit $ac_status); } &&
16923          { ac_try='test -s conftest$ac_exeext'
16924   { (eval echo "$as_me:16924: \"$ac_try\"") >&5
16925   (eval $ac_try) 2>&5
16926   ac_status=$?
16927   echo "$as_me:16927: \$? = $ac_status" >&5
16928   (exit $ac_status); }; }; then
16929   eval "$as_ac_var=yes"
16930 else
16931   echo "$as_me: failed program was:" >&5
16932 cat conftest.$ac_ext >&5
16933 eval "$as_ac_var=no"
16934 fi
16935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16936 fi
16937 echo "$as_me:16937: result: `eval echo '${'$as_ac_var'}'`" >&5
16938 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16939 if test `eval echo '${'$as_ac_var'}'` = yes; then
16940   cat >>confdefs.h <<EOF
16941 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16942 EOF
16943
16944 fi
16945 done
16946
16947 if test "x$ac_cv_func_getopt" = xno &&
16948    test "x$cf_with_progs$cf_with_tests" != xnono; then
16949         { { echo "$as_me:16949: error: getopt is required for building programs" >&5
16950 echo "$as_me: error: getopt is required for building programs" >&2;}
16951    { (exit 1); exit 1; }; }
16952 fi
16953
16954 if test "x$with_getcap" = "xyes" ; then
16955
16956 echo "$as_me:16956: checking for terminal-capability database functions" >&5
16957 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16958 if test "${cf_cv_cgetent+set}" = set; then
16959   echo $ECHO_N "(cached) $ECHO_C" >&6
16960 else
16961
16962 cat >conftest.$ac_ext <<_ACEOF
16963 #line 16963 "configure"
16964 #include "confdefs.h"
16965
16966 #include <stdlib.h>
16967 int
16968 main ()
16969 {
16970
16971         char temp[128];
16972         char *buf = temp;
16973         char *db_array = temp;
16974         cgetent(&buf, &db_array, "vt100");
16975         cgetcap(buf, "tc", '=');
16976         cgetmatch(buf, "tc");
16977
16978   ;
16979   return 0;
16980 }
16981 _ACEOF
16982 rm -f conftest.$ac_objext conftest$ac_exeext
16983 if { (eval echo "$as_me:16983: \"$ac_link\"") >&5
16984   (eval $ac_link) 2>&5
16985   ac_status=$?
16986   echo "$as_me:16986: \$? = $ac_status" >&5
16987   (exit $ac_status); } &&
16988          { ac_try='test -s conftest$ac_exeext'
16989   { (eval echo "$as_me:16989: \"$ac_try\"") >&5
16990   (eval $ac_try) 2>&5
16991   ac_status=$?
16992   echo "$as_me:16992: \$? = $ac_status" >&5
16993   (exit $ac_status); }; }; then
16994   cf_cv_cgetent=yes
16995 else
16996   echo "$as_me: failed program was:" >&5
16997 cat conftest.$ac_ext >&5
16998 cf_cv_cgetent=no
16999 fi
17000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17001
17002 fi
17003 echo "$as_me:17003: result: $cf_cv_cgetent" >&5
17004 echo "${ECHO_T}$cf_cv_cgetent" >&6
17005
17006 if test "$cf_cv_cgetent" = yes
17007 then
17008
17009 cat >>confdefs.h <<\EOF
17010 #define HAVE_BSD_CGETENT 1
17011 EOF
17012
17013 echo "$as_me:17013: checking if cgetent uses const parameter" >&5
17014 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17015 if test "${cf_cv_cgetent_const+set}" = set; then
17016   echo $ECHO_N "(cached) $ECHO_C" >&6
17017 else
17018
17019 cat >conftest.$ac_ext <<_ACEOF
17020 #line 17020 "configure"
17021 #include "confdefs.h"
17022
17023 #include <stdlib.h>
17024 int
17025 main ()
17026 {
17027
17028         char temp[128];
17029         char *buf = temp;
17030 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17031         const char *db_array = temp;
17032         cgetent(&buf, &db_array, "vt100");
17033 #endif
17034         cgetcap(buf, "tc", '=');
17035         cgetmatch(buf, "tc");
17036
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_cgetent_const=yes
17054 else
17055   echo "$as_me: failed program was:" >&5
17056 cat conftest.$ac_ext >&5
17057 cf_cv_cgetent_const=no
17058 fi
17059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17060
17061 fi
17062 echo "$as_me:17062: result: $cf_cv_cgetent_const" >&5
17063 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17064         if test "$cf_cv_cgetent_const" = yes
17065         then
17066
17067 cat >>confdefs.h <<EOF
17068 #define CGETENT_CONST const
17069 EOF
17070
17071         fi
17072 fi
17073
17074 fi
17075
17076 echo "$as_me:17076: checking for isascii" >&5
17077 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17078 if test "${cf_cv_have_isascii+set}" = set; then
17079   echo $ECHO_N "(cached) $ECHO_C" >&6
17080 else
17081
17082         cat >conftest.$ac_ext <<_ACEOF
17083 #line 17083 "configure"
17084 #include "confdefs.h"
17085 #include <ctype.h>
17086 int
17087 main ()
17088 {
17089 int x = isascii(' ')
17090   ;
17091   return 0;
17092 }
17093 _ACEOF
17094 rm -f conftest.$ac_objext conftest$ac_exeext
17095 if { (eval echo "$as_me:17095: \"$ac_link\"") >&5
17096   (eval $ac_link) 2>&5
17097   ac_status=$?
17098   echo "$as_me:17098: \$? = $ac_status" >&5
17099   (exit $ac_status); } &&
17100          { ac_try='test -s conftest$ac_exeext'
17101   { (eval echo "$as_me:17101: \"$ac_try\"") >&5
17102   (eval $ac_try) 2>&5
17103   ac_status=$?
17104   echo "$as_me:17104: \$? = $ac_status" >&5
17105   (exit $ac_status); }; }; then
17106   cf_cv_have_isascii=yes
17107 else
17108   echo "$as_me: failed program was:" >&5
17109 cat conftest.$ac_ext >&5
17110 cf_cv_have_isascii=no
17111 fi
17112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17113
17114 fi
17115 echo "$as_me:17115: result: $cf_cv_have_isascii" >&5
17116 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17117 test "$cf_cv_have_isascii" = yes &&
17118 cat >>confdefs.h <<\EOF
17119 #define HAVE_ISASCII 1
17120 EOF
17121
17122 if test "$ac_cv_func_sigaction" = yes; then
17123 echo "$as_me:17123: checking whether sigaction needs _POSIX_SOURCE" >&5
17124 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17125 cat >conftest.$ac_ext <<_ACEOF
17126 #line 17126 "configure"
17127 #include "confdefs.h"
17128
17129 #include <sys/types.h>
17130 #include <signal.h>
17131 int
17132 main ()
17133 {
17134 struct sigaction act
17135   ;
17136   return 0;
17137 }
17138 _ACEOF
17139 rm -f conftest.$ac_objext
17140 if { (eval echo "$as_me:17140: \"$ac_compile\"") >&5
17141   (eval $ac_compile) 2>&5
17142   ac_status=$?
17143   echo "$as_me:17143: \$? = $ac_status" >&5
17144   (exit $ac_status); } &&
17145          { ac_try='test -s conftest.$ac_objext'
17146   { (eval echo "$as_me:17146: \"$ac_try\"") >&5
17147   (eval $ac_try) 2>&5
17148   ac_status=$?
17149   echo "$as_me:17149: \$? = $ac_status" >&5
17150   (exit $ac_status); }; }; then
17151   sigact_bad=no
17152 else
17153   echo "$as_me: failed program was:" >&5
17154 cat conftest.$ac_ext >&5
17155
17156 cat >conftest.$ac_ext <<_ACEOF
17157 #line 17157 "configure"
17158 #include "confdefs.h"
17159
17160 #define _POSIX_SOURCE
17161 #include <sys/types.h>
17162 #include <signal.h>
17163 int
17164 main ()
17165 {
17166 struct sigaction act
17167   ;
17168   return 0;
17169 }
17170 _ACEOF
17171 rm -f conftest.$ac_objext
17172 if { (eval echo "$as_me:17172: \"$ac_compile\"") >&5
17173   (eval $ac_compile) 2>&5
17174   ac_status=$?
17175   echo "$as_me:17175: \$? = $ac_status" >&5
17176   (exit $ac_status); } &&
17177          { ac_try='test -s conftest.$ac_objext'
17178   { (eval echo "$as_me:17178: \"$ac_try\"") >&5
17179   (eval $ac_try) 2>&5
17180   ac_status=$?
17181   echo "$as_me:17181: \$? = $ac_status" >&5
17182   (exit $ac_status); }; }; then
17183   sigact_bad=yes
17184
17185 cat >>confdefs.h <<\EOF
17186 #define _POSIX_SOURCE 1
17187 EOF
17188
17189 else
17190   echo "$as_me: failed program was:" >&5
17191 cat conftest.$ac_ext >&5
17192 sigact_bad=unknown
17193 fi
17194 rm -f conftest.$ac_objext conftest.$ac_ext
17195 fi
17196 rm -f conftest.$ac_objext conftest.$ac_ext
17197 echo "$as_me:17197: result: $sigact_bad" >&5
17198 echo "${ECHO_T}$sigact_bad" >&6
17199 fi
17200
17201 echo "$as_me:17201: checking if nanosleep really works" >&5
17202 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17203 if test "${cf_cv_func_nanosleep+set}" = set; then
17204   echo $ECHO_N "(cached) $ECHO_C" >&6
17205 else
17206
17207 if test "$cross_compiling" = yes; then
17208   cf_cv_func_nanosleep=unknown
17209 else
17210   cat >conftest.$ac_ext <<_ACEOF
17211 #line 17211 "configure"
17212 #include "confdefs.h"
17213
17214 #include <stdio.h>
17215 #include <errno.h>
17216 #include <time.h>
17217
17218 #ifdef HAVE_SYS_TIME_H
17219 #include <sys/time.h>
17220 #endif
17221
17222 int main() {
17223         struct timespec ts1, ts2;
17224         int code;
17225         ts1.tv_sec  = 0;
17226         ts1.tv_nsec = 750000000;
17227         ts2.tv_sec  = 0;
17228         ts2.tv_nsec = 0;
17229         errno = 0;
17230         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17231         ${cf_cv_main_return:-return}(code != 0);
17232 }
17233
17234 _ACEOF
17235 rm -f conftest$ac_exeext
17236 if { (eval echo "$as_me:17236: \"$ac_link\"") >&5
17237   (eval $ac_link) 2>&5
17238   ac_status=$?
17239   echo "$as_me:17239: \$? = $ac_status" >&5
17240   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17241   { (eval echo "$as_me:17241: \"$ac_try\"") >&5
17242   (eval $ac_try) 2>&5
17243   ac_status=$?
17244   echo "$as_me:17244: \$? = $ac_status" >&5
17245   (exit $ac_status); }; }; then
17246   cf_cv_func_nanosleep=yes
17247 else
17248   echo "$as_me: program exited with status $ac_status" >&5
17249 echo "$as_me: failed program was:" >&5
17250 cat conftest.$ac_ext >&5
17251 cf_cv_func_nanosleep=no
17252 fi
17253 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17254 fi
17255 fi
17256 echo "$as_me:17256: result: $cf_cv_func_nanosleep" >&5
17257 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17258
17259 test "$cf_cv_func_nanosleep" = "yes" &&
17260 cat >>confdefs.h <<\EOF
17261 #define HAVE_NANOSLEEP 1
17262 EOF
17263
17264 for ac_header in \
17265 termio.h \
17266 termios.h \
17267 unistd.h \
17268
17269 do
17270 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17271 echo "$as_me:17271: checking for $ac_header" >&5
17272 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17273 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17274   echo $ECHO_N "(cached) $ECHO_C" >&6
17275 else
17276   cat >conftest.$ac_ext <<_ACEOF
17277 #line 17277 "configure"
17278 #include "confdefs.h"
17279 #include <$ac_header>
17280 _ACEOF
17281 if { (eval echo "$as_me:17281: \"$ac_cpp conftest.$ac_ext\"") >&5
17282   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17283   ac_status=$?
17284   egrep -v '^ *\+' conftest.er1 >conftest.err
17285   rm -f conftest.er1
17286   cat conftest.err >&5
17287   echo "$as_me:17287: \$? = $ac_status" >&5
17288   (exit $ac_status); } >/dev/null; then
17289   if test -s conftest.err; then
17290     ac_cpp_err=$ac_c_preproc_warn_flag
17291   else
17292     ac_cpp_err=
17293   fi
17294 else
17295   ac_cpp_err=yes
17296 fi
17297 if test -z "$ac_cpp_err"; then
17298   eval "$as_ac_Header=yes"
17299 else
17300   echo "$as_me: failed program was:" >&5
17301   cat conftest.$ac_ext >&5
17302   eval "$as_ac_Header=no"
17303 fi
17304 rm -f conftest.err conftest.$ac_ext
17305 fi
17306 echo "$as_me:17306: result: `eval echo '${'$as_ac_Header'}'`" >&5
17307 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17308 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17309   cat >>confdefs.h <<EOF
17310 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17311 EOF
17312
17313 fi
17314 done
17315
17316 if test "$ISC" = yes ; then
17317
17318 for ac_header in sys/termio.h
17319 do
17320 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17321 echo "$as_me:17321: checking for $ac_header" >&5
17322 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17323 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17324   echo $ECHO_N "(cached) $ECHO_C" >&6
17325 else
17326   cat >conftest.$ac_ext <<_ACEOF
17327 #line 17327 "configure"
17328 #include "confdefs.h"
17329 #include <$ac_header>
17330 _ACEOF
17331 if { (eval echo "$as_me:17331: \"$ac_cpp conftest.$ac_ext\"") >&5
17332   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17333   ac_status=$?
17334   egrep -v '^ *\+' conftest.er1 >conftest.err
17335   rm -f conftest.er1
17336   cat conftest.err >&5
17337   echo "$as_me:17337: \$? = $ac_status" >&5
17338   (exit $ac_status); } >/dev/null; then
17339   if test -s conftest.err; then
17340     ac_cpp_err=$ac_c_preproc_warn_flag
17341   else
17342     ac_cpp_err=
17343   fi
17344 else
17345   ac_cpp_err=yes
17346 fi
17347 if test -z "$ac_cpp_err"; then
17348   eval "$as_ac_Header=yes"
17349 else
17350   echo "$as_me: failed program was:" >&5
17351   cat conftest.$ac_ext >&5
17352   eval "$as_ac_Header=no"
17353 fi
17354 rm -f conftest.err conftest.$ac_ext
17355 fi
17356 echo "$as_me:17356: result: `eval echo '${'$as_ac_Header'}'`" >&5
17357 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17358 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17359   cat >>confdefs.h <<EOF
17360 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17361 EOF
17362
17363 fi
17364 done
17365
17366 fi
17367 if test "$ac_cv_header_termios_h" = yes ; then
17368         case "$CFLAGS $CPPFLAGS" in
17369         (*-D_POSIX_SOURCE*)
17370                 termios_bad=dunno ;;
17371         (*)     termios_bad=maybe ;;
17372         esac
17373         if test "$termios_bad" = maybe ; then
17374         echo "$as_me:17374: checking whether termios.h needs _POSIX_SOURCE" >&5
17375 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17376         cat >conftest.$ac_ext <<_ACEOF
17377 #line 17377 "configure"
17378 #include "confdefs.h"
17379 #include <termios.h>
17380 int
17381 main ()
17382 {
17383 struct termios foo; int x = foo.c_iflag
17384   ;
17385   return 0;
17386 }
17387 _ACEOF
17388 rm -f conftest.$ac_objext
17389 if { (eval echo "$as_me:17389: \"$ac_compile\"") >&5
17390   (eval $ac_compile) 2>&5
17391   ac_status=$?
17392   echo "$as_me:17392: \$? = $ac_status" >&5
17393   (exit $ac_status); } &&
17394          { ac_try='test -s conftest.$ac_objext'
17395   { (eval echo "$as_me:17395: \"$ac_try\"") >&5
17396   (eval $ac_try) 2>&5
17397   ac_status=$?
17398   echo "$as_me:17398: \$? = $ac_status" >&5
17399   (exit $ac_status); }; }; then
17400   termios_bad=no
17401 else
17402   echo "$as_me: failed program was:" >&5
17403 cat conftest.$ac_ext >&5
17404
17405                 cat >conftest.$ac_ext <<_ACEOF
17406 #line 17406 "configure"
17407 #include "confdefs.h"
17408
17409 #define _POSIX_SOURCE
17410 #include <termios.h>
17411 int
17412 main ()
17413 {
17414 struct termios foo; int x = foo.c_iflag
17415   ;
17416   return 0;
17417 }
17418 _ACEOF
17419 rm -f conftest.$ac_objext
17420 if { (eval echo "$as_me:17420: \"$ac_compile\"") >&5
17421   (eval $ac_compile) 2>&5
17422   ac_status=$?
17423   echo "$as_me:17423: \$? = $ac_status" >&5
17424   (exit $ac_status); } &&
17425          { ac_try='test -s conftest.$ac_objext'
17426   { (eval echo "$as_me:17426: \"$ac_try\"") >&5
17427   (eval $ac_try) 2>&5
17428   ac_status=$?
17429   echo "$as_me:17429: \$? = $ac_status" >&5
17430   (exit $ac_status); }; }; then
17431   termios_bad=unknown
17432 else
17433   echo "$as_me: failed program was:" >&5
17434 cat conftest.$ac_ext >&5
17435 termios_bad=yes
17436 cat >>confdefs.h <<\EOF
17437 #define _POSIX_SOURCE 1
17438 EOF
17439
17440 fi
17441 rm -f conftest.$ac_objext conftest.$ac_ext
17442
17443 fi
17444 rm -f conftest.$ac_objext conftest.$ac_ext
17445         echo "$as_me:17445: result: $termios_bad" >&5
17446 echo "${ECHO_T}$termios_bad" >&6
17447         fi
17448 fi
17449
17450 echo "$as_me:17450: checking for tcgetattr" >&5
17451 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17452 if test "${cf_cv_have_tcgetattr+set}" = set; then
17453   echo $ECHO_N "(cached) $ECHO_C" >&6
17454 else
17455
17456 cat >conftest.$ac_ext <<_ACEOF
17457 #line 17457 "configure"
17458 #include "confdefs.h"
17459
17460 #include <sys/types.h>
17461 #ifdef HAVE_UNISTD_H
17462 #include <unistd.h>
17463 #endif
17464 #ifdef HAVE_TERMIOS_H
17465 #include <termios.h>
17466 #define TTY struct termios
17467 #else
17468 #ifdef HAVE_TERMIO_H
17469 #include <termio.h>
17470 #define TTY struct termio
17471 #endif
17472 #endif
17473
17474 int
17475 main ()
17476 {
17477
17478 TTY foo;
17479 tcgetattr(1, &foo);
17480   ;
17481   return 0;
17482 }
17483 _ACEOF
17484 rm -f conftest.$ac_objext conftest$ac_exeext
17485 if { (eval echo "$as_me:17485: \"$ac_link\"") >&5
17486   (eval $ac_link) 2>&5
17487   ac_status=$?
17488   echo "$as_me:17488: \$? = $ac_status" >&5
17489   (exit $ac_status); } &&
17490          { ac_try='test -s conftest$ac_exeext'
17491   { (eval echo "$as_me:17491: \"$ac_try\"") >&5
17492   (eval $ac_try) 2>&5
17493   ac_status=$?
17494   echo "$as_me:17494: \$? = $ac_status" >&5
17495   (exit $ac_status); }; }; then
17496   cf_cv_have_tcgetattr=yes
17497 else
17498   echo "$as_me: failed program was:" >&5
17499 cat conftest.$ac_ext >&5
17500 cf_cv_have_tcgetattr=no
17501 fi
17502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17503 fi
17504 echo "$as_me:17504: result: $cf_cv_have_tcgetattr" >&5
17505 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17506 test "$cf_cv_have_tcgetattr" = yes &&
17507 cat >>confdefs.h <<\EOF
17508 #define HAVE_TCGETATTR 1
17509 EOF
17510
17511 echo "$as_me:17511: checking for vsscanf function or workaround" >&5
17512 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17513 if test "${cf_cv_func_vsscanf+set}" = set; then
17514   echo $ECHO_N "(cached) $ECHO_C" >&6
17515 else
17516
17517 cat >conftest.$ac_ext <<_ACEOF
17518 #line 17518 "configure"
17519 #include "confdefs.h"
17520
17521 #include <stdarg.h>
17522 #include <stdio.h>
17523 int
17524 main ()
17525 {
17526
17527         va_list ap;
17528         vsscanf("from", "%d", ap)
17529   ;
17530   return 0;
17531 }
17532 _ACEOF
17533 rm -f conftest.$ac_objext conftest$ac_exeext
17534 if { (eval echo "$as_me:17534: \"$ac_link\"") >&5
17535   (eval $ac_link) 2>&5
17536   ac_status=$?
17537   echo "$as_me:17537: \$? = $ac_status" >&5
17538   (exit $ac_status); } &&
17539          { ac_try='test -s conftest$ac_exeext'
17540   { (eval echo "$as_me:17540: \"$ac_try\"") >&5
17541   (eval $ac_try) 2>&5
17542   ac_status=$?
17543   echo "$as_me:17543: \$? = $ac_status" >&5
17544   (exit $ac_status); }; }; then
17545   cf_cv_func_vsscanf=vsscanf
17546 else
17547   echo "$as_me: failed program was:" >&5
17548 cat conftest.$ac_ext >&5
17549
17550 cat >conftest.$ac_ext <<_ACEOF
17551 #line 17551 "configure"
17552 #include "confdefs.h"
17553
17554 #include <stdarg.h>
17555 #include <stdio.h>
17556 int
17557 main ()
17558 {
17559
17560         FILE strbuf;
17561         char *str = "from";
17562
17563         strbuf._flag = _IOREAD;
17564         strbuf._ptr = strbuf._base = (unsigned char *) str;
17565         strbuf._cnt = strlen(str);
17566         strbuf._file = _NFILE;
17567         return (vfscanf(&strbuf, "%d", ap))
17568   ;
17569   return 0;
17570 }
17571 _ACEOF
17572 rm -f conftest.$ac_objext conftest$ac_exeext
17573 if { (eval echo "$as_me:17573: \"$ac_link\"") >&5
17574   (eval $ac_link) 2>&5
17575   ac_status=$?
17576   echo "$as_me:17576: \$? = $ac_status" >&5
17577   (exit $ac_status); } &&
17578          { ac_try='test -s conftest$ac_exeext'
17579   { (eval echo "$as_me:17579: \"$ac_try\"") >&5
17580   (eval $ac_try) 2>&5
17581   ac_status=$?
17582   echo "$as_me:17582: \$? = $ac_status" >&5
17583   (exit $ac_status); }; }; then
17584   cf_cv_func_vsscanf=vfscanf
17585 else
17586   echo "$as_me: failed program was:" >&5
17587 cat conftest.$ac_ext >&5
17588
17589 cat >conftest.$ac_ext <<_ACEOF
17590 #line 17590 "configure"
17591 #include "confdefs.h"
17592
17593 #include <stdarg.h>
17594 #include <stdio.h>
17595 int
17596 main ()
17597 {
17598
17599         FILE strbuf;
17600         char *str = "from";
17601
17602         strbuf._flag = _IOREAD;
17603         strbuf._ptr = strbuf._base = (unsigned char *) str;
17604         strbuf._cnt = strlen(str);
17605         strbuf._file = _NFILE;
17606         return (_doscan(&strbuf, "%d", ap))
17607   ;
17608   return 0;
17609 }
17610 _ACEOF
17611 rm -f conftest.$ac_objext conftest$ac_exeext
17612 if { (eval echo "$as_me:17612: \"$ac_link\"") >&5
17613   (eval $ac_link) 2>&5
17614   ac_status=$?
17615   echo "$as_me:17615: \$? = $ac_status" >&5
17616   (exit $ac_status); } &&
17617          { ac_try='test -s conftest$ac_exeext'
17618   { (eval echo "$as_me:17618: \"$ac_try\"") >&5
17619   (eval $ac_try) 2>&5
17620   ac_status=$?
17621   echo "$as_me:17621: \$? = $ac_status" >&5
17622   (exit $ac_status); }; }; then
17623   cf_cv_func_vsscanf=_doscan
17624 else
17625   echo "$as_me: failed program was:" >&5
17626 cat conftest.$ac_ext >&5
17627
17628 cf_cv_func_vsscanf=no
17629 fi
17630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17631 fi
17632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17633 fi
17634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17635 fi
17636 echo "$as_me:17636: result: $cf_cv_func_vsscanf" >&5
17637 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17638
17639 case $cf_cv_func_vsscanf in
17640 (vsscanf)
17641 cat >>confdefs.h <<\EOF
17642 #define HAVE_VSSCANF 1
17643 EOF
17644 ;;
17645 (vfscanf)
17646 cat >>confdefs.h <<\EOF
17647 #define HAVE_VFSCANF 1
17648 EOF
17649 ;;
17650 (_doscan)
17651 cat >>confdefs.h <<\EOF
17652 #define HAVE__DOSCAN 1
17653 EOF
17654 ;;
17655 esac
17656
17657 echo "$as_me:17657: checking for working mkstemp" >&5
17658 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17659 if test "${cf_cv_func_mkstemp+set}" = set; then
17660   echo $ECHO_N "(cached) $ECHO_C" >&6
17661 else
17662
17663 rm -rf conftest*
17664 if test "$cross_compiling" = yes; then
17665   cf_cv_func_mkstemp=maybe
17666 else
17667   cat >conftest.$ac_ext <<_ACEOF
17668 #line 17668 "configure"
17669 #include "confdefs.h"
17670
17671 #include <sys/types.h>
17672 #include <stdlib.h>
17673 #include <stdio.h>
17674 #include <string.h>
17675 #include <sys/stat.h>
17676 int main()
17677 {
17678         char *tmpl = "conftestXXXXXX";
17679         char name[2][80];
17680         int n;
17681         int result = 0;
17682         int fd;
17683         struct stat sb;
17684
17685         umask(077);
17686         for (n = 0; n < 2; ++n) {
17687                 strcpy(name[n], tmpl);
17688                 if ((fd = mkstemp(name[n])) >= 0) {
17689                         if (!strcmp(name[n], tmpl)
17690                          || stat(name[n], &sb) != 0
17691                          || (sb.st_mode & S_IFMT) != S_IFREG
17692                          || (sb.st_mode & 077) != 0) {
17693                                 result = 1;
17694                         }
17695                         close(fd);
17696                 }
17697         }
17698         if (result == 0
17699          && !strcmp(name[0], name[1]))
17700                 result = 1;
17701         ${cf_cv_main_return:-return}(result);
17702 }
17703
17704 _ACEOF
17705 rm -f conftest$ac_exeext
17706 if { (eval echo "$as_me:17706: \"$ac_link\"") >&5
17707   (eval $ac_link) 2>&5
17708   ac_status=$?
17709   echo "$as_me:17709: \$? = $ac_status" >&5
17710   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17711   { (eval echo "$as_me:17711: \"$ac_try\"") >&5
17712   (eval $ac_try) 2>&5
17713   ac_status=$?
17714   echo "$as_me:17714: \$? = $ac_status" >&5
17715   (exit $ac_status); }; }; then
17716   cf_cv_func_mkstemp=yes
17717
17718 else
17719   echo "$as_me: program exited with status $ac_status" >&5
17720 echo "$as_me: failed program was:" >&5
17721 cat conftest.$ac_ext >&5
17722 cf_cv_func_mkstemp=no
17723
17724 fi
17725 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17726 fi
17727
17728 fi
17729 echo "$as_me:17729: result: $cf_cv_func_mkstemp" >&5
17730 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17731 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17732         echo "$as_me:17732: checking for mkstemp" >&5
17733 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17734 if test "${ac_cv_func_mkstemp+set}" = set; then
17735   echo $ECHO_N "(cached) $ECHO_C" >&6
17736 else
17737   cat >conftest.$ac_ext <<_ACEOF
17738 #line 17738 "configure"
17739 #include "confdefs.h"
17740 /* System header to define __stub macros and hopefully few prototypes,
17741     which can conflict with char mkstemp (); below.  */
17742 #include <assert.h>
17743 /* Override any gcc2 internal prototype to avoid an error.  */
17744 #ifdef __cplusplus
17745 extern "C"
17746 #endif
17747 /* We use char because int might match the return type of a gcc2
17748    builtin and then its argument prototype would still apply.  */
17749 char mkstemp ();
17750 char (*f) ();
17751
17752 int
17753 main ()
17754 {
17755 /* The GNU C library defines this for functions which it implements
17756     to always fail with ENOSYS.  Some functions are actually named
17757     something starting with __ and the normal name is an alias.  */
17758 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17759 choke me
17760 #else
17761 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17762 #endif
17763
17764   ;
17765   return 0;
17766 }
17767 _ACEOF
17768 rm -f conftest.$ac_objext conftest$ac_exeext
17769 if { (eval echo "$as_me:17769: \"$ac_link\"") >&5
17770   (eval $ac_link) 2>&5
17771   ac_status=$?
17772   echo "$as_me:17772: \$? = $ac_status" >&5
17773   (exit $ac_status); } &&
17774          { ac_try='test -s conftest$ac_exeext'
17775   { (eval echo "$as_me:17775: \"$ac_try\"") >&5
17776   (eval $ac_try) 2>&5
17777   ac_status=$?
17778   echo "$as_me:17778: \$? = $ac_status" >&5
17779   (exit $ac_status); }; }; then
17780   ac_cv_func_mkstemp=yes
17781 else
17782   echo "$as_me: failed program was:" >&5
17783 cat conftest.$ac_ext >&5
17784 ac_cv_func_mkstemp=no
17785 fi
17786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17787 fi
17788 echo "$as_me:17788: result: $ac_cv_func_mkstemp" >&5
17789 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17790
17791 fi
17792 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17793
17794 cat >>confdefs.h <<\EOF
17795 #define HAVE_MKSTEMP 1
17796 EOF
17797
17798 fi
17799
17800 # setup for prototype of fallback for vsscanf()
17801
17802 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17803         HAVE_VSSCANF=1
17804 else
17805         HAVE_VSSCANF=0
17806 fi
17807
17808 if test "x$cross_compiling" = xyes ; then
17809         { echo "$as_me:17809: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17810 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17811 else
17812         echo "$as_me:17812: checking whether setvbuf arguments are reversed" >&5
17813 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17814 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17815   echo $ECHO_N "(cached) $ECHO_C" >&6
17816 else
17817   if test "$cross_compiling" = yes; then
17818   { { echo "$as_me:17818: error: cannot run test program while cross compiling" >&5
17819 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17820    { (exit 1); exit 1; }; }
17821 else
17822   cat >conftest.$ac_ext <<_ACEOF
17823 #line 17823 "configure"
17824 #include "confdefs.h"
17825 #include <stdio.h>
17826 /* If setvbuf has the reversed format, exit 0. */
17827 int
17828 main ()
17829 {
17830   /* This call has the arguments reversed.
17831      A reversed system may check and see that the address of main
17832      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17833   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17834     $ac_main_return(1);
17835   putc('\r', stdout);
17836   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17837 }
17838 _ACEOF
17839 rm -f conftest$ac_exeext
17840 if { (eval echo "$as_me:17840: \"$ac_link\"") >&5
17841   (eval $ac_link) 2>&5
17842   ac_status=$?
17843   echo "$as_me:17843: \$? = $ac_status" >&5
17844   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17845   { (eval echo "$as_me:17845: \"$ac_try\"") >&5
17846   (eval $ac_try) 2>&5
17847   ac_status=$?
17848   echo "$as_me:17848: \$? = $ac_status" >&5
17849   (exit $ac_status); }; }; then
17850   ac_cv_func_setvbuf_reversed=yes
17851 else
17852   echo "$as_me: program exited with status $ac_status" >&5
17853 echo "$as_me: failed program was:" >&5
17854 cat conftest.$ac_ext >&5
17855 ac_cv_func_setvbuf_reversed=no
17856 fi
17857 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17858 fi
17859 rm -f core core.* *.core
17860 fi
17861 echo "$as_me:17861: result: $ac_cv_func_setvbuf_reversed" >&5
17862 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17863 if test $ac_cv_func_setvbuf_reversed = yes; then
17864
17865 cat >>confdefs.h <<\EOF
17866 #define SETVBUF_REVERSED 1
17867 EOF
17868
17869 fi
17870
17871 fi
17872 echo "$as_me:17872: checking for intptr_t" >&5
17873 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17874 if test "${ac_cv_type_intptr_t+set}" = set; then
17875   echo $ECHO_N "(cached) $ECHO_C" >&6
17876 else
17877   cat >conftest.$ac_ext <<_ACEOF
17878 #line 17878 "configure"
17879 #include "confdefs.h"
17880 $ac_includes_default
17881 int
17882 main ()
17883 {
17884 if ((intptr_t *) 0)
17885   return 0;
17886 if (sizeof (intptr_t))
17887   return 0;
17888   ;
17889   return 0;
17890 }
17891 _ACEOF
17892 rm -f conftest.$ac_objext
17893 if { (eval echo "$as_me:17893: \"$ac_compile\"") >&5
17894   (eval $ac_compile) 2>&5
17895   ac_status=$?
17896   echo "$as_me:17896: \$? = $ac_status" >&5
17897   (exit $ac_status); } &&
17898          { ac_try='test -s conftest.$ac_objext'
17899   { (eval echo "$as_me:17899: \"$ac_try\"") >&5
17900   (eval $ac_try) 2>&5
17901   ac_status=$?
17902   echo "$as_me:17902: \$? = $ac_status" >&5
17903   (exit $ac_status); }; }; then
17904   ac_cv_type_intptr_t=yes
17905 else
17906   echo "$as_me: failed program was:" >&5
17907 cat conftest.$ac_ext >&5
17908 ac_cv_type_intptr_t=no
17909 fi
17910 rm -f conftest.$ac_objext conftest.$ac_ext
17911 fi
17912 echo "$as_me:17912: result: $ac_cv_type_intptr_t" >&5
17913 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17914 if test $ac_cv_type_intptr_t = yes; then
17915   :
17916 else
17917
17918 cat >>confdefs.h <<EOF
17919 #define intptr_t long
17920 EOF
17921
17922 fi
17923
17924 echo "$as_me:17924: checking for ssize_t" >&5
17925 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17926 if test "${ac_cv_type_ssize_t+set}" = set; then
17927   echo $ECHO_N "(cached) $ECHO_C" >&6
17928 else
17929   cat >conftest.$ac_ext <<_ACEOF
17930 #line 17930 "configure"
17931 #include "confdefs.h"
17932 $ac_includes_default
17933 int
17934 main ()
17935 {
17936 if ((ssize_t *) 0)
17937   return 0;
17938 if (sizeof (ssize_t))
17939   return 0;
17940   ;
17941   return 0;
17942 }
17943 _ACEOF
17944 rm -f conftest.$ac_objext
17945 if { (eval echo "$as_me:17945: \"$ac_compile\"") >&5
17946   (eval $ac_compile) 2>&5
17947   ac_status=$?
17948   echo "$as_me:17948: \$? = $ac_status" >&5
17949   (exit $ac_status); } &&
17950          { ac_try='test -s conftest.$ac_objext'
17951   { (eval echo "$as_me:17951: \"$ac_try\"") >&5
17952   (eval $ac_try) 2>&5
17953   ac_status=$?
17954   echo "$as_me:17954: \$? = $ac_status" >&5
17955   (exit $ac_status); }; }; then
17956   ac_cv_type_ssize_t=yes
17957 else
17958   echo "$as_me: failed program was:" >&5
17959 cat conftest.$ac_ext >&5
17960 ac_cv_type_ssize_t=no
17961 fi
17962 rm -f conftest.$ac_objext conftest.$ac_ext
17963 fi
17964 echo "$as_me:17964: result: $ac_cv_type_ssize_t" >&5
17965 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17966 if test $ac_cv_type_ssize_t = yes; then
17967   :
17968 else
17969
17970 cat >>confdefs.h <<EOF
17971 #define ssize_t int
17972 EOF
17973
17974 fi
17975
17976 echo "$as_me:17976: checking for type sigaction_t" >&5
17977 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17978 if test "${cf_cv_type_sigaction+set}" = set; then
17979   echo $ECHO_N "(cached) $ECHO_C" >&6
17980 else
17981
17982         cat >conftest.$ac_ext <<_ACEOF
17983 #line 17983 "configure"
17984 #include "confdefs.h"
17985
17986 #include <signal.h>
17987 int
17988 main ()
17989 {
17990 sigaction_t x
17991   ;
17992   return 0;
17993 }
17994 _ACEOF
17995 rm -f conftest.$ac_objext
17996 if { (eval echo "$as_me:17996: \"$ac_compile\"") >&5
17997   (eval $ac_compile) 2>&5
17998   ac_status=$?
17999   echo "$as_me:17999: \$? = $ac_status" >&5
18000   (exit $ac_status); } &&
18001          { ac_try='test -s conftest.$ac_objext'
18002   { (eval echo "$as_me:18002: \"$ac_try\"") >&5
18003   (eval $ac_try) 2>&5
18004   ac_status=$?
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); }; }; then
18007   cf_cv_type_sigaction=yes
18008 else
18009   echo "$as_me: failed program was:" >&5
18010 cat conftest.$ac_ext >&5
18011 cf_cv_type_sigaction=no
18012 fi
18013 rm -f conftest.$ac_objext conftest.$ac_ext
18014 fi
18015
18016 echo "$as_me:18016: result: $cf_cv_type_sigaction" >&5
18017 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18018 test "$cf_cv_type_sigaction" = yes &&
18019 cat >>confdefs.h <<\EOF
18020 #define HAVE_TYPE_SIGACTION 1
18021 EOF
18022
18023 echo "$as_me:18023: checking declaration of size-change" >&5
18024 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18025 if test "${cf_cv_sizechange+set}" = set; then
18026   echo $ECHO_N "(cached) $ECHO_C" >&6
18027 else
18028
18029         cf_cv_sizechange=unknown
18030         cf_save_CPPFLAGS="$CPPFLAGS"
18031
18032 for cf_opts in "" "NEED_PTEM_H"
18033 do
18034
18035         CPPFLAGS="$cf_save_CPPFLAGS"
18036         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18037         cat >conftest.$ac_ext <<_ACEOF
18038 #line 18038 "configure"
18039 #include "confdefs.h"
18040 #include <sys/types.h>
18041 #ifdef HAVE_TERMIOS_H
18042 #include <termios.h>
18043 #else
18044 #ifdef HAVE_TERMIO_H
18045 #include <termio.h>
18046 #endif
18047 #endif
18048 #ifdef NEED_PTEM_H
18049 /* This is a workaround for SCO:  they neglected to define struct winsize in
18050  * termios.h -- it's only in termio.h and ptem.h
18051  */
18052 #include        <sys/stream.h>
18053 #include        <sys/ptem.h>
18054 #endif
18055 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18056 #include <sys/ioctl.h>
18057 #endif
18058
18059 int
18060 main ()
18061 {
18062
18063 #ifdef TIOCGSIZE
18064         struct ttysize win;     /* FIXME: what system is this? */
18065         int y = win.ts_lines;
18066         int x = win.ts_cols;
18067 #else
18068 #ifdef TIOCGWINSZ
18069         struct winsize win;
18070         int y = win.ws_row;
18071         int x = win.ws_col;
18072 #else
18073         no TIOCGSIZE or TIOCGWINSZ
18074 #endif /* TIOCGWINSZ */
18075 #endif /* TIOCGSIZE */
18076
18077   ;
18078   return 0;
18079 }
18080 _ACEOF
18081 rm -f conftest.$ac_objext
18082 if { (eval echo "$as_me:18082: \"$ac_compile\"") >&5
18083   (eval $ac_compile) 2>&5
18084   ac_status=$?
18085   echo "$as_me:18085: \$? = $ac_status" >&5
18086   (exit $ac_status); } &&
18087          { ac_try='test -s conftest.$ac_objext'
18088   { (eval echo "$as_me:18088: \"$ac_try\"") >&5
18089   (eval $ac_try) 2>&5
18090   ac_status=$?
18091   echo "$as_me:18091: \$? = $ac_status" >&5
18092   (exit $ac_status); }; }; then
18093   cf_cv_sizechange=yes
18094 else
18095   echo "$as_me: failed program was:" >&5
18096 cat conftest.$ac_ext >&5
18097 cf_cv_sizechange=no
18098 fi
18099 rm -f conftest.$ac_objext conftest.$ac_ext
18100
18101         CPPFLAGS="$cf_save_CPPFLAGS"
18102         if test "$cf_cv_sizechange" = yes ; then
18103                 echo "size-change succeeded ($cf_opts)" >&5
18104                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18105                 break
18106         fi
18107 done
18108
18109 fi
18110 echo "$as_me:18110: result: $cf_cv_sizechange" >&5
18111 echo "${ECHO_T}$cf_cv_sizechange" >&6
18112 if test "$cf_cv_sizechange" != no ; then
18113
18114 cat >>confdefs.h <<\EOF
18115 #define HAVE_SIZECHANGE 1
18116 EOF
18117
18118         case $cf_cv_sizechange in
18119         (NEED*)
18120                 cat >>confdefs.h <<EOF
18121 #define $cf_cv_sizechange  1
18122 EOF
18123
18124                 ;;
18125         esac
18126 fi
18127
18128 echo "$as_me:18128: checking for memmove" >&5
18129 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18130 if test "${ac_cv_func_memmove+set}" = set; then
18131   echo $ECHO_N "(cached) $ECHO_C" >&6
18132 else
18133   cat >conftest.$ac_ext <<_ACEOF
18134 #line 18134 "configure"
18135 #include "confdefs.h"
18136 /* System header to define __stub macros and hopefully few prototypes,
18137     which can conflict with char memmove (); below.  */
18138 #include <assert.h>
18139 /* Override any gcc2 internal prototype to avoid an error.  */
18140 #ifdef __cplusplus
18141 extern "C"
18142 #endif
18143 /* We use char because int might match the return type of a gcc2
18144    builtin and then its argument prototype would still apply.  */
18145 char memmove ();
18146 char (*f) ();
18147
18148 int
18149 main ()
18150 {
18151 /* The GNU C library defines this for functions which it implements
18152     to always fail with ENOSYS.  Some functions are actually named
18153     something starting with __ and the normal name is an alias.  */
18154 #if defined (__stub_memmove) || defined (__stub___memmove)
18155 choke me
18156 #else
18157 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18158 #endif
18159
18160   ;
18161   return 0;
18162 }
18163 _ACEOF
18164 rm -f conftest.$ac_objext conftest$ac_exeext
18165 if { (eval echo "$as_me:18165: \"$ac_link\"") >&5
18166   (eval $ac_link) 2>&5
18167   ac_status=$?
18168   echo "$as_me:18168: \$? = $ac_status" >&5
18169   (exit $ac_status); } &&
18170          { ac_try='test -s conftest$ac_exeext'
18171   { (eval echo "$as_me:18171: \"$ac_try\"") >&5
18172   (eval $ac_try) 2>&5
18173   ac_status=$?
18174   echo "$as_me:18174: \$? = $ac_status" >&5
18175   (exit $ac_status); }; }; then
18176   ac_cv_func_memmove=yes
18177 else
18178   echo "$as_me: failed program was:" >&5
18179 cat conftest.$ac_ext >&5
18180 ac_cv_func_memmove=no
18181 fi
18182 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18183 fi
18184 echo "$as_me:18184: result: $ac_cv_func_memmove" >&5
18185 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18186 if test $ac_cv_func_memmove = yes; then
18187   :
18188 else
18189
18190 echo "$as_me:18190: checking for bcopy" >&5
18191 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18192 if test "${ac_cv_func_bcopy+set}" = set; then
18193   echo $ECHO_N "(cached) $ECHO_C" >&6
18194 else
18195   cat >conftest.$ac_ext <<_ACEOF
18196 #line 18196 "configure"
18197 #include "confdefs.h"
18198 /* System header to define __stub macros and hopefully few prototypes,
18199     which can conflict with char bcopy (); below.  */
18200 #include <assert.h>
18201 /* Override any gcc2 internal prototype to avoid an error.  */
18202 #ifdef __cplusplus
18203 extern "C"
18204 #endif
18205 /* We use char because int might match the return type of a gcc2
18206    builtin and then its argument prototype would still apply.  */
18207 char bcopy ();
18208 char (*f) ();
18209
18210 int
18211 main ()
18212 {
18213 /* The GNU C library defines this for functions which it implements
18214     to always fail with ENOSYS.  Some functions are actually named
18215     something starting with __ and the normal name is an alias.  */
18216 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18217 choke me
18218 #else
18219 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18220 #endif
18221
18222   ;
18223   return 0;
18224 }
18225 _ACEOF
18226 rm -f conftest.$ac_objext conftest$ac_exeext
18227 if { (eval echo "$as_me:18227: \"$ac_link\"") >&5
18228   (eval $ac_link) 2>&5
18229   ac_status=$?
18230   echo "$as_me:18230: \$? = $ac_status" >&5
18231   (exit $ac_status); } &&
18232          { ac_try='test -s conftest$ac_exeext'
18233   { (eval echo "$as_me:18233: \"$ac_try\"") >&5
18234   (eval $ac_try) 2>&5
18235   ac_status=$?
18236   echo "$as_me:18236: \$? = $ac_status" >&5
18237   (exit $ac_status); }; }; then
18238   ac_cv_func_bcopy=yes
18239 else
18240   echo "$as_me: failed program was:" >&5
18241 cat conftest.$ac_ext >&5
18242 ac_cv_func_bcopy=no
18243 fi
18244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18245 fi
18246 echo "$as_me:18246: result: $ac_cv_func_bcopy" >&5
18247 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18248 if test $ac_cv_func_bcopy = yes; then
18249
18250         echo "$as_me:18250: checking if bcopy does overlapping moves" >&5
18251 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18252 if test "${cf_cv_good_bcopy+set}" = set; then
18253   echo $ECHO_N "(cached) $ECHO_C" >&6
18254 else
18255
18256                 if test "$cross_compiling" = yes; then
18257   cf_cv_good_bcopy=unknown
18258 else
18259   cat >conftest.$ac_ext <<_ACEOF
18260 #line 18260 "configure"
18261 #include "confdefs.h"
18262
18263 int main() {
18264         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18265         char temp[40];
18266         bcopy(data, temp, sizeof(data));
18267         bcopy(temp+10, temp, 15);
18268         bcopy(temp+5, temp+15, 10);
18269         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18270 }
18271
18272 _ACEOF
18273 rm -f conftest$ac_exeext
18274 if { (eval echo "$as_me:18274: \"$ac_link\"") >&5
18275   (eval $ac_link) 2>&5
18276   ac_status=$?
18277   echo "$as_me:18277: \$? = $ac_status" >&5
18278   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18279   { (eval echo "$as_me:18279: \"$ac_try\"") >&5
18280   (eval $ac_try) 2>&5
18281   ac_status=$?
18282   echo "$as_me:18282: \$? = $ac_status" >&5
18283   (exit $ac_status); }; }; then
18284   cf_cv_good_bcopy=yes
18285 else
18286   echo "$as_me: program exited with status $ac_status" >&5
18287 echo "$as_me: failed program was:" >&5
18288 cat conftest.$ac_ext >&5
18289 cf_cv_good_bcopy=no
18290 fi
18291 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18292 fi
18293
18294 fi
18295 echo "$as_me:18295: result: $cf_cv_good_bcopy" >&5
18296 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18297
18298 else
18299   cf_cv_good_bcopy=no
18300 fi
18301
18302         if test "$cf_cv_good_bcopy" = yes ; then
18303
18304 cat >>confdefs.h <<\EOF
18305 #define USE_OK_BCOPY 1
18306 EOF
18307
18308         else
18309
18310 cat >>confdefs.h <<\EOF
18311 #define USE_MY_MEMMOVE 1
18312 EOF
18313
18314         fi
18315
18316 fi
18317
18318 tty 2>&1 >/dev/null || {
18319 for ac_func in posix_openpt
18320 do
18321 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18322 echo "$as_me:18322: checking for $ac_func" >&5
18323 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18324 if eval "test \"\${$as_ac_var+set}\" = set"; then
18325   echo $ECHO_N "(cached) $ECHO_C" >&6
18326 else
18327   cat >conftest.$ac_ext <<_ACEOF
18328 #line 18328 "configure"
18329 #include "confdefs.h"
18330 /* System header to define __stub macros and hopefully few prototypes,
18331     which can conflict with char $ac_func (); below.  */
18332 #include <assert.h>
18333 /* Override any gcc2 internal prototype to avoid an error.  */
18334 #ifdef __cplusplus
18335 extern "C"
18336 #endif
18337 /* We use char because int might match the return type of a gcc2
18338    builtin and then its argument prototype would still apply.  */
18339 char $ac_func ();
18340 char (*f) ();
18341
18342 int
18343 main ()
18344 {
18345 /* The GNU C library defines this for functions which it implements
18346     to always fail with ENOSYS.  Some functions are actually named
18347     something starting with __ and the normal name is an alias.  */
18348 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18349 choke me
18350 #else
18351 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18352 #endif
18353
18354   ;
18355   return 0;
18356 }
18357 _ACEOF
18358 rm -f conftest.$ac_objext conftest$ac_exeext
18359 if { (eval echo "$as_me:18359: \"$ac_link\"") >&5
18360   (eval $ac_link) 2>&5
18361   ac_status=$?
18362   echo "$as_me:18362: \$? = $ac_status" >&5
18363   (exit $ac_status); } &&
18364          { ac_try='test -s conftest$ac_exeext'
18365   { (eval echo "$as_me:18365: \"$ac_try\"") >&5
18366   (eval $ac_try) 2>&5
18367   ac_status=$?
18368   echo "$as_me:18368: \$? = $ac_status" >&5
18369   (exit $ac_status); }; }; then
18370   eval "$as_ac_var=yes"
18371 else
18372   echo "$as_me: failed program was:" >&5
18373 cat conftest.$ac_ext >&5
18374 eval "$as_ac_var=no"
18375 fi
18376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18377 fi
18378 echo "$as_me:18378: result: `eval echo '${'$as_ac_var'}'`" >&5
18379 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18380 if test `eval echo '${'$as_ac_var'}'` = yes; then
18381   cat >>confdefs.h <<EOF
18382 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18383 EOF
18384
18385 fi
18386 done
18387  }
18388 echo "$as_me:18388: checking if poll really works" >&5
18389 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18390 if test "${cf_cv_working_poll+set}" = set; then
18391   echo $ECHO_N "(cached) $ECHO_C" >&6
18392 else
18393
18394 if test "$cross_compiling" = yes; then
18395   cf_cv_working_poll=unknown
18396 else
18397   cat >conftest.$ac_ext <<_ACEOF
18398 #line 18398 "configure"
18399 #include "confdefs.h"
18400
18401 #include <stdlib.h>
18402 #include <stdio.h>
18403 #include <unistd.h>
18404 #include <fcntl.h>
18405 #ifdef HAVE_POLL_H
18406 #include <poll.h>
18407 #else
18408 #include <sys/poll.h>
18409 #endif
18410 int main(void) {
18411         struct pollfd myfds;
18412         int ret;
18413
18414         /* check for Darwin bug with respect to "devices" */
18415         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18416         if (myfds.fd < 0)
18417                 myfds.fd = 0;
18418         myfds.events = POLLIN;
18419         myfds.revents = 0;
18420
18421         ret = poll(&myfds, 1, 100);
18422
18423         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18424                 ret = -1;
18425         } else {
18426                 int fd = 0;
18427                 if (!isatty(fd)) {
18428                         fd = open("/dev/tty", 2);       /* O_RDWR */
18429                 }
18430 #ifdef HAVE_POSIX_OPENPT
18431                 if (fd < 0) {
18432                         fd = posix_openpt(O_RDWR);
18433                 }
18434 #endif
18435
18436                 if (fd >= 0) {
18437                         /* also check with standard input */
18438                         myfds.fd = fd;
18439                         myfds.events = POLLIN;
18440                         myfds.revents = 0;
18441                         ret = poll(&myfds, 1, 100);
18442                 } else {
18443                         ret = -1;
18444                 }
18445         }
18446         ${cf_cv_main_return:-return}(ret < 0);
18447 }
18448 _ACEOF
18449 rm -f conftest$ac_exeext
18450 if { (eval echo "$as_me:18450: \"$ac_link\"") >&5
18451   (eval $ac_link) 2>&5
18452   ac_status=$?
18453   echo "$as_me:18453: \$? = $ac_status" >&5
18454   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18455   { (eval echo "$as_me:18455: \"$ac_try\"") >&5
18456   (eval $ac_try) 2>&5
18457   ac_status=$?
18458   echo "$as_me:18458: \$? = $ac_status" >&5
18459   (exit $ac_status); }; }; then
18460   cf_cv_working_poll=yes
18461 else
18462   echo "$as_me: program exited with status $ac_status" >&5
18463 echo "$as_me: failed program was:" >&5
18464 cat conftest.$ac_ext >&5
18465 cf_cv_working_poll=no
18466 fi
18467 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18468 fi
18469 fi
18470 echo "$as_me:18470: result: $cf_cv_working_poll" >&5
18471 echo "${ECHO_T}$cf_cv_working_poll" >&6
18472 test "$cf_cv_working_poll" = "yes" &&
18473 cat >>confdefs.h <<\EOF
18474 #define HAVE_WORKING_POLL 1
18475 EOF
18476
18477 echo "$as_me:18477: checking for va_copy" >&5
18478 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18479 if test "${cf_cv_have_va_copy+set}" = set; then
18480   echo $ECHO_N "(cached) $ECHO_C" >&6
18481 else
18482
18483 cat >conftest.$ac_ext <<_ACEOF
18484 #line 18484 "configure"
18485 #include "confdefs.h"
18486
18487 #include <stdarg.h>
18488
18489 int
18490 main ()
18491 {
18492
18493         static va_list dst;
18494         static va_list src;
18495         va_copy(dst, src)
18496   ;
18497   return 0;
18498 }
18499 _ACEOF
18500 rm -f conftest.$ac_objext conftest$ac_exeext
18501 if { (eval echo "$as_me:18501: \"$ac_link\"") >&5
18502   (eval $ac_link) 2>&5
18503   ac_status=$?
18504   echo "$as_me:18504: \$? = $ac_status" >&5
18505   (exit $ac_status); } &&
18506          { ac_try='test -s conftest$ac_exeext'
18507   { (eval echo "$as_me:18507: \"$ac_try\"") >&5
18508   (eval $ac_try) 2>&5
18509   ac_status=$?
18510   echo "$as_me:18510: \$? = $ac_status" >&5
18511   (exit $ac_status); }; }; then
18512   cf_cv_have_va_copy=yes
18513 else
18514   echo "$as_me: failed program was:" >&5
18515 cat conftest.$ac_ext >&5
18516 cf_cv_have_va_copy=no
18517 fi
18518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18519 fi
18520 echo "$as_me:18520: result: $cf_cv_have_va_copy" >&5
18521 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18522
18523 test "$cf_cv_have_va_copy" = yes &&
18524 cat >>confdefs.h <<\EOF
18525 #define HAVE_VA_COPY 1
18526 EOF
18527
18528 echo "$as_me:18528: checking for __va_copy" >&5
18529 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18530 if test "${cf_cv_have___va_copy+set}" = set; then
18531   echo $ECHO_N "(cached) $ECHO_C" >&6
18532 else
18533
18534 cat >conftest.$ac_ext <<_ACEOF
18535 #line 18535 "configure"
18536 #include "confdefs.h"
18537
18538 #include <stdarg.h>
18539
18540 int
18541 main ()
18542 {
18543
18544         static va_list dst;
18545         static va_list src;
18546         __va_copy(dst, src)
18547   ;
18548   return 0;
18549 }
18550 _ACEOF
18551 rm -f conftest.$ac_objext conftest$ac_exeext
18552 if { (eval echo "$as_me:18552: \"$ac_link\"") >&5
18553   (eval $ac_link) 2>&5
18554   ac_status=$?
18555   echo "$as_me:18555: \$? = $ac_status" >&5
18556   (exit $ac_status); } &&
18557          { ac_try='test -s conftest$ac_exeext'
18558   { (eval echo "$as_me:18558: \"$ac_try\"") >&5
18559   (eval $ac_try) 2>&5
18560   ac_status=$?
18561   echo "$as_me:18561: \$? = $ac_status" >&5
18562   (exit $ac_status); }; }; then
18563   cf_cv_have___va_copy=yes
18564 else
18565   echo "$as_me: failed program was:" >&5
18566 cat conftest.$ac_ext >&5
18567 cf_cv_have___va_copy=no
18568 fi
18569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18570 fi
18571 echo "$as_me:18571: result: $cf_cv_have___va_copy" >&5
18572 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18573
18574 test "$cf_cv_have___va_copy" = yes &&
18575 cat >>confdefs.h <<\EOF
18576 #define HAVE___VA_COPY 1
18577 EOF
18578
18579 echo "$as_me:18579: checking for pid_t" >&5
18580 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18581 if test "${ac_cv_type_pid_t+set}" = set; then
18582   echo $ECHO_N "(cached) $ECHO_C" >&6
18583 else
18584   cat >conftest.$ac_ext <<_ACEOF
18585 #line 18585 "configure"
18586 #include "confdefs.h"
18587 $ac_includes_default
18588 int
18589 main ()
18590 {
18591 if ((pid_t *) 0)
18592   return 0;
18593 if (sizeof (pid_t))
18594   return 0;
18595   ;
18596   return 0;
18597 }
18598 _ACEOF
18599 rm -f conftest.$ac_objext
18600 if { (eval echo "$as_me:18600: \"$ac_compile\"") >&5
18601   (eval $ac_compile) 2>&5
18602   ac_status=$?
18603   echo "$as_me:18603: \$? = $ac_status" >&5
18604   (exit $ac_status); } &&
18605          { ac_try='test -s conftest.$ac_objext'
18606   { (eval echo "$as_me:18606: \"$ac_try\"") >&5
18607   (eval $ac_try) 2>&5
18608   ac_status=$?
18609   echo "$as_me:18609: \$? = $ac_status" >&5
18610   (exit $ac_status); }; }; then
18611   ac_cv_type_pid_t=yes
18612 else
18613   echo "$as_me: failed program was:" >&5
18614 cat conftest.$ac_ext >&5
18615 ac_cv_type_pid_t=no
18616 fi
18617 rm -f conftest.$ac_objext conftest.$ac_ext
18618 fi
18619 echo "$as_me:18619: result: $ac_cv_type_pid_t" >&5
18620 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18621 if test $ac_cv_type_pid_t = yes; then
18622   :
18623 else
18624
18625 cat >>confdefs.h <<EOF
18626 #define pid_t int
18627 EOF
18628
18629 fi
18630
18631 for ac_header in unistd.h vfork.h
18632 do
18633 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18634 echo "$as_me:18634: checking for $ac_header" >&5
18635 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18636 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18637   echo $ECHO_N "(cached) $ECHO_C" >&6
18638 else
18639   cat >conftest.$ac_ext <<_ACEOF
18640 #line 18640 "configure"
18641 #include "confdefs.h"
18642 #include <$ac_header>
18643 _ACEOF
18644 if { (eval echo "$as_me:18644: \"$ac_cpp conftest.$ac_ext\"") >&5
18645   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18646   ac_status=$?
18647   egrep -v '^ *\+' conftest.er1 >conftest.err
18648   rm -f conftest.er1
18649   cat conftest.err >&5
18650   echo "$as_me:18650: \$? = $ac_status" >&5
18651   (exit $ac_status); } >/dev/null; then
18652   if test -s conftest.err; then
18653     ac_cpp_err=$ac_c_preproc_warn_flag
18654   else
18655     ac_cpp_err=
18656   fi
18657 else
18658   ac_cpp_err=yes
18659 fi
18660 if test -z "$ac_cpp_err"; then
18661   eval "$as_ac_Header=yes"
18662 else
18663   echo "$as_me: failed program was:" >&5
18664   cat conftest.$ac_ext >&5
18665   eval "$as_ac_Header=no"
18666 fi
18667 rm -f conftest.err conftest.$ac_ext
18668 fi
18669 echo "$as_me:18669: result: `eval echo '${'$as_ac_Header'}'`" >&5
18670 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18671 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18672   cat >>confdefs.h <<EOF
18673 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18674 EOF
18675
18676 fi
18677 done
18678
18679 for ac_func in fork vfork
18680 do
18681 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18682 echo "$as_me:18682: checking for $ac_func" >&5
18683 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18684 if eval "test \"\${$as_ac_var+set}\" = set"; then
18685   echo $ECHO_N "(cached) $ECHO_C" >&6
18686 else
18687   cat >conftest.$ac_ext <<_ACEOF
18688 #line 18688 "configure"
18689 #include "confdefs.h"
18690 /* System header to define __stub macros and hopefully few prototypes,
18691     which can conflict with char $ac_func (); below.  */
18692 #include <assert.h>
18693 /* Override any gcc2 internal prototype to avoid an error.  */
18694 #ifdef __cplusplus
18695 extern "C"
18696 #endif
18697 /* We use char because int might match the return type of a gcc2
18698    builtin and then its argument prototype would still apply.  */
18699 char $ac_func ();
18700 char (*f) ();
18701
18702 int
18703 main ()
18704 {
18705 /* The GNU C library defines this for functions which it implements
18706     to always fail with ENOSYS.  Some functions are actually named
18707     something starting with __ and the normal name is an alias.  */
18708 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18709 choke me
18710 #else
18711 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18712 #endif
18713
18714   ;
18715   return 0;
18716 }
18717 _ACEOF
18718 rm -f conftest.$ac_objext conftest$ac_exeext
18719 if { (eval echo "$as_me:18719: \"$ac_link\"") >&5
18720   (eval $ac_link) 2>&5
18721   ac_status=$?
18722   echo "$as_me:18722: \$? = $ac_status" >&5
18723   (exit $ac_status); } &&
18724          { ac_try='test -s conftest$ac_exeext'
18725   { (eval echo "$as_me:18725: \"$ac_try\"") >&5
18726   (eval $ac_try) 2>&5
18727   ac_status=$?
18728   echo "$as_me:18728: \$? = $ac_status" >&5
18729   (exit $ac_status); }; }; then
18730   eval "$as_ac_var=yes"
18731 else
18732   echo "$as_me: failed program was:" >&5
18733 cat conftest.$ac_ext >&5
18734 eval "$as_ac_var=no"
18735 fi
18736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18737 fi
18738 echo "$as_me:18738: result: `eval echo '${'$as_ac_var'}'`" >&5
18739 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18740 if test `eval echo '${'$as_ac_var'}'` = yes; then
18741   cat >>confdefs.h <<EOF
18742 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18743 EOF
18744
18745 fi
18746 done
18747
18748 ac_cv_func_fork_works=$ac_cv_func_fork
18749 if test "x$ac_cv_func_fork" = xyes; then
18750   echo "$as_me:18750: checking for working fork" >&5
18751 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18752 if test "${ac_cv_func_fork_works+set}" = set; then
18753   echo $ECHO_N "(cached) $ECHO_C" >&6
18754 else
18755   if test "$cross_compiling" = yes; then
18756   ac_cv_func_fork_works=cross
18757 else
18758   cat >conftest.$ac_ext <<_ACEOF
18759 /* By Rüdiger Kuhlmann. */
18760       #include <sys/types.h>
18761       #if HAVE_UNISTD_H
18762       # include <unistd.h>
18763       #endif
18764       /* Some systems only have a dummy stub for fork() */
18765       int main ()
18766       {
18767         if (fork() < 0)
18768           $ac_main_return (1);
18769         $ac_main_return (0);
18770       }
18771 _ACEOF
18772 rm -f conftest$ac_exeext
18773 if { (eval echo "$as_me:18773: \"$ac_link\"") >&5
18774   (eval $ac_link) 2>&5
18775   ac_status=$?
18776   echo "$as_me:18776: \$? = $ac_status" >&5
18777   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18778   { (eval echo "$as_me:18778: \"$ac_try\"") >&5
18779   (eval $ac_try) 2>&5
18780   ac_status=$?
18781   echo "$as_me:18781: \$? = $ac_status" >&5
18782   (exit $ac_status); }; }; then
18783   ac_cv_func_fork_works=yes
18784 else
18785   echo "$as_me: program exited with status $ac_status" >&5
18786 echo "$as_me: failed program was:" >&5
18787 cat conftest.$ac_ext >&5
18788 ac_cv_func_fork_works=no
18789 fi
18790 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18791 fi
18792 fi
18793 echo "$as_me:18793: result: $ac_cv_func_fork_works" >&5
18794 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18795
18796 fi
18797 if test "x$ac_cv_func_fork_works" = xcross; then
18798   case $host in
18799     *-*-amigaos* | *-*-msdosdjgpp*)
18800       # Override, as these systems have only a dummy fork() stub
18801       ac_cv_func_fork_works=no
18802       ;;
18803     *)
18804       ac_cv_func_fork_works=yes
18805       ;;
18806   esac
18807   { echo "$as_me:18807: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18808 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18809 fi
18810 ac_cv_func_vfork_works=$ac_cv_func_vfork
18811 if test "x$ac_cv_func_vfork" = xyes; then
18812   echo "$as_me:18812: checking for working vfork" >&5
18813 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18814 if test "${ac_cv_func_vfork_works+set}" = set; then
18815   echo $ECHO_N "(cached) $ECHO_C" >&6
18816 else
18817   if test "$cross_compiling" = yes; then
18818   ac_cv_func_vfork_works=cross
18819 else
18820   cat >conftest.$ac_ext <<_ACEOF
18821 #line 18821 "configure"
18822 #include "confdefs.h"
18823 /* Thanks to Paul Eggert for this test.  */
18824 #include <stdio.h>
18825 #include <sys/types.h>
18826 #include <sys/stat.h>
18827 #if HAVE_UNISTD_H
18828 # include <unistd.h>
18829 #endif
18830 #if HAVE_VFORK_H
18831 # include <vfork.h>
18832 #endif
18833 /* On some sparc systems, changes by the child to local and incoming
18834    argument registers are propagated back to the parent.  The compiler
18835    is told about this with #include <vfork.h>, but some compilers
18836    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18837    static variable whose address is put into a register that is
18838    clobbered by the vfork.  */
18839 static
18840 #ifdef __cplusplus
18841 sparc_address_test (int arg)
18842 # else
18843 sparc_address_test (arg) int arg;
18844 #endif
18845 {
18846   static pid_t child;
18847   if (!child) {
18848     child = vfork ();
18849     if (child < 0) {
18850       perror ("vfork");
18851       _exit(2);
18852     }
18853     if (!child) {
18854       arg = getpid();
18855       write(-1, "", 0);
18856       _exit (arg);
18857     }
18858   }
18859 }
18860
18861 int
18862 main ()
18863 {
18864   pid_t parent = getpid ();
18865   pid_t child;
18866
18867   sparc_address_test ();
18868
18869   child = vfork ();
18870
18871   if (child == 0) {
18872     /* Here is another test for sparc vfork register problems.  This
18873        test uses lots of local variables, at least as many local
18874        variables as main has allocated so far including compiler
18875        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18876        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18877        reuse the register of parent for one of the local variables,
18878        since it will think that parent can't possibly be used any more
18879        in this routine.  Assigning to the local variable will thus
18880        munge parent in the parent process.  */
18881     pid_t
18882       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18883       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18884     /* Convince the compiler that p..p7 are live; otherwise, it might
18885        use the same hardware register for all 8 local variables.  */
18886     if (p != p1 || p != p2 || p != p3 || p != p4
18887         || p != p5 || p != p6 || p != p7)
18888       _exit(1);
18889
18890     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18891        from child file descriptors.  If the child closes a descriptor
18892        before it execs or exits, this munges the parent's descriptor
18893        as well.  Test for this by closing stdout in the child.  */
18894     _exit(close(fileno(stdout)) != 0);
18895   } else {
18896     int status;
18897     struct stat st;
18898
18899     while (wait(&status) != child)
18900       ;
18901     $ac_main_return(
18902          /* Was there some problem with vforking?  */
18903          child < 0
18904
18905          /* Did the child fail?  (This shouldn't happen.)  */
18906          || status
18907
18908          /* Did the vfork/compiler bug occur?  */
18909          || parent != getpid()
18910
18911          /* Did the file descriptor bug occur?  */
18912          || fstat(fileno(stdout), &st) != 0
18913          );
18914   }
18915 }
18916 _ACEOF
18917 rm -f conftest$ac_exeext
18918 if { (eval echo "$as_me:18918: \"$ac_link\"") >&5
18919   (eval $ac_link) 2>&5
18920   ac_status=$?
18921   echo "$as_me:18921: \$? = $ac_status" >&5
18922   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18923   { (eval echo "$as_me:18923: \"$ac_try\"") >&5
18924   (eval $ac_try) 2>&5
18925   ac_status=$?
18926   echo "$as_me:18926: \$? = $ac_status" >&5
18927   (exit $ac_status); }; }; then
18928   ac_cv_func_vfork_works=yes
18929 else
18930   echo "$as_me: program exited with status $ac_status" >&5
18931 echo "$as_me: failed program was:" >&5
18932 cat conftest.$ac_ext >&5
18933 ac_cv_func_vfork_works=no
18934 fi
18935 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18936 fi
18937 fi
18938 echo "$as_me:18938: result: $ac_cv_func_vfork_works" >&5
18939 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18940
18941 fi;
18942 if test "x$ac_cv_func_fork_works" = xcross; then
18943   ac_cv_func_vfork_works=ac_cv_func_vfork
18944   { echo "$as_me:18944: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18945 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18946 fi
18947
18948 if test "x$ac_cv_func_vfork_works" = xyes; then
18949
18950 cat >>confdefs.h <<\EOF
18951 #define HAVE_WORKING_VFORK 1
18952 EOF
18953
18954 else
18955
18956 cat >>confdefs.h <<\EOF
18957 #define vfork fork
18958 EOF
18959
18960 fi
18961 if test "x$ac_cv_func_fork_works" = xyes; then
18962
18963 cat >>confdefs.h <<\EOF
18964 #define HAVE_WORKING_FORK 1
18965 EOF
18966
18967 fi
18968
18969 # special check for test/ditto.c
18970
18971 echo "$as_me:18971: checking for openpty in -lutil" >&5
18972 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18973 if test "${ac_cv_lib_util_openpty+set}" = set; then
18974   echo $ECHO_N "(cached) $ECHO_C" >&6
18975 else
18976   ac_check_lib_save_LIBS=$LIBS
18977 LIBS="-lutil  $LIBS"
18978 cat >conftest.$ac_ext <<_ACEOF
18979 #line 18979 "configure"
18980 #include "confdefs.h"
18981
18982 /* Override any gcc2 internal prototype to avoid an error.  */
18983 #ifdef __cplusplus
18984 extern "C"
18985 #endif
18986 /* We use char because int might match the return type of a gcc2
18987    builtin and then its argument prototype would still apply.  */
18988 char openpty ();
18989 int
18990 main ()
18991 {
18992 openpty ();
18993   ;
18994   return 0;
18995 }
18996 _ACEOF
18997 rm -f conftest.$ac_objext conftest$ac_exeext
18998 if { (eval echo "$as_me:18998: \"$ac_link\"") >&5
18999   (eval $ac_link) 2>&5
19000   ac_status=$?
19001   echo "$as_me:19001: \$? = $ac_status" >&5
19002   (exit $ac_status); } &&
19003          { ac_try='test -s conftest$ac_exeext'
19004   { (eval echo "$as_me:19004: \"$ac_try\"") >&5
19005   (eval $ac_try) 2>&5
19006   ac_status=$?
19007   echo "$as_me:19007: \$? = $ac_status" >&5
19008   (exit $ac_status); }; }; then
19009   ac_cv_lib_util_openpty=yes
19010 else
19011   echo "$as_me: failed program was:" >&5
19012 cat conftest.$ac_ext >&5
19013 ac_cv_lib_util_openpty=no
19014 fi
19015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19016 LIBS=$ac_check_lib_save_LIBS
19017 fi
19018 echo "$as_me:19018: result: $ac_cv_lib_util_openpty" >&5
19019 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19020 if test $ac_cv_lib_util_openpty = yes; then
19021   cf_cv_lib_util=yes
19022 else
19023   cf_cv_lib_util=no
19024 fi
19025
19026 echo "$as_me:19026: checking for openpty header" >&5
19027 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19028 if test "${cf_cv_func_openpty+set}" = set; then
19029   echo $ECHO_N "(cached) $ECHO_C" >&6
19030 else
19031
19032         cf_save_LIBS="$LIBS"
19033         test $cf_cv_lib_util = yes && {
19034 cf_add_libs="-lutil"
19035 # Filter out duplicates - this happens with badly-designed ".pc" files...
19036 for cf_add_1lib in $LIBS
19037 do
19038         for cf_add_2lib in $cf_add_libs
19039         do
19040                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19041                 then
19042                         cf_add_1lib=
19043                         break
19044                 fi
19045         done
19046         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19047 done
19048 LIBS="$cf_add_libs"
19049  }
19050         for cf_header in pty.h libutil.h util.h
19051         do
19052         cat >conftest.$ac_ext <<_ACEOF
19053 #line 19053 "configure"
19054 #include "confdefs.h"
19055
19056 #include <$cf_header>
19057
19058 int
19059 main ()
19060 {
19061
19062         int x = openpty((int *)0, (int *)0, (char *)0,
19063                                    (struct termios *)0, (struct winsize *)0);
19064
19065   ;
19066   return 0;
19067 }
19068 _ACEOF
19069 rm -f conftest.$ac_objext conftest$ac_exeext
19070 if { (eval echo "$as_me:19070: \"$ac_link\"") >&5
19071   (eval $ac_link) 2>&5
19072   ac_status=$?
19073   echo "$as_me:19073: \$? = $ac_status" >&5
19074   (exit $ac_status); } &&
19075          { ac_try='test -s conftest$ac_exeext'
19076   { (eval echo "$as_me:19076: \"$ac_try\"") >&5
19077   (eval $ac_try) 2>&5
19078   ac_status=$?
19079   echo "$as_me:19079: \$? = $ac_status" >&5
19080   (exit $ac_status); }; }; then
19081
19082                 cf_cv_func_openpty=$cf_header
19083                 break
19084
19085 else
19086   echo "$as_me: failed program was:" >&5
19087 cat conftest.$ac_ext >&5
19088
19089                 cf_cv_func_openpty=no
19090
19091 fi
19092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19093         done
19094         LIBS="$cf_save_LIBS"
19095
19096 fi
19097 echo "$as_me:19097: result: $cf_cv_func_openpty" >&5
19098 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19099
19100 if test "$cf_cv_func_openpty" != no ; then
19101
19102 cat >>confdefs.h <<EOF
19103 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19104 EOF
19105
19106 cat >>confdefs.h <<\EOF
19107 #define USE_XTERM_PTY 1
19108 EOF
19109
19110         if test "x$cf_cv_lib_util" = xyes ; then
19111
19112 cf_add_libs="-lutil"
19113 # Filter out duplicates - this happens with badly-designed ".pc" files...
19114 for cf_add_1lib in $TEST_LIBS
19115 do
19116         for cf_add_2lib in $cf_add_libs
19117         do
19118                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19119                 then
19120                         cf_add_1lib=
19121                         break
19122                 fi
19123         done
19124         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19125 done
19126 TEST_LIBS="$cf_add_libs"
19127
19128         fi
19129 fi
19130
19131 if test "$with_hashed_db" != no ; then
19132
19133 cat >>confdefs.h <<\EOF
19134 #define USE_HASHED_DB 1
19135 EOF
19136
19137 case $with_hashed_db in
19138 (yes|*able*)
19139         ;;
19140 (*)
19141         if test -d "$with_hashed_db" ; then
19142
19143 if test -n "$with_hashed_db/include" ; then
19144   for cf_add_incdir in $with_hashed_db/include
19145   do
19146         while test $cf_add_incdir != /usr/include
19147         do
19148           if test -d $cf_add_incdir
19149           then
19150                 cf_have_incdir=no
19151                 if test -n "$CFLAGS$CPPFLAGS" ; then
19152                   # a loop is needed to ensure we can add subdirs of existing dirs
19153                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19154                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19155                           cf_have_incdir=yes; break
19156                         fi
19157                   done
19158                 fi
19159
19160                 if test "$cf_have_incdir" = no ; then
19161                   if test "$cf_add_incdir" = /usr/local/include ; then
19162                         if test "$GCC" = yes
19163                         then
19164                           cf_save_CPPFLAGS=$CPPFLAGS
19165                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19166                           cat >conftest.$ac_ext <<_ACEOF
19167 #line 19167 "configure"
19168 #include "confdefs.h"
19169 #include <stdio.h>
19170 int
19171 main ()
19172 {
19173 printf("Hello")
19174   ;
19175   return 0;
19176 }
19177 _ACEOF
19178 rm -f conftest.$ac_objext
19179 if { (eval echo "$as_me:19179: \"$ac_compile\"") >&5
19180   (eval $ac_compile) 2>&5
19181   ac_status=$?
19182   echo "$as_me:19182: \$? = $ac_status" >&5
19183   (exit $ac_status); } &&
19184          { ac_try='test -s conftest.$ac_objext'
19185   { (eval echo "$as_me:19185: \"$ac_try\"") >&5
19186   (eval $ac_try) 2>&5
19187   ac_status=$?
19188   echo "$as_me:19188: \$? = $ac_status" >&5
19189   (exit $ac_status); }; }; then
19190   :
19191 else
19192   echo "$as_me: failed program was:" >&5
19193 cat conftest.$ac_ext >&5
19194 cf_have_incdir=yes
19195 fi
19196 rm -f conftest.$ac_objext conftest.$ac_ext
19197                           CPPFLAGS=$cf_save_CPPFLAGS
19198                         fi
19199                   fi
19200                 fi
19201
19202                 if test "$cf_have_incdir" = no ; then
19203                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19204
19205 echo "${as_me:-configure}:19205: testing adding $cf_add_incdir to include-path ..." 1>&5
19206
19207                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19208
19209                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19210                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19211                   cf_add_incdir="$cf_top_incdir"
19212                 else
19213                   break
19214                 fi
19215           else
19216                 break
19217           fi
19218         done
19219   done
19220 fi
19221
19222 if test -n "$with_hashed_db/lib" ; then
19223         for cf_add_libdir in $with_hashed_db/lib
19224         do
19225                 if test $cf_add_libdir = /usr/lib ; then
19226                         :
19227                 elif test -d $cf_add_libdir
19228                 then
19229                         cf_have_libdir=no
19230                         if test -n "$LDFLAGS$LIBS" ; then
19231                                 # a loop is needed to ensure we can add subdirs of existing dirs
19232                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19233                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19234                                                 cf_have_libdir=yes; break
19235                                         fi
19236                                 done
19237                         fi
19238                         if test "$cf_have_libdir" = no ; then
19239                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19240
19241 echo "${as_me:-configure}:19241: testing adding $cf_add_libdir to library-path ..." 1>&5
19242
19243                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19244                         fi
19245                 fi
19246         done
19247 fi
19248
19249         else
19250                 case "$with_hashed_db" in
19251                 (./*|../*|/*)
19252                         { echo "$as_me:19252: WARNING: no such directory $with_hashed_db" >&5
19253 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19254                         ;;
19255                 (*)
19256
19257 cf_search=
19258
19259 test "x$prefix" != "xNONE" && \
19260 test -d "$prefix" && \
19261  {
19262         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19263         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19264         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19265         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19266         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19267         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19268 }
19269
19270 for cf_subdir_prefix in \
19271         /usr \
19272         /usr/local \
19273         /usr/pkg \
19274         /opt \
19275         /opt/local \
19276         $HOME
19277 do
19278
19279 test "x$cf_subdir_prefix" != "x$prefix" && \
19280 test -d "$cf_subdir_prefix" && \
19281 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19282         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19283         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19284         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19285         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19286         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19287         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"
19288 }
19289
19290 done
19291
19292         for cf_item in $cf_search
19293         do
19294                 case $cf_item in
19295                 (*/$with_hashed_db)
19296
19297 if test -n "$cf_item" ; then
19298   for cf_add_incdir in $cf_item
19299   do
19300         while test $cf_add_incdir != /usr/include
19301         do
19302           if test -d $cf_add_incdir
19303           then
19304                 cf_have_incdir=no
19305                 if test -n "$CFLAGS$CPPFLAGS" ; then
19306                   # a loop is needed to ensure we can add subdirs of existing dirs
19307                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19308                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19309                           cf_have_incdir=yes; break
19310                         fi
19311                   done
19312                 fi
19313
19314                 if test "$cf_have_incdir" = no ; then
19315                   if test "$cf_add_incdir" = /usr/local/include ; then
19316                         if test "$GCC" = yes
19317                         then
19318                           cf_save_CPPFLAGS=$CPPFLAGS
19319                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19320                           cat >conftest.$ac_ext <<_ACEOF
19321 #line 19321 "configure"
19322 #include "confdefs.h"
19323 #include <stdio.h>
19324 int
19325 main ()
19326 {
19327 printf("Hello")
19328   ;
19329   return 0;
19330 }
19331 _ACEOF
19332 rm -f conftest.$ac_objext
19333 if { (eval echo "$as_me:19333: \"$ac_compile\"") >&5
19334   (eval $ac_compile) 2>&5
19335   ac_status=$?
19336   echo "$as_me:19336: \$? = $ac_status" >&5
19337   (exit $ac_status); } &&
19338          { ac_try='test -s conftest.$ac_objext'
19339   { (eval echo "$as_me:19339: \"$ac_try\"") >&5
19340   (eval $ac_try) 2>&5
19341   ac_status=$?
19342   echo "$as_me:19342: \$? = $ac_status" >&5
19343   (exit $ac_status); }; }; then
19344   :
19345 else
19346   echo "$as_me: failed program was:" >&5
19347 cat conftest.$ac_ext >&5
19348 cf_have_incdir=yes
19349 fi
19350 rm -f conftest.$ac_objext conftest.$ac_ext
19351                           CPPFLAGS=$cf_save_CPPFLAGS
19352                         fi
19353                   fi
19354                 fi
19355
19356                 if test "$cf_have_incdir" = no ; then
19357                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19358
19359 echo "${as_me:-configure}:19359: testing adding $cf_add_incdir to include-path ..." 1>&5
19360
19361                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19362
19363                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19364                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19365                   cf_add_incdir="$cf_top_incdir"
19366                 else
19367                   break
19368                 fi
19369           else
19370                 break
19371           fi
19372         done
19373   done
19374 fi
19375
19376                         ;;
19377                 esac
19378         done
19379
19380 cf_search=
19381
19382 test "x$prefix" != "xNONE" && \
19383 test -d "$prefix" && \
19384  {
19385         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19386         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19387         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19388         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19389         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19390         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19391 }
19392
19393 for cf_subdir_prefix in \
19394         /usr \
19395         /usr/local \
19396         /usr/pkg \
19397         /opt \
19398         /opt/local \
19399         $HOME
19400 do
19401
19402 test "x$cf_subdir_prefix" != "x$prefix" && \
19403 test -d "$cf_subdir_prefix" && \
19404 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19405         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19406         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19407         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19408         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19409         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19410         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"
19411 }
19412
19413 done
19414
19415         for cf_item in $cf_search
19416         do
19417                 case $cf_item in
19418                 (*/$with_hashed_db)
19419
19420 if test -n "$cf_item" ; then
19421         for cf_add_libdir in $cf_item
19422         do
19423                 if test $cf_add_libdir = /usr/lib ; then
19424                         :
19425                 elif test -d $cf_add_libdir
19426                 then
19427                         cf_have_libdir=no
19428                         if test -n "$LDFLAGS$LIBS" ; then
19429                                 # a loop is needed to ensure we can add subdirs of existing dirs
19430                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19431                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19432                                                 cf_have_libdir=yes; break
19433                                         fi
19434                                 done
19435                         fi
19436                         if test "$cf_have_libdir" = no ; then
19437                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19438
19439 echo "${as_me:-configure}:19439: testing adding $cf_add_libdir to library-path ..." 1>&5
19440
19441                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19442                         fi
19443                 fi
19444         done
19445 fi
19446
19447                         ;;
19448                 esac
19449         done
19450
19451                         ;;
19452                 esac
19453         fi
19454 esac
19455
19456 echo "$as_me:19456: checking for db.h" >&5
19457 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19458 if test "${ac_cv_header_db_h+set}" = set; then
19459   echo $ECHO_N "(cached) $ECHO_C" >&6
19460 else
19461   cat >conftest.$ac_ext <<_ACEOF
19462 #line 19462 "configure"
19463 #include "confdefs.h"
19464 #include <db.h>
19465 _ACEOF
19466 if { (eval echo "$as_me:19466: \"$ac_cpp conftest.$ac_ext\"") >&5
19467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19468   ac_status=$?
19469   egrep -v '^ *\+' conftest.er1 >conftest.err
19470   rm -f conftest.er1
19471   cat conftest.err >&5
19472   echo "$as_me:19472: \$? = $ac_status" >&5
19473   (exit $ac_status); } >/dev/null; then
19474   if test -s conftest.err; then
19475     ac_cpp_err=$ac_c_preproc_warn_flag
19476   else
19477     ac_cpp_err=
19478   fi
19479 else
19480   ac_cpp_err=yes
19481 fi
19482 if test -z "$ac_cpp_err"; then
19483   ac_cv_header_db_h=yes
19484 else
19485   echo "$as_me: failed program was:" >&5
19486   cat conftest.$ac_ext >&5
19487   ac_cv_header_db_h=no
19488 fi
19489 rm -f conftest.err conftest.$ac_ext
19490 fi
19491 echo "$as_me:19491: result: $ac_cv_header_db_h" >&5
19492 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19493 if test $ac_cv_header_db_h = yes; then
19494
19495 echo "$as_me:19495: checking for version of db" >&5
19496 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19497 if test "${cf_cv_hashed_db_version+set}" = set; then
19498   echo $ECHO_N "(cached) $ECHO_C" >&6
19499 else
19500
19501 cf_cv_hashed_db_version=unknown
19502
19503 for cf_db_version in 1 2 3 4 5 6
19504 do
19505
19506 echo "${as_me:-configure}:19506: testing checking for db version $cf_db_version ..." 1>&5
19507
19508         cat >conftest.$ac_ext <<_ACEOF
19509 #line 19509 "configure"
19510 #include "confdefs.h"
19511
19512 $ac_includes_default
19513 #include <db.h>
19514
19515 #ifdef DB_VERSION_MAJOR
19516         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19517 #if $cf_db_version == DB_VERSION_MAJOR
19518         /* ok */
19519 #else
19520         make an error
19521 #endif
19522 #else
19523 #if $cf_db_version == 1
19524         /* ok: assuming this is DB 1.8.5 */
19525 #else
19526         make an error
19527 #endif
19528 #endif
19529
19530 int
19531 main ()
19532 {
19533 DBT *foo = 0
19534   ;
19535   return 0;
19536 }
19537 _ACEOF
19538 rm -f conftest.$ac_objext
19539 if { (eval echo "$as_me:19539: \"$ac_compile\"") >&5
19540   (eval $ac_compile) 2>&5
19541   ac_status=$?
19542   echo "$as_me:19542: \$? = $ac_status" >&5
19543   (exit $ac_status); } &&
19544          { ac_try='test -s conftest.$ac_objext'
19545   { (eval echo "$as_me:19545: \"$ac_try\"") >&5
19546   (eval $ac_try) 2>&5
19547   ac_status=$?
19548   echo "$as_me:19548: \$? = $ac_status" >&5
19549   (exit $ac_status); }; }; then
19550
19551         cf_cv_hashed_db_version=$cf_db_version
19552         break
19553
19554 else
19555   echo "$as_me: failed program was:" >&5
19556 cat conftest.$ac_ext >&5
19557 fi
19558 rm -f conftest.$ac_objext conftest.$ac_ext
19559 done
19560
19561 fi
19562 echo "$as_me:19562: result: $cf_cv_hashed_db_version" >&5
19563 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19564
19565 if test "$cf_cv_hashed_db_version" = unknown ; then
19566         { { echo "$as_me:19566: error: Cannot determine version of db" >&5
19567 echo "$as_me: error: Cannot determine version of db" >&2;}
19568    { (exit 1); exit 1; }; }
19569 else
19570
19571 echo "$as_me:19571: checking for db libraries" >&5
19572 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19573 if test "${cf_cv_hashed_db_libs+set}" = set; then
19574   echo $ECHO_N "(cached) $ECHO_C" >&6
19575 else
19576
19577 cf_cv_hashed_db_libs=unknown
19578 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19579 do
19580         cf_save_libs="$LIBS"
19581         if test -n "$cf_db_libs"; then
19582
19583 cf_add_libs="-l$cf_db_libs"
19584 # Filter out duplicates - this happens with badly-designed ".pc" files...
19585 for cf_add_1lib in $LIBS
19586 do
19587         for cf_add_2lib in $cf_add_libs
19588         do
19589                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19590                 then
19591                         cf_add_1lib=
19592                         break
19593                 fi
19594         done
19595         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19596 done
19597 LIBS="$cf_add_libs"
19598
19599         fi
19600
19601 echo "${as_me:-configure}:19601: testing checking for library "$cf_db_libs" ..." 1>&5
19602
19603         cat >conftest.$ac_ext <<_ACEOF
19604 #line 19604 "configure"
19605 #include "confdefs.h"
19606
19607 $ac_includes_default
19608 #include <db.h>
19609
19610 int
19611 main ()
19612 {
19613
19614         char *path = "/tmp/foo";
19615 #ifdef DB_VERSION_MAJOR
19616 #if DB_VERSION_MAJOR >= 4
19617         DB *result = 0;
19618         db_create(&result, NULL, 0);
19619         result->open(result,
19620                 NULL,
19621                 path,
19622                 path,
19623                 DB_HASH,
19624                 DB_CREATE,
19625                 0644);
19626 #elif DB_VERSION_MAJOR >= 3
19627         DB *result = 0;
19628         db_create(&result, NULL, 0);
19629         result->open(result,
19630                 path,
19631                 path,
19632                 DB_HASH,
19633                 DB_CREATE,
19634                 0644);
19635 #elif DB_VERSION_MAJOR >= 2
19636         DB *result = 0;
19637         db_open(path,
19638                 DB_HASH,
19639                 DB_CREATE,
19640                 0644,
19641                 (DB_ENV *) 0,
19642                 (DB_INFO *) 0,
19643                 &result);
19644 #endif /* DB_VERSION_MAJOR */
19645 #else
19646         DB *result = dbopen(path,
19647                      2,
19648                      0644,
19649                      DB_HASH,
19650                      0);
19651 #endif
19652         ${cf_cv_main_return:-return}(result != 0)
19653
19654   ;
19655   return 0;
19656 }
19657 _ACEOF
19658 rm -f conftest.$ac_objext conftest$ac_exeext
19659 if { (eval echo "$as_me:19659: \"$ac_link\"") >&5
19660   (eval $ac_link) 2>&5
19661   ac_status=$?
19662   echo "$as_me:19662: \$? = $ac_status" >&5
19663   (exit $ac_status); } &&
19664          { ac_try='test -s conftest$ac_exeext'
19665   { (eval echo "$as_me:19665: \"$ac_try\"") >&5
19666   (eval $ac_try) 2>&5
19667   ac_status=$?
19668   echo "$as_me:19668: \$? = $ac_status" >&5
19669   (exit $ac_status); }; }; then
19670
19671         if test -n "$cf_db_libs" ; then
19672                 cf_cv_hashed_db_libs=$cf_db_libs
19673         else
19674                 cf_cv_hashed_db_libs=default
19675         fi
19676         LIBS="$cf_save_libs"
19677         break
19678
19679 else
19680   echo "$as_me: failed program was:" >&5
19681 cat conftest.$ac_ext >&5
19682 fi
19683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19684         LIBS="$cf_save_libs"
19685 done
19686
19687 fi
19688 echo "$as_me:19688: result: $cf_cv_hashed_db_libs" >&5
19689 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19690
19691         if test "$cf_cv_hashed_db_libs" = unknown ; then
19692                 { { echo "$as_me:19692: error: Cannot determine library for db" >&5
19693 echo "$as_me: error: Cannot determine library for db" >&2;}
19694    { (exit 1); exit 1; }; }
19695         elif test "$cf_cv_hashed_db_libs" != default ; then
19696
19697 cf_add_libs="-l$cf_cv_hashed_db_libs"
19698 # Filter out duplicates - this happens with badly-designed ".pc" files...
19699 for cf_add_1lib in $LIBS
19700 do
19701         for cf_add_2lib in $cf_add_libs
19702         do
19703                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19704                 then
19705                         cf_add_1lib=
19706                         break
19707                 fi
19708         done
19709         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19710 done
19711 LIBS="$cf_add_libs"
19712
19713         fi
19714 fi
19715
19716 else
19717
19718         { { echo "$as_me:19718: error: Cannot find db.h" >&5
19719 echo "$as_me: error: Cannot find db.h" >&2;}
19720    { (exit 1); exit 1; }; }
19721
19722 fi
19723
19724 fi
19725
19726 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19727         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19728         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19729 fi
19730
19731 # Just in case, check if the C compiler has a bool type.
19732
19733 echo "$as_me:19733: checking if we should include stdbool.h" >&5
19734 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19735
19736 if test "${cf_cv_header_stdbool_h+set}" = set; then
19737   echo $ECHO_N "(cached) $ECHO_C" >&6
19738 else
19739
19740         cat >conftest.$ac_ext <<_ACEOF
19741 #line 19741 "configure"
19742 #include "confdefs.h"
19743
19744 int
19745 main ()
19746 {
19747 bool foo = false
19748   ;
19749   return 0;
19750 }
19751 _ACEOF
19752 rm -f conftest.$ac_objext
19753 if { (eval echo "$as_me:19753: \"$ac_compile\"") >&5
19754   (eval $ac_compile) 2>&5
19755   ac_status=$?
19756   echo "$as_me:19756: \$? = $ac_status" >&5
19757   (exit $ac_status); } &&
19758          { ac_try='test -s conftest.$ac_objext'
19759   { (eval echo "$as_me:19759: \"$ac_try\"") >&5
19760   (eval $ac_try) 2>&5
19761   ac_status=$?
19762   echo "$as_me:19762: \$? = $ac_status" >&5
19763   (exit $ac_status); }; }; then
19764   cf_cv_header_stdbool_h=0
19765 else
19766   echo "$as_me: failed program was:" >&5
19767 cat conftest.$ac_ext >&5
19768 cat >conftest.$ac_ext <<_ACEOF
19769 #line 19769 "configure"
19770 #include "confdefs.h"
19771
19772 #ifndef __BEOS__
19773 #include <stdbool.h>
19774 #endif
19775
19776 int
19777 main ()
19778 {
19779 bool foo = false
19780   ;
19781   return 0;
19782 }
19783 _ACEOF
19784 rm -f conftest.$ac_objext
19785 if { (eval echo "$as_me:19785: \"$ac_compile\"") >&5
19786   (eval $ac_compile) 2>&5
19787   ac_status=$?
19788   echo "$as_me:19788: \$? = $ac_status" >&5
19789   (exit $ac_status); } &&
19790          { ac_try='test -s conftest.$ac_objext'
19791   { (eval echo "$as_me:19791: \"$ac_try\"") >&5
19792   (eval $ac_try) 2>&5
19793   ac_status=$?
19794   echo "$as_me:19794: \$? = $ac_status" >&5
19795   (exit $ac_status); }; }; then
19796   cf_cv_header_stdbool_h=1
19797 else
19798   echo "$as_me: failed program was:" >&5
19799 cat conftest.$ac_ext >&5
19800 cf_cv_header_stdbool_h=0
19801 fi
19802 rm -f conftest.$ac_objext conftest.$ac_ext
19803 fi
19804 rm -f conftest.$ac_objext conftest.$ac_ext
19805 fi
19806
19807 if test "$cf_cv_header_stdbool_h" = 1
19808 then    echo "$as_me:19808: result: yes" >&5
19809 echo "${ECHO_T}yes" >&6
19810 else    echo "$as_me:19810: result: no" >&5
19811 echo "${ECHO_T}no" >&6
19812 fi
19813
19814 echo "$as_me:19814: checking for builtin bool type" >&5
19815 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19816
19817 if test "${cf_cv_cc_bool_type+set}" = set; then
19818   echo $ECHO_N "(cached) $ECHO_C" >&6
19819 else
19820
19821         cat >conftest.$ac_ext <<_ACEOF
19822 #line 19822 "configure"
19823 #include "confdefs.h"
19824
19825 #include <stdio.h>
19826 #include <sys/types.h>
19827
19828 int
19829 main ()
19830 {
19831 bool x = false
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_cv_cc_bool_type=1
19849 else
19850   echo "$as_me: failed program was:" >&5
19851 cat conftest.$ac_ext >&5
19852 cf_cv_cc_bool_type=0
19853 fi
19854 rm -f conftest.$ac_objext conftest.$ac_ext
19855
19856 fi
19857
19858 if test "$cf_cv_cc_bool_type" = 1
19859 then    echo "$as_me:19859: result: yes" >&5
19860 echo "${ECHO_T}yes" >&6
19861 else    echo "$as_me:19861: result: no" >&5
19862 echo "${ECHO_T}no" >&6
19863 fi
19864
19865 # Check for C++ compiler characteristics (and ensure that it's there!)
19866 if test -n "$CXX" ; then
19867         ac_ext=cc
19868 ac_cpp='$CXXCPP $CPPFLAGS'
19869 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19870 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19871 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19872 ac_main_return=return
19873
19874 if test -n "$GXX" ; then
19875
19876         cf_save="$LIBS"
19877         LIBS="$LIBS $CXXLIBS"
19878         echo "$as_me:19878: checking if we already have C++ library" >&5
19879 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19880         cat >conftest.$ac_ext <<_ACEOF
19881 #line 19881 "configure"
19882 #include "confdefs.h"
19883
19884                         #include <iostream>
19885 int
19886 main ()
19887 {
19888
19889                         std::cout << "Hello World!" << std::endl;
19890   ;
19891   return 0;
19892 }
19893 _ACEOF
19894 rm -f conftest.$ac_objext conftest$ac_exeext
19895 if { (eval echo "$as_me:19895: \"$ac_link\"") >&5
19896   (eval $ac_link) 2>&5
19897   ac_status=$?
19898   echo "$as_me:19898: \$? = $ac_status" >&5
19899   (exit $ac_status); } &&
19900          { ac_try='test -s conftest$ac_exeext'
19901   { (eval echo "$as_me:19901: \"$ac_try\"") >&5
19902   (eval $ac_try) 2>&5
19903   ac_status=$?
19904   echo "$as_me:19904: \$? = $ac_status" >&5
19905   (exit $ac_status); }; }; then
19906   cf_have_libstdcpp=yes
19907 else
19908   echo "$as_me: failed program was:" >&5
19909 cat conftest.$ac_ext >&5
19910 cf_have_libstdcpp=no
19911 fi
19912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19913         echo "$as_me:19913: result: $cf_have_libstdcpp" >&5
19914 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19915         LIBS="$cf_save"
19916
19917         if test $cf_have_libstdcpp != yes
19918         then
19919                 case $cf_cv_system_name in
19920                 (os2*)
19921                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19922                                 cf_stdcpp_libname=stdcpp
19923                         else
19924                                 cf_stdcpp_libname=stdc++
19925                         fi
19926                         ;;
19927                 (*)
19928                         cf_stdcpp_libname=stdc++
19929                         ;;
19930                 esac
19931
19932                 echo "$as_me:19932: checking for library $cf_stdcpp_libname" >&5
19933 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19934 if test "${cf_cv_libstdcpp+set}" = set; then
19935   echo $ECHO_N "(cached) $ECHO_C" >&6
19936 else
19937
19938                         cf_save="$LIBS"
19939                         LIBS="$LIBS $CXXLIBS"
19940
19941 cf_add_libs="-l$cf_stdcpp_libname"
19942 # Filter out duplicates - this happens with badly-designed ".pc" files...
19943 for cf_add_1lib in $LIBS
19944 do
19945         for cf_add_2lib in $cf_add_libs
19946         do
19947                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19948                 then
19949                         cf_add_1lib=
19950                         break
19951                 fi
19952         done
19953         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19954 done
19955 LIBS="$cf_add_libs"
19956
19957                 cat >conftest.$ac_ext <<_ACEOF
19958 #line 19958 "configure"
19959 #include "confdefs.h"
19960
19961                                 #include <iostream>
19962 int
19963 main ()
19964 {
19965
19966                                 std::cout << "Hello World!" << std::endl;
19967   ;
19968   return 0;
19969 }
19970 _ACEOF
19971 rm -f conftest.$ac_objext conftest$ac_exeext
19972 if { (eval echo "$as_me:19972: \"$ac_link\"") >&5
19973   (eval $ac_link) 2>&5
19974   ac_status=$?
19975   echo "$as_me:19975: \$? = $ac_status" >&5
19976   (exit $ac_status); } &&
19977          { ac_try='test -s conftest$ac_exeext'
19978   { (eval echo "$as_me:19978: \"$ac_try\"") >&5
19979   (eval $ac_try) 2>&5
19980   ac_status=$?
19981   echo "$as_me:19981: \$? = $ac_status" >&5
19982   (exit $ac_status); }; }; then
19983   cf_cv_libstdcpp=yes
19984 else
19985   echo "$as_me: failed program was:" >&5
19986 cat conftest.$ac_ext >&5
19987 cf_cv_libstdcpp=no
19988 fi
19989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19990                         LIBS="$cf_save"
19991
19992 fi
19993 echo "$as_me:19993: result: $cf_cv_libstdcpp" >&5
19994 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19995                 test "$cf_cv_libstdcpp" = yes && {
19996 cf_add_libs="-l$cf_stdcpp_libname"
19997 # Filter out duplicates - this happens with badly-designed ".pc" files...
19998 for cf_add_1lib in $CXXLIBS
19999 do
20000         for cf_add_2lib in $cf_add_libs
20001         do
20002                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20003                 then
20004                         cf_add_1lib=
20005                         break
20006                 fi
20007         done
20008         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20009 done
20010 CXXLIBS="$cf_add_libs"
20011  }
20012         fi
20013 fi
20014
20015         echo "$as_me:20015: checking whether $CXX understands -c and -o together" >&5
20016 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20017 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20018   echo $ECHO_N "(cached) $ECHO_C" >&6
20019 else
20020
20021 cat > conftest.$ac_ext <<CF_EOF
20022 int main()
20023 {
20024         ${cf_cv_main_return:-return}(0);
20025 }
20026 CF_EOF
20027 # We do the test twice because some compilers refuse to overwrite an
20028 # existing .o file with -o, though they will create one.
20029 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20030 if { (eval echo "$as_me:20030: \"$ac_try\"") >&5
20031   (eval $ac_try) 2>&5
20032   ac_status=$?
20033   echo "$as_me:20033: \$? = $ac_status" >&5
20034   (exit $ac_status); } &&
20035   test -f conftest2.$ac_objext && { (eval echo "$as_me:20035: \"$ac_try\"") >&5
20036   (eval $ac_try) 2>&5
20037   ac_status=$?
20038   echo "$as_me:20038: \$? = $ac_status" >&5
20039   (exit $ac_status); };
20040 then
20041   eval cf_cv_prog_CXX_c_o=yes
20042 else
20043   eval cf_cv_prog_CXX_c_o=no
20044 fi
20045 rm -rf conftest*
20046
20047 fi
20048 if test $cf_cv_prog_CXX_c_o = yes; then
20049   echo "$as_me:20049: result: yes" >&5
20050 echo "${ECHO_T}yes" >&6
20051 else
20052   echo "$as_me:20052: result: no" >&5
20053 echo "${ECHO_T}no" >&6
20054 fi
20055
20056         case $GXX_VERSION in
20057         (1*|2.0-6*)
20058                 cf_cxx_library=yes
20059                 ;;
20060         (*-2.7*|2.7*)
20061
20062 cf_cxx_library=unknown
20063 case $cf_cv_system_name in
20064 (os2*)
20065         cf_gpp_libname=gpp
20066         ;;
20067 (*)
20068         cf_gpp_libname=g++
20069         ;;
20070 esac
20071 if test "$GXX" = yes; then
20072         echo "$as_me:20072: checking for lib$cf_gpp_libname" >&5
20073 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20074         cf_save="$LIBS"
20075
20076 cf_add_libs="-l$cf_gpp_libname"
20077 # Filter out duplicates - this happens with badly-designed ".pc" files...
20078 for cf_add_1lib in $LIBS
20079 do
20080         for cf_add_2lib in $cf_add_libs
20081         do
20082                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20083                 then
20084                         cf_add_1lib=
20085                         break
20086                 fi
20087         done
20088         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20089 done
20090 LIBS="$cf_add_libs"
20091
20092         cat >conftest.$ac_ext <<_ACEOF
20093 #line 20093 "configure"
20094 #include "confdefs.h"
20095
20096 #include <$cf_gpp_libname/builtin.h>
20097
20098 int
20099 main ()
20100 {
20101 two_arg_error_handler_t foo2 = lib_error_handler
20102   ;
20103   return 0;
20104 }
20105 _ACEOF
20106 rm -f conftest.$ac_objext conftest$ac_exeext
20107 if { (eval echo "$as_me:20107: \"$ac_link\"") >&5
20108   (eval $ac_link) 2>&5
20109   ac_status=$?
20110   echo "$as_me:20110: \$? = $ac_status" >&5
20111   (exit $ac_status); } &&
20112          { ac_try='test -s conftest$ac_exeext'
20113   { (eval echo "$as_me:20113: \"$ac_try\"") >&5
20114   (eval $ac_try) 2>&5
20115   ac_status=$?
20116   echo "$as_me:20116: \$? = $ac_status" >&5
20117   (exit $ac_status); }; }; then
20118   cf_cxx_library=yes
20119
20120 cf_add_libs="-l$cf_gpp_libname"
20121 # Filter out duplicates - this happens with badly-designed ".pc" files...
20122 for cf_add_1lib in $CXXLIBS
20123 do
20124         for cf_add_2lib in $cf_add_libs
20125         do
20126                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20127                 then
20128                         cf_add_1lib=
20129                         break
20130                 fi
20131         done
20132         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20133 done
20134 CXXLIBS="$cf_add_libs"
20135
20136          if test "$cf_gpp_libname" = cpp ; then
20137
20138 cat >>confdefs.h <<\EOF
20139 #define HAVE_GPP_BUILTIN_H 1
20140 EOF
20141
20142          else
20143
20144 cat >>confdefs.h <<\EOF
20145 #define HAVE_GXX_BUILTIN_H 1
20146 EOF
20147
20148          fi
20149 else
20150   echo "$as_me: failed program was:" >&5
20151 cat conftest.$ac_ext >&5
20152 cat >conftest.$ac_ext <<_ACEOF
20153 #line 20153 "configure"
20154 #include "confdefs.h"
20155
20156 #include <builtin.h>
20157
20158 int
20159 main ()
20160 {
20161 two_arg_error_handler_t foo2 = lib_error_handler
20162   ;
20163   return 0;
20164 }
20165 _ACEOF
20166 rm -f conftest.$ac_objext conftest$ac_exeext
20167 if { (eval echo "$as_me:20167: \"$ac_link\"") >&5
20168   (eval $ac_link) 2>&5
20169   ac_status=$?
20170   echo "$as_me:20170: \$? = $ac_status" >&5
20171   (exit $ac_status); } &&
20172          { ac_try='test -s conftest$ac_exeext'
20173   { (eval echo "$as_me:20173: \"$ac_try\"") >&5
20174   (eval $ac_try) 2>&5
20175   ac_status=$?
20176   echo "$as_me:20176: \$? = $ac_status" >&5
20177   (exit $ac_status); }; }; then
20178   cf_cxx_library=yes
20179
20180 cf_add_libs="-l$cf_gpp_libname"
20181 # Filter out duplicates - this happens with badly-designed ".pc" files...
20182 for cf_add_1lib in $CXXLIBS
20183 do
20184         for cf_add_2lib in $cf_add_libs
20185         do
20186                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20187                 then
20188                         cf_add_1lib=
20189                         break
20190                 fi
20191         done
20192         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20193 done
20194 CXXLIBS="$cf_add_libs"
20195
20196 cat >>confdefs.h <<\EOF
20197 #define HAVE_BUILTIN_H 1
20198 EOF
20199
20200 else
20201   echo "$as_me: failed program was:" >&5
20202 cat conftest.$ac_ext >&5
20203 cf_cxx_library=no
20204 fi
20205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20206 fi
20207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20208         LIBS="$cf_save"
20209         echo "$as_me:20209: result: $cf_cxx_library" >&5
20210 echo "${ECHO_T}$cf_cxx_library" >&6
20211 fi
20212
20213                 ;;
20214         (*)
20215                 cf_cxx_library=no
20216                 ;;
20217         esac
20218
20219         ac_ext=cc
20220 ac_cpp='$CXXCPP $CPPFLAGS'
20221 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20222 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20223 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20224 ac_main_return=return
20225 echo "$as_me:20225: checking how to run the C++ preprocessor" >&5
20226 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20227 if test -z "$CXXCPP"; then
20228   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20229   echo $ECHO_N "(cached) $ECHO_C" >&6
20230 else
20231       # Double quotes because CXXCPP needs to be expanded
20232     for CXXCPP in "$CXX -E" "/lib/cpp"
20233     do
20234       ac_preproc_ok=false
20235 for ac_cxx_preproc_warn_flag in '' yes
20236 do
20237   # Use a header file that comes with gcc, so configuring glibc
20238   # with a fresh cross-compiler works.
20239   # On the NeXT, cc -E runs the code through the compiler's parser,
20240   # not just through cpp. "Syntax error" is here to catch this case.
20241   cat >conftest.$ac_ext <<_ACEOF
20242 #line 20242 "configure"
20243 #include "confdefs.h"
20244 #include <assert.h>
20245                      Syntax error
20246 _ACEOF
20247 if { (eval echo "$as_me:20247: \"$ac_cpp conftest.$ac_ext\"") >&5
20248   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20249   ac_status=$?
20250   egrep -v '^ *\+' conftest.er1 >conftest.err
20251   rm -f conftest.er1
20252   cat conftest.err >&5
20253   echo "$as_me:20253: \$? = $ac_status" >&5
20254   (exit $ac_status); } >/dev/null; then
20255   if test -s conftest.err; then
20256     ac_cpp_err=$ac_cxx_preproc_warn_flag
20257   else
20258     ac_cpp_err=
20259   fi
20260 else
20261   ac_cpp_err=yes
20262 fi
20263 if test -z "$ac_cpp_err"; then
20264   :
20265 else
20266   echo "$as_me: failed program was:" >&5
20267   cat conftest.$ac_ext >&5
20268   # Broken: fails on valid input.
20269 continue
20270 fi
20271 rm -f conftest.err conftest.$ac_ext
20272
20273   # OK, works on sane cases.  Now check whether non-existent headers
20274   # can be detected and how.
20275   cat >conftest.$ac_ext <<_ACEOF
20276 #line 20276 "configure"
20277 #include "confdefs.h"
20278 #include <ac_nonexistent.h>
20279 _ACEOF
20280 if { (eval echo "$as_me:20280: \"$ac_cpp conftest.$ac_ext\"") >&5
20281   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20282   ac_status=$?
20283   egrep -v '^ *\+' conftest.er1 >conftest.err
20284   rm -f conftest.er1
20285   cat conftest.err >&5
20286   echo "$as_me:20286: \$? = $ac_status" >&5
20287   (exit $ac_status); } >/dev/null; then
20288   if test -s conftest.err; then
20289     ac_cpp_err=$ac_cxx_preproc_warn_flag
20290   else
20291     ac_cpp_err=
20292   fi
20293 else
20294   ac_cpp_err=yes
20295 fi
20296 if test -z "$ac_cpp_err"; then
20297   # Broken: success on invalid input.
20298 continue
20299 else
20300   echo "$as_me: failed program was:" >&5
20301   cat conftest.$ac_ext >&5
20302   # Passes both tests.
20303 ac_preproc_ok=:
20304 break
20305 fi
20306 rm -f conftest.err conftest.$ac_ext
20307
20308 done
20309 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20310 rm -f conftest.err conftest.$ac_ext
20311 if $ac_preproc_ok; then
20312   break
20313 fi
20314
20315     done
20316     ac_cv_prog_CXXCPP=$CXXCPP
20317
20318 fi
20319   CXXCPP=$ac_cv_prog_CXXCPP
20320 else
20321   ac_cv_prog_CXXCPP=$CXXCPP
20322 fi
20323 echo "$as_me:20323: result: $CXXCPP" >&5
20324 echo "${ECHO_T}$CXXCPP" >&6
20325 ac_preproc_ok=false
20326 for ac_cxx_preproc_warn_flag in '' yes
20327 do
20328   # Use a header file that comes with gcc, so configuring glibc
20329   # with a fresh cross-compiler works.
20330   # On the NeXT, cc -E runs the code through the compiler's parser,
20331   # not just through cpp. "Syntax error" is here to catch this case.
20332   cat >conftest.$ac_ext <<_ACEOF
20333 #line 20333 "configure"
20334 #include "confdefs.h"
20335 #include <assert.h>
20336                      Syntax error
20337 _ACEOF
20338 if { (eval echo "$as_me:20338: \"$ac_cpp conftest.$ac_ext\"") >&5
20339   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20340   ac_status=$?
20341   egrep -v '^ *\+' conftest.er1 >conftest.err
20342   rm -f conftest.er1
20343   cat conftest.err >&5
20344   echo "$as_me:20344: \$? = $ac_status" >&5
20345   (exit $ac_status); } >/dev/null; then
20346   if test -s conftest.err; then
20347     ac_cpp_err=$ac_cxx_preproc_warn_flag
20348   else
20349     ac_cpp_err=
20350   fi
20351 else
20352   ac_cpp_err=yes
20353 fi
20354 if test -z "$ac_cpp_err"; then
20355   :
20356 else
20357   echo "$as_me: failed program was:" >&5
20358   cat conftest.$ac_ext >&5
20359   # Broken: fails on valid input.
20360 continue
20361 fi
20362 rm -f conftest.err conftest.$ac_ext
20363
20364   # OK, works on sane cases.  Now check whether non-existent headers
20365   # can be detected and how.
20366   cat >conftest.$ac_ext <<_ACEOF
20367 #line 20367 "configure"
20368 #include "confdefs.h"
20369 #include <ac_nonexistent.h>
20370 _ACEOF
20371 if { (eval echo "$as_me:20371: \"$ac_cpp conftest.$ac_ext\"") >&5
20372   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20373   ac_status=$?
20374   egrep -v '^ *\+' conftest.er1 >conftest.err
20375   rm -f conftest.er1
20376   cat conftest.err >&5
20377   echo "$as_me:20377: \$? = $ac_status" >&5
20378   (exit $ac_status); } >/dev/null; then
20379   if test -s conftest.err; then
20380     ac_cpp_err=$ac_cxx_preproc_warn_flag
20381   else
20382     ac_cpp_err=
20383   fi
20384 else
20385   ac_cpp_err=yes
20386 fi
20387 if test -z "$ac_cpp_err"; then
20388   # Broken: success on invalid input.
20389 continue
20390 else
20391   echo "$as_me: failed program was:" >&5
20392   cat conftest.$ac_ext >&5
20393   # Passes both tests.
20394 ac_preproc_ok=:
20395 break
20396 fi
20397 rm -f conftest.err conftest.$ac_ext
20398
20399 done
20400 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20401 rm -f conftest.err conftest.$ac_ext
20402 if $ac_preproc_ok; then
20403   :
20404 else
20405   { { echo "$as_me:20405: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20406 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20407    { (exit 1); exit 1; }; }
20408 fi
20409
20410 ac_ext=cc
20411 ac_cpp='$CXXCPP $CPPFLAGS'
20412 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20413 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20414 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20415 ac_main_return=return
20416
20417 for ac_header in typeinfo
20418 do
20419 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20420 echo "$as_me:20420: checking for $ac_header" >&5
20421 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20423   echo $ECHO_N "(cached) $ECHO_C" >&6
20424 else
20425   cat >conftest.$ac_ext <<_ACEOF
20426 #line 20426 "configure"
20427 #include "confdefs.h"
20428 #include <$ac_header>
20429 _ACEOF
20430 if { (eval echo "$as_me:20430: \"$ac_cpp conftest.$ac_ext\"") >&5
20431   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20432   ac_status=$?
20433   egrep -v '^ *\+' conftest.er1 >conftest.err
20434   rm -f conftest.er1
20435   cat conftest.err >&5
20436   echo "$as_me:20436: \$? = $ac_status" >&5
20437   (exit $ac_status); } >/dev/null; then
20438   if test -s conftest.err; then
20439     ac_cpp_err=$ac_cxx_preproc_warn_flag
20440   else
20441     ac_cpp_err=
20442   fi
20443 else
20444   ac_cpp_err=yes
20445 fi
20446 if test -z "$ac_cpp_err"; then
20447   eval "$as_ac_Header=yes"
20448 else
20449   echo "$as_me: failed program was:" >&5
20450   cat conftest.$ac_ext >&5
20451   eval "$as_ac_Header=no"
20452 fi
20453 rm -f conftest.err conftest.$ac_ext
20454 fi
20455 echo "$as_me:20455: result: `eval echo '${'$as_ac_Header'}'`" >&5
20456 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20457 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20458   cat >>confdefs.h <<EOF
20459 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20460 EOF
20461
20462 fi
20463 done
20464
20465 for ac_header in iostream
20466 do
20467 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20468 echo "$as_me:20468: checking for $ac_header" >&5
20469 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20470 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20471   echo $ECHO_N "(cached) $ECHO_C" >&6
20472 else
20473   cat >conftest.$ac_ext <<_ACEOF
20474 #line 20474 "configure"
20475 #include "confdefs.h"
20476 #include <$ac_header>
20477 _ACEOF
20478 if { (eval echo "$as_me:20478: \"$ac_cpp conftest.$ac_ext\"") >&5
20479   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20480   ac_status=$?
20481   egrep -v '^ *\+' conftest.er1 >conftest.err
20482   rm -f conftest.er1
20483   cat conftest.err >&5
20484   echo "$as_me:20484: \$? = $ac_status" >&5
20485   (exit $ac_status); } >/dev/null; then
20486   if test -s conftest.err; then
20487     ac_cpp_err=$ac_cxx_preproc_warn_flag
20488   else
20489     ac_cpp_err=
20490   fi
20491 else
20492   ac_cpp_err=yes
20493 fi
20494 if test -z "$ac_cpp_err"; then
20495   eval "$as_ac_Header=yes"
20496 else
20497   echo "$as_me: failed program was:" >&5
20498   cat conftest.$ac_ext >&5
20499   eval "$as_ac_Header=no"
20500 fi
20501 rm -f conftest.err conftest.$ac_ext
20502 fi
20503 echo "$as_me:20503: result: `eval echo '${'$as_ac_Header'}'`" >&5
20504 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20505 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20506   cat >>confdefs.h <<EOF
20507 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20508 EOF
20509
20510 fi
20511 done
20512
20513 if test x"$ac_cv_header_iostream" = xyes ; then
20514         echo "$as_me:20514: checking if iostream uses std-namespace" >&5
20515 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20516         cat >conftest.$ac_ext <<_ACEOF
20517 #line 20517 "configure"
20518 #include "confdefs.h"
20519
20520 #include <iostream>
20521 using std::endl;
20522 using std::cerr;
20523 int
20524 main ()
20525 {
20526
20527 cerr << "testing" << endl;
20528
20529   ;
20530   return 0;
20531 }
20532 _ACEOF
20533 rm -f conftest.$ac_objext
20534 if { (eval echo "$as_me:20534: \"$ac_compile\"") >&5
20535   (eval $ac_compile) 2>&5
20536   ac_status=$?
20537   echo "$as_me:20537: \$? = $ac_status" >&5
20538   (exit $ac_status); } &&
20539          { ac_try='test -s conftest.$ac_objext'
20540   { (eval echo "$as_me:20540: \"$ac_try\"") >&5
20541   (eval $ac_try) 2>&5
20542   ac_status=$?
20543   echo "$as_me:20543: \$? = $ac_status" >&5
20544   (exit $ac_status); }; }; then
20545   cf_iostream_namespace=yes
20546 else
20547   echo "$as_me: failed program was:" >&5
20548 cat conftest.$ac_ext >&5
20549 cf_iostream_namespace=no
20550 fi
20551 rm -f conftest.$ac_objext conftest.$ac_ext
20552         echo "$as_me:20552: result: $cf_iostream_namespace" >&5
20553 echo "${ECHO_T}$cf_iostream_namespace" >&6
20554         if test "$cf_iostream_namespace" = yes ; then
20555
20556 cat >>confdefs.h <<\EOF
20557 #define IOSTREAM_NAMESPACE 1
20558 EOF
20559
20560         fi
20561 fi
20562
20563 echo "$as_me:20563: checking if we should include stdbool.h" >&5
20564 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20565
20566 if test "${cf_cv_header_stdbool_h+set}" = set; then
20567   echo $ECHO_N "(cached) $ECHO_C" >&6
20568 else
20569
20570         cat >conftest.$ac_ext <<_ACEOF
20571 #line 20571 "configure"
20572 #include "confdefs.h"
20573
20574 int
20575 main ()
20576 {
20577 bool foo = false
20578   ;
20579   return 0;
20580 }
20581 _ACEOF
20582 rm -f conftest.$ac_objext
20583 if { (eval echo "$as_me:20583: \"$ac_compile\"") >&5
20584   (eval $ac_compile) 2>&5
20585   ac_status=$?
20586   echo "$as_me:20586: \$? = $ac_status" >&5
20587   (exit $ac_status); } &&
20588          { ac_try='test -s conftest.$ac_objext'
20589   { (eval echo "$as_me:20589: \"$ac_try\"") >&5
20590   (eval $ac_try) 2>&5
20591   ac_status=$?
20592   echo "$as_me:20592: \$? = $ac_status" >&5
20593   (exit $ac_status); }; }; then
20594   cf_cv_header_stdbool_h=0
20595 else
20596   echo "$as_me: failed program was:" >&5
20597 cat conftest.$ac_ext >&5
20598 cat >conftest.$ac_ext <<_ACEOF
20599 #line 20599 "configure"
20600 #include "confdefs.h"
20601
20602 #ifndef __BEOS__
20603 #include <stdbool.h>
20604 #endif
20605
20606 int
20607 main ()
20608 {
20609 bool foo = false
20610   ;
20611   return 0;
20612 }
20613 _ACEOF
20614 rm -f conftest.$ac_objext
20615 if { (eval echo "$as_me:20615: \"$ac_compile\"") >&5
20616   (eval $ac_compile) 2>&5
20617   ac_status=$?
20618   echo "$as_me:20618: \$? = $ac_status" >&5
20619   (exit $ac_status); } &&
20620          { ac_try='test -s conftest.$ac_objext'
20621   { (eval echo "$as_me:20621: \"$ac_try\"") >&5
20622   (eval $ac_try) 2>&5
20623   ac_status=$?
20624   echo "$as_me:20624: \$? = $ac_status" >&5
20625   (exit $ac_status); }; }; then
20626   cf_cv_header_stdbool_h=1
20627 else
20628   echo "$as_me: failed program was:" >&5
20629 cat conftest.$ac_ext >&5
20630 cf_cv_header_stdbool_h=0
20631 fi
20632 rm -f conftest.$ac_objext conftest.$ac_ext
20633 fi
20634 rm -f conftest.$ac_objext conftest.$ac_ext
20635 fi
20636
20637 if test "$cf_cv_header_stdbool_h" = 1
20638 then    echo "$as_me:20638: result: yes" >&5
20639 echo "${ECHO_T}yes" >&6
20640 else    echo "$as_me:20640: result: no" >&5
20641 echo "${ECHO_T}no" >&6
20642 fi
20643
20644 echo "$as_me:20644: checking for builtin bool type" >&5
20645 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20646
20647 if test "${cf_cv_builtin_bool+set}" = set; then
20648   echo $ECHO_N "(cached) $ECHO_C" >&6
20649 else
20650
20651         cat >conftest.$ac_ext <<_ACEOF
20652 #line 20652 "configure"
20653 #include "confdefs.h"
20654
20655 #include <stdio.h>
20656 #include <sys/types.h>
20657
20658 int
20659 main ()
20660 {
20661 bool x = false
20662   ;
20663   return 0;
20664 }
20665 _ACEOF
20666 rm -f conftest.$ac_objext
20667 if { (eval echo "$as_me:20667: \"$ac_compile\"") >&5
20668   (eval $ac_compile) 2>&5
20669   ac_status=$?
20670   echo "$as_me:20670: \$? = $ac_status" >&5
20671   (exit $ac_status); } &&
20672          { ac_try='test -s conftest.$ac_objext'
20673   { (eval echo "$as_me:20673: \"$ac_try\"") >&5
20674   (eval $ac_try) 2>&5
20675   ac_status=$?
20676   echo "$as_me:20676: \$? = $ac_status" >&5
20677   (exit $ac_status); }; }; then
20678   cf_cv_builtin_bool=1
20679 else
20680   echo "$as_me: failed program was:" >&5
20681 cat conftest.$ac_ext >&5
20682 cf_cv_builtin_bool=0
20683 fi
20684 rm -f conftest.$ac_objext conftest.$ac_ext
20685
20686 fi
20687
20688 if test "$cf_cv_builtin_bool" = 1
20689 then    echo "$as_me:20689: result: yes" >&5
20690 echo "${ECHO_T}yes" >&6
20691 else    echo "$as_me:20691: result: no" >&5
20692 echo "${ECHO_T}no" >&6
20693 fi
20694
20695 echo "$as_me:20695: checking for size of bool" >&5
20696 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20697 if test "${cf_cv_type_of_bool+set}" = set; then
20698   echo $ECHO_N "(cached) $ECHO_C" >&6
20699 else
20700
20701         rm -f cf_test.out
20702         if test "$cross_compiling" = yes; then
20703   cf_cv_type_of_bool=unknown
20704 else
20705   cat >conftest.$ac_ext <<_ACEOF
20706 #line 20706 "configure"
20707 #include "confdefs.h"
20708
20709 #include <stdlib.h>
20710 #include <stdio.h>
20711
20712 #if defined(__cplusplus)
20713
20714 #ifdef HAVE_GXX_BUILTIN_H
20715 #include <g++/builtin.h>
20716 #elif HAVE_GPP_BUILTIN_H
20717 #include <gpp/builtin.h>
20718 #elif HAVE_BUILTIN_H
20719 #include <builtin.h>
20720 #endif
20721
20722 #else
20723
20724 #if $cf_cv_header_stdbool_h
20725 #include <stdbool.h>
20726 #endif
20727
20728 #endif
20729
20730 int main()
20731 {
20732         FILE *fp = fopen("cf_test.out", "w");
20733         if (fp != 0) {
20734                 bool x = true;
20735                 if ((bool)(-x) >= 0)
20736                         fputs("unsigned ", fp);
20737                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20738                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20739                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20740                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20741                 fclose(fp);
20742         }
20743         ${cf_cv_main_return:-return}(0);
20744 }
20745
20746 _ACEOF
20747 rm -f conftest$ac_exeext
20748 if { (eval echo "$as_me:20748: \"$ac_link\"") >&5
20749   (eval $ac_link) 2>&5
20750   ac_status=$?
20751   echo "$as_me:20751: \$? = $ac_status" >&5
20752   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20753   { (eval echo "$as_me:20753: \"$ac_try\"") >&5
20754   (eval $ac_try) 2>&5
20755   ac_status=$?
20756   echo "$as_me:20756: \$? = $ac_status" >&5
20757   (exit $ac_status); }; }; then
20758   cf_cv_type_of_bool=`cat cf_test.out`
20759                  if test -z "$cf_cv_type_of_bool"; then
20760                    cf_cv_type_of_bool=unknown
20761                  fi
20762 else
20763   echo "$as_me: program exited with status $ac_status" >&5
20764 echo "$as_me: failed program was:" >&5
20765 cat conftest.$ac_ext >&5
20766 cf_cv_type_of_bool=unknown
20767 fi
20768 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20769 fi
20770
20771 fi
20772
20773         rm -f cf_test.out
20774 echo "$as_me:20774: result: $cf_cv_type_of_bool" >&5
20775 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20776 if test "$cf_cv_type_of_bool" = unknown ; then
20777         case .$NCURSES_BOOL in
20778         (.auto|.) NCURSES_BOOL=unsigned;;
20779         esac
20780         { echo "$as_me:20780: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20781 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20782         cf_cv_type_of_bool=$NCURSES_BOOL
20783 fi
20784
20785 echo "$as_me:20785: checking for special defines needed for etip.h" >&5
20786 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20787 cf_save_CXXFLAGS="$CXXFLAGS"
20788 cf_result="none"
20789
20790 # etip.h includes ncurses.h which includes ncurses_dll.h
20791 # But ncurses_dll.h is generated - fix here.
20792 test -d include || mkdir include
20793 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
20794
20795 for cf_math in "" MATH_H
20796 do
20797 for cf_excp in "" MATH_EXCEPTION
20798 do
20799         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20800         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20801         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20802 cat >conftest.$ac_ext <<_ACEOF
20803 #line 20803 "configure"
20804 #include "confdefs.h"
20805
20806 #include <etip.h.in>
20807
20808 int
20809 main ()
20810 {
20811
20812   ;
20813   return 0;
20814 }
20815 _ACEOF
20816 rm -f conftest.$ac_objext
20817 if { (eval echo "$as_me:20817: \"$ac_compile\"") >&5
20818   (eval $ac_compile) 2>&5
20819   ac_status=$?
20820   echo "$as_me:20820: \$? = $ac_status" >&5
20821   (exit $ac_status); } &&
20822          { ac_try='test -s conftest.$ac_objext'
20823   { (eval echo "$as_me:20823: \"$ac_try\"") >&5
20824   (eval $ac_try) 2>&5
20825   ac_status=$?
20826   echo "$as_me:20826: \$? = $ac_status" >&5
20827   (exit $ac_status); }; }; then
20828
20829         test -n "$cf_math" && cat >>confdefs.h <<EOF
20830 #define ETIP_NEEDS_${cf_math} 1
20831 EOF
20832
20833         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20834 #define ETIP_NEEDS_${cf_excp} 1
20835 EOF
20836
20837         cf_result="$cf_math $cf_excp"
20838         break 2
20839
20840 else
20841   echo "$as_me: failed program was:" >&5
20842 cat conftest.$ac_ext >&5
20843 fi
20844 rm -f conftest.$ac_objext conftest.$ac_ext
20845 done
20846 done
20847 echo "$as_me:20847: result: $cf_result" >&5
20848 echo "${ECHO_T}$cf_result" >&6
20849 CXXFLAGS="$cf_save_CXXFLAGS"
20850
20851 if test -n "$CXX"; then
20852 echo "$as_me:20852: checking if $CXX accepts parameter initialization" >&5
20853 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20854 if test "${cf_cv_cpp_param_init+set}" = set; then
20855   echo $ECHO_N "(cached) $ECHO_C" >&6
20856 else
20857
20858         ac_ext=cc
20859 ac_cpp='$CXXCPP $CPPFLAGS'
20860 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20861 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20862 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20863 ac_main_return=return
20864
20865         if test "$cross_compiling" = yes; then
20866   cf_cv_cpp_param_init=unknown
20867 else
20868   cat >conftest.$ac_ext <<_ACEOF
20869 #line 20869 "configure"
20870 #include "confdefs.h"
20871
20872 class TEST {
20873 private:
20874         int value;
20875 public:
20876         TEST(int x = 1);
20877         ~TEST();
20878 };
20879
20880 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20881 {
20882         value = x;
20883 }
20884 int main() { }
20885
20886 _ACEOF
20887 rm -f conftest$ac_exeext
20888 if { (eval echo "$as_me:20888: \"$ac_link\"") >&5
20889   (eval $ac_link) 2>&5
20890   ac_status=$?
20891   echo "$as_me:20891: \$? = $ac_status" >&5
20892   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20893   { (eval echo "$as_me:20893: \"$ac_try\"") >&5
20894   (eval $ac_try) 2>&5
20895   ac_status=$?
20896   echo "$as_me:20896: \$? = $ac_status" >&5
20897   (exit $ac_status); }; }; then
20898   cf_cv_cpp_param_init=yes
20899 else
20900   echo "$as_me: program exited with status $ac_status" >&5
20901 echo "$as_me: failed program was:" >&5
20902 cat conftest.$ac_ext >&5
20903 cf_cv_cpp_param_init=no
20904 fi
20905 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20906 fi
20907         ac_ext=cc
20908 ac_cpp='$CXXCPP $CPPFLAGS'
20909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20912 ac_main_return=return
20913
20914 fi
20915 echo "$as_me:20915: result: $cf_cv_cpp_param_init" >&5
20916 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20917 fi
20918 test "$cf_cv_cpp_param_init" = yes &&
20919 cat >>confdefs.h <<\EOF
20920 #define CPP_HAS_PARAM_INIT 1
20921 EOF
20922
20923 if test -n "$CXX"; then
20924
20925 echo "$as_me:20925: checking if $CXX accepts static_cast" >&5
20926 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20927 if test "${cf_cv_cpp_static_cast+set}" = set; then
20928   echo $ECHO_N "(cached) $ECHO_C" >&6
20929 else
20930
20931         ac_ext=cc
20932 ac_cpp='$CXXCPP $CPPFLAGS'
20933 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20934 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20935 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20936 ac_main_return=return
20937
20938         cat >conftest.$ac_ext <<_ACEOF
20939 #line 20939 "configure"
20940 #include "confdefs.h"
20941
20942 class NCursesPanel
20943 {
20944 public:
20945   NCursesPanel(int nlines,
20946                int ncols,
20947                int begin_y = 0,
20948                int begin_x = 0)
20949   {
20950   }
20951   NCursesPanel();
20952   ~NCursesPanel();
20953 };
20954
20955 template<class T> class NCursesUserPanel : public NCursesPanel
20956 {
20957 public:
20958   NCursesUserPanel (int nlines,
20959                     int ncols,
20960                     int begin_y = 0,
20961                     int begin_x = 0,
20962                     const T* p_UserData = static_cast<T*>(0))
20963     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20964   {
20965   };
20966   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20967   {
20968   };
20969
20970   virtual ~NCursesUserPanel() {};
20971 };
20972
20973 int
20974 main ()
20975 {
20976
20977         const char* p_UserData = static_cast<char*>(0)
20978   ;
20979   return 0;
20980 }
20981 _ACEOF
20982 rm -f conftest.$ac_objext
20983 if { (eval echo "$as_me:20983: \"$ac_compile\"") >&5
20984   (eval $ac_compile) 2>&5
20985   ac_status=$?
20986   echo "$as_me:20986: \$? = $ac_status" >&5
20987   (exit $ac_status); } &&
20988          { ac_try='test -s conftest.$ac_objext'
20989   { (eval echo "$as_me:20989: \"$ac_try\"") >&5
20990   (eval $ac_try) 2>&5
20991   ac_status=$?
20992   echo "$as_me:20992: \$? = $ac_status" >&5
20993   (exit $ac_status); }; }; then
20994   cf_cv_cpp_static_cast=yes
20995 else
20996   echo "$as_me: failed program was:" >&5
20997 cat conftest.$ac_ext >&5
20998 cf_cv_cpp_static_cast=no
20999 fi
21000 rm -f conftest.$ac_objext conftest.$ac_ext
21001
21002         ac_ext=cc
21003 ac_cpp='$CXXCPP $CPPFLAGS'
21004 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21005 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21006 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21007 ac_main_return=return
21008
21009 fi
21010 echo "$as_me:21010: result: $cf_cv_cpp_static_cast" >&5
21011 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21012
21013 fi
21014
21015 test "$cf_cv_cpp_static_cast" = yes &&
21016 cat >>confdefs.h <<\EOF
21017 #define CPP_HAS_STATIC_CAST 1
21018 EOF
21019
21020         CXX_AR='$(AR)'
21021         CXX_ARFLAGS='$(ARFLAGS)'
21022         case $cf_cv_system_name in
21023         (irix*)
21024             if test "$GXX" != yes ; then
21025                 CXX_AR='$(CXX)'
21026                 CXX_ARFLAGS='-ar -o'
21027             fi
21028             ;;
21029         (sco3.2v5*)
21030             CXXLDFLAGS="-u main"
21031             ;;
21032         (solaris2*)
21033             if test "$GXX" != yes ; then
21034                 CXX_AR='$(CXX)'
21035                 CXX_ARFLAGS='-xar -o'
21036             fi
21037             ;;
21038         esac
21039
21040 else
21041         cf_cxx_library=no
21042         cf_cv_builtin_bool=1
21043
21044         # Just because we are not configuring against C++ right now does not
21045         # mean that a user will not want to use C++.  Some distributors disable
21046         # the C++ portion of this configuration as a shortcut (or just to avoid
21047         # compiling the demo in the c++ directory).  So we need a reasonable
21048         # default for the 'bool' type.
21049         #
21050         # Caveat: since the storage of the bool type is not standardized, it
21051         # may change.
21052
21053         if test "$NCURSES_BOOL" != auto ; then
21054                 cf_cv_type_of_bool=$NCURSES_BOOL
21055                 cf_cv_header_stdbool_h=0
21056         else
21057                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21058
21059 echo "$as_me:21059: checking for size of bool" >&5
21060 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21061 if test "${cf_cv_type_of_bool+set}" = set; then
21062   echo $ECHO_N "(cached) $ECHO_C" >&6
21063 else
21064
21065         rm -f cf_test.out
21066         if test "$cross_compiling" = yes; then
21067   cf_cv_type_of_bool=unknown
21068 else
21069   cat >conftest.$ac_ext <<_ACEOF
21070 #line 21070 "configure"
21071 #include "confdefs.h"
21072
21073 #include <stdlib.h>
21074 #include <stdio.h>
21075
21076 #if defined(__cplusplus)
21077
21078 #ifdef HAVE_GXX_BUILTIN_H
21079 #include <g++/builtin.h>
21080 #elif HAVE_GPP_BUILTIN_H
21081 #include <gpp/builtin.h>
21082 #elif HAVE_BUILTIN_H
21083 #include <builtin.h>
21084 #endif
21085
21086 #else
21087
21088 #if $cf_cv_header_stdbool_h
21089 #include <stdbool.h>
21090 #endif
21091
21092 #endif
21093
21094 int main()
21095 {
21096         FILE *fp = fopen("cf_test.out", "w");
21097         if (fp != 0) {
21098                 bool x = true;
21099                 if ((bool)(-x) >= 0)
21100                         fputs("unsigned ", fp);
21101                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21102                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21103                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21104                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21105                 fclose(fp);
21106         }
21107         ${cf_cv_main_return:-return}(0);
21108 }
21109
21110 _ACEOF
21111 rm -f conftest$ac_exeext
21112 if { (eval echo "$as_me:21112: \"$ac_link\"") >&5
21113   (eval $ac_link) 2>&5
21114   ac_status=$?
21115   echo "$as_me:21115: \$? = $ac_status" >&5
21116   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21117   { (eval echo "$as_me:21117: \"$ac_try\"") >&5
21118   (eval $ac_try) 2>&5
21119   ac_status=$?
21120   echo "$as_me:21120: \$? = $ac_status" >&5
21121   (exit $ac_status); }; }; then
21122   cf_cv_type_of_bool=`cat cf_test.out`
21123                  if test -z "$cf_cv_type_of_bool"; then
21124                    cf_cv_type_of_bool=unknown
21125                  fi
21126 else
21127   echo "$as_me: program exited with status $ac_status" >&5
21128 echo "$as_me: failed program was:" >&5
21129 cat conftest.$ac_ext >&5
21130 cf_cv_type_of_bool=unknown
21131 fi
21132 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21133 fi
21134
21135 fi
21136
21137         rm -f cf_test.out
21138 echo "$as_me:21138: result: $cf_cv_type_of_bool" >&5
21139 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21140 if test "$cf_cv_type_of_bool" = unknown ; then
21141         case .$NCURSES_BOOL in
21142         (.auto|.) NCURSES_BOOL=unsigned;;
21143         esac
21144         { echo "$as_me:21144: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21145 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21146         cf_cv_type_of_bool=$NCURSES_BOOL
21147 fi
21148
21149                 else
21150                         echo "$as_me:21150: checking for fallback type of bool" >&5
21151 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21152                         case "$host_cpu" in
21153                         (i?86)  cf_cv_type_of_bool=char ;;
21154                         (*)     cf_cv_type_of_bool=int  ;;
21155                         esac
21156                         echo "$as_me:21156: result: $cf_cv_type_of_bool" >&5
21157 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21158                 fi
21159         fi
21160 fi
21161
21162 # If the C compiler did not declare bool, and we did not determine that the C++
21163 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21164 # ncurses library use the same type as C++ bool.  Note that this allows one to
21165 # specify the type of bool in a configure-script option and postpone
21166 # integration with the C++ compiler provided that the types are compatible.
21167 USE_CXX_BOOL=1
21168 if test $cf_cv_cc_bool_type = 1
21169 then
21170         # oops: C has a bool.  Unlikely, but C++ could differ.
21171         USE_CXX_BOOL=0
21172 elif test $cf_cv_builtin_bool = 0
21173 then
21174         # C++ has no bool
21175         USE_CXX_BOOL=0
21176 else
21177         # this is the normal case
21178         USE_CXX_BOOL='defined(__cplusplus)'
21179 fi
21180
21181 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21182
21183         if test "$cf_with_ada" != "no" ; then
21184                 if test "$with_libtool" != "no"; then
21185                         { echo "$as_me:21185: WARNING: libtool does not support Ada - disabling feature" >&5
21186 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21187                         cf_with_ada=no
21188                 fi
21189         fi
21190
21191         if test "$cf_with_ada" != "no" ; then
21192
21193 cf_ada_make=gnatmake
21194 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21195 set dummy $cf_ada_make; ac_word=$2
21196 echo "$as_me:21196: checking for $ac_word" >&5
21197 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21198 if test "${ac_cv_prog_gnat_exists+set}" = set; then
21199   echo $ECHO_N "(cached) $ECHO_C" >&6
21200 else
21201   if test -n "$gnat_exists"; then
21202   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
21203 else
21204   ac_save_IFS=$IFS; IFS=$ac_path_separator
21205 ac_dummy="$PATH"
21206 for ac_dir in $ac_dummy; do
21207   IFS=$ac_save_IFS
21208   test -z "$ac_dir" && ac_dir=.
21209   $as_executable_p "$ac_dir/$ac_word" || continue
21210 ac_cv_prog_gnat_exists="yes"
21211 echo "$as_me:21211: found $ac_dir/$ac_word" >&5
21212 break
21213 done
21214
21215   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21216 fi
21217 fi
21218 gnat_exists=$ac_cv_prog_gnat_exists
21219 if test -n "$gnat_exists"; then
21220   echo "$as_me:21220: result: $gnat_exists" >&5
21221 echo "${ECHO_T}$gnat_exists" >&6
21222 else
21223   echo "$as_me:21223: result: no" >&5
21224 echo "${ECHO_T}no" >&6
21225 fi
21226
21227 if test "$ac_cv_prog_gnat_exists" = no; then
21228         cf_ada_make=
21229         cf_cv_prog_gnat_correct=no
21230 else
21231
21232 echo "$as_me:21232: checking for gnat version" >&5
21233 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21234 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21235         grep '[0-9].[0-9][0-9]*' |\
21236         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21237 echo "$as_me:21237: result: $cf_gnat_version" >&5
21238 echo "${ECHO_T}$cf_gnat_version" >&6
21239
21240 case $cf_gnat_version in
21241 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21242         cf_cv_prog_gnat_correct=yes
21243         ;;
21244 (*)
21245         { echo "$as_me:21245: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21246 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21247         cf_cv_prog_gnat_correct=no
21248         ;;
21249 esac
21250
21251         # Extract the first word of "m4", so it can be a program name with args.
21252 set dummy m4; ac_word=$2
21253 echo "$as_me:21253: checking for $ac_word" >&5
21254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21255 if test "${ac_cv_prog_M4_exists+set}" = set; then
21256   echo $ECHO_N "(cached) $ECHO_C" >&6
21257 else
21258   if test -n "$M4_exists"; then
21259   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21260 else
21261   ac_save_IFS=$IFS; IFS=$ac_path_separator
21262 ac_dummy="$PATH"
21263 for ac_dir in $ac_dummy; do
21264   IFS=$ac_save_IFS
21265   test -z "$ac_dir" && ac_dir=.
21266   $as_executable_p "$ac_dir/$ac_word" || continue
21267 ac_cv_prog_M4_exists="yes"
21268 echo "$as_me:21268: found $ac_dir/$ac_word" >&5
21269 break
21270 done
21271
21272   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21273 fi
21274 fi
21275 M4_exists=$ac_cv_prog_M4_exists
21276 if test -n "$M4_exists"; then
21277   echo "$as_me:21277: result: $M4_exists" >&5
21278 echo "${ECHO_T}$M4_exists" >&6
21279 else
21280   echo "$as_me:21280: result: no" >&5
21281 echo "${ECHO_T}no" >&6
21282 fi
21283
21284         if test "$ac_cv_prog_M4_exists" = no; then
21285                 cf_cv_prog_gnat_correct=no
21286                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21287         fi
21288         if test "$cf_cv_prog_gnat_correct" = yes; then
21289                 echo "$as_me:21289: checking if GNAT works" >&5
21290 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21291
21292 rm -rf conftest* *~conftest*
21293 cat >>conftest.ads <<CF_EOF
21294 procedure conftest;
21295 CF_EOF
21296 cat >>conftest.adb <<CF_EOF
21297 with Text_IO;
21298 with GNAT.OS_Lib;
21299 procedure conftest is
21300 begin
21301    Text_IO.Put ("Hello World");
21302    Text_IO.New_Line;
21303    GNAT.OS_Lib.OS_Exit (0);
21304 end conftest;
21305 CF_EOF
21306 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21307    if ( ./conftest 1>&5 2>&1 ) ; then
21308       cf_cv_prog_gnat_correct=yes
21309    else
21310       cf_cv_prog_gnat_correct=no
21311    fi
21312 else
21313    cf_cv_prog_gnat_correct=no
21314 fi
21315 rm -rf conftest* *~conftest*
21316
21317                 echo "$as_me:21317: result: $cf_cv_prog_gnat_correct" >&5
21318 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21319         fi
21320 fi
21321
21322                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21323
21324         ADAFLAGS="$ADAFLAGS -gnatpn"
21325
21326         echo "$as_me:21326: checking optimization options for ADAFLAGS" >&5
21327 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21328         case "$CFLAGS" in
21329         (*-g*)
21330
21331         ADAFLAGS="$ADAFLAGS -g"
21332
21333                 ;;
21334         esac
21335         case "$CFLAGS" in
21336         (*-O*)
21337                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21338
21339         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21340
21341                 ;;
21342         esac
21343         echo "$as_me:21343: result: $ADAFLAGS" >&5
21344 echo "${ECHO_T}$ADAFLAGS" >&6
21345
21346 echo "$as_me:21346: checking if GNATPREP supports -T option" >&5
21347 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21348 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21349   echo $ECHO_N "(cached) $ECHO_C" >&6
21350 else
21351
21352 cf_cv_gnatprep_opt_t=no
21353 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21354
21355 fi
21356 echo "$as_me:21356: result: $cf_cv_gnatprep_opt_t" >&5
21357 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21358 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21359
21360 echo "$as_me:21360: checking if GNAT supports generics" >&5
21361 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21362 case $cf_gnat_version in
21363 (3.[1-9]*|[4-9].*)
21364         cf_gnat_generics=yes
21365         ;;
21366 (*)
21367         cf_gnat_generics=no
21368         ;;
21369 esac
21370 echo "$as_me:21370: result: $cf_gnat_generics" >&5
21371 echo "${ECHO_T}$cf_gnat_generics" >&6
21372
21373 if test "$cf_gnat_generics" = yes
21374 then
21375         cf_compile_generics=generics
21376         cf_generic_objects="\${GENOBJS}"
21377 else
21378         cf_compile_generics=
21379         cf_generic_objects=
21380 fi
21381
21382 echo "$as_me:21382: checking if GNAT supports SIGINT" >&5
21383 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21384 if test "${cf_cv_gnat_sigint+set}" = set; then
21385   echo $ECHO_N "(cached) $ECHO_C" >&6
21386 else
21387
21388 rm -rf conftest* *~conftest*
21389 cat >>conftest.ads <<CF_EOF
21390 with Ada.Interrupts.Names;
21391
21392 package ConfTest is
21393
21394    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21395    pragma Unreserve_All_Interrupts;
21396    pragma Warnings (On);
21397
21398    protected Process is
21399       procedure Stop;
21400       function Continue return Boolean;
21401       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21402    private
21403       Done : Boolean := False;
21404    end Process;
21405
21406 end ConfTest;
21407 CF_EOF
21408 cat >>conftest.adb <<CF_EOF
21409 package body ConfTest is
21410    protected body Process is
21411       procedure Stop is
21412       begin
21413          Done := True;
21414       end Stop;
21415       function Continue return Boolean is
21416       begin
21417          return not Done;
21418       end Continue;
21419    end Process;
21420 end ConfTest;
21421 CF_EOF
21422 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21423       cf_cv_gnat_sigint=yes
21424 else
21425    cf_cv_gnat_sigint=no
21426 fi
21427 rm -rf conftest* *~conftest*
21428
21429 fi
21430 echo "$as_me:21430: result: $cf_cv_gnat_sigint" >&5
21431 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21432
21433 if test $cf_cv_gnat_sigint = yes ; then
21434         USE_GNAT_SIGINT=""
21435 else
21436         USE_GNAT_SIGINT="#"
21437 fi
21438
21439 cf_gnat_libraries=no
21440 cf_gnat_projects=no
21441
21442 if test "$enable_gnat_projects" != no ; then
21443 echo "$as_me:21443: checking if GNAT supports project files" >&5
21444 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21445 case $cf_gnat_version in
21446 (3.[0-9]*)
21447         ;;
21448 (*)
21449         case $cf_cv_system_name in
21450         (cygwin*|msys*)
21451                 ;;
21452         (*)
21453                 mkdir conftest.src conftest.bin conftest.lib
21454                 cd conftest.src
21455                 rm -rf conftest* *~conftest*
21456                 cat >>library.gpr <<CF_EOF
21457 project Library is
21458   Kind := External ("LIB_KIND");
21459   for Library_Name use "ConfTest";
21460   for Object_Dir use ".";
21461   for Library_ALI_Dir use External("LIBRARY_DIR");
21462   for Library_Version use External ("SONAME");
21463   for Library_Kind use Kind;
21464   for Library_Dir use External("BUILD_DIR");
21465   Source_Dir := External ("SOURCE_DIR");
21466   for Source_Dirs use (Source_Dir);
21467 end Library;
21468 CF_EOF
21469                 cat >>confpackage.ads <<CF_EOF
21470 package ConfPackage is
21471    procedure conftest;
21472 end ConfPackage;
21473 CF_EOF
21474                 cat >>confpackage.adb <<CF_EOF
21475 with Text_IO;
21476 package body ConfPackage is
21477    procedure conftest is
21478    begin
21479       Text_IO.Put ("Hello World");
21480       Text_IO.New_Line;
21481    end conftest;
21482 end ConfPackage;
21483 CF_EOF
21484                 if ( $cf_ada_make $ADAFLAGS \
21485                                 -Plibrary.gpr \
21486                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21487                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21488                                 -XSOURCE_DIR=`pwd` \
21489                                 -XSONAME=libConfTest.so.1 \
21490                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21491                         cf_gnat_projects=yes
21492                 fi
21493                 cd ..
21494                 if test -f conftest.lib/confpackage.ali
21495                 then
21496                         cf_gnat_libraries=yes
21497                 fi
21498                 rm -rf conftest* *~conftest*
21499                 ;;
21500         esac
21501         ;;
21502 esac
21503 echo "$as_me:21503: result: $cf_gnat_projects" >&5
21504 echo "${ECHO_T}$cf_gnat_projects" >&6
21505 fi # enable_gnat_projects
21506
21507 if test $cf_gnat_projects = yes
21508 then
21509         echo "$as_me:21509: checking if GNAT supports libraries" >&5
21510 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21511         echo "$as_me:21511: result: $cf_gnat_libraries" >&5
21512 echo "${ECHO_T}$cf_gnat_libraries" >&6
21513 fi
21514
21515 if test "$cf_gnat_projects" = yes
21516 then
21517         USE_OLD_MAKERULES="#"
21518         USE_GNAT_PROJECTS=""
21519 else
21520         USE_OLD_MAKERULES=""
21521         USE_GNAT_PROJECTS="#"
21522 fi
21523
21524 if test "$cf_gnat_libraries" = yes
21525 then
21526         USE_GNAT_LIBRARIES=""
21527 else
21528         USE_GNAT_LIBRARIES="#"
21529 fi
21530
21531 echo "$as_me:21531: checking for ada-compiler" >&5
21532 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21533
21534 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21535 if test "${with_ada_compiler+set}" = set; then
21536   withval="$with_ada_compiler"
21537   cf_ada_compiler=$withval
21538 else
21539   cf_ada_compiler=gnatmake
21540 fi;
21541
21542 echo "$as_me:21542: result: $cf_ada_compiler" >&5
21543 echo "${ECHO_T}$cf_ada_compiler" >&6
21544
21545                         cf_ada_package=terminal_interface
21546
21547 echo "$as_me:21547: checking for ada-include" >&5
21548 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21549
21550 # Check whether --with-ada-include or --without-ada-include was given.
21551 if test "${with_ada_include+set}" = set; then
21552   withval="$with_ada_include"
21553
21554 else
21555   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21556 fi; if test -n "$prefix/share/ada/adainclude" ; then
21557
21558 if test "x$prefix" != xNONE; then
21559         cf_path_syntax="$prefix"
21560 else
21561         cf_path_syntax="$ac_default_prefix"
21562 fi
21563
21564 case ".$withval" in
21565 (.\$\(*\)*|.\'*\'*)
21566         ;;
21567 (..|./*|.\\*)
21568         ;;
21569 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21570         ;;
21571 (.\${*prefix}*|.\${*dir}*)
21572         eval withval="$withval"
21573         case ".$withval" in
21574         (.NONE/*)
21575                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21576                 ;;
21577         esac
21578         ;;
21579 (.no|.NONE/*)
21580         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21581         ;;
21582 (*)
21583         { { echo "$as_me:21583: error: expected a pathname, not \"$withval\"" >&5
21584 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21585    { (exit 1); exit 1; }; }
21586         ;;
21587 esac
21588
21589 fi
21590 eval ADA_INCLUDE="$withval"
21591
21592 echo "$as_me:21592: result: $ADA_INCLUDE" >&5
21593 echo "${ECHO_T}$ADA_INCLUDE" >&6
21594
21595 echo "$as_me:21595: checking for ada-objects" >&5
21596 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21597
21598 # Check whether --with-ada-objects or --without-ada-objects was given.
21599 if test "${with_ada_objects+set}" = set; then
21600   withval="$with_ada_objects"
21601
21602 else
21603   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21604 fi; if test -n "$prefix/lib/ada/adalib" ; then
21605
21606 if test "x$prefix" != xNONE; then
21607         cf_path_syntax="$prefix"
21608 else
21609         cf_path_syntax="$ac_default_prefix"
21610 fi
21611
21612 case ".$withval" in
21613 (.\$\(*\)*|.\'*\'*)
21614         ;;
21615 (..|./*|.\\*)
21616         ;;
21617 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21618         ;;
21619 (.\${*prefix}*|.\${*dir}*)
21620         eval withval="$withval"
21621         case ".$withval" in
21622         (.NONE/*)
21623                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21624                 ;;
21625         esac
21626         ;;
21627 (.no|.NONE/*)
21628         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21629         ;;
21630 (*)
21631         { { echo "$as_me:21631: error: expected a pathname, not \"$withval\"" >&5
21632 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21633    { (exit 1); exit 1; }; }
21634         ;;
21635 esac
21636
21637 fi
21638 eval ADA_OBJECTS="$withval"
21639
21640 echo "$as_me:21640: result: $ADA_OBJECTS" >&5
21641 echo "${ECHO_T}$ADA_OBJECTS" >&6
21642
21643 echo "$as_me:21643: checking if an Ada95 shared-library should be built" >&5
21644 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21645
21646 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21647 if test "${with_ada_sharedlib+set}" = set; then
21648   withval="$with_ada_sharedlib"
21649   with_ada_sharedlib=$withval
21650 else
21651   with_ada_sharedlib=no
21652 fi;
21653 echo "$as_me:21653: result: $with_ada_sharedlib" >&5
21654 echo "${ECHO_T}$with_ada_sharedlib" >&6
21655
21656 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21657 MAKE_ADA_SHAREDLIB="#"
21658
21659 if test "x$with_ada_sharedlib" != xno
21660 then
21661         MAKE_ADA_SHAREDLIB=
21662         if test "x$with_ada_sharedlib" != xyes
21663         then
21664                 ADA_SHAREDLIB="$with_ada_sharedlib"
21665         fi
21666 fi
21667
21668                 fi
21669         fi
21670 else
21671         cf_with_ada=no
21672 fi
21673
21674 # do this "late" to avoid conflict with header-checks
21675 if test "x$with_widec" = xyes ; then
21676         echo "$as_me:21676: checking for wchar_t" >&5
21677 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21678 if test "${ac_cv_type_wchar_t+set}" = set; then
21679   echo $ECHO_N "(cached) $ECHO_C" >&6
21680 else
21681   cat >conftest.$ac_ext <<_ACEOF
21682 #line 21682 "configure"
21683 #include "confdefs.h"
21684 $ac_includes_default
21685 int
21686 main ()
21687 {
21688 if ((wchar_t *) 0)
21689   return 0;
21690 if (sizeof (wchar_t))
21691   return 0;
21692   ;
21693   return 0;
21694 }
21695 _ACEOF
21696 rm -f conftest.$ac_objext
21697 if { (eval echo "$as_me:21697: \"$ac_compile\"") >&5
21698   (eval $ac_compile) 2>&5
21699   ac_status=$?
21700   echo "$as_me:21700: \$? = $ac_status" >&5
21701   (exit $ac_status); } &&
21702          { ac_try='test -s conftest.$ac_objext'
21703   { (eval echo "$as_me:21703: \"$ac_try\"") >&5
21704   (eval $ac_try) 2>&5
21705   ac_status=$?
21706   echo "$as_me:21706: \$? = $ac_status" >&5
21707   (exit $ac_status); }; }; then
21708   ac_cv_type_wchar_t=yes
21709 else
21710   echo "$as_me: failed program was:" >&5
21711 cat conftest.$ac_ext >&5
21712 ac_cv_type_wchar_t=no
21713 fi
21714 rm -f conftest.$ac_objext conftest.$ac_ext
21715 fi
21716 echo "$as_me:21716: result: $ac_cv_type_wchar_t" >&5
21717 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21718
21719 echo "$as_me:21719: checking size of wchar_t" >&5
21720 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21721 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21722   echo $ECHO_N "(cached) $ECHO_C" >&6
21723 else
21724   if test "$ac_cv_type_wchar_t" = yes; then
21725   if test "$cross_compiling" = yes; then
21726   # Depending upon the size, compute the lo and hi bounds.
21727 cat >conftest.$ac_ext <<_ACEOF
21728 #line 21728 "configure"
21729 #include "confdefs.h"
21730 $ac_includes_default
21731 int
21732 main ()
21733 {
21734 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21735   ;
21736   return 0;
21737 }
21738 _ACEOF
21739 rm -f conftest.$ac_objext
21740 if { (eval echo "$as_me:21740: \"$ac_compile\"") >&5
21741   (eval $ac_compile) 2>&5
21742   ac_status=$?
21743   echo "$as_me:21743: \$? = $ac_status" >&5
21744   (exit $ac_status); } &&
21745          { ac_try='test -s conftest.$ac_objext'
21746   { (eval echo "$as_me:21746: \"$ac_try\"") >&5
21747   (eval $ac_try) 2>&5
21748   ac_status=$?
21749   echo "$as_me:21749: \$? = $ac_status" >&5
21750   (exit $ac_status); }; }; then
21751   ac_lo=0 ac_mid=0
21752   while :; do
21753     cat >conftest.$ac_ext <<_ACEOF
21754 #line 21754 "configure"
21755 #include "confdefs.h"
21756 $ac_includes_default
21757 int
21758 main ()
21759 {
21760 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21761   ;
21762   return 0;
21763 }
21764 _ACEOF
21765 rm -f conftest.$ac_objext
21766 if { (eval echo "$as_me:21766: \"$ac_compile\"") >&5
21767   (eval $ac_compile) 2>&5
21768   ac_status=$?
21769   echo "$as_me:21769: \$? = $ac_status" >&5
21770   (exit $ac_status); } &&
21771          { ac_try='test -s conftest.$ac_objext'
21772   { (eval echo "$as_me:21772: \"$ac_try\"") >&5
21773   (eval $ac_try) 2>&5
21774   ac_status=$?
21775   echo "$as_me:21775: \$? = $ac_status" >&5
21776   (exit $ac_status); }; }; then
21777   ac_hi=$ac_mid; break
21778 else
21779   echo "$as_me: failed program was:" >&5
21780 cat conftest.$ac_ext >&5
21781 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21782 fi
21783 rm -f conftest.$ac_objext conftest.$ac_ext
21784   done
21785 else
21786   echo "$as_me: failed program was:" >&5
21787 cat conftest.$ac_ext >&5
21788 ac_hi=-1 ac_mid=-1
21789   while :; do
21790     cat >conftest.$ac_ext <<_ACEOF
21791 #line 21791 "configure"
21792 #include "confdefs.h"
21793 $ac_includes_default
21794 int
21795 main ()
21796 {
21797 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21798   ;
21799   return 0;
21800 }
21801 _ACEOF
21802 rm -f conftest.$ac_objext
21803 if { (eval echo "$as_me:21803: \"$ac_compile\"") >&5
21804   (eval $ac_compile) 2>&5
21805   ac_status=$?
21806   echo "$as_me:21806: \$? = $ac_status" >&5
21807   (exit $ac_status); } &&
21808          { ac_try='test -s conftest.$ac_objext'
21809   { (eval echo "$as_me:21809: \"$ac_try\"") >&5
21810   (eval $ac_try) 2>&5
21811   ac_status=$?
21812   echo "$as_me:21812: \$? = $ac_status" >&5
21813   (exit $ac_status); }; }; then
21814   ac_lo=$ac_mid; break
21815 else
21816   echo "$as_me: failed program was:" >&5
21817 cat conftest.$ac_ext >&5
21818 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21819 fi
21820 rm -f conftest.$ac_objext conftest.$ac_ext
21821   done
21822 fi
21823 rm -f conftest.$ac_objext conftest.$ac_ext
21824 # Binary search between lo and hi bounds.
21825 while test "x$ac_lo" != "x$ac_hi"; do
21826   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21827   cat >conftest.$ac_ext <<_ACEOF
21828 #line 21828 "configure"
21829 #include "confdefs.h"
21830 $ac_includes_default
21831 int
21832 main ()
21833 {
21834 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21835   ;
21836   return 0;
21837 }
21838 _ACEOF
21839 rm -f conftest.$ac_objext
21840 if { (eval echo "$as_me:21840: \"$ac_compile\"") >&5
21841   (eval $ac_compile) 2>&5
21842   ac_status=$?
21843   echo "$as_me:21843: \$? = $ac_status" >&5
21844   (exit $ac_status); } &&
21845          { ac_try='test -s conftest.$ac_objext'
21846   { (eval echo "$as_me:21846: \"$ac_try\"") >&5
21847   (eval $ac_try) 2>&5
21848   ac_status=$?
21849   echo "$as_me:21849: \$? = $ac_status" >&5
21850   (exit $ac_status); }; }; then
21851   ac_hi=$ac_mid
21852 else
21853   echo "$as_me: failed program was:" >&5
21854 cat conftest.$ac_ext >&5
21855 ac_lo=`expr $ac_mid + 1`
21856 fi
21857 rm -f conftest.$ac_objext conftest.$ac_ext
21858 done
21859 ac_cv_sizeof_wchar_t=$ac_lo
21860 else
21861   if test "$cross_compiling" = yes; then
21862   { { echo "$as_me:21862: error: cannot run test program while cross compiling" >&5
21863 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21864    { (exit 1); exit 1; }; }
21865 else
21866   cat >conftest.$ac_ext <<_ACEOF
21867 #line 21867 "configure"
21868 #include "confdefs.h"
21869 $ac_includes_default
21870 int
21871 main ()
21872 {
21873 FILE *f = fopen ("conftest.val", "w");
21874 if (!f)
21875   $ac_main_return (1);
21876 fprintf (f, "%d", (sizeof (wchar_t)));
21877 fclose (f);
21878   ;
21879   return 0;
21880 }
21881 _ACEOF
21882 rm -f conftest$ac_exeext
21883 if { (eval echo "$as_me:21883: \"$ac_link\"") >&5
21884   (eval $ac_link) 2>&5
21885   ac_status=$?
21886   echo "$as_me:21886: \$? = $ac_status" >&5
21887   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21888   { (eval echo "$as_me:21888: \"$ac_try\"") >&5
21889   (eval $ac_try) 2>&5
21890   ac_status=$?
21891   echo "$as_me:21891: \$? = $ac_status" >&5
21892   (exit $ac_status); }; }; then
21893   ac_cv_sizeof_wchar_t=`cat conftest.val`
21894 else
21895   echo "$as_me: program exited with status $ac_status" >&5
21896 echo "$as_me: failed program was:" >&5
21897 cat conftest.$ac_ext >&5
21898 fi
21899 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21900 fi
21901 fi
21902 rm -f conftest.val
21903 else
21904   ac_cv_sizeof_wchar_t=0
21905 fi
21906 fi
21907 echo "$as_me:21907: result: $ac_cv_sizeof_wchar_t" >&5
21908 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21909 cat >>confdefs.h <<EOF
21910 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21911 EOF
21912
21913 fi
21914
21915 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21916 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21917 ###
21918 ### ticlib modules may be a separate library, otherwise contained in termlib.
21919 ### termlib modules may be a separate library, otherwise contained in ncurses.
21920 ###
21921 ### The of "+" or " " between the tokens controls the way the script
21922 ### chooses to split module lists into libraries.
21923 ###
21924 ### (see CF_LIB_RULES).
21925 echo "$as_me:21925: checking for library subsets" >&5
21926 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21927 LIB_SUBSETS=
21928
21929 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21930         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21931         if test "$with_ticlib" != no ; then
21932                 LIB_SUBSETS="${LIB_SUBSETS} "
21933         else
21934                 LIB_SUBSETS="${LIB_SUBSETS}+"
21935         fi
21936 fi
21937
21938 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21939 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21940
21941 if test "$with_termlib" != no ; then
21942         LIB_SUBSETS="${LIB_SUBSETS} "
21943 else
21944         LIB_SUBSETS="${LIB_SUBSETS}+"
21945 fi
21946
21947 LIB_SUBSETS="${LIB_SUBSETS}base"
21948
21949 # Most term-driver calls are to tinfo, but some like init_pair are to the
21950 # base library (so it resides in base).
21951 if test "$with_term_driver" != no ; then
21952         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21953         case $cf_cv_system_name in
21954         (*mingw32*|*mingw64*)
21955                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21956                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21957                 ;;
21958         (*)
21959                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21960                 ;;
21961         esac
21962 fi
21963
21964 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21965 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21966
21967 echo "$as_me:21967: result: $LIB_SUBSETS" >&5
21968 echo "${ECHO_T}$LIB_SUBSETS" >&6
21969
21970 ### Construct the list of include-directories to be generated
21971
21972 if test "$srcdir" != "."; then
21973         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21974 fi
21975 CPPFLAGS="-I../include $CPPFLAGS"
21976 if test "$srcdir" != "."; then
21977         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21978 fi
21979 CPPFLAGS="-I. $CPPFLAGS"
21980
21981 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21982 if test "$srcdir" != "."; then
21983         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21984 fi
21985 if test "$GCC" != yes; then
21986         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21987 elif test "$includedir" != "/usr/include"; then
21988         if test "$includedir" = '${prefix}/include' ; then
21989                 if test x$prefix != x/usr ; then
21990                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21991                 fi
21992         else
21993                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21994         fi
21995 fi
21996
21997 ### Build up pieces for makefile rules
21998 echo "$as_me:21998: checking default library suffix" >&5
21999 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22000
22001         case $DFT_LWR_MODEL in
22002         (libtool) DFT_ARG_SUFFIX=''   ;;
22003         (normal)  DFT_ARG_SUFFIX=''   ;;
22004         (debug)   DFT_ARG_SUFFIX='_g' ;;
22005         (profile) DFT_ARG_SUFFIX='_p' ;;
22006         (shared)  DFT_ARG_SUFFIX=''   ;;
22007         esac
22008         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22009 echo "$as_me:22009: result: $DFT_ARG_SUFFIX" >&5
22010 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22011
22012 echo "$as_me:22012: checking default library-dependency suffix" >&5
22013 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22014
22015         case X$DFT_LWR_MODEL in
22016         (Xlibtool)
22017                 DFT_LIB_SUFFIX='.la'
22018                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22019                 ;;
22020         (Xdebug)
22021                 DFT_LIB_SUFFIX='_g.a'
22022                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22023                 ;;
22024         (Xprofile)
22025                 DFT_LIB_SUFFIX='_p.a'
22026                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22027                 ;;
22028         (Xshared)
22029                 case $cf_cv_system_name in
22030                 (aix[5-7]*)
22031                         DFT_LIB_SUFFIX='.so'
22032                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22033                         ;;
22034                 (cygwin*|msys*|mingw*)
22035                         DFT_LIB_SUFFIX='.dll'
22036                         DFT_DEP_SUFFIX='.dll.a'
22037                         ;;
22038                 (darwin*)
22039                         DFT_LIB_SUFFIX='.dylib'
22040                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22041                         ;;
22042                 (hpux*)
22043                         case $target in
22044                         (ia64*)
22045                                 DFT_LIB_SUFFIX='.so'
22046                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22047                                 ;;
22048                         (*)
22049                                 DFT_LIB_SUFFIX='.sl'
22050                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22051                                 ;;
22052                         esac
22053                         ;;
22054                 (*)
22055                         DFT_LIB_SUFFIX='.so'
22056                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22057                         ;;
22058                 esac
22059                 ;;
22060         (*)
22061                 DFT_LIB_SUFFIX='.a'
22062                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22063                 ;;
22064         esac
22065         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22066         then
22067                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22068                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22069         fi
22070 echo "$as_me:22070: result: $DFT_DEP_SUFFIX" >&5
22071 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22072
22073 echo "$as_me:22073: checking default object directory" >&5
22074 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22075
22076         case $DFT_LWR_MODEL in
22077         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22078         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22079         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22080         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22081         (shared)
22082                 case $cf_cv_system_name in
22083                 (cygwin|msys)
22084                         DFT_OBJ_SUBDIR='objects' ;;
22085                 (*)
22086                         DFT_OBJ_SUBDIR='obj_s' ;;
22087                 esac
22088         esac
22089 echo "$as_me:22089: result: $DFT_OBJ_SUBDIR" >&5
22090 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22091
22092 if test "x$cf_with_cxx" = xyes ; then
22093 echo "$as_me:22093: checking c++ library-dependency suffix" >&5
22094 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22095 if test "$with_libtool" != "no"; then
22096         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22097         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22098 elif test "$with_shared_cxx" != "no"; then
22099         # also for g++ users...
22100         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22101 else
22102         # we normally make a static library because C/C++ library rules differ
22103
22104         case Xnormal in
22105         (Xlibtool)
22106                 CXX_LIB_SUFFIX='.la'
22107                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22108                 ;;
22109         (Xdebug)
22110                 CXX_LIB_SUFFIX='_g.a'
22111                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22112                 ;;
22113         (Xprofile)
22114                 CXX_LIB_SUFFIX='_p.a'
22115                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22116                 ;;
22117         (Xshared)
22118                 case $cf_cv_system_name in
22119                 (aix[5-7]*)
22120                         CXX_LIB_SUFFIX='.so'
22121                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22122                         ;;
22123                 (cygwin*|msys*|mingw*)
22124                         CXX_LIB_SUFFIX='.dll'
22125                         CXX_DEP_SUFFIX='.dll.a'
22126                         ;;
22127                 (darwin*)
22128                         CXX_LIB_SUFFIX='.dylib'
22129                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22130                         ;;
22131                 (hpux*)
22132                         case $target in
22133                         (ia64*)
22134                                 CXX_LIB_SUFFIX='.so'
22135                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22136                                 ;;
22137                         (*)
22138                                 CXX_LIB_SUFFIX='.sl'
22139                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22140                                 ;;
22141                         esac
22142                         ;;
22143                 (*)
22144                         CXX_LIB_SUFFIX='.so'
22145                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22146                         ;;
22147                 esac
22148                 ;;
22149         (*)
22150                 CXX_LIB_SUFFIX='.a'
22151                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22152                 ;;
22153         esac
22154         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22155         then
22156                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22157                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22158         fi
22159
22160 fi
22161 echo "$as_me:22161: result: $CXX_LIB_SUFFIX" >&5
22162 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22163
22164 fi
22165
22166 # do not want -ldl in build except as needed for -lncurses dependency
22167 if test "x$with_dlsym" = xyes ; then
22168 if test $DFT_LWR_MODEL = shared || \
22169    test $DFT_LWR_MODEL = libtool ; then
22170
22171 # remove dl library from $LIBS
22172 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22173
22174 fi
22175 fi
22176 ### Set up low-level terminfo dependencies for makefiles.
22177
22178 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22179 # do not need libdl
22180 TICS_LIST=
22181 if test "x$with_dlsym" = xyes ; then
22182
22183 # remove dl library from $SHLIB_LIST
22184 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22185
22186 fi
22187
22188 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22189 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22190 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22191 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22192 then
22193         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22194 fi
22195
22196 if test "$with_ticlib" != no ; then
22197
22198         if test "x$with_ticlib" != xyes ; then
22199                 TICS_NAME=$with_ticlib
22200                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22201                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22202                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22203                 TICS_LIB_SUFFIX="${with_ticlib}"
22204         else
22205                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22206                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22207                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22208                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22209         fi
22210         TICS_LDFLAGS="-L${LIB_DIR}"
22211         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22212 else
22213         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22214         TICS_LDFLAGS="-L${LIB_DIR}"
22215         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22216 fi
22217
22218 if test "$with_termlib" != no ; then
22219
22220         if test "x$with_termlib" != xyes ; then
22221                 TINFO_NAME=$with_termlib
22222                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22223                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22224                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22225                 TINFO_LIB_SUFFIX="${with_termlib}"
22226         else
22227                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22228                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22229                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22230                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22231         fi
22232
22233         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22234         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22235         if test "$DFT_LWR_MODEL" = "libtool"; then
22236                 TEST_ARGS="${TEST_DEPS}"
22237                 TEST_ARG2="${TEST_DEP2}"
22238                 TINFO_LDFLAGS="-L${LIB_DIR}"
22239                 TINFO_LIBS="$TEST_ARGS"
22240                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22241                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22242         else
22243                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22244                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22245                 if test "x$with_term_driver" != xno ; then
22246                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22247                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22248                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22249                 else
22250                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22251                         TINFO_LIBS="$TEST_ARGS"
22252                 fi
22253                 TINFO_LDFLAGS="-L${LIB_DIR}"
22254                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22255         fi
22256 else
22257         # the next lines are needed for linking libtic over libncurses
22258         TINFO_NAME=${LIB_NAME}
22259         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22260         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22261         if test "x$with_tic_depends" = xyes ; then
22262                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22263         else
22264                 TICS_LIST="$SHLIB_LIST"
22265         fi
22266
22267         TINFO_LDFLAGS="-L${LIB_DIR}"
22268         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22269 fi
22270
22271 if test "$DFT_LWR_MODEL" = shared ; then
22272         case $cf_cv_system_name in
22273         (cygwin*|msys*)
22274                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22275                 TINFO_SUFFIX=.dll
22276                 ;;
22277         esac
22278 fi
22279
22280 if test "x$with_dlsym" = xyes ; then
22281
22282 # remove dl library from $TICS_LIST
22283 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22284
22285 fi
22286
22287 if test "$DFT_LWR_MODEL" = "libtool"; then
22288         OBJEXT=lo
22289 fi
22290
22291 # needed for Ada95
22292 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22293
22294 case $DFT_LWR_MODEL in
22295 (normal|debug|profile)
22296
22297 if test "$GCC" = yes ; then
22298         case $cf_cv_system_name in
22299         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22300                 LDFLAGS_STATIC=
22301                 LDFLAGS_SHARED=
22302                 ;;
22303         (*)     # normally, except when broken
22304                 LDFLAGS_STATIC=-static
22305                 LDFLAGS_SHARED=-dynamic
22306                 ;;
22307         esac
22308 else
22309         case $cf_cv_system_name in
22310         (aix[4-7]*)     # from ld manpage
22311                 LDFLAGS_STATIC=-bstatic
22312                 LDFLAGS_SHARED=-bdynamic
22313                 ;;
22314         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22315                 # We could also use just "archive" and "shared".
22316                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22317                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22318                 ;;
22319         (irix*)         # from ld manpage IRIX64
22320                 LDFLAGS_STATIC=-Bstatic
22321                 LDFLAGS_SHARED=-Bdynamic
22322                 ;;
22323         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22324                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22325                 LDFLAGS_STATIC=-noso
22326                 LDFLAGS_SHARED=-so_archive
22327                 ;;
22328         (solaris2*)
22329                 LDFLAGS_STATIC=-Bstatic
22330                 LDFLAGS_SHARED=-Bdynamic
22331                 ;;
22332         esac
22333 fi
22334
22335 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22336 then
22337         echo "$as_me:22337: checking if linker supports switching between static/dynamic" >&5
22338 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22339
22340         rm -f libconftest.a
22341         cat >conftest.$ac_ext <<EOF
22342 #line 22342 "configure"
22343 #include <stdio.h>
22344 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22345 EOF
22346         if { (eval echo "$as_me:22346: \"$ac_compile\"") >&5
22347   (eval $ac_compile) 2>&5
22348   ac_status=$?
22349   echo "$as_me:22349: \$? = $ac_status" >&5
22350   (exit $ac_status); } ; then
22351                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22352                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22353         fi
22354         rm -f conftest.*
22355
22356         cf_save_LIBS="$LIBS"
22357
22358         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22359         cat >conftest.$ac_ext <<_ACEOF
22360 #line 22360 "configure"
22361 #include "confdefs.h"
22362
22363 #line 22363 "configure"
22364 #include <stdio.h>
22365 int cf_ldflags_static(FILE *fp);
22366
22367 int
22368 main ()
22369 {
22370
22371         return cf_ldflags_static(stdin);
22372
22373   ;
22374   return 0;
22375 }
22376 _ACEOF
22377 rm -f conftest.$ac_objext conftest$ac_exeext
22378 if { (eval echo "$as_me:22378: \"$ac_link\"") >&5
22379   (eval $ac_link) 2>&5
22380   ac_status=$?
22381   echo "$as_me:22381: \$? = $ac_status" >&5
22382   (exit $ac_status); } &&
22383          { ac_try='test -s conftest$ac_exeext'
22384   { (eval echo "$as_me:22384: \"$ac_try\"") >&5
22385   (eval $ac_try) 2>&5
22386   ac_status=$?
22387   echo "$as_me:22387: \$? = $ac_status" >&5
22388   (exit $ac_status); }; }; then
22389
22390         # some linkers simply ignore the -dynamic
22391         case x`file conftest$ac_exeext 2>/dev/null` in
22392         (*static*)
22393                 cf_ldflags_static=no
22394                 ;;
22395         (*)
22396                 cf_ldflags_static=yes
22397                 ;;
22398         esac
22399
22400 else
22401   echo "$as_me: failed program was:" >&5
22402 cat conftest.$ac_ext >&5
22403 cf_ldflags_static=no
22404 fi
22405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22406
22407         rm -f libconftest.*
22408         LIBS="$cf_save_LIBS"
22409
22410         echo "$as_me:22410: result: $cf_ldflags_static" >&5
22411 echo "${ECHO_T}$cf_ldflags_static" >&6
22412
22413         if test $cf_ldflags_static != yes
22414         then
22415                 LDFLAGS_STATIC=
22416                 LDFLAGS_SHARED=
22417         fi
22418 else
22419         LDFLAGS_STATIC=
22420         LDFLAGS_SHARED=
22421 fi
22422
22423         ;;
22424 esac
22425
22426 echo "$as_me:22426: checking where we will install curses.h" >&5
22427 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22428
22429 includesubdir=
22430 if test "$with_overwrite" = no && \
22431  ( test "x$includedir" = 'x${prefix}/include' || \
22432    test "x$includedir" = "x${prefix}/include" )
22433 then
22434         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22435 fi
22436 echo "$as_me:22436: result: ${includedir}${includesubdir}" >&5
22437 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22438
22439 ### Resolve a conflict between normal and wide-curses by forcing applications
22440 ### that will need libutf8 to add it to their configure script.
22441 if test "$with_overwrite" != no ; then
22442 if test "$NCURSES_LIBUTF8" = 1 ; then
22443         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22444         { echo "$as_me:22444: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22445 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22446 fi
22447 fi
22448 WITH_OVERWRITE=$with_overwrite
22449
22450 # used to separate tack out of the tree
22451 NCURSES_TREE=
22452
22453 ### predefined stuff for the test programs
22454
22455 cat >>confdefs.h <<\EOF
22456 #define HAVE_SLK_COLOR 1
22457 EOF
22458
22459 ### Construct the list of subdirectories for which we'll customize makefiles
22460 ### with the appropriate compile-rules.
22461
22462 echo "$as_me:22462: checking for src modules" >&5
22463 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22464
22465 # dependencies and linker-arguments for test-programs
22466 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22467 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22468 if test "$DFT_LWR_MODEL" = "libtool"; then
22469         TEST_ARGS="${TEST_DEPS}"
22470         TEST_ARG2="${TEST_DEP2}"
22471 else
22472         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22473         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22474 fi
22475
22476 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22477 cf_cv_src_modules=
22478 for cf_dir in $modules_to_build
22479 do
22480         if test -f $srcdir/$cf_dir/modules; then
22481
22482                 # We may/may not have tack in the distribution, though the
22483                 # makefile is.
22484                 if test $cf_dir = tack ; then
22485                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22486                                 continue
22487                         fi
22488                 fi
22489
22490                 if test -z "$cf_cv_src_modules"; then
22491                         cf_cv_src_modules=$cf_dir
22492                 else
22493                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22494                 fi
22495
22496                 # Make the ncurses_cfg.h file record the library interface files as
22497                 # well.  These are header files that are the same name as their
22498                 # directory.  Ncurses is the only library that does not follow
22499                 # that pattern.
22500                 if test $cf_dir = tack ; then
22501                         continue
22502                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22503
22504 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22505
22506                         cat >>confdefs.h <<EOF
22507 #define HAVE_${cf_have_include}_H 1
22508 EOF
22509
22510                         cat >>confdefs.h <<EOF
22511 #define HAVE_LIB${cf_have_include} 1
22512 EOF
22513
22514                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22515                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22516                         if test "$DFT_LWR_MODEL" = "libtool"; then
22517                                 TEST_ARGS="${TEST_DEPS}"
22518                                 TEST_ARG2="${TEST_DEP2}"
22519                         else
22520                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22521                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22522                         fi
22523                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22524                 fi
22525         fi
22526 done
22527 echo "$as_me:22527: result: $cf_cv_src_modules" >&5
22528 echo "${ECHO_T}$cf_cv_src_modules" >&6
22529
22530 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22531 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22532
22533 SRC_SUBDIRS=
22534 if test "x$cf_with_manpages" != xno ; then
22535         SRC_SUBDIRS="$SRC_SUBDIRS man"
22536 fi
22537 SRC_SUBDIRS="$SRC_SUBDIRS include"
22538 for cf_dir in $cf_cv_src_modules
22539 do
22540         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22541 done
22542 if test "x$cf_with_tests" != "xno" ; then
22543         SRC_SUBDIRS="$SRC_SUBDIRS test"
22544 fi
22545 # always make this, to install the ncurses-config script
22546 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22547 if test "$cf_with_cxx_binding" != no; then
22548         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22549         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22550 fi
22551
22552 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22553 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22554
22555 ADA_SUBDIRS=
22556 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22557         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22558         ADA_SUBDIRS="gen src"
22559         if test "x$cf_with_tests" != "xno" ; then
22560                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22561         fi
22562 fi
22563
22564 SUB_MAKEFILES=
22565 for cf_dir in $SRC_SUBDIRS
22566 do
22567         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22568 done
22569
22570 if test -n "$ADA_SUBDIRS"; then
22571         for cf_dir in $ADA_SUBDIRS
22572         do
22573                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22574         done
22575
22576 fi
22577
22578 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22579    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22580    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22581 fi
22582
22583 DIRS_TO_MAKE="lib"
22584 for cf_item in $cf_list_models
22585 do
22586
22587         case $cf_item in
22588         (libtool) cf_subdir='obj_lo'  ;;
22589         (normal)  cf_subdir='objects' ;;
22590         (debug)   cf_subdir='obj_g' ;;
22591         (profile) cf_subdir='obj_p' ;;
22592         (shared)
22593                 case $cf_cv_system_name in
22594                 (cygwin|msys)
22595                         cf_subdir='objects' ;;
22596                 (*)
22597                         cf_subdir='obj_s' ;;
22598                 esac
22599         esac
22600
22601         for cf_item2 in $DIRS_TO_MAKE
22602         do
22603                 test $cf_item2 = $cf_subdir && break
22604         done
22605         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22606 done
22607 for cf_dir in $DIRS_TO_MAKE
22608 do
22609         test ! -d $cf_dir && mkdir $cf_dir
22610 done
22611
22612 # symbols that differ when compiling Ada95 by itself.
22613 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22614
22615 # values to use as strings
22616
22617 cat >>confdefs.h <<EOF
22618 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22619 EOF
22620
22621 cat >>confdefs.h <<EOF
22622 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22623 EOF
22624
22625 ### Now that we're done running tests, add the compiler-warnings, if any
22626
22627 cf_fix_cppflags=no
22628 cf_new_cflags=
22629 cf_new_cppflags=
22630 cf_new_extra_cppflags=
22631
22632 for cf_add_cflags in $EXTRA_CFLAGS
22633 do
22634 case $cf_fix_cppflags in
22635 (no)
22636         case $cf_add_cflags in
22637         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22638                 case $cf_add_cflags in
22639                 (-D*)
22640                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22641
22642                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22643                                 && test -z "${cf_tst_cflags}" \
22644                                 && cf_fix_cppflags=yes
22645
22646                         if test $cf_fix_cppflags = yes ; then
22647                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22648                                 continue
22649                         elif test "${cf_tst_cflags}" = "\"'" ; then
22650                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22651                                 continue
22652                         fi
22653                         ;;
22654                 esac
22655                 case "$CPPFLAGS" in
22656                 (*$cf_add_cflags)
22657                         ;;
22658                 (*)
22659                         case $cf_add_cflags in
22660                         (-D*)
22661                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22662
22663 CPPFLAGS=`echo "$CPPFLAGS" | \
22664         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22665                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22666
22667                                 ;;
22668                         esac
22669                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22670                         ;;
22671                 esac
22672                 ;;
22673         (*)
22674                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22675                 ;;
22676         esac
22677         ;;
22678 (yes)
22679         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22680
22681         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22682
22683         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22684                 && test -z "${cf_tst_cflags}" \
22685                 && cf_fix_cppflags=no
22686         ;;
22687 esac
22688 done
22689
22690 if test -n "$cf_new_cflags" ; then
22691
22692         CFLAGS="$CFLAGS $cf_new_cflags"
22693 fi
22694
22695 if test -n "$cf_new_cppflags" ; then
22696
22697         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22698 fi
22699
22700 if test -n "$cf_new_extra_cppflags" ; then
22701
22702         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22703 fi
22704
22705 ### Define substitutions for header files to avoid name-pollution
22706
22707 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22708         HAVE_TCGETATTR=1
22709 else
22710         HAVE_TCGETATTR=0
22711 fi
22712
22713 if test "x$ac_cv_header_stdint_h" = xyes ; then
22714         HAVE_STDINT_H=1
22715 else
22716         HAVE_STDINT_H=0
22717 fi
22718
22719 if test "x$ac_cv_header_termio_h" = xyes ; then
22720         HAVE_TERMIO_H=1
22721 else
22722         HAVE_TERMIO_H=0
22723 fi
22724
22725 if test "x$ac_cv_header_termios_h" = xyes ; then
22726         HAVE_TERMIOS_H=1
22727 else
22728         HAVE_TERMIOS_H=0
22729 fi
22730
22731 ################################################################################
22732 test "x$use_database" = xyes && \
22733 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22734
22735 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22736 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22737
22738 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22739 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22740 fi
22741
22742 # Extract the first word of "tic", so it can be a program name with args.
22743 set dummy tic; ac_word=$2
22744 echo "$as_me:22744: checking for $ac_word" >&5
22745 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22746 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22747   echo $ECHO_N "(cached) $ECHO_C" >&6
22748 else
22749   case $TIC_PATH in
22750   [\\/]* | ?:[\\/]*)
22751   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22752   ;;
22753   *)
22754   ac_save_IFS=$IFS; IFS=$ac_path_separator
22755 ac_dummy="$PATH:/usr/local/ncurses/bin"
22756 for ac_dir in $ac_dummy; do
22757   IFS=$ac_save_IFS
22758   test -z "$ac_dir" && ac_dir=.
22759   if $as_executable_p "$ac_dir/$ac_word"; then
22760    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22761    echo "$as_me:22761: found $ac_dir/$ac_word" >&5
22762    break
22763 fi
22764 done
22765
22766   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22767   ;;
22768 esac
22769 fi
22770 TIC_PATH=$ac_cv_path_TIC_PATH
22771
22772 if test -n "$TIC_PATH"; then
22773   echo "$as_me:22773: result: $TIC_PATH" >&5
22774 echo "${ECHO_T}$TIC_PATH" >&6
22775 else
22776   echo "$as_me:22776: result: no" >&5
22777 echo "${ECHO_T}no" >&6
22778 fi
22779
22780 if test -n "$FALLBACK_LIST"
22781 then
22782         if test "$TIC_PATH" = unknown
22783         then
22784                 { echo "$as_me:22784: WARNING: no tic program found for fallbacks" >&5
22785 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22786         fi
22787 fi
22788
22789 if test "x$cf_with_tests" != xno ; then
22790         MAKE_TESTS=
22791 else
22792         MAKE_TESTS="#"
22793 fi
22794
22795 ADAHTML_DIR=../../doc/html/ada
22796
22797 # these could be configurable, but are not currently
22798 PANEL_NAME=panel
22799 MENU_NAME=menu
22800 FORM_NAME=form
22801 CXX_NAME=ncurses++
22802
22803 # workaround for OS/2 (20151017)
22804 case $cf_cv_system_name in
22805 (os2*)
22806         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22807         ;;
22808 (*)
22809         LIBTOOL_OPTS_CXX=
22810         ;;
22811 esac
22812
22813 # workaround for g++ versus Solaris (20131116)
22814 case $cf_cv_system_name in
22815 (solaris2*)
22816         case "x$CPPFLAGS" in
22817         (*-D_XOPEN_SOURCE_EXTENDED*)
22818                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22819
22820 echo "${as_me:-configure}:22820: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22821
22822                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22823                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22824                 ;;
22825         esac
22826         ;;
22827 esac
22828
22829 # Help to automatically enable the extended curses features when using either
22830 # the *-config or the ".pc" files by adding defines.
22831 echo "$as_me:22831: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22832 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22833 PKG_CFLAGS=
22834 for cf_loop1 in $CPPFLAGS_after_XOPEN
22835 do
22836         cf_found=no
22837         for cf_loop2 in $CPPFLAGS_before_XOPEN
22838         do
22839                 if test "x$cf_loop1" = "x$cf_loop2"
22840                 then
22841                         cf_found=yes
22842                         break
22843                 fi
22844         done
22845         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22846 done
22847 echo "$as_me:22847: result: $PKG_CFLAGS" >&5
22848 echo "${ECHO_T}$PKG_CFLAGS" >&6
22849
22850 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22851 case "x$NCURSES_OSPEED" in
22852 (*short*)
22853         cf_compatible=1
22854         ;;
22855 (*)
22856         cf_compatible=0
22857         ;;
22858 esac
22859
22860 cat >>confdefs.h <<EOF
22861 #define NCURSES_OSPEED_COMPAT $cf_compatible
22862 EOF
22863
22864 case "x$cf_cv_typeof_chtype" in
22865 (xshort|xint|xlong)
22866         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22867         ;;
22868 esac
22869
22870 case "x$cf_cv_typeof_mmask_t" in
22871 (xshort|xint|xlong)
22872         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22873         ;;
22874 esac
22875
22876 # substitute into misc/Makefile to suppress
22877 # (un)install.data from the
22878 # (un)install rules.
22879 if test "x$cf_with_db_install" = "xno"; then
22880         MISC_INSTALL_DATA=
22881         MISC_UNINSTALL_DATA=
22882 else
22883         MISC_INSTALL_DATA=install.data
22884         MISC_UNINSTALL_DATA=uninstall.data
22885 fi
22886
22887 SUB_SCRIPTS=
22888
22889 if test -n "$PACKAGE"
22890 then
22891         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22892         export PACKAGE
22893         echo "package: $PACKAGE"
22894 fi
22895
22896 UNALTERED_SYMS=
22897 cf_filter_syms=no
22898
22899 if test -n "$RESULTING_SYMS"
22900 then
22901         cf_filter_syms=$cf_dft_filter_syms
22902         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22903
22904 echo "${as_me:-configure}:22904: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22905
22906 fi
22907
22908 if test "x$WILDCARD_SYMS" = xno
22909 then
22910         cf_filter_syms=yes
22911 fi
22912
22913 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
22914
22915 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22916 if test $cf_filter_syms = yes
22917 then
22918         RESULTING_SYMS=resulting.map
22919 fi
22920
22921 if test "x$cross_compiling" = xyes ; then
22922         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22923 else
22924         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22925 fi
22926
22927 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"
22928 ac_config_commands="$ac_config_commands default"
22929 cat >confcache <<\_ACEOF
22930 # This file is a shell script that caches the results of configure
22931 # tests run on this system so they can be shared between configure
22932 # scripts and configure runs, see configure's option --config-cache.
22933 # It is not useful on other systems.  If it contains results you don't
22934 # want to keep, you may remove or edit it.
22935 #
22936 # config.status only pays attention to the cache file if you give it
22937 # the --recheck option to rerun configure.
22938 #
22939 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22940 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22941 # following values.
22942
22943 _ACEOF
22944
22945 # The following way of writing the cache mishandles newlines in values,
22946 # but we know of no workaround that is simple, portable, and efficient.
22947 # So, don't put newlines in cache variables' values.
22948 # Ultrix sh set writes to stderr and can't be redirected directly,
22949 # and sets the high bit in the cache file unless we assign to the vars.
22950 {
22951   (set) 2>&1 |
22952     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22953     *ac_space=\ *)
22954       # `set' does not quote correctly, so add quotes (double-quote
22955       # substitution turns \\\\ into \\, and sed turns \\ into \).
22956       sed -n \
22957         "s/'/'\\\\''/g;
22958           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22959       ;;
22960     *)
22961       # `set' quotes correctly as required by POSIX, so do not add quotes.
22962       sed -n \
22963         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22964       ;;
22965     esac;
22966 } |
22967   sed '
22968      t clear
22969      : clear
22970      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22971      t end
22972      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22973      : end' >>confcache
22974 if cmp -s $cache_file confcache; then :; else
22975   if test -w $cache_file; then
22976     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22977     cat confcache >$cache_file
22978   else
22979     echo "not updating unwritable cache $cache_file"
22980   fi
22981 fi
22982 rm -f confcache
22983
22984 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22985 # Let make expand exec_prefix.
22986 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22987
22988 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22989 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22990 # trailing colons and then remove the whole line if VPATH becomes empty
22991 # (actually we leave an empty line to preserve line numbers).
22992 if test "x$srcdir" = x.; then
22993   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22994 s/:*\$(srcdir):*/:/;
22995 s/:*\${srcdir}:*/:/;
22996 s/:*@srcdir@:*/:/;
22997 s/^\([^=]*=[    ]*\):*/\1/;
22998 s/:*$//;
22999 s/^[^=]*=[      ]*$//;
23000 }'
23001 fi
23002
23003 DEFS=-DHAVE_CONFIG_H
23004
23005 : ${CONFIG_STATUS=./config.status}
23006 ac_clean_files_save=$ac_clean_files
23007 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23008 { echo "$as_me:23008: creating $CONFIG_STATUS" >&5
23009 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23010 cat >$CONFIG_STATUS <<_ACEOF
23011 #! $SHELL
23012 # Generated automatically by configure.
23013 # Run this file to recreate the current configuration.
23014 # Compiler output produced by configure, useful for debugging
23015 # configure, is in config.log if it exists.
23016
23017 debug=false
23018 SHELL=\${CONFIG_SHELL-$SHELL}
23019 ac_cs_invocation="\$0 \$@"
23020
23021 _ACEOF
23022
23023 cat >>$CONFIG_STATUS <<\_ACEOF
23024 # Be Bourne compatible
23025 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23026   emulate sh
23027   NULLCMD=:
23028 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23029   set -o posix
23030 fi
23031
23032 # Name of the executable.
23033 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23034
23035 if expr a : '\(a\)' >/dev/null 2>&1; then
23036   as_expr=expr
23037 else
23038   as_expr=false
23039 fi
23040
23041 rm -f conf$$ conf$$.exe conf$$.file
23042 echo >conf$$.file
23043 if ln -s conf$$.file conf$$ 2>/dev/null; then
23044   # We could just check for DJGPP; but this test a) works b) is more generic
23045   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23046   if test -f conf$$.exe; then
23047     # Don't use ln at all; we don't have any links
23048     as_ln_s='cp -p'
23049   else
23050     as_ln_s='ln -s'
23051   fi
23052 elif ln conf$$.file conf$$ 2>/dev/null; then
23053   as_ln_s=ln
23054 else
23055   as_ln_s='cp -p'
23056 fi
23057 rm -f conf$$ conf$$.exe conf$$.file
23058
23059 as_executable_p="test -f"
23060
23061 # Support unset when possible.
23062 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23063   as_unset=unset
23064 else
23065   as_unset=false
23066 fi
23067
23068 # NLS nuisances.
23069 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23070 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23071 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23072 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23073 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23074 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23075 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23076 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23077
23078 # IFS
23079 # We need space, tab and new line, in precisely that order.
23080 as_nl='
23081 '
23082 IFS="   $as_nl"
23083
23084 # CDPATH.
23085 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23086
23087 exec 6>&1
23088
23089 _ACEOF
23090
23091 # Files that config.status was made for.
23092 if test -n "$ac_config_files"; then
23093   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23094 fi
23095
23096 if test -n "$ac_config_headers"; then
23097   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23098 fi
23099
23100 if test -n "$ac_config_links"; then
23101   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23102 fi
23103
23104 if test -n "$ac_config_commands"; then
23105   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23106 fi
23107
23108 cat >>$CONFIG_STATUS <<\EOF
23109
23110 ac_cs_usage="\
23111 \`$as_me' instantiates files from templates according to the
23112 current configuration.
23113
23114 Usage: $0 [OPTIONS] [FILE]...
23115
23116   -h, --help       print this help, then exit
23117   -V, --version    print version number, then exit
23118   -d, --debug      don't remove temporary files
23119       --recheck    update $as_me by reconfiguring in the same conditions
23120   --file=FILE[:TEMPLATE]
23121                    instantiate the configuration file FILE
23122   --header=FILE[:TEMPLATE]
23123                    instantiate the configuration header FILE
23124
23125 Configuration files:
23126 $config_files
23127
23128 Configuration headers:
23129 $config_headers
23130
23131 Configuration commands:
23132 $config_commands
23133
23134 Report bugs to <dickey@invisible-island.net>."
23135 EOF
23136
23137 cat >>$CONFIG_STATUS <<EOF
23138 ac_cs_version="\\
23139 config.status
23140 configured by $0, generated by GNU Autoconf 2.52.20150926,
23141   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23142
23143 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23144 Free Software Foundation, Inc.
23145 This config.status script is free software; the Free Software Foundation
23146 gives unlimited permission to copy, distribute and modify it."
23147 srcdir=$srcdir
23148 INSTALL="$INSTALL"
23149 EOF
23150
23151 cat >>$CONFIG_STATUS <<\EOF
23152 # If no file are specified by the user, then we need to provide default
23153 # value.  By we need to know if files were specified by the user.
23154 ac_need_defaults=:
23155 while test $# != 0
23156 do
23157   case $1 in
23158   --*=*)
23159     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23160     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23161     shift
23162     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23163     shift
23164     ;;
23165   -*);;
23166   *) # This is not an option, so the user has probably given explicit
23167      # arguments.
23168      ac_need_defaults=false;;
23169   esac
23170
23171   case $1 in
23172   # Handling of the options.
23173 EOF
23174 cat >>$CONFIG_STATUS <<EOF
23175   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23176     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23177     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23178 EOF
23179 cat >>$CONFIG_STATUS <<\EOF
23180   --version | --vers* | -V )
23181     echo "$ac_cs_version"; exit 0 ;;
23182   --he | --h)
23183     # Conflict between --help and --header
23184     { { echo "$as_me:23184: error: ambiguous option: $1
23185 Try \`$0 --help' for more information." >&5
23186 echo "$as_me: error: ambiguous option: $1
23187 Try \`$0 --help' for more information." >&2;}
23188    { (exit 1); exit 1; }; };;
23189   --help | --hel | -h )
23190     echo "$ac_cs_usage"; exit 0 ;;
23191   --debug | --d* | -d )
23192     debug=: ;;
23193   --file | --fil | --fi | --f )
23194     shift
23195     CONFIG_FILES="$CONFIG_FILES $1"
23196     ac_need_defaults=false;;
23197   --header | --heade | --head | --hea )
23198     shift
23199     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23200     ac_need_defaults=false;;
23201
23202   # This is an error.
23203   -*) { { echo "$as_me:23203: error: unrecognized option: $1
23204 Try \`$0 --help' for more information." >&5
23205 echo "$as_me: error: unrecognized option: $1
23206 Try \`$0 --help' for more information." >&2;}
23207    { (exit 1); exit 1; }; } ;;
23208
23209   *) ac_config_targets="$ac_config_targets $1" ;;
23210
23211   esac
23212   shift
23213 done
23214
23215 exec 5>>config.log
23216 cat >&5 << _ACEOF
23217
23218 ## ----------------------- ##
23219 ## Running config.status.  ##
23220 ## ----------------------- ##
23221
23222 This file was extended by $as_me 2.52.20150926, executed with
23223   CONFIG_FILES    = $CONFIG_FILES
23224   CONFIG_HEADERS  = $CONFIG_HEADERS
23225   CONFIG_LINKS    = $CONFIG_LINKS
23226   CONFIG_COMMANDS = $CONFIG_COMMANDS
23227   > $ac_cs_invocation
23228 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23229
23230 _ACEOF
23231 EOF
23232
23233 cat >>$CONFIG_STATUS <<EOF
23234 #
23235 # INIT-COMMANDS section.
23236 #
23237
23238 ### Special initialization commands, used to pass information from the
23239 ### configuration-run into config.status
23240
23241 AWK="$AWK"
23242 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23243 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23244 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23245 ECHO_LD="$ECHO_LD"
23246 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23247 LDCONFIG="$LDCONFIG"
23248 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23249 LIB_NAME="$LIB_NAME"
23250 LIB_PREFIX="$LIB_PREFIX"
23251 LIB_SUBSETS="$LIB_SUBSETS"
23252 LIB_SUFFIX="$LIB_SUFFIX"
23253 LIB_TRACING="$LIB_TRACING"
23254 LN_S="$LN_S"
23255 MAKE_TERMINFO="$MAKE_TERMINFO"
23256 NCURSES_MAJOR="$NCURSES_MAJOR"
23257 NCURSES_MINOR="$NCURSES_MINOR"
23258 NCURSES_OSPEED="$NCURSES_OSPEED"
23259 NCURSES_PATCH="$NCURSES_PATCH"
23260 SRC_SUBDIRS="$SRC_SUBDIRS"
23261 TERMINFO="$TERMINFO"
23262 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23263 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23264 TICS_NAME="$TICS_NAME"
23265 TICS_SUFFIX="$TICS_SUFFIX"
23266 TIC_PATH="$TIC_PATH"
23267 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23268 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23269 TINFO_NAME="$TINFO_NAME"
23270 TINFO_SUFFIX="$TINFO_SUFFIX"
23271 UNALTERED_SYMS="$UNALTERED_SYMS"
23272 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23273 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23274 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23275 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23276 WILDCARD_SYMS="$WILDCARD_SYMS"
23277 WITH_CURSES_H="$with_curses_h"
23278 WITH_ECHO="${enable_echo:=yes}"
23279 WITH_OVERWRITE="$with_overwrite"
23280 cf_LIST_MODELS="$cf_list_models"
23281 cf_cv_abi_version="$cf_cv_abi_version"
23282 cf_cv_do_relink="$cf_cv_do_relink"
23283 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23284 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23285 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23286 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23287 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23288 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23289 cf_cv_rel_version="$cf_cv_rel_version"
23290 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23291 cf_cv_shared_soname='$cf_cv_shared_soname'
23292 cf_cv_shlib_version="$cf_cv_shlib_version"
23293 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23294 cf_cv_system_name="$cf_cv_system_name"
23295 cf_cv_term_driver="$with_term_driver"
23296 cf_with_ada="$cf_with_ada"
23297 cf_with_cxx_binding="$cf_with_cxx_binding"
23298 cf_with_db_install="$cf_with_db_install"
23299 cf_with_manpages="$cf_with_manpages"
23300 cf_with_tests="$cf_with_tests"
23301 host="$host"
23302 target="$target"
23303 with_shared_cxx="$with_shared_cxx"
23304
23305 EOF
23306
23307 cat >>$CONFIG_STATUS <<\EOF
23308 for ac_config_target in $ac_config_targets
23309 do
23310   case "$ac_config_target" in
23311   # Handling of arguments.
23312   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23313   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23314   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23315   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23316   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23317   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23318   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23319   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23320   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23321   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23322   *) { { echo "$as_me:23322: error: invalid argument: $ac_config_target" >&5
23323 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23324    { (exit 1); exit 1; }; };;
23325   esac
23326 done
23327
23328 # If the user did not use the arguments to specify the items to instantiate,
23329 # then the envvar interface is used.  Set only those that are not.
23330 # We use the long form for the default assignment because of an extremely
23331 # bizarre bug on SunOS 4.1.3.
23332 if $ac_need_defaults; then
23333   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23334   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23335   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23336 fi
23337
23338 # Create a temporary directory, and hook for its removal unless debugging.
23339 $debug ||
23340 {
23341   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23342   trap '{ (exit 1); exit 1; }' 1 2 13 15
23343 }
23344
23345 # Create a (secure) tmp directory for tmp files.
23346 : ${TMPDIR=/tmp}
23347 {
23348   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23349   test -n "$tmp" && test -d "$tmp"
23350 }  ||
23351 {
23352   tmp=$TMPDIR/cs$$-$RANDOM
23353   (umask 077 && mkdir $tmp)
23354 } ||
23355 {
23356    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23357    { (exit 1); exit 1; }
23358 }
23359
23360 EOF
23361
23362 cat >>$CONFIG_STATUS <<EOF
23363
23364 #
23365 # CONFIG_FILES section.
23366 #
23367
23368 # No need to generate the scripts if there are no CONFIG_FILES.
23369 # This happens for instance when ./config.status config.h
23370 if test -n "\$CONFIG_FILES"; then
23371   # Protect against being on the right side of a sed subst in config.status.
23372   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23373    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23374 s,@SHELL@,$SHELL,;t t
23375 s,@exec_prefix@,$exec_prefix,;t t
23376 s,@prefix@,$prefix,;t t
23377 s,@program_transform_name@,$program_transform_name,;t t
23378 s,@bindir@,$bindir,;t t
23379 s,@sbindir@,$sbindir,;t t
23380 s,@libexecdir@,$libexecdir,;t t
23381 s,@datarootdir@,$datarootdir,;t t
23382 s,@datadir@,$datadir,;t t
23383 s,@sysconfdir@,$sysconfdir,;t t
23384 s,@sharedstatedir@,$sharedstatedir,;t t
23385 s,@localstatedir@,$localstatedir,;t t
23386 s,@libdir@,$libdir,;t t
23387 s,@includedir@,$includedir,;t t
23388 s,@oldincludedir@,$oldincludedir,;t t
23389 s,@infodir@,$infodir,;t t
23390 s,@mandir@,$mandir,;t t
23391 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23392 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23393 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23394 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23395 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23396 s,@build_alias@,$build_alias,;t t
23397 s,@host_alias@,$host_alias,;t t
23398 s,@target_alias@,$target_alias,;t t
23399 s,@ECHO_C@,$ECHO_C,;t t
23400 s,@ECHO_N@,$ECHO_N,;t t
23401 s,@ECHO_T@,$ECHO_T,;t t
23402 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23403 s,@DEFS@,$DEFS,;t t
23404 s,@LIBS@,$LIBS,;t t
23405 s,@top_builddir@,$top_builddir,;t t
23406 s,@EGREP@,$EGREP,;t t
23407 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23408 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23409 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23410 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23411 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23412 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23413 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23414 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23415 s,@VERSION@,$VERSION,;t t
23416 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23417 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23418 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23419 s,@PACKAGE@,$PACKAGE,;t t
23420 s,@build@,$build,;t t
23421 s,@build_cpu@,$build_cpu,;t t
23422 s,@build_vendor@,$build_vendor,;t t
23423 s,@build_os@,$build_os,;t t
23424 s,@host@,$host,;t t
23425 s,@host_cpu@,$host_cpu,;t t
23426 s,@host_vendor@,$host_vendor,;t t
23427 s,@host_os@,$host_os,;t t
23428 s,@target@,$target,;t t
23429 s,@target_cpu@,$target_cpu,;t t
23430 s,@target_vendor@,$target_vendor,;t t
23431 s,@target_os@,$target_os,;t t
23432 s,@CC@,$CC,;t t
23433 s,@CFLAGS@,$CFLAGS,;t t
23434 s,@LDFLAGS@,$LDFLAGS,;t t
23435 s,@CPPFLAGS@,$CPPFLAGS,;t t
23436 s,@ac_ct_CC@,$ac_ct_CC,;t t
23437 s,@EXEEXT@,$EXEEXT,;t t
23438 s,@OBJEXT@,$OBJEXT,;t t
23439 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23440 s,@CPP@,$CPP,;t t
23441 s,@LDCONFIG@,$LDCONFIG,;t t
23442 s,@CXX@,$CXX,;t t
23443 s,@CXXFLAGS@,$CXXFLAGS,;t t
23444 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23445 s,@AWK@,$AWK,;t t
23446 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23447 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23448 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23449 s,@LINT@,$LINT,;t t
23450 s,@LINT_OPTS@,$LINT_OPTS,;t t
23451 s,@LN_S@,$LN_S,;t t
23452 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23453 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23454 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23455 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23456 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23457 s,@SET_MAKE@,$SET_MAKE,;t t
23458 s,@CTAGS@,$CTAGS,;t t
23459 s,@ETAGS@,$ETAGS,;t t
23460 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23461 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23462 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23463 s,@RANLIB@,$RANLIB,;t t
23464 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23465 s,@LD@,$LD,;t t
23466 s,@ac_ct_LD@,$ac_ct_LD,;t t
23467 s,@AR@,$AR,;t t
23468 s,@ac_ct_AR@,$ac_ct_AR,;t t
23469 s,@NM@,$NM,;t t
23470 s,@ac_ct_NM@,$ac_ct_NM,;t t
23471 s,@ARFLAGS@,$ARFLAGS,;t t
23472 s,@DESTDIR@,$DESTDIR,;t t
23473 s,@BUILD_CC@,$BUILD_CC,;t t
23474 s,@BUILD_CPP@,$BUILD_CPP,;t t
23475 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23476 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23477 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23478 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23479 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23480 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23481 s,@cf_list_models@,$cf_list_models,;t t
23482 s,@ABI_VERSION@,$ABI_VERSION,;t t
23483 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23484 s,@LIBTOOL@,$LIBTOOL,;t t
23485 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23486 s,@LT_UNDEF@,$LT_UNDEF,;t t
23487 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23488 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23489 s,@LIB_CREATE@,$LIB_CREATE,;t t
23490 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23491 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23492 s,@LIB_PREP@,$LIB_PREP,;t t
23493 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23494 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23495 s,@LIB_LINK@,$LIB_LINK,;t t
23496 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23497 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23498 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23499 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23500 s,@TICS_NAME@,$TICS_NAME,;t t
23501 s,@TINFO_NAME@,$TINFO_NAME,;t t
23502 s,@LIB_NAME@,$LIB_NAME,;t t
23503 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23504 s,@CC_G_OPT@,$CC_G_OPT,;t t
23505 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23506 s,@LD_MODEL@,$LD_MODEL,;t t
23507 s,@shlibdir@,$shlibdir,;t t
23508 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23509 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23510 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23511 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23512 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23513 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23514 s,@LINK_PROGS@,$LINK_PROGS,;t t
23515 s,@LINK_TESTS@,$LINK_TESTS,;t t
23516 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23517 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23518 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23519 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23520 s,@RPATH_LIST@,$RPATH_LIST,;t t
23521 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23522 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23523 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23524 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23525 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23526 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23527 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23528 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23529 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23530 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23531 s,@XTERM_KBS@,$XTERM_KBS,;t t
23532 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23533 s,@TERMINFO@,$TERMINFO,;t t
23534 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23535 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23536 s,@TERMPATH@,$TERMPATH,;t t
23537 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23538 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23539 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23540 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23541 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23542 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23543 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23544 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23545 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23546 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23547 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23548 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23549 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23550 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
23551 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23552 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23553 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23554 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23555 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23556 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23557 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23558 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23559 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23560 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23561 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23562 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23563 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23564 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23565 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23566 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23567 s,@PTHREAD@,$PTHREAD,;t t
23568 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23569 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23570 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23571 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23572 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23573 s,@ECHO_LT@,$ECHO_LT,;t t
23574 s,@ECHO_LD@,$ECHO_LD,;t t
23575 s,@RULE_CC@,$RULE_CC,;t t
23576 s,@SHOW_CC@,$SHOW_CC,;t t
23577 s,@ECHO_CC@,$ECHO_CC,;t t
23578 s,@ECHO_LINK@,$ECHO_LINK,;t t
23579 s,@ADAFLAGS@,$ADAFLAGS,;t t
23580 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23581 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23582 s,@ADA_TRACE@,$ADA_TRACE,;t t
23583 s,@MATH_LIB@,$MATH_LIB,;t t
23584 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23585 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23586 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23587 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23588 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23589 s,@TEST_LIBS@,$TEST_LIBS,;t t
23590 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23591 s,@CXXCPP@,$CXXCPP,;t t
23592 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23593 s,@CXX_AR@,$CXX_AR,;t t
23594 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23595 s,@CXXLIBS@,$CXXLIBS,;t t
23596 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23597 s,@gnat_exists@,$gnat_exists,;t t
23598 s,@M4_exists@,$M4_exists,;t t
23599 s,@cf_ada_make@,$cf_ada_make,;t t
23600 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23601 s,@cf_compile_generics@,$cf_compile_generics,;t t
23602 s,@cf_generic_objects@,$cf_generic_objects,;t t
23603 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23604 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23605 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23606 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23607 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23608 s,@cf_ada_package@,$cf_ada_package,;t t
23609 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23610 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23611 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23612 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23613 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23614 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23615 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23616 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23617 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23618 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23619 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23620 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23621 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23622 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23623 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23624 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23625 s,@TICS_LIBS@,$TICS_LIBS,;t t
23626 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23627 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23628 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23629 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23630 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23631 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23632 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23633 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23634 s,@includesubdir@,$includesubdir,;t t
23635 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23636 s,@TICS_LIST@,$TICS_LIST,;t t
23637 s,@TINFO_LIST@,$TINFO_LIST,;t t
23638 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23639 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23640 s,@TEST_ARGS@,$TEST_ARGS,;t t
23641 s,@TEST_DEPS@,$TEST_DEPS,;t t
23642 s,@TEST_ARG2@,$TEST_ARG2,;t t
23643 s,@TEST_DEP2@,$TEST_DEP2,;t t
23644 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23645 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23646 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23647 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23648 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23649 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23650 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23651 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23652 s,@cross_compiling@,$cross_compiling,;t t
23653 s,@TIC_PATH@,$TIC_PATH,;t t
23654 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23655 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23656 s,@PANEL_NAME@,$PANEL_NAME,;t t
23657 s,@MENU_NAME@,$MENU_NAME,;t t
23658 s,@FORM_NAME@,$FORM_NAME,;t t
23659 s,@CXX_NAME@,$CXX_NAME,;t t
23660 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23661 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23662 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23663 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23664 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23665 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23666 CEOF
23667
23668 EOF
23669
23670   cat >>$CONFIG_STATUS <<\EOF
23671   # Split the substitutions into bite-sized pieces for seds with
23672   # small command number limits, like on Digital OSF/1 and HP-UX.
23673   ac_max_sed_lines=48
23674   ac_sed_frag=1 # Number of current file.
23675   ac_beg=1 # First line for current file.
23676   ac_end=$ac_max_sed_lines # Line after last line for current file.
23677   ac_more_lines=:
23678   ac_sed_cmds=
23679   while $ac_more_lines; do
23680     if test $ac_beg -gt 1; then
23681       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23682     else
23683       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23684     fi
23685     if test ! -s $tmp/subs.frag; then
23686       ac_more_lines=false
23687     else
23688       # The purpose of the label and of the branching condition is to
23689       # speed up the sed processing (if there are no `@' at all, there
23690       # is no need to browse any of the substitutions).
23691       # These are the two extra sed commands mentioned above.
23692       (echo ':t
23693   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23694       # It is possible to make a multiline substitution using escaped newlines.
23695       # Ensure that we do not split the substitution between script fragments.
23696       ac_BEG=$ac_end
23697       ac_END=`expr $ac_end + $ac_max_sed_lines`
23698       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23699       if test -s $tmp/subs.next; then
23700         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23701         if test ! -s $tmp/subs.edit; then
23702           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23703           if test ! -s $tmp/subs.edit; then
23704             if test $ac_beg -gt 1; then
23705               ac_end=`expr $ac_end - 1`
23706               continue
23707             fi
23708           fi
23709         fi
23710       fi
23711
23712       if test -z "$ac_sed_cmds"; then
23713         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23714       else
23715         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23716       fi
23717       ac_sed_frag=`expr $ac_sed_frag + 1`
23718       ac_beg=$ac_end
23719       ac_end=`expr $ac_end + $ac_max_sed_lines`
23720     fi
23721   done
23722   if test -z "$ac_sed_cmds"; then
23723     ac_sed_cmds=cat
23724   fi
23725 fi # test -n "$CONFIG_FILES"
23726
23727 EOF
23728 cat >>$CONFIG_STATUS <<\EOF
23729 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23730   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23731   case $ac_file in
23732   - | *:- | *:-:* ) # input from stdin
23733         cat >$tmp/stdin
23734         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23735         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23736   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23737         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23738   * )   ac_file_in=$ac_file.in ;;
23739   esac
23740
23741   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23742   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23743          X"$ac_file" : 'X\(//\)[^/]' \| \
23744          X"$ac_file" : 'X\(//\)$' \| \
23745          X"$ac_file" : 'X\(/\)' \| \
23746          .     : '\(.\)' 2>/dev/null ||
23747 echo X"$ac_file" |
23748     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23749           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23750           /^X\(\/\/\)$/{ s//\1/; q; }
23751           /^X\(\/\).*/{ s//\1/; q; }
23752           s/.*/./; q'`
23753   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23754     { case "$ac_dir" in
23755   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23756   *)                      as_incr_dir=.;;
23757 esac
23758 as_dummy="$ac_dir"
23759 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23760   case $as_mkdir_dir in
23761     # Skip DOS drivespec
23762     ?:) as_incr_dir=$as_mkdir_dir ;;
23763     *)
23764       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23765       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23766     ;;
23767   esac
23768 done; }
23769
23770     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23771     # A "../" for each directory in $ac_dir_suffix.
23772     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23773   else
23774     ac_dir_suffix= ac_dots=
23775   fi
23776
23777   case $srcdir in
23778   .)  ac_srcdir=.
23779       if test -z "$ac_dots"; then
23780          ac_top_srcdir=.
23781       else
23782          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23783       fi ;;
23784   [\\/]* | ?:[\\/]* )
23785       ac_srcdir=$srcdir$ac_dir_suffix;
23786       ac_top_srcdir=$srcdir ;;
23787   *) # Relative path.
23788     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23789     ac_top_srcdir=$ac_dots$srcdir ;;
23790   esac
23791
23792   case $INSTALL in
23793   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23794   *) ac_INSTALL=$ac_dots$INSTALL ;;
23795   esac
23796
23797   if test x"$ac_file" != x-; then
23798     { echo "$as_me:23798: creating $ac_file" >&5
23799 echo "$as_me: creating $ac_file" >&6;}
23800     rm -f "$ac_file"
23801   fi
23802   # Let's still pretend it is `configure' which instantiates (i.e., don't
23803   # use $as_me), people would be surprised to read:
23804   #    /* config.h.  Generated automatically by config.status.  */
23805   configure_input="Generated automatically from `echo $ac_file_in |
23806                                                  sed 's,.*/,,'` by configure."
23807
23808   # First look for the input files in the build tree, otherwise in the
23809   # src tree.
23810   ac_file_inputs=`IFS=:
23811     for f in $ac_file_in; do
23812       case $f in
23813       -) echo $tmp/stdin ;;
23814       [\\/$]*)
23815          # Absolute (can't be DOS-style, as IFS=:)
23816          test -f "$f" || { { echo "$as_me:23816: error: cannot find input file: $f" >&5
23817 echo "$as_me: error: cannot find input file: $f" >&2;}
23818    { (exit 1); exit 1; }; }
23819          echo $f;;
23820       *) # Relative
23821          if test -f "$f"; then
23822            # Build tree
23823            echo $f
23824          elif test -f "$srcdir/$f"; then
23825            # Source tree
23826            echo $srcdir/$f
23827          else
23828            # /dev/null tree
23829            { { echo "$as_me:23829: error: cannot find input file: $f" >&5
23830 echo "$as_me: error: cannot find input file: $f" >&2;}
23831    { (exit 1); exit 1; }; }
23832          fi;;
23833       esac
23834     done` || { (exit 1); exit 1; }
23835 EOF
23836 cat >>$CONFIG_STATUS <<\EOF
23837   ac_warn_datarootdir=no
23838   if test x"$ac_file" != x-; then
23839     for ac_item in $ac_file_inputs
23840     do
23841       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23842       if test -n "$ac_seen"; then
23843         ac_used=`grep '@datarootdir@' $ac_item`
23844         if test -z "$ac_used"; then
23845           { echo "$as_me:23845: WARNING: datarootdir was used implicitly but not set:
23846 $ac_seen" >&5
23847 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23848 $ac_seen" >&2;}
23849           ac_warn_datarootdir=yes
23850         fi
23851       fi
23852       ac_seen=`grep '${datarootdir}' $ac_item`
23853       if test -n "$ac_seen"; then
23854         { echo "$as_me:23854: WARNING: datarootdir was used explicitly but not set:
23855 $ac_seen" >&5
23856 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23857 $ac_seen" >&2;}
23858         ac_warn_datarootdir=yes
23859       fi
23860     done
23861   fi
23862
23863 if test "x$ac_warn_datarootdir" = xyes; then
23864   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23865 fi
23866
23867 EOF
23868 cat >>$CONFIG_STATUS <<EOF
23869   sed "$ac_vpsub
23870 $extrasub
23871 EOF
23872 cat >>$CONFIG_STATUS <<\EOF
23873 :t
23874 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23875 s,@configure_input@,$configure_input,;t t
23876 s,@srcdir@,$ac_srcdir,;t t
23877 s,@top_srcdir@,$ac_top_srcdir,;t t
23878 s,@INSTALL@,$ac_INSTALL,;t t
23879 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23880   rm -f $tmp/stdin
23881   if test x"$ac_file" != x-; then
23882     cp $tmp/out $ac_file
23883
23884     for ac_name in prefix exec_prefix datarootdir
23885     do
23886         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23887         if test -n "$ac_seen"; then
23888             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23889             if test -z "$ac_init"; then
23890               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23891               { echo "$as_me:23891: WARNING: Variable $ac_name is used but was not set:
23892 $ac_seen" >&5
23893 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23894 $ac_seen" >&2;}
23895             fi
23896         fi
23897     done
23898     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23899     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23900     if test -s $tmp/out; then
23901       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23902       { echo "$as_me:23902: WARNING: Some variables may not be substituted:
23903 $ac_seen" >&5
23904 echo "$as_me: WARNING: Some variables may not be substituted:
23905 $ac_seen" >&2;}
23906     fi
23907   else
23908     cat $tmp/out
23909   fi
23910   rm -f $tmp/out
23911
23912 done
23913 EOF
23914 cat >>$CONFIG_STATUS <<\EOF
23915
23916 #
23917 # CONFIG_HEADER section.
23918 #
23919
23920 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23921 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23922 #
23923 # ac_d sets the value in "#define NAME VALUE" lines.
23924 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23925 ac_dB='[        ].*$,\1#\2'
23926 ac_dC=' '
23927 ac_dD=',;t'
23928 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23929 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23930 ac_iB='\([      ]\),\1#\2define\3'
23931 ac_iC=' '
23932 ac_iD='\4,;t'
23933 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23934 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23935 ac_uB='$,\1#\2define\3'
23936 ac_uC=' '
23937 ac_uD=',;t'
23938
23939 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23940   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23941   case $ac_file in
23942   - | *:- | *:-:* ) # input from stdin
23943         cat >$tmp/stdin
23944         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23945         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23946   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23947         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23948   * )   ac_file_in=$ac_file.in ;;
23949   esac
23950
23951   test x"$ac_file" != x- && { echo "$as_me:23951: creating $ac_file" >&5
23952 echo "$as_me: creating $ac_file" >&6;}
23953
23954   # First look for the input files in the build tree, otherwise in the
23955   # src tree.
23956   ac_file_inputs=`IFS=:
23957     for f in $ac_file_in; do
23958       case $f in
23959       -) echo $tmp/stdin ;;
23960       [\\/$]*)
23961          # Absolute (can't be DOS-style, as IFS=:)
23962          test -f "$f" || { { echo "$as_me:23962: error: cannot find input file: $f" >&5
23963 echo "$as_me: error: cannot find input file: $f" >&2;}
23964    { (exit 1); exit 1; }; }
23965          echo $f;;
23966       *) # Relative
23967          if test -f "$f"; then
23968            # Build tree
23969            echo $f
23970          elif test -f "$srcdir/$f"; then
23971            # Source tree
23972            echo $srcdir/$f
23973          else
23974            # /dev/null tree
23975            { { echo "$as_me:23975: error: cannot find input file: $f" >&5
23976 echo "$as_me: error: cannot find input file: $f" >&2;}
23977    { (exit 1); exit 1; }; }
23978          fi;;
23979       esac
23980     done` || { (exit 1); exit 1; }
23981   # Remove the trailing spaces.
23982   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23983
23984 EOF
23985
23986 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23987 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23988 # be either 'cat' or 'sort'.
23989 cat confdefs.h | uniq >conftest.vals
23990
23991 # Break up conftest.vals because some shells have a limit on
23992 # the size of here documents, and old seds have small limits too.
23993
23994 rm -f conftest.tail
23995 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23996 while grep . conftest.vals >/dev/null
23997 do
23998   # Write chunks of a limited-size here document to conftest.frag.
23999   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24000   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24001   echo 'CEOF' >> $CONFIG_STATUS
24002   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24003   rm -f conftest.vals
24004   mv conftest.tail conftest.vals
24005 done
24006 rm -f conftest.vals
24007
24008 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24009 # marker @DEFS@.
24010 echo '  cat >> conftest.edit <<CEOF
24011 /@DEFS@/r conftest.frag
24012 /@DEFS@/d
24013 CEOF
24014 sed -f conftest.edit $tmp/in > $tmp/out
24015 rm -f $tmp/in
24016 mv $tmp/out $tmp/in
24017 rm -f conftest.edit conftest.frag
24018 ' >> $CONFIG_STATUS
24019
24020 cat >>$CONFIG_STATUS <<\EOF
24021   # Let's still pretend it is `configure' which instantiates (i.e., don't
24022   # use $as_me), people would be surprised to read:
24023   #    /* config.h.  Generated automatically by config.status.  */
24024   if test x"$ac_file" = x-; then
24025     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24026   else
24027     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24028   fi
24029   cat $tmp/in >>$tmp/config.h
24030   rm -f $tmp/in
24031   if test x"$ac_file" != x-; then
24032     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24033       { echo "$as_me:24033: $ac_file is unchanged" >&5
24034 echo "$as_me: $ac_file is unchanged" >&6;}
24035     else
24036       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24037          X"$ac_file" : 'X\(//\)[^/]' \| \
24038          X"$ac_file" : 'X\(//\)$' \| \
24039          X"$ac_file" : 'X\(/\)' \| \
24040          .     : '\(.\)' 2>/dev/null ||
24041 echo X"$ac_file" |
24042     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24043           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24044           /^X\(\/\/\)$/{ s//\1/; q; }
24045           /^X\(\/\).*/{ s//\1/; q; }
24046           s/.*/./; q'`
24047       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24048         { case "$ac_dir" in
24049   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24050   *)                      as_incr_dir=.;;
24051 esac
24052 as_dummy="$ac_dir"
24053 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24054   case $as_mkdir_dir in
24055     # Skip DOS drivespec
24056     ?:) as_incr_dir=$as_mkdir_dir ;;
24057     *)
24058       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24059       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24060     ;;
24061   esac
24062 done; }
24063
24064       fi
24065       rm -f $ac_file
24066       mv $tmp/config.h $ac_file
24067     fi
24068   else
24069     cat $tmp/config.h
24070     rm -f $tmp/config.h
24071   fi
24072 done
24073 EOF
24074 cat >>$CONFIG_STATUS <<\EOF
24075 #
24076 # CONFIG_COMMANDS section.
24077 #
24078 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24079   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24080   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24081
24082   case $ac_dest in
24083     default )
24084 if test "x$cf_with_tests" != xno ; then
24085
24086 for cf_dir in test
24087 do
24088         if test ! -d $srcdir/$cf_dir; then
24089                 continue
24090         elif test -f $srcdir/$cf_dir/programs; then
24091                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24092         fi
24093 done
24094
24095 fi
24096
24097 cf_prefix=$LIB_PREFIX
24098
24099 case $cf_cv_shlib_version in
24100 (cygdll|msysdll|mingw)
24101         TINFO_NAME=$TINFO_ARG_SUFFIX
24102         TINFO_SUFFIX=.dll
24103         ;;
24104 esac
24105
24106 if test -n "$TINFO_SUFFIX" ; then
24107         case $TINFO_SUFFIX in
24108         (tw*)
24109                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24110                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24111                 ;;
24112         (t*)
24113                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24114                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24115                 ;;
24116         (w*)
24117                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24118                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24119                 ;;
24120         esac
24121 fi
24122
24123 for cf_dir in $SRC_SUBDIRS
24124 do
24125         if test ! -d $srcdir/$cf_dir ; then
24126                 continue
24127         elif test -f $srcdir/$cf_dir/modules; then
24128
24129                 SHARED_LIB=
24130                 Libs_To_Make=
24131                 cf_awk_program=
24132                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24133                 then
24134                         cf_awk_program="$cf_awk_program\
24135 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24136 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24137 "
24138                 fi
24139
24140                 if test "x$WILDCARD_SYMS" = xno
24141                 then
24142                         cf_awk_program="$cf_awk_program\
24143 /[      ]_\\*;/ { skip=1; next; }\
24144 "
24145                 fi
24146
24147                 if test "x$cf_awk_program" != "x"
24148                 then
24149                         cat >>$cf_dir/Makefile <<CF_EOF
24150
24151 # Generated by CF_LIB_RULES
24152 resulting.map: $UNALTERED_SYMS
24153         $AWK 'BEGIN { skip = 1; last=""; } \
24154 $cf_awk_program \
24155 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24156  skip = 0; last = \$\$0; } \
24157 END { print last; }' < $UNALTERED_SYMS >\$@
24158
24159 distclean::
24160         rm -f resulting.map
24161 CF_EOF
24162                 fi
24163
24164                 for cf_item in $cf_LIST_MODELS
24165                 do
24166
24167         case X$cf_item in
24168         (Xlibtool)
24169                 cf_suffix='.la'
24170                 cf_depsuf=$cf_suffix
24171                 ;;
24172         (Xdebug)
24173                 cf_suffix='_g.a'
24174                 cf_depsuf=$cf_suffix
24175                 ;;
24176         (Xprofile)
24177                 cf_suffix='_p.a'
24178                 cf_depsuf=$cf_suffix
24179                 ;;
24180         (Xshared)
24181                 case $cf_cv_system_name in
24182                 (aix[5-7]*)
24183                         cf_suffix='.so'
24184                         cf_depsuf=$cf_suffix
24185                         ;;
24186                 (cygwin*|msys*|mingw*)
24187                         cf_suffix='.dll'
24188                         cf_depsuf='.dll.a'
24189                         ;;
24190                 (darwin*)
24191                         cf_suffix='.dylib'
24192                         cf_depsuf=$cf_suffix
24193                         ;;
24194                 (hpux*)
24195                         case $target in
24196                         (ia64*)
24197                                 cf_suffix='.so'
24198                                 cf_depsuf=$cf_suffix
24199                                 ;;
24200                         (*)
24201                                 cf_suffix='.sl'
24202                                 cf_depsuf=$cf_suffix
24203                                 ;;
24204                         esac
24205                         ;;
24206                 (*)
24207                         cf_suffix='.so'
24208                         cf_depsuf=$cf_suffix
24209                         ;;
24210                 esac
24211                 ;;
24212         (*)
24213                 cf_suffix='.a'
24214                 cf_depsuf=$cf_suffix
24215                 ;;
24216         esac
24217         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24218         then
24219                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24220                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24221         fi
24222
24223                         cf_libname=$cf_dir
24224                         test "$cf_dir" = c++ && cf_libname=ncurses++
24225                         if test $cf_item = shared ; then
24226                                 if test -n "${LIB_SUFFIX}"
24227                                 then
24228                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24229                                 else
24230                                         cf_shared_suffix="$cf_suffix"
24231                                 fi
24232                                 if test "$cf_cv_do_symlinks" = yes ; then
24233                                         cf_version_name=
24234
24235                                         case "$cf_cv_shlib_version" in
24236                                         (rel)
24237                                                 cf_version_name=REL_VERSION
24238                                                 ;;
24239                                         (abi)
24240                                                 cf_version_name=ABI_VERSION
24241                                                 ;;
24242                                         esac
24243
24244                                         if test -n "$cf_version_name"
24245                                         then
24246                                                 case "$cf_cv_system_name" in
24247                                                 (darwin*)
24248                                                         # "w", etc?
24249                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24250                                                         ;;
24251                                                 (*)
24252                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24253                                                         ;;
24254                                                 esac
24255                                         fi
24256                                         if test -n "${USE_LIB_SUFFIX}"
24257                                         then
24258                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24259                                         else
24260                                                 cf_shared_suffix="$cf_suffix"
24261                                         fi
24262                                 fi
24263                                 # cygwin needs import library, and has unique naming convention
24264                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24265                                 # use 'cyg' prefix for shared lib.
24266                                 case $cf_cv_shlib_version in
24267                                 (cygdll)
24268                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24269                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24270                                         ;;
24271                                 (msysdll)
24272                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24273                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24274                                         ;;
24275                                 (mingw)
24276                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24277                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24278                                         ;;
24279                                 (*)
24280                                         cf_add_lib=
24281                                         ;;
24282                                 esac
24283                                 if test -n "$cf_add_lib"
24284                                 then
24285                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24286                                         continue
24287                                 fi
24288                         fi
24289                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24290                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24291                 done
24292
24293                 if test $cf_dir = ncurses ; then
24294                         cf_subsets="$LIB_SUBSETS"
24295                         cf_r_parts="$cf_subsets"
24296                         cf_liblist="$Libs_To_Make"
24297
24298                         while test -n "$cf_r_parts"
24299                         do
24300                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24301                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24302                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24303                                         cf_add_lib=
24304                                         case $cf_l_parts in
24305                                         (*termlib*)
24306                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24307                                                 ;;
24308                                         (*ticlib*)
24309                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24310                                                 ;;
24311                                         (*)
24312                                                 break
24313                                                 ;;
24314                                         esac
24315                                         if test -n "$cf_add_lib"; then
24316                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24317                                         fi
24318                                 else
24319                                         break
24320                                 fi
24321                         done
24322                 else
24323                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24324                 fi
24325
24326                 if test $cf_dir = c++; then
24327                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24328                                 cf_list=
24329                                 for cf_item in $Libs_To_Make
24330                                 do
24331                                         case $cf_item in
24332                                         (*.a)
24333                                                 ;;
24334                                         (*)
24335                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24336                                                 ;;
24337                                         esac
24338                                         for cf_test in $cf_list
24339                                         do
24340                                                 if test "$cf_test" = "$cf_item"
24341                                                 then
24342                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24343                                                         cf_item=
24344                                                         break
24345                                                 fi
24346                                         done
24347                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24348                                 done
24349                                 Libs_To_Make="$cf_list"
24350                         fi
24351                 fi
24352
24353                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24354                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24355                         $cf_dir/Makefile >$cf_dir/Makefile.out
24356                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24357
24358                 $AWK -f $srcdir/mk-0th.awk \
24359                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24360                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24361
24362                 for cf_subset in $cf_subsets
24363                 do
24364                         cf_subdirs=
24365                         for cf_item in $cf_LIST_MODELS
24366                         do
24367
24368                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24369
24370 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24371
24372                         CXX_MODEL=$cf_ITEM
24373                         if test "$CXX_MODEL" = SHARED; then
24374                                 case $cf_cv_shlib_version in
24375                                 (cygdll|msysdll|mingw)
24376                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24377
24378 echo "${as_me:-configure}:24378: testing overriding CXX_MODEL to SHARED ..." 1>&5
24379
24380                                         with_shared_cxx=yes
24381                                         ;;
24382                                 (*)
24383                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24384                                         ;;
24385                                 esac
24386                         fi
24387
24388         case X$cf_item in
24389         (Xlibtool)
24390                 cf_suffix='.la'
24391                 cf_depsuf=$cf_suffix
24392                 ;;
24393         (Xdebug)
24394                 cf_suffix='_g.a'
24395                 cf_depsuf=$cf_suffix
24396                 ;;
24397         (Xprofile)
24398                 cf_suffix='_p.a'
24399                 cf_depsuf=$cf_suffix
24400                 ;;
24401         (Xshared)
24402                 case $cf_cv_system_name in
24403                 (aix[5-7]*)
24404                         cf_suffix='.so'
24405                         cf_depsuf=$cf_suffix
24406                         ;;
24407                 (cygwin*|msys*|mingw*)
24408                         cf_suffix='.dll'
24409                         cf_depsuf='.dll.a'
24410                         ;;
24411                 (darwin*)
24412                         cf_suffix='.dylib'
24413                         cf_depsuf=$cf_suffix
24414                         ;;
24415                 (hpux*)
24416                         case $target in
24417                         (ia64*)
24418                                 cf_suffix='.so'
24419                                 cf_depsuf=$cf_suffix
24420                                 ;;
24421                         (*)
24422                                 cf_suffix='.sl'
24423                                 cf_depsuf=$cf_suffix
24424                                 ;;
24425                         esac
24426                         ;;
24427                 (*)
24428                         cf_suffix='.so'
24429                         cf_depsuf=$cf_suffix
24430                         ;;
24431                 esac
24432                 ;;
24433         (*)
24434                 cf_suffix='.a'
24435                 cf_depsuf=$cf_suffix
24436                 ;;
24437         esac
24438         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24439         then
24440                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24441                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24442         fi
24443
24444         case $cf_item in
24445         (libtool) cf_subdir='obj_lo'  ;;
24446         (normal)  cf_subdir='objects' ;;
24447         (debug)   cf_subdir='obj_g' ;;
24448         (profile) cf_subdir='obj_p' ;;
24449         (shared)
24450                 case $cf_cv_system_name in
24451                 (cygwin|msys)
24452                         cf_subdir='objects' ;;
24453                 (*)
24454                         cf_subdir='obj_s' ;;
24455                 esac
24456         esac
24457
24458                         # Test for case where we build libtinfo with a different name.
24459                         cf_libname=$cf_dir
24460                         if test $cf_dir = ncurses ; then
24461                                 case $cf_subset in
24462                                 (*base*)
24463                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24464                                         ;;
24465                                 (*termlib*)
24466                                         cf_libname=$TINFO_LIB_SUFFIX
24467                                         ;;
24468                                 (ticlib*)
24469                                         cf_libname=$TICS_LIB_SUFFIX
24470                                         ;;
24471                                 esac
24472                         elif test $cf_dir = c++ ; then
24473                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24474                         else
24475                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24476                         fi
24477                         if test -n "${USE_ARG_SUFFIX}" ; then
24478                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24479                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24480                         fi
24481
24482                         # These dependencies really are for development, not
24483                         # builds, but they are useful in porting, too.
24484                         cf_depend="../include/ncurses_cfg.h"
24485                         if test "$srcdir" = "."; then
24486                                 cf_reldir="."
24487                         else
24488                                 cf_reldir="\${srcdir}"
24489                         fi
24490
24491                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24492                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24493                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24494                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24495                         fi
24496
24497                         cf_dir_suffix=
24498                         old_cf_suffix="$cf_suffix"
24499                         if test "$cf_cv_shlib_version_infix" = yes ; then
24500                         if test -n "$USE_LIB_SUFFIX" ; then
24501                                 case $USE_LIB_SUFFIX in
24502                                 (tw*)
24503                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24504                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24505                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24506                                         ;;
24507                                 (t*)
24508                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24509                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24510                                         cf_dir_suffix=t$EXTRA_SUFFIX
24511                                         ;;
24512                                 (w*)
24513                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24514                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24515                                         cf_dir_suffix=w$EXTRA_SUFFIX
24516                                         ;;
24517                                 (*)
24518                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24519                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24520                                         cf_dir_suffix=$EXTRA_SUFFIX
24521                                         ;;
24522                                 esac
24523                         fi
24524                         fi
24525
24526                         $AWK -f $srcdir/mk-1st.awk \
24527                                 name=${cf_libname}${cf_dir_suffix} \
24528                                 traces=$LIB_TRACING \
24529                                 MODEL=$cf_ITEM \
24530                                 CXX_MODEL=$CXX_MODEL \
24531                                 model=$cf_subdir \
24532                                 prefix=$cf_prefix \
24533                                 suffix=$cf_suffix \
24534                                 subset=$cf_subset \
24535                                 driver=$cf_cv_term_driver \
24536                                 SymLink="$LN_S" \
24537                                 TermlibRoot=$TINFO_NAME \
24538                                 TermlibSuffix=$TINFO_SUFFIX \
24539                                 ShlibVer=$cf_cv_shlib_version \
24540                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24541                                 ReLink=${cf_cv_do_relink:-no} \
24542                                 DoLinks=$cf_cv_do_symlinks \
24543                                 rmSoLocs=$cf_cv_rm_so_locs \
24544                                 ldconfig="$LDCONFIG" \
24545                                 overwrite=$WITH_OVERWRITE \
24546                                 depend="$cf_depend" \
24547                                 host="$host" \
24548                                 libtool_version="$LIBTOOL_VERSION" \
24549                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24550
24551                         cf_suffix="$old_cf_suffix"
24552
24553                         for cf_subdir2 in $cf_subdirs lib
24554                         do
24555                                 test $cf_subdir = $cf_subdir2 && break
24556                         done
24557                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24558                         $AWK -f $srcdir/mk-2nd.awk \
24559                                 name=$cf_dir \
24560                                 traces=$LIB_TRACING \
24561                                 MODEL=$cf_ITEM \
24562                                 model=$cf_subdir \
24563                                 subset=$cf_subset \
24564                                 srcdir=$srcdir \
24565                                 echo=$WITH_ECHO \
24566                                 crenames=$cf_cv_prog_CC_c_o \
24567                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24568                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24569                         cf_subdirs="$cf_subdirs $cf_subdir"
24570                         done
24571                 done
24572         fi
24573
24574         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24575 done
24576
24577 for cf_dir in $SRC_SUBDIRS
24578 do
24579         if test ! -d $srcdir/$cf_dir ; then
24580                 continue
24581         fi
24582
24583         if test -f $cf_dir/Makefile ; then
24584                 case "$cf_dir" in
24585                 (Ada95)
24586                         echo 'libs \' >> Makefile
24587                         echo 'install.libs \' >> Makefile
24588                         echo 'uninstall.libs ::' >> Makefile
24589                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24590                         ;;
24591                 esac
24592         fi
24593
24594         if test -f $srcdir/$cf_dir/modules; then
24595                 echo >> Makefile
24596                 if test -f $srcdir/$cf_dir/headers; then
24597 cat >> Makefile <<CF_EOF
24598 install.includes \\
24599 uninstall.includes \\
24600 CF_EOF
24601                 fi
24602 if test "$cf_dir" != "c++" ; then
24603 echo 'lint \' >> Makefile
24604 fi
24605 cat >> Makefile <<CF_EOF
24606 libs \\
24607 lintlib \\
24608 install.libs \\
24609 uninstall.libs \\
24610 install.$cf_dir \\
24611 uninstall.$cf_dir ::
24612         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24613 CF_EOF
24614         elif test -f $srcdir/$cf_dir/headers; then
24615 cat >> Makefile <<CF_EOF
24616
24617 libs \\
24618 install.libs \\
24619 uninstall.libs \\
24620 install.includes \\
24621 uninstall.includes ::
24622         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24623 CF_EOF
24624 fi
24625 done
24626
24627 if test "x$cf_with_db_install" = xyes; then
24628 cat >> Makefile <<CF_EOF
24629
24630 install.libs uninstall.libs \\
24631 install.data uninstall.data ::
24632 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24633 CF_EOF
24634 else
24635 cat >> Makefile <<CF_EOF
24636
24637 install.libs uninstall.libs ::
24638         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24639 CF_EOF
24640 fi
24641
24642 if test "x$cf_with_manpages" = xyes; then
24643 cat >> Makefile <<CF_EOF
24644
24645 install.man \\
24646 uninstall.man ::
24647         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24648 CF_EOF
24649 fi
24650
24651 cat >> Makefile <<CF_EOF
24652
24653 distclean ::
24654         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24655         rm -f headers.sh headers.sed mk_shared_lib.sh
24656         rm -f edit_man.* man_alias.*
24657         rm -rf \${DIRS_TO_MAKE}
24658 CF_EOF
24659
24660 # Special case: tack's manpage lives in its own directory.
24661 if test "x$cf_with_manpages" = xyes; then
24662 if test -d tack ; then
24663 if test -f $srcdir/$tack.h; then
24664 cat >> Makefile <<CF_EOF
24665
24666 install.man \\
24667 uninstall.man ::
24668         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24669 CF_EOF
24670 fi
24671 fi
24672 fi
24673
24674 rm -f headers.sed headers.sh
24675
24676 echo creating headers.sh
24677 cat >headers.sh <<CF_EOF
24678 #! $SHELL
24679 # This shell script is generated by the 'configure' script.  It is invoked in a
24680 # subdirectory of the build tree.  It generates a sed-script in the parent
24681 # directory that is used to adjust includes for header files that reside in a
24682 # subdirectory of /usr/include, etc.
24683 PRG=""
24684 while test \$# != 3
24685 do
24686 PRG="\$PRG \$1"; shift
24687 done
24688 DST=\$1
24689 REF=\$2
24690 SRC=\$3
24691 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24692 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24693 echo installing \$SRC in \$DST
24694 CF_EOF
24695
24696 if test $WITH_CURSES_H = yes; then
24697         cat >>headers.sh <<CF_EOF
24698 case \$DST in
24699 (/*/include/*)
24700         END=\`basename \$DST\`
24701         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24702         do
24703                 NAME=\`basename \$i\`
24704                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24705         done
24706         ;;
24707 (*)
24708         echo "" >> \$TMPSED
24709         ;;
24710 esac
24711 CF_EOF
24712
24713 else
24714         cat >>headers.sh <<CF_EOF
24715 case \$DST in
24716 (/*/include/*)
24717         END=\`basename \$DST\`
24718         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24719         do
24720                 NAME=\`basename \$i\`
24721                 if test "\$NAME" = "curses.h"
24722                 then
24723                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24724                         NAME=ncurses.h
24725                 fi
24726                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24727         done
24728         ;;
24729 (*)
24730         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24731         ;;
24732 esac
24733 CF_EOF
24734 fi
24735 cat >>headers.sh <<CF_EOF
24736 rm -f \$TMPSRC
24737 sed -f \$TMPSED \$SRC > \$TMPSRC
24738 NAME=\`basename \$SRC\`
24739 CF_EOF
24740 if test $WITH_CURSES_H != yes; then
24741         cat >>headers.sh <<CF_EOF
24742 test "\$NAME" = "curses.h" && NAME=ncurses.h
24743 CF_EOF
24744 fi
24745 cat >>headers.sh <<CF_EOF
24746 # Just in case someone gzip'd manpages, remove the conflicting copy.
24747 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24748
24749 eval \$PRG \$TMPSRC \$DST/\$NAME
24750 rm -f \$TMPSRC \$TMPSED
24751 CF_EOF
24752
24753 chmod 0755 headers.sh
24754
24755 for cf_dir in $SRC_SUBDIRS
24756 do
24757         if test ! -d $srcdir/$cf_dir ; then
24758                 continue
24759         fi
24760
24761         if test -f $srcdir/$cf_dir/headers; then
24762                 $AWK -f $srcdir/mk-hdr.awk \
24763                         subset="$LIB_SUBSETS" \
24764                         compat="$WITH_CURSES_H" \
24765                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24766         fi
24767
24768         if test -f $srcdir/$cf_dir/modules; then
24769                 if test "$cf_dir" != "c++" ; then
24770                         cat >>$cf_dir/Makefile <<"CF_EOF"
24771 depend : ${AUTO_SRC}
24772         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24773
24774 # DO NOT DELETE THIS LINE -- make depend depends on it.
24775 CF_EOF
24776                 fi
24777         fi
24778 done
24779
24780 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24781 if test -z "$USE_OLD_MAKERULES" ; then
24782         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24783 fi
24784 fi
24785  ;;
24786   esac
24787 done
24788 EOF
24789
24790 cat >>$CONFIG_STATUS <<\EOF
24791
24792 { (exit 0); exit 0; }
24793 EOF
24794 chmod +x $CONFIG_STATUS
24795 ac_clean_files=$ac_clean_files_save
24796
24797 # configure is writing to config.log, and then calls config.status.
24798 # config.status does its own redirection, appending to config.log.
24799 # Unfortunately, on DOS this fails, as config.log is still kept open
24800 # by configure, so config.status won't be able to write to it; its
24801 # output is simply discarded.  So we exec the FD to /dev/null,
24802 # effectively closing config.log, so it can be properly (re)opened and
24803 # appended to by config.status.  When coming back to configure, we
24804 # need to make the FD available again.
24805 if test "$no_create" != yes; then
24806   ac_cs_success=:
24807   exec 5>/dev/null
24808   $SHELL $CONFIG_STATUS || ac_cs_success=false
24809   exec 5>>config.log
24810   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24811   # would make configure fail if this is the last instruction.
24812   $ac_cs_success || { (exit 1); exit 1; }
24813 fi
24814 ${MAKE:-make} preinstall