]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
4b30b67e804b54d3b8d5d478f18fce9924d7fff4
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.626 .
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   --with-bool=TYPE        override fallback type of bool variable
777   --with-caps=alt         compile with alternate Caps file
778   --with-chtype=TYPE      override type of chtype
779   --with-ospeed=TYPE      override type of ospeed variable
780   --with-mmask-t=TYPE     override type of mmask_t
781   --with-ccharw-max=XXX   override size CCHARW_MAX
782   --with-tparm-arg=TYPE   override parameter type of tparm
783   --with-rcs-ids          compile-in RCS identifiers
784 Options to Specify How Manpages are Installed:
785   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
786                           optionally formatted/catonly, e.g., gzip,formatted
787   --with-manpage-renames  specify manpage-renaming
788   --with-manpage-aliases  specify manpage-aliases using .so
789   --with-manpage-symlinks specify manpage-aliases using symlinks
790   --with-manpage-tbl      specify manpage processing with tbl
791 Extensions:
792   --disable-ext-funcs     disable function-extensions
793   --enable-sp-funcs       enable SCREEN-extensions
794   --enable-term-driver    enable terminal-driver
795   --enable-const          compile with extra/non-standard const
796   --enable-ext-colors     compile for 256-color support
797   --enable-ext-mouse      compile for extended mouse-encoding
798   --enable-ext-putwin     compile with extended putwin/screendump
799   --enable-no-padding     compile with $NCURSES_NO_PADDING code
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --enable-sigwinch       compile with SIGWINCH handler
802   --enable-tcap-names     compile with user-definable terminal capabilities
803 Development Code:
804   --without-develop       disable development options
805   --enable-hard-tabs      compile with hard-tabs code
806   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
807 Experimental Code:
808   --disable-assumed-color do not assume anything about default-colors
809   --disable-hashmap       compile without hashmap scrolling-optimization
810   --enable-colorfgbg      compile-in experimental $COLORFGBG code
811   --enable-interop        compile-in interop bindings
812   --with-pthread          use POSIX thread library
813   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
814   --enable-weak-symbols   enable weak-symbols for pthreads
815   --enable-reentrant      compile with reentrant code
816   --with-wrap-prefix=XXX  override prefix used for public variables
817   --enable-safe-sprintf   compile with experimental safe-sprintf code
818   --disable-scroll-hints  compile without scroll-hints code
819   --enable-wgetch-events  compile with wgetch-events code
820 Testing/development Options:
821   --disable-echo          do not display "compiling" commands
822   --enable-warnings       build: turn on GCC compiler warnings
823   --enable-string-hacks   work around bogus compiler/loader warnings
824   --enable-assertions     test: turn on generation of assertion code
825   --with-dmalloc          test: use Gray Watson's dmalloc library
826   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
827   --with-valgrind         test: use valgrind
828   --disable-leaks         test: free permanent memory, analyze leaks
829   --enable-expanded       test: generate functions for certain macros
830   --disable-macros        test: use functions rather than macros
831   --with-trace            test: add trace() function to all models of ncurses
832   --disable-gnat-projects test: disable GNAT projects even if usable
833 Ada95 Binding Options:
834   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
835   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
836   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
837   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
838
839 Some influential environment variables:
840   CC          C compiler command
841   CFLAGS      C compiler flags
842   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
843               nonstandard directory <lib dir>
844   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
845               headers in a nonstandard directory <include dir>
846   CPP         C preprocessor
847   CXX         C++ compiler command
848   CXXFLAGS    C++ compiler flags
849   CXXCPP      C++ preprocessor
850
851 Use these variables to override the choices made by `configure' or to help
852 it to find libraries and programs with nonstandard names/locations.
853
854 EOF
855 fi
856
857 if test "$ac_init_help" = "recursive"; then
858   # If there are subdirs, report their specific --help.
859   ac_popdir=`pwd`
860   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861     cd $ac_subdir
862     # A "../" for each directory in /$ac_subdir.
863     ac_dots=`echo $ac_subdir |
864              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
865
866     case $srcdir in
867     .) # No --srcdir option.  We are building in place.
868       ac_sub_srcdir=$srcdir ;;
869     [\\/]* | ?:[\\/]* ) # Absolute path.
870       ac_sub_srcdir=$srcdir/$ac_subdir ;;
871     *) # Relative path.
872       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873     esac
874
875     # Check for guested configure; otherwise get Cygnus style configure.
876     if test -f $ac_sub_srcdir/configure.gnu; then
877       echo
878       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
879     elif test -f $ac_sub_srcdir/configure; then
880       echo
881       $SHELL $ac_sub_srcdir/configure  --help=recursive
882     elif test -f $ac_sub_srcdir/configure.ac ||
883            test -f $ac_sub_srcdir/configure.in; then
884       echo
885       $ac_configure --help
886     else
887       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
888     fi
889     cd $ac_popdir
890   done
891 fi
892
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895   cat <<\EOF
896
897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898 Free Software Foundation, Inc.
899 This configure script is free software; the Free Software Foundation
900 gives unlimited permission to copy, distribute and modify it.
901 EOF
902   exit 0
903 fi
904 exec 5>config.log
905 cat >&5 <<EOF
906 This file contains any messages produced by compilers while
907 running configure, to aid debugging if configure makes a mistake.
908
909 It was created by $as_me, which was
910 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
911
912   $ $0 $@
913
914 EOF
915 {
916 cat <<_ASUNAME
917 ## ---------- ##
918 ## Platform.  ##
919 ## ---------- ##
920
921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
926
927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
928 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
929
930 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
931 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
933 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
934 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
935 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
936 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
937
938 PATH = $PATH
939
940 _ASUNAME
941 } >&5
942
943 cat >&5 <<EOF
944 ## ------------ ##
945 ## Core tests.  ##
946 ## ------------ ##
947
948 EOF
949
950 # Keep a trace of the command line.
951 # Strip out --no-create and --no-recursion so they do not pile up.
952 # Also quote any args containing shell meta-characters.
953 ac_configure_args=
954 ac_sep=
955 for ac_arg
956 do
957   case $ac_arg in
958   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959   | --no-cr | --no-c) ;;
960   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
962   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
963     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
964     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
965     ac_sep=" " ;;
966   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
967      ac_sep=" " ;;
968   esac
969   # Get rid of the leading space.
970 done
971
972 # When interrupted or exit'd, cleanup temporary files, and complete
973 # config.log.  We remove comments because anyway the quotes in there
974 # would cause problems or look ugly.
975 trap 'exit_status=$?
976   # Save into config.log some information that might help in debugging.
977   echo >&5
978   echo "## ----------------- ##" >&5
979   echo "## Cache variables.  ##" >&5
980   echo "## ----------------- ##" >&5
981   echo >&5
982   # The following way of writing the cache mishandles newlines in values,
983 {
984   (set) 2>&1 |
985     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
986     *ac_space=\ *)
987       sed -n \
988         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
989           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
990       ;;
991     *)
992       sed -n \
993         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
994       ;;
995     esac;
996 } >&5
997   sed "/^$/d" confdefs.h >conftest.log
998   if test -s conftest.log; then
999     echo >&5
1000     echo "## ------------ ##" >&5
1001     echo "## confdefs.h.  ##" >&5
1002     echo "## ------------ ##" >&5
1003     echo >&5
1004     cat conftest.log >&5
1005   fi
1006   (echo; echo) >&5
1007   test "$ac_signal" != 0 &&
1008     echo "$as_me: caught signal $ac_signal" >&5
1009   echo "$as_me: exit $exit_status" >&5
1010   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1011     exit $exit_status
1012      ' 0
1013 for ac_signal in 1 2 13 15; do
1014   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015 done
1016 ac_signal=0
1017
1018 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1019 rm -rf conftest* confdefs.h
1020 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021 echo >confdefs.h
1022
1023 # Let the site file select an alternate cache file if it wants to.
1024 # Prefer explicitly selected file to automatically selected ones.
1025 if test -z "$CONFIG_SITE"; then
1026   if test "x$prefix" != xNONE; then
1027     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1028   else
1029     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1030   fi
1031 fi
1032 for ac_site_file in $CONFIG_SITE; do
1033   if test -r "$ac_site_file"; then
1034     { echo "$as_me:1034: loading site script $ac_site_file" >&5
1035 echo "$as_me: loading site script $ac_site_file" >&6;}
1036     cat "$ac_site_file" >&5
1037     . "$ac_site_file"
1038   fi
1039 done
1040
1041 if test -r "$cache_file"; then
1042   # Some versions of bash will fail to source /dev/null (special
1043   # files actually), so we avoid doing that.
1044   if test -f "$cache_file"; then
1045     { echo "$as_me:1045: loading cache $cache_file" >&5
1046 echo "$as_me: loading cache $cache_file" >&6;}
1047     case $cache_file in
1048       [\\/]* | ?:[\\/]* ) . $cache_file;;
1049       *)                      . ./$cache_file;;
1050     esac
1051   fi
1052 else
1053   { echo "$as_me:1053: creating cache $cache_file" >&5
1054 echo "$as_me: creating cache $cache_file" >&6;}
1055   >$cache_file
1056 fi
1057
1058 # Check that the precious variables saved in the cache have kept the same
1059 # value.
1060 ac_cache_corrupted=false
1061 for ac_var in `(set) 2>&1 |
1062                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1063   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1064   eval ac_new_set=\$ac_env_${ac_var}_set
1065   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1066   eval ac_new_val="\$ac_env_${ac_var}_value"
1067   case $ac_old_set,$ac_new_set in
1068     set,)
1069       { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1070 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071       ac_cache_corrupted=: ;;
1072     ,set)
1073       { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
1074 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075       ac_cache_corrupted=: ;;
1076     ,);;
1077     *)
1078       if test "x$ac_old_val" != "x$ac_new_val"; then
1079         { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
1080 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1081         { echo "$as_me:1081:   former value:  $ac_old_val" >&5
1082 echo "$as_me:   former value:  $ac_old_val" >&2;}
1083         { echo "$as_me:1083:   current value: $ac_new_val" >&5
1084 echo "$as_me:   current value: $ac_new_val" >&2;}
1085         ac_cache_corrupted=:
1086       fi;;
1087   esac
1088   # Pass precious variables to config.status.  It doesn't matter if
1089   # we pass some twice (in addition to the command line arguments).
1090   if test "$ac_new_set" = set; then
1091     case $ac_new_val in
1092     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1093       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1094       ac_configure_args="$ac_configure_args '$ac_arg'"
1095       ;;
1096     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1097        ;;
1098     esac
1099   fi
1100 done
1101 if $ac_cache_corrupted; then
1102   { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
1103 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1104   { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1105 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106    { (exit 1); exit 1; }; }
1107 fi
1108
1109 ac_ext=c
1110 ac_cpp='$CPP $CPPFLAGS'
1111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114 ac_main_return=return
1115
1116 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1117   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1118                    ECHO_T='     ' ;;
1119   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121 esac
1122 echo "#! $SHELL" >conftest.sh
1123 echo  "exit 0"   >>conftest.sh
1124 chmod +x conftest.sh
1125 if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
1126   (PATH=".;."; conftest.sh) 2>&5
1127   ac_status=$?
1128   echo "$as_me:1128: \$? = $ac_status" >&5
1129   (exit $ac_status); }; then
1130   ac_path_separator=';'
1131 else
1132   ac_path_separator=:
1133 fi
1134 PATH_SEPARATOR="$ac_path_separator"
1135 rm -f conftest.sh
1136
1137 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1138
1139 top_builddir=`pwd`
1140
1141 echo "$as_me:1141: checking for egrep" >&5
1142 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143 if test "${ac_cv_prog_egrep+set}" = set; then
1144   echo $ECHO_N "(cached) $ECHO_C" >&6
1145 else
1146   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1147                 then ac_cv_prog_egrep='grep -E'
1148                 else ac_cv_prog_egrep='egrep'
1149         fi
1150 fi
1151 echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
1152 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1153         EGREP=$ac_cv_prog_egrep
1154
1155         test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
1156 echo "$as_me: error: No egrep program found" >&2;}
1157    { (exit 1); exit 1; }; }
1158
1159 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 cf_cv_abi_version=${NCURSES_MAJOR}
1163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164 cf_cv_timestamp=`date`
1165 echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1166 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1167
1168 if test -f $srcdir/VERSION ; then
1169         echo "$as_me:1169: checking for package version" >&5
1170 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1171
1172         # if there are not enough fields, cut returns the last one...
1173         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1174         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1175         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1176
1177         # this is how CF_BUNDLED_INTL uses $VERSION:
1178         VERSION="$cf_field1"
1179
1180         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181         test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182 echo "$as_me: error: missing major-version" >&2;}
1183    { (exit 1); exit 1; }; }
1184
1185         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1186         test -z "$VERSION_MINOR" && { { echo "$as_me:1186: error: missing minor-version" >&5
1187 echo "$as_me: error: missing minor-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1192
1193         echo "$as_me:1193: checking for package patch date" >&5
1194 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196         case .$VERSION_PATCH in
1197         (.)
1198                 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200    { (exit 1); exit 1; }; }
1201                 ;;
1202         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1203                 ;;
1204         (*)
1205                 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207    { (exit 1); exit 1; }; }
1208                 ;;
1209         esac
1210         echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211 echo "${ECHO_T}$VERSION_PATCH" >&6
1212 else
1213         { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217
1218 # show the actual data that we have for versions:
1219 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1220
1221 echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1222
1223 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1224
1225 echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1226
1227 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1234
1235         cf_PACKAGE=NCURSES
1236         PACKAGE=ncurses
1237
1238 cat >>confdefs.h <<EOF
1239 #define PACKAGE "$PACKAGE"
1240 EOF
1241
1242 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1243
1244         cat >>confdefs.h <<EOF
1245 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1246 EOF
1247
1248         cat >>confdefs.h <<EOF
1249 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1250 EOF
1251
1252 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1253
1254 # Check whether --with-rel-version or --without-rel-version was given.
1255 if test "${with_rel_version+set}" = set; then
1256   withval="$with_rel_version"
1257   { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1258 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259  cf_cv_rel_version=$withval
1260 fi;
1261
1262  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1263  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1264
1265 if test -n "$NCURSES_MAJOR" ; then
1266   case $NCURSES_MAJOR in
1267   ([0-9]*)
1268         ;;
1269   (*)
1270         { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1271 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272    { (exit 1); exit 1; }; }
1273         ;;
1274   esac
1275 else
1276   { { echo "$as_me:1276: error: Release major-version value is empty" >&5
1277 echo "$as_me: error: Release major-version value is empty" >&2;}
1278    { (exit 1); exit 1; }; }
1279 fi
1280
1281 if test -n "$NCURSES_MINOR" ; then
1282   case $NCURSES_MINOR in
1283   ([0-9]*)
1284         ;;
1285   (*)
1286         { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1287 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288    { (exit 1); exit 1; }; }
1289         ;;
1290   esac
1291 else
1292   { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
1293 echo "$as_me: error: Release minor-version value is empty" >&2;}
1294    { (exit 1); exit 1; }; }
1295 fi
1296
1297 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1298
1299 # Check whether --with-abi-version or --without-abi-version was given.
1300 if test "${with_abi_version+set}" = set; then
1301   withval="$with_abi_version"
1302
1303         if test "x$cf_cv_abi_version" != "x$withval"
1304         then
1305                 { echo "$as_me:1305: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1306 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1307                 case $cf_cv_rel_version in
1308                 (5.*)
1309                         cf_cv_rel_version=$withval.0
1310                         ;;
1311                 (6.*)
1312                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1313                         ;;
1314                 esac
1315         fi
1316         cf_cv_abi_version=$withval
1317 fi;
1318
1319 if test -n "$cf_cv_abi_version" ; then
1320   case $cf_cv_abi_version in
1321   ([0-9]*)
1322         ;;
1323   (*)
1324         { { echo "$as_me:1324: error: ABI version is not a number: $cf_cv_abi_version" >&5
1325 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1326    { (exit 1); exit 1; }; }
1327         ;;
1328   esac
1329 else
1330   { { echo "$as_me:1330: error: ABI version value is empty" >&5
1331 echo "$as_me: error: ABI version value is empty" >&2;}
1332    { (exit 1); exit 1; }; }
1333 fi
1334
1335 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1336 then
1337         case $cf_cv_rel_version in
1338         (5.*)
1339                 cf_cv_rel_version=$with_abi_version.0
1340                 ;;
1341         esac
1342 fi
1343
1344 ac_aux_dir=
1345 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1346   if test -f $ac_dir/install-sh; then
1347     ac_aux_dir=$ac_dir
1348     ac_install_sh="$ac_aux_dir/install-sh -c"
1349     break
1350   elif test -f $ac_dir/install.sh; then
1351     ac_aux_dir=$ac_dir
1352     ac_install_sh="$ac_aux_dir/install.sh -c"
1353     break
1354   elif test -f $ac_dir/shtool; then
1355     ac_aux_dir=$ac_dir
1356     ac_install_sh="$ac_aux_dir/shtool install -c"
1357     break
1358   fi
1359 done
1360 if test -z "$ac_aux_dir"; then
1361   { { echo "$as_me:1361: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1362 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1366 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1367 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1368
1369 # Make sure we can run config.sub.
1370 $ac_config_sub sun4 >/dev/null 2>&1 ||
1371   { { echo "$as_me:1371: error: cannot run $ac_config_sub" >&5
1372 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1373    { (exit 1); exit 1; }; }
1374
1375 echo "$as_me:1375: checking build system type" >&5
1376 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1377 if test "${ac_cv_build+set}" = set; then
1378   echo $ECHO_N "(cached) $ECHO_C" >&6
1379 else
1380   ac_cv_build_alias=$build_alias
1381 test -z "$ac_cv_build_alias" &&
1382   ac_cv_build_alias=`$ac_config_guess`
1383 test -z "$ac_cv_build_alias" &&
1384   { { echo "$as_me:1384: error: cannot guess build type; you must specify one" >&5
1385 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1386    { (exit 1); exit 1; }; }
1387 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_build" >&5
1394 echo "${ECHO_T}$ac_cv_build" >&6
1395 build=$ac_cv_build
1396 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 echo "$as_me:1400: checking host system type" >&5
1401 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1402 if test "${ac_cv_host+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_host_alias=$host_alias
1406 test -z "$ac_cv_host_alias" &&
1407   ac_cv_host_alias=$ac_cv_build_alias
1408 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1409   { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1410 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1411    { (exit 1); exit 1; }; }
1412
1413 fi
1414 echo "$as_me:1414: result: $ac_cv_host" >&5
1415 echo "${ECHO_T}$ac_cv_host" >&6
1416 host=$ac_cv_host
1417 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1420
1421 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1422         echo "$as_me:1422: checking target system type" >&5
1423 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1424 if test "${ac_cv_target+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_target_alias=$target_alias
1428 test "x$ac_cv_target_alias" = "x" &&
1429   ac_cv_target_alias=$ac_cv_host_alias
1430 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_target" >&5
1437 echo "${ECHO_T}$ac_cv_target" >&6
1438 target=$ac_cv_target
1439 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 # The aliases save the names the user supplied, while $host etc.
1444 # will get canonicalized.
1445 test -n "$target_alias" &&
1446   test "$program_prefix$program_suffix$program_transform_name" = \
1447     NONENONEs,x,x, &&
1448   program_prefix=${target_alias}-
1449         system_name="$host_os"
1450 else
1451         system_name="`(uname -s -r) 2>/dev/null`"
1452         if test -z "$system_name" ; then
1453                 system_name="`(hostname) 2>/dev/null`"
1454         fi
1455 fi
1456 test -n "$system_name" &&
1457 cat >>confdefs.h <<EOF
1458 #define SYSTEM_NAME "$system_name"
1459 EOF
1460
1461 if test "${cf_cv_system_name+set}" = set; then
1462   echo $ECHO_N "(cached) $ECHO_C" >&6
1463 else
1464   cf_cv_system_name="$system_name"
1465 fi
1466
1467 test -z "$system_name" && system_name="$cf_cv_system_name"
1468 test -n "$cf_cv_system_name" && echo "$as_me:1468: result: Configuring for $cf_cv_system_name" >&5
1469 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1470
1471 if test ".$system_name" != ".$cf_cv_system_name" ; then
1472         echo "$as_me:1472: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1473 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1474         { { echo "$as_me:1474: error: \"Please remove config.cache and try again.\"" >&5
1475 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1476    { (exit 1); exit 1; }; }
1477 fi
1478
1479 # Check whether --with-system-type or --without-system-type was given.
1480 if test "${with_system_type+set}" = set; then
1481   withval="$with_system_type"
1482   { echo "$as_me:1482: WARNING: overriding system type to $withval" >&5
1483 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1484         cf_cv_system_name=$withval
1485         host_os=$withval
1486
1487 fi;
1488
1489 ###     Save the given $CFLAGS to allow user-override.
1490 cf_user_CFLAGS="$CFLAGS"
1491
1492 ###     Default install-location
1493
1494 echo "$as_me:1494: checking for prefix" >&5
1495 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1496 if test "x$prefix" = "xNONE" ; then
1497         case "$cf_cv_system_name" in
1498                 # non-vendor systems don't have a conflict
1499         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1500                 prefix=/usr
1501                 ;;
1502         (*)     prefix=$ac_default_prefix
1503                 ;;
1504         esac
1505 fi
1506 echo "$as_me:1506: result: $prefix" >&5
1507 echo "${ECHO_T}$prefix" >&6
1508
1509 if test "x$prefix" = "xNONE" ; then
1510 echo "$as_me:1510: checking for default include-directory" >&5
1511 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1512 test -n "$verbose" && echo 1>&6
1513 for cf_symbol in \
1514         $includedir \
1515         $includedir/ncurses \
1516         $prefix/include \
1517         $prefix/include/ncurses \
1518         /usr/local/include \
1519         /usr/local/include/ncurses \
1520         /usr/include \
1521         /usr/include/ncurses
1522 do
1523         cf_dir=`eval echo $cf_symbol`
1524         if test -f $cf_dir/curses.h ; then
1525         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1526                 includedir="$cf_symbol"
1527                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1528                 break
1529         fi
1530         fi
1531         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1532 done
1533 echo "$as_me:1533: result: $includedir" >&5
1534 echo "${ECHO_T}$includedir" >&6
1535 fi
1536
1537 ### Defaults for ncurses ABI
1538
1539 case x$cf_cv_abi_version in
1540 (x[6789])
1541         cf_dft_ext_colors=yes
1542         cf_dft_ext_const=yes
1543         cf_dft_ext_mouse=yes
1544         cf_dft_ext_putwin=yes
1545         cf_dft_ext_spfuncs=yes
1546         cf_dft_filter_syms=yes
1547         cf_dft_chtype=uint32_t
1548         cf_dft_mmask_t=uint32_t
1549         cf_dft_interop=yes
1550         cf_dft_tparm_arg=intptr_t
1551         cf_dft_with_lp64=yes
1552         ;;
1553 (*)
1554         cf_dft_ext_colors=no
1555         cf_dft_ext_const=no
1556         cf_dft_ext_mouse=no
1557         cf_dft_ext_putwin=no
1558         cf_dft_ext_spfuncs=no
1559         cf_dft_filter_syms=no
1560         cf_dft_chtype=auto
1561         cf_dft_mmask_t=auto
1562         cf_dft_interop=no
1563         cf_dft_tparm_arg=long
1564         cf_dft_with_lp64=no
1565         ;;
1566 esac
1567
1568 ###     Checks for programs.
1569
1570 # Check whether --with-ada or --without-ada was given.
1571 if test "${with_ada+set}" = set; then
1572   withval="$with_ada"
1573   cf_with_ada=$withval
1574 else
1575   cf_with_ada=yes
1576 fi;
1577 if test "x$cf_with_ada" = xyes
1578 then
1579         cf_PROG_CC="gnatgcc gcc cc"
1580 else
1581         cf_PROG_CC="gcc cc"
1582 fi
1583
1584 ac_ext=c
1585 ac_cpp='$CPP $CPPFLAGS'
1586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1589 ac_main_return=return
1590 if test -n "$ac_tool_prefix"; then
1591   for ac_prog in $cf_PROG_CC
1592   do
1593     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1594 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1595 echo "$as_me:1595: checking for $ac_word" >&5
1596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1597 if test "${ac_cv_prog_CC+set}" = set; then
1598   echo $ECHO_N "(cached) $ECHO_C" >&6
1599 else
1600   if test -n "$CC"; then
1601   ac_cv_prog_CC="$CC" # Let the user override the test.
1602 else
1603   ac_save_IFS=$IFS; IFS=$ac_path_separator
1604 ac_dummy="$PATH"
1605 for ac_dir in $ac_dummy; do
1606   IFS=$ac_save_IFS
1607   test -z "$ac_dir" && ac_dir=.
1608   $as_executable_p "$ac_dir/$ac_word" || continue
1609 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1610 echo "$as_me:1610: found $ac_dir/$ac_word" >&5
1611 break
1612 done
1613
1614 fi
1615 fi
1616 CC=$ac_cv_prog_CC
1617 if test -n "$CC"; then
1618   echo "$as_me:1618: result: $CC" >&5
1619 echo "${ECHO_T}$CC" >&6
1620 else
1621   echo "$as_me:1621: result: no" >&5
1622 echo "${ECHO_T}no" >&6
1623 fi
1624
1625     test -n "$CC" && break
1626   done
1627 fi
1628 if test -z "$CC"; then
1629   ac_ct_CC=$CC
1630   for ac_prog in $cf_PROG_CC
1631 do
1632   # Extract the first word of "$ac_prog", so it can be a program name with args.
1633 set dummy $ac_prog; ac_word=$2
1634 echo "$as_me:1634: checking for $ac_word" >&5
1635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1637   echo $ECHO_N "(cached) $ECHO_C" >&6
1638 else
1639   if test -n "$ac_ct_CC"; then
1640   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1641 else
1642   ac_save_IFS=$IFS; IFS=$ac_path_separator
1643 ac_dummy="$PATH"
1644 for ac_dir in $ac_dummy; do
1645   IFS=$ac_save_IFS
1646   test -z "$ac_dir" && ac_dir=.
1647   $as_executable_p "$ac_dir/$ac_word" || continue
1648 ac_cv_prog_ac_ct_CC="$ac_prog"
1649 echo "$as_me:1649: found $ac_dir/$ac_word" >&5
1650 break
1651 done
1652
1653 fi
1654 fi
1655 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1656 if test -n "$ac_ct_CC"; then
1657   echo "$as_me:1657: result: $ac_ct_CC" >&5
1658 echo "${ECHO_T}$ac_ct_CC" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$ac_ct_CC" && break
1665 done
1666
1667   CC=$ac_ct_CC
1668 fi
1669
1670 test -z "$CC" && { { echo "$as_me:1670: error: no acceptable cc found in \$PATH" >&5
1671 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1672    { (exit 1); exit 1; }; }
1673
1674 # Provide some information about the compiler.
1675 echo "$as_me:1675:" \
1676      "checking for C compiler version" >&5
1677 ac_compiler=`set X $ac_compile; echo $2`
1678 { (eval echo "$as_me:1678: \"$ac_compiler --version </dev/null >&5\"") >&5
1679   (eval $ac_compiler --version </dev/null >&5) 2>&5
1680   ac_status=$?
1681   echo "$as_me:1681: \$? = $ac_status" >&5
1682   (exit $ac_status); }
1683 { (eval echo "$as_me:1683: \"$ac_compiler -v </dev/null >&5\"") >&5
1684   (eval $ac_compiler -v </dev/null >&5) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); }
1688 { (eval echo "$as_me:1688: \"$ac_compiler -V </dev/null >&5\"") >&5
1689   (eval $ac_compiler -V </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693
1694 cat >conftest.$ac_ext <<_ACEOF
1695 #line 1695 "configure"
1696 #include "confdefs.h"
1697
1698 int
1699 main ()
1700 {
1701
1702   ;
1703   return 0;
1704 }
1705 _ACEOF
1706 ac_clean_files_save=$ac_clean_files
1707 ac_clean_files="$ac_clean_files a.out a.exe"
1708 # Try to create an executable without -o first, disregard a.out.
1709 # It will help us diagnose broken compilers, and finding out an intuition
1710 # of exeext.
1711 echo "$as_me:1711: checking for C compiler default output" >&5
1712 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1713 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1714 if { (eval echo "$as_me:1714: \"$ac_link_default\"") >&5
1715   (eval $ac_link_default) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }; then
1719   # Find the output, starting from the most likely.  This scheme is
1720 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1721 # resort.
1722 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1723                 ls a.out conftest 2>/dev/null;
1724                 ls a.* conftest.* 2>/dev/null`; do
1725   case $ac_file in
1726     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1727     a.out ) # We found the default executable, but exeext='' is most
1728             # certainly right.
1729             break;;
1730     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1731           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1732           export ac_cv_exeext
1733           break;;
1734     * ) break;;
1735   esac
1736 done
1737 else
1738   echo "$as_me: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
1740 { { echo "$as_me:1740: error: C compiler cannot create executables" >&5
1741 echo "$as_me: error: C compiler cannot create executables" >&2;}
1742    { (exit 77); exit 77; }; }
1743 fi
1744
1745 ac_exeext=$ac_cv_exeext
1746 echo "$as_me:1746: result: $ac_file" >&5
1747 echo "${ECHO_T}$ac_file" >&6
1748
1749 # Check the compiler produces executables we can run.  If not, either
1750 # the compiler is broken, or we cross compile.
1751 echo "$as_me:1751: checking whether the C compiler works" >&5
1752 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1753 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1754 # If not cross compiling, check that we can run a simple program.
1755 if test "$cross_compiling" != yes; then
1756   if { ac_try='./$ac_file'
1757   { (eval echo "$as_me:1757: \"$ac_try\"") >&5
1758   (eval $ac_try) 2>&5
1759   ac_status=$?
1760   echo "$as_me:1760: \$? = $ac_status" >&5
1761   (exit $ac_status); }; }; then
1762     cross_compiling=no
1763   else
1764     if test "$cross_compiling" = maybe; then
1765         cross_compiling=yes
1766     else
1767         { { echo "$as_me:1767: error: cannot run C compiled programs.
1768 If you meant to cross compile, use \`--host'." >&5
1769 echo "$as_me: error: cannot run C compiled programs.
1770 If you meant to cross compile, use \`--host'." >&2;}
1771    { (exit 1); exit 1; }; }
1772     fi
1773   fi
1774 fi
1775 echo "$as_me:1775: result: yes" >&5
1776 echo "${ECHO_T}yes" >&6
1777
1778 rm -f a.out a.exe conftest$ac_cv_exeext
1779 ac_clean_files=$ac_clean_files_save
1780 # Check the compiler produces executables we can run.  If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether we are cross compiling" >&5
1783 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1784 echo "$as_me:1784: result: $cross_compiling" >&5
1785 echo "${ECHO_T}$cross_compiling" >&6
1786
1787 echo "$as_me:1787: checking for executable suffix" >&5
1788 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1789 if { (eval echo "$as_me:1789: \"$ac_link\"") >&5
1790   (eval $ac_link) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; then
1794   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1795 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1796 # work properly (i.e., refer to `conftest.exe'), while it won't with
1797 # `rm'.
1798 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1799   case $ac_file in
1800     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1801     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802           export ac_cv_exeext
1803           break;;
1804     * ) break;;
1805   esac
1806 done
1807 else
1808   { { echo "$as_me:1808: error: cannot compute EXEEXT: cannot compile and link" >&5
1809 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1810    { (exit 1); exit 1; }; }
1811 fi
1812
1813 rm -f conftest$ac_cv_exeext
1814 echo "$as_me:1814: result: $ac_cv_exeext" >&5
1815 echo "${ECHO_T}$ac_cv_exeext" >&6
1816
1817 rm -f conftest.$ac_ext
1818 EXEEXT=$ac_cv_exeext
1819 ac_exeext=$EXEEXT
1820 echo "$as_me:1820: checking for object suffix" >&5
1821 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1822 if test "${ac_cv_objext+set}" = set; then
1823   echo $ECHO_N "(cached) $ECHO_C" >&6
1824 else
1825   cat >conftest.$ac_ext <<_ACEOF
1826 #line 1826 "configure"
1827 #include "confdefs.h"
1828
1829 int
1830 main ()
1831 {
1832
1833   ;
1834   return 0;
1835 }
1836 _ACEOF
1837 rm -f conftest.o conftest.obj
1838 if { (eval echo "$as_me:1838: \"$ac_compile\"") >&5
1839   (eval $ac_compile) 2>&5
1840   ac_status=$?
1841   echo "$as_me:1841: \$? = $ac_status" >&5
1842   (exit $ac_status); }; then
1843   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1844   case $ac_file in
1845     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1846     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1847        break;;
1848   esac
1849 done
1850 else
1851   echo "$as_me: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 { { echo "$as_me:1853: error: cannot compute OBJEXT: cannot compile" >&5
1854 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1855    { (exit 1); exit 1; }; }
1856 fi
1857
1858 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1859 fi
1860 echo "$as_me:1860: result: $ac_cv_objext" >&5
1861 echo "${ECHO_T}$ac_cv_objext" >&6
1862 OBJEXT=$ac_cv_objext
1863 ac_objext=$OBJEXT
1864 echo "$as_me:1864: checking whether we are using the GNU C compiler" >&5
1865 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1866 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1867   echo $ECHO_N "(cached) $ECHO_C" >&6
1868 else
1869   cat >conftest.$ac_ext <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1872
1873 int
1874 main ()
1875 {
1876 #ifndef __GNUC__
1877        choke me
1878 #endif
1879
1880   ;
1881   return 0;
1882 }
1883 _ACEOF
1884 rm -f conftest.$ac_objext
1885 if { (eval echo "$as_me:1885: \"$ac_compile\"") >&5
1886   (eval $ac_compile) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit $ac_status); } &&
1890          { ac_try='test -s conftest.$ac_objext'
1891   { (eval echo "$as_me:1891: \"$ac_try\"") >&5
1892   (eval $ac_try) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); }; }; then
1896   ac_compiler_gnu=yes
1897 else
1898   echo "$as_me: failed program was:" >&5
1899 cat conftest.$ac_ext >&5
1900 ac_compiler_gnu=no
1901 fi
1902 rm -f conftest.$ac_objext conftest.$ac_ext
1903 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1904
1905 fi
1906 echo "$as_me:1906: result: $ac_cv_c_compiler_gnu" >&5
1907 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1908 GCC=`test $ac_compiler_gnu = yes && echo yes`
1909 ac_test_CFLAGS=${CFLAGS+set}
1910 ac_save_CFLAGS=$CFLAGS
1911 CFLAGS="-g"
1912 echo "$as_me:1912: checking whether $CC accepts -g" >&5
1913 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1914 if test "${ac_cv_prog_cc_g+set}" = set; then
1915   echo $ECHO_N "(cached) $ECHO_C" >&6
1916 else
1917   cat >conftest.$ac_ext <<_ACEOF
1918 #line 1918 "configure"
1919 #include "confdefs.h"
1920
1921 int
1922 main ()
1923 {
1924
1925   ;
1926   return 0;
1927 }
1928 _ACEOF
1929 rm -f conftest.$ac_objext
1930 if { (eval echo "$as_me:1930: \"$ac_compile\"") >&5
1931   (eval $ac_compile) 2>&5
1932   ac_status=$?
1933   echo "$as_me:1933: \$? = $ac_status" >&5
1934   (exit $ac_status); } &&
1935          { ac_try='test -s conftest.$ac_objext'
1936   { (eval echo "$as_me:1936: \"$ac_try\"") >&5
1937   (eval $ac_try) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); }; }; then
1941   ac_cv_prog_cc_g=yes
1942 else
1943   echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 ac_cv_prog_cc_g=no
1946 fi
1947 rm -f conftest.$ac_objext conftest.$ac_ext
1948 fi
1949 echo "$as_me:1949: result: $ac_cv_prog_cc_g" >&5
1950 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951 if test "$ac_test_CFLAGS" = set; then
1952   CFLAGS=$ac_save_CFLAGS
1953 elif test $ac_cv_prog_cc_g = yes; then
1954   if test "$GCC" = yes; then
1955     CFLAGS="-g -O2"
1956   else
1957     CFLAGS="-g"
1958   fi
1959 else
1960   if test "$GCC" = yes; then
1961     CFLAGS="-O2"
1962   else
1963     CFLAGS=
1964   fi
1965 fi
1966 # Some people use a C++ compiler to compile C.  Since we use `exit',
1967 # in C++ we need to declare it.  In case someone uses the same compiler
1968 # for both compiling C and C++ we need to have the C++ compiler decide
1969 # the declaration of exit, since it's the most demanding environment.
1970 cat >conftest.$ac_ext <<_ACEOF
1971 #ifndef __cplusplus
1972   choke me
1973 #endif
1974 _ACEOF
1975 rm -f conftest.$ac_objext
1976 if { (eval echo "$as_me:1976: \"$ac_compile\"") >&5
1977   (eval $ac_compile) 2>&5
1978   ac_status=$?
1979   echo "$as_me:1979: \$? = $ac_status" >&5
1980   (exit $ac_status); } &&
1981          { ac_try='test -s conftest.$ac_objext'
1982   { (eval echo "$as_me:1982: \"$ac_try\"") >&5
1983   (eval $ac_try) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); }; }; then
1987   for ac_declaration in \
1988    ''\
1989    '#include <stdlib.h>' \
1990    'extern "C" void std::exit (int) throw (); using std::exit;' \
1991    'extern "C" void std::exit (int); using std::exit;' \
1992    'extern "C" void exit (int) throw ();' \
1993    'extern "C" void exit (int);' \
1994    'void exit (int);'
1995 do
1996   cat >conftest.$ac_ext <<_ACEOF
1997 #line 1997 "configure"
1998 #include "confdefs.h"
1999 #include <stdlib.h>
2000 $ac_declaration
2001 int
2002 main ()
2003 {
2004 exit (42);
2005   ;
2006   return 0;
2007 }
2008 _ACEOF
2009 rm -f conftest.$ac_objext
2010 if { (eval echo "$as_me:2010: \"$ac_compile\"") >&5
2011   (eval $ac_compile) 2>&5
2012   ac_status=$?
2013   echo "$as_me:2013: \$? = $ac_status" >&5
2014   (exit $ac_status); } &&
2015          { ac_try='test -s conftest.$ac_objext'
2016   { (eval echo "$as_me:2016: \"$ac_try\"") >&5
2017   (eval $ac_try) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); }; }; then
2021   :
2022 else
2023   echo "$as_me: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 continue
2026 fi
2027 rm -f conftest.$ac_objext conftest.$ac_ext
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 $ac_declaration
2032 int
2033 main ()
2034 {
2035 exit (42);
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); } &&
2046          { ac_try='test -s conftest.$ac_objext'
2047   { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); }; }; then
2052   break
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 fi
2057 rm -f conftest.$ac_objext conftest.$ac_ext
2058 done
2059 rm -rf conftest*
2060 if test -n "$ac_declaration"; then
2061   echo '#ifdef __cplusplus' >>confdefs.h
2062   echo $ac_declaration      >>confdefs.h
2063   echo '#endif'             >>confdefs.h
2064 fi
2065
2066 else
2067   echo "$as_me: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 fi
2070 rm -f conftest.$ac_objext conftest.$ac_ext
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 ac_main_return=return
2077
2078 GCC_VERSION=none
2079 if test "$GCC" = yes ; then
2080         echo "$as_me:2080: checking version of $CC" >&5
2081 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2082         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.].*//'`"
2083         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2084         echo "$as_me:2084: result: $GCC_VERSION" >&5
2085 echo "${ECHO_T}$GCC_VERSION" >&6
2086 fi
2087
2088 echo "$as_me:2088: checking for $CC option to accept ANSI C" >&5
2089 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2090 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2091   echo $ECHO_N "(cached) $ECHO_C" >&6
2092 else
2093   ac_cv_prog_cc_stdc=no
2094 ac_save_CC=$CC
2095 cat >conftest.$ac_ext <<_ACEOF
2096 #line 2096 "configure"
2097 #include "confdefs.h"
2098 #include <stdarg.h>
2099 #include <stdio.h>
2100 #include <sys/types.h>
2101 #include <sys/stat.h>
2102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2103 struct buf { int x; };
2104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2105 static char *e (p, i)
2106      char **p;
2107      int i;
2108 {
2109   return p[i];
2110 }
2111 static char *f (char * (*g) (char **, int), char **p, ...)
2112 {
2113   char *s;
2114   va_list v;
2115   va_start (v,p);
2116   s = g (p, va_arg (v,int));
2117   va_end (v);
2118   return s;
2119 }
2120 int test (int i, double x);
2121 struct s1 {int (*f) (int a);};
2122 struct s2 {int (*f) (double a);};
2123 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2124 int argc;
2125 char **argv;
2126 int
2127 main ()
2128 {
2129 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 # Don't try gcc -ansi; that turns off useful extensions and
2135 # breaks some systems' header files.
2136 # AIX                   -qlanglvl=ansi
2137 # Ultrix and OSF/1      -std1
2138 # HP-UX 10.20 and later -Ae
2139 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2140 # SVR4                  -Xc -D__EXTENSIONS__
2141 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2142 do
2143   CC="$ac_save_CC $ac_arg"
2144   rm -f conftest.$ac_objext
2145 if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
2146   (eval $ac_compile) 2>&5
2147   ac_status=$?
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } &&
2150          { ac_try='test -s conftest.$ac_objext'
2151   { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); }; }; then
2156   ac_cv_prog_cc_stdc=$ac_arg
2157 break
2158 else
2159   echo "$as_me: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 fi
2162 rm -f conftest.$ac_objext
2163 done
2164 rm -f conftest.$ac_ext conftest.$ac_objext
2165 CC=$ac_save_CC
2166
2167 fi
2168
2169 case "x$ac_cv_prog_cc_stdc" in
2170   x|xno)
2171     echo "$as_me:2171: result: none needed" >&5
2172 echo "${ECHO_T}none needed" >&6 ;;
2173   *)
2174     echo "$as_me:2174: result: $ac_cv_prog_cc_stdc" >&5
2175 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2176     CC="$CC $ac_cv_prog_cc_stdc" ;;
2177 esac
2178
2179 # This should have been defined by AC_PROG_CC
2180 : ${CC:=cc}
2181
2182 echo "$as_me:2182: checking \$CC variable" >&5
2183 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2184 case "$CC" in
2185 (*[\ \  ]-[IUD]*)
2186         echo "$as_me:2186: result: broken" >&5
2187 echo "${ECHO_T}broken" >&6
2188         { echo "$as_me:2188: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2189 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2190         # humor him...
2191         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2192         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2193
2194 cf_fix_cppflags=no
2195 cf_new_cflags=
2196 cf_new_cppflags=
2197 cf_new_extra_cppflags=
2198
2199 for cf_add_cflags in $cf_flags
2200 do
2201 case $cf_fix_cppflags in
2202 (no)
2203         case $cf_add_cflags in
2204         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2205                 case $cf_add_cflags in
2206                 (-D*)
2207                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2208
2209                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2210                                 && test -z "${cf_tst_cflags}" \
2211                                 && cf_fix_cppflags=yes
2212
2213                         if test $cf_fix_cppflags = yes ; then
2214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2215                                 continue
2216                         elif test "${cf_tst_cflags}" = "\"'" ; then
2217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2218                                 continue
2219                         fi
2220                         ;;
2221                 esac
2222                 case "$CPPFLAGS" in
2223                 (*$cf_add_cflags)
2224                         ;;
2225                 (*)
2226                         case $cf_add_cflags in
2227                         (-D*)
2228                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2229
2230 CPPFLAGS=`echo "$CPPFLAGS" | \
2231         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2232                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2233
2234                                 ;;
2235                         esac
2236                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2237                         ;;
2238                 esac
2239                 ;;
2240         (*)
2241                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2242                 ;;
2243         esac
2244         ;;
2245 (yes)
2246         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2247
2248         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2249
2250         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2251                 && test -z "${cf_tst_cflags}" \
2252                 && cf_fix_cppflags=no
2253         ;;
2254 esac
2255 done
2256
2257 if test -n "$cf_new_cflags" ; then
2258
2259         CFLAGS="$CFLAGS $cf_new_cflags"
2260 fi
2261
2262 if test -n "$cf_new_cppflags" ; then
2263
2264         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2265 fi
2266
2267 if test -n "$cf_new_extra_cppflags" ; then
2268
2269         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2270 fi
2271
2272         ;;
2273 (*)
2274         echo "$as_me:2274: result: ok" >&5
2275 echo "${ECHO_T}ok" >&6
2276         ;;
2277 esac
2278
2279 ac_ext=c
2280 ac_cpp='$CPP $CPPFLAGS'
2281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2284 ac_main_return=return
2285 echo "$as_me:2285: checking how to run the C preprocessor" >&5
2286 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2287 # On Suns, sometimes $CPP names a directory.
2288 if test -n "$CPP" && test -d "$CPP"; then
2289   CPP=
2290 fi
2291 if test -z "$CPP"; then
2292   if test "${ac_cv_prog_CPP+set}" = set; then
2293   echo $ECHO_N "(cached) $ECHO_C" >&6
2294 else
2295       # Double quotes because CPP needs to be expanded
2296     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2297     do
2298       ac_preproc_ok=false
2299 for ac_c_preproc_warn_flag in '' yes
2300 do
2301   # Use a header file that comes with gcc, so configuring glibc
2302   # with a fresh cross-compiler works.
2303   # On the NeXT, cc -E runs the code through the compiler's parser,
2304   # not just through cpp. "Syntax error" is here to catch this case.
2305   cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <assert.h>
2309                      Syntax error
2310 _ACEOF
2311 if { (eval echo "$as_me:2311: \"$ac_cpp conftest.$ac_ext\"") >&5
2312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2313   ac_status=$?
2314   egrep -v '^ *\+' conftest.er1 >conftest.err
2315   rm -f conftest.er1
2316   cat conftest.err >&5
2317   echo "$as_me:2317: \$? = $ac_status" >&5
2318   (exit $ac_status); } >/dev/null; then
2319   if test -s conftest.err; then
2320     ac_cpp_err=$ac_c_preproc_warn_flag
2321   else
2322     ac_cpp_err=
2323   fi
2324 else
2325   ac_cpp_err=yes
2326 fi
2327 if test -z "$ac_cpp_err"; then
2328   :
2329 else
2330   echo "$as_me: failed program was:" >&5
2331   cat conftest.$ac_ext >&5
2332   # Broken: fails on valid input.
2333 continue
2334 fi
2335 rm -f conftest.err conftest.$ac_ext
2336
2337   # OK, works on sane cases.  Now check whether non-existent headers
2338   # can be detected and how.
2339   cat >conftest.$ac_ext <<_ACEOF
2340 #line 2340 "configure"
2341 #include "confdefs.h"
2342 #include <ac_nonexistent.h>
2343 _ACEOF
2344 if { (eval echo "$as_me:2344: \"$ac_cpp conftest.$ac_ext\"") >&5
2345   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2346   ac_status=$?
2347   egrep -v '^ *\+' conftest.er1 >conftest.err
2348   rm -f conftest.er1
2349   cat conftest.err >&5
2350   echo "$as_me:2350: \$? = $ac_status" >&5
2351   (exit $ac_status); } >/dev/null; then
2352   if test -s conftest.err; then
2353     ac_cpp_err=$ac_c_preproc_warn_flag
2354   else
2355     ac_cpp_err=
2356   fi
2357 else
2358   ac_cpp_err=yes
2359 fi
2360 if test -z "$ac_cpp_err"; then
2361   # Broken: success on invalid input.
2362 continue
2363 else
2364   echo "$as_me: failed program was:" >&5
2365   cat conftest.$ac_ext >&5
2366   # Passes both tests.
2367 ac_preproc_ok=:
2368 break
2369 fi
2370 rm -f conftest.err conftest.$ac_ext
2371
2372 done
2373 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2374 rm -f conftest.err conftest.$ac_ext
2375 if $ac_preproc_ok; then
2376   break
2377 fi
2378
2379     done
2380     ac_cv_prog_CPP=$CPP
2381
2382 fi
2383   CPP=$ac_cv_prog_CPP
2384 else
2385   ac_cv_prog_CPP=$CPP
2386 fi
2387 echo "$as_me:2387: result: $CPP" >&5
2388 echo "${ECHO_T}$CPP" >&6
2389 ac_preproc_ok=false
2390 for ac_c_preproc_warn_flag in '' yes
2391 do
2392   # Use a header file that comes with gcc, so configuring glibc
2393   # with a fresh cross-compiler works.
2394   # On the NeXT, cc -E runs the code through the compiler's parser,
2395   # not just through cpp. "Syntax error" is here to catch this case.
2396   cat >conftest.$ac_ext <<_ACEOF
2397 #line 2397 "configure"
2398 #include "confdefs.h"
2399 #include <assert.h>
2400                      Syntax error
2401 _ACEOF
2402 if { (eval echo "$as_me:2402: \"$ac_cpp conftest.$ac_ext\"") >&5
2403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2404   ac_status=$?
2405   egrep -v '^ *\+' conftest.er1 >conftest.err
2406   rm -f conftest.er1
2407   cat conftest.err >&5
2408   echo "$as_me:2408: \$? = $ac_status" >&5
2409   (exit $ac_status); } >/dev/null; then
2410   if test -s conftest.err; then
2411     ac_cpp_err=$ac_c_preproc_warn_flag
2412   else
2413     ac_cpp_err=
2414   fi
2415 else
2416   ac_cpp_err=yes
2417 fi
2418 if test -z "$ac_cpp_err"; then
2419   :
2420 else
2421   echo "$as_me: failed program was:" >&5
2422   cat conftest.$ac_ext >&5
2423   # Broken: fails on valid input.
2424 continue
2425 fi
2426 rm -f conftest.err conftest.$ac_ext
2427
2428   # OK, works on sane cases.  Now check whether non-existent headers
2429   # can be detected and how.
2430   cat >conftest.$ac_ext <<_ACEOF
2431 #line 2431 "configure"
2432 #include "confdefs.h"
2433 #include <ac_nonexistent.h>
2434 _ACEOF
2435 if { (eval echo "$as_me:2435: \"$ac_cpp conftest.$ac_ext\"") >&5
2436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2437   ac_status=$?
2438   egrep -v '^ *\+' conftest.er1 >conftest.err
2439   rm -f conftest.er1
2440   cat conftest.err >&5
2441   echo "$as_me:2441: \$? = $ac_status" >&5
2442   (exit $ac_status); } >/dev/null; then
2443   if test -s conftest.err; then
2444     ac_cpp_err=$ac_c_preproc_warn_flag
2445   else
2446     ac_cpp_err=
2447   fi
2448 else
2449   ac_cpp_err=yes
2450 fi
2451 if test -z "$ac_cpp_err"; then
2452   # Broken: success on invalid input.
2453 continue
2454 else
2455   echo "$as_me: failed program was:" >&5
2456   cat conftest.$ac_ext >&5
2457   # Passes both tests.
2458 ac_preproc_ok=:
2459 break
2460 fi
2461 rm -f conftest.err conftest.$ac_ext
2462
2463 done
2464 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2465 rm -f conftest.err conftest.$ac_ext
2466 if $ac_preproc_ok; then
2467   :
2468 else
2469   { { echo "$as_me:2469: error: C preprocessor \"$CPP\" fails sanity check" >&5
2470 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2471    { (exit 1); exit 1; }; }
2472 fi
2473
2474 ac_ext=c
2475 ac_cpp='$CPP $CPPFLAGS'
2476 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2477 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2478 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2479 ac_main_return=return
2480
2481 if test $ac_cv_c_compiler_gnu = yes; then
2482     echo "$as_me:2482: checking whether $CC needs -traditional" >&5
2483 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2484 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2485   echo $ECHO_N "(cached) $ECHO_C" >&6
2486 else
2487     ac_pattern="Autoconf.*'x'"
2488   cat >conftest.$ac_ext <<_ACEOF
2489 #line 2489 "configure"
2490 #include "confdefs.h"
2491 #include <sgtty.h>
2492 int Autoconf = TIOCGETP;
2493 _ACEOF
2494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2495   egrep "$ac_pattern" >/dev/null 2>&1; then
2496   ac_cv_prog_gcc_traditional=yes
2497 else
2498   ac_cv_prog_gcc_traditional=no
2499 fi
2500 rm -rf conftest*
2501
2502   if test $ac_cv_prog_gcc_traditional = no; then
2503     cat >conftest.$ac_ext <<_ACEOF
2504 #line 2504 "configure"
2505 #include "confdefs.h"
2506 #include <termio.h>
2507 int Autoconf = TCGETA;
2508 _ACEOF
2509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2510   egrep "$ac_pattern" >/dev/null 2>&1; then
2511   ac_cv_prog_gcc_traditional=yes
2512 fi
2513 rm -rf conftest*
2514
2515   fi
2516 fi
2517 echo "$as_me:2517: result: $ac_cv_prog_gcc_traditional" >&5
2518 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2519   if test $ac_cv_prog_gcc_traditional = yes; then
2520     CC="$CC -traditional"
2521   fi
2522 fi
2523
2524 echo "$as_me:2524: checking whether $CC understands -c and -o together" >&5
2525 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2526 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2527   echo $ECHO_N "(cached) $ECHO_C" >&6
2528 else
2529
2530 cat > conftest.$ac_ext <<CF_EOF
2531 #include <stdio.h>
2532 int main()
2533 {
2534         ${cf_cv_main_return:-return}(0);
2535 }
2536 CF_EOF
2537 # We do the test twice because some compilers refuse to overwrite an
2538 # existing .o file with -o, though they will create one.
2539 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2540 if { (eval echo "$as_me:2540: \"$ac_try\"") >&5
2541   (eval $ac_try) 2>&5
2542   ac_status=$?
2543   echo "$as_me:2543: \$? = $ac_status" >&5
2544   (exit $ac_status); } &&
2545   test -f conftest2.$ac_objext && { (eval echo "$as_me:2545: \"$ac_try\"") >&5
2546   (eval $ac_try) 2>&5
2547   ac_status=$?
2548   echo "$as_me:2548: \$? = $ac_status" >&5
2549   (exit $ac_status); };
2550 then
2551   eval cf_cv_prog_CC_c_o=yes
2552 else
2553   eval cf_cv_prog_CC_c_o=no
2554 fi
2555 rm -rf conftest*
2556
2557 fi
2558 if test $cf_cv_prog_CC_c_o = yes; then
2559   echo "$as_me:2559: result: yes" >&5
2560 echo "${ECHO_T}yes" >&6
2561 else
2562   echo "$as_me:2562: result: no" >&5
2563 echo "${ECHO_T}no" >&6
2564 fi
2565
2566 if test "$cross_compiling" = yes ; then
2567         LDCONFIG=:
2568 else
2569         case "$cf_cv_system_name" in
2570         (dragonfly*|mirbsd*|freebsd*)
2571                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2572                 ;;
2573         (*) LDPATH=$PATH:/sbin:/usr/sbin
2574                 # Extract the first word of "ldconfig", so it can be a program name with args.
2575 set dummy ldconfig; ac_word=$2
2576 echo "$as_me:2576: checking for $ac_word" >&5
2577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2578 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2579   echo $ECHO_N "(cached) $ECHO_C" >&6
2580 else
2581   case $LDCONFIG in
2582   [\\/]* | ?:[\\/]*)
2583   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2584   ;;
2585   *)
2586   ac_save_IFS=$IFS; IFS=$ac_path_separator
2587 ac_dummy="$LDPATH"
2588 for ac_dir in $ac_dummy; do
2589   IFS=$ac_save_IFS
2590   test -z "$ac_dir" && ac_dir=.
2591   if $as_executable_p "$ac_dir/$ac_word"; then
2592    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2593    echo "$as_me:2593: found $ac_dir/$ac_word" >&5
2594    break
2595 fi
2596 done
2597
2598   ;;
2599 esac
2600 fi
2601 LDCONFIG=$ac_cv_path_LDCONFIG
2602
2603 if test -n "$LDCONFIG"; then
2604   echo "$as_me:2604: result: $LDCONFIG" >&5
2605 echo "${ECHO_T}$LDCONFIG" >&6
2606 else
2607   echo "$as_me:2607: result: no" >&5
2608 echo "${ECHO_T}no" >&6
2609 fi
2610
2611                 ;;
2612         esac
2613 fi
2614
2615 echo "$as_me:2615: checking if you want to ensure bool is consistent with C++" >&5
2616 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2617
2618 # Check whether --with-cxx or --without-cxx was given.
2619 if test "${with_cxx+set}" = set; then
2620   withval="$with_cxx"
2621   cf_with_cxx=$withval
2622 else
2623   cf_with_cxx=yes
2624 fi;
2625 echo "$as_me:2625: result: $cf_with_cxx" >&5
2626 echo "${ECHO_T}$cf_with_cxx" >&6
2627 if test "X$cf_with_cxx" = Xno ; then
2628         CXX=""
2629         GXX=""
2630 else
2631         # with autoconf 2.13, we can change the error to a warning:
2632                 ac_ext=cc
2633 ac_cpp='$CXXCPP $CPPFLAGS'
2634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2637 ac_main_return=return
2638 if test -n "$ac_tool_prefix"; then
2639   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2640   do
2641     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2642 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2643 echo "$as_me:2643: checking for $ac_word" >&5
2644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2645 if test "${ac_cv_prog_CXX+set}" = set; then
2646   echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648   if test -n "$CXX"; then
2649   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2650 else
2651   ac_save_IFS=$IFS; IFS=$ac_path_separator
2652 ac_dummy="$PATH"
2653 for ac_dir in $ac_dummy; do
2654   IFS=$ac_save_IFS
2655   test -z "$ac_dir" && ac_dir=.
2656   $as_executable_p "$ac_dir/$ac_word" || continue
2657 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2658 echo "$as_me:2658: found $ac_dir/$ac_word" >&5
2659 break
2660 done
2661
2662 fi
2663 fi
2664 CXX=$ac_cv_prog_CXX
2665 if test -n "$CXX"; then
2666   echo "$as_me:2666: result: $CXX" >&5
2667 echo "${ECHO_T}$CXX" >&6
2668 else
2669   echo "$as_me:2669: result: no" >&5
2670 echo "${ECHO_T}no" >&6
2671 fi
2672
2673     test -n "$CXX" && break
2674   done
2675 fi
2676 if test -z "$CXX"; then
2677   ac_ct_CXX=$CXX
2678   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2679 do
2680   # Extract the first word of "$ac_prog", so it can be a program name with args.
2681 set dummy $ac_prog; ac_word=$2
2682 echo "$as_me:2682: checking for $ac_word" >&5
2683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2684 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2685   echo $ECHO_N "(cached) $ECHO_C" >&6
2686 else
2687   if test -n "$ac_ct_CXX"; then
2688   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2689 else
2690   ac_save_IFS=$IFS; IFS=$ac_path_separator
2691 ac_dummy="$PATH"
2692 for ac_dir in $ac_dummy; do
2693   IFS=$ac_save_IFS
2694   test -z "$ac_dir" && ac_dir=.
2695   $as_executable_p "$ac_dir/$ac_word" || continue
2696 ac_cv_prog_ac_ct_CXX="$ac_prog"
2697 echo "$as_me:2697: found $ac_dir/$ac_word" >&5
2698 break
2699 done
2700
2701 fi
2702 fi
2703 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2704 if test -n "$ac_ct_CXX"; then
2705   echo "$as_me:2705: result: $ac_ct_CXX" >&5
2706 echo "${ECHO_T}$ac_ct_CXX" >&6
2707 else
2708   echo "$as_me:2708: result: no" >&5
2709 echo "${ECHO_T}no" >&6
2710 fi
2711
2712   test -n "$ac_ct_CXX" && break
2713 done
2714 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2715
2716   CXX=$ac_ct_CXX
2717 fi
2718
2719 # Provide some information about the compiler.
2720 echo "$as_me:2720:" \
2721      "checking for C++ compiler version" >&5
2722 ac_compiler=`set X $ac_compile; echo $2`
2723 { (eval echo "$as_me:2723: \"$ac_compiler --version </dev/null >&5\"") >&5
2724   (eval $ac_compiler --version </dev/null >&5) 2>&5
2725   ac_status=$?
2726   echo "$as_me:2726: \$? = $ac_status" >&5
2727   (exit $ac_status); }
2728 { (eval echo "$as_me:2728: \"$ac_compiler -v </dev/null >&5\"") >&5
2729   (eval $ac_compiler -v </dev/null >&5) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }
2733 { (eval echo "$as_me:2733: \"$ac_compiler -V </dev/null >&5\"") >&5
2734   (eval $ac_compiler -V </dev/null >&5) 2>&5
2735   ac_status=$?
2736   echo "$as_me:2736: \$? = $ac_status" >&5
2737   (exit $ac_status); }
2738
2739 echo "$as_me:2739: checking whether we are using the GNU C++ compiler" >&5
2740 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2741 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2742   echo $ECHO_N "(cached) $ECHO_C" >&6
2743 else
2744   cat >conftest.$ac_ext <<_ACEOF
2745 #line 2745 "configure"
2746 #include "confdefs.h"
2747
2748 int
2749 main ()
2750 {
2751 #ifndef __GNUC__
2752        choke me
2753 #endif
2754
2755   ;
2756   return 0;
2757 }
2758 _ACEOF
2759 rm -f conftest.$ac_objext
2760 if { (eval echo "$as_me:2760: \"$ac_compile\"") >&5
2761   (eval $ac_compile) 2>&5
2762   ac_status=$?
2763   echo "$as_me:2763: \$? = $ac_status" >&5
2764   (exit $ac_status); } &&
2765          { ac_try='test -s conftest.$ac_objext'
2766   { (eval echo "$as_me:2766: \"$ac_try\"") >&5
2767   (eval $ac_try) 2>&5
2768   ac_status=$?
2769   echo "$as_me:2769: \$? = $ac_status" >&5
2770   (exit $ac_status); }; }; then
2771   ac_compiler_gnu=yes
2772 else
2773   echo "$as_me: failed program was:" >&5
2774 cat conftest.$ac_ext >&5
2775 ac_compiler_gnu=no
2776 fi
2777 rm -f conftest.$ac_objext conftest.$ac_ext
2778 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2779
2780 fi
2781 echo "$as_me:2781: result: $ac_cv_cxx_compiler_gnu" >&5
2782 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2783 GXX=`test $ac_compiler_gnu = yes && echo yes`
2784 ac_test_CXXFLAGS=${CXXFLAGS+set}
2785 ac_save_CXXFLAGS=$CXXFLAGS
2786 CXXFLAGS="-g"
2787 echo "$as_me:2787: checking whether $CXX accepts -g" >&5
2788 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2789 if test "${ac_cv_prog_cxx_g+set}" = set; then
2790   echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792   cat >conftest.$ac_ext <<_ACEOF
2793 #line 2793 "configure"
2794 #include "confdefs.h"
2795
2796 int
2797 main ()
2798 {
2799
2800   ;
2801   return 0;
2802 }
2803 _ACEOF
2804 rm -f conftest.$ac_objext
2805 if { (eval echo "$as_me:2805: \"$ac_compile\"") >&5
2806   (eval $ac_compile) 2>&5
2807   ac_status=$?
2808   echo "$as_me:2808: \$? = $ac_status" >&5
2809   (exit $ac_status); } &&
2810          { ac_try='test -s conftest.$ac_objext'
2811   { (eval echo "$as_me:2811: \"$ac_try\"") >&5
2812   (eval $ac_try) 2>&5
2813   ac_status=$?
2814   echo "$as_me:2814: \$? = $ac_status" >&5
2815   (exit $ac_status); }; }; then
2816   ac_cv_prog_cxx_g=yes
2817 else
2818   echo "$as_me: failed program was:" >&5
2819 cat conftest.$ac_ext >&5
2820 ac_cv_prog_cxx_g=no
2821 fi
2822 rm -f conftest.$ac_objext conftest.$ac_ext
2823 fi
2824 echo "$as_me:2824: result: $ac_cv_prog_cxx_g" >&5
2825 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2826 if test "$ac_test_CXXFLAGS" = set; then
2827   CXXFLAGS=$ac_save_CXXFLAGS
2828 elif test $ac_cv_prog_cxx_g = yes; then
2829   if test "$GXX" = yes; then
2830     CXXFLAGS="-g -O2"
2831   else
2832     CXXFLAGS="-g"
2833   fi
2834 else
2835   if test "$GXX" = yes; then
2836     CXXFLAGS="-O2"
2837   else
2838     CXXFLAGS=
2839   fi
2840 fi
2841 for ac_declaration in \
2842    ''\
2843    '#include <stdlib.h>' \
2844    'extern "C" void std::exit (int) throw (); using std::exit;' \
2845    'extern "C" void std::exit (int); using std::exit;' \
2846    'extern "C" void exit (int) throw ();' \
2847    'extern "C" void exit (int);' \
2848    'void exit (int);'
2849 do
2850   cat >conftest.$ac_ext <<_ACEOF
2851 #line 2851 "configure"
2852 #include "confdefs.h"
2853 #include <stdlib.h>
2854 $ac_declaration
2855 int
2856 main ()
2857 {
2858 exit (42);
2859   ;
2860   return 0;
2861 }
2862 _ACEOF
2863 rm -f conftest.$ac_objext
2864 if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5
2865   (eval $ac_compile) 2>&5
2866   ac_status=$?
2867   echo "$as_me:2867: \$? = $ac_status" >&5
2868   (exit $ac_status); } &&
2869          { ac_try='test -s conftest.$ac_objext'
2870   { (eval echo "$as_me:2870: \"$ac_try\"") >&5
2871   (eval $ac_try) 2>&5
2872   ac_status=$?
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit $ac_status); }; }; then
2875   :
2876 else
2877   echo "$as_me: failed program was:" >&5
2878 cat conftest.$ac_ext >&5
2879 continue
2880 fi
2881 rm -f conftest.$ac_objext conftest.$ac_ext
2882   cat >conftest.$ac_ext <<_ACEOF
2883 #line 2883 "configure"
2884 #include "confdefs.h"
2885 $ac_declaration
2886 int
2887 main ()
2888 {
2889 exit (42);
2890   ;
2891   return 0;
2892 }
2893 _ACEOF
2894 rm -f conftest.$ac_objext
2895 if { (eval echo "$as_me:2895: \"$ac_compile\"") >&5
2896   (eval $ac_compile) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); } &&
2900          { ac_try='test -s conftest.$ac_objext'
2901   { (eval echo "$as_me:2901: \"$ac_try\"") >&5
2902   (eval $ac_try) 2>&5
2903   ac_status=$?
2904   echo "$as_me:2904: \$? = $ac_status" >&5
2905   (exit $ac_status); }; }; then
2906   break
2907 else
2908   echo "$as_me: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910 fi
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912 done
2913 rm -rf conftest*
2914 if test -n "$ac_declaration"; then
2915   echo '#ifdef __cplusplus' >>confdefs.h
2916   echo $ac_declaration      >>confdefs.h
2917   echo '#endif'             >>confdefs.h
2918 fi
2919
2920 ac_ext=c
2921 ac_cpp='$CPP $CPPFLAGS'
2922 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2923 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2925 ac_main_return=return
2926
2927         ac_ext=cc
2928 ac_cpp='$CXXCPP $CPPFLAGS'
2929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932 ac_main_return=return
2933
2934         if test "x$cf_with_cxx" != xno
2935         then
2936                 # Several of the C++ configurations do not work, particularly when
2937                 # cross-compiling (20140913 -TD)
2938                 echo "$as_me:2938: checking if $CXX works" >&5
2939 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2940
2941                 save_CPPFLAGS="$CPPFLAGS"
2942                 eval cf_includedir=${includedir}
2943                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2944
2945 cat >conftest.$ac_ext <<_ACEOF
2946 #line 2946 "configure"
2947 #include "confdefs.h"
2948
2949 #include <stdlib.h>
2950 #include <stdio.h>
2951
2952 int
2953 main ()
2954 {
2955
2956                 printf("Hello world!\n")
2957
2958   ;
2959   return 0;
2960 }
2961 _ACEOF
2962 rm -f conftest.$ac_objext
2963 if { (eval echo "$as_me:2963: \"$ac_compile\"") >&5
2964   (eval $ac_compile) 2>&5
2965   ac_status=$?
2966   echo "$as_me:2966: \$? = $ac_status" >&5
2967   (exit $ac_status); } &&
2968          { ac_try='test -s conftest.$ac_objext'
2969   { (eval echo "$as_me:2969: \"$ac_try\"") >&5
2970   (eval $ac_try) 2>&5
2971   ac_status=$?
2972   echo "$as_me:2972: \$? = $ac_status" >&5
2973   (exit $ac_status); }; }; then
2974   cf_cxx_works=yes
2975 else
2976   echo "$as_me: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2978 cf_cxx_works=no
2979 fi
2980 rm -f conftest.$ac_objext conftest.$ac_ext
2981                 CPPFLAGS="$save_CPPFLAGS"
2982
2983                 echo "$as_me:2983: result: $cf_cxx_works" >&5
2984 echo "${ECHO_T}$cf_cxx_works" >&6
2985                 if test "x$cf_cxx_works" = xno
2986                 then
2987                         { echo "$as_me:2987: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2988 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2989                         cf_with_cxx=no; CXX=""; GXX="";
2990                 fi
2991         fi
2992         ac_ext=c
2993 ac_cpp='$CPP $CPPFLAGS'
2994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2997 ac_main_return=return
2998
2999         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3000         if test "$CXX" = "g++" ; then
3001                 # Extract the first word of "g++", so it can be a program name with args.
3002 set dummy g++; ac_word=$2
3003 echo "$as_me:3003: checking for $ac_word" >&5
3004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3005 if test "${ac_cv_path_CXX+set}" = set; then
3006   echo $ECHO_N "(cached) $ECHO_C" >&6
3007 else
3008   case $CXX in
3009   [\\/]* | ?:[\\/]*)
3010   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3011   ;;
3012   *)
3013   ac_save_IFS=$IFS; IFS=$ac_path_separator
3014 ac_dummy="$PATH"
3015 for ac_dir in $ac_dummy; do
3016   IFS=$ac_save_IFS
3017   test -z "$ac_dir" && ac_dir=.
3018   if $as_executable_p "$ac_dir/$ac_word"; then
3019    ac_cv_path_CXX="$ac_dir/$ac_word"
3020    echo "$as_me:3020: found $ac_dir/$ac_word" >&5
3021    break
3022 fi
3023 done
3024
3025   ;;
3026 esac
3027 fi
3028 CXX=$ac_cv_path_CXX
3029
3030 if test -n "$CXX"; then
3031   echo "$as_me:3031: result: $CXX" >&5
3032 echo "${ECHO_T}$CXX" >&6
3033 else
3034   echo "$as_me:3034: result: no" >&5
3035 echo "${ECHO_T}no" >&6
3036 fi
3037
3038         fi
3039         case "x$CXX" in
3040         (x|xg++)
3041                 { echo "$as_me:3041: WARNING: You don't have any C++ compiler, too bad" >&5
3042 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3043                 cf_with_cxx=no; CXX=""; GXX="";
3044                 ;;
3045         esac
3046 fi
3047
3048 GXX_VERSION=none
3049 if test "$GXX" = yes; then
3050         echo "$as_me:3050: checking version of ${CXX:-g++}" >&5
3051 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3052         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3053         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3054         echo "$as_me:3054: result: $GXX_VERSION" >&5
3055 echo "${ECHO_T}$GXX_VERSION" >&6
3056 fi
3057
3058 case $GXX_VERSION in
3059 (1*|2.[0-6]*)
3060         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3061         # cf_cxx_library=no
3062         { echo "$as_me:3062: WARNING: templates do not work" >&5
3063 echo "$as_me: WARNING: templates do not work" >&2;}
3064         ;;
3065 esac
3066
3067 echo "$as_me:3067: checking if you want to build C++ binding and demo" >&5
3068 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3069
3070 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3071 if test "${with_cxx_binding+set}" = set; then
3072   withval="$with_cxx_binding"
3073   cf_with_cxx_binding=$withval
3074 else
3075   cf_with_cxx_binding=$cf_with_cxx
3076 fi;
3077 echo "$as_me:3077: result: $cf_with_cxx_binding" >&5
3078 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3079
3080 echo "$as_me:3080: checking if you want to build with Ada95" >&5
3081 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3082 echo "$as_me:3082: result: $cf_with_ada" >&5
3083 echo "${ECHO_T}$cf_with_ada" >&6
3084
3085 echo "$as_me:3085: checking if you want to install terminal database" >&5
3086 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3087
3088 # Check whether --enable-db-install or --disable-db-install was given.
3089 if test "${enable_db_install+set}" = set; then
3090   enableval="$enable_db_install"
3091   cf_with_db_install=$enableval
3092 else
3093   cf_with_db_install=yes
3094 fi;
3095 echo "$as_me:3095: result: $cf_with_db_install" >&5
3096 echo "${ECHO_T}$cf_with_db_install" >&6
3097
3098 echo "$as_me:3098: checking if you want to install manpages" >&5
3099 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3100
3101 # Check whether --with-manpages or --without-manpages was given.
3102 if test "${with_manpages+set}" = set; then
3103   withval="$with_manpages"
3104   cf_with_manpages=$withval
3105 else
3106   cf_with_manpages=yes
3107 fi;
3108 echo "$as_me:3108: result: $cf_with_manpages" >&5
3109 echo "${ECHO_T}$cf_with_manpages" >&6
3110
3111 echo "$as_me:3111: checking if you want to build programs such as tic" >&5
3112 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3113
3114 # Check whether --with-progs or --without-progs was given.
3115 if test "${with_progs+set}" = set; then
3116   withval="$with_progs"
3117   cf_with_progs=$withval
3118 else
3119   cf_with_progs=yes
3120 fi;
3121 echo "$as_me:3121: result: $cf_with_progs" >&5
3122 echo "${ECHO_T}$cf_with_progs" >&6
3123
3124 echo "$as_me:3124: checking if you want to build test-programs" >&5
3125 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3126
3127 # Check whether --with-tests or --without-tests was given.
3128 if test "${with_tests+set}" = set; then
3129   withval="$with_tests"
3130   cf_with_tests=$withval
3131 else
3132   cf_with_tests=yes
3133 fi;
3134 echo "$as_me:3134: result: $cf_with_tests" >&5
3135 echo "${ECHO_T}$cf_with_tests" >&6
3136
3137 echo "$as_me:3137: checking if you wish to install curses.h" >&5
3138 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3139
3140 # Check whether --with-curses-h or --without-curses-h was given.
3141 if test "${with_curses_h+set}" = set; then
3142   withval="$with_curses_h"
3143   with_curses_h=$withval
3144 else
3145   with_curses_h=yes
3146 fi;
3147 echo "$as_me:3147: result: $with_curses_h" >&5
3148 echo "${ECHO_T}$with_curses_h" >&6
3149
3150 modules_to_build="ncurses"
3151 if test "X$cf_with_progs" != Xno ; then
3152 modules_to_build="$modules_to_build progs tack"
3153 fi
3154 modules_to_build="$modules_to_build panel menu form"
3155
3156 test "$program_prefix" != NONE &&
3157   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3158 # Use a double $ so make ignores it.
3159 test "$program_suffix" != NONE &&
3160   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3161 # Double any \ or $.  echo might interpret backslashes.
3162 # By default was `s,x,x', remove it if useless.
3163 cat <<\_ACEOF >conftest.sed
3164 s/[\\$]/&&/g;s/;s,x,x,$//
3165 _ACEOF
3166 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3167 rm conftest.sed
3168
3169 for ac_prog in mawk gawk nawk awk
3170 do
3171   # Extract the first word of "$ac_prog", so it can be a program name with args.
3172 set dummy $ac_prog; ac_word=$2
3173 echo "$as_me:3173: checking for $ac_word" >&5
3174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3175 if test "${ac_cv_prog_AWK+set}" = set; then
3176   echo $ECHO_N "(cached) $ECHO_C" >&6
3177 else
3178   if test -n "$AWK"; then
3179   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3180 else
3181   ac_save_IFS=$IFS; IFS=$ac_path_separator
3182 ac_dummy="$PATH"
3183 for ac_dir in $ac_dummy; do
3184   IFS=$ac_save_IFS
3185   test -z "$ac_dir" && ac_dir=.
3186   $as_executable_p "$ac_dir/$ac_word" || continue
3187 ac_cv_prog_AWK="$ac_prog"
3188 echo "$as_me:3188: found $ac_dir/$ac_word" >&5
3189 break
3190 done
3191
3192 fi
3193 fi
3194 AWK=$ac_cv_prog_AWK
3195 if test -n "$AWK"; then
3196   echo "$as_me:3196: result: $AWK" >&5
3197 echo "${ECHO_T}$AWK" >&6
3198 else
3199   echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3201 fi
3202
3203   test -n "$AWK" && break
3204 done
3205
3206 test -z "$AWK" && { { echo "$as_me:3206: error: No awk program found" >&5
3207 echo "$as_me: error: No awk program found" >&2;}
3208    { (exit 1); exit 1; }; }
3209
3210 echo "$as_me:3210: checking for egrep" >&5
3211 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3212 if test "${ac_cv_prog_egrep+set}" = set; then
3213   echo $ECHO_N "(cached) $ECHO_C" >&6
3214 else
3215   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3216                 then ac_cv_prog_egrep='grep -E'
3217                 else ac_cv_prog_egrep='egrep'
3218         fi
3219 fi
3220 echo "$as_me:3220: result: $ac_cv_prog_egrep" >&5
3221 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3222         EGREP=$ac_cv_prog_egrep
3223
3224         test -z "$EGREP" && { { echo "$as_me:3224: error: No egrep program found" >&5
3225 echo "$as_me: error: No egrep program found" >&2;}
3226    { (exit 1); exit 1; }; }
3227
3228 # Find a good install program.  We prefer a C program (faster),
3229 # so one script is as good as another.  But avoid the broken or
3230 # incompatible versions:
3231 # SysV /etc/install, /usr/sbin/install
3232 # SunOS /usr/etc/install
3233 # IRIX /sbin/install
3234 # AIX /bin/install
3235 # AmigaOS /C/install, which installs bootblocks on floppy discs
3236 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3237 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3238 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3239 # ./install, which can be erroneously created by make from ./install.sh.
3240 echo "$as_me:3240: checking for a BSD compatible install" >&5
3241 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3242 if test -z "$INSTALL"; then
3243 if test "${ac_cv_path_install+set}" = set; then
3244   echo $ECHO_N "(cached) $ECHO_C" >&6
3245 else
3246     ac_save_IFS=$IFS; IFS=$ac_path_separator
3247   for ac_dir in $PATH; do
3248     IFS=$ac_save_IFS
3249     # Account for people who put trailing slashes in PATH elements.
3250     case $ac_dir/ in
3251     / | ./ | .// | /cC/* \
3252     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3253     | /usr/ucb/* ) ;;
3254     *)
3255       # OSF1 and SCO ODT 3.0 have their own names for install.
3256       # Don't use installbsd from OSF since it installs stuff as root
3257       # by default.
3258       for ac_prog in ginstall scoinst install; do
3259         if $as_executable_p "$ac_dir/$ac_prog"; then
3260           if test $ac_prog = install &&
3261             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3262             # AIX install.  It has an incompatible calling convention.
3263             :
3264           elif test $ac_prog = install &&
3265             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3266             # program-specific install script used by HP pwplus--don't use.
3267             :
3268           else
3269             ac_cv_path_install="$ac_dir/$ac_prog -c"
3270             break 2
3271           fi
3272         fi
3273       done
3274       ;;
3275     esac
3276   done
3277
3278 fi
3279   if test "${ac_cv_path_install+set}" = set; then
3280     INSTALL=$ac_cv_path_install
3281   else
3282     # As a last resort, use the slow shell script.  We don't cache a
3283     # path for INSTALL within a source directory, because that will
3284     # break other packages using the cache if that directory is
3285     # removed, or if the path is relative.
3286     INSTALL=$ac_install_sh
3287   fi
3288 fi
3289 echo "$as_me:3289: result: $INSTALL" >&5
3290 echo "${ECHO_T}$INSTALL" >&6
3291
3292 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3293 # It thinks the first close brace ends the variable substitution.
3294 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3295
3296 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3297
3298 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3299
3300 case $INSTALL in
3301 (/*)
3302         ;;
3303 (*)
3304         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3305         test -z "$cf_dir" && cf_dir=.
3306         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3307         ;;
3308 esac
3309
3310 for ac_prog in tdlint lint alint splint lclint
3311 do
3312   # Extract the first word of "$ac_prog", so it can be a program name with args.
3313 set dummy $ac_prog; ac_word=$2
3314 echo "$as_me:3314: checking for $ac_word" >&5
3315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3316 if test "${ac_cv_prog_LINT+set}" = set; then
3317   echo $ECHO_N "(cached) $ECHO_C" >&6
3318 else
3319   if test -n "$LINT"; then
3320   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3321 else
3322   ac_save_IFS=$IFS; IFS=$ac_path_separator
3323 ac_dummy="$PATH"
3324 for ac_dir in $ac_dummy; do
3325   IFS=$ac_save_IFS
3326   test -z "$ac_dir" && ac_dir=.
3327   $as_executable_p "$ac_dir/$ac_word" || continue
3328 ac_cv_prog_LINT="$ac_prog"
3329 echo "$as_me:3329: found $ac_dir/$ac_word" >&5
3330 break
3331 done
3332
3333 fi
3334 fi
3335 LINT=$ac_cv_prog_LINT
3336 if test -n "$LINT"; then
3337   echo "$as_me:3337: result: $LINT" >&5
3338 echo "${ECHO_T}$LINT" >&6
3339 else
3340   echo "$as_me:3340: result: no" >&5
3341 echo "${ECHO_T}no" >&6
3342 fi
3343
3344   test -n "$LINT" && break
3345 done
3346
3347 echo "$as_me:3347: checking whether ln -s works" >&5
3348 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3349 LN_S=$as_ln_s
3350 if test "$LN_S" = "ln -s"; then
3351   echo "$as_me:3351: result: yes" >&5
3352 echo "${ECHO_T}yes" >&6
3353 else
3354   echo "$as_me:3354: result: no, using $LN_S" >&5
3355 echo "${ECHO_T}no, using $LN_S" >&6
3356 fi
3357
3358 echo "$as_me:3358: checking if $LN_S -f options work" >&5
3359 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3360
3361 rm -f conf$$.src conf$$dst
3362 echo >conf$$.dst
3363 echo first >conf$$.src
3364 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3365         cf_prog_ln_sf=yes
3366 else
3367         cf_prog_ln_sf=no
3368 fi
3369 rm -f conf$$.dst conf$$src
3370 echo "$as_me:3370: result: $cf_prog_ln_sf" >&5
3371 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3372
3373 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3374
3375 echo "$as_me:3375: checking for long file names" >&5
3376 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3377 if test "${ac_cv_sys_long_file_names+set}" = set; then
3378   echo $ECHO_N "(cached) $ECHO_C" >&6
3379 else
3380   ac_cv_sys_long_file_names=yes
3381 # Test for long file names in all the places we know might matter:
3382 #      .                the current directory, where building will happen
3383 #      $prefix/lib      where we will be installing things
3384 #      $exec_prefix/lib likewise
3385 # eval it to expand exec_prefix.
3386 #      $TMPDIR          if set, where it might want to write temporary files
3387 # if $TMPDIR is not set:
3388 #      /tmp             where it might want to write temporary files
3389 #      /var/tmp         likewise
3390 #      /usr/tmp         likewise
3391 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3392   ac_tmpdirs=$TMPDIR
3393 else
3394   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3395 fi
3396 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3397   test -d $ac_dir || continue
3398   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3399   ac_xdir=$ac_dir/cf$$
3400   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3401   ac_tf1=$ac_xdir/conftest9012345
3402   ac_tf2=$ac_xdir/conftest9012346
3403   (echo 1 >$ac_tf1) 2>/dev/null
3404   (echo 2 >$ac_tf2) 2>/dev/null
3405   ac_val=`cat $ac_tf1 2>/dev/null`
3406   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3407     ac_cv_sys_long_file_names=no
3408     rm -rf $ac_xdir 2>/dev/null
3409     break
3410   fi
3411   rm -rf $ac_xdir 2>/dev/null
3412 done
3413 fi
3414 echo "$as_me:3414: result: $ac_cv_sys_long_file_names" >&5
3415 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3416 if test $ac_cv_sys_long_file_names = yes; then
3417
3418 cat >>confdefs.h <<\EOF
3419 #define HAVE_LONG_FILE_NAMES 1
3420 EOF
3421
3422 fi
3423
3424 # if we find pkg-config, check if we should install the ".pc" files.
3425
3426 echo "$as_me:3426: checking if you want to use pkg-config" >&5
3427 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3428
3429 # Check whether --with-pkg-config or --without-pkg-config was given.
3430 if test "${with_pkg_config+set}" = set; then
3431   withval="$with_pkg_config"
3432   cf_pkg_config=$withval
3433 else
3434   cf_pkg_config=yes
3435 fi;
3436 echo "$as_me:3436: result: $cf_pkg_config" >&5
3437 echo "${ECHO_T}$cf_pkg_config" >&6
3438
3439 case $cf_pkg_config in
3440 (no)
3441         PKG_CONFIG=none
3442         ;;
3443 (yes)
3444
3445 if test -n "$ac_tool_prefix"; then
3446   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3447 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3448 echo "$as_me:3448: checking for $ac_word" >&5
3449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3450 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3451   echo $ECHO_N "(cached) $ECHO_C" >&6
3452 else
3453   case $PKG_CONFIG in
3454   [\\/]* | ?:[\\/]*)
3455   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3456   ;;
3457   *)
3458   ac_save_IFS=$IFS; IFS=$ac_path_separator
3459 ac_dummy="$PATH"
3460 for ac_dir in $ac_dummy; do
3461   IFS=$ac_save_IFS
3462   test -z "$ac_dir" && ac_dir=.
3463   if $as_executable_p "$ac_dir/$ac_word"; then
3464    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3465    echo "$as_me:3465: found $ac_dir/$ac_word" >&5
3466    break
3467 fi
3468 done
3469
3470   ;;
3471 esac
3472 fi
3473 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3474
3475 if test -n "$PKG_CONFIG"; then
3476   echo "$as_me:3476: result: $PKG_CONFIG" >&5
3477 echo "${ECHO_T}$PKG_CONFIG" >&6
3478 else
3479   echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3481 fi
3482
3483 fi
3484 if test -z "$ac_cv_path_PKG_CONFIG"; then
3485   ac_pt_PKG_CONFIG=$PKG_CONFIG
3486   # Extract the first word of "pkg-config", so it can be a program name with args.
3487 set dummy pkg-config; ac_word=$2
3488 echo "$as_me:3488: checking for $ac_word" >&5
3489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3490 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3491   echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493   case $ac_pt_PKG_CONFIG in
3494   [\\/]* | ?:[\\/]*)
3495   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3496   ;;
3497   *)
3498   ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501   IFS=$ac_save_IFS
3502   test -z "$ac_dir" && ac_dir=.
3503   if $as_executable_p "$ac_dir/$ac_word"; then
3504    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3505    echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506    break
3507 fi
3508 done
3509
3510   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3511   ;;
3512 esac
3513 fi
3514 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3515
3516 if test -n "$ac_pt_PKG_CONFIG"; then
3517   echo "$as_me:3517: result: $ac_pt_PKG_CONFIG" >&5
3518 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3519 else
3520   echo "$as_me:3520: result: no" >&5
3521 echo "${ECHO_T}no" >&6
3522 fi
3523
3524   PKG_CONFIG=$ac_pt_PKG_CONFIG
3525 else
3526   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3527 fi
3528
3529         ;;
3530 (*)
3531         PKG_CONFIG=$withval
3532         ;;
3533 esac
3534
3535 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3536 if test "$PKG_CONFIG" != none ; then
3537
3538 if test "x$prefix" != xNONE; then
3539         cf_path_syntax="$prefix"
3540 else
3541         cf_path_syntax="$ac_default_prefix"
3542 fi
3543
3544 case ".$PKG_CONFIG" in
3545 (.\$\(*\)*|.\'*\'*)
3546         ;;
3547 (..|./*|.\\*)
3548         ;;
3549 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3550         ;;
3551 (.\${*prefix}*|.\${*dir}*)
3552         eval PKG_CONFIG="$PKG_CONFIG"
3553         case ".$PKG_CONFIG" in
3554         (.NONE/*)
3555                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3556                 ;;
3557         esac
3558         ;;
3559 (.no|.NONE/*)
3560         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3561         ;;
3562 (*)
3563         { { echo "$as_me:3563: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3564 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3565    { (exit 1); exit 1; }; }
3566         ;;
3567 esac
3568
3569 elif test "x$cf_pkg_config" != xno ; then
3570         { echo "$as_me:3570: WARNING: pkg-config is not installed" >&5
3571 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3572 fi
3573
3574 case $PKG_CONFIG in
3575 (no|none|yes)
3576         echo "$as_me:3576: checking for pkg-config library directory" >&5
3577 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3578         ;;
3579 (*)
3580         echo "$as_me:3580: checking for $PKG_CONFIG library directory" >&5
3581 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3582         ;;
3583 esac
3584
3585 PKG_CONFIG_LIBDIR=no
3586
3587 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3588 if test "${with_pkg_config_libdir+set}" = set; then
3589   withval="$with_pkg_config_libdir"
3590   PKG_CONFIG_LIBDIR=$withval
3591 else
3592   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3593 fi;
3594
3595 case x$PKG_CONFIG_LIBDIR in
3596 (x/*)
3597         ;;
3598 (xyes)
3599         # Look for the library directory using the same prefix as the executable
3600         if test "x$PKG_CONFIG" = xnone
3601         then
3602                 cf_path=$prefix
3603         else
3604                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3605         fi
3606
3607         # If you don't like using the default architecture, you have to specify the
3608         # intended library directory and corresponding compiler/linker options.
3609         #
3610         # This case allows for Debian's 2014-flavor of multiarch, along with the
3611         # most common variations before that point.  Some other variants spell the
3612         # directory differently, e.g., "pkg-config", and put it in unusual places.
3613         # pkg-config has always been poorly standardized, which is ironic...
3614         case x`(arch) 2>/dev/null` in
3615         (*64)
3616                 cf_search_path="\
3617                         $cf_path/lib/*64-linux-gnu \
3618                         $cf_path/share \
3619                         $cf_path/lib64 \
3620                         $cf_path/lib32 \
3621                         $cf_path/lib"
3622                 ;;
3623         (*)
3624                 cf_search_path="\
3625                         $cf_path/lib/*-linux-gnu \
3626                         $cf_path/share \
3627                         $cf_path/lib32 \
3628                         $cf_path/lib \
3629                         $cf_path/libdata"
3630                 ;;
3631         esac
3632
3633         test -n "$verbose" && echo "    list..." 1>&6
3634
3635 echo "${as_me:-configure}:3635: testing list... ..." 1>&5
3636
3637         for cf_config in $cf_search_path
3638         do
3639                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3640
3641 echo "${as_me:-configure}:3641: testing checking $cf_config/pkgconfig ..." 1>&5
3642
3643                 if test -d $cf_config/pkgconfig
3644                 then
3645                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3646                         echo "$as_me:3646: checking done" >&5
3647 echo $ECHO_N "checking done... $ECHO_C" >&6
3648                         break
3649                 fi
3650         done
3651         ;;
3652 (*)
3653         ;;
3654 esac
3655
3656 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3657         echo "$as_me:3657: result: $PKG_CONFIG_LIBDIR" >&5
3658 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3659 fi
3660
3661 if test "x$PKG_CONFIG" != xnone
3662 then
3663         echo "$as_me:3663: checking if we should install .pc files for $PKG_CONFIG" >&5
3664 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3665 else
3666         echo "$as_me:3666: checking if we should install .pc files" >&5
3667 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3668 fi
3669
3670 # Check whether --enable-pc-files or --disable-pc-files was given.
3671 if test "${enable_pc_files+set}" = set; then
3672   enableval="$enable_pc_files"
3673   enable_pc_files=$enableval
3674 else
3675   enable_pc_files=no
3676 fi;
3677 echo "$as_me:3677: result: $enable_pc_files" >&5
3678 echo "${ECHO_T}$enable_pc_files" >&6
3679
3680 if test "x$enable_pc_files" != xno
3681 then
3682         MAKE_PC_FILES=
3683         case "x$PKG_CONFIG_LIBDIR" in
3684         (xno|xyes)
3685                 { echo "$as_me:3685: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3686 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3687                 ;;
3688         (*)
3689
3690 if test "x$prefix" != xNONE; then
3691         cf_path_syntax="$prefix"
3692 else
3693         cf_path_syntax="$ac_default_prefix"
3694 fi
3695
3696 case ".$PKG_CONFIG_LIBDIR" in
3697 (.\$\(*\)*|.\'*\'*)
3698         ;;
3699 (..|./*|.\\*)
3700         ;;
3701 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3702         ;;
3703 (.\${*prefix}*|.\${*dir}*)
3704         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3705         case ".$PKG_CONFIG_LIBDIR" in
3706         (.NONE/*)
3707                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3708                 ;;
3709         esac
3710         ;;
3711 (.no|.NONE/*)
3712         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3713         ;;
3714 (*)
3715         { { echo "$as_me:3715: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3716 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3717    { (exit 1); exit 1; }; }
3718         ;;
3719 esac
3720
3721                 ;;
3722         esac
3723 else
3724         MAKE_PC_FILES="#"
3725 fi
3726
3727 if test -z "$MAKE_PC_FILES"
3728 then
3729         echo "$as_me:3729: checking for suffix to add to pc-files" >&5
3730 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3731
3732 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3733 if test "${with_pc_suffix+set}" = set; then
3734   withval="$with_pc_suffix"
3735   case "x$withval" in
3736         (xyes|xno)
3737                 PC_MODULE_SUFFIX=
3738                 ;;
3739         (*)     PC_MODULE_SUFFIX="$withval"
3740                 ;;
3741         esac
3742 fi;
3743         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3744         echo "$as_me:3744: result: $PC_MODULE_SUFFIX" >&5
3745 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3746         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3747
3748 fi
3749
3750 echo "$as_me:3750: checking if we should assume mixed-case filenames" >&5
3751 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3752
3753 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3754 if test "${enable_mixed_case+set}" = set; then
3755   enableval="$enable_mixed_case"
3756   enable_mixedcase=$enableval
3757 else
3758   enable_mixedcase=auto
3759 fi;
3760 echo "$as_me:3760: result: $enable_mixedcase" >&5
3761 echo "${ECHO_T}$enable_mixedcase" >&6
3762 if test "$enable_mixedcase" = "auto" ; then
3763
3764 echo "$as_me:3764: checking if filesystem supports mixed-case filenames" >&5
3765 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3766 if test "${cf_cv_mixedcase+set}" = set; then
3767   echo $ECHO_N "(cached) $ECHO_C" >&6
3768 else
3769
3770 if test "$cross_compiling" = yes ; then
3771         case $target_alias in
3772         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3773                 cf_cv_mixedcase=no
3774                 ;;
3775         (*)
3776                 cf_cv_mixedcase=yes
3777                 ;;
3778         esac
3779 else
3780         rm -f conftest CONFTEST
3781         echo test >conftest
3782         if test -f CONFTEST ; then
3783                 cf_cv_mixedcase=no
3784         else
3785                 cf_cv_mixedcase=yes
3786         fi
3787         rm -f conftest CONFTEST
3788 fi
3789
3790 fi
3791 echo "$as_me:3791: result: $cf_cv_mixedcase" >&5
3792 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3793 test "$cf_cv_mixedcase" = yes &&
3794 cat >>confdefs.h <<\EOF
3795 #define MIXEDCASE_FILENAMES 1
3796 EOF
3797
3798 else
3799         cf_cv_mixedcase=$enable_mixedcase
3800         if test "x$enable_mixedcase" = "xyes" ; then
3801
3802 cat >>confdefs.h <<\EOF
3803 #define MIXEDCASE_FILENAMES 1
3804 EOF
3805
3806         fi
3807 fi
3808
3809 # do this after mixed-case option (tags/TAGS is not as important as tic).
3810 echo "$as_me:3810: checking whether ${MAKE-make} sets \${MAKE}" >&5
3811 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3812 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3813 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3814   echo $ECHO_N "(cached) $ECHO_C" >&6
3815 else
3816   cat >conftest.make <<\EOF
3817 all:
3818         @echo 'ac_maketemp="${MAKE}"'
3819 EOF
3820 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3821 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3822 if test -n "$ac_maketemp"; then
3823   eval ac_cv_prog_make_${ac_make}_set=yes
3824 else
3825   eval ac_cv_prog_make_${ac_make}_set=no
3826 fi
3827 rm -f conftest.make
3828 fi
3829 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3830   echo "$as_me:3830: result: yes" >&5
3831 echo "${ECHO_T}yes" >&6
3832   SET_MAKE=
3833 else
3834   echo "$as_me:3834: result: no" >&5
3835 echo "${ECHO_T}no" >&6
3836   SET_MAKE="MAKE=${MAKE-make}"
3837 fi
3838
3839 for ac_prog in exctags ctags
3840 do
3841   # Extract the first word of "$ac_prog", so it can be a program name with args.
3842 set dummy $ac_prog; ac_word=$2
3843 echo "$as_me:3843: checking for $ac_word" >&5
3844 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3845 if test "${ac_cv_prog_CTAGS+set}" = set; then
3846   echo $ECHO_N "(cached) $ECHO_C" >&6
3847 else
3848   if test -n "$CTAGS"; then
3849   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3850 else
3851   ac_save_IFS=$IFS; IFS=$ac_path_separator
3852 ac_dummy="$PATH"
3853 for ac_dir in $ac_dummy; do
3854   IFS=$ac_save_IFS
3855   test -z "$ac_dir" && ac_dir=.
3856   $as_executable_p "$ac_dir/$ac_word" || continue
3857 ac_cv_prog_CTAGS="$ac_prog"
3858 echo "$as_me:3858: found $ac_dir/$ac_word" >&5
3859 break
3860 done
3861
3862 fi
3863 fi
3864 CTAGS=$ac_cv_prog_CTAGS
3865 if test -n "$CTAGS"; then
3866   echo "$as_me:3866: result: $CTAGS" >&5
3867 echo "${ECHO_T}$CTAGS" >&6
3868 else
3869   echo "$as_me:3869: result: no" >&5
3870 echo "${ECHO_T}no" >&6
3871 fi
3872
3873   test -n "$CTAGS" && break
3874 done
3875
3876 for ac_prog in exetags etags
3877 do
3878   # Extract the first word of "$ac_prog", so it can be a program name with args.
3879 set dummy $ac_prog; ac_word=$2
3880 echo "$as_me:3880: checking for $ac_word" >&5
3881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3882 if test "${ac_cv_prog_ETAGS+set}" = set; then
3883   echo $ECHO_N "(cached) $ECHO_C" >&6
3884 else
3885   if test -n "$ETAGS"; then
3886   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3887 else
3888   ac_save_IFS=$IFS; IFS=$ac_path_separator
3889 ac_dummy="$PATH"
3890 for ac_dir in $ac_dummy; do
3891   IFS=$ac_save_IFS
3892   test -z "$ac_dir" && ac_dir=.
3893   $as_executable_p "$ac_dir/$ac_word" || continue
3894 ac_cv_prog_ETAGS="$ac_prog"
3895 echo "$as_me:3895: found $ac_dir/$ac_word" >&5
3896 break
3897 done
3898
3899 fi
3900 fi
3901 ETAGS=$ac_cv_prog_ETAGS
3902 if test -n "$ETAGS"; then
3903   echo "$as_me:3903: result: $ETAGS" >&5
3904 echo "${ECHO_T}$ETAGS" >&6
3905 else
3906   echo "$as_me:3906: result: no" >&5
3907 echo "${ECHO_T}no" >&6
3908 fi
3909
3910   test -n "$ETAGS" && break
3911 done
3912
3913 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3914 set dummy ${CTAGS:-ctags}; ac_word=$2
3915 echo "$as_me:3915: checking for $ac_word" >&5
3916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3917 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3918   echo $ECHO_N "(cached) $ECHO_C" >&6
3919 else
3920   if test -n "$MAKE_LOWER_TAGS"; then
3921   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3922 else
3923   ac_save_IFS=$IFS; IFS=$ac_path_separator
3924 ac_dummy="$PATH"
3925 for ac_dir in $ac_dummy; do
3926   IFS=$ac_save_IFS
3927   test -z "$ac_dir" && ac_dir=.
3928   $as_executable_p "$ac_dir/$ac_word" || continue
3929 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3930 echo "$as_me:3930: found $ac_dir/$ac_word" >&5
3931 break
3932 done
3933
3934   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3935 fi
3936 fi
3937 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3938 if test -n "$MAKE_LOWER_TAGS"; then
3939   echo "$as_me:3939: result: $MAKE_LOWER_TAGS" >&5
3940 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3941 else
3942   echo "$as_me:3942: result: no" >&5
3943 echo "${ECHO_T}no" >&6
3944 fi
3945
3946 if test "$cf_cv_mixedcase" = yes ; then
3947         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3948 set dummy ${ETAGS:-etags}; ac_word=$2
3949 echo "$as_me:3949: checking for $ac_word" >&5
3950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3951 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3952   echo $ECHO_N "(cached) $ECHO_C" >&6
3953 else
3954   if test -n "$MAKE_UPPER_TAGS"; then
3955   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3956 else
3957   ac_save_IFS=$IFS; IFS=$ac_path_separator
3958 ac_dummy="$PATH"
3959 for ac_dir in $ac_dummy; do
3960   IFS=$ac_save_IFS
3961   test -z "$ac_dir" && ac_dir=.
3962   $as_executable_p "$ac_dir/$ac_word" || continue
3963 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3964 echo "$as_me:3964: found $ac_dir/$ac_word" >&5
3965 break
3966 done
3967
3968   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3969 fi
3970 fi
3971 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3972 if test -n "$MAKE_UPPER_TAGS"; then
3973   echo "$as_me:3973: result: $MAKE_UPPER_TAGS" >&5
3974 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3975 else
3976   echo "$as_me:3976: result: no" >&5
3977 echo "${ECHO_T}no" >&6
3978 fi
3979
3980 else
3981         MAKE_UPPER_TAGS=no
3982 fi
3983
3984 if test "$MAKE_UPPER_TAGS" = yes ; then
3985         MAKE_UPPER_TAGS=
3986 else
3987         MAKE_UPPER_TAGS="#"
3988 fi
3989
3990 if test "$MAKE_LOWER_TAGS" = yes ; then
3991         MAKE_LOWER_TAGS=
3992 else
3993         MAKE_LOWER_TAGS="#"
3994 fi
3995
3996 echo "$as_me:3996: checking for makeflags variable" >&5
3997 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3998 if test "${cf_cv_makeflags+set}" = set; then
3999   echo $ECHO_N "(cached) $ECHO_C" >&6
4000 else
4001
4002         cf_cv_makeflags=''
4003         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4004         do
4005                 cat >cf_makeflags.tmp <<CF_EOF
4006 SHELL = $SHELL
4007 all :
4008         @ echo '.$cf_option'
4009 CF_EOF
4010                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4011                 case "$cf_result" in
4012                 (.*k|.*kw)
4013                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4014                         case "$cf_result" in
4015                         (.*CC=*)        cf_cv_makeflags=
4016                                 ;;
4017                         (*)     cf_cv_makeflags=$cf_option
4018                                 ;;
4019                         esac
4020                         break
4021                         ;;
4022                 (.-)    ;;
4023                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4024                         ;;
4025                 esac
4026         done
4027         rm -f cf_makeflags.tmp
4028
4029 fi
4030 echo "$as_me:4030: result: $cf_cv_makeflags" >&5
4031 echo "${ECHO_T}$cf_cv_makeflags" >&6
4032
4033 if test -n "$ac_tool_prefix"; then
4034   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4035 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4036 echo "$as_me:4036: checking for $ac_word" >&5
4037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4038 if test "${ac_cv_prog_RANLIB+set}" = set; then
4039   echo $ECHO_N "(cached) $ECHO_C" >&6
4040 else
4041   if test -n "$RANLIB"; then
4042   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4043 else
4044   ac_save_IFS=$IFS; IFS=$ac_path_separator
4045 ac_dummy="$PATH"
4046 for ac_dir in $ac_dummy; do
4047   IFS=$ac_save_IFS
4048   test -z "$ac_dir" && ac_dir=.
4049   $as_executable_p "$ac_dir/$ac_word" || continue
4050 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4051 echo "$as_me:4051: found $ac_dir/$ac_word" >&5
4052 break
4053 done
4054
4055 fi
4056 fi
4057 RANLIB=$ac_cv_prog_RANLIB
4058 if test -n "$RANLIB"; then
4059   echo "$as_me:4059: result: $RANLIB" >&5
4060 echo "${ECHO_T}$RANLIB" >&6
4061 else
4062   echo "$as_me:4062: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064 fi
4065
4066 fi
4067 if test -z "$ac_cv_prog_RANLIB"; then
4068   ac_ct_RANLIB=$RANLIB
4069   # Extract the first word of "ranlib", so it can be a program name with args.
4070 set dummy ranlib; ac_word=$2
4071 echo "$as_me:4071: checking for $ac_word" >&5
4072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4073 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4074   echo $ECHO_N "(cached) $ECHO_C" >&6
4075 else
4076   if test -n "$ac_ct_RANLIB"; then
4077   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4078 else
4079   ac_save_IFS=$IFS; IFS=$ac_path_separator
4080 ac_dummy="$PATH"
4081 for ac_dir in $ac_dummy; do
4082   IFS=$ac_save_IFS
4083   test -z "$ac_dir" && ac_dir=.
4084   $as_executable_p "$ac_dir/$ac_word" || continue
4085 ac_cv_prog_ac_ct_RANLIB="ranlib"
4086 echo "$as_me:4086: found $ac_dir/$ac_word" >&5
4087 break
4088 done
4089
4090   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4091 fi
4092 fi
4093 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4094 if test -n "$ac_ct_RANLIB"; then
4095   echo "$as_me:4095: result: $ac_ct_RANLIB" >&5
4096 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4097 else
4098   echo "$as_me:4098: result: no" >&5
4099 echo "${ECHO_T}no" >&6
4100 fi
4101
4102   RANLIB=$ac_ct_RANLIB
4103 else
4104   RANLIB="$ac_cv_prog_RANLIB"
4105 fi
4106
4107 if test -n "$ac_tool_prefix"; then
4108   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4109 set dummy ${ac_tool_prefix}ld; ac_word=$2
4110 echo "$as_me:4110: checking for $ac_word" >&5
4111 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4112 if test "${ac_cv_prog_LD+set}" = set; then
4113   echo $ECHO_N "(cached) $ECHO_C" >&6
4114 else
4115   if test -n "$LD"; then
4116   ac_cv_prog_LD="$LD" # Let the user override the test.
4117 else
4118   ac_save_IFS=$IFS; IFS=$ac_path_separator
4119 ac_dummy="$PATH"
4120 for ac_dir in $ac_dummy; do
4121   IFS=$ac_save_IFS
4122   test -z "$ac_dir" && ac_dir=.
4123   $as_executable_p "$ac_dir/$ac_word" || continue
4124 ac_cv_prog_LD="${ac_tool_prefix}ld"
4125 echo "$as_me:4125: found $ac_dir/$ac_word" >&5
4126 break
4127 done
4128
4129 fi
4130 fi
4131 LD=$ac_cv_prog_LD
4132 if test -n "$LD"; then
4133   echo "$as_me:4133: result: $LD" >&5
4134 echo "${ECHO_T}$LD" >&6
4135 else
4136   echo "$as_me:4136: result: no" >&5
4137 echo "${ECHO_T}no" >&6
4138 fi
4139
4140 fi
4141 if test -z "$ac_cv_prog_LD"; then
4142   ac_ct_LD=$LD
4143   # Extract the first word of "ld", so it can be a program name with args.
4144 set dummy ld; ac_word=$2
4145 echo "$as_me:4145: checking for $ac_word" >&5
4146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4147 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4148   echo $ECHO_N "(cached) $ECHO_C" >&6
4149 else
4150   if test -n "$ac_ct_LD"; then
4151   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4152 else
4153   ac_save_IFS=$IFS; IFS=$ac_path_separator
4154 ac_dummy="$PATH"
4155 for ac_dir in $ac_dummy; do
4156   IFS=$ac_save_IFS
4157   test -z "$ac_dir" && ac_dir=.
4158   $as_executable_p "$ac_dir/$ac_word" || continue
4159 ac_cv_prog_ac_ct_LD="ld"
4160 echo "$as_me:4160: found $ac_dir/$ac_word" >&5
4161 break
4162 done
4163
4164   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4165 fi
4166 fi
4167 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4168 if test -n "$ac_ct_LD"; then
4169   echo "$as_me:4169: result: $ac_ct_LD" >&5
4170 echo "${ECHO_T}$ac_ct_LD" >&6
4171 else
4172   echo "$as_me:4172: result: no" >&5
4173 echo "${ECHO_T}no" >&6
4174 fi
4175
4176   LD=$ac_ct_LD
4177 else
4178   LD="$ac_cv_prog_LD"
4179 fi
4180
4181 if test -n "$ac_tool_prefix"; then
4182   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4183 set dummy ${ac_tool_prefix}ar; ac_word=$2
4184 echo "$as_me:4184: checking for $ac_word" >&5
4185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4186 if test "${ac_cv_prog_AR+set}" = set; then
4187   echo $ECHO_N "(cached) $ECHO_C" >&6
4188 else
4189   if test -n "$AR"; then
4190   ac_cv_prog_AR="$AR" # Let the user override the test.
4191 else
4192   ac_save_IFS=$IFS; IFS=$ac_path_separator
4193 ac_dummy="$PATH"
4194 for ac_dir in $ac_dummy; do
4195   IFS=$ac_save_IFS
4196   test -z "$ac_dir" && ac_dir=.
4197   $as_executable_p "$ac_dir/$ac_word" || continue
4198 ac_cv_prog_AR="${ac_tool_prefix}ar"
4199 echo "$as_me:4199: found $ac_dir/$ac_word" >&5
4200 break
4201 done
4202
4203 fi
4204 fi
4205 AR=$ac_cv_prog_AR
4206 if test -n "$AR"; then
4207   echo "$as_me:4207: result: $AR" >&5
4208 echo "${ECHO_T}$AR" >&6
4209 else
4210   echo "$as_me:4210: result: no" >&5
4211 echo "${ECHO_T}no" >&6
4212 fi
4213
4214 fi
4215 if test -z "$ac_cv_prog_AR"; then
4216   ac_ct_AR=$AR
4217   # Extract the first word of "ar", so it can be a program name with args.
4218 set dummy ar; ac_word=$2
4219 echo "$as_me:4219: checking for $ac_word" >&5
4220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4221 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4222   echo $ECHO_N "(cached) $ECHO_C" >&6
4223 else
4224   if test -n "$ac_ct_AR"; then
4225   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4226 else
4227   ac_save_IFS=$IFS; IFS=$ac_path_separator
4228 ac_dummy="$PATH"
4229 for ac_dir in $ac_dummy; do
4230   IFS=$ac_save_IFS
4231   test -z "$ac_dir" && ac_dir=.
4232   $as_executable_p "$ac_dir/$ac_word" || continue
4233 ac_cv_prog_ac_ct_AR="ar"
4234 echo "$as_me:4234: found $ac_dir/$ac_word" >&5
4235 break
4236 done
4237
4238   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4239 fi
4240 fi
4241 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4242 if test -n "$ac_ct_AR"; then
4243   echo "$as_me:4243: result: $ac_ct_AR" >&5
4244 echo "${ECHO_T}$ac_ct_AR" >&6
4245 else
4246   echo "$as_me:4246: result: no" >&5
4247 echo "${ECHO_T}no" >&6
4248 fi
4249
4250   AR=$ac_ct_AR
4251 else
4252   AR="$ac_cv_prog_AR"
4253 fi
4254
4255 if test -n "$ac_tool_prefix"; then
4256   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4257 set dummy ${ac_tool_prefix}nm; ac_word=$2
4258 echo "$as_me:4258: checking for $ac_word" >&5
4259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4260 if test "${ac_cv_prog_NM+set}" = set; then
4261   echo $ECHO_N "(cached) $ECHO_C" >&6
4262 else
4263   if test -n "$NM"; then
4264   ac_cv_prog_NM="$NM" # Let the user override the test.
4265 else
4266   ac_save_IFS=$IFS; IFS=$ac_path_separator
4267 ac_dummy="$PATH"
4268 for ac_dir in $ac_dummy; do
4269   IFS=$ac_save_IFS
4270   test -z "$ac_dir" && ac_dir=.
4271   $as_executable_p "$ac_dir/$ac_word" || continue
4272 ac_cv_prog_NM="${ac_tool_prefix}nm"
4273 echo "$as_me:4273: found $ac_dir/$ac_word" >&5
4274 break
4275 done
4276
4277 fi
4278 fi
4279 NM=$ac_cv_prog_NM
4280 if test -n "$NM"; then
4281   echo "$as_me:4281: result: $NM" >&5
4282 echo "${ECHO_T}$NM" >&6
4283 else
4284   echo "$as_me:4284: result: no" >&5
4285 echo "${ECHO_T}no" >&6
4286 fi
4287
4288 fi
4289 if test -z "$ac_cv_prog_NM"; then
4290   ac_ct_NM=$NM
4291   # Extract the first word of "nm", so it can be a program name with args.
4292 set dummy nm; ac_word=$2
4293 echo "$as_me:4293: checking for $ac_word" >&5
4294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4295 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4296   echo $ECHO_N "(cached) $ECHO_C" >&6
4297 else
4298   if test -n "$ac_ct_NM"; then
4299   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4300 else
4301   ac_save_IFS=$IFS; IFS=$ac_path_separator
4302 ac_dummy="$PATH"
4303 for ac_dir in $ac_dummy; do
4304   IFS=$ac_save_IFS
4305   test -z "$ac_dir" && ac_dir=.
4306   $as_executable_p "$ac_dir/$ac_word" || continue
4307 ac_cv_prog_ac_ct_NM="nm"
4308 echo "$as_me:4308: found $ac_dir/$ac_word" >&5
4309 break
4310 done
4311
4312   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4313 fi
4314 fi
4315 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4316 if test -n "$ac_ct_NM"; then
4317   echo "$as_me:4317: result: $ac_ct_NM" >&5
4318 echo "${ECHO_T}$ac_ct_NM" >&6
4319 else
4320   echo "$as_me:4320: result: no" >&5
4321 echo "${ECHO_T}no" >&6
4322 fi
4323
4324   NM=$ac_ct_NM
4325 else
4326   NM="$ac_cv_prog_NM"
4327 fi
4328
4329 if test -n "$ac_tool_prefix"; then
4330   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4331 set dummy ${ac_tool_prefix}ar; ac_word=$2
4332 echo "$as_me:4332: checking for $ac_word" >&5
4333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4334 if test "${ac_cv_prog_AR+set}" = set; then
4335   echo $ECHO_N "(cached) $ECHO_C" >&6
4336 else
4337   if test -n "$AR"; then
4338   ac_cv_prog_AR="$AR" # Let the user override the test.
4339 else
4340   ac_save_IFS=$IFS; IFS=$ac_path_separator
4341 ac_dummy="$PATH"
4342 for ac_dir in $ac_dummy; do
4343   IFS=$ac_save_IFS
4344   test -z "$ac_dir" && ac_dir=.
4345   $as_executable_p "$ac_dir/$ac_word" || continue
4346 ac_cv_prog_AR="${ac_tool_prefix}ar"
4347 echo "$as_me:4347: found $ac_dir/$ac_word" >&5
4348 break
4349 done
4350
4351 fi
4352 fi
4353 AR=$ac_cv_prog_AR
4354 if test -n "$AR"; then
4355   echo "$as_me:4355: result: $AR" >&5
4356 echo "${ECHO_T}$AR" >&6
4357 else
4358   echo "$as_me:4358: result: no" >&5
4359 echo "${ECHO_T}no" >&6
4360 fi
4361
4362 fi
4363 if test -z "$ac_cv_prog_AR"; then
4364   ac_ct_AR=$AR
4365   # Extract the first word of "ar", so it can be a program name with args.
4366 set dummy ar; ac_word=$2
4367 echo "$as_me:4367: checking for $ac_word" >&5
4368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4369 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   if test -n "$ac_ct_AR"; then
4373   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4374 else
4375   ac_save_IFS=$IFS; IFS=$ac_path_separator
4376 ac_dummy="$PATH"
4377 for ac_dir in $ac_dummy; do
4378   IFS=$ac_save_IFS
4379   test -z "$ac_dir" && ac_dir=.
4380   $as_executable_p "$ac_dir/$ac_word" || continue
4381 ac_cv_prog_ac_ct_AR="ar"
4382 echo "$as_me:4382: found $ac_dir/$ac_word" >&5
4383 break
4384 done
4385
4386   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4387 fi
4388 fi
4389 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4390 if test -n "$ac_ct_AR"; then
4391   echo "$as_me:4391: result: $ac_ct_AR" >&5
4392 echo "${ECHO_T}$ac_ct_AR" >&6
4393 else
4394   echo "$as_me:4394: result: no" >&5
4395 echo "${ECHO_T}no" >&6
4396 fi
4397
4398   AR=$ac_ct_AR
4399 else
4400   AR="$ac_cv_prog_AR"
4401 fi
4402
4403 echo "$as_me:4403: checking for options to update archives" >&5
4404 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4405 if test "${cf_cv_ar_flags+set}" = set; then
4406   echo $ECHO_N "(cached) $ECHO_C" >&6
4407 else
4408
4409         cf_cv_ar_flags=unknown
4410         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4411         do
4412
4413                 # check if $ARFLAGS already contains this choice
4414                 if test "x$ARFLAGS" != "x" ; then
4415                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4416                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4417                                 cf_cv_ar_flags=
4418                                 break
4419                         fi
4420                 fi
4421
4422                 rm -f conftest.$ac_cv_objext
4423                 rm -f conftest.a
4424
4425                 cat >conftest.$ac_ext <<EOF
4426 #line 4426 "configure"
4427 int     testdata[3] = { 123, 456, 789 };
4428 EOF
4429                 if { (eval echo "$as_me:4429: \"$ac_compile\"") >&5
4430   (eval $ac_compile) 2>&5
4431   ac_status=$?
4432   echo "$as_me:4432: \$? = $ac_status" >&5
4433   (exit $ac_status); } ; then
4434                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4435                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4436                         if test -f conftest.a ; then
4437                                 cf_cv_ar_flags=$cf_ar_flags
4438                                 break
4439                         fi
4440                 else
4441                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4442
4443 echo "${as_me:-configure}:4443: testing cannot compile test-program ..." 1>&5
4444
4445                         break
4446                 fi
4447         done
4448         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4449
4450 fi
4451 echo "$as_me:4451: result: $cf_cv_ar_flags" >&5
4452 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4453
4454 if test -n "$ARFLAGS" ; then
4455         if test -n "$cf_cv_ar_flags" ; then
4456                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4457         fi
4458 else
4459         ARFLAGS=$cf_cv_ar_flags
4460 fi
4461
4462 echo "$as_me:4462: checking if you have specified an install-prefix" >&5
4463 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4464
4465 # Check whether --with-install-prefix or --without-install-prefix was given.
4466 if test "${with_install_prefix+set}" = set; then
4467   withval="$with_install_prefix"
4468   case "x$withval" in
4469         (xyes|xno)
4470                 ;;
4471         (*)     DESTDIR="$withval"
4472                 ;;
4473         esac
4474 fi;
4475 echo "$as_me:4475: result: $DESTDIR" >&5
4476 echo "${ECHO_T}$DESTDIR" >&6
4477
4478 ###############################################################################
4479
4480 # If we're cross-compiling, allow the user to override the tools and their
4481 # options.  The configure script is oriented toward identifying the host
4482 # compiler, etc., but we need a build compiler to generate parts of the source.
4483
4484 if test "$cross_compiling" = yes ; then
4485
4486         # defaults that we might want to override
4487         : ${BUILD_CFLAGS:=''}
4488         : ${BUILD_CPPFLAGS:=''}
4489         : ${BUILD_LDFLAGS:=''}
4490         : ${BUILD_LIBS:=''}
4491         : ${BUILD_EXEEXT:='$x'}
4492         : ${BUILD_OBJEXT:='o'}
4493
4494 # Check whether --with-build-cc or --without-build-cc was given.
4495 if test "${with_build_cc+set}" = set; then
4496   withval="$with_build_cc"
4497   BUILD_CC="$withval"
4498 else
4499   for ac_prog in gcc cc cl
4500 do
4501   # Extract the first word of "$ac_prog", so it can be a program name with args.
4502 set dummy $ac_prog; ac_word=$2
4503 echo "$as_me:4503: checking for $ac_word" >&5
4504 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4505 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4506   echo $ECHO_N "(cached) $ECHO_C" >&6
4507 else
4508   if test -n "$BUILD_CC"; then
4509   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4510 else
4511   ac_save_IFS=$IFS; IFS=$ac_path_separator
4512 ac_dummy="$PATH"
4513 for ac_dir in $ac_dummy; do
4514   IFS=$ac_save_IFS
4515   test -z "$ac_dir" && ac_dir=.
4516   $as_executable_p "$ac_dir/$ac_word" || continue
4517 ac_cv_prog_BUILD_CC="$ac_prog"
4518 echo "$as_me:4518: found $ac_dir/$ac_word" >&5
4519 break
4520 done
4521
4522 fi
4523 fi
4524 BUILD_CC=$ac_cv_prog_BUILD_CC
4525 if test -n "$BUILD_CC"; then
4526   echo "$as_me:4526: result: $BUILD_CC" >&5
4527 echo "${ECHO_T}$BUILD_CC" >&6
4528 else
4529   echo "$as_me:4529: result: no" >&5
4530 echo "${ECHO_T}no" >&6
4531 fi
4532
4533   test -n "$BUILD_CC" && break
4534 done
4535
4536 fi;
4537         echo "$as_me:4537: checking for native build C compiler" >&5
4538 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4539         echo "$as_me:4539: result: $BUILD_CC" >&5
4540 echo "${ECHO_T}$BUILD_CC" >&6
4541
4542         echo "$as_me:4542: checking for native build C preprocessor" >&5
4543 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4544
4545 # Check whether --with-build-cpp or --without-build-cpp was given.
4546 if test "${with_build_cpp+set}" = set; then
4547   withval="$with_build_cpp"
4548   BUILD_CPP="$withval"
4549 else
4550   BUILD_CPP='${BUILD_CC} -E'
4551 fi;
4552         echo "$as_me:4552: result: $BUILD_CPP" >&5
4553 echo "${ECHO_T}$BUILD_CPP" >&6
4554
4555         echo "$as_me:4555: checking for native build C flags" >&5
4556 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4557
4558 # Check whether --with-build-cflags or --without-build-cflags was given.
4559 if test "${with_build_cflags+set}" = set; then
4560   withval="$with_build_cflags"
4561   BUILD_CFLAGS="$withval"
4562 fi;
4563         echo "$as_me:4563: result: $BUILD_CFLAGS" >&5
4564 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4565
4566         echo "$as_me:4566: checking for native build C preprocessor-flags" >&5
4567 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4568
4569 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4570 if test "${with_build_cppflags+set}" = set; then
4571   withval="$with_build_cppflags"
4572   BUILD_CPPFLAGS="$withval"
4573 fi;
4574         echo "$as_me:4574: result: $BUILD_CPPFLAGS" >&5
4575 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4576
4577         echo "$as_me:4577: checking for native build linker-flags" >&5
4578 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4579
4580 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4581 if test "${with_build_ldflags+set}" = set; then
4582   withval="$with_build_ldflags"
4583   BUILD_LDFLAGS="$withval"
4584 fi;
4585         echo "$as_me:4585: result: $BUILD_LDFLAGS" >&5
4586 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4587
4588         echo "$as_me:4588: checking for native build linker-libraries" >&5
4589 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4590
4591 # Check whether --with-build-libs or --without-build-libs was given.
4592 if test "${with_build_libs+set}" = set; then
4593   withval="$with_build_libs"
4594   BUILD_LIBS="$withval"
4595 fi;
4596         echo "$as_me:4596: result: $BUILD_LIBS" >&5
4597 echo "${ECHO_T}$BUILD_LIBS" >&6
4598
4599         # this assumes we're on Unix.
4600         BUILD_EXEEXT=
4601         BUILD_OBJEXT=o
4602
4603         : ${BUILD_CC:='${CC}'}
4604
4605         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4606                 { { echo "$as_me:4606: error: Cross-build requires two compilers.
4607 Use --with-build-cc to specify the native compiler." >&5
4608 echo "$as_me: error: Cross-build requires two compilers.
4609 Use --with-build-cc to specify the native compiler." >&2;}
4610    { (exit 1); exit 1; }; }
4611         fi
4612
4613 else
4614         : ${BUILD_CC:='${CC}'}
4615         : ${BUILD_CPP:='${CPP}'}
4616         : ${BUILD_CFLAGS:='${CFLAGS}'}
4617         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4618         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4619         : ${BUILD_LIBS:='${LIBS}'}
4620         : ${BUILD_EXEEXT:='$x'}
4621         : ${BUILD_OBJEXT:='o'}
4622 fi
4623
4624 ###############################################################################
4625
4626 ### Options to allow the user to specify the set of libraries which are used.
4627 ### Use "--without-normal --with-shared" to allow the default model to be
4628 ### shared, for example.
4629 cf_list_models=""
4630
4631 echo "$as_me:4631: checking if libtool -version-number should be used" >&5
4632 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4633
4634 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4635 if test "${enable_libtool_version+set}" = set; then
4636   enableval="$enable_libtool_version"
4637   test "$enableval" != no && enableval=yes
4638         if test "$enableval" != "yes" ; then
4639     cf_libtool_version=no
4640         else
4641                 cf_libtool_version=yes
4642         fi
4643 else
4644   enableval=yes
4645         cf_libtool_version=yes
4646
4647 fi;
4648 echo "$as_me:4648: result: $cf_libtool_version" >&5
4649 echo "${ECHO_T}$cf_libtool_version" >&6
4650
4651 if test "$cf_libtool_version" = yes ; then
4652         LIBTOOL_VERSION="-version-number"
4653 else
4654         LIBTOOL_VERSION="-version-info"
4655         case "x$VERSION" in
4656         (x)
4657                 { echo "$as_me:4657: WARNING: VERSION was not set" >&5
4658 echo "$as_me: WARNING: VERSION was not set" >&2;}
4659                 ;;
4660         (x*.*.*)
4661                 ABI_VERSION="$VERSION"
4662                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4663
4664 echo "${as_me:-configure}:4664: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4665
4666                 ;;
4667         (x*:*:*)
4668                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4669                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4670
4671 echo "${as_me:-configure}:4671: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4672
4673                 ;;
4674         (*)
4675                 { echo "$as_me:4675: WARNING: unexpected VERSION value: $VERSION" >&5
4676 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4677                 ;;
4678         esac
4679 fi
4680
4681 LIBTOOL=
4682
4683 # common library maintenance symbols that are convenient for libtool scripts:
4684 LIB_CREATE='${AR} -cr'
4685 LIB_OBJECT='${OBJECTS}'
4686 LIB_SUFFIX=.a
4687 LIB_PREP="$RANLIB"
4688
4689 # symbols used to prop libtool up to enable it to determine what it should be
4690 # doing:
4691 LIB_CLEAN=
4692 LIB_COMPILE=
4693 LIB_LINK='${CC}'
4694 LIB_INSTALL=
4695 LIB_UNINSTALL=
4696
4697 echo "$as_me:4697: checking if you want to build libraries with libtool" >&5
4698 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4699
4700 # Check whether --with-libtool or --without-libtool was given.
4701 if test "${with_libtool+set}" = set; then
4702   withval="$with_libtool"
4703   with_libtool=$withval
4704 else
4705   with_libtool=no
4706 fi;
4707 echo "$as_me:4707: result: $with_libtool" >&5
4708 echo "${ECHO_T}$with_libtool" >&6
4709 if test "$with_libtool" != "no"; then
4710
4711         if test "$with_libtool" != "yes" ; then
4712
4713 if test "x$prefix" != xNONE; then
4714         cf_path_syntax="$prefix"
4715 else
4716         cf_path_syntax="$ac_default_prefix"
4717 fi
4718
4719 case ".$with_libtool" in
4720 (.\$\(*\)*|.\'*\'*)
4721         ;;
4722 (..|./*|.\\*)
4723         ;;
4724 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4725         ;;
4726 (.\${*prefix}*|.\${*dir}*)
4727         eval with_libtool="$with_libtool"
4728         case ".$with_libtool" in
4729         (.NONE/*)
4730                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4731                 ;;
4732         esac
4733         ;;
4734 (.no|.NONE/*)
4735         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4736         ;;
4737 (*)
4738         { { echo "$as_me:4738: error: expected a pathname, not \"$with_libtool\"" >&5
4739 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4740    { (exit 1); exit 1; }; }
4741         ;;
4742 esac
4743
4744                 LIBTOOL=$with_libtool
4745         else
4746                 if test -n "$ac_tool_prefix"; then
4747   for ac_prog in libtool glibtool
4748   do
4749     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4750 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4751 echo "$as_me:4751: checking for $ac_word" >&5
4752 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4753 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4754   echo $ECHO_N "(cached) $ECHO_C" >&6
4755 else
4756   if test -n "$LIBTOOL"; then
4757   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4758 else
4759   ac_save_IFS=$IFS; IFS=$ac_path_separator
4760 ac_dummy="$PATH"
4761 for ac_dir in $ac_dummy; do
4762   IFS=$ac_save_IFS
4763   test -z "$ac_dir" && ac_dir=.
4764   $as_executable_p "$ac_dir/$ac_word" || continue
4765 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4766 echo "$as_me:4766: found $ac_dir/$ac_word" >&5
4767 break
4768 done
4769
4770 fi
4771 fi
4772 LIBTOOL=$ac_cv_prog_LIBTOOL
4773 if test -n "$LIBTOOL"; then
4774   echo "$as_me:4774: result: $LIBTOOL" >&5
4775 echo "${ECHO_T}$LIBTOOL" >&6
4776 else
4777   echo "$as_me:4777: result: no" >&5
4778 echo "${ECHO_T}no" >&6
4779 fi
4780
4781     test -n "$LIBTOOL" && break
4782   done
4783 fi
4784 if test -z "$LIBTOOL"; then
4785   ac_ct_LIBTOOL=$LIBTOOL
4786   for ac_prog in libtool glibtool
4787 do
4788   # Extract the first word of "$ac_prog", so it can be a program name with args.
4789 set dummy $ac_prog; ac_word=$2
4790 echo "$as_me:4790: checking for $ac_word" >&5
4791 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4792 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4793   echo $ECHO_N "(cached) $ECHO_C" >&6
4794 else
4795   if test -n "$ac_ct_LIBTOOL"; then
4796   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4797 else
4798   ac_save_IFS=$IFS; IFS=$ac_path_separator
4799 ac_dummy="$PATH"
4800 for ac_dir in $ac_dummy; do
4801   IFS=$ac_save_IFS
4802   test -z "$ac_dir" && ac_dir=.
4803   $as_executable_p "$ac_dir/$ac_word" || continue
4804 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4805 echo "$as_me:4805: found $ac_dir/$ac_word" >&5
4806 break
4807 done
4808
4809 fi
4810 fi
4811 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4812 if test -n "$ac_ct_LIBTOOL"; then
4813   echo "$as_me:4813: result: $ac_ct_LIBTOOL" >&5
4814 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4815 else
4816   echo "$as_me:4816: result: no" >&5
4817 echo "${ECHO_T}no" >&6
4818 fi
4819
4820   test -n "$ac_ct_LIBTOOL" && break
4821 done
4822 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4823
4824   LIBTOOL=$ac_ct_LIBTOOL
4825 fi
4826
4827 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4828 then
4829         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.].*//'`
4830 else
4831         cf_cv_libtool_version=
4832 fi
4833 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4834
4835                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4836                 then
4837
4838 unset ac_cv_prog_ac_ct_LIBTOOL
4839 unset ac_ct_LIBTOOL
4840 unset LIBTOOL
4841
4842                         if test -n "$ac_tool_prefix"; then
4843   for ac_prog in glibtool
4844   do
4845     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4846 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4847 echo "$as_me:4847: checking for $ac_word" >&5
4848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4849 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4850   echo $ECHO_N "(cached) $ECHO_C" >&6
4851 else
4852   if test -n "$LIBTOOL"; then
4853   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4854 else
4855   ac_save_IFS=$IFS; IFS=$ac_path_separator
4856 ac_dummy="$PATH"
4857 for ac_dir in $ac_dummy; do
4858   IFS=$ac_save_IFS
4859   test -z "$ac_dir" && ac_dir=.
4860   $as_executable_p "$ac_dir/$ac_word" || continue
4861 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4862 echo "$as_me:4862: found $ac_dir/$ac_word" >&5
4863 break
4864 done
4865
4866 fi
4867 fi
4868 LIBTOOL=$ac_cv_prog_LIBTOOL
4869 if test -n "$LIBTOOL"; then
4870   echo "$as_me:4870: result: $LIBTOOL" >&5
4871 echo "${ECHO_T}$LIBTOOL" >&6
4872 else
4873   echo "$as_me:4873: result: no" >&5
4874 echo "${ECHO_T}no" >&6
4875 fi
4876
4877     test -n "$LIBTOOL" && break
4878   done
4879 fi
4880 if test -z "$LIBTOOL"; then
4881   ac_ct_LIBTOOL=$LIBTOOL
4882   for ac_prog in glibtool
4883 do
4884   # Extract the first word of "$ac_prog", so it can be a program name with args.
4885 set dummy $ac_prog; ac_word=$2
4886 echo "$as_me:4886: checking for $ac_word" >&5
4887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4888 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4889   echo $ECHO_N "(cached) $ECHO_C" >&6
4890 else
4891   if test -n "$ac_ct_LIBTOOL"; then
4892   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4893 else
4894   ac_save_IFS=$IFS; IFS=$ac_path_separator
4895 ac_dummy="$PATH"
4896 for ac_dir in $ac_dummy; do
4897   IFS=$ac_save_IFS
4898   test -z "$ac_dir" && ac_dir=.
4899   $as_executable_p "$ac_dir/$ac_word" || continue
4900 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4901 echo "$as_me:4901: found $ac_dir/$ac_word" >&5
4902 break
4903 done
4904
4905 fi
4906 fi
4907 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4908 if test -n "$ac_ct_LIBTOOL"; then
4909   echo "$as_me:4909: result: $ac_ct_LIBTOOL" >&5
4910 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4911 else
4912   echo "$as_me:4912: result: no" >&5
4913 echo "${ECHO_T}no" >&6
4914 fi
4915
4916   test -n "$ac_ct_LIBTOOL" && break
4917 done
4918 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4919
4920   LIBTOOL=$ac_ct_LIBTOOL
4921 fi
4922
4923 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4924 then
4925         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.].*//'`
4926 else
4927         cf_cv_libtool_version=
4928 fi
4929 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4930
4931                 fi
4932         fi
4933         if test -z "$LIBTOOL" ; then
4934                 { { echo "$as_me:4934: error: Cannot find libtool" >&5
4935 echo "$as_me: error: Cannot find libtool" >&2;}
4936    { (exit 1); exit 1; }; }
4937         fi
4938         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4939         LIB_OBJECT='${OBJECTS:.o=.lo}'
4940         LIB_SUFFIX=.la
4941         LIB_CLEAN='${LIBTOOL} --mode=clean'
4942         LIB_COMPILE='${LIBTOOL} --mode=compile'
4943         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4944         LIB_INSTALL='${LIBTOOL} --mode=install'
4945         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4946         LIB_PREP=:
4947
4948 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4949 then
4950         echo "$as_me:4950: checking version of $LIBTOOL" >&5
4951 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4952
4953 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4954 then
4955         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.].*//'`
4956 else
4957         cf_cv_libtool_version=
4958 fi
4959 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4960
4961         echo "$as_me:4961: result: $cf_cv_libtool_version" >&5
4962 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4963         if test -z "$cf_cv_libtool_version" ; then
4964                 { { echo "$as_me:4964: error: This is not GNU libtool" >&5
4965 echo "$as_me: error: This is not GNU libtool" >&2;}
4966    { (exit 1); exit 1; }; }
4967         fi
4968 else
4969         { { echo "$as_me:4969: error: GNU libtool has not been found" >&5
4970 echo "$as_me: error: GNU libtool has not been found" >&2;}
4971    { (exit 1); exit 1; }; }
4972 fi
4973
4974         # special hack to add -no-undefined (which libtool should do for itself)
4975         LT_UNDEF=
4976         case "$cf_cv_system_name" in
4977         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
4978                 LT_UNDEF=-no-undefined
4979                 ;;
4980         esac
4981
4982         # special hack to add --tag option for C++ compiler
4983         case $cf_cv_libtool_version in
4984         (1.[5-9]*|[2-9].[0-9.a-z]*)
4985                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4986                 LIBTOOL="$LIBTOOL --tag=CC"
4987                 ;;
4988         (*)
4989                 LIBTOOL_CXX="$LIBTOOL"
4990                 ;;
4991         esac
4992 else
4993         LIBTOOL=""
4994         LIBTOOL_CXX=""
4995 fi
4996
4997 test -z "$LIBTOOL" && ECHO_LT=
4998
4999 if test "$with_libtool" != "no" ; then
5000
5001 cf_list_models="$cf_list_models libtool"
5002
5003 else
5004
5005 echo "$as_me:5005: checking if you want to build shared libraries" >&5
5006 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5007
5008 # Check whether --with-shared or --without-shared was given.
5009 if test "${with_shared+set}" = set; then
5010   withval="$with_shared"
5011   with_shared=$withval
5012 else
5013   with_shared=no
5014 fi;
5015 echo "$as_me:5015: result: $with_shared" >&5
5016 echo "${ECHO_T}$with_shared" >&6
5017 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5018
5019 echo "$as_me:5019: checking if you want to build static libraries" >&5
5020 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5021
5022 # Check whether --with-normal or --without-normal was given.
5023 if test "${with_normal+set}" = set; then
5024   withval="$with_normal"
5025   with_normal=$withval
5026 else
5027   with_normal=yes
5028 fi;
5029 echo "$as_me:5029: result: $with_normal" >&5
5030 echo "${ECHO_T}$with_normal" >&6
5031 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5032
5033 echo "$as_me:5033: checking if you want to build debug libraries" >&5
5034 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5035
5036 # Check whether --with-debug or --without-debug was given.
5037 if test "${with_debug+set}" = set; then
5038   withval="$with_debug"
5039   with_debug=$withval
5040 else
5041   with_debug=yes
5042 fi;
5043 echo "$as_me:5043: result: $with_debug" >&5
5044 echo "${ECHO_T}$with_debug" >&6
5045 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5046
5047 echo "$as_me:5047: checking if you want to build profiling libraries" >&5
5048 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5049
5050 # Check whether --with-profile or --without-profile was given.
5051 if test "${with_profile+set}" = set; then
5052   withval="$with_profile"
5053   with_profile=$withval
5054 else
5055   with_profile=no
5056 fi;
5057 echo "$as_me:5057: result: $with_profile" >&5
5058 echo "${ECHO_T}$with_profile" >&6
5059 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5060
5061 fi
5062
5063 if test "X$cf_with_cxx_binding" != Xno; then
5064 if test "x$with_shared" = "xyes"; then
5065 echo "$as_me:5065: checking if you want to build C++ shared libraries" >&5
5066 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5067
5068 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5069 if test "${with_cxx_shared+set}" = set; then
5070   withval="$with_cxx_shared"
5071   with_shared_cxx=$withval
5072 else
5073   with_shared_cxx=no
5074 fi;
5075 echo "$as_me:5075: result: $with_shared_cxx" >&5
5076 echo "${ECHO_T}$with_shared_cxx" >&6
5077 fi
5078 fi
5079
5080 ###############################################################################
5081
5082 echo "$as_me:5082: checking for specified models" >&5
5083 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5084 test -z "$cf_list_models" && cf_list_models=normal
5085 test "$with_libtool" != "no" && cf_list_models=libtool
5086 echo "$as_me:5086: result: $cf_list_models" >&5
5087 echo "${ECHO_T}$cf_list_models" >&6
5088
5089 ### Use the first model as the default, and save its suffix for use in building
5090 ### up test-applications.
5091 echo "$as_me:5091: checking for default model" >&5
5092 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5093 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5094 echo "$as_me:5094: result: $DFT_LWR_MODEL" >&5
5095 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5096
5097 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5098
5099 TICS_NAME=tic
5100
5101 TINFO_NAME=tinfo
5102
5103 LIB_NAME=ncurses
5104
5105 LIB_DIR=../lib
5106 LIB_2ND=../../lib
5107
5108 echo "$as_me:5108: checking if you want to have a library-prefix" >&5
5109 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5110
5111 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5112 if test "${with_lib_prefix+set}" = set; then
5113   withval="$with_lib_prefix"
5114   with_lib_prefix=$withval
5115 else
5116   with_lib_prefix=auto
5117 fi;
5118 echo "$as_me:5118: result: $with_lib_prefix" >&5
5119 echo "${ECHO_T}$with_lib_prefix" >&6
5120
5121 if test $with_lib_prefix = auto
5122 then
5123
5124         case $cf_cv_system_name in
5125         (OS/2*|os2*)
5126                 if test "$DFT_LWR_MODEL" = libtool; then
5127                         LIB_PREFIX='lib'
5128                 else
5129                         LIB_PREFIX=''
5130                 fi
5131                 ;;
5132         (*)     LIB_PREFIX='lib'
5133                 ;;
5134         esac
5135 cf_prefix=$LIB_PREFIX
5136
5137 elif test $with_lib_prefix = no
5138 then
5139         LIB_PREFIX=
5140 else
5141         LIB_PREFIX=$with_lib_prefix
5142 fi
5143
5144 LIB_SUFFIX=
5145
5146         echo "$as_me:5146: checking for PATH separator" >&5
5147 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5148         case $cf_cv_system_name in
5149         (os2*)  PATH_SEPARATOR=';'  ;;
5150         (*)     ${PATH_SEPARATOR:=':'}  ;;
5151         esac
5152
5153         echo "$as_me:5153: result: $PATH_SEPARATOR" >&5
5154 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5155
5156 ###############################################################################
5157
5158 echo "$as_me:5158: checking if you want to build a separate terminfo library" >&5
5159 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5160
5161 # Check whether --with-termlib or --without-termlib was given.
5162 if test "${with_termlib+set}" = set; then
5163   withval="$with_termlib"
5164   with_termlib=$withval
5165 else
5166   with_termlib=no
5167 fi;
5168 echo "$as_me:5168: result: $with_termlib" >&5
5169 echo "${ECHO_T}$with_termlib" >&6
5170
5171 echo "$as_me:5171: checking if you want to build a separate tic library" >&5
5172 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5173
5174 # Check whether --with-ticlib or --without-ticlib was given.
5175 if test "${with_ticlib+set}" = set; then
5176   withval="$with_ticlib"
5177   with_ticlib=$withval
5178 else
5179   with_ticlib=no
5180 fi;
5181 echo "$as_me:5181: result: $with_ticlib" >&5
5182 echo "${ECHO_T}$with_ticlib" >&6
5183
5184 ### Checks for special libraries, must be done up-front.
5185 SHLIB_LIST=""
5186
5187 echo "$as_me:5187: checking if you want to link with the GPM mouse library" >&5
5188 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5189
5190 # Check whether --with-gpm or --without-gpm was given.
5191 if test "${with_gpm+set}" = set; then
5192   withval="$with_gpm"
5193   with_gpm=$withval
5194 else
5195   with_gpm=maybe
5196 fi;
5197 echo "$as_me:5197: result: $with_gpm" >&5
5198 echo "${ECHO_T}$with_gpm" >&6
5199
5200 if test "$with_gpm" != no ; then
5201         echo "$as_me:5201: checking for gpm.h" >&5
5202 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5203 if test "${ac_cv_header_gpm_h+set}" = set; then
5204   echo $ECHO_N "(cached) $ECHO_C" >&6
5205 else
5206   cat >conftest.$ac_ext <<_ACEOF
5207 #line 5207 "configure"
5208 #include "confdefs.h"
5209 #include <gpm.h>
5210 _ACEOF
5211 if { (eval echo "$as_me:5211: \"$ac_cpp conftest.$ac_ext\"") >&5
5212   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5213   ac_status=$?
5214   egrep -v '^ *\+' conftest.er1 >conftest.err
5215   rm -f conftest.er1
5216   cat conftest.err >&5
5217   echo "$as_me:5217: \$? = $ac_status" >&5
5218   (exit $ac_status); } >/dev/null; then
5219   if test -s conftest.err; then
5220     ac_cpp_err=$ac_c_preproc_warn_flag
5221   else
5222     ac_cpp_err=
5223   fi
5224 else
5225   ac_cpp_err=yes
5226 fi
5227 if test -z "$ac_cpp_err"; then
5228   ac_cv_header_gpm_h=yes
5229 else
5230   echo "$as_me: failed program was:" >&5
5231   cat conftest.$ac_ext >&5
5232   ac_cv_header_gpm_h=no
5233 fi
5234 rm -f conftest.err conftest.$ac_ext
5235 fi
5236 echo "$as_me:5236: result: $ac_cv_header_gpm_h" >&5
5237 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5238 if test $ac_cv_header_gpm_h = yes; then
5239
5240 cat >>confdefs.h <<\EOF
5241 #define HAVE_GPM_H 1
5242 EOF
5243
5244                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5245                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5246
5247 echo "${as_me:-configure}:5247: testing assuming we really have GPM library ..." 1>&5
5248
5249 cat >>confdefs.h <<\EOF
5250 #define HAVE_LIBGPM 1
5251 EOF
5252
5253                 else
5254                         echo "$as_me:5254: checking for Gpm_Open in -lgpm" >&5
5255 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5256 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5257   echo $ECHO_N "(cached) $ECHO_C" >&6
5258 else
5259   ac_check_lib_save_LIBS=$LIBS
5260 LIBS="-lgpm  $LIBS"
5261 cat >conftest.$ac_ext <<_ACEOF
5262 #line 5262 "configure"
5263 #include "confdefs.h"
5264
5265 /* Override any gcc2 internal prototype to avoid an error.  */
5266 #ifdef __cplusplus
5267 extern "C"
5268 #endif
5269 /* We use char because int might match the return type of a gcc2
5270    builtin and then its argument prototype would still apply.  */
5271 char Gpm_Open ();
5272 int
5273 main ()
5274 {
5275 Gpm_Open ();
5276   ;
5277   return 0;
5278 }
5279 _ACEOF
5280 rm -f conftest.$ac_objext conftest$ac_exeext
5281 if { (eval echo "$as_me:5281: \"$ac_link\"") >&5
5282   (eval $ac_link) 2>&5
5283   ac_status=$?
5284   echo "$as_me:5284: \$? = $ac_status" >&5
5285   (exit $ac_status); } &&
5286          { ac_try='test -s conftest$ac_exeext'
5287   { (eval echo "$as_me:5287: \"$ac_try\"") >&5
5288   (eval $ac_try) 2>&5
5289   ac_status=$?
5290   echo "$as_me:5290: \$? = $ac_status" >&5
5291   (exit $ac_status); }; }; then
5292   ac_cv_lib_gpm_Gpm_Open=yes
5293 else
5294   echo "$as_me: failed program was:" >&5
5295 cat conftest.$ac_ext >&5
5296 ac_cv_lib_gpm_Gpm_Open=no
5297 fi
5298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5299 LIBS=$ac_check_lib_save_LIBS
5300 fi
5301 echo "$as_me:5301: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5302 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5303 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5304   :
5305 else
5306
5307                                 { { echo "$as_me:5307: error: Cannot link with GPM library" >&5
5308 echo "$as_me: error: Cannot link with GPM library" >&2;}
5309    { (exit 1); exit 1; }; }
5310                 fi
5311                 with_gpm=yes
5312
5313 fi
5314
5315 else
5316
5317                 test "$with_gpm" != maybe && { echo "$as_me:5317: WARNING: Cannot find GPM header" >&5
5318 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5319                 with_gpm=no
5320
5321 fi
5322
5323 fi
5324
5325 if test "$with_gpm" != no ; then
5326         echo "$as_me:5326: checking if you want to load GPM dynamically" >&5
5327 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5328
5329 # Check whether --with-dlsym or --without-dlsym was given.
5330 if test "${with_dlsym+set}" = set; then
5331   withval="$with_dlsym"
5332   with_dlsym=$withval
5333 else
5334   with_dlsym=yes
5335 fi;
5336         echo "$as_me:5336: result: $with_dlsym" >&5
5337 echo "${ECHO_T}$with_dlsym" >&6
5338         if test "x$with_dlsym" = xyes ; then
5339
5340 cf_have_dlsym=no
5341 echo "$as_me:5341: checking for dlsym" >&5
5342 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5343 if test "${ac_cv_func_dlsym+set}" = set; then
5344   echo $ECHO_N "(cached) $ECHO_C" >&6
5345 else
5346   cat >conftest.$ac_ext <<_ACEOF
5347 #line 5347 "configure"
5348 #include "confdefs.h"
5349 /* System header to define __stub macros and hopefully few prototypes,
5350     which can conflict with char dlsym (); below.  */
5351 #include <assert.h>
5352 /* Override any gcc2 internal prototype to avoid an error.  */
5353 #ifdef __cplusplus
5354 extern "C"
5355 #endif
5356 /* We use char because int might match the return type of a gcc2
5357    builtin and then its argument prototype would still apply.  */
5358 char dlsym ();
5359 char (*f) ();
5360
5361 int
5362 main ()
5363 {
5364 /* The GNU C library defines this for functions which it implements
5365     to always fail with ENOSYS.  Some functions are actually named
5366     something starting with __ and the normal name is an alias.  */
5367 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5368 choke me
5369 #else
5370 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5371 #endif
5372
5373   ;
5374   return 0;
5375 }
5376 _ACEOF
5377 rm -f conftest.$ac_objext conftest$ac_exeext
5378 if { (eval echo "$as_me:5378: \"$ac_link\"") >&5
5379   (eval $ac_link) 2>&5
5380   ac_status=$?
5381   echo "$as_me:5381: \$? = $ac_status" >&5
5382   (exit $ac_status); } &&
5383          { ac_try='test -s conftest$ac_exeext'
5384   { (eval echo "$as_me:5384: \"$ac_try\"") >&5
5385   (eval $ac_try) 2>&5
5386   ac_status=$?
5387   echo "$as_me:5387: \$? = $ac_status" >&5
5388   (exit $ac_status); }; }; then
5389   ac_cv_func_dlsym=yes
5390 else
5391   echo "$as_me: failed program was:" >&5
5392 cat conftest.$ac_ext >&5
5393 ac_cv_func_dlsym=no
5394 fi
5395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5396 fi
5397 echo "$as_me:5397: result: $ac_cv_func_dlsym" >&5
5398 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5399 if test $ac_cv_func_dlsym = yes; then
5400   cf_have_dlsym=yes
5401 else
5402
5403 cf_have_libdl=no
5404 echo "$as_me:5404: checking for dlsym in -ldl" >&5
5405 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5406 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5407   echo $ECHO_N "(cached) $ECHO_C" >&6
5408 else
5409   ac_check_lib_save_LIBS=$LIBS
5410 LIBS="-ldl  $LIBS"
5411 cat >conftest.$ac_ext <<_ACEOF
5412 #line 5412 "configure"
5413 #include "confdefs.h"
5414
5415 /* Override any gcc2 internal prototype to avoid an error.  */
5416 #ifdef __cplusplus
5417 extern "C"
5418 #endif
5419 /* We use char because int might match the return type of a gcc2
5420    builtin and then its argument prototype would still apply.  */
5421 char dlsym ();
5422 int
5423 main ()
5424 {
5425 dlsym ();
5426   ;
5427   return 0;
5428 }
5429 _ACEOF
5430 rm -f conftest.$ac_objext conftest$ac_exeext
5431 if { (eval echo "$as_me:5431: \"$ac_link\"") >&5
5432   (eval $ac_link) 2>&5
5433   ac_status=$?
5434   echo "$as_me:5434: \$? = $ac_status" >&5
5435   (exit $ac_status); } &&
5436          { ac_try='test -s conftest$ac_exeext'
5437   { (eval echo "$as_me:5437: \"$ac_try\"") >&5
5438   (eval $ac_try) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); }; }; then
5442   ac_cv_lib_dl_dlsym=yes
5443 else
5444   echo "$as_me: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5446 ac_cv_lib_dl_dlsym=no
5447 fi
5448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5449 LIBS=$ac_check_lib_save_LIBS
5450 fi
5451 echo "$as_me:5451: result: $ac_cv_lib_dl_dlsym" >&5
5452 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5453 if test $ac_cv_lib_dl_dlsym = yes; then
5454
5455         cf_have_dlsym=yes
5456         cf_have_libdl=yes
5457 fi
5458
5459 fi
5460
5461 if test "$cf_have_dlsym" = yes ; then
5462         test "$cf_have_libdl" = yes && {
5463 cf_add_libs="-ldl"
5464 # Filter out duplicates - this happens with badly-designed ".pc" files...
5465 for cf_add_1lib in $LIBS
5466 do
5467         for cf_add_2lib in $cf_add_libs
5468         do
5469                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5470                 then
5471                         cf_add_1lib=
5472                         break
5473                 fi
5474         done
5475         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5476 done
5477 LIBS="$cf_add_libs"
5478  }
5479
5480         echo "$as_me:5480: checking whether able to link to dl*() functions" >&5
5481 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5482         cat >conftest.$ac_ext <<_ACEOF
5483 #line 5483 "configure"
5484 #include "confdefs.h"
5485 #include <dlfcn.h>
5486 int
5487 main ()
5488 {
5489
5490                 void *obj;
5491                 if ((obj = dlopen("filename", 0)) != 0) {
5492                         if (dlsym(obj, "symbolname") == 0) {
5493                         dlclose(obj);
5494                         }
5495                 }
5496   ;
5497   return 0;
5498 }
5499 _ACEOF
5500 rm -f conftest.$ac_objext conftest$ac_exeext
5501 if { (eval echo "$as_me:5501: \"$ac_link\"") >&5
5502   (eval $ac_link) 2>&5
5503   ac_status=$?
5504   echo "$as_me:5504: \$? = $ac_status" >&5
5505   (exit $ac_status); } &&
5506          { ac_try='test -s conftest$ac_exeext'
5507   { (eval echo "$as_me:5507: \"$ac_try\"") >&5
5508   (eval $ac_try) 2>&5
5509   ac_status=$?
5510   echo "$as_me:5510: \$? = $ac_status" >&5
5511   (exit $ac_status); }; }; then
5512
5513 cat >>confdefs.h <<\EOF
5514 #define HAVE_LIBDL 1
5515 EOF
5516
5517 else
5518   echo "$as_me: failed program was:" >&5
5519 cat conftest.$ac_ext >&5
5520
5521                 { { echo "$as_me:5521: error: Cannot link test program for libdl" >&5
5522 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5523    { (exit 1); exit 1; }; }
5524 fi
5525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5526         echo "$as_me:5526: result: ok" >&5
5527 echo "${ECHO_T}ok" >&6
5528 else
5529         { { echo "$as_me:5529: error: Cannot find dlsym function" >&5
5530 echo "$as_me: error: Cannot find dlsym function" >&2;}
5531    { (exit 1); exit 1; }; }
5532 fi
5533
5534                 if test "x$with_gpm" != xyes ; then
5535                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5536
5537 echo "${as_me:-configure}:5537: testing assuming soname for gpm is $with_gpm ..." 1>&5
5538
5539                         cf_cv_gpm_soname="$with_gpm"
5540                 else
5541
5542 echo "$as_me:5542: checking for soname of gpm library" >&5
5543 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5544 if test "${cf_cv_gpm_soname+set}" = set; then
5545   echo $ECHO_N "(cached) $ECHO_C" >&6
5546 else
5547
5548 cf_cv_gpm_soname=unknown
5549 if test "$cross_compiling" != yes ; then
5550 cat >conftest.$ac_ext <<CF_EOF
5551 #include <gpm.h>
5552 int main()
5553 {
5554 if (Gpm_Open(0,0)) Gpm_Close();
5555         ${cf_cv_main_return:-return}(0);
5556 }
5557 CF_EOF
5558 cf_save_LIBS="$LIBS"
5559
5560 cf_add_libs="-lgpm"
5561 # Filter out duplicates - this happens with badly-designed ".pc" files...
5562 for cf_add_1lib in $LIBS
5563 do
5564         for cf_add_2lib in $cf_add_libs
5565         do
5566                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5567                 then
5568                         cf_add_1lib=
5569                         break
5570                 fi
5571         done
5572         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5573 done
5574 LIBS="$cf_add_libs"
5575
5576         if { (eval echo "$as_me:5576: \"$ac_compile\"") >&5
5577   (eval $ac_compile) 2>&5
5578   ac_status=$?
5579   echo "$as_me:5579: \$? = $ac_status" >&5
5580   (exit $ac_status); } ; then
5581                 if { (eval echo "$as_me:5581: \"$ac_link\"") >&5
5582   (eval $ac_link) 2>&5
5583   ac_status=$?
5584   echo "$as_me:5584: \$? = $ac_status" >&5
5585   (exit $ac_status); } ; then
5586                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5587                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5588                 fi
5589         fi
5590 rm -rf conftest*
5591 LIBS="$cf_save_LIBS"
5592 fi
5593
5594 fi
5595 echo "$as_me:5595: result: $cf_cv_gpm_soname" >&5
5596 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5597
5598                 fi
5599                 test "$cf_cv_gpm_soname" != "unknown" &&
5600 cat >>confdefs.h <<EOF
5601 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5602 EOF
5603
5604                 SHLIB_LIST="-ldl $SHLIB_LIST"
5605         else
5606                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5607
5608 cf_add_libs="-lgpm"
5609 # Filter out duplicates - this happens with badly-designed ".pc" files...
5610 for cf_add_1lib in $TEST_LIBS
5611 do
5612         for cf_add_2lib in $cf_add_libs
5613         do
5614                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5615                 then
5616                         cf_add_1lib=
5617                         break
5618                 fi
5619         done
5620         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5621 done
5622 TEST_LIBS="$cf_add_libs"
5623
5624         fi
5625
5626 cat >>confdefs.h <<\EOF
5627 #define HAVE_LIBGPM 1
5628 EOF
5629
5630 echo "$as_me:5630: checking for Gpm_Wgetch in -lgpm" >&5
5631 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5632 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5633   echo $ECHO_N "(cached) $ECHO_C" >&6
5634 else
5635   ac_check_lib_save_LIBS=$LIBS
5636 LIBS="-lgpm  $LIBS"
5637 cat >conftest.$ac_ext <<_ACEOF
5638 #line 5638 "configure"
5639 #include "confdefs.h"
5640
5641 /* Override any gcc2 internal prototype to avoid an error.  */
5642 #ifdef __cplusplus
5643 extern "C"
5644 #endif
5645 /* We use char because int might match the return type of a gcc2
5646    builtin and then its argument prototype would still apply.  */
5647 char Gpm_Wgetch ();
5648 int
5649 main ()
5650 {
5651 Gpm_Wgetch ();
5652   ;
5653   return 0;
5654 }
5655 _ACEOF
5656 rm -f conftest.$ac_objext conftest$ac_exeext
5657 if { (eval echo "$as_me:5657: \"$ac_link\"") >&5
5658   (eval $ac_link) 2>&5
5659   ac_status=$?
5660   echo "$as_me:5660: \$? = $ac_status" >&5
5661   (exit $ac_status); } &&
5662          { ac_try='test -s conftest$ac_exeext'
5663   { (eval echo "$as_me:5663: \"$ac_try\"") >&5
5664   (eval $ac_try) 2>&5
5665   ac_status=$?
5666   echo "$as_me:5666: \$? = $ac_status" >&5
5667   (exit $ac_status); }; }; then
5668   ac_cv_lib_gpm_Gpm_Wgetch=yes
5669 else
5670   echo "$as_me: failed program was:" >&5
5671 cat conftest.$ac_ext >&5
5672 ac_cv_lib_gpm_Gpm_Wgetch=no
5673 fi
5674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5675 LIBS=$ac_check_lib_save_LIBS
5676 fi
5677 echo "$as_me:5677: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5678 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5679 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5680
5681 echo "$as_me:5681: checking if GPM is weakly bound to curses library" >&5
5682 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5683 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5684   echo $ECHO_N "(cached) $ECHO_C" >&6
5685 else
5686
5687 cf_cv_check_gpm_wgetch=unknown
5688 if test "$cross_compiling" != yes ; then
5689
5690 cat >conftest.$ac_ext <<CF_EOF
5691 #include <gpm.h>
5692 int main()
5693 {
5694         Gpm_Wgetch();
5695         ${cf_cv_main_return:-return}(0);
5696 }
5697 CF_EOF
5698
5699         cf_save_LIBS="$LIBS"
5700         # This only works if we can look at the symbol table.  If a shared
5701         # library is stripped for install, we cannot use that.  So we're forced
5702         # to rely on the static library, noting that some packagers may not
5703         # include it.
5704         LIBS="-static -lgpm -dynamic $LIBS"
5705         if { (eval echo "$as_me:5705: \"$ac_compile\"") >&5
5706   (eval $ac_compile) 2>&5
5707   ac_status=$?
5708   echo "$as_me:5708: \$? = $ac_status" >&5
5709   (exit $ac_status); } ; then
5710                 if { (eval echo "$as_me:5710: \"$ac_link\"") >&5
5711   (eval $ac_link) 2>&5
5712   ac_status=$?
5713   echo "$as_me:5713: \$? = $ac_status" >&5
5714   (exit $ac_status); } ; then
5715                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5716                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5717                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5718                 fi
5719         fi
5720         rm -rf conftest*
5721         LIBS="$cf_save_LIBS"
5722 fi
5723
5724 fi
5725 echo "$as_me:5725: result: $cf_cv_check_gpm_wgetch" >&5
5726 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5727
5728 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5729         { echo "$as_me:5729: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5730 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5731 fi
5732
5733 fi
5734
5735 fi
5736
5737 # not everyone has "test -c"
5738 if test -c /dev/sysmouse 2>/dev/null ; then
5739 echo "$as_me:5739: checking if you want to use sysmouse" >&5
5740 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5741
5742 # Check whether --with-sysmouse or --without-sysmouse was given.
5743 if test "${with_sysmouse+set}" = set; then
5744   withval="$with_sysmouse"
5745   cf_with_sysmouse=$withval
5746 else
5747   cf_with_sysmouse=maybe
5748 fi;
5749         if test "$cf_with_sysmouse" != no ; then
5750         cat >conftest.$ac_ext <<_ACEOF
5751 #line 5751 "configure"
5752 #include "confdefs.h"
5753
5754 #include <osreldate.h>
5755 #if (__FreeBSD_version >= 400017)
5756 #include <sys/consio.h>
5757 #include <sys/fbio.h>
5758 #else
5759 #include <machine/console.h>
5760 #endif
5761
5762 int
5763 main ()
5764 {
5765
5766         struct mouse_info the_mouse;
5767         ioctl(0, CONS_MOUSECTL, &the_mouse);
5768
5769   ;
5770   return 0;
5771 }
5772 _ACEOF
5773 rm -f conftest.$ac_objext
5774 if { (eval echo "$as_me:5774: \"$ac_compile\"") >&5
5775   (eval $ac_compile) 2>&5
5776   ac_status=$?
5777   echo "$as_me:5777: \$? = $ac_status" >&5
5778   (exit $ac_status); } &&
5779          { ac_try='test -s conftest.$ac_objext'
5780   { (eval echo "$as_me:5780: \"$ac_try\"") >&5
5781   (eval $ac_try) 2>&5
5782   ac_status=$?
5783   echo "$as_me:5783: \$? = $ac_status" >&5
5784   (exit $ac_status); }; }; then
5785   cf_with_sysmouse=yes
5786 else
5787   echo "$as_me: failed program was:" >&5
5788 cat conftest.$ac_ext >&5
5789 cf_with_sysmouse=no
5790 fi
5791 rm -f conftest.$ac_objext conftest.$ac_ext
5792         fi
5793 echo "$as_me:5793: result: $cf_with_sysmouse" >&5
5794 echo "${ECHO_T}$cf_with_sysmouse" >&6
5795 test "$cf_with_sysmouse" = yes &&
5796 cat >>confdefs.h <<\EOF
5797 #define USE_SYSMOUSE 1
5798 EOF
5799
5800 fi
5801
5802 if test X"$CC_G_OPT" = X"" ; then
5803         CC_G_OPT='-g'
5804         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5805 fi
5806
5807 if test X"$CXX_G_OPT" = X"" ; then
5808         CXX_G_OPT='-g'
5809         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5810 fi
5811
5812 echo "$as_me:5812: checking for default loader flags" >&5
5813 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5814 case $DFT_LWR_MODEL in
5815 (libtool) LD_MODEL=''   ;;
5816 (normal)  LD_MODEL=''   ;;
5817 (debug)   LD_MODEL=$CC_G_OPT ;;
5818 (profile) LD_MODEL='-pg';;
5819 (shared)  LD_MODEL=''   ;;
5820 esac
5821 echo "$as_me:5821: result: $LD_MODEL" >&5
5822 echo "${ECHO_T}$LD_MODEL" >&6
5823
5824 case $DFT_LWR_MODEL in
5825 (shared)
5826
5827 echo "$as_me:5827: checking if rpath option should be used" >&5
5828 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5829
5830 # Check whether --enable-rpath or --disable-rpath was given.
5831 if test "${enable_rpath+set}" = set; then
5832   enableval="$enable_rpath"
5833   cf_cv_enable_rpath=$enableval
5834 else
5835   cf_cv_enable_rpath=no
5836 fi;
5837 echo "$as_me:5837: result: $cf_cv_enable_rpath" >&5
5838 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5839
5840 echo "$as_me:5840: checking if shared libraries should be relinked during install" >&5
5841 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5842
5843 # Check whether --enable-relink or --disable-relink was given.
5844 if test "${enable_relink+set}" = set; then
5845   enableval="$enable_relink"
5846   cf_cv_do_relink=$enableval
5847 else
5848   cf_cv_do_relink=yes
5849 fi;
5850 echo "$as_me:5850: result: $cf_cv_do_relink" >&5
5851 echo "${ECHO_T}$cf_cv_do_relink" >&6
5852         ;;
5853 esac
5854
5855 # we will build libraries one-level down.
5856 rel_builddir=..
5857
5858 LD_RPATH_OPT=
5859 echo "$as_me:5859: checking for an rpath option" >&5
5860 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5861 case $cf_cv_system_name in
5862 (irix*)
5863         if test "$GCC" = yes; then
5864                 LD_RPATH_OPT="-Wl,-rpath,"
5865         else
5866                 LD_RPATH_OPT="-rpath "
5867         fi
5868         ;;
5869 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5870         LD_RPATH_OPT="-Wl,-rpath,"
5871         ;;
5872 (openbsd[2-9].*|mirbsd*)
5873         LD_RPATH_OPT="-Wl,-rpath,"
5874         ;;
5875 (dragonfly*)
5876         LD_RPATH_OPT="-rpath "
5877         ;;
5878 (netbsd*)
5879         LD_RPATH_OPT="-Wl,-rpath,"
5880         ;;
5881 (osf*|mls+*)
5882         LD_RPATH_OPT="-rpath "
5883         ;;
5884 (solaris2*)
5885         LD_RPATH_OPT="-R"
5886         ;;
5887 (*)
5888         ;;
5889 esac
5890 echo "$as_me:5890: result: $LD_RPATH_OPT" >&5
5891 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5892
5893 case "x$LD_RPATH_OPT" in
5894 (x-R*)
5895         echo "$as_me:5895: checking if we need a space after rpath option" >&5
5896 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5897         cf_save_LIBS="$LIBS"
5898
5899 cf_add_libs="${LD_RPATH_OPT}$libdir"
5900 # Filter out duplicates - this happens with badly-designed ".pc" files...
5901 for cf_add_1lib in $LIBS
5902 do
5903         for cf_add_2lib in $cf_add_libs
5904         do
5905                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5906                 then
5907                         cf_add_1lib=
5908                         break
5909                 fi
5910         done
5911         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5912 done
5913 LIBS="$cf_add_libs"
5914
5915         cat >conftest.$ac_ext <<_ACEOF
5916 #line 5916 "configure"
5917 #include "confdefs.h"
5918
5919 int
5920 main ()
5921 {
5922
5923   ;
5924   return 0;
5925 }
5926 _ACEOF
5927 rm -f conftest.$ac_objext conftest$ac_exeext
5928 if { (eval echo "$as_me:5928: \"$ac_link\"") >&5
5929   (eval $ac_link) 2>&5
5930   ac_status=$?
5931   echo "$as_me:5931: \$? = $ac_status" >&5
5932   (exit $ac_status); } &&
5933          { ac_try='test -s conftest$ac_exeext'
5934   { (eval echo "$as_me:5934: \"$ac_try\"") >&5
5935   (eval $ac_try) 2>&5
5936   ac_status=$?
5937   echo "$as_me:5937: \$? = $ac_status" >&5
5938   (exit $ac_status); }; }; then
5939   cf_rpath_space=no
5940 else
5941   echo "$as_me: failed program was:" >&5
5942 cat conftest.$ac_ext >&5
5943 cf_rpath_space=yes
5944 fi
5945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5946         LIBS="$cf_save_LIBS"
5947         echo "$as_me:5947: result: $cf_rpath_space" >&5
5948 echo "${ECHO_T}$cf_rpath_space" >&6
5949         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5950         ;;
5951 esac
5952
5953         RM_SHARED_OPTS=
5954         LOCAL_LDFLAGS=
5955         LOCAL_LDFLAGS2=
5956         LD_SHARED_OPTS=
5957         INSTALL_LIB="-m 644"
5958         : ${rel_builddir:=.}
5959
5960         shlibdir=$libdir
5961
5962         MAKE_DLLS="#"
5963
5964         cf_cv_do_symlinks=no
5965         cf_ld_rpath_opt=
5966         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5967
5968         echo "$as_me:5968: checking if release/abi version should be used for shared libs" >&5
5969 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5970
5971 # Check whether --with-shlib-version or --without-shlib-version was given.
5972 if test "${with_shlib_version+set}" = set; then
5973   withval="$with_shlib_version"
5974   test -z "$withval" && withval=auto
5975         case $withval in
5976         (yes)
5977                 cf_cv_shlib_version=auto
5978                 ;;
5979         (rel|abi|auto)
5980                 cf_cv_shlib_version=$withval
5981                 ;;
5982         (*)
5983                 echo "$as_me:5983: result: $withval" >&5
5984 echo "${ECHO_T}$withval" >&6
5985                 { { echo "$as_me:5985: error: option value must be one of: rel, abi, or auto" >&5
5986 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5987    { (exit 1); exit 1; }; }
5988                 ;;
5989         esac
5990
5991 else
5992   cf_cv_shlib_version=auto
5993 fi;
5994         echo "$as_me:5994: result: $cf_cv_shlib_version" >&5
5995 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5996
5997         cf_cv_rm_so_locs=no
5998         cf_try_cflags=
5999
6000         # Some less-capable ports of gcc support only -fpic
6001         CC_SHARED_OPTS=
6002         if test "$GCC" = yes
6003         then
6004                 echo "$as_me:6004: checking which $CC option to use" >&5
6005 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6006                 cf_save_CFLAGS="$CFLAGS"
6007                 for CC_SHARED_OPTS in -fPIC -fpic ''
6008                 do
6009                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6010                         cat >conftest.$ac_ext <<_ACEOF
6011 #line 6011 "configure"
6012 #include "confdefs.h"
6013 #include <stdio.h>
6014 int
6015 main ()
6016 {
6017 int x = 1
6018   ;
6019   return 0;
6020 }
6021 _ACEOF
6022 rm -f conftest.$ac_objext
6023 if { (eval echo "$as_me:6023: \"$ac_compile\"") >&5
6024   (eval $ac_compile) 2>&5
6025   ac_status=$?
6026   echo "$as_me:6026: \$? = $ac_status" >&5
6027   (exit $ac_status); } &&
6028          { ac_try='test -s conftest.$ac_objext'
6029   { (eval echo "$as_me:6029: \"$ac_try\"") >&5
6030   (eval $ac_try) 2>&5
6031   ac_status=$?
6032   echo "$as_me:6032: \$? = $ac_status" >&5
6033   (exit $ac_status); }; }; then
6034   break
6035 else
6036   echo "$as_me: failed program was:" >&5
6037 cat conftest.$ac_ext >&5
6038 fi
6039 rm -f conftest.$ac_objext conftest.$ac_ext
6040                 done
6041                 echo "$as_me:6041: result: $CC_SHARED_OPTS" >&5
6042 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6043                 CFLAGS="$cf_save_CFLAGS"
6044         fi
6045
6046         cf_cv_shlib_version_infix=no
6047
6048         case $cf_cv_system_name in
6049         (aix4.3-9*|aix[5-7]*)
6050                 if test "$GCC" = yes; then
6051                         CC_SHARED_OPTS='-Wl,-brtl'
6052                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6053                 else
6054                         CC_SHARED_OPTS='-brtl'
6055                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6056                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6057                 fi
6058                 ;;
6059         (beos*)
6060                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6061                 ;;
6062         (cygwin*)
6063                 CC_SHARED_OPTS=
6064                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6065                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6066                 cf_cv_shlib_version=cygdll
6067                 cf_cv_shlib_version_infix=cygdll
6068                 shlibdir=$bindir
6069                 MAKE_DLLS=
6070                 cat >mk_shared_lib.sh <<-CF_EOF
6071                 #!$SHELL
6072                 SHARED_LIB=\$1
6073                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6074                 shift
6075                 cat <<-EOF
6076                 Linking shared library
6077                 ** SHARED_LIB \$SHARED_LIB
6078                 ** IMPORT_LIB \$IMPORT_LIB
6079 EOF
6080                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6081 CF_EOF
6082                 chmod +x mk_shared_lib.sh
6083                 ;;
6084         (msys*)
6085                 CC_SHARED_OPTS=
6086                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6087                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6088                 cf_cv_shlib_version=msysdll
6089                 cf_cv_shlib_version_infix=msysdll
6090                 shlibdir=$bindir
6091                 MAKE_DLLS=
6092                 cat >mk_shared_lib.sh <<-CF_EOF
6093                 #!$SHELL
6094                 SHARED_LIB=\$1
6095                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6096                 shift
6097                 cat <<-EOF
6098                 Linking shared library
6099                 ** SHARED_LIB \$SHARED_LIB
6100                 ** IMPORT_LIB \$IMPORT_LIB
6101 EOF
6102                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6103 CF_EOF
6104                 chmod +x mk_shared_lib.sh
6105                 ;;
6106         (darwin*)
6107                 cf_try_cflags="no-cpp-precomp"
6108                 CC_SHARED_OPTS="-dynamic"
6109                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6110                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6111                 cf_cv_shlib_version_infix=yes
6112                 echo "$as_me:6112: checking if ld -search_paths_first works" >&5
6113 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6114 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6115   echo $ECHO_N "(cached) $ECHO_C" >&6
6116 else
6117
6118                         cf_save_LDFLAGS=$LDFLAGS
6119                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6120                         cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123
6124 int
6125 main ()
6126 {
6127 int i;
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 rm -f conftest.$ac_objext conftest$ac_exeext
6133 if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134   (eval $ac_link) 2>&5
6135   ac_status=$?
6136   echo "$as_me:6136: \$? = $ac_status" >&5
6137   (exit $ac_status); } &&
6138          { ac_try='test -s conftest$ac_exeext'
6139   { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:6142: \$? = $ac_status" >&5
6143   (exit $ac_status); }; }; then
6144   cf_cv_ldflags_search_paths_first=yes
6145 else
6146   echo "$as_me: failed program was:" >&5
6147 cat conftest.$ac_ext >&5
6148 cf_cv_ldflags_search_paths_first=no
6149 fi
6150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6151                                 LDFLAGS=$cf_save_LDFLAGS
6152 fi
6153 echo "$as_me:6153: result: $cf_cv_ldflags_search_paths_first" >&5
6154 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6155                 if test $cf_cv_ldflags_search_paths_first = yes; then
6156                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6157                 fi
6158                 ;;
6159         (hpux[7-8]*)
6160                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6161                 if test "$GCC" != yes; then
6162                         CC_SHARED_OPTS='+Z'
6163                 fi
6164                 MK_SHARED_LIB='${LD} -b -o $@'
6165                 INSTALL_LIB="-m 555"
6166                 ;;
6167         (hpux*)
6168                 # (tested with gcc 2.7.2 -- I don't have c89)
6169                 if test "$GCC" = yes; then
6170                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6171                 else
6172                         CC_SHARED_OPTS='+Z'
6173                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6174                 fi
6175                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6176                 # HP-UX shared libraries must be executable, and should be
6177                 # readonly to exploit a quirk in the memory manager.
6178                 INSTALL_LIB="-m 555"
6179                 ;;
6180         (interix*)
6181                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6182                 if test "$cf_cv_shlib_version" = rel; then
6183                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6184                 else
6185                         cf_shared_soname='`basename `'
6186                 fi
6187                 CC_SHARED_OPTS=
6188                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6189                 ;;
6190         (irix*)
6191                 if test "$cf_cv_enable_rpath" = yes ; then
6192                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6193                 fi
6194                 # tested with IRIX 5.2 and 'cc'.
6195                 if test "$GCC" != yes; then
6196                         CC_SHARED_OPTS='-KPIC'
6197                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6198                 else
6199                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6200                 fi
6201                 cf_cv_rm_so_locs=yes
6202                 ;;
6203         (linux*|gnu*|k*bsd*-gnu)
6204                 if test "$DFT_LWR_MODEL" = "shared" ; then
6205                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6206                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6207                 fi
6208                 if test "$cf_cv_enable_rpath" = yes ; then
6209                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6210                 fi
6211
6212         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6213         if test "$cf_cv_shlib_version" = rel; then
6214                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6215         else
6216                 cf_cv_shared_soname='`basename $@`'
6217         fi
6218
6219                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6220                 ;;
6221         (mingw*)
6222                 cf_cv_shlib_version=mingw
6223                 cf_cv_shlib_version_infix=mingw
6224                 shlibdir=$bindir
6225                 MAKE_DLLS=
6226                 if test "$DFT_LWR_MODEL" = "shared" ; then
6227                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6228                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6229                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6230                 fi
6231                 CC_SHARED_OPTS=
6232                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6233                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6234                 cat >mk_shared_lib.sh <<-CF_EOF
6235                 #!$SHELL
6236                 SHARED_LIB=\$1
6237                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6238                 shift
6239                 cat <<-EOF
6240                 Linking shared library
6241                 ** SHARED_LIB \$SHARED_LIB
6242                 ** IMPORT_LIB \$IMPORT_LIB
6243 EOF
6244                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6245 CF_EOF
6246                 chmod +x mk_shared_lib.sh
6247                 ;;
6248         (openbsd[2-9].*|mirbsd*)
6249                 if test "$DFT_LWR_MODEL" = "shared" ; then
6250                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6251                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6252                 fi
6253                 if test "$cf_cv_enable_rpath" = yes ; then
6254                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6255                 fi
6256                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6257
6258         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6259         if test "$cf_cv_shlib_version" = rel; then
6260                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6261         else
6262                 cf_cv_shared_soname='`basename $@`'
6263         fi
6264
6265                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6266                 ;;
6267         (nto-qnx*|openbsd*|freebsd[12].*)
6268                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6269                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6270                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6271                 ;;
6272         (dragonfly*|freebsd*)
6273                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6274                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6275                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6276                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6277                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6278                 fi
6279
6280         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6281         if test "$cf_cv_shlib_version" = rel; then
6282                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6283         else
6284                 cf_cv_shared_soname='`basename $@`'
6285         fi
6286
6287                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6288                 ;;
6289         (netbsd*)
6290                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6291                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6292                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6293                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6294                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6295                         if test "$cf_cv_shlib_version" = auto; then
6296                         if test -f /usr/libexec/ld.elf_so; then
6297                                 cf_cv_shlib_version=abi
6298                         else
6299                                 cf_cv_shlib_version=rel
6300                         fi
6301                         fi
6302
6303         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6304         if test "$cf_cv_shlib_version" = rel; then
6305                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6306         else
6307                 cf_cv_shared_soname='`basename $@`'
6308         fi
6309
6310                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6311                 else
6312                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6313                 fi
6314                 ;;
6315         (osf*|mls+*)
6316                 # tested with OSF/1 V3.2 and 'cc'
6317                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6318                 # link with shared libs).
6319                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6320                 case $host_os in
6321                 (osf4*)
6322                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6323                         ;;
6324                 esac
6325                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6326                 if test "$DFT_LWR_MODEL" = "shared" ; then
6327                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6328                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6329                 fi
6330                 cf_cv_rm_so_locs=yes
6331                 ;;
6332         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6333                 # tested with osr5.0.5
6334                 if test "$GCC" != yes; then
6335                         CC_SHARED_OPTS='-belf -KPIC'
6336                 fi
6337                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6338                 if test "$cf_cv_enable_rpath" = yes ; then
6339                         # only way is to set LD_RUN_PATH but no switch for it
6340                         RUN_PATH=$libdir
6341                 fi
6342                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6343                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6344                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6345                 ;;
6346         (sunos4*)
6347                 # tested with SunOS 4.1.1 and gcc 2.7.0
6348                 if test "$GCC" != yes; then
6349                         CC_SHARED_OPTS='-KPIC'
6350                 fi
6351                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6352                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6353                 ;;
6354         (solaris2*)
6355                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6356                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6357                 if test "$DFT_LWR_MODEL" = "shared" ; then
6358                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6359                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6360                 fi
6361                 if test "$cf_cv_enable_rpath" = yes ; then
6362                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6363                 fi
6364
6365         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6366         if test "$cf_cv_shlib_version" = rel; then
6367                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6368         else
6369                 cf_cv_shared_soname='`basename $@`'
6370         fi
6371
6372                 if test "$GCC" != yes; then
6373                         cf_save_CFLAGS="$CFLAGS"
6374                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6375                         do
6376                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6377                                 cat >conftest.$ac_ext <<_ACEOF
6378 #line 6378 "configure"
6379 #include "confdefs.h"
6380 #include <stdio.h>
6381 int
6382 main ()
6383 {
6384 printf("Hello\n");
6385   ;
6386   return 0;
6387 }
6388 _ACEOF
6389 rm -f conftest.$ac_objext
6390 if { (eval echo "$as_me:6390: \"$ac_compile\"") >&5
6391   (eval $ac_compile) 2>&5
6392   ac_status=$?
6393   echo "$as_me:6393: \$? = $ac_status" >&5
6394   (exit $ac_status); } &&
6395          { ac_try='test -s conftest.$ac_objext'
6396   { (eval echo "$as_me:6396: \"$ac_try\"") >&5
6397   (eval $ac_try) 2>&5
6398   ac_status=$?
6399   echo "$as_me:6399: \$? = $ac_status" >&5
6400   (exit $ac_status); }; }; then
6401   break
6402 else
6403   echo "$as_me: failed program was:" >&5
6404 cat conftest.$ac_ext >&5
6405 fi
6406 rm -f conftest.$ac_objext conftest.$ac_ext
6407                         done
6408                         CFLAGS="$cf_save_CFLAGS"
6409                         CC_SHARED_OPTS=$cf_shared_opts
6410                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6411                 else
6412                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6413                 fi
6414                 ;;
6415         (sysv5uw7*|unix_sv*)
6416                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6417                 if test "$GCC" != yes; then
6418                         CC_SHARED_OPTS='-KPIC'
6419                 fi
6420                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6421                 ;;
6422         (*)
6423                 CC_SHARED_OPTS='unknown'
6424                 MK_SHARED_LIB='echo unknown'
6425                 ;;
6426         esac
6427
6428         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6429         case "$cf_cv_shlib_version" in
6430         (rel|abi)
6431                 case "$MK_SHARED_LIB" in
6432                 (*'-o $@')
6433                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6434                         ;;
6435                 (*)
6436                         { echo "$as_me:6436: WARNING: ignored --with-shlib-version" >&5
6437 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6438                         ;;
6439                 esac
6440                 ;;
6441         esac
6442
6443         if test -n "$cf_try_cflags"
6444         then
6445 cat > conftest.$ac_ext <<EOF
6446 #line 6446 "${as_me:-configure}"
6447 #include <stdio.h>
6448 int main(int argc, char *argv[])
6449 {
6450         printf("hello\n");
6451         return (argv[argc-1] == 0) ;
6452 }
6453 EOF
6454                 cf_save_CFLAGS="$CFLAGS"
6455                 for cf_opt in $cf_try_cflags
6456                 do
6457                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6458                         echo "$as_me:6458: checking if CFLAGS option -$cf_opt works" >&5
6459 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6460                         if { (eval echo "$as_me:6460: \"$ac_compile\"") >&5
6461   (eval $ac_compile) 2>&5
6462   ac_status=$?
6463   echo "$as_me:6463: \$? = $ac_status" >&5
6464   (exit $ac_status); }; then
6465                                 echo "$as_me:6465: result: yes" >&5
6466 echo "${ECHO_T}yes" >&6
6467                                 cf_save_CFLAGS="$CFLAGS"
6468                         else
6469                                 echo "$as_me:6469: result: no" >&5
6470 echo "${ECHO_T}no" >&6
6471                         fi
6472                 done
6473                 CFLAGS="$cf_save_CFLAGS"
6474         fi
6475
6476         # RPATH_LIST is a colon-separated list of directories
6477         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6478         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6479
6480         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6481
6482         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6483
6484 echo "${as_me:-configure}:6484: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6485
6486         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6487
6488 echo "${as_me:-configure}:6488: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6489
6490 for model in $cf_list_models; do
6491         case $model in
6492         (libtool)
6493
6494 echo "$as_me:6494: checking for additional libtool options" >&5
6495 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6496
6497 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6498 if test "${with_libtool_opts+set}" = set; then
6499   withval="$with_libtool_opts"
6500   with_libtool_opts=$withval
6501 else
6502   with_libtool_opts=no
6503 fi;
6504 echo "$as_me:6504: result: $with_libtool_opts" >&5
6505 echo "${ECHO_T}$with_libtool_opts" >&6
6506
6507 case .$with_libtool_opts in
6508 (.yes|.no|.)
6509         ;;
6510 (*)
6511         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6512         ;;
6513 esac
6514
6515 echo "$as_me:6515: checking if exported-symbols file should be used" >&5
6516 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6517
6518 # Check whether --with-export-syms or --without-export-syms was given.
6519 if test "${with_export_syms+set}" = set; then
6520   withval="$with_export_syms"
6521   with_export_syms=$withval
6522 else
6523   with_export_syms=no
6524 fi;
6525 if test "x$with_export_syms" = xyes
6526 then
6527         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6528
6529 fi
6530 echo "$as_me:6530: result: $with_export_syms" >&5
6531 echo "${ECHO_T}$with_export_syms" >&6
6532 if test "x$with_export_syms" != xno
6533 then
6534         EXPORT_SYMS="-export-symbols $with_export_syms"
6535
6536 fi
6537
6538                 ;;
6539         (shared)
6540                 if test "$CC_SHARED_OPTS" = "unknown"; then
6541                         { { echo "$as_me:6541: error: Shared libraries are not supported in this version" >&5
6542 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6543    { (exit 1); exit 1; }; }
6544                 fi
6545
6546 echo "$as_me:6546: checking if versioned-symbols file should be used" >&5
6547 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6548
6549 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6550 if test "${with_versioned_syms+set}" = set; then
6551   withval="$with_versioned_syms"
6552   with_versioned_syms=$withval
6553 else
6554   with_versioned_syms=no
6555 fi;
6556 if test "x$with_versioned_syms" = xyes
6557 then
6558         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6559
6560 fi
6561 echo "$as_me:6561: result: $with_versioned_syms" >&5
6562 echo "${ECHO_T}$with_versioned_syms" >&6
6563
6564 RESULTING_SYMS=
6565 VERSIONED_SYMS=
6566 WILDCARD_SYMS=
6567
6568 if test "x$with_versioned_syms" != xno
6569 then
6570         RESULTING_SYMS=$with_versioned_syms
6571         case "x$MK_SHARED_LIB" in
6572         (*-Wl,*)
6573                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6574                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6575                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6576
6577 echo "${as_me:-configure}:6577: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6578
6579                 ;;
6580         (*-dy\ *)
6581                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6582                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6583                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6584
6585 echo "${as_me:-configure}:6585: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6586
6587                 ;;
6588         (*)
6589                 { echo "$as_me:6589: WARNING: this system does not support versioned-symbols" >&5
6590 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6591                 ;;
6592         esac
6593
6594         # Linux ld can selectively override scope, e.g., of symbols beginning with
6595         # "_" by first declaring some as global, and then using a wildcard to
6596         # declare the others as local.  Some other loaders cannot do this.  Check
6597         # by constructing a (very) simple shared library and inspecting its
6598         # symbols.
6599         if test "x$VERSIONED_SYMS" != "x"
6600         then
6601                 echo "$as_me:6601: checking if wildcards can be used to selectively omit symbols" >&5
6602 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6603                 WILDCARD_SYMS=no
6604
6605                 # make sources
6606                 rm -f conftest.*
6607
6608                 cat >conftest.ver <<EOF
6609 module_1.0 {
6610 global:
6611         globalf1;
6612 local:
6613         localf1;
6614 };
6615 module_2.0 {
6616 global:
6617         globalf2;
6618 local:
6619         localf2;
6620         _*;
6621 } module_1.0;
6622 submodule_1.0 {
6623 global:
6624         subglobalf1;
6625         _ismissing;
6626 local:
6627         sublocalf1;
6628 };
6629 submodule_2.0 {
6630 global:
6631         subglobalf2;
6632 local:
6633         sublocalf2;
6634         _*;
6635 } submodule_1.0;
6636 EOF
6637                 cat >conftest.$ac_ext <<EOF
6638 #line 6638 "configure"
6639 int     _ismissing(void) { return 1; }
6640 int     _localf1(void) { return 1; }
6641 int     _localf2(void) { return 2; }
6642 int     globalf1(void) { return 1; }
6643 int     globalf2(void) { return 2; }
6644 int     _sublocalf1(void) { return 1; }
6645 int     _sublocalf2(void) { return 2; }
6646 int     subglobalf1(void) { return 1; }
6647 int     subglobalf2(void) { return 2; }
6648 EOF
6649                 cat >conftest.mk <<EOF
6650 CC=${CC}
6651 CFLAGS=${CFLAGS}
6652 CPPFLAGS=${CPPFLAGS}
6653 LDFLAGS=${LDFLAGS}
6654 LIBS=${LIBS}
6655 VERSIONED_SYMS=${VERSIONED_SYMS}
6656 RESULTING_SYMS=conftest.ver
6657 MK_SHARED_LIB=${MK_SHARED_LIB}
6658 conftest.so: conftest.$ac_cv_objext
6659                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6660 EOF
6661
6662                 # compile source, make library
6663                 if make -f conftest.mk 2>&5 >/dev/null
6664                 then
6665                         # test for missing symbol in either Data or Text section
6666                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6667                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6668                 fi
6669                 echo "$as_me:6669: result: $WILDCARD_SYMS" >&5
6670 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6671                 rm -f conftest.*
6672         fi
6673 fi
6674
6675                 ;;
6676         esac
6677 done
6678
6679 # pretend that ncurses==ncursesw==ncursest
6680 echo "$as_me:6680: checking if you want to disable library suffixes" >&5
6681 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6682
6683 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6684 if test "${enable_lib_suffixes+set}" = set; then
6685   enableval="$enable_lib_suffixes"
6686   test "$enableval" != no && enableval=yes
6687         if test "$enableval" != "yes" ; then
6688     disable_lib_suffixes=yes
6689         else
6690                 disable_lib_suffixes=no
6691         fi
6692 else
6693   enableval=yes
6694         disable_lib_suffixes=no
6695
6696 fi;
6697 echo "$as_me:6697: result: $disable_lib_suffixes" >&5
6698 echo "${ECHO_T}$disable_lib_suffixes" >&6
6699
6700 ### If we're building with rpath, try to link non-standard libs that way too.
6701 if test "$DFT_LWR_MODEL" = "shared"; then
6702
6703 echo "$as_me:6703: checking if rpath-hack should be disabled" >&5
6704 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6705
6706 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6707 if test "${enable_rpath_hack+set}" = set; then
6708   enableval="$enable_rpath_hack"
6709   test "$enableval" != no && enableval=yes
6710         if test "$enableval" != "yes" ; then
6711     cf_disable_rpath_hack=yes
6712         else
6713                 cf_disable_rpath_hack=no
6714         fi
6715 else
6716   enableval=yes
6717         cf_disable_rpath_hack=no
6718
6719 fi;
6720 echo "$as_me:6720: result: $cf_disable_rpath_hack" >&5
6721 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6722 if test "$cf_disable_rpath_hack" = no ; then
6723
6724 echo "$as_me:6724: checking for updated LDFLAGS" >&5
6725 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6726 if test -n "$LD_RPATH_OPT" ; then
6727         echo "$as_me:6727: result: maybe" >&5
6728 echo "${ECHO_T}maybe" >&6
6729
6730         for ac_prog in ldd
6731 do
6732   # Extract the first word of "$ac_prog", so it can be a program name with args.
6733 set dummy $ac_prog; ac_word=$2
6734 echo "$as_me:6734: checking for $ac_word" >&5
6735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6736 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6737   echo $ECHO_N "(cached) $ECHO_C" >&6
6738 else
6739   if test -n "$cf_ldd_prog"; then
6740   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6741 else
6742   ac_save_IFS=$IFS; IFS=$ac_path_separator
6743 ac_dummy="$PATH"
6744 for ac_dir in $ac_dummy; do
6745   IFS=$ac_save_IFS
6746   test -z "$ac_dir" && ac_dir=.
6747   $as_executable_p "$ac_dir/$ac_word" || continue
6748 ac_cv_prog_cf_ldd_prog="$ac_prog"
6749 echo "$as_me:6749: found $ac_dir/$ac_word" >&5
6750 break
6751 done
6752
6753 fi
6754 fi
6755 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6756 if test -n "$cf_ldd_prog"; then
6757   echo "$as_me:6757: result: $cf_ldd_prog" >&5
6758 echo "${ECHO_T}$cf_ldd_prog" >&6
6759 else
6760   echo "$as_me:6760: result: no" >&5
6761 echo "${ECHO_T}no" >&6
6762 fi
6763
6764   test -n "$cf_ldd_prog" && break
6765 done
6766 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6767
6768         cf_rpath_list="/usr/lib /lib"
6769         if test "$cf_ldd_prog" != no
6770         then
6771                 cf_rpath_oops=
6772
6773 cat >conftest.$ac_ext <<_ACEOF
6774 #line 6774 "configure"
6775 #include "confdefs.h"
6776 #include <stdio.h>
6777 int
6778 main ()
6779 {
6780 printf("Hello");
6781   ;
6782   return 0;
6783 }
6784 _ACEOF
6785 rm -f conftest.$ac_objext conftest$ac_exeext
6786 if { (eval echo "$as_me:6786: \"$ac_link\"") >&5
6787   (eval $ac_link) 2>&5
6788   ac_status=$?
6789   echo "$as_me:6789: \$? = $ac_status" >&5
6790   (exit $ac_status); } &&
6791          { ac_try='test -s conftest$ac_exeext'
6792   { (eval echo "$as_me:6792: \"$ac_try\"") >&5
6793   (eval $ac_try) 2>&5
6794   ac_status=$?
6795   echo "$as_me:6795: \$? = $ac_status" >&5
6796   (exit $ac_status); }; }; then
6797   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6798                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6799 else
6800   echo "$as_me: failed program was:" >&5
6801 cat conftest.$ac_ext >&5
6802 fi
6803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6804
6805                 # If we passed the link-test, but get a "not found" on a given library,
6806                 # this could be due to inept reconfiguration of gcc to make it only
6807                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6808                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6809                 # /usr/local libraries.
6810                 if test -n "$cf_rpath_oops"
6811                 then
6812                         for cf_rpath_src in $cf_rpath_oops
6813                         do
6814                                 for cf_rpath_dir in \
6815                                         /usr/local \
6816                                         /usr/pkg \
6817                                         /opt/sfw
6818                                 do
6819                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6820                                         then
6821                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6822
6823 echo "${as_me:-configure}:6823: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6824
6825                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6826                                                 break
6827                                         fi
6828                                 done
6829                         done
6830                 fi
6831         fi
6832
6833         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6834
6835 echo "${as_me:-configure}:6835: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6836
6837 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6838
6839 echo "${as_me:-configure}:6839: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6840
6841 cf_rpath_dst=
6842 for cf_rpath_src in $LDFLAGS
6843 do
6844         case $cf_rpath_src in
6845         (-L*)
6846
6847                 # check if this refers to a directory which we will ignore
6848                 cf_rpath_skip=no
6849                 if test -n "$cf_rpath_list"
6850                 then
6851                         for cf_rpath_item in $cf_rpath_list
6852                         do
6853                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6854                                 then
6855                                         cf_rpath_skip=yes
6856                                         break
6857                                 fi
6858                         done
6859                 fi
6860
6861                 if test "$cf_rpath_skip" = no
6862                 then
6863                         # transform the option
6864                         if test "$LD_RPATH_OPT" = "-R " ; then
6865                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6866                         else
6867                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6868                         fi
6869
6870                         # if we have not already added this, add it now
6871                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6872                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6873                         then
6874                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6875
6876 echo "${as_me:-configure}:6876: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6877
6878                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6879                         fi
6880                 fi
6881                 ;;
6882         esac
6883         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6884 done
6885 LDFLAGS=$cf_rpath_dst
6886
6887 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6888
6889 echo "${as_me:-configure}:6889: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6890
6891 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6892
6893 echo "${as_me:-configure}:6893: testing ...checking LIBS $LIBS ..." 1>&5
6894
6895 cf_rpath_dst=
6896 for cf_rpath_src in $LIBS
6897 do
6898         case $cf_rpath_src in
6899         (-L*)
6900
6901                 # check if this refers to a directory which we will ignore
6902                 cf_rpath_skip=no
6903                 if test -n "$cf_rpath_list"
6904                 then
6905                         for cf_rpath_item in $cf_rpath_list
6906                         do
6907                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6908                                 then
6909                                         cf_rpath_skip=yes
6910                                         break
6911                                 fi
6912                         done
6913                 fi
6914
6915                 if test "$cf_rpath_skip" = no
6916                 then
6917                         # transform the option
6918                         if test "$LD_RPATH_OPT" = "-R " ; then
6919                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6920                         else
6921                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6922                         fi
6923
6924                         # if we have not already added this, add it now
6925                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6926                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6927                         then
6928                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6929
6930 echo "${as_me:-configure}:6930: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6931
6932                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6933                         fi
6934                 fi
6935                 ;;
6936         esac
6937         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6938 done
6939 LIBS=$cf_rpath_dst
6940
6941 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6942
6943 echo "${as_me:-configure}:6943: testing ...checked LIBS $LIBS ..." 1>&5
6944
6945         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6946
6947 echo "${as_me:-configure}:6947: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6948
6949 else
6950         echo "$as_me:6950: result: no" >&5
6951 echo "${ECHO_T}no" >&6
6952 fi
6953
6954 fi
6955
6956 fi
6957
6958 ###############################################################################
6959
6960 ###     use option --with-extra-suffix to append suffix to headers and libraries
6961 echo "$as_me:6961: checking if you wish to append extra suffix to header/library paths" >&5
6962 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6963 EXTRA_SUFFIX=
6964
6965 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6966 if test "${with_extra_suffix+set}" = set; then
6967   withval="$with_extra_suffix"
6968   case x$withval in
6969         (no)
6970                 ;;
6971         (xyes|x)
6972                 EXTRA_SUFFIX=$cf_cv_abi_version
6973                 ;;
6974         (*)
6975                 EXTRA_SUFFIX=$withval
6976                 ;;
6977         esac
6978
6979 fi;
6980 echo "$as_me:6980: result: $EXTRA_SUFFIX" >&5
6981 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6982
6983 ###     use option --disable-overwrite to leave out the link to -lcurses
6984 echo "$as_me:6984: checking if you wish to install ncurses overwriting curses" >&5
6985 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6986
6987 # Check whether --enable-overwrite or --disable-overwrite was given.
6988 if test "${enable_overwrite+set}" = set; then
6989   enableval="$enable_overwrite"
6990   with_overwrite=$enableval
6991 else
6992   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6993 fi;
6994 echo "$as_me:6994: result: $with_overwrite" >&5
6995 echo "${ECHO_T}$with_overwrite" >&6
6996
6997 echo "$as_me:6997: checking if external terminfo-database is used" >&5
6998 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6999
7000 # Check whether --enable-database or --disable-database was given.
7001 if test "${enable_database+set}" = set; then
7002   enableval="$enable_database"
7003   use_database=$enableval
7004 else
7005   use_database=yes
7006 fi;
7007 echo "$as_me:7007: result: $use_database" >&5
7008 echo "${ECHO_T}$use_database" >&6
7009
7010 case $host_os in
7011 (os2*)
7012         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7013         ;;
7014 (*)
7015         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7016         ;;
7017 esac
7018
7019 NCURSES_USE_DATABASE=0
7020 if test "$use_database" != no ; then
7021         NCURSES_USE_DATABASE=1
7022
7023         echo "$as_me:7023: checking which terminfo source-file will be installed" >&5
7024 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7025
7026 # Check whether --with-database or --without-database was given.
7027 if test "${with_database+set}" = set; then
7028   withval="$with_database"
7029   TERMINFO_SRC=$withval
7030 fi;
7031         echo "$as_me:7031: result: $TERMINFO_SRC" >&5
7032 echo "${ECHO_T}$TERMINFO_SRC" >&6
7033
7034         echo "$as_me:7034: checking whether to use hashed database instead of directory/tree" >&5
7035 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7036
7037 # Check whether --with-hashed-db or --without-hashed-db was given.
7038 if test "${with_hashed_db+set}" = set; then
7039   withval="$with_hashed_db"
7040
7041 else
7042   with_hashed_db=no
7043 fi;
7044         echo "$as_me:7044: result: $with_hashed_db" >&5
7045 echo "${ECHO_T}$with_hashed_db" >&6
7046 else
7047         with_hashed_db=no
7048 fi
7049
7050 echo "$as_me:7050: checking for list of fallback descriptions" >&5
7051 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7052
7053 # Check whether --with-fallbacks or --without-fallbacks was given.
7054 if test "${with_fallbacks+set}" = set; then
7055   withval="$with_fallbacks"
7056   with_fallback=$withval
7057 else
7058   with_fallback=
7059 fi;
7060 echo "$as_me:7060: result: $with_fallback" >&5
7061 echo "${ECHO_T}$with_fallback" >&6
7062 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7063
7064 echo "$as_me:7064: checking if you want modern xterm or antique" >&5
7065 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7066
7067 # Check whether --with-xterm-new or --without-xterm-new was given.
7068 if test "${with_xterm_new+set}" = set; then
7069   withval="$with_xterm_new"
7070   with_xterm_new=$withval
7071 else
7072   with_xterm_new=yes
7073 fi;
7074 case $with_xterm_new in
7075 (no) with_xterm_new=xterm-old;;
7076 (*)      with_xterm_new=xterm-new;;
7077 esac
7078 echo "$as_me:7078: result: $with_xterm_new" >&5
7079 echo "${ECHO_T}$with_xterm_new" >&6
7080 WHICH_XTERM=$with_xterm_new
7081
7082 echo "$as_me:7082: checking if xterm backspace sends BS or DEL" >&5
7083 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7084
7085 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7086 if test "${with_xterm_kbs+set}" = set; then
7087   withval="$with_xterm_kbs"
7088   with_xterm_kbs=$withval
7089 else
7090   with_xterm_kbs=BS
7091 fi;
7092 case x$with_xterm_kbs in
7093 (xyes|xno|xBS|xbs|x8)
7094         with_xterm_kbs=BS
7095         ;;
7096 (xDEL|xdel|x127)
7097         with_xterm_kbs=DEL
7098         ;;
7099 (*)
7100         with_xterm_kbs=$withval
7101         ;;
7102 esac
7103 echo "$as_me:7103: result: $with_xterm_kbs" >&5
7104 echo "${ECHO_T}$with_xterm_kbs" >&6
7105 XTERM_KBS=$with_xterm_kbs
7106
7107 MAKE_TERMINFO=
7108 if test "$use_database" = no ; then
7109         TERMINFO="${datadir}/terminfo"
7110         MAKE_TERMINFO="#"
7111 else
7112
7113 echo "$as_me:7113: checking for list of terminfo directories" >&5
7114 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7115
7116 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7117 if test "${with_terminfo_dirs+set}" = set; then
7118   withval="$with_terminfo_dirs"
7119
7120 else
7121   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7122 fi;
7123 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7124 cf_dst_path=
7125 for cf_src_path in $withval
7126 do
7127
7128 if test "x$prefix" != xNONE; then
7129         cf_path_syntax="$prefix"
7130 else
7131         cf_path_syntax="$ac_default_prefix"
7132 fi
7133
7134 case ".$cf_src_path" in
7135 (.\$\(*\)*|.\'*\'*)
7136         ;;
7137 (..|./*|.\\*)
7138         ;;
7139 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7140         ;;
7141 (.\${*prefix}*|.\${*dir}*)
7142         eval cf_src_path="$cf_src_path"
7143         case ".$cf_src_path" in
7144         (.NONE/*)
7145                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7146                 ;;
7147         esac
7148         ;;
7149 (.no|.NONE/*)
7150         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7151         ;;
7152 (*)
7153         { { echo "$as_me:7153: error: expected a pathname, not \"$cf_src_path\"" >&5
7154 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7155    { (exit 1); exit 1; }; }
7156         ;;
7157 esac
7158
7159   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7160   cf_dst_path="${cf_dst_path}${cf_src_path}"
7161 done
7162 IFS="$ac_save_ifs"
7163
7164 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7165 # so we have to check/work around.  We do prefer the result of "eval"...
7166 eval cf_dst_eval="$cf_dst_path"
7167 case "x$cf_dst_eval" in
7168 (xNONE*)
7169         TERMINFO_DIRS=$cf_dst_path
7170         ;;
7171 (*)
7172         TERMINFO_DIRS="$cf_dst_eval"
7173         ;;
7174 esac
7175
7176 echo "$as_me:7176: result: $TERMINFO_DIRS" >&5
7177 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7178 test -n "$TERMINFO_DIRS" &&
7179 cat >>confdefs.h <<EOF
7180 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7181 EOF
7182
7183 echo "$as_me:7183: checking for default terminfo directory" >&5
7184 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7185
7186 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7187 if test "${with_default_terminfo_dir+set}" = set; then
7188   withval="$with_default_terminfo_dir"
7189
7190 else
7191   withval="${TERMINFO:-${datadir}/terminfo}"
7192 fi; if test -n "${datadir}/terminfo" ; then
7193
7194 if test "x$prefix" != xNONE; then
7195         cf_path_syntax="$prefix"
7196 else
7197         cf_path_syntax="$ac_default_prefix"
7198 fi
7199
7200 case ".$withval" in
7201 (.\$\(*\)*|.\'*\'*)
7202         ;;
7203 (..|./*|.\\*)
7204         ;;
7205 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7206         ;;
7207 (.\${*prefix}*|.\${*dir}*)
7208         eval withval="$withval"
7209         case ".$withval" in
7210         (.NONE/*)
7211                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7212                 ;;
7213         esac
7214         ;;
7215 (.no|.NONE/*)
7216         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7217         ;;
7218 (*)
7219         { { echo "$as_me:7219: error: expected a pathname, not \"$withval\"" >&5
7220 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7221    { (exit 1); exit 1; }; }
7222         ;;
7223 esac
7224
7225 fi
7226 eval TERMINFO="$withval"
7227
7228 echo "$as_me:7228: result: $TERMINFO" >&5
7229 echo "${ECHO_T}$TERMINFO" >&6
7230
7231 cat >>confdefs.h <<EOF
7232 #define TERMINFO "$TERMINFO"
7233 EOF
7234
7235 fi
7236
7237 ###     use option --disable-big-core to make tic run on small machines
7238 ###     We need 4Mb, check if we can allocate 50% more than that.
7239 echo "$as_me:7239: checking if big-core option selected" >&5
7240 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7241
7242 # Check whether --enable-big-core or --disable-big-core was given.
7243 if test "${enable_big_core+set}" = set; then
7244   enableval="$enable_big_core"
7245   with_big_core=$enableval
7246 else
7247   if test "$cross_compiling" = yes; then
7248   with_big_core=no
7249 else
7250   cat >conftest.$ac_ext <<_ACEOF
7251 #line 7251 "configure"
7252 #include "confdefs.h"
7253
7254 #include <stdlib.h>
7255 #include <string.h>
7256 int main() {
7257         unsigned long n = 6000000L;
7258         char *s = malloc(n);
7259         if (s != 0)
7260                 s[0] = s[n-1] = 0;
7261         ${cf_cv_main_return:-return}(s == 0);
7262 }
7263 _ACEOF
7264 rm -f conftest$ac_exeext
7265 if { (eval echo "$as_me:7265: \"$ac_link\"") >&5
7266   (eval $ac_link) 2>&5
7267   ac_status=$?
7268   echo "$as_me:7268: \$? = $ac_status" >&5
7269   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7270   { (eval echo "$as_me:7270: \"$ac_try\"") >&5
7271   (eval $ac_try) 2>&5
7272   ac_status=$?
7273   echo "$as_me:7273: \$? = $ac_status" >&5
7274   (exit $ac_status); }; }; then
7275   with_big_core=yes
7276 else
7277   echo "$as_me: program exited with status $ac_status" >&5
7278 echo "$as_me: failed program was:" >&5
7279 cat conftest.$ac_ext >&5
7280 with_big_core=no
7281 fi
7282 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7283 fi
7284 fi;
7285 echo "$as_me:7285: result: $with_big_core" >&5
7286 echo "${ECHO_T}$with_big_core" >&6
7287 test "x$with_big_core" = "xyes" &&
7288 cat >>confdefs.h <<\EOF
7289 #define HAVE_BIG_CORE 1
7290 EOF
7291
7292 ### ISO C only guarantees 512-char strings, we have tables which load faster
7293 ### when constructed using "big" strings.  More than the C compiler, the awk
7294 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7295 echo "$as_me:7295: checking if big-strings option selected" >&5
7296 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7297
7298 # Check whether --enable-big-strings or --disable-big-strings was given.
7299 if test "${enable_big_strings+set}" = set; then
7300   enableval="$enable_big_strings"
7301   with_big_strings=$enableval
7302 else
7303
7304         case x$AWK in
7305         (x)
7306                 eval with_big_strings=no
7307                 ;;
7308         (*)
7309                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7310                         | $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
7311                         eval with_big_strings=yes
7312                 else
7313                         eval with_big_strings=no
7314                 fi
7315                 ;;
7316         esac
7317
7318 fi;
7319 echo "$as_me:7319: result: $with_big_strings" >&5
7320 echo "${ECHO_T}$with_big_strings" >&6
7321
7322 USE_BIG_STRINGS=0
7323 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7324
7325 ###     use option --enable-termcap to compile in the termcap fallback support
7326 echo "$as_me:7326: checking if you want termcap-fallback support" >&5
7327 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7328
7329 # Check whether --enable-termcap or --disable-termcap was given.
7330 if test "${enable_termcap+set}" = set; then
7331   enableval="$enable_termcap"
7332   with_termcap=$enableval
7333 else
7334   with_termcap=no
7335 fi;
7336 echo "$as_me:7336: result: $with_termcap" >&5
7337 echo "${ECHO_T}$with_termcap" >&6
7338
7339 NCURSES_USE_TERMCAP=0
7340 if test "x$with_termcap" != "xyes" ; then
7341         if test "$use_database" = no ; then
7342                 if test -z "$with_fallback" ; then
7343                         { { echo "$as_me:7343: error: You have disabled the database w/o specifying fallbacks" >&5
7344 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7345    { (exit 1); exit 1; }; }
7346                 fi
7347         fi
7348
7349 cat >>confdefs.h <<\EOF
7350 #define PURE_TERMINFO 1
7351 EOF
7352
7353 else
7354
7355         if test "$with_ticlib" != no ; then
7356                 { { echo "$as_me:7356: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7357 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7358    { (exit 1); exit 1; }; }
7359         fi
7360
7361         NCURSES_USE_TERMCAP=1
7362         echo "$as_me:7362: checking for list of termcap files" >&5
7363 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7364
7365 # Check whether --with-termpath or --without-termpath was given.
7366 if test "${with_termpath+set}" = set; then
7367   withval="$with_termpath"
7368
7369 else
7370   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7371 fi;
7372 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7373 cf_dst_path=
7374 for cf_src_path in $withval
7375 do
7376
7377 if test "x$prefix" != xNONE; then
7378         cf_path_syntax="$prefix"
7379 else
7380         cf_path_syntax="$ac_default_prefix"
7381 fi
7382
7383 case ".$cf_src_path" in
7384 (.\$\(*\)*|.\'*\'*)
7385         ;;
7386 (..|./*|.\\*)
7387         ;;
7388 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7389         ;;
7390 (.\${*prefix}*|.\${*dir}*)
7391         eval cf_src_path="$cf_src_path"
7392         case ".$cf_src_path" in
7393         (.NONE/*)
7394                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7395                 ;;
7396         esac
7397         ;;
7398 (.no|.NONE/*)
7399         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7400         ;;
7401 (*)
7402         { { echo "$as_me:7402: error: expected a pathname, not \"$cf_src_path\"" >&5
7403 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7404    { (exit 1); exit 1; }; }
7405         ;;
7406 esac
7407
7408   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7409   cf_dst_path="${cf_dst_path}${cf_src_path}"
7410 done
7411 IFS="$ac_save_ifs"
7412
7413 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7414 # so we have to check/work around.  We do prefer the result of "eval"...
7415 eval cf_dst_eval="$cf_dst_path"
7416 case "x$cf_dst_eval" in
7417 (xNONE*)
7418         TERMPATH=$cf_dst_path
7419         ;;
7420 (*)
7421         TERMPATH="$cf_dst_eval"
7422         ;;
7423 esac
7424
7425         echo "$as_me:7425: result: $TERMPATH" >&5
7426 echo "${ECHO_T}$TERMPATH" >&6
7427         test -n "$TERMPATH" &&
7428 cat >>confdefs.h <<EOF
7429 #define TERMPATH "$TERMPATH"
7430 EOF
7431
7432         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7433         echo "$as_me:7433: checking if fast termcap-loader is needed" >&5
7434 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7435
7436 # Check whether --enable-getcap or --disable-getcap was given.
7437 if test "${enable_getcap+set}" = set; then
7438   enableval="$enable_getcap"
7439   with_getcap=$enableval
7440 else
7441   with_getcap=no
7442 fi;
7443         echo "$as_me:7443: result: $with_getcap" >&5
7444 echo "${ECHO_T}$with_getcap" >&6
7445         test "x$with_getcap" = "xyes" &&
7446 cat >>confdefs.h <<\EOF
7447 #define USE_GETCAP 1
7448 EOF
7449
7450         echo "$as_me:7450: checking if translated termcaps will be cached in ~/.terminfo" >&5
7451 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7452
7453 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7454 if test "${enable_getcap_cache+set}" = set; then
7455   enableval="$enable_getcap_cache"
7456   with_getcap_cache=$enableval
7457 else
7458   with_getcap_cache=no
7459 fi;
7460         echo "$as_me:7460: result: $with_getcap_cache" >&5
7461 echo "${ECHO_T}$with_getcap_cache" >&6
7462         test "x$with_getcap_cache" = "xyes" &&
7463 cat >>confdefs.h <<\EOF
7464 #define USE_GETCAP_CACHE 1
7465 EOF
7466
7467 fi
7468
7469 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7470 echo "$as_me:7470: checking if ~/.terminfo is wanted" >&5
7471 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7472
7473 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7474 if test "${enable_home_terminfo+set}" = set; then
7475   enableval="$enable_home_terminfo"
7476   with_home_terminfo=$enableval
7477 else
7478   with_home_terminfo=yes
7479 fi;
7480 echo "$as_me:7480: result: $with_home_terminfo" >&5
7481 echo "${ECHO_T}$with_home_terminfo" >&6
7482 test "x$with_home_terminfo" = "xyes" &&
7483 cat >>confdefs.h <<\EOF
7484 #define USE_HOME_TERMINFO 1
7485 EOF
7486
7487 echo "$as_me:7487: checking if you want to use restricted environment when running as root" >&5
7488 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7489
7490 # Check whether --enable-root-environ or --disable-root-environ was given.
7491 if test "${enable_root_environ+set}" = set; then
7492   enableval="$enable_root_environ"
7493   with_root_environ=$enableval
7494 else
7495   with_root_environ=yes
7496 fi;
7497 echo "$as_me:7497: result: $with_root_environ" >&5
7498 echo "${ECHO_T}$with_root_environ" >&6
7499 test "x$with_root_environ" = xyes &&
7500 cat >>confdefs.h <<\EOF
7501 #define USE_ROOT_ENVIRON 1
7502 EOF
7503
7504 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7505 ###   to reduce storage requirements for the terminfo database.
7506
7507 for ac_func in \
7508         remove \
7509         unlink
7510 do
7511 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7512 echo "$as_me:7512: checking for $ac_func" >&5
7513 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7514 if eval "test \"\${$as_ac_var+set}\" = set"; then
7515   echo $ECHO_N "(cached) $ECHO_C" >&6
7516 else
7517   cat >conftest.$ac_ext <<_ACEOF
7518 #line 7518 "configure"
7519 #include "confdefs.h"
7520 /* System header to define __stub macros and hopefully few prototypes,
7521     which can conflict with char $ac_func (); below.  */
7522 #include <assert.h>
7523 /* Override any gcc2 internal prototype to avoid an error.  */
7524 #ifdef __cplusplus
7525 extern "C"
7526 #endif
7527 /* We use char because int might match the return type of a gcc2
7528    builtin and then its argument prototype would still apply.  */
7529 char $ac_func ();
7530 char (*f) ();
7531
7532 int
7533 main ()
7534 {
7535 /* The GNU C library defines this for functions which it implements
7536     to always fail with ENOSYS.  Some functions are actually named
7537     something starting with __ and the normal name is an alias.  */
7538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7539 choke me
7540 #else
7541 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7542 #endif
7543
7544   ;
7545   return 0;
7546 }
7547 _ACEOF
7548 rm -f conftest.$ac_objext conftest$ac_exeext
7549 if { (eval echo "$as_me:7549: \"$ac_link\"") >&5
7550   (eval $ac_link) 2>&5
7551   ac_status=$?
7552   echo "$as_me:7552: \$? = $ac_status" >&5
7553   (exit $ac_status); } &&
7554          { ac_try='test -s conftest$ac_exeext'
7555   { (eval echo "$as_me:7555: \"$ac_try\"") >&5
7556   (eval $ac_try) 2>&5
7557   ac_status=$?
7558   echo "$as_me:7558: \$? = $ac_status" >&5
7559   (exit $ac_status); }; }; then
7560   eval "$as_ac_var=yes"
7561 else
7562   echo "$as_me: failed program was:" >&5
7563 cat conftest.$ac_ext >&5
7564 eval "$as_ac_var=no"
7565 fi
7566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7567 fi
7568 echo "$as_me:7568: result: `eval echo '${'$as_ac_var'}'`" >&5
7569 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7570 if test `eval echo '${'$as_ac_var'}'` = yes; then
7571   cat >>confdefs.h <<EOF
7572 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7573 EOF
7574
7575 fi
7576 done
7577
7578 if test "$cross_compiling" = yes ; then
7579
7580 for ac_func in \
7581                 link \
7582                 symlink
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 else
7652         echo "$as_me:7652: checking if link/symlink functions work" >&5
7653 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7654 if test "${cf_cv_link_funcs+set}" = set; then
7655   echo $ECHO_N "(cached) $ECHO_C" >&6
7656 else
7657
7658                 cf_cv_link_funcs=
7659                 for cf_func in link symlink ; do
7660                         if test "$cross_compiling" = yes; then
7661
7662                         eval 'ac_cv_func_'$cf_func'=error'
7663 else
7664   cat >conftest.$ac_ext <<_ACEOF
7665 #line 7665 "configure"
7666 #include "confdefs.h"
7667
7668 #include <sys/types.h>
7669 #include <sys/stat.h>
7670 #ifdef HAVE_UNISTD_H
7671 #include <unistd.h>
7672 #endif
7673 int main()
7674 {
7675         int fail = 0;
7676         char *src = "config.log";
7677         char *dst = "conftest.chk";
7678         struct stat src_sb;
7679         struct stat dst_sb;
7680
7681         stat(src, &src_sb);
7682         fail = ($cf_func("config.log", "conftest.chk") < 0)
7683             || (stat(dst, &dst_sb) < 0)
7684             || (dst_sb.st_mtime != src_sb.st_mtime);
7685 #ifdef HAVE_UNLINK
7686         unlink(dst);
7687 #else
7688         remove(dst);
7689 #endif
7690         ${cf_cv_main_return:-return} (fail);
7691 }
7692
7693 _ACEOF
7694 rm -f 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); } && { ac_try='./conftest$ac_exeext'
7700   { (eval echo "$as_me:7700: \"$ac_try\"") >&5
7701   (eval $ac_try) 2>&5
7702   ac_status=$?
7703   echo "$as_me:7703: \$? = $ac_status" >&5
7704   (exit $ac_status); }; }; then
7705
7706                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7707                         eval 'ac_cv_func_'$cf_func'=yes'
7708 else
7709   echo "$as_me: program exited with status $ac_status" >&5
7710 echo "$as_me: failed program was:" >&5
7711 cat conftest.$ac_ext >&5
7712
7713                         eval 'ac_cv_func_'$cf_func'=no'
7714 fi
7715 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7716 fi
7717                 done
7718                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7719
7720 fi
7721 echo "$as_me:7721: result: $cf_cv_link_funcs" >&5
7722 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7723         test "$ac_cv_func_link"    = yes &&
7724 cat >>confdefs.h <<\EOF
7725 #define HAVE_LINK 1
7726 EOF
7727
7728         test "$ac_cv_func_symlink" = yes &&
7729 cat >>confdefs.h <<\EOF
7730 #define HAVE_SYMLINK 1
7731 EOF
7732
7733 fi
7734
7735 with_links=no
7736 with_symlinks=no
7737
7738 # soft links (symbolic links) are useful for some systems where hard links do
7739 # not work, or to make it simpler to copy terminfo trees around.
7740 if test "x$ac_cv_func_symlink" = xyes ; then
7741         echo "$as_me:7741: checking if tic should use symbolic links" >&5
7742 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7743
7744 # Check whether --enable-symlinks or --disable-symlinks was given.
7745 if test "${enable_symlinks+set}" = set; then
7746   enableval="$enable_symlinks"
7747   with_symlinks=$enableval
7748 else
7749   with_symlinks=no
7750 fi;
7751         echo "$as_me:7751: result: $with_symlinks" >&5
7752 echo "${ECHO_T}$with_symlinks" >&6
7753 fi
7754
7755 # If we have hard links and did not choose to use soft links instead, there is
7756 # no reason to make this choice optional - use the hard links.
7757 if test "$with_symlinks" = no ; then
7758         echo "$as_me:7758: checking if tic should use hard links" >&5
7759 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7760         if test "x$ac_cv_func_link" = xyes ; then
7761                 with_links=yes
7762         else
7763                 with_links=no
7764         fi
7765         echo "$as_me:7765: result: $with_links" >&5
7766 echo "${ECHO_T}$with_links" >&6
7767 fi
7768
7769 test "x$with_links" = xyes &&
7770 cat >>confdefs.h <<\EOF
7771 #define USE_LINKS 1
7772 EOF
7773
7774 test "x$with_symlinks" = xyes &&
7775 cat >>confdefs.h <<\EOF
7776 #define USE_SYMLINKS 1
7777 EOF
7778
7779 ###   use option --enable-broken-linker to force on use of broken-linker support
7780 echo "$as_me:7780: checking if you want broken-linker support code" >&5
7781 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7782
7783 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7784 if test "${enable_broken_linker+set}" = set; then
7785   enableval="$enable_broken_linker"
7786   with_broken_linker=$enableval
7787 else
7788   with_broken_linker=${BROKEN_LINKER:-no}
7789 fi;
7790 echo "$as_me:7790: result: $with_broken_linker" >&5
7791 echo "${ECHO_T}$with_broken_linker" >&6
7792
7793 BROKEN_LINKER=0
7794 if test "x$with_broken_linker" = xyes ; then
7795
7796 cat >>confdefs.h <<\EOF
7797 #define BROKEN_LINKER 1
7798 EOF
7799
7800         BROKEN_LINKER=1
7801 elif test "$DFT_LWR_MODEL" = shared ; then
7802         case $cf_cv_system_name in
7803         (cygwin*)
7804
7805 cat >>confdefs.h <<\EOF
7806 #define BROKEN_LINKER 1
7807 EOF
7808
7809                 BROKEN_LINKER=1
7810                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7811
7812 echo "${as_me:-configure}:7812: testing cygwin linker is broken anyway ..." 1>&5
7813
7814                 ;;
7815         esac
7816 fi
7817
7818 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7819 echo "$as_me:7819: checking if tputs should process BSD-style prefix padding" >&5
7820 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7821
7822 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7823 if test "${enable_bsdpad+set}" = set; then
7824   enableval="$enable_bsdpad"
7825   with_bsdpad=$enableval
7826 else
7827   with_bsdpad=no
7828 fi;
7829 echo "$as_me:7829: result: $with_bsdpad" >&5
7830 echo "${ECHO_T}$with_bsdpad" >&6
7831 test "x$with_bsdpad" = xyes &&
7832 cat >>confdefs.h <<\EOF
7833 #define BSD_TPUTS 1
7834 EOF
7835
7836 ###   use option --enable-widec to turn on use of wide-character support
7837 NCURSES_CH_T=chtype
7838 NCURSES_LIBUTF8=0
7839
7840 NEED_WCHAR_H=0
7841 NCURSES_MBSTATE_T=0
7842 NCURSES_WCHAR_T=0
7843 NCURSES_WINT_T=0
7844
7845 # Check to define _XOPEN_SOURCE "automatically"
7846 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7847
7848 cf_XOPEN_SOURCE=500
7849 cf_POSIX_C_SOURCE=199506L
7850 cf_xopen_source=
7851
7852 case $host_os in
7853 (aix[4-7]*)
7854         cf_xopen_source="-D_ALL_SOURCE"
7855         ;;
7856 (cygwin|msys)
7857         cf_XOPEN_SOURCE=600
7858         ;;
7859 (darwin[0-8].*)
7860         cf_xopen_source="-D_APPLE_C_SOURCE"
7861         ;;
7862 (darwin*)
7863         cf_xopen_source="-D_DARWIN_C_SOURCE"
7864         cf_XOPEN_SOURCE=
7865         ;;
7866 (freebsd*|dragonfly*)
7867         # 5.x headers associate
7868         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7869         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7870         cf_POSIX_C_SOURCE=200112L
7871         cf_XOPEN_SOURCE=600
7872         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7873         ;;
7874 (hpux11*)
7875         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7876         ;;
7877 (hpux*)
7878         cf_xopen_source="-D_HPUX_SOURCE"
7879         ;;
7880 (irix[56].*)
7881         cf_xopen_source="-D_SGI_SOURCE"
7882         cf_XOPEN_SOURCE=
7883         ;;
7884 (linux*|gnu*|mint*|k*bsd*-gnu)
7885
7886 echo "$as_me:7886: checking if we must define _GNU_SOURCE" >&5
7887 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7888 if test "${cf_cv_gnu_source+set}" = set; then
7889   echo $ECHO_N "(cached) $ECHO_C" >&6
7890 else
7891
7892 cat >conftest.$ac_ext <<_ACEOF
7893 #line 7893 "configure"
7894 #include "confdefs.h"
7895 #include <sys/types.h>
7896 int
7897 main ()
7898 {
7899
7900 #ifndef _XOPEN_SOURCE
7901 make an error
7902 #endif
7903   ;
7904   return 0;
7905 }
7906 _ACEOF
7907 rm -f conftest.$ac_objext
7908 if { (eval echo "$as_me:7908: \"$ac_compile\"") >&5
7909   (eval $ac_compile) 2>&5
7910   ac_status=$?
7911   echo "$as_me:7911: \$? = $ac_status" >&5
7912   (exit $ac_status); } &&
7913          { ac_try='test -s conftest.$ac_objext'
7914   { (eval echo "$as_me:7914: \"$ac_try\"") >&5
7915   (eval $ac_try) 2>&5
7916   ac_status=$?
7917   echo "$as_me:7917: \$? = $ac_status" >&5
7918   (exit $ac_status); }; }; then
7919   cf_cv_gnu_source=no
7920 else
7921   echo "$as_me: failed program was:" >&5
7922 cat conftest.$ac_ext >&5
7923 cf_save="$CPPFLAGS"
7924          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7925          cat >conftest.$ac_ext <<_ACEOF
7926 #line 7926 "configure"
7927 #include "confdefs.h"
7928 #include <sys/types.h>
7929 int
7930 main ()
7931 {
7932
7933 #ifdef _XOPEN_SOURCE
7934 make an error
7935 #endif
7936   ;
7937   return 0;
7938 }
7939 _ACEOF
7940 rm -f conftest.$ac_objext
7941 if { (eval echo "$as_me:7941: \"$ac_compile\"") >&5
7942   (eval $ac_compile) 2>&5
7943   ac_status=$?
7944   echo "$as_me:7944: \$? = $ac_status" >&5
7945   (exit $ac_status); } &&
7946          { ac_try='test -s conftest.$ac_objext'
7947   { (eval echo "$as_me:7947: \"$ac_try\"") >&5
7948   (eval $ac_try) 2>&5
7949   ac_status=$?
7950   echo "$as_me:7950: \$? = $ac_status" >&5
7951   (exit $ac_status); }; }; then
7952   cf_cv_gnu_source=no
7953 else
7954   echo "$as_me: failed program was:" >&5
7955 cat conftest.$ac_ext >&5
7956 cf_cv_gnu_source=yes
7957 fi
7958 rm -f conftest.$ac_objext conftest.$ac_ext
7959         CPPFLAGS="$cf_save"
7960
7961 fi
7962 rm -f conftest.$ac_objext conftest.$ac_ext
7963
7964 fi
7965 echo "$as_me:7965: result: $cf_cv_gnu_source" >&5
7966 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7967 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7968
7969         ;;
7970 (minix*)
7971         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7972         ;;
7973 (mirbsd*)
7974         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7975         cf_XOPEN_SOURCE=
7976
7977 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7978
7979 cf_save_CFLAGS="$CFLAGS"
7980 cf_save_CPPFLAGS="$CPPFLAGS"
7981
7982 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7983         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7984                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7985
7986 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7987         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7988                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7989
7990 echo "$as_me:7990: checking if we should define _POSIX_C_SOURCE" >&5
7991 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7992 if test "${cf_cv_posix_c_source+set}" = set; then
7993   echo $ECHO_N "(cached) $ECHO_C" >&6
7994 else
7995
7996 echo "${as_me:-configure}:7996: testing if the symbol is already defined go no further ..." 1>&5
7997
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 #ifndef _POSIX_C_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_posix_c_source=no
8026 else
8027   echo "$as_me: failed program was:" >&5
8028 cat conftest.$ac_ext >&5
8029 cf_want_posix_source=no
8030          case .$cf_POSIX_C_SOURCE in
8031          (.[12]??*)
8032                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8033                 ;;
8034          (.2)
8035                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8036                 cf_want_posix_source=yes
8037                 ;;
8038          (.*)
8039                 cf_want_posix_source=yes
8040                 ;;
8041          esac
8042          if test "$cf_want_posix_source" = yes ; then
8043                 cat >conftest.$ac_ext <<_ACEOF
8044 #line 8044 "configure"
8045 #include "confdefs.h"
8046 #include <sys/types.h>
8047 int
8048 main ()
8049 {
8050
8051 #ifdef _POSIX_SOURCE
8052 make an error
8053 #endif
8054   ;
8055   return 0;
8056 }
8057 _ACEOF
8058 rm -f conftest.$ac_objext
8059 if { (eval echo "$as_me:8059: \"$ac_compile\"") >&5
8060   (eval $ac_compile) 2>&5
8061   ac_status=$?
8062   echo "$as_me:8062: \$? = $ac_status" >&5
8063   (exit $ac_status); } &&
8064          { ac_try='test -s conftest.$ac_objext'
8065   { (eval echo "$as_me:8065: \"$ac_try\"") >&5
8066   (eval $ac_try) 2>&5
8067   ac_status=$?
8068   echo "$as_me:8068: \$? = $ac_status" >&5
8069   (exit $ac_status); }; }; then
8070   :
8071 else
8072   echo "$as_me: failed program was:" >&5
8073 cat conftest.$ac_ext >&5
8074 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8075 fi
8076 rm -f conftest.$ac_objext conftest.$ac_ext
8077          fi
8078
8079 echo "${as_me:-configure}:8079: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8080
8081          CFLAGS="$cf_trim_CFLAGS"
8082          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8083
8084 echo "${as_me:-configure}:8084: testing if the second compile does not leave our definition intact error ..." 1>&5
8085
8086          cat >conftest.$ac_ext <<_ACEOF
8087 #line 8087 "configure"
8088 #include "confdefs.h"
8089 #include <sys/types.h>
8090 int
8091 main ()
8092 {
8093
8094 #ifndef _POSIX_C_SOURCE
8095 make an error
8096 #endif
8097   ;
8098   return 0;
8099 }
8100 _ACEOF
8101 rm -f conftest.$ac_objext
8102 if { (eval echo "$as_me:8102: \"$ac_compile\"") >&5
8103   (eval $ac_compile) 2>&5
8104   ac_status=$?
8105   echo "$as_me:8105: \$? = $ac_status" >&5
8106   (exit $ac_status); } &&
8107          { ac_try='test -s conftest.$ac_objext'
8108   { (eval echo "$as_me:8108: \"$ac_try\"") >&5
8109   (eval $ac_try) 2>&5
8110   ac_status=$?
8111   echo "$as_me:8111: \$? = $ac_status" >&5
8112   (exit $ac_status); }; }; then
8113   :
8114 else
8115   echo "$as_me: failed program was:" >&5
8116 cat conftest.$ac_ext >&5
8117 cf_cv_posix_c_source=no
8118 fi
8119 rm -f conftest.$ac_objext conftest.$ac_ext
8120          CFLAGS="$cf_save_CFLAGS"
8121          CPPFLAGS="$cf_save_CPPFLAGS"
8122
8123 fi
8124 rm -f conftest.$ac_objext conftest.$ac_ext
8125
8126 fi
8127 echo "$as_me:8127: result: $cf_cv_posix_c_source" >&5
8128 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8129
8130 if test "$cf_cv_posix_c_source" != no ; then
8131         CFLAGS="$cf_trim_CFLAGS"
8132         CPPFLAGS="$cf_trim_CPPFLAGS"
8133
8134 cf_fix_cppflags=no
8135 cf_new_cflags=
8136 cf_new_cppflags=
8137 cf_new_extra_cppflags=
8138
8139 for cf_add_cflags in $cf_cv_posix_c_source
8140 do
8141 case $cf_fix_cppflags in
8142 (no)
8143         case $cf_add_cflags in
8144         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8145                 case $cf_add_cflags in
8146                 (-D*)
8147                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8148
8149                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8150                                 && test -z "${cf_tst_cflags}" \
8151                                 && cf_fix_cppflags=yes
8152
8153                         if test $cf_fix_cppflags = yes ; then
8154                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8155                                 continue
8156                         elif test "${cf_tst_cflags}" = "\"'" ; then
8157                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8158                                 continue
8159                         fi
8160                         ;;
8161                 esac
8162                 case "$CPPFLAGS" in
8163                 (*$cf_add_cflags)
8164                         ;;
8165                 (*)
8166                         case $cf_add_cflags in
8167                         (-D*)
8168                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8169
8170 CPPFLAGS=`echo "$CPPFLAGS" | \
8171         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8172                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8173
8174                                 ;;
8175                         esac
8176                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8177                         ;;
8178                 esac
8179                 ;;
8180         (*)
8181                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8182                 ;;
8183         esac
8184         ;;
8185 (yes)
8186         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8187
8188         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8189
8190         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8191                 && test -z "${cf_tst_cflags}" \
8192                 && cf_fix_cppflags=no
8193         ;;
8194 esac
8195 done
8196
8197 if test -n "$cf_new_cflags" ; then
8198
8199         CFLAGS="$CFLAGS $cf_new_cflags"
8200 fi
8201
8202 if test -n "$cf_new_cppflags" ; then
8203
8204         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8205 fi
8206
8207 if test -n "$cf_new_extra_cppflags" ; then
8208
8209         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8210 fi
8211
8212 fi
8213
8214         ;;
8215 (netbsd*)
8216         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8217         ;;
8218 (openbsd[4-9]*)
8219         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8220         cf_xopen_source="-D_BSD_SOURCE"
8221         cf_XOPEN_SOURCE=600
8222         ;;
8223 (openbsd*)
8224         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8225         ;;
8226 (os2*)
8227         cf_XOPEN_SOURCE=
8228         ;;
8229 (osf[45]*)
8230         cf_xopen_source="-D_OSF_SOURCE"
8231         ;;
8232 (nto-qnx*)
8233         cf_xopen_source="-D_QNX_SOURCE"
8234         ;;
8235 (sco*)
8236         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8237         ;;
8238 (solaris2.*)
8239         cf_xopen_source="-D__EXTENSIONS__"
8240         cf_cv_xopen_source=broken
8241         ;;
8242 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8243         cf_XOPEN_SOURCE=
8244         cf_POSIX_C_SOURCE=
8245         ;;
8246 (*)
8247
8248 echo "$as_me:8248: checking if we should define _XOPEN_SOURCE" >&5
8249 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8250 if test "${cf_cv_xopen_source+set}" = set; then
8251   echo $ECHO_N "(cached) $ECHO_C" >&6
8252 else
8253
8254         cat >conftest.$ac_ext <<_ACEOF
8255 #line 8255 "configure"
8256 #include "confdefs.h"
8257
8258 #include <stdlib.h>
8259 #include <string.h>
8260 #include <sys/types.h>
8261
8262 int
8263 main ()
8264 {
8265
8266 #ifndef _XOPEN_SOURCE
8267 make an error
8268 #endif
8269   ;
8270   return 0;
8271 }
8272 _ACEOF
8273 rm -f conftest.$ac_objext
8274 if { (eval echo "$as_me:8274: \"$ac_compile\"") >&5
8275   (eval $ac_compile) 2>&5
8276   ac_status=$?
8277   echo "$as_me:8277: \$? = $ac_status" >&5
8278   (exit $ac_status); } &&
8279          { ac_try='test -s conftest.$ac_objext'
8280   { (eval echo "$as_me:8280: \"$ac_try\"") >&5
8281   (eval $ac_try) 2>&5
8282   ac_status=$?
8283   echo "$as_me:8283: \$? = $ac_status" >&5
8284   (exit $ac_status); }; }; then
8285   cf_cv_xopen_source=no
8286 else
8287   echo "$as_me: failed program was:" >&5
8288 cat conftest.$ac_ext >&5
8289 cf_save="$CPPFLAGS"
8290          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8291          cat >conftest.$ac_ext <<_ACEOF
8292 #line 8292 "configure"
8293 #include "confdefs.h"
8294
8295 #include <stdlib.h>
8296 #include <string.h>
8297 #include <sys/types.h>
8298
8299 int
8300 main ()
8301 {
8302
8303 #ifdef _XOPEN_SOURCE
8304 make an error
8305 #endif
8306   ;
8307   return 0;
8308 }
8309 _ACEOF
8310 rm -f conftest.$ac_objext
8311 if { (eval echo "$as_me:8311: \"$ac_compile\"") >&5
8312   (eval $ac_compile) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit $ac_status); } &&
8316          { ac_try='test -s conftest.$ac_objext'
8317   { (eval echo "$as_me:8317: \"$ac_try\"") >&5
8318   (eval $ac_try) 2>&5
8319   ac_status=$?
8320   echo "$as_me:8320: \$? = $ac_status" >&5
8321   (exit $ac_status); }; }; then
8322   cf_cv_xopen_source=no
8323 else
8324   echo "$as_me: failed program was:" >&5
8325 cat conftest.$ac_ext >&5
8326 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8327 fi
8328 rm -f conftest.$ac_objext conftest.$ac_ext
8329         CPPFLAGS="$cf_save"
8330
8331 fi
8332 rm -f conftest.$ac_objext conftest.$ac_ext
8333
8334 fi
8335 echo "$as_me:8335: result: $cf_cv_xopen_source" >&5
8336 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8337
8338 if test "$cf_cv_xopen_source" != no ; then
8339
8340 CFLAGS=`echo "$CFLAGS" | \
8341         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8342                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8343
8344 CPPFLAGS=`echo "$CPPFLAGS" | \
8345         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8346                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8347
8348         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8349
8350 cf_fix_cppflags=no
8351 cf_new_cflags=
8352 cf_new_cppflags=
8353 cf_new_extra_cppflags=
8354
8355 for cf_add_cflags in $cf_temp_xopen_source
8356 do
8357 case $cf_fix_cppflags in
8358 (no)
8359         case $cf_add_cflags in
8360         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8361                 case $cf_add_cflags in
8362                 (-D*)
8363                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8364
8365                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8366                                 && test -z "${cf_tst_cflags}" \
8367                                 && cf_fix_cppflags=yes
8368
8369                         if test $cf_fix_cppflags = yes ; then
8370                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8371                                 continue
8372                         elif test "${cf_tst_cflags}" = "\"'" ; then
8373                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8374                                 continue
8375                         fi
8376                         ;;
8377                 esac
8378                 case "$CPPFLAGS" in
8379                 (*$cf_add_cflags)
8380                         ;;
8381                 (*)
8382                         case $cf_add_cflags in
8383                         (-D*)
8384                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8385
8386 CPPFLAGS=`echo "$CPPFLAGS" | \
8387         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8388                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8389
8390                                 ;;
8391                         esac
8392                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8393                         ;;
8394                 esac
8395                 ;;
8396         (*)
8397                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8398                 ;;
8399         esac
8400         ;;
8401 (yes)
8402         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8403
8404         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8405
8406         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8407                 && test -z "${cf_tst_cflags}" \
8408                 && cf_fix_cppflags=no
8409         ;;
8410 esac
8411 done
8412
8413 if test -n "$cf_new_cflags" ; then
8414
8415         CFLAGS="$CFLAGS $cf_new_cflags"
8416 fi
8417
8418 if test -n "$cf_new_cppflags" ; then
8419
8420         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8421 fi
8422
8423 if test -n "$cf_new_extra_cppflags" ; then
8424
8425         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8426 fi
8427
8428 fi
8429
8430 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8431
8432 cf_save_CFLAGS="$CFLAGS"
8433 cf_save_CPPFLAGS="$CPPFLAGS"
8434
8435 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8436         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8437                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8438
8439 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8440         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8441                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8442
8443 echo "$as_me:8443: checking if we should define _POSIX_C_SOURCE" >&5
8444 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8445 if test "${cf_cv_posix_c_source+set}" = set; then
8446   echo $ECHO_N "(cached) $ECHO_C" >&6
8447 else
8448
8449 echo "${as_me:-configure}:8449: testing if the symbol is already defined go no further ..." 1>&5
8450
8451         cat >conftest.$ac_ext <<_ACEOF
8452 #line 8452 "configure"
8453 #include "confdefs.h"
8454 #include <sys/types.h>
8455 int
8456 main ()
8457 {
8458
8459 #ifndef _POSIX_C_SOURCE
8460 make an error
8461 #endif
8462   ;
8463   return 0;
8464 }
8465 _ACEOF
8466 rm -f conftest.$ac_objext
8467 if { (eval echo "$as_me:8467: \"$ac_compile\"") >&5
8468   (eval $ac_compile) 2>&5
8469   ac_status=$?
8470   echo "$as_me:8470: \$? = $ac_status" >&5
8471   (exit $ac_status); } &&
8472          { ac_try='test -s conftest.$ac_objext'
8473   { (eval echo "$as_me:8473: \"$ac_try\"") >&5
8474   (eval $ac_try) 2>&5
8475   ac_status=$?
8476   echo "$as_me:8476: \$? = $ac_status" >&5
8477   (exit $ac_status); }; }; then
8478   cf_cv_posix_c_source=no
8479 else
8480   echo "$as_me: failed program was:" >&5
8481 cat conftest.$ac_ext >&5
8482 cf_want_posix_source=no
8483          case .$cf_POSIX_C_SOURCE in
8484          (.[12]??*)
8485                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8486                 ;;
8487          (.2)
8488                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8489                 cf_want_posix_source=yes
8490                 ;;
8491          (.*)
8492                 cf_want_posix_source=yes
8493                 ;;
8494          esac
8495          if test "$cf_want_posix_source" = yes ; then
8496                 cat >conftest.$ac_ext <<_ACEOF
8497 #line 8497 "configure"
8498 #include "confdefs.h"
8499 #include <sys/types.h>
8500 int
8501 main ()
8502 {
8503
8504 #ifdef _POSIX_SOURCE
8505 make an error
8506 #endif
8507   ;
8508   return 0;
8509 }
8510 _ACEOF
8511 rm -f conftest.$ac_objext
8512 if { (eval echo "$as_me:8512: \"$ac_compile\"") >&5
8513   (eval $ac_compile) 2>&5
8514   ac_status=$?
8515   echo "$as_me:8515: \$? = $ac_status" >&5
8516   (exit $ac_status); } &&
8517          { ac_try='test -s conftest.$ac_objext'
8518   { (eval echo "$as_me:8518: \"$ac_try\"") >&5
8519   (eval $ac_try) 2>&5
8520   ac_status=$?
8521   echo "$as_me:8521: \$? = $ac_status" >&5
8522   (exit $ac_status); }; }; then
8523   :
8524 else
8525   echo "$as_me: failed program was:" >&5
8526 cat conftest.$ac_ext >&5
8527 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8528 fi
8529 rm -f conftest.$ac_objext conftest.$ac_ext
8530          fi
8531
8532 echo "${as_me:-configure}:8532: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8533
8534          CFLAGS="$cf_trim_CFLAGS"
8535          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8536
8537 echo "${as_me:-configure}:8537: testing if the second compile does not leave our definition intact error ..." 1>&5
8538
8539          cat >conftest.$ac_ext <<_ACEOF
8540 #line 8540 "configure"
8541 #include "confdefs.h"
8542 #include <sys/types.h>
8543 int
8544 main ()
8545 {
8546
8547 #ifndef _POSIX_C_SOURCE
8548 make an error
8549 #endif
8550   ;
8551   return 0;
8552 }
8553 _ACEOF
8554 rm -f conftest.$ac_objext
8555 if { (eval echo "$as_me:8555: \"$ac_compile\"") >&5
8556   (eval $ac_compile) 2>&5
8557   ac_status=$?
8558   echo "$as_me:8558: \$? = $ac_status" >&5
8559   (exit $ac_status); } &&
8560          { ac_try='test -s conftest.$ac_objext'
8561   { (eval echo "$as_me:8561: \"$ac_try\"") >&5
8562   (eval $ac_try) 2>&5
8563   ac_status=$?
8564   echo "$as_me:8564: \$? = $ac_status" >&5
8565   (exit $ac_status); }; }; then
8566   :
8567 else
8568   echo "$as_me: failed program was:" >&5
8569 cat conftest.$ac_ext >&5
8570 cf_cv_posix_c_source=no
8571 fi
8572 rm -f conftest.$ac_objext conftest.$ac_ext
8573          CFLAGS="$cf_save_CFLAGS"
8574          CPPFLAGS="$cf_save_CPPFLAGS"
8575
8576 fi
8577 rm -f conftest.$ac_objext conftest.$ac_ext
8578
8579 fi
8580 echo "$as_me:8580: result: $cf_cv_posix_c_source" >&5
8581 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8582
8583 if test "$cf_cv_posix_c_source" != no ; then
8584         CFLAGS="$cf_trim_CFLAGS"
8585         CPPFLAGS="$cf_trim_CPPFLAGS"
8586
8587 cf_fix_cppflags=no
8588 cf_new_cflags=
8589 cf_new_cppflags=
8590 cf_new_extra_cppflags=
8591
8592 for cf_add_cflags in $cf_cv_posix_c_source
8593 do
8594 case $cf_fix_cppflags in
8595 (no)
8596         case $cf_add_cflags in
8597         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8598                 case $cf_add_cflags in
8599                 (-D*)
8600                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8601
8602                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8603                                 && test -z "${cf_tst_cflags}" \
8604                                 && cf_fix_cppflags=yes
8605
8606                         if test $cf_fix_cppflags = yes ; then
8607                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8608                                 continue
8609                         elif test "${cf_tst_cflags}" = "\"'" ; then
8610                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8611                                 continue
8612                         fi
8613                         ;;
8614                 esac
8615                 case "$CPPFLAGS" in
8616                 (*$cf_add_cflags)
8617                         ;;
8618                 (*)
8619                         case $cf_add_cflags in
8620                         (-D*)
8621                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8622
8623 CPPFLAGS=`echo "$CPPFLAGS" | \
8624         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8625                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8626
8627                                 ;;
8628                         esac
8629                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8630                         ;;
8631                 esac
8632                 ;;
8633         (*)
8634                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8635                 ;;
8636         esac
8637         ;;
8638 (yes)
8639         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8640
8641         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8642
8643         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8644                 && test -z "${cf_tst_cflags}" \
8645                 && cf_fix_cppflags=no
8646         ;;
8647 esac
8648 done
8649
8650 if test -n "$cf_new_cflags" ; then
8651
8652         CFLAGS="$CFLAGS $cf_new_cflags"
8653 fi
8654
8655 if test -n "$cf_new_cppflags" ; then
8656
8657         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8658 fi
8659
8660 if test -n "$cf_new_extra_cppflags" ; then
8661
8662         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8663 fi
8664
8665 fi
8666
8667         ;;
8668 esac
8669
8670 if test -n "$cf_xopen_source" ; then
8671
8672 cf_fix_cppflags=no
8673 cf_new_cflags=
8674 cf_new_cppflags=
8675 cf_new_extra_cppflags=
8676
8677 for cf_add_cflags in $cf_xopen_source
8678 do
8679 case $cf_fix_cppflags in
8680 (no)
8681         case $cf_add_cflags in
8682         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8683                 case $cf_add_cflags in
8684                 (-D*)
8685                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8686
8687                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8688                                 && test -z "${cf_tst_cflags}" \
8689                                 && cf_fix_cppflags=yes
8690
8691                         if test $cf_fix_cppflags = yes ; then
8692                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8693                                 continue
8694                         elif test "${cf_tst_cflags}" = "\"'" ; then
8695                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8696                                 continue
8697                         fi
8698                         ;;
8699                 esac
8700                 case "$CPPFLAGS" in
8701                 (*$cf_add_cflags)
8702                         ;;
8703                 (*)
8704                         case $cf_add_cflags in
8705                         (-D*)
8706                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8707
8708 CPPFLAGS=`echo "$CPPFLAGS" | \
8709         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8710                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8711
8712                                 ;;
8713                         esac
8714                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8715                         ;;
8716                 esac
8717                 ;;
8718         (*)
8719                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8720                 ;;
8721         esac
8722         ;;
8723 (yes)
8724         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8725
8726         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8727
8728         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8729                 && test -z "${cf_tst_cflags}" \
8730                 && cf_fix_cppflags=no
8731         ;;
8732 esac
8733 done
8734
8735 if test -n "$cf_new_cflags" ; then
8736         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8737
8738 echo "${as_me:-configure}:8738: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8739
8740         CFLAGS="$CFLAGS $cf_new_cflags"
8741 fi
8742
8743 if test -n "$cf_new_cppflags" ; then
8744         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8745
8746 echo "${as_me:-configure}:8746: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8747
8748         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8749 fi
8750
8751 if test -n "$cf_new_extra_cppflags" ; then
8752         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8753
8754 echo "${as_me:-configure}:8754: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8755
8756         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8757 fi
8758
8759 fi
8760
8761 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8762         echo "$as_me:8762: checking if _XOPEN_SOURCE really is set" >&5
8763 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8764         cat >conftest.$ac_ext <<_ACEOF
8765 #line 8765 "configure"
8766 #include "confdefs.h"
8767 #include <stdlib.h>
8768 int
8769 main ()
8770 {
8771
8772 #ifndef _XOPEN_SOURCE
8773 make an error
8774 #endif
8775   ;
8776   return 0;
8777 }
8778 _ACEOF
8779 rm -f conftest.$ac_objext
8780 if { (eval echo "$as_me:8780: \"$ac_compile\"") >&5
8781   (eval $ac_compile) 2>&5
8782   ac_status=$?
8783   echo "$as_me:8783: \$? = $ac_status" >&5
8784   (exit $ac_status); } &&
8785          { ac_try='test -s conftest.$ac_objext'
8786   { (eval echo "$as_me:8786: \"$ac_try\"") >&5
8787   (eval $ac_try) 2>&5
8788   ac_status=$?
8789   echo "$as_me:8789: \$? = $ac_status" >&5
8790   (exit $ac_status); }; }; then
8791   cf_XOPEN_SOURCE_set=yes
8792 else
8793   echo "$as_me: failed program was:" >&5
8794 cat conftest.$ac_ext >&5
8795 cf_XOPEN_SOURCE_set=no
8796 fi
8797 rm -f conftest.$ac_objext conftest.$ac_ext
8798         echo "$as_me:8798: result: $cf_XOPEN_SOURCE_set" >&5
8799 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8800         if test $cf_XOPEN_SOURCE_set = yes
8801         then
8802                 cat >conftest.$ac_ext <<_ACEOF
8803 #line 8803 "configure"
8804 #include "confdefs.h"
8805 #include <stdlib.h>
8806 int
8807 main ()
8808 {
8809
8810 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8811 make an error
8812 #endif
8813   ;
8814   return 0;
8815 }
8816 _ACEOF
8817 rm -f conftest.$ac_objext
8818 if { (eval echo "$as_me:8818: \"$ac_compile\"") >&5
8819   (eval $ac_compile) 2>&5
8820   ac_status=$?
8821   echo "$as_me:8821: \$? = $ac_status" >&5
8822   (exit $ac_status); } &&
8823          { ac_try='test -s conftest.$ac_objext'
8824   { (eval echo "$as_me:8824: \"$ac_try\"") >&5
8825   (eval $ac_try) 2>&5
8826   ac_status=$?
8827   echo "$as_me:8827: \$? = $ac_status" >&5
8828   (exit $ac_status); }; }; then
8829   cf_XOPEN_SOURCE_set_ok=yes
8830 else
8831   echo "$as_me: failed program was:" >&5
8832 cat conftest.$ac_ext >&5
8833 cf_XOPEN_SOURCE_set_ok=no
8834 fi
8835 rm -f conftest.$ac_objext conftest.$ac_ext
8836                 if test $cf_XOPEN_SOURCE_set_ok = no
8837                 then
8838                         { echo "$as_me:8838: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8839 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8840                 fi
8841         else
8842
8843 echo "$as_me:8843: checking if we should define _XOPEN_SOURCE" >&5
8844 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8845 if test "${cf_cv_xopen_source+set}" = set; then
8846   echo $ECHO_N "(cached) $ECHO_C" >&6
8847 else
8848
8849         cat >conftest.$ac_ext <<_ACEOF
8850 #line 8850 "configure"
8851 #include "confdefs.h"
8852
8853 #include <stdlib.h>
8854 #include <string.h>
8855 #include <sys/types.h>
8856
8857 int
8858 main ()
8859 {
8860
8861 #ifndef _XOPEN_SOURCE
8862 make an error
8863 #endif
8864   ;
8865   return 0;
8866 }
8867 _ACEOF
8868 rm -f conftest.$ac_objext
8869 if { (eval echo "$as_me:8869: \"$ac_compile\"") >&5
8870   (eval $ac_compile) 2>&5
8871   ac_status=$?
8872   echo "$as_me:8872: \$? = $ac_status" >&5
8873   (exit $ac_status); } &&
8874          { ac_try='test -s conftest.$ac_objext'
8875   { (eval echo "$as_me:8875: \"$ac_try\"") >&5
8876   (eval $ac_try) 2>&5
8877   ac_status=$?
8878   echo "$as_me:8878: \$? = $ac_status" >&5
8879   (exit $ac_status); }; }; then
8880   cf_cv_xopen_source=no
8881 else
8882   echo "$as_me: failed program was:" >&5
8883 cat conftest.$ac_ext >&5
8884 cf_save="$CPPFLAGS"
8885          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8886          cat >conftest.$ac_ext <<_ACEOF
8887 #line 8887 "configure"
8888 #include "confdefs.h"
8889
8890 #include <stdlib.h>
8891 #include <string.h>
8892 #include <sys/types.h>
8893
8894 int
8895 main ()
8896 {
8897
8898 #ifdef _XOPEN_SOURCE
8899 make an error
8900 #endif
8901   ;
8902   return 0;
8903 }
8904 _ACEOF
8905 rm -f conftest.$ac_objext
8906 if { (eval echo "$as_me:8906: \"$ac_compile\"") >&5
8907   (eval $ac_compile) 2>&5
8908   ac_status=$?
8909   echo "$as_me:8909: \$? = $ac_status" >&5
8910   (exit $ac_status); } &&
8911          { ac_try='test -s conftest.$ac_objext'
8912   { (eval echo "$as_me:8912: \"$ac_try\"") >&5
8913   (eval $ac_try) 2>&5
8914   ac_status=$?
8915   echo "$as_me:8915: \$? = $ac_status" >&5
8916   (exit $ac_status); }; }; then
8917   cf_cv_xopen_source=no
8918 else
8919   echo "$as_me: failed program was:" >&5
8920 cat conftest.$ac_ext >&5
8921 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8922 fi
8923 rm -f conftest.$ac_objext conftest.$ac_ext
8924         CPPFLAGS="$cf_save"
8925
8926 fi
8927 rm -f conftest.$ac_objext conftest.$ac_ext
8928
8929 fi
8930 echo "$as_me:8930: result: $cf_cv_xopen_source" >&5
8931 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8932
8933 if test "$cf_cv_xopen_source" != no ; then
8934
8935 CFLAGS=`echo "$CFLAGS" | \
8936         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8937                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8938
8939 CPPFLAGS=`echo "$CPPFLAGS" | \
8940         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8941                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8942
8943         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8944
8945 cf_fix_cppflags=no
8946 cf_new_cflags=
8947 cf_new_cppflags=
8948 cf_new_extra_cppflags=
8949
8950 for cf_add_cflags in $cf_temp_xopen_source
8951 do
8952 case $cf_fix_cppflags in
8953 (no)
8954         case $cf_add_cflags in
8955         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8956                 case $cf_add_cflags in
8957                 (-D*)
8958                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8959
8960                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8961                                 && test -z "${cf_tst_cflags}" \
8962                                 && cf_fix_cppflags=yes
8963
8964                         if test $cf_fix_cppflags = yes ; then
8965                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8966                                 continue
8967                         elif test "${cf_tst_cflags}" = "\"'" ; then
8968                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8969                                 continue
8970                         fi
8971                         ;;
8972                 esac
8973                 case "$CPPFLAGS" in
8974                 (*$cf_add_cflags)
8975                         ;;
8976                 (*)
8977                         case $cf_add_cflags in
8978                         (-D*)
8979                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8980
8981 CPPFLAGS=`echo "$CPPFLAGS" | \
8982         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8983                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8984
8985                                 ;;
8986                         esac
8987                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8988                         ;;
8989                 esac
8990                 ;;
8991         (*)
8992                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8993                 ;;
8994         esac
8995         ;;
8996 (yes)
8997         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8998
8999         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9000
9001         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9002                 && test -z "${cf_tst_cflags}" \
9003                 && cf_fix_cppflags=no
9004         ;;
9005 esac
9006 done
9007
9008 if test -n "$cf_new_cflags" ; then
9009
9010         CFLAGS="$CFLAGS $cf_new_cflags"
9011 fi
9012
9013 if test -n "$cf_new_cppflags" ; then
9014
9015         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9016 fi
9017
9018 if test -n "$cf_new_extra_cppflags" ; then
9019
9020         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9021 fi
9022
9023 fi
9024
9025         fi
9026 fi
9027
9028 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9029
9030 # Work around breakage on OS X
9031
9032 echo "$as_me:9032: checking if SIGWINCH is defined" >&5
9033 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9034 if test "${cf_cv_define_sigwinch+set}" = set; then
9035   echo $ECHO_N "(cached) $ECHO_C" >&6
9036 else
9037
9038         cat >conftest.$ac_ext <<_ACEOF
9039 #line 9039 "configure"
9040 #include "confdefs.h"
9041
9042 #include <sys/types.h>
9043 #include <sys/signal.h>
9044
9045 int
9046 main ()
9047 {
9048 int x = SIGWINCH
9049   ;
9050   return 0;
9051 }
9052 _ACEOF
9053 rm -f conftest.$ac_objext
9054 if { (eval echo "$as_me:9054: \"$ac_compile\"") >&5
9055   (eval $ac_compile) 2>&5
9056   ac_status=$?
9057   echo "$as_me:9057: \$? = $ac_status" >&5
9058   (exit $ac_status); } &&
9059          { ac_try='test -s conftest.$ac_objext'
9060   { (eval echo "$as_me:9060: \"$ac_try\"") >&5
9061   (eval $ac_try) 2>&5
9062   ac_status=$?
9063   echo "$as_me:9063: \$? = $ac_status" >&5
9064   (exit $ac_status); }; }; then
9065   cf_cv_define_sigwinch=yes
9066 else
9067   echo "$as_me: failed program was:" >&5
9068 cat conftest.$ac_ext >&5
9069 cat >conftest.$ac_ext <<_ACEOF
9070 #line 9070 "configure"
9071 #include "confdefs.h"
9072
9073 #undef _XOPEN_SOURCE
9074 #undef _POSIX_SOURCE
9075 #undef _POSIX_C_SOURCE
9076 #include <sys/types.h>
9077 #include <sys/signal.h>
9078
9079 int
9080 main ()
9081 {
9082 int x = SIGWINCH
9083   ;
9084   return 0;
9085 }
9086 _ACEOF
9087 rm -f conftest.$ac_objext
9088 if { (eval echo "$as_me:9088: \"$ac_compile\"") >&5
9089   (eval $ac_compile) 2>&5
9090   ac_status=$?
9091   echo "$as_me:9091: \$? = $ac_status" >&5
9092   (exit $ac_status); } &&
9093          { ac_try='test -s conftest.$ac_objext'
9094   { (eval echo "$as_me:9094: \"$ac_try\"") >&5
9095   (eval $ac_try) 2>&5
9096   ac_status=$?
9097   echo "$as_me:9097: \$? = $ac_status" >&5
9098   (exit $ac_status); }; }; then
9099   cf_cv_define_sigwinch=maybe
9100 else
9101   echo "$as_me: failed program was:" >&5
9102 cat conftest.$ac_ext >&5
9103 cf_cv_define_sigwinch=no
9104 fi
9105 rm -f conftest.$ac_objext conftest.$ac_ext
9106
9107 fi
9108 rm -f conftest.$ac_objext conftest.$ac_ext
9109
9110 fi
9111 echo "$as_me:9111: result: $cf_cv_define_sigwinch" >&5
9112 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9113
9114 if test "$cf_cv_define_sigwinch" = maybe ; then
9115 echo "$as_me:9115: checking for actual SIGWINCH definition" >&5
9116 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9117 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9118   echo $ECHO_N "(cached) $ECHO_C" >&6
9119 else
9120
9121 cf_cv_fixup_sigwinch=unknown
9122 cf_sigwinch=32
9123 while test $cf_sigwinch != 1
9124 do
9125         cat >conftest.$ac_ext <<_ACEOF
9126 #line 9126 "configure"
9127 #include "confdefs.h"
9128
9129 #undef _XOPEN_SOURCE
9130 #undef _POSIX_SOURCE
9131 #undef _POSIX_C_SOURCE
9132 #include <sys/types.h>
9133 #include <sys/signal.h>
9134
9135 int
9136 main ()
9137 {
9138
9139 #if SIGWINCH != $cf_sigwinch
9140 make an error
9141 #endif
9142 int x = SIGWINCH
9143   ;
9144   return 0;
9145 }
9146 _ACEOF
9147 rm -f conftest.$ac_objext
9148 if { (eval echo "$as_me:9148: \"$ac_compile\"") >&5
9149   (eval $ac_compile) 2>&5
9150   ac_status=$?
9151   echo "$as_me:9151: \$? = $ac_status" >&5
9152   (exit $ac_status); } &&
9153          { ac_try='test -s conftest.$ac_objext'
9154   { (eval echo "$as_me:9154: \"$ac_try\"") >&5
9155   (eval $ac_try) 2>&5
9156   ac_status=$?
9157   echo "$as_me:9157: \$? = $ac_status" >&5
9158   (exit $ac_status); }; }; then
9159   cf_cv_fixup_sigwinch=$cf_sigwinch
9160          break
9161 else
9162   echo "$as_me: failed program was:" >&5
9163 cat conftest.$ac_ext >&5
9164 fi
9165 rm -f conftest.$ac_objext conftest.$ac_ext
9166
9167 cf_sigwinch=`expr $cf_sigwinch - 1`
9168 done
9169
9170 fi
9171 echo "$as_me:9171: result: $cf_cv_fixup_sigwinch" >&5
9172 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9173
9174         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9175                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9176         fi
9177 fi
9178
9179 # Checks for CODESET support.
9180
9181 echo "$as_me:9181: checking for nl_langinfo and CODESET" >&5
9182 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9183 if test "${am_cv_langinfo_codeset+set}" = set; then
9184   echo $ECHO_N "(cached) $ECHO_C" >&6
9185 else
9186   cat >conftest.$ac_ext <<_ACEOF
9187 #line 9187 "configure"
9188 #include "confdefs.h"
9189 #include <langinfo.h>
9190 int
9191 main ()
9192 {
9193 char* cs = nl_langinfo(CODESET);
9194   ;
9195   return 0;
9196 }
9197 _ACEOF
9198 rm -f conftest.$ac_objext conftest$ac_exeext
9199 if { (eval echo "$as_me:9199: \"$ac_link\"") >&5
9200   (eval $ac_link) 2>&5
9201   ac_status=$?
9202   echo "$as_me:9202: \$? = $ac_status" >&5
9203   (exit $ac_status); } &&
9204          { ac_try='test -s conftest$ac_exeext'
9205   { (eval echo "$as_me:9205: \"$ac_try\"") >&5
9206   (eval $ac_try) 2>&5
9207   ac_status=$?
9208   echo "$as_me:9208: \$? = $ac_status" >&5
9209   (exit $ac_status); }; }; then
9210   am_cv_langinfo_codeset=yes
9211 else
9212   echo "$as_me: failed program was:" >&5
9213 cat conftest.$ac_ext >&5
9214 am_cv_langinfo_codeset=no
9215 fi
9216 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9217
9218 fi
9219 echo "$as_me:9219: result: $am_cv_langinfo_codeset" >&5
9220 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9221         if test $am_cv_langinfo_codeset = yes; then
9222
9223 cat >>confdefs.h <<\EOF
9224 #define HAVE_LANGINFO_CODESET 1
9225 EOF
9226
9227         fi
9228
9229 # use these variables to work around a defect in gcc's fixincludes.
9230 NCURSES_OK_WCHAR_T=
9231 NCURSES_OK_WINT_T=
9232
9233 echo "$as_me:9233: checking if you want wide-character code" >&5
9234 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9235
9236 # Check whether --enable-widec or --disable-widec was given.
9237 if test "${enable_widec+set}" = set; then
9238   enableval="$enable_widec"
9239   with_widec=$enableval
9240 else
9241   with_widec=no
9242 fi;
9243 echo "$as_me:9243: result: $with_widec" >&5
9244 echo "${ECHO_T}$with_widec" >&6
9245
9246 NCURSES_WCWIDTH_GRAPHICS=1
9247
9248 if test "x$with_widec" = xyes ; then
9249         if test "x$disable_lib_suffixes" = xno ; then
9250                 LIB_SUFFIX="w${LIB_SUFFIX}"
9251         fi
9252
9253 cat >>confdefs.h <<\EOF
9254 #define USE_WIDEC_SUPPORT 1
9255 EOF
9256
9257 cat >>confdefs.h <<\EOF
9258 #define NCURSES_WIDECHAR 1
9259 EOF
9260
9261 echo "$as_me:9261: checking if wchar.h can be used as is" >&5
9262 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9263 if test "${cf_cv_wchar_h_okay+set}" = set; then
9264   echo $ECHO_N "(cached) $ECHO_C" >&6
9265 else
9266
9267 cat >conftest.$ac_ext <<_ACEOF
9268 #line 9268 "configure"
9269 #include "confdefs.h"
9270
9271 #include <stdlib.h>
9272 #include <wchar.h>
9273
9274 int
9275 main ()
9276 {
9277
9278         wint_t foo = 0;
9279         int bar = iswpunct(foo)
9280   ;
9281   return 0;
9282 }
9283 _ACEOF
9284 rm -f conftest.$ac_objext
9285 if { (eval echo "$as_me:9285: \"$ac_compile\"") >&5
9286   (eval $ac_compile) 2>&5
9287   ac_status=$?
9288   echo "$as_me:9288: \$? = $ac_status" >&5
9289   (exit $ac_status); } &&
9290          { ac_try='test -s conftest.$ac_objext'
9291   { (eval echo "$as_me:9291: \"$ac_try\"") >&5
9292   (eval $ac_try) 2>&5
9293   ac_status=$?
9294   echo "$as_me:9294: \$? = $ac_status" >&5
9295   (exit $ac_status); }; }; then
9296   cf_cv_wchar_h_okay=yes
9297 else
9298   echo "$as_me: failed program was:" >&5
9299 cat conftest.$ac_ext >&5
9300 cf_cv_wchar_h_okay=no
9301 fi
9302 rm -f conftest.$ac_objext conftest.$ac_ext
9303 fi
9304 echo "$as_me:9304: result: $cf_cv_wchar_h_okay" >&5
9305 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9306
9307 if test $cf_cv_wchar_h_okay = no
9308 then
9309
9310 echo "$as_me:9310: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9311 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9312 cat >conftest.$ac_ext <<_ACEOF
9313 #line 9313 "configure"
9314 #include "confdefs.h"
9315 #include <sys/types.h>
9316
9317 int
9318 main ()
9319 {
9320
9321 #ifndef _XOPEN_SOURCE_EXTENDED
9322 make an error
9323 #endif
9324   ;
9325   return 0;
9326 }
9327 _ACEOF
9328 rm -f conftest.$ac_objext
9329 if { (eval echo "$as_me:9329: \"$ac_compile\"") >&5
9330   (eval $ac_compile) 2>&5
9331   ac_status=$?
9332   echo "$as_me:9332: \$? = $ac_status" >&5
9333   (exit $ac_status); } &&
9334          { ac_try='test -s conftest.$ac_objext'
9335   { (eval echo "$as_me:9335: \"$ac_try\"") >&5
9336   (eval $ac_try) 2>&5
9337   ac_status=$?
9338   echo "$as_me:9338: \$? = $ac_status" >&5
9339   (exit $ac_status); }; }; then
9340   cf_result=no
9341 else
9342   echo "$as_me: failed program was:" >&5
9343 cat conftest.$ac_ext >&5
9344 cf_result=yes
9345 fi
9346 rm -f conftest.$ac_objext conftest.$ac_ext
9347 echo "$as_me:9347: result: $cf_result" >&5
9348 echo "${ECHO_T}$cf_result" >&6
9349
9350 if test "$cf_result" = yes ; then
9351         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9352 elif test "x" != "x" ; then
9353         echo "$as_me:9353: checking checking for compatible value versus " >&5
9354 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9355         cat >conftest.$ac_ext <<_ACEOF
9356 #line 9356 "configure"
9357 #include "confdefs.h"
9358 #include <sys/types.h>
9359
9360 int
9361 main ()
9362 {
9363
9364 #if _XOPEN_SOURCE_EXTENDED- < 0
9365 make an error
9366 #endif
9367   ;
9368   return 0;
9369 }
9370 _ACEOF
9371 rm -f conftest.$ac_objext
9372 if { (eval echo "$as_me:9372: \"$ac_compile\"") >&5
9373   (eval $ac_compile) 2>&5
9374   ac_status=$?
9375   echo "$as_me:9375: \$? = $ac_status" >&5
9376   (exit $ac_status); } &&
9377          { ac_try='test -s conftest.$ac_objext'
9378   { (eval echo "$as_me:9378: \"$ac_try\"") >&5
9379   (eval $ac_try) 2>&5
9380   ac_status=$?
9381   echo "$as_me:9381: \$? = $ac_status" >&5
9382   (exit $ac_status); }; }; then
9383   cf_result=yes
9384 else
9385   echo "$as_me: failed program was:" >&5
9386 cat conftest.$ac_ext >&5
9387 cf_result=no
9388 fi
9389 rm -f conftest.$ac_objext conftest.$ac_ext
9390         echo "$as_me:9390: result: $cf_result" >&5
9391 echo "${ECHO_T}$cf_result" >&6
9392         if test "$cf_result" = no ; then
9393                 # perhaps we can override it - try...
9394                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9395         fi
9396 fi
9397
9398 fi
9399
9400 echo "$as_me:9400: checking if wcwidth agrees graphics are single-width" >&5
9401 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9402 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9403   echo $ECHO_N "(cached) $ECHO_C" >&6
9404 else
9405
9406 cat >conftest.in <<CF_EOF
9407 -       VT100 symbols
9408 0x250c  upper left corner
9409 0x2514  lower left corner
9410 0x2510  upper right corner
9411 0x2518  lower right corner
9412 0x251c  tee pointing left
9413 0x2524  tee pointing right
9414 0x2534  tee pointing up
9415 0x252c  tee pointing down
9416 0x2500  horizontal line
9417 0x2502  vertical line
9418 0x253c  large plus or crossover
9419 0x23ba  scan line 1
9420 0x23bd  scan line 9
9421 0x25c6  diamond
9422 0x2592  checker board (stipple)
9423 0x00b0  degree symbol
9424 0x00b1  plus/minus
9425 0x00b7  bullet
9426 -       Teletype 5410v1 symbols
9427 0x2190  arrow pointing left
9428 0x2192  arrow pointing right
9429 0x2193  arrow pointing down
9430 0x2191  arrow pointing up
9431 0x2592  board of squares
9432 0x2603  lantern symbol
9433 0x25ae  solid square block
9434 -       these defaults were invented for ncurses
9435 0x23bb  scan line 3
9436 0x23bc  scan line 7
9437 0x2264  less-than-or-equal-to
9438 0x2265  greater-than-or-equal-to
9439 0x03c0  greek pi
9440 0x2260  not-equal
9441 0x00a3  pound-sterling symbol
9442 -       thick-line-drawing
9443 0x250f  upper left corner
9444 0x2517  lower left corner
9445 0x2513  upper right corner
9446 0x251b  lower right corner
9447 0x2523  tee pointing left
9448 0x252b  tee pointing right
9449 0x253b  tee pointing up
9450 0x2533  tee pointing down
9451 0x2501  horizontal line
9452 0x2503  vertical line
9453 0x254b  large plus or crossover
9454 -       double-line-drawing
9455 0x2554  upper left corner
9456 0x255a  lower left corner
9457 0x2557  upper right corner
9458 0x255d  lower right corner
9459 0x2563  tee pointing left
9460 0x2560  tee pointing right
9461 0x2569  tee pointing up
9462 0x2566  tee pointing down
9463 0x2550  horizontal line
9464 0x2551  vertical line
9465 0x256c  large plus or crossover
9466 CF_EOF
9467 if test "$cross_compiling" = yes; then
9468   cf_cv_wcwidth_graphics=unknown
9469 else
9470   cat >conftest.$ac_ext <<_ACEOF
9471 #line 9471 "configure"
9472 #include "confdefs.h"
9473
9474 #include <locale.h>
9475 #include <stdio.h>
9476 #include <wchar.h>
9477
9478 #define MY_LEN 80
9479
9480 int
9481 main(void)
9482 {
9483         FILE *fp;
9484         int value;
9485         char buffer[MY_LEN + 1];
9486         char notes[MY_LEN + 1];
9487         int totals = 0;
9488         int passed = 0;
9489
9490         if (setlocale(LC_ALL, "en_US.UTF8") ||
9491                 setlocale(LC_ALL, "en_US.UTF-8") ||
9492                 setlocale(LC_ALL, "en_US.utf8") ||
9493                 setlocale(LC_ALL, "en_US.utf-8")) {
9494                 if ((fp = fopen("conftest.in", "r")) != 0) {
9495                         while (fgets(buffer, MY_LEN, fp) != 0) {
9496                                 if (*buffer == '-') {
9497                                         fprintf(stderr, "\t%s", buffer);
9498                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9499                                         ++totals;
9500                                         if (wcwidth(value) == 1)
9501                                                 ++passed;
9502                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9503                                 } else {
9504                                         fprintf(stderr, "?\t%s", buffer);
9505                                 }
9506                         }
9507                 }
9508         }
9509         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9510         return (totals == passed) ? 0 : 1;
9511 }
9512
9513 _ACEOF
9514 rm -f conftest$ac_exeext
9515 if { (eval echo "$as_me:9515: \"$ac_link\"") >&5
9516   (eval $ac_link) 2>&5
9517   ac_status=$?
9518   echo "$as_me:9518: \$? = $ac_status" >&5
9519   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9520   { (eval echo "$as_me:9520: \"$ac_try\"") >&5
9521   (eval $ac_try) 2>&5
9522   ac_status=$?
9523   echo "$as_me:9523: \$? = $ac_status" >&5
9524   (exit $ac_status); }; }; then
9525   cf_cv_wcwidth_graphics=yes
9526 else
9527   echo "$as_me: program exited with status $ac_status" >&5
9528 echo "$as_me: failed program was:" >&5
9529 cat conftest.$ac_ext >&5
9530 cf_cv_wcwidth_graphics=no
9531 fi
9532 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9533 fi
9534
9535 fi
9536 echo "$as_me:9536: result: $cf_cv_wcwidth_graphics" >&5
9537 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9538
9539         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9540
9541         # with_overwrite=no
9542         NCURSES_CH_T=cchar_t
9543
9544 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9545 do
9546 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9547 echo "$as_me:9547: checking for $ac_func" >&5
9548 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9549 if eval "test \"\${$as_ac_var+set}\" = set"; then
9550   echo $ECHO_N "(cached) $ECHO_C" >&6
9551 else
9552   cat >conftest.$ac_ext <<_ACEOF
9553 #line 9553 "configure"
9554 #include "confdefs.h"
9555 /* System header to define __stub macros and hopefully few prototypes,
9556     which can conflict with char $ac_func (); below.  */
9557 #include <assert.h>
9558 /* Override any gcc2 internal prototype to avoid an error.  */
9559 #ifdef __cplusplus
9560 extern "C"
9561 #endif
9562 /* We use char because int might match the return type of a gcc2
9563    builtin and then its argument prototype would still apply.  */
9564 char $ac_func ();
9565 char (*f) ();
9566
9567 int
9568 main ()
9569 {
9570 /* The GNU C library defines this for functions which it implements
9571     to always fail with ENOSYS.  Some functions are actually named
9572     something starting with __ and the normal name is an alias.  */
9573 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9574 choke me
9575 #else
9576 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9577 #endif
9578
9579   ;
9580   return 0;
9581 }
9582 _ACEOF
9583 rm -f conftest.$ac_objext conftest$ac_exeext
9584 if { (eval echo "$as_me:9584: \"$ac_link\"") >&5
9585   (eval $ac_link) 2>&5
9586   ac_status=$?
9587   echo "$as_me:9587: \$? = $ac_status" >&5
9588   (exit $ac_status); } &&
9589          { ac_try='test -s conftest$ac_exeext'
9590   { (eval echo "$as_me:9590: \"$ac_try\"") >&5
9591   (eval $ac_try) 2>&5
9592   ac_status=$?
9593   echo "$as_me:9593: \$? = $ac_status" >&5
9594   (exit $ac_status); }; }; then
9595   eval "$as_ac_var=yes"
9596 else
9597   echo "$as_me: failed program was:" >&5
9598 cat conftest.$ac_ext >&5
9599 eval "$as_ac_var=no"
9600 fi
9601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9602 fi
9603 echo "$as_me:9603: result: `eval echo '${'$as_ac_var'}'`" >&5
9604 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9605 if test `eval echo '${'$as_ac_var'}'` = yes; then
9606   cat >>confdefs.h <<EOF
9607 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9608 EOF
9609
9610 fi
9611 done
9612
9613         if test "x$ac_cv_func_putwc" != xyes ; then
9614
9615 echo "$as_me:9615: checking for multibyte character support" >&5
9616 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9617 if test "${cf_cv_utf8_lib+set}" = set; then
9618   echo $ECHO_N "(cached) $ECHO_C" >&6
9619 else
9620
9621         cf_save_LIBS="$LIBS"
9622         cat >conftest.$ac_ext <<_ACEOF
9623 #line 9623 "configure"
9624 #include "confdefs.h"
9625
9626 #include <stdlib.h>
9627 int
9628 main ()
9629 {
9630 putwc(0,0);
9631   ;
9632   return 0;
9633 }
9634 _ACEOF
9635 rm -f conftest.$ac_objext conftest$ac_exeext
9636 if { (eval echo "$as_me:9636: \"$ac_link\"") >&5
9637   (eval $ac_link) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit $ac_status); } &&
9641          { ac_try='test -s conftest$ac_exeext'
9642   { (eval echo "$as_me:9642: \"$ac_try\"") >&5
9643   (eval $ac_try) 2>&5
9644   ac_status=$?
9645   echo "$as_me:9645: \$? = $ac_status" >&5
9646   (exit $ac_status); }; }; then
9647   cf_cv_utf8_lib=yes
9648 else
9649   echo "$as_me: failed program was:" >&5
9650 cat conftest.$ac_ext >&5
9651
9652 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9653 # will be set on completion of the AC_TRY_LINK below.
9654 cf_cv_header_path_utf8=
9655 cf_cv_library_path_utf8=
9656
9657 echo "${as_me:-configure}:9657: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9658
9659 cf_save_LIBS="$LIBS"
9660
9661 cat >conftest.$ac_ext <<_ACEOF
9662 #line 9662 "configure"
9663 #include "confdefs.h"
9664
9665 #include <libutf8.h>
9666 int
9667 main ()
9668 {
9669 putwc(0,0);
9670   ;
9671   return 0;
9672 }
9673 _ACEOF
9674 rm -f conftest.$ac_objext conftest$ac_exeext
9675 if { (eval echo "$as_me:9675: \"$ac_link\"") >&5
9676   (eval $ac_link) 2>&5
9677   ac_status=$?
9678   echo "$as_me:9678: \$? = $ac_status" >&5
9679   (exit $ac_status); } &&
9680          { ac_try='test -s conftest$ac_exeext'
9681   { (eval echo "$as_me:9681: \"$ac_try\"") >&5
9682   (eval $ac_try) 2>&5
9683   ac_status=$?
9684   echo "$as_me:9684: \$? = $ac_status" >&5
9685   (exit $ac_status); }; }; then
9686
9687         cf_cv_find_linkage_utf8=yes
9688         cf_cv_header_path_utf8=/usr/include
9689         cf_cv_library_path_utf8=/usr/lib
9690
9691 else
9692   echo "$as_me: failed program was:" >&5
9693 cat conftest.$ac_ext >&5
9694
9695 LIBS="-lutf8  $cf_save_LIBS"
9696
9697 cat >conftest.$ac_ext <<_ACEOF
9698 #line 9698 "configure"
9699 #include "confdefs.h"
9700
9701 #include <libutf8.h>
9702 int
9703 main ()
9704 {
9705 putwc(0,0);
9706   ;
9707   return 0;
9708 }
9709 _ACEOF
9710 rm -f conftest.$ac_objext conftest$ac_exeext
9711 if { (eval echo "$as_me:9711: \"$ac_link\"") >&5
9712   (eval $ac_link) 2>&5
9713   ac_status=$?
9714   echo "$as_me:9714: \$? = $ac_status" >&5
9715   (exit $ac_status); } &&
9716          { ac_try='test -s conftest$ac_exeext'
9717   { (eval echo "$as_me:9717: \"$ac_try\"") >&5
9718   (eval $ac_try) 2>&5
9719   ac_status=$?
9720   echo "$as_me:9720: \$? = $ac_status" >&5
9721   (exit $ac_status); }; }; then
9722
9723         cf_cv_find_linkage_utf8=yes
9724         cf_cv_header_path_utf8=/usr/include
9725         cf_cv_library_path_utf8=/usr/lib
9726         cf_cv_library_file_utf8="-lutf8"
9727
9728 else
9729   echo "$as_me: failed program was:" >&5
9730 cat conftest.$ac_ext >&5
9731
9732         cf_cv_find_linkage_utf8=no
9733         LIBS="$cf_save_LIBS"
9734
9735         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9736
9737 echo "${as_me:-configure}:9737: testing find linkage for utf8 library ..." 1>&5
9738
9739 echo "${as_me:-configure}:9739: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9740
9741         cf_save_CPPFLAGS="$CPPFLAGS"
9742         cf_test_CPPFLAGS="$CPPFLAGS"
9743
9744 cf_search=
9745
9746 # collect the current set of include-directories from compiler flags
9747 cf_header_path_list=""
9748 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9749         for cf_header_path in $CPPFLAGS $CFLAGS
9750         do
9751                 case $cf_header_path in
9752                 (-I*)
9753                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9754
9755 test "x$cf_header_path" != "xNONE" && \
9756 test -d "$cf_header_path" && \
9757  {
9758         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9759         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9760         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9761         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9762         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9763         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9764 }
9765
9766                         cf_header_path_list="$cf_header_path_list $cf_search"
9767                         ;;
9768                 esac
9769         done
9770 fi
9771
9772 # add the variations for the package we are looking for
9773
9774 cf_search=
9775
9776 test "x$prefix" != "xNONE" && \
9777 test -d "$prefix" && \
9778  {
9779         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9780         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9781         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9782         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9783         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9784         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9785 }
9786
9787 for cf_subdir_prefix in \
9788         /usr \
9789         /usr/local \
9790         /usr/pkg \
9791         /opt \
9792         /opt/local \
9793         $HOME
9794 do
9795
9796 test "x$cf_subdir_prefix" != "x$prefix" && \
9797 test -d "$cf_subdir_prefix" && \
9798 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9799         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9800         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9801         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9802         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9803         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9804         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9805 }
9806
9807 done
9808
9809 test "$includedir" != NONE && \
9810 test "$includedir" != "/usr/include" && \
9811 test -d "$includedir" && {
9812         test -d $includedir &&    cf_search="$cf_search $includedir"
9813         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9814 }
9815
9816 test "$oldincludedir" != NONE && \
9817 test "$oldincludedir" != "/usr/include" && \
9818 test -d "$oldincludedir" && {
9819         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9820         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9821 }
9822
9823 cf_search="$cf_search $cf_header_path_list"
9824
9825         for cf_cv_header_path_utf8 in $cf_search
9826         do
9827                 if test -d $cf_cv_header_path_utf8 ; then
9828                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9829
9830 echo "${as_me:-configure}:9830: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9831
9832                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9833                         cat >conftest.$ac_ext <<_ACEOF
9834 #line 9834 "configure"
9835 #include "confdefs.h"
9836
9837 #include <libutf8.h>
9838 int
9839 main ()
9840 {
9841 putwc(0,0);
9842   ;
9843   return 0;
9844 }
9845 _ACEOF
9846 rm -f conftest.$ac_objext
9847 if { (eval echo "$as_me:9847: \"$ac_compile\"") >&5
9848   (eval $ac_compile) 2>&5
9849   ac_status=$?
9850   echo "$as_me:9850: \$? = $ac_status" >&5
9851   (exit $ac_status); } &&
9852          { ac_try='test -s conftest.$ac_objext'
9853   { (eval echo "$as_me:9853: \"$ac_try\"") >&5
9854   (eval $ac_try) 2>&5
9855   ac_status=$?
9856   echo "$as_me:9856: \$? = $ac_status" >&5
9857   (exit $ac_status); }; }; then
9858
9859                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9860
9861 echo "${as_me:-configure}:9861: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9862
9863                                 cf_cv_find_linkage_utf8=maybe
9864                                 cf_test_CPPFLAGS="$CPPFLAGS"
9865                                 break
9866 else
9867   echo "$as_me: failed program was:" >&5
9868 cat conftest.$ac_ext >&5
9869
9870                                 CPPFLAGS="$cf_save_CPPFLAGS"
9871
9872 fi
9873 rm -f conftest.$ac_objext conftest.$ac_ext
9874                 fi
9875         done
9876
9877         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9878
9879 echo "${as_me:-configure}:9879: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9880
9881                 cf_save_LIBS="$LIBS"
9882                 cf_save_LDFLAGS="$LDFLAGS"
9883
9884                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9885
9886 cf_search=
9887 cf_library_path_list=""
9888 if test -n "${LDFLAGS}${LIBS}" ; then
9889         for cf_library_path in $LDFLAGS $LIBS
9890         do
9891                 case $cf_library_path in
9892                 (-L*)
9893                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9894
9895 test "x$cf_library_path" != "xNONE" && \
9896 test -d "$cf_library_path" && \
9897  {
9898         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9899         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9900         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9901         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9902         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9903         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9904 }
9905
9906                         cf_library_path_list="$cf_library_path_list $cf_search"
9907                         ;;
9908                 esac
9909         done
9910 fi
9911
9912 cf_search=
9913
9914 test "x$prefix" != "xNONE" && \
9915 test -d "$prefix" && \
9916  {
9917         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9918         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9919         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9920         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9921         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9922         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9923 }
9924
9925 for cf_subdir_prefix in \
9926         /usr \
9927         /usr/local \
9928         /usr/pkg \
9929         /opt \
9930         /opt/local \
9931         $HOME
9932 do
9933
9934 test "x$cf_subdir_prefix" != "x$prefix" && \
9935 test -d "$cf_subdir_prefix" && \
9936 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9937         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9938         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9939         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9940         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9941         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9942         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9943 }
9944
9945 done
9946
9947 cf_search="$cf_library_path_list $cf_search"
9948
9949                         for cf_cv_library_path_utf8 in $cf_search
9950                         do
9951                                 if test -d $cf_cv_library_path_utf8 ; then
9952                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9953
9954 echo "${as_me:-configure}:9954: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9955
9956                                         CPPFLAGS="$cf_test_CPPFLAGS"
9957                                         LIBS="-lutf8  $cf_save_LIBS"
9958                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9959                                         cat >conftest.$ac_ext <<_ACEOF
9960 #line 9960 "configure"
9961 #include "confdefs.h"
9962
9963 #include <libutf8.h>
9964 int
9965 main ()
9966 {
9967 putwc(0,0);
9968   ;
9969   return 0;
9970 }
9971 _ACEOF
9972 rm -f conftest.$ac_objext conftest$ac_exeext
9973 if { (eval echo "$as_me:9973: \"$ac_link\"") >&5
9974   (eval $ac_link) 2>&5
9975   ac_status=$?
9976   echo "$as_me:9976: \$? = $ac_status" >&5
9977   (exit $ac_status); } &&
9978          { ac_try='test -s conftest$ac_exeext'
9979   { (eval echo "$as_me:9979: \"$ac_try\"") >&5
9980   (eval $ac_try) 2>&5
9981   ac_status=$?
9982   echo "$as_me:9982: \$? = $ac_status" >&5
9983   (exit $ac_status); }; }; then
9984
9985                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9986
9987 echo "${as_me:-configure}:9987: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9988
9989                                         cf_cv_find_linkage_utf8=yes
9990                                         cf_cv_library_file_utf8="-lutf8"
9991                                         break
9992 else
9993   echo "$as_me: failed program was:" >&5
9994 cat conftest.$ac_ext >&5
9995
9996                                         CPPFLAGS="$cf_save_CPPFLAGS"
9997                                         LIBS="$cf_save_LIBS"
9998                                         LDFLAGS="$cf_save_LDFLAGS"
9999
10000 fi
10001 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10002                                 fi
10003                         done
10004                         CPPFLAGS="$cf_save_CPPFLAGS"
10005                         LDFLAGS="$cf_save_LDFLAGS"
10006                 fi
10007
10008         else
10009                 cf_cv_find_linkage_utf8=no
10010         fi
10011
10012 fi
10013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10014
10015 fi
10016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10017
10018 LIBS="$cf_save_LIBS"
10019
10020 if test "$cf_cv_find_linkage_utf8" = yes ; then
10021 cf_cv_utf8_lib=add-on
10022 else
10023 cf_cv_utf8_lib=no
10024 fi
10025
10026 fi
10027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10028 fi
10029 echo "$as_me:10029: result: $cf_cv_utf8_lib" >&5
10030 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10031
10032 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10033 # ncurses/ncursesw:
10034 if test "$cf_cv_utf8_lib" = "add-on" ; then
10035
10036 cat >>confdefs.h <<\EOF
10037 #define HAVE_LIBUTF8_H 1
10038 EOF
10039
10040 if test -n "$cf_cv_header_path_utf8" ; then
10041   for cf_add_incdir in $cf_cv_header_path_utf8
10042   do
10043         while test $cf_add_incdir != /usr/include
10044         do
10045           if test -d $cf_add_incdir
10046           then
10047                 cf_have_incdir=no
10048                 if test -n "$CFLAGS$CPPFLAGS" ; then
10049                   # a loop is needed to ensure we can add subdirs of existing dirs
10050                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10051                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10052                           cf_have_incdir=yes; break
10053                         fi
10054                   done
10055                 fi
10056
10057                 if test "$cf_have_incdir" = no ; then
10058                   if test "$cf_add_incdir" = /usr/local/include ; then
10059                         if test "$GCC" = yes
10060                         then
10061                           cf_save_CPPFLAGS=$CPPFLAGS
10062                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10063                           cat >conftest.$ac_ext <<_ACEOF
10064 #line 10064 "configure"
10065 #include "confdefs.h"
10066 #include <stdio.h>
10067 int
10068 main ()
10069 {
10070 printf("Hello")
10071   ;
10072   return 0;
10073 }
10074 _ACEOF
10075 rm -f conftest.$ac_objext
10076 if { (eval echo "$as_me:10076: \"$ac_compile\"") >&5
10077   (eval $ac_compile) 2>&5
10078   ac_status=$?
10079   echo "$as_me:10079: \$? = $ac_status" >&5
10080   (exit $ac_status); } &&
10081          { ac_try='test -s conftest.$ac_objext'
10082   { (eval echo "$as_me:10082: \"$ac_try\"") >&5
10083   (eval $ac_try) 2>&5
10084   ac_status=$?
10085   echo "$as_me:10085: \$? = $ac_status" >&5
10086   (exit $ac_status); }; }; then
10087   :
10088 else
10089   echo "$as_me: failed program was:" >&5
10090 cat conftest.$ac_ext >&5
10091 cf_have_incdir=yes
10092 fi
10093 rm -f conftest.$ac_objext conftest.$ac_ext
10094                           CPPFLAGS=$cf_save_CPPFLAGS
10095                         fi
10096                   fi
10097                 fi
10098
10099                 if test "$cf_have_incdir" = no ; then
10100                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10101
10102 echo "${as_me:-configure}:10102: testing adding $cf_add_incdir to include-path ..." 1>&5
10103
10104                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10105
10106                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10107                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10108                   cf_add_incdir="$cf_top_incdir"
10109                 else
10110                   break
10111                 fi
10112           else
10113                 break
10114           fi
10115         done
10116   done
10117 fi
10118
10119 if test -n "$cf_cv_library_path_utf8" ; then
10120         for cf_add_libdir in $cf_cv_library_path_utf8
10121         do
10122                 if test $cf_add_libdir = /usr/lib ; then
10123                         :
10124                 elif test -d $cf_add_libdir
10125                 then
10126                         cf_have_libdir=no
10127                         if test -n "$LDFLAGS$LIBS" ; then
10128                                 # a loop is needed to ensure we can add subdirs of existing dirs
10129                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10130                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10131                                                 cf_have_libdir=yes; break
10132                                         fi
10133                                 done
10134                         fi
10135                         if test "$cf_have_libdir" = no ; then
10136                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10137
10138 echo "${as_me:-configure}:10138: testing adding $cf_add_libdir to library-path ..." 1>&5
10139
10140                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10141                         fi
10142                 fi
10143         done
10144 fi
10145
10146 cf_add_libs="$cf_cv_library_file_utf8"
10147 # Filter out duplicates - this happens with badly-designed ".pc" files...
10148 for cf_add_1lib in $LIBS
10149 do
10150         for cf_add_2lib in $cf_add_libs
10151         do
10152                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10153                 then
10154                         cf_add_1lib=
10155                         break
10156                 fi
10157         done
10158         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10159 done
10160 LIBS="$cf_add_libs"
10161
10162 fi
10163
10164                 if test "$cf_cv_utf8_lib" != no ; then
10165                         NCURSES_LIBUTF8=1
10166                 fi
10167         fi
10168
10169 # This is needed on Tru64 5.0 to declare mbstate_t
10170 echo "$as_me:10170: checking if we must include wchar.h to declare mbstate_t" >&5
10171 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10172 if test "${cf_cv_mbstate_t+set}" = set; then
10173   echo $ECHO_N "(cached) $ECHO_C" >&6
10174 else
10175
10176 cat >conftest.$ac_ext <<_ACEOF
10177 #line 10177 "configure"
10178 #include "confdefs.h"
10179
10180 #include <stdlib.h>
10181 #include <stdarg.h>
10182 #include <stdio.h>
10183 #ifdef HAVE_LIBUTF8_H
10184 #include <libutf8.h>
10185 #endif
10186 int
10187 main ()
10188 {
10189 mbstate_t state
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   cf_cv_mbstate_t=no
10207 else
10208   echo "$as_me: failed program was:" >&5
10209 cat conftest.$ac_ext >&5
10210 cat >conftest.$ac_ext <<_ACEOF
10211 #line 10211 "configure"
10212 #include "confdefs.h"
10213
10214 #include <stdlib.h>
10215 #include <stdarg.h>
10216 #include <stdio.h>
10217 #include <wchar.h>
10218 #ifdef HAVE_LIBUTF8_H
10219 #include <libutf8.h>
10220 #endif
10221 int
10222 main ()
10223 {
10224 mbstate_t value
10225   ;
10226   return 0;
10227 }
10228 _ACEOF
10229 rm -f conftest.$ac_objext
10230 if { (eval echo "$as_me:10230: \"$ac_compile\"") >&5
10231   (eval $ac_compile) 2>&5
10232   ac_status=$?
10233   echo "$as_me:10233: \$? = $ac_status" >&5
10234   (exit $ac_status); } &&
10235          { ac_try='test -s conftest.$ac_objext'
10236   { (eval echo "$as_me:10236: \"$ac_try\"") >&5
10237   (eval $ac_try) 2>&5
10238   ac_status=$?
10239   echo "$as_me:10239: \$? = $ac_status" >&5
10240   (exit $ac_status); }; }; then
10241   cf_cv_mbstate_t=yes
10242 else
10243   echo "$as_me: failed program was:" >&5
10244 cat conftest.$ac_ext >&5
10245 cf_cv_mbstate_t=unknown
10246 fi
10247 rm -f conftest.$ac_objext conftest.$ac_ext
10248 fi
10249 rm -f conftest.$ac_objext conftest.$ac_ext
10250 fi
10251 echo "$as_me:10251: result: $cf_cv_mbstate_t" >&5
10252 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10253
10254 if test "$cf_cv_mbstate_t" = yes ; then
10255
10256 cat >>confdefs.h <<\EOF
10257 #define NEED_WCHAR_H 1
10258 EOF
10259
10260         NEED_WCHAR_H=1
10261 fi
10262
10263 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10264 if test "$cf_cv_mbstate_t" = unknown ; then
10265         NCURSES_MBSTATE_T=1
10266 fi
10267
10268 # This is needed on Tru64 5.0 to declare wchar_t
10269 echo "$as_me:10269: checking if we must include wchar.h to declare wchar_t" >&5
10270 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10271 if test "${cf_cv_wchar_t+set}" = set; then
10272   echo $ECHO_N "(cached) $ECHO_C" >&6
10273 else
10274
10275 cat >conftest.$ac_ext <<_ACEOF
10276 #line 10276 "configure"
10277 #include "confdefs.h"
10278
10279 #include <stdlib.h>
10280 #include <stdarg.h>
10281 #include <stdio.h>
10282 #ifdef HAVE_LIBUTF8_H
10283 #include <libutf8.h>
10284 #endif
10285 int
10286 main ()
10287 {
10288 wchar_t state
10289   ;
10290   return 0;
10291 }
10292 _ACEOF
10293 rm -f conftest.$ac_objext
10294 if { (eval echo "$as_me:10294: \"$ac_compile\"") >&5
10295   (eval $ac_compile) 2>&5
10296   ac_status=$?
10297   echo "$as_me:10297: \$? = $ac_status" >&5
10298   (exit $ac_status); } &&
10299          { ac_try='test -s conftest.$ac_objext'
10300   { (eval echo "$as_me:10300: \"$ac_try\"") >&5
10301   (eval $ac_try) 2>&5
10302   ac_status=$?
10303   echo "$as_me:10303: \$? = $ac_status" >&5
10304   (exit $ac_status); }; }; then
10305   cf_cv_wchar_t=no
10306 else
10307   echo "$as_me: failed program was:" >&5
10308 cat conftest.$ac_ext >&5
10309 cat >conftest.$ac_ext <<_ACEOF
10310 #line 10310 "configure"
10311 #include "confdefs.h"
10312
10313 #include <stdlib.h>
10314 #include <stdarg.h>
10315 #include <stdio.h>
10316 #include <wchar.h>
10317 #ifdef HAVE_LIBUTF8_H
10318 #include <libutf8.h>
10319 #endif
10320 int
10321 main ()
10322 {
10323 wchar_t value
10324   ;
10325   return 0;
10326 }
10327 _ACEOF
10328 rm -f conftest.$ac_objext
10329 if { (eval echo "$as_me:10329: \"$ac_compile\"") >&5
10330   (eval $ac_compile) 2>&5
10331   ac_status=$?
10332   echo "$as_me:10332: \$? = $ac_status" >&5
10333   (exit $ac_status); } &&
10334          { ac_try='test -s conftest.$ac_objext'
10335   { (eval echo "$as_me:10335: \"$ac_try\"") >&5
10336   (eval $ac_try) 2>&5
10337   ac_status=$?
10338   echo "$as_me:10338: \$? = $ac_status" >&5
10339   (exit $ac_status); }; }; then
10340   cf_cv_wchar_t=yes
10341 else
10342   echo "$as_me: failed program was:" >&5
10343 cat conftest.$ac_ext >&5
10344 cf_cv_wchar_t=unknown
10345 fi
10346 rm -f conftest.$ac_objext conftest.$ac_ext
10347 fi
10348 rm -f conftest.$ac_objext conftest.$ac_ext
10349 fi
10350 echo "$as_me:10350: result: $cf_cv_wchar_t" >&5
10351 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10352
10353 if test "$cf_cv_wchar_t" = yes ; then
10354
10355 cat >>confdefs.h <<\EOF
10356 #define NEED_WCHAR_H 1
10357 EOF
10358
10359         NEED_WCHAR_H=1
10360 fi
10361
10362 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10363 if test "$cf_cv_wchar_t" = unknown ; then
10364         NCURSES_WCHAR_T=1
10365 fi
10366
10367 # if we find wchar_t in either place, use substitution to provide a fallback.
10368 if test "$cf_cv_wchar_t" != unknown ; then
10369         NCURSES_OK_WCHAR_T=1
10370 fi
10371
10372 # This is needed on Tru64 5.0 to declare wint_t
10373 echo "$as_me:10373: checking if we must include wchar.h to declare wint_t" >&5
10374 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10375 if test "${cf_cv_wint_t+set}" = set; then
10376   echo $ECHO_N "(cached) $ECHO_C" >&6
10377 else
10378
10379 cat >conftest.$ac_ext <<_ACEOF
10380 #line 10380 "configure"
10381 #include "confdefs.h"
10382
10383 #include <stdlib.h>
10384 #include <stdarg.h>
10385 #include <stdio.h>
10386 #ifdef HAVE_LIBUTF8_H
10387 #include <libutf8.h>
10388 #endif
10389 int
10390 main ()
10391 {
10392 wint_t state
10393   ;
10394   return 0;
10395 }
10396 _ACEOF
10397 rm -f conftest.$ac_objext
10398 if { (eval echo "$as_me:10398: \"$ac_compile\"") >&5
10399   (eval $ac_compile) 2>&5
10400   ac_status=$?
10401   echo "$as_me:10401: \$? = $ac_status" >&5
10402   (exit $ac_status); } &&
10403          { ac_try='test -s conftest.$ac_objext'
10404   { (eval echo "$as_me:10404: \"$ac_try\"") >&5
10405   (eval $ac_try) 2>&5
10406   ac_status=$?
10407   echo "$as_me:10407: \$? = $ac_status" >&5
10408   (exit $ac_status); }; }; then
10409   cf_cv_wint_t=no
10410 else
10411   echo "$as_me: failed program was:" >&5
10412 cat conftest.$ac_ext >&5
10413 cat >conftest.$ac_ext <<_ACEOF
10414 #line 10414 "configure"
10415 #include "confdefs.h"
10416
10417 #include <stdlib.h>
10418 #include <stdarg.h>
10419 #include <stdio.h>
10420 #include <wchar.h>
10421 #ifdef HAVE_LIBUTF8_H
10422 #include <libutf8.h>
10423 #endif
10424 int
10425 main ()
10426 {
10427 wint_t value
10428   ;
10429   return 0;
10430 }
10431 _ACEOF
10432 rm -f conftest.$ac_objext
10433 if { (eval echo "$as_me:10433: \"$ac_compile\"") >&5
10434   (eval $ac_compile) 2>&5
10435   ac_status=$?
10436   echo "$as_me:10436: \$? = $ac_status" >&5
10437   (exit $ac_status); } &&
10438          { ac_try='test -s conftest.$ac_objext'
10439   { (eval echo "$as_me:10439: \"$ac_try\"") >&5
10440   (eval $ac_try) 2>&5
10441   ac_status=$?
10442   echo "$as_me:10442: \$? = $ac_status" >&5
10443   (exit $ac_status); }; }; then
10444   cf_cv_wint_t=yes
10445 else
10446   echo "$as_me: failed program was:" >&5
10447 cat conftest.$ac_ext >&5
10448 cf_cv_wint_t=unknown
10449 fi
10450 rm -f conftest.$ac_objext conftest.$ac_ext
10451 fi
10452 rm -f conftest.$ac_objext conftest.$ac_ext
10453 fi
10454 echo "$as_me:10454: result: $cf_cv_wint_t" >&5
10455 echo "${ECHO_T}$cf_cv_wint_t" >&6
10456
10457 if test "$cf_cv_wint_t" = yes ; then
10458
10459 cat >>confdefs.h <<\EOF
10460 #define NEED_WCHAR_H 1
10461 EOF
10462
10463         NEED_WCHAR_H=1
10464 fi
10465
10466 # if we do not find wint_t in either place, use substitution to provide a fallback.
10467 if test "$cf_cv_wint_t" = unknown ; then
10468         NCURSES_WINT_T=1
10469 fi
10470
10471 # if we find wint_t in either place, use substitution to provide a fallback.
10472 if test "$cf_cv_wint_t" != unknown ; then
10473         NCURSES_OK_WINT_T=1
10474 fi
10475
10476         if test "$NCURSES_MBSTATE_T" != 0; then
10477
10478 cat >>confdefs.h <<\EOF
10479 #define NEED_MBSTATE_T_DEF 1
10480 EOF
10481
10482         fi
10483 fi
10484
10485 ###   use option --disable-lp64 to allow long chtype
10486 echo "$as_me:10486: checking whether to enable _LP64 definition in curses.h" >&5
10487 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10488
10489 # Check whether --enable-lp64 or --disable-lp64 was given.
10490 if test "${enable_lp64+set}" = set; then
10491   enableval="$enable_lp64"
10492   with_lp64=$enableval
10493 else
10494   with_lp64=$cf_dft_with_lp64
10495 fi;
10496 echo "$as_me:10496: result: $with_lp64" >&5
10497 echo "${ECHO_T}$with_lp64" >&6
10498
10499 if test "x$with_lp64" = xyes ; then
10500         cf_cv_enable_lp64=1
10501 else
10502         cf_cv_enable_lp64=0
10503 fi
10504
10505 # Check whether --enable-largefile or --disable-largefile was given.
10506 if test "${enable_largefile+set}" = set; then
10507   enableval="$enable_largefile"
10508
10509 fi;
10510 if test "$enable_largefile" != no; then
10511
10512   echo "$as_me:10512: checking for special C compiler options needed for large files" >&5
10513 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10514 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10515   echo $ECHO_N "(cached) $ECHO_C" >&6
10516 else
10517   ac_cv_sys_largefile_CC=no
10518      if test "$GCC" != yes; then
10519        ac_save_CC=$CC
10520        while :; do
10521          # IRIX 6.2 and later do not support large files by default,
10522          # so use the C compiler's -n32 option if that helps.
10523          cat >conftest.$ac_ext <<_ACEOF
10524 #line 10524 "configure"
10525 #include "confdefs.h"
10526 #include <sys/types.h>
10527  /* Check that off_t can represent 2**63 - 1 correctly.
10528     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10529     since some C++ compilers masquerading as C compilers
10530     incorrectly reject 9223372036854775807.  */
10531 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10532   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10533                        && LARGE_OFF_T % 2147483647 == 1)
10534                       ? 1 : -1];
10535 int
10536 main ()
10537 {
10538
10539   ;
10540   return 0;
10541 }
10542 _ACEOF
10543          rm -f conftest.$ac_objext
10544 if { (eval echo "$as_me:10544: \"$ac_compile\"") >&5
10545   (eval $ac_compile) 2>&5
10546   ac_status=$?
10547   echo "$as_me:10547: \$? = $ac_status" >&5
10548   (exit $ac_status); } &&
10549          { ac_try='test -s conftest.$ac_objext'
10550   { (eval echo "$as_me:10550: \"$ac_try\"") >&5
10551   (eval $ac_try) 2>&5
10552   ac_status=$?
10553   echo "$as_me:10553: \$? = $ac_status" >&5
10554   (exit $ac_status); }; }; then
10555   break
10556 else
10557   echo "$as_me: failed program was:" >&5
10558 cat conftest.$ac_ext >&5
10559 fi
10560 rm -f conftest.$ac_objext
10561          CC="$CC -n32"
10562          rm -f conftest.$ac_objext
10563 if { (eval echo "$as_me:10563: \"$ac_compile\"") >&5
10564   (eval $ac_compile) 2>&5
10565   ac_status=$?
10566   echo "$as_me:10566: \$? = $ac_status" >&5
10567   (exit $ac_status); } &&
10568          { ac_try='test -s conftest.$ac_objext'
10569   { (eval echo "$as_me:10569: \"$ac_try\"") >&5
10570   (eval $ac_try) 2>&5
10571   ac_status=$?
10572   echo "$as_me:10572: \$? = $ac_status" >&5
10573   (exit $ac_status); }; }; then
10574   ac_cv_sys_largefile_CC=' -n32'; break
10575 else
10576   echo "$as_me: failed program was:" >&5
10577 cat conftest.$ac_ext >&5
10578 fi
10579 rm -f conftest.$ac_objext
10580          break
10581        done
10582        CC=$ac_save_CC
10583        rm -f conftest.$ac_ext
10584     fi
10585 fi
10586 echo "$as_me:10586: result: $ac_cv_sys_largefile_CC" >&5
10587 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10588   if test "$ac_cv_sys_largefile_CC" != no; then
10589     CC=$CC$ac_cv_sys_largefile_CC
10590   fi
10591
10592   echo "$as_me:10592: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10593 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10594 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10595   echo $ECHO_N "(cached) $ECHO_C" >&6
10596 else
10597   while :; do
10598   ac_cv_sys_file_offset_bits=no
10599   cat >conftest.$ac_ext <<_ACEOF
10600 #line 10600 "configure"
10601 #include "confdefs.h"
10602 #include <sys/types.h>
10603  /* Check that off_t can represent 2**63 - 1 correctly.
10604     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10605     since some C++ compilers masquerading as C compilers
10606     incorrectly reject 9223372036854775807.  */
10607 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10608   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10609                        && LARGE_OFF_T % 2147483647 == 1)
10610                       ? 1 : -1];
10611 int
10612 main ()
10613 {
10614
10615   ;
10616   return 0;
10617 }
10618 _ACEOF
10619 rm -f conftest.$ac_objext
10620 if { (eval echo "$as_me:10620: \"$ac_compile\"") >&5
10621   (eval $ac_compile) 2>&5
10622   ac_status=$?
10623   echo "$as_me:10623: \$? = $ac_status" >&5
10624   (exit $ac_status); } &&
10625          { ac_try='test -s conftest.$ac_objext'
10626   { (eval echo "$as_me:10626: \"$ac_try\"") >&5
10627   (eval $ac_try) 2>&5
10628   ac_status=$?
10629   echo "$as_me:10629: \$? = $ac_status" >&5
10630   (exit $ac_status); }; }; then
10631   break
10632 else
10633   echo "$as_me: failed program was:" >&5
10634 cat conftest.$ac_ext >&5
10635 fi
10636 rm -f conftest.$ac_objext conftest.$ac_ext
10637   cat >conftest.$ac_ext <<_ACEOF
10638 #line 10638 "configure"
10639 #include "confdefs.h"
10640 #define _FILE_OFFSET_BITS 64
10641 #include <sys/types.h>
10642  /* Check that off_t can represent 2**63 - 1 correctly.
10643     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10644     since some C++ compilers masquerading as C compilers
10645     incorrectly reject 9223372036854775807.  */
10646 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10647   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10648                        && LARGE_OFF_T % 2147483647 == 1)
10649                       ? 1 : -1];
10650 int
10651 main ()
10652 {
10653
10654   ;
10655   return 0;
10656 }
10657 _ACEOF
10658 rm -f conftest.$ac_objext
10659 if { (eval echo "$as_me:10659: \"$ac_compile\"") >&5
10660   (eval $ac_compile) 2>&5
10661   ac_status=$?
10662   echo "$as_me:10662: \$? = $ac_status" >&5
10663   (exit $ac_status); } &&
10664          { ac_try='test -s conftest.$ac_objext'
10665   { (eval echo "$as_me:10665: \"$ac_try\"") >&5
10666   (eval $ac_try) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit $ac_status); }; }; then
10670   ac_cv_sys_file_offset_bits=64; break
10671 else
10672   echo "$as_me: failed program was:" >&5
10673 cat conftest.$ac_ext >&5
10674 fi
10675 rm -f conftest.$ac_objext conftest.$ac_ext
10676   break
10677 done
10678 fi
10679 echo "$as_me:10679: result: $ac_cv_sys_file_offset_bits" >&5
10680 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10681 if test "$ac_cv_sys_file_offset_bits" != no; then
10682
10683 cat >>confdefs.h <<EOF
10684 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10685 EOF
10686
10687 fi
10688 rm -rf conftest*
10689   echo "$as_me:10689: checking for _LARGE_FILES value needed for large files" >&5
10690 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10691 if test "${ac_cv_sys_large_files+set}" = set; then
10692   echo $ECHO_N "(cached) $ECHO_C" >&6
10693 else
10694   while :; do
10695   ac_cv_sys_large_files=no
10696   cat >conftest.$ac_ext <<_ACEOF
10697 #line 10697 "configure"
10698 #include "confdefs.h"
10699 #include <sys/types.h>
10700  /* Check that off_t can represent 2**63 - 1 correctly.
10701     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10702     since some C++ compilers masquerading as C compilers
10703     incorrectly reject 9223372036854775807.  */
10704 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10705   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10706                        && LARGE_OFF_T % 2147483647 == 1)
10707                       ? 1 : -1];
10708 int
10709 main ()
10710 {
10711
10712   ;
10713   return 0;
10714 }
10715 _ACEOF
10716 rm -f conftest.$ac_objext
10717 if { (eval echo "$as_me:10717: \"$ac_compile\"") >&5
10718   (eval $ac_compile) 2>&5
10719   ac_status=$?
10720   echo "$as_me:10720: \$? = $ac_status" >&5
10721   (exit $ac_status); } &&
10722          { ac_try='test -s conftest.$ac_objext'
10723   { (eval echo "$as_me:10723: \"$ac_try\"") >&5
10724   (eval $ac_try) 2>&5
10725   ac_status=$?
10726   echo "$as_me:10726: \$? = $ac_status" >&5
10727   (exit $ac_status); }; }; then
10728   break
10729 else
10730   echo "$as_me: failed program was:" >&5
10731 cat conftest.$ac_ext >&5
10732 fi
10733 rm -f conftest.$ac_objext conftest.$ac_ext
10734   cat >conftest.$ac_ext <<_ACEOF
10735 #line 10735 "configure"
10736 #include "confdefs.h"
10737 #define _LARGE_FILES 1
10738 #include <sys/types.h>
10739  /* Check that off_t can represent 2**63 - 1 correctly.
10740     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10741     since some C++ compilers masquerading as C compilers
10742     incorrectly reject 9223372036854775807.  */
10743 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10744   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10745                        && LARGE_OFF_T % 2147483647 == 1)
10746                       ? 1 : -1];
10747 int
10748 main ()
10749 {
10750
10751   ;
10752   return 0;
10753 }
10754 _ACEOF
10755 rm -f conftest.$ac_objext
10756 if { (eval echo "$as_me:10756: \"$ac_compile\"") >&5
10757   (eval $ac_compile) 2>&5
10758   ac_status=$?
10759   echo "$as_me:10759: \$? = $ac_status" >&5
10760   (exit $ac_status); } &&
10761          { ac_try='test -s conftest.$ac_objext'
10762   { (eval echo "$as_me:10762: \"$ac_try\"") >&5
10763   (eval $ac_try) 2>&5
10764   ac_status=$?
10765   echo "$as_me:10765: \$? = $ac_status" >&5
10766   (exit $ac_status); }; }; then
10767   ac_cv_sys_large_files=1; break
10768 else
10769   echo "$as_me: failed program was:" >&5
10770 cat conftest.$ac_ext >&5
10771 fi
10772 rm -f conftest.$ac_objext conftest.$ac_ext
10773   break
10774 done
10775 fi
10776 echo "$as_me:10776: result: $ac_cv_sys_large_files" >&5
10777 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10778 if test "$ac_cv_sys_large_files" != no; then
10779
10780 cat >>confdefs.h <<EOF
10781 #define _LARGE_FILES $ac_cv_sys_large_files
10782 EOF
10783
10784 fi
10785 rm -rf conftest*
10786 fi
10787
10788         if test "$enable_largefile" != no ; then
10789         echo "$as_me:10789: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10790 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10791 if test "${ac_cv_sys_largefile_source+set}" = set; then
10792   echo $ECHO_N "(cached) $ECHO_C" >&6
10793 else
10794   while :; do
10795   ac_cv_sys_largefile_source=no
10796   cat >conftest.$ac_ext <<_ACEOF
10797 #line 10797 "configure"
10798 #include "confdefs.h"
10799 #include <stdio.h>
10800 int
10801 main ()
10802 {
10803 return !fseeko;
10804   ;
10805   return 0;
10806 }
10807 _ACEOF
10808 rm -f conftest.$ac_objext
10809 if { (eval echo "$as_me:10809: \"$ac_compile\"") >&5
10810   (eval $ac_compile) 2>&5
10811   ac_status=$?
10812   echo "$as_me:10812: \$? = $ac_status" >&5
10813   (exit $ac_status); } &&
10814          { ac_try='test -s conftest.$ac_objext'
10815   { (eval echo "$as_me:10815: \"$ac_try\"") >&5
10816   (eval $ac_try) 2>&5
10817   ac_status=$?
10818   echo "$as_me:10818: \$? = $ac_status" >&5
10819   (exit $ac_status); }; }; then
10820   break
10821 else
10822   echo "$as_me: failed program was:" >&5
10823 cat conftest.$ac_ext >&5
10824 fi
10825 rm -f conftest.$ac_objext conftest.$ac_ext
10826   cat >conftest.$ac_ext <<_ACEOF
10827 #line 10827 "configure"
10828 #include "confdefs.h"
10829 #define _LARGEFILE_SOURCE 1
10830 #include <stdio.h>
10831 int
10832 main ()
10833 {
10834 return !fseeko;
10835   ;
10836   return 0;
10837 }
10838 _ACEOF
10839 rm -f conftest.$ac_objext
10840 if { (eval echo "$as_me:10840: \"$ac_compile\"") >&5
10841   (eval $ac_compile) 2>&5
10842   ac_status=$?
10843   echo "$as_me:10843: \$? = $ac_status" >&5
10844   (exit $ac_status); } &&
10845          { ac_try='test -s conftest.$ac_objext'
10846   { (eval echo "$as_me:10846: \"$ac_try\"") >&5
10847   (eval $ac_try) 2>&5
10848   ac_status=$?
10849   echo "$as_me:10849: \$? = $ac_status" >&5
10850   (exit $ac_status); }; }; then
10851   ac_cv_sys_largefile_source=1; break
10852 else
10853   echo "$as_me: failed program was:" >&5
10854 cat conftest.$ac_ext >&5
10855 fi
10856 rm -f conftest.$ac_objext conftest.$ac_ext
10857   break
10858 done
10859 fi
10860 echo "$as_me:10860: result: $ac_cv_sys_largefile_source" >&5
10861 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10862 if test "$ac_cv_sys_largefile_source" != no; then
10863
10864 cat >>confdefs.h <<EOF
10865 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10866 EOF
10867
10868 fi
10869 rm -rf conftest*
10870
10871 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10872 # in glibc 2.1.3, but that breaks too many other things.
10873 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10874 echo "$as_me:10874: checking for fseeko" >&5
10875 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10876 if test "${ac_cv_func_fseeko+set}" = set; then
10877   echo $ECHO_N "(cached) $ECHO_C" >&6
10878 else
10879   cat >conftest.$ac_ext <<_ACEOF
10880 #line 10880 "configure"
10881 #include "confdefs.h"
10882 #include <stdio.h>
10883 int
10884 main ()
10885 {
10886 return fseeko && fseeko (stdin, 0, 0);
10887   ;
10888   return 0;
10889 }
10890 _ACEOF
10891 rm -f conftest.$ac_objext conftest$ac_exeext
10892 if { (eval echo "$as_me:10892: \"$ac_link\"") >&5
10893   (eval $ac_link) 2>&5
10894   ac_status=$?
10895   echo "$as_me:10895: \$? = $ac_status" >&5
10896   (exit $ac_status); } &&
10897          { ac_try='test -s conftest$ac_exeext'
10898   { (eval echo "$as_me:10898: \"$ac_try\"") >&5
10899   (eval $ac_try) 2>&5
10900   ac_status=$?
10901   echo "$as_me:10901: \$? = $ac_status" >&5
10902   (exit $ac_status); }; }; then
10903   ac_cv_func_fseeko=yes
10904 else
10905   echo "$as_me: failed program was:" >&5
10906 cat conftest.$ac_ext >&5
10907 ac_cv_func_fseeko=no
10908 fi
10909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10910 fi
10911 echo "$as_me:10911: result: $ac_cv_func_fseeko" >&5
10912 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10913 if test $ac_cv_func_fseeko = yes; then
10914
10915 cat >>confdefs.h <<\EOF
10916 #define HAVE_FSEEKO 1
10917 EOF
10918
10919 fi
10920
10921         # Normally we would collect these definitions in the config.h,
10922         # but (like _XOPEN_SOURCE), some environments rely on having these
10923         # defined before any of the system headers are included.  Another
10924         # case comes up with C++, e.g., on AIX the compiler compiles the
10925         # header files by themselves before looking at the body files it is
10926         # told to compile.  For ncurses, those header files do not include
10927         # the config.h
10928         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10929         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10930         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10931
10932         echo "$as_me:10932: checking whether to use struct dirent64" >&5
10933 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10934 if test "${cf_cv_struct_dirent64+set}" = set; then
10935   echo $ECHO_N "(cached) $ECHO_C" >&6
10936 else
10937
10938                 cat >conftest.$ac_ext <<_ACEOF
10939 #line 10939 "configure"
10940 #include "confdefs.h"
10941
10942 #include <sys/types.h>
10943 #include <dirent.h>
10944
10945 int
10946 main ()
10947 {
10948
10949                 /* if transitional largefile support is setup, this is true */
10950                 extern struct dirent64 * readdir(DIR *);
10951                 struct dirent64 *x = readdir((DIR *)0);
10952                 struct dirent *y = readdir((DIR *)0);
10953                 int z = x - y;
10954
10955   ;
10956   return 0;
10957 }
10958 _ACEOF
10959 rm -f conftest.$ac_objext
10960 if { (eval echo "$as_me:10960: \"$ac_compile\"") >&5
10961   (eval $ac_compile) 2>&5
10962   ac_status=$?
10963   echo "$as_me:10963: \$? = $ac_status" >&5
10964   (exit $ac_status); } &&
10965          { ac_try='test -s conftest.$ac_objext'
10966   { (eval echo "$as_me:10966: \"$ac_try\"") >&5
10967   (eval $ac_try) 2>&5
10968   ac_status=$?
10969   echo "$as_me:10969: \$? = $ac_status" >&5
10970   (exit $ac_status); }; }; then
10971   cf_cv_struct_dirent64=yes
10972 else
10973   echo "$as_me: failed program was:" >&5
10974 cat conftest.$ac_ext >&5
10975 cf_cv_struct_dirent64=no
10976 fi
10977 rm -f conftest.$ac_objext conftest.$ac_ext
10978
10979 fi
10980 echo "$as_me:10980: result: $cf_cv_struct_dirent64" >&5
10981 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10982         test "$cf_cv_struct_dirent64" = yes &&
10983 cat >>confdefs.h <<\EOF
10984 #define HAVE_STRUCT_DIRENT64 1
10985 EOF
10986
10987         fi
10988
10989 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10990 echo "$as_me:10990: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10991 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10992
10993 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10994 if test "${enable_tparm_varargs+set}" = set; then
10995   enableval="$enable_tparm_varargs"
10996   with_tparm_varargs=$enableval
10997 else
10998   with_tparm_varargs=yes
10999 fi;
11000 echo "$as_me:11000: result: $with_tparm_varargs" >&5
11001 echo "${ECHO_T}$with_tparm_varargs" >&6
11002 NCURSES_TPARM_VARARGS=0
11003 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11004
11005 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11006 if test "$with_ticlib" != no ; then
11007 echo "$as_me:11007: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11008 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11009
11010 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11011 if test "${enable_tic_depends+set}" = set; then
11012   enableval="$enable_tic_depends"
11013   with_tic_depends=$enableval
11014 else
11015   with_tic_depends=yes
11016 fi;
11017 echo "$as_me:11017: result: $with_tic_depends" >&5
11018 echo "${ECHO_T}$with_tic_depends" >&6
11019 else
11020         with_tic_depends=no
11021 fi
11022
11023 ###   use option --with-bool to override bool's type
11024 echo "$as_me:11024: checking for type of bool" >&5
11025 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11026
11027 # Check whether --with-bool or --without-bool was given.
11028 if test "${with_bool+set}" = set; then
11029   withval="$with_bool"
11030   NCURSES_BOOL="$withval"
11031 else
11032   NCURSES_BOOL=auto
11033 fi;
11034 echo "$as_me:11034: result: $NCURSES_BOOL" >&5
11035 echo "${ECHO_T}$NCURSES_BOOL" >&6
11036
11037 echo "$as_me:11037: checking for alternate terminal capabilities file" >&5
11038 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11039
11040 # Check whether --with-caps or --without-caps was given.
11041 if test "${with_caps+set}" = set; then
11042   withval="$with_caps"
11043   TERMINFO_CAPS=Caps.$withval
11044 else
11045   TERMINFO_CAPS=Caps
11046 fi;
11047 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11048 echo "$as_me:11048: result: $TERMINFO_CAPS" >&5
11049 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11050
11051 ###   use option --with-chtype to override chtype's type
11052 echo "$as_me:11052: checking for type of chtype" >&5
11053 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11054
11055 # Check whether --with-chtype or --without-chtype was given.
11056 if test "${with_chtype+set}" = set; then
11057   withval="$with_chtype"
11058   NCURSES_CHTYPE="$withval"
11059 else
11060   NCURSES_CHTYPE=$cf_dft_chtype
11061 fi;
11062 echo "$as_me:11062: result: $NCURSES_CHTYPE" >&5
11063 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11064
11065 ###   use option --with-ospeed to override ospeed's type
11066 echo "$as_me:11066: checking for type of ospeed" >&5
11067 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11068
11069 # Check whether --with-ospeed or --without-ospeed was given.
11070 if test "${with_ospeed+set}" = set; then
11071   withval="$with_ospeed"
11072   NCURSES_OSPEED="$withval"
11073 else
11074   NCURSES_OSPEED=short
11075 fi;
11076 echo "$as_me:11076: result: $NCURSES_OSPEED" >&5
11077 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11078
11079 ###   use option --with-mmask-t to override mmask_t's type
11080 echo "$as_me:11080: checking for type of mmask_t" >&5
11081 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11082
11083 # Check whether --with-mmask-t or --without-mmask-t was given.
11084 if test "${with_mmask_t+set}" = set; then
11085   withval="$with_mmask_t"
11086   NCURSES_MMASK_T="$withval"
11087 else
11088   NCURSES_MMASK_T=$cf_dft_mmask_t
11089 fi;
11090 echo "$as_me:11090: result: $NCURSES_MMASK_T" >&5
11091 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11092
11093 ###   use option --with-ccharw-max to override CCHARW_MAX size
11094 echo "$as_me:11094: checking for size CCHARW_MAX" >&5
11095 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11096
11097 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11098 if test "${with_ccharw_max+set}" = set; then
11099   withval="$with_ccharw_max"
11100   NCURSES_CCHARW_MAX="$withval"
11101 else
11102   NCURSES_CCHARW_MAX=5
11103 fi;
11104 echo "$as_me:11104: result: $NCURSES_CCHARW_MAX" >&5
11105 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11106
11107 ###   use option --with-tparm-arg to override tparm's argument type
11108 echo "$as_me:11108: checking for type of tparm args" >&5
11109 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11110
11111 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11112 if test "${with_tparm_arg+set}" = set; then
11113   withval="$with_tparm_arg"
11114   NCURSES_TPARM_ARG="$withval"
11115 else
11116   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11117 fi;
11118 echo "$as_me:11118: result: $NCURSES_TPARM_ARG" >&5
11119 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11120
11121 ### Enable compiling-in rcs id's
11122 echo "$as_me:11122: checking if RCS identifiers should be compiled-in" >&5
11123 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11124
11125 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11126 if test "${with_rcs_ids+set}" = set; then
11127   withval="$with_rcs_ids"
11128   with_rcs_ids=$withval
11129 else
11130   with_rcs_ids=no
11131 fi;
11132 echo "$as_me:11132: result: $with_rcs_ids" >&5
11133 echo "${ECHO_T}$with_rcs_ids" >&6
11134 test "x$with_rcs_ids" = xyes &&
11135 cat >>confdefs.h <<\EOF
11136 #define USE_RCS_IDS 1
11137 EOF
11138
11139 ###############################################################################
11140
11141 echo "$as_me:11141: checking format of man-pages" >&5
11142 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11143
11144 # Check whether --with-manpage-format or --without-manpage-format was given.
11145 if test "${with_manpage_format+set}" = set; then
11146   withval="$with_manpage_format"
11147   MANPAGE_FORMAT=$withval
11148 else
11149   MANPAGE_FORMAT=unknown
11150 fi;
11151
11152 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11153 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11154
11155 cf_unknown=
11156
11157 case $MANPAGE_FORMAT in
11158 (unknown)
11159         if test -z "$MANPATH" ; then
11160                 MANPATH="/usr/man:/usr/share/man"
11161         fi
11162
11163         # look for the 'date' man-page (it's most likely to be installed!)
11164         MANPAGE_FORMAT=
11165         cf_preform=no
11166         cf_catonly=yes
11167         cf_example=date
11168
11169         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11170         for cf_dir in $MANPATH; do
11171                 test -z "$cf_dir" && cf_dir=/usr/man
11172                 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
11173                 do
11174                         cf_test=`echo $cf_name | sed -e 's/*//'`
11175                         if test "x$cf_test" = "x$cf_name" ; then
11176
11177                                 case "$cf_name" in
11178                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11179                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11180                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11181                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11182                                 esac
11183
11184                                 case "$cf_name" in
11185                                 ($cf_dir/man*)
11186                                         cf_catonly=no
11187                                         ;;
11188                                 ($cf_dir/cat*)
11189                                         cf_preform=yes
11190                                         ;;
11191                                 esac
11192                                 break
11193                         fi
11194
11195                         # if we found a match in either man* or cat*, stop looking
11196                         if test -n "$MANPAGE_FORMAT" ; then
11197                                 cf_found=no
11198                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11199                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11200                                 case "$cf_name" in
11201                                 ($cf_dir/cat*)
11202                                         cf_found=yes
11203                                         ;;
11204                                 esac
11205                                 test $cf_found=yes && break
11206                         fi
11207                 done
11208                 # only check the first directory in $MANPATH where we find manpages
11209                 if test -n "$MANPAGE_FORMAT" ; then
11210                         break
11211                 fi
11212         done
11213         # if we did not find the example, just assume it is normal
11214         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11215         IFS="$ac_save_ifs"
11216         ;;
11217 (*)
11218         for cf_option in $MANPAGE_FORMAT; do
11219         case $cf_option in
11220         (gzip|compress|BSDI|normal|formatted|catonly)
11221                 ;;
11222         (*)
11223                 cf_unknown="$cf_unknown $cf_option"
11224                 ;;
11225         esac
11226         done
11227         ;;
11228 esac
11229
11230 echo "$as_me:11230: result: $MANPAGE_FORMAT" >&5
11231 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11232 if test -n "$cf_unknown" ; then
11233         { echo "$as_me:11233: WARNING: Unexpected manpage-format $cf_unknown" >&5
11234 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11235 fi
11236
11237 echo "$as_me:11237: checking for manpage renaming" >&5
11238 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11239
11240 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11241 if test "${with_manpage_renames+set}" = set; then
11242   withval="$with_manpage_renames"
11243   MANPAGE_RENAMES=$withval
11244 else
11245   MANPAGE_RENAMES=yes
11246 fi;
11247
11248 case ".$MANPAGE_RENAMES" in
11249 (.no)
11250         ;;
11251 (.|.yes)
11252         # Debian 'man' program?
11253         if test -f /etc/debian_version ; then
11254                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11255         else
11256                 MANPAGE_RENAMES=no
11257         fi
11258         ;;
11259 esac
11260
11261 if test "$MANPAGE_RENAMES" != no ; then
11262         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11263                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11264         elif test ! -f $MANPAGE_RENAMES ; then
11265                 { { echo "$as_me:11265: error: not a filename: $MANPAGE_RENAMES" >&5
11266 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11267    { (exit 1); exit 1; }; }
11268         fi
11269
11270         test ! -d man && mkdir man
11271
11272         # Construct a sed-script to perform renaming within man-pages
11273         if test -n "$MANPAGE_RENAMES" ; then
11274                 test ! -d man && mkdir man
11275                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11276         fi
11277 fi
11278
11279 echo "$as_me:11279: result: $MANPAGE_RENAMES" >&5
11280 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11281
11282 echo "$as_me:11282: checking if manpage aliases will be installed" >&5
11283 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11284
11285 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11286 if test "${with_manpage_aliases+set}" = set; then
11287   withval="$with_manpage_aliases"
11288   MANPAGE_ALIASES=$withval
11289 else
11290   MANPAGE_ALIASES=yes
11291 fi;
11292
11293 echo "$as_me:11293: result: $MANPAGE_ALIASES" >&5
11294 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11295
11296 case "x$LN_S" in
11297 (xln*)
11298         cf_use_symlinks=yes
11299         ;;
11300 (*)
11301         cf_use_symlinks=no
11302         ;;
11303 esac
11304
11305 MANPAGE_SYMLINKS=no
11306 if test "$MANPAGE_ALIASES" = yes ; then
11307 echo "$as_me:11307: checking if manpage symlinks should be used" >&5
11308 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11309
11310 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11311 if test "${with_manpage_symlinks+set}" = set; then
11312   withval="$with_manpage_symlinks"
11313   MANPAGE_SYMLINKS=$withval
11314 else
11315   MANPAGE_SYMLINKS=$cf_use_symlinks
11316 fi;
11317
11318 if test "$$cf_use_symlinks" = no; then
11319 if test "$MANPAGE_SYMLINKS" = yes ; then
11320         { echo "$as_me:11320: WARNING: cannot make symlinks" >&5
11321 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11322         MANPAGE_SYMLINKS=no
11323 fi
11324 fi
11325
11326 echo "$as_me:11326: result: $MANPAGE_SYMLINKS" >&5
11327 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11328 fi
11329
11330 echo "$as_me:11330: checking for manpage tbl" >&5
11331 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11332
11333 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11334 if test "${with_manpage_tbl+set}" = set; then
11335   withval="$with_manpage_tbl"
11336   MANPAGE_TBL=$withval
11337 else
11338   MANPAGE_TBL=no
11339 fi;
11340
11341 echo "$as_me:11341: result: $MANPAGE_TBL" >&5
11342 echo "${ECHO_T}$MANPAGE_TBL" >&6
11343
11344 if test "$prefix" = "NONE" ; then
11345         cf_prefix="$ac_default_prefix"
11346 else
11347         cf_prefix="$prefix"
11348 fi
11349
11350 case "$MANPAGE_FORMAT" in
11351 (*catonly*)
11352         cf_format=yes
11353         cf_inboth=no
11354         ;;
11355 (*formatted*)
11356         cf_format=yes
11357         cf_inboth=yes
11358         ;;
11359 (*)
11360         cf_format=no
11361         cf_inboth=no
11362         ;;
11363 esac
11364
11365 test ! -d man && mkdir man
11366
11367 cf_so_strip=
11368 cf_compress=
11369 case "$MANPAGE_FORMAT" in
11370 (*compress*)
11371         cf_so_strip="Z"
11372         cf_compress=compress
11373         ;;
11374 (*gzip*)
11375         cf_so_strip="gz"
11376         cf_compress=gzip
11377         ;;
11378 esac
11379
11380 cf_edit_man=./edit_man.sh
11381 cf_man_alias=`pwd`/man_alias.sed
11382
11383 cat >$cf_edit_man <<CF_EOF
11384 #! $SHELL
11385 # this script is generated by the configure-script CF_MAN_PAGES macro.
11386
11387 prefix="$cf_prefix"
11388 datarootdir="$datarootdir"
11389 datadir="$datadir"
11390
11391 NCURSES_MAJOR="$NCURSES_MAJOR"
11392 NCURSES_MINOR="$NCURSES_MINOR"
11393 NCURSES_PATCH="$NCURSES_PATCH"
11394
11395 NCURSES_OSPEED="$NCURSES_OSPEED"
11396 TERMINFO="$TERMINFO"
11397
11398 INSTALL="$INSTALL"
11399 INSTALL_DATA="$INSTALL_DATA"
11400
11401 transform="$program_transform_name"
11402
11403 TMP=\${TMPDIR:=/tmp}/man\$\$
11404 trap "rm -f \$TMP" 0 1 2 5 15
11405
11406 form=\$1
11407 shift || exit 1
11408
11409 verb=\$1
11410 shift || exit 1
11411
11412 mandir=\$1
11413 shift || exit 1
11414
11415 srcdir=\$1
11416 top_srcdir=\$srcdir/..
11417 shift || exit 1
11418
11419 if test "\$form" = normal ; then
11420         if test "$cf_format" = yes ; then
11421         if test "$cf_inboth" = no ; then
11422                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11423                 exit $?
11424         fi
11425         fi
11426         cf_subdir=\$mandir/man
11427         cf_tables=$MANPAGE_TBL
11428 else
11429         cf_subdir=\$mandir/cat
11430         cf_tables=yes
11431 fi
11432
11433 # process the list of source-files
11434 for i in \$* ; do
11435 case \$i in
11436 (*.orig|*.rej) ;;
11437 (*.[0-9]*)
11438         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11439         if test \$verb = installing ; then
11440         if test ! -d \$cf_subdir\${section} ; then
11441                 mkdir -p \$cf_subdir\$section
11442         fi
11443         fi
11444
11445         # replace variables in man page
11446         if test ! -f $cf_man_alias ; then
11447 cat >>$cf_man_alias <<-CF_EOF2
11448                 s,@DATADIR@,\$datadir,g
11449                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11450                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11451                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11452                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11453                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11454                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11455 CF_EOF
11456
11457         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11458         do
11459                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11460                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11461 cat >>$cf_edit_man <<-CF_EOF
11462                 s,@$cf_NAME@,$cf_name,g
11463 CF_EOF
11464         done
11465
11466 cat >>$cf_edit_man <<CF_EOF
11467 CF_EOF2
11468                 echo "...made $cf_man_alias"
11469         fi
11470
11471         aliases=
11472         cf_source=\`basename \$i\`
11473         inalias=\$cf_source
11474         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11475         if test ! -f \$inalias ; then
11476                 echo .. skipped \$cf_source
11477                 continue
11478         fi
11479 CF_EOF
11480
11481 if test "$MANPAGE_ALIASES" != no ; then
11482 cat >>$cf_edit_man <<CF_EOF
11483         nCurses=ignore.3x
11484         test $with_curses_h = yes && nCurses=ncurses.3x
11485         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11486 CF_EOF
11487 fi
11488
11489 if test "$MANPAGE_RENAMES" = no ; then
11490 cat >>$cf_edit_man <<CF_EOF
11491         # perform program transformations for section 1 man pages
11492         if test \$section = 1 ; then
11493                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11494         else
11495                 cf_target=\$cf_subdir\${section}/\$cf_source
11496         fi
11497 CF_EOF
11498 else
11499 cat >>$cf_edit_man <<CF_EOF
11500         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11501         if test -z "\$cf_target" ; then
11502                 echo '? missing rename for '\$cf_source
11503                 cf_target="\$cf_source"
11504         fi
11505         cf_target="\$cf_subdir\${section}/\${cf_target}"
11506
11507 CF_EOF
11508 fi
11509
11510 cat >>$cf_edit_man <<CF_EOF
11511         sed     -f $cf_man_alias \\
11512 CF_EOF
11513
11514 if test -f $MANPAGE_RENAMES ; then
11515 cat >>$cf_edit_man <<CF_EOF
11516                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11517 CF_EOF
11518 else
11519 cat >>$cf_edit_man <<CF_EOF
11520                 < \$i >\$TMP
11521 CF_EOF
11522 fi
11523
11524 cat >>$cf_edit_man <<CF_EOF
11525 if test \$cf_tables = yes ; then
11526         tbl \$TMP >\$TMP.out
11527         mv \$TMP.out \$TMP
11528 fi
11529 CF_EOF
11530
11531 if test $with_overwrite != yes ; then
11532 cat >>$cf_edit_man <<CF_EOF
11533         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11534         mv \$TMP.out \$TMP
11535 CF_EOF
11536 fi
11537
11538 if test $with_curses_h != yes ; then
11539 cat >>$cf_edit_man <<CF_EOF
11540         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11541         mv \$TMP.out \$TMP
11542 CF_EOF
11543 fi
11544
11545 cat >>$cf_edit_man <<CF_EOF
11546         if test \$form = format ; then
11547                 nroff -man \$TMP >\$TMP.out
11548                 mv \$TMP.out \$TMP
11549         fi
11550 CF_EOF
11551
11552 if test -n "$cf_compress" ; then
11553 cat >>$cf_edit_man <<CF_EOF
11554         if test \$verb = installing ; then
11555         if ( $cf_compress -f \$TMP )
11556         then
11557                 mv \$TMP.$cf_so_strip \$TMP
11558         fi
11559         fi
11560         cf_target="\$cf_target.$cf_so_strip"
11561 CF_EOF
11562 fi
11563
11564 case "$MANPAGE_FORMAT" in
11565 (*BSDI*)
11566 cat >>$cf_edit_man <<CF_EOF
11567         if test \$form = format ; then
11568                 # BSDI installs only .0 suffixes in the cat directories
11569                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11570         fi
11571 CF_EOF
11572   ;;
11573 esac
11574
11575 cat >>$cf_edit_man <<CF_EOF
11576         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11577         if test \$verb = installing ; then
11578                 echo \$verb \$cf_target
11579                 \$INSTALL_DATA \$TMP \$cf_target
11580                 test -d \$cf_subdir\${section} &&
11581                 test -n "\$aliases" && (
11582                         cd \$cf_subdir\${section} && (
11583                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11584                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11585                                 cf_target=\`basename \$cf_target\`
11586                                 for cf_alias in \$aliases
11587                                 do
11588                                         if test \$section = 1 ; then
11589                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11590                                         fi
11591
11592                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11593                                                 if test -f \$cf_alias\${suffix} ; then
11594                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11595                                                         then
11596                                                                 continue
11597                                                         fi
11598                                                 fi
11599                                                 echo .. \$verb alias \$cf_alias\${suffix}
11600 CF_EOF
11601 case "x$LN_S" in
11602 (*-f)
11603 cat >>$cf_edit_man <<CF_EOF
11604                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11605 CF_EOF
11606         ;;
11607 (*)
11608 cat >>$cf_edit_man <<CF_EOF
11609                                                 rm -f \$cf_alias\${suffix}
11610                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11611 CF_EOF
11612         ;;
11613 esac
11614 cat >>$cf_edit_man <<CF_EOF
11615                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11616                                                 echo ".so \$cf_source" >\$TMP
11617 CF_EOF
11618 if test -n "$cf_compress" ; then
11619 cat >>$cf_edit_man <<CF_EOF
11620                                                 if test -n "$cf_so_strip" ; then
11621                                                         $cf_compress -f \$TMP
11622                                                         mv \$TMP.$cf_so_strip \$TMP
11623                                                 fi
11624 CF_EOF
11625 fi
11626 cat >>$cf_edit_man <<CF_EOF
11627                                                 echo .. \$verb alias \$cf_alias\${suffix}
11628                                                 rm -f \$cf_alias\${suffix}
11629                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11630                                         fi
11631                                 done
11632                         )
11633                 )
11634         elif test \$verb = removing ; then
11635                 test -f \$cf_target && (
11636                         echo \$verb \$cf_target
11637                         rm -f \$cf_target
11638                 )
11639                 test -d \$cf_subdir\${section} &&
11640                 test -n "\$aliases" && (
11641                         cd \$cf_subdir\${section} && (
11642                                 for cf_alias in \$aliases
11643                                 do
11644                                         if test \$section = 1 ; then
11645                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11646                                         fi
11647
11648                                         echo .. \$verb alias \$cf_alias\${suffix}
11649                                         rm -f \$cf_alias\${suffix}
11650                                 done
11651                         )
11652                 )
11653         else
11654 #               echo ".hy 0"
11655                 cat \$TMP
11656         fi
11657         ;;
11658 esac
11659 done
11660
11661 if test $cf_inboth = yes ; then
11662 if test \$form != format ; then
11663         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11664 fi
11665 fi
11666
11667 exit 0
11668 CF_EOF
11669 chmod 755 $cf_edit_man
11670
11671 ###############################################################################
11672
11673 ### Note that some functions (such as const) are normally disabled anyway.
11674 echo "$as_me:11674: checking if you want to build with function extensions" >&5
11675 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11676
11677 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11678 if test "${enable_ext_funcs+set}" = set; then
11679   enableval="$enable_ext_funcs"
11680   with_ext_funcs=$enableval
11681 else
11682   with_ext_funcs=yes
11683 fi;
11684 echo "$as_me:11684: result: $with_ext_funcs" >&5
11685 echo "${ECHO_T}$with_ext_funcs" >&6
11686 if test "x$with_ext_funcs" = xyes ; then
11687         NCURSES_EXT_FUNCS=1
11688
11689 cat >>confdefs.h <<\EOF
11690 #define HAVE_ASSUME_DEFAULT_COLORS 1
11691 EOF
11692
11693 cat >>confdefs.h <<\EOF
11694 #define HAVE_CURSES_VERSION 1
11695 EOF
11696
11697 cat >>confdefs.h <<\EOF
11698 #define HAVE_HAS_KEY 1
11699 EOF
11700
11701 cat >>confdefs.h <<\EOF
11702 #define HAVE_RESIZETERM 1
11703 EOF
11704
11705 cat >>confdefs.h <<\EOF
11706 #define HAVE_RESIZE_TERM 1
11707 EOF
11708
11709 cat >>confdefs.h <<\EOF
11710 #define HAVE_TERM_ENTRY_H 1
11711 EOF
11712
11713 cat >>confdefs.h <<\EOF
11714 #define HAVE_USE_DEFAULT_COLORS 1
11715 EOF
11716
11717 cat >>confdefs.h <<\EOF
11718 #define HAVE_USE_SCREEN 1
11719 EOF
11720
11721 cat >>confdefs.h <<\EOF
11722 #define HAVE_USE_WINDOW 1
11723 EOF
11724
11725 cat >>confdefs.h <<\EOF
11726 #define HAVE_WRESIZE 1
11727 EOF
11728
11729 cat >>confdefs.h <<\EOF
11730 #define NCURSES_EXT_FUNCS 1
11731 EOF
11732
11733         GENERATED_EXT_FUNCS=generated
11734 else
11735         NCURSES_EXT_FUNCS=0
11736         GENERATED_EXT_FUNCS=
11737 fi
11738
11739 echo "$as_me:11739: checking if you want to build with SCREEN extensions" >&5
11740 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11741
11742 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11743 if test "${enable_sp_funcs+set}" = set; then
11744   enableval="$enable_sp_funcs"
11745   with_sp_funcs=$enableval
11746 else
11747   with_sp_funcs=$cf_dft_ext_spfuncs
11748 fi;
11749 echo "$as_me:11749: result: $with_sp_funcs" >&5
11750 echo "${ECHO_T}$with_sp_funcs" >&6
11751 if test "x$with_sp_funcs" = xyes ; then
11752         NCURSES_SP_FUNCS=1
11753
11754 cat >>confdefs.h <<\EOF
11755 #define NCURSES_SP_FUNCS 1
11756 EOF
11757
11758         GENERATED_SP_FUNCS=generated
11759 else
11760         NCURSES_SP_FUNCS=0
11761         GENERATED_SP_FUNCS=
11762 fi
11763
11764 echo "$as_me:11764: checking if you want to build with terminal-driver" >&5
11765 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11766
11767 # Check whether --enable-term-driver or --disable-term-driver was given.
11768 if test "${enable_term_driver+set}" = set; then
11769   enableval="$enable_term_driver"
11770   with_term_driver=$enableval
11771 else
11772   with_term_driver=no
11773 fi;
11774 echo "$as_me:11774: result: $with_term_driver" >&5
11775 echo "${ECHO_T}$with_term_driver" >&6
11776 if test "x$with_term_driver" = xyes ; then
11777
11778 cat >>confdefs.h <<\EOF
11779 #define USE_TERM_DRIVER 1
11780 EOF
11781
11782         if test "x$with_termlib" != xno ; then
11783                 { { echo "$as_me:11783: error: The term-driver option conflicts with the termlib option" >&5
11784 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11785    { (exit 1); exit 1; }; }
11786         fi
11787         if test "x$with_sp_funcs" != xyes ; then
11788                 { { echo "$as_me:11788: error: The term-driver option relies upon sp-funcs" >&5
11789 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11790    { (exit 1); exit 1; }; }
11791         fi
11792 fi
11793
11794 ###   use option --enable-const to turn on use of const beyond that in XSI.
11795 echo "$as_me:11795: checking for extended use of const keyword" >&5
11796 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11797
11798 # Check whether --enable-const or --disable-const was given.
11799 if test "${enable_const+set}" = set; then
11800   enableval="$enable_const"
11801   with_ext_const=$enableval
11802 else
11803   with_ext_const=$cf_dft_ext_const
11804 fi;
11805 echo "$as_me:11805: result: $with_ext_const" >&5
11806 echo "${ECHO_T}$with_ext_const" >&6
11807 NCURSES_CONST='/*nothing*/'
11808 if test "x$with_ext_const" = xyes ; then
11809         NCURSES_CONST=const
11810 fi
11811
11812 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11813 echo "$as_me:11813: checking if you want to use extended colors" >&5
11814 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11815
11816 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11817 if test "${enable_ext_colors+set}" = set; then
11818   enableval="$enable_ext_colors"
11819   with_ext_colors=$enableval
11820 else
11821   with_ext_colors=$cf_dft_ext_colors
11822 fi;
11823 echo "$as_me:11823: result: $with_ext_colors" >&5
11824 echo "${ECHO_T}$with_ext_colors" >&6
11825 NCURSES_EXT_COLORS=0
11826 if test "x$with_ext_colors" = xyes ; then
11827         if test "x$with_widec" != xyes ; then
11828                 { echo "$as_me:11828: WARNING: This option applies only to wide-character library" >&5
11829 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11830         else
11831                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11832
11833 if test "${with_abi_version+set}" != set; then
11834         case $cf_cv_rel_version in
11835         (5.*)
11836                 cf_cv_rel_version=6.0
11837                 cf_cv_abi_version=6
11838                 { echo "$as_me:11838: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11839 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11840                 ;;
11841         esac
11842 fi
11843
11844                 NCURSES_EXT_COLORS=1
11845
11846 cat >>confdefs.h <<\EOF
11847 #define NCURSES_EXT_COLORS 1
11848 EOF
11849
11850         fi
11851 fi
11852
11853 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11854 echo "$as_me:11854: checking if you want to use extended mouse encoding" >&5
11855 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11856
11857 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11858 if test "${enable_ext_mouse+set}" = set; then
11859   enableval="$enable_ext_mouse"
11860   with_ext_mouse=$enableval
11861 else
11862   with_ext_mouse=$cf_dft_ext_mouse
11863 fi;
11864 echo "$as_me:11864: result: $with_ext_mouse" >&5
11865 echo "${ECHO_T}$with_ext_mouse" >&6
11866 NCURSES_MOUSE_VERSION=1
11867 if test "x$with_ext_mouse" = xyes ; then
11868         NCURSES_MOUSE_VERSION=2
11869
11870 if test "${with_abi_version+set}" != set; then
11871         case $cf_cv_rel_version in
11872         (5.*)
11873                 cf_cv_rel_version=6.0
11874                 cf_cv_abi_version=6
11875                 { echo "$as_me:11875: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11876 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11877                 ;;
11878         esac
11879 fi
11880
11881 fi
11882
11883 ###   use option --enable-ext-putwin to turn on extended screendumps
11884 echo "$as_me:11884: checking if you want to use extended putwin/screendump" >&5
11885 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11886
11887 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11888 if test "${enable_ext_putwin+set}" = set; then
11889   enableval="$enable_ext_putwin"
11890   with_ext_putwin=$enableval
11891 else
11892   with_ext_putwin=$cf_dft_ext_putwin
11893 fi;
11894 echo "$as_me:11894: result: $with_ext_putwin" >&5
11895 echo "${ECHO_T}$with_ext_putwin" >&6
11896 if test "x$with_ext_putwin" = xyes ; then
11897
11898 cat >>confdefs.h <<\EOF
11899 #define NCURSES_EXT_PUTWIN 1
11900 EOF
11901
11902 fi
11903
11904 echo "$as_me:11904: checking if you want \$NCURSES_NO_PADDING code" >&5
11905 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11906
11907 # Check whether --enable-no-padding or --disable-no-padding was given.
11908 if test "${enable_no_padding+set}" = set; then
11909   enableval="$enable_no_padding"
11910   with_no_padding=$enableval
11911 else
11912   with_no_padding=$with_ext_funcs
11913 fi;
11914 echo "$as_me:11914: result: $with_no_padding" >&5
11915 echo "${ECHO_T}$with_no_padding" >&6
11916 test "x$with_no_padding" = xyes &&
11917 cat >>confdefs.h <<\EOF
11918 #define NCURSES_NO_PADDING 1
11919 EOF
11920
11921 echo "$as_me:11921: checking for ANSI C header files" >&5
11922 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11923 if test "${ac_cv_header_stdc+set}" = set; then
11924   echo $ECHO_N "(cached) $ECHO_C" >&6
11925 else
11926   cat >conftest.$ac_ext <<_ACEOF
11927 #line 11927 "configure"
11928 #include "confdefs.h"
11929 #include <stdlib.h>
11930 #include <stdarg.h>
11931 #include <string.h>
11932 #include <float.h>
11933
11934 _ACEOF
11935 if { (eval echo "$as_me:11935: \"$ac_cpp conftest.$ac_ext\"") >&5
11936   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11937   ac_status=$?
11938   egrep -v '^ *\+' conftest.er1 >conftest.err
11939   rm -f conftest.er1
11940   cat conftest.err >&5
11941   echo "$as_me:11941: \$? = $ac_status" >&5
11942   (exit $ac_status); } >/dev/null; then
11943   if test -s conftest.err; then
11944     ac_cpp_err=$ac_c_preproc_warn_flag
11945   else
11946     ac_cpp_err=
11947   fi
11948 else
11949   ac_cpp_err=yes
11950 fi
11951 if test -z "$ac_cpp_err"; then
11952   ac_cv_header_stdc=yes
11953 else
11954   echo "$as_me: failed program was:" >&5
11955   cat conftest.$ac_ext >&5
11956   ac_cv_header_stdc=no
11957 fi
11958 rm -f conftest.err conftest.$ac_ext
11959
11960 if test $ac_cv_header_stdc = yes; then
11961   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11962   cat >conftest.$ac_ext <<_ACEOF
11963 #line 11963 "configure"
11964 #include "confdefs.h"
11965 #include <string.h>
11966
11967 _ACEOF
11968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11969   egrep "memchr" >/dev/null 2>&1; then
11970   :
11971 else
11972   ac_cv_header_stdc=no
11973 fi
11974 rm -rf conftest*
11975
11976 fi
11977
11978 if test $ac_cv_header_stdc = yes; then
11979   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11980   cat >conftest.$ac_ext <<_ACEOF
11981 #line 11981 "configure"
11982 #include "confdefs.h"
11983 #include <stdlib.h>
11984
11985 _ACEOF
11986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11987   egrep "free" >/dev/null 2>&1; then
11988   :
11989 else
11990   ac_cv_header_stdc=no
11991 fi
11992 rm -rf conftest*
11993
11994 fi
11995
11996 if test $ac_cv_header_stdc = yes; then
11997   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11998   if test "$cross_compiling" = yes; then
11999   :
12000 else
12001   cat >conftest.$ac_ext <<_ACEOF
12002 #line 12002 "configure"
12003 #include "confdefs.h"
12004 #include <ctype.h>
12005 #if ((' ' & 0x0FF) == 0x020)
12006 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12007 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12008 #else
12009 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12010                      || ('j' <= (c) && (c) <= 'r') \
12011                      || ('s' <= (c) && (c) <= 'z'))
12012 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12013 #endif
12014
12015 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12016 int
12017 main ()
12018 {
12019   int i;
12020   for (i = 0; i < 256; i++)
12021     if (XOR (islower (i), ISLOWER (i))
12022         || toupper (i) != TOUPPER (i))
12023       $ac_main_return(2);
12024   $ac_main_return (0);
12025 }
12026 _ACEOF
12027 rm -f conftest$ac_exeext
12028 if { (eval echo "$as_me:12028: \"$ac_link\"") >&5
12029   (eval $ac_link) 2>&5
12030   ac_status=$?
12031   echo "$as_me:12031: \$? = $ac_status" >&5
12032   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12033   { (eval echo "$as_me:12033: \"$ac_try\"") >&5
12034   (eval $ac_try) 2>&5
12035   ac_status=$?
12036   echo "$as_me:12036: \$? = $ac_status" >&5
12037   (exit $ac_status); }; }; then
12038   :
12039 else
12040   echo "$as_me: program exited with status $ac_status" >&5
12041 echo "$as_me: failed program was:" >&5
12042 cat conftest.$ac_ext >&5
12043 ac_cv_header_stdc=no
12044 fi
12045 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12046 fi
12047 fi
12048 fi
12049 echo "$as_me:12049: result: $ac_cv_header_stdc" >&5
12050 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12051 if test $ac_cv_header_stdc = yes; then
12052
12053 cat >>confdefs.h <<\EOF
12054 #define STDC_HEADERS 1
12055 EOF
12056
12057 fi
12058
12059 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12060
12061 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12062                   inttypes.h stdint.h unistd.h
12063 do
12064 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12065 echo "$as_me:12065: checking for $ac_header" >&5
12066 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12067 if eval "test \"\${$as_ac_Header+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 $ac_includes_default
12074 #include <$ac_header>
12075 _ACEOF
12076 rm -f conftest.$ac_objext
12077 if { (eval echo "$as_me:12077: \"$ac_compile\"") >&5
12078   (eval $ac_compile) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit $ac_status); } &&
12082          { ac_try='test -s conftest.$ac_objext'
12083   { (eval echo "$as_me:12083: \"$ac_try\"") >&5
12084   (eval $ac_try) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit $ac_status); }; }; then
12088   eval "$as_ac_Header=yes"
12089 else
12090   echo "$as_me: failed program was:" >&5
12091 cat conftest.$ac_ext >&5
12092 eval "$as_ac_Header=no"
12093 fi
12094 rm -f conftest.$ac_objext conftest.$ac_ext
12095 fi
12096 echo "$as_me:12096: result: `eval echo '${'$as_ac_Header'}'`" >&5
12097 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12098 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12099   cat >>confdefs.h <<EOF
12100 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12101 EOF
12102
12103 fi
12104 done
12105
12106 echo "$as_me:12106: checking for signed char" >&5
12107 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12108 if test "${ac_cv_type_signed_char+set}" = set; then
12109   echo $ECHO_N "(cached) $ECHO_C" >&6
12110 else
12111   cat >conftest.$ac_ext <<_ACEOF
12112 #line 12112 "configure"
12113 #include "confdefs.h"
12114 $ac_includes_default
12115 int
12116 main ()
12117 {
12118 if ((signed char *) 0)
12119   return 0;
12120 if (sizeof (signed char))
12121   return 0;
12122   ;
12123   return 0;
12124 }
12125 _ACEOF
12126 rm -f conftest.$ac_objext
12127 if { (eval echo "$as_me:12127: \"$ac_compile\"") >&5
12128   (eval $ac_compile) 2>&5
12129   ac_status=$?
12130   echo "$as_me:12130: \$? = $ac_status" >&5
12131   (exit $ac_status); } &&
12132          { ac_try='test -s conftest.$ac_objext'
12133   { (eval echo "$as_me:12133: \"$ac_try\"") >&5
12134   (eval $ac_try) 2>&5
12135   ac_status=$?
12136   echo "$as_me:12136: \$? = $ac_status" >&5
12137   (exit $ac_status); }; }; then
12138   ac_cv_type_signed_char=yes
12139 else
12140   echo "$as_me: failed program was:" >&5
12141 cat conftest.$ac_ext >&5
12142 ac_cv_type_signed_char=no
12143 fi
12144 rm -f conftest.$ac_objext conftest.$ac_ext
12145 fi
12146 echo "$as_me:12146: result: $ac_cv_type_signed_char" >&5
12147 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12148
12149 echo "$as_me:12149: checking size of signed char" >&5
12150 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12151 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12152   echo $ECHO_N "(cached) $ECHO_C" >&6
12153 else
12154   if test "$ac_cv_type_signed_char" = yes; then
12155   if test "$cross_compiling" = yes; then
12156   # Depending upon the size, compute the lo and hi bounds.
12157 cat >conftest.$ac_ext <<_ACEOF
12158 #line 12158 "configure"
12159 #include "confdefs.h"
12160 $ac_includes_default
12161 int
12162 main ()
12163 {
12164 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12165   ;
12166   return 0;
12167 }
12168 _ACEOF
12169 rm -f conftest.$ac_objext
12170 if { (eval echo "$as_me:12170: \"$ac_compile\"") >&5
12171   (eval $ac_compile) 2>&5
12172   ac_status=$?
12173   echo "$as_me:12173: \$? = $ac_status" >&5
12174   (exit $ac_status); } &&
12175          { ac_try='test -s conftest.$ac_objext'
12176   { (eval echo "$as_me:12176: \"$ac_try\"") >&5
12177   (eval $ac_try) 2>&5
12178   ac_status=$?
12179   echo "$as_me:12179: \$? = $ac_status" >&5
12180   (exit $ac_status); }; }; then
12181   ac_lo=0 ac_mid=0
12182   while :; do
12183     cat >conftest.$ac_ext <<_ACEOF
12184 #line 12184 "configure"
12185 #include "confdefs.h"
12186 $ac_includes_default
12187 int
12188 main ()
12189 {
12190 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12191   ;
12192   return 0;
12193 }
12194 _ACEOF
12195 rm -f conftest.$ac_objext
12196 if { (eval echo "$as_me:12196: \"$ac_compile\"") >&5
12197   (eval $ac_compile) 2>&5
12198   ac_status=$?
12199   echo "$as_me:12199: \$? = $ac_status" >&5
12200   (exit $ac_status); } &&
12201          { ac_try='test -s conftest.$ac_objext'
12202   { (eval echo "$as_me:12202: \"$ac_try\"") >&5
12203   (eval $ac_try) 2>&5
12204   ac_status=$?
12205   echo "$as_me:12205: \$? = $ac_status" >&5
12206   (exit $ac_status); }; }; then
12207   ac_hi=$ac_mid; break
12208 else
12209   echo "$as_me: failed program was:" >&5
12210 cat conftest.$ac_ext >&5
12211 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12212 fi
12213 rm -f conftest.$ac_objext conftest.$ac_ext
12214   done
12215 else
12216   echo "$as_me: failed program was:" >&5
12217 cat conftest.$ac_ext >&5
12218 ac_hi=-1 ac_mid=-1
12219   while :; do
12220     cat >conftest.$ac_ext <<_ACEOF
12221 #line 12221 "configure"
12222 #include "confdefs.h"
12223 $ac_includes_default
12224 int
12225 main ()
12226 {
12227 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12228   ;
12229   return 0;
12230 }
12231 _ACEOF
12232 rm -f conftest.$ac_objext
12233 if { (eval echo "$as_me:12233: \"$ac_compile\"") >&5
12234   (eval $ac_compile) 2>&5
12235   ac_status=$?
12236   echo "$as_me:12236: \$? = $ac_status" >&5
12237   (exit $ac_status); } &&
12238          { ac_try='test -s conftest.$ac_objext'
12239   { (eval echo "$as_me:12239: \"$ac_try\"") >&5
12240   (eval $ac_try) 2>&5
12241   ac_status=$?
12242   echo "$as_me:12242: \$? = $ac_status" >&5
12243   (exit $ac_status); }; }; then
12244   ac_lo=$ac_mid; break
12245 else
12246   echo "$as_me: failed program was:" >&5
12247 cat conftest.$ac_ext >&5
12248 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12249 fi
12250 rm -f conftest.$ac_objext conftest.$ac_ext
12251   done
12252 fi
12253 rm -f conftest.$ac_objext conftest.$ac_ext
12254 # Binary search between lo and hi bounds.
12255 while test "x$ac_lo" != "x$ac_hi"; do
12256   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12257   cat >conftest.$ac_ext <<_ACEOF
12258 #line 12258 "configure"
12259 #include "confdefs.h"
12260 $ac_includes_default
12261 int
12262 main ()
12263 {
12264 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12265   ;
12266   return 0;
12267 }
12268 _ACEOF
12269 rm -f conftest.$ac_objext
12270 if { (eval echo "$as_me:12270: \"$ac_compile\"") >&5
12271   (eval $ac_compile) 2>&5
12272   ac_status=$?
12273   echo "$as_me:12273: \$? = $ac_status" >&5
12274   (exit $ac_status); } &&
12275          { ac_try='test -s conftest.$ac_objext'
12276   { (eval echo "$as_me:12276: \"$ac_try\"") >&5
12277   (eval $ac_try) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit $ac_status); }; }; then
12281   ac_hi=$ac_mid
12282 else
12283   echo "$as_me: failed program was:" >&5
12284 cat conftest.$ac_ext >&5
12285 ac_lo=`expr $ac_mid + 1`
12286 fi
12287 rm -f conftest.$ac_objext conftest.$ac_ext
12288 done
12289 ac_cv_sizeof_signed_char=$ac_lo
12290 else
12291   if test "$cross_compiling" = yes; then
12292   { { echo "$as_me:12292: error: cannot run test program while cross compiling" >&5
12293 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12294    { (exit 1); exit 1; }; }
12295 else
12296   cat >conftest.$ac_ext <<_ACEOF
12297 #line 12297 "configure"
12298 #include "confdefs.h"
12299 $ac_includes_default
12300 int
12301 main ()
12302 {
12303 FILE *f = fopen ("conftest.val", "w");
12304 if (!f)
12305   $ac_main_return (1);
12306 fprintf (f, "%d", (sizeof (signed char)));
12307 fclose (f);
12308   ;
12309   return 0;
12310 }
12311 _ACEOF
12312 rm -f conftest$ac_exeext
12313 if { (eval echo "$as_me:12313: \"$ac_link\"") >&5
12314   (eval $ac_link) 2>&5
12315   ac_status=$?
12316   echo "$as_me:12316: \$? = $ac_status" >&5
12317   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12318   { (eval echo "$as_me:12318: \"$ac_try\"") >&5
12319   (eval $ac_try) 2>&5
12320   ac_status=$?
12321   echo "$as_me:12321: \$? = $ac_status" >&5
12322   (exit $ac_status); }; }; then
12323   ac_cv_sizeof_signed_char=`cat conftest.val`
12324 else
12325   echo "$as_me: program exited with status $ac_status" >&5
12326 echo "$as_me: failed program was:" >&5
12327 cat conftest.$ac_ext >&5
12328 fi
12329 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12330 fi
12331 fi
12332 rm -f conftest.val
12333 else
12334   ac_cv_sizeof_signed_char=0
12335 fi
12336 fi
12337 echo "$as_me:12337: result: $ac_cv_sizeof_signed_char" >&5
12338 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12339 cat >>confdefs.h <<EOF
12340 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12341 EOF
12342
12343 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12344         NCURSES_SBOOL="signed char"
12345 else
12346         NCURSES_SBOOL="char"
12347 fi
12348 echo "$as_me:12348: checking if you want to use signed Boolean array in term.h" >&5
12349 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12350
12351 # Check whether --enable-signed-char or --disable-signed-char was given.
12352 if test "${enable_signed_char+set}" = set; then
12353   enableval="$enable_signed_char"
12354   with_signed_char=$enableval
12355 else
12356   with_signed_char=no
12357 fi;
12358 echo "$as_me:12358: result: $with_signed_char" >&5
12359 echo "${ECHO_T}$with_signed_char" >&6
12360 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12361
12362 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12363 echo "$as_me:12363: checking if you want SIGWINCH handler" >&5
12364 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12365
12366 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12367 if test "${enable_sigwinch+set}" = set; then
12368   enableval="$enable_sigwinch"
12369   with_sigwinch=$enableval
12370 else
12371   with_sigwinch=$with_ext_funcs
12372 fi;
12373 echo "$as_me:12373: result: $with_sigwinch" >&5
12374 echo "${ECHO_T}$with_sigwinch" >&6
12375 test "x$with_sigwinch" = xyes &&
12376 cat >>confdefs.h <<\EOF
12377 #define USE_SIGWINCH 1
12378 EOF
12379
12380 ###   use option --enable-tcap-names to allow user to define new capabilities
12381 echo "$as_me:12381: checking if you want user-definable terminal capabilities like termcap" >&5
12382 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12383
12384 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12385 if test "${enable_tcap_names+set}" = set; then
12386   enableval="$enable_tcap_names"
12387   with_tcap_names=$enableval
12388 else
12389   with_tcap_names=$with_ext_funcs
12390 fi;
12391 echo "$as_me:12391: result: $with_tcap_names" >&5
12392 echo "${ECHO_T}$with_tcap_names" >&6
12393 NCURSES_XNAMES=0
12394 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12395
12396 ###############################################################################
12397 # These options are relatively safe to experiment with.
12398
12399 echo "$as_me:12399: checking if you want all development code" >&5
12400 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12401
12402 # Check whether --with-develop or --without-develop was given.
12403 if test "${with_develop+set}" = set; then
12404   withval="$with_develop"
12405   with_develop=$withval
12406 else
12407   with_develop=no
12408 fi;
12409 echo "$as_me:12409: result: $with_develop" >&5
12410 echo "${ECHO_T}$with_develop" >&6
12411
12412 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12413 echo "$as_me:12413: checking if you want hard-tabs code" >&5
12414 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12415
12416 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12417 if test "${enable_hard_tabs+set}" = set; then
12418   enableval="$enable_hard_tabs"
12419
12420 else
12421   enable_hard_tabs=$with_develop
12422 fi;
12423 echo "$as_me:12423: result: $enable_hard_tabs" >&5
12424 echo "${ECHO_T}$enable_hard_tabs" >&6
12425 test "x$enable_hard_tabs" = xyes &&
12426 cat >>confdefs.h <<\EOF
12427 #define USE_HARD_TABS 1
12428 EOF
12429
12430 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12431 echo "$as_me:12431: checking if you want limited support for xmc" >&5
12432 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12433
12434 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12435 if test "${enable_xmc_glitch+set}" = set; then
12436   enableval="$enable_xmc_glitch"
12437
12438 else
12439   enable_xmc_glitch=$with_develop
12440 fi;
12441 echo "$as_me:12441: result: $enable_xmc_glitch" >&5
12442 echo "${ECHO_T}$enable_xmc_glitch" >&6
12443 test "x$enable_xmc_glitch" = xyes &&
12444 cat >>confdefs.h <<\EOF
12445 #define USE_XMC_SUPPORT 1
12446 EOF
12447
12448 ###############################################################################
12449 # These are just experimental, probably should not be in a package:
12450
12451 echo "$as_me:12451: checking if you do not want to assume colors are white-on-black" >&5
12452 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12453
12454 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12455 if test "${enable_assumed_color+set}" = set; then
12456   enableval="$enable_assumed_color"
12457   with_assumed_color=$enableval
12458 else
12459   with_assumed_color=yes
12460 fi;
12461 echo "$as_me:12461: result: $with_assumed_color" >&5
12462 echo "${ECHO_T}$with_assumed_color" >&6
12463 test "x$with_assumed_color" = xyes &&
12464 cat >>confdefs.h <<\EOF
12465 #define USE_ASSUMED_COLOR 1
12466 EOF
12467
12468 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12469 echo "$as_me:12469: checking if you want hashmap scrolling-optimization code" >&5
12470 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12471
12472 # Check whether --enable-hashmap or --disable-hashmap was given.
12473 if test "${enable_hashmap+set}" = set; then
12474   enableval="$enable_hashmap"
12475   with_hashmap=$enableval
12476 else
12477   with_hashmap=yes
12478 fi;
12479 echo "$as_me:12479: result: $with_hashmap" >&5
12480 echo "${ECHO_T}$with_hashmap" >&6
12481 test "x$with_hashmap" = xyes &&
12482 cat >>confdefs.h <<\EOF
12483 #define USE_HASHMAP 1
12484 EOF
12485
12486 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12487 echo "$as_me:12487: checking if you want colorfgbg code" >&5
12488 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12489
12490 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12491 if test "${enable_colorfgbg+set}" = set; then
12492   enableval="$enable_colorfgbg"
12493   with_colorfgbg=$enableval
12494 else
12495   with_colorfgbg=no
12496 fi;
12497 echo "$as_me:12497: result: $with_colorfgbg" >&5
12498 echo "${ECHO_T}$with_colorfgbg" >&6
12499 test "x$with_colorfgbg" = xyes &&
12500 cat >>confdefs.h <<\EOF
12501 #define USE_COLORFGBG 1
12502 EOF
12503
12504 ###   use option --enable-interop to turn on use of bindings used for interop
12505 echo "$as_me:12505: checking if you want interop bindings" >&5
12506 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12507
12508 # Check whether --enable-interop or --disable-interop was given.
12509 if test "${enable_interop+set}" = set; then
12510   enableval="$enable_interop"
12511   with_exp_interop=$enableval
12512 else
12513   with_exp_interop=$cf_dft_interop
12514 fi;
12515 echo "$as_me:12515: result: $with_exp_interop" >&5
12516 echo "${ECHO_T}$with_exp_interop" >&6
12517
12518 NCURSES_INTEROP_FUNCS=0
12519 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12520
12521 # This is still experimental (20080329), but should ultimately be moved to
12522 # the script-block --with-normal, etc.
12523
12524 echo "$as_me:12524: checking if you want to link with the pthread library" >&5
12525 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12526
12527 # Check whether --with-pthread or --without-pthread was given.
12528 if test "${with_pthread+set}" = set; then
12529   withval="$with_pthread"
12530   with_pthread=$withval
12531 else
12532   with_pthread=no
12533 fi;
12534 echo "$as_me:12534: result: $with_pthread" >&5
12535 echo "${ECHO_T}$with_pthread" >&6
12536
12537 if test "$with_pthread" != no ; then
12538         echo "$as_me:12538: checking for pthread.h" >&5
12539 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12540 if test "${ac_cv_header_pthread_h+set}" = set; then
12541   echo $ECHO_N "(cached) $ECHO_C" >&6
12542 else
12543   cat >conftest.$ac_ext <<_ACEOF
12544 #line 12544 "configure"
12545 #include "confdefs.h"
12546 #include <pthread.h>
12547 _ACEOF
12548 if { (eval echo "$as_me:12548: \"$ac_cpp conftest.$ac_ext\"") >&5
12549   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12550   ac_status=$?
12551   egrep -v '^ *\+' conftest.er1 >conftest.err
12552   rm -f conftest.er1
12553   cat conftest.err >&5
12554   echo "$as_me:12554: \$? = $ac_status" >&5
12555   (exit $ac_status); } >/dev/null; then
12556   if test -s conftest.err; then
12557     ac_cpp_err=$ac_c_preproc_warn_flag
12558   else
12559     ac_cpp_err=
12560   fi
12561 else
12562   ac_cpp_err=yes
12563 fi
12564 if test -z "$ac_cpp_err"; then
12565   ac_cv_header_pthread_h=yes
12566 else
12567   echo "$as_me: failed program was:" >&5
12568   cat conftest.$ac_ext >&5
12569   ac_cv_header_pthread_h=no
12570 fi
12571 rm -f conftest.err conftest.$ac_ext
12572 fi
12573 echo "$as_me:12573: result: $ac_cv_header_pthread_h" >&5
12574 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12575 if test $ac_cv_header_pthread_h = yes; then
12576
12577 cat >>confdefs.h <<\EOF
12578 #define HAVE_PTHREADS_H 1
12579 EOF
12580
12581         for cf_lib_pthread in pthread c_r
12582         do
12583             echo "$as_me:12583: checking if we can link with the $cf_lib_pthread library" >&5
12584 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12585             cf_save_LIBS="$LIBS"
12586
12587 cf_add_libs="-l$cf_lib_pthread"
12588 # Filter out duplicates - this happens with badly-designed ".pc" files...
12589 for cf_add_1lib in $LIBS
12590 do
12591         for cf_add_2lib in $cf_add_libs
12592         do
12593                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12594                 then
12595                         cf_add_1lib=
12596                         break
12597                 fi
12598         done
12599         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12600 done
12601 LIBS="$cf_add_libs"
12602
12603             cat >conftest.$ac_ext <<_ACEOF
12604 #line 12604 "configure"
12605 #include "confdefs.h"
12606
12607 #include <pthread.h>
12608
12609 int
12610 main ()
12611 {
12612
12613                 int rc = pthread_create(0,0,0,0);
12614                 int r2 = pthread_mutexattr_settype(0, 0);
12615
12616   ;
12617   return 0;
12618 }
12619 _ACEOF
12620 rm -f conftest.$ac_objext conftest$ac_exeext
12621 if { (eval echo "$as_me:12621: \"$ac_link\"") >&5
12622   (eval $ac_link) 2>&5
12623   ac_status=$?
12624   echo "$as_me:12624: \$? = $ac_status" >&5
12625   (exit $ac_status); } &&
12626          { ac_try='test -s conftest$ac_exeext'
12627   { (eval echo "$as_me:12627: \"$ac_try\"") >&5
12628   (eval $ac_try) 2>&5
12629   ac_status=$?
12630   echo "$as_me:12630: \$? = $ac_status" >&5
12631   (exit $ac_status); }; }; then
12632   with_pthread=yes
12633 else
12634   echo "$as_me: failed program was:" >&5
12635 cat conftest.$ac_ext >&5
12636 with_pthread=no
12637 fi
12638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12639             LIBS="$cf_save_LIBS"
12640             echo "$as_me:12640: result: $with_pthread" >&5
12641 echo "${ECHO_T}$with_pthread" >&6
12642             test "$with_pthread" = yes && break
12643         done
12644
12645         if test "$with_pthread" = yes ; then
12646
12647 cf_add_libs="-l$cf_lib_pthread"
12648 # Filter out duplicates - this happens with badly-designed ".pc" files...
12649 for cf_add_1lib in $LIBS
12650 do
12651         for cf_add_2lib in $cf_add_libs
12652         do
12653                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12654                 then
12655                         cf_add_1lib=
12656                         break
12657                 fi
12658         done
12659         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12660 done
12661 LIBS="$cf_add_libs"
12662
12663 cat >>confdefs.h <<\EOF
12664 #define HAVE_LIBPTHREADS 1
12665 EOF
12666
12667         else
12668             { { echo "$as_me:12668: error: Cannot link with pthread library" >&5
12669 echo "$as_me: error: Cannot link with pthread library" >&2;}
12670    { (exit 1); exit 1; }; }
12671         fi
12672
12673 fi
12674
12675 fi
12676
12677 if test "x$with_pthread" != xno; then
12678         echo "$as_me:12678: checking for pthread_kill" >&5
12679 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12680 if test "${ac_cv_func_pthread_kill+set}" = set; then
12681   echo $ECHO_N "(cached) $ECHO_C" >&6
12682 else
12683   cat >conftest.$ac_ext <<_ACEOF
12684 #line 12684 "configure"
12685 #include "confdefs.h"
12686 /* System header to define __stub macros and hopefully few prototypes,
12687     which can conflict with char pthread_kill (); below.  */
12688 #include <assert.h>
12689 /* Override any gcc2 internal prototype to avoid an error.  */
12690 #ifdef __cplusplus
12691 extern "C"
12692 #endif
12693 /* We use char because int might match the return type of a gcc2
12694    builtin and then its argument prototype would still apply.  */
12695 char pthread_kill ();
12696 char (*f) ();
12697
12698 int
12699 main ()
12700 {
12701 /* The GNU C library defines this for functions which it implements
12702     to always fail with ENOSYS.  Some functions are actually named
12703     something starting with __ and the normal name is an alias.  */
12704 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12705 choke me
12706 #else
12707 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12708 #endif
12709
12710   ;
12711   return 0;
12712 }
12713 _ACEOF
12714 rm -f conftest.$ac_objext conftest$ac_exeext
12715 if { (eval echo "$as_me:12715: \"$ac_link\"") >&5
12716   (eval $ac_link) 2>&5
12717   ac_status=$?
12718   echo "$as_me:12718: \$? = $ac_status" >&5
12719   (exit $ac_status); } &&
12720          { ac_try='test -s conftest$ac_exeext'
12721   { (eval echo "$as_me:12721: \"$ac_try\"") >&5
12722   (eval $ac_try) 2>&5
12723   ac_status=$?
12724   echo "$as_me:12724: \$? = $ac_status" >&5
12725   (exit $ac_status); }; }; then
12726   ac_cv_func_pthread_kill=yes
12727 else
12728   echo "$as_me: failed program was:" >&5
12729 cat conftest.$ac_ext >&5
12730 ac_cv_func_pthread_kill=no
12731 fi
12732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12733 fi
12734 echo "$as_me:12734: result: $ac_cv_func_pthread_kill" >&5
12735 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12736 if test $ac_cv_func_pthread_kill = yes; then
12737
12738                 echo "$as_me:12738: checking if you want to allow EINTR in wgetch with pthreads" >&5
12739 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12740
12741 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12742 if test "${enable_pthreads_eintr+set}" = set; then
12743   enableval="$enable_pthreads_eintr"
12744   use_pthreads_eintr=$enableval
12745 else
12746   use_pthreads_eintr=no
12747 fi;
12748                 echo "$as_me:12748: result: $use_pthreads_eintr" >&5
12749 echo "${ECHO_T}$use_pthreads_eintr" >&6
12750                 if test "x$use_pthreads_eintr" = xyes ; then
12751
12752 cat >>confdefs.h <<\EOF
12753 #define USE_PTHREADS_EINTR 1
12754 EOF
12755
12756                 fi
12757 fi
12758
12759         echo "$as_me:12759: checking if you want to use weak-symbols for pthreads" >&5
12760 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12761
12762 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12763 if test "${enable_weak_symbols+set}" = set; then
12764   enableval="$enable_weak_symbols"
12765   use_weak_symbols=$enableval
12766 else
12767   use_weak_symbols=no
12768 fi;
12769         echo "$as_me:12769: result: $use_weak_symbols" >&5
12770 echo "${ECHO_T}$use_weak_symbols" >&6
12771         if test "x$use_weak_symbols" = xyes ; then
12772
12773 echo "$as_me:12773: checking if $CC supports weak symbols" >&5
12774 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12775 if test "${cf_cv_weak_symbols+set}" = set; then
12776   echo $ECHO_N "(cached) $ECHO_C" >&6
12777 else
12778
12779 cat >conftest.$ac_ext <<_ACEOF
12780 #line 12780 "configure"
12781 #include "confdefs.h"
12782
12783 #include <stdio.h>
12784 int
12785 main ()
12786 {
12787
12788 #if defined(__GNUC__)
12789 #  if defined __USE_ISOC99
12790 #    define _cat_pragma(exp)    _Pragma(#exp)
12791 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12792 #  else
12793 #    define _weak_pragma(exp)
12794 #  endif
12795 #  define _declare(name)        __extension__ extern __typeof__(name) name
12796 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12797 #endif
12798
12799 weak_symbol(fopen);
12800
12801   ;
12802   return 0;
12803 }
12804 _ACEOF
12805 rm -f conftest.$ac_objext
12806 if { (eval echo "$as_me:12806: \"$ac_compile\"") >&5
12807   (eval $ac_compile) 2>&5
12808   ac_status=$?
12809   echo "$as_me:12809: \$? = $ac_status" >&5
12810   (exit $ac_status); } &&
12811          { ac_try='test -s conftest.$ac_objext'
12812   { (eval echo "$as_me:12812: \"$ac_try\"") >&5
12813   (eval $ac_try) 2>&5
12814   ac_status=$?
12815   echo "$as_me:12815: \$? = $ac_status" >&5
12816   (exit $ac_status); }; }; then
12817   cf_cv_weak_symbols=yes
12818 else
12819   echo "$as_me: failed program was:" >&5
12820 cat conftest.$ac_ext >&5
12821 cf_cv_weak_symbols=no
12822 fi
12823 rm -f conftest.$ac_objext conftest.$ac_ext
12824
12825 fi
12826 echo "$as_me:12826: result: $cf_cv_weak_symbols" >&5
12827 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12828
12829         else
12830                 cf_cv_weak_symbols=no
12831         fi
12832
12833         if test "x$cf_cv_weak_symbols" = xyes ; then
12834
12835 cat >>confdefs.h <<\EOF
12836 #define USE_WEAK_SYMBOLS 1
12837 EOF
12838
12839         fi
12840 fi
12841
12842 PTHREAD=
12843 if test "x$with_pthread" = "xyes" ; then
12844
12845 cat >>confdefs.h <<\EOF
12846 #define USE_PTHREADS 1
12847 EOF
12848
12849         enable_reentrant=yes
12850         if test "x$cf_cv_weak_symbols" = xyes ; then
12851                 PTHREAD=-lpthread
12852         fi
12853 fi
12854
12855 # Reentrant code has to be opaque; there's little advantage to making ncurses
12856 # opaque outside of that, so there is no --enable-opaque option.  We can use
12857 # this option without --with-pthreads, but this will be always set for
12858 # pthreads.
12859 echo "$as_me:12859: checking if you want reentrant code" >&5
12860 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12861
12862 # Check whether --enable-reentrant or --disable-reentrant was given.
12863 if test "${enable_reentrant+set}" = set; then
12864   enableval="$enable_reentrant"
12865   with_reentrant=$enableval
12866 else
12867   with_reentrant=no
12868 fi;
12869 echo "$as_me:12869: result: $with_reentrant" >&5
12870 echo "${ECHO_T}$with_reentrant" >&6
12871 if test "x$with_reentrant" = xyes ; then
12872         cf_cv_enable_reentrant=1
12873         cf_cv_enable_opaque="NCURSES_INTERNALS"
12874         NCURSES_OPAQUE=1
12875         NCURSES_SIZE_T=int
12876         if test "x$cf_cv_weak_symbols" = xyes ; then
12877
12878 # remove pthread library from $LIBS
12879 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12880
12881 cf_add_libs="-lpthread"
12882 # Filter out duplicates - this happens with badly-designed ".pc" files...
12883 for cf_add_1lib in $TEST_LIBS
12884 do
12885         for cf_add_2lib in $cf_add_libs
12886         do
12887                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12888                 then
12889                         cf_add_1lib=
12890                         break
12891                 fi
12892         done
12893         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12894 done
12895 TEST_LIBS="$cf_add_libs"
12896
12897 cf_add_libs="-lpthread"
12898 # Filter out duplicates - this happens with badly-designed ".pc" files...
12899 for cf_add_1lib in $TEST_LIBS2
12900 do
12901         for cf_add_2lib in $cf_add_libs
12902         do
12903                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12904                 then
12905                         cf_add_1lib=
12906                         break
12907                 fi
12908         done
12909         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12910 done
12911 TEST_LIBS2="$cf_add_libs"
12912
12913         else
12914                 # when not using weak symbols but with_reentrant,
12915                 # add 't' to the library suffix on all platforms
12916                 # except cygwin, where we only do that if ALSO
12917                 # compiling with full thread support.
12918                 case "$host" in
12919                 (*cygwin* | *msys*)
12920                         if test "$with_pthread" = "yes" ; then
12921                                 if test "x$disable_lib_suffixes" = "xno" ; then
12922                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12923                                 fi
12924                         fi ;;
12925                 (*)
12926                         if test "x$disable_lib_suffixes" = "xno" ; then
12927                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12928                         fi
12929                         ;;
12930                 esac
12931         fi
12932
12933 cat >>confdefs.h <<\EOF
12934 #define USE_REENTRANT 1
12935 EOF
12936
12937 if test "${with_abi_version+set}" != set; then
12938         case $cf_cv_rel_version in
12939         (5.*)
12940                 cf_cv_rel_version=6.0
12941                 cf_cv_abi_version=6
12942                 { echo "$as_me:12942: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12943 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12944                 ;;
12945         esac
12946 fi
12947
12948 else
12949         cf_cv_enable_reentrant=0
12950         cf_cv_enable_opaque="NCURSES_OPAQUE"
12951         NCURSES_OPAQUE=0
12952         NCURSES_SIZE_T=short
12953 fi
12954
12955 ### Allow using a different wrap-prefix
12956 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12957         echo "$as_me:12957: checking for prefix used to wrap public variables" >&5
12958 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12959
12960 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12961 if test "${with_wrap_prefix+set}" = set; then
12962   withval="$with_wrap_prefix"
12963   NCURSES_WRAP_PREFIX=$withval
12964 else
12965   NCURSES_WRAP_PREFIX=_nc_
12966 fi;
12967         echo "$as_me:12967: result: $NCURSES_WRAP_PREFIX" >&5
12968 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12969 else
12970         NCURSES_WRAP_PREFIX=_nc_
12971 fi
12972
12973 cat >>confdefs.h <<EOF
12974 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12975 EOF
12976
12977 echo "$as_me:12977: checking if you want experimental safe-sprintf code" >&5
12978 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12979
12980 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12981 if test "${enable_safe_sprintf+set}" = set; then
12982   enableval="$enable_safe_sprintf"
12983   with_safe_sprintf=$enableval
12984 else
12985   with_safe_sprintf=no
12986 fi;
12987 echo "$as_me:12987: result: $with_safe_sprintf" >&5
12988 echo "${ECHO_T}$with_safe_sprintf" >&6
12989 test "x$with_safe_sprintf" = xyes &&
12990 cat >>confdefs.h <<\EOF
12991 #define USE_SAFE_SPRINTF 1
12992 EOF
12993
12994 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12995 # when hashmap is used scroll hints are useless
12996 if test "$with_hashmap" = no ; then
12997 echo "$as_me:12997: checking if you want to experiment without scrolling-hints code" >&5
12998 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12999
13000 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13001 if test "${enable_scroll_hints+set}" = set; then
13002   enableval="$enable_scroll_hints"
13003   with_scroll_hints=$enableval
13004 else
13005   with_scroll_hints=yes
13006 fi;
13007 echo "$as_me:13007: result: $with_scroll_hints" >&5
13008 echo "${ECHO_T}$with_scroll_hints" >&6
13009 test "x$with_scroll_hints" = xyes &&
13010 cat >>confdefs.h <<\EOF
13011 #define USE_SCROLL_HINTS 1
13012 EOF
13013
13014 fi
13015
13016 echo "$as_me:13016: checking if you want wgetch-events code" >&5
13017 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13018
13019 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13020 if test "${enable_wgetch_events+set}" = set; then
13021   enableval="$enable_wgetch_events"
13022   with_wgetch_events=$enableval
13023 else
13024   with_wgetch_events=no
13025 fi;
13026 echo "$as_me:13026: result: $with_wgetch_events" >&5
13027 echo "${ECHO_T}$with_wgetch_events" >&6
13028 test "x$with_wgetch_events" = xyes &&
13029 cat >>confdefs.h <<\EOF
13030 #define NCURSES_WGETCH_EVENTS 1
13031 EOF
13032
13033 ###############################################################################
13034
13035 ###     use option --disable-echo to suppress full display compiling commands
13036
13037 echo "$as_me:13037: checking if you want to see long compiling messages" >&5
13038 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13039
13040 # Check whether --enable-echo or --disable-echo was given.
13041 if test "${enable_echo+set}" = set; then
13042   enableval="$enable_echo"
13043   test "$enableval" != no && enableval=yes
13044         if test "$enableval" != "yes" ; then
13045
13046         ECHO_LT='--silent'
13047         ECHO_LD='@echo linking $@;'
13048         RULE_CC='@echo compiling $<'
13049         SHOW_CC='@echo compiling $@'
13050         ECHO_CC='@'
13051
13052         else
13053
13054         ECHO_LT=''
13055         ECHO_LD=''
13056         RULE_CC=''
13057         SHOW_CC=''
13058         ECHO_CC=''
13059
13060         fi
13061 else
13062   enableval=yes
13063
13064         ECHO_LT=''
13065         ECHO_LD=''
13066         RULE_CC=''
13067         SHOW_CC=''
13068         ECHO_CC=''
13069
13070 fi;
13071 echo "$as_me:13071: result: $enableval" >&5
13072 echo "${ECHO_T}$enableval" >&6
13073
13074 if test "x$enable_echo" = xyes; then
13075         ECHO_LINK=
13076 else
13077         ECHO_LINK='@ echo linking $@ ... ;'
13078         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13079         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13080 fi
13081
13082 ###     use option --enable-warnings to turn on all gcc warnings
13083 echo "$as_me:13083: checking if you want to see compiler warnings" >&5
13084 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13085
13086 # Check whether --enable-warnings or --disable-warnings was given.
13087 if test "${enable_warnings+set}" = set; then
13088   enableval="$enable_warnings"
13089   with_warnings=$enableval
13090 fi;
13091 echo "$as_me:13091: result: $with_warnings" >&5
13092 echo "${ECHO_T}$with_warnings" >&6
13093
13094 if test "x$with_warnings" = "xyes"; then
13095
13096         ADAFLAGS="$ADAFLAGS -gnatg"
13097
13098 INTEL_COMPILER=no
13099
13100 if test "$GCC" = yes ; then
13101         case $host_os in
13102         (linux*|gnu*)
13103                 echo "$as_me:13103: checking if this is really Intel C compiler" >&5
13104 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13105                 cf_save_CFLAGS="$CFLAGS"
13106                 CFLAGS="$CFLAGS -no-gcc"
13107                 cat >conftest.$ac_ext <<_ACEOF
13108 #line 13108 "configure"
13109 #include "confdefs.h"
13110
13111 int
13112 main ()
13113 {
13114
13115 #ifdef __INTEL_COMPILER
13116 #else
13117 make an error
13118 #endif
13119
13120   ;
13121   return 0;
13122 }
13123 _ACEOF
13124 rm -f conftest.$ac_objext
13125 if { (eval echo "$as_me:13125: \"$ac_compile\"") >&5
13126   (eval $ac_compile) 2>&5
13127   ac_status=$?
13128   echo "$as_me:13128: \$? = $ac_status" >&5
13129   (exit $ac_status); } &&
13130          { ac_try='test -s conftest.$ac_objext'
13131   { (eval echo "$as_me:13131: \"$ac_try\"") >&5
13132   (eval $ac_try) 2>&5
13133   ac_status=$?
13134   echo "$as_me:13134: \$? = $ac_status" >&5
13135   (exit $ac_status); }; }; then
13136   INTEL_COMPILER=yes
13137 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13138
13139 else
13140   echo "$as_me: failed program was:" >&5
13141 cat conftest.$ac_ext >&5
13142 fi
13143 rm -f conftest.$ac_objext conftest.$ac_ext
13144                 CFLAGS="$cf_save_CFLAGS"
13145                 echo "$as_me:13145: result: $INTEL_COMPILER" >&5
13146 echo "${ECHO_T}$INTEL_COMPILER" >&6
13147                 ;;
13148         esac
13149 fi
13150
13151 CLANG_COMPILER=no
13152
13153 if test "$GCC" = yes ; then
13154         echo "$as_me:13154: checking if this is really Clang C compiler" >&5
13155 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13156         cf_save_CFLAGS="$CFLAGS"
13157         CFLAGS="$CFLAGS -Qunused-arguments"
13158         cat >conftest.$ac_ext <<_ACEOF
13159 #line 13159 "configure"
13160 #include "confdefs.h"
13161
13162 int
13163 main ()
13164 {
13165
13166 #ifdef __clang__
13167 #else
13168 make an error
13169 #endif
13170
13171   ;
13172   return 0;
13173 }
13174 _ACEOF
13175 rm -f conftest.$ac_objext
13176 if { (eval echo "$as_me:13176: \"$ac_compile\"") >&5
13177   (eval $ac_compile) 2>&5
13178   ac_status=$?
13179   echo "$as_me:13179: \$? = $ac_status" >&5
13180   (exit $ac_status); } &&
13181          { ac_try='test -s conftest.$ac_objext'
13182   { (eval echo "$as_me:13182: \"$ac_try\"") >&5
13183   (eval $ac_try) 2>&5
13184   ac_status=$?
13185   echo "$as_me:13185: \$? = $ac_status" >&5
13186   (exit $ac_status); }; }; then
13187   CLANG_COMPILER=yes
13188 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13189
13190 else
13191   echo "$as_me: failed program was:" >&5
13192 cat conftest.$ac_ext >&5
13193 fi
13194 rm -f conftest.$ac_objext conftest.$ac_ext
13195         CFLAGS="$cf_save_CFLAGS"
13196         echo "$as_me:13196: result: $CLANG_COMPILER" >&5
13197 echo "${ECHO_T}$CLANG_COMPILER" >&6
13198 fi
13199
13200 cat > conftest.$ac_ext <<EOF
13201 #line 13201 "${as_me:-configure}"
13202 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13203 EOF
13204
13205 if test "$INTEL_COMPILER" = yes
13206 then
13207 # The "-wdXXX" options suppress warnings:
13208 # remark #1419: external declaration in primary source file
13209 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13210 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13211 # remark #193: zero used for undefined preprocessing identifier
13212 # remark #593: variable "curs_sb_left_arrow" was set but never used
13213 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13214 # remark #869: parameter "tw" was never referenced
13215 # remark #981: operands are evaluated in unspecified order
13216 # warning #279: controlling expression is constant
13217
13218         { echo "$as_me:13218: checking for $CC warning options..." >&5
13219 echo "$as_me: checking for $CC warning options..." >&6;}
13220         cf_save_CFLAGS="$CFLAGS"
13221         EXTRA_CFLAGS="-Wall"
13222         for cf_opt in \
13223                 wd1419 \
13224                 wd1683 \
13225                 wd1684 \
13226                 wd193 \
13227                 wd593 \
13228                 wd279 \
13229                 wd810 \
13230                 wd869 \
13231                 wd981
13232         do
13233                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13234                 if { (eval echo "$as_me:13234: \"$ac_compile\"") >&5
13235   (eval $ac_compile) 2>&5
13236   ac_status=$?
13237   echo "$as_me:13237: \$? = $ac_status" >&5
13238   (exit $ac_status); }; then
13239                         test -n "$verbose" && echo "$as_me:13239: result: ... -$cf_opt" >&5
13240 echo "${ECHO_T}... -$cf_opt" >&6
13241                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13242                 fi
13243         done
13244         CFLAGS="$cf_save_CFLAGS"
13245
13246 elif test "$GCC" = yes
13247 then
13248         { echo "$as_me:13248: checking for $CC warning options..." >&5
13249 echo "$as_me: checking for $CC warning options..." >&6;}
13250         cf_save_CFLAGS="$CFLAGS"
13251         EXTRA_CFLAGS=
13252         cf_warn_CONST=""
13253         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13254         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13255         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13256         for cf_opt in W Wall \
13257                 Wbad-function-cast \
13258                 Wcast-align \
13259                 Wcast-qual \
13260                 Wdeclaration-after-statement \
13261                 Wextra \
13262                 Winline \
13263                 Wmissing-declarations \
13264                 Wmissing-prototypes \
13265                 Wnested-externs \
13266                 Wpointer-arith \
13267                 Wshadow \
13268                 Wstrict-prototypes \
13269                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13270         do
13271                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13272                 if { (eval echo "$as_me:13272: \"$ac_compile\"") >&5
13273   (eval $ac_compile) 2>&5
13274   ac_status=$?
13275   echo "$as_me:13275: \$? = $ac_status" >&5
13276   (exit $ac_status); }; then
13277                         test -n "$verbose" && echo "$as_me:13277: result: ... -$cf_opt" >&5
13278 echo "${ECHO_T}... -$cf_opt" >&6
13279                         case $cf_opt in
13280                         (Wcast-qual)
13281                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13282                                 ;;
13283                         (Winline)
13284                                 case $GCC_VERSION in
13285                                 ([34].*)
13286                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13287
13288 echo "${as_me:-configure}:13288: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13289
13290                                         continue;;
13291                                 esac
13292                                 ;;
13293                         (Wpointer-arith)
13294                                 case $GCC_VERSION in
13295                                 ([12].*)
13296                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13297
13298 echo "${as_me:-configure}:13298: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13299
13300                                         continue;;
13301                                 esac
13302                                 ;;
13303                         esac
13304                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13305                 fi
13306         done
13307         CFLAGS="$cf_save_CFLAGS"
13308 fi
13309 rm -rf conftest*
13310
13311         if test "x$cf_with_cxx" = xyes ; then
13312
13313 INTEL_CPLUSPLUS=no
13314
13315 if test "$GCC" = yes ; then
13316         case $host_os in
13317         (linux*|gnu*)
13318                 echo "$as_me:13318: checking if this is really Intel C++ compiler" >&5
13319 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13320                 cf_save_CFLAGS="$CXXFLAGS"
13321                 CXXFLAGS="$CXXFLAGS -no-gcc"
13322                 cat >conftest.$ac_ext <<_ACEOF
13323 #line 13323 "configure"
13324 #include "confdefs.h"
13325
13326 int
13327 main ()
13328 {
13329
13330 #ifdef __INTEL_COMPILER
13331 #else
13332 make an error
13333 #endif
13334
13335   ;
13336   return 0;
13337 }
13338 _ACEOF
13339 rm -f conftest.$ac_objext
13340 if { (eval echo "$as_me:13340: \"$ac_compile\"") >&5
13341   (eval $ac_compile) 2>&5
13342   ac_status=$?
13343   echo "$as_me:13343: \$? = $ac_status" >&5
13344   (exit $ac_status); } &&
13345          { ac_try='test -s conftest.$ac_objext'
13346   { (eval echo "$as_me:13346: \"$ac_try\"") >&5
13347   (eval $ac_try) 2>&5
13348   ac_status=$?
13349   echo "$as_me:13349: \$? = $ac_status" >&5
13350   (exit $ac_status); }; }; then
13351   INTEL_CPLUSPLUS=yes
13352 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13353
13354 else
13355   echo "$as_me: failed program was:" >&5
13356 cat conftest.$ac_ext >&5
13357 fi
13358 rm -f conftest.$ac_objext conftest.$ac_ext
13359                 CXXFLAGS="$cf_save_CFLAGS"
13360                 echo "$as_me:13360: result: $INTEL_CPLUSPLUS" >&5
13361 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13362                 ;;
13363         esac
13364 fi
13365
13366 CLANG_CPLUSPLUS=no
13367
13368 if test "$GCC" = yes ; then
13369         echo "$as_me:13369: checking if this is really Clang C++ compiler" >&5
13370 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13371         cf_save_CFLAGS="$CXXFLAGS"
13372         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13373         cat >conftest.$ac_ext <<_ACEOF
13374 #line 13374 "configure"
13375 #include "confdefs.h"
13376
13377 int
13378 main ()
13379 {
13380
13381 #ifdef __clang__
13382 #else
13383 make an error
13384 #endif
13385
13386   ;
13387   return 0;
13388 }
13389 _ACEOF
13390 rm -f conftest.$ac_objext
13391 if { (eval echo "$as_me:13391: \"$ac_compile\"") >&5
13392   (eval $ac_compile) 2>&5
13393   ac_status=$?
13394   echo "$as_me:13394: \$? = $ac_status" >&5
13395   (exit $ac_status); } &&
13396          { ac_try='test -s conftest.$ac_objext'
13397   { (eval echo "$as_me:13397: \"$ac_try\"") >&5
13398   (eval $ac_try) 2>&5
13399   ac_status=$?
13400   echo "$as_me:13400: \$? = $ac_status" >&5
13401   (exit $ac_status); }; }; then
13402   CLANG_CPLUSPLUS=yes
13403 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13404
13405 else
13406   echo "$as_me: failed program was:" >&5
13407 cat conftest.$ac_ext >&5
13408 fi
13409 rm -f conftest.$ac_objext conftest.$ac_ext
13410         CXXFLAGS="$cf_save_CFLAGS"
13411         echo "$as_me:13411: result: $CLANG_CPLUSPLUS" >&5
13412 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13413 fi
13414
13415 ac_ext=cc
13416 ac_cpp='$CXXCPP $CPPFLAGS'
13417 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13418 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13419 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13420 ac_main_return=return
13421
13422 cat > conftest.$ac_ext <<EOF
13423 #line 13423 "configure"
13424 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13425 EOF
13426
13427 if test "$INTEL_CPLUSPLUS" = yes
13428 then
13429 # The "-wdXXX" options suppress warnings:
13430 # remark #1419: external declaration in primary source file
13431 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13432 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13433 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13434 # remark #193: zero used for undefined preprocessing identifier
13435 # remark #593: variable "curs_sb_left_arrow" was set but never used
13436 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13437 # remark #869: parameter "tw" was never referenced
13438 # remark #981: operands are evaluated in unspecified order
13439 # warning #269: invalid format string conversion
13440
13441         { echo "$as_me:13441: checking for $CC warning options..." >&5
13442 echo "$as_me: checking for $CC warning options..." >&6;}
13443         cf_save_CXXFLAGS="$CXXFLAGS"
13444         EXTRA_CXXFLAGS="-Wall"
13445         for cf_opt in \
13446                 wd1419 \
13447                 wd1682 \
13448                 wd1683 \
13449                 wd1684 \
13450                 wd193 \
13451                 wd279 \
13452                 wd593 \
13453                 wd810 \
13454                 wd869 \
13455                 wd981
13456         do
13457                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13458                 if { (eval echo "$as_me:13458: \"$ac_compile\"") >&5
13459   (eval $ac_compile) 2>&5
13460   ac_status=$?
13461   echo "$as_me:13461: \$? = $ac_status" >&5
13462   (exit $ac_status); }; then
13463                         test -n "$verbose" && echo "$as_me:13463: result: ... -$cf_opt" >&5
13464 echo "${ECHO_T}... -$cf_opt" >&6
13465                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13466                 fi
13467         done
13468         CXXFLAGS="$cf_save_CXXFLAGS"
13469
13470 elif test "$GXX" = yes
13471 then
13472         { echo "$as_me:13472: checking for $CXX warning options..." >&5
13473 echo "$as_me: checking for $CXX warning options..." >&6;}
13474         cf_save_CXXFLAGS="$CXXFLAGS"
13475         EXTRA_CXXFLAGS="-W -Wall"
13476         cf_gxx_extra_warnings=""
13477         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13478         case "$GCC_VERSION" in
13479         ([1-2].*)
13480                 ;;
13481         (*)
13482                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13483                 ;;
13484         esac
13485         for cf_opt in \
13486                 Wabi \
13487                 fabi-version=0 \
13488                 Wextra \
13489                 Wignored-qualifiers \
13490                 Wlogical-op \
13491                 Woverloaded-virtual \
13492                 Wsign-promo \
13493                 Wsynth \
13494                 Wold-style-cast \
13495                 Wcast-align \
13496                 Wcast-qual \
13497                 Wpointer-arith \
13498                 Wshadow \
13499                 Wundef $cf_gxx_extra_warnings Wno-unused
13500         do
13501                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13502                 if { (eval echo "$as_me:13502: \"$ac_compile\"") >&5
13503   (eval $ac_compile) 2>&5
13504   ac_status=$?
13505   echo "$as_me:13505: \$? = $ac_status" >&5
13506   (exit $ac_status); }; then
13507                         test -n "$verbose" && echo "$as_me:13507: result: ... -$cf_opt" >&5
13508 echo "${ECHO_T}... -$cf_opt" >&6
13509                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13510                 else
13511                         test -n "$verbose" && echo "$as_me:13511: result: ... no -$cf_opt" >&5
13512 echo "${ECHO_T}... no -$cf_opt" >&6
13513                 fi
13514         done
13515         CXXFLAGS="$cf_save_CXXFLAGS"
13516 fi
13517
13518 rm -rf conftest*
13519 ac_ext=c
13520 ac_cpp='$CPP $CPPFLAGS'
13521 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13522 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13523 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13524 ac_main_return=return
13525
13526         fi
13527 fi
13528
13529 if test "$GCC" = yes
13530 then
13531 cat > conftest.i <<EOF
13532 #ifndef GCC_PRINTF
13533 #define GCC_PRINTF 0
13534 #endif
13535 #ifndef GCC_SCANF
13536 #define GCC_SCANF 0
13537 #endif
13538 #ifndef GCC_NORETURN
13539 #define GCC_NORETURN /* nothing */
13540 #endif
13541 #ifndef GCC_UNUSED
13542 #define GCC_UNUSED /* nothing */
13543 #endif
13544 EOF
13545 if test "$GCC" = yes
13546 then
13547         { echo "$as_me:13547: checking for $CC __attribute__ directives..." >&5
13548 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13549 cat > conftest.$ac_ext <<EOF
13550 #line 13550 "${as_me:-configure}"
13551 #include "confdefs.h"
13552 #include "conftest.h"
13553 #include "conftest.i"
13554 #if     GCC_PRINTF
13555 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13556 #else
13557 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13558 #endif
13559 #if     GCC_SCANF
13560 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13561 #else
13562 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13563 #endif
13564 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13565 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13566 extern void foo(void) GCC_NORETURN;
13567 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13568 EOF
13569         cf_printf_attribute=no
13570         cf_scanf_attribute=no
13571         for cf_attribute in scanf printf unused noreturn
13572         do
13573
13574 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13575
13576                 cf_directive="__attribute__(($cf_attribute))"
13577                 echo "checking for $CC $cf_directive" 1>&5
13578
13579                 case $cf_attribute in
13580                 (printf)
13581                         cf_printf_attribute=yes
13582                         cat >conftest.h <<EOF
13583 #define GCC_$cf_ATTRIBUTE 1
13584 EOF
13585                         ;;
13586                 (scanf)
13587                         cf_scanf_attribute=yes
13588                         cat >conftest.h <<EOF
13589 #define GCC_$cf_ATTRIBUTE 1
13590 EOF
13591                         ;;
13592                 (*)
13593                         cat >conftest.h <<EOF
13594 #define GCC_$cf_ATTRIBUTE $cf_directive
13595 EOF
13596                         ;;
13597                 esac
13598
13599                 if { (eval echo "$as_me:13599: \"$ac_compile\"") >&5
13600   (eval $ac_compile) 2>&5
13601   ac_status=$?
13602   echo "$as_me:13602: \$? = $ac_status" >&5
13603   (exit $ac_status); }; then
13604                         test -n "$verbose" && echo "$as_me:13604: result: ... $cf_attribute" >&5
13605 echo "${ECHO_T}... $cf_attribute" >&6
13606                         cat conftest.h >>confdefs.h
13607                         case $cf_attribute in
13608                         (noreturn)
13609
13610 cat >>confdefs.h <<EOF
13611 #define GCC_NORETURN $cf_directive
13612 EOF
13613
13614                                 ;;
13615                         (printf)
13616                                 cf_value='/* nothing */'
13617                                 if test "$cf_printf_attribute" != no ; then
13618                                         cf_value='__attribute__((format(printf,fmt,var)))'
13619
13620 cat >>confdefs.h <<\EOF
13621 #define GCC_PRINTF 1
13622 EOF
13623
13624                                 fi
13625
13626 cat >>confdefs.h <<EOF
13627 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13628 EOF
13629
13630                                 ;;
13631                         (scanf)
13632                                 cf_value='/* nothing */'
13633                                 if test "$cf_scanf_attribute" != no ; then
13634                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13635
13636 cat >>confdefs.h <<\EOF
13637 #define GCC_SCANF 1
13638 EOF
13639
13640                                 fi
13641
13642 cat >>confdefs.h <<EOF
13643 #define GCC_SCANFLIKE(fmt,var) $cf_value
13644 EOF
13645
13646                                 ;;
13647                         (unused)
13648
13649 cat >>confdefs.h <<EOF
13650 #define GCC_UNUSED $cf_directive
13651 EOF
13652
13653                                 ;;
13654                         esac
13655                 fi
13656         done
13657 else
13658         fgrep define conftest.i >>confdefs.h
13659 fi
13660 rm -rf conftest*
13661 fi
13662
13663 echo "$as_me:13663: checking if you want to work around bogus compiler/loader warnings" >&5
13664 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13665
13666 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13667 if test "${enable_string_hacks+set}" = set; then
13668   enableval="$enable_string_hacks"
13669   with_string_hacks=$enableval
13670 else
13671   with_string_hacks=no
13672 fi;
13673 echo "$as_me:13673: result: $with_string_hacks" >&5
13674 echo "${ECHO_T}$with_string_hacks" >&6
13675
13676 if test "x$with_string_hacks" = "xyes"; then
13677
13678 cat >>confdefs.h <<\EOF
13679 #define USE_STRING_HACKS 1
13680 EOF
13681
13682         { echo "$as_me:13682: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13683 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13684
13685 for ac_func in strlcat strlcpy snprintf
13686 do
13687 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13688 echo "$as_me:13688: checking for $ac_func" >&5
13689 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13690 if eval "test \"\${$as_ac_var+set}\" = set"; then
13691   echo $ECHO_N "(cached) $ECHO_C" >&6
13692 else
13693   cat >conftest.$ac_ext <<_ACEOF
13694 #line 13694 "configure"
13695 #include "confdefs.h"
13696 /* System header to define __stub macros and hopefully few prototypes,
13697     which can conflict with char $ac_func (); below.  */
13698 #include <assert.h>
13699 /* Override any gcc2 internal prototype to avoid an error.  */
13700 #ifdef __cplusplus
13701 extern "C"
13702 #endif
13703 /* We use char because int might match the return type of a gcc2
13704    builtin and then its argument prototype would still apply.  */
13705 char $ac_func ();
13706 char (*f) ();
13707
13708 int
13709 main ()
13710 {
13711 /* The GNU C library defines this for functions which it implements
13712     to always fail with ENOSYS.  Some functions are actually named
13713     something starting with __ and the normal name is an alias.  */
13714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13715 choke me
13716 #else
13717 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13718 #endif
13719
13720   ;
13721   return 0;
13722 }
13723 _ACEOF
13724 rm -f conftest.$ac_objext conftest$ac_exeext
13725 if { (eval echo "$as_me:13725: \"$ac_link\"") >&5
13726   (eval $ac_link) 2>&5
13727   ac_status=$?
13728   echo "$as_me:13728: \$? = $ac_status" >&5
13729   (exit $ac_status); } &&
13730          { ac_try='test -s conftest$ac_exeext'
13731   { (eval echo "$as_me:13731: \"$ac_try\"") >&5
13732   (eval $ac_try) 2>&5
13733   ac_status=$?
13734   echo "$as_me:13734: \$? = $ac_status" >&5
13735   (exit $ac_status); }; }; then
13736   eval "$as_ac_var=yes"
13737 else
13738   echo "$as_me: failed program was:" >&5
13739 cat conftest.$ac_ext >&5
13740 eval "$as_ac_var=no"
13741 fi
13742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13743 fi
13744 echo "$as_me:13744: result: `eval echo '${'$as_ac_var'}'`" >&5
13745 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13746 if test `eval echo '${'$as_ac_var'}'` = yes; then
13747   cat >>confdefs.h <<EOF
13748 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13749 EOF
13750
13751 fi
13752 done
13753
13754 fi
13755
13756 ###     use option --enable-assertions to turn on generation of assertion code
13757 echo "$as_me:13757: checking if you want to enable runtime assertions" >&5
13758 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13759
13760 # Check whether --enable-assertions or --disable-assertions was given.
13761 if test "${enable_assertions+set}" = set; then
13762   enableval="$enable_assertions"
13763   with_assertions=$enableval
13764 else
13765   with_assertions=no
13766 fi;
13767 echo "$as_me:13767: result: $with_assertions" >&5
13768 echo "${ECHO_T}$with_assertions" >&6
13769 if test -n "$GCC"
13770 then
13771         if test "$with_assertions" = no
13772         then
13773                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13774         else
13775
13776         ADAFLAGS="$ADAFLAGS -gnata"
13777
13778         fi
13779 fi
13780
13781 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13782
13783 echo "$as_me:13783: checking if you want to use dmalloc for testing" >&5
13784 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13785
13786 # Check whether --with-dmalloc or --without-dmalloc was given.
13787 if test "${with_dmalloc+set}" = set; then
13788   withval="$with_dmalloc"
13789
13790 cat >>confdefs.h <<EOF
13791 #define USE_DMALLOC 1
13792 EOF
13793
13794         : ${with_cflags:=-g}
13795         : ${with_no_leaks:=yes}
13796          with_dmalloc=yes
13797 else
13798   with_dmalloc=
13799 fi;
13800 echo "$as_me:13800: result: ${with_dmalloc:-no}" >&5
13801 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13802
13803 case .$with_cflags in
13804 (.*-g*)
13805         case .$CFLAGS in
13806         (.*-g*)
13807                 ;;
13808         (*)
13809
13810 cf_fix_cppflags=no
13811 cf_new_cflags=
13812 cf_new_cppflags=
13813 cf_new_extra_cppflags=
13814
13815 for cf_add_cflags in -g
13816 do
13817 case $cf_fix_cppflags in
13818 (no)
13819         case $cf_add_cflags in
13820         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13821                 case $cf_add_cflags in
13822                 (-D*)
13823                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13824
13825                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13826                                 && test -z "${cf_tst_cflags}" \
13827                                 && cf_fix_cppflags=yes
13828
13829                         if test $cf_fix_cppflags = yes ; then
13830                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13831                                 continue
13832                         elif test "${cf_tst_cflags}" = "\"'" ; then
13833                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13834                                 continue
13835                         fi
13836                         ;;
13837                 esac
13838                 case "$CPPFLAGS" in
13839                 (*$cf_add_cflags)
13840                         ;;
13841                 (*)
13842                         case $cf_add_cflags in
13843                         (-D*)
13844                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13845
13846 CPPFLAGS=`echo "$CPPFLAGS" | \
13847         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13848                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13849
13850                                 ;;
13851                         esac
13852                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13853                         ;;
13854                 esac
13855                 ;;
13856         (*)
13857                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13858                 ;;
13859         esac
13860         ;;
13861 (yes)
13862         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13863
13864         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13865
13866         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13867                 && test -z "${cf_tst_cflags}" \
13868                 && cf_fix_cppflags=no
13869         ;;
13870 esac
13871 done
13872
13873 if test -n "$cf_new_cflags" ; then
13874
13875         CFLAGS="$CFLAGS $cf_new_cflags"
13876 fi
13877
13878 if test -n "$cf_new_cppflags" ; then
13879
13880         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13881 fi
13882
13883 if test -n "$cf_new_extra_cppflags" ; then
13884
13885         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13886 fi
13887
13888                 ;;
13889         esac
13890         ;;
13891 esac
13892
13893 if test "$with_dmalloc" = yes ; then
13894         echo "$as_me:13894: checking for dmalloc.h" >&5
13895 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13896 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13897   echo $ECHO_N "(cached) $ECHO_C" >&6
13898 else
13899   cat >conftest.$ac_ext <<_ACEOF
13900 #line 13900 "configure"
13901 #include "confdefs.h"
13902 #include <dmalloc.h>
13903 _ACEOF
13904 if { (eval echo "$as_me:13904: \"$ac_cpp conftest.$ac_ext\"") >&5
13905   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13906   ac_status=$?
13907   egrep -v '^ *\+' conftest.er1 >conftest.err
13908   rm -f conftest.er1
13909   cat conftest.err >&5
13910   echo "$as_me:13910: \$? = $ac_status" >&5
13911   (exit $ac_status); } >/dev/null; then
13912   if test -s conftest.err; then
13913     ac_cpp_err=$ac_c_preproc_warn_flag
13914   else
13915     ac_cpp_err=
13916   fi
13917 else
13918   ac_cpp_err=yes
13919 fi
13920 if test -z "$ac_cpp_err"; then
13921   ac_cv_header_dmalloc_h=yes
13922 else
13923   echo "$as_me: failed program was:" >&5
13924   cat conftest.$ac_ext >&5
13925   ac_cv_header_dmalloc_h=no
13926 fi
13927 rm -f conftest.err conftest.$ac_ext
13928 fi
13929 echo "$as_me:13929: result: $ac_cv_header_dmalloc_h" >&5
13930 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13931 if test $ac_cv_header_dmalloc_h = yes; then
13932
13933 echo "$as_me:13933: checking for dmalloc_debug in -ldmalloc" >&5
13934 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13935 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13936   echo $ECHO_N "(cached) $ECHO_C" >&6
13937 else
13938   ac_check_lib_save_LIBS=$LIBS
13939 LIBS="-ldmalloc  $LIBS"
13940 cat >conftest.$ac_ext <<_ACEOF
13941 #line 13941 "configure"
13942 #include "confdefs.h"
13943
13944 /* Override any gcc2 internal prototype to avoid an error.  */
13945 #ifdef __cplusplus
13946 extern "C"
13947 #endif
13948 /* We use char because int might match the return type of a gcc2
13949    builtin and then its argument prototype would still apply.  */
13950 char dmalloc_debug ();
13951 int
13952 main ()
13953 {
13954 dmalloc_debug ();
13955   ;
13956   return 0;
13957 }
13958 _ACEOF
13959 rm -f conftest.$ac_objext conftest$ac_exeext
13960 if { (eval echo "$as_me:13960: \"$ac_link\"") >&5
13961   (eval $ac_link) 2>&5
13962   ac_status=$?
13963   echo "$as_me:13963: \$? = $ac_status" >&5
13964   (exit $ac_status); } &&
13965          { ac_try='test -s conftest$ac_exeext'
13966   { (eval echo "$as_me:13966: \"$ac_try\"") >&5
13967   (eval $ac_try) 2>&5
13968   ac_status=$?
13969   echo "$as_me:13969: \$? = $ac_status" >&5
13970   (exit $ac_status); }; }; then
13971   ac_cv_lib_dmalloc_dmalloc_debug=yes
13972 else
13973   echo "$as_me: failed program was:" >&5
13974 cat conftest.$ac_ext >&5
13975 ac_cv_lib_dmalloc_dmalloc_debug=no
13976 fi
13977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13978 LIBS=$ac_check_lib_save_LIBS
13979 fi
13980 echo "$as_me:13980: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13981 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13982 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13983   cat >>confdefs.h <<EOF
13984 #define HAVE_LIBDMALLOC 1
13985 EOF
13986
13987   LIBS="-ldmalloc $LIBS"
13988
13989 fi
13990
13991 fi
13992
13993 fi
13994
13995 echo "$as_me:13995: checking if you want to use dbmalloc for testing" >&5
13996 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13997
13998 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13999 if test "${with_dbmalloc+set}" = set; then
14000   withval="$with_dbmalloc"
14001
14002 cat >>confdefs.h <<EOF
14003 #define USE_DBMALLOC 1
14004 EOF
14005
14006         : ${with_cflags:=-g}
14007         : ${with_no_leaks:=yes}
14008          with_dbmalloc=yes
14009 else
14010   with_dbmalloc=
14011 fi;
14012 echo "$as_me:14012: result: ${with_dbmalloc:-no}" >&5
14013 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14014
14015 case .$with_cflags in
14016 (.*-g*)
14017         case .$CFLAGS in
14018         (.*-g*)
14019                 ;;
14020         (*)
14021
14022 cf_fix_cppflags=no
14023 cf_new_cflags=
14024 cf_new_cppflags=
14025 cf_new_extra_cppflags=
14026
14027 for cf_add_cflags in -g
14028 do
14029 case $cf_fix_cppflags in
14030 (no)
14031         case $cf_add_cflags in
14032         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14033                 case $cf_add_cflags in
14034                 (-D*)
14035                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14036
14037                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14038                                 && test -z "${cf_tst_cflags}" \
14039                                 && cf_fix_cppflags=yes
14040
14041                         if test $cf_fix_cppflags = yes ; then
14042                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14043                                 continue
14044                         elif test "${cf_tst_cflags}" = "\"'" ; then
14045                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14046                                 continue
14047                         fi
14048                         ;;
14049                 esac
14050                 case "$CPPFLAGS" in
14051                 (*$cf_add_cflags)
14052                         ;;
14053                 (*)
14054                         case $cf_add_cflags in
14055                         (-D*)
14056                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14057
14058 CPPFLAGS=`echo "$CPPFLAGS" | \
14059         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14060                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14061
14062                                 ;;
14063                         esac
14064                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14065                         ;;
14066                 esac
14067                 ;;
14068         (*)
14069                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14070                 ;;
14071         esac
14072         ;;
14073 (yes)
14074         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14075
14076         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14077
14078         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14079                 && test -z "${cf_tst_cflags}" \
14080                 && cf_fix_cppflags=no
14081         ;;
14082 esac
14083 done
14084
14085 if test -n "$cf_new_cflags" ; then
14086
14087         CFLAGS="$CFLAGS $cf_new_cflags"
14088 fi
14089
14090 if test -n "$cf_new_cppflags" ; then
14091
14092         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14093 fi
14094
14095 if test -n "$cf_new_extra_cppflags" ; then
14096
14097         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14098 fi
14099
14100                 ;;
14101         esac
14102         ;;
14103 esac
14104
14105 if test "$with_dbmalloc" = yes ; then
14106         echo "$as_me:14106: checking for dbmalloc.h" >&5
14107 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14108 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14109   echo $ECHO_N "(cached) $ECHO_C" >&6
14110 else
14111   cat >conftest.$ac_ext <<_ACEOF
14112 #line 14112 "configure"
14113 #include "confdefs.h"
14114 #include <dbmalloc.h>
14115 _ACEOF
14116 if { (eval echo "$as_me:14116: \"$ac_cpp conftest.$ac_ext\"") >&5
14117   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14118   ac_status=$?
14119   egrep -v '^ *\+' conftest.er1 >conftest.err
14120   rm -f conftest.er1
14121   cat conftest.err >&5
14122   echo "$as_me:14122: \$? = $ac_status" >&5
14123   (exit $ac_status); } >/dev/null; then
14124   if test -s conftest.err; then
14125     ac_cpp_err=$ac_c_preproc_warn_flag
14126   else
14127     ac_cpp_err=
14128   fi
14129 else
14130   ac_cpp_err=yes
14131 fi
14132 if test -z "$ac_cpp_err"; then
14133   ac_cv_header_dbmalloc_h=yes
14134 else
14135   echo "$as_me: failed program was:" >&5
14136   cat conftest.$ac_ext >&5
14137   ac_cv_header_dbmalloc_h=no
14138 fi
14139 rm -f conftest.err conftest.$ac_ext
14140 fi
14141 echo "$as_me:14141: result: $ac_cv_header_dbmalloc_h" >&5
14142 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14143 if test $ac_cv_header_dbmalloc_h = yes; then
14144
14145 echo "$as_me:14145: checking for debug_malloc in -ldbmalloc" >&5
14146 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14147 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14148   echo $ECHO_N "(cached) $ECHO_C" >&6
14149 else
14150   ac_check_lib_save_LIBS=$LIBS
14151 LIBS="-ldbmalloc  $LIBS"
14152 cat >conftest.$ac_ext <<_ACEOF
14153 #line 14153 "configure"
14154 #include "confdefs.h"
14155
14156 /* Override any gcc2 internal prototype to avoid an error.  */
14157 #ifdef __cplusplus
14158 extern "C"
14159 #endif
14160 /* We use char because int might match the return type of a gcc2
14161    builtin and then its argument prototype would still apply.  */
14162 char debug_malloc ();
14163 int
14164 main ()
14165 {
14166 debug_malloc ();
14167   ;
14168   return 0;
14169 }
14170 _ACEOF
14171 rm -f conftest.$ac_objext conftest$ac_exeext
14172 if { (eval echo "$as_me:14172: \"$ac_link\"") >&5
14173   (eval $ac_link) 2>&5
14174   ac_status=$?
14175   echo "$as_me:14175: \$? = $ac_status" >&5
14176   (exit $ac_status); } &&
14177          { ac_try='test -s conftest$ac_exeext'
14178   { (eval echo "$as_me:14178: \"$ac_try\"") >&5
14179   (eval $ac_try) 2>&5
14180   ac_status=$?
14181   echo "$as_me:14181: \$? = $ac_status" >&5
14182   (exit $ac_status); }; }; then
14183   ac_cv_lib_dbmalloc_debug_malloc=yes
14184 else
14185   echo "$as_me: failed program was:" >&5
14186 cat conftest.$ac_ext >&5
14187 ac_cv_lib_dbmalloc_debug_malloc=no
14188 fi
14189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14190 LIBS=$ac_check_lib_save_LIBS
14191 fi
14192 echo "$as_me:14192: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14193 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14194 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14195   cat >>confdefs.h <<EOF
14196 #define HAVE_LIBDBMALLOC 1
14197 EOF
14198
14199   LIBS="-ldbmalloc $LIBS"
14200
14201 fi
14202
14203 fi
14204
14205 fi
14206
14207 echo "$as_me:14207: checking if you want to use valgrind for testing" >&5
14208 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14209
14210 # Check whether --with-valgrind or --without-valgrind was given.
14211 if test "${with_valgrind+set}" = set; then
14212   withval="$with_valgrind"
14213
14214 cat >>confdefs.h <<EOF
14215 #define USE_VALGRIND 1
14216 EOF
14217
14218         : ${with_cflags:=-g}
14219         : ${with_no_leaks:=yes}
14220          with_valgrind=yes
14221 else
14222   with_valgrind=
14223 fi;
14224 echo "$as_me:14224: result: ${with_valgrind:-no}" >&5
14225 echo "${ECHO_T}${with_valgrind:-no}" >&6
14226
14227 case .$with_cflags in
14228 (.*-g*)
14229         case .$CFLAGS in
14230         (.*-g*)
14231                 ;;
14232         (*)
14233
14234 cf_fix_cppflags=no
14235 cf_new_cflags=
14236 cf_new_cppflags=
14237 cf_new_extra_cppflags=
14238
14239 for cf_add_cflags in -g
14240 do
14241 case $cf_fix_cppflags in
14242 (no)
14243         case $cf_add_cflags in
14244         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14245                 case $cf_add_cflags in
14246                 (-D*)
14247                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14248
14249                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14250                                 && test -z "${cf_tst_cflags}" \
14251                                 && cf_fix_cppflags=yes
14252
14253                         if test $cf_fix_cppflags = yes ; then
14254                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14255                                 continue
14256                         elif test "${cf_tst_cflags}" = "\"'" ; then
14257                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14258                                 continue
14259                         fi
14260                         ;;
14261                 esac
14262                 case "$CPPFLAGS" in
14263                 (*$cf_add_cflags)
14264                         ;;
14265                 (*)
14266                         case $cf_add_cflags in
14267                         (-D*)
14268                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14269
14270 CPPFLAGS=`echo "$CPPFLAGS" | \
14271         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14272                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14273
14274                                 ;;
14275                         esac
14276                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14277                         ;;
14278                 esac
14279                 ;;
14280         (*)
14281                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14282                 ;;
14283         esac
14284         ;;
14285 (yes)
14286         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14287
14288         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14289
14290         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14291                 && test -z "${cf_tst_cflags}" \
14292                 && cf_fix_cppflags=no
14293         ;;
14294 esac
14295 done
14296
14297 if test -n "$cf_new_cflags" ; then
14298
14299         CFLAGS="$CFLAGS $cf_new_cflags"
14300 fi
14301
14302 if test -n "$cf_new_cppflags" ; then
14303
14304         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14305 fi
14306
14307 if test -n "$cf_new_extra_cppflags" ; then
14308
14309         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14310 fi
14311
14312                 ;;
14313         esac
14314         ;;
14315 esac
14316
14317 echo "$as_me:14317: checking if you want to perform memory-leak testing" >&5
14318 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14319
14320 # Check whether --enable-leaks or --disable-leaks was given.
14321 if test "${enable_leaks+set}" = set; then
14322   enableval="$enable_leaks"
14323   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14324 else
14325   : ${with_no_leaks:=no}
14326 fi;
14327 echo "$as_me:14327: result: $with_no_leaks" >&5
14328 echo "${ECHO_T}$with_no_leaks" >&6
14329
14330 if test "$with_no_leaks" = yes ; then
14331
14332 cat >>confdefs.h <<\EOF
14333 #define NO_LEAKS 1
14334 EOF
14335
14336 cat >>confdefs.h <<\EOF
14337 #define YY_NO_LEAKS 1
14338 EOF
14339
14340 fi
14341
14342 cat >>confdefs.h <<\EOF
14343 #define HAVE_NC_ALLOC_H 1
14344 EOF
14345
14346 ###     use option --enable-expanded to generate certain macros as functions
14347
14348 # Check whether --enable-expanded or --disable-expanded was given.
14349 if test "${enable_expanded+set}" = set; then
14350   enableval="$enable_expanded"
14351   test "x$enableval" = xyes &&
14352 cat >>confdefs.h <<\EOF
14353 #define NCURSES_EXPANDED 1
14354 EOF
14355
14356 fi;
14357
14358 ###     use option --disable-macros to suppress macros in favor of functions
14359
14360 # Check whether --enable-macros or --disable-macros was given.
14361 if test "${enable_macros+set}" = set; then
14362   enableval="$enable_macros"
14363   test "$enableval" = no &&
14364 cat >>confdefs.h <<\EOF
14365 #define NCURSES_NOMACROS 1
14366 EOF
14367
14368 fi;
14369
14370 # Normally we only add trace() to the debug-library.  Allow this to be
14371 # extended to all models of the ncurses library:
14372 cf_all_traces=no
14373 case "$CFLAGS $CPPFLAGS" in
14374 (*-DTRACE*)
14375         cf_all_traces=yes
14376         ;;
14377 esac
14378
14379 echo "$as_me:14379: checking whether to add trace feature to all models" >&5
14380 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14381
14382 # Check whether --with-trace or --without-trace was given.
14383 if test "${with_trace+set}" = set; then
14384   withval="$with_trace"
14385   cf_with_trace=$withval
14386 else
14387   cf_with_trace=$cf_all_traces
14388 fi;
14389 echo "$as_me:14389: result: $cf_with_trace" >&5
14390 echo "${ECHO_T}$cf_with_trace" >&6
14391
14392 if test "x$cf_with_trace" = xyes ; then
14393         LIB_TRACING=all
14394         ADA_TRACE=TRUE
14395
14396 cf_fix_cppflags=no
14397 cf_new_cflags=
14398 cf_new_cppflags=
14399 cf_new_extra_cppflags=
14400
14401 for cf_add_cflags in -DTRACE
14402 do
14403 case $cf_fix_cppflags in
14404 (no)
14405         case $cf_add_cflags in
14406         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14407                 case $cf_add_cflags in
14408                 (-D*)
14409                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14410
14411                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14412                                 && test -z "${cf_tst_cflags}" \
14413                                 && cf_fix_cppflags=yes
14414
14415                         if test $cf_fix_cppflags = yes ; then
14416                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14417                                 continue
14418                         elif test "${cf_tst_cflags}" = "\"'" ; then
14419                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14420                                 continue
14421                         fi
14422                         ;;
14423                 esac
14424                 case "$CPPFLAGS" in
14425                 (*$cf_add_cflags)
14426                         ;;
14427                 (*)
14428                         case $cf_add_cflags in
14429                         (-D*)
14430                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14431
14432 CPPFLAGS=`echo "$CPPFLAGS" | \
14433         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14434                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14435
14436                                 ;;
14437                         esac
14438                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14439                         ;;
14440                 esac
14441                 ;;
14442         (*)
14443                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14444                 ;;
14445         esac
14446         ;;
14447 (yes)
14448         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14449
14450         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14451
14452         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14453                 && test -z "${cf_tst_cflags}" \
14454                 && cf_fix_cppflags=no
14455         ;;
14456 esac
14457 done
14458
14459 if test -n "$cf_new_cflags" ; then
14460
14461         CFLAGS="$CFLAGS $cf_new_cflags"
14462 fi
14463
14464 if test -n "$cf_new_cppflags" ; then
14465
14466         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14467 fi
14468
14469 if test -n "$cf_new_extra_cppflags" ; then
14470
14471         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14472 fi
14473
14474 else
14475         LIB_TRACING=DEBUG
14476         ADA_TRACE=FALSE
14477 fi
14478
14479 echo "$as_me:14479: checking if we want to use GNAT projects" >&5
14480 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14481
14482 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14483 if test "${enable_gnat_projects+set}" = set; then
14484   enableval="$enable_gnat_projects"
14485   test "$enableval" != no && enableval=yes
14486         if test "$enableval" != "yes" ; then
14487     enable_gnat_projects=no
14488         else
14489                 enable_gnat_projects=yes
14490         fi
14491 else
14492   enableval=yes
14493         enable_gnat_projects=yes
14494
14495 fi;
14496 echo "$as_me:14496: result: $enable_gnat_projects" >&5
14497 echo "${ECHO_T}$enable_gnat_projects" >&6
14498
14499 ###     Checks for libraries.
14500 case $cf_cv_system_name in
14501 (*mingw32*|*mingw64*)
14502         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
14503         LIBS=" -lpsapi $LIBS"
14504         ;;
14505 (*)
14506 echo "$as_me:14506: checking for gettimeofday" >&5
14507 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14508 if test "${ac_cv_func_gettimeofday+set}" = set; then
14509   echo $ECHO_N "(cached) $ECHO_C" >&6
14510 else
14511   cat >conftest.$ac_ext <<_ACEOF
14512 #line 14512 "configure"
14513 #include "confdefs.h"
14514 /* System header to define __stub macros and hopefully few prototypes,
14515     which can conflict with char gettimeofday (); below.  */
14516 #include <assert.h>
14517 /* Override any gcc2 internal prototype to avoid an error.  */
14518 #ifdef __cplusplus
14519 extern "C"
14520 #endif
14521 /* We use char because int might match the return type of a gcc2
14522    builtin and then its argument prototype would still apply.  */
14523 char gettimeofday ();
14524 char (*f) ();
14525
14526 int
14527 main ()
14528 {
14529 /* The GNU C library defines this for functions which it implements
14530     to always fail with ENOSYS.  Some functions are actually named
14531     something starting with __ and the normal name is an alias.  */
14532 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14533 choke me
14534 #else
14535 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14536 #endif
14537
14538   ;
14539   return 0;
14540 }
14541 _ACEOF
14542 rm -f conftest.$ac_objext conftest$ac_exeext
14543 if { (eval echo "$as_me:14543: \"$ac_link\"") >&5
14544   (eval $ac_link) 2>&5
14545   ac_status=$?
14546   echo "$as_me:14546: \$? = $ac_status" >&5
14547   (exit $ac_status); } &&
14548          { ac_try='test -s conftest$ac_exeext'
14549   { (eval echo "$as_me:14549: \"$ac_try\"") >&5
14550   (eval $ac_try) 2>&5
14551   ac_status=$?
14552   echo "$as_me:14552: \$? = $ac_status" >&5
14553   (exit $ac_status); }; }; then
14554   ac_cv_func_gettimeofday=yes
14555 else
14556   echo "$as_me: failed program was:" >&5
14557 cat conftest.$ac_ext >&5
14558 ac_cv_func_gettimeofday=no
14559 fi
14560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14561 fi
14562 echo "$as_me:14562: result: $ac_cv_func_gettimeofday" >&5
14563 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14564 if test $ac_cv_func_gettimeofday = yes; then
14565
14566 cat >>confdefs.h <<\EOF
14567 #define HAVE_GETTIMEOFDAY 1
14568 EOF
14569
14570 else
14571
14572 echo "$as_me:14572: checking for gettimeofday in -lbsd" >&5
14573 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14574 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14575   echo $ECHO_N "(cached) $ECHO_C" >&6
14576 else
14577   ac_check_lib_save_LIBS=$LIBS
14578 LIBS="-lbsd  $LIBS"
14579 cat >conftest.$ac_ext <<_ACEOF
14580 #line 14580 "configure"
14581 #include "confdefs.h"
14582
14583 /* Override any gcc2 internal prototype to avoid an error.  */
14584 #ifdef __cplusplus
14585 extern "C"
14586 #endif
14587 /* We use char because int might match the return type of a gcc2
14588    builtin and then its argument prototype would still apply.  */
14589 char gettimeofday ();
14590 int
14591 main ()
14592 {
14593 gettimeofday ();
14594   ;
14595   return 0;
14596 }
14597 _ACEOF
14598 rm -f conftest.$ac_objext conftest$ac_exeext
14599 if { (eval echo "$as_me:14599: \"$ac_link\"") >&5
14600   (eval $ac_link) 2>&5
14601   ac_status=$?
14602   echo "$as_me:14602: \$? = $ac_status" >&5
14603   (exit $ac_status); } &&
14604          { ac_try='test -s conftest$ac_exeext'
14605   { (eval echo "$as_me:14605: \"$ac_try\"") >&5
14606   (eval $ac_try) 2>&5
14607   ac_status=$?
14608   echo "$as_me:14608: \$? = $ac_status" >&5
14609   (exit $ac_status); }; }; then
14610   ac_cv_lib_bsd_gettimeofday=yes
14611 else
14612   echo "$as_me: failed program was:" >&5
14613 cat conftest.$ac_ext >&5
14614 ac_cv_lib_bsd_gettimeofday=no
14615 fi
14616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14617 LIBS=$ac_check_lib_save_LIBS
14618 fi
14619 echo "$as_me:14619: result: $ac_cv_lib_bsd_gettimeofday" >&5
14620 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14621 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14622
14623 cat >>confdefs.h <<\EOF
14624 #define HAVE_GETTIMEOFDAY 1
14625 EOF
14626
14627 cf_add_libs="-lbsd"
14628 # Filter out duplicates - this happens with badly-designed ".pc" files...
14629 for cf_add_1lib in $LIBS
14630 do
14631         for cf_add_2lib in $cf_add_libs
14632         do
14633                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14634                 then
14635                         cf_add_1lib=
14636                         break
14637                 fi
14638         done
14639         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14640 done
14641 LIBS="$cf_add_libs"
14642
14643 fi
14644
14645 fi
14646         ;;
14647 esac
14648
14649 echo "$as_me:14649: checking if -lm needed for math functions" >&5
14650 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14651 if test "${cf_cv_need_libm+set}" = set; then
14652   echo $ECHO_N "(cached) $ECHO_C" >&6
14653 else
14654
14655         cat >conftest.$ac_ext <<_ACEOF
14656 #line 14656 "configure"
14657 #include "confdefs.h"
14658
14659         #include <stdio.h>
14660         #include <math.h>
14661
14662 int
14663 main ()
14664 {
14665 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14666   ;
14667   return 0;
14668 }
14669 _ACEOF
14670 rm -f conftest.$ac_objext conftest$ac_exeext
14671 if { (eval echo "$as_me:14671: \"$ac_link\"") >&5
14672   (eval $ac_link) 2>&5
14673   ac_status=$?
14674   echo "$as_me:14674: \$? = $ac_status" >&5
14675   (exit $ac_status); } &&
14676          { ac_try='test -s conftest$ac_exeext'
14677   { (eval echo "$as_me:14677: \"$ac_try\"") >&5
14678   (eval $ac_try) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit $ac_status); }; }; then
14682   cf_cv_need_libm=no
14683 else
14684   echo "$as_me: failed program was:" >&5
14685 cat conftest.$ac_ext >&5
14686 cf_cv_need_libm=yes
14687 fi
14688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14689 fi
14690 echo "$as_me:14690: result: $cf_cv_need_libm" >&5
14691 echo "${ECHO_T}$cf_cv_need_libm" >&6
14692 if test "$cf_cv_need_libm" = yes
14693 then
14694 MATH_LIB=-lm
14695 fi
14696
14697 ###     Checks for header files.
14698 echo "$as_me:14698: checking for ANSI C header files" >&5
14699 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14700 if test "${ac_cv_header_stdc+set}" = set; then
14701   echo $ECHO_N "(cached) $ECHO_C" >&6
14702 else
14703   cat >conftest.$ac_ext <<_ACEOF
14704 #line 14704 "configure"
14705 #include "confdefs.h"
14706 #include <stdlib.h>
14707 #include <stdarg.h>
14708 #include <string.h>
14709 #include <float.h>
14710
14711 _ACEOF
14712 if { (eval echo "$as_me:14712: \"$ac_cpp conftest.$ac_ext\"") >&5
14713   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14714   ac_status=$?
14715   egrep -v '^ *\+' conftest.er1 >conftest.err
14716   rm -f conftest.er1
14717   cat conftest.err >&5
14718   echo "$as_me:14718: \$? = $ac_status" >&5
14719   (exit $ac_status); } >/dev/null; then
14720   if test -s conftest.err; then
14721     ac_cpp_err=$ac_c_preproc_warn_flag
14722   else
14723     ac_cpp_err=
14724   fi
14725 else
14726   ac_cpp_err=yes
14727 fi
14728 if test -z "$ac_cpp_err"; then
14729   ac_cv_header_stdc=yes
14730 else
14731   echo "$as_me: failed program was:" >&5
14732   cat conftest.$ac_ext >&5
14733   ac_cv_header_stdc=no
14734 fi
14735 rm -f conftest.err conftest.$ac_ext
14736
14737 if test $ac_cv_header_stdc = yes; then
14738   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14739   cat >conftest.$ac_ext <<_ACEOF
14740 #line 14740 "configure"
14741 #include "confdefs.h"
14742 #include <string.h>
14743
14744 _ACEOF
14745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14746   egrep "memchr" >/dev/null 2>&1; then
14747   :
14748 else
14749   ac_cv_header_stdc=no
14750 fi
14751 rm -rf conftest*
14752
14753 fi
14754
14755 if test $ac_cv_header_stdc = yes; then
14756   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14757   cat >conftest.$ac_ext <<_ACEOF
14758 #line 14758 "configure"
14759 #include "confdefs.h"
14760 #include <stdlib.h>
14761
14762 _ACEOF
14763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14764   egrep "free" >/dev/null 2>&1; then
14765   :
14766 else
14767   ac_cv_header_stdc=no
14768 fi
14769 rm -rf conftest*
14770
14771 fi
14772
14773 if test $ac_cv_header_stdc = yes; then
14774   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14775   if test "$cross_compiling" = yes; then
14776   :
14777 else
14778   cat >conftest.$ac_ext <<_ACEOF
14779 #line 14779 "configure"
14780 #include "confdefs.h"
14781 #include <ctype.h>
14782 #if ((' ' & 0x0FF) == 0x020)
14783 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14784 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14785 #else
14786 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14787                      || ('j' <= (c) && (c) <= 'r') \
14788                      || ('s' <= (c) && (c) <= 'z'))
14789 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14790 #endif
14791
14792 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14793 int
14794 main ()
14795 {
14796   int i;
14797   for (i = 0; i < 256; i++)
14798     if (XOR (islower (i), ISLOWER (i))
14799         || toupper (i) != TOUPPER (i))
14800       $ac_main_return(2);
14801   $ac_main_return (0);
14802 }
14803 _ACEOF
14804 rm -f conftest$ac_exeext
14805 if { (eval echo "$as_me:14805: \"$ac_link\"") >&5
14806   (eval $ac_link) 2>&5
14807   ac_status=$?
14808   echo "$as_me:14808: \$? = $ac_status" >&5
14809   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14810   { (eval echo "$as_me:14810: \"$ac_try\"") >&5
14811   (eval $ac_try) 2>&5
14812   ac_status=$?
14813   echo "$as_me:14813: \$? = $ac_status" >&5
14814   (exit $ac_status); }; }; then
14815   :
14816 else
14817   echo "$as_me: program exited with status $ac_status" >&5
14818 echo "$as_me: failed program was:" >&5
14819 cat conftest.$ac_ext >&5
14820 ac_cv_header_stdc=no
14821 fi
14822 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14823 fi
14824 fi
14825 fi
14826 echo "$as_me:14826: result: $ac_cv_header_stdc" >&5
14827 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14828 if test $ac_cv_header_stdc = yes; then
14829
14830 cat >>confdefs.h <<\EOF
14831 #define STDC_HEADERS 1
14832 EOF
14833
14834 fi
14835
14836 ac_header_dirent=no
14837 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14838   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14839 echo "$as_me:14839: checking for $ac_hdr that defines DIR" >&5
14840 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14842   echo $ECHO_N "(cached) $ECHO_C" >&6
14843 else
14844   cat >conftest.$ac_ext <<_ACEOF
14845 #line 14845 "configure"
14846 #include "confdefs.h"
14847 #include <sys/types.h>
14848 #include <$ac_hdr>
14849
14850 int
14851 main ()
14852 {
14853 if ((DIR *) 0)
14854 return 0;
14855   ;
14856   return 0;
14857 }
14858 _ACEOF
14859 rm -f conftest.$ac_objext
14860 if { (eval echo "$as_me:14860: \"$ac_compile\"") >&5
14861   (eval $ac_compile) 2>&5
14862   ac_status=$?
14863   echo "$as_me:14863: \$? = $ac_status" >&5
14864   (exit $ac_status); } &&
14865          { ac_try='test -s conftest.$ac_objext'
14866   { (eval echo "$as_me:14866: \"$ac_try\"") >&5
14867   (eval $ac_try) 2>&5
14868   ac_status=$?
14869   echo "$as_me:14869: \$? = $ac_status" >&5
14870   (exit $ac_status); }; }; then
14871   eval "$as_ac_Header=yes"
14872 else
14873   echo "$as_me: failed program was:" >&5
14874 cat conftest.$ac_ext >&5
14875 eval "$as_ac_Header=no"
14876 fi
14877 rm -f conftest.$ac_objext conftest.$ac_ext
14878 fi
14879 echo "$as_me:14879: result: `eval echo '${'$as_ac_Header'}'`" >&5
14880 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14881 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14882   cat >>confdefs.h <<EOF
14883 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14884 EOF
14885
14886 ac_header_dirent=$ac_hdr; break
14887 fi
14888
14889 done
14890 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14891 if test $ac_header_dirent = dirent.h; then
14892   echo "$as_me:14892: checking for opendir in -ldir" >&5
14893 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14894 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14895   echo $ECHO_N "(cached) $ECHO_C" >&6
14896 else
14897   ac_check_lib_save_LIBS=$LIBS
14898 LIBS="-ldir  $LIBS"
14899 cat >conftest.$ac_ext <<_ACEOF
14900 #line 14900 "configure"
14901 #include "confdefs.h"
14902
14903 /* Override any gcc2 internal prototype to avoid an error.  */
14904 #ifdef __cplusplus
14905 extern "C"
14906 #endif
14907 /* We use char because int might match the return type of a gcc2
14908    builtin and then its argument prototype would still apply.  */
14909 char opendir ();
14910 int
14911 main ()
14912 {
14913 opendir ();
14914   ;
14915   return 0;
14916 }
14917 _ACEOF
14918 rm -f conftest.$ac_objext conftest$ac_exeext
14919 if { (eval echo "$as_me:14919: \"$ac_link\"") >&5
14920   (eval $ac_link) 2>&5
14921   ac_status=$?
14922   echo "$as_me:14922: \$? = $ac_status" >&5
14923   (exit $ac_status); } &&
14924          { ac_try='test -s conftest$ac_exeext'
14925   { (eval echo "$as_me:14925: \"$ac_try\"") >&5
14926   (eval $ac_try) 2>&5
14927   ac_status=$?
14928   echo "$as_me:14928: \$? = $ac_status" >&5
14929   (exit $ac_status); }; }; then
14930   ac_cv_lib_dir_opendir=yes
14931 else
14932   echo "$as_me: failed program was:" >&5
14933 cat conftest.$ac_ext >&5
14934 ac_cv_lib_dir_opendir=no
14935 fi
14936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14937 LIBS=$ac_check_lib_save_LIBS
14938 fi
14939 echo "$as_me:14939: result: $ac_cv_lib_dir_opendir" >&5
14940 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14941 if test $ac_cv_lib_dir_opendir = yes; then
14942   LIBS="$LIBS -ldir"
14943 fi
14944
14945 else
14946   echo "$as_me:14946: checking for opendir in -lx" >&5
14947 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14948 if test "${ac_cv_lib_x_opendir+set}" = set; then
14949   echo $ECHO_N "(cached) $ECHO_C" >&6
14950 else
14951   ac_check_lib_save_LIBS=$LIBS
14952 LIBS="-lx  $LIBS"
14953 cat >conftest.$ac_ext <<_ACEOF
14954 #line 14954 "configure"
14955 #include "confdefs.h"
14956
14957 /* Override any gcc2 internal prototype to avoid an error.  */
14958 #ifdef __cplusplus
14959 extern "C"
14960 #endif
14961 /* We use char because int might match the return type of a gcc2
14962    builtin and then its argument prototype would still apply.  */
14963 char opendir ();
14964 int
14965 main ()
14966 {
14967 opendir ();
14968   ;
14969   return 0;
14970 }
14971 _ACEOF
14972 rm -f conftest.$ac_objext conftest$ac_exeext
14973 if { (eval echo "$as_me:14973: \"$ac_link\"") >&5
14974   (eval $ac_link) 2>&5
14975   ac_status=$?
14976   echo "$as_me:14976: \$? = $ac_status" >&5
14977   (exit $ac_status); } &&
14978          { ac_try='test -s conftest$ac_exeext'
14979   { (eval echo "$as_me:14979: \"$ac_try\"") >&5
14980   (eval $ac_try) 2>&5
14981   ac_status=$?
14982   echo "$as_me:14982: \$? = $ac_status" >&5
14983   (exit $ac_status); }; }; then
14984   ac_cv_lib_x_opendir=yes
14985 else
14986   echo "$as_me: failed program was:" >&5
14987 cat conftest.$ac_ext >&5
14988 ac_cv_lib_x_opendir=no
14989 fi
14990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14991 LIBS=$ac_check_lib_save_LIBS
14992 fi
14993 echo "$as_me:14993: result: $ac_cv_lib_x_opendir" >&5
14994 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14995 if test $ac_cv_lib_x_opendir = yes; then
14996   LIBS="$LIBS -lx"
14997 fi
14998
14999 fi
15000
15001 echo "$as_me:15001: checking whether time.h and sys/time.h may both be included" >&5
15002 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15003 if test "${ac_cv_header_time+set}" = set; then
15004   echo $ECHO_N "(cached) $ECHO_C" >&6
15005 else
15006   cat >conftest.$ac_ext <<_ACEOF
15007 #line 15007 "configure"
15008 #include "confdefs.h"
15009 #include <sys/types.h>
15010 #include <sys/time.h>
15011 #include <time.h>
15012
15013 int
15014 main ()
15015 {
15016 if ((struct tm *) 0)
15017 return 0;
15018   ;
15019   return 0;
15020 }
15021 _ACEOF
15022 rm -f conftest.$ac_objext
15023 if { (eval echo "$as_me:15023: \"$ac_compile\"") >&5
15024   (eval $ac_compile) 2>&5
15025   ac_status=$?
15026   echo "$as_me:15026: \$? = $ac_status" >&5
15027   (exit $ac_status); } &&
15028          { ac_try='test -s conftest.$ac_objext'
15029   { (eval echo "$as_me:15029: \"$ac_try\"") >&5
15030   (eval $ac_try) 2>&5
15031   ac_status=$?
15032   echo "$as_me:15032: \$? = $ac_status" >&5
15033   (exit $ac_status); }; }; then
15034   ac_cv_header_time=yes
15035 else
15036   echo "$as_me: failed program was:" >&5
15037 cat conftest.$ac_ext >&5
15038 ac_cv_header_time=no
15039 fi
15040 rm -f conftest.$ac_objext conftest.$ac_ext
15041 fi
15042 echo "$as_me:15042: result: $ac_cv_header_time" >&5
15043 echo "${ECHO_T}$ac_cv_header_time" >&6
15044 if test $ac_cv_header_time = yes; then
15045
15046 cat >>confdefs.h <<\EOF
15047 #define TIME_WITH_SYS_TIME 1
15048 EOF
15049
15050 fi
15051
15052 cf_regex_func=no
15053
15054 cf_regex_libs="regex re"
15055 case $host_os in
15056 (mingw*)
15057         cf_regex_libs="gnurx $cf_regex_libs"
15058         ;;
15059 esac
15060
15061 echo "$as_me:15061: checking for regcomp" >&5
15062 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15063 if test "${ac_cv_func_regcomp+set}" = set; then
15064   echo $ECHO_N "(cached) $ECHO_C" >&6
15065 else
15066   cat >conftest.$ac_ext <<_ACEOF
15067 #line 15067 "configure"
15068 #include "confdefs.h"
15069 /* System header to define __stub macros and hopefully few prototypes,
15070     which can conflict with char regcomp (); below.  */
15071 #include <assert.h>
15072 /* Override any gcc2 internal prototype to avoid an error.  */
15073 #ifdef __cplusplus
15074 extern "C"
15075 #endif
15076 /* We use char because int might match the return type of a gcc2
15077    builtin and then its argument prototype would still apply.  */
15078 char regcomp ();
15079 char (*f) ();
15080
15081 int
15082 main ()
15083 {
15084 /* The GNU C library defines this for functions which it implements
15085     to always fail with ENOSYS.  Some functions are actually named
15086     something starting with __ and the normal name is an alias.  */
15087 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15088 choke me
15089 #else
15090 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15091 #endif
15092
15093   ;
15094   return 0;
15095 }
15096 _ACEOF
15097 rm -f conftest.$ac_objext conftest$ac_exeext
15098 if { (eval echo "$as_me:15098: \"$ac_link\"") >&5
15099   (eval $ac_link) 2>&5
15100   ac_status=$?
15101   echo "$as_me:15101: \$? = $ac_status" >&5
15102   (exit $ac_status); } &&
15103          { ac_try='test -s conftest$ac_exeext'
15104   { (eval echo "$as_me:15104: \"$ac_try\"") >&5
15105   (eval $ac_try) 2>&5
15106   ac_status=$?
15107   echo "$as_me:15107: \$? = $ac_status" >&5
15108   (exit $ac_status); }; }; then
15109   ac_cv_func_regcomp=yes
15110 else
15111   echo "$as_me: failed program was:" >&5
15112 cat conftest.$ac_ext >&5
15113 ac_cv_func_regcomp=no
15114 fi
15115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15116 fi
15117 echo "$as_me:15117: result: $ac_cv_func_regcomp" >&5
15118 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15119 if test $ac_cv_func_regcomp = yes; then
15120   cf_regex_func=regcomp
15121 else
15122
15123         for cf_regex_lib in $cf_regex_libs
15124         do
15125                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15126 echo "$as_me:15126: checking for regcomp in -l$cf_regex_lib" >&5
15127 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15128 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15129   echo $ECHO_N "(cached) $ECHO_C" >&6
15130 else
15131   ac_check_lib_save_LIBS=$LIBS
15132 LIBS="-l$cf_regex_lib  $LIBS"
15133 cat >conftest.$ac_ext <<_ACEOF
15134 #line 15134 "configure"
15135 #include "confdefs.h"
15136
15137 /* Override any gcc2 internal prototype to avoid an error.  */
15138 #ifdef __cplusplus
15139 extern "C"
15140 #endif
15141 /* We use char because int might match the return type of a gcc2
15142    builtin and then its argument prototype would still apply.  */
15143 char regcomp ();
15144 int
15145 main ()
15146 {
15147 regcomp ();
15148   ;
15149   return 0;
15150 }
15151 _ACEOF
15152 rm -f conftest.$ac_objext conftest$ac_exeext
15153 if { (eval echo "$as_me:15153: \"$ac_link\"") >&5
15154   (eval $ac_link) 2>&5
15155   ac_status=$?
15156   echo "$as_me:15156: \$? = $ac_status" >&5
15157   (exit $ac_status); } &&
15158          { ac_try='test -s conftest$ac_exeext'
15159   { (eval echo "$as_me:15159: \"$ac_try\"") >&5
15160   (eval $ac_try) 2>&5
15161   ac_status=$?
15162   echo "$as_me:15162: \$? = $ac_status" >&5
15163   (exit $ac_status); }; }; then
15164   eval "$as_ac_Lib=yes"
15165 else
15166   echo "$as_me: failed program was:" >&5
15167 cat conftest.$ac_ext >&5
15168 eval "$as_ac_Lib=no"
15169 fi
15170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15171 LIBS=$ac_check_lib_save_LIBS
15172 fi
15173 echo "$as_me:15173: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15174 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15175 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15176
15177 cf_add_libs="-l$cf_regex_lib"
15178 # Filter out duplicates - this happens with badly-designed ".pc" files...
15179 for cf_add_1lib in $LIBS
15180 do
15181         for cf_add_2lib in $cf_add_libs
15182         do
15183                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15184                 then
15185                         cf_add_1lib=
15186                         break
15187                 fi
15188         done
15189         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15190 done
15191 LIBS="$cf_add_libs"
15192
15193                                 cf_regex_func=regcomp
15194                                 break
15195 fi
15196
15197         done
15198
15199 fi
15200
15201 if test "$cf_regex_func" = no ; then
15202         echo "$as_me:15202: checking for compile" >&5
15203 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15204 if test "${ac_cv_func_compile+set}" = set; then
15205   echo $ECHO_N "(cached) $ECHO_C" >&6
15206 else
15207   cat >conftest.$ac_ext <<_ACEOF
15208 #line 15208 "configure"
15209 #include "confdefs.h"
15210 /* System header to define __stub macros and hopefully few prototypes,
15211     which can conflict with char compile (); below.  */
15212 #include <assert.h>
15213 /* Override any gcc2 internal prototype to avoid an error.  */
15214 #ifdef __cplusplus
15215 extern "C"
15216 #endif
15217 /* We use char because int might match the return type of a gcc2
15218    builtin and then its argument prototype would still apply.  */
15219 char compile ();
15220 char (*f) ();
15221
15222 int
15223 main ()
15224 {
15225 /* The GNU C library defines this for functions which it implements
15226     to always fail with ENOSYS.  Some functions are actually named
15227     something starting with __ and the normal name is an alias.  */
15228 #if defined (__stub_compile) || defined (__stub___compile)
15229 choke me
15230 #else
15231 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15232 #endif
15233
15234   ;
15235   return 0;
15236 }
15237 _ACEOF
15238 rm -f conftest.$ac_objext conftest$ac_exeext
15239 if { (eval echo "$as_me:15239: \"$ac_link\"") >&5
15240   (eval $ac_link) 2>&5
15241   ac_status=$?
15242   echo "$as_me:15242: \$? = $ac_status" >&5
15243   (exit $ac_status); } &&
15244          { ac_try='test -s conftest$ac_exeext'
15245   { (eval echo "$as_me:15245: \"$ac_try\"") >&5
15246   (eval $ac_try) 2>&5
15247   ac_status=$?
15248   echo "$as_me:15248: \$? = $ac_status" >&5
15249   (exit $ac_status); }; }; then
15250   ac_cv_func_compile=yes
15251 else
15252   echo "$as_me: failed program was:" >&5
15253 cat conftest.$ac_ext >&5
15254 ac_cv_func_compile=no
15255 fi
15256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15257 fi
15258 echo "$as_me:15258: result: $ac_cv_func_compile" >&5
15259 echo "${ECHO_T}$ac_cv_func_compile" >&6
15260 if test $ac_cv_func_compile = yes; then
15261   cf_regex_func=compile
15262 else
15263
15264                 echo "$as_me:15264: checking for compile in -lgen" >&5
15265 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15266 if test "${ac_cv_lib_gen_compile+set}" = set; then
15267   echo $ECHO_N "(cached) $ECHO_C" >&6
15268 else
15269   ac_check_lib_save_LIBS=$LIBS
15270 LIBS="-lgen  $LIBS"
15271 cat >conftest.$ac_ext <<_ACEOF
15272 #line 15272 "configure"
15273 #include "confdefs.h"
15274
15275 /* Override any gcc2 internal prototype to avoid an error.  */
15276 #ifdef __cplusplus
15277 extern "C"
15278 #endif
15279 /* We use char because int might match the return type of a gcc2
15280    builtin and then its argument prototype would still apply.  */
15281 char compile ();
15282 int
15283 main ()
15284 {
15285 compile ();
15286   ;
15287   return 0;
15288 }
15289 _ACEOF
15290 rm -f conftest.$ac_objext conftest$ac_exeext
15291 if { (eval echo "$as_me:15291: \"$ac_link\"") >&5
15292   (eval $ac_link) 2>&5
15293   ac_status=$?
15294   echo "$as_me:15294: \$? = $ac_status" >&5
15295   (exit $ac_status); } &&
15296          { ac_try='test -s conftest$ac_exeext'
15297   { (eval echo "$as_me:15297: \"$ac_try\"") >&5
15298   (eval $ac_try) 2>&5
15299   ac_status=$?
15300   echo "$as_me:15300: \$? = $ac_status" >&5
15301   (exit $ac_status); }; }; then
15302   ac_cv_lib_gen_compile=yes
15303 else
15304   echo "$as_me: failed program was:" >&5
15305 cat conftest.$ac_ext >&5
15306 ac_cv_lib_gen_compile=no
15307 fi
15308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15309 LIBS=$ac_check_lib_save_LIBS
15310 fi
15311 echo "$as_me:15311: result: $ac_cv_lib_gen_compile" >&5
15312 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15313 if test $ac_cv_lib_gen_compile = yes; then
15314
15315 cf_add_libs="-lgen"
15316 # Filter out duplicates - this happens with badly-designed ".pc" files...
15317 for cf_add_1lib in $LIBS
15318 do
15319         for cf_add_2lib in $cf_add_libs
15320         do
15321                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15322                 then
15323                         cf_add_1lib=
15324                         break
15325                 fi
15326         done
15327         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15328 done
15329 LIBS="$cf_add_libs"
15330
15331                                 cf_regex_func=compile
15332 fi
15333
15334 fi
15335
15336 fi
15337
15338 if test "$cf_regex_func" = no ; then
15339         { echo "$as_me:15339: WARNING: cannot find regular expression library" >&5
15340 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15341 fi
15342
15343 echo "$as_me:15343: checking for regular-expression headers" >&5
15344 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15345 if test "${cf_cv_regex_hdrs+set}" = set; then
15346   echo $ECHO_N "(cached) $ECHO_C" >&6
15347 else
15348
15349 cf_cv_regex_hdrs=no
15350 case $cf_regex_func in
15351 (compile)
15352         for cf_regex_hdr in regexp.h regexpr.h
15353         do
15354                 cat >conftest.$ac_ext <<_ACEOF
15355 #line 15355 "configure"
15356 #include "confdefs.h"
15357 #include <$cf_regex_hdr>
15358 int
15359 main ()
15360 {
15361
15362                         char *p = compile("", "", "", 0);
15363                         int x = step("", "");
15364
15365   ;
15366   return 0;
15367 }
15368 _ACEOF
15369 rm -f conftest.$ac_objext conftest$ac_exeext
15370 if { (eval echo "$as_me:15370: \"$ac_link\"") >&5
15371   (eval $ac_link) 2>&5
15372   ac_status=$?
15373   echo "$as_me:15373: \$? = $ac_status" >&5
15374   (exit $ac_status); } &&
15375          { ac_try='test -s conftest$ac_exeext'
15376   { (eval echo "$as_me:15376: \"$ac_try\"") >&5
15377   (eval $ac_try) 2>&5
15378   ac_status=$?
15379   echo "$as_me:15379: \$? = $ac_status" >&5
15380   (exit $ac_status); }; }; then
15381
15382                         cf_cv_regex_hdrs=$cf_regex_hdr
15383                         break
15384
15385 else
15386   echo "$as_me: failed program was:" >&5
15387 cat conftest.$ac_ext >&5
15388 fi
15389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15390         done
15391         ;;
15392 (*)
15393         for cf_regex_hdr in regex.h
15394         do
15395                 cat >conftest.$ac_ext <<_ACEOF
15396 #line 15396 "configure"
15397 #include "confdefs.h"
15398 #include <sys/types.h>
15399 #include <$cf_regex_hdr>
15400 int
15401 main ()
15402 {
15403
15404                         regex_t *p;
15405                         int x = regcomp(p, "", 0);
15406                         int y = regexec(p, "", 0, 0, 0);
15407                         regfree(p);
15408
15409   ;
15410   return 0;
15411 }
15412 _ACEOF
15413 rm -f conftest.$ac_objext conftest$ac_exeext
15414 if { (eval echo "$as_me:15414: \"$ac_link\"") >&5
15415   (eval $ac_link) 2>&5
15416   ac_status=$?
15417   echo "$as_me:15417: \$? = $ac_status" >&5
15418   (exit $ac_status); } &&
15419          { ac_try='test -s conftest$ac_exeext'
15420   { (eval echo "$as_me:15420: \"$ac_try\"") >&5
15421   (eval $ac_try) 2>&5
15422   ac_status=$?
15423   echo "$as_me:15423: \$? = $ac_status" >&5
15424   (exit $ac_status); }; }; then
15425
15426                         cf_cv_regex_hdrs=$cf_regex_hdr
15427                         break
15428
15429 else
15430   echo "$as_me: failed program was:" >&5
15431 cat conftest.$ac_ext >&5
15432 fi
15433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15434         done
15435         ;;
15436 esac
15437
15438 fi
15439 echo "$as_me:15439: result: $cf_cv_regex_hdrs" >&5
15440 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15441
15442 case $cf_cv_regex_hdrs in
15443         (no)            { echo "$as_me:15443: WARNING: no regular expression header found" >&5
15444 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15445         (regex.h)
15446 cat >>confdefs.h <<\EOF
15447 #define HAVE_REGEX_H_FUNCS 1
15448 EOF
15449  ;;
15450         (regexp.h)
15451 cat >>confdefs.h <<\EOF
15452 #define HAVE_REGEXP_H_FUNCS 1
15453 EOF
15454  ;;
15455         (regexpr.h)
15456 cat >>confdefs.h <<\EOF
15457 #define HAVE_REGEXPR_H_FUNCS 1
15458 EOF
15459  ;;
15460 esac
15461
15462 for ac_header in \
15463 fcntl.h \
15464 getopt.h \
15465 limits.h \
15466 locale.h \
15467 math.h \
15468 poll.h \
15469 sys/bsdtypes.h \
15470 sys/ioctl.h \
15471 sys/param.h \
15472 sys/poll.h \
15473 sys/select.h \
15474 sys/time.h \
15475 sys/times.h \
15476 ttyent.h \
15477 unistd.h \
15478 wctype.h \
15479
15480 do
15481 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15482 echo "$as_me:15482: checking for $ac_header" >&5
15483 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15484 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15485   echo $ECHO_N "(cached) $ECHO_C" >&6
15486 else
15487   cat >conftest.$ac_ext <<_ACEOF
15488 #line 15488 "configure"
15489 #include "confdefs.h"
15490 #include <$ac_header>
15491 _ACEOF
15492 if { (eval echo "$as_me:15492: \"$ac_cpp conftest.$ac_ext\"") >&5
15493   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15494   ac_status=$?
15495   egrep -v '^ *\+' conftest.er1 >conftest.err
15496   rm -f conftest.er1
15497   cat conftest.err >&5
15498   echo "$as_me:15498: \$? = $ac_status" >&5
15499   (exit $ac_status); } >/dev/null; then
15500   if test -s conftest.err; then
15501     ac_cpp_err=$ac_c_preproc_warn_flag
15502   else
15503     ac_cpp_err=
15504   fi
15505 else
15506   ac_cpp_err=yes
15507 fi
15508 if test -z "$ac_cpp_err"; then
15509   eval "$as_ac_Header=yes"
15510 else
15511   echo "$as_me: failed program was:" >&5
15512   cat conftest.$ac_ext >&5
15513   eval "$as_ac_Header=no"
15514 fi
15515 rm -f conftest.err conftest.$ac_ext
15516 fi
15517 echo "$as_me:15517: result: `eval echo '${'$as_ac_Header'}'`" >&5
15518 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15519 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15520   cat >>confdefs.h <<EOF
15521 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15522 EOF
15523
15524 fi
15525 done
15526
15527 for ac_header in unistd.h getopt.h
15528 do
15529 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15530 echo "$as_me:15530: checking for $ac_header" >&5
15531 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15532 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15533   echo $ECHO_N "(cached) $ECHO_C" >&6
15534 else
15535   cat >conftest.$ac_ext <<_ACEOF
15536 #line 15536 "configure"
15537 #include "confdefs.h"
15538 #include <$ac_header>
15539 _ACEOF
15540 if { (eval echo "$as_me:15540: \"$ac_cpp conftest.$ac_ext\"") >&5
15541   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15542   ac_status=$?
15543   egrep -v '^ *\+' conftest.er1 >conftest.err
15544   rm -f conftest.er1
15545   cat conftest.err >&5
15546   echo "$as_me:15546: \$? = $ac_status" >&5
15547   (exit $ac_status); } >/dev/null; then
15548   if test -s conftest.err; then
15549     ac_cpp_err=$ac_c_preproc_warn_flag
15550   else
15551     ac_cpp_err=
15552   fi
15553 else
15554   ac_cpp_err=yes
15555 fi
15556 if test -z "$ac_cpp_err"; then
15557   eval "$as_ac_Header=yes"
15558 else
15559   echo "$as_me: failed program was:" >&5
15560   cat conftest.$ac_ext >&5
15561   eval "$as_ac_Header=no"
15562 fi
15563 rm -f conftest.err conftest.$ac_ext
15564 fi
15565 echo "$as_me:15565: result: `eval echo '${'$as_ac_Header'}'`" >&5
15566 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15567 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15568   cat >>confdefs.h <<EOF
15569 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15570 EOF
15571
15572 fi
15573 done
15574
15575 echo "$as_me:15575: checking for header declaring getopt variables" >&5
15576 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15577 if test "${cf_cv_getopt_header+set}" = set; then
15578   echo $ECHO_N "(cached) $ECHO_C" >&6
15579 else
15580
15581 cf_cv_getopt_header=none
15582 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15583 do
15584 cat >conftest.$ac_ext <<_ACEOF
15585 #line 15585 "configure"
15586 #include "confdefs.h"
15587
15588 #include <$cf_header>
15589 int
15590 main ()
15591 {
15592 int x = optind; char *y = optarg
15593   ;
15594   return 0;
15595 }
15596 _ACEOF
15597 rm -f conftest.$ac_objext
15598 if { (eval echo "$as_me:15598: \"$ac_compile\"") >&5
15599   (eval $ac_compile) 2>&5
15600   ac_status=$?
15601   echo "$as_me:15601: \$? = $ac_status" >&5
15602   (exit $ac_status); } &&
15603          { ac_try='test -s conftest.$ac_objext'
15604   { (eval echo "$as_me:15604: \"$ac_try\"") >&5
15605   (eval $ac_try) 2>&5
15606   ac_status=$?
15607   echo "$as_me:15607: \$? = $ac_status" >&5
15608   (exit $ac_status); }; }; then
15609   cf_cv_getopt_header=$cf_header
15610  break
15611 else
15612   echo "$as_me: failed program was:" >&5
15613 cat conftest.$ac_ext >&5
15614 fi
15615 rm -f conftest.$ac_objext conftest.$ac_ext
15616 done
15617
15618 fi
15619 echo "$as_me:15619: result: $cf_cv_getopt_header" >&5
15620 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15621 if test $cf_cv_getopt_header != none ; then
15622
15623 cat >>confdefs.h <<\EOF
15624 #define HAVE_GETOPT_HEADER 1
15625 EOF
15626
15627 fi
15628 if test $cf_cv_getopt_header = getopt.h ; then
15629
15630 cat >>confdefs.h <<\EOF
15631 #define NEED_GETOPT_H 1
15632 EOF
15633
15634 fi
15635
15636 # check for ISC (this may also define _POSIX_SOURCE)
15637 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15638 if test "x$ISC" = xyes ; then
15639
15640 echo "$as_me:15640: checking for main in -lcposix" >&5
15641 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15642 if test "${ac_cv_lib_cposix_main+set}" = set; then
15643   echo $ECHO_N "(cached) $ECHO_C" >&6
15644 else
15645   ac_check_lib_save_LIBS=$LIBS
15646 LIBS="-lcposix  $LIBS"
15647 cat >conftest.$ac_ext <<_ACEOF
15648 #line 15648 "configure"
15649 #include "confdefs.h"
15650
15651 int
15652 main ()
15653 {
15654 main ();
15655   ;
15656   return 0;
15657 }
15658 _ACEOF
15659 rm -f conftest.$ac_objext conftest$ac_exeext
15660 if { (eval echo "$as_me:15660: \"$ac_link\"") >&5
15661   (eval $ac_link) 2>&5
15662   ac_status=$?
15663   echo "$as_me:15663: \$? = $ac_status" >&5
15664   (exit $ac_status); } &&
15665          { ac_try='test -s conftest$ac_exeext'
15666   { (eval echo "$as_me:15666: \"$ac_try\"") >&5
15667   (eval $ac_try) 2>&5
15668   ac_status=$?
15669   echo "$as_me:15669: \$? = $ac_status" >&5
15670   (exit $ac_status); }; }; then
15671   ac_cv_lib_cposix_main=yes
15672 else
15673   echo "$as_me: failed program was:" >&5
15674 cat conftest.$ac_ext >&5
15675 ac_cv_lib_cposix_main=no
15676 fi
15677 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15678 LIBS=$ac_check_lib_save_LIBS
15679 fi
15680 echo "$as_me:15680: result: $ac_cv_lib_cposix_main" >&5
15681 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15682 if test $ac_cv_lib_cposix_main = yes; then
15683   cat >>confdefs.h <<EOF
15684 #define HAVE_LIBCPOSIX 1
15685 EOF
15686
15687   LIBS="-lcposix $LIBS"
15688
15689 fi
15690
15691         echo "$as_me:15691: checking for bzero in -linet" >&5
15692 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15693 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15694   echo $ECHO_N "(cached) $ECHO_C" >&6
15695 else
15696   ac_check_lib_save_LIBS=$LIBS
15697 LIBS="-linet  $LIBS"
15698 cat >conftest.$ac_ext <<_ACEOF
15699 #line 15699 "configure"
15700 #include "confdefs.h"
15701
15702 /* Override any gcc2 internal prototype to avoid an error.  */
15703 #ifdef __cplusplus
15704 extern "C"
15705 #endif
15706 /* We use char because int might match the return type of a gcc2
15707    builtin and then its argument prototype would still apply.  */
15708 char bzero ();
15709 int
15710 main ()
15711 {
15712 bzero ();
15713   ;
15714   return 0;
15715 }
15716 _ACEOF
15717 rm -f conftest.$ac_objext conftest$ac_exeext
15718 if { (eval echo "$as_me:15718: \"$ac_link\"") >&5
15719   (eval $ac_link) 2>&5
15720   ac_status=$?
15721   echo "$as_me:15721: \$? = $ac_status" >&5
15722   (exit $ac_status); } &&
15723          { ac_try='test -s conftest$ac_exeext'
15724   { (eval echo "$as_me:15724: \"$ac_try\"") >&5
15725   (eval $ac_try) 2>&5
15726   ac_status=$?
15727   echo "$as_me:15727: \$? = $ac_status" >&5
15728   (exit $ac_status); }; }; then
15729   ac_cv_lib_inet_bzero=yes
15730 else
15731   echo "$as_me: failed program was:" >&5
15732 cat conftest.$ac_ext >&5
15733 ac_cv_lib_inet_bzero=no
15734 fi
15735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15736 LIBS=$ac_check_lib_save_LIBS
15737 fi
15738 echo "$as_me:15738: result: $ac_cv_lib_inet_bzero" >&5
15739 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15740 if test $ac_cv_lib_inet_bzero = yes; then
15741
15742 cf_add_libs="-linet"
15743 # Filter out duplicates - this happens with badly-designed ".pc" files...
15744 for cf_add_1lib in $LIBS
15745 do
15746         for cf_add_2lib in $cf_add_libs
15747         do
15748                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15749                 then
15750                         cf_add_1lib=
15751                         break
15752                 fi
15753         done
15754         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15755 done
15756 LIBS="$cf_add_libs"
15757
15758 fi
15759 fi
15760
15761 echo "$as_me:15761: checking if sys/time.h works with sys/select.h" >&5
15762 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15763 if test "${cf_cv_sys_time_select+set}" = set; then
15764   echo $ECHO_N "(cached) $ECHO_C" >&6
15765 else
15766
15767 cat >conftest.$ac_ext <<_ACEOF
15768 #line 15768 "configure"
15769 #include "confdefs.h"
15770
15771 #include <sys/types.h>
15772 #ifdef HAVE_SYS_TIME_H
15773 #include <sys/time.h>
15774 #endif
15775 #ifdef HAVE_SYS_SELECT_H
15776 #include <sys/select.h>
15777 #endif
15778
15779 int
15780 main ()
15781 {
15782
15783   ;
15784   return 0;
15785 }
15786 _ACEOF
15787 rm -f conftest.$ac_objext
15788 if { (eval echo "$as_me:15788: \"$ac_compile\"") >&5
15789   (eval $ac_compile) 2>&5
15790   ac_status=$?
15791   echo "$as_me:15791: \$? = $ac_status" >&5
15792   (exit $ac_status); } &&
15793          { ac_try='test -s conftest.$ac_objext'
15794   { (eval echo "$as_me:15794: \"$ac_try\"") >&5
15795   (eval $ac_try) 2>&5
15796   ac_status=$?
15797   echo "$as_me:15797: \$? = $ac_status" >&5
15798   (exit $ac_status); }; }; then
15799   cf_cv_sys_time_select=yes
15800 else
15801   echo "$as_me: failed program was:" >&5
15802 cat conftest.$ac_ext >&5
15803 cf_cv_sys_time_select=no
15804 fi
15805 rm -f conftest.$ac_objext conftest.$ac_ext
15806
15807 fi
15808
15809 echo "$as_me:15809: result: $cf_cv_sys_time_select" >&5
15810 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15811 test "$cf_cv_sys_time_select" = yes &&
15812 cat >>confdefs.h <<\EOF
15813 #define HAVE_SYS_TIME_SELECT 1
15814 EOF
15815
15816 ###     checks for compiler characteristics
15817 ac_ext=c
15818 ac_cpp='$CPP $CPPFLAGS'
15819 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15820 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15821 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15822 ac_main_return=return
15823
15824 echo "$as_me:15824: checking for an ANSI C-conforming const" >&5
15825 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15826 if test "${ac_cv_c_const+set}" = set; then
15827   echo $ECHO_N "(cached) $ECHO_C" >&6
15828 else
15829   cat >conftest.$ac_ext <<_ACEOF
15830 #line 15830 "configure"
15831 #include "confdefs.h"
15832
15833 int
15834 main ()
15835 {
15836 /* FIXME: Include the comments suggested by Paul. */
15837 #ifndef __cplusplus
15838   /* Ultrix mips cc rejects this.  */
15839   typedef int charset[2];
15840   const charset x;
15841   /* SunOS 4.1.1 cc rejects this.  */
15842   char const *const *ccp;
15843   char **p;
15844   /* NEC SVR4.0.2 mips cc rejects this.  */
15845   struct point {int x, y;};
15846   static struct point const zero = {0,0};
15847   /* AIX XL C 1.02.0.0 rejects this.
15848      It does not let you subtract one const X* pointer from another in
15849      an arm of an if-expression whose if-part is not a constant
15850      expression */
15851   const char *g = "string";
15852   ccp = &g + (g ? g-g : 0);
15853   /* HPUX 7.0 cc rejects these. */
15854   ++ccp;
15855   p = (char**) ccp;
15856   ccp = (char const *const *) p;
15857   { /* SCO 3.2v4 cc rejects this.  */
15858     char *t;
15859     char const *s = 0 ? (char *) 0 : (char const *) 0;
15860
15861     *t++ = 0;
15862   }
15863   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15864     int x[] = {25, 17};
15865     const int *foo = &x[0];
15866     ++foo;
15867   }
15868   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15869     typedef const int *iptr;
15870     iptr p = 0;
15871     ++p;
15872   }
15873   { /* AIX XL C 1.02.0.0 rejects this saying
15874        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15875     struct s { int j; const int *ap[3]; };
15876     struct s *b; b->j = 5;
15877   }
15878   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15879     const int foo = 10;
15880   }
15881 #endif
15882
15883   ;
15884   return 0;
15885 }
15886 _ACEOF
15887 rm -f conftest.$ac_objext
15888 if { (eval echo "$as_me:15888: \"$ac_compile\"") >&5
15889   (eval $ac_compile) 2>&5
15890   ac_status=$?
15891   echo "$as_me:15891: \$? = $ac_status" >&5
15892   (exit $ac_status); } &&
15893          { ac_try='test -s conftest.$ac_objext'
15894   { (eval echo "$as_me:15894: \"$ac_try\"") >&5
15895   (eval $ac_try) 2>&5
15896   ac_status=$?
15897   echo "$as_me:15897: \$? = $ac_status" >&5
15898   (exit $ac_status); }; }; then
15899   ac_cv_c_const=yes
15900 else
15901   echo "$as_me: failed program was:" >&5
15902 cat conftest.$ac_ext >&5
15903 ac_cv_c_const=no
15904 fi
15905 rm -f conftest.$ac_objext conftest.$ac_ext
15906 fi
15907 echo "$as_me:15907: result: $ac_cv_c_const" >&5
15908 echo "${ECHO_T}$ac_cv_c_const" >&6
15909 if test $ac_cv_c_const = no; then
15910
15911 cat >>confdefs.h <<\EOF
15912 #define const
15913 EOF
15914
15915 fi
15916
15917 echo "$as_me:15917: checking for inline" >&5
15918 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15919 if test "${ac_cv_c_inline+set}" = set; then
15920   echo $ECHO_N "(cached) $ECHO_C" >&6
15921 else
15922   ac_cv_c_inline=no
15923 for ac_kw in inline __inline__ __inline; do
15924   cat >conftest.$ac_ext <<_ACEOF
15925 #line 15925 "configure"
15926 #include "confdefs.h"
15927 #ifndef __cplusplus
15928 static $ac_kw int static_foo () {return 0; }
15929 $ac_kw int foo () {return 0; }
15930 #endif
15931
15932 _ACEOF
15933 rm -f conftest.$ac_objext
15934 if { (eval echo "$as_me:15934: \"$ac_compile\"") >&5
15935   (eval $ac_compile) 2>&5
15936   ac_status=$?
15937   echo "$as_me:15937: \$? = $ac_status" >&5
15938   (exit $ac_status); } &&
15939          { ac_try='test -s conftest.$ac_objext'
15940   { (eval echo "$as_me:15940: \"$ac_try\"") >&5
15941   (eval $ac_try) 2>&5
15942   ac_status=$?
15943   echo "$as_me:15943: \$? = $ac_status" >&5
15944   (exit $ac_status); }; }; then
15945   ac_cv_c_inline=$ac_kw; break
15946 else
15947   echo "$as_me: failed program was:" >&5
15948 cat conftest.$ac_ext >&5
15949 fi
15950 rm -f conftest.$ac_objext conftest.$ac_ext
15951 done
15952
15953 fi
15954 echo "$as_me:15954: result: $ac_cv_c_inline" >&5
15955 echo "${ECHO_T}$ac_cv_c_inline" >&6
15956 case $ac_cv_c_inline in
15957   inline | yes) ;;
15958   no)
15959 cat >>confdefs.h <<\EOF
15960 #define inline
15961 EOF
15962  ;;
15963   *)  cat >>confdefs.h <<EOF
15964 #define inline $ac_cv_c_inline
15965 EOF
15966  ;;
15967 esac
15968
15969 NCURSES_INLINE=
15970 if test "$ac_cv_c_inline" != no ; then
15971         NCURSES_INLINE=inline
15972         if test "$INTEL_COMPILER" = yes
15973         then
15974                 :
15975         elif test "$CLANG_COMPILER" = yes
15976         then
15977                 :
15978         elif test "$GCC" = yes
15979         then
15980                 echo "$as_me:15980: checking if $CC supports options to tune inlining" >&5
15981 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15982 if test "${cf_cv_gcc_inline+set}" = set; then
15983   echo $ECHO_N "(cached) $ECHO_C" >&6
15984 else
15985
15986                 cf_save_CFLAGS=$CFLAGS
15987                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15988                 cat >conftest.$ac_ext <<_ACEOF
15989 #line 15989 "configure"
15990 #include "confdefs.h"
15991 inline int foo(void) { return 1; }
15992 int
15993 main ()
15994 {
15995 ${cf_cv_main_return:-return} foo()
15996   ;
15997   return 0;
15998 }
15999 _ACEOF
16000 rm -f conftest.$ac_objext
16001 if { (eval echo "$as_me:16001: \"$ac_compile\"") >&5
16002   (eval $ac_compile) 2>&5
16003   ac_status=$?
16004   echo "$as_me:16004: \$? = $ac_status" >&5
16005   (exit $ac_status); } &&
16006          { ac_try='test -s conftest.$ac_objext'
16007   { (eval echo "$as_me:16007: \"$ac_try\"") >&5
16008   (eval $ac_try) 2>&5
16009   ac_status=$?
16010   echo "$as_me:16010: \$? = $ac_status" >&5
16011   (exit $ac_status); }; }; then
16012   cf_cv_gcc_inline=yes
16013 else
16014   echo "$as_me: failed program was:" >&5
16015 cat conftest.$ac_ext >&5
16016 cf_cv_gcc_inline=no
16017 fi
16018 rm -f conftest.$ac_objext conftest.$ac_ext
16019                 CFLAGS=$cf_save_CFLAGS
16020
16021 fi
16022 echo "$as_me:16022: result: $cf_cv_gcc_inline" >&5
16023 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16024                 if test "$cf_cv_gcc_inline" = yes ; then
16025
16026 cf_fix_cppflags=no
16027 cf_new_cflags=
16028 cf_new_cppflags=
16029 cf_new_extra_cppflags=
16030
16031 for cf_add_cflags in --param max-inline-insns-single=1200
16032 do
16033 case $cf_fix_cppflags in
16034 (no)
16035         case $cf_add_cflags in
16036         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16037                 case $cf_add_cflags in
16038                 (-D*)
16039                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16040
16041                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16042                                 && test -z "${cf_tst_cflags}" \
16043                                 && cf_fix_cppflags=yes
16044
16045                         if test $cf_fix_cppflags = yes ; then
16046                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16047                                 continue
16048                         elif test "${cf_tst_cflags}" = "\"'" ; then
16049                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16050                                 continue
16051                         fi
16052                         ;;
16053                 esac
16054                 case "$CPPFLAGS" in
16055                 (*$cf_add_cflags)
16056                         ;;
16057                 (*)
16058                         case $cf_add_cflags in
16059                         (-D*)
16060                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16061
16062 CPPFLAGS=`echo "$CPPFLAGS" | \
16063         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16064                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16065
16066                                 ;;
16067                         esac
16068                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16069                         ;;
16070                 esac
16071                 ;;
16072         (*)
16073                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16074                 ;;
16075         esac
16076         ;;
16077 (yes)
16078         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16079
16080         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16081
16082         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16083                 && test -z "${cf_tst_cflags}" \
16084                 && cf_fix_cppflags=no
16085         ;;
16086 esac
16087 done
16088
16089 if test -n "$cf_new_cflags" ; then
16090
16091         CFLAGS="$CFLAGS $cf_new_cflags"
16092 fi
16093
16094 if test -n "$cf_new_cppflags" ; then
16095
16096         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16097 fi
16098
16099 if test -n "$cf_new_extra_cppflags" ; then
16100
16101         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16102 fi
16103
16104                 fi
16105         fi
16106 fi
16107
16108 echo "$as_me:16108: checking for signal global datatype" >&5
16109 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16110 if test "${cf_cv_sig_atomic_t+set}" = set; then
16111   echo $ECHO_N "(cached) $ECHO_C" >&6
16112 else
16113
16114         for cf_type in \
16115                 "volatile sig_atomic_t" \
16116                 "sig_atomic_t" \
16117                 "int"
16118         do
16119         cat >conftest.$ac_ext <<_ACEOF
16120 #line 16120 "configure"
16121 #include "confdefs.h"
16122
16123 #include <sys/types.h>
16124 #include <signal.h>
16125 #include <stdio.h>
16126
16127 extern $cf_type x;
16128 $cf_type x;
16129 static void handler(int sig)
16130 {
16131         x = 5;
16132 }
16133 int
16134 main ()
16135 {
16136 signal(SIGINT, handler);
16137                  x = 1
16138   ;
16139   return 0;
16140 }
16141 _ACEOF
16142 rm -f conftest.$ac_objext
16143 if { (eval echo "$as_me:16143: \"$ac_compile\"") >&5
16144   (eval $ac_compile) 2>&5
16145   ac_status=$?
16146   echo "$as_me:16146: \$? = $ac_status" >&5
16147   (exit $ac_status); } &&
16148          { ac_try='test -s conftest.$ac_objext'
16149   { (eval echo "$as_me:16149: \"$ac_try\"") >&5
16150   (eval $ac_try) 2>&5
16151   ac_status=$?
16152   echo "$as_me:16152: \$? = $ac_status" >&5
16153   (exit $ac_status); }; }; then
16154   cf_cv_sig_atomic_t=$cf_type
16155 else
16156   echo "$as_me: failed program was:" >&5
16157 cat conftest.$ac_ext >&5
16158 cf_cv_sig_atomic_t=no
16159 fi
16160 rm -f conftest.$ac_objext conftest.$ac_ext
16161                 test "$cf_cv_sig_atomic_t" != no && break
16162         done
16163
16164 fi
16165
16166 echo "$as_me:16166: result: $cf_cv_sig_atomic_t" >&5
16167 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16168 test "$cf_cv_sig_atomic_t" != no &&
16169 cat >>confdefs.h <<EOF
16170 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16171 EOF
16172
16173 if test $NCURSES_CHTYPE = auto ; then
16174
16175 echo "$as_me:16175: checking for type of chtype" >&5
16176 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16177 if test "${cf_cv_typeof_chtype+set}" = set; then
16178   echo $ECHO_N "(cached) $ECHO_C" >&6
16179 else
16180
16181                 if test "$cross_compiling" = yes; then
16182   cf_cv_typeof_chtype=long
16183 else
16184   cat >conftest.$ac_ext <<_ACEOF
16185 #line 16185 "configure"
16186 #include "confdefs.h"
16187
16188 #define WANT_BITS 31
16189 #include <stdio.h>
16190 int main()
16191 {
16192         FILE *fp = fopen("cf_test.out", "w");
16193         if (fp != 0) {
16194                 char *result = "long";
16195                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16196                         int n;
16197                         unsigned int x, y;
16198                         for (n = 0; n < WANT_BITS; n++) {
16199                                 x = (1 << n);
16200                                 y = (x >> n);
16201                                 if (y != 1 || x == 0) {
16202                                         x = 0;
16203                                         break;
16204                                 }
16205                         }
16206                         /*
16207                          * If x is nonzero, an int is big enough for the bits
16208                          * that we want.
16209                          */
16210                         result = (x != 0) ? "int" : "long";
16211                 }
16212                 fputs(result, fp);
16213                 fclose(fp);
16214         }
16215         ${cf_cv_main_return:-return}(0);
16216 }
16217
16218 _ACEOF
16219 rm -f conftest$ac_exeext
16220 if { (eval echo "$as_me:16220: \"$ac_link\"") >&5
16221   (eval $ac_link) 2>&5
16222   ac_status=$?
16223   echo "$as_me:16223: \$? = $ac_status" >&5
16224   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16225   { (eval echo "$as_me:16225: \"$ac_try\"") >&5
16226   (eval $ac_try) 2>&5
16227   ac_status=$?
16228   echo "$as_me:16228: \$? = $ac_status" >&5
16229   (exit $ac_status); }; }; then
16230   cf_cv_typeof_chtype=`cat cf_test.out`
16231 else
16232   echo "$as_me: program exited with status $ac_status" >&5
16233 echo "$as_me: failed program was:" >&5
16234 cat conftest.$ac_ext >&5
16235 cf_cv_typeof_chtype=long
16236 fi
16237 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16238 fi
16239                 rm -f cf_test.out
16240
16241 fi
16242
16243 echo "$as_me:16243: result: $cf_cv_typeof_chtype" >&5
16244 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16245
16246 cat >>confdefs.h <<EOF
16247 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16248 EOF
16249
16250 else
16251         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16252 fi
16253 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16254
16255 echo "$as_me:16255: checking if unsigned literals are legal" >&5
16256 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16257 if test "${cf_cv_unsigned_literals+set}" = set; then
16258   echo $ECHO_N "(cached) $ECHO_C" >&6
16259 else
16260
16261         cat >conftest.$ac_ext <<_ACEOF
16262 #line 16262 "configure"
16263 #include "confdefs.h"
16264
16265 int
16266 main ()
16267 {
16268 long x = 1L + 1UL + 1U + 1
16269   ;
16270   return 0;
16271 }
16272 _ACEOF
16273 rm -f conftest.$ac_objext
16274 if { (eval echo "$as_me:16274: \"$ac_compile\"") >&5
16275   (eval $ac_compile) 2>&5
16276   ac_status=$?
16277   echo "$as_me:16277: \$? = $ac_status" >&5
16278   (exit $ac_status); } &&
16279          { ac_try='test -s conftest.$ac_objext'
16280   { (eval echo "$as_me:16280: \"$ac_try\"") >&5
16281   (eval $ac_try) 2>&5
16282   ac_status=$?
16283   echo "$as_me:16283: \$? = $ac_status" >&5
16284   (exit $ac_status); }; }; then
16285   cf_cv_unsigned_literals=yes
16286 else
16287   echo "$as_me: failed program was:" >&5
16288 cat conftest.$ac_ext >&5
16289 cf_cv_unsigned_literals=no
16290 fi
16291 rm -f conftest.$ac_objext conftest.$ac_ext
16292
16293 fi
16294
16295 echo "$as_me:16295: result: $cf_cv_unsigned_literals" >&5
16296 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16297
16298 cf_cv_1UL="1"
16299 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16300 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16301
16302 if test $NCURSES_MMASK_T = auto ; then
16303         cf_cv_typeof_mmask_t=long
16304 else
16305         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16306 fi
16307 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16308
16309 ###     Checks for external-data
16310
16311 echo "$as_me:16311: checking if external errno is declared" >&5
16312 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16313 if test "${cf_cv_dcl_errno+set}" = set; then
16314   echo $ECHO_N "(cached) $ECHO_C" >&6
16315 else
16316
16317         cat >conftest.$ac_ext <<_ACEOF
16318 #line 16318 "configure"
16319 #include "confdefs.h"
16320
16321 #ifdef HAVE_STDLIB_H
16322 #include <stdlib.h>
16323 #endif
16324 #include <stdio.h>
16325 #include <sys/types.h>
16326 #include <errno.h>
16327 int
16328 main ()
16329 {
16330 int x = (int) errno
16331   ;
16332   return 0;
16333 }
16334 _ACEOF
16335 rm -f conftest.$ac_objext
16336 if { (eval echo "$as_me:16336: \"$ac_compile\"") >&5
16337   (eval $ac_compile) 2>&5
16338   ac_status=$?
16339   echo "$as_me:16339: \$? = $ac_status" >&5
16340   (exit $ac_status); } &&
16341          { ac_try='test -s conftest.$ac_objext'
16342   { (eval echo "$as_me:16342: \"$ac_try\"") >&5
16343   (eval $ac_try) 2>&5
16344   ac_status=$?
16345   echo "$as_me:16345: \$? = $ac_status" >&5
16346   (exit $ac_status); }; }; then
16347   cf_cv_dcl_errno=yes
16348 else
16349   echo "$as_me: failed program was:" >&5
16350 cat conftest.$ac_ext >&5
16351 cf_cv_dcl_errno=no
16352 fi
16353 rm -f conftest.$ac_objext conftest.$ac_ext
16354
16355 fi
16356 echo "$as_me:16356: result: $cf_cv_dcl_errno" >&5
16357 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16358
16359 if test "$cf_cv_dcl_errno" = no ; then
16360
16361 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16362
16363         cat >>confdefs.h <<EOF
16364 #define $cf_result 1
16365 EOF
16366
16367 fi
16368
16369 # It's possible (for near-UNIX clones) that the data doesn't exist
16370
16371 echo "$as_me:16371: checking if external errno exists" >&5
16372 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16373 if test "${cf_cv_have_errno+set}" = set; then
16374   echo $ECHO_N "(cached) $ECHO_C" >&6
16375 else
16376
16377         cat >conftest.$ac_ext <<_ACEOF
16378 #line 16378 "configure"
16379 #include "confdefs.h"
16380
16381 #undef errno
16382 extern int errno;
16383
16384 int
16385 main ()
16386 {
16387 errno = 2
16388   ;
16389   return 0;
16390 }
16391 _ACEOF
16392 rm -f conftest.$ac_objext conftest$ac_exeext
16393 if { (eval echo "$as_me:16393: \"$ac_link\"") >&5
16394   (eval $ac_link) 2>&5
16395   ac_status=$?
16396   echo "$as_me:16396: \$? = $ac_status" >&5
16397   (exit $ac_status); } &&
16398          { ac_try='test -s conftest$ac_exeext'
16399   { (eval echo "$as_me:16399: \"$ac_try\"") >&5
16400   (eval $ac_try) 2>&5
16401   ac_status=$?
16402   echo "$as_me:16402: \$? = $ac_status" >&5
16403   (exit $ac_status); }; }; then
16404   cf_cv_have_errno=yes
16405 else
16406   echo "$as_me: failed program was:" >&5
16407 cat conftest.$ac_ext >&5
16408 cf_cv_have_errno=no
16409 fi
16410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16411
16412 fi
16413 echo "$as_me:16413: result: $cf_cv_have_errno" >&5
16414 echo "${ECHO_T}$cf_cv_have_errno" >&6
16415
16416 if test "$cf_cv_have_errno" = yes ; then
16417
16418 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16419
16420         cat >>confdefs.h <<EOF
16421 #define $cf_result 1
16422 EOF
16423
16424 fi
16425
16426 echo "$as_me:16426: checking if data-only library module links" >&5
16427 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16428 if test "${cf_cv_link_dataonly+set}" = set; then
16429   echo $ECHO_N "(cached) $ECHO_C" >&6
16430 else
16431
16432         rm -f conftest.a
16433         cat >conftest.$ac_ext <<EOF
16434 #line 16434 "configure"
16435 int     testdata[3] = { 123, 456, 789 };
16436 EOF
16437         if { (eval echo "$as_me:16437: \"$ac_compile\"") >&5
16438   (eval $ac_compile) 2>&5
16439   ac_status=$?
16440   echo "$as_me:16440: \$? = $ac_status" >&5
16441   (exit $ac_status); } ; then
16442                 mv conftest.o data.o && \
16443                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16444         fi
16445         rm -f conftest.$ac_ext data.o
16446         cat >conftest.$ac_ext <<EOF
16447 #line 16447 "configure"
16448 int     testfunc()
16449 {
16450 #if defined(NeXT)
16451         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16452 #else
16453         extern int testdata[3];
16454         return testdata[0] == 123
16455            &&  testdata[1] == 456
16456            &&  testdata[2] == 789;
16457 #endif
16458 }
16459 EOF
16460         if { (eval echo "$as_me:16460: \"$ac_compile\"") >&5
16461   (eval $ac_compile) 2>&5
16462   ac_status=$?
16463   echo "$as_me:16463: \$? = $ac_status" >&5
16464   (exit $ac_status); }; then
16465                 mv conftest.o func.o && \
16466                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16467         fi
16468         rm -f conftest.$ac_ext func.o
16469         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16470         cf_saveLIBS="$LIBS"
16471         LIBS="conftest.a $LIBS"
16472         if test "$cross_compiling" = yes; then
16473   cf_cv_link_dataonly=unknown
16474 else
16475   cat >conftest.$ac_ext <<_ACEOF
16476 #line 16476 "configure"
16477 #include "confdefs.h"
16478
16479         int main()
16480         {
16481                 extern int testfunc();
16482                 ${cf_cv_main_return:-return} (!testfunc());
16483         }
16484
16485 _ACEOF
16486 rm -f conftest$ac_exeext
16487 if { (eval echo "$as_me:16487: \"$ac_link\"") >&5
16488   (eval $ac_link) 2>&5
16489   ac_status=$?
16490   echo "$as_me:16490: \$? = $ac_status" >&5
16491   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16492   { (eval echo "$as_me:16492: \"$ac_try\"") >&5
16493   (eval $ac_try) 2>&5
16494   ac_status=$?
16495   echo "$as_me:16495: \$? = $ac_status" >&5
16496   (exit $ac_status); }; }; then
16497   cf_cv_link_dataonly=yes
16498 else
16499   echo "$as_me: program exited with status $ac_status" >&5
16500 echo "$as_me: failed program was:" >&5
16501 cat conftest.$ac_ext >&5
16502 cf_cv_link_dataonly=no
16503 fi
16504 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16505 fi
16506         LIBS="$cf_saveLIBS"
16507
16508 fi
16509
16510 echo "$as_me:16510: result: $cf_cv_link_dataonly" >&5
16511 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16512
16513 if test "$cf_cv_link_dataonly" = no ; then
16514
16515 cat >>confdefs.h <<\EOF
16516 #define BROKEN_LINKER 1
16517 EOF
16518
16519         BROKEN_LINKER=1
16520 fi
16521
16522 ###     Checks for library functions.
16523
16524 for ac_func in \
16525 getcwd \
16526 getegid \
16527 geteuid \
16528 getopt \
16529 getttynam \
16530 issetugid \
16531 poll \
16532 putenv \
16533 remove \
16534 select \
16535 setbuf \
16536 setbuffer \
16537 setenv \
16538 setvbuf \
16539 sigaction \
16540 sigvec \
16541 strdup \
16542 strstr \
16543 tcgetpgrp \
16544 times \
16545 vsnprintf \
16546
16547 do
16548 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16549 echo "$as_me:16549: checking for $ac_func" >&5
16550 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16551 if eval "test \"\${$as_ac_var+set}\" = set"; then
16552   echo $ECHO_N "(cached) $ECHO_C" >&6
16553 else
16554   cat >conftest.$ac_ext <<_ACEOF
16555 #line 16555 "configure"
16556 #include "confdefs.h"
16557 /* System header to define __stub macros and hopefully few prototypes,
16558     which can conflict with char $ac_func (); below.  */
16559 #include <assert.h>
16560 /* Override any gcc2 internal prototype to avoid an error.  */
16561 #ifdef __cplusplus
16562 extern "C"
16563 #endif
16564 /* We use char because int might match the return type of a gcc2
16565    builtin and then its argument prototype would still apply.  */
16566 char $ac_func ();
16567 char (*f) ();
16568
16569 int
16570 main ()
16571 {
16572 /* The GNU C library defines this for functions which it implements
16573     to always fail with ENOSYS.  Some functions are actually named
16574     something starting with __ and the normal name is an alias.  */
16575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16576 choke me
16577 #else
16578 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16579 #endif
16580
16581   ;
16582   return 0;
16583 }
16584 _ACEOF
16585 rm -f conftest.$ac_objext conftest$ac_exeext
16586 if { (eval echo "$as_me:16586: \"$ac_link\"") >&5
16587   (eval $ac_link) 2>&5
16588   ac_status=$?
16589   echo "$as_me:16589: \$? = $ac_status" >&5
16590   (exit $ac_status); } &&
16591          { ac_try='test -s conftest$ac_exeext'
16592   { (eval echo "$as_me:16592: \"$ac_try\"") >&5
16593   (eval $ac_try) 2>&5
16594   ac_status=$?
16595   echo "$as_me:16595: \$? = $ac_status" >&5
16596   (exit $ac_status); }; }; then
16597   eval "$as_ac_var=yes"
16598 else
16599   echo "$as_me: failed program was:" >&5
16600 cat conftest.$ac_ext >&5
16601 eval "$as_ac_var=no"
16602 fi
16603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16604 fi
16605 echo "$as_me:16605: result: `eval echo '${'$as_ac_var'}'`" >&5
16606 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16607 if test `eval echo '${'$as_ac_var'}'` = yes; then
16608   cat >>confdefs.h <<EOF
16609 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16610 EOF
16611
16612 fi
16613 done
16614
16615 if test "x$ac_cv_func_getopt" = xno &&
16616    test "x$cf_with_progs$cf_with_tests" != xnono; then
16617         { { echo "$as_me:16617: error: getopt is required for building programs" >&5
16618 echo "$as_me: error: getopt is required for building programs" >&2;}
16619    { (exit 1); exit 1; }; }
16620 fi
16621
16622 if test "x$with_getcap" = "xyes" ; then
16623
16624 echo "$as_me:16624: checking for terminal-capability database functions" >&5
16625 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16626 if test "${cf_cv_cgetent+set}" = set; then
16627   echo $ECHO_N "(cached) $ECHO_C" >&6
16628 else
16629
16630 cat >conftest.$ac_ext <<_ACEOF
16631 #line 16631 "configure"
16632 #include "confdefs.h"
16633
16634 #include <stdlib.h>
16635 int
16636 main ()
16637 {
16638
16639         char temp[128];
16640         char *buf = temp;
16641         char *db_array = temp;
16642         cgetent(&buf, &db_array, "vt100");
16643         cgetcap(buf, "tc", '=');
16644         cgetmatch(buf, "tc");
16645
16646   ;
16647   return 0;
16648 }
16649 _ACEOF
16650 rm -f conftest.$ac_objext conftest$ac_exeext
16651 if { (eval echo "$as_me:16651: \"$ac_link\"") >&5
16652   (eval $ac_link) 2>&5
16653   ac_status=$?
16654   echo "$as_me:16654: \$? = $ac_status" >&5
16655   (exit $ac_status); } &&
16656          { ac_try='test -s conftest$ac_exeext'
16657   { (eval echo "$as_me:16657: \"$ac_try\"") >&5
16658   (eval $ac_try) 2>&5
16659   ac_status=$?
16660   echo "$as_me:16660: \$? = $ac_status" >&5
16661   (exit $ac_status); }; }; then
16662   cf_cv_cgetent=yes
16663 else
16664   echo "$as_me: failed program was:" >&5
16665 cat conftest.$ac_ext >&5
16666 cf_cv_cgetent=no
16667 fi
16668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16669
16670 fi
16671 echo "$as_me:16671: result: $cf_cv_cgetent" >&5
16672 echo "${ECHO_T}$cf_cv_cgetent" >&6
16673
16674 if test "$cf_cv_cgetent" = yes
16675 then
16676
16677 cat >>confdefs.h <<\EOF
16678 #define HAVE_BSD_CGETENT 1
16679 EOF
16680
16681 echo "$as_me:16681: checking if cgetent uses const parameter" >&5
16682 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16683 if test "${cf_cv_cgetent_const+set}" = set; then
16684   echo $ECHO_N "(cached) $ECHO_C" >&6
16685 else
16686
16687 cat >conftest.$ac_ext <<_ACEOF
16688 #line 16688 "configure"
16689 #include "confdefs.h"
16690
16691 #include <stdlib.h>
16692 int
16693 main ()
16694 {
16695
16696         char temp[128];
16697         char *buf = temp;
16698 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16699         const char *db_array = temp;
16700         cgetent(&buf, &db_array, "vt100");
16701 #endif
16702         cgetcap(buf, "tc", '=');
16703         cgetmatch(buf, "tc");
16704
16705   ;
16706   return 0;
16707 }
16708 _ACEOF
16709 rm -f conftest.$ac_objext conftest$ac_exeext
16710 if { (eval echo "$as_me:16710: \"$ac_link\"") >&5
16711   (eval $ac_link) 2>&5
16712   ac_status=$?
16713   echo "$as_me:16713: \$? = $ac_status" >&5
16714   (exit $ac_status); } &&
16715          { ac_try='test -s conftest$ac_exeext'
16716   { (eval echo "$as_me:16716: \"$ac_try\"") >&5
16717   (eval $ac_try) 2>&5
16718   ac_status=$?
16719   echo "$as_me:16719: \$? = $ac_status" >&5
16720   (exit $ac_status); }; }; then
16721   cf_cv_cgetent_const=yes
16722 else
16723   echo "$as_me: failed program was:" >&5
16724 cat conftest.$ac_ext >&5
16725 cf_cv_cgetent_const=no
16726 fi
16727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16728
16729 fi
16730 echo "$as_me:16730: result: $cf_cv_cgetent_const" >&5
16731 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16732         if test "$cf_cv_cgetent_const" = yes
16733         then
16734
16735 cat >>confdefs.h <<EOF
16736 #define CGETENT_CONST const
16737 EOF
16738
16739         fi
16740 fi
16741
16742 fi
16743
16744 echo "$as_me:16744: checking for isascii" >&5
16745 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16746 if test "${cf_cv_have_isascii+set}" = set; then
16747   echo $ECHO_N "(cached) $ECHO_C" >&6
16748 else
16749
16750         cat >conftest.$ac_ext <<_ACEOF
16751 #line 16751 "configure"
16752 #include "confdefs.h"
16753 #include <ctype.h>
16754 int
16755 main ()
16756 {
16757 int x = isascii(' ')
16758   ;
16759   return 0;
16760 }
16761 _ACEOF
16762 rm -f conftest.$ac_objext conftest$ac_exeext
16763 if { (eval echo "$as_me:16763: \"$ac_link\"") >&5
16764   (eval $ac_link) 2>&5
16765   ac_status=$?
16766   echo "$as_me:16766: \$? = $ac_status" >&5
16767   (exit $ac_status); } &&
16768          { ac_try='test -s conftest$ac_exeext'
16769   { (eval echo "$as_me:16769: \"$ac_try\"") >&5
16770   (eval $ac_try) 2>&5
16771   ac_status=$?
16772   echo "$as_me:16772: \$? = $ac_status" >&5
16773   (exit $ac_status); }; }; then
16774   cf_cv_have_isascii=yes
16775 else
16776   echo "$as_me: failed program was:" >&5
16777 cat conftest.$ac_ext >&5
16778 cf_cv_have_isascii=no
16779 fi
16780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16781
16782 fi
16783 echo "$as_me:16783: result: $cf_cv_have_isascii" >&5
16784 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16785 test "$cf_cv_have_isascii" = yes &&
16786 cat >>confdefs.h <<\EOF
16787 #define HAVE_ISASCII 1
16788 EOF
16789
16790 if test "$ac_cv_func_sigaction" = yes; then
16791 echo "$as_me:16791: checking whether sigaction needs _POSIX_SOURCE" >&5
16792 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16793 cat >conftest.$ac_ext <<_ACEOF
16794 #line 16794 "configure"
16795 #include "confdefs.h"
16796
16797 #include <sys/types.h>
16798 #include <signal.h>
16799 int
16800 main ()
16801 {
16802 struct sigaction act
16803   ;
16804   return 0;
16805 }
16806 _ACEOF
16807 rm -f conftest.$ac_objext
16808 if { (eval echo "$as_me:16808: \"$ac_compile\"") >&5
16809   (eval $ac_compile) 2>&5
16810   ac_status=$?
16811   echo "$as_me:16811: \$? = $ac_status" >&5
16812   (exit $ac_status); } &&
16813          { ac_try='test -s conftest.$ac_objext'
16814   { (eval echo "$as_me:16814: \"$ac_try\"") >&5
16815   (eval $ac_try) 2>&5
16816   ac_status=$?
16817   echo "$as_me:16817: \$? = $ac_status" >&5
16818   (exit $ac_status); }; }; then
16819   sigact_bad=no
16820 else
16821   echo "$as_me: failed program was:" >&5
16822 cat conftest.$ac_ext >&5
16823
16824 cat >conftest.$ac_ext <<_ACEOF
16825 #line 16825 "configure"
16826 #include "confdefs.h"
16827
16828 #define _POSIX_SOURCE
16829 #include <sys/types.h>
16830 #include <signal.h>
16831 int
16832 main ()
16833 {
16834 struct sigaction act
16835   ;
16836   return 0;
16837 }
16838 _ACEOF
16839 rm -f conftest.$ac_objext
16840 if { (eval echo "$as_me:16840: \"$ac_compile\"") >&5
16841   (eval $ac_compile) 2>&5
16842   ac_status=$?
16843   echo "$as_me:16843: \$? = $ac_status" >&5
16844   (exit $ac_status); } &&
16845          { ac_try='test -s conftest.$ac_objext'
16846   { (eval echo "$as_me:16846: \"$ac_try\"") >&5
16847   (eval $ac_try) 2>&5
16848   ac_status=$?
16849   echo "$as_me:16849: \$? = $ac_status" >&5
16850   (exit $ac_status); }; }; then
16851   sigact_bad=yes
16852
16853 cat >>confdefs.h <<\EOF
16854 #define _POSIX_SOURCE 1
16855 EOF
16856
16857 else
16858   echo "$as_me: failed program was:" >&5
16859 cat conftest.$ac_ext >&5
16860 sigact_bad=unknown
16861 fi
16862 rm -f conftest.$ac_objext conftest.$ac_ext
16863 fi
16864 rm -f conftest.$ac_objext conftest.$ac_ext
16865 echo "$as_me:16865: result: $sigact_bad" >&5
16866 echo "${ECHO_T}$sigact_bad" >&6
16867 fi
16868
16869 echo "$as_me:16869: checking if nanosleep really works" >&5
16870 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16871 if test "${cf_cv_func_nanosleep+set}" = set; then
16872   echo $ECHO_N "(cached) $ECHO_C" >&6
16873 else
16874
16875 if test "$cross_compiling" = yes; then
16876   cf_cv_func_nanosleep=unknown
16877 else
16878   cat >conftest.$ac_ext <<_ACEOF
16879 #line 16879 "configure"
16880 #include "confdefs.h"
16881
16882 #include <stdio.h>
16883 #include <errno.h>
16884 #include <time.h>
16885
16886 #ifdef HAVE_SYS_TIME_H
16887 #include <sys/time.h>
16888 #endif
16889
16890 int main() {
16891         struct timespec ts1, ts2;
16892         int code;
16893         ts1.tv_sec  = 0;
16894         ts1.tv_nsec = 750000000;
16895         ts2.tv_sec  = 0;
16896         ts2.tv_nsec = 0;
16897         errno = 0;
16898         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16899         ${cf_cv_main_return:-return}(code != 0);
16900 }
16901
16902 _ACEOF
16903 rm -f conftest$ac_exeext
16904 if { (eval echo "$as_me:16904: \"$ac_link\"") >&5
16905   (eval $ac_link) 2>&5
16906   ac_status=$?
16907   echo "$as_me:16907: \$? = $ac_status" >&5
16908   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16909   { (eval echo "$as_me:16909: \"$ac_try\"") >&5
16910   (eval $ac_try) 2>&5
16911   ac_status=$?
16912   echo "$as_me:16912: \$? = $ac_status" >&5
16913   (exit $ac_status); }; }; then
16914   cf_cv_func_nanosleep=yes
16915 else
16916   echo "$as_me: program exited with status $ac_status" >&5
16917 echo "$as_me: failed program was:" >&5
16918 cat conftest.$ac_ext >&5
16919 cf_cv_func_nanosleep=no
16920 fi
16921 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16922 fi
16923 fi
16924 echo "$as_me:16924: result: $cf_cv_func_nanosleep" >&5
16925 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16926
16927 test "$cf_cv_func_nanosleep" = "yes" &&
16928 cat >>confdefs.h <<\EOF
16929 #define HAVE_NANOSLEEP 1
16930 EOF
16931
16932 for ac_header in \
16933 termio.h \
16934 termios.h \
16935 unistd.h \
16936
16937 do
16938 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16939 echo "$as_me:16939: checking for $ac_header" >&5
16940 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16941 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16942   echo $ECHO_N "(cached) $ECHO_C" >&6
16943 else
16944   cat >conftest.$ac_ext <<_ACEOF
16945 #line 16945 "configure"
16946 #include "confdefs.h"
16947 #include <$ac_header>
16948 _ACEOF
16949 if { (eval echo "$as_me:16949: \"$ac_cpp conftest.$ac_ext\"") >&5
16950   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16951   ac_status=$?
16952   egrep -v '^ *\+' conftest.er1 >conftest.err
16953   rm -f conftest.er1
16954   cat conftest.err >&5
16955   echo "$as_me:16955: \$? = $ac_status" >&5
16956   (exit $ac_status); } >/dev/null; then
16957   if test -s conftest.err; then
16958     ac_cpp_err=$ac_c_preproc_warn_flag
16959   else
16960     ac_cpp_err=
16961   fi
16962 else
16963   ac_cpp_err=yes
16964 fi
16965 if test -z "$ac_cpp_err"; then
16966   eval "$as_ac_Header=yes"
16967 else
16968   echo "$as_me: failed program was:" >&5
16969   cat conftest.$ac_ext >&5
16970   eval "$as_ac_Header=no"
16971 fi
16972 rm -f conftest.err conftest.$ac_ext
16973 fi
16974 echo "$as_me:16974: result: `eval echo '${'$as_ac_Header'}'`" >&5
16975 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16976 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16977   cat >>confdefs.h <<EOF
16978 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16979 EOF
16980
16981 fi
16982 done
16983
16984 if test "$ISC" = yes ; then
16985
16986 for ac_header in sys/termio.h
16987 do
16988 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16989 echo "$as_me:16989: checking for $ac_header" >&5
16990 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16991 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16992   echo $ECHO_N "(cached) $ECHO_C" >&6
16993 else
16994   cat >conftest.$ac_ext <<_ACEOF
16995 #line 16995 "configure"
16996 #include "confdefs.h"
16997 #include <$ac_header>
16998 _ACEOF
16999 if { (eval echo "$as_me:16999: \"$ac_cpp conftest.$ac_ext\"") >&5
17000   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17001   ac_status=$?
17002   egrep -v '^ *\+' conftest.er1 >conftest.err
17003   rm -f conftest.er1
17004   cat conftest.err >&5
17005   echo "$as_me:17005: \$? = $ac_status" >&5
17006   (exit $ac_status); } >/dev/null; then
17007   if test -s conftest.err; then
17008     ac_cpp_err=$ac_c_preproc_warn_flag
17009   else
17010     ac_cpp_err=
17011   fi
17012 else
17013   ac_cpp_err=yes
17014 fi
17015 if test -z "$ac_cpp_err"; then
17016   eval "$as_ac_Header=yes"
17017 else
17018   echo "$as_me: failed program was:" >&5
17019   cat conftest.$ac_ext >&5
17020   eval "$as_ac_Header=no"
17021 fi
17022 rm -f conftest.err conftest.$ac_ext
17023 fi
17024 echo "$as_me:17024: result: `eval echo '${'$as_ac_Header'}'`" >&5
17025 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17026 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17027   cat >>confdefs.h <<EOF
17028 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17029 EOF
17030
17031 fi
17032 done
17033
17034 fi
17035 if test "$ac_cv_header_termios_h" = yes ; then
17036         case "$CFLAGS $CPPFLAGS" in
17037         (*-D_POSIX_SOURCE*)
17038                 termios_bad=dunno ;;
17039         (*)     termios_bad=maybe ;;
17040         esac
17041         if test "$termios_bad" = maybe ; then
17042         echo "$as_me:17042: checking whether termios.h needs _POSIX_SOURCE" >&5
17043 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17044         cat >conftest.$ac_ext <<_ACEOF
17045 #line 17045 "configure"
17046 #include "confdefs.h"
17047 #include <termios.h>
17048 int
17049 main ()
17050 {
17051 struct termios foo; int x = foo.c_iflag
17052   ;
17053   return 0;
17054 }
17055 _ACEOF
17056 rm -f conftest.$ac_objext
17057 if { (eval echo "$as_me:17057: \"$ac_compile\"") >&5
17058   (eval $ac_compile) 2>&5
17059   ac_status=$?
17060   echo "$as_me:17060: \$? = $ac_status" >&5
17061   (exit $ac_status); } &&
17062          { ac_try='test -s conftest.$ac_objext'
17063   { (eval echo "$as_me:17063: \"$ac_try\"") >&5
17064   (eval $ac_try) 2>&5
17065   ac_status=$?
17066   echo "$as_me:17066: \$? = $ac_status" >&5
17067   (exit $ac_status); }; }; then
17068   termios_bad=no
17069 else
17070   echo "$as_me: failed program was:" >&5
17071 cat conftest.$ac_ext >&5
17072
17073                 cat >conftest.$ac_ext <<_ACEOF
17074 #line 17074 "configure"
17075 #include "confdefs.h"
17076
17077 #define _POSIX_SOURCE
17078 #include <termios.h>
17079 int
17080 main ()
17081 {
17082 struct termios foo; int x = foo.c_iflag
17083   ;
17084   return 0;
17085 }
17086 _ACEOF
17087 rm -f conftest.$ac_objext
17088 if { (eval echo "$as_me:17088: \"$ac_compile\"") >&5
17089   (eval $ac_compile) 2>&5
17090   ac_status=$?
17091   echo "$as_me:17091: \$? = $ac_status" >&5
17092   (exit $ac_status); } &&
17093          { ac_try='test -s conftest.$ac_objext'
17094   { (eval echo "$as_me:17094: \"$ac_try\"") >&5
17095   (eval $ac_try) 2>&5
17096   ac_status=$?
17097   echo "$as_me:17097: \$? = $ac_status" >&5
17098   (exit $ac_status); }; }; then
17099   termios_bad=unknown
17100 else
17101   echo "$as_me: failed program was:" >&5
17102 cat conftest.$ac_ext >&5
17103 termios_bad=yes
17104 cat >>confdefs.h <<\EOF
17105 #define _POSIX_SOURCE 1
17106 EOF
17107
17108 fi
17109 rm -f conftest.$ac_objext conftest.$ac_ext
17110
17111 fi
17112 rm -f conftest.$ac_objext conftest.$ac_ext
17113         echo "$as_me:17113: result: $termios_bad" >&5
17114 echo "${ECHO_T}$termios_bad" >&6
17115         fi
17116 fi
17117
17118 echo "$as_me:17118: checking for tcgetattr" >&5
17119 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17120 if test "${cf_cv_have_tcgetattr+set}" = set; then
17121   echo $ECHO_N "(cached) $ECHO_C" >&6
17122 else
17123
17124 cat >conftest.$ac_ext <<_ACEOF
17125 #line 17125 "configure"
17126 #include "confdefs.h"
17127
17128 #include <sys/types.h>
17129 #ifdef HAVE_UNISTD_H
17130 #include <unistd.h>
17131 #endif
17132 #ifdef HAVE_TERMIOS_H
17133 #include <termios.h>
17134 #define TTY struct termios
17135 #else
17136 #ifdef HAVE_TERMIO_H
17137 #include <termio.h>
17138 #define TTY struct termio
17139 #endif
17140 #endif
17141
17142 int
17143 main ()
17144 {
17145
17146 TTY foo;
17147 tcgetattr(1, &foo);
17148   ;
17149   return 0;
17150 }
17151 _ACEOF
17152 rm -f conftest.$ac_objext conftest$ac_exeext
17153 if { (eval echo "$as_me:17153: \"$ac_link\"") >&5
17154   (eval $ac_link) 2>&5
17155   ac_status=$?
17156   echo "$as_me:17156: \$? = $ac_status" >&5
17157   (exit $ac_status); } &&
17158          { ac_try='test -s conftest$ac_exeext'
17159   { (eval echo "$as_me:17159: \"$ac_try\"") >&5
17160   (eval $ac_try) 2>&5
17161   ac_status=$?
17162   echo "$as_me:17162: \$? = $ac_status" >&5
17163   (exit $ac_status); }; }; then
17164   cf_cv_have_tcgetattr=yes
17165 else
17166   echo "$as_me: failed program was:" >&5
17167 cat conftest.$ac_ext >&5
17168 cf_cv_have_tcgetattr=no
17169 fi
17170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17171 fi
17172 echo "$as_me:17172: result: $cf_cv_have_tcgetattr" >&5
17173 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17174 test "$cf_cv_have_tcgetattr" = yes &&
17175 cat >>confdefs.h <<\EOF
17176 #define HAVE_TCGETATTR 1
17177 EOF
17178
17179 echo "$as_me:17179: checking for vsscanf function or workaround" >&5
17180 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17181 if test "${cf_cv_func_vsscanf+set}" = set; then
17182   echo $ECHO_N "(cached) $ECHO_C" >&6
17183 else
17184
17185 cat >conftest.$ac_ext <<_ACEOF
17186 #line 17186 "configure"
17187 #include "confdefs.h"
17188
17189 #include <stdarg.h>
17190 #include <stdio.h>
17191 int
17192 main ()
17193 {
17194
17195         va_list ap;
17196         vsscanf("from", "%d", ap)
17197   ;
17198   return 0;
17199 }
17200 _ACEOF
17201 rm -f conftest.$ac_objext conftest$ac_exeext
17202 if { (eval echo "$as_me:17202: \"$ac_link\"") >&5
17203   (eval $ac_link) 2>&5
17204   ac_status=$?
17205   echo "$as_me:17205: \$? = $ac_status" >&5
17206   (exit $ac_status); } &&
17207          { ac_try='test -s conftest$ac_exeext'
17208   { (eval echo "$as_me:17208: \"$ac_try\"") >&5
17209   (eval $ac_try) 2>&5
17210   ac_status=$?
17211   echo "$as_me:17211: \$? = $ac_status" >&5
17212   (exit $ac_status); }; }; then
17213   cf_cv_func_vsscanf=vsscanf
17214 else
17215   echo "$as_me: failed program was:" >&5
17216 cat conftest.$ac_ext >&5
17217
17218 cat >conftest.$ac_ext <<_ACEOF
17219 #line 17219 "configure"
17220 #include "confdefs.h"
17221
17222 #include <stdarg.h>
17223 #include <stdio.h>
17224 int
17225 main ()
17226 {
17227
17228         FILE strbuf;
17229         char *str = "from";
17230
17231         strbuf._flag = _IOREAD;
17232         strbuf._ptr = strbuf._base = (unsigned char *) str;
17233         strbuf._cnt = strlen(str);
17234         strbuf._file = _NFILE;
17235         return (vfscanf(&strbuf, "%d", ap))
17236   ;
17237   return 0;
17238 }
17239 _ACEOF
17240 rm -f conftest.$ac_objext conftest$ac_exeext
17241 if { (eval echo "$as_me:17241: \"$ac_link\"") >&5
17242   (eval $ac_link) 2>&5
17243   ac_status=$?
17244   echo "$as_me:17244: \$? = $ac_status" >&5
17245   (exit $ac_status); } &&
17246          { ac_try='test -s conftest$ac_exeext'
17247   { (eval echo "$as_me:17247: \"$ac_try\"") >&5
17248   (eval $ac_try) 2>&5
17249   ac_status=$?
17250   echo "$as_me:17250: \$? = $ac_status" >&5
17251   (exit $ac_status); }; }; then
17252   cf_cv_func_vsscanf=vfscanf
17253 else
17254   echo "$as_me: failed program was:" >&5
17255 cat conftest.$ac_ext >&5
17256
17257 cat >conftest.$ac_ext <<_ACEOF
17258 #line 17258 "configure"
17259 #include "confdefs.h"
17260
17261 #include <stdarg.h>
17262 #include <stdio.h>
17263 int
17264 main ()
17265 {
17266
17267         FILE strbuf;
17268         char *str = "from";
17269
17270         strbuf._flag = _IOREAD;
17271         strbuf._ptr = strbuf._base = (unsigned char *) str;
17272         strbuf._cnt = strlen(str);
17273         strbuf._file = _NFILE;
17274         return (_doscan(&strbuf, "%d", ap))
17275   ;
17276   return 0;
17277 }
17278 _ACEOF
17279 rm -f conftest.$ac_objext conftest$ac_exeext
17280 if { (eval echo "$as_me:17280: \"$ac_link\"") >&5
17281   (eval $ac_link) 2>&5
17282   ac_status=$?
17283   echo "$as_me:17283: \$? = $ac_status" >&5
17284   (exit $ac_status); } &&
17285          { ac_try='test -s conftest$ac_exeext'
17286   { (eval echo "$as_me:17286: \"$ac_try\"") >&5
17287   (eval $ac_try) 2>&5
17288   ac_status=$?
17289   echo "$as_me:17289: \$? = $ac_status" >&5
17290   (exit $ac_status); }; }; then
17291   cf_cv_func_vsscanf=_doscan
17292 else
17293   echo "$as_me: failed program was:" >&5
17294 cat conftest.$ac_ext >&5
17295
17296 cf_cv_func_vsscanf=no
17297 fi
17298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17299 fi
17300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17301 fi
17302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17303 fi
17304 echo "$as_me:17304: result: $cf_cv_func_vsscanf" >&5
17305 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17306
17307 case $cf_cv_func_vsscanf in
17308 (vsscanf)
17309 cat >>confdefs.h <<\EOF
17310 #define HAVE_VSSCANF 1
17311 EOF
17312 ;;
17313 (vfscanf)
17314 cat >>confdefs.h <<\EOF
17315 #define HAVE_VFSCANF 1
17316 EOF
17317 ;;
17318 (_doscan)
17319 cat >>confdefs.h <<\EOF
17320 #define HAVE__DOSCAN 1
17321 EOF
17322 ;;
17323 esac
17324
17325 echo "$as_me:17325: checking for working mkstemp" >&5
17326 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17327 if test "${cf_cv_func_mkstemp+set}" = set; then
17328   echo $ECHO_N "(cached) $ECHO_C" >&6
17329 else
17330
17331 rm -rf conftest*
17332 if test "$cross_compiling" = yes; then
17333   cf_cv_func_mkstemp=maybe
17334 else
17335   cat >conftest.$ac_ext <<_ACEOF
17336 #line 17336 "configure"
17337 #include "confdefs.h"
17338
17339 #include <sys/types.h>
17340 #include <stdlib.h>
17341 #include <stdio.h>
17342 #include <string.h>
17343 #include <sys/stat.h>
17344 int main()
17345 {
17346         char *tmpl = "conftestXXXXXX";
17347         char name[2][80];
17348         int n;
17349         int result = 0;
17350         int fd;
17351         struct stat sb;
17352
17353         umask(077);
17354         for (n = 0; n < 2; ++n) {
17355                 strcpy(name[n], tmpl);
17356                 if ((fd = mkstemp(name[n])) >= 0) {
17357                         if (!strcmp(name[n], tmpl)
17358                          || stat(name[n], &sb) != 0
17359                          || (sb.st_mode & S_IFMT) != S_IFREG
17360                          || (sb.st_mode & 077) != 0) {
17361                                 result = 1;
17362                         }
17363                         close(fd);
17364                 }
17365         }
17366         if (result == 0
17367          && !strcmp(name[0], name[1]))
17368                 result = 1;
17369         ${cf_cv_main_return:-return}(result);
17370 }
17371
17372 _ACEOF
17373 rm -f conftest$ac_exeext
17374 if { (eval echo "$as_me:17374: \"$ac_link\"") >&5
17375   (eval $ac_link) 2>&5
17376   ac_status=$?
17377   echo "$as_me:17377: \$? = $ac_status" >&5
17378   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17379   { (eval echo "$as_me:17379: \"$ac_try\"") >&5
17380   (eval $ac_try) 2>&5
17381   ac_status=$?
17382   echo "$as_me:17382: \$? = $ac_status" >&5
17383   (exit $ac_status); }; }; then
17384   cf_cv_func_mkstemp=yes
17385
17386 else
17387   echo "$as_me: program exited with status $ac_status" >&5
17388 echo "$as_me: failed program was:" >&5
17389 cat conftest.$ac_ext >&5
17390 cf_cv_func_mkstemp=no
17391
17392 fi
17393 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17394 fi
17395
17396 fi
17397 echo "$as_me:17397: result: $cf_cv_func_mkstemp" >&5
17398 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17399 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17400         echo "$as_me:17400: checking for mkstemp" >&5
17401 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17402 if test "${ac_cv_func_mkstemp+set}" = set; then
17403   echo $ECHO_N "(cached) $ECHO_C" >&6
17404 else
17405   cat >conftest.$ac_ext <<_ACEOF
17406 #line 17406 "configure"
17407 #include "confdefs.h"
17408 /* System header to define __stub macros and hopefully few prototypes,
17409     which can conflict with char mkstemp (); below.  */
17410 #include <assert.h>
17411 /* Override any gcc2 internal prototype to avoid an error.  */
17412 #ifdef __cplusplus
17413 extern "C"
17414 #endif
17415 /* We use char because int might match the return type of a gcc2
17416    builtin and then its argument prototype would still apply.  */
17417 char mkstemp ();
17418 char (*f) ();
17419
17420 int
17421 main ()
17422 {
17423 /* The GNU C library defines this for functions which it implements
17424     to always fail with ENOSYS.  Some functions are actually named
17425     something starting with __ and the normal name is an alias.  */
17426 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17427 choke me
17428 #else
17429 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17430 #endif
17431
17432   ;
17433   return 0;
17434 }
17435 _ACEOF
17436 rm -f conftest.$ac_objext conftest$ac_exeext
17437 if { (eval echo "$as_me:17437: \"$ac_link\"") >&5
17438   (eval $ac_link) 2>&5
17439   ac_status=$?
17440   echo "$as_me:17440: \$? = $ac_status" >&5
17441   (exit $ac_status); } &&
17442          { ac_try='test -s conftest$ac_exeext'
17443   { (eval echo "$as_me:17443: \"$ac_try\"") >&5
17444   (eval $ac_try) 2>&5
17445   ac_status=$?
17446   echo "$as_me:17446: \$? = $ac_status" >&5
17447   (exit $ac_status); }; }; then
17448   ac_cv_func_mkstemp=yes
17449 else
17450   echo "$as_me: failed program was:" >&5
17451 cat conftest.$ac_ext >&5
17452 ac_cv_func_mkstemp=no
17453 fi
17454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17455 fi
17456 echo "$as_me:17456: result: $ac_cv_func_mkstemp" >&5
17457 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17458
17459 fi
17460 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17461
17462 cat >>confdefs.h <<\EOF
17463 #define HAVE_MKSTEMP 1
17464 EOF
17465
17466 fi
17467
17468 # setup for prototype of fallback for vsscanf()
17469
17470 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17471         HAVE_VSSCANF=1
17472 else
17473         HAVE_VSSCANF=0
17474 fi
17475
17476 if test "x$cross_compiling" = xyes ; then
17477         { echo "$as_me:17477: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17478 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17479 else
17480         echo "$as_me:17480: checking whether setvbuf arguments are reversed" >&5
17481 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17482 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17483   echo $ECHO_N "(cached) $ECHO_C" >&6
17484 else
17485   if test "$cross_compiling" = yes; then
17486   { { echo "$as_me:17486: error: cannot run test program while cross compiling" >&5
17487 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17488    { (exit 1); exit 1; }; }
17489 else
17490   cat >conftest.$ac_ext <<_ACEOF
17491 #line 17491 "configure"
17492 #include "confdefs.h"
17493 #include <stdio.h>
17494 /* If setvbuf has the reversed format, exit 0. */
17495 int
17496 main ()
17497 {
17498   /* This call has the arguments reversed.
17499      A reversed system may check and see that the address of main
17500      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17501   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17502     $ac_main_return(1);
17503   putc('\r', stdout);
17504   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17505 }
17506 _ACEOF
17507 rm -f conftest$ac_exeext
17508 if { (eval echo "$as_me:17508: \"$ac_link\"") >&5
17509   (eval $ac_link) 2>&5
17510   ac_status=$?
17511   echo "$as_me:17511: \$? = $ac_status" >&5
17512   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17513   { (eval echo "$as_me:17513: \"$ac_try\"") >&5
17514   (eval $ac_try) 2>&5
17515   ac_status=$?
17516   echo "$as_me:17516: \$? = $ac_status" >&5
17517   (exit $ac_status); }; }; then
17518   ac_cv_func_setvbuf_reversed=yes
17519 else
17520   echo "$as_me: program exited with status $ac_status" >&5
17521 echo "$as_me: failed program was:" >&5
17522 cat conftest.$ac_ext >&5
17523 ac_cv_func_setvbuf_reversed=no
17524 fi
17525 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17526 fi
17527 rm -f core core.* *.core
17528 fi
17529 echo "$as_me:17529: result: $ac_cv_func_setvbuf_reversed" >&5
17530 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17531 if test $ac_cv_func_setvbuf_reversed = yes; then
17532
17533 cat >>confdefs.h <<\EOF
17534 #define SETVBUF_REVERSED 1
17535 EOF
17536
17537 fi
17538
17539 fi
17540 echo "$as_me:17540: checking for intptr_t" >&5
17541 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17542 if test "${ac_cv_type_intptr_t+set}" = set; then
17543   echo $ECHO_N "(cached) $ECHO_C" >&6
17544 else
17545   cat >conftest.$ac_ext <<_ACEOF
17546 #line 17546 "configure"
17547 #include "confdefs.h"
17548 $ac_includes_default
17549 int
17550 main ()
17551 {
17552 if ((intptr_t *) 0)
17553   return 0;
17554 if (sizeof (intptr_t))
17555   return 0;
17556   ;
17557   return 0;
17558 }
17559 _ACEOF
17560 rm -f conftest.$ac_objext
17561 if { (eval echo "$as_me:17561: \"$ac_compile\"") >&5
17562   (eval $ac_compile) 2>&5
17563   ac_status=$?
17564   echo "$as_me:17564: \$? = $ac_status" >&5
17565   (exit $ac_status); } &&
17566          { ac_try='test -s conftest.$ac_objext'
17567   { (eval echo "$as_me:17567: \"$ac_try\"") >&5
17568   (eval $ac_try) 2>&5
17569   ac_status=$?
17570   echo "$as_me:17570: \$? = $ac_status" >&5
17571   (exit $ac_status); }; }; then
17572   ac_cv_type_intptr_t=yes
17573 else
17574   echo "$as_me: failed program was:" >&5
17575 cat conftest.$ac_ext >&5
17576 ac_cv_type_intptr_t=no
17577 fi
17578 rm -f conftest.$ac_objext conftest.$ac_ext
17579 fi
17580 echo "$as_me:17580: result: $ac_cv_type_intptr_t" >&5
17581 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17582 if test $ac_cv_type_intptr_t = yes; then
17583   :
17584 else
17585
17586 cat >>confdefs.h <<EOF
17587 #define intptr_t long
17588 EOF
17589
17590 fi
17591
17592 echo "$as_me:17592: checking for ssize_t" >&5
17593 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17594 if test "${ac_cv_type_ssize_t+set}" = set; then
17595   echo $ECHO_N "(cached) $ECHO_C" >&6
17596 else
17597   cat >conftest.$ac_ext <<_ACEOF
17598 #line 17598 "configure"
17599 #include "confdefs.h"
17600 $ac_includes_default
17601 int
17602 main ()
17603 {
17604 if ((ssize_t *) 0)
17605   return 0;
17606 if (sizeof (ssize_t))
17607   return 0;
17608   ;
17609   return 0;
17610 }
17611 _ACEOF
17612 rm -f conftest.$ac_objext
17613 if { (eval echo "$as_me:17613: \"$ac_compile\"") >&5
17614   (eval $ac_compile) 2>&5
17615   ac_status=$?
17616   echo "$as_me:17616: \$? = $ac_status" >&5
17617   (exit $ac_status); } &&
17618          { ac_try='test -s conftest.$ac_objext'
17619   { (eval echo "$as_me:17619: \"$ac_try\"") >&5
17620   (eval $ac_try) 2>&5
17621   ac_status=$?
17622   echo "$as_me:17622: \$? = $ac_status" >&5
17623   (exit $ac_status); }; }; then
17624   ac_cv_type_ssize_t=yes
17625 else
17626   echo "$as_me: failed program was:" >&5
17627 cat conftest.$ac_ext >&5
17628 ac_cv_type_ssize_t=no
17629 fi
17630 rm -f conftest.$ac_objext conftest.$ac_ext
17631 fi
17632 echo "$as_me:17632: result: $ac_cv_type_ssize_t" >&5
17633 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17634 if test $ac_cv_type_ssize_t = yes; then
17635   :
17636 else
17637
17638 cat >>confdefs.h <<EOF
17639 #define ssize_t int
17640 EOF
17641
17642 fi
17643
17644 echo "$as_me:17644: checking for type sigaction_t" >&5
17645 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17646 if test "${cf_cv_type_sigaction+set}" = set; then
17647   echo $ECHO_N "(cached) $ECHO_C" >&6
17648 else
17649
17650         cat >conftest.$ac_ext <<_ACEOF
17651 #line 17651 "configure"
17652 #include "confdefs.h"
17653
17654 #include <signal.h>
17655 int
17656 main ()
17657 {
17658 sigaction_t x
17659   ;
17660   return 0;
17661 }
17662 _ACEOF
17663 rm -f conftest.$ac_objext
17664 if { (eval echo "$as_me:17664: \"$ac_compile\"") >&5
17665   (eval $ac_compile) 2>&5
17666   ac_status=$?
17667   echo "$as_me:17667: \$? = $ac_status" >&5
17668   (exit $ac_status); } &&
17669          { ac_try='test -s conftest.$ac_objext'
17670   { (eval echo "$as_me:17670: \"$ac_try\"") >&5
17671   (eval $ac_try) 2>&5
17672   ac_status=$?
17673   echo "$as_me:17673: \$? = $ac_status" >&5
17674   (exit $ac_status); }; }; then
17675   cf_cv_type_sigaction=yes
17676 else
17677   echo "$as_me: failed program was:" >&5
17678 cat conftest.$ac_ext >&5
17679 cf_cv_type_sigaction=no
17680 fi
17681 rm -f conftest.$ac_objext conftest.$ac_ext
17682 fi
17683
17684 echo "$as_me:17684: result: $cf_cv_type_sigaction" >&5
17685 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17686 test "$cf_cv_type_sigaction" = yes &&
17687 cat >>confdefs.h <<\EOF
17688 #define HAVE_TYPE_SIGACTION 1
17689 EOF
17690
17691 echo "$as_me:17691: checking declaration of size-change" >&5
17692 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17693 if test "${cf_cv_sizechange+set}" = set; then
17694   echo $ECHO_N "(cached) $ECHO_C" >&6
17695 else
17696
17697         cf_cv_sizechange=unknown
17698         cf_save_CPPFLAGS="$CPPFLAGS"
17699
17700 for cf_opts in "" "NEED_PTEM_H"
17701 do
17702
17703         CPPFLAGS="$cf_save_CPPFLAGS"
17704         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17705         cat >conftest.$ac_ext <<_ACEOF
17706 #line 17706 "configure"
17707 #include "confdefs.h"
17708 #include <sys/types.h>
17709 #ifdef HAVE_TERMIOS_H
17710 #include <termios.h>
17711 #else
17712 #ifdef HAVE_TERMIO_H
17713 #include <termio.h>
17714 #endif
17715 #endif
17716 #ifdef NEED_PTEM_H
17717 /* This is a workaround for SCO:  they neglected to define struct winsize in
17718  * termios.h -- it's only in termio.h and ptem.h
17719  */
17720 #include        <sys/stream.h>
17721 #include        <sys/ptem.h>
17722 #endif
17723 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17724 #include <sys/ioctl.h>
17725 #endif
17726
17727 int
17728 main ()
17729 {
17730
17731 #ifdef TIOCGSIZE
17732         struct ttysize win;     /* FIXME: what system is this? */
17733         int y = win.ts_lines;
17734         int x = win.ts_cols;
17735 #else
17736 #ifdef TIOCGWINSZ
17737         struct winsize win;
17738         int y = win.ws_row;
17739         int x = win.ws_col;
17740 #else
17741         no TIOCGSIZE or TIOCGWINSZ
17742 #endif /* TIOCGWINSZ */
17743 #endif /* TIOCGSIZE */
17744
17745   ;
17746   return 0;
17747 }
17748 _ACEOF
17749 rm -f conftest.$ac_objext
17750 if { (eval echo "$as_me:17750: \"$ac_compile\"") >&5
17751   (eval $ac_compile) 2>&5
17752   ac_status=$?
17753   echo "$as_me:17753: \$? = $ac_status" >&5
17754   (exit $ac_status); } &&
17755          { ac_try='test -s conftest.$ac_objext'
17756   { (eval echo "$as_me:17756: \"$ac_try\"") >&5
17757   (eval $ac_try) 2>&5
17758   ac_status=$?
17759   echo "$as_me:17759: \$? = $ac_status" >&5
17760   (exit $ac_status); }; }; then
17761   cf_cv_sizechange=yes
17762 else
17763   echo "$as_me: failed program was:" >&5
17764 cat conftest.$ac_ext >&5
17765 cf_cv_sizechange=no
17766 fi
17767 rm -f conftest.$ac_objext conftest.$ac_ext
17768
17769         CPPFLAGS="$cf_save_CPPFLAGS"
17770         if test "$cf_cv_sizechange" = yes ; then
17771                 echo "size-change succeeded ($cf_opts)" >&5
17772                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17773                 break
17774         fi
17775 done
17776
17777 fi
17778 echo "$as_me:17778: result: $cf_cv_sizechange" >&5
17779 echo "${ECHO_T}$cf_cv_sizechange" >&6
17780 if test "$cf_cv_sizechange" != no ; then
17781
17782 cat >>confdefs.h <<\EOF
17783 #define HAVE_SIZECHANGE 1
17784 EOF
17785
17786         case $cf_cv_sizechange in
17787         (NEED*)
17788                 cat >>confdefs.h <<EOF
17789 #define $cf_cv_sizechange  1
17790 EOF
17791
17792                 ;;
17793         esac
17794 fi
17795
17796 echo "$as_me:17796: checking for memmove" >&5
17797 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17798 if test "${ac_cv_func_memmove+set}" = set; then
17799   echo $ECHO_N "(cached) $ECHO_C" >&6
17800 else
17801   cat >conftest.$ac_ext <<_ACEOF
17802 #line 17802 "configure"
17803 #include "confdefs.h"
17804 /* System header to define __stub macros and hopefully few prototypes,
17805     which can conflict with char memmove (); below.  */
17806 #include <assert.h>
17807 /* Override any gcc2 internal prototype to avoid an error.  */
17808 #ifdef __cplusplus
17809 extern "C"
17810 #endif
17811 /* We use char because int might match the return type of a gcc2
17812    builtin and then its argument prototype would still apply.  */
17813 char memmove ();
17814 char (*f) ();
17815
17816 int
17817 main ()
17818 {
17819 /* The GNU C library defines this for functions which it implements
17820     to always fail with ENOSYS.  Some functions are actually named
17821     something starting with __ and the normal name is an alias.  */
17822 #if defined (__stub_memmove) || defined (__stub___memmove)
17823 choke me
17824 #else
17825 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17826 #endif
17827
17828   ;
17829   return 0;
17830 }
17831 _ACEOF
17832 rm -f conftest.$ac_objext conftest$ac_exeext
17833 if { (eval echo "$as_me:17833: \"$ac_link\"") >&5
17834   (eval $ac_link) 2>&5
17835   ac_status=$?
17836   echo "$as_me:17836: \$? = $ac_status" >&5
17837   (exit $ac_status); } &&
17838          { ac_try='test -s conftest$ac_exeext'
17839   { (eval echo "$as_me:17839: \"$ac_try\"") >&5
17840   (eval $ac_try) 2>&5
17841   ac_status=$?
17842   echo "$as_me:17842: \$? = $ac_status" >&5
17843   (exit $ac_status); }; }; then
17844   ac_cv_func_memmove=yes
17845 else
17846   echo "$as_me: failed program was:" >&5
17847 cat conftest.$ac_ext >&5
17848 ac_cv_func_memmove=no
17849 fi
17850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17851 fi
17852 echo "$as_me:17852: result: $ac_cv_func_memmove" >&5
17853 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17854 if test $ac_cv_func_memmove = yes; then
17855   :
17856 else
17857
17858 echo "$as_me:17858: checking for bcopy" >&5
17859 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17860 if test "${ac_cv_func_bcopy+set}" = set; then
17861   echo $ECHO_N "(cached) $ECHO_C" >&6
17862 else
17863   cat >conftest.$ac_ext <<_ACEOF
17864 #line 17864 "configure"
17865 #include "confdefs.h"
17866 /* System header to define __stub macros and hopefully few prototypes,
17867     which can conflict with char bcopy (); below.  */
17868 #include <assert.h>
17869 /* Override any gcc2 internal prototype to avoid an error.  */
17870 #ifdef __cplusplus
17871 extern "C"
17872 #endif
17873 /* We use char because int might match the return type of a gcc2
17874    builtin and then its argument prototype would still apply.  */
17875 char bcopy ();
17876 char (*f) ();
17877
17878 int
17879 main ()
17880 {
17881 /* The GNU C library defines this for functions which it implements
17882     to always fail with ENOSYS.  Some functions are actually named
17883     something starting with __ and the normal name is an alias.  */
17884 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17885 choke me
17886 #else
17887 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17888 #endif
17889
17890   ;
17891   return 0;
17892 }
17893 _ACEOF
17894 rm -f conftest.$ac_objext conftest$ac_exeext
17895 if { (eval echo "$as_me:17895: \"$ac_link\"") >&5
17896   (eval $ac_link) 2>&5
17897   ac_status=$?
17898   echo "$as_me:17898: \$? = $ac_status" >&5
17899   (exit $ac_status); } &&
17900          { ac_try='test -s conftest$ac_exeext'
17901   { (eval echo "$as_me:17901: \"$ac_try\"") >&5
17902   (eval $ac_try) 2>&5
17903   ac_status=$?
17904   echo "$as_me:17904: \$? = $ac_status" >&5
17905   (exit $ac_status); }; }; then
17906   ac_cv_func_bcopy=yes
17907 else
17908   echo "$as_me: failed program was:" >&5
17909 cat conftest.$ac_ext >&5
17910 ac_cv_func_bcopy=no
17911 fi
17912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17913 fi
17914 echo "$as_me:17914: result: $ac_cv_func_bcopy" >&5
17915 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17916 if test $ac_cv_func_bcopy = yes; then
17917
17918         echo "$as_me:17918: checking if bcopy does overlapping moves" >&5
17919 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17920 if test "${cf_cv_good_bcopy+set}" = set; then
17921   echo $ECHO_N "(cached) $ECHO_C" >&6
17922 else
17923
17924                 if test "$cross_compiling" = yes; then
17925   cf_cv_good_bcopy=unknown
17926 else
17927   cat >conftest.$ac_ext <<_ACEOF
17928 #line 17928 "configure"
17929 #include "confdefs.h"
17930
17931 int main() {
17932         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17933         char temp[40];
17934         bcopy(data, temp, sizeof(data));
17935         bcopy(temp+10, temp, 15);
17936         bcopy(temp+5, temp+15, 10);
17937         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17938 }
17939
17940 _ACEOF
17941 rm -f conftest$ac_exeext
17942 if { (eval echo "$as_me:17942: \"$ac_link\"") >&5
17943   (eval $ac_link) 2>&5
17944   ac_status=$?
17945   echo "$as_me:17945: \$? = $ac_status" >&5
17946   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17947   { (eval echo "$as_me:17947: \"$ac_try\"") >&5
17948   (eval $ac_try) 2>&5
17949   ac_status=$?
17950   echo "$as_me:17950: \$? = $ac_status" >&5
17951   (exit $ac_status); }; }; then
17952   cf_cv_good_bcopy=yes
17953 else
17954   echo "$as_me: program exited with status $ac_status" >&5
17955 echo "$as_me: failed program was:" >&5
17956 cat conftest.$ac_ext >&5
17957 cf_cv_good_bcopy=no
17958 fi
17959 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17960 fi
17961
17962 fi
17963 echo "$as_me:17963: result: $cf_cv_good_bcopy" >&5
17964 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17965
17966 else
17967   cf_cv_good_bcopy=no
17968 fi
17969
17970         if test "$cf_cv_good_bcopy" = yes ; then
17971
17972 cat >>confdefs.h <<\EOF
17973 #define USE_OK_BCOPY 1
17974 EOF
17975
17976         else
17977
17978 cat >>confdefs.h <<\EOF
17979 #define USE_MY_MEMMOVE 1
17980 EOF
17981
17982         fi
17983
17984 fi
17985
17986 tty 2>&1 >/dev/null || {
17987 for ac_func in posix_openpt
17988 do
17989 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17990 echo "$as_me:17990: checking for $ac_func" >&5
17991 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17992 if eval "test \"\${$as_ac_var+set}\" = set"; then
17993   echo $ECHO_N "(cached) $ECHO_C" >&6
17994 else
17995   cat >conftest.$ac_ext <<_ACEOF
17996 #line 17996 "configure"
17997 #include "confdefs.h"
17998 /* System header to define __stub macros and hopefully few prototypes,
17999     which can conflict with char $ac_func (); below.  */
18000 #include <assert.h>
18001 /* Override any gcc2 internal prototype to avoid an error.  */
18002 #ifdef __cplusplus
18003 extern "C"
18004 #endif
18005 /* We use char because int might match the return type of a gcc2
18006    builtin and then its argument prototype would still apply.  */
18007 char $ac_func ();
18008 char (*f) ();
18009
18010 int
18011 main ()
18012 {
18013 /* The GNU C library defines this for functions which it implements
18014     to always fail with ENOSYS.  Some functions are actually named
18015     something starting with __ and the normal name is an alias.  */
18016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18017 choke me
18018 #else
18019 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18020 #endif
18021
18022   ;
18023   return 0;
18024 }
18025 _ACEOF
18026 rm -f conftest.$ac_objext conftest$ac_exeext
18027 if { (eval echo "$as_me:18027: \"$ac_link\"") >&5
18028   (eval $ac_link) 2>&5
18029   ac_status=$?
18030   echo "$as_me:18030: \$? = $ac_status" >&5
18031   (exit $ac_status); } &&
18032          { ac_try='test -s conftest$ac_exeext'
18033   { (eval echo "$as_me:18033: \"$ac_try\"") >&5
18034   (eval $ac_try) 2>&5
18035   ac_status=$?
18036   echo "$as_me:18036: \$? = $ac_status" >&5
18037   (exit $ac_status); }; }; then
18038   eval "$as_ac_var=yes"
18039 else
18040   echo "$as_me: failed program was:" >&5
18041 cat conftest.$ac_ext >&5
18042 eval "$as_ac_var=no"
18043 fi
18044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18045 fi
18046 echo "$as_me:18046: result: `eval echo '${'$as_ac_var'}'`" >&5
18047 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18048 if test `eval echo '${'$as_ac_var'}'` = yes; then
18049   cat >>confdefs.h <<EOF
18050 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18051 EOF
18052
18053 fi
18054 done
18055  }
18056 echo "$as_me:18056: checking if poll really works" >&5
18057 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18058 if test "${cf_cv_working_poll+set}" = set; then
18059   echo $ECHO_N "(cached) $ECHO_C" >&6
18060 else
18061
18062 if test "$cross_compiling" = yes; then
18063   cf_cv_working_poll=unknown
18064 else
18065   cat >conftest.$ac_ext <<_ACEOF
18066 #line 18066 "configure"
18067 #include "confdefs.h"
18068
18069 #include <stdlib.h>
18070 #include <stdio.h>
18071 #include <unistd.h>
18072 #include <fcntl.h>
18073 #ifdef HAVE_POLL_H
18074 #include <poll.h>
18075 #else
18076 #include <sys/poll.h>
18077 #endif
18078 int main(void) {
18079         struct pollfd myfds;
18080         int ret;
18081
18082         /* check for Darwin bug with respect to "devices" */
18083         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18084         if (myfds.fd < 0)
18085                 myfds.fd = 0;
18086         myfds.events = POLLIN;
18087         myfds.revents = 0;
18088
18089         ret = poll(&myfds, 1, 100);
18090
18091         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18092                 ret = -1;
18093         } else {
18094                 int fd = 0;
18095                 if (!isatty(fd)) {
18096                         fd = open("/dev/tty", 2);       /* O_RDWR */
18097                 }
18098 #ifdef HAVE_POSIX_OPENPT
18099                 if (fd < 0) {
18100                         fd = posix_openpt(O_RDWR);
18101                 }
18102 #endif
18103
18104                 if (fd >= 0) {
18105                         /* also check with standard input */
18106                         myfds.fd = fd;
18107                         myfds.events = POLLIN;
18108                         myfds.revents = 0;
18109                         ret = poll(&myfds, 1, 100);
18110                 } else {
18111                         ret = -1;
18112                 }
18113         }
18114         ${cf_cv_main_return:-return}(ret < 0);
18115 }
18116 _ACEOF
18117 rm -f conftest$ac_exeext
18118 if { (eval echo "$as_me:18118: \"$ac_link\"") >&5
18119   (eval $ac_link) 2>&5
18120   ac_status=$?
18121   echo "$as_me:18121: \$? = $ac_status" >&5
18122   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18123   { (eval echo "$as_me:18123: \"$ac_try\"") >&5
18124   (eval $ac_try) 2>&5
18125   ac_status=$?
18126   echo "$as_me:18126: \$? = $ac_status" >&5
18127   (exit $ac_status); }; }; then
18128   cf_cv_working_poll=yes
18129 else
18130   echo "$as_me: program exited with status $ac_status" >&5
18131 echo "$as_me: failed program was:" >&5
18132 cat conftest.$ac_ext >&5
18133 cf_cv_working_poll=no
18134 fi
18135 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18136 fi
18137 fi
18138 echo "$as_me:18138: result: $cf_cv_working_poll" >&5
18139 echo "${ECHO_T}$cf_cv_working_poll" >&6
18140 test "$cf_cv_working_poll" = "yes" &&
18141 cat >>confdefs.h <<\EOF
18142 #define HAVE_WORKING_POLL 1
18143 EOF
18144
18145 echo "$as_me:18145: checking for va_copy" >&5
18146 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18147 if test "${cf_cv_have_va_copy+set}" = set; then
18148   echo $ECHO_N "(cached) $ECHO_C" >&6
18149 else
18150
18151 cat >conftest.$ac_ext <<_ACEOF
18152 #line 18152 "configure"
18153 #include "confdefs.h"
18154
18155 #include <stdarg.h>
18156
18157 int
18158 main ()
18159 {
18160
18161         static va_list dst;
18162         static va_list src;
18163         va_copy(dst, src)
18164   ;
18165   return 0;
18166 }
18167 _ACEOF
18168 rm -f conftest.$ac_objext conftest$ac_exeext
18169 if { (eval echo "$as_me:18169: \"$ac_link\"") >&5
18170   (eval $ac_link) 2>&5
18171   ac_status=$?
18172   echo "$as_me:18172: \$? = $ac_status" >&5
18173   (exit $ac_status); } &&
18174          { ac_try='test -s conftest$ac_exeext'
18175   { (eval echo "$as_me:18175: \"$ac_try\"") >&5
18176   (eval $ac_try) 2>&5
18177   ac_status=$?
18178   echo "$as_me:18178: \$? = $ac_status" >&5
18179   (exit $ac_status); }; }; then
18180   cf_cv_have_va_copy=yes
18181 else
18182   echo "$as_me: failed program was:" >&5
18183 cat conftest.$ac_ext >&5
18184 cf_cv_have_va_copy=no
18185 fi
18186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18187 fi
18188 echo "$as_me:18188: result: $cf_cv_have_va_copy" >&5
18189 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18190
18191 test "$cf_cv_have_va_copy" = yes &&
18192 cat >>confdefs.h <<\EOF
18193 #define HAVE_VA_COPY 1
18194 EOF
18195
18196 echo "$as_me:18196: checking for __va_copy" >&5
18197 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18198 if test "${cf_cv_have___va_copy+set}" = set; then
18199   echo $ECHO_N "(cached) $ECHO_C" >&6
18200 else
18201
18202 cat >conftest.$ac_ext <<_ACEOF
18203 #line 18203 "configure"
18204 #include "confdefs.h"
18205
18206 #include <stdarg.h>
18207
18208 int
18209 main ()
18210 {
18211
18212         static va_list dst;
18213         static va_list src;
18214         __va_copy(dst, src)
18215   ;
18216   return 0;
18217 }
18218 _ACEOF
18219 rm -f conftest.$ac_objext conftest$ac_exeext
18220 if { (eval echo "$as_me:18220: \"$ac_link\"") >&5
18221   (eval $ac_link) 2>&5
18222   ac_status=$?
18223   echo "$as_me:18223: \$? = $ac_status" >&5
18224   (exit $ac_status); } &&
18225          { ac_try='test -s conftest$ac_exeext'
18226   { (eval echo "$as_me:18226: \"$ac_try\"") >&5
18227   (eval $ac_try) 2>&5
18228   ac_status=$?
18229   echo "$as_me:18229: \$? = $ac_status" >&5
18230   (exit $ac_status); }; }; then
18231   cf_cv_have___va_copy=yes
18232 else
18233   echo "$as_me: failed program was:" >&5
18234 cat conftest.$ac_ext >&5
18235 cf_cv_have___va_copy=no
18236 fi
18237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18238 fi
18239 echo "$as_me:18239: result: $cf_cv_have___va_copy" >&5
18240 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18241
18242 test "$cf_cv_have___va_copy" = yes &&
18243 cat >>confdefs.h <<\EOF
18244 #define HAVE___VA_COPY 1
18245 EOF
18246
18247 echo "$as_me:18247: checking for pid_t" >&5
18248 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18249 if test "${ac_cv_type_pid_t+set}" = set; then
18250   echo $ECHO_N "(cached) $ECHO_C" >&6
18251 else
18252   cat >conftest.$ac_ext <<_ACEOF
18253 #line 18253 "configure"
18254 #include "confdefs.h"
18255 $ac_includes_default
18256 int
18257 main ()
18258 {
18259 if ((pid_t *) 0)
18260   return 0;
18261 if (sizeof (pid_t))
18262   return 0;
18263   ;
18264   return 0;
18265 }
18266 _ACEOF
18267 rm -f conftest.$ac_objext
18268 if { (eval echo "$as_me:18268: \"$ac_compile\"") >&5
18269   (eval $ac_compile) 2>&5
18270   ac_status=$?
18271   echo "$as_me:18271: \$? = $ac_status" >&5
18272   (exit $ac_status); } &&
18273          { ac_try='test -s conftest.$ac_objext'
18274   { (eval echo "$as_me:18274: \"$ac_try\"") >&5
18275   (eval $ac_try) 2>&5
18276   ac_status=$?
18277   echo "$as_me:18277: \$? = $ac_status" >&5
18278   (exit $ac_status); }; }; then
18279   ac_cv_type_pid_t=yes
18280 else
18281   echo "$as_me: failed program was:" >&5
18282 cat conftest.$ac_ext >&5
18283 ac_cv_type_pid_t=no
18284 fi
18285 rm -f conftest.$ac_objext conftest.$ac_ext
18286 fi
18287 echo "$as_me:18287: result: $ac_cv_type_pid_t" >&5
18288 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18289 if test $ac_cv_type_pid_t = yes; then
18290   :
18291 else
18292
18293 cat >>confdefs.h <<EOF
18294 #define pid_t int
18295 EOF
18296
18297 fi
18298
18299 for ac_header in unistd.h vfork.h
18300 do
18301 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18302 echo "$as_me:18302: checking for $ac_header" >&5
18303 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18304 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18305   echo $ECHO_N "(cached) $ECHO_C" >&6
18306 else
18307   cat >conftest.$ac_ext <<_ACEOF
18308 #line 18308 "configure"
18309 #include "confdefs.h"
18310 #include <$ac_header>
18311 _ACEOF
18312 if { (eval echo "$as_me:18312: \"$ac_cpp conftest.$ac_ext\"") >&5
18313   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18314   ac_status=$?
18315   egrep -v '^ *\+' conftest.er1 >conftest.err
18316   rm -f conftest.er1
18317   cat conftest.err >&5
18318   echo "$as_me:18318: \$? = $ac_status" >&5
18319   (exit $ac_status); } >/dev/null; then
18320   if test -s conftest.err; then
18321     ac_cpp_err=$ac_c_preproc_warn_flag
18322   else
18323     ac_cpp_err=
18324   fi
18325 else
18326   ac_cpp_err=yes
18327 fi
18328 if test -z "$ac_cpp_err"; then
18329   eval "$as_ac_Header=yes"
18330 else
18331   echo "$as_me: failed program was:" >&5
18332   cat conftest.$ac_ext >&5
18333   eval "$as_ac_Header=no"
18334 fi
18335 rm -f conftest.err conftest.$ac_ext
18336 fi
18337 echo "$as_me:18337: result: `eval echo '${'$as_ac_Header'}'`" >&5
18338 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18339 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18340   cat >>confdefs.h <<EOF
18341 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18342 EOF
18343
18344 fi
18345 done
18346
18347 for ac_func in fork vfork
18348 do
18349 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18350 echo "$as_me:18350: checking for $ac_func" >&5
18351 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18352 if eval "test \"\${$as_ac_var+set}\" = set"; then
18353   echo $ECHO_N "(cached) $ECHO_C" >&6
18354 else
18355   cat >conftest.$ac_ext <<_ACEOF
18356 #line 18356 "configure"
18357 #include "confdefs.h"
18358 /* System header to define __stub macros and hopefully few prototypes,
18359     which can conflict with char $ac_func (); below.  */
18360 #include <assert.h>
18361 /* Override any gcc2 internal prototype to avoid an error.  */
18362 #ifdef __cplusplus
18363 extern "C"
18364 #endif
18365 /* We use char because int might match the return type of a gcc2
18366    builtin and then its argument prototype would still apply.  */
18367 char $ac_func ();
18368 char (*f) ();
18369
18370 int
18371 main ()
18372 {
18373 /* The GNU C library defines this for functions which it implements
18374     to always fail with ENOSYS.  Some functions are actually named
18375     something starting with __ and the normal name is an alias.  */
18376 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18377 choke me
18378 #else
18379 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18380 #endif
18381
18382   ;
18383   return 0;
18384 }
18385 _ACEOF
18386 rm -f conftest.$ac_objext conftest$ac_exeext
18387 if { (eval echo "$as_me:18387: \"$ac_link\"") >&5
18388   (eval $ac_link) 2>&5
18389   ac_status=$?
18390   echo "$as_me:18390: \$? = $ac_status" >&5
18391   (exit $ac_status); } &&
18392          { ac_try='test -s conftest$ac_exeext'
18393   { (eval echo "$as_me:18393: \"$ac_try\"") >&5
18394   (eval $ac_try) 2>&5
18395   ac_status=$?
18396   echo "$as_me:18396: \$? = $ac_status" >&5
18397   (exit $ac_status); }; }; then
18398   eval "$as_ac_var=yes"
18399 else
18400   echo "$as_me: failed program was:" >&5
18401 cat conftest.$ac_ext >&5
18402 eval "$as_ac_var=no"
18403 fi
18404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18405 fi
18406 echo "$as_me:18406: result: `eval echo '${'$as_ac_var'}'`" >&5
18407 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18408 if test `eval echo '${'$as_ac_var'}'` = yes; then
18409   cat >>confdefs.h <<EOF
18410 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18411 EOF
18412
18413 fi
18414 done
18415
18416 ac_cv_func_fork_works=$ac_cv_func_fork
18417 if test "x$ac_cv_func_fork" = xyes; then
18418   echo "$as_me:18418: checking for working fork" >&5
18419 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18420 if test "${ac_cv_func_fork_works+set}" = set; then
18421   echo $ECHO_N "(cached) $ECHO_C" >&6
18422 else
18423   if test "$cross_compiling" = yes; then
18424   ac_cv_func_fork_works=cross
18425 else
18426   cat >conftest.$ac_ext <<_ACEOF
18427 /* By Rüdiger Kuhlmann. */
18428       #include <sys/types.h>
18429       #if HAVE_UNISTD_H
18430       # include <unistd.h>
18431       #endif
18432       /* Some systems only have a dummy stub for fork() */
18433       int main ()
18434       {
18435         if (fork() < 0)
18436           $ac_main_return (1);
18437         $ac_main_return (0);
18438       }
18439 _ACEOF
18440 rm -f conftest$ac_exeext
18441 if { (eval echo "$as_me:18441: \"$ac_link\"") >&5
18442   (eval $ac_link) 2>&5
18443   ac_status=$?
18444   echo "$as_me:18444: \$? = $ac_status" >&5
18445   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18446   { (eval echo "$as_me:18446: \"$ac_try\"") >&5
18447   (eval $ac_try) 2>&5
18448   ac_status=$?
18449   echo "$as_me:18449: \$? = $ac_status" >&5
18450   (exit $ac_status); }; }; then
18451   ac_cv_func_fork_works=yes
18452 else
18453   echo "$as_me: program exited with status $ac_status" >&5
18454 echo "$as_me: failed program was:" >&5
18455 cat conftest.$ac_ext >&5
18456 ac_cv_func_fork_works=no
18457 fi
18458 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18459 fi
18460 fi
18461 echo "$as_me:18461: result: $ac_cv_func_fork_works" >&5
18462 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18463
18464 fi
18465 if test "x$ac_cv_func_fork_works" = xcross; then
18466   case $host in
18467     *-*-amigaos* | *-*-msdosdjgpp*)
18468       # Override, as these systems have only a dummy fork() stub
18469       ac_cv_func_fork_works=no
18470       ;;
18471     *)
18472       ac_cv_func_fork_works=yes
18473       ;;
18474   esac
18475   { echo "$as_me:18475: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18476 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18477 fi
18478 ac_cv_func_vfork_works=$ac_cv_func_vfork
18479 if test "x$ac_cv_func_vfork" = xyes; then
18480   echo "$as_me:18480: checking for working vfork" >&5
18481 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18482 if test "${ac_cv_func_vfork_works+set}" = set; then
18483   echo $ECHO_N "(cached) $ECHO_C" >&6
18484 else
18485   if test "$cross_compiling" = yes; then
18486   ac_cv_func_vfork_works=cross
18487 else
18488   cat >conftest.$ac_ext <<_ACEOF
18489 #line 18489 "configure"
18490 #include "confdefs.h"
18491 /* Thanks to Paul Eggert for this test.  */
18492 #include <stdio.h>
18493 #include <sys/types.h>
18494 #include <sys/stat.h>
18495 #if HAVE_UNISTD_H
18496 # include <unistd.h>
18497 #endif
18498 #if HAVE_VFORK_H
18499 # include <vfork.h>
18500 #endif
18501 /* On some sparc systems, changes by the child to local and incoming
18502    argument registers are propagated back to the parent.  The compiler
18503    is told about this with #include <vfork.h>, but some compilers
18504    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18505    static variable whose address is put into a register that is
18506    clobbered by the vfork.  */
18507 static
18508 #ifdef __cplusplus
18509 sparc_address_test (int arg)
18510 # else
18511 sparc_address_test (arg) int arg;
18512 #endif
18513 {
18514   static pid_t child;
18515   if (!child) {
18516     child = vfork ();
18517     if (child < 0) {
18518       perror ("vfork");
18519       _exit(2);
18520     }
18521     if (!child) {
18522       arg = getpid();
18523       write(-1, "", 0);
18524       _exit (arg);
18525     }
18526   }
18527 }
18528
18529 int
18530 main ()
18531 {
18532   pid_t parent = getpid ();
18533   pid_t child;
18534
18535   sparc_address_test ();
18536
18537   child = vfork ();
18538
18539   if (child == 0) {
18540     /* Here is another test for sparc vfork register problems.  This
18541        test uses lots of local variables, at least as many local
18542        variables as main has allocated so far including compiler
18543        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18544        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18545        reuse the register of parent for one of the local variables,
18546        since it will think that parent can't possibly be used any more
18547        in this routine.  Assigning to the local variable will thus
18548        munge parent in the parent process.  */
18549     pid_t
18550       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18551       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18552     /* Convince the compiler that p..p7 are live; otherwise, it might
18553        use the same hardware register for all 8 local variables.  */
18554     if (p != p1 || p != p2 || p != p3 || p != p4
18555         || p != p5 || p != p6 || p != p7)
18556       _exit(1);
18557
18558     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18559        from child file descriptors.  If the child closes a descriptor
18560        before it execs or exits, this munges the parent's descriptor
18561        as well.  Test for this by closing stdout in the child.  */
18562     _exit(close(fileno(stdout)) != 0);
18563   } else {
18564     int status;
18565     struct stat st;
18566
18567     while (wait(&status) != child)
18568       ;
18569     $ac_main_return(
18570          /* Was there some problem with vforking?  */
18571          child < 0
18572
18573          /* Did the child fail?  (This shouldn't happen.)  */
18574          || status
18575
18576          /* Did the vfork/compiler bug occur?  */
18577          || parent != getpid()
18578
18579          /* Did the file descriptor bug occur?  */
18580          || fstat(fileno(stdout), &st) != 0
18581          );
18582   }
18583 }
18584 _ACEOF
18585 rm -f conftest$ac_exeext
18586 if { (eval echo "$as_me:18586: \"$ac_link\"") >&5
18587   (eval $ac_link) 2>&5
18588   ac_status=$?
18589   echo "$as_me:18589: \$? = $ac_status" >&5
18590   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18591   { (eval echo "$as_me:18591: \"$ac_try\"") >&5
18592   (eval $ac_try) 2>&5
18593   ac_status=$?
18594   echo "$as_me:18594: \$? = $ac_status" >&5
18595   (exit $ac_status); }; }; then
18596   ac_cv_func_vfork_works=yes
18597 else
18598   echo "$as_me: program exited with status $ac_status" >&5
18599 echo "$as_me: failed program was:" >&5
18600 cat conftest.$ac_ext >&5
18601 ac_cv_func_vfork_works=no
18602 fi
18603 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18604 fi
18605 fi
18606 echo "$as_me:18606: result: $ac_cv_func_vfork_works" >&5
18607 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18608
18609 fi;
18610 if test "x$ac_cv_func_fork_works" = xcross; then
18611   ac_cv_func_vfork_works=ac_cv_func_vfork
18612   { echo "$as_me:18612: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18613 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18614 fi
18615
18616 if test "x$ac_cv_func_vfork_works" = xyes; then
18617
18618 cat >>confdefs.h <<\EOF
18619 #define HAVE_WORKING_VFORK 1
18620 EOF
18621
18622 else
18623
18624 cat >>confdefs.h <<\EOF
18625 #define vfork fork
18626 EOF
18627
18628 fi
18629 if test "x$ac_cv_func_fork_works" = xyes; then
18630
18631 cat >>confdefs.h <<\EOF
18632 #define HAVE_WORKING_FORK 1
18633 EOF
18634
18635 fi
18636
18637 # special check for test/ditto.c
18638
18639 echo "$as_me:18639: checking for openpty in -lutil" >&5
18640 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18641 if test "${ac_cv_lib_util_openpty+set}" = set; then
18642   echo $ECHO_N "(cached) $ECHO_C" >&6
18643 else
18644   ac_check_lib_save_LIBS=$LIBS
18645 LIBS="-lutil  $LIBS"
18646 cat >conftest.$ac_ext <<_ACEOF
18647 #line 18647 "configure"
18648 #include "confdefs.h"
18649
18650 /* Override any gcc2 internal prototype to avoid an error.  */
18651 #ifdef __cplusplus
18652 extern "C"
18653 #endif
18654 /* We use char because int might match the return type of a gcc2
18655    builtin and then its argument prototype would still apply.  */
18656 char openpty ();
18657 int
18658 main ()
18659 {
18660 openpty ();
18661   ;
18662   return 0;
18663 }
18664 _ACEOF
18665 rm -f conftest.$ac_objext conftest$ac_exeext
18666 if { (eval echo "$as_me:18666: \"$ac_link\"") >&5
18667   (eval $ac_link) 2>&5
18668   ac_status=$?
18669   echo "$as_me:18669: \$? = $ac_status" >&5
18670   (exit $ac_status); } &&
18671          { ac_try='test -s conftest$ac_exeext'
18672   { (eval echo "$as_me:18672: \"$ac_try\"") >&5
18673   (eval $ac_try) 2>&5
18674   ac_status=$?
18675   echo "$as_me:18675: \$? = $ac_status" >&5
18676   (exit $ac_status); }; }; then
18677   ac_cv_lib_util_openpty=yes
18678 else
18679   echo "$as_me: failed program was:" >&5
18680 cat conftest.$ac_ext >&5
18681 ac_cv_lib_util_openpty=no
18682 fi
18683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18684 LIBS=$ac_check_lib_save_LIBS
18685 fi
18686 echo "$as_me:18686: result: $ac_cv_lib_util_openpty" >&5
18687 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18688 if test $ac_cv_lib_util_openpty = yes; then
18689   cf_cv_lib_util=yes
18690 else
18691   cf_cv_lib_util=no
18692 fi
18693
18694 echo "$as_me:18694: checking for openpty header" >&5
18695 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18696 if test "${cf_cv_func_openpty+set}" = set; then
18697   echo $ECHO_N "(cached) $ECHO_C" >&6
18698 else
18699
18700         cf_save_LIBS="$LIBS"
18701         test $cf_cv_lib_util = yes && {
18702 cf_add_libs="-lutil"
18703 # Filter out duplicates - this happens with badly-designed ".pc" files...
18704 for cf_add_1lib in $LIBS
18705 do
18706         for cf_add_2lib in $cf_add_libs
18707         do
18708                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18709                 then
18710                         cf_add_1lib=
18711                         break
18712                 fi
18713         done
18714         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18715 done
18716 LIBS="$cf_add_libs"
18717  }
18718         for cf_header in pty.h libutil.h util.h
18719         do
18720         cat >conftest.$ac_ext <<_ACEOF
18721 #line 18721 "configure"
18722 #include "confdefs.h"
18723
18724 #include <$cf_header>
18725
18726 int
18727 main ()
18728 {
18729
18730         int x = openpty((int *)0, (int *)0, (char *)0,
18731                                    (struct termios *)0, (struct winsize *)0);
18732
18733   ;
18734   return 0;
18735 }
18736 _ACEOF
18737 rm -f conftest.$ac_objext conftest$ac_exeext
18738 if { (eval echo "$as_me:18738: \"$ac_link\"") >&5
18739   (eval $ac_link) 2>&5
18740   ac_status=$?
18741   echo "$as_me:18741: \$? = $ac_status" >&5
18742   (exit $ac_status); } &&
18743          { ac_try='test -s conftest$ac_exeext'
18744   { (eval echo "$as_me:18744: \"$ac_try\"") >&5
18745   (eval $ac_try) 2>&5
18746   ac_status=$?
18747   echo "$as_me:18747: \$? = $ac_status" >&5
18748   (exit $ac_status); }; }; then
18749
18750                 cf_cv_func_openpty=$cf_header
18751                 break
18752
18753 else
18754   echo "$as_me: failed program was:" >&5
18755 cat conftest.$ac_ext >&5
18756
18757                 cf_cv_func_openpty=no
18758
18759 fi
18760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18761         done
18762         LIBS="$cf_save_LIBS"
18763
18764 fi
18765 echo "$as_me:18765: result: $cf_cv_func_openpty" >&5
18766 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18767
18768 if test "$cf_cv_func_openpty" != no ; then
18769
18770 cat >>confdefs.h <<EOF
18771 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18772 EOF
18773
18774 cat >>confdefs.h <<\EOF
18775 #define USE_XTERM_PTY 1
18776 EOF
18777
18778         if test "x$cf_cv_lib_util" = xyes ; then
18779
18780 cf_add_libs="-lutil"
18781 # Filter out duplicates - this happens with badly-designed ".pc" files...
18782 for cf_add_1lib in $TEST_LIBS
18783 do
18784         for cf_add_2lib in $cf_add_libs
18785         do
18786                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18787                 then
18788                         cf_add_1lib=
18789                         break
18790                 fi
18791         done
18792         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18793 done
18794 TEST_LIBS="$cf_add_libs"
18795
18796         fi
18797 fi
18798
18799 if test "$with_hashed_db" != no ; then
18800
18801 cat >>confdefs.h <<\EOF
18802 #define USE_HASHED_DB 1
18803 EOF
18804
18805 case $with_hashed_db in
18806 (yes|*able*)
18807         ;;
18808 (*)
18809         if test -d "$with_hashed_db" ; then
18810
18811 if test -n "$with_hashed_db/include" ; then
18812   for cf_add_incdir in $with_hashed_db/include
18813   do
18814         while test $cf_add_incdir != /usr/include
18815         do
18816           if test -d $cf_add_incdir
18817           then
18818                 cf_have_incdir=no
18819                 if test -n "$CFLAGS$CPPFLAGS" ; then
18820                   # a loop is needed to ensure we can add subdirs of existing dirs
18821                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18822                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18823                           cf_have_incdir=yes; break
18824                         fi
18825                   done
18826                 fi
18827
18828                 if test "$cf_have_incdir" = no ; then
18829                   if test "$cf_add_incdir" = /usr/local/include ; then
18830                         if test "$GCC" = yes
18831                         then
18832                           cf_save_CPPFLAGS=$CPPFLAGS
18833                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18834                           cat >conftest.$ac_ext <<_ACEOF
18835 #line 18835 "configure"
18836 #include "confdefs.h"
18837 #include <stdio.h>
18838 int
18839 main ()
18840 {
18841 printf("Hello")
18842   ;
18843   return 0;
18844 }
18845 _ACEOF
18846 rm -f conftest.$ac_objext
18847 if { (eval echo "$as_me:18847: \"$ac_compile\"") >&5
18848   (eval $ac_compile) 2>&5
18849   ac_status=$?
18850   echo "$as_me:18850: \$? = $ac_status" >&5
18851   (exit $ac_status); } &&
18852          { ac_try='test -s conftest.$ac_objext'
18853   { (eval echo "$as_me:18853: \"$ac_try\"") >&5
18854   (eval $ac_try) 2>&5
18855   ac_status=$?
18856   echo "$as_me:18856: \$? = $ac_status" >&5
18857   (exit $ac_status); }; }; then
18858   :
18859 else
18860   echo "$as_me: failed program was:" >&5
18861 cat conftest.$ac_ext >&5
18862 cf_have_incdir=yes
18863 fi
18864 rm -f conftest.$ac_objext conftest.$ac_ext
18865                           CPPFLAGS=$cf_save_CPPFLAGS
18866                         fi
18867                   fi
18868                 fi
18869
18870                 if test "$cf_have_incdir" = no ; then
18871                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18872
18873 echo "${as_me:-configure}:18873: testing adding $cf_add_incdir to include-path ..." 1>&5
18874
18875                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18876
18877                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18878                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18879                   cf_add_incdir="$cf_top_incdir"
18880                 else
18881                   break
18882                 fi
18883           else
18884                 break
18885           fi
18886         done
18887   done
18888 fi
18889
18890 if test -n "$with_hashed_db/lib" ; then
18891         for cf_add_libdir in $with_hashed_db/lib
18892         do
18893                 if test $cf_add_libdir = /usr/lib ; then
18894                         :
18895                 elif test -d $cf_add_libdir
18896                 then
18897                         cf_have_libdir=no
18898                         if test -n "$LDFLAGS$LIBS" ; then
18899                                 # a loop is needed to ensure we can add subdirs of existing dirs
18900                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18901                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18902                                                 cf_have_libdir=yes; break
18903                                         fi
18904                                 done
18905                         fi
18906                         if test "$cf_have_libdir" = no ; then
18907                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18908
18909 echo "${as_me:-configure}:18909: testing adding $cf_add_libdir to library-path ..." 1>&5
18910
18911                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18912                         fi
18913                 fi
18914         done
18915 fi
18916
18917         else
18918                 case "$with_hashed_db" in
18919                 (./*|../*|/*)
18920                         { echo "$as_me:18920: WARNING: no such directory $with_hashed_db" >&5
18921 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18922                         ;;
18923                 (*)
18924
18925 cf_search=
18926
18927 test "x$prefix" != "xNONE" && \
18928 test -d "$prefix" && \
18929  {
18930         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18931         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18932         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18933         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18934         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18935         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18936 }
18937
18938 for cf_subdir_prefix in \
18939         /usr \
18940         /usr/local \
18941         /usr/pkg \
18942         /opt \
18943         /opt/local \
18944         $HOME
18945 do
18946
18947 test "x$cf_subdir_prefix" != "x$prefix" && \
18948 test -d "$cf_subdir_prefix" && \
18949 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18950         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18951         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18952         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18953         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18954         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18955         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"
18956 }
18957
18958 done
18959
18960         for cf_item in $cf_search
18961         do
18962                 case $cf_item in
18963                 (*/$with_hashed_db)
18964
18965 if test -n "$cf_item" ; then
18966   for cf_add_incdir in $cf_item
18967   do
18968         while test $cf_add_incdir != /usr/include
18969         do
18970           if test -d $cf_add_incdir
18971           then
18972                 cf_have_incdir=no
18973                 if test -n "$CFLAGS$CPPFLAGS" ; then
18974                   # a loop is needed to ensure we can add subdirs of existing dirs
18975                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18976                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18977                           cf_have_incdir=yes; break
18978                         fi
18979                   done
18980                 fi
18981
18982                 if test "$cf_have_incdir" = no ; then
18983                   if test "$cf_add_incdir" = /usr/local/include ; then
18984                         if test "$GCC" = yes
18985                         then
18986                           cf_save_CPPFLAGS=$CPPFLAGS
18987                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18988                           cat >conftest.$ac_ext <<_ACEOF
18989 #line 18989 "configure"
18990 #include "confdefs.h"
18991 #include <stdio.h>
18992 int
18993 main ()
18994 {
18995 printf("Hello")
18996   ;
18997   return 0;
18998 }
18999 _ACEOF
19000 rm -f conftest.$ac_objext
19001 if { (eval echo "$as_me:19001: \"$ac_compile\"") >&5
19002   (eval $ac_compile) 2>&5
19003   ac_status=$?
19004   echo "$as_me:19004: \$? = $ac_status" >&5
19005   (exit $ac_status); } &&
19006          { ac_try='test -s conftest.$ac_objext'
19007   { (eval echo "$as_me:19007: \"$ac_try\"") >&5
19008   (eval $ac_try) 2>&5
19009   ac_status=$?
19010   echo "$as_me:19010: \$? = $ac_status" >&5
19011   (exit $ac_status); }; }; then
19012   :
19013 else
19014   echo "$as_me: failed program was:" >&5
19015 cat conftest.$ac_ext >&5
19016 cf_have_incdir=yes
19017 fi
19018 rm -f conftest.$ac_objext conftest.$ac_ext
19019                           CPPFLAGS=$cf_save_CPPFLAGS
19020                         fi
19021                   fi
19022                 fi
19023
19024                 if test "$cf_have_incdir" = no ; then
19025                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19026
19027 echo "${as_me:-configure}:19027: testing adding $cf_add_incdir to include-path ..." 1>&5
19028
19029                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19030
19031                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19032                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19033                   cf_add_incdir="$cf_top_incdir"
19034                 else
19035                   break
19036                 fi
19037           else
19038                 break
19039           fi
19040         done
19041   done
19042 fi
19043
19044                         ;;
19045                 esac
19046         done
19047
19048 cf_search=
19049
19050 test "x$prefix" != "xNONE" && \
19051 test -d "$prefix" && \
19052  {
19053         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19054         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19055         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19056         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19057         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19058         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19059 }
19060
19061 for cf_subdir_prefix in \
19062         /usr \
19063         /usr/local \
19064         /usr/pkg \
19065         /opt \
19066         /opt/local \
19067         $HOME
19068 do
19069
19070 test "x$cf_subdir_prefix" != "x$prefix" && \
19071 test -d "$cf_subdir_prefix" && \
19072 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19073         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19074         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19075         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19076         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19077         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19078         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"
19079 }
19080
19081 done
19082
19083         for cf_item in $cf_search
19084         do
19085                 case $cf_item in
19086                 (*/$with_hashed_db)
19087
19088 if test -n "$cf_item" ; then
19089         for cf_add_libdir in $cf_item
19090         do
19091                 if test $cf_add_libdir = /usr/lib ; then
19092                         :
19093                 elif test -d $cf_add_libdir
19094                 then
19095                         cf_have_libdir=no
19096                         if test -n "$LDFLAGS$LIBS" ; then
19097                                 # a loop is needed to ensure we can add subdirs of existing dirs
19098                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19099                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19100                                                 cf_have_libdir=yes; break
19101                                         fi
19102                                 done
19103                         fi
19104                         if test "$cf_have_libdir" = no ; then
19105                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19106
19107 echo "${as_me:-configure}:19107: testing adding $cf_add_libdir to library-path ..." 1>&5
19108
19109                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19110                         fi
19111                 fi
19112         done
19113 fi
19114
19115                         ;;
19116                 esac
19117         done
19118
19119                         ;;
19120                 esac
19121         fi
19122 esac
19123
19124 echo "$as_me:19124: checking for db.h" >&5
19125 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19126 if test "${ac_cv_header_db_h+set}" = set; then
19127   echo $ECHO_N "(cached) $ECHO_C" >&6
19128 else
19129   cat >conftest.$ac_ext <<_ACEOF
19130 #line 19130 "configure"
19131 #include "confdefs.h"
19132 #include <db.h>
19133 _ACEOF
19134 if { (eval echo "$as_me:19134: \"$ac_cpp conftest.$ac_ext\"") >&5
19135   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19136   ac_status=$?
19137   egrep -v '^ *\+' conftest.er1 >conftest.err
19138   rm -f conftest.er1
19139   cat conftest.err >&5
19140   echo "$as_me:19140: \$? = $ac_status" >&5
19141   (exit $ac_status); } >/dev/null; then
19142   if test -s conftest.err; then
19143     ac_cpp_err=$ac_c_preproc_warn_flag
19144   else
19145     ac_cpp_err=
19146   fi
19147 else
19148   ac_cpp_err=yes
19149 fi
19150 if test -z "$ac_cpp_err"; then
19151   ac_cv_header_db_h=yes
19152 else
19153   echo "$as_me: failed program was:" >&5
19154   cat conftest.$ac_ext >&5
19155   ac_cv_header_db_h=no
19156 fi
19157 rm -f conftest.err conftest.$ac_ext
19158 fi
19159 echo "$as_me:19159: result: $ac_cv_header_db_h" >&5
19160 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19161 if test $ac_cv_header_db_h = yes; then
19162
19163 echo "$as_me:19163: checking for version of db" >&5
19164 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19165 if test "${cf_cv_hashed_db_version+set}" = set; then
19166   echo $ECHO_N "(cached) $ECHO_C" >&6
19167 else
19168
19169 cf_cv_hashed_db_version=unknown
19170
19171 for cf_db_version in 1 2 3 4 5 6
19172 do
19173
19174 echo "${as_me:-configure}:19174: testing checking for db version $cf_db_version ..." 1>&5
19175
19176         cat >conftest.$ac_ext <<_ACEOF
19177 #line 19177 "configure"
19178 #include "confdefs.h"
19179
19180 $ac_includes_default
19181 #include <db.h>
19182
19183 #ifdef DB_VERSION_MAJOR
19184         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19185 #if $cf_db_version == DB_VERSION_MAJOR
19186         /* ok */
19187 #else
19188         make an error
19189 #endif
19190 #else
19191 #if $cf_db_version == 1
19192         /* ok: assuming this is DB 1.8.5 */
19193 #else
19194         make an error
19195 #endif
19196 #endif
19197
19198 int
19199 main ()
19200 {
19201 DBT *foo = 0
19202   ;
19203   return 0;
19204 }
19205 _ACEOF
19206 rm -f conftest.$ac_objext
19207 if { (eval echo "$as_me:19207: \"$ac_compile\"") >&5
19208   (eval $ac_compile) 2>&5
19209   ac_status=$?
19210   echo "$as_me:19210: \$? = $ac_status" >&5
19211   (exit $ac_status); } &&
19212          { ac_try='test -s conftest.$ac_objext'
19213   { (eval echo "$as_me:19213: \"$ac_try\"") >&5
19214   (eval $ac_try) 2>&5
19215   ac_status=$?
19216   echo "$as_me:19216: \$? = $ac_status" >&5
19217   (exit $ac_status); }; }; then
19218
19219         cf_cv_hashed_db_version=$cf_db_version
19220         break
19221
19222 else
19223   echo "$as_me: failed program was:" >&5
19224 cat conftest.$ac_ext >&5
19225 fi
19226 rm -f conftest.$ac_objext conftest.$ac_ext
19227 done
19228
19229 fi
19230 echo "$as_me:19230: result: $cf_cv_hashed_db_version" >&5
19231 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19232
19233 if test "$cf_cv_hashed_db_version" = unknown ; then
19234         { { echo "$as_me:19234: error: Cannot determine version of db" >&5
19235 echo "$as_me: error: Cannot determine version of db" >&2;}
19236    { (exit 1); exit 1; }; }
19237 else
19238
19239 echo "$as_me:19239: checking for db libraries" >&5
19240 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19241 if test "${cf_cv_hashed_db_libs+set}" = set; then
19242   echo $ECHO_N "(cached) $ECHO_C" >&6
19243 else
19244
19245 cf_cv_hashed_db_libs=unknown
19246 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19247 do
19248         cf_save_libs="$LIBS"
19249         if test -n "$cf_db_libs"; then
19250
19251 cf_add_libs="-l$cf_db_libs"
19252 # Filter out duplicates - this happens with badly-designed ".pc" files...
19253 for cf_add_1lib in $LIBS
19254 do
19255         for cf_add_2lib in $cf_add_libs
19256         do
19257                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19258                 then
19259                         cf_add_1lib=
19260                         break
19261                 fi
19262         done
19263         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19264 done
19265 LIBS="$cf_add_libs"
19266
19267         fi
19268
19269 echo "${as_me:-configure}:19269: testing checking for library "$cf_db_libs" ..." 1>&5
19270
19271         cat >conftest.$ac_ext <<_ACEOF
19272 #line 19272 "configure"
19273 #include "confdefs.h"
19274
19275 $ac_includes_default
19276 #include <db.h>
19277
19278 int
19279 main ()
19280 {
19281
19282         char *path = "/tmp/foo";
19283 #ifdef DB_VERSION_MAJOR
19284 #if DB_VERSION_MAJOR >= 4
19285         DB *result = 0;
19286         db_create(&result, NULL, 0);
19287         result->open(result,
19288                 NULL,
19289                 path,
19290                 path,
19291                 DB_HASH,
19292                 DB_CREATE,
19293                 0644);
19294 #elif DB_VERSION_MAJOR >= 3
19295         DB *result = 0;
19296         db_create(&result, NULL, 0);
19297         result->open(result,
19298                 path,
19299                 path,
19300                 DB_HASH,
19301                 DB_CREATE,
19302                 0644);
19303 #elif DB_VERSION_MAJOR >= 2
19304         DB *result = 0;
19305         db_open(path,
19306                 DB_HASH,
19307                 DB_CREATE,
19308                 0644,
19309                 (DB_ENV *) 0,
19310                 (DB_INFO *) 0,
19311                 &result);
19312 #endif /* DB_VERSION_MAJOR */
19313 #else
19314         DB *result = dbopen(path,
19315                      2,
19316                      0644,
19317                      DB_HASH,
19318                      0);
19319 #endif
19320         ${cf_cv_main_return:-return}(result != 0)
19321
19322   ;
19323   return 0;
19324 }
19325 _ACEOF
19326 rm -f conftest.$ac_objext conftest$ac_exeext
19327 if { (eval echo "$as_me:19327: \"$ac_link\"") >&5
19328   (eval $ac_link) 2>&5
19329   ac_status=$?
19330   echo "$as_me:19330: \$? = $ac_status" >&5
19331   (exit $ac_status); } &&
19332          { ac_try='test -s conftest$ac_exeext'
19333   { (eval echo "$as_me:19333: \"$ac_try\"") >&5
19334   (eval $ac_try) 2>&5
19335   ac_status=$?
19336   echo "$as_me:19336: \$? = $ac_status" >&5
19337   (exit $ac_status); }; }; then
19338
19339         if test -n "$cf_db_libs" ; then
19340                 cf_cv_hashed_db_libs=$cf_db_libs
19341         else
19342                 cf_cv_hashed_db_libs=default
19343         fi
19344         LIBS="$cf_save_libs"
19345         break
19346
19347 else
19348   echo "$as_me: failed program was:" >&5
19349 cat conftest.$ac_ext >&5
19350 fi
19351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19352         LIBS="$cf_save_libs"
19353 done
19354
19355 fi
19356 echo "$as_me:19356: result: $cf_cv_hashed_db_libs" >&5
19357 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19358
19359         if test "$cf_cv_hashed_db_libs" = unknown ; then
19360                 { { echo "$as_me:19360: error: Cannot determine library for db" >&5
19361 echo "$as_me: error: Cannot determine library for db" >&2;}
19362    { (exit 1); exit 1; }; }
19363         elif test "$cf_cv_hashed_db_libs" != default ; then
19364
19365 cf_add_libs="-l$cf_cv_hashed_db_libs"
19366 # Filter out duplicates - this happens with badly-designed ".pc" files...
19367 for cf_add_1lib in $LIBS
19368 do
19369         for cf_add_2lib in $cf_add_libs
19370         do
19371                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19372                 then
19373                         cf_add_1lib=
19374                         break
19375                 fi
19376         done
19377         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19378 done
19379 LIBS="$cf_add_libs"
19380
19381         fi
19382 fi
19383
19384 else
19385
19386         { { echo "$as_me:19386: error: Cannot find db.h" >&5
19387 echo "$as_me: error: Cannot find db.h" >&2;}
19388    { (exit 1); exit 1; }; }
19389
19390 fi
19391
19392 fi
19393
19394 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19395         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19396         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19397 fi
19398
19399 # Just in case, check if the C compiler has a bool type.
19400
19401 echo "$as_me:19401: checking if we should include stdbool.h" >&5
19402 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19403
19404 if test "${cf_cv_header_stdbool_h+set}" = set; then
19405   echo $ECHO_N "(cached) $ECHO_C" >&6
19406 else
19407
19408         cat >conftest.$ac_ext <<_ACEOF
19409 #line 19409 "configure"
19410 #include "confdefs.h"
19411
19412 int
19413 main ()
19414 {
19415 bool foo = false
19416   ;
19417   return 0;
19418 }
19419 _ACEOF
19420 rm -f conftest.$ac_objext
19421 if { (eval echo "$as_me:19421: \"$ac_compile\"") >&5
19422   (eval $ac_compile) 2>&5
19423   ac_status=$?
19424   echo "$as_me:19424: \$? = $ac_status" >&5
19425   (exit $ac_status); } &&
19426          { ac_try='test -s conftest.$ac_objext'
19427   { (eval echo "$as_me:19427: \"$ac_try\"") >&5
19428   (eval $ac_try) 2>&5
19429   ac_status=$?
19430   echo "$as_me:19430: \$? = $ac_status" >&5
19431   (exit $ac_status); }; }; then
19432   cf_cv_header_stdbool_h=0
19433 else
19434   echo "$as_me: failed program was:" >&5
19435 cat conftest.$ac_ext >&5
19436 cat >conftest.$ac_ext <<_ACEOF
19437 #line 19437 "configure"
19438 #include "confdefs.h"
19439
19440 #ifndef __BEOS__
19441 #include <stdbool.h>
19442 #endif
19443
19444 int
19445 main ()
19446 {
19447 bool foo = false
19448   ;
19449   return 0;
19450 }
19451 _ACEOF
19452 rm -f conftest.$ac_objext
19453 if { (eval echo "$as_me:19453: \"$ac_compile\"") >&5
19454   (eval $ac_compile) 2>&5
19455   ac_status=$?
19456   echo "$as_me:19456: \$? = $ac_status" >&5
19457   (exit $ac_status); } &&
19458          { ac_try='test -s conftest.$ac_objext'
19459   { (eval echo "$as_me:19459: \"$ac_try\"") >&5
19460   (eval $ac_try) 2>&5
19461   ac_status=$?
19462   echo "$as_me:19462: \$? = $ac_status" >&5
19463   (exit $ac_status); }; }; then
19464   cf_cv_header_stdbool_h=1
19465 else
19466   echo "$as_me: failed program was:" >&5
19467 cat conftest.$ac_ext >&5
19468 cf_cv_header_stdbool_h=0
19469 fi
19470 rm -f conftest.$ac_objext conftest.$ac_ext
19471 fi
19472 rm -f conftest.$ac_objext conftest.$ac_ext
19473 fi
19474
19475 if test "$cf_cv_header_stdbool_h" = 1
19476 then    echo "$as_me:19476: result: yes" >&5
19477 echo "${ECHO_T}yes" >&6
19478 else    echo "$as_me:19478: result: no" >&5
19479 echo "${ECHO_T}no" >&6
19480 fi
19481
19482 echo "$as_me:19482: checking for builtin bool type" >&5
19483 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19484
19485 if test "${cf_cv_cc_bool_type+set}" = set; then
19486   echo $ECHO_N "(cached) $ECHO_C" >&6
19487 else
19488
19489         cat >conftest.$ac_ext <<_ACEOF
19490 #line 19490 "configure"
19491 #include "confdefs.h"
19492
19493 #include <stdio.h>
19494 #include <sys/types.h>
19495
19496 int
19497 main ()
19498 {
19499 bool x = false
19500   ;
19501   return 0;
19502 }
19503 _ACEOF
19504 rm -f conftest.$ac_objext
19505 if { (eval echo "$as_me:19505: \"$ac_compile\"") >&5
19506   (eval $ac_compile) 2>&5
19507   ac_status=$?
19508   echo "$as_me:19508: \$? = $ac_status" >&5
19509   (exit $ac_status); } &&
19510          { ac_try='test -s conftest.$ac_objext'
19511   { (eval echo "$as_me:19511: \"$ac_try\"") >&5
19512   (eval $ac_try) 2>&5
19513   ac_status=$?
19514   echo "$as_me:19514: \$? = $ac_status" >&5
19515   (exit $ac_status); }; }; then
19516   cf_cv_cc_bool_type=1
19517 else
19518   echo "$as_me: failed program was:" >&5
19519 cat conftest.$ac_ext >&5
19520 cf_cv_cc_bool_type=0
19521 fi
19522 rm -f conftest.$ac_objext conftest.$ac_ext
19523
19524 fi
19525
19526 if test "$cf_cv_cc_bool_type" = 1
19527 then    echo "$as_me:19527: result: yes" >&5
19528 echo "${ECHO_T}yes" >&6
19529 else    echo "$as_me:19529: result: no" >&5
19530 echo "${ECHO_T}no" >&6
19531 fi
19532
19533 # Check for C++ compiler characteristics (and ensure that it's there!)
19534 if test -n "$CXX" ; then
19535         ac_ext=cc
19536 ac_cpp='$CXXCPP $CPPFLAGS'
19537 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19538 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19539 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19540 ac_main_return=return
19541
19542 if test -n "$GXX" ; then
19543
19544         cf_save="$LIBS"
19545         LIBS="$LIBS $CXXLIBS"
19546         echo "$as_me:19546: checking if we already have C++ library" >&5
19547 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19548         cat >conftest.$ac_ext <<_ACEOF
19549 #line 19549 "configure"
19550 #include "confdefs.h"
19551
19552                         #include <iostream>
19553 int
19554 main ()
19555 {
19556
19557                         std::cout << "Hello World!" << std::endl;
19558   ;
19559   return 0;
19560 }
19561 _ACEOF
19562 rm -f conftest.$ac_objext conftest$ac_exeext
19563 if { (eval echo "$as_me:19563: \"$ac_link\"") >&5
19564   (eval $ac_link) 2>&5
19565   ac_status=$?
19566   echo "$as_me:19566: \$? = $ac_status" >&5
19567   (exit $ac_status); } &&
19568          { ac_try='test -s conftest$ac_exeext'
19569   { (eval echo "$as_me:19569: \"$ac_try\"") >&5
19570   (eval $ac_try) 2>&5
19571   ac_status=$?
19572   echo "$as_me:19572: \$? = $ac_status" >&5
19573   (exit $ac_status); }; }; then
19574   cf_have_libstdcpp=yes
19575 else
19576   echo "$as_me: failed program was:" >&5
19577 cat conftest.$ac_ext >&5
19578 cf_have_libstdcpp=no
19579 fi
19580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19581         echo "$as_me:19581: result: $cf_have_libstdcpp" >&5
19582 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19583         LIBS="$cf_save"
19584
19585         if test $cf_have_libstdcpp != yes
19586         then
19587                 case $cf_cv_system_name in
19588                 (os2*)
19589                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19590                                 cf_stdcpp_libname=stdcpp
19591                         else
19592                                 cf_stdcpp_libname=stdc++
19593                         fi
19594                         ;;
19595                 (*)
19596                         cf_stdcpp_libname=stdc++
19597                         ;;
19598                 esac
19599
19600                 echo "$as_me:19600: checking for library $cf_stdcpp_libname" >&5
19601 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19602 if test "${cf_cv_libstdcpp+set}" = set; then
19603   echo $ECHO_N "(cached) $ECHO_C" >&6
19604 else
19605
19606                         cf_save="$LIBS"
19607                         LIBS="$LIBS $CXXLIBS"
19608
19609 cf_add_libs="-l$cf_stdcpp_libname"
19610 # Filter out duplicates - this happens with badly-designed ".pc" files...
19611 for cf_add_1lib in $LIBS
19612 do
19613         for cf_add_2lib in $cf_add_libs
19614         do
19615                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19616                 then
19617                         cf_add_1lib=
19618                         break
19619                 fi
19620         done
19621         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19622 done
19623 LIBS="$cf_add_libs"
19624
19625                 cat >conftest.$ac_ext <<_ACEOF
19626 #line 19626 "configure"
19627 #include "confdefs.h"
19628
19629                                 #include <iostream>
19630 int
19631 main ()
19632 {
19633
19634                                 std::cout << "Hello World!" << std::endl;
19635   ;
19636   return 0;
19637 }
19638 _ACEOF
19639 rm -f conftest.$ac_objext conftest$ac_exeext
19640 if { (eval echo "$as_me:19640: \"$ac_link\"") >&5
19641   (eval $ac_link) 2>&5
19642   ac_status=$?
19643   echo "$as_me:19643: \$? = $ac_status" >&5
19644   (exit $ac_status); } &&
19645          { ac_try='test -s conftest$ac_exeext'
19646   { (eval echo "$as_me:19646: \"$ac_try\"") >&5
19647   (eval $ac_try) 2>&5
19648   ac_status=$?
19649   echo "$as_me:19649: \$? = $ac_status" >&5
19650   (exit $ac_status); }; }; then
19651   cf_cv_libstdcpp=yes
19652 else
19653   echo "$as_me: failed program was:" >&5
19654 cat conftest.$ac_ext >&5
19655 cf_cv_libstdcpp=no
19656 fi
19657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19658                         LIBS="$cf_save"
19659
19660 fi
19661 echo "$as_me:19661: result: $cf_cv_libstdcpp" >&5
19662 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19663                 test "$cf_cv_libstdcpp" = yes && {
19664 cf_add_libs="-l$cf_stdcpp_libname"
19665 # Filter out duplicates - this happens with badly-designed ".pc" files...
19666 for cf_add_1lib in $CXXLIBS
19667 do
19668         for cf_add_2lib in $cf_add_libs
19669         do
19670                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19671                 then
19672                         cf_add_1lib=
19673                         break
19674                 fi
19675         done
19676         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19677 done
19678 CXXLIBS="$cf_add_libs"
19679  }
19680         fi
19681 fi
19682
19683         echo "$as_me:19683: checking whether $CXX understands -c and -o together" >&5
19684 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19685 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19686   echo $ECHO_N "(cached) $ECHO_C" >&6
19687 else
19688
19689 cat > conftest.$ac_ext <<CF_EOF
19690 #include <stdio.h>
19691 int main()
19692 {
19693         ${cf_cv_main_return:-return}(0);
19694 }
19695 CF_EOF
19696 # We do the test twice because some compilers refuse to overwrite an
19697 # existing .o file with -o, though they will create one.
19698 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19699 if { (eval echo "$as_me:19699: \"$ac_try\"") >&5
19700   (eval $ac_try) 2>&5
19701   ac_status=$?
19702   echo "$as_me:19702: \$? = $ac_status" >&5
19703   (exit $ac_status); } &&
19704   test -f conftest2.$ac_objext && { (eval echo "$as_me:19704: \"$ac_try\"") >&5
19705   (eval $ac_try) 2>&5
19706   ac_status=$?
19707   echo "$as_me:19707: \$? = $ac_status" >&5
19708   (exit $ac_status); };
19709 then
19710   eval cf_cv_prog_CXX_c_o=yes
19711 else
19712   eval cf_cv_prog_CXX_c_o=no
19713 fi
19714 rm -rf conftest*
19715
19716 fi
19717 if test $cf_cv_prog_CXX_c_o = yes; then
19718   echo "$as_me:19718: result: yes" >&5
19719 echo "${ECHO_T}yes" >&6
19720 else
19721   echo "$as_me:19721: result: no" >&5
19722 echo "${ECHO_T}no" >&6
19723 fi
19724
19725         case $GXX_VERSION in
19726         (1*|2.0-6*)
19727                 cf_cxx_library=yes
19728                 ;;
19729         (*-2.7*|2.7*)
19730
19731 cf_cxx_library=unknown
19732 case $cf_cv_system_name in
19733 (os2*)
19734         cf_gpp_libname=gpp
19735         ;;
19736 (*)
19737         cf_gpp_libname=g++
19738         ;;
19739 esac
19740 if test "$GXX" = yes; then
19741         echo "$as_me:19741: checking for lib$cf_gpp_libname" >&5
19742 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19743         cf_save="$LIBS"
19744
19745 cf_add_libs="-l$cf_gpp_libname"
19746 # Filter out duplicates - this happens with badly-designed ".pc" files...
19747 for cf_add_1lib in $LIBS
19748 do
19749         for cf_add_2lib in $cf_add_libs
19750         do
19751                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19752                 then
19753                         cf_add_1lib=
19754                         break
19755                 fi
19756         done
19757         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19758 done
19759 LIBS="$cf_add_libs"
19760
19761         cat >conftest.$ac_ext <<_ACEOF
19762 #line 19762 "configure"
19763 #include "confdefs.h"
19764
19765 #include <$cf_gpp_libname/builtin.h>
19766
19767 int
19768 main ()
19769 {
19770 two_arg_error_handler_t foo2 = lib_error_handler
19771   ;
19772   return 0;
19773 }
19774 _ACEOF
19775 rm -f conftest.$ac_objext conftest$ac_exeext
19776 if { (eval echo "$as_me:19776: \"$ac_link\"") >&5
19777   (eval $ac_link) 2>&5
19778   ac_status=$?
19779   echo "$as_me:19779: \$? = $ac_status" >&5
19780   (exit $ac_status); } &&
19781          { ac_try='test -s conftest$ac_exeext'
19782   { (eval echo "$as_me:19782: \"$ac_try\"") >&5
19783   (eval $ac_try) 2>&5
19784   ac_status=$?
19785   echo "$as_me:19785: \$? = $ac_status" >&5
19786   (exit $ac_status); }; }; then
19787   cf_cxx_library=yes
19788
19789 cf_add_libs="-l$cf_gpp_libname"
19790 # Filter out duplicates - this happens with badly-designed ".pc" files...
19791 for cf_add_1lib in $CXXLIBS
19792 do
19793         for cf_add_2lib in $cf_add_libs
19794         do
19795                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19796                 then
19797                         cf_add_1lib=
19798                         break
19799                 fi
19800         done
19801         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19802 done
19803 CXXLIBS="$cf_add_libs"
19804
19805          if test "$cf_gpp_libname" = cpp ; then
19806
19807 cat >>confdefs.h <<\EOF
19808 #define HAVE_GPP_BUILTIN_H 1
19809 EOF
19810
19811          else
19812
19813 cat >>confdefs.h <<\EOF
19814 #define HAVE_GXX_BUILTIN_H 1
19815 EOF
19816
19817          fi
19818 else
19819   echo "$as_me: failed program was:" >&5
19820 cat conftest.$ac_ext >&5
19821 cat >conftest.$ac_ext <<_ACEOF
19822 #line 19822 "configure"
19823 #include "confdefs.h"
19824
19825 #include <builtin.h>
19826
19827 int
19828 main ()
19829 {
19830 two_arg_error_handler_t foo2 = lib_error_handler
19831   ;
19832   return 0;
19833 }
19834 _ACEOF
19835 rm -f conftest.$ac_objext conftest$ac_exeext
19836 if { (eval echo "$as_me:19836: \"$ac_link\"") >&5
19837   (eval $ac_link) 2>&5
19838   ac_status=$?
19839   echo "$as_me:19839: \$? = $ac_status" >&5
19840   (exit $ac_status); } &&
19841          { ac_try='test -s conftest$ac_exeext'
19842   { (eval echo "$as_me:19842: \"$ac_try\"") >&5
19843   (eval $ac_try) 2>&5
19844   ac_status=$?
19845   echo "$as_me:19845: \$? = $ac_status" >&5
19846   (exit $ac_status); }; }; then
19847   cf_cxx_library=yes
19848
19849 cf_add_libs="-l$cf_gpp_libname"
19850 # Filter out duplicates - this happens with badly-designed ".pc" files...
19851 for cf_add_1lib in $CXXLIBS
19852 do
19853         for cf_add_2lib in $cf_add_libs
19854         do
19855                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19856                 then
19857                         cf_add_1lib=
19858                         break
19859                 fi
19860         done
19861         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19862 done
19863 CXXLIBS="$cf_add_libs"
19864
19865 cat >>confdefs.h <<\EOF
19866 #define HAVE_BUILTIN_H 1
19867 EOF
19868
19869 else
19870   echo "$as_me: failed program was:" >&5
19871 cat conftest.$ac_ext >&5
19872 cf_cxx_library=no
19873 fi
19874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19875 fi
19876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19877         LIBS="$cf_save"
19878         echo "$as_me:19878: result: $cf_cxx_library" >&5
19879 echo "${ECHO_T}$cf_cxx_library" >&6
19880 fi
19881
19882                 ;;
19883         (*)
19884                 cf_cxx_library=no
19885                 ;;
19886         esac
19887
19888         ac_ext=cc
19889 ac_cpp='$CXXCPP $CPPFLAGS'
19890 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19891 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19892 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19893 ac_main_return=return
19894 echo "$as_me:19894: checking how to run the C++ preprocessor" >&5
19895 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19896 if test -z "$CXXCPP"; then
19897   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19898   echo $ECHO_N "(cached) $ECHO_C" >&6
19899 else
19900       # Double quotes because CXXCPP needs to be expanded
19901     for CXXCPP in "$CXX -E" "/lib/cpp"
19902     do
19903       ac_preproc_ok=false
19904 for ac_cxx_preproc_warn_flag in '' yes
19905 do
19906   # Use a header file that comes with gcc, so configuring glibc
19907   # with a fresh cross-compiler works.
19908   # On the NeXT, cc -E runs the code through the compiler's parser,
19909   # not just through cpp. "Syntax error" is here to catch this case.
19910   cat >conftest.$ac_ext <<_ACEOF
19911 #line 19911 "configure"
19912 #include "confdefs.h"
19913 #include <assert.h>
19914                      Syntax error
19915 _ACEOF
19916 if { (eval echo "$as_me:19916: \"$ac_cpp conftest.$ac_ext\"") >&5
19917   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19918   ac_status=$?
19919   egrep -v '^ *\+' conftest.er1 >conftest.err
19920   rm -f conftest.er1
19921   cat conftest.err >&5
19922   echo "$as_me:19922: \$? = $ac_status" >&5
19923   (exit $ac_status); } >/dev/null; then
19924   if test -s conftest.err; then
19925     ac_cpp_err=$ac_cxx_preproc_warn_flag
19926   else
19927     ac_cpp_err=
19928   fi
19929 else
19930   ac_cpp_err=yes
19931 fi
19932 if test -z "$ac_cpp_err"; then
19933   :
19934 else
19935   echo "$as_me: failed program was:" >&5
19936   cat conftest.$ac_ext >&5
19937   # Broken: fails on valid input.
19938 continue
19939 fi
19940 rm -f conftest.err conftest.$ac_ext
19941
19942   # OK, works on sane cases.  Now check whether non-existent headers
19943   # can be detected and how.
19944   cat >conftest.$ac_ext <<_ACEOF
19945 #line 19945 "configure"
19946 #include "confdefs.h"
19947 #include <ac_nonexistent.h>
19948 _ACEOF
19949 if { (eval echo "$as_me:19949: \"$ac_cpp conftest.$ac_ext\"") >&5
19950   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19951   ac_status=$?
19952   egrep -v '^ *\+' conftest.er1 >conftest.err
19953   rm -f conftest.er1
19954   cat conftest.err >&5
19955   echo "$as_me:19955: \$? = $ac_status" >&5
19956   (exit $ac_status); } >/dev/null; then
19957   if test -s conftest.err; then
19958     ac_cpp_err=$ac_cxx_preproc_warn_flag
19959   else
19960     ac_cpp_err=
19961   fi
19962 else
19963   ac_cpp_err=yes
19964 fi
19965 if test -z "$ac_cpp_err"; then
19966   # Broken: success on invalid input.
19967 continue
19968 else
19969   echo "$as_me: failed program was:" >&5
19970   cat conftest.$ac_ext >&5
19971   # Passes both tests.
19972 ac_preproc_ok=:
19973 break
19974 fi
19975 rm -f conftest.err conftest.$ac_ext
19976
19977 done
19978 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19979 rm -f conftest.err conftest.$ac_ext
19980 if $ac_preproc_ok; then
19981   break
19982 fi
19983
19984     done
19985     ac_cv_prog_CXXCPP=$CXXCPP
19986
19987 fi
19988   CXXCPP=$ac_cv_prog_CXXCPP
19989 else
19990   ac_cv_prog_CXXCPP=$CXXCPP
19991 fi
19992 echo "$as_me:19992: result: $CXXCPP" >&5
19993 echo "${ECHO_T}$CXXCPP" >&6
19994 ac_preproc_ok=false
19995 for ac_cxx_preproc_warn_flag in '' yes
19996 do
19997   # Use a header file that comes with gcc, so configuring glibc
19998   # with a fresh cross-compiler works.
19999   # On the NeXT, cc -E runs the code through the compiler's parser,
20000   # not just through cpp. "Syntax error" is here to catch this case.
20001   cat >conftest.$ac_ext <<_ACEOF
20002 #line 20002 "configure"
20003 #include "confdefs.h"
20004 #include <assert.h>
20005                      Syntax error
20006 _ACEOF
20007 if { (eval echo "$as_me:20007: \"$ac_cpp conftest.$ac_ext\"") >&5
20008   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20009   ac_status=$?
20010   egrep -v '^ *\+' conftest.er1 >conftest.err
20011   rm -f conftest.er1
20012   cat conftest.err >&5
20013   echo "$as_me:20013: \$? = $ac_status" >&5
20014   (exit $ac_status); } >/dev/null; then
20015   if test -s conftest.err; then
20016     ac_cpp_err=$ac_cxx_preproc_warn_flag
20017   else
20018     ac_cpp_err=
20019   fi
20020 else
20021   ac_cpp_err=yes
20022 fi
20023 if test -z "$ac_cpp_err"; then
20024   :
20025 else
20026   echo "$as_me: failed program was:" >&5
20027   cat conftest.$ac_ext >&5
20028   # Broken: fails on valid input.
20029 continue
20030 fi
20031 rm -f conftest.err conftest.$ac_ext
20032
20033   # OK, works on sane cases.  Now check whether non-existent headers
20034   # can be detected and how.
20035   cat >conftest.$ac_ext <<_ACEOF
20036 #line 20036 "configure"
20037 #include "confdefs.h"
20038 #include <ac_nonexistent.h>
20039 _ACEOF
20040 if { (eval echo "$as_me:20040: \"$ac_cpp conftest.$ac_ext\"") >&5
20041   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20042   ac_status=$?
20043   egrep -v '^ *\+' conftest.er1 >conftest.err
20044   rm -f conftest.er1
20045   cat conftest.err >&5
20046   echo "$as_me:20046: \$? = $ac_status" >&5
20047   (exit $ac_status); } >/dev/null; then
20048   if test -s conftest.err; then
20049     ac_cpp_err=$ac_cxx_preproc_warn_flag
20050   else
20051     ac_cpp_err=
20052   fi
20053 else
20054   ac_cpp_err=yes
20055 fi
20056 if test -z "$ac_cpp_err"; then
20057   # Broken: success on invalid input.
20058 continue
20059 else
20060   echo "$as_me: failed program was:" >&5
20061   cat conftest.$ac_ext >&5
20062   # Passes both tests.
20063 ac_preproc_ok=:
20064 break
20065 fi
20066 rm -f conftest.err conftest.$ac_ext
20067
20068 done
20069 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20070 rm -f conftest.err conftest.$ac_ext
20071 if $ac_preproc_ok; then
20072   :
20073 else
20074   { { echo "$as_me:20074: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20075 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20076    { (exit 1); exit 1; }; }
20077 fi
20078
20079 ac_ext=cc
20080 ac_cpp='$CXXCPP $CPPFLAGS'
20081 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20082 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20083 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20084 ac_main_return=return
20085
20086 for ac_header in typeinfo
20087 do
20088 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20089 echo "$as_me:20089: checking for $ac_header" >&5
20090 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20091 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20092   echo $ECHO_N "(cached) $ECHO_C" >&6
20093 else
20094   cat >conftest.$ac_ext <<_ACEOF
20095 #line 20095 "configure"
20096 #include "confdefs.h"
20097 #include <$ac_header>
20098 _ACEOF
20099 if { (eval echo "$as_me:20099: \"$ac_cpp conftest.$ac_ext\"") >&5
20100   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20101   ac_status=$?
20102   egrep -v '^ *\+' conftest.er1 >conftest.err
20103   rm -f conftest.er1
20104   cat conftest.err >&5
20105   echo "$as_me:20105: \$? = $ac_status" >&5
20106   (exit $ac_status); } >/dev/null; then
20107   if test -s conftest.err; then
20108     ac_cpp_err=$ac_cxx_preproc_warn_flag
20109   else
20110     ac_cpp_err=
20111   fi
20112 else
20113   ac_cpp_err=yes
20114 fi
20115 if test -z "$ac_cpp_err"; then
20116   eval "$as_ac_Header=yes"
20117 else
20118   echo "$as_me: failed program was:" >&5
20119   cat conftest.$ac_ext >&5
20120   eval "$as_ac_Header=no"
20121 fi
20122 rm -f conftest.err conftest.$ac_ext
20123 fi
20124 echo "$as_me:20124: result: `eval echo '${'$as_ac_Header'}'`" >&5
20125 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20126 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20127   cat >>confdefs.h <<EOF
20128 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20129 EOF
20130
20131 fi
20132 done
20133
20134 for ac_header in iostream
20135 do
20136 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20137 echo "$as_me:20137: checking for $ac_header" >&5
20138 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20139 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20140   echo $ECHO_N "(cached) $ECHO_C" >&6
20141 else
20142   cat >conftest.$ac_ext <<_ACEOF
20143 #line 20143 "configure"
20144 #include "confdefs.h"
20145 #include <$ac_header>
20146 _ACEOF
20147 if { (eval echo "$as_me:20147: \"$ac_cpp conftest.$ac_ext\"") >&5
20148   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20149   ac_status=$?
20150   egrep -v '^ *\+' conftest.er1 >conftest.err
20151   rm -f conftest.er1
20152   cat conftest.err >&5
20153   echo "$as_me:20153: \$? = $ac_status" >&5
20154   (exit $ac_status); } >/dev/null; then
20155   if test -s conftest.err; then
20156     ac_cpp_err=$ac_cxx_preproc_warn_flag
20157   else
20158     ac_cpp_err=
20159   fi
20160 else
20161   ac_cpp_err=yes
20162 fi
20163 if test -z "$ac_cpp_err"; then
20164   eval "$as_ac_Header=yes"
20165 else
20166   echo "$as_me: failed program was:" >&5
20167   cat conftest.$ac_ext >&5
20168   eval "$as_ac_Header=no"
20169 fi
20170 rm -f conftest.err conftest.$ac_ext
20171 fi
20172 echo "$as_me:20172: result: `eval echo '${'$as_ac_Header'}'`" >&5
20173 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20174 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20175   cat >>confdefs.h <<EOF
20176 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20177 EOF
20178
20179 fi
20180 done
20181
20182 if test x"$ac_cv_header_iostream" = xyes ; then
20183         echo "$as_me:20183: checking if iostream uses std-namespace" >&5
20184 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20185         cat >conftest.$ac_ext <<_ACEOF
20186 #line 20186 "configure"
20187 #include "confdefs.h"
20188
20189 #include <iostream>
20190 using std::endl;
20191 using std::cerr;
20192 int
20193 main ()
20194 {
20195
20196 cerr << "testing" << endl;
20197
20198   ;
20199   return 0;
20200 }
20201 _ACEOF
20202 rm -f conftest.$ac_objext
20203 if { (eval echo "$as_me:20203: \"$ac_compile\"") >&5
20204   (eval $ac_compile) 2>&5
20205   ac_status=$?
20206   echo "$as_me:20206: \$? = $ac_status" >&5
20207   (exit $ac_status); } &&
20208          { ac_try='test -s conftest.$ac_objext'
20209   { (eval echo "$as_me:20209: \"$ac_try\"") >&5
20210   (eval $ac_try) 2>&5
20211   ac_status=$?
20212   echo "$as_me:20212: \$? = $ac_status" >&5
20213   (exit $ac_status); }; }; then
20214   cf_iostream_namespace=yes
20215 else
20216   echo "$as_me: failed program was:" >&5
20217 cat conftest.$ac_ext >&5
20218 cf_iostream_namespace=no
20219 fi
20220 rm -f conftest.$ac_objext conftest.$ac_ext
20221         echo "$as_me:20221: result: $cf_iostream_namespace" >&5
20222 echo "${ECHO_T}$cf_iostream_namespace" >&6
20223         if test "$cf_iostream_namespace" = yes ; then
20224
20225 cat >>confdefs.h <<\EOF
20226 #define IOSTREAM_NAMESPACE 1
20227 EOF
20228
20229         fi
20230 fi
20231
20232 echo "$as_me:20232: checking if we should include stdbool.h" >&5
20233 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20234
20235 if test "${cf_cv_header_stdbool_h+set}" = set; then
20236   echo $ECHO_N "(cached) $ECHO_C" >&6
20237 else
20238
20239         cat >conftest.$ac_ext <<_ACEOF
20240 #line 20240 "configure"
20241 #include "confdefs.h"
20242
20243 int
20244 main ()
20245 {
20246 bool foo = false
20247   ;
20248   return 0;
20249 }
20250 _ACEOF
20251 rm -f conftest.$ac_objext
20252 if { (eval echo "$as_me:20252: \"$ac_compile\"") >&5
20253   (eval $ac_compile) 2>&5
20254   ac_status=$?
20255   echo "$as_me:20255: \$? = $ac_status" >&5
20256   (exit $ac_status); } &&
20257          { ac_try='test -s conftest.$ac_objext'
20258   { (eval echo "$as_me:20258: \"$ac_try\"") >&5
20259   (eval $ac_try) 2>&5
20260   ac_status=$?
20261   echo "$as_me:20261: \$? = $ac_status" >&5
20262   (exit $ac_status); }; }; then
20263   cf_cv_header_stdbool_h=0
20264 else
20265   echo "$as_me: failed program was:" >&5
20266 cat conftest.$ac_ext >&5
20267 cat >conftest.$ac_ext <<_ACEOF
20268 #line 20268 "configure"
20269 #include "confdefs.h"
20270
20271 #ifndef __BEOS__
20272 #include <stdbool.h>
20273 #endif
20274
20275 int
20276 main ()
20277 {
20278 bool foo = false
20279   ;
20280   return 0;
20281 }
20282 _ACEOF
20283 rm -f conftest.$ac_objext
20284 if { (eval echo "$as_me:20284: \"$ac_compile\"") >&5
20285   (eval $ac_compile) 2>&5
20286   ac_status=$?
20287   echo "$as_me:20287: \$? = $ac_status" >&5
20288   (exit $ac_status); } &&
20289          { ac_try='test -s conftest.$ac_objext'
20290   { (eval echo "$as_me:20290: \"$ac_try\"") >&5
20291   (eval $ac_try) 2>&5
20292   ac_status=$?
20293   echo "$as_me:20293: \$? = $ac_status" >&5
20294   (exit $ac_status); }; }; then
20295   cf_cv_header_stdbool_h=1
20296 else
20297   echo "$as_me: failed program was:" >&5
20298 cat conftest.$ac_ext >&5
20299 cf_cv_header_stdbool_h=0
20300 fi
20301 rm -f conftest.$ac_objext conftest.$ac_ext
20302 fi
20303 rm -f conftest.$ac_objext conftest.$ac_ext
20304 fi
20305
20306 if test "$cf_cv_header_stdbool_h" = 1
20307 then    echo "$as_me:20307: result: yes" >&5
20308 echo "${ECHO_T}yes" >&6
20309 else    echo "$as_me:20309: result: no" >&5
20310 echo "${ECHO_T}no" >&6
20311 fi
20312
20313 echo "$as_me:20313: checking for builtin bool type" >&5
20314 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20315
20316 if test "${cf_cv_builtin_bool+set}" = set; then
20317   echo $ECHO_N "(cached) $ECHO_C" >&6
20318 else
20319
20320         cat >conftest.$ac_ext <<_ACEOF
20321 #line 20321 "configure"
20322 #include "confdefs.h"
20323
20324 #include <stdio.h>
20325 #include <sys/types.h>
20326
20327 int
20328 main ()
20329 {
20330 bool x = false
20331   ;
20332   return 0;
20333 }
20334 _ACEOF
20335 rm -f conftest.$ac_objext
20336 if { (eval echo "$as_me:20336: \"$ac_compile\"") >&5
20337   (eval $ac_compile) 2>&5
20338   ac_status=$?
20339   echo "$as_me:20339: \$? = $ac_status" >&5
20340   (exit $ac_status); } &&
20341          { ac_try='test -s conftest.$ac_objext'
20342   { (eval echo "$as_me:20342: \"$ac_try\"") >&5
20343   (eval $ac_try) 2>&5
20344   ac_status=$?
20345   echo "$as_me:20345: \$? = $ac_status" >&5
20346   (exit $ac_status); }; }; then
20347   cf_cv_builtin_bool=1
20348 else
20349   echo "$as_me: failed program was:" >&5
20350 cat conftest.$ac_ext >&5
20351 cf_cv_builtin_bool=0
20352 fi
20353 rm -f conftest.$ac_objext conftest.$ac_ext
20354
20355 fi
20356
20357 if test "$cf_cv_builtin_bool" = 1
20358 then    echo "$as_me:20358: result: yes" >&5
20359 echo "${ECHO_T}yes" >&6
20360 else    echo "$as_me:20360: result: no" >&5
20361 echo "${ECHO_T}no" >&6
20362 fi
20363
20364 echo "$as_me:20364: checking for size of bool" >&5
20365 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20366 if test "${cf_cv_type_of_bool+set}" = set; then
20367   echo $ECHO_N "(cached) $ECHO_C" >&6
20368 else
20369
20370         rm -f cf_test.out
20371         if test "$cross_compiling" = yes; then
20372   cf_cv_type_of_bool=unknown
20373 else
20374   cat >conftest.$ac_ext <<_ACEOF
20375 #line 20375 "configure"
20376 #include "confdefs.h"
20377
20378 #include <stdlib.h>
20379 #include <stdio.h>
20380
20381 #if defined(__cplusplus)
20382
20383 #ifdef HAVE_GXX_BUILTIN_H
20384 #include <g++/builtin.h>
20385 #elif HAVE_GPP_BUILTIN_H
20386 #include <gpp/builtin.h>
20387 #elif HAVE_BUILTIN_H
20388 #include <builtin.h>
20389 #endif
20390
20391 #else
20392
20393 #if $cf_cv_header_stdbool_h
20394 #include <stdbool.h>
20395 #endif
20396
20397 #endif
20398
20399 int main()
20400 {
20401         FILE *fp = fopen("cf_test.out", "w");
20402         if (fp != 0) {
20403                 bool x = true;
20404                 if ((bool)(-x) >= 0)
20405                         fputs("unsigned ", fp);
20406                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20407                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20408                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20409                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20410                 fclose(fp);
20411         }
20412         ${cf_cv_main_return:-return}(0);
20413 }
20414
20415 _ACEOF
20416 rm -f conftest$ac_exeext
20417 if { (eval echo "$as_me:20417: \"$ac_link\"") >&5
20418   (eval $ac_link) 2>&5
20419   ac_status=$?
20420   echo "$as_me:20420: \$? = $ac_status" >&5
20421   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20422   { (eval echo "$as_me:20422: \"$ac_try\"") >&5
20423   (eval $ac_try) 2>&5
20424   ac_status=$?
20425   echo "$as_me:20425: \$? = $ac_status" >&5
20426   (exit $ac_status); }; }; then
20427   cf_cv_type_of_bool=`cat cf_test.out`
20428                  if test -z "$cf_cv_type_of_bool"; then
20429                    cf_cv_type_of_bool=unknown
20430                  fi
20431 else
20432   echo "$as_me: program exited with status $ac_status" >&5
20433 echo "$as_me: failed program was:" >&5
20434 cat conftest.$ac_ext >&5
20435 cf_cv_type_of_bool=unknown
20436 fi
20437 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20438 fi
20439
20440 fi
20441
20442         rm -f cf_test.out
20443 echo "$as_me:20443: result: $cf_cv_type_of_bool" >&5
20444 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20445 if test "$cf_cv_type_of_bool" = unknown ; then
20446         case .$NCURSES_BOOL in
20447         (.auto|.) NCURSES_BOOL=unsigned;;
20448         esac
20449         { echo "$as_me:20449: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20450 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20451         cf_cv_type_of_bool=$NCURSES_BOOL
20452 fi
20453
20454 echo "$as_me:20454: checking for special defines needed for etip.h" >&5
20455 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20456 cf_save_CXXFLAGS="$CXXFLAGS"
20457 cf_result="none"
20458
20459 # etip.h includes ncurses.h which includes ncurses_dll.h
20460 # But ncurses_dll.h is generated - fix here.
20461 test -d include || mkdir include
20462 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
20463
20464 for cf_math in "" MATH_H
20465 do
20466 for cf_excp in "" MATH_EXCEPTION
20467 do
20468         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20469         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20470         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20471 cat >conftest.$ac_ext <<_ACEOF
20472 #line 20472 "configure"
20473 #include "confdefs.h"
20474
20475 #include <etip.h.in>
20476
20477 int
20478 main ()
20479 {
20480
20481   ;
20482   return 0;
20483 }
20484 _ACEOF
20485 rm -f conftest.$ac_objext
20486 if { (eval echo "$as_me:20486: \"$ac_compile\"") >&5
20487   (eval $ac_compile) 2>&5
20488   ac_status=$?
20489   echo "$as_me:20489: \$? = $ac_status" >&5
20490   (exit $ac_status); } &&
20491          { ac_try='test -s conftest.$ac_objext'
20492   { (eval echo "$as_me:20492: \"$ac_try\"") >&5
20493   (eval $ac_try) 2>&5
20494   ac_status=$?
20495   echo "$as_me:20495: \$? = $ac_status" >&5
20496   (exit $ac_status); }; }; then
20497
20498         test -n "$cf_math" && cat >>confdefs.h <<EOF
20499 #define ETIP_NEEDS_${cf_math} 1
20500 EOF
20501
20502         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20503 #define ETIP_NEEDS_${cf_excp} 1
20504 EOF
20505
20506         cf_result="$cf_math $cf_excp"
20507         break 2
20508
20509 else
20510   echo "$as_me: failed program was:" >&5
20511 cat conftest.$ac_ext >&5
20512 fi
20513 rm -f conftest.$ac_objext conftest.$ac_ext
20514 done
20515 done
20516 echo "$as_me:20516: result: $cf_result" >&5
20517 echo "${ECHO_T}$cf_result" >&6
20518 CXXFLAGS="$cf_save_CXXFLAGS"
20519
20520 if test -n "$CXX"; then
20521 echo "$as_me:20521: checking if $CXX accepts parameter initialization" >&5
20522 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20523 if test "${cf_cv_cpp_param_init+set}" = set; then
20524   echo $ECHO_N "(cached) $ECHO_C" >&6
20525 else
20526
20527         ac_ext=cc
20528 ac_cpp='$CXXCPP $CPPFLAGS'
20529 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20530 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20531 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20532 ac_main_return=return
20533
20534         if test "$cross_compiling" = yes; then
20535   cf_cv_cpp_param_init=unknown
20536 else
20537   cat >conftest.$ac_ext <<_ACEOF
20538 #line 20538 "configure"
20539 #include "confdefs.h"
20540
20541 class TEST {
20542 private:
20543         int value;
20544 public:
20545         TEST(int x = 1);
20546         ~TEST();
20547 };
20548
20549 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20550 {
20551         value = x;
20552 }
20553 int main() { }
20554
20555 _ACEOF
20556 rm -f conftest$ac_exeext
20557 if { (eval echo "$as_me:20557: \"$ac_link\"") >&5
20558   (eval $ac_link) 2>&5
20559   ac_status=$?
20560   echo "$as_me:20560: \$? = $ac_status" >&5
20561   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20562   { (eval echo "$as_me:20562: \"$ac_try\"") >&5
20563   (eval $ac_try) 2>&5
20564   ac_status=$?
20565   echo "$as_me:20565: \$? = $ac_status" >&5
20566   (exit $ac_status); }; }; then
20567   cf_cv_cpp_param_init=yes
20568 else
20569   echo "$as_me: program exited with status $ac_status" >&5
20570 echo "$as_me: failed program was:" >&5
20571 cat conftest.$ac_ext >&5
20572 cf_cv_cpp_param_init=no
20573 fi
20574 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20575 fi
20576         ac_ext=cc
20577 ac_cpp='$CXXCPP $CPPFLAGS'
20578 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20579 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20580 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20581 ac_main_return=return
20582
20583 fi
20584 echo "$as_me:20584: result: $cf_cv_cpp_param_init" >&5
20585 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20586 fi
20587 test "$cf_cv_cpp_param_init" = yes &&
20588 cat >>confdefs.h <<\EOF
20589 #define CPP_HAS_PARAM_INIT 1
20590 EOF
20591
20592 if test -n "$CXX"; then
20593
20594 echo "$as_me:20594: checking if $CXX accepts static_cast" >&5
20595 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20596 if test "${cf_cv_cpp_static_cast+set}" = set; then
20597   echo $ECHO_N "(cached) $ECHO_C" >&6
20598 else
20599
20600         ac_ext=cc
20601 ac_cpp='$CXXCPP $CPPFLAGS'
20602 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20603 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20604 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20605 ac_main_return=return
20606
20607         cat >conftest.$ac_ext <<_ACEOF
20608 #line 20608 "configure"
20609 #include "confdefs.h"
20610
20611 class NCursesPanel
20612 {
20613 public:
20614   NCursesPanel(int nlines,
20615                int ncols,
20616                int begin_y = 0,
20617                int begin_x = 0)
20618   {
20619   }
20620   NCursesPanel();
20621   ~NCursesPanel();
20622 };
20623
20624 template<class T> class NCursesUserPanel : public NCursesPanel
20625 {
20626 public:
20627   NCursesUserPanel (int nlines,
20628                     int ncols,
20629                     int begin_y = 0,
20630                     int begin_x = 0,
20631                     const T* p_UserData = static_cast<T*>(0))
20632     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20633   {
20634   };
20635   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20636   {
20637   };
20638
20639   virtual ~NCursesUserPanel() {};
20640 };
20641
20642 int
20643 main ()
20644 {
20645
20646         const char* p_UserData = static_cast<char*>(0)
20647   ;
20648   return 0;
20649 }
20650 _ACEOF
20651 rm -f conftest.$ac_objext
20652 if { (eval echo "$as_me:20652: \"$ac_compile\"") >&5
20653   (eval $ac_compile) 2>&5
20654   ac_status=$?
20655   echo "$as_me:20655: \$? = $ac_status" >&5
20656   (exit $ac_status); } &&
20657          { ac_try='test -s conftest.$ac_objext'
20658   { (eval echo "$as_me:20658: \"$ac_try\"") >&5
20659   (eval $ac_try) 2>&5
20660   ac_status=$?
20661   echo "$as_me:20661: \$? = $ac_status" >&5
20662   (exit $ac_status); }; }; then
20663   cf_cv_cpp_static_cast=yes
20664 else
20665   echo "$as_me: failed program was:" >&5
20666 cat conftest.$ac_ext >&5
20667 cf_cv_cpp_static_cast=no
20668 fi
20669 rm -f conftest.$ac_objext conftest.$ac_ext
20670
20671         ac_ext=cc
20672 ac_cpp='$CXXCPP $CPPFLAGS'
20673 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20674 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20675 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20676 ac_main_return=return
20677
20678 fi
20679 echo "$as_me:20679: result: $cf_cv_cpp_static_cast" >&5
20680 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20681
20682 fi
20683
20684 test "$cf_cv_cpp_static_cast" = yes &&
20685 cat >>confdefs.h <<\EOF
20686 #define CPP_HAS_STATIC_CAST 1
20687 EOF
20688
20689         CXX_AR='$(AR)'
20690         CXX_ARFLAGS='$(ARFLAGS)'
20691         case $cf_cv_system_name in
20692         (irix*)
20693             if test "$GXX" != yes ; then
20694                 CXX_AR='$(CXX)'
20695                 CXX_ARFLAGS='-ar -o'
20696             fi
20697             ;;
20698         (sco3.2v5*)
20699             CXXLDFLAGS="-u main"
20700             ;;
20701         (solaris2*)
20702             if test "$GXX" != yes ; then
20703                 CXX_AR='$(CXX)'
20704                 CXX_ARFLAGS='-xar -o'
20705             fi
20706             ;;
20707         esac
20708
20709 else
20710         cf_cxx_library=no
20711         cf_cv_builtin_bool=1
20712
20713         # Just because we are not configuring against C++ right now does not
20714         # mean that a user will not want to use C++.  Some distributors disable
20715         # the C++ portion of this configuration as a shortcut (or just to avoid
20716         # compiling the demo in the c++ directory).  So we need a reasonable
20717         # default for the 'bool' type.
20718         #
20719         # Caveat: since the storage of the bool type is not standardized, it
20720         # may change.
20721
20722         if test "$NCURSES_BOOL" != auto ; then
20723                 cf_cv_type_of_bool=$NCURSES_BOOL
20724                 cf_cv_header_stdbool_h=0
20725         else
20726                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20727
20728 echo "$as_me:20728: checking for size of bool" >&5
20729 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20730 if test "${cf_cv_type_of_bool+set}" = set; then
20731   echo $ECHO_N "(cached) $ECHO_C" >&6
20732 else
20733
20734         rm -f cf_test.out
20735         if test "$cross_compiling" = yes; then
20736   cf_cv_type_of_bool=unknown
20737 else
20738   cat >conftest.$ac_ext <<_ACEOF
20739 #line 20739 "configure"
20740 #include "confdefs.h"
20741
20742 #include <stdlib.h>
20743 #include <stdio.h>
20744
20745 #if defined(__cplusplus)
20746
20747 #ifdef HAVE_GXX_BUILTIN_H
20748 #include <g++/builtin.h>
20749 #elif HAVE_GPP_BUILTIN_H
20750 #include <gpp/builtin.h>
20751 #elif HAVE_BUILTIN_H
20752 #include <builtin.h>
20753 #endif
20754
20755 #else
20756
20757 #if $cf_cv_header_stdbool_h
20758 #include <stdbool.h>
20759 #endif
20760
20761 #endif
20762
20763 int main()
20764 {
20765         FILE *fp = fopen("cf_test.out", "w");
20766         if (fp != 0) {
20767                 bool x = true;
20768                 if ((bool)(-x) >= 0)
20769                         fputs("unsigned ", fp);
20770                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20771                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20772                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20773                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20774                 fclose(fp);
20775         }
20776         ${cf_cv_main_return:-return}(0);
20777 }
20778
20779 _ACEOF
20780 rm -f conftest$ac_exeext
20781 if { (eval echo "$as_me:20781: \"$ac_link\"") >&5
20782   (eval $ac_link) 2>&5
20783   ac_status=$?
20784   echo "$as_me:20784: \$? = $ac_status" >&5
20785   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20786   { (eval echo "$as_me:20786: \"$ac_try\"") >&5
20787   (eval $ac_try) 2>&5
20788   ac_status=$?
20789   echo "$as_me:20789: \$? = $ac_status" >&5
20790   (exit $ac_status); }; }; then
20791   cf_cv_type_of_bool=`cat cf_test.out`
20792                  if test -z "$cf_cv_type_of_bool"; then
20793                    cf_cv_type_of_bool=unknown
20794                  fi
20795 else
20796   echo "$as_me: program exited with status $ac_status" >&5
20797 echo "$as_me: failed program was:" >&5
20798 cat conftest.$ac_ext >&5
20799 cf_cv_type_of_bool=unknown
20800 fi
20801 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20802 fi
20803
20804 fi
20805
20806         rm -f cf_test.out
20807 echo "$as_me:20807: result: $cf_cv_type_of_bool" >&5
20808 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20809 if test "$cf_cv_type_of_bool" = unknown ; then
20810         case .$NCURSES_BOOL in
20811         (.auto|.) NCURSES_BOOL=unsigned;;
20812         esac
20813         { echo "$as_me:20813: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20814 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20815         cf_cv_type_of_bool=$NCURSES_BOOL
20816 fi
20817
20818                 else
20819                         echo "$as_me:20819: checking for fallback type of bool" >&5
20820 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20821                         case "$host_cpu" in
20822                         (i?86)  cf_cv_type_of_bool=char ;;
20823                         (*)     cf_cv_type_of_bool=int  ;;
20824                         esac
20825                         echo "$as_me:20825: result: $cf_cv_type_of_bool" >&5
20826 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20827                 fi
20828         fi
20829 fi
20830
20831 # If the C compiler did not declare bool, and we did not determine that the C++
20832 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20833 # ncurses library use the same type as C++ bool.  Note that this allows one to
20834 # specify the type of bool in a configure-script option and postpone
20835 # integration with the C++ compiler provided that the types are compatible.
20836 USE_CXX_BOOL=1
20837 if test $cf_cv_cc_bool_type = 1
20838 then
20839         # oops: C has a bool.  Unlikely, but C++ could differ.
20840         USE_CXX_BOOL=0
20841 elif test $cf_cv_builtin_bool = 0
20842 then
20843         # C++ has no bool
20844         USE_CXX_BOOL=0
20845 else
20846         # this is the normal case
20847         USE_CXX_BOOL='defined(__cplusplus)'
20848 fi
20849
20850 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20851
20852         if test "$cf_with_ada" != "no" ; then
20853                 if test "$with_libtool" != "no"; then
20854                         { echo "$as_me:20854: WARNING: libtool does not support Ada - disabling feature" >&5
20855 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20856                         cf_with_ada=no
20857                 fi
20858         fi
20859
20860         if test "$cf_with_ada" != "no" ; then
20861
20862 cf_ada_make=gnatmake
20863 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20864 set dummy $cf_ada_make; ac_word=$2
20865 echo "$as_me:20865: checking for $ac_word" >&5
20866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20867 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20868   echo $ECHO_N "(cached) $ECHO_C" >&6
20869 else
20870   if test -n "$gnat_exists"; then
20871   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20872 else
20873   ac_save_IFS=$IFS; IFS=$ac_path_separator
20874 ac_dummy="$PATH"
20875 for ac_dir in $ac_dummy; do
20876   IFS=$ac_save_IFS
20877   test -z "$ac_dir" && ac_dir=.
20878   $as_executable_p "$ac_dir/$ac_word" || continue
20879 ac_cv_prog_gnat_exists="yes"
20880 echo "$as_me:20880: found $ac_dir/$ac_word" >&5
20881 break
20882 done
20883
20884   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20885 fi
20886 fi
20887 gnat_exists=$ac_cv_prog_gnat_exists
20888 if test -n "$gnat_exists"; then
20889   echo "$as_me:20889: result: $gnat_exists" >&5
20890 echo "${ECHO_T}$gnat_exists" >&6
20891 else
20892   echo "$as_me:20892: result: no" >&5
20893 echo "${ECHO_T}no" >&6
20894 fi
20895
20896 if test "$ac_cv_prog_gnat_exists" = no; then
20897         cf_ada_make=
20898         cf_cv_prog_gnat_correct=no
20899 else
20900
20901 echo "$as_me:20901: checking for gnat version" >&5
20902 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20903 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20904         grep '[0-9].[0-9][0-9]*' |\
20905         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20906 echo "$as_me:20906: result: $cf_gnat_version" >&5
20907 echo "${ECHO_T}$cf_gnat_version" >&6
20908
20909 case $cf_gnat_version in
20910 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20911         cf_cv_prog_gnat_correct=yes
20912         ;;
20913 (*)
20914         { echo "$as_me:20914: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20915 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20916         cf_cv_prog_gnat_correct=no
20917         ;;
20918 esac
20919
20920         # Extract the first word of "m4", so it can be a program name with args.
20921 set dummy m4; ac_word=$2
20922 echo "$as_me:20922: checking for $ac_word" >&5
20923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20924 if test "${ac_cv_prog_M4_exists+set}" = set; then
20925   echo $ECHO_N "(cached) $ECHO_C" >&6
20926 else
20927   if test -n "$M4_exists"; then
20928   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20929 else
20930   ac_save_IFS=$IFS; IFS=$ac_path_separator
20931 ac_dummy="$PATH"
20932 for ac_dir in $ac_dummy; do
20933   IFS=$ac_save_IFS
20934   test -z "$ac_dir" && ac_dir=.
20935   $as_executable_p "$ac_dir/$ac_word" || continue
20936 ac_cv_prog_M4_exists="yes"
20937 echo "$as_me:20937: found $ac_dir/$ac_word" >&5
20938 break
20939 done
20940
20941   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20942 fi
20943 fi
20944 M4_exists=$ac_cv_prog_M4_exists
20945 if test -n "$M4_exists"; then
20946   echo "$as_me:20946: result: $M4_exists" >&5
20947 echo "${ECHO_T}$M4_exists" >&6
20948 else
20949   echo "$as_me:20949: result: no" >&5
20950 echo "${ECHO_T}no" >&6
20951 fi
20952
20953         if test "$ac_cv_prog_M4_exists" = no; then
20954                 cf_cv_prog_gnat_correct=no
20955                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20956         fi
20957         if test "$cf_cv_prog_gnat_correct" = yes; then
20958                 echo "$as_me:20958: checking if GNAT works" >&5
20959 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20960
20961 rm -rf conftest* *~conftest*
20962 cat >>conftest.ads <<CF_EOF
20963 procedure conftest;
20964 CF_EOF
20965 cat >>conftest.adb <<CF_EOF
20966 with Text_IO;
20967 with GNAT.OS_Lib;
20968 procedure conftest is
20969 begin
20970    Text_IO.Put ("Hello World");
20971    Text_IO.New_Line;
20972    GNAT.OS_Lib.OS_Exit (0);
20973 end conftest;
20974 CF_EOF
20975 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20976    if ( ./conftest 1>&5 2>&1 ) ; then
20977       cf_cv_prog_gnat_correct=yes
20978    else
20979       cf_cv_prog_gnat_correct=no
20980    fi
20981 else
20982    cf_cv_prog_gnat_correct=no
20983 fi
20984 rm -rf conftest* *~conftest*
20985
20986                 echo "$as_me:20986: result: $cf_cv_prog_gnat_correct" >&5
20987 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20988         fi
20989 fi
20990
20991                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20992
20993         ADAFLAGS="$ADAFLAGS -gnatpn"
20994
20995         echo "$as_me:20995: checking optimization options for ADAFLAGS" >&5
20996 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20997         case "$CFLAGS" in
20998         (*-g*)
20999
21000         ADAFLAGS="$ADAFLAGS -g"
21001
21002                 ;;
21003         esac
21004         case "$CFLAGS" in
21005         (*-O*)
21006                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21007
21008         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21009
21010                 ;;
21011         esac
21012         echo "$as_me:21012: result: $ADAFLAGS" >&5
21013 echo "${ECHO_T}$ADAFLAGS" >&6
21014
21015 echo "$as_me:21015: checking if GNATPREP supports -T option" >&5
21016 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21017 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21018   echo $ECHO_N "(cached) $ECHO_C" >&6
21019 else
21020
21021 cf_cv_gnatprep_opt_t=no
21022 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21023
21024 fi
21025 echo "$as_me:21025: result: $cf_cv_gnatprep_opt_t" >&5
21026 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21027 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21028
21029 echo "$as_me:21029: checking if GNAT supports generics" >&5
21030 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21031 case $cf_gnat_version in
21032 (3.[1-9]*|[4-9].*)
21033         cf_gnat_generics=yes
21034         ;;
21035 (*)
21036         cf_gnat_generics=no
21037         ;;
21038 esac
21039 echo "$as_me:21039: result: $cf_gnat_generics" >&5
21040 echo "${ECHO_T}$cf_gnat_generics" >&6
21041
21042 if test "$cf_gnat_generics" = yes
21043 then
21044         cf_compile_generics=generics
21045         cf_generic_objects="\${GENOBJS}"
21046 else
21047         cf_compile_generics=
21048         cf_generic_objects=
21049 fi
21050
21051 echo "$as_me:21051: checking if GNAT supports SIGINT" >&5
21052 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21053 if test "${cf_cv_gnat_sigint+set}" = set; then
21054   echo $ECHO_N "(cached) $ECHO_C" >&6
21055 else
21056
21057 rm -rf conftest* *~conftest*
21058 cat >>conftest.ads <<CF_EOF
21059 with Ada.Interrupts.Names;
21060
21061 package ConfTest is
21062
21063    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21064    pragma Unreserve_All_Interrupts;
21065    pragma Warnings (On);
21066
21067    protected Process is
21068       procedure Stop;
21069       function Continue return Boolean;
21070       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21071    private
21072       Done : Boolean := False;
21073    end Process;
21074
21075 end ConfTest;
21076 CF_EOF
21077 cat >>conftest.adb <<CF_EOF
21078 package body ConfTest is
21079    protected body Process is
21080       procedure Stop is
21081       begin
21082          Done := True;
21083       end Stop;
21084       function Continue return Boolean is
21085       begin
21086          return not Done;
21087       end Continue;
21088    end Process;
21089 end ConfTest;
21090 CF_EOF
21091 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21092       cf_cv_gnat_sigint=yes
21093 else
21094    cf_cv_gnat_sigint=no
21095 fi
21096 rm -rf conftest* *~conftest*
21097
21098 fi
21099 echo "$as_me:21099: result: $cf_cv_gnat_sigint" >&5
21100 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21101
21102 if test $cf_cv_gnat_sigint = yes ; then
21103         USE_GNAT_SIGINT=""
21104 else
21105         USE_GNAT_SIGINT="#"
21106 fi
21107
21108 cf_gnat_libraries=no
21109 cf_gnat_projects=no
21110
21111 if test "$enable_gnat_projects" != no ; then
21112 echo "$as_me:21112: checking if GNAT supports project files" >&5
21113 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21114 case $cf_gnat_version in
21115 (3.[0-9]*)
21116         ;;
21117 (*)
21118         case $cf_cv_system_name in
21119         (cygwin*|msys*)
21120                 ;;
21121         (*)
21122                 mkdir conftest.src conftest.bin conftest.lib
21123                 cd conftest.src
21124                 rm -rf conftest* *~conftest*
21125                 cat >>library.gpr <<CF_EOF
21126 project Library is
21127   Kind := External ("LIB_KIND");
21128   for Library_Name use "ConfTest";
21129   for Object_Dir use ".";
21130   for Library_ALI_Dir use External("LIBRARY_DIR");
21131   for Library_Version use External ("SONAME");
21132   for Library_Kind use Kind;
21133   for Library_Dir use External("BUILD_DIR");
21134   Source_Dir := External ("SOURCE_DIR");
21135   for Source_Dirs use (Source_Dir);
21136 end Library;
21137 CF_EOF
21138                 cat >>confpackage.ads <<CF_EOF
21139 package ConfPackage is
21140    procedure conftest;
21141 end ConfPackage;
21142 CF_EOF
21143                 cat >>confpackage.adb <<CF_EOF
21144 with Text_IO;
21145 package body ConfPackage is
21146    procedure conftest is
21147    begin
21148       Text_IO.Put ("Hello World");
21149       Text_IO.New_Line;
21150    end conftest;
21151 end ConfPackage;
21152 CF_EOF
21153                 if ( $cf_ada_make $ADAFLAGS \
21154                                 -Plibrary.gpr \
21155                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21156                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21157                                 -XSOURCE_DIR=`pwd` \
21158                                 -XSONAME=libConfTest.so.1 \
21159                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21160                         cf_gnat_projects=yes
21161                 fi
21162                 cd ..
21163                 if test -f conftest.lib/confpackage.ali
21164                 then
21165                         cf_gnat_libraries=yes
21166                 fi
21167                 rm -rf conftest* *~conftest*
21168                 ;;
21169         esac
21170         ;;
21171 esac
21172 echo "$as_me:21172: result: $cf_gnat_projects" >&5
21173 echo "${ECHO_T}$cf_gnat_projects" >&6
21174 fi # enable_gnat_projects
21175
21176 if test $cf_gnat_projects = yes
21177 then
21178         echo "$as_me:21178: checking if GNAT supports libraries" >&5
21179 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21180         echo "$as_me:21180: result: $cf_gnat_libraries" >&5
21181 echo "${ECHO_T}$cf_gnat_libraries" >&6
21182 fi
21183
21184 if test "$cf_gnat_projects" = yes
21185 then
21186         USE_OLD_MAKERULES="#"
21187         USE_GNAT_PROJECTS=""
21188 else
21189         USE_OLD_MAKERULES=""
21190         USE_GNAT_PROJECTS="#"
21191 fi
21192
21193 if test "$cf_gnat_libraries" = yes
21194 then
21195         USE_GNAT_LIBRARIES=""
21196 else
21197         USE_GNAT_LIBRARIES="#"
21198 fi
21199
21200 echo "$as_me:21200: checking for ada-compiler" >&5
21201 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21202
21203 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21204 if test "${with_ada_compiler+set}" = set; then
21205   withval="$with_ada_compiler"
21206   cf_ada_compiler=$withval
21207 else
21208   cf_ada_compiler=gnatmake
21209 fi;
21210
21211 echo "$as_me:21211: result: $cf_ada_compiler" >&5
21212 echo "${ECHO_T}$cf_ada_compiler" >&6
21213
21214                         cf_ada_package=terminal_interface
21215
21216 echo "$as_me:21216: checking for ada-include" >&5
21217 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21218
21219 # Check whether --with-ada-include or --without-ada-include was given.
21220 if test "${with_ada_include+set}" = set; then
21221   withval="$with_ada_include"
21222
21223 else
21224   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21225 fi; if test -n "$prefix/share/ada/adainclude" ; then
21226
21227 if test "x$prefix" != xNONE; then
21228         cf_path_syntax="$prefix"
21229 else
21230         cf_path_syntax="$ac_default_prefix"
21231 fi
21232
21233 case ".$withval" in
21234 (.\$\(*\)*|.\'*\'*)
21235         ;;
21236 (..|./*|.\\*)
21237         ;;
21238 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21239         ;;
21240 (.\${*prefix}*|.\${*dir}*)
21241         eval withval="$withval"
21242         case ".$withval" in
21243         (.NONE/*)
21244                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21245                 ;;
21246         esac
21247         ;;
21248 (.no|.NONE/*)
21249         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21250         ;;
21251 (*)
21252         { { echo "$as_me:21252: error: expected a pathname, not \"$withval\"" >&5
21253 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21254    { (exit 1); exit 1; }; }
21255         ;;
21256 esac
21257
21258 fi
21259 eval ADA_INCLUDE="$withval"
21260
21261 echo "$as_me:21261: result: $ADA_INCLUDE" >&5
21262 echo "${ECHO_T}$ADA_INCLUDE" >&6
21263
21264 echo "$as_me:21264: checking for ada-objects" >&5
21265 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21266
21267 # Check whether --with-ada-objects or --without-ada-objects was given.
21268 if test "${with_ada_objects+set}" = set; then
21269   withval="$with_ada_objects"
21270
21271 else
21272   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21273 fi; if test -n "$prefix/lib/ada/adalib" ; then
21274
21275 if test "x$prefix" != xNONE; then
21276         cf_path_syntax="$prefix"
21277 else
21278         cf_path_syntax="$ac_default_prefix"
21279 fi
21280
21281 case ".$withval" in
21282 (.\$\(*\)*|.\'*\'*)
21283         ;;
21284 (..|./*|.\\*)
21285         ;;
21286 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21287         ;;
21288 (.\${*prefix}*|.\${*dir}*)
21289         eval withval="$withval"
21290         case ".$withval" in
21291         (.NONE/*)
21292                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21293                 ;;
21294         esac
21295         ;;
21296 (.no|.NONE/*)
21297         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21298         ;;
21299 (*)
21300         { { echo "$as_me:21300: error: expected a pathname, not \"$withval\"" >&5
21301 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21302    { (exit 1); exit 1; }; }
21303         ;;
21304 esac
21305
21306 fi
21307 eval ADA_OBJECTS="$withval"
21308
21309 echo "$as_me:21309: result: $ADA_OBJECTS" >&5
21310 echo "${ECHO_T}$ADA_OBJECTS" >&6
21311
21312 echo "$as_me:21312: checking if an Ada95 shared-library should be built" >&5
21313 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21314
21315 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21316 if test "${with_ada_sharedlib+set}" = set; then
21317   withval="$with_ada_sharedlib"
21318   with_ada_sharedlib=$withval
21319 else
21320   with_ada_sharedlib=no
21321 fi;
21322 echo "$as_me:21322: result: $with_ada_sharedlib" >&5
21323 echo "${ECHO_T}$with_ada_sharedlib" >&6
21324
21325 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21326 MAKE_ADA_SHAREDLIB="#"
21327
21328 if test "x$with_ada_sharedlib" != xno
21329 then
21330         MAKE_ADA_SHAREDLIB=
21331         if test "x$with_ada_sharedlib" != xyes
21332         then
21333                 ADA_SHAREDLIB="$with_ada_sharedlib"
21334         fi
21335 fi
21336
21337                 fi
21338         fi
21339 else
21340         cf_with_ada=no
21341 fi
21342
21343 # do this "late" to avoid conflict with header-checks
21344 if test "x$with_widec" = xyes ; then
21345         echo "$as_me:21345: checking for wchar_t" >&5
21346 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21347 if test "${ac_cv_type_wchar_t+set}" = set; then
21348   echo $ECHO_N "(cached) $ECHO_C" >&6
21349 else
21350   cat >conftest.$ac_ext <<_ACEOF
21351 #line 21351 "configure"
21352 #include "confdefs.h"
21353 $ac_includes_default
21354 int
21355 main ()
21356 {
21357 if ((wchar_t *) 0)
21358   return 0;
21359 if (sizeof (wchar_t))
21360   return 0;
21361   ;
21362   return 0;
21363 }
21364 _ACEOF
21365 rm -f conftest.$ac_objext
21366 if { (eval echo "$as_me:21366: \"$ac_compile\"") >&5
21367   (eval $ac_compile) 2>&5
21368   ac_status=$?
21369   echo "$as_me:21369: \$? = $ac_status" >&5
21370   (exit $ac_status); } &&
21371          { ac_try='test -s conftest.$ac_objext'
21372   { (eval echo "$as_me:21372: \"$ac_try\"") >&5
21373   (eval $ac_try) 2>&5
21374   ac_status=$?
21375   echo "$as_me:21375: \$? = $ac_status" >&5
21376   (exit $ac_status); }; }; then
21377   ac_cv_type_wchar_t=yes
21378 else
21379   echo "$as_me: failed program was:" >&5
21380 cat conftest.$ac_ext >&5
21381 ac_cv_type_wchar_t=no
21382 fi
21383 rm -f conftest.$ac_objext conftest.$ac_ext
21384 fi
21385 echo "$as_me:21385: result: $ac_cv_type_wchar_t" >&5
21386 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21387
21388 echo "$as_me:21388: checking size of wchar_t" >&5
21389 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21390 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21391   echo $ECHO_N "(cached) $ECHO_C" >&6
21392 else
21393   if test "$ac_cv_type_wchar_t" = yes; then
21394   if test "$cross_compiling" = yes; then
21395   # Depending upon the size, compute the lo and hi bounds.
21396 cat >conftest.$ac_ext <<_ACEOF
21397 #line 21397 "configure"
21398 #include "confdefs.h"
21399 $ac_includes_default
21400 int
21401 main ()
21402 {
21403 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21404   ;
21405   return 0;
21406 }
21407 _ACEOF
21408 rm -f conftest.$ac_objext
21409 if { (eval echo "$as_me:21409: \"$ac_compile\"") >&5
21410   (eval $ac_compile) 2>&5
21411   ac_status=$?
21412   echo "$as_me:21412: \$? = $ac_status" >&5
21413   (exit $ac_status); } &&
21414          { ac_try='test -s conftest.$ac_objext'
21415   { (eval echo "$as_me:21415: \"$ac_try\"") >&5
21416   (eval $ac_try) 2>&5
21417   ac_status=$?
21418   echo "$as_me:21418: \$? = $ac_status" >&5
21419   (exit $ac_status); }; }; then
21420   ac_lo=0 ac_mid=0
21421   while :; do
21422     cat >conftest.$ac_ext <<_ACEOF
21423 #line 21423 "configure"
21424 #include "confdefs.h"
21425 $ac_includes_default
21426 int
21427 main ()
21428 {
21429 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21430   ;
21431   return 0;
21432 }
21433 _ACEOF
21434 rm -f conftest.$ac_objext
21435 if { (eval echo "$as_me:21435: \"$ac_compile\"") >&5
21436   (eval $ac_compile) 2>&5
21437   ac_status=$?
21438   echo "$as_me:21438: \$? = $ac_status" >&5
21439   (exit $ac_status); } &&
21440          { ac_try='test -s conftest.$ac_objext'
21441   { (eval echo "$as_me:21441: \"$ac_try\"") >&5
21442   (eval $ac_try) 2>&5
21443   ac_status=$?
21444   echo "$as_me:21444: \$? = $ac_status" >&5
21445   (exit $ac_status); }; }; then
21446   ac_hi=$ac_mid; break
21447 else
21448   echo "$as_me: failed program was:" >&5
21449 cat conftest.$ac_ext >&5
21450 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21451 fi
21452 rm -f conftest.$ac_objext conftest.$ac_ext
21453   done
21454 else
21455   echo "$as_me: failed program was:" >&5
21456 cat conftest.$ac_ext >&5
21457 ac_hi=-1 ac_mid=-1
21458   while :; do
21459     cat >conftest.$ac_ext <<_ACEOF
21460 #line 21460 "configure"
21461 #include "confdefs.h"
21462 $ac_includes_default
21463 int
21464 main ()
21465 {
21466 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21467   ;
21468   return 0;
21469 }
21470 _ACEOF
21471 rm -f conftest.$ac_objext
21472 if { (eval echo "$as_me:21472: \"$ac_compile\"") >&5
21473   (eval $ac_compile) 2>&5
21474   ac_status=$?
21475   echo "$as_me:21475: \$? = $ac_status" >&5
21476   (exit $ac_status); } &&
21477          { ac_try='test -s conftest.$ac_objext'
21478   { (eval echo "$as_me:21478: \"$ac_try\"") >&5
21479   (eval $ac_try) 2>&5
21480   ac_status=$?
21481   echo "$as_me:21481: \$? = $ac_status" >&5
21482   (exit $ac_status); }; }; then
21483   ac_lo=$ac_mid; break
21484 else
21485   echo "$as_me: failed program was:" >&5
21486 cat conftest.$ac_ext >&5
21487 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21488 fi
21489 rm -f conftest.$ac_objext conftest.$ac_ext
21490   done
21491 fi
21492 rm -f conftest.$ac_objext conftest.$ac_ext
21493 # Binary search between lo and hi bounds.
21494 while test "x$ac_lo" != "x$ac_hi"; do
21495   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21496   cat >conftest.$ac_ext <<_ACEOF
21497 #line 21497 "configure"
21498 #include "confdefs.h"
21499 $ac_includes_default
21500 int
21501 main ()
21502 {
21503 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21504   ;
21505   return 0;
21506 }
21507 _ACEOF
21508 rm -f conftest.$ac_objext
21509 if { (eval echo "$as_me:21509: \"$ac_compile\"") >&5
21510   (eval $ac_compile) 2>&5
21511   ac_status=$?
21512   echo "$as_me:21512: \$? = $ac_status" >&5
21513   (exit $ac_status); } &&
21514          { ac_try='test -s conftest.$ac_objext'
21515   { (eval echo "$as_me:21515: \"$ac_try\"") >&5
21516   (eval $ac_try) 2>&5
21517   ac_status=$?
21518   echo "$as_me:21518: \$? = $ac_status" >&5
21519   (exit $ac_status); }; }; then
21520   ac_hi=$ac_mid
21521 else
21522   echo "$as_me: failed program was:" >&5
21523 cat conftest.$ac_ext >&5
21524 ac_lo=`expr $ac_mid + 1`
21525 fi
21526 rm -f conftest.$ac_objext conftest.$ac_ext
21527 done
21528 ac_cv_sizeof_wchar_t=$ac_lo
21529 else
21530   if test "$cross_compiling" = yes; then
21531   { { echo "$as_me:21531: error: cannot run test program while cross compiling" >&5
21532 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21533    { (exit 1); exit 1; }; }
21534 else
21535   cat >conftest.$ac_ext <<_ACEOF
21536 #line 21536 "configure"
21537 #include "confdefs.h"
21538 $ac_includes_default
21539 int
21540 main ()
21541 {
21542 FILE *f = fopen ("conftest.val", "w");
21543 if (!f)
21544   $ac_main_return (1);
21545 fprintf (f, "%d", (sizeof (wchar_t)));
21546 fclose (f);
21547   ;
21548   return 0;
21549 }
21550 _ACEOF
21551 rm -f conftest$ac_exeext
21552 if { (eval echo "$as_me:21552: \"$ac_link\"") >&5
21553   (eval $ac_link) 2>&5
21554   ac_status=$?
21555   echo "$as_me:21555: \$? = $ac_status" >&5
21556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21557   { (eval echo "$as_me:21557: \"$ac_try\"") >&5
21558   (eval $ac_try) 2>&5
21559   ac_status=$?
21560   echo "$as_me:21560: \$? = $ac_status" >&5
21561   (exit $ac_status); }; }; then
21562   ac_cv_sizeof_wchar_t=`cat conftest.val`
21563 else
21564   echo "$as_me: program exited with status $ac_status" >&5
21565 echo "$as_me: failed program was:" >&5
21566 cat conftest.$ac_ext >&5
21567 fi
21568 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21569 fi
21570 fi
21571 rm -f conftest.val
21572 else
21573   ac_cv_sizeof_wchar_t=0
21574 fi
21575 fi
21576 echo "$as_me:21576: result: $ac_cv_sizeof_wchar_t" >&5
21577 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21578 cat >>confdefs.h <<EOF
21579 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21580 EOF
21581
21582 fi
21583
21584 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21585 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21586 ###
21587 ### ticlib modules may be a separate library, otherwise contained in termlib.
21588 ### termlib modules may be a separate library, otherwise contained in ncurses.
21589 ###
21590 ### The of "+" or " " between the tokens controls the way the script
21591 ### chooses to split module lists into libraries.
21592 ###
21593 ### (see CF_LIB_RULES).
21594 echo "$as_me:21594: checking for library subsets" >&5
21595 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21596 LIB_SUBSETS=
21597
21598 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21599         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21600         if test "$with_ticlib" != no ; then
21601                 LIB_SUBSETS="${LIB_SUBSETS} "
21602         else
21603                 LIB_SUBSETS="${LIB_SUBSETS}+"
21604         fi
21605 fi
21606
21607 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21608 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21609
21610 if test "$with_termlib" != no ; then
21611         LIB_SUBSETS="${LIB_SUBSETS} "
21612 else
21613         LIB_SUBSETS="${LIB_SUBSETS}+"
21614 fi
21615
21616 LIB_SUBSETS="${LIB_SUBSETS}base"
21617
21618 # Most term-driver calls are to tinfo, but some like init_pair are to the
21619 # base library (so it resides in base).
21620 if test "$with_term_driver" != no ; then
21621         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21622         case $cf_cv_system_name in
21623         (*mingw32*|*mingw64*)
21624                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21625                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21626                 ;;
21627         (*)
21628                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21629                 ;;
21630         esac
21631 fi
21632
21633 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21634 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21635
21636 echo "$as_me:21636: result: $LIB_SUBSETS" >&5
21637 echo "${ECHO_T}$LIB_SUBSETS" >&6
21638
21639 ### Construct the list of include-directories to be generated
21640
21641 if test "$srcdir" != "."; then
21642         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21643 fi
21644 CPPFLAGS="-I../include $CPPFLAGS"
21645 if test "$srcdir" != "."; then
21646         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21647 fi
21648 CPPFLAGS="-I. $CPPFLAGS"
21649
21650 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21651 if test "$srcdir" != "."; then
21652         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21653 fi
21654 if test "$GCC" != yes; then
21655         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21656 elif test "$includedir" != "/usr/include"; then
21657         if test "$includedir" = '${prefix}/include' ; then
21658                 if test x$prefix != x/usr ; then
21659                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21660                 fi
21661         else
21662                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21663         fi
21664 fi
21665
21666 ### Build up pieces for makefile rules
21667 echo "$as_me:21667: checking default library suffix" >&5
21668 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21669
21670         case $DFT_LWR_MODEL in
21671         (libtool) DFT_ARG_SUFFIX=''   ;;
21672         (normal)  DFT_ARG_SUFFIX=''   ;;
21673         (debug)   DFT_ARG_SUFFIX='_g' ;;
21674         (profile) DFT_ARG_SUFFIX='_p' ;;
21675         (shared)  DFT_ARG_SUFFIX=''   ;;
21676         esac
21677         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21678 echo "$as_me:21678: result: $DFT_ARG_SUFFIX" >&5
21679 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21680
21681 echo "$as_me:21681: checking default library-dependency suffix" >&5
21682 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21683
21684         case X$DFT_LWR_MODEL in
21685         (Xlibtool)
21686                 DFT_LIB_SUFFIX='.la'
21687                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21688                 ;;
21689         (Xdebug)
21690                 DFT_LIB_SUFFIX='_g.a'
21691                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21692                 ;;
21693         (Xprofile)
21694                 DFT_LIB_SUFFIX='_p.a'
21695                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21696                 ;;
21697         (Xshared)
21698                 case $cf_cv_system_name in
21699                 (aix[5-7]*)
21700                         DFT_LIB_SUFFIX='.so'
21701                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21702                         ;;
21703                 (cygwin*|msys*|mingw*)
21704                         DFT_LIB_SUFFIX='.dll'
21705                         DFT_DEP_SUFFIX='.dll.a'
21706                         ;;
21707                 (darwin*)
21708                         DFT_LIB_SUFFIX='.dylib'
21709                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21710                         ;;
21711                 (hpux*)
21712                         case $target in
21713                         (ia64*)
21714                                 DFT_LIB_SUFFIX='.so'
21715                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21716                                 ;;
21717                         (*)
21718                                 DFT_LIB_SUFFIX='.sl'
21719                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21720                                 ;;
21721                         esac
21722                         ;;
21723                 (*)
21724                         DFT_LIB_SUFFIX='.so'
21725                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21726                         ;;
21727                 esac
21728                 ;;
21729         (*)
21730                 DFT_LIB_SUFFIX='.a'
21731                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21732                 ;;
21733         esac
21734         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21735         then
21736                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21737                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21738         fi
21739 echo "$as_me:21739: result: $DFT_DEP_SUFFIX" >&5
21740 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21741
21742 echo "$as_me:21742: checking default object directory" >&5
21743 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21744
21745         case $DFT_LWR_MODEL in
21746         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21747         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21748         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21749         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21750         (shared)
21751                 case $cf_cv_system_name in
21752                 (cygwin|msys)
21753                         DFT_OBJ_SUBDIR='objects' ;;
21754                 (*)
21755                         DFT_OBJ_SUBDIR='obj_s' ;;
21756                 esac
21757         esac
21758 echo "$as_me:21758: result: $DFT_OBJ_SUBDIR" >&5
21759 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21760
21761 if test "x$cf_with_cxx" = xyes ; then
21762 echo "$as_me:21762: checking c++ library-dependency suffix" >&5
21763 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21764 if test "$with_libtool" != "no"; then
21765         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21766         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21767 elif test "$with_shared_cxx" != "no"; then
21768         # also for g++ users...
21769         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21770 else
21771         # we normally make a static library because C/C++ library rules differ
21772
21773         case Xnormal in
21774         (Xlibtool)
21775                 CXX_LIB_SUFFIX='.la'
21776                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21777                 ;;
21778         (Xdebug)
21779                 CXX_LIB_SUFFIX='_g.a'
21780                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21781                 ;;
21782         (Xprofile)
21783                 CXX_LIB_SUFFIX='_p.a'
21784                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21785                 ;;
21786         (Xshared)
21787                 case $cf_cv_system_name in
21788                 (aix[5-7]*)
21789                         CXX_LIB_SUFFIX='.so'
21790                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21791                         ;;
21792                 (cygwin*|msys*|mingw*)
21793                         CXX_LIB_SUFFIX='.dll'
21794                         CXX_DEP_SUFFIX='.dll.a'
21795                         ;;
21796                 (darwin*)
21797                         CXX_LIB_SUFFIX='.dylib'
21798                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21799                         ;;
21800                 (hpux*)
21801                         case $target in
21802                         (ia64*)
21803                                 CXX_LIB_SUFFIX='.so'
21804                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21805                                 ;;
21806                         (*)
21807                                 CXX_LIB_SUFFIX='.sl'
21808                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21809                                 ;;
21810                         esac
21811                         ;;
21812                 (*)
21813                         CXX_LIB_SUFFIX='.so'
21814                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21815                         ;;
21816                 esac
21817                 ;;
21818         (*)
21819                 CXX_LIB_SUFFIX='.a'
21820                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21821                 ;;
21822         esac
21823         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21824         then
21825                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21826                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21827         fi
21828
21829 fi
21830 echo "$as_me:21830: result: $CXX_LIB_SUFFIX" >&5
21831 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21832
21833 fi
21834
21835 # do not want -ldl in build except as needed for -lncurses dependency
21836 if test "x$with_dlsym" = xyes ; then
21837 if test $DFT_LWR_MODEL = shared || \
21838    test $DFT_LWR_MODEL = libtool ; then
21839
21840 # remove dl library from $LIBS
21841 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21842
21843 fi
21844 fi
21845 ### Set up low-level terminfo dependencies for makefiles.
21846
21847 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21848 # do not need libdl
21849 TICS_LIST=
21850 if test "x$with_dlsym" = xyes ; then
21851
21852 # remove dl library from $SHLIB_LIST
21853 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21854
21855 fi
21856
21857 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21858 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21859 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21860 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21861 then
21862         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21863 fi
21864
21865 if test "$with_ticlib" != no ; then
21866
21867         if test "x$with_ticlib" != xyes ; then
21868                 TICS_NAME=$with_ticlib
21869                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21870                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21871                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21872                 TICS_LIB_SUFFIX="${with_ticlib}"
21873         else
21874                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
21875                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21876                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21877                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21878         fi
21879         TICS_LDFLAGS="-L${LIB_DIR}"
21880         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
21881 else
21882         TICS_SUFFIX=${DFT_LIB_SUFFIX}
21883         TICS_LDFLAGS="-L${LIB_DIR}"
21884         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21885 fi
21886
21887 if test "$with_termlib" != no ; then
21888
21889         if test "x$with_termlib" != xyes ; then
21890                 TINFO_NAME=$with_termlib
21891                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21892                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21893                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21894                 TINFO_LIB_SUFFIX="${with_termlib}"
21895         else
21896                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21897                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21898                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21899                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21900         fi
21901
21902         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21903         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21904         if test "$DFT_LWR_MODEL" = "libtool"; then
21905                 TEST_ARGS="${TEST_DEPS}"
21906                 TEST_ARG2="${TEST_DEP2}"
21907                 TINFO_LDFLAGS="-L${LIB_DIR}"
21908                 TINFO_LIBS="$TEST_ARGS"
21909                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21910                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21911         else
21912                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21913                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21914                 if test "x$with_term_driver" != xno ; then
21915                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21916                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21917                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21918                 else
21919                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21920                         TINFO_LIBS="$TEST_ARGS"
21921                 fi
21922                 TINFO_LDFLAGS="-L${LIB_DIR}"
21923                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21924         fi
21925 else
21926         # the next lines are needed for linking libtic over libncurses
21927         TINFO_NAME=${LIB_NAME}
21928         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21929         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21930         if test "x$with_tic_depends" = xyes ; then
21931                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21932         else
21933                 TICS_LIST="$SHLIB_LIST"
21934         fi
21935
21936         TINFO_LDFLAGS="-L${LIB_DIR}"
21937         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21938 fi
21939
21940 if test "$DFT_LWR_MODEL" = shared ; then
21941         case $cf_cv_system_name in
21942         (cygwin*|msys*)
21943                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21944                 TINFO_SUFFIX=.dll
21945                 ;;
21946         esac
21947 fi
21948
21949 if test "x$with_dlsym" = xyes ; then
21950
21951 # remove dl library from $TICS_LIST
21952 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21953
21954 fi
21955
21956 if test "$DFT_LWR_MODEL" = "libtool"; then
21957         OBJEXT=lo
21958 fi
21959
21960 # needed for Ada95
21961 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21962
21963 case $DFT_LWR_MODEL in
21964 (normal|debug|profile)
21965
21966 if test "$GCC" = yes ; then
21967         case $cf_cv_system_name in
21968         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21969                 LDFLAGS_STATIC=
21970                 LDFLAGS_SHARED=
21971                 ;;
21972         (*)     # normally, except when broken
21973                 LDFLAGS_STATIC=-static
21974                 LDFLAGS_SHARED=-dynamic
21975                 ;;
21976         esac
21977 else
21978         case $cf_cv_system_name in
21979         (aix[4-7]*)     # from ld manpage
21980                 LDFLAGS_STATIC=-bstatic
21981                 LDFLAGS_SHARED=-bdynamic
21982                 ;;
21983         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21984                 # We could also use just "archive" and "shared".
21985                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21986                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21987                 ;;
21988         (irix*)         # from ld manpage IRIX64
21989                 LDFLAGS_STATIC=-Bstatic
21990                 LDFLAGS_SHARED=-Bdynamic
21991                 ;;
21992         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21993                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21994                 LDFLAGS_STATIC=-noso
21995                 LDFLAGS_SHARED=-so_archive
21996                 ;;
21997         (solaris2*)
21998                 LDFLAGS_STATIC=-Bstatic
21999                 LDFLAGS_SHARED=-Bdynamic
22000                 ;;
22001         esac
22002 fi
22003
22004 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22005 then
22006         echo "$as_me:22006: checking if linker supports switching between static/dynamic" >&5
22007 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22008
22009         rm -f libconftest.a
22010         cat >conftest.$ac_ext <<EOF
22011 #line 22011 "configure"
22012 #include <stdio.h>
22013 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22014 EOF
22015         if { (eval echo "$as_me:22015: \"$ac_compile\"") >&5
22016   (eval $ac_compile) 2>&5
22017   ac_status=$?
22018   echo "$as_me:22018: \$? = $ac_status" >&5
22019   (exit $ac_status); } ; then
22020                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22021                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22022         fi
22023         rm -f conftest.*
22024
22025         cf_save_LIBS="$LIBS"
22026
22027         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22028         cat >conftest.$ac_ext <<_ACEOF
22029 #line 22029 "configure"
22030 #include "confdefs.h"
22031
22032 #line 22032 "configure"
22033 #include <stdio.h>
22034 int cf_ldflags_static(FILE *fp);
22035
22036 int
22037 main ()
22038 {
22039
22040         return cf_ldflags_static(stdin);
22041
22042   ;
22043   return 0;
22044 }
22045 _ACEOF
22046 rm -f conftest.$ac_objext conftest$ac_exeext
22047 if { (eval echo "$as_me:22047: \"$ac_link\"") >&5
22048   (eval $ac_link) 2>&5
22049   ac_status=$?
22050   echo "$as_me:22050: \$? = $ac_status" >&5
22051   (exit $ac_status); } &&
22052          { ac_try='test -s conftest$ac_exeext'
22053   { (eval echo "$as_me:22053: \"$ac_try\"") >&5
22054   (eval $ac_try) 2>&5
22055   ac_status=$?
22056   echo "$as_me:22056: \$? = $ac_status" >&5
22057   (exit $ac_status); }; }; then
22058
22059         # some linkers simply ignore the -dynamic
22060         case x`file conftest$ac_exeext 2>/dev/null` in
22061         (*static*)
22062                 cf_ldflags_static=no
22063                 ;;
22064         (*)
22065                 cf_ldflags_static=yes
22066                 ;;
22067         esac
22068
22069 else
22070   echo "$as_me: failed program was:" >&5
22071 cat conftest.$ac_ext >&5
22072 cf_ldflags_static=no
22073 fi
22074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22075
22076         rm -f libconftest.*
22077         LIBS="$cf_save_LIBS"
22078
22079         echo "$as_me:22079: result: $cf_ldflags_static" >&5
22080 echo "${ECHO_T}$cf_ldflags_static" >&6
22081
22082         if test $cf_ldflags_static != yes
22083         then
22084                 LDFLAGS_STATIC=
22085                 LDFLAGS_SHARED=
22086         fi
22087 else
22088         LDFLAGS_STATIC=
22089         LDFLAGS_SHARED=
22090 fi
22091
22092         ;;
22093 esac
22094
22095 echo "$as_me:22095: checking where we will install curses.h" >&5
22096 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22097
22098 includesubdir=
22099 if test "$with_overwrite" = no && \
22100  ( test "x$includedir" = 'x${prefix}/include' || \
22101    test "x$includedir" = "x${prefix}/include" )
22102 then
22103         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22104 fi
22105 echo "$as_me:22105: result: ${includedir}${includesubdir}" >&5
22106 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22107
22108 ### Resolve a conflict between normal and wide-curses by forcing applications
22109 ### that will need libutf8 to add it to their configure script.
22110 if test "$with_overwrite" != no ; then
22111 if test "$NCURSES_LIBUTF8" = 1 ; then
22112         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22113         { echo "$as_me:22113: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22114 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22115 fi
22116 fi
22117 WITH_OVERWRITE=$with_overwrite
22118
22119 # used to separate tack out of the tree
22120 NCURSES_TREE=
22121
22122 ### predefined stuff for the test programs
22123
22124 cat >>confdefs.h <<\EOF
22125 #define HAVE_SLK_COLOR 1
22126 EOF
22127
22128 ### Construct the list of subdirectories for which we'll customize makefiles
22129 ### with the appropriate compile-rules.
22130
22131 echo "$as_me:22131: checking for src modules" >&5
22132 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22133
22134 # dependencies and linker-arguments for test-programs
22135 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22136 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22137 if test "$DFT_LWR_MODEL" = "libtool"; then
22138         TEST_ARGS="${TEST_DEPS}"
22139         TEST_ARG2="${TEST_DEP2}"
22140 else
22141         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22142         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22143 fi
22144
22145 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22146 cf_cv_src_modules=
22147 for cf_dir in $modules_to_build
22148 do
22149         if test -f $srcdir/$cf_dir/modules; then
22150
22151                 # We may/may not have tack in the distribution, though the
22152                 # makefile is.
22153                 if test $cf_dir = tack ; then
22154                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22155                                 continue
22156                         fi
22157                 fi
22158
22159                 if test -z "$cf_cv_src_modules"; then
22160                         cf_cv_src_modules=$cf_dir
22161                 else
22162                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22163                 fi
22164
22165                 # Make the ncurses_cfg.h file record the library interface files as
22166                 # well.  These are header files that are the same name as their
22167                 # directory.  Ncurses is the only library that does not follow
22168                 # that pattern.
22169                 if test $cf_dir = tack ; then
22170                         continue
22171                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22172
22173 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22174
22175                         cat >>confdefs.h <<EOF
22176 #define HAVE_${cf_have_include}_H 1
22177 EOF
22178
22179                         cat >>confdefs.h <<EOF
22180 #define HAVE_LIB${cf_have_include} 1
22181 EOF
22182
22183                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22184                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22185                         if test "$DFT_LWR_MODEL" = "libtool"; then
22186                                 TEST_ARGS="${TEST_DEPS}"
22187                                 TEST_ARG2="${TEST_DEP2}"
22188                         else
22189                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22190                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22191                         fi
22192                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22193                 fi
22194         fi
22195 done
22196 echo "$as_me:22196: result: $cf_cv_src_modules" >&5
22197 echo "${ECHO_T}$cf_cv_src_modules" >&6
22198
22199 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22200 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22201
22202 SRC_SUBDIRS=
22203 if test "x$cf_with_manpages" != xno ; then
22204         SRC_SUBDIRS="$SRC_SUBDIRS man"
22205 fi
22206 SRC_SUBDIRS="$SRC_SUBDIRS include"
22207 for cf_dir in $cf_cv_src_modules
22208 do
22209         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22210 done
22211 if test "x$cf_with_tests" != "xno" ; then
22212         SRC_SUBDIRS="$SRC_SUBDIRS test"
22213 fi
22214 # always make this, to install the ncurses-config script
22215 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22216 if test "$cf_with_cxx_binding" != no; then
22217         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22218         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22219 fi
22220
22221 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22222 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22223
22224 ADA_SUBDIRS=
22225 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22226         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22227         ADA_SUBDIRS="gen src"
22228         if test "x$cf_with_tests" != "xno" ; then
22229                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22230         fi
22231 fi
22232
22233 SUB_MAKEFILES=
22234 for cf_dir in $SRC_SUBDIRS
22235 do
22236         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22237 done
22238
22239 if test -n "$ADA_SUBDIRS"; then
22240         for cf_dir in $ADA_SUBDIRS
22241         do
22242                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22243         done
22244
22245 fi
22246
22247 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22248    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22249    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22250 fi
22251
22252 DIRS_TO_MAKE="lib"
22253 for cf_item in $cf_list_models
22254 do
22255
22256         case $cf_item in
22257         (libtool) cf_subdir='obj_lo'  ;;
22258         (normal)  cf_subdir='objects' ;;
22259         (debug)   cf_subdir='obj_g' ;;
22260         (profile) cf_subdir='obj_p' ;;
22261         (shared)
22262                 case $cf_cv_system_name in
22263                 (cygwin|msys)
22264                         cf_subdir='objects' ;;
22265                 (*)
22266                         cf_subdir='obj_s' ;;
22267                 esac
22268         esac
22269
22270         for cf_item2 in $DIRS_TO_MAKE
22271         do
22272                 test $cf_item2 = $cf_subdir && break
22273         done
22274         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22275 done
22276 for cf_dir in $DIRS_TO_MAKE
22277 do
22278         test ! -d $cf_dir && mkdir $cf_dir
22279 done
22280
22281 # symbols that differ when compiling Ada95 by itself.
22282 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22283
22284 # values to use as strings
22285
22286 cat >>confdefs.h <<EOF
22287 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22288 EOF
22289
22290 cat >>confdefs.h <<EOF
22291 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22292 EOF
22293
22294 ### Now that we're done running tests, add the compiler-warnings, if any
22295
22296 cf_fix_cppflags=no
22297 cf_new_cflags=
22298 cf_new_cppflags=
22299 cf_new_extra_cppflags=
22300
22301 for cf_add_cflags in $EXTRA_CFLAGS
22302 do
22303 case $cf_fix_cppflags in
22304 (no)
22305         case $cf_add_cflags in
22306         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22307                 case $cf_add_cflags in
22308                 (-D*)
22309                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22310
22311                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22312                                 && test -z "${cf_tst_cflags}" \
22313                                 && cf_fix_cppflags=yes
22314
22315                         if test $cf_fix_cppflags = yes ; then
22316                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22317                                 continue
22318                         elif test "${cf_tst_cflags}" = "\"'" ; then
22319                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22320                                 continue
22321                         fi
22322                         ;;
22323                 esac
22324                 case "$CPPFLAGS" in
22325                 (*$cf_add_cflags)
22326                         ;;
22327                 (*)
22328                         case $cf_add_cflags in
22329                         (-D*)
22330                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22331
22332 CPPFLAGS=`echo "$CPPFLAGS" | \
22333         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22334                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22335
22336                                 ;;
22337                         esac
22338                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22339                         ;;
22340                 esac
22341                 ;;
22342         (*)
22343                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22344                 ;;
22345         esac
22346         ;;
22347 (yes)
22348         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22349
22350         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22351
22352         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22353                 && test -z "${cf_tst_cflags}" \
22354                 && cf_fix_cppflags=no
22355         ;;
22356 esac
22357 done
22358
22359 if test -n "$cf_new_cflags" ; then
22360
22361         CFLAGS="$CFLAGS $cf_new_cflags"
22362 fi
22363
22364 if test -n "$cf_new_cppflags" ; then
22365
22366         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22367 fi
22368
22369 if test -n "$cf_new_extra_cppflags" ; then
22370
22371         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22372 fi
22373
22374 ### Define substitutions for header files to avoid name-pollution
22375
22376 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22377         HAVE_TCGETATTR=1
22378 else
22379         HAVE_TCGETATTR=0
22380 fi
22381
22382 if test "x$ac_cv_header_stdint_h" = xyes ; then
22383         HAVE_STDINT_H=1
22384 else
22385         HAVE_STDINT_H=0
22386 fi
22387
22388 if test "x$ac_cv_header_termio_h" = xyes ; then
22389         HAVE_TERMIO_H=1
22390 else
22391         HAVE_TERMIO_H=0
22392 fi
22393
22394 if test "x$ac_cv_header_termios_h" = xyes ; then
22395         HAVE_TERMIOS_H=1
22396 else
22397         HAVE_TERMIOS_H=0
22398 fi
22399
22400 ################################################################################
22401 test "x$use_database" = xyes && \
22402 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22403
22404 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22405 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22406
22407 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22408 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22409 fi
22410
22411 # Extract the first word of "tic", so it can be a program name with args.
22412 set dummy tic; ac_word=$2
22413 echo "$as_me:22413: checking for $ac_word" >&5
22414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22415 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22416   echo $ECHO_N "(cached) $ECHO_C" >&6
22417 else
22418   case $TIC_PATH in
22419   [\\/]* | ?:[\\/]*)
22420   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22421   ;;
22422   *)
22423   ac_save_IFS=$IFS; IFS=$ac_path_separator
22424 ac_dummy="$PATH:/usr/local/ncurses/bin"
22425 for ac_dir in $ac_dummy; do
22426   IFS=$ac_save_IFS
22427   test -z "$ac_dir" && ac_dir=.
22428   if $as_executable_p "$ac_dir/$ac_word"; then
22429    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22430    echo "$as_me:22430: found $ac_dir/$ac_word" >&5
22431    break
22432 fi
22433 done
22434
22435   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22436   ;;
22437 esac
22438 fi
22439 TIC_PATH=$ac_cv_path_TIC_PATH
22440
22441 if test -n "$TIC_PATH"; then
22442   echo "$as_me:22442: result: $TIC_PATH" >&5
22443 echo "${ECHO_T}$TIC_PATH" >&6
22444 else
22445   echo "$as_me:22445: result: no" >&5
22446 echo "${ECHO_T}no" >&6
22447 fi
22448
22449 if test -n "$FALLBACK_LIST"
22450 then
22451         if test "$TIC_PATH" = unknown
22452         then
22453                 { echo "$as_me:22453: WARNING: no tic program found for fallbacks" >&5
22454 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22455         fi
22456 fi
22457
22458 if test "x$cf_with_tests" != xno ; then
22459         MAKE_TESTS=
22460 else
22461         MAKE_TESTS="#"
22462 fi
22463
22464 ADAHTML_DIR=../../doc/html/ada
22465
22466 # these could be configurable, but are not currently
22467 PANEL_NAME=panel
22468 MENU_NAME=menu
22469 FORM_NAME=form
22470 CXX_NAME=ncurses++
22471
22472 # workaround for OS/2 (20151017)
22473 case $cf_cv_system_name in
22474 (os2*)
22475         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22476         ;;
22477 (*)
22478         LIBTOOL_OPTS_CXX=
22479         ;;
22480 esac
22481
22482 # workaround for g++ versus Solaris (20131116)
22483 case $cf_cv_system_name in
22484 (solaris2*)
22485         case "x$CPPFLAGS" in
22486         (*-D_XOPEN_SOURCE_EXTENDED*)
22487                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22488
22489 echo "${as_me:-configure}:22489: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22490
22491                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22492                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22493                 ;;
22494         esac
22495         ;;
22496 esac
22497
22498 # Help to automatically enable the extended curses features when using either
22499 # the *-config or the ".pc" files by adding defines.
22500 echo "$as_me:22500: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22501 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22502 PKG_CFLAGS=
22503 for cf_loop1 in $CPPFLAGS_after_XOPEN
22504 do
22505         cf_found=no
22506         for cf_loop2 in $CPPFLAGS_before_XOPEN
22507         do
22508                 if test "x$cf_loop1" = "x$cf_loop2"
22509                 then
22510                         cf_found=yes
22511                         break
22512                 fi
22513         done
22514         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22515 done
22516 echo "$as_me:22516: result: $PKG_CFLAGS" >&5
22517 echo "${ECHO_T}$PKG_CFLAGS" >&6
22518
22519 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22520 case "x$NCURSES_OSPEED" in
22521 (*short*)
22522         cf_compatible=1
22523         ;;
22524 (*)
22525         cf_compatible=0
22526         ;;
22527 esac
22528
22529 cat >>confdefs.h <<EOF
22530 #define NCURSES_OSPEED_COMPAT $cf_compatible
22531 EOF
22532
22533 case "x$cf_cv_typeof_chtype" in
22534 (xshort|xint|xlong)
22535         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22536         ;;
22537 esac
22538
22539 case "x$cf_cv_typeof_mmask_t" in
22540 (xshort|xint|xlong)
22541         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22542         ;;
22543 esac
22544
22545 # substitute into misc/Makefile to suppress
22546 # (un)install.data from the
22547 # (un)install rules.
22548 if test "x$cf_with_db_install" = "xno"; then
22549         MISC_INSTALL_DATA=
22550         MISC_UNINSTALL_DATA=
22551 else
22552         MISC_INSTALL_DATA=install.data
22553         MISC_UNINSTALL_DATA=uninstall.data
22554 fi
22555
22556 SUB_SCRIPTS=
22557
22558 if test -n "$PACKAGE"
22559 then
22560         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22561         export PACKAGE
22562         echo "package: $PACKAGE"
22563 fi
22564
22565 UNALTERED_SYMS=
22566 cf_filter_syms=no
22567
22568 if test -n "$RESULTING_SYMS"
22569 then
22570         cf_filter_syms=$cf_dft_filter_syms
22571         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22572
22573 echo "${as_me:-configure}:22573: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22574
22575 fi
22576
22577 if test "x$WILDCARD_SYMS" = xno
22578 then
22579         cf_filter_syms=yes
22580 fi
22581
22582 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22583 if test $cf_filter_syms = yes
22584 then
22585         RESULTING_SYMS=resulting.map
22586 fi
22587
22588 if test "x$cross_compiling" = xyes ; then
22589         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22590 else
22591         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22592 fi
22593
22594 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"
22595 ac_config_commands="$ac_config_commands default"
22596 cat >confcache <<\_ACEOF
22597 # This file is a shell script that caches the results of configure
22598 # tests run on this system so they can be shared between configure
22599 # scripts and configure runs, see configure's option --config-cache.
22600 # It is not useful on other systems.  If it contains results you don't
22601 # want to keep, you may remove or edit it.
22602 #
22603 # config.status only pays attention to the cache file if you give it
22604 # the --recheck option to rerun configure.
22605 #
22606 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22607 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22608 # following values.
22609
22610 _ACEOF
22611
22612 # The following way of writing the cache mishandles newlines in values,
22613 # but we know of no workaround that is simple, portable, and efficient.
22614 # So, don't put newlines in cache variables' values.
22615 # Ultrix sh set writes to stderr and can't be redirected directly,
22616 # and sets the high bit in the cache file unless we assign to the vars.
22617 {
22618   (set) 2>&1 |
22619     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22620     *ac_space=\ *)
22621       # `set' does not quote correctly, so add quotes (double-quote
22622       # substitution turns \\\\ into \\, and sed turns \\ into \).
22623       sed -n \
22624         "s/'/'\\\\''/g;
22625           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22626       ;;
22627     *)
22628       # `set' quotes correctly as required by POSIX, so do not add quotes.
22629       sed -n \
22630         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22631       ;;
22632     esac;
22633 } |
22634   sed '
22635      t clear
22636      : clear
22637      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22638      t end
22639      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22640      : end' >>confcache
22641 if cmp -s $cache_file confcache; then :; else
22642   if test -w $cache_file; then
22643     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22644     cat confcache >$cache_file
22645   else
22646     echo "not updating unwritable cache $cache_file"
22647   fi
22648 fi
22649 rm -f confcache
22650
22651 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22652 # Let make expand exec_prefix.
22653 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22654
22655 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22656 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22657 # trailing colons and then remove the whole line if VPATH becomes empty
22658 # (actually we leave an empty line to preserve line numbers).
22659 if test "x$srcdir" = x.; then
22660   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22661 s/:*\$(srcdir):*/:/;
22662 s/:*\${srcdir}:*/:/;
22663 s/:*@srcdir@:*/:/;
22664 s/^\([^=]*=[    ]*\):*/\1/;
22665 s/:*$//;
22666 s/^[^=]*=[      ]*$//;
22667 }'
22668 fi
22669
22670 DEFS=-DHAVE_CONFIG_H
22671
22672 : ${CONFIG_STATUS=./config.status}
22673 ac_clean_files_save=$ac_clean_files
22674 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22675 { echo "$as_me:22675: creating $CONFIG_STATUS" >&5
22676 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22677 cat >$CONFIG_STATUS <<_ACEOF
22678 #! $SHELL
22679 # Generated automatically by configure.
22680 # Run this file to recreate the current configuration.
22681 # Compiler output produced by configure, useful for debugging
22682 # configure, is in config.log if it exists.
22683
22684 debug=false
22685 SHELL=\${CONFIG_SHELL-$SHELL}
22686 ac_cs_invocation="\$0 \$@"
22687
22688 _ACEOF
22689
22690 cat >>$CONFIG_STATUS <<\_ACEOF
22691 # Be Bourne compatible
22692 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22693   emulate sh
22694   NULLCMD=:
22695 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22696   set -o posix
22697 fi
22698
22699 # Name of the executable.
22700 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22701
22702 if expr a : '\(a\)' >/dev/null 2>&1; then
22703   as_expr=expr
22704 else
22705   as_expr=false
22706 fi
22707
22708 rm -f conf$$ conf$$.exe conf$$.file
22709 echo >conf$$.file
22710 if ln -s conf$$.file conf$$ 2>/dev/null; then
22711   # We could just check for DJGPP; but this test a) works b) is more generic
22712   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22713   if test -f conf$$.exe; then
22714     # Don't use ln at all; we don't have any links
22715     as_ln_s='cp -p'
22716   else
22717     as_ln_s='ln -s'
22718   fi
22719 elif ln conf$$.file conf$$ 2>/dev/null; then
22720   as_ln_s=ln
22721 else
22722   as_ln_s='cp -p'
22723 fi
22724 rm -f conf$$ conf$$.exe conf$$.file
22725
22726 as_executable_p="test -f"
22727
22728 # Support unset when possible.
22729 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22730   as_unset=unset
22731 else
22732   as_unset=false
22733 fi
22734
22735 # NLS nuisances.
22736 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22737 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22738 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22739 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22740 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22741 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22742 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22743 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22744
22745 # IFS
22746 # We need space, tab and new line, in precisely that order.
22747 as_nl='
22748 '
22749 IFS="   $as_nl"
22750
22751 # CDPATH.
22752 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22753
22754 exec 6>&1
22755
22756 _ACEOF
22757
22758 # Files that config.status was made for.
22759 if test -n "$ac_config_files"; then
22760   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22761 fi
22762
22763 if test -n "$ac_config_headers"; then
22764   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22765 fi
22766
22767 if test -n "$ac_config_links"; then
22768   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22769 fi
22770
22771 if test -n "$ac_config_commands"; then
22772   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22773 fi
22774
22775 cat >>$CONFIG_STATUS <<\EOF
22776
22777 ac_cs_usage="\
22778 \`$as_me' instantiates files from templates according to the
22779 current configuration.
22780
22781 Usage: $0 [OPTIONS] [FILE]...
22782
22783   -h, --help       print this help, then exit
22784   -V, --version    print version number, then exit
22785   -d, --debug      don't remove temporary files
22786       --recheck    update $as_me by reconfiguring in the same conditions
22787   --file=FILE[:TEMPLATE]
22788                    instantiate the configuration file FILE
22789   --header=FILE[:TEMPLATE]
22790                    instantiate the configuration header FILE
22791
22792 Configuration files:
22793 $config_files
22794
22795 Configuration headers:
22796 $config_headers
22797
22798 Configuration commands:
22799 $config_commands
22800
22801 Report bugs to <dickey@invisible-island.net>."
22802 EOF
22803
22804 cat >>$CONFIG_STATUS <<EOF
22805 ac_cs_version="\\
22806 config.status
22807 configured by $0, generated by GNU Autoconf 2.52.20150926,
22808   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22809
22810 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22811 Free Software Foundation, Inc.
22812 This config.status script is free software; the Free Software Foundation
22813 gives unlimited permission to copy, distribute and modify it."
22814 srcdir=$srcdir
22815 INSTALL="$INSTALL"
22816 EOF
22817
22818 cat >>$CONFIG_STATUS <<\EOF
22819 # If no file are specified by the user, then we need to provide default
22820 # value.  By we need to know if files were specified by the user.
22821 ac_need_defaults=:
22822 while test $# != 0
22823 do
22824   case $1 in
22825   --*=*)
22826     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22827     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22828     shift
22829     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22830     shift
22831     ;;
22832   -*);;
22833   *) # This is not an option, so the user has probably given explicit
22834      # arguments.
22835      ac_need_defaults=false;;
22836   esac
22837
22838   case $1 in
22839   # Handling of the options.
22840 EOF
22841 cat >>$CONFIG_STATUS <<EOF
22842   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22843     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22844     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22845 EOF
22846 cat >>$CONFIG_STATUS <<\EOF
22847   --version | --vers* | -V )
22848     echo "$ac_cs_version"; exit 0 ;;
22849   --he | --h)
22850     # Conflict between --help and --header
22851     { { echo "$as_me:22851: error: ambiguous option: $1
22852 Try \`$0 --help' for more information." >&5
22853 echo "$as_me: error: ambiguous option: $1
22854 Try \`$0 --help' for more information." >&2;}
22855    { (exit 1); exit 1; }; };;
22856   --help | --hel | -h )
22857     echo "$ac_cs_usage"; exit 0 ;;
22858   --debug | --d* | -d )
22859     debug=: ;;
22860   --file | --fil | --fi | --f )
22861     shift
22862     CONFIG_FILES="$CONFIG_FILES $1"
22863     ac_need_defaults=false;;
22864   --header | --heade | --head | --hea )
22865     shift
22866     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22867     ac_need_defaults=false;;
22868
22869   # This is an error.
22870   -*) { { echo "$as_me:22870: error: unrecognized option: $1
22871 Try \`$0 --help' for more information." >&5
22872 echo "$as_me: error: unrecognized option: $1
22873 Try \`$0 --help' for more information." >&2;}
22874    { (exit 1); exit 1; }; } ;;
22875
22876   *) ac_config_targets="$ac_config_targets $1" ;;
22877
22878   esac
22879   shift
22880 done
22881
22882 exec 5>>config.log
22883 cat >&5 << _ACEOF
22884
22885 ## ----------------------- ##
22886 ## Running config.status.  ##
22887 ## ----------------------- ##
22888
22889 This file was extended by $as_me 2.52.20150926, executed with
22890   CONFIG_FILES    = $CONFIG_FILES
22891   CONFIG_HEADERS  = $CONFIG_HEADERS
22892   CONFIG_LINKS    = $CONFIG_LINKS
22893   CONFIG_COMMANDS = $CONFIG_COMMANDS
22894   > $ac_cs_invocation
22895 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22896
22897 _ACEOF
22898 EOF
22899
22900 cat >>$CONFIG_STATUS <<EOF
22901 #
22902 # INIT-COMMANDS section.
22903 #
22904
22905 ### Special initialization commands, used to pass information from the
22906 ### configuration-run into config.status
22907
22908 AWK="$AWK"
22909 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22910 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22911 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22912 ECHO_LD="$ECHO_LD"
22913 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22914 LDCONFIG="$LDCONFIG"
22915 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22916 LIB_NAME="$LIB_NAME"
22917 LIB_PREFIX="$LIB_PREFIX"
22918 LIB_SUBSETS="$LIB_SUBSETS"
22919 LIB_SUFFIX="$LIB_SUFFIX"
22920 LIB_TRACING="$LIB_TRACING"
22921 LN_S="$LN_S"
22922 MAKE_TERMINFO="$MAKE_TERMINFO"
22923 NCURSES_MAJOR="$NCURSES_MAJOR"
22924 NCURSES_MINOR="$NCURSES_MINOR"
22925 NCURSES_OSPEED="$NCURSES_OSPEED"
22926 NCURSES_PATCH="$NCURSES_PATCH"
22927 SRC_SUBDIRS="$SRC_SUBDIRS"
22928 TERMINFO="$TERMINFO"
22929 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22930 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22931 TICS_NAME="$TICS_NAME"
22932 TICS_SUFFIX="$TICS_SUFFIX"
22933 TIC_PATH="$TIC_PATH"
22934 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22935 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22936 TINFO_NAME="$TINFO_NAME"
22937 TINFO_SUFFIX="$TINFO_SUFFIX"
22938 UNALTERED_SYMS="$UNALTERED_SYMS"
22939 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22940 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22941 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22942 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22943 WILDCARD_SYMS="$WILDCARD_SYMS"
22944 WITH_CURSES_H="$with_curses_h"
22945 WITH_ECHO="${enable_echo:=yes}"
22946 WITH_OVERWRITE="$with_overwrite"
22947 cf_LIST_MODELS="$cf_list_models"
22948 cf_cv_abi_version="$cf_cv_abi_version"
22949 cf_cv_do_relink="$cf_cv_do_relink"
22950 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22951 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22952 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22953 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22954 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22955 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22956 cf_cv_rel_version="$cf_cv_rel_version"
22957 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22958 cf_cv_shared_soname='$cf_cv_shared_soname'
22959 cf_cv_shlib_version="$cf_cv_shlib_version"
22960 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22961 cf_cv_system_name="$cf_cv_system_name"
22962 cf_cv_term_driver="$with_term_driver"
22963 cf_with_ada="$cf_with_ada"
22964 cf_with_cxx_binding="$cf_with_cxx_binding"
22965 cf_with_db_install="$cf_with_db_install"
22966 cf_with_manpages="$cf_with_manpages"
22967 cf_with_tests="$cf_with_tests"
22968 host="$host"
22969 target="$target"
22970 with_shared_cxx="$with_shared_cxx"
22971
22972 EOF
22973
22974 cat >>$CONFIG_STATUS <<\EOF
22975 for ac_config_target in $ac_config_targets
22976 do
22977   case "$ac_config_target" in
22978   # Handling of arguments.
22979   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22980   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22981   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22982   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22983   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22984   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22985   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22986   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22987   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22988   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22989   *) { { echo "$as_me:22989: error: invalid argument: $ac_config_target" >&5
22990 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22991    { (exit 1); exit 1; }; };;
22992   esac
22993 done
22994
22995 # If the user did not use the arguments to specify the items to instantiate,
22996 # then the envvar interface is used.  Set only those that are not.
22997 # We use the long form for the default assignment because of an extremely
22998 # bizarre bug on SunOS 4.1.3.
22999 if $ac_need_defaults; then
23000   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23001   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23002   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23003 fi
23004
23005 # Create a temporary directory, and hook for its removal unless debugging.
23006 $debug ||
23007 {
23008   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23009   trap '{ (exit 1); exit 1; }' 1 2 13 15
23010 }
23011
23012 # Create a (secure) tmp directory for tmp files.
23013 : ${TMPDIR=/tmp}
23014 {
23015   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23016   test -n "$tmp" && test -d "$tmp"
23017 }  ||
23018 {
23019   tmp=$TMPDIR/cs$$-$RANDOM
23020   (umask 077 && mkdir $tmp)
23021 } ||
23022 {
23023    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23024    { (exit 1); exit 1; }
23025 }
23026
23027 EOF
23028
23029 cat >>$CONFIG_STATUS <<EOF
23030
23031 #
23032 # CONFIG_FILES section.
23033 #
23034
23035 # No need to generate the scripts if there are no CONFIG_FILES.
23036 # This happens for instance when ./config.status config.h
23037 if test -n "\$CONFIG_FILES"; then
23038   # Protect against being on the right side of a sed subst in config.status.
23039   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23040    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23041 s,@SHELL@,$SHELL,;t t
23042 s,@exec_prefix@,$exec_prefix,;t t
23043 s,@prefix@,$prefix,;t t
23044 s,@program_transform_name@,$program_transform_name,;t t
23045 s,@bindir@,$bindir,;t t
23046 s,@sbindir@,$sbindir,;t t
23047 s,@libexecdir@,$libexecdir,;t t
23048 s,@datarootdir@,$datarootdir,;t t
23049 s,@datadir@,$datadir,;t t
23050 s,@sysconfdir@,$sysconfdir,;t t
23051 s,@sharedstatedir@,$sharedstatedir,;t t
23052 s,@localstatedir@,$localstatedir,;t t
23053 s,@libdir@,$libdir,;t t
23054 s,@includedir@,$includedir,;t t
23055 s,@oldincludedir@,$oldincludedir,;t t
23056 s,@infodir@,$infodir,;t t
23057 s,@mandir@,$mandir,;t t
23058 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23059 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23060 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23061 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23062 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23063 s,@build_alias@,$build_alias,;t t
23064 s,@host_alias@,$host_alias,;t t
23065 s,@target_alias@,$target_alias,;t t
23066 s,@ECHO_C@,$ECHO_C,;t t
23067 s,@ECHO_N@,$ECHO_N,;t t
23068 s,@ECHO_T@,$ECHO_T,;t t
23069 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23070 s,@DEFS@,$DEFS,;t t
23071 s,@LIBS@,$LIBS,;t t
23072 s,@top_builddir@,$top_builddir,;t t
23073 s,@EGREP@,$EGREP,;t t
23074 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23075 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23076 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23077 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23078 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23079 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23080 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23081 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23082 s,@VERSION@,$VERSION,;t t
23083 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23084 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23085 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23086 s,@PACKAGE@,$PACKAGE,;t t
23087 s,@build@,$build,;t t
23088 s,@build_cpu@,$build_cpu,;t t
23089 s,@build_vendor@,$build_vendor,;t t
23090 s,@build_os@,$build_os,;t t
23091 s,@host@,$host,;t t
23092 s,@host_cpu@,$host_cpu,;t t
23093 s,@host_vendor@,$host_vendor,;t t
23094 s,@host_os@,$host_os,;t t
23095 s,@target@,$target,;t t
23096 s,@target_cpu@,$target_cpu,;t t
23097 s,@target_vendor@,$target_vendor,;t t
23098 s,@target_os@,$target_os,;t t
23099 s,@CC@,$CC,;t t
23100 s,@CFLAGS@,$CFLAGS,;t t
23101 s,@LDFLAGS@,$LDFLAGS,;t t
23102 s,@CPPFLAGS@,$CPPFLAGS,;t t
23103 s,@ac_ct_CC@,$ac_ct_CC,;t t
23104 s,@EXEEXT@,$EXEEXT,;t t
23105 s,@OBJEXT@,$OBJEXT,;t t
23106 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23107 s,@CPP@,$CPP,;t t
23108 s,@LDCONFIG@,$LDCONFIG,;t t
23109 s,@CXX@,$CXX,;t t
23110 s,@CXXFLAGS@,$CXXFLAGS,;t t
23111 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23112 s,@AWK@,$AWK,;t t
23113 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23114 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23115 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23116 s,@LINT@,$LINT,;t t
23117 s,@LINT_OPTS@,$LINT_OPTS,;t t
23118 s,@LN_S@,$LN_S,;t t
23119 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23120 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23121 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23122 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23123 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23124 s,@SET_MAKE@,$SET_MAKE,;t t
23125 s,@CTAGS@,$CTAGS,;t t
23126 s,@ETAGS@,$ETAGS,;t t
23127 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23128 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23129 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23130 s,@RANLIB@,$RANLIB,;t t
23131 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23132 s,@LD@,$LD,;t t
23133 s,@ac_ct_LD@,$ac_ct_LD,;t t
23134 s,@AR@,$AR,;t t
23135 s,@ac_ct_AR@,$ac_ct_AR,;t t
23136 s,@NM@,$NM,;t t
23137 s,@ac_ct_NM@,$ac_ct_NM,;t t
23138 s,@ARFLAGS@,$ARFLAGS,;t t
23139 s,@DESTDIR@,$DESTDIR,;t t
23140 s,@BUILD_CC@,$BUILD_CC,;t t
23141 s,@BUILD_CPP@,$BUILD_CPP,;t t
23142 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23143 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23144 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23145 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23146 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23147 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23148 s,@cf_list_models@,$cf_list_models,;t t
23149 s,@ABI_VERSION@,$ABI_VERSION,;t t
23150 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23151 s,@LIBTOOL@,$LIBTOOL,;t t
23152 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23153 s,@LT_UNDEF@,$LT_UNDEF,;t t
23154 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23155 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23156 s,@LIB_CREATE@,$LIB_CREATE,;t t
23157 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23158 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23159 s,@LIB_PREP@,$LIB_PREP,;t t
23160 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23161 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23162 s,@LIB_LINK@,$LIB_LINK,;t t
23163 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23164 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23165 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23166 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23167 s,@TICS_NAME@,$TICS_NAME,;t t
23168 s,@TINFO_NAME@,$TINFO_NAME,;t t
23169 s,@LIB_NAME@,$LIB_NAME,;t t
23170 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23171 s,@CC_G_OPT@,$CC_G_OPT,;t t
23172 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23173 s,@LD_MODEL@,$LD_MODEL,;t t
23174 s,@shlibdir@,$shlibdir,;t t
23175 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23176 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23177 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23178 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23179 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23180 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23181 s,@LINK_PROGS@,$LINK_PROGS,;t t
23182 s,@LINK_TESTS@,$LINK_TESTS,;t t
23183 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23184 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23185 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23186 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23187 s,@RPATH_LIST@,$RPATH_LIST,;t t
23188 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23189 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23190 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23191 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23192 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23193 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23194 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23195 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23196 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23197 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23198 s,@XTERM_KBS@,$XTERM_KBS,;t t
23199 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23200 s,@TERMINFO@,$TERMINFO,;t t
23201 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23202 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23203 s,@TERMPATH@,$TERMPATH,;t t
23204 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23205 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23206 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23207 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23208 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23209 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23210 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23211 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23212 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23213 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23214 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23215 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23216 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23217 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23218 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23219 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23220 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23221 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23222 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23223 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23224 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23225 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23226 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23227 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23228 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23229 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23230 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23231 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23232 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23233 s,@PTHREAD@,$PTHREAD,;t t
23234 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23235 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23236 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23237 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23238 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23239 s,@ECHO_LT@,$ECHO_LT,;t t
23240 s,@ECHO_LD@,$ECHO_LD,;t t
23241 s,@RULE_CC@,$RULE_CC,;t t
23242 s,@SHOW_CC@,$SHOW_CC,;t t
23243 s,@ECHO_CC@,$ECHO_CC,;t t
23244 s,@ECHO_LINK@,$ECHO_LINK,;t t
23245 s,@ADAFLAGS@,$ADAFLAGS,;t t
23246 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23247 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23248 s,@ADA_TRACE@,$ADA_TRACE,;t t
23249 s,@MATH_LIB@,$MATH_LIB,;t t
23250 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23251 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23252 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23253 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23254 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23255 s,@TEST_LIBS@,$TEST_LIBS,;t t
23256 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23257 s,@CXXCPP@,$CXXCPP,;t t
23258 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23259 s,@CXX_AR@,$CXX_AR,;t t
23260 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23261 s,@CXXLIBS@,$CXXLIBS,;t t
23262 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23263 s,@gnat_exists@,$gnat_exists,;t t
23264 s,@M4_exists@,$M4_exists,;t t
23265 s,@cf_ada_make@,$cf_ada_make,;t t
23266 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23267 s,@cf_compile_generics@,$cf_compile_generics,;t t
23268 s,@cf_generic_objects@,$cf_generic_objects,;t t
23269 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23270 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23271 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23272 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23273 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23274 s,@cf_ada_package@,$cf_ada_package,;t t
23275 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23276 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23277 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23278 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23279 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23280 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23281 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23282 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23283 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23284 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23285 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23286 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23287 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23288 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23289 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23290 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23291 s,@TICS_LIBS@,$TICS_LIBS,;t t
23292 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23293 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23294 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23295 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23296 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23297 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23298 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23299 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23300 s,@includesubdir@,$includesubdir,;t t
23301 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23302 s,@TICS_LIST@,$TICS_LIST,;t t
23303 s,@TINFO_LIST@,$TINFO_LIST,;t t
23304 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23305 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23306 s,@TEST_ARGS@,$TEST_ARGS,;t t
23307 s,@TEST_DEPS@,$TEST_DEPS,;t t
23308 s,@TEST_ARG2@,$TEST_ARG2,;t t
23309 s,@TEST_DEP2@,$TEST_DEP2,;t t
23310 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23311 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23312 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23313 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23314 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23315 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23316 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23317 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23318 s,@cross_compiling@,$cross_compiling,;t t
23319 s,@TIC_PATH@,$TIC_PATH,;t t
23320 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23321 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23322 s,@PANEL_NAME@,$PANEL_NAME,;t t
23323 s,@MENU_NAME@,$MENU_NAME,;t t
23324 s,@FORM_NAME@,$FORM_NAME,;t t
23325 s,@CXX_NAME@,$CXX_NAME,;t t
23326 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23327 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23328 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23329 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23330 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23331 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23332 CEOF
23333
23334 EOF
23335
23336   cat >>$CONFIG_STATUS <<\EOF
23337   # Split the substitutions into bite-sized pieces for seds with
23338   # small command number limits, like on Digital OSF/1 and HP-UX.
23339   ac_max_sed_lines=48
23340   ac_sed_frag=1 # Number of current file.
23341   ac_beg=1 # First line for current file.
23342   ac_end=$ac_max_sed_lines # Line after last line for current file.
23343   ac_more_lines=:
23344   ac_sed_cmds=
23345   while $ac_more_lines; do
23346     if test $ac_beg -gt 1; then
23347       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23348     else
23349       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23350     fi
23351     if test ! -s $tmp/subs.frag; then
23352       ac_more_lines=false
23353     else
23354       # The purpose of the label and of the branching condition is to
23355       # speed up the sed processing (if there are no `@' at all, there
23356       # is no need to browse any of the substitutions).
23357       # These are the two extra sed commands mentioned above.
23358       (echo ':t
23359   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23360       # It is possible to make a multiline substitution using escaped newlines.
23361       # Ensure that we do not split the substitution between script fragments.
23362       ac_BEG=$ac_end
23363       ac_END=`expr $ac_end + $ac_max_sed_lines`
23364       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23365       if test -s $tmp/subs.next; then
23366         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23367         if test ! -s $tmp/subs.edit; then
23368           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23369           if test ! -s $tmp/subs.edit; then
23370             if test $ac_beg -gt 1; then
23371               ac_end=`expr $ac_end - 1`
23372               continue
23373             fi
23374           fi
23375         fi
23376       fi
23377
23378       if test -z "$ac_sed_cmds"; then
23379         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23380       else
23381         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23382       fi
23383       ac_sed_frag=`expr $ac_sed_frag + 1`
23384       ac_beg=$ac_end
23385       ac_end=`expr $ac_end + $ac_max_sed_lines`
23386     fi
23387   done
23388   if test -z "$ac_sed_cmds"; then
23389     ac_sed_cmds=cat
23390   fi
23391 fi # test -n "$CONFIG_FILES"
23392
23393 EOF
23394 cat >>$CONFIG_STATUS <<\EOF
23395 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23396   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23397   case $ac_file in
23398   - | *:- | *:-:* ) # input from stdin
23399         cat >$tmp/stdin
23400         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23401         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23402   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23403         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23404   * )   ac_file_in=$ac_file.in ;;
23405   esac
23406
23407   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23408   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23409          X"$ac_file" : 'X\(//\)[^/]' \| \
23410          X"$ac_file" : 'X\(//\)$' \| \
23411          X"$ac_file" : 'X\(/\)' \| \
23412          .     : '\(.\)' 2>/dev/null ||
23413 echo X"$ac_file" |
23414     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23415           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23416           /^X\(\/\/\)$/{ s//\1/; q; }
23417           /^X\(\/\).*/{ s//\1/; q; }
23418           s/.*/./; q'`
23419   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23420     { case "$ac_dir" in
23421   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23422   *)                      as_incr_dir=.;;
23423 esac
23424 as_dummy="$ac_dir"
23425 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23426   case $as_mkdir_dir in
23427     # Skip DOS drivespec
23428     ?:) as_incr_dir=$as_mkdir_dir ;;
23429     *)
23430       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23431       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23432     ;;
23433   esac
23434 done; }
23435
23436     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23437     # A "../" for each directory in $ac_dir_suffix.
23438     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23439   else
23440     ac_dir_suffix= ac_dots=
23441   fi
23442
23443   case $srcdir in
23444   .)  ac_srcdir=.
23445       if test -z "$ac_dots"; then
23446          ac_top_srcdir=.
23447       else
23448          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23449       fi ;;
23450   [\\/]* | ?:[\\/]* )
23451       ac_srcdir=$srcdir$ac_dir_suffix;
23452       ac_top_srcdir=$srcdir ;;
23453   *) # Relative path.
23454     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23455     ac_top_srcdir=$ac_dots$srcdir ;;
23456   esac
23457
23458   case $INSTALL in
23459   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23460   *) ac_INSTALL=$ac_dots$INSTALL ;;
23461   esac
23462
23463   if test x"$ac_file" != x-; then
23464     { echo "$as_me:23464: creating $ac_file" >&5
23465 echo "$as_me: creating $ac_file" >&6;}
23466     rm -f "$ac_file"
23467   fi
23468   # Let's still pretend it is `configure' which instantiates (i.e., don't
23469   # use $as_me), people would be surprised to read:
23470   #    /* config.h.  Generated automatically by config.status.  */
23471   configure_input="Generated automatically from `echo $ac_file_in |
23472                                                  sed 's,.*/,,'` by configure."
23473
23474   # First look for the input files in the build tree, otherwise in the
23475   # src tree.
23476   ac_file_inputs=`IFS=:
23477     for f in $ac_file_in; do
23478       case $f in
23479       -) echo $tmp/stdin ;;
23480       [\\/$]*)
23481          # Absolute (can't be DOS-style, as IFS=:)
23482          test -f "$f" || { { echo "$as_me:23482: error: cannot find input file: $f" >&5
23483 echo "$as_me: error: cannot find input file: $f" >&2;}
23484    { (exit 1); exit 1; }; }
23485          echo $f;;
23486       *) # Relative
23487          if test -f "$f"; then
23488            # Build tree
23489            echo $f
23490          elif test -f "$srcdir/$f"; then
23491            # Source tree
23492            echo $srcdir/$f
23493          else
23494            # /dev/null tree
23495            { { echo "$as_me:23495: error: cannot find input file: $f" >&5
23496 echo "$as_me: error: cannot find input file: $f" >&2;}
23497    { (exit 1); exit 1; }; }
23498          fi;;
23499       esac
23500     done` || { (exit 1); exit 1; }
23501 EOF
23502 cat >>$CONFIG_STATUS <<\EOF
23503   ac_warn_datarootdir=no
23504   if test x"$ac_file" != x-; then
23505     for ac_item in $ac_file_inputs
23506     do
23507       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23508       if test -n "$ac_seen"; then
23509         ac_used=`grep '@datarootdir@' $ac_item`
23510         if test -z "$ac_used"; then
23511           { echo "$as_me:23511: WARNING: datarootdir was used implicitly but not set:
23512 $ac_seen" >&5
23513 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23514 $ac_seen" >&2;}
23515           ac_warn_datarootdir=yes
23516         fi
23517       fi
23518       ac_seen=`grep '${datarootdir}' $ac_item`
23519       if test -n "$ac_seen"; then
23520         { echo "$as_me:23520: WARNING: datarootdir was used explicitly but not set:
23521 $ac_seen" >&5
23522 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23523 $ac_seen" >&2;}
23524         ac_warn_datarootdir=yes
23525       fi
23526     done
23527   fi
23528
23529 if test "x$ac_warn_datarootdir" = xyes; then
23530   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23531 fi
23532
23533 EOF
23534 cat >>$CONFIG_STATUS <<EOF
23535   sed "$ac_vpsub
23536 $extrasub
23537 EOF
23538 cat >>$CONFIG_STATUS <<\EOF
23539 :t
23540 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23541 s,@configure_input@,$configure_input,;t t
23542 s,@srcdir@,$ac_srcdir,;t t
23543 s,@top_srcdir@,$ac_top_srcdir,;t t
23544 s,@INSTALL@,$ac_INSTALL,;t t
23545 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23546   rm -f $tmp/stdin
23547   if test x"$ac_file" != x-; then
23548     cp $tmp/out $ac_file
23549
23550     for ac_name in prefix exec_prefix datarootdir
23551     do
23552         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23553         if test -n "$ac_seen"; then
23554             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23555             if test -z "$ac_init"; then
23556               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23557               { echo "$as_me:23557: WARNING: Variable $ac_name is used but was not set:
23558 $ac_seen" >&5
23559 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23560 $ac_seen" >&2;}
23561             fi
23562         fi
23563     done
23564     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23565     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23566     if test -s $tmp/out; then
23567       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23568       { echo "$as_me:23568: WARNING: Some variables may not be substituted:
23569 $ac_seen" >&5
23570 echo "$as_me: WARNING: Some variables may not be substituted:
23571 $ac_seen" >&2;}
23572     fi
23573   else
23574     cat $tmp/out
23575   fi
23576   rm -f $tmp/out
23577
23578 done
23579 EOF
23580 cat >>$CONFIG_STATUS <<\EOF
23581
23582 #
23583 # CONFIG_HEADER section.
23584 #
23585
23586 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23587 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23588 #
23589 # ac_d sets the value in "#define NAME VALUE" lines.
23590 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23591 ac_dB='[        ].*$,\1#\2'
23592 ac_dC=' '
23593 ac_dD=',;t'
23594 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23595 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23596 ac_iB='\([      ]\),\1#\2define\3'
23597 ac_iC=' '
23598 ac_iD='\4,;t'
23599 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23600 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23601 ac_uB='$,\1#\2define\3'
23602 ac_uC=' '
23603 ac_uD=',;t'
23604
23605 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23606   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23607   case $ac_file in
23608   - | *:- | *:-:* ) # input from stdin
23609         cat >$tmp/stdin
23610         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23611         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23612   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23613         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23614   * )   ac_file_in=$ac_file.in ;;
23615   esac
23616
23617   test x"$ac_file" != x- && { echo "$as_me:23617: creating $ac_file" >&5
23618 echo "$as_me: creating $ac_file" >&6;}
23619
23620   # First look for the input files in the build tree, otherwise in the
23621   # src tree.
23622   ac_file_inputs=`IFS=:
23623     for f in $ac_file_in; do
23624       case $f in
23625       -) echo $tmp/stdin ;;
23626       [\\/$]*)
23627          # Absolute (can't be DOS-style, as IFS=:)
23628          test -f "$f" || { { echo "$as_me:23628: error: cannot find input file: $f" >&5
23629 echo "$as_me: error: cannot find input file: $f" >&2;}
23630    { (exit 1); exit 1; }; }
23631          echo $f;;
23632       *) # Relative
23633          if test -f "$f"; then
23634            # Build tree
23635            echo $f
23636          elif test -f "$srcdir/$f"; then
23637            # Source tree
23638            echo $srcdir/$f
23639          else
23640            # /dev/null tree
23641            { { echo "$as_me:23641: error: cannot find input file: $f" >&5
23642 echo "$as_me: error: cannot find input file: $f" >&2;}
23643    { (exit 1); exit 1; }; }
23644          fi;;
23645       esac
23646     done` || { (exit 1); exit 1; }
23647   # Remove the trailing spaces.
23648   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23649
23650 EOF
23651
23652 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23653 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23654 # be either 'cat' or 'sort'.
23655 cat confdefs.h | uniq >conftest.vals
23656
23657 # Break up conftest.vals because some shells have a limit on
23658 # the size of here documents, and old seds have small limits too.
23659
23660 rm -f conftest.tail
23661 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23662 while grep . conftest.vals >/dev/null
23663 do
23664   # Write chunks of a limited-size here document to conftest.frag.
23665   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23666   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23667   echo 'CEOF' >> $CONFIG_STATUS
23668   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23669   rm -f conftest.vals
23670   mv conftest.tail conftest.vals
23671 done
23672 rm -f conftest.vals
23673
23674 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23675 # marker @DEFS@.
23676 echo '  cat >> conftest.edit <<CEOF
23677 /@DEFS@/r conftest.frag
23678 /@DEFS@/d
23679 CEOF
23680 sed -f conftest.edit $tmp/in > $tmp/out
23681 rm -f $tmp/in
23682 mv $tmp/out $tmp/in
23683 rm -f conftest.edit conftest.frag
23684 ' >> $CONFIG_STATUS
23685
23686 cat >>$CONFIG_STATUS <<\EOF
23687   # Let's still pretend it is `configure' which instantiates (i.e., don't
23688   # use $as_me), people would be surprised to read:
23689   #    /* config.h.  Generated automatically by config.status.  */
23690   if test x"$ac_file" = x-; then
23691     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23692   else
23693     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23694   fi
23695   cat $tmp/in >>$tmp/config.h
23696   rm -f $tmp/in
23697   if test x"$ac_file" != x-; then
23698     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23699       { echo "$as_me:23699: $ac_file is unchanged" >&5
23700 echo "$as_me: $ac_file is unchanged" >&6;}
23701     else
23702       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23703          X"$ac_file" : 'X\(//\)[^/]' \| \
23704          X"$ac_file" : 'X\(//\)$' \| \
23705          X"$ac_file" : 'X\(/\)' \| \
23706          .     : '\(.\)' 2>/dev/null ||
23707 echo X"$ac_file" |
23708     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23709           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23710           /^X\(\/\/\)$/{ s//\1/; q; }
23711           /^X\(\/\).*/{ s//\1/; q; }
23712           s/.*/./; q'`
23713       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23714         { case "$ac_dir" in
23715   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23716   *)                      as_incr_dir=.;;
23717 esac
23718 as_dummy="$ac_dir"
23719 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23720   case $as_mkdir_dir in
23721     # Skip DOS drivespec
23722     ?:) as_incr_dir=$as_mkdir_dir ;;
23723     *)
23724       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23725       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23726     ;;
23727   esac
23728 done; }
23729
23730       fi
23731       rm -f $ac_file
23732       mv $tmp/config.h $ac_file
23733     fi
23734   else
23735     cat $tmp/config.h
23736     rm -f $tmp/config.h
23737   fi
23738 done
23739 EOF
23740 cat >>$CONFIG_STATUS <<\EOF
23741 #
23742 # CONFIG_COMMANDS section.
23743 #
23744 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23745   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23746   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23747
23748   case $ac_dest in
23749     default )
23750 if test "x$cf_with_tests" != xno ; then
23751
23752 for cf_dir in test
23753 do
23754         if test ! -d $srcdir/$cf_dir; then
23755                 continue
23756         elif test -f $srcdir/$cf_dir/programs; then
23757                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23758         fi
23759 done
23760
23761 fi
23762
23763 cf_prefix=$LIB_PREFIX
23764
23765 case $cf_cv_shlib_version in
23766 (cygdll|msysdll|mingw)
23767         TINFO_NAME=$TINFO_ARG_SUFFIX
23768         TINFO_SUFFIX=.dll
23769         ;;
23770 esac
23771
23772 if test -n "$TINFO_SUFFIX" ; then
23773         case $TINFO_SUFFIX in
23774         (tw*)
23775                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23776                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23777                 ;;
23778         (t*)
23779                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23780                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23781                 ;;
23782         (w*)
23783                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23784                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23785                 ;;
23786         esac
23787 fi
23788
23789 for cf_dir in $SRC_SUBDIRS
23790 do
23791         if test ! -d $srcdir/$cf_dir ; then
23792                 continue
23793         elif test -f $srcdir/$cf_dir/modules; then
23794
23795                 SHARED_LIB=
23796                 Libs_To_Make=
23797                 cf_awk_program=
23798                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23799                 then
23800                         cf_awk_program="$cf_awk_program\
23801 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
23802 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
23803 "
23804                 fi
23805
23806                 if test "x$WILDCARD_SYMS" = xno
23807                 then
23808                         cf_awk_program="$cf_awk_program\
23809 /[      ]_\\*;/ { skip=1; next; }\
23810 "
23811                 fi
23812
23813                 if test "x$cf_awk_program" != "x"
23814                 then
23815                         cat >>$cf_dir/Makefile <<CF_EOF
23816
23817 # Generated by CF_LIB_RULES
23818 resulting.map: $UNALTERED_SYMS
23819         $AWK 'BEGIN { skip = 1; last=""; } \
23820 $cf_awk_program \
23821 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
23822  skip = 0; last = \$\$0; } \
23823 END { print last; }' < $UNALTERED_SYMS >\$@
23824
23825 distclean::
23826         rm -f resulting.map
23827 CF_EOF
23828                 fi
23829
23830                 for cf_item in $cf_LIST_MODELS
23831                 do
23832
23833         case X$cf_item in
23834         (Xlibtool)
23835                 cf_suffix='.la'
23836                 cf_depsuf=$cf_suffix
23837                 ;;
23838         (Xdebug)
23839                 cf_suffix='_g.a'
23840                 cf_depsuf=$cf_suffix
23841                 ;;
23842         (Xprofile)
23843                 cf_suffix='_p.a'
23844                 cf_depsuf=$cf_suffix
23845                 ;;
23846         (Xshared)
23847                 case $cf_cv_system_name in
23848                 (aix[5-7]*)
23849                         cf_suffix='.so'
23850                         cf_depsuf=$cf_suffix
23851                         ;;
23852                 (cygwin*|msys*|mingw*)
23853                         cf_suffix='.dll'
23854                         cf_depsuf='.dll.a'
23855                         ;;
23856                 (darwin*)
23857                         cf_suffix='.dylib'
23858                         cf_depsuf=$cf_suffix
23859                         ;;
23860                 (hpux*)
23861                         case $target in
23862                         (ia64*)
23863                                 cf_suffix='.so'
23864                                 cf_depsuf=$cf_suffix
23865                                 ;;
23866                         (*)
23867                                 cf_suffix='.sl'
23868                                 cf_depsuf=$cf_suffix
23869                                 ;;
23870                         esac
23871                         ;;
23872                 (*)
23873                         cf_suffix='.so'
23874                         cf_depsuf=$cf_suffix
23875                         ;;
23876                 esac
23877                 ;;
23878         (*)
23879                 cf_suffix='.a'
23880                 cf_depsuf=$cf_suffix
23881                 ;;
23882         esac
23883         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23884         then
23885                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23886                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23887         fi
23888
23889                         cf_libname=$cf_dir
23890                         test "$cf_dir" = c++ && cf_libname=ncurses++
23891                         if test $cf_item = shared ; then
23892                                 if test -n "${LIB_SUFFIX}"
23893                                 then
23894                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23895                                 else
23896                                         cf_shared_suffix="$cf_suffix"
23897                                 fi
23898                                 if test "$cf_cv_do_symlinks" = yes ; then
23899                                         cf_version_name=
23900
23901                                         case "$cf_cv_shlib_version" in
23902                                         (rel)
23903                                                 cf_version_name=REL_VERSION
23904                                                 ;;
23905                                         (abi)
23906                                                 cf_version_name=ABI_VERSION
23907                                                 ;;
23908                                         esac
23909
23910                                         if test -n "$cf_version_name"
23911                                         then
23912                                                 case "$cf_cv_system_name" in
23913                                                 (darwin*)
23914                                                         # "w", etc?
23915                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23916                                                         ;;
23917                                                 (*)
23918                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23919                                                         ;;
23920                                                 esac
23921                                         fi
23922                                         if test -n "${USE_LIB_SUFFIX}"
23923                                         then
23924                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23925                                         else
23926                                                 cf_shared_suffix="$cf_suffix"
23927                                         fi
23928                                 fi
23929                                 # cygwin needs import library, and has unique naming convention
23930                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23931                                 # use 'cyg' prefix for shared lib.
23932                                 case $cf_cv_shlib_version in
23933                                 (cygdll)
23934                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23935                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23936                                         ;;
23937                                 (msysdll)
23938                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23939                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23940                                         ;;
23941                                 (mingw)
23942                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23943                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23944                                         ;;
23945                                 (*)
23946                                         cf_add_lib=
23947                                         ;;
23948                                 esac
23949                                 if test -n "$cf_add_lib"
23950                                 then
23951                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23952                                         continue
23953                                 fi
23954                         fi
23955                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23956                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23957                 done
23958
23959                 if test $cf_dir = ncurses ; then
23960                         cf_subsets="$LIB_SUBSETS"
23961                         cf_r_parts="$cf_subsets"
23962                         cf_liblist="$Libs_To_Make"
23963
23964                         while test -n "$cf_r_parts"
23965                         do
23966                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23967                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23968                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23969                                         cf_add_lib=
23970                                         case $cf_l_parts in
23971                                         (*termlib*)
23972                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23973                                                 ;;
23974                                         (*ticlib*)
23975                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23976                                                 ;;
23977                                         (*)
23978                                                 break
23979                                                 ;;
23980                                         esac
23981                                         if test -n "$cf_add_lib"; then
23982                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23983                                         fi
23984                                 else
23985                                         break
23986                                 fi
23987                         done
23988                 else
23989                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23990                 fi
23991
23992                 if test $cf_dir = c++; then
23993                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23994                                 cf_list=
23995                                 for cf_item in $Libs_To_Make
23996                                 do
23997                                         case $cf_item in
23998                                         (*.a)
23999                                                 ;;
24000                                         (*)
24001                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24002                                                 ;;
24003                                         esac
24004                                         for cf_test in $cf_list
24005                                         do
24006                                                 if test "$cf_test" = "$cf_item"
24007                                                 then
24008                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24009                                                         cf_item=
24010                                                         break
24011                                                 fi
24012                                         done
24013                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24014                                 done
24015                                 Libs_To_Make="$cf_list"
24016                         fi
24017                 fi
24018
24019                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24020                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24021                         $cf_dir/Makefile >$cf_dir/Makefile.out
24022                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24023
24024                 $AWK -f $srcdir/mk-0th.awk \
24025                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24026                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24027
24028                 for cf_subset in $cf_subsets
24029                 do
24030                         cf_subdirs=
24031                         for cf_item in $cf_LIST_MODELS
24032                         do
24033
24034                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24035
24036 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24037
24038                         CXX_MODEL=$cf_ITEM
24039                         if test "$CXX_MODEL" = SHARED; then
24040                                 case $cf_cv_shlib_version in
24041                                 (cygdll|msysdll|mingw)
24042                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24043
24044 echo "${as_me:-configure}:24044: testing overriding CXX_MODEL to SHARED ..." 1>&5
24045
24046                                         with_shared_cxx=yes
24047                                         ;;
24048                                 (*)
24049                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24050                                         ;;
24051                                 esac
24052                         fi
24053
24054         case X$cf_item in
24055         (Xlibtool)
24056                 cf_suffix='.la'
24057                 cf_depsuf=$cf_suffix
24058                 ;;
24059         (Xdebug)
24060                 cf_suffix='_g.a'
24061                 cf_depsuf=$cf_suffix
24062                 ;;
24063         (Xprofile)
24064                 cf_suffix='_p.a'
24065                 cf_depsuf=$cf_suffix
24066                 ;;
24067         (Xshared)
24068                 case $cf_cv_system_name in
24069                 (aix[5-7]*)
24070                         cf_suffix='.so'
24071                         cf_depsuf=$cf_suffix
24072                         ;;
24073                 (cygwin*|msys*|mingw*)
24074                         cf_suffix='.dll'
24075                         cf_depsuf='.dll.a'
24076                         ;;
24077                 (darwin*)
24078                         cf_suffix='.dylib'
24079                         cf_depsuf=$cf_suffix
24080                         ;;
24081                 (hpux*)
24082                         case $target in
24083                         (ia64*)
24084                                 cf_suffix='.so'
24085                                 cf_depsuf=$cf_suffix
24086                                 ;;
24087                         (*)
24088                                 cf_suffix='.sl'
24089                                 cf_depsuf=$cf_suffix
24090                                 ;;
24091                         esac
24092                         ;;
24093                 (*)
24094                         cf_suffix='.so'
24095                         cf_depsuf=$cf_suffix
24096                         ;;
24097                 esac
24098                 ;;
24099         (*)
24100                 cf_suffix='.a'
24101                 cf_depsuf=$cf_suffix
24102                 ;;
24103         esac
24104         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24105         then
24106                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24107                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24108         fi
24109
24110         case $cf_item in
24111         (libtool) cf_subdir='obj_lo'  ;;
24112         (normal)  cf_subdir='objects' ;;
24113         (debug)   cf_subdir='obj_g' ;;
24114         (profile) cf_subdir='obj_p' ;;
24115         (shared)
24116                 case $cf_cv_system_name in
24117                 (cygwin|msys)
24118                         cf_subdir='objects' ;;
24119                 (*)
24120                         cf_subdir='obj_s' ;;
24121                 esac
24122         esac
24123
24124                         # Test for case where we build libtinfo with a different name.
24125                         cf_libname=$cf_dir
24126                         if test $cf_dir = ncurses ; then
24127                                 case $cf_subset in
24128                                 (*base*)
24129                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24130                                         ;;
24131                                 (*termlib*)
24132                                         cf_libname=$TINFO_LIB_SUFFIX
24133                                         ;;
24134                                 (ticlib*)
24135                                         cf_libname=$TICS_LIB_SUFFIX
24136                                         ;;
24137                                 esac
24138                         elif test $cf_dir = c++ ; then
24139                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24140                         else
24141                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24142                         fi
24143                         if test -n "${USE_ARG_SUFFIX}" ; then
24144                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24145                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24146                         fi
24147
24148                         # These dependencies really are for development, not
24149                         # builds, but they are useful in porting, too.
24150                         cf_depend="../include/ncurses_cfg.h"
24151                         if test "$srcdir" = "."; then
24152                                 cf_reldir="."
24153                         else
24154                                 cf_reldir="\${srcdir}"
24155                         fi
24156
24157                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24158                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24159                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24160                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24161                         fi
24162
24163                         cf_dir_suffix=
24164                         old_cf_suffix="$cf_suffix"
24165                         if test "$cf_cv_shlib_version_infix" = yes ; then
24166                         if test -n "$USE_LIB_SUFFIX" ; then
24167                                 case $USE_LIB_SUFFIX in
24168                                 (tw*)
24169                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24170                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24171                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24172                                         ;;
24173                                 (t*)
24174                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24175                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24176                                         cf_dir_suffix=t$EXTRA_SUFFIX
24177                                         ;;
24178                                 (w*)
24179                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24180                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24181                                         cf_dir_suffix=w$EXTRA_SUFFIX
24182                                         ;;
24183                                 (*)
24184                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24185                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24186                                         cf_dir_suffix=$EXTRA_SUFFIX
24187                                         ;;
24188                                 esac
24189                         fi
24190                         fi
24191
24192                         $AWK -f $srcdir/mk-1st.awk \
24193                                 name=${cf_libname}${cf_dir_suffix} \
24194                                 traces=$LIB_TRACING \
24195                                 MODEL=$cf_ITEM \
24196                                 CXX_MODEL=$CXX_MODEL \
24197                                 model=$cf_subdir \
24198                                 prefix=$cf_prefix \
24199                                 suffix=$cf_suffix \
24200                                 subset=$cf_subset \
24201                                 driver=$cf_cv_term_driver \
24202                                 SymLink="$LN_S" \
24203                                 TermlibRoot=$TINFO_NAME \
24204                                 TermlibSuffix=$TINFO_SUFFIX \
24205                                 ShlibVer=$cf_cv_shlib_version \
24206                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24207                                 ReLink=${cf_cv_do_relink:-no} \
24208                                 DoLinks=$cf_cv_do_symlinks \
24209                                 rmSoLocs=$cf_cv_rm_so_locs \
24210                                 ldconfig="$LDCONFIG" \
24211                                 overwrite=$WITH_OVERWRITE \
24212                                 depend="$cf_depend" \
24213                                 host="$host" \
24214                                 libtool_version="$LIBTOOL_VERSION" \
24215                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24216
24217                         cf_suffix="$old_cf_suffix"
24218
24219                         for cf_subdir2 in $cf_subdirs lib
24220                         do
24221                                 test $cf_subdir = $cf_subdir2 && break
24222                         done
24223                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24224                         $AWK -f $srcdir/mk-2nd.awk \
24225                                 name=$cf_dir \
24226                                 traces=$LIB_TRACING \
24227                                 MODEL=$cf_ITEM \
24228                                 model=$cf_subdir \
24229                                 subset=$cf_subset \
24230                                 srcdir=$srcdir \
24231                                 echo=$WITH_ECHO \
24232                                 crenames=$cf_cv_prog_CC_c_o \
24233                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24234                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24235                         cf_subdirs="$cf_subdirs $cf_subdir"
24236                         done
24237                 done
24238         fi
24239
24240         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24241 done
24242
24243 for cf_dir in $SRC_SUBDIRS
24244 do
24245         if test ! -d $srcdir/$cf_dir ; then
24246                 continue
24247         fi
24248
24249         if test -f $cf_dir/Makefile ; then
24250                 case "$cf_dir" in
24251                 (Ada95)
24252                         echo 'libs \' >> Makefile
24253                         echo 'install.libs \' >> Makefile
24254                         echo 'uninstall.libs ::' >> Makefile
24255                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24256                         ;;
24257                 esac
24258         fi
24259
24260         if test -f $srcdir/$cf_dir/modules; then
24261                 echo >> Makefile
24262                 if test -f $srcdir/$cf_dir/headers; then
24263 cat >> Makefile <<CF_EOF
24264 install.includes \\
24265 uninstall.includes \\
24266 CF_EOF
24267                 fi
24268 if test "$cf_dir" != "c++" ; then
24269 echo 'lint \' >> Makefile
24270 fi
24271 cat >> Makefile <<CF_EOF
24272 libs \\
24273 lintlib \\
24274 install.libs \\
24275 uninstall.libs \\
24276 install.$cf_dir \\
24277 uninstall.$cf_dir ::
24278         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24279 CF_EOF
24280         elif test -f $srcdir/$cf_dir/headers; then
24281 cat >> Makefile <<CF_EOF
24282
24283 libs \\
24284 install.libs \\
24285 uninstall.libs \\
24286 install.includes \\
24287 uninstall.includes ::
24288         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24289 CF_EOF
24290 fi
24291 done
24292
24293 if test "x$cf_with_db_install" = xyes; then
24294 cat >> Makefile <<CF_EOF
24295
24296 install.libs uninstall.libs \\
24297 install.data uninstall.data ::
24298 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24299 CF_EOF
24300 else
24301 cat >> Makefile <<CF_EOF
24302
24303 install.libs uninstall.libs ::
24304         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24305 CF_EOF
24306 fi
24307
24308 if test "x$cf_with_manpages" = xyes; then
24309 cat >> Makefile <<CF_EOF
24310
24311 install.man \\
24312 uninstall.man ::
24313         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24314 CF_EOF
24315 fi
24316
24317 cat >> Makefile <<CF_EOF
24318
24319 distclean ::
24320         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24321         rm -f headers.sh headers.sed mk_shared_lib.sh
24322         rm -f edit_man.* man_alias.*
24323         rm -rf \${DIRS_TO_MAKE}
24324 CF_EOF
24325
24326 # Special case: tack's manpage lives in its own directory.
24327 if test "x$cf_with_manpages" = xyes; then
24328 if test -d tack ; then
24329 if test -f $srcdir/$tack.h; then
24330 cat >> Makefile <<CF_EOF
24331
24332 install.man \\
24333 uninstall.man ::
24334         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24335 CF_EOF
24336 fi
24337 fi
24338 fi
24339
24340 rm -f headers.sed headers.sh
24341
24342 echo creating headers.sh
24343 cat >headers.sh <<CF_EOF
24344 #! $SHELL
24345 # This shell script is generated by the 'configure' script.  It is invoked in a
24346 # subdirectory of the build tree.  It generates a sed-script in the parent
24347 # directory that is used to adjust includes for header files that reside in a
24348 # subdirectory of /usr/include, etc.
24349 PRG=""
24350 while test \$# != 3
24351 do
24352 PRG="\$PRG \$1"; shift
24353 done
24354 DST=\$1
24355 REF=\$2
24356 SRC=\$3
24357 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24358 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24359 echo installing \$SRC in \$DST
24360 CF_EOF
24361
24362 if test $WITH_CURSES_H = yes; then
24363         cat >>headers.sh <<CF_EOF
24364 case \$DST in
24365 (/*/include/*)
24366         END=\`basename \$DST\`
24367         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24368         do
24369                 NAME=\`basename \$i\`
24370                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24371         done
24372         ;;
24373 (*)
24374         echo "" >> \$TMPSED
24375         ;;
24376 esac
24377 CF_EOF
24378
24379 else
24380         cat >>headers.sh <<CF_EOF
24381 case \$DST in
24382 (/*/include/*)
24383         END=\`basename \$DST\`
24384         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24385         do
24386                 NAME=\`basename \$i\`
24387                 if test "\$NAME" = "curses.h"
24388                 then
24389                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24390                         NAME=ncurses.h
24391                 fi
24392                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24393         done
24394         ;;
24395 (*)
24396         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24397         ;;
24398 esac
24399 CF_EOF
24400 fi
24401 cat >>headers.sh <<CF_EOF
24402 rm -f \$TMPSRC
24403 sed -f \$TMPSED \$SRC > \$TMPSRC
24404 NAME=\`basename \$SRC\`
24405 CF_EOF
24406 if test $WITH_CURSES_H != yes; then
24407         cat >>headers.sh <<CF_EOF
24408 test "\$NAME" = "curses.h" && NAME=ncurses.h
24409 CF_EOF
24410 fi
24411 cat >>headers.sh <<CF_EOF
24412 # Just in case someone gzip'd manpages, remove the conflicting copy.
24413 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24414
24415 eval \$PRG \$TMPSRC \$DST/\$NAME
24416 rm -f \$TMPSRC \$TMPSED
24417 CF_EOF
24418
24419 chmod 0755 headers.sh
24420
24421 for cf_dir in $SRC_SUBDIRS
24422 do
24423         if test ! -d $srcdir/$cf_dir ; then
24424                 continue
24425         fi
24426
24427         if test -f $srcdir/$cf_dir/headers; then
24428                 $AWK -f $srcdir/mk-hdr.awk \
24429                         subset="$LIB_SUBSETS" \
24430                         compat="$WITH_CURSES_H" \
24431                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24432         fi
24433
24434         if test -f $srcdir/$cf_dir/modules; then
24435                 if test "$cf_dir" != "c++" ; then
24436                         cat >>$cf_dir/Makefile <<"CF_EOF"
24437 depend : ${AUTO_SRC}
24438         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24439
24440 # DO NOT DELETE THIS LINE -- make depend depends on it.
24441 CF_EOF
24442                 fi
24443         fi
24444 done
24445
24446 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24447 if test -z "$USE_OLD_MAKERULES" ; then
24448         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24449 fi
24450 fi
24451  ;;
24452   esac
24453 done
24454 EOF
24455
24456 cat >>$CONFIG_STATUS <<\EOF
24457
24458 { (exit 0); exit 0; }
24459 EOF
24460 chmod +x $CONFIG_STATUS
24461 ac_clean_files=$ac_clean_files_save
24462
24463 # configure is writing to config.log, and then calls config.status.
24464 # config.status does its own redirection, appending to config.log.
24465 # Unfortunately, on DOS this fails, as config.log is still kept open
24466 # by configure, so config.status won't be able to write to it; its
24467 # output is simply discarded.  So we exec the FD to /dev/null,
24468 # effectively closing config.log, so it can be properly (re)opened and
24469 # appended to by config.status.  When coming back to configure, we
24470 # need to make the FD available again.
24471 if test "$no_create" != yes; then
24472   ac_cs_success=:
24473   exec 5>/dev/null
24474   $SHELL $CONFIG_STATUS || ac_cs_success=false
24475   exec 5>>config.log
24476   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24477   # would make configure fail if this is the last instruction.
24478   $ac_cs_success || { (exit 1); exit 1; }
24479 fi
24480 ${MAKE:-make} preinstall