]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
3f23ef7104734cc7db6a25711b207855f8b61701
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.622 .
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)
5870         LD_RPATH_OPT="-Wl,-rpath,"
5871         ;;
5872 (openbsd[2-9].*|mirbsd*)
5873         LD_RPATH_OPT="-Wl,-rpath,"
5874         ;;
5875 (dragonfly*|freebsd*)
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 if test "x$with_widec" = xyes ; then
9246         if test "x$disable_lib_suffixes" = xno ; then
9247                 LIB_SUFFIX="w${LIB_SUFFIX}"
9248         fi
9249
9250 cat >>confdefs.h <<\EOF
9251 #define USE_WIDEC_SUPPORT 1
9252 EOF
9253
9254 cat >>confdefs.h <<\EOF
9255 #define NCURSES_WIDECHAR 1
9256 EOF
9257
9258 echo "$as_me:9258: checking if wchar.h can be used as is" >&5
9259 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9260 if test "${cf_cv_wchar_h_okay+set}" = set; then
9261   echo $ECHO_N "(cached) $ECHO_C" >&6
9262 else
9263
9264 cat >conftest.$ac_ext <<_ACEOF
9265 #line 9265 "configure"
9266 #include "confdefs.h"
9267
9268 #include <stdlib.h>
9269 #include <wchar.h>
9270
9271 int
9272 main ()
9273 {
9274
9275         wint_t foo = 0;
9276         int bar = iswpunct(foo)
9277   ;
9278   return 0;
9279 }
9280 _ACEOF
9281 rm -f conftest.$ac_objext
9282 if { (eval echo "$as_me:9282: \"$ac_compile\"") >&5
9283   (eval $ac_compile) 2>&5
9284   ac_status=$?
9285   echo "$as_me:9285: \$? = $ac_status" >&5
9286   (exit $ac_status); } &&
9287          { ac_try='test -s conftest.$ac_objext'
9288   { (eval echo "$as_me:9288: \"$ac_try\"") >&5
9289   (eval $ac_try) 2>&5
9290   ac_status=$?
9291   echo "$as_me:9291: \$? = $ac_status" >&5
9292   (exit $ac_status); }; }; then
9293   cf_cv_wchar_h_okay=yes
9294 else
9295   echo "$as_me: failed program was:" >&5
9296 cat conftest.$ac_ext >&5
9297 cf_cv_wchar_h_okay=no
9298 fi
9299 rm -f conftest.$ac_objext conftest.$ac_ext
9300 fi
9301 echo "$as_me:9301: result: $cf_cv_wchar_h_okay" >&5
9302 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9303
9304 if test $cf_cv_wchar_h_okay = no
9305 then
9306
9307 echo "$as_me:9307: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9308 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9309 cat >conftest.$ac_ext <<_ACEOF
9310 #line 9310 "configure"
9311 #include "confdefs.h"
9312 #include <sys/types.h>
9313
9314 int
9315 main ()
9316 {
9317
9318 #ifndef _XOPEN_SOURCE_EXTENDED
9319 make an error
9320 #endif
9321   ;
9322   return 0;
9323 }
9324 _ACEOF
9325 rm -f conftest.$ac_objext
9326 if { (eval echo "$as_me:9326: \"$ac_compile\"") >&5
9327   (eval $ac_compile) 2>&5
9328   ac_status=$?
9329   echo "$as_me:9329: \$? = $ac_status" >&5
9330   (exit $ac_status); } &&
9331          { ac_try='test -s conftest.$ac_objext'
9332   { (eval echo "$as_me:9332: \"$ac_try\"") >&5
9333   (eval $ac_try) 2>&5
9334   ac_status=$?
9335   echo "$as_me:9335: \$? = $ac_status" >&5
9336   (exit $ac_status); }; }; then
9337   cf_result=no
9338 else
9339   echo "$as_me: failed program was:" >&5
9340 cat conftest.$ac_ext >&5
9341 cf_result=yes
9342 fi
9343 rm -f conftest.$ac_objext conftest.$ac_ext
9344 echo "$as_me:9344: result: $cf_result" >&5
9345 echo "${ECHO_T}$cf_result" >&6
9346
9347 if test "$cf_result" = yes ; then
9348         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9349 elif test "x" != "x" ; then
9350         echo "$as_me:9350: checking checking for compatible value versus " >&5
9351 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9352         cat >conftest.$ac_ext <<_ACEOF
9353 #line 9353 "configure"
9354 #include "confdefs.h"
9355 #include <sys/types.h>
9356
9357 int
9358 main ()
9359 {
9360
9361 #if _XOPEN_SOURCE_EXTENDED- < 0
9362 make an error
9363 #endif
9364   ;
9365   return 0;
9366 }
9367 _ACEOF
9368 rm -f conftest.$ac_objext
9369 if { (eval echo "$as_me:9369: \"$ac_compile\"") >&5
9370   (eval $ac_compile) 2>&5
9371   ac_status=$?
9372   echo "$as_me:9372: \$? = $ac_status" >&5
9373   (exit $ac_status); } &&
9374          { ac_try='test -s conftest.$ac_objext'
9375   { (eval echo "$as_me:9375: \"$ac_try\"") >&5
9376   (eval $ac_try) 2>&5
9377   ac_status=$?
9378   echo "$as_me:9378: \$? = $ac_status" >&5
9379   (exit $ac_status); }; }; then
9380   cf_result=yes
9381 else
9382   echo "$as_me: failed program was:" >&5
9383 cat conftest.$ac_ext >&5
9384 cf_result=no
9385 fi
9386 rm -f conftest.$ac_objext conftest.$ac_ext
9387         echo "$as_me:9387: result: $cf_result" >&5
9388 echo "${ECHO_T}$cf_result" >&6
9389         if test "$cf_result" = no ; then
9390                 # perhaps we can override it - try...
9391                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9392         fi
9393 fi
9394
9395 fi
9396
9397         # with_overwrite=no
9398         NCURSES_CH_T=cchar_t
9399
9400 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9401 do
9402 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9403 echo "$as_me:9403: checking for $ac_func" >&5
9404 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9405 if eval "test \"\${$as_ac_var+set}\" = set"; then
9406   echo $ECHO_N "(cached) $ECHO_C" >&6
9407 else
9408   cat >conftest.$ac_ext <<_ACEOF
9409 #line 9409 "configure"
9410 #include "confdefs.h"
9411 /* System header to define __stub macros and hopefully few prototypes,
9412     which can conflict with char $ac_func (); below.  */
9413 #include <assert.h>
9414 /* Override any gcc2 internal prototype to avoid an error.  */
9415 #ifdef __cplusplus
9416 extern "C"
9417 #endif
9418 /* We use char because int might match the return type of a gcc2
9419    builtin and then its argument prototype would still apply.  */
9420 char $ac_func ();
9421 char (*f) ();
9422
9423 int
9424 main ()
9425 {
9426 /* The GNU C library defines this for functions which it implements
9427     to always fail with ENOSYS.  Some functions are actually named
9428     something starting with __ and the normal name is an alias.  */
9429 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9430 choke me
9431 #else
9432 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9433 #endif
9434
9435   ;
9436   return 0;
9437 }
9438 _ACEOF
9439 rm -f conftest.$ac_objext conftest$ac_exeext
9440 if { (eval echo "$as_me:9440: \"$ac_link\"") >&5
9441   (eval $ac_link) 2>&5
9442   ac_status=$?
9443   echo "$as_me:9443: \$? = $ac_status" >&5
9444   (exit $ac_status); } &&
9445          { ac_try='test -s conftest$ac_exeext'
9446   { (eval echo "$as_me:9446: \"$ac_try\"") >&5
9447   (eval $ac_try) 2>&5
9448   ac_status=$?
9449   echo "$as_me:9449: \$? = $ac_status" >&5
9450   (exit $ac_status); }; }; then
9451   eval "$as_ac_var=yes"
9452 else
9453   echo "$as_me: failed program was:" >&5
9454 cat conftest.$ac_ext >&5
9455 eval "$as_ac_var=no"
9456 fi
9457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9458 fi
9459 echo "$as_me:9459: result: `eval echo '${'$as_ac_var'}'`" >&5
9460 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9461 if test `eval echo '${'$as_ac_var'}'` = yes; then
9462   cat >>confdefs.h <<EOF
9463 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9464 EOF
9465
9466 fi
9467 done
9468
9469         if test "x$ac_cv_func_putwc" != xyes ; then
9470
9471 echo "$as_me:9471: checking for multibyte character support" >&5
9472 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9473 if test "${cf_cv_utf8_lib+set}" = set; then
9474   echo $ECHO_N "(cached) $ECHO_C" >&6
9475 else
9476
9477         cf_save_LIBS="$LIBS"
9478         cat >conftest.$ac_ext <<_ACEOF
9479 #line 9479 "configure"
9480 #include "confdefs.h"
9481
9482 #include <stdlib.h>
9483 int
9484 main ()
9485 {
9486 putwc(0,0);
9487   ;
9488   return 0;
9489 }
9490 _ACEOF
9491 rm -f conftest.$ac_objext conftest$ac_exeext
9492 if { (eval echo "$as_me:9492: \"$ac_link\"") >&5
9493   (eval $ac_link) 2>&5
9494   ac_status=$?
9495   echo "$as_me:9495: \$? = $ac_status" >&5
9496   (exit $ac_status); } &&
9497          { ac_try='test -s conftest$ac_exeext'
9498   { (eval echo "$as_me:9498: \"$ac_try\"") >&5
9499   (eval $ac_try) 2>&5
9500   ac_status=$?
9501   echo "$as_me:9501: \$? = $ac_status" >&5
9502   (exit $ac_status); }; }; then
9503   cf_cv_utf8_lib=yes
9504 else
9505   echo "$as_me: failed program was:" >&5
9506 cat conftest.$ac_ext >&5
9507
9508 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9509 # will be set on completion of the AC_TRY_LINK below.
9510 cf_cv_header_path_utf8=
9511 cf_cv_library_path_utf8=
9512
9513 echo "${as_me:-configure}:9513: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9514
9515 cf_save_LIBS="$LIBS"
9516
9517 cat >conftest.$ac_ext <<_ACEOF
9518 #line 9518 "configure"
9519 #include "confdefs.h"
9520
9521 #include <libutf8.h>
9522 int
9523 main ()
9524 {
9525 putwc(0,0);
9526   ;
9527   return 0;
9528 }
9529 _ACEOF
9530 rm -f conftest.$ac_objext conftest$ac_exeext
9531 if { (eval echo "$as_me:9531: \"$ac_link\"") >&5
9532   (eval $ac_link) 2>&5
9533   ac_status=$?
9534   echo "$as_me:9534: \$? = $ac_status" >&5
9535   (exit $ac_status); } &&
9536          { ac_try='test -s conftest$ac_exeext'
9537   { (eval echo "$as_me:9537: \"$ac_try\"") >&5
9538   (eval $ac_try) 2>&5
9539   ac_status=$?
9540   echo "$as_me:9540: \$? = $ac_status" >&5
9541   (exit $ac_status); }; }; then
9542
9543         cf_cv_find_linkage_utf8=yes
9544         cf_cv_header_path_utf8=/usr/include
9545         cf_cv_library_path_utf8=/usr/lib
9546
9547 else
9548   echo "$as_me: failed program was:" >&5
9549 cat conftest.$ac_ext >&5
9550
9551 LIBS="-lutf8  $cf_save_LIBS"
9552
9553 cat >conftest.$ac_ext <<_ACEOF
9554 #line 9554 "configure"
9555 #include "confdefs.h"
9556
9557 #include <libutf8.h>
9558 int
9559 main ()
9560 {
9561 putwc(0,0);
9562   ;
9563   return 0;
9564 }
9565 _ACEOF
9566 rm -f conftest.$ac_objext conftest$ac_exeext
9567 if { (eval echo "$as_me:9567: \"$ac_link\"") >&5
9568   (eval $ac_link) 2>&5
9569   ac_status=$?
9570   echo "$as_me:9570: \$? = $ac_status" >&5
9571   (exit $ac_status); } &&
9572          { ac_try='test -s conftest$ac_exeext'
9573   { (eval echo "$as_me:9573: \"$ac_try\"") >&5
9574   (eval $ac_try) 2>&5
9575   ac_status=$?
9576   echo "$as_me:9576: \$? = $ac_status" >&5
9577   (exit $ac_status); }; }; then
9578
9579         cf_cv_find_linkage_utf8=yes
9580         cf_cv_header_path_utf8=/usr/include
9581         cf_cv_library_path_utf8=/usr/lib
9582         cf_cv_library_file_utf8="-lutf8"
9583
9584 else
9585   echo "$as_me: failed program was:" >&5
9586 cat conftest.$ac_ext >&5
9587
9588         cf_cv_find_linkage_utf8=no
9589         LIBS="$cf_save_LIBS"
9590
9591         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9592
9593 echo "${as_me:-configure}:9593: testing find linkage for utf8 library ..." 1>&5
9594
9595 echo "${as_me:-configure}:9595: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9596
9597         cf_save_CPPFLAGS="$CPPFLAGS"
9598         cf_test_CPPFLAGS="$CPPFLAGS"
9599
9600 cf_search=
9601
9602 # collect the current set of include-directories from compiler flags
9603 cf_header_path_list=""
9604 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9605         for cf_header_path in $CPPFLAGS $CFLAGS
9606         do
9607                 case $cf_header_path in
9608                 (-I*)
9609                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9610
9611 test "x$cf_header_path" != "xNONE" && \
9612 test -d "$cf_header_path" && \
9613  {
9614         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9615         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9616         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9617         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9618         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9619         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9620 }
9621
9622                         cf_header_path_list="$cf_header_path_list $cf_search"
9623                         ;;
9624                 esac
9625         done
9626 fi
9627
9628 # add the variations for the package we are looking for
9629
9630 cf_search=
9631
9632 test "x$prefix" != "xNONE" && \
9633 test -d "$prefix" && \
9634  {
9635         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9636         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9637         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9638         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9639         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9640         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9641 }
9642
9643 for cf_subdir_prefix in \
9644         /usr \
9645         /usr/local \
9646         /usr/pkg \
9647         /opt \
9648         /opt/local \
9649         $HOME
9650 do
9651
9652 test "x$cf_subdir_prefix" != "x$prefix" && \
9653 test -d "$cf_subdir_prefix" && \
9654 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9655         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9656         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9657         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9658         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9659         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9660         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9661 }
9662
9663 done
9664
9665 test "$includedir" != NONE && \
9666 test "$includedir" != "/usr/include" && \
9667 test -d "$includedir" && {
9668         test -d $includedir &&    cf_search="$cf_search $includedir"
9669         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9670 }
9671
9672 test "$oldincludedir" != NONE && \
9673 test "$oldincludedir" != "/usr/include" && \
9674 test -d "$oldincludedir" && {
9675         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9676         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9677 }
9678
9679 cf_search="$cf_search $cf_header_path_list"
9680
9681         for cf_cv_header_path_utf8 in $cf_search
9682         do
9683                 if test -d $cf_cv_header_path_utf8 ; then
9684                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9685
9686 echo "${as_me:-configure}:9686: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9687
9688                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9689                         cat >conftest.$ac_ext <<_ACEOF
9690 #line 9690 "configure"
9691 #include "confdefs.h"
9692
9693 #include <libutf8.h>
9694 int
9695 main ()
9696 {
9697 putwc(0,0);
9698   ;
9699   return 0;
9700 }
9701 _ACEOF
9702 rm -f conftest.$ac_objext
9703 if { (eval echo "$as_me:9703: \"$ac_compile\"") >&5
9704   (eval $ac_compile) 2>&5
9705   ac_status=$?
9706   echo "$as_me:9706: \$? = $ac_status" >&5
9707   (exit $ac_status); } &&
9708          { ac_try='test -s conftest.$ac_objext'
9709   { (eval echo "$as_me:9709: \"$ac_try\"") >&5
9710   (eval $ac_try) 2>&5
9711   ac_status=$?
9712   echo "$as_me:9712: \$? = $ac_status" >&5
9713   (exit $ac_status); }; }; then
9714
9715                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9716
9717 echo "${as_me:-configure}:9717: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9718
9719                                 cf_cv_find_linkage_utf8=maybe
9720                                 cf_test_CPPFLAGS="$CPPFLAGS"
9721                                 break
9722 else
9723   echo "$as_me: failed program was:" >&5
9724 cat conftest.$ac_ext >&5
9725
9726                                 CPPFLAGS="$cf_save_CPPFLAGS"
9727
9728 fi
9729 rm -f conftest.$ac_objext conftest.$ac_ext
9730                 fi
9731         done
9732
9733         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9734
9735 echo "${as_me:-configure}:9735: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9736
9737                 cf_save_LIBS="$LIBS"
9738                 cf_save_LDFLAGS="$LDFLAGS"
9739
9740                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9741
9742 cf_search=
9743 cf_library_path_list=""
9744 if test -n "${LDFLAGS}${LIBS}" ; then
9745         for cf_library_path in $LDFLAGS $LIBS
9746         do
9747                 case $cf_library_path in
9748                 (-L*)
9749                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9750
9751 test "x$cf_library_path" != "xNONE" && \
9752 test -d "$cf_library_path" && \
9753  {
9754         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9755         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9756         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9757         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9758         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9759         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9760 }
9761
9762                         cf_library_path_list="$cf_library_path_list $cf_search"
9763                         ;;
9764                 esac
9765         done
9766 fi
9767
9768 cf_search=
9769
9770 test "x$prefix" != "xNONE" && \
9771 test -d "$prefix" && \
9772  {
9773         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9774         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9775         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9776         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9777         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9778         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9779 }
9780
9781 for cf_subdir_prefix in \
9782         /usr \
9783         /usr/local \
9784         /usr/pkg \
9785         /opt \
9786         /opt/local \
9787         $HOME
9788 do
9789
9790 test "x$cf_subdir_prefix" != "x$prefix" && \
9791 test -d "$cf_subdir_prefix" && \
9792 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9793         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9794         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9795         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9796         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9797         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9798         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9799 }
9800
9801 done
9802
9803 cf_search="$cf_library_path_list $cf_search"
9804
9805                         for cf_cv_library_path_utf8 in $cf_search
9806                         do
9807                                 if test -d $cf_cv_library_path_utf8 ; then
9808                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9809
9810 echo "${as_me:-configure}:9810: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9811
9812                                         CPPFLAGS="$cf_test_CPPFLAGS"
9813                                         LIBS="-lutf8  $cf_save_LIBS"
9814                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9815                                         cat >conftest.$ac_ext <<_ACEOF
9816 #line 9816 "configure"
9817 #include "confdefs.h"
9818
9819 #include <libutf8.h>
9820 int
9821 main ()
9822 {
9823 putwc(0,0);
9824   ;
9825   return 0;
9826 }
9827 _ACEOF
9828 rm -f conftest.$ac_objext conftest$ac_exeext
9829 if { (eval echo "$as_me:9829: \"$ac_link\"") >&5
9830   (eval $ac_link) 2>&5
9831   ac_status=$?
9832   echo "$as_me:9832: \$? = $ac_status" >&5
9833   (exit $ac_status); } &&
9834          { ac_try='test -s conftest$ac_exeext'
9835   { (eval echo "$as_me:9835: \"$ac_try\"") >&5
9836   (eval $ac_try) 2>&5
9837   ac_status=$?
9838   echo "$as_me:9838: \$? = $ac_status" >&5
9839   (exit $ac_status); }; }; then
9840
9841                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9842
9843 echo "${as_me:-configure}:9843: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9844
9845                                         cf_cv_find_linkage_utf8=yes
9846                                         cf_cv_library_file_utf8="-lutf8"
9847                                         break
9848 else
9849   echo "$as_me: failed program was:" >&5
9850 cat conftest.$ac_ext >&5
9851
9852                                         CPPFLAGS="$cf_save_CPPFLAGS"
9853                                         LIBS="$cf_save_LIBS"
9854                                         LDFLAGS="$cf_save_LDFLAGS"
9855
9856 fi
9857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9858                                 fi
9859                         done
9860                         CPPFLAGS="$cf_save_CPPFLAGS"
9861                         LDFLAGS="$cf_save_LDFLAGS"
9862                 fi
9863
9864         else
9865                 cf_cv_find_linkage_utf8=no
9866         fi
9867
9868 fi
9869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9870
9871 fi
9872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9873
9874 LIBS="$cf_save_LIBS"
9875
9876 if test "$cf_cv_find_linkage_utf8" = yes ; then
9877 cf_cv_utf8_lib=add-on
9878 else
9879 cf_cv_utf8_lib=no
9880 fi
9881
9882 fi
9883 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9884 fi
9885 echo "$as_me:9885: result: $cf_cv_utf8_lib" >&5
9886 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9887
9888 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9889 # ncurses/ncursesw:
9890 if test "$cf_cv_utf8_lib" = "add-on" ; then
9891
9892 cat >>confdefs.h <<\EOF
9893 #define HAVE_LIBUTF8_H 1
9894 EOF
9895
9896 if test -n "$cf_cv_header_path_utf8" ; then
9897   for cf_add_incdir in $cf_cv_header_path_utf8
9898   do
9899         while test $cf_add_incdir != /usr/include
9900         do
9901           if test -d $cf_add_incdir
9902           then
9903                 cf_have_incdir=no
9904                 if test -n "$CFLAGS$CPPFLAGS" ; then
9905                   # a loop is needed to ensure we can add subdirs of existing dirs
9906                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9907                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9908                           cf_have_incdir=yes; break
9909                         fi
9910                   done
9911                 fi
9912
9913                 if test "$cf_have_incdir" = no ; then
9914                   if test "$cf_add_incdir" = /usr/local/include ; then
9915                         if test "$GCC" = yes
9916                         then
9917                           cf_save_CPPFLAGS=$CPPFLAGS
9918                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9919                           cat >conftest.$ac_ext <<_ACEOF
9920 #line 9920 "configure"
9921 #include "confdefs.h"
9922 #include <stdio.h>
9923 int
9924 main ()
9925 {
9926 printf("Hello")
9927   ;
9928   return 0;
9929 }
9930 _ACEOF
9931 rm -f conftest.$ac_objext
9932 if { (eval echo "$as_me:9932: \"$ac_compile\"") >&5
9933   (eval $ac_compile) 2>&5
9934   ac_status=$?
9935   echo "$as_me:9935: \$? = $ac_status" >&5
9936   (exit $ac_status); } &&
9937          { ac_try='test -s conftest.$ac_objext'
9938   { (eval echo "$as_me:9938: \"$ac_try\"") >&5
9939   (eval $ac_try) 2>&5
9940   ac_status=$?
9941   echo "$as_me:9941: \$? = $ac_status" >&5
9942   (exit $ac_status); }; }; then
9943   :
9944 else
9945   echo "$as_me: failed program was:" >&5
9946 cat conftest.$ac_ext >&5
9947 cf_have_incdir=yes
9948 fi
9949 rm -f conftest.$ac_objext conftest.$ac_ext
9950                           CPPFLAGS=$cf_save_CPPFLAGS
9951                         fi
9952                   fi
9953                 fi
9954
9955                 if test "$cf_have_incdir" = no ; then
9956                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9957
9958 echo "${as_me:-configure}:9958: testing adding $cf_add_incdir to include-path ..." 1>&5
9959
9960                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9961
9962                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9963                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9964                   cf_add_incdir="$cf_top_incdir"
9965                 else
9966                   break
9967                 fi
9968           else
9969                 break
9970           fi
9971         done
9972   done
9973 fi
9974
9975 if test -n "$cf_cv_library_path_utf8" ; then
9976         for cf_add_libdir in $cf_cv_library_path_utf8
9977         do
9978                 if test $cf_add_libdir = /usr/lib ; then
9979                         :
9980                 elif test -d $cf_add_libdir
9981                 then
9982                         cf_have_libdir=no
9983                         if test -n "$LDFLAGS$LIBS" ; then
9984                                 # a loop is needed to ensure we can add subdirs of existing dirs
9985                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9986                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9987                                                 cf_have_libdir=yes; break
9988                                         fi
9989                                 done
9990                         fi
9991                         if test "$cf_have_libdir" = no ; then
9992                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9993
9994 echo "${as_me:-configure}:9994: testing adding $cf_add_libdir to library-path ..." 1>&5
9995
9996                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9997                         fi
9998                 fi
9999         done
10000 fi
10001
10002 cf_add_libs="$cf_cv_library_file_utf8"
10003 # Filter out duplicates - this happens with badly-designed ".pc" files...
10004 for cf_add_1lib in $LIBS
10005 do
10006         for cf_add_2lib in $cf_add_libs
10007         do
10008                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10009                 then
10010                         cf_add_1lib=
10011                         break
10012                 fi
10013         done
10014         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10015 done
10016 LIBS="$cf_add_libs"
10017
10018 fi
10019
10020                 if test "$cf_cv_utf8_lib" != no ; then
10021                         NCURSES_LIBUTF8=1
10022                 fi
10023         fi
10024
10025 # This is needed on Tru64 5.0 to declare mbstate_t
10026 echo "$as_me:10026: checking if we must include wchar.h to declare mbstate_t" >&5
10027 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10028 if test "${cf_cv_mbstate_t+set}" = set; then
10029   echo $ECHO_N "(cached) $ECHO_C" >&6
10030 else
10031
10032 cat >conftest.$ac_ext <<_ACEOF
10033 #line 10033 "configure"
10034 #include "confdefs.h"
10035
10036 #include <stdlib.h>
10037 #include <stdarg.h>
10038 #include <stdio.h>
10039 #ifdef HAVE_LIBUTF8_H
10040 #include <libutf8.h>
10041 #endif
10042 int
10043 main ()
10044 {
10045 mbstate_t state
10046   ;
10047   return 0;
10048 }
10049 _ACEOF
10050 rm -f conftest.$ac_objext
10051 if { (eval echo "$as_me:10051: \"$ac_compile\"") >&5
10052   (eval $ac_compile) 2>&5
10053   ac_status=$?
10054   echo "$as_me:10054: \$? = $ac_status" >&5
10055   (exit $ac_status); } &&
10056          { ac_try='test -s conftest.$ac_objext'
10057   { (eval echo "$as_me:10057: \"$ac_try\"") >&5
10058   (eval $ac_try) 2>&5
10059   ac_status=$?
10060   echo "$as_me:10060: \$? = $ac_status" >&5
10061   (exit $ac_status); }; }; then
10062   cf_cv_mbstate_t=no
10063 else
10064   echo "$as_me: failed program was:" >&5
10065 cat conftest.$ac_ext >&5
10066 cat >conftest.$ac_ext <<_ACEOF
10067 #line 10067 "configure"
10068 #include "confdefs.h"
10069
10070 #include <stdlib.h>
10071 #include <stdarg.h>
10072 #include <stdio.h>
10073 #include <wchar.h>
10074 #ifdef HAVE_LIBUTF8_H
10075 #include <libutf8.h>
10076 #endif
10077 int
10078 main ()
10079 {
10080 mbstate_t value
10081   ;
10082   return 0;
10083 }
10084 _ACEOF
10085 rm -f conftest.$ac_objext
10086 if { (eval echo "$as_me:10086: \"$ac_compile\"") >&5
10087   (eval $ac_compile) 2>&5
10088   ac_status=$?
10089   echo "$as_me:10089: \$? = $ac_status" >&5
10090   (exit $ac_status); } &&
10091          { ac_try='test -s conftest.$ac_objext'
10092   { (eval echo "$as_me:10092: \"$ac_try\"") >&5
10093   (eval $ac_try) 2>&5
10094   ac_status=$?
10095   echo "$as_me:10095: \$? = $ac_status" >&5
10096   (exit $ac_status); }; }; then
10097   cf_cv_mbstate_t=yes
10098 else
10099   echo "$as_me: failed program was:" >&5
10100 cat conftest.$ac_ext >&5
10101 cf_cv_mbstate_t=unknown
10102 fi
10103 rm -f conftest.$ac_objext conftest.$ac_ext
10104 fi
10105 rm -f conftest.$ac_objext conftest.$ac_ext
10106 fi
10107 echo "$as_me:10107: result: $cf_cv_mbstate_t" >&5
10108 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10109
10110 if test "$cf_cv_mbstate_t" = yes ; then
10111
10112 cat >>confdefs.h <<\EOF
10113 #define NEED_WCHAR_H 1
10114 EOF
10115
10116         NEED_WCHAR_H=1
10117 fi
10118
10119 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10120 if test "$cf_cv_mbstate_t" = unknown ; then
10121         NCURSES_MBSTATE_T=1
10122 fi
10123
10124 # This is needed on Tru64 5.0 to declare wchar_t
10125 echo "$as_me:10125: checking if we must include wchar.h to declare wchar_t" >&5
10126 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10127 if test "${cf_cv_wchar_t+set}" = set; then
10128   echo $ECHO_N "(cached) $ECHO_C" >&6
10129 else
10130
10131 cat >conftest.$ac_ext <<_ACEOF
10132 #line 10132 "configure"
10133 #include "confdefs.h"
10134
10135 #include <stdlib.h>
10136 #include <stdarg.h>
10137 #include <stdio.h>
10138 #ifdef HAVE_LIBUTF8_H
10139 #include <libutf8.h>
10140 #endif
10141 int
10142 main ()
10143 {
10144 wchar_t state
10145   ;
10146   return 0;
10147 }
10148 _ACEOF
10149 rm -f conftest.$ac_objext
10150 if { (eval echo "$as_me:10150: \"$ac_compile\"") >&5
10151   (eval $ac_compile) 2>&5
10152   ac_status=$?
10153   echo "$as_me:10153: \$? = $ac_status" >&5
10154   (exit $ac_status); } &&
10155          { ac_try='test -s conftest.$ac_objext'
10156   { (eval echo "$as_me:10156: \"$ac_try\"") >&5
10157   (eval $ac_try) 2>&5
10158   ac_status=$?
10159   echo "$as_me:10159: \$? = $ac_status" >&5
10160   (exit $ac_status); }; }; then
10161   cf_cv_wchar_t=no
10162 else
10163   echo "$as_me: failed program was:" >&5
10164 cat conftest.$ac_ext >&5
10165 cat >conftest.$ac_ext <<_ACEOF
10166 #line 10166 "configure"
10167 #include "confdefs.h"
10168
10169 #include <stdlib.h>
10170 #include <stdarg.h>
10171 #include <stdio.h>
10172 #include <wchar.h>
10173 #ifdef HAVE_LIBUTF8_H
10174 #include <libutf8.h>
10175 #endif
10176 int
10177 main ()
10178 {
10179 wchar_t value
10180   ;
10181   return 0;
10182 }
10183 _ACEOF
10184 rm -f conftest.$ac_objext
10185 if { (eval echo "$as_me:10185: \"$ac_compile\"") >&5
10186   (eval $ac_compile) 2>&5
10187   ac_status=$?
10188   echo "$as_me:10188: \$? = $ac_status" >&5
10189   (exit $ac_status); } &&
10190          { ac_try='test -s conftest.$ac_objext'
10191   { (eval echo "$as_me:10191: \"$ac_try\"") >&5
10192   (eval $ac_try) 2>&5
10193   ac_status=$?
10194   echo "$as_me:10194: \$? = $ac_status" >&5
10195   (exit $ac_status); }; }; then
10196   cf_cv_wchar_t=yes
10197 else
10198   echo "$as_me: failed program was:" >&5
10199 cat conftest.$ac_ext >&5
10200 cf_cv_wchar_t=unknown
10201 fi
10202 rm -f conftest.$ac_objext conftest.$ac_ext
10203 fi
10204 rm -f conftest.$ac_objext conftest.$ac_ext
10205 fi
10206 echo "$as_me:10206: result: $cf_cv_wchar_t" >&5
10207 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10208
10209 if test "$cf_cv_wchar_t" = yes ; then
10210
10211 cat >>confdefs.h <<\EOF
10212 #define NEED_WCHAR_H 1
10213 EOF
10214
10215         NEED_WCHAR_H=1
10216 fi
10217
10218 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10219 if test "$cf_cv_wchar_t" = unknown ; then
10220         NCURSES_WCHAR_T=1
10221 fi
10222
10223 # if we find wchar_t in either place, use substitution to provide a fallback.
10224 if test "$cf_cv_wchar_t" != unknown ; then
10225         NCURSES_OK_WCHAR_T=1
10226 fi
10227
10228 # This is needed on Tru64 5.0 to declare wint_t
10229 echo "$as_me:10229: checking if we must include wchar.h to declare wint_t" >&5
10230 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10231 if test "${cf_cv_wint_t+set}" = set; then
10232   echo $ECHO_N "(cached) $ECHO_C" >&6
10233 else
10234
10235 cat >conftest.$ac_ext <<_ACEOF
10236 #line 10236 "configure"
10237 #include "confdefs.h"
10238
10239 #include <stdlib.h>
10240 #include <stdarg.h>
10241 #include <stdio.h>
10242 #ifdef HAVE_LIBUTF8_H
10243 #include <libutf8.h>
10244 #endif
10245 int
10246 main ()
10247 {
10248 wint_t state
10249   ;
10250   return 0;
10251 }
10252 _ACEOF
10253 rm -f conftest.$ac_objext
10254 if { (eval echo "$as_me:10254: \"$ac_compile\"") >&5
10255   (eval $ac_compile) 2>&5
10256   ac_status=$?
10257   echo "$as_me:10257: \$? = $ac_status" >&5
10258   (exit $ac_status); } &&
10259          { ac_try='test -s conftest.$ac_objext'
10260   { (eval echo "$as_me:10260: \"$ac_try\"") >&5
10261   (eval $ac_try) 2>&5
10262   ac_status=$?
10263   echo "$as_me:10263: \$? = $ac_status" >&5
10264   (exit $ac_status); }; }; then
10265   cf_cv_wint_t=no
10266 else
10267   echo "$as_me: failed program was:" >&5
10268 cat conftest.$ac_ext >&5
10269 cat >conftest.$ac_ext <<_ACEOF
10270 #line 10270 "configure"
10271 #include "confdefs.h"
10272
10273 #include <stdlib.h>
10274 #include <stdarg.h>
10275 #include <stdio.h>
10276 #include <wchar.h>
10277 #ifdef HAVE_LIBUTF8_H
10278 #include <libutf8.h>
10279 #endif
10280 int
10281 main ()
10282 {
10283 wint_t value
10284   ;
10285   return 0;
10286 }
10287 _ACEOF
10288 rm -f conftest.$ac_objext
10289 if { (eval echo "$as_me:10289: \"$ac_compile\"") >&5
10290   (eval $ac_compile) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit $ac_status); } &&
10294          { ac_try='test -s conftest.$ac_objext'
10295   { (eval echo "$as_me:10295: \"$ac_try\"") >&5
10296   (eval $ac_try) 2>&5
10297   ac_status=$?
10298   echo "$as_me:10298: \$? = $ac_status" >&5
10299   (exit $ac_status); }; }; then
10300   cf_cv_wint_t=yes
10301 else
10302   echo "$as_me: failed program was:" >&5
10303 cat conftest.$ac_ext >&5
10304 cf_cv_wint_t=unknown
10305 fi
10306 rm -f conftest.$ac_objext conftest.$ac_ext
10307 fi
10308 rm -f conftest.$ac_objext conftest.$ac_ext
10309 fi
10310 echo "$as_me:10310: result: $cf_cv_wint_t" >&5
10311 echo "${ECHO_T}$cf_cv_wint_t" >&6
10312
10313 if test "$cf_cv_wint_t" = yes ; then
10314
10315 cat >>confdefs.h <<\EOF
10316 #define NEED_WCHAR_H 1
10317 EOF
10318
10319         NEED_WCHAR_H=1
10320 fi
10321
10322 # if we do not find wint_t in either place, use substitution to provide a fallback.
10323 if test "$cf_cv_wint_t" = unknown ; then
10324         NCURSES_WINT_T=1
10325 fi
10326
10327 # if we find wint_t in either place, use substitution to provide a fallback.
10328 if test "$cf_cv_wint_t" != unknown ; then
10329         NCURSES_OK_WINT_T=1
10330 fi
10331
10332         if test "$NCURSES_MBSTATE_T" != 0; then
10333
10334 cat >>confdefs.h <<\EOF
10335 #define NEED_MBSTATE_T_DEF 1
10336 EOF
10337
10338         fi
10339 fi
10340
10341 ###   use option --disable-lp64 to allow long chtype
10342 echo "$as_me:10342: checking whether to enable _LP64 definition in curses.h" >&5
10343 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10344
10345 # Check whether --enable-lp64 or --disable-lp64 was given.
10346 if test "${enable_lp64+set}" = set; then
10347   enableval="$enable_lp64"
10348   with_lp64=$enableval
10349 else
10350   with_lp64=$cf_dft_with_lp64
10351 fi;
10352 echo "$as_me:10352: result: $with_lp64" >&5
10353 echo "${ECHO_T}$with_lp64" >&6
10354
10355 if test "x$with_lp64" = xyes ; then
10356         cf_cv_enable_lp64=1
10357 else
10358         cf_cv_enable_lp64=0
10359 fi
10360
10361 # Check whether --enable-largefile or --disable-largefile was given.
10362 if test "${enable_largefile+set}" = set; then
10363   enableval="$enable_largefile"
10364
10365 fi;
10366 if test "$enable_largefile" != no; then
10367
10368   echo "$as_me:10368: checking for special C compiler options needed for large files" >&5
10369 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10370 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10371   echo $ECHO_N "(cached) $ECHO_C" >&6
10372 else
10373   ac_cv_sys_largefile_CC=no
10374      if test "$GCC" != yes; then
10375        ac_save_CC=$CC
10376        while :; do
10377          # IRIX 6.2 and later do not support large files by default,
10378          # so use the C compiler's -n32 option if that helps.
10379          cat >conftest.$ac_ext <<_ACEOF
10380 #line 10380 "configure"
10381 #include "confdefs.h"
10382 #include <sys/types.h>
10383  /* Check that off_t can represent 2**63 - 1 correctly.
10384     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10385     since some C++ compilers masquerading as C compilers
10386     incorrectly reject 9223372036854775807.  */
10387 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10388   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10389                        && LARGE_OFF_T % 2147483647 == 1)
10390                       ? 1 : -1];
10391 int
10392 main ()
10393 {
10394
10395   ;
10396   return 0;
10397 }
10398 _ACEOF
10399          rm -f conftest.$ac_objext
10400 if { (eval echo "$as_me:10400: \"$ac_compile\"") >&5
10401   (eval $ac_compile) 2>&5
10402   ac_status=$?
10403   echo "$as_me:10403: \$? = $ac_status" >&5
10404   (exit $ac_status); } &&
10405          { ac_try='test -s conftest.$ac_objext'
10406   { (eval echo "$as_me:10406: \"$ac_try\"") >&5
10407   (eval $ac_try) 2>&5
10408   ac_status=$?
10409   echo "$as_me:10409: \$? = $ac_status" >&5
10410   (exit $ac_status); }; }; then
10411   break
10412 else
10413   echo "$as_me: failed program was:" >&5
10414 cat conftest.$ac_ext >&5
10415 fi
10416 rm -f conftest.$ac_objext
10417          CC="$CC -n32"
10418          rm -f conftest.$ac_objext
10419 if { (eval echo "$as_me:10419: \"$ac_compile\"") >&5
10420   (eval $ac_compile) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit $ac_status); } &&
10424          { ac_try='test -s conftest.$ac_objext'
10425   { (eval echo "$as_me:10425: \"$ac_try\"") >&5
10426   (eval $ac_try) 2>&5
10427   ac_status=$?
10428   echo "$as_me:10428: \$? = $ac_status" >&5
10429   (exit $ac_status); }; }; then
10430   ac_cv_sys_largefile_CC=' -n32'; break
10431 else
10432   echo "$as_me: failed program was:" >&5
10433 cat conftest.$ac_ext >&5
10434 fi
10435 rm -f conftest.$ac_objext
10436          break
10437        done
10438        CC=$ac_save_CC
10439        rm -f conftest.$ac_ext
10440     fi
10441 fi
10442 echo "$as_me:10442: result: $ac_cv_sys_largefile_CC" >&5
10443 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10444   if test "$ac_cv_sys_largefile_CC" != no; then
10445     CC=$CC$ac_cv_sys_largefile_CC
10446   fi
10447
10448   echo "$as_me:10448: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10449 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10450 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10451   echo $ECHO_N "(cached) $ECHO_C" >&6
10452 else
10453   while :; do
10454   ac_cv_sys_file_offset_bits=no
10455   cat >conftest.$ac_ext <<_ACEOF
10456 #line 10456 "configure"
10457 #include "confdefs.h"
10458 #include <sys/types.h>
10459  /* Check that off_t can represent 2**63 - 1 correctly.
10460     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10461     since some C++ compilers masquerading as C compilers
10462     incorrectly reject 9223372036854775807.  */
10463 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10464   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10465                        && LARGE_OFF_T % 2147483647 == 1)
10466                       ? 1 : -1];
10467 int
10468 main ()
10469 {
10470
10471   ;
10472   return 0;
10473 }
10474 _ACEOF
10475 rm -f conftest.$ac_objext
10476 if { (eval echo "$as_me:10476: \"$ac_compile\"") >&5
10477   (eval $ac_compile) 2>&5
10478   ac_status=$?
10479   echo "$as_me:10479: \$? = $ac_status" >&5
10480   (exit $ac_status); } &&
10481          { ac_try='test -s conftest.$ac_objext'
10482   { (eval echo "$as_me:10482: \"$ac_try\"") >&5
10483   (eval $ac_try) 2>&5
10484   ac_status=$?
10485   echo "$as_me:10485: \$? = $ac_status" >&5
10486   (exit $ac_status); }; }; then
10487   break
10488 else
10489   echo "$as_me: failed program was:" >&5
10490 cat conftest.$ac_ext >&5
10491 fi
10492 rm -f conftest.$ac_objext conftest.$ac_ext
10493   cat >conftest.$ac_ext <<_ACEOF
10494 #line 10494 "configure"
10495 #include "confdefs.h"
10496 #define _FILE_OFFSET_BITS 64
10497 #include <sys/types.h>
10498  /* Check that off_t can represent 2**63 - 1 correctly.
10499     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10500     since some C++ compilers masquerading as C compilers
10501     incorrectly reject 9223372036854775807.  */
10502 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10503   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10504                        && LARGE_OFF_T % 2147483647 == 1)
10505                       ? 1 : -1];
10506 int
10507 main ()
10508 {
10509
10510   ;
10511   return 0;
10512 }
10513 _ACEOF
10514 rm -f conftest.$ac_objext
10515 if { (eval echo "$as_me:10515: \"$ac_compile\"") >&5
10516   (eval $ac_compile) 2>&5
10517   ac_status=$?
10518   echo "$as_me:10518: \$? = $ac_status" >&5
10519   (exit $ac_status); } &&
10520          { ac_try='test -s conftest.$ac_objext'
10521   { (eval echo "$as_me:10521: \"$ac_try\"") >&5
10522   (eval $ac_try) 2>&5
10523   ac_status=$?
10524   echo "$as_me:10524: \$? = $ac_status" >&5
10525   (exit $ac_status); }; }; then
10526   ac_cv_sys_file_offset_bits=64; break
10527 else
10528   echo "$as_me: failed program was:" >&5
10529 cat conftest.$ac_ext >&5
10530 fi
10531 rm -f conftest.$ac_objext conftest.$ac_ext
10532   break
10533 done
10534 fi
10535 echo "$as_me:10535: result: $ac_cv_sys_file_offset_bits" >&5
10536 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10537 if test "$ac_cv_sys_file_offset_bits" != no; then
10538
10539 cat >>confdefs.h <<EOF
10540 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10541 EOF
10542
10543 fi
10544 rm -rf conftest*
10545   echo "$as_me:10545: checking for _LARGE_FILES value needed for large files" >&5
10546 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10547 if test "${ac_cv_sys_large_files+set}" = set; then
10548   echo $ECHO_N "(cached) $ECHO_C" >&6
10549 else
10550   while :; do
10551   ac_cv_sys_large_files=no
10552   cat >conftest.$ac_ext <<_ACEOF
10553 #line 10553 "configure"
10554 #include "confdefs.h"
10555 #include <sys/types.h>
10556  /* Check that off_t can represent 2**63 - 1 correctly.
10557     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10558     since some C++ compilers masquerading as C compilers
10559     incorrectly reject 9223372036854775807.  */
10560 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10561   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10562                        && LARGE_OFF_T % 2147483647 == 1)
10563                       ? 1 : -1];
10564 int
10565 main ()
10566 {
10567
10568   ;
10569   return 0;
10570 }
10571 _ACEOF
10572 rm -f conftest.$ac_objext
10573 if { (eval echo "$as_me:10573: \"$ac_compile\"") >&5
10574   (eval $ac_compile) 2>&5
10575   ac_status=$?
10576   echo "$as_me:10576: \$? = $ac_status" >&5
10577   (exit $ac_status); } &&
10578          { ac_try='test -s conftest.$ac_objext'
10579   { (eval echo "$as_me:10579: \"$ac_try\"") >&5
10580   (eval $ac_try) 2>&5
10581   ac_status=$?
10582   echo "$as_me:10582: \$? = $ac_status" >&5
10583   (exit $ac_status); }; }; then
10584   break
10585 else
10586   echo "$as_me: failed program was:" >&5
10587 cat conftest.$ac_ext >&5
10588 fi
10589 rm -f conftest.$ac_objext conftest.$ac_ext
10590   cat >conftest.$ac_ext <<_ACEOF
10591 #line 10591 "configure"
10592 #include "confdefs.h"
10593 #define _LARGE_FILES 1
10594 #include <sys/types.h>
10595  /* Check that off_t can represent 2**63 - 1 correctly.
10596     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10597     since some C++ compilers masquerading as C compilers
10598     incorrectly reject 9223372036854775807.  */
10599 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10600   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10601                        && LARGE_OFF_T % 2147483647 == 1)
10602                       ? 1 : -1];
10603 int
10604 main ()
10605 {
10606
10607   ;
10608   return 0;
10609 }
10610 _ACEOF
10611 rm -f conftest.$ac_objext
10612 if { (eval echo "$as_me:10612: \"$ac_compile\"") >&5
10613   (eval $ac_compile) 2>&5
10614   ac_status=$?
10615   echo "$as_me:10615: \$? = $ac_status" >&5
10616   (exit $ac_status); } &&
10617          { ac_try='test -s conftest.$ac_objext'
10618   { (eval echo "$as_me:10618: \"$ac_try\"") >&5
10619   (eval $ac_try) 2>&5
10620   ac_status=$?
10621   echo "$as_me:10621: \$? = $ac_status" >&5
10622   (exit $ac_status); }; }; then
10623   ac_cv_sys_large_files=1; break
10624 else
10625   echo "$as_me: failed program was:" >&5
10626 cat conftest.$ac_ext >&5
10627 fi
10628 rm -f conftest.$ac_objext conftest.$ac_ext
10629   break
10630 done
10631 fi
10632 echo "$as_me:10632: result: $ac_cv_sys_large_files" >&5
10633 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10634 if test "$ac_cv_sys_large_files" != no; then
10635
10636 cat >>confdefs.h <<EOF
10637 #define _LARGE_FILES $ac_cv_sys_large_files
10638 EOF
10639
10640 fi
10641 rm -rf conftest*
10642 fi
10643
10644         if test "$enable_largefile" != no ; then
10645         echo "$as_me:10645: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10646 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10647 if test "${ac_cv_sys_largefile_source+set}" = set; then
10648   echo $ECHO_N "(cached) $ECHO_C" >&6
10649 else
10650   while :; do
10651   ac_cv_sys_largefile_source=no
10652   cat >conftest.$ac_ext <<_ACEOF
10653 #line 10653 "configure"
10654 #include "confdefs.h"
10655 #include <stdio.h>
10656 int
10657 main ()
10658 {
10659 return !fseeko;
10660   ;
10661   return 0;
10662 }
10663 _ACEOF
10664 rm -f conftest.$ac_objext
10665 if { (eval echo "$as_me:10665: \"$ac_compile\"") >&5
10666   (eval $ac_compile) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit $ac_status); } &&
10670          { ac_try='test -s conftest.$ac_objext'
10671   { (eval echo "$as_me:10671: \"$ac_try\"") >&5
10672   (eval $ac_try) 2>&5
10673   ac_status=$?
10674   echo "$as_me:10674: \$? = $ac_status" >&5
10675   (exit $ac_status); }; }; then
10676   break
10677 else
10678   echo "$as_me: failed program was:" >&5
10679 cat conftest.$ac_ext >&5
10680 fi
10681 rm -f conftest.$ac_objext conftest.$ac_ext
10682   cat >conftest.$ac_ext <<_ACEOF
10683 #line 10683 "configure"
10684 #include "confdefs.h"
10685 #define _LARGEFILE_SOURCE 1
10686 #include <stdio.h>
10687 int
10688 main ()
10689 {
10690 return !fseeko;
10691   ;
10692   return 0;
10693 }
10694 _ACEOF
10695 rm -f conftest.$ac_objext
10696 if { (eval echo "$as_me:10696: \"$ac_compile\"") >&5
10697   (eval $ac_compile) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); } &&
10701          { ac_try='test -s conftest.$ac_objext'
10702   { (eval echo "$as_me:10702: \"$ac_try\"") >&5
10703   (eval $ac_try) 2>&5
10704   ac_status=$?
10705   echo "$as_me:10705: \$? = $ac_status" >&5
10706   (exit $ac_status); }; }; then
10707   ac_cv_sys_largefile_source=1; break
10708 else
10709   echo "$as_me: failed program was:" >&5
10710 cat conftest.$ac_ext >&5
10711 fi
10712 rm -f conftest.$ac_objext conftest.$ac_ext
10713   break
10714 done
10715 fi
10716 echo "$as_me:10716: result: $ac_cv_sys_largefile_source" >&5
10717 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10718 if test "$ac_cv_sys_largefile_source" != no; then
10719
10720 cat >>confdefs.h <<EOF
10721 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10722 EOF
10723
10724 fi
10725 rm -rf conftest*
10726
10727 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10728 # in glibc 2.1.3, but that breaks too many other things.
10729 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10730 echo "$as_me:10730: checking for fseeko" >&5
10731 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10732 if test "${ac_cv_func_fseeko+set}" = set; then
10733   echo $ECHO_N "(cached) $ECHO_C" >&6
10734 else
10735   cat >conftest.$ac_ext <<_ACEOF
10736 #line 10736 "configure"
10737 #include "confdefs.h"
10738 #include <stdio.h>
10739 int
10740 main ()
10741 {
10742 return fseeko && fseeko (stdin, 0, 0);
10743   ;
10744   return 0;
10745 }
10746 _ACEOF
10747 rm -f conftest.$ac_objext conftest$ac_exeext
10748 if { (eval echo "$as_me:10748: \"$ac_link\"") >&5
10749   (eval $ac_link) 2>&5
10750   ac_status=$?
10751   echo "$as_me:10751: \$? = $ac_status" >&5
10752   (exit $ac_status); } &&
10753          { ac_try='test -s conftest$ac_exeext'
10754   { (eval echo "$as_me:10754: \"$ac_try\"") >&5
10755   (eval $ac_try) 2>&5
10756   ac_status=$?
10757   echo "$as_me:10757: \$? = $ac_status" >&5
10758   (exit $ac_status); }; }; then
10759   ac_cv_func_fseeko=yes
10760 else
10761   echo "$as_me: failed program was:" >&5
10762 cat conftest.$ac_ext >&5
10763 ac_cv_func_fseeko=no
10764 fi
10765 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10766 fi
10767 echo "$as_me:10767: result: $ac_cv_func_fseeko" >&5
10768 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10769 if test $ac_cv_func_fseeko = yes; then
10770
10771 cat >>confdefs.h <<\EOF
10772 #define HAVE_FSEEKO 1
10773 EOF
10774
10775 fi
10776
10777         # Normally we would collect these definitions in the config.h,
10778         # but (like _XOPEN_SOURCE), some environments rely on having these
10779         # defined before any of the system headers are included.  Another
10780         # case comes up with C++, e.g., on AIX the compiler compiles the
10781         # header files by themselves before looking at the body files it is
10782         # told to compile.  For ncurses, those header files do not include
10783         # the config.h
10784         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10785         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10786         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10787
10788         echo "$as_me:10788: checking whether to use struct dirent64" >&5
10789 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10790 if test "${cf_cv_struct_dirent64+set}" = set; then
10791   echo $ECHO_N "(cached) $ECHO_C" >&6
10792 else
10793
10794                 cat >conftest.$ac_ext <<_ACEOF
10795 #line 10795 "configure"
10796 #include "confdefs.h"
10797
10798 #include <sys/types.h>
10799 #include <dirent.h>
10800
10801 int
10802 main ()
10803 {
10804
10805                 /* if transitional largefile support is setup, this is true */
10806                 extern struct dirent64 * readdir(DIR *);
10807                 struct dirent64 *x = readdir((DIR *)0);
10808                 struct dirent *y = readdir((DIR *)0);
10809                 int z = x - y;
10810
10811   ;
10812   return 0;
10813 }
10814 _ACEOF
10815 rm -f conftest.$ac_objext
10816 if { (eval echo "$as_me:10816: \"$ac_compile\"") >&5
10817   (eval $ac_compile) 2>&5
10818   ac_status=$?
10819   echo "$as_me:10819: \$? = $ac_status" >&5
10820   (exit $ac_status); } &&
10821          { ac_try='test -s conftest.$ac_objext'
10822   { (eval echo "$as_me:10822: \"$ac_try\"") >&5
10823   (eval $ac_try) 2>&5
10824   ac_status=$?
10825   echo "$as_me:10825: \$? = $ac_status" >&5
10826   (exit $ac_status); }; }; then
10827   cf_cv_struct_dirent64=yes
10828 else
10829   echo "$as_me: failed program was:" >&5
10830 cat conftest.$ac_ext >&5
10831 cf_cv_struct_dirent64=no
10832 fi
10833 rm -f conftest.$ac_objext conftest.$ac_ext
10834
10835 fi
10836 echo "$as_me:10836: result: $cf_cv_struct_dirent64" >&5
10837 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10838         test "$cf_cv_struct_dirent64" = yes &&
10839 cat >>confdefs.h <<\EOF
10840 #define HAVE_STRUCT_DIRENT64 1
10841 EOF
10842
10843         fi
10844
10845 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10846 echo "$as_me:10846: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10847 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10848
10849 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10850 if test "${enable_tparm_varargs+set}" = set; then
10851   enableval="$enable_tparm_varargs"
10852   with_tparm_varargs=$enableval
10853 else
10854   with_tparm_varargs=yes
10855 fi;
10856 echo "$as_me:10856: result: $with_tparm_varargs" >&5
10857 echo "${ECHO_T}$with_tparm_varargs" >&6
10858 NCURSES_TPARM_VARARGS=0
10859 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10860
10861 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10862 if test "$with_ticlib" != no ; then
10863 echo "$as_me:10863: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10864 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10865
10866 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10867 if test "${enable_tic_depends+set}" = set; then
10868   enableval="$enable_tic_depends"
10869   with_tic_depends=$enableval
10870 else
10871   with_tic_depends=yes
10872 fi;
10873 echo "$as_me:10873: result: $with_tic_depends" >&5
10874 echo "${ECHO_T}$with_tic_depends" >&6
10875 else
10876         with_tic_depends=no
10877 fi
10878
10879 ###   use option --with-bool to override bool's type
10880 echo "$as_me:10880: checking for type of bool" >&5
10881 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10882
10883 # Check whether --with-bool or --without-bool was given.
10884 if test "${with_bool+set}" = set; then
10885   withval="$with_bool"
10886   NCURSES_BOOL="$withval"
10887 else
10888   NCURSES_BOOL=auto
10889 fi;
10890 echo "$as_me:10890: result: $NCURSES_BOOL" >&5
10891 echo "${ECHO_T}$NCURSES_BOOL" >&6
10892
10893 echo "$as_me:10893: checking for alternate terminal capabilities file" >&5
10894 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10895
10896 # Check whether --with-caps or --without-caps was given.
10897 if test "${with_caps+set}" = set; then
10898   withval="$with_caps"
10899   TERMINFO_CAPS=Caps.$withval
10900 else
10901   TERMINFO_CAPS=Caps
10902 fi;
10903 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10904 echo "$as_me:10904: result: $TERMINFO_CAPS" >&5
10905 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10906
10907 ###   use option --with-chtype to override chtype's type
10908 echo "$as_me:10908: checking for type of chtype" >&5
10909 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10910
10911 # Check whether --with-chtype or --without-chtype was given.
10912 if test "${with_chtype+set}" = set; then
10913   withval="$with_chtype"
10914   NCURSES_CHTYPE="$withval"
10915 else
10916   NCURSES_CHTYPE=$cf_dft_chtype
10917 fi;
10918 echo "$as_me:10918: result: $NCURSES_CHTYPE" >&5
10919 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10920
10921 ###   use option --with-ospeed to override ospeed's type
10922 echo "$as_me:10922: checking for type of ospeed" >&5
10923 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10924
10925 # Check whether --with-ospeed or --without-ospeed was given.
10926 if test "${with_ospeed+set}" = set; then
10927   withval="$with_ospeed"
10928   NCURSES_OSPEED="$withval"
10929 else
10930   NCURSES_OSPEED=short
10931 fi;
10932 echo "$as_me:10932: result: $NCURSES_OSPEED" >&5
10933 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10934
10935 ###   use option --with-mmask-t to override mmask_t's type
10936 echo "$as_me:10936: checking for type of mmask_t" >&5
10937 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10938
10939 # Check whether --with-mmask-t or --without-mmask-t was given.
10940 if test "${with_mmask_t+set}" = set; then
10941   withval="$with_mmask_t"
10942   NCURSES_MMASK_T="$withval"
10943 else
10944   NCURSES_MMASK_T=$cf_dft_mmask_t
10945 fi;
10946 echo "$as_me:10946: result: $NCURSES_MMASK_T" >&5
10947 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10948
10949 ###   use option --with-ccharw-max to override CCHARW_MAX size
10950 echo "$as_me:10950: checking for size CCHARW_MAX" >&5
10951 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10952
10953 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10954 if test "${with_ccharw_max+set}" = set; then
10955   withval="$with_ccharw_max"
10956   NCURSES_CCHARW_MAX="$withval"
10957 else
10958   NCURSES_CCHARW_MAX=5
10959 fi;
10960 echo "$as_me:10960: result: $NCURSES_CCHARW_MAX" >&5
10961 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10962
10963 ###   use option --with-tparm-arg to override tparm's argument type
10964 echo "$as_me:10964: checking for type of tparm args" >&5
10965 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10966
10967 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10968 if test "${with_tparm_arg+set}" = set; then
10969   withval="$with_tparm_arg"
10970   NCURSES_TPARM_ARG="$withval"
10971 else
10972   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10973 fi;
10974 echo "$as_me:10974: result: $NCURSES_TPARM_ARG" >&5
10975 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10976
10977 ### Enable compiling-in rcs id's
10978 echo "$as_me:10978: checking if RCS identifiers should be compiled-in" >&5
10979 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10980
10981 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10982 if test "${with_rcs_ids+set}" = set; then
10983   withval="$with_rcs_ids"
10984   with_rcs_ids=$withval
10985 else
10986   with_rcs_ids=no
10987 fi;
10988 echo "$as_me:10988: result: $with_rcs_ids" >&5
10989 echo "${ECHO_T}$with_rcs_ids" >&6
10990 test "x$with_rcs_ids" = xyes &&
10991 cat >>confdefs.h <<\EOF
10992 #define USE_RCS_IDS 1
10993 EOF
10994
10995 ###############################################################################
10996
10997 echo "$as_me:10997: checking format of man-pages" >&5
10998 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10999
11000 # Check whether --with-manpage-format or --without-manpage-format was given.
11001 if test "${with_manpage_format+set}" = set; then
11002   withval="$with_manpage_format"
11003   MANPAGE_FORMAT=$withval
11004 else
11005   MANPAGE_FORMAT=unknown
11006 fi;
11007
11008 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11009 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11010
11011 cf_unknown=
11012
11013 case $MANPAGE_FORMAT in
11014 (unknown)
11015         if test -z "$MANPATH" ; then
11016                 MANPATH="/usr/man:/usr/share/man"
11017         fi
11018
11019         # look for the 'date' man-page (it's most likely to be installed!)
11020         MANPAGE_FORMAT=
11021         cf_preform=no
11022         cf_catonly=yes
11023         cf_example=date
11024
11025         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11026         for cf_dir in $MANPATH; do
11027                 test -z "$cf_dir" && cf_dir=/usr/man
11028                 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
11029                 do
11030                         cf_test=`echo $cf_name | sed -e 's/*//'`
11031                         if test "x$cf_test" = "x$cf_name" ; then
11032
11033                                 case "$cf_name" in
11034                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11035                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11036                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11037                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11038                                 esac
11039
11040                                 case "$cf_name" in
11041                                 ($cf_dir/man*)
11042                                         cf_catonly=no
11043                                         ;;
11044                                 ($cf_dir/cat*)
11045                                         cf_preform=yes
11046                                         ;;
11047                                 esac
11048                                 break
11049                         fi
11050
11051                         # if we found a match in either man* or cat*, stop looking
11052                         if test -n "$MANPAGE_FORMAT" ; then
11053                                 cf_found=no
11054                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11055                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11056                                 case "$cf_name" in
11057                                 ($cf_dir/cat*)
11058                                         cf_found=yes
11059                                         ;;
11060                                 esac
11061                                 test $cf_found=yes && break
11062                         fi
11063                 done
11064                 # only check the first directory in $MANPATH where we find manpages
11065                 if test -n "$MANPAGE_FORMAT" ; then
11066                         break
11067                 fi
11068         done
11069         # if we did not find the example, just assume it is normal
11070         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11071         IFS="$ac_save_ifs"
11072         ;;
11073 (*)
11074         for cf_option in $MANPAGE_FORMAT; do
11075         case $cf_option in
11076         (gzip|compress|BSDI|normal|formatted|catonly)
11077                 ;;
11078         (*)
11079                 cf_unknown="$cf_unknown $cf_option"
11080                 ;;
11081         esac
11082         done
11083         ;;
11084 esac
11085
11086 echo "$as_me:11086: result: $MANPAGE_FORMAT" >&5
11087 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11088 if test -n "$cf_unknown" ; then
11089         { echo "$as_me:11089: WARNING: Unexpected manpage-format $cf_unknown" >&5
11090 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11091 fi
11092
11093 echo "$as_me:11093: checking for manpage renaming" >&5
11094 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11095
11096 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11097 if test "${with_manpage_renames+set}" = set; then
11098   withval="$with_manpage_renames"
11099   MANPAGE_RENAMES=$withval
11100 else
11101   MANPAGE_RENAMES=yes
11102 fi;
11103
11104 case ".$MANPAGE_RENAMES" in
11105 (.no)
11106         ;;
11107 (.|.yes)
11108         # Debian 'man' program?
11109         if test -f /etc/debian_version ; then
11110                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11111         else
11112                 MANPAGE_RENAMES=no
11113         fi
11114         ;;
11115 esac
11116
11117 if test "$MANPAGE_RENAMES" != no ; then
11118         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11119                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11120         elif test ! -f $MANPAGE_RENAMES ; then
11121                 { { echo "$as_me:11121: error: not a filename: $MANPAGE_RENAMES" >&5
11122 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11123    { (exit 1); exit 1; }; }
11124         fi
11125
11126         test ! -d man && mkdir man
11127
11128         # Construct a sed-script to perform renaming within man-pages
11129         if test -n "$MANPAGE_RENAMES" ; then
11130                 test ! -d man && mkdir man
11131                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11132         fi
11133 fi
11134
11135 echo "$as_me:11135: result: $MANPAGE_RENAMES" >&5
11136 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11137
11138 echo "$as_me:11138: checking if manpage aliases will be installed" >&5
11139 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11140
11141 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11142 if test "${with_manpage_aliases+set}" = set; then
11143   withval="$with_manpage_aliases"
11144   MANPAGE_ALIASES=$withval
11145 else
11146   MANPAGE_ALIASES=yes
11147 fi;
11148
11149 echo "$as_me:11149: result: $MANPAGE_ALIASES" >&5
11150 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11151
11152 case "x$LN_S" in
11153 (xln*)
11154         cf_use_symlinks=yes
11155         ;;
11156 (*)
11157         cf_use_symlinks=no
11158         ;;
11159 esac
11160
11161 MANPAGE_SYMLINKS=no
11162 if test "$MANPAGE_ALIASES" = yes ; then
11163 echo "$as_me:11163: checking if manpage symlinks should be used" >&5
11164 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11165
11166 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11167 if test "${with_manpage_symlinks+set}" = set; then
11168   withval="$with_manpage_symlinks"
11169   MANPAGE_SYMLINKS=$withval
11170 else
11171   MANPAGE_SYMLINKS=$cf_use_symlinks
11172 fi;
11173
11174 if test "$$cf_use_symlinks" = no; then
11175 if test "$MANPAGE_SYMLINKS" = yes ; then
11176         { echo "$as_me:11176: WARNING: cannot make symlinks" >&5
11177 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11178         MANPAGE_SYMLINKS=no
11179 fi
11180 fi
11181
11182 echo "$as_me:11182: result: $MANPAGE_SYMLINKS" >&5
11183 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11184 fi
11185
11186 echo "$as_me:11186: checking for manpage tbl" >&5
11187 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11188
11189 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11190 if test "${with_manpage_tbl+set}" = set; then
11191   withval="$with_manpage_tbl"
11192   MANPAGE_TBL=$withval
11193 else
11194   MANPAGE_TBL=no
11195 fi;
11196
11197 echo "$as_me:11197: result: $MANPAGE_TBL" >&5
11198 echo "${ECHO_T}$MANPAGE_TBL" >&6
11199
11200 if test "$prefix" = "NONE" ; then
11201         cf_prefix="$ac_default_prefix"
11202 else
11203         cf_prefix="$prefix"
11204 fi
11205
11206 case "$MANPAGE_FORMAT" in
11207 (*catonly*)
11208         cf_format=yes
11209         cf_inboth=no
11210         ;;
11211 (*formatted*)
11212         cf_format=yes
11213         cf_inboth=yes
11214         ;;
11215 (*)
11216         cf_format=no
11217         cf_inboth=no
11218         ;;
11219 esac
11220
11221 test ! -d man && mkdir man
11222
11223 cf_so_strip=
11224 cf_compress=
11225 case "$MANPAGE_FORMAT" in
11226 (*compress*)
11227         cf_so_strip="Z"
11228         cf_compress=compress
11229         ;;
11230 (*gzip*)
11231         cf_so_strip="gz"
11232         cf_compress=gzip
11233         ;;
11234 esac
11235
11236 cf_edit_man=./edit_man.sh
11237 cf_man_alias=`pwd`/man_alias.sed
11238
11239 cat >$cf_edit_man <<CF_EOF
11240 #! $SHELL
11241 # this script is generated by the configure-script CF_MAN_PAGES macro.
11242
11243 prefix="$cf_prefix"
11244 datarootdir="$datarootdir"
11245 datadir="$datadir"
11246
11247 NCURSES_MAJOR="$NCURSES_MAJOR"
11248 NCURSES_MINOR="$NCURSES_MINOR"
11249 NCURSES_PATCH="$NCURSES_PATCH"
11250
11251 NCURSES_OSPEED="$NCURSES_OSPEED"
11252 TERMINFO="$TERMINFO"
11253
11254 INSTALL="$INSTALL"
11255 INSTALL_DATA="$INSTALL_DATA"
11256
11257 transform="$program_transform_name"
11258
11259 TMP=\${TMPDIR:=/tmp}/man\$\$
11260 trap "rm -f \$TMP" 0 1 2 5 15
11261
11262 form=\$1
11263 shift || exit 1
11264
11265 verb=\$1
11266 shift || exit 1
11267
11268 mandir=\$1
11269 shift || exit 1
11270
11271 srcdir=\$1
11272 top_srcdir=\$srcdir/..
11273 shift || exit 1
11274
11275 if test "\$form" = normal ; then
11276         if test "$cf_format" = yes ; then
11277         if test "$cf_inboth" = no ; then
11278                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11279                 exit $?
11280         fi
11281         fi
11282         cf_subdir=\$mandir/man
11283         cf_tables=$MANPAGE_TBL
11284 else
11285         cf_subdir=\$mandir/cat
11286         cf_tables=yes
11287 fi
11288
11289 # process the list of source-files
11290 for i in \$* ; do
11291 case \$i in
11292 (*.orig|*.rej) ;;
11293 (*.[0-9]*)
11294         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11295         if test \$verb = installing ; then
11296         if test ! -d \$cf_subdir\${section} ; then
11297                 mkdir -p \$cf_subdir\$section
11298         fi
11299         fi
11300
11301         # replace variables in man page
11302         if test ! -f $cf_man_alias ; then
11303 cat >>$cf_man_alias <<-CF_EOF2
11304                 s,@DATADIR@,\$datadir,g
11305                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11306                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11307                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11308                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11309                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11310                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11311 CF_EOF
11312
11313         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11314         do
11315                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11316                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11317 cat >>$cf_edit_man <<-CF_EOF
11318                 s,@$cf_NAME@,$cf_name,g
11319 CF_EOF
11320         done
11321
11322 cat >>$cf_edit_man <<CF_EOF
11323 CF_EOF2
11324                 echo "...made $cf_man_alias"
11325         fi
11326
11327         aliases=
11328         cf_source=\`basename \$i\`
11329         inalias=\$cf_source
11330         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11331         if test ! -f \$inalias ; then
11332                 echo .. skipped \$cf_source
11333                 continue
11334         fi
11335 CF_EOF
11336
11337 if test "$MANPAGE_ALIASES" != no ; then
11338 cat >>$cf_edit_man <<CF_EOF
11339         nCurses=ignore.3x
11340         test $with_curses_h = yes && nCurses=ncurses.3x
11341         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11342 CF_EOF
11343 fi
11344
11345 if test "$MANPAGE_RENAMES" = no ; then
11346 cat >>$cf_edit_man <<CF_EOF
11347         # perform program transformations for section 1 man pages
11348         if test \$section = 1 ; then
11349                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11350         else
11351                 cf_target=\$cf_subdir\${section}/\$cf_source
11352         fi
11353 CF_EOF
11354 else
11355 cat >>$cf_edit_man <<CF_EOF
11356         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11357         if test -z "\$cf_target" ; then
11358                 echo '? missing rename for '\$cf_source
11359                 cf_target="\$cf_source"
11360         fi
11361         cf_target="\$cf_subdir\${section}/\${cf_target}"
11362
11363 CF_EOF
11364 fi
11365
11366 cat >>$cf_edit_man <<CF_EOF
11367         sed     -f $cf_man_alias \\
11368 CF_EOF
11369
11370 if test -f $MANPAGE_RENAMES ; then
11371 cat >>$cf_edit_man <<CF_EOF
11372                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11373 CF_EOF
11374 else
11375 cat >>$cf_edit_man <<CF_EOF
11376                 < \$i >\$TMP
11377 CF_EOF
11378 fi
11379
11380 cat >>$cf_edit_man <<CF_EOF
11381 if test \$cf_tables = yes ; then
11382         tbl \$TMP >\$TMP.out
11383         mv \$TMP.out \$TMP
11384 fi
11385 CF_EOF
11386
11387 if test $with_overwrite != yes ; then
11388 cat >>$cf_edit_man <<CF_EOF
11389         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11390         mv \$TMP.out \$TMP
11391 CF_EOF
11392 fi
11393
11394 if test $with_curses_h != yes ; then
11395 cat >>$cf_edit_man <<CF_EOF
11396         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11397         mv \$TMP.out \$TMP
11398 CF_EOF
11399 fi
11400
11401 cat >>$cf_edit_man <<CF_EOF
11402         if test \$form = format ; then
11403                 nroff -man \$TMP >\$TMP.out
11404                 mv \$TMP.out \$TMP
11405         fi
11406 CF_EOF
11407
11408 if test -n "$cf_compress" ; then
11409 cat >>$cf_edit_man <<CF_EOF
11410         if test \$verb = installing ; then
11411         if ( $cf_compress -f \$TMP )
11412         then
11413                 mv \$TMP.$cf_so_strip \$TMP
11414         fi
11415         fi
11416         cf_target="\$cf_target.$cf_so_strip"
11417 CF_EOF
11418 fi
11419
11420 case "$MANPAGE_FORMAT" in
11421 (*BSDI*)
11422 cat >>$cf_edit_man <<CF_EOF
11423         if test \$form = format ; then
11424                 # BSDI installs only .0 suffixes in the cat directories
11425                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11426         fi
11427 CF_EOF
11428   ;;
11429 esac
11430
11431 cat >>$cf_edit_man <<CF_EOF
11432         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11433         if test \$verb = installing ; then
11434                 echo \$verb \$cf_target
11435                 \$INSTALL_DATA \$TMP \$cf_target
11436                 test -d \$cf_subdir\${section} &&
11437                 test -n "\$aliases" && (
11438                         cd \$cf_subdir\${section} && (
11439                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11440                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11441                                 cf_target=\`basename \$cf_target\`
11442                                 for cf_alias in \$aliases
11443                                 do
11444                                         if test \$section = 1 ; then
11445                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11446                                         fi
11447
11448                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11449                                                 if test -f \$cf_alias\${suffix} ; then
11450                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11451                                                         then
11452                                                                 continue
11453                                                         fi
11454                                                 fi
11455                                                 echo .. \$verb alias \$cf_alias\${suffix}
11456 CF_EOF
11457 case "x$LN_S" in
11458 (*-f)
11459 cat >>$cf_edit_man <<CF_EOF
11460                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11461 CF_EOF
11462         ;;
11463 (*)
11464 cat >>$cf_edit_man <<CF_EOF
11465                                                 rm -f \$cf_alias\${suffix}
11466                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11467 CF_EOF
11468         ;;
11469 esac
11470 cat >>$cf_edit_man <<CF_EOF
11471                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11472                                                 echo ".so \$cf_source" >\$TMP
11473 CF_EOF
11474 if test -n "$cf_compress" ; then
11475 cat >>$cf_edit_man <<CF_EOF
11476                                                 if test -n "$cf_so_strip" ; then
11477                                                         $cf_compress -f \$TMP
11478                                                         mv \$TMP.$cf_so_strip \$TMP
11479                                                 fi
11480 CF_EOF
11481 fi
11482 cat >>$cf_edit_man <<CF_EOF
11483                                                 echo .. \$verb alias \$cf_alias\${suffix}
11484                                                 rm -f \$cf_alias\${suffix}
11485                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11486                                         fi
11487                                 done
11488                         )
11489                 )
11490         elif test \$verb = removing ; then
11491                 test -f \$cf_target && (
11492                         echo \$verb \$cf_target
11493                         rm -f \$cf_target
11494                 )
11495                 test -d \$cf_subdir\${section} &&
11496                 test -n "\$aliases" && (
11497                         cd \$cf_subdir\${section} && (
11498                                 for cf_alias in \$aliases
11499                                 do
11500                                         if test \$section = 1 ; then
11501                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11502                                         fi
11503
11504                                         echo .. \$verb alias \$cf_alias\${suffix}
11505                                         rm -f \$cf_alias\${suffix}
11506                                 done
11507                         )
11508                 )
11509         else
11510 #               echo ".hy 0"
11511                 cat \$TMP
11512         fi
11513         ;;
11514 esac
11515 done
11516
11517 if test $cf_inboth = yes ; then
11518 if test \$form != format ; then
11519         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11520 fi
11521 fi
11522
11523 exit 0
11524 CF_EOF
11525 chmod 755 $cf_edit_man
11526
11527 ###############################################################################
11528
11529 ### Note that some functions (such as const) are normally disabled anyway.
11530 echo "$as_me:11530: checking if you want to build with function extensions" >&5
11531 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11532
11533 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11534 if test "${enable_ext_funcs+set}" = set; then
11535   enableval="$enable_ext_funcs"
11536   with_ext_funcs=$enableval
11537 else
11538   with_ext_funcs=yes
11539 fi;
11540 echo "$as_me:11540: result: $with_ext_funcs" >&5
11541 echo "${ECHO_T}$with_ext_funcs" >&6
11542 if test "x$with_ext_funcs" = xyes ; then
11543         NCURSES_EXT_FUNCS=1
11544
11545 cat >>confdefs.h <<\EOF
11546 #define HAVE_ASSUME_DEFAULT_COLORS 1
11547 EOF
11548
11549 cat >>confdefs.h <<\EOF
11550 #define HAVE_CURSES_VERSION 1
11551 EOF
11552
11553 cat >>confdefs.h <<\EOF
11554 #define HAVE_HAS_KEY 1
11555 EOF
11556
11557 cat >>confdefs.h <<\EOF
11558 #define HAVE_RESIZETERM 1
11559 EOF
11560
11561 cat >>confdefs.h <<\EOF
11562 #define HAVE_RESIZE_TERM 1
11563 EOF
11564
11565 cat >>confdefs.h <<\EOF
11566 #define HAVE_TERM_ENTRY_H 1
11567 EOF
11568
11569 cat >>confdefs.h <<\EOF
11570 #define HAVE_USE_DEFAULT_COLORS 1
11571 EOF
11572
11573 cat >>confdefs.h <<\EOF
11574 #define HAVE_USE_SCREEN 1
11575 EOF
11576
11577 cat >>confdefs.h <<\EOF
11578 #define HAVE_USE_WINDOW 1
11579 EOF
11580
11581 cat >>confdefs.h <<\EOF
11582 #define HAVE_WRESIZE 1
11583 EOF
11584
11585 cat >>confdefs.h <<\EOF
11586 #define NCURSES_EXT_FUNCS 1
11587 EOF
11588
11589         GENERATED_EXT_FUNCS=generated
11590 else
11591         NCURSES_EXT_FUNCS=0
11592         GENERATED_EXT_FUNCS=
11593 fi
11594
11595 echo "$as_me:11595: checking if you want to build with SCREEN extensions" >&5
11596 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11597
11598 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11599 if test "${enable_sp_funcs+set}" = set; then
11600   enableval="$enable_sp_funcs"
11601   with_sp_funcs=$enableval
11602 else
11603   with_sp_funcs=$cf_dft_ext_spfuncs
11604 fi;
11605 echo "$as_me:11605: result: $with_sp_funcs" >&5
11606 echo "${ECHO_T}$with_sp_funcs" >&6
11607 if test "x$with_sp_funcs" = xyes ; then
11608         NCURSES_SP_FUNCS=1
11609
11610 cat >>confdefs.h <<\EOF
11611 #define NCURSES_SP_FUNCS 1
11612 EOF
11613
11614         GENERATED_SP_FUNCS=generated
11615 else
11616         NCURSES_SP_FUNCS=0
11617         GENERATED_SP_FUNCS=
11618 fi
11619
11620 echo "$as_me:11620: checking if you want to build with terminal-driver" >&5
11621 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11622
11623 # Check whether --enable-term-driver or --disable-term-driver was given.
11624 if test "${enable_term_driver+set}" = set; then
11625   enableval="$enable_term_driver"
11626   with_term_driver=$enableval
11627 else
11628   with_term_driver=no
11629 fi;
11630 echo "$as_me:11630: result: $with_term_driver" >&5
11631 echo "${ECHO_T}$with_term_driver" >&6
11632 if test "x$with_term_driver" = xyes ; then
11633
11634 cat >>confdefs.h <<\EOF
11635 #define USE_TERM_DRIVER 1
11636 EOF
11637
11638         if test "x$with_termlib" != xno ; then
11639                 { { echo "$as_me:11639: error: The term-driver option conflicts with the termlib option" >&5
11640 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11641    { (exit 1); exit 1; }; }
11642         fi
11643         if test "x$with_sp_funcs" != xyes ; then
11644                 { { echo "$as_me:11644: error: The term-driver option relies upon sp-funcs" >&5
11645 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11646    { (exit 1); exit 1; }; }
11647         fi
11648 fi
11649
11650 ###   use option --enable-const to turn on use of const beyond that in XSI.
11651 echo "$as_me:11651: checking for extended use of const keyword" >&5
11652 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11653
11654 # Check whether --enable-const or --disable-const was given.
11655 if test "${enable_const+set}" = set; then
11656   enableval="$enable_const"
11657   with_ext_const=$enableval
11658 else
11659   with_ext_const=$cf_dft_ext_const
11660 fi;
11661 echo "$as_me:11661: result: $with_ext_const" >&5
11662 echo "${ECHO_T}$with_ext_const" >&6
11663 NCURSES_CONST='/*nothing*/'
11664 if test "x$with_ext_const" = xyes ; then
11665         NCURSES_CONST=const
11666 fi
11667
11668 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11669 echo "$as_me:11669: checking if you want to use extended colors" >&5
11670 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11671
11672 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11673 if test "${enable_ext_colors+set}" = set; then
11674   enableval="$enable_ext_colors"
11675   with_ext_colors=$enableval
11676 else
11677   with_ext_colors=$cf_dft_ext_colors
11678 fi;
11679 echo "$as_me:11679: result: $with_ext_colors" >&5
11680 echo "${ECHO_T}$with_ext_colors" >&6
11681 NCURSES_EXT_COLORS=0
11682 if test "x$with_ext_colors" = xyes ; then
11683         if test "x$with_widec" != xyes ; then
11684                 { echo "$as_me:11684: WARNING: This option applies only to wide-character library" >&5
11685 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11686         else
11687                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11688
11689 if test "${with_abi_version+set}" != set; then
11690         case $cf_cv_rel_version in
11691         (5.*)
11692                 cf_cv_rel_version=6.0
11693                 cf_cv_abi_version=6
11694                 { echo "$as_me:11694: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11695 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11696                 ;;
11697         esac
11698 fi
11699
11700                 NCURSES_EXT_COLORS=1
11701
11702 cat >>confdefs.h <<\EOF
11703 #define NCURSES_EXT_COLORS 1
11704 EOF
11705
11706         fi
11707 fi
11708
11709 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11710 echo "$as_me:11710: checking if you want to use extended mouse encoding" >&5
11711 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11712
11713 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11714 if test "${enable_ext_mouse+set}" = set; then
11715   enableval="$enable_ext_mouse"
11716   with_ext_mouse=$enableval
11717 else
11718   with_ext_mouse=$cf_dft_ext_mouse
11719 fi;
11720 echo "$as_me:11720: result: $with_ext_mouse" >&5
11721 echo "${ECHO_T}$with_ext_mouse" >&6
11722 NCURSES_MOUSE_VERSION=1
11723 if test "x$with_ext_mouse" = xyes ; then
11724         NCURSES_MOUSE_VERSION=2
11725
11726 if test "${with_abi_version+set}" != set; then
11727         case $cf_cv_rel_version in
11728         (5.*)
11729                 cf_cv_rel_version=6.0
11730                 cf_cv_abi_version=6
11731                 { echo "$as_me:11731: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11732 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11733                 ;;
11734         esac
11735 fi
11736
11737 fi
11738
11739 ###   use option --enable-ext-putwin to turn on extended screendumps
11740 echo "$as_me:11740: checking if you want to use extended putwin/screendump" >&5
11741 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11742
11743 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11744 if test "${enable_ext_putwin+set}" = set; then
11745   enableval="$enable_ext_putwin"
11746   with_ext_putwin=$enableval
11747 else
11748   with_ext_putwin=$cf_dft_ext_putwin
11749 fi;
11750 echo "$as_me:11750: result: $with_ext_putwin" >&5
11751 echo "${ECHO_T}$with_ext_putwin" >&6
11752 if test "x$with_ext_putwin" = xyes ; then
11753
11754 cat >>confdefs.h <<\EOF
11755 #define NCURSES_EXT_PUTWIN 1
11756 EOF
11757
11758 fi
11759
11760 echo "$as_me:11760: checking if you want \$NCURSES_NO_PADDING code" >&5
11761 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11762
11763 # Check whether --enable-no-padding or --disable-no-padding was given.
11764 if test "${enable_no_padding+set}" = set; then
11765   enableval="$enable_no_padding"
11766   with_no_padding=$enableval
11767 else
11768   with_no_padding=$with_ext_funcs
11769 fi;
11770 echo "$as_me:11770: result: $with_no_padding" >&5
11771 echo "${ECHO_T}$with_no_padding" >&6
11772 test "x$with_no_padding" = xyes &&
11773 cat >>confdefs.h <<\EOF
11774 #define NCURSES_NO_PADDING 1
11775 EOF
11776
11777 echo "$as_me:11777: checking for ANSI C header files" >&5
11778 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11779 if test "${ac_cv_header_stdc+set}" = set; then
11780   echo $ECHO_N "(cached) $ECHO_C" >&6
11781 else
11782   cat >conftest.$ac_ext <<_ACEOF
11783 #line 11783 "configure"
11784 #include "confdefs.h"
11785 #include <stdlib.h>
11786 #include <stdarg.h>
11787 #include <string.h>
11788 #include <float.h>
11789
11790 _ACEOF
11791 if { (eval echo "$as_me:11791: \"$ac_cpp conftest.$ac_ext\"") >&5
11792   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11793   ac_status=$?
11794   egrep -v '^ *\+' conftest.er1 >conftest.err
11795   rm -f conftest.er1
11796   cat conftest.err >&5
11797   echo "$as_me:11797: \$? = $ac_status" >&5
11798   (exit $ac_status); } >/dev/null; then
11799   if test -s conftest.err; then
11800     ac_cpp_err=$ac_c_preproc_warn_flag
11801   else
11802     ac_cpp_err=
11803   fi
11804 else
11805   ac_cpp_err=yes
11806 fi
11807 if test -z "$ac_cpp_err"; then
11808   ac_cv_header_stdc=yes
11809 else
11810   echo "$as_me: failed program was:" >&5
11811   cat conftest.$ac_ext >&5
11812   ac_cv_header_stdc=no
11813 fi
11814 rm -f conftest.err conftest.$ac_ext
11815
11816 if test $ac_cv_header_stdc = yes; then
11817   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11818   cat >conftest.$ac_ext <<_ACEOF
11819 #line 11819 "configure"
11820 #include "confdefs.h"
11821 #include <string.h>
11822
11823 _ACEOF
11824 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11825   egrep "memchr" >/dev/null 2>&1; then
11826   :
11827 else
11828   ac_cv_header_stdc=no
11829 fi
11830 rm -rf conftest*
11831
11832 fi
11833
11834 if test $ac_cv_header_stdc = yes; then
11835   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11836   cat >conftest.$ac_ext <<_ACEOF
11837 #line 11837 "configure"
11838 #include "confdefs.h"
11839 #include <stdlib.h>
11840
11841 _ACEOF
11842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11843   egrep "free" >/dev/null 2>&1; then
11844   :
11845 else
11846   ac_cv_header_stdc=no
11847 fi
11848 rm -rf conftest*
11849
11850 fi
11851
11852 if test $ac_cv_header_stdc = yes; then
11853   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11854   if test "$cross_compiling" = yes; then
11855   :
11856 else
11857   cat >conftest.$ac_ext <<_ACEOF
11858 #line 11858 "configure"
11859 #include "confdefs.h"
11860 #include <ctype.h>
11861 #if ((' ' & 0x0FF) == 0x020)
11862 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11863 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11864 #else
11865 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11866                      || ('j' <= (c) && (c) <= 'r') \
11867                      || ('s' <= (c) && (c) <= 'z'))
11868 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11869 #endif
11870
11871 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11872 int
11873 main ()
11874 {
11875   int i;
11876   for (i = 0; i < 256; i++)
11877     if (XOR (islower (i), ISLOWER (i))
11878         || toupper (i) != TOUPPER (i))
11879       $ac_main_return(2);
11880   $ac_main_return (0);
11881 }
11882 _ACEOF
11883 rm -f conftest$ac_exeext
11884 if { (eval echo "$as_me:11884: \"$ac_link\"") >&5
11885   (eval $ac_link) 2>&5
11886   ac_status=$?
11887   echo "$as_me:11887: \$? = $ac_status" >&5
11888   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11889   { (eval echo "$as_me:11889: \"$ac_try\"") >&5
11890   (eval $ac_try) 2>&5
11891   ac_status=$?
11892   echo "$as_me:11892: \$? = $ac_status" >&5
11893   (exit $ac_status); }; }; then
11894   :
11895 else
11896   echo "$as_me: program exited with status $ac_status" >&5
11897 echo "$as_me: failed program was:" >&5
11898 cat conftest.$ac_ext >&5
11899 ac_cv_header_stdc=no
11900 fi
11901 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11902 fi
11903 fi
11904 fi
11905 echo "$as_me:11905: result: $ac_cv_header_stdc" >&5
11906 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11907 if test $ac_cv_header_stdc = yes; then
11908
11909 cat >>confdefs.h <<\EOF
11910 #define STDC_HEADERS 1
11911 EOF
11912
11913 fi
11914
11915 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11916
11917 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11918                   inttypes.h stdint.h unistd.h
11919 do
11920 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11921 echo "$as_me:11921: checking for $ac_header" >&5
11922 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11923 if eval "test \"\${$as_ac_Header+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 $ac_includes_default
11930 #include <$ac_header>
11931 _ACEOF
11932 rm -f conftest.$ac_objext
11933 if { (eval echo "$as_me:11933: \"$ac_compile\"") >&5
11934   (eval $ac_compile) 2>&5
11935   ac_status=$?
11936   echo "$as_me:11936: \$? = $ac_status" >&5
11937   (exit $ac_status); } &&
11938          { ac_try='test -s conftest.$ac_objext'
11939   { (eval echo "$as_me:11939: \"$ac_try\"") >&5
11940   (eval $ac_try) 2>&5
11941   ac_status=$?
11942   echo "$as_me:11942: \$? = $ac_status" >&5
11943   (exit $ac_status); }; }; then
11944   eval "$as_ac_Header=yes"
11945 else
11946   echo "$as_me: failed program was:" >&5
11947 cat conftest.$ac_ext >&5
11948 eval "$as_ac_Header=no"
11949 fi
11950 rm -f conftest.$ac_objext conftest.$ac_ext
11951 fi
11952 echo "$as_me:11952: result: `eval echo '${'$as_ac_Header'}'`" >&5
11953 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11954 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11955   cat >>confdefs.h <<EOF
11956 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11957 EOF
11958
11959 fi
11960 done
11961
11962 echo "$as_me:11962: checking for signed char" >&5
11963 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11964 if test "${ac_cv_type_signed_char+set}" = set; then
11965   echo $ECHO_N "(cached) $ECHO_C" >&6
11966 else
11967   cat >conftest.$ac_ext <<_ACEOF
11968 #line 11968 "configure"
11969 #include "confdefs.h"
11970 $ac_includes_default
11971 int
11972 main ()
11973 {
11974 if ((signed char *) 0)
11975   return 0;
11976 if (sizeof (signed char))
11977   return 0;
11978   ;
11979   return 0;
11980 }
11981 _ACEOF
11982 rm -f conftest.$ac_objext
11983 if { (eval echo "$as_me:11983: \"$ac_compile\"") >&5
11984   (eval $ac_compile) 2>&5
11985   ac_status=$?
11986   echo "$as_me:11986: \$? = $ac_status" >&5
11987   (exit $ac_status); } &&
11988          { ac_try='test -s conftest.$ac_objext'
11989   { (eval echo "$as_me:11989: \"$ac_try\"") >&5
11990   (eval $ac_try) 2>&5
11991   ac_status=$?
11992   echo "$as_me:11992: \$? = $ac_status" >&5
11993   (exit $ac_status); }; }; then
11994   ac_cv_type_signed_char=yes
11995 else
11996   echo "$as_me: failed program was:" >&5
11997 cat conftest.$ac_ext >&5
11998 ac_cv_type_signed_char=no
11999 fi
12000 rm -f conftest.$ac_objext conftest.$ac_ext
12001 fi
12002 echo "$as_me:12002: result: $ac_cv_type_signed_char" >&5
12003 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12004
12005 echo "$as_me:12005: checking size of signed char" >&5
12006 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12007 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12008   echo $ECHO_N "(cached) $ECHO_C" >&6
12009 else
12010   if test "$ac_cv_type_signed_char" = yes; then
12011   if test "$cross_compiling" = yes; then
12012   # Depending upon the size, compute the lo and hi bounds.
12013 cat >conftest.$ac_ext <<_ACEOF
12014 #line 12014 "configure"
12015 #include "confdefs.h"
12016 $ac_includes_default
12017 int
12018 main ()
12019 {
12020 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12021   ;
12022   return 0;
12023 }
12024 _ACEOF
12025 rm -f conftest.$ac_objext
12026 if { (eval echo "$as_me:12026: \"$ac_compile\"") >&5
12027   (eval $ac_compile) 2>&5
12028   ac_status=$?
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit $ac_status); } &&
12031          { ac_try='test -s conftest.$ac_objext'
12032   { (eval echo "$as_me:12032: \"$ac_try\"") >&5
12033   (eval $ac_try) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit $ac_status); }; }; then
12037   ac_lo=0 ac_mid=0
12038   while :; do
12039     cat >conftest.$ac_ext <<_ACEOF
12040 #line 12040 "configure"
12041 #include "confdefs.h"
12042 $ac_includes_default
12043 int
12044 main ()
12045 {
12046 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12047   ;
12048   return 0;
12049 }
12050 _ACEOF
12051 rm -f conftest.$ac_objext
12052 if { (eval echo "$as_me:12052: \"$ac_compile\"") >&5
12053   (eval $ac_compile) 2>&5
12054   ac_status=$?
12055   echo "$as_me:12055: \$? = $ac_status" >&5
12056   (exit $ac_status); } &&
12057          { ac_try='test -s conftest.$ac_objext'
12058   { (eval echo "$as_me:12058: \"$ac_try\"") >&5
12059   (eval $ac_try) 2>&5
12060   ac_status=$?
12061   echo "$as_me:12061: \$? = $ac_status" >&5
12062   (exit $ac_status); }; }; then
12063   ac_hi=$ac_mid; break
12064 else
12065   echo "$as_me: failed program was:" >&5
12066 cat conftest.$ac_ext >&5
12067 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12068 fi
12069 rm -f conftest.$ac_objext conftest.$ac_ext
12070   done
12071 else
12072   echo "$as_me: failed program was:" >&5
12073 cat conftest.$ac_ext >&5
12074 ac_hi=-1 ac_mid=-1
12075   while :; do
12076     cat >conftest.$ac_ext <<_ACEOF
12077 #line 12077 "configure"
12078 #include "confdefs.h"
12079 $ac_includes_default
12080 int
12081 main ()
12082 {
12083 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12084   ;
12085   return 0;
12086 }
12087 _ACEOF
12088 rm -f conftest.$ac_objext
12089 if { (eval echo "$as_me:12089: \"$ac_compile\"") >&5
12090   (eval $ac_compile) 2>&5
12091   ac_status=$?
12092   echo "$as_me:12092: \$? = $ac_status" >&5
12093   (exit $ac_status); } &&
12094          { ac_try='test -s conftest.$ac_objext'
12095   { (eval echo "$as_me:12095: \"$ac_try\"") >&5
12096   (eval $ac_try) 2>&5
12097   ac_status=$?
12098   echo "$as_me:12098: \$? = $ac_status" >&5
12099   (exit $ac_status); }; }; then
12100   ac_lo=$ac_mid; break
12101 else
12102   echo "$as_me: failed program was:" >&5
12103 cat conftest.$ac_ext >&5
12104 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12105 fi
12106 rm -f conftest.$ac_objext conftest.$ac_ext
12107   done
12108 fi
12109 rm -f conftest.$ac_objext conftest.$ac_ext
12110 # Binary search between lo and hi bounds.
12111 while test "x$ac_lo" != "x$ac_hi"; do
12112   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12113   cat >conftest.$ac_ext <<_ACEOF
12114 #line 12114 "configure"
12115 #include "confdefs.h"
12116 $ac_includes_default
12117 int
12118 main ()
12119 {
12120 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12121   ;
12122   return 0;
12123 }
12124 _ACEOF
12125 rm -f conftest.$ac_objext
12126 if { (eval echo "$as_me:12126: \"$ac_compile\"") >&5
12127   (eval $ac_compile) 2>&5
12128   ac_status=$?
12129   echo "$as_me:12129: \$? = $ac_status" >&5
12130   (exit $ac_status); } &&
12131          { ac_try='test -s conftest.$ac_objext'
12132   { (eval echo "$as_me:12132: \"$ac_try\"") >&5
12133   (eval $ac_try) 2>&5
12134   ac_status=$?
12135   echo "$as_me:12135: \$? = $ac_status" >&5
12136   (exit $ac_status); }; }; then
12137   ac_hi=$ac_mid
12138 else
12139   echo "$as_me: failed program was:" >&5
12140 cat conftest.$ac_ext >&5
12141 ac_lo=`expr $ac_mid + 1`
12142 fi
12143 rm -f conftest.$ac_objext conftest.$ac_ext
12144 done
12145 ac_cv_sizeof_signed_char=$ac_lo
12146 else
12147   if test "$cross_compiling" = yes; then
12148   { { echo "$as_me:12148: error: cannot run test program while cross compiling" >&5
12149 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12150    { (exit 1); exit 1; }; }
12151 else
12152   cat >conftest.$ac_ext <<_ACEOF
12153 #line 12153 "configure"
12154 #include "confdefs.h"
12155 $ac_includes_default
12156 int
12157 main ()
12158 {
12159 FILE *f = fopen ("conftest.val", "w");
12160 if (!f)
12161   $ac_main_return (1);
12162 fprintf (f, "%d", (sizeof (signed char)));
12163 fclose (f);
12164   ;
12165   return 0;
12166 }
12167 _ACEOF
12168 rm -f conftest$ac_exeext
12169 if { (eval echo "$as_me:12169: \"$ac_link\"") >&5
12170   (eval $ac_link) 2>&5
12171   ac_status=$?
12172   echo "$as_me:12172: \$? = $ac_status" >&5
12173   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12174   { (eval echo "$as_me:12174: \"$ac_try\"") >&5
12175   (eval $ac_try) 2>&5
12176   ac_status=$?
12177   echo "$as_me:12177: \$? = $ac_status" >&5
12178   (exit $ac_status); }; }; then
12179   ac_cv_sizeof_signed_char=`cat conftest.val`
12180 else
12181   echo "$as_me: program exited with status $ac_status" >&5
12182 echo "$as_me: failed program was:" >&5
12183 cat conftest.$ac_ext >&5
12184 fi
12185 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12186 fi
12187 fi
12188 rm -f conftest.val
12189 else
12190   ac_cv_sizeof_signed_char=0
12191 fi
12192 fi
12193 echo "$as_me:12193: result: $ac_cv_sizeof_signed_char" >&5
12194 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12195 cat >>confdefs.h <<EOF
12196 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12197 EOF
12198
12199 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12200         NCURSES_SBOOL="signed char"
12201 else
12202         NCURSES_SBOOL="char"
12203 fi
12204 echo "$as_me:12204: checking if you want to use signed Boolean array in term.h" >&5
12205 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12206
12207 # Check whether --enable-signed-char or --disable-signed-char was given.
12208 if test "${enable_signed_char+set}" = set; then
12209   enableval="$enable_signed_char"
12210   with_signed_char=$enableval
12211 else
12212   with_signed_char=no
12213 fi;
12214 echo "$as_me:12214: result: $with_signed_char" >&5
12215 echo "${ECHO_T}$with_signed_char" >&6
12216 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12217
12218 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12219 echo "$as_me:12219: checking if you want SIGWINCH handler" >&5
12220 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12221
12222 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12223 if test "${enable_sigwinch+set}" = set; then
12224   enableval="$enable_sigwinch"
12225   with_sigwinch=$enableval
12226 else
12227   with_sigwinch=$with_ext_funcs
12228 fi;
12229 echo "$as_me:12229: result: $with_sigwinch" >&5
12230 echo "${ECHO_T}$with_sigwinch" >&6
12231 test "x$with_sigwinch" = xyes &&
12232 cat >>confdefs.h <<\EOF
12233 #define USE_SIGWINCH 1
12234 EOF
12235
12236 ###   use option --enable-tcap-names to allow user to define new capabilities
12237 echo "$as_me:12237: checking if you want user-definable terminal capabilities like termcap" >&5
12238 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12239
12240 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12241 if test "${enable_tcap_names+set}" = set; then
12242   enableval="$enable_tcap_names"
12243   with_tcap_names=$enableval
12244 else
12245   with_tcap_names=$with_ext_funcs
12246 fi;
12247 echo "$as_me:12247: result: $with_tcap_names" >&5
12248 echo "${ECHO_T}$with_tcap_names" >&6
12249 NCURSES_XNAMES=0
12250 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12251
12252 ###############################################################################
12253 # These options are relatively safe to experiment with.
12254
12255 echo "$as_me:12255: checking if you want all development code" >&5
12256 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12257
12258 # Check whether --with-develop or --without-develop was given.
12259 if test "${with_develop+set}" = set; then
12260   withval="$with_develop"
12261   with_develop=$withval
12262 else
12263   with_develop=no
12264 fi;
12265 echo "$as_me:12265: result: $with_develop" >&5
12266 echo "${ECHO_T}$with_develop" >&6
12267
12268 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12269 echo "$as_me:12269: checking if you want hard-tabs code" >&5
12270 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12271
12272 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12273 if test "${enable_hard_tabs+set}" = set; then
12274   enableval="$enable_hard_tabs"
12275
12276 else
12277   enable_hard_tabs=$with_develop
12278 fi;
12279 echo "$as_me:12279: result: $enable_hard_tabs" >&5
12280 echo "${ECHO_T}$enable_hard_tabs" >&6
12281 test "x$enable_hard_tabs" = xyes &&
12282 cat >>confdefs.h <<\EOF
12283 #define USE_HARD_TABS 1
12284 EOF
12285
12286 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12287 echo "$as_me:12287: checking if you want limited support for xmc" >&5
12288 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12289
12290 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12291 if test "${enable_xmc_glitch+set}" = set; then
12292   enableval="$enable_xmc_glitch"
12293
12294 else
12295   enable_xmc_glitch=$with_develop
12296 fi;
12297 echo "$as_me:12297: result: $enable_xmc_glitch" >&5
12298 echo "${ECHO_T}$enable_xmc_glitch" >&6
12299 test "x$enable_xmc_glitch" = xyes &&
12300 cat >>confdefs.h <<\EOF
12301 #define USE_XMC_SUPPORT 1
12302 EOF
12303
12304 ###############################################################################
12305 # These are just experimental, probably should not be in a package:
12306
12307 echo "$as_me:12307: checking if you do not want to assume colors are white-on-black" >&5
12308 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12309
12310 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12311 if test "${enable_assumed_color+set}" = set; then
12312   enableval="$enable_assumed_color"
12313   with_assumed_color=$enableval
12314 else
12315   with_assumed_color=yes
12316 fi;
12317 echo "$as_me:12317: result: $with_assumed_color" >&5
12318 echo "${ECHO_T}$with_assumed_color" >&6
12319 test "x$with_assumed_color" = xyes &&
12320 cat >>confdefs.h <<\EOF
12321 #define USE_ASSUMED_COLOR 1
12322 EOF
12323
12324 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12325 echo "$as_me:12325: checking if you want hashmap scrolling-optimization code" >&5
12326 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12327
12328 # Check whether --enable-hashmap or --disable-hashmap was given.
12329 if test "${enable_hashmap+set}" = set; then
12330   enableval="$enable_hashmap"
12331   with_hashmap=$enableval
12332 else
12333   with_hashmap=yes
12334 fi;
12335 echo "$as_me:12335: result: $with_hashmap" >&5
12336 echo "${ECHO_T}$with_hashmap" >&6
12337 test "x$with_hashmap" = xyes &&
12338 cat >>confdefs.h <<\EOF
12339 #define USE_HASHMAP 1
12340 EOF
12341
12342 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12343 echo "$as_me:12343: checking if you want colorfgbg code" >&5
12344 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12345
12346 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12347 if test "${enable_colorfgbg+set}" = set; then
12348   enableval="$enable_colorfgbg"
12349   with_colorfgbg=$enableval
12350 else
12351   with_colorfgbg=no
12352 fi;
12353 echo "$as_me:12353: result: $with_colorfgbg" >&5
12354 echo "${ECHO_T}$with_colorfgbg" >&6
12355 test "x$with_colorfgbg" = xyes &&
12356 cat >>confdefs.h <<\EOF
12357 #define USE_COLORFGBG 1
12358 EOF
12359
12360 ###   use option --enable-interop to turn on use of bindings used for interop
12361 echo "$as_me:12361: checking if you want interop bindings" >&5
12362 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12363
12364 # Check whether --enable-interop or --disable-interop was given.
12365 if test "${enable_interop+set}" = set; then
12366   enableval="$enable_interop"
12367   with_exp_interop=$enableval
12368 else
12369   with_exp_interop=$cf_dft_interop
12370 fi;
12371 echo "$as_me:12371: result: $with_exp_interop" >&5
12372 echo "${ECHO_T}$with_exp_interop" >&6
12373
12374 NCURSES_INTEROP_FUNCS=0
12375 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12376
12377 # This is still experimental (20080329), but should ultimately be moved to
12378 # the script-block --with-normal, etc.
12379
12380 echo "$as_me:12380: checking if you want to link with the pthread library" >&5
12381 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12382
12383 # Check whether --with-pthread or --without-pthread was given.
12384 if test "${with_pthread+set}" = set; then
12385   withval="$with_pthread"
12386   with_pthread=$withval
12387 else
12388   with_pthread=no
12389 fi;
12390 echo "$as_me:12390: result: $with_pthread" >&5
12391 echo "${ECHO_T}$with_pthread" >&6
12392
12393 if test "$with_pthread" != no ; then
12394         echo "$as_me:12394: checking for pthread.h" >&5
12395 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12396 if test "${ac_cv_header_pthread_h+set}" = set; then
12397   echo $ECHO_N "(cached) $ECHO_C" >&6
12398 else
12399   cat >conftest.$ac_ext <<_ACEOF
12400 #line 12400 "configure"
12401 #include "confdefs.h"
12402 #include <pthread.h>
12403 _ACEOF
12404 if { (eval echo "$as_me:12404: \"$ac_cpp conftest.$ac_ext\"") >&5
12405   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12406   ac_status=$?
12407   egrep -v '^ *\+' conftest.er1 >conftest.err
12408   rm -f conftest.er1
12409   cat conftest.err >&5
12410   echo "$as_me:12410: \$? = $ac_status" >&5
12411   (exit $ac_status); } >/dev/null; then
12412   if test -s conftest.err; then
12413     ac_cpp_err=$ac_c_preproc_warn_flag
12414   else
12415     ac_cpp_err=
12416   fi
12417 else
12418   ac_cpp_err=yes
12419 fi
12420 if test -z "$ac_cpp_err"; then
12421   ac_cv_header_pthread_h=yes
12422 else
12423   echo "$as_me: failed program was:" >&5
12424   cat conftest.$ac_ext >&5
12425   ac_cv_header_pthread_h=no
12426 fi
12427 rm -f conftest.err conftest.$ac_ext
12428 fi
12429 echo "$as_me:12429: result: $ac_cv_header_pthread_h" >&5
12430 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12431 if test $ac_cv_header_pthread_h = yes; then
12432
12433 cat >>confdefs.h <<\EOF
12434 #define HAVE_PTHREADS_H 1
12435 EOF
12436
12437         for cf_lib_pthread in pthread c_r
12438         do
12439             echo "$as_me:12439: checking if we can link with the $cf_lib_pthread library" >&5
12440 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12441             cf_save_LIBS="$LIBS"
12442
12443 cf_add_libs="-l$cf_lib_pthread"
12444 # Filter out duplicates - this happens with badly-designed ".pc" files...
12445 for cf_add_1lib in $LIBS
12446 do
12447         for cf_add_2lib in $cf_add_libs
12448         do
12449                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12450                 then
12451                         cf_add_1lib=
12452                         break
12453                 fi
12454         done
12455         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12456 done
12457 LIBS="$cf_add_libs"
12458
12459             cat >conftest.$ac_ext <<_ACEOF
12460 #line 12460 "configure"
12461 #include "confdefs.h"
12462
12463 #include <pthread.h>
12464
12465 int
12466 main ()
12467 {
12468
12469                 int rc = pthread_create(0,0,0,0);
12470                 int r2 = pthread_mutexattr_settype(0, 0);
12471
12472   ;
12473   return 0;
12474 }
12475 _ACEOF
12476 rm -f conftest.$ac_objext conftest$ac_exeext
12477 if { (eval echo "$as_me:12477: \"$ac_link\"") >&5
12478   (eval $ac_link) 2>&5
12479   ac_status=$?
12480   echo "$as_me:12480: \$? = $ac_status" >&5
12481   (exit $ac_status); } &&
12482          { ac_try='test -s conftest$ac_exeext'
12483   { (eval echo "$as_me:12483: \"$ac_try\"") >&5
12484   (eval $ac_try) 2>&5
12485   ac_status=$?
12486   echo "$as_me:12486: \$? = $ac_status" >&5
12487   (exit $ac_status); }; }; then
12488   with_pthread=yes
12489 else
12490   echo "$as_me: failed program was:" >&5
12491 cat conftest.$ac_ext >&5
12492 with_pthread=no
12493 fi
12494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12495             LIBS="$cf_save_LIBS"
12496             echo "$as_me:12496: result: $with_pthread" >&5
12497 echo "${ECHO_T}$with_pthread" >&6
12498             test "$with_pthread" = yes && break
12499         done
12500
12501         if test "$with_pthread" = yes ; then
12502
12503 cf_add_libs="-l$cf_lib_pthread"
12504 # Filter out duplicates - this happens with badly-designed ".pc" files...
12505 for cf_add_1lib in $LIBS
12506 do
12507         for cf_add_2lib in $cf_add_libs
12508         do
12509                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12510                 then
12511                         cf_add_1lib=
12512                         break
12513                 fi
12514         done
12515         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12516 done
12517 LIBS="$cf_add_libs"
12518
12519 cat >>confdefs.h <<\EOF
12520 #define HAVE_LIBPTHREADS 1
12521 EOF
12522
12523         else
12524             { { echo "$as_me:12524: error: Cannot link with pthread library" >&5
12525 echo "$as_me: error: Cannot link with pthread library" >&2;}
12526    { (exit 1); exit 1; }; }
12527         fi
12528
12529 fi
12530
12531 fi
12532
12533 if test "x$with_pthread" != xno; then
12534         echo "$as_me:12534: checking for pthread_kill" >&5
12535 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12536 if test "${ac_cv_func_pthread_kill+set}" = set; then
12537   echo $ECHO_N "(cached) $ECHO_C" >&6
12538 else
12539   cat >conftest.$ac_ext <<_ACEOF
12540 #line 12540 "configure"
12541 #include "confdefs.h"
12542 /* System header to define __stub macros and hopefully few prototypes,
12543     which can conflict with char pthread_kill (); below.  */
12544 #include <assert.h>
12545 /* Override any gcc2 internal prototype to avoid an error.  */
12546 #ifdef __cplusplus
12547 extern "C"
12548 #endif
12549 /* We use char because int might match the return type of a gcc2
12550    builtin and then its argument prototype would still apply.  */
12551 char pthread_kill ();
12552 char (*f) ();
12553
12554 int
12555 main ()
12556 {
12557 /* The GNU C library defines this for functions which it implements
12558     to always fail with ENOSYS.  Some functions are actually named
12559     something starting with __ and the normal name is an alias.  */
12560 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12561 choke me
12562 #else
12563 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12564 #endif
12565
12566   ;
12567   return 0;
12568 }
12569 _ACEOF
12570 rm -f conftest.$ac_objext conftest$ac_exeext
12571 if { (eval echo "$as_me:12571: \"$ac_link\"") >&5
12572   (eval $ac_link) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); } &&
12576          { ac_try='test -s conftest$ac_exeext'
12577   { (eval echo "$as_me:12577: \"$ac_try\"") >&5
12578   (eval $ac_try) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); }; }; then
12582   ac_cv_func_pthread_kill=yes
12583 else
12584   echo "$as_me: failed program was:" >&5
12585 cat conftest.$ac_ext >&5
12586 ac_cv_func_pthread_kill=no
12587 fi
12588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12589 fi
12590 echo "$as_me:12590: result: $ac_cv_func_pthread_kill" >&5
12591 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12592 if test $ac_cv_func_pthread_kill = yes; then
12593
12594                 echo "$as_me:12594: checking if you want to allow EINTR in wgetch with pthreads" >&5
12595 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12596
12597 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12598 if test "${enable_pthreads_eintr+set}" = set; then
12599   enableval="$enable_pthreads_eintr"
12600   use_pthreads_eintr=$enableval
12601 else
12602   use_pthreads_eintr=no
12603 fi;
12604                 echo "$as_me:12604: result: $use_pthreads_eintr" >&5
12605 echo "${ECHO_T}$use_pthreads_eintr" >&6
12606                 if test "x$use_pthreads_eintr" = xyes ; then
12607
12608 cat >>confdefs.h <<\EOF
12609 #define USE_PTHREADS_EINTR 1
12610 EOF
12611
12612                 fi
12613 fi
12614
12615         echo "$as_me:12615: checking if you want to use weak-symbols for pthreads" >&5
12616 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12617
12618 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12619 if test "${enable_weak_symbols+set}" = set; then
12620   enableval="$enable_weak_symbols"
12621   use_weak_symbols=$enableval
12622 else
12623   use_weak_symbols=no
12624 fi;
12625         echo "$as_me:12625: result: $use_weak_symbols" >&5
12626 echo "${ECHO_T}$use_weak_symbols" >&6
12627         if test "x$use_weak_symbols" = xyes ; then
12628
12629 echo "$as_me:12629: checking if $CC supports weak symbols" >&5
12630 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12631 if test "${cf_cv_weak_symbols+set}" = set; then
12632   echo $ECHO_N "(cached) $ECHO_C" >&6
12633 else
12634
12635 cat >conftest.$ac_ext <<_ACEOF
12636 #line 12636 "configure"
12637 #include "confdefs.h"
12638
12639 #include <stdio.h>
12640 int
12641 main ()
12642 {
12643
12644 #if defined(__GNUC__)
12645 #  if defined __USE_ISOC99
12646 #    define _cat_pragma(exp)    _Pragma(#exp)
12647 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12648 #  else
12649 #    define _weak_pragma(exp)
12650 #  endif
12651 #  define _declare(name)        __extension__ extern __typeof__(name) name
12652 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12653 #endif
12654
12655 weak_symbol(fopen);
12656
12657   ;
12658   return 0;
12659 }
12660 _ACEOF
12661 rm -f conftest.$ac_objext
12662 if { (eval echo "$as_me:12662: \"$ac_compile\"") >&5
12663   (eval $ac_compile) 2>&5
12664   ac_status=$?
12665   echo "$as_me:12665: \$? = $ac_status" >&5
12666   (exit $ac_status); } &&
12667          { ac_try='test -s conftest.$ac_objext'
12668   { (eval echo "$as_me:12668: \"$ac_try\"") >&5
12669   (eval $ac_try) 2>&5
12670   ac_status=$?
12671   echo "$as_me:12671: \$? = $ac_status" >&5
12672   (exit $ac_status); }; }; then
12673   cf_cv_weak_symbols=yes
12674 else
12675   echo "$as_me: failed program was:" >&5
12676 cat conftest.$ac_ext >&5
12677 cf_cv_weak_symbols=no
12678 fi
12679 rm -f conftest.$ac_objext conftest.$ac_ext
12680
12681 fi
12682 echo "$as_me:12682: result: $cf_cv_weak_symbols" >&5
12683 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12684
12685         else
12686                 cf_cv_weak_symbols=no
12687         fi
12688
12689         if test "x$cf_cv_weak_symbols" = xyes ; then
12690
12691 cat >>confdefs.h <<\EOF
12692 #define USE_WEAK_SYMBOLS 1
12693 EOF
12694
12695         fi
12696 fi
12697
12698 PTHREAD=
12699 if test "x$with_pthread" = "xyes" ; then
12700
12701 cat >>confdefs.h <<\EOF
12702 #define USE_PTHREADS 1
12703 EOF
12704
12705         enable_reentrant=yes
12706         if test "x$cf_cv_weak_symbols" = xyes ; then
12707                 PTHREAD=-lpthread
12708         fi
12709 fi
12710
12711 # Reentrant code has to be opaque; there's little advantage to making ncurses
12712 # opaque outside of that, so there is no --enable-opaque option.  We can use
12713 # this option without --with-pthreads, but this will be always set for
12714 # pthreads.
12715 echo "$as_me:12715: checking if you want reentrant code" >&5
12716 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12717
12718 # Check whether --enable-reentrant or --disable-reentrant was given.
12719 if test "${enable_reentrant+set}" = set; then
12720   enableval="$enable_reentrant"
12721   with_reentrant=$enableval
12722 else
12723   with_reentrant=no
12724 fi;
12725 echo "$as_me:12725: result: $with_reentrant" >&5
12726 echo "${ECHO_T}$with_reentrant" >&6
12727 if test "x$with_reentrant" = xyes ; then
12728         cf_cv_enable_reentrant=1
12729         cf_cv_enable_opaque="NCURSES_INTERNALS"
12730         NCURSES_OPAQUE=1
12731         NCURSES_SIZE_T=int
12732         if test "x$cf_cv_weak_symbols" = xyes ; then
12733
12734 # remove pthread library from $LIBS
12735 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12736
12737 cf_add_libs="-lpthread"
12738 # Filter out duplicates - this happens with badly-designed ".pc" files...
12739 for cf_add_1lib in $TEST_LIBS
12740 do
12741         for cf_add_2lib in $cf_add_libs
12742         do
12743                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12744                 then
12745                         cf_add_1lib=
12746                         break
12747                 fi
12748         done
12749         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12750 done
12751 TEST_LIBS="$cf_add_libs"
12752
12753 cf_add_libs="-lpthread"
12754 # Filter out duplicates - this happens with badly-designed ".pc" files...
12755 for cf_add_1lib in $TEST_LIBS2
12756 do
12757         for cf_add_2lib in $cf_add_libs
12758         do
12759                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12760                 then
12761                         cf_add_1lib=
12762                         break
12763                 fi
12764         done
12765         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12766 done
12767 TEST_LIBS2="$cf_add_libs"
12768
12769         else
12770                 # when not using weak symbols but with_reentrant,
12771                 # add 't' to the library suffix on all platforms
12772                 # except cygwin, where we only do that if ALSO
12773                 # compiling with full thread support.
12774                 case "$host" in
12775                 (*cygwin* | *msys*)
12776                         if test "$with_pthread" = "yes" ; then
12777                                 if test "x$disable_lib_suffixes" = "xno" ; then
12778                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12779                                 fi
12780                         fi ;;
12781                 (*)
12782                         if test "x$disable_lib_suffixes" = "xno" ; then
12783                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12784                         fi
12785                         ;;
12786                 esac
12787         fi
12788
12789 cat >>confdefs.h <<\EOF
12790 #define USE_REENTRANT 1
12791 EOF
12792
12793 if test "${with_abi_version+set}" != set; then
12794         case $cf_cv_rel_version in
12795         (5.*)
12796                 cf_cv_rel_version=6.0
12797                 cf_cv_abi_version=6
12798                 { echo "$as_me:12798: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12799 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12800                 ;;
12801         esac
12802 fi
12803
12804 else
12805         cf_cv_enable_reentrant=0
12806         cf_cv_enable_opaque="NCURSES_OPAQUE"
12807         NCURSES_OPAQUE=0
12808         NCURSES_SIZE_T=short
12809 fi
12810
12811 ### Allow using a different wrap-prefix
12812 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12813         echo "$as_me:12813: checking for prefix used to wrap public variables" >&5
12814 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12815
12816 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12817 if test "${with_wrap_prefix+set}" = set; then
12818   withval="$with_wrap_prefix"
12819   NCURSES_WRAP_PREFIX=$withval
12820 else
12821   NCURSES_WRAP_PREFIX=_nc_
12822 fi;
12823         echo "$as_me:12823: result: $NCURSES_WRAP_PREFIX" >&5
12824 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12825 else
12826         NCURSES_WRAP_PREFIX=_nc_
12827 fi
12828
12829 cat >>confdefs.h <<EOF
12830 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12831 EOF
12832
12833 echo "$as_me:12833: checking if you want experimental safe-sprintf code" >&5
12834 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12835
12836 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12837 if test "${enable_safe_sprintf+set}" = set; then
12838   enableval="$enable_safe_sprintf"
12839   with_safe_sprintf=$enableval
12840 else
12841   with_safe_sprintf=no
12842 fi;
12843 echo "$as_me:12843: result: $with_safe_sprintf" >&5
12844 echo "${ECHO_T}$with_safe_sprintf" >&6
12845 test "x$with_safe_sprintf" = xyes &&
12846 cat >>confdefs.h <<\EOF
12847 #define USE_SAFE_SPRINTF 1
12848 EOF
12849
12850 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12851 # when hashmap is used scroll hints are useless
12852 if test "$with_hashmap" = no ; then
12853 echo "$as_me:12853: checking if you want to experiment without scrolling-hints code" >&5
12854 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12855
12856 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12857 if test "${enable_scroll_hints+set}" = set; then
12858   enableval="$enable_scroll_hints"
12859   with_scroll_hints=$enableval
12860 else
12861   with_scroll_hints=yes
12862 fi;
12863 echo "$as_me:12863: result: $with_scroll_hints" >&5
12864 echo "${ECHO_T}$with_scroll_hints" >&6
12865 test "x$with_scroll_hints" = xyes &&
12866 cat >>confdefs.h <<\EOF
12867 #define USE_SCROLL_HINTS 1
12868 EOF
12869
12870 fi
12871
12872 echo "$as_me:12872: checking if you want wgetch-events code" >&5
12873 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12874
12875 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12876 if test "${enable_wgetch_events+set}" = set; then
12877   enableval="$enable_wgetch_events"
12878   with_wgetch_events=$enableval
12879 else
12880   with_wgetch_events=no
12881 fi;
12882 echo "$as_me:12882: result: $with_wgetch_events" >&5
12883 echo "${ECHO_T}$with_wgetch_events" >&6
12884 test "x$with_wgetch_events" = xyes &&
12885 cat >>confdefs.h <<\EOF
12886 #define NCURSES_WGETCH_EVENTS 1
12887 EOF
12888
12889 ###############################################################################
12890
12891 ###     use option --disable-echo to suppress full display compiling commands
12892
12893 echo "$as_me:12893: checking if you want to see long compiling messages" >&5
12894 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12895
12896 # Check whether --enable-echo or --disable-echo was given.
12897 if test "${enable_echo+set}" = set; then
12898   enableval="$enable_echo"
12899   test "$enableval" != no && enableval=yes
12900         if test "$enableval" != "yes" ; then
12901
12902         ECHO_LT='--silent'
12903         ECHO_LD='@echo linking $@;'
12904         RULE_CC='@echo compiling $<'
12905         SHOW_CC='@echo compiling $@'
12906         ECHO_CC='@'
12907
12908         else
12909
12910         ECHO_LT=''
12911         ECHO_LD=''
12912         RULE_CC=''
12913         SHOW_CC=''
12914         ECHO_CC=''
12915
12916         fi
12917 else
12918   enableval=yes
12919
12920         ECHO_LT=''
12921         ECHO_LD=''
12922         RULE_CC=''
12923         SHOW_CC=''
12924         ECHO_CC=''
12925
12926 fi;
12927 echo "$as_me:12927: result: $enableval" >&5
12928 echo "${ECHO_T}$enableval" >&6
12929
12930 if test "x$enable_echo" = xyes; then
12931         ECHO_LINK=
12932 else
12933         ECHO_LINK='@ echo linking $@ ... ;'
12934         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12935         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12936 fi
12937
12938 ###     use option --enable-warnings to turn on all gcc warnings
12939 echo "$as_me:12939: checking if you want to see compiler warnings" >&5
12940 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12941
12942 # Check whether --enable-warnings or --disable-warnings was given.
12943 if test "${enable_warnings+set}" = set; then
12944   enableval="$enable_warnings"
12945   with_warnings=$enableval
12946 fi;
12947 echo "$as_me:12947: result: $with_warnings" >&5
12948 echo "${ECHO_T}$with_warnings" >&6
12949
12950 if test "x$with_warnings" = "xyes"; then
12951
12952         ADAFLAGS="$ADAFLAGS -gnatg"
12953
12954 INTEL_COMPILER=no
12955
12956 if test "$GCC" = yes ; then
12957         case $host_os in
12958         (linux*|gnu*)
12959                 echo "$as_me:12959: checking if this is really Intel C compiler" >&5
12960 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12961                 cf_save_CFLAGS="$CFLAGS"
12962                 CFLAGS="$CFLAGS -no-gcc"
12963                 cat >conftest.$ac_ext <<_ACEOF
12964 #line 12964 "configure"
12965 #include "confdefs.h"
12966
12967 int
12968 main ()
12969 {
12970
12971 #ifdef __INTEL_COMPILER
12972 #else
12973 make an error
12974 #endif
12975
12976   ;
12977   return 0;
12978 }
12979 _ACEOF
12980 rm -f conftest.$ac_objext
12981 if { (eval echo "$as_me:12981: \"$ac_compile\"") >&5
12982   (eval $ac_compile) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit $ac_status); } &&
12986          { ac_try='test -s conftest.$ac_objext'
12987   { (eval echo "$as_me:12987: \"$ac_try\"") >&5
12988   (eval $ac_try) 2>&5
12989   ac_status=$?
12990   echo "$as_me:12990: \$? = $ac_status" >&5
12991   (exit $ac_status); }; }; then
12992   INTEL_COMPILER=yes
12993 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12994
12995 else
12996   echo "$as_me: failed program was:" >&5
12997 cat conftest.$ac_ext >&5
12998 fi
12999 rm -f conftest.$ac_objext conftest.$ac_ext
13000                 CFLAGS="$cf_save_CFLAGS"
13001                 echo "$as_me:13001: result: $INTEL_COMPILER" >&5
13002 echo "${ECHO_T}$INTEL_COMPILER" >&6
13003                 ;;
13004         esac
13005 fi
13006
13007 CLANG_COMPILER=no
13008
13009 if test "$GCC" = yes ; then
13010         echo "$as_me:13010: checking if this is really Clang C compiler" >&5
13011 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13012         cf_save_CFLAGS="$CFLAGS"
13013         CFLAGS="$CFLAGS -Qunused-arguments"
13014         cat >conftest.$ac_ext <<_ACEOF
13015 #line 13015 "configure"
13016 #include "confdefs.h"
13017
13018 int
13019 main ()
13020 {
13021
13022 #ifdef __clang__
13023 #else
13024 make an error
13025 #endif
13026
13027   ;
13028   return 0;
13029 }
13030 _ACEOF
13031 rm -f conftest.$ac_objext
13032 if { (eval echo "$as_me:13032: \"$ac_compile\"") >&5
13033   (eval $ac_compile) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); } &&
13037          { ac_try='test -s conftest.$ac_objext'
13038   { (eval echo "$as_me:13038: \"$ac_try\"") >&5
13039   (eval $ac_try) 2>&5
13040   ac_status=$?
13041   echo "$as_me:13041: \$? = $ac_status" >&5
13042   (exit $ac_status); }; }; then
13043   CLANG_COMPILER=yes
13044 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13045
13046 else
13047   echo "$as_me: failed program was:" >&5
13048 cat conftest.$ac_ext >&5
13049 fi
13050 rm -f conftest.$ac_objext conftest.$ac_ext
13051         CFLAGS="$cf_save_CFLAGS"
13052         echo "$as_me:13052: result: $CLANG_COMPILER" >&5
13053 echo "${ECHO_T}$CLANG_COMPILER" >&6
13054 fi
13055
13056 cat > conftest.$ac_ext <<EOF
13057 #line 13057 "${as_me:-configure}"
13058 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13059 EOF
13060
13061 if test "$INTEL_COMPILER" = yes
13062 then
13063 # The "-wdXXX" options suppress warnings:
13064 # remark #1419: external declaration in primary source file
13065 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13066 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13067 # remark #193: zero used for undefined preprocessing identifier
13068 # remark #593: variable "curs_sb_left_arrow" was set but never used
13069 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13070 # remark #869: parameter "tw" was never referenced
13071 # remark #981: operands are evaluated in unspecified order
13072 # warning #279: controlling expression is constant
13073
13074         { echo "$as_me:13074: checking for $CC warning options..." >&5
13075 echo "$as_me: checking for $CC warning options..." >&6;}
13076         cf_save_CFLAGS="$CFLAGS"
13077         EXTRA_CFLAGS="-Wall"
13078         for cf_opt in \
13079                 wd1419 \
13080                 wd1683 \
13081                 wd1684 \
13082                 wd193 \
13083                 wd593 \
13084                 wd279 \
13085                 wd810 \
13086                 wd869 \
13087                 wd981
13088         do
13089                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13090                 if { (eval echo "$as_me:13090: \"$ac_compile\"") >&5
13091   (eval $ac_compile) 2>&5
13092   ac_status=$?
13093   echo "$as_me:13093: \$? = $ac_status" >&5
13094   (exit $ac_status); }; then
13095                         test -n "$verbose" && echo "$as_me:13095: result: ... -$cf_opt" >&5
13096 echo "${ECHO_T}... -$cf_opt" >&6
13097                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13098                 fi
13099         done
13100         CFLAGS="$cf_save_CFLAGS"
13101
13102 elif test "$GCC" = yes
13103 then
13104         { echo "$as_me:13104: checking for $CC warning options..." >&5
13105 echo "$as_me: checking for $CC warning options..." >&6;}
13106         cf_save_CFLAGS="$CFLAGS"
13107         EXTRA_CFLAGS=
13108         cf_warn_CONST=""
13109         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13110         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13111         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13112         for cf_opt in W Wall \
13113                 Wbad-function-cast \
13114                 Wcast-align \
13115                 Wcast-qual \
13116                 Wdeclaration-after-statement \
13117                 Wextra \
13118                 Winline \
13119                 Wmissing-declarations \
13120                 Wmissing-prototypes \
13121                 Wnested-externs \
13122                 Wpointer-arith \
13123                 Wshadow \
13124                 Wstrict-prototypes \
13125                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13126         do
13127                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13128                 if { (eval echo "$as_me:13128: \"$ac_compile\"") >&5
13129   (eval $ac_compile) 2>&5
13130   ac_status=$?
13131   echo "$as_me:13131: \$? = $ac_status" >&5
13132   (exit $ac_status); }; then
13133                         test -n "$verbose" && echo "$as_me:13133: result: ... -$cf_opt" >&5
13134 echo "${ECHO_T}... -$cf_opt" >&6
13135                         case $cf_opt in
13136                         (Wcast-qual)
13137                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13138                                 ;;
13139                         (Winline)
13140                                 case $GCC_VERSION in
13141                                 ([34].*)
13142                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13143
13144 echo "${as_me:-configure}:13144: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13145
13146                                         continue;;
13147                                 esac
13148                                 ;;
13149                         (Wpointer-arith)
13150                                 case $GCC_VERSION in
13151                                 ([12].*)
13152                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13153
13154 echo "${as_me:-configure}:13154: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13155
13156                                         continue;;
13157                                 esac
13158                                 ;;
13159                         esac
13160                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13161                 fi
13162         done
13163         CFLAGS="$cf_save_CFLAGS"
13164 fi
13165 rm -rf conftest*
13166
13167         if test "x$cf_with_cxx" = xyes ; then
13168
13169 INTEL_CPLUSPLUS=no
13170
13171 if test "$GCC" = yes ; then
13172         case $host_os in
13173         (linux*|gnu*)
13174                 echo "$as_me:13174: checking if this is really Intel C++ compiler" >&5
13175 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13176                 cf_save_CFLAGS="$CXXFLAGS"
13177                 CXXFLAGS="$CXXFLAGS -no-gcc"
13178                 cat >conftest.$ac_ext <<_ACEOF
13179 #line 13179 "configure"
13180 #include "confdefs.h"
13181
13182 int
13183 main ()
13184 {
13185
13186 #ifdef __INTEL_COMPILER
13187 #else
13188 make an error
13189 #endif
13190
13191   ;
13192   return 0;
13193 }
13194 _ACEOF
13195 rm -f conftest.$ac_objext
13196 if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
13197   (eval $ac_compile) 2>&5
13198   ac_status=$?
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit $ac_status); } &&
13201          { ac_try='test -s conftest.$ac_objext'
13202   { (eval echo "$as_me:13202: \"$ac_try\"") >&5
13203   (eval $ac_try) 2>&5
13204   ac_status=$?
13205   echo "$as_me:13205: \$? = $ac_status" >&5
13206   (exit $ac_status); }; }; then
13207   INTEL_CPLUSPLUS=yes
13208 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13209
13210 else
13211   echo "$as_me: failed program was:" >&5
13212 cat conftest.$ac_ext >&5
13213 fi
13214 rm -f conftest.$ac_objext conftest.$ac_ext
13215                 CXXFLAGS="$cf_save_CFLAGS"
13216                 echo "$as_me:13216: result: $INTEL_CPLUSPLUS" >&5
13217 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13218                 ;;
13219         esac
13220 fi
13221
13222 CLANG_CPLUSPLUS=no
13223
13224 if test "$GCC" = yes ; then
13225         echo "$as_me:13225: checking if this is really Clang C++ compiler" >&5
13226 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13227         cf_save_CFLAGS="$CXXFLAGS"
13228         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13229         cat >conftest.$ac_ext <<_ACEOF
13230 #line 13230 "configure"
13231 #include "confdefs.h"
13232
13233 int
13234 main ()
13235 {
13236
13237 #ifdef __clang__
13238 #else
13239 make an error
13240 #endif
13241
13242   ;
13243   return 0;
13244 }
13245 _ACEOF
13246 rm -f conftest.$ac_objext
13247 if { (eval echo "$as_me:13247: \"$ac_compile\"") >&5
13248   (eval $ac_compile) 2>&5
13249   ac_status=$?
13250   echo "$as_me:13250: \$? = $ac_status" >&5
13251   (exit $ac_status); } &&
13252          { ac_try='test -s conftest.$ac_objext'
13253   { (eval echo "$as_me:13253: \"$ac_try\"") >&5
13254   (eval $ac_try) 2>&5
13255   ac_status=$?
13256   echo "$as_me:13256: \$? = $ac_status" >&5
13257   (exit $ac_status); }; }; then
13258   CLANG_CPLUSPLUS=yes
13259 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13260
13261 else
13262   echo "$as_me: failed program was:" >&5
13263 cat conftest.$ac_ext >&5
13264 fi
13265 rm -f conftest.$ac_objext conftest.$ac_ext
13266         CXXFLAGS="$cf_save_CFLAGS"
13267         echo "$as_me:13267: result: $CLANG_CPLUSPLUS" >&5
13268 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13269 fi
13270
13271 ac_ext=cc
13272 ac_cpp='$CXXCPP $CPPFLAGS'
13273 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13274 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13275 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13276 ac_main_return=return
13277
13278 cat > conftest.$ac_ext <<EOF
13279 #line 13279 "configure"
13280 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13281 EOF
13282
13283 if test "$INTEL_CPLUSPLUS" = yes
13284 then
13285 # The "-wdXXX" options suppress warnings:
13286 # remark #1419: external declaration in primary source file
13287 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13288 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13289 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13290 # remark #193: zero used for undefined preprocessing identifier
13291 # remark #593: variable "curs_sb_left_arrow" was set but never used
13292 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13293 # remark #869: parameter "tw" was never referenced
13294 # remark #981: operands are evaluated in unspecified order
13295 # warning #269: invalid format string conversion
13296
13297         { echo "$as_me:13297: checking for $CC warning options..." >&5
13298 echo "$as_me: checking for $CC warning options..." >&6;}
13299         cf_save_CXXFLAGS="$CXXFLAGS"
13300         EXTRA_CXXFLAGS="-Wall"
13301         for cf_opt in \
13302                 wd1419 \
13303                 wd1682 \
13304                 wd1683 \
13305                 wd1684 \
13306                 wd193 \
13307                 wd279 \
13308                 wd593 \
13309                 wd810 \
13310                 wd869 \
13311                 wd981
13312         do
13313                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13314                 if { (eval echo "$as_me:13314: \"$ac_compile\"") >&5
13315   (eval $ac_compile) 2>&5
13316   ac_status=$?
13317   echo "$as_me:13317: \$? = $ac_status" >&5
13318   (exit $ac_status); }; then
13319                         test -n "$verbose" && echo "$as_me:13319: result: ... -$cf_opt" >&5
13320 echo "${ECHO_T}... -$cf_opt" >&6
13321                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13322                 fi
13323         done
13324         CXXFLAGS="$cf_save_CXXFLAGS"
13325
13326 elif test "$GXX" = yes
13327 then
13328         { echo "$as_me:13328: checking for $CXX warning options..." >&5
13329 echo "$as_me: checking for $CXX warning options..." >&6;}
13330         cf_save_CXXFLAGS="$CXXFLAGS"
13331         EXTRA_CXXFLAGS="-W -Wall"
13332         cf_gxx_extra_warnings=""
13333         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13334         case "$GCC_VERSION" in
13335         ([1-2].*)
13336                 ;;
13337         (*)
13338                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13339                 ;;
13340         esac
13341         for cf_opt in \
13342                 Wabi \
13343                 fabi-version=0 \
13344                 Wextra \
13345                 Wignored-qualifiers \
13346                 Wlogical-op \
13347                 Woverloaded-virtual \
13348                 Wsign-promo \
13349                 Wsynth \
13350                 Wold-style-cast \
13351                 Wcast-align \
13352                 Wcast-qual \
13353                 Wpointer-arith \
13354                 Wshadow \
13355                 Wundef $cf_gxx_extra_warnings Wno-unused
13356         do
13357                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13358                 if { (eval echo "$as_me:13358: \"$ac_compile\"") >&5
13359   (eval $ac_compile) 2>&5
13360   ac_status=$?
13361   echo "$as_me:13361: \$? = $ac_status" >&5
13362   (exit $ac_status); }; then
13363                         test -n "$verbose" && echo "$as_me:13363: result: ... -$cf_opt" >&5
13364 echo "${ECHO_T}... -$cf_opt" >&6
13365                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13366                 else
13367                         test -n "$verbose" && echo "$as_me:13367: result: ... no -$cf_opt" >&5
13368 echo "${ECHO_T}... no -$cf_opt" >&6
13369                 fi
13370         done
13371         CXXFLAGS="$cf_save_CXXFLAGS"
13372 fi
13373
13374 rm -rf conftest*
13375 ac_ext=c
13376 ac_cpp='$CPP $CPPFLAGS'
13377 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13378 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13379 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13380 ac_main_return=return
13381
13382         fi
13383 fi
13384
13385 if test "$GCC" = yes
13386 then
13387 cat > conftest.i <<EOF
13388 #ifndef GCC_PRINTF
13389 #define GCC_PRINTF 0
13390 #endif
13391 #ifndef GCC_SCANF
13392 #define GCC_SCANF 0
13393 #endif
13394 #ifndef GCC_NORETURN
13395 #define GCC_NORETURN /* nothing */
13396 #endif
13397 #ifndef GCC_UNUSED
13398 #define GCC_UNUSED /* nothing */
13399 #endif
13400 EOF
13401 if test "$GCC" = yes
13402 then
13403         { echo "$as_me:13403: checking for $CC __attribute__ directives..." >&5
13404 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13405 cat > conftest.$ac_ext <<EOF
13406 #line 13406 "${as_me:-configure}"
13407 #include "confdefs.h"
13408 #include "conftest.h"
13409 #include "conftest.i"
13410 #if     GCC_PRINTF
13411 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13412 #else
13413 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13414 #endif
13415 #if     GCC_SCANF
13416 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13417 #else
13418 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13419 #endif
13420 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13421 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13422 extern void foo(void) GCC_NORETURN;
13423 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13424 EOF
13425         cf_printf_attribute=no
13426         cf_scanf_attribute=no
13427         for cf_attribute in scanf printf unused noreturn
13428         do
13429
13430 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13431
13432                 cf_directive="__attribute__(($cf_attribute))"
13433                 echo "checking for $CC $cf_directive" 1>&5
13434
13435                 case $cf_attribute in
13436                 (printf)
13437                         cf_printf_attribute=yes
13438                         cat >conftest.h <<EOF
13439 #define GCC_$cf_ATTRIBUTE 1
13440 EOF
13441                         ;;
13442                 (scanf)
13443                         cf_scanf_attribute=yes
13444                         cat >conftest.h <<EOF
13445 #define GCC_$cf_ATTRIBUTE 1
13446 EOF
13447                         ;;
13448                 (*)
13449                         cat >conftest.h <<EOF
13450 #define GCC_$cf_ATTRIBUTE $cf_directive
13451 EOF
13452                         ;;
13453                 esac
13454
13455                 if { (eval echo "$as_me:13455: \"$ac_compile\"") >&5
13456   (eval $ac_compile) 2>&5
13457   ac_status=$?
13458   echo "$as_me:13458: \$? = $ac_status" >&5
13459   (exit $ac_status); }; then
13460                         test -n "$verbose" && echo "$as_me:13460: result: ... $cf_attribute" >&5
13461 echo "${ECHO_T}... $cf_attribute" >&6
13462                         cat conftest.h >>confdefs.h
13463                         case $cf_attribute in
13464                         (noreturn)
13465
13466 cat >>confdefs.h <<EOF
13467 #define GCC_NORETURN $cf_directive
13468 EOF
13469
13470                                 ;;
13471                         (printf)
13472                                 cf_value='/* nothing */'
13473                                 if test "$cf_printf_attribute" != no ; then
13474                                         cf_value='__attribute__((format(printf,fmt,var)))'
13475
13476 cat >>confdefs.h <<\EOF
13477 #define GCC_PRINTF 1
13478 EOF
13479
13480                                 fi
13481
13482 cat >>confdefs.h <<EOF
13483 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13484 EOF
13485
13486                                 ;;
13487                         (scanf)
13488                                 cf_value='/* nothing */'
13489                                 if test "$cf_scanf_attribute" != no ; then
13490                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13491
13492 cat >>confdefs.h <<\EOF
13493 #define GCC_SCANF 1
13494 EOF
13495
13496                                 fi
13497
13498 cat >>confdefs.h <<EOF
13499 #define GCC_SCANFLIKE(fmt,var) $cf_value
13500 EOF
13501
13502                                 ;;
13503                         (unused)
13504
13505 cat >>confdefs.h <<EOF
13506 #define GCC_UNUSED $cf_directive
13507 EOF
13508
13509                                 ;;
13510                         esac
13511                 fi
13512         done
13513 else
13514         fgrep define conftest.i >>confdefs.h
13515 fi
13516 rm -rf conftest*
13517 fi
13518
13519 echo "$as_me:13519: checking if you want to work around bogus compiler/loader warnings" >&5
13520 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13521
13522 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13523 if test "${enable_string_hacks+set}" = set; then
13524   enableval="$enable_string_hacks"
13525   with_string_hacks=$enableval
13526 else
13527   with_string_hacks=no
13528 fi;
13529 echo "$as_me:13529: result: $with_string_hacks" >&5
13530 echo "${ECHO_T}$with_string_hacks" >&6
13531
13532 if test "x$with_string_hacks" = "xyes"; then
13533
13534 cat >>confdefs.h <<\EOF
13535 #define USE_STRING_HACKS 1
13536 EOF
13537
13538         { echo "$as_me:13538: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13539 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13540
13541 for ac_func in strlcat strlcpy snprintf
13542 do
13543 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13544 echo "$as_me:13544: checking for $ac_func" >&5
13545 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13546 if eval "test \"\${$as_ac_var+set}\" = set"; then
13547   echo $ECHO_N "(cached) $ECHO_C" >&6
13548 else
13549   cat >conftest.$ac_ext <<_ACEOF
13550 #line 13550 "configure"
13551 #include "confdefs.h"
13552 /* System header to define __stub macros and hopefully few prototypes,
13553     which can conflict with char $ac_func (); below.  */
13554 #include <assert.h>
13555 /* Override any gcc2 internal prototype to avoid an error.  */
13556 #ifdef __cplusplus
13557 extern "C"
13558 #endif
13559 /* We use char because int might match the return type of a gcc2
13560    builtin and then its argument prototype would still apply.  */
13561 char $ac_func ();
13562 char (*f) ();
13563
13564 int
13565 main ()
13566 {
13567 /* The GNU C library defines this for functions which it implements
13568     to always fail with ENOSYS.  Some functions are actually named
13569     something starting with __ and the normal name is an alias.  */
13570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13571 choke me
13572 #else
13573 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13574 #endif
13575
13576   ;
13577   return 0;
13578 }
13579 _ACEOF
13580 rm -f conftest.$ac_objext conftest$ac_exeext
13581 if { (eval echo "$as_me:13581: \"$ac_link\"") >&5
13582   (eval $ac_link) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); } &&
13586          { ac_try='test -s conftest$ac_exeext'
13587   { (eval echo "$as_me:13587: \"$ac_try\"") >&5
13588   (eval $ac_try) 2>&5
13589   ac_status=$?
13590   echo "$as_me:13590: \$? = $ac_status" >&5
13591   (exit $ac_status); }; }; then
13592   eval "$as_ac_var=yes"
13593 else
13594   echo "$as_me: failed program was:" >&5
13595 cat conftest.$ac_ext >&5
13596 eval "$as_ac_var=no"
13597 fi
13598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13599 fi
13600 echo "$as_me:13600: result: `eval echo '${'$as_ac_var'}'`" >&5
13601 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13602 if test `eval echo '${'$as_ac_var'}'` = yes; then
13603   cat >>confdefs.h <<EOF
13604 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13605 EOF
13606
13607 fi
13608 done
13609
13610 fi
13611
13612 ###     use option --enable-assertions to turn on generation of assertion code
13613 echo "$as_me:13613: checking if you want to enable runtime assertions" >&5
13614 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13615
13616 # Check whether --enable-assertions or --disable-assertions was given.
13617 if test "${enable_assertions+set}" = set; then
13618   enableval="$enable_assertions"
13619   with_assertions=$enableval
13620 else
13621   with_assertions=no
13622 fi;
13623 echo "$as_me:13623: result: $with_assertions" >&5
13624 echo "${ECHO_T}$with_assertions" >&6
13625 if test -n "$GCC"
13626 then
13627         if test "$with_assertions" = no
13628         then
13629                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13630         else
13631
13632         ADAFLAGS="$ADAFLAGS -gnata"
13633
13634         fi
13635 fi
13636
13637 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13638
13639 echo "$as_me:13639: checking if you want to use dmalloc for testing" >&5
13640 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13641
13642 # Check whether --with-dmalloc or --without-dmalloc was given.
13643 if test "${with_dmalloc+set}" = set; then
13644   withval="$with_dmalloc"
13645
13646 cat >>confdefs.h <<EOF
13647 #define USE_DMALLOC 1
13648 EOF
13649
13650         : ${with_cflags:=-g}
13651         : ${with_no_leaks:=yes}
13652          with_dmalloc=yes
13653 else
13654   with_dmalloc=
13655 fi;
13656 echo "$as_me:13656: result: ${with_dmalloc:-no}" >&5
13657 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13658
13659 case .$with_cflags in
13660 (.*-g*)
13661         case .$CFLAGS in
13662         (.*-g*)
13663                 ;;
13664         (*)
13665
13666 cf_fix_cppflags=no
13667 cf_new_cflags=
13668 cf_new_cppflags=
13669 cf_new_extra_cppflags=
13670
13671 for cf_add_cflags in -g
13672 do
13673 case $cf_fix_cppflags in
13674 (no)
13675         case $cf_add_cflags in
13676         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13677                 case $cf_add_cflags in
13678                 (-D*)
13679                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13680
13681                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13682                                 && test -z "${cf_tst_cflags}" \
13683                                 && cf_fix_cppflags=yes
13684
13685                         if test $cf_fix_cppflags = yes ; then
13686                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13687                                 continue
13688                         elif test "${cf_tst_cflags}" = "\"'" ; then
13689                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13690                                 continue
13691                         fi
13692                         ;;
13693                 esac
13694                 case "$CPPFLAGS" in
13695                 (*$cf_add_cflags)
13696                         ;;
13697                 (*)
13698                         case $cf_add_cflags in
13699                         (-D*)
13700                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13701
13702 CPPFLAGS=`echo "$CPPFLAGS" | \
13703         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13704                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13705
13706                                 ;;
13707                         esac
13708                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13709                         ;;
13710                 esac
13711                 ;;
13712         (*)
13713                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13714                 ;;
13715         esac
13716         ;;
13717 (yes)
13718         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13719
13720         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13721
13722         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13723                 && test -z "${cf_tst_cflags}" \
13724                 && cf_fix_cppflags=no
13725         ;;
13726 esac
13727 done
13728
13729 if test -n "$cf_new_cflags" ; then
13730
13731         CFLAGS="$CFLAGS $cf_new_cflags"
13732 fi
13733
13734 if test -n "$cf_new_cppflags" ; then
13735
13736         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13737 fi
13738
13739 if test -n "$cf_new_extra_cppflags" ; then
13740
13741         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13742 fi
13743
13744                 ;;
13745         esac
13746         ;;
13747 esac
13748
13749 if test "$with_dmalloc" = yes ; then
13750         echo "$as_me:13750: checking for dmalloc.h" >&5
13751 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13752 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13753   echo $ECHO_N "(cached) $ECHO_C" >&6
13754 else
13755   cat >conftest.$ac_ext <<_ACEOF
13756 #line 13756 "configure"
13757 #include "confdefs.h"
13758 #include <dmalloc.h>
13759 _ACEOF
13760 if { (eval echo "$as_me:13760: \"$ac_cpp conftest.$ac_ext\"") >&5
13761   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13762   ac_status=$?
13763   egrep -v '^ *\+' conftest.er1 >conftest.err
13764   rm -f conftest.er1
13765   cat conftest.err >&5
13766   echo "$as_me:13766: \$? = $ac_status" >&5
13767   (exit $ac_status); } >/dev/null; then
13768   if test -s conftest.err; then
13769     ac_cpp_err=$ac_c_preproc_warn_flag
13770   else
13771     ac_cpp_err=
13772   fi
13773 else
13774   ac_cpp_err=yes
13775 fi
13776 if test -z "$ac_cpp_err"; then
13777   ac_cv_header_dmalloc_h=yes
13778 else
13779   echo "$as_me: failed program was:" >&5
13780   cat conftest.$ac_ext >&5
13781   ac_cv_header_dmalloc_h=no
13782 fi
13783 rm -f conftest.err conftest.$ac_ext
13784 fi
13785 echo "$as_me:13785: result: $ac_cv_header_dmalloc_h" >&5
13786 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13787 if test $ac_cv_header_dmalloc_h = yes; then
13788
13789 echo "$as_me:13789: checking for dmalloc_debug in -ldmalloc" >&5
13790 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13791 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13792   echo $ECHO_N "(cached) $ECHO_C" >&6
13793 else
13794   ac_check_lib_save_LIBS=$LIBS
13795 LIBS="-ldmalloc  $LIBS"
13796 cat >conftest.$ac_ext <<_ACEOF
13797 #line 13797 "configure"
13798 #include "confdefs.h"
13799
13800 /* Override any gcc2 internal prototype to avoid an error.  */
13801 #ifdef __cplusplus
13802 extern "C"
13803 #endif
13804 /* We use char because int might match the return type of a gcc2
13805    builtin and then its argument prototype would still apply.  */
13806 char dmalloc_debug ();
13807 int
13808 main ()
13809 {
13810 dmalloc_debug ();
13811   ;
13812   return 0;
13813 }
13814 _ACEOF
13815 rm -f conftest.$ac_objext conftest$ac_exeext
13816 if { (eval echo "$as_me:13816: \"$ac_link\"") >&5
13817   (eval $ac_link) 2>&5
13818   ac_status=$?
13819   echo "$as_me:13819: \$? = $ac_status" >&5
13820   (exit $ac_status); } &&
13821          { ac_try='test -s conftest$ac_exeext'
13822   { (eval echo "$as_me:13822: \"$ac_try\"") >&5
13823   (eval $ac_try) 2>&5
13824   ac_status=$?
13825   echo "$as_me:13825: \$? = $ac_status" >&5
13826   (exit $ac_status); }; }; then
13827   ac_cv_lib_dmalloc_dmalloc_debug=yes
13828 else
13829   echo "$as_me: failed program was:" >&5
13830 cat conftest.$ac_ext >&5
13831 ac_cv_lib_dmalloc_dmalloc_debug=no
13832 fi
13833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13834 LIBS=$ac_check_lib_save_LIBS
13835 fi
13836 echo "$as_me:13836: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13837 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13838 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13839   cat >>confdefs.h <<EOF
13840 #define HAVE_LIBDMALLOC 1
13841 EOF
13842
13843   LIBS="-ldmalloc $LIBS"
13844
13845 fi
13846
13847 fi
13848
13849 fi
13850
13851 echo "$as_me:13851: checking if you want to use dbmalloc for testing" >&5
13852 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13853
13854 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13855 if test "${with_dbmalloc+set}" = set; then
13856   withval="$with_dbmalloc"
13857
13858 cat >>confdefs.h <<EOF
13859 #define USE_DBMALLOC 1
13860 EOF
13861
13862         : ${with_cflags:=-g}
13863         : ${with_no_leaks:=yes}
13864          with_dbmalloc=yes
13865 else
13866   with_dbmalloc=
13867 fi;
13868 echo "$as_me:13868: result: ${with_dbmalloc:-no}" >&5
13869 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13870
13871 case .$with_cflags in
13872 (.*-g*)
13873         case .$CFLAGS in
13874         (.*-g*)
13875                 ;;
13876         (*)
13877
13878 cf_fix_cppflags=no
13879 cf_new_cflags=
13880 cf_new_cppflags=
13881 cf_new_extra_cppflags=
13882
13883 for cf_add_cflags in -g
13884 do
13885 case $cf_fix_cppflags in
13886 (no)
13887         case $cf_add_cflags in
13888         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13889                 case $cf_add_cflags in
13890                 (-D*)
13891                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13892
13893                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13894                                 && test -z "${cf_tst_cflags}" \
13895                                 && cf_fix_cppflags=yes
13896
13897                         if test $cf_fix_cppflags = yes ; then
13898                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13899                                 continue
13900                         elif test "${cf_tst_cflags}" = "\"'" ; then
13901                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13902                                 continue
13903                         fi
13904                         ;;
13905                 esac
13906                 case "$CPPFLAGS" in
13907                 (*$cf_add_cflags)
13908                         ;;
13909                 (*)
13910                         case $cf_add_cflags in
13911                         (-D*)
13912                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13913
13914 CPPFLAGS=`echo "$CPPFLAGS" | \
13915         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13916                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13917
13918                                 ;;
13919                         esac
13920                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13921                         ;;
13922                 esac
13923                 ;;
13924         (*)
13925                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13926                 ;;
13927         esac
13928         ;;
13929 (yes)
13930         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13931
13932         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13933
13934         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13935                 && test -z "${cf_tst_cflags}" \
13936                 && cf_fix_cppflags=no
13937         ;;
13938 esac
13939 done
13940
13941 if test -n "$cf_new_cflags" ; then
13942
13943         CFLAGS="$CFLAGS $cf_new_cflags"
13944 fi
13945
13946 if test -n "$cf_new_cppflags" ; then
13947
13948         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13949 fi
13950
13951 if test -n "$cf_new_extra_cppflags" ; then
13952
13953         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13954 fi
13955
13956                 ;;
13957         esac
13958         ;;
13959 esac
13960
13961 if test "$with_dbmalloc" = yes ; then
13962         echo "$as_me:13962: checking for dbmalloc.h" >&5
13963 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13964 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13965   echo $ECHO_N "(cached) $ECHO_C" >&6
13966 else
13967   cat >conftest.$ac_ext <<_ACEOF
13968 #line 13968 "configure"
13969 #include "confdefs.h"
13970 #include <dbmalloc.h>
13971 _ACEOF
13972 if { (eval echo "$as_me:13972: \"$ac_cpp conftest.$ac_ext\"") >&5
13973   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13974   ac_status=$?
13975   egrep -v '^ *\+' conftest.er1 >conftest.err
13976   rm -f conftest.er1
13977   cat conftest.err >&5
13978   echo "$as_me:13978: \$? = $ac_status" >&5
13979   (exit $ac_status); } >/dev/null; then
13980   if test -s conftest.err; then
13981     ac_cpp_err=$ac_c_preproc_warn_flag
13982   else
13983     ac_cpp_err=
13984   fi
13985 else
13986   ac_cpp_err=yes
13987 fi
13988 if test -z "$ac_cpp_err"; then
13989   ac_cv_header_dbmalloc_h=yes
13990 else
13991   echo "$as_me: failed program was:" >&5
13992   cat conftest.$ac_ext >&5
13993   ac_cv_header_dbmalloc_h=no
13994 fi
13995 rm -f conftest.err conftest.$ac_ext
13996 fi
13997 echo "$as_me:13997: result: $ac_cv_header_dbmalloc_h" >&5
13998 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13999 if test $ac_cv_header_dbmalloc_h = yes; then
14000
14001 echo "$as_me:14001: checking for debug_malloc in -ldbmalloc" >&5
14002 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14003 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14004   echo $ECHO_N "(cached) $ECHO_C" >&6
14005 else
14006   ac_check_lib_save_LIBS=$LIBS
14007 LIBS="-ldbmalloc  $LIBS"
14008 cat >conftest.$ac_ext <<_ACEOF
14009 #line 14009 "configure"
14010 #include "confdefs.h"
14011
14012 /* Override any gcc2 internal prototype to avoid an error.  */
14013 #ifdef __cplusplus
14014 extern "C"
14015 #endif
14016 /* We use char because int might match the return type of a gcc2
14017    builtin and then its argument prototype would still apply.  */
14018 char debug_malloc ();
14019 int
14020 main ()
14021 {
14022 debug_malloc ();
14023   ;
14024   return 0;
14025 }
14026 _ACEOF
14027 rm -f conftest.$ac_objext conftest$ac_exeext
14028 if { (eval echo "$as_me:14028: \"$ac_link\"") >&5
14029   (eval $ac_link) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit $ac_status); } &&
14033          { ac_try='test -s conftest$ac_exeext'
14034   { (eval echo "$as_me:14034: \"$ac_try\"") >&5
14035   (eval $ac_try) 2>&5
14036   ac_status=$?
14037   echo "$as_me:14037: \$? = $ac_status" >&5
14038   (exit $ac_status); }; }; then
14039   ac_cv_lib_dbmalloc_debug_malloc=yes
14040 else
14041   echo "$as_me: failed program was:" >&5
14042 cat conftest.$ac_ext >&5
14043 ac_cv_lib_dbmalloc_debug_malloc=no
14044 fi
14045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14046 LIBS=$ac_check_lib_save_LIBS
14047 fi
14048 echo "$as_me:14048: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14049 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14050 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14051   cat >>confdefs.h <<EOF
14052 #define HAVE_LIBDBMALLOC 1
14053 EOF
14054
14055   LIBS="-ldbmalloc $LIBS"
14056
14057 fi
14058
14059 fi
14060
14061 fi
14062
14063 echo "$as_me:14063: checking if you want to use valgrind for testing" >&5
14064 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14065
14066 # Check whether --with-valgrind or --without-valgrind was given.
14067 if test "${with_valgrind+set}" = set; then
14068   withval="$with_valgrind"
14069
14070 cat >>confdefs.h <<EOF
14071 #define USE_VALGRIND 1
14072 EOF
14073
14074         : ${with_cflags:=-g}
14075         : ${with_no_leaks:=yes}
14076          with_valgrind=yes
14077 else
14078   with_valgrind=
14079 fi;
14080 echo "$as_me:14080: result: ${with_valgrind:-no}" >&5
14081 echo "${ECHO_T}${with_valgrind:-no}" >&6
14082
14083 case .$with_cflags in
14084 (.*-g*)
14085         case .$CFLAGS in
14086         (.*-g*)
14087                 ;;
14088         (*)
14089
14090 cf_fix_cppflags=no
14091 cf_new_cflags=
14092 cf_new_cppflags=
14093 cf_new_extra_cppflags=
14094
14095 for cf_add_cflags in -g
14096 do
14097 case $cf_fix_cppflags in
14098 (no)
14099         case $cf_add_cflags in
14100         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14101                 case $cf_add_cflags in
14102                 (-D*)
14103                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14104
14105                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14106                                 && test -z "${cf_tst_cflags}" \
14107                                 && cf_fix_cppflags=yes
14108
14109                         if test $cf_fix_cppflags = yes ; then
14110                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14111                                 continue
14112                         elif test "${cf_tst_cflags}" = "\"'" ; then
14113                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14114                                 continue
14115                         fi
14116                         ;;
14117                 esac
14118                 case "$CPPFLAGS" in
14119                 (*$cf_add_cflags)
14120                         ;;
14121                 (*)
14122                         case $cf_add_cflags in
14123                         (-D*)
14124                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14125
14126 CPPFLAGS=`echo "$CPPFLAGS" | \
14127         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14128                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14129
14130                                 ;;
14131                         esac
14132                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14133                         ;;
14134                 esac
14135                 ;;
14136         (*)
14137                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14138                 ;;
14139         esac
14140         ;;
14141 (yes)
14142         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14143
14144         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14145
14146         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14147                 && test -z "${cf_tst_cflags}" \
14148                 && cf_fix_cppflags=no
14149         ;;
14150 esac
14151 done
14152
14153 if test -n "$cf_new_cflags" ; then
14154
14155         CFLAGS="$CFLAGS $cf_new_cflags"
14156 fi
14157
14158 if test -n "$cf_new_cppflags" ; then
14159
14160         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14161 fi
14162
14163 if test -n "$cf_new_extra_cppflags" ; then
14164
14165         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14166 fi
14167
14168                 ;;
14169         esac
14170         ;;
14171 esac
14172
14173 echo "$as_me:14173: checking if you want to perform memory-leak testing" >&5
14174 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14175
14176 # Check whether --enable-leaks or --disable-leaks was given.
14177 if test "${enable_leaks+set}" = set; then
14178   enableval="$enable_leaks"
14179   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14180 else
14181   : ${with_no_leaks:=no}
14182 fi;
14183 echo "$as_me:14183: result: $with_no_leaks" >&5
14184 echo "${ECHO_T}$with_no_leaks" >&6
14185
14186 if test "$with_no_leaks" = yes ; then
14187
14188 cat >>confdefs.h <<\EOF
14189 #define NO_LEAKS 1
14190 EOF
14191
14192 cat >>confdefs.h <<\EOF
14193 #define YY_NO_LEAKS 1
14194 EOF
14195
14196 fi
14197
14198 cat >>confdefs.h <<\EOF
14199 #define HAVE_NC_ALLOC_H 1
14200 EOF
14201
14202 ###     use option --enable-expanded to generate certain macros as functions
14203
14204 # Check whether --enable-expanded or --disable-expanded was given.
14205 if test "${enable_expanded+set}" = set; then
14206   enableval="$enable_expanded"
14207   test "x$enableval" = xyes &&
14208 cat >>confdefs.h <<\EOF
14209 #define NCURSES_EXPANDED 1
14210 EOF
14211
14212 fi;
14213
14214 ###     use option --disable-macros to suppress macros in favor of functions
14215
14216 # Check whether --enable-macros or --disable-macros was given.
14217 if test "${enable_macros+set}" = set; then
14218   enableval="$enable_macros"
14219   test "$enableval" = no &&
14220 cat >>confdefs.h <<\EOF
14221 #define NCURSES_NOMACROS 1
14222 EOF
14223
14224 fi;
14225
14226 # Normally we only add trace() to the debug-library.  Allow this to be
14227 # extended to all models of the ncurses library:
14228 cf_all_traces=no
14229 case "$CFLAGS $CPPFLAGS" in
14230 (*-DTRACE*)
14231         cf_all_traces=yes
14232         ;;
14233 esac
14234
14235 echo "$as_me:14235: checking whether to add trace feature to all models" >&5
14236 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14237
14238 # Check whether --with-trace or --without-trace was given.
14239 if test "${with_trace+set}" = set; then
14240   withval="$with_trace"
14241   cf_with_trace=$withval
14242 else
14243   cf_with_trace=$cf_all_traces
14244 fi;
14245 echo "$as_me:14245: result: $cf_with_trace" >&5
14246 echo "${ECHO_T}$cf_with_trace" >&6
14247
14248 if test "x$cf_with_trace" = xyes ; then
14249         LIB_TRACING=all
14250         ADA_TRACE=TRUE
14251
14252 cf_fix_cppflags=no
14253 cf_new_cflags=
14254 cf_new_cppflags=
14255 cf_new_extra_cppflags=
14256
14257 for cf_add_cflags in -DTRACE
14258 do
14259 case $cf_fix_cppflags in
14260 (no)
14261         case $cf_add_cflags in
14262         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14263                 case $cf_add_cflags in
14264                 (-D*)
14265                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14266
14267                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14268                                 && test -z "${cf_tst_cflags}" \
14269                                 && cf_fix_cppflags=yes
14270
14271                         if test $cf_fix_cppflags = yes ; then
14272                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14273                                 continue
14274                         elif test "${cf_tst_cflags}" = "\"'" ; then
14275                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14276                                 continue
14277                         fi
14278                         ;;
14279                 esac
14280                 case "$CPPFLAGS" in
14281                 (*$cf_add_cflags)
14282                         ;;
14283                 (*)
14284                         case $cf_add_cflags in
14285                         (-D*)
14286                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14287
14288 CPPFLAGS=`echo "$CPPFLAGS" | \
14289         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14290                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14291
14292                                 ;;
14293                         esac
14294                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14295                         ;;
14296                 esac
14297                 ;;
14298         (*)
14299                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14300                 ;;
14301         esac
14302         ;;
14303 (yes)
14304         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14305
14306         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14307
14308         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14309                 && test -z "${cf_tst_cflags}" \
14310                 && cf_fix_cppflags=no
14311         ;;
14312 esac
14313 done
14314
14315 if test -n "$cf_new_cflags" ; then
14316
14317         CFLAGS="$CFLAGS $cf_new_cflags"
14318 fi
14319
14320 if test -n "$cf_new_cppflags" ; then
14321
14322         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14323 fi
14324
14325 if test -n "$cf_new_extra_cppflags" ; then
14326
14327         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14328 fi
14329
14330 else
14331         LIB_TRACING=DEBUG
14332         ADA_TRACE=FALSE
14333 fi
14334
14335 echo "$as_me:14335: checking if we want to use GNAT projects" >&5
14336 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14337
14338 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14339 if test "${enable_gnat_projects+set}" = set; then
14340   enableval="$enable_gnat_projects"
14341   test "$enableval" != no && enableval=yes
14342         if test "$enableval" != "yes" ; then
14343     enable_gnat_projects=no
14344         else
14345                 enable_gnat_projects=yes
14346         fi
14347 else
14348   enableval=yes
14349         enable_gnat_projects=yes
14350
14351 fi;
14352 echo "$as_me:14352: result: $enable_gnat_projects" >&5
14353 echo "${ECHO_T}$enable_gnat_projects" >&6
14354
14355 ###     Checks for libraries.
14356 case $cf_cv_system_name in
14357 (*mingw32*|*mingw64*)
14358         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14359         LIBS=" -lpsapi $LIBS"
14360         ;;
14361 (*)
14362 echo "$as_me:14362: checking for gettimeofday" >&5
14363 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14364 if test "${ac_cv_func_gettimeofday+set}" = set; then
14365   echo $ECHO_N "(cached) $ECHO_C" >&6
14366 else
14367   cat >conftest.$ac_ext <<_ACEOF
14368 #line 14368 "configure"
14369 #include "confdefs.h"
14370 /* System header to define __stub macros and hopefully few prototypes,
14371     which can conflict with char gettimeofday (); below.  */
14372 #include <assert.h>
14373 /* Override any gcc2 internal prototype to avoid an error.  */
14374 #ifdef __cplusplus
14375 extern "C"
14376 #endif
14377 /* We use char because int might match the return type of a gcc2
14378    builtin and then its argument prototype would still apply.  */
14379 char gettimeofday ();
14380 char (*f) ();
14381
14382 int
14383 main ()
14384 {
14385 /* The GNU C library defines this for functions which it implements
14386     to always fail with ENOSYS.  Some functions are actually named
14387     something starting with __ and the normal name is an alias.  */
14388 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14389 choke me
14390 #else
14391 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14392 #endif
14393
14394   ;
14395   return 0;
14396 }
14397 _ACEOF
14398 rm -f conftest.$ac_objext conftest$ac_exeext
14399 if { (eval echo "$as_me:14399: \"$ac_link\"") >&5
14400   (eval $ac_link) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); } &&
14404          { ac_try='test -s conftest$ac_exeext'
14405   { (eval echo "$as_me:14405: \"$ac_try\"") >&5
14406   (eval $ac_try) 2>&5
14407   ac_status=$?
14408   echo "$as_me:14408: \$? = $ac_status" >&5
14409   (exit $ac_status); }; }; then
14410   ac_cv_func_gettimeofday=yes
14411 else
14412   echo "$as_me: failed program was:" >&5
14413 cat conftest.$ac_ext >&5
14414 ac_cv_func_gettimeofday=no
14415 fi
14416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14417 fi
14418 echo "$as_me:14418: result: $ac_cv_func_gettimeofday" >&5
14419 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14420 if test $ac_cv_func_gettimeofday = yes; then
14421
14422 cat >>confdefs.h <<\EOF
14423 #define HAVE_GETTIMEOFDAY 1
14424 EOF
14425
14426 else
14427
14428 echo "$as_me:14428: checking for gettimeofday in -lbsd" >&5
14429 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14430 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14431   echo $ECHO_N "(cached) $ECHO_C" >&6
14432 else
14433   ac_check_lib_save_LIBS=$LIBS
14434 LIBS="-lbsd  $LIBS"
14435 cat >conftest.$ac_ext <<_ACEOF
14436 #line 14436 "configure"
14437 #include "confdefs.h"
14438
14439 /* Override any gcc2 internal prototype to avoid an error.  */
14440 #ifdef __cplusplus
14441 extern "C"
14442 #endif
14443 /* We use char because int might match the return type of a gcc2
14444    builtin and then its argument prototype would still apply.  */
14445 char gettimeofday ();
14446 int
14447 main ()
14448 {
14449 gettimeofday ();
14450   ;
14451   return 0;
14452 }
14453 _ACEOF
14454 rm -f conftest.$ac_objext conftest$ac_exeext
14455 if { (eval echo "$as_me:14455: \"$ac_link\"") >&5
14456   (eval $ac_link) 2>&5
14457   ac_status=$?
14458   echo "$as_me:14458: \$? = $ac_status" >&5
14459   (exit $ac_status); } &&
14460          { ac_try='test -s conftest$ac_exeext'
14461   { (eval echo "$as_me:14461: \"$ac_try\"") >&5
14462   (eval $ac_try) 2>&5
14463   ac_status=$?
14464   echo "$as_me:14464: \$? = $ac_status" >&5
14465   (exit $ac_status); }; }; then
14466   ac_cv_lib_bsd_gettimeofday=yes
14467 else
14468   echo "$as_me: failed program was:" >&5
14469 cat conftest.$ac_ext >&5
14470 ac_cv_lib_bsd_gettimeofday=no
14471 fi
14472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14473 LIBS=$ac_check_lib_save_LIBS
14474 fi
14475 echo "$as_me:14475: result: $ac_cv_lib_bsd_gettimeofday" >&5
14476 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14477 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14478
14479 cat >>confdefs.h <<\EOF
14480 #define HAVE_GETTIMEOFDAY 1
14481 EOF
14482
14483 cf_add_libs="-lbsd"
14484 # Filter out duplicates - this happens with badly-designed ".pc" files...
14485 for cf_add_1lib in $LIBS
14486 do
14487         for cf_add_2lib in $cf_add_libs
14488         do
14489                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14490                 then
14491                         cf_add_1lib=
14492                         break
14493                 fi
14494         done
14495         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14496 done
14497 LIBS="$cf_add_libs"
14498
14499 fi
14500
14501 fi
14502         ;;
14503 esac
14504
14505 echo "$as_me:14505: checking if -lm needed for math functions" >&5
14506 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14507 if test "${cf_cv_need_libm+set}" = set; then
14508   echo $ECHO_N "(cached) $ECHO_C" >&6
14509 else
14510
14511         cat >conftest.$ac_ext <<_ACEOF
14512 #line 14512 "configure"
14513 #include "confdefs.h"
14514
14515         #include <stdio.h>
14516         #include <math.h>
14517
14518 int
14519 main ()
14520 {
14521 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14522   ;
14523   return 0;
14524 }
14525 _ACEOF
14526 rm -f conftest.$ac_objext conftest$ac_exeext
14527 if { (eval echo "$as_me:14527: \"$ac_link\"") >&5
14528   (eval $ac_link) 2>&5
14529   ac_status=$?
14530   echo "$as_me:14530: \$? = $ac_status" >&5
14531   (exit $ac_status); } &&
14532          { ac_try='test -s conftest$ac_exeext'
14533   { (eval echo "$as_me:14533: \"$ac_try\"") >&5
14534   (eval $ac_try) 2>&5
14535   ac_status=$?
14536   echo "$as_me:14536: \$? = $ac_status" >&5
14537   (exit $ac_status); }; }; then
14538   cf_cv_need_libm=no
14539 else
14540   echo "$as_me: failed program was:" >&5
14541 cat conftest.$ac_ext >&5
14542 cf_cv_need_libm=yes
14543 fi
14544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14545 fi
14546 echo "$as_me:14546: result: $cf_cv_need_libm" >&5
14547 echo "${ECHO_T}$cf_cv_need_libm" >&6
14548 if test "$cf_cv_need_libm" = yes
14549 then
14550 MATH_LIB=-lm
14551 fi
14552
14553 ###     Checks for header files.
14554 echo "$as_me:14554: checking for ANSI C header files" >&5
14555 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14556 if test "${ac_cv_header_stdc+set}" = set; then
14557   echo $ECHO_N "(cached) $ECHO_C" >&6
14558 else
14559   cat >conftest.$ac_ext <<_ACEOF
14560 #line 14560 "configure"
14561 #include "confdefs.h"
14562 #include <stdlib.h>
14563 #include <stdarg.h>
14564 #include <string.h>
14565 #include <float.h>
14566
14567 _ACEOF
14568 if { (eval echo "$as_me:14568: \"$ac_cpp conftest.$ac_ext\"") >&5
14569   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14570   ac_status=$?
14571   egrep -v '^ *\+' conftest.er1 >conftest.err
14572   rm -f conftest.er1
14573   cat conftest.err >&5
14574   echo "$as_me:14574: \$? = $ac_status" >&5
14575   (exit $ac_status); } >/dev/null; then
14576   if test -s conftest.err; then
14577     ac_cpp_err=$ac_c_preproc_warn_flag
14578   else
14579     ac_cpp_err=
14580   fi
14581 else
14582   ac_cpp_err=yes
14583 fi
14584 if test -z "$ac_cpp_err"; then
14585   ac_cv_header_stdc=yes
14586 else
14587   echo "$as_me: failed program was:" >&5
14588   cat conftest.$ac_ext >&5
14589   ac_cv_header_stdc=no
14590 fi
14591 rm -f conftest.err conftest.$ac_ext
14592
14593 if test $ac_cv_header_stdc = yes; then
14594   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14595   cat >conftest.$ac_ext <<_ACEOF
14596 #line 14596 "configure"
14597 #include "confdefs.h"
14598 #include <string.h>
14599
14600 _ACEOF
14601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14602   egrep "memchr" >/dev/null 2>&1; then
14603   :
14604 else
14605   ac_cv_header_stdc=no
14606 fi
14607 rm -rf conftest*
14608
14609 fi
14610
14611 if test $ac_cv_header_stdc = yes; then
14612   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14613   cat >conftest.$ac_ext <<_ACEOF
14614 #line 14614 "configure"
14615 #include "confdefs.h"
14616 #include <stdlib.h>
14617
14618 _ACEOF
14619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14620   egrep "free" >/dev/null 2>&1; then
14621   :
14622 else
14623   ac_cv_header_stdc=no
14624 fi
14625 rm -rf conftest*
14626
14627 fi
14628
14629 if test $ac_cv_header_stdc = yes; then
14630   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14631   if test "$cross_compiling" = yes; then
14632   :
14633 else
14634   cat >conftest.$ac_ext <<_ACEOF
14635 #line 14635 "configure"
14636 #include "confdefs.h"
14637 #include <ctype.h>
14638 #if ((' ' & 0x0FF) == 0x020)
14639 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14640 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14641 #else
14642 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14643                      || ('j' <= (c) && (c) <= 'r') \
14644                      || ('s' <= (c) && (c) <= 'z'))
14645 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14646 #endif
14647
14648 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14649 int
14650 main ()
14651 {
14652   int i;
14653   for (i = 0; i < 256; i++)
14654     if (XOR (islower (i), ISLOWER (i))
14655         || toupper (i) != TOUPPER (i))
14656       $ac_main_return(2);
14657   $ac_main_return (0);
14658 }
14659 _ACEOF
14660 rm -f conftest$ac_exeext
14661 if { (eval echo "$as_me:14661: \"$ac_link\"") >&5
14662   (eval $ac_link) 2>&5
14663   ac_status=$?
14664   echo "$as_me:14664: \$? = $ac_status" >&5
14665   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14666   { (eval echo "$as_me:14666: \"$ac_try\"") >&5
14667   (eval $ac_try) 2>&5
14668   ac_status=$?
14669   echo "$as_me:14669: \$? = $ac_status" >&5
14670   (exit $ac_status); }; }; then
14671   :
14672 else
14673   echo "$as_me: program exited with status $ac_status" >&5
14674 echo "$as_me: failed program was:" >&5
14675 cat conftest.$ac_ext >&5
14676 ac_cv_header_stdc=no
14677 fi
14678 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14679 fi
14680 fi
14681 fi
14682 echo "$as_me:14682: result: $ac_cv_header_stdc" >&5
14683 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14684 if test $ac_cv_header_stdc = yes; then
14685
14686 cat >>confdefs.h <<\EOF
14687 #define STDC_HEADERS 1
14688 EOF
14689
14690 fi
14691
14692 ac_header_dirent=no
14693 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14694   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14695 echo "$as_me:14695: checking for $ac_hdr that defines DIR" >&5
14696 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14697 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14698   echo $ECHO_N "(cached) $ECHO_C" >&6
14699 else
14700   cat >conftest.$ac_ext <<_ACEOF
14701 #line 14701 "configure"
14702 #include "confdefs.h"
14703 #include <sys/types.h>
14704 #include <$ac_hdr>
14705
14706 int
14707 main ()
14708 {
14709 if ((DIR *) 0)
14710 return 0;
14711   ;
14712   return 0;
14713 }
14714 _ACEOF
14715 rm -f conftest.$ac_objext
14716 if { (eval echo "$as_me:14716: \"$ac_compile\"") >&5
14717   (eval $ac_compile) 2>&5
14718   ac_status=$?
14719   echo "$as_me:14719: \$? = $ac_status" >&5
14720   (exit $ac_status); } &&
14721          { ac_try='test -s conftest.$ac_objext'
14722   { (eval echo "$as_me:14722: \"$ac_try\"") >&5
14723   (eval $ac_try) 2>&5
14724   ac_status=$?
14725   echo "$as_me:14725: \$? = $ac_status" >&5
14726   (exit $ac_status); }; }; then
14727   eval "$as_ac_Header=yes"
14728 else
14729   echo "$as_me: failed program was:" >&5
14730 cat conftest.$ac_ext >&5
14731 eval "$as_ac_Header=no"
14732 fi
14733 rm -f conftest.$ac_objext conftest.$ac_ext
14734 fi
14735 echo "$as_me:14735: result: `eval echo '${'$as_ac_Header'}'`" >&5
14736 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14737 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14738   cat >>confdefs.h <<EOF
14739 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14740 EOF
14741
14742 ac_header_dirent=$ac_hdr; break
14743 fi
14744
14745 done
14746 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14747 if test $ac_header_dirent = dirent.h; then
14748   echo "$as_me:14748: checking for opendir in -ldir" >&5
14749 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14750 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14751   echo $ECHO_N "(cached) $ECHO_C" >&6
14752 else
14753   ac_check_lib_save_LIBS=$LIBS
14754 LIBS="-ldir  $LIBS"
14755 cat >conftest.$ac_ext <<_ACEOF
14756 #line 14756 "configure"
14757 #include "confdefs.h"
14758
14759 /* Override any gcc2 internal prototype to avoid an error.  */
14760 #ifdef __cplusplus
14761 extern "C"
14762 #endif
14763 /* We use char because int might match the return type of a gcc2
14764    builtin and then its argument prototype would still apply.  */
14765 char opendir ();
14766 int
14767 main ()
14768 {
14769 opendir ();
14770   ;
14771   return 0;
14772 }
14773 _ACEOF
14774 rm -f conftest.$ac_objext conftest$ac_exeext
14775 if { (eval echo "$as_me:14775: \"$ac_link\"") >&5
14776   (eval $ac_link) 2>&5
14777   ac_status=$?
14778   echo "$as_me:14778: \$? = $ac_status" >&5
14779   (exit $ac_status); } &&
14780          { ac_try='test -s conftest$ac_exeext'
14781   { (eval echo "$as_me:14781: \"$ac_try\"") >&5
14782   (eval $ac_try) 2>&5
14783   ac_status=$?
14784   echo "$as_me:14784: \$? = $ac_status" >&5
14785   (exit $ac_status); }; }; then
14786   ac_cv_lib_dir_opendir=yes
14787 else
14788   echo "$as_me: failed program was:" >&5
14789 cat conftest.$ac_ext >&5
14790 ac_cv_lib_dir_opendir=no
14791 fi
14792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14793 LIBS=$ac_check_lib_save_LIBS
14794 fi
14795 echo "$as_me:14795: result: $ac_cv_lib_dir_opendir" >&5
14796 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14797 if test $ac_cv_lib_dir_opendir = yes; then
14798   LIBS="$LIBS -ldir"
14799 fi
14800
14801 else
14802   echo "$as_me:14802: checking for opendir in -lx" >&5
14803 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14804 if test "${ac_cv_lib_x_opendir+set}" = set; then
14805   echo $ECHO_N "(cached) $ECHO_C" >&6
14806 else
14807   ac_check_lib_save_LIBS=$LIBS
14808 LIBS="-lx  $LIBS"
14809 cat >conftest.$ac_ext <<_ACEOF
14810 #line 14810 "configure"
14811 #include "confdefs.h"
14812
14813 /* Override any gcc2 internal prototype to avoid an error.  */
14814 #ifdef __cplusplus
14815 extern "C"
14816 #endif
14817 /* We use char because int might match the return type of a gcc2
14818    builtin and then its argument prototype would still apply.  */
14819 char opendir ();
14820 int
14821 main ()
14822 {
14823 opendir ();
14824   ;
14825   return 0;
14826 }
14827 _ACEOF
14828 rm -f conftest.$ac_objext conftest$ac_exeext
14829 if { (eval echo "$as_me:14829: \"$ac_link\"") >&5
14830   (eval $ac_link) 2>&5
14831   ac_status=$?
14832   echo "$as_me:14832: \$? = $ac_status" >&5
14833   (exit $ac_status); } &&
14834          { ac_try='test -s conftest$ac_exeext'
14835   { (eval echo "$as_me:14835: \"$ac_try\"") >&5
14836   (eval $ac_try) 2>&5
14837   ac_status=$?
14838   echo "$as_me:14838: \$? = $ac_status" >&5
14839   (exit $ac_status); }; }; then
14840   ac_cv_lib_x_opendir=yes
14841 else
14842   echo "$as_me: failed program was:" >&5
14843 cat conftest.$ac_ext >&5
14844 ac_cv_lib_x_opendir=no
14845 fi
14846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14847 LIBS=$ac_check_lib_save_LIBS
14848 fi
14849 echo "$as_me:14849: result: $ac_cv_lib_x_opendir" >&5
14850 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14851 if test $ac_cv_lib_x_opendir = yes; then
14852   LIBS="$LIBS -lx"
14853 fi
14854
14855 fi
14856
14857 echo "$as_me:14857: checking whether time.h and sys/time.h may both be included" >&5
14858 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14859 if test "${ac_cv_header_time+set}" = set; then
14860   echo $ECHO_N "(cached) $ECHO_C" >&6
14861 else
14862   cat >conftest.$ac_ext <<_ACEOF
14863 #line 14863 "configure"
14864 #include "confdefs.h"
14865 #include <sys/types.h>
14866 #include <sys/time.h>
14867 #include <time.h>
14868
14869 int
14870 main ()
14871 {
14872 if ((struct tm *) 0)
14873 return 0;
14874   ;
14875   return 0;
14876 }
14877 _ACEOF
14878 rm -f conftest.$ac_objext
14879 if { (eval echo "$as_me:14879: \"$ac_compile\"") >&5
14880   (eval $ac_compile) 2>&5
14881   ac_status=$?
14882   echo "$as_me:14882: \$? = $ac_status" >&5
14883   (exit $ac_status); } &&
14884          { ac_try='test -s conftest.$ac_objext'
14885   { (eval echo "$as_me:14885: \"$ac_try\"") >&5
14886   (eval $ac_try) 2>&5
14887   ac_status=$?
14888   echo "$as_me:14888: \$? = $ac_status" >&5
14889   (exit $ac_status); }; }; then
14890   ac_cv_header_time=yes
14891 else
14892   echo "$as_me: failed program was:" >&5
14893 cat conftest.$ac_ext >&5
14894 ac_cv_header_time=no
14895 fi
14896 rm -f conftest.$ac_objext conftest.$ac_ext
14897 fi
14898 echo "$as_me:14898: result: $ac_cv_header_time" >&5
14899 echo "${ECHO_T}$ac_cv_header_time" >&6
14900 if test $ac_cv_header_time = yes; then
14901
14902 cat >>confdefs.h <<\EOF
14903 #define TIME_WITH_SYS_TIME 1
14904 EOF
14905
14906 fi
14907
14908 cf_regex_func=no
14909
14910 cf_regex_libs="regex re"
14911 case $host_os in
14912 (mingw*)
14913         cf_regex_libs="gnurx $cf_regex_libs"
14914         ;;
14915 esac
14916
14917 echo "$as_me:14917: checking for regcomp" >&5
14918 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14919 if test "${ac_cv_func_regcomp+set}" = set; then
14920   echo $ECHO_N "(cached) $ECHO_C" >&6
14921 else
14922   cat >conftest.$ac_ext <<_ACEOF
14923 #line 14923 "configure"
14924 #include "confdefs.h"
14925 /* System header to define __stub macros and hopefully few prototypes,
14926     which can conflict with char regcomp (); below.  */
14927 #include <assert.h>
14928 /* Override any gcc2 internal prototype to avoid an error.  */
14929 #ifdef __cplusplus
14930 extern "C"
14931 #endif
14932 /* We use char because int might match the return type of a gcc2
14933    builtin and then its argument prototype would still apply.  */
14934 char regcomp ();
14935 char (*f) ();
14936
14937 int
14938 main ()
14939 {
14940 /* The GNU C library defines this for functions which it implements
14941     to always fail with ENOSYS.  Some functions are actually named
14942     something starting with __ and the normal name is an alias.  */
14943 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14944 choke me
14945 #else
14946 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14947 #endif
14948
14949   ;
14950   return 0;
14951 }
14952 _ACEOF
14953 rm -f conftest.$ac_objext conftest$ac_exeext
14954 if { (eval echo "$as_me:14954: \"$ac_link\"") >&5
14955   (eval $ac_link) 2>&5
14956   ac_status=$?
14957   echo "$as_me:14957: \$? = $ac_status" >&5
14958   (exit $ac_status); } &&
14959          { ac_try='test -s conftest$ac_exeext'
14960   { (eval echo "$as_me:14960: \"$ac_try\"") >&5
14961   (eval $ac_try) 2>&5
14962   ac_status=$?
14963   echo "$as_me:14963: \$? = $ac_status" >&5
14964   (exit $ac_status); }; }; then
14965   ac_cv_func_regcomp=yes
14966 else
14967   echo "$as_me: failed program was:" >&5
14968 cat conftest.$ac_ext >&5
14969 ac_cv_func_regcomp=no
14970 fi
14971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14972 fi
14973 echo "$as_me:14973: result: $ac_cv_func_regcomp" >&5
14974 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14975 if test $ac_cv_func_regcomp = yes; then
14976   cf_regex_func=regcomp
14977 else
14978
14979         for cf_regex_lib in $cf_regex_libs
14980         do
14981                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14982 echo "$as_me:14982: checking for regcomp in -l$cf_regex_lib" >&5
14983 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14984 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14985   echo $ECHO_N "(cached) $ECHO_C" >&6
14986 else
14987   ac_check_lib_save_LIBS=$LIBS
14988 LIBS="-l$cf_regex_lib  $LIBS"
14989 cat >conftest.$ac_ext <<_ACEOF
14990 #line 14990 "configure"
14991 #include "confdefs.h"
14992
14993 /* Override any gcc2 internal prototype to avoid an error.  */
14994 #ifdef __cplusplus
14995 extern "C"
14996 #endif
14997 /* We use char because int might match the return type of a gcc2
14998    builtin and then its argument prototype would still apply.  */
14999 char regcomp ();
15000 int
15001 main ()
15002 {
15003 regcomp ();
15004   ;
15005   return 0;
15006 }
15007 _ACEOF
15008 rm -f conftest.$ac_objext conftest$ac_exeext
15009 if { (eval echo "$as_me:15009: \"$ac_link\"") >&5
15010   (eval $ac_link) 2>&5
15011   ac_status=$?
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); } &&
15014          { ac_try='test -s conftest$ac_exeext'
15015   { (eval echo "$as_me:15015: \"$ac_try\"") >&5
15016   (eval $ac_try) 2>&5
15017   ac_status=$?
15018   echo "$as_me:15018: \$? = $ac_status" >&5
15019   (exit $ac_status); }; }; then
15020   eval "$as_ac_Lib=yes"
15021 else
15022   echo "$as_me: failed program was:" >&5
15023 cat conftest.$ac_ext >&5
15024 eval "$as_ac_Lib=no"
15025 fi
15026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15027 LIBS=$ac_check_lib_save_LIBS
15028 fi
15029 echo "$as_me:15029: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15030 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15031 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15032
15033 cf_add_libs="-l$cf_regex_lib"
15034 # Filter out duplicates - this happens with badly-designed ".pc" files...
15035 for cf_add_1lib in $LIBS
15036 do
15037         for cf_add_2lib in $cf_add_libs
15038         do
15039                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15040                 then
15041                         cf_add_1lib=
15042                         break
15043                 fi
15044         done
15045         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15046 done
15047 LIBS="$cf_add_libs"
15048
15049                                 cf_regex_func=regcomp
15050                                 break
15051 fi
15052
15053         done
15054
15055 fi
15056
15057 if test "$cf_regex_func" = no ; then
15058         echo "$as_me:15058: checking for compile" >&5
15059 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15060 if test "${ac_cv_func_compile+set}" = set; then
15061   echo $ECHO_N "(cached) $ECHO_C" >&6
15062 else
15063   cat >conftest.$ac_ext <<_ACEOF
15064 #line 15064 "configure"
15065 #include "confdefs.h"
15066 /* System header to define __stub macros and hopefully few prototypes,
15067     which can conflict with char compile (); below.  */
15068 #include <assert.h>
15069 /* Override any gcc2 internal prototype to avoid an error.  */
15070 #ifdef __cplusplus
15071 extern "C"
15072 #endif
15073 /* We use char because int might match the return type of a gcc2
15074    builtin and then its argument prototype would still apply.  */
15075 char compile ();
15076 char (*f) ();
15077
15078 int
15079 main ()
15080 {
15081 /* The GNU C library defines this for functions which it implements
15082     to always fail with ENOSYS.  Some functions are actually named
15083     something starting with __ and the normal name is an alias.  */
15084 #if defined (__stub_compile) || defined (__stub___compile)
15085 choke me
15086 #else
15087 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15088 #endif
15089
15090   ;
15091   return 0;
15092 }
15093 _ACEOF
15094 rm -f conftest.$ac_objext conftest$ac_exeext
15095 if { (eval echo "$as_me:15095: \"$ac_link\"") >&5
15096   (eval $ac_link) 2>&5
15097   ac_status=$?
15098   echo "$as_me:15098: \$? = $ac_status" >&5
15099   (exit $ac_status); } &&
15100          { ac_try='test -s conftest$ac_exeext'
15101   { (eval echo "$as_me:15101: \"$ac_try\"") >&5
15102   (eval $ac_try) 2>&5
15103   ac_status=$?
15104   echo "$as_me:15104: \$? = $ac_status" >&5
15105   (exit $ac_status); }; }; then
15106   ac_cv_func_compile=yes
15107 else
15108   echo "$as_me: failed program was:" >&5
15109 cat conftest.$ac_ext >&5
15110 ac_cv_func_compile=no
15111 fi
15112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15113 fi
15114 echo "$as_me:15114: result: $ac_cv_func_compile" >&5
15115 echo "${ECHO_T}$ac_cv_func_compile" >&6
15116 if test $ac_cv_func_compile = yes; then
15117   cf_regex_func=compile
15118 else
15119
15120                 echo "$as_me:15120: checking for compile in -lgen" >&5
15121 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15122 if test "${ac_cv_lib_gen_compile+set}" = set; then
15123   echo $ECHO_N "(cached) $ECHO_C" >&6
15124 else
15125   ac_check_lib_save_LIBS=$LIBS
15126 LIBS="-lgen  $LIBS"
15127 cat >conftest.$ac_ext <<_ACEOF
15128 #line 15128 "configure"
15129 #include "confdefs.h"
15130
15131 /* Override any gcc2 internal prototype to avoid an error.  */
15132 #ifdef __cplusplus
15133 extern "C"
15134 #endif
15135 /* We use char because int might match the return type of a gcc2
15136    builtin and then its argument prototype would still apply.  */
15137 char compile ();
15138 int
15139 main ()
15140 {
15141 compile ();
15142   ;
15143   return 0;
15144 }
15145 _ACEOF
15146 rm -f conftest.$ac_objext conftest$ac_exeext
15147 if { (eval echo "$as_me:15147: \"$ac_link\"") >&5
15148   (eval $ac_link) 2>&5
15149   ac_status=$?
15150   echo "$as_me:15150: \$? = $ac_status" >&5
15151   (exit $ac_status); } &&
15152          { ac_try='test -s conftest$ac_exeext'
15153   { (eval echo "$as_me:15153: \"$ac_try\"") >&5
15154   (eval $ac_try) 2>&5
15155   ac_status=$?
15156   echo "$as_me:15156: \$? = $ac_status" >&5
15157   (exit $ac_status); }; }; then
15158   ac_cv_lib_gen_compile=yes
15159 else
15160   echo "$as_me: failed program was:" >&5
15161 cat conftest.$ac_ext >&5
15162 ac_cv_lib_gen_compile=no
15163 fi
15164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15165 LIBS=$ac_check_lib_save_LIBS
15166 fi
15167 echo "$as_me:15167: result: $ac_cv_lib_gen_compile" >&5
15168 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15169 if test $ac_cv_lib_gen_compile = yes; then
15170
15171 cf_add_libs="-lgen"
15172 # Filter out duplicates - this happens with badly-designed ".pc" files...
15173 for cf_add_1lib in $LIBS
15174 do
15175         for cf_add_2lib in $cf_add_libs
15176         do
15177                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15178                 then
15179                         cf_add_1lib=
15180                         break
15181                 fi
15182         done
15183         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15184 done
15185 LIBS="$cf_add_libs"
15186
15187                                 cf_regex_func=compile
15188 fi
15189
15190 fi
15191
15192 fi
15193
15194 if test "$cf_regex_func" = no ; then
15195         { echo "$as_me:15195: WARNING: cannot find regular expression library" >&5
15196 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15197 fi
15198
15199 echo "$as_me:15199: checking for regular-expression headers" >&5
15200 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15201 if test "${cf_cv_regex_hdrs+set}" = set; then
15202   echo $ECHO_N "(cached) $ECHO_C" >&6
15203 else
15204
15205 cf_cv_regex_hdrs=no
15206 case $cf_regex_func in
15207 (compile)
15208         for cf_regex_hdr in regexp.h regexpr.h
15209         do
15210                 cat >conftest.$ac_ext <<_ACEOF
15211 #line 15211 "configure"
15212 #include "confdefs.h"
15213 #include <$cf_regex_hdr>
15214 int
15215 main ()
15216 {
15217
15218                         char *p = compile("", "", "", 0);
15219                         int x = step("", "");
15220
15221   ;
15222   return 0;
15223 }
15224 _ACEOF
15225 rm -f conftest.$ac_objext conftest$ac_exeext
15226 if { (eval echo "$as_me:15226: \"$ac_link\"") >&5
15227   (eval $ac_link) 2>&5
15228   ac_status=$?
15229   echo "$as_me:15229: \$? = $ac_status" >&5
15230   (exit $ac_status); } &&
15231          { ac_try='test -s conftest$ac_exeext'
15232   { (eval echo "$as_me:15232: \"$ac_try\"") >&5
15233   (eval $ac_try) 2>&5
15234   ac_status=$?
15235   echo "$as_me:15235: \$? = $ac_status" >&5
15236   (exit $ac_status); }; }; then
15237
15238                         cf_cv_regex_hdrs=$cf_regex_hdr
15239                         break
15240
15241 else
15242   echo "$as_me: failed program was:" >&5
15243 cat conftest.$ac_ext >&5
15244 fi
15245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15246         done
15247         ;;
15248 (*)
15249         for cf_regex_hdr in regex.h
15250         do
15251                 cat >conftest.$ac_ext <<_ACEOF
15252 #line 15252 "configure"
15253 #include "confdefs.h"
15254 #include <sys/types.h>
15255 #include <$cf_regex_hdr>
15256 int
15257 main ()
15258 {
15259
15260                         regex_t *p;
15261                         int x = regcomp(p, "", 0);
15262                         int y = regexec(p, "", 0, 0, 0);
15263                         regfree(p);
15264
15265   ;
15266   return 0;
15267 }
15268 _ACEOF
15269 rm -f conftest.$ac_objext conftest$ac_exeext
15270 if { (eval echo "$as_me:15270: \"$ac_link\"") >&5
15271   (eval $ac_link) 2>&5
15272   ac_status=$?
15273   echo "$as_me:15273: \$? = $ac_status" >&5
15274   (exit $ac_status); } &&
15275          { ac_try='test -s conftest$ac_exeext'
15276   { (eval echo "$as_me:15276: \"$ac_try\"") >&5
15277   (eval $ac_try) 2>&5
15278   ac_status=$?
15279   echo "$as_me:15279: \$? = $ac_status" >&5
15280   (exit $ac_status); }; }; then
15281
15282                         cf_cv_regex_hdrs=$cf_regex_hdr
15283                         break
15284
15285 else
15286   echo "$as_me: failed program was:" >&5
15287 cat conftest.$ac_ext >&5
15288 fi
15289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15290         done
15291         ;;
15292 esac
15293
15294 fi
15295 echo "$as_me:15295: result: $cf_cv_regex_hdrs" >&5
15296 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15297
15298 case $cf_cv_regex_hdrs in
15299         (no)            { echo "$as_me:15299: WARNING: no regular expression header found" >&5
15300 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15301         (regex.h)
15302 cat >>confdefs.h <<\EOF
15303 #define HAVE_REGEX_H_FUNCS 1
15304 EOF
15305  ;;
15306         (regexp.h)
15307 cat >>confdefs.h <<\EOF
15308 #define HAVE_REGEXP_H_FUNCS 1
15309 EOF
15310  ;;
15311         (regexpr.h)
15312 cat >>confdefs.h <<\EOF
15313 #define HAVE_REGEXPR_H_FUNCS 1
15314 EOF
15315  ;;
15316 esac
15317
15318 for ac_header in \
15319 fcntl.h \
15320 getopt.h \
15321 limits.h \
15322 locale.h \
15323 math.h \
15324 poll.h \
15325 sys/bsdtypes.h \
15326 sys/ioctl.h \
15327 sys/param.h \
15328 sys/poll.h \
15329 sys/select.h \
15330 sys/time.h \
15331 sys/times.h \
15332 ttyent.h \
15333 unistd.h \
15334 wctype.h \
15335
15336 do
15337 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15338 echo "$as_me:15338: checking for $ac_header" >&5
15339 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15340 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15341   echo $ECHO_N "(cached) $ECHO_C" >&6
15342 else
15343   cat >conftest.$ac_ext <<_ACEOF
15344 #line 15344 "configure"
15345 #include "confdefs.h"
15346 #include <$ac_header>
15347 _ACEOF
15348 if { (eval echo "$as_me:15348: \"$ac_cpp conftest.$ac_ext\"") >&5
15349   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15350   ac_status=$?
15351   egrep -v '^ *\+' conftest.er1 >conftest.err
15352   rm -f conftest.er1
15353   cat conftest.err >&5
15354   echo "$as_me:15354: \$? = $ac_status" >&5
15355   (exit $ac_status); } >/dev/null; then
15356   if test -s conftest.err; then
15357     ac_cpp_err=$ac_c_preproc_warn_flag
15358   else
15359     ac_cpp_err=
15360   fi
15361 else
15362   ac_cpp_err=yes
15363 fi
15364 if test -z "$ac_cpp_err"; then
15365   eval "$as_ac_Header=yes"
15366 else
15367   echo "$as_me: failed program was:" >&5
15368   cat conftest.$ac_ext >&5
15369   eval "$as_ac_Header=no"
15370 fi
15371 rm -f conftest.err conftest.$ac_ext
15372 fi
15373 echo "$as_me:15373: result: `eval echo '${'$as_ac_Header'}'`" >&5
15374 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15375 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15376   cat >>confdefs.h <<EOF
15377 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15378 EOF
15379
15380 fi
15381 done
15382
15383 for ac_header in unistd.h getopt.h
15384 do
15385 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15386 echo "$as_me:15386: checking for $ac_header" >&5
15387 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15388 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15389   echo $ECHO_N "(cached) $ECHO_C" >&6
15390 else
15391   cat >conftest.$ac_ext <<_ACEOF
15392 #line 15392 "configure"
15393 #include "confdefs.h"
15394 #include <$ac_header>
15395 _ACEOF
15396 if { (eval echo "$as_me:15396: \"$ac_cpp conftest.$ac_ext\"") >&5
15397   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15398   ac_status=$?
15399   egrep -v '^ *\+' conftest.er1 >conftest.err
15400   rm -f conftest.er1
15401   cat conftest.err >&5
15402   echo "$as_me:15402: \$? = $ac_status" >&5
15403   (exit $ac_status); } >/dev/null; then
15404   if test -s conftest.err; then
15405     ac_cpp_err=$ac_c_preproc_warn_flag
15406   else
15407     ac_cpp_err=
15408   fi
15409 else
15410   ac_cpp_err=yes
15411 fi
15412 if test -z "$ac_cpp_err"; then
15413   eval "$as_ac_Header=yes"
15414 else
15415   echo "$as_me: failed program was:" >&5
15416   cat conftest.$ac_ext >&5
15417   eval "$as_ac_Header=no"
15418 fi
15419 rm -f conftest.err conftest.$ac_ext
15420 fi
15421 echo "$as_me:15421: result: `eval echo '${'$as_ac_Header'}'`" >&5
15422 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15423 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15424   cat >>confdefs.h <<EOF
15425 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15426 EOF
15427
15428 fi
15429 done
15430
15431 echo "$as_me:15431: checking for header declaring getopt variables" >&5
15432 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15433 if test "${cf_cv_getopt_header+set}" = set; then
15434   echo $ECHO_N "(cached) $ECHO_C" >&6
15435 else
15436
15437 cf_cv_getopt_header=none
15438 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15439 do
15440 cat >conftest.$ac_ext <<_ACEOF
15441 #line 15441 "configure"
15442 #include "confdefs.h"
15443
15444 #include <$cf_header>
15445 int
15446 main ()
15447 {
15448 int x = optind; char *y = optarg
15449   ;
15450   return 0;
15451 }
15452 _ACEOF
15453 rm -f conftest.$ac_objext
15454 if { (eval echo "$as_me:15454: \"$ac_compile\"") >&5
15455   (eval $ac_compile) 2>&5
15456   ac_status=$?
15457   echo "$as_me:15457: \$? = $ac_status" >&5
15458   (exit $ac_status); } &&
15459          { ac_try='test -s conftest.$ac_objext'
15460   { (eval echo "$as_me:15460: \"$ac_try\"") >&5
15461   (eval $ac_try) 2>&5
15462   ac_status=$?
15463   echo "$as_me:15463: \$? = $ac_status" >&5
15464   (exit $ac_status); }; }; then
15465   cf_cv_getopt_header=$cf_header
15466  break
15467 else
15468   echo "$as_me: failed program was:" >&5
15469 cat conftest.$ac_ext >&5
15470 fi
15471 rm -f conftest.$ac_objext conftest.$ac_ext
15472 done
15473
15474 fi
15475 echo "$as_me:15475: result: $cf_cv_getopt_header" >&5
15476 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15477 if test $cf_cv_getopt_header != none ; then
15478
15479 cat >>confdefs.h <<\EOF
15480 #define HAVE_GETOPT_HEADER 1
15481 EOF
15482
15483 fi
15484 if test $cf_cv_getopt_header = getopt.h ; then
15485
15486 cat >>confdefs.h <<\EOF
15487 #define NEED_GETOPT_H 1
15488 EOF
15489
15490 fi
15491
15492 # check for ISC (this may also define _POSIX_SOURCE)
15493 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15494 if test "x$ISC" = xyes ; then
15495
15496 echo "$as_me:15496: checking for main in -lcposix" >&5
15497 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15498 if test "${ac_cv_lib_cposix_main+set}" = set; then
15499   echo $ECHO_N "(cached) $ECHO_C" >&6
15500 else
15501   ac_check_lib_save_LIBS=$LIBS
15502 LIBS="-lcposix  $LIBS"
15503 cat >conftest.$ac_ext <<_ACEOF
15504 #line 15504 "configure"
15505 #include "confdefs.h"
15506
15507 int
15508 main ()
15509 {
15510 main ();
15511   ;
15512   return 0;
15513 }
15514 _ACEOF
15515 rm -f conftest.$ac_objext conftest$ac_exeext
15516 if { (eval echo "$as_me:15516: \"$ac_link\"") >&5
15517   (eval $ac_link) 2>&5
15518   ac_status=$?
15519   echo "$as_me:15519: \$? = $ac_status" >&5
15520   (exit $ac_status); } &&
15521          { ac_try='test -s conftest$ac_exeext'
15522   { (eval echo "$as_me:15522: \"$ac_try\"") >&5
15523   (eval $ac_try) 2>&5
15524   ac_status=$?
15525   echo "$as_me:15525: \$? = $ac_status" >&5
15526   (exit $ac_status); }; }; then
15527   ac_cv_lib_cposix_main=yes
15528 else
15529   echo "$as_me: failed program was:" >&5
15530 cat conftest.$ac_ext >&5
15531 ac_cv_lib_cposix_main=no
15532 fi
15533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15534 LIBS=$ac_check_lib_save_LIBS
15535 fi
15536 echo "$as_me:15536: result: $ac_cv_lib_cposix_main" >&5
15537 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15538 if test $ac_cv_lib_cposix_main = yes; then
15539   cat >>confdefs.h <<EOF
15540 #define HAVE_LIBCPOSIX 1
15541 EOF
15542
15543   LIBS="-lcposix $LIBS"
15544
15545 fi
15546
15547         echo "$as_me:15547: checking for bzero in -linet" >&5
15548 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15549 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15550   echo $ECHO_N "(cached) $ECHO_C" >&6
15551 else
15552   ac_check_lib_save_LIBS=$LIBS
15553 LIBS="-linet  $LIBS"
15554 cat >conftest.$ac_ext <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15557
15558 /* Override any gcc2 internal prototype to avoid an error.  */
15559 #ifdef __cplusplus
15560 extern "C"
15561 #endif
15562 /* We use char because int might match the return type of a gcc2
15563    builtin and then its argument prototype would still apply.  */
15564 char bzero ();
15565 int
15566 main ()
15567 {
15568 bzero ();
15569   ;
15570   return 0;
15571 }
15572 _ACEOF
15573 rm -f conftest.$ac_objext conftest$ac_exeext
15574 if { (eval echo "$as_me:15574: \"$ac_link\"") >&5
15575   (eval $ac_link) 2>&5
15576   ac_status=$?
15577   echo "$as_me:15577: \$? = $ac_status" >&5
15578   (exit $ac_status); } &&
15579          { ac_try='test -s conftest$ac_exeext'
15580   { (eval echo "$as_me:15580: \"$ac_try\"") >&5
15581   (eval $ac_try) 2>&5
15582   ac_status=$?
15583   echo "$as_me:15583: \$? = $ac_status" >&5
15584   (exit $ac_status); }; }; then
15585   ac_cv_lib_inet_bzero=yes
15586 else
15587   echo "$as_me: failed program was:" >&5
15588 cat conftest.$ac_ext >&5
15589 ac_cv_lib_inet_bzero=no
15590 fi
15591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15592 LIBS=$ac_check_lib_save_LIBS
15593 fi
15594 echo "$as_me:15594: result: $ac_cv_lib_inet_bzero" >&5
15595 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15596 if test $ac_cv_lib_inet_bzero = yes; then
15597
15598 cf_add_libs="-linet"
15599 # Filter out duplicates - this happens with badly-designed ".pc" files...
15600 for cf_add_1lib in $LIBS
15601 do
15602         for cf_add_2lib in $cf_add_libs
15603         do
15604                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15605                 then
15606                         cf_add_1lib=
15607                         break
15608                 fi
15609         done
15610         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15611 done
15612 LIBS="$cf_add_libs"
15613
15614 fi
15615 fi
15616
15617 echo "$as_me:15617: checking if sys/time.h works with sys/select.h" >&5
15618 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15619 if test "${cf_cv_sys_time_select+set}" = set; then
15620   echo $ECHO_N "(cached) $ECHO_C" >&6
15621 else
15622
15623 cat >conftest.$ac_ext <<_ACEOF
15624 #line 15624 "configure"
15625 #include "confdefs.h"
15626
15627 #include <sys/types.h>
15628 #ifdef HAVE_SYS_TIME_H
15629 #include <sys/time.h>
15630 #endif
15631 #ifdef HAVE_SYS_SELECT_H
15632 #include <sys/select.h>
15633 #endif
15634
15635 int
15636 main ()
15637 {
15638
15639   ;
15640   return 0;
15641 }
15642 _ACEOF
15643 rm -f conftest.$ac_objext
15644 if { (eval echo "$as_me:15644: \"$ac_compile\"") >&5
15645   (eval $ac_compile) 2>&5
15646   ac_status=$?
15647   echo "$as_me:15647: \$? = $ac_status" >&5
15648   (exit $ac_status); } &&
15649          { ac_try='test -s conftest.$ac_objext'
15650   { (eval echo "$as_me:15650: \"$ac_try\"") >&5
15651   (eval $ac_try) 2>&5
15652   ac_status=$?
15653   echo "$as_me:15653: \$? = $ac_status" >&5
15654   (exit $ac_status); }; }; then
15655   cf_cv_sys_time_select=yes
15656 else
15657   echo "$as_me: failed program was:" >&5
15658 cat conftest.$ac_ext >&5
15659 cf_cv_sys_time_select=no
15660 fi
15661 rm -f conftest.$ac_objext conftest.$ac_ext
15662
15663 fi
15664
15665 echo "$as_me:15665: result: $cf_cv_sys_time_select" >&5
15666 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15667 test "$cf_cv_sys_time_select" = yes &&
15668 cat >>confdefs.h <<\EOF
15669 #define HAVE_SYS_TIME_SELECT 1
15670 EOF
15671
15672 ###     checks for compiler characteristics
15673 ac_ext=c
15674 ac_cpp='$CPP $CPPFLAGS'
15675 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15676 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15677 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15678 ac_main_return=return
15679
15680 echo "$as_me:15680: checking for an ANSI C-conforming const" >&5
15681 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15682 if test "${ac_cv_c_const+set}" = set; then
15683   echo $ECHO_N "(cached) $ECHO_C" >&6
15684 else
15685   cat >conftest.$ac_ext <<_ACEOF
15686 #line 15686 "configure"
15687 #include "confdefs.h"
15688
15689 int
15690 main ()
15691 {
15692 /* FIXME: Include the comments suggested by Paul. */
15693 #ifndef __cplusplus
15694   /* Ultrix mips cc rejects this.  */
15695   typedef int charset[2];
15696   const charset x;
15697   /* SunOS 4.1.1 cc rejects this.  */
15698   char const *const *ccp;
15699   char **p;
15700   /* NEC SVR4.0.2 mips cc rejects this.  */
15701   struct point {int x, y;};
15702   static struct point const zero = {0,0};
15703   /* AIX XL C 1.02.0.0 rejects this.
15704      It does not let you subtract one const X* pointer from another in
15705      an arm of an if-expression whose if-part is not a constant
15706      expression */
15707   const char *g = "string";
15708   ccp = &g + (g ? g-g : 0);
15709   /* HPUX 7.0 cc rejects these. */
15710   ++ccp;
15711   p = (char**) ccp;
15712   ccp = (char const *const *) p;
15713   { /* SCO 3.2v4 cc rejects this.  */
15714     char *t;
15715     char const *s = 0 ? (char *) 0 : (char const *) 0;
15716
15717     *t++ = 0;
15718   }
15719   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15720     int x[] = {25, 17};
15721     const int *foo = &x[0];
15722     ++foo;
15723   }
15724   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15725     typedef const int *iptr;
15726     iptr p = 0;
15727     ++p;
15728   }
15729   { /* AIX XL C 1.02.0.0 rejects this saying
15730        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15731     struct s { int j; const int *ap[3]; };
15732     struct s *b; b->j = 5;
15733   }
15734   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15735     const int foo = 10;
15736   }
15737 #endif
15738
15739   ;
15740   return 0;
15741 }
15742 _ACEOF
15743 rm -f conftest.$ac_objext
15744 if { (eval echo "$as_me:15744: \"$ac_compile\"") >&5
15745   (eval $ac_compile) 2>&5
15746   ac_status=$?
15747   echo "$as_me:15747: \$? = $ac_status" >&5
15748   (exit $ac_status); } &&
15749          { ac_try='test -s conftest.$ac_objext'
15750   { (eval echo "$as_me:15750: \"$ac_try\"") >&5
15751   (eval $ac_try) 2>&5
15752   ac_status=$?
15753   echo "$as_me:15753: \$? = $ac_status" >&5
15754   (exit $ac_status); }; }; then
15755   ac_cv_c_const=yes
15756 else
15757   echo "$as_me: failed program was:" >&5
15758 cat conftest.$ac_ext >&5
15759 ac_cv_c_const=no
15760 fi
15761 rm -f conftest.$ac_objext conftest.$ac_ext
15762 fi
15763 echo "$as_me:15763: result: $ac_cv_c_const" >&5
15764 echo "${ECHO_T}$ac_cv_c_const" >&6
15765 if test $ac_cv_c_const = no; then
15766
15767 cat >>confdefs.h <<\EOF
15768 #define const
15769 EOF
15770
15771 fi
15772
15773 echo "$as_me:15773: checking for inline" >&5
15774 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15775 if test "${ac_cv_c_inline+set}" = set; then
15776   echo $ECHO_N "(cached) $ECHO_C" >&6
15777 else
15778   ac_cv_c_inline=no
15779 for ac_kw in inline __inline__ __inline; do
15780   cat >conftest.$ac_ext <<_ACEOF
15781 #line 15781 "configure"
15782 #include "confdefs.h"
15783 #ifndef __cplusplus
15784 static $ac_kw int static_foo () {return 0; }
15785 $ac_kw int foo () {return 0; }
15786 #endif
15787
15788 _ACEOF
15789 rm -f conftest.$ac_objext
15790 if { (eval echo "$as_me:15790: \"$ac_compile\"") >&5
15791   (eval $ac_compile) 2>&5
15792   ac_status=$?
15793   echo "$as_me:15793: \$? = $ac_status" >&5
15794   (exit $ac_status); } &&
15795          { ac_try='test -s conftest.$ac_objext'
15796   { (eval echo "$as_me:15796: \"$ac_try\"") >&5
15797   (eval $ac_try) 2>&5
15798   ac_status=$?
15799   echo "$as_me:15799: \$? = $ac_status" >&5
15800   (exit $ac_status); }; }; then
15801   ac_cv_c_inline=$ac_kw; break
15802 else
15803   echo "$as_me: failed program was:" >&5
15804 cat conftest.$ac_ext >&5
15805 fi
15806 rm -f conftest.$ac_objext conftest.$ac_ext
15807 done
15808
15809 fi
15810 echo "$as_me:15810: result: $ac_cv_c_inline" >&5
15811 echo "${ECHO_T}$ac_cv_c_inline" >&6
15812 case $ac_cv_c_inline in
15813   inline | yes) ;;
15814   no)
15815 cat >>confdefs.h <<\EOF
15816 #define inline
15817 EOF
15818  ;;
15819   *)  cat >>confdefs.h <<EOF
15820 #define inline $ac_cv_c_inline
15821 EOF
15822  ;;
15823 esac
15824
15825 NCURSES_INLINE=
15826 if test "$ac_cv_c_inline" != no ; then
15827         NCURSES_INLINE=inline
15828         if test "$INTEL_COMPILER" = yes
15829         then
15830                 :
15831         elif test "$CLANG_COMPILER" = yes
15832         then
15833                 :
15834         elif test "$GCC" = yes
15835         then
15836                 echo "$as_me:15836: checking if $CC supports options to tune inlining" >&5
15837 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15838 if test "${cf_cv_gcc_inline+set}" = set; then
15839   echo $ECHO_N "(cached) $ECHO_C" >&6
15840 else
15841
15842                 cf_save_CFLAGS=$CFLAGS
15843                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15844                 cat >conftest.$ac_ext <<_ACEOF
15845 #line 15845 "configure"
15846 #include "confdefs.h"
15847 inline int foo(void) { return 1; }
15848 int
15849 main ()
15850 {
15851 ${cf_cv_main_return:-return} foo()
15852   ;
15853   return 0;
15854 }
15855 _ACEOF
15856 rm -f conftest.$ac_objext
15857 if { (eval echo "$as_me:15857: \"$ac_compile\"") >&5
15858   (eval $ac_compile) 2>&5
15859   ac_status=$?
15860   echo "$as_me:15860: \$? = $ac_status" >&5
15861   (exit $ac_status); } &&
15862          { ac_try='test -s conftest.$ac_objext'
15863   { (eval echo "$as_me:15863: \"$ac_try\"") >&5
15864   (eval $ac_try) 2>&5
15865   ac_status=$?
15866   echo "$as_me:15866: \$? = $ac_status" >&5
15867   (exit $ac_status); }; }; then
15868   cf_cv_gcc_inline=yes
15869 else
15870   echo "$as_me: failed program was:" >&5
15871 cat conftest.$ac_ext >&5
15872 cf_cv_gcc_inline=no
15873 fi
15874 rm -f conftest.$ac_objext conftest.$ac_ext
15875                 CFLAGS=$cf_save_CFLAGS
15876
15877 fi
15878 echo "$as_me:15878: result: $cf_cv_gcc_inline" >&5
15879 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15880                 if test "$cf_cv_gcc_inline" = yes ; then
15881
15882 cf_fix_cppflags=no
15883 cf_new_cflags=
15884 cf_new_cppflags=
15885 cf_new_extra_cppflags=
15886
15887 for cf_add_cflags in --param max-inline-insns-single=1200
15888 do
15889 case $cf_fix_cppflags in
15890 (no)
15891         case $cf_add_cflags in
15892         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15893                 case $cf_add_cflags in
15894                 (-D*)
15895                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15896
15897                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15898                                 && test -z "${cf_tst_cflags}" \
15899                                 && cf_fix_cppflags=yes
15900
15901                         if test $cf_fix_cppflags = yes ; then
15902                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15903                                 continue
15904                         elif test "${cf_tst_cflags}" = "\"'" ; then
15905                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15906                                 continue
15907                         fi
15908                         ;;
15909                 esac
15910                 case "$CPPFLAGS" in
15911                 (*$cf_add_cflags)
15912                         ;;
15913                 (*)
15914                         case $cf_add_cflags in
15915                         (-D*)
15916                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15917
15918 CPPFLAGS=`echo "$CPPFLAGS" | \
15919         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15920                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15921
15922                                 ;;
15923                         esac
15924                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15925                         ;;
15926                 esac
15927                 ;;
15928         (*)
15929                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15930                 ;;
15931         esac
15932         ;;
15933 (yes)
15934         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15935
15936         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15937
15938         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15939                 && test -z "${cf_tst_cflags}" \
15940                 && cf_fix_cppflags=no
15941         ;;
15942 esac
15943 done
15944
15945 if test -n "$cf_new_cflags" ; then
15946
15947         CFLAGS="$CFLAGS $cf_new_cflags"
15948 fi
15949
15950 if test -n "$cf_new_cppflags" ; then
15951
15952         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15953 fi
15954
15955 if test -n "$cf_new_extra_cppflags" ; then
15956
15957         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15958 fi
15959
15960                 fi
15961         fi
15962 fi
15963
15964 echo "$as_me:15964: checking for signal global datatype" >&5
15965 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15966 if test "${cf_cv_sig_atomic_t+set}" = set; then
15967   echo $ECHO_N "(cached) $ECHO_C" >&6
15968 else
15969
15970         for cf_type in \
15971                 "volatile sig_atomic_t" \
15972                 "sig_atomic_t" \
15973                 "int"
15974         do
15975         cat >conftest.$ac_ext <<_ACEOF
15976 #line 15976 "configure"
15977 #include "confdefs.h"
15978
15979 #include <sys/types.h>
15980 #include <signal.h>
15981 #include <stdio.h>
15982
15983 extern $cf_type x;
15984 $cf_type x;
15985 static void handler(int sig)
15986 {
15987         x = 5;
15988 }
15989 int
15990 main ()
15991 {
15992 signal(SIGINT, handler);
15993                  x = 1
15994   ;
15995   return 0;
15996 }
15997 _ACEOF
15998 rm -f conftest.$ac_objext
15999 if { (eval echo "$as_me:15999: \"$ac_compile\"") >&5
16000   (eval $ac_compile) 2>&5
16001   ac_status=$?
16002   echo "$as_me:16002: \$? = $ac_status" >&5
16003   (exit $ac_status); } &&
16004          { ac_try='test -s conftest.$ac_objext'
16005   { (eval echo "$as_me:16005: \"$ac_try\"") >&5
16006   (eval $ac_try) 2>&5
16007   ac_status=$?
16008   echo "$as_me:16008: \$? = $ac_status" >&5
16009   (exit $ac_status); }; }; then
16010   cf_cv_sig_atomic_t=$cf_type
16011 else
16012   echo "$as_me: failed program was:" >&5
16013 cat conftest.$ac_ext >&5
16014 cf_cv_sig_atomic_t=no
16015 fi
16016 rm -f conftest.$ac_objext conftest.$ac_ext
16017                 test "$cf_cv_sig_atomic_t" != no && break
16018         done
16019
16020 fi
16021
16022 echo "$as_me:16022: result: $cf_cv_sig_atomic_t" >&5
16023 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16024 test "$cf_cv_sig_atomic_t" != no &&
16025 cat >>confdefs.h <<EOF
16026 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16027 EOF
16028
16029 if test $NCURSES_CHTYPE = auto ; then
16030
16031 echo "$as_me:16031: checking for type of chtype" >&5
16032 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16033 if test "${cf_cv_typeof_chtype+set}" = set; then
16034   echo $ECHO_N "(cached) $ECHO_C" >&6
16035 else
16036
16037                 if test "$cross_compiling" = yes; then
16038   cf_cv_typeof_chtype=long
16039 else
16040   cat >conftest.$ac_ext <<_ACEOF
16041 #line 16041 "configure"
16042 #include "confdefs.h"
16043
16044 #define WANT_BITS 31
16045 #include <stdio.h>
16046 int main()
16047 {
16048         FILE *fp = fopen("cf_test.out", "w");
16049         if (fp != 0) {
16050                 char *result = "long";
16051                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16052                         int n;
16053                         unsigned int x, y;
16054                         for (n = 0; n < WANT_BITS; n++) {
16055                                 x = (1 << n);
16056                                 y = (x >> n);
16057                                 if (y != 1 || x == 0) {
16058                                         x = 0;
16059                                         break;
16060                                 }
16061                         }
16062                         /*
16063                          * If x is nonzero, an int is big enough for the bits
16064                          * that we want.
16065                          */
16066                         result = (x != 0) ? "int" : "long";
16067                 }
16068                 fputs(result, fp);
16069                 fclose(fp);
16070         }
16071         ${cf_cv_main_return:-return}(0);
16072 }
16073
16074 _ACEOF
16075 rm -f conftest$ac_exeext
16076 if { (eval echo "$as_me:16076: \"$ac_link\"") >&5
16077   (eval $ac_link) 2>&5
16078   ac_status=$?
16079   echo "$as_me:16079: \$? = $ac_status" >&5
16080   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16081   { (eval echo "$as_me:16081: \"$ac_try\"") >&5
16082   (eval $ac_try) 2>&5
16083   ac_status=$?
16084   echo "$as_me:16084: \$? = $ac_status" >&5
16085   (exit $ac_status); }; }; then
16086   cf_cv_typeof_chtype=`cat cf_test.out`
16087 else
16088   echo "$as_me: program exited with status $ac_status" >&5
16089 echo "$as_me: failed program was:" >&5
16090 cat conftest.$ac_ext >&5
16091 cf_cv_typeof_chtype=long
16092 fi
16093 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16094 fi
16095                 rm -f cf_test.out
16096
16097 fi
16098
16099 echo "$as_me:16099: result: $cf_cv_typeof_chtype" >&5
16100 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16101
16102 cat >>confdefs.h <<EOF
16103 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16104 EOF
16105
16106 else
16107         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16108 fi
16109 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16110
16111 echo "$as_me:16111: checking if unsigned literals are legal" >&5
16112 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16113 if test "${cf_cv_unsigned_literals+set}" = set; then
16114   echo $ECHO_N "(cached) $ECHO_C" >&6
16115 else
16116
16117         cat >conftest.$ac_ext <<_ACEOF
16118 #line 16118 "configure"
16119 #include "confdefs.h"
16120
16121 int
16122 main ()
16123 {
16124 long x = 1L + 1UL + 1U + 1
16125   ;
16126   return 0;
16127 }
16128 _ACEOF
16129 rm -f conftest.$ac_objext
16130 if { (eval echo "$as_me:16130: \"$ac_compile\"") >&5
16131   (eval $ac_compile) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); } &&
16135          { ac_try='test -s conftest.$ac_objext'
16136   { (eval echo "$as_me:16136: \"$ac_try\"") >&5
16137   (eval $ac_try) 2>&5
16138   ac_status=$?
16139   echo "$as_me:16139: \$? = $ac_status" >&5
16140   (exit $ac_status); }; }; then
16141   cf_cv_unsigned_literals=yes
16142 else
16143   echo "$as_me: failed program was:" >&5
16144 cat conftest.$ac_ext >&5
16145 cf_cv_unsigned_literals=no
16146 fi
16147 rm -f conftest.$ac_objext conftest.$ac_ext
16148
16149 fi
16150
16151 echo "$as_me:16151: result: $cf_cv_unsigned_literals" >&5
16152 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16153
16154 cf_cv_1UL="1"
16155 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16156 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16157
16158 if test $NCURSES_MMASK_T = auto ; then
16159         cf_cv_typeof_mmask_t=long
16160 else
16161         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16162 fi
16163 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16164
16165 ###     Checks for external-data
16166
16167 echo "$as_me:16167: checking if external errno is declared" >&5
16168 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16169 if test "${cf_cv_dcl_errno+set}" = set; then
16170   echo $ECHO_N "(cached) $ECHO_C" >&6
16171 else
16172
16173         cat >conftest.$ac_ext <<_ACEOF
16174 #line 16174 "configure"
16175 #include "confdefs.h"
16176
16177 #ifdef HAVE_STDLIB_H
16178 #include <stdlib.h>
16179 #endif
16180 #include <stdio.h>
16181 #include <sys/types.h>
16182 #include <errno.h>
16183 int
16184 main ()
16185 {
16186 int x = (int) errno
16187   ;
16188   return 0;
16189 }
16190 _ACEOF
16191 rm -f conftest.$ac_objext
16192 if { (eval echo "$as_me:16192: \"$ac_compile\"") >&5
16193   (eval $ac_compile) 2>&5
16194   ac_status=$?
16195   echo "$as_me:16195: \$? = $ac_status" >&5
16196   (exit $ac_status); } &&
16197          { ac_try='test -s conftest.$ac_objext'
16198   { (eval echo "$as_me:16198: \"$ac_try\"") >&5
16199   (eval $ac_try) 2>&5
16200   ac_status=$?
16201   echo "$as_me:16201: \$? = $ac_status" >&5
16202   (exit $ac_status); }; }; then
16203   cf_cv_dcl_errno=yes
16204 else
16205   echo "$as_me: failed program was:" >&5
16206 cat conftest.$ac_ext >&5
16207 cf_cv_dcl_errno=no
16208 fi
16209 rm -f conftest.$ac_objext conftest.$ac_ext
16210
16211 fi
16212 echo "$as_me:16212: result: $cf_cv_dcl_errno" >&5
16213 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16214
16215 if test "$cf_cv_dcl_errno" = no ; then
16216
16217 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16218
16219         cat >>confdefs.h <<EOF
16220 #define $cf_result 1
16221 EOF
16222
16223 fi
16224
16225 # It's possible (for near-UNIX clones) that the data doesn't exist
16226
16227 echo "$as_me:16227: checking if external errno exists" >&5
16228 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16229 if test "${cf_cv_have_errno+set}" = set; then
16230   echo $ECHO_N "(cached) $ECHO_C" >&6
16231 else
16232
16233         cat >conftest.$ac_ext <<_ACEOF
16234 #line 16234 "configure"
16235 #include "confdefs.h"
16236
16237 #undef errno
16238 extern int errno;
16239
16240 int
16241 main ()
16242 {
16243 errno = 2
16244   ;
16245   return 0;
16246 }
16247 _ACEOF
16248 rm -f conftest.$ac_objext conftest$ac_exeext
16249 if { (eval echo "$as_me:16249: \"$ac_link\"") >&5
16250   (eval $ac_link) 2>&5
16251   ac_status=$?
16252   echo "$as_me:16252: \$? = $ac_status" >&5
16253   (exit $ac_status); } &&
16254          { ac_try='test -s conftest$ac_exeext'
16255   { (eval echo "$as_me:16255: \"$ac_try\"") >&5
16256   (eval $ac_try) 2>&5
16257   ac_status=$?
16258   echo "$as_me:16258: \$? = $ac_status" >&5
16259   (exit $ac_status); }; }; then
16260   cf_cv_have_errno=yes
16261 else
16262   echo "$as_me: failed program was:" >&5
16263 cat conftest.$ac_ext >&5
16264 cf_cv_have_errno=no
16265 fi
16266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16267
16268 fi
16269 echo "$as_me:16269: result: $cf_cv_have_errno" >&5
16270 echo "${ECHO_T}$cf_cv_have_errno" >&6
16271
16272 if test "$cf_cv_have_errno" = yes ; then
16273
16274 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16275
16276         cat >>confdefs.h <<EOF
16277 #define $cf_result 1
16278 EOF
16279
16280 fi
16281
16282 echo "$as_me:16282: checking if data-only library module links" >&5
16283 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16284 if test "${cf_cv_link_dataonly+set}" = set; then
16285   echo $ECHO_N "(cached) $ECHO_C" >&6
16286 else
16287
16288         rm -f conftest.a
16289         cat >conftest.$ac_ext <<EOF
16290 #line 16290 "configure"
16291 int     testdata[3] = { 123, 456, 789 };
16292 EOF
16293         if { (eval echo "$as_me:16293: \"$ac_compile\"") >&5
16294   (eval $ac_compile) 2>&5
16295   ac_status=$?
16296   echo "$as_me:16296: \$? = $ac_status" >&5
16297   (exit $ac_status); } ; then
16298                 mv conftest.o data.o && \
16299                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16300         fi
16301         rm -f conftest.$ac_ext data.o
16302         cat >conftest.$ac_ext <<EOF
16303 #line 16303 "configure"
16304 int     testfunc()
16305 {
16306 #if defined(NeXT)
16307         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16308 #else
16309         extern int testdata[3];
16310         return testdata[0] == 123
16311            &&  testdata[1] == 456
16312            &&  testdata[2] == 789;
16313 #endif
16314 }
16315 EOF
16316         if { (eval echo "$as_me:16316: \"$ac_compile\"") >&5
16317   (eval $ac_compile) 2>&5
16318   ac_status=$?
16319   echo "$as_me:16319: \$? = $ac_status" >&5
16320   (exit $ac_status); }; then
16321                 mv conftest.o func.o && \
16322                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16323         fi
16324         rm -f conftest.$ac_ext func.o
16325         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16326         cf_saveLIBS="$LIBS"
16327         LIBS="conftest.a $LIBS"
16328         if test "$cross_compiling" = yes; then
16329   cf_cv_link_dataonly=unknown
16330 else
16331   cat >conftest.$ac_ext <<_ACEOF
16332 #line 16332 "configure"
16333 #include "confdefs.h"
16334
16335         int main()
16336         {
16337                 extern int testfunc();
16338                 ${cf_cv_main_return:-return} (!testfunc());
16339         }
16340
16341 _ACEOF
16342 rm -f conftest$ac_exeext
16343 if { (eval echo "$as_me:16343: \"$ac_link\"") >&5
16344   (eval $ac_link) 2>&5
16345   ac_status=$?
16346   echo "$as_me:16346: \$? = $ac_status" >&5
16347   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16348   { (eval echo "$as_me:16348: \"$ac_try\"") >&5
16349   (eval $ac_try) 2>&5
16350   ac_status=$?
16351   echo "$as_me:16351: \$? = $ac_status" >&5
16352   (exit $ac_status); }; }; then
16353   cf_cv_link_dataonly=yes
16354 else
16355   echo "$as_me: program exited with status $ac_status" >&5
16356 echo "$as_me: failed program was:" >&5
16357 cat conftest.$ac_ext >&5
16358 cf_cv_link_dataonly=no
16359 fi
16360 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16361 fi
16362         LIBS="$cf_saveLIBS"
16363
16364 fi
16365
16366 echo "$as_me:16366: result: $cf_cv_link_dataonly" >&5
16367 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16368
16369 if test "$cf_cv_link_dataonly" = no ; then
16370
16371 cat >>confdefs.h <<\EOF
16372 #define BROKEN_LINKER 1
16373 EOF
16374
16375         BROKEN_LINKER=1
16376 fi
16377
16378 ###     Checks for library functions.
16379
16380 for ac_func in \
16381 getcwd \
16382 getegid \
16383 geteuid \
16384 getopt \
16385 getttynam \
16386 issetugid \
16387 poll \
16388 putenv \
16389 remove \
16390 select \
16391 setbuf \
16392 setbuffer \
16393 setenv \
16394 setvbuf \
16395 sigaction \
16396 sigvec \
16397 strdup \
16398 strstr \
16399 tcgetpgrp \
16400 times \
16401 vsnprintf \
16402
16403 do
16404 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16405 echo "$as_me:16405: checking for $ac_func" >&5
16406 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16407 if eval "test \"\${$as_ac_var+set}\" = set"; then
16408   echo $ECHO_N "(cached) $ECHO_C" >&6
16409 else
16410   cat >conftest.$ac_ext <<_ACEOF
16411 #line 16411 "configure"
16412 #include "confdefs.h"
16413 /* System header to define __stub macros and hopefully few prototypes,
16414     which can conflict with char $ac_func (); below.  */
16415 #include <assert.h>
16416 /* Override any gcc2 internal prototype to avoid an error.  */
16417 #ifdef __cplusplus
16418 extern "C"
16419 #endif
16420 /* We use char because int might match the return type of a gcc2
16421    builtin and then its argument prototype would still apply.  */
16422 char $ac_func ();
16423 char (*f) ();
16424
16425 int
16426 main ()
16427 {
16428 /* The GNU C library defines this for functions which it implements
16429     to always fail with ENOSYS.  Some functions are actually named
16430     something starting with __ and the normal name is an alias.  */
16431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16432 choke me
16433 #else
16434 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16435 #endif
16436
16437   ;
16438   return 0;
16439 }
16440 _ACEOF
16441 rm -f conftest.$ac_objext conftest$ac_exeext
16442 if { (eval echo "$as_me:16442: \"$ac_link\"") >&5
16443   (eval $ac_link) 2>&5
16444   ac_status=$?
16445   echo "$as_me:16445: \$? = $ac_status" >&5
16446   (exit $ac_status); } &&
16447          { ac_try='test -s conftest$ac_exeext'
16448   { (eval echo "$as_me:16448: \"$ac_try\"") >&5
16449   (eval $ac_try) 2>&5
16450   ac_status=$?
16451   echo "$as_me:16451: \$? = $ac_status" >&5
16452   (exit $ac_status); }; }; then
16453   eval "$as_ac_var=yes"
16454 else
16455   echo "$as_me: failed program was:" >&5
16456 cat conftest.$ac_ext >&5
16457 eval "$as_ac_var=no"
16458 fi
16459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16460 fi
16461 echo "$as_me:16461: result: `eval echo '${'$as_ac_var'}'`" >&5
16462 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16463 if test `eval echo '${'$as_ac_var'}'` = yes; then
16464   cat >>confdefs.h <<EOF
16465 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16466 EOF
16467
16468 fi
16469 done
16470
16471 if test "x$ac_cv_func_getopt" = xno &&
16472    test "x$cf_with_progs$cf_with_tests" != xnono; then
16473         { { echo "$as_me:16473: error: getopt is required for building programs" >&5
16474 echo "$as_me: error: getopt is required for building programs" >&2;}
16475    { (exit 1); exit 1; }; }
16476 fi
16477
16478 if test "x$with_getcap" = "xyes" ; then
16479
16480 echo "$as_me:16480: checking for terminal-capability database functions" >&5
16481 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16482 if test "${cf_cv_cgetent+set}" = set; then
16483   echo $ECHO_N "(cached) $ECHO_C" >&6
16484 else
16485
16486 cat >conftest.$ac_ext <<_ACEOF
16487 #line 16487 "configure"
16488 #include "confdefs.h"
16489
16490 #include <stdlib.h>
16491 int
16492 main ()
16493 {
16494
16495         char temp[128];
16496         char *buf = temp;
16497         char *db_array = temp;
16498         cgetent(&buf, &db_array, "vt100");
16499         cgetcap(buf, "tc", '=');
16500         cgetmatch(buf, "tc");
16501
16502   ;
16503   return 0;
16504 }
16505 _ACEOF
16506 rm -f conftest.$ac_objext conftest$ac_exeext
16507 if { (eval echo "$as_me:16507: \"$ac_link\"") >&5
16508   (eval $ac_link) 2>&5
16509   ac_status=$?
16510   echo "$as_me:16510: \$? = $ac_status" >&5
16511   (exit $ac_status); } &&
16512          { ac_try='test -s conftest$ac_exeext'
16513   { (eval echo "$as_me:16513: \"$ac_try\"") >&5
16514   (eval $ac_try) 2>&5
16515   ac_status=$?
16516   echo "$as_me:16516: \$? = $ac_status" >&5
16517   (exit $ac_status); }; }; then
16518   cf_cv_cgetent=yes
16519 else
16520   echo "$as_me: failed program was:" >&5
16521 cat conftest.$ac_ext >&5
16522 cf_cv_cgetent=no
16523 fi
16524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16525
16526 fi
16527 echo "$as_me:16527: result: $cf_cv_cgetent" >&5
16528 echo "${ECHO_T}$cf_cv_cgetent" >&6
16529
16530 if test "$cf_cv_cgetent" = yes
16531 then
16532
16533 cat >>confdefs.h <<\EOF
16534 #define HAVE_BSD_CGETENT 1
16535 EOF
16536
16537 echo "$as_me:16537: checking if cgetent uses const parameter" >&5
16538 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16539 if test "${cf_cv_cgetent_const+set}" = set; then
16540   echo $ECHO_N "(cached) $ECHO_C" >&6
16541 else
16542
16543 cat >conftest.$ac_ext <<_ACEOF
16544 #line 16544 "configure"
16545 #include "confdefs.h"
16546
16547 #include <stdlib.h>
16548 int
16549 main ()
16550 {
16551
16552         char temp[128];
16553         char *buf = temp;
16554 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16555         const char *db_array = temp;
16556         cgetent(&buf, &db_array, "vt100");
16557 #endif
16558         cgetcap(buf, "tc", '=');
16559         cgetmatch(buf, "tc");
16560
16561   ;
16562   return 0;
16563 }
16564 _ACEOF
16565 rm -f conftest.$ac_objext conftest$ac_exeext
16566 if { (eval echo "$as_me:16566: \"$ac_link\"") >&5
16567   (eval $ac_link) 2>&5
16568   ac_status=$?
16569   echo "$as_me:16569: \$? = $ac_status" >&5
16570   (exit $ac_status); } &&
16571          { ac_try='test -s conftest$ac_exeext'
16572   { (eval echo "$as_me:16572: \"$ac_try\"") >&5
16573   (eval $ac_try) 2>&5
16574   ac_status=$?
16575   echo "$as_me:16575: \$? = $ac_status" >&5
16576   (exit $ac_status); }; }; then
16577   cf_cv_cgetent_const=yes
16578 else
16579   echo "$as_me: failed program was:" >&5
16580 cat conftest.$ac_ext >&5
16581 cf_cv_cgetent_const=no
16582 fi
16583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16584
16585 fi
16586 echo "$as_me:16586: result: $cf_cv_cgetent_const" >&5
16587 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16588         if test "$cf_cv_cgetent_const" = yes
16589         then
16590
16591 cat >>confdefs.h <<EOF
16592 #define CGETENT_CONST const
16593 EOF
16594
16595         fi
16596 fi
16597
16598 fi
16599
16600 echo "$as_me:16600: checking for isascii" >&5
16601 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16602 if test "${cf_cv_have_isascii+set}" = set; then
16603   echo $ECHO_N "(cached) $ECHO_C" >&6
16604 else
16605
16606         cat >conftest.$ac_ext <<_ACEOF
16607 #line 16607 "configure"
16608 #include "confdefs.h"
16609 #include <ctype.h>
16610 int
16611 main ()
16612 {
16613 int x = isascii(' ')
16614   ;
16615   return 0;
16616 }
16617 _ACEOF
16618 rm -f conftest.$ac_objext conftest$ac_exeext
16619 if { (eval echo "$as_me:16619: \"$ac_link\"") >&5
16620   (eval $ac_link) 2>&5
16621   ac_status=$?
16622   echo "$as_me:16622: \$? = $ac_status" >&5
16623   (exit $ac_status); } &&
16624          { ac_try='test -s conftest$ac_exeext'
16625   { (eval echo "$as_me:16625: \"$ac_try\"") >&5
16626   (eval $ac_try) 2>&5
16627   ac_status=$?
16628   echo "$as_me:16628: \$? = $ac_status" >&5
16629   (exit $ac_status); }; }; then
16630   cf_cv_have_isascii=yes
16631 else
16632   echo "$as_me: failed program was:" >&5
16633 cat conftest.$ac_ext >&5
16634 cf_cv_have_isascii=no
16635 fi
16636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16637
16638 fi
16639 echo "$as_me:16639: result: $cf_cv_have_isascii" >&5
16640 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16641 test "$cf_cv_have_isascii" = yes &&
16642 cat >>confdefs.h <<\EOF
16643 #define HAVE_ISASCII 1
16644 EOF
16645
16646 if test "$ac_cv_func_sigaction" = yes; then
16647 echo "$as_me:16647: checking whether sigaction needs _POSIX_SOURCE" >&5
16648 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16649 cat >conftest.$ac_ext <<_ACEOF
16650 #line 16650 "configure"
16651 #include "confdefs.h"
16652
16653 #include <sys/types.h>
16654 #include <signal.h>
16655 int
16656 main ()
16657 {
16658 struct sigaction act
16659   ;
16660   return 0;
16661 }
16662 _ACEOF
16663 rm -f conftest.$ac_objext
16664 if { (eval echo "$as_me:16664: \"$ac_compile\"") >&5
16665   (eval $ac_compile) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); } &&
16669          { ac_try='test -s conftest.$ac_objext'
16670   { (eval echo "$as_me:16670: \"$ac_try\"") >&5
16671   (eval $ac_try) 2>&5
16672   ac_status=$?
16673   echo "$as_me:16673: \$? = $ac_status" >&5
16674   (exit $ac_status); }; }; then
16675   sigact_bad=no
16676 else
16677   echo "$as_me: failed program was:" >&5
16678 cat conftest.$ac_ext >&5
16679
16680 cat >conftest.$ac_ext <<_ACEOF
16681 #line 16681 "configure"
16682 #include "confdefs.h"
16683
16684 #define _POSIX_SOURCE
16685 #include <sys/types.h>
16686 #include <signal.h>
16687 int
16688 main ()
16689 {
16690 struct sigaction act
16691   ;
16692   return 0;
16693 }
16694 _ACEOF
16695 rm -f conftest.$ac_objext
16696 if { (eval echo "$as_me:16696: \"$ac_compile\"") >&5
16697   (eval $ac_compile) 2>&5
16698   ac_status=$?
16699   echo "$as_me:16699: \$? = $ac_status" >&5
16700   (exit $ac_status); } &&
16701          { ac_try='test -s conftest.$ac_objext'
16702   { (eval echo "$as_me:16702: \"$ac_try\"") >&5
16703   (eval $ac_try) 2>&5
16704   ac_status=$?
16705   echo "$as_me:16705: \$? = $ac_status" >&5
16706   (exit $ac_status); }; }; then
16707   sigact_bad=yes
16708
16709 cat >>confdefs.h <<\EOF
16710 #define _POSIX_SOURCE 1
16711 EOF
16712
16713 else
16714   echo "$as_me: failed program was:" >&5
16715 cat conftest.$ac_ext >&5
16716 sigact_bad=unknown
16717 fi
16718 rm -f conftest.$ac_objext conftest.$ac_ext
16719 fi
16720 rm -f conftest.$ac_objext conftest.$ac_ext
16721 echo "$as_me:16721: result: $sigact_bad" >&5
16722 echo "${ECHO_T}$sigact_bad" >&6
16723 fi
16724
16725 echo "$as_me:16725: checking if nanosleep really works" >&5
16726 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16727 if test "${cf_cv_func_nanosleep+set}" = set; then
16728   echo $ECHO_N "(cached) $ECHO_C" >&6
16729 else
16730
16731 if test "$cross_compiling" = yes; then
16732   cf_cv_func_nanosleep=unknown
16733 else
16734   cat >conftest.$ac_ext <<_ACEOF
16735 #line 16735 "configure"
16736 #include "confdefs.h"
16737
16738 #include <stdio.h>
16739 #include <errno.h>
16740 #include <time.h>
16741
16742 #ifdef HAVE_SYS_TIME_H
16743 #include <sys/time.h>
16744 #endif
16745
16746 int main() {
16747         struct timespec ts1, ts2;
16748         int code;
16749         ts1.tv_sec  = 0;
16750         ts1.tv_nsec = 750000000;
16751         ts2.tv_sec  = 0;
16752         ts2.tv_nsec = 0;
16753         errno = 0;
16754         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16755         ${cf_cv_main_return:-return}(code != 0);
16756 }
16757
16758 _ACEOF
16759 rm -f conftest$ac_exeext
16760 if { (eval echo "$as_me:16760: \"$ac_link\"") >&5
16761   (eval $ac_link) 2>&5
16762   ac_status=$?
16763   echo "$as_me:16763: \$? = $ac_status" >&5
16764   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16765   { (eval echo "$as_me:16765: \"$ac_try\"") >&5
16766   (eval $ac_try) 2>&5
16767   ac_status=$?
16768   echo "$as_me:16768: \$? = $ac_status" >&5
16769   (exit $ac_status); }; }; then
16770   cf_cv_func_nanosleep=yes
16771 else
16772   echo "$as_me: program exited with status $ac_status" >&5
16773 echo "$as_me: failed program was:" >&5
16774 cat conftest.$ac_ext >&5
16775 cf_cv_func_nanosleep=no
16776 fi
16777 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16778 fi
16779 fi
16780 echo "$as_me:16780: result: $cf_cv_func_nanosleep" >&5
16781 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16782
16783 test "$cf_cv_func_nanosleep" = "yes" &&
16784 cat >>confdefs.h <<\EOF
16785 #define HAVE_NANOSLEEP 1
16786 EOF
16787
16788 for ac_header in \
16789 termio.h \
16790 termios.h \
16791 unistd.h \
16792
16793 do
16794 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16795 echo "$as_me:16795: checking for $ac_header" >&5
16796 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16797 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16798   echo $ECHO_N "(cached) $ECHO_C" >&6
16799 else
16800   cat >conftest.$ac_ext <<_ACEOF
16801 #line 16801 "configure"
16802 #include "confdefs.h"
16803 #include <$ac_header>
16804 _ACEOF
16805 if { (eval echo "$as_me:16805: \"$ac_cpp conftest.$ac_ext\"") >&5
16806   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16807   ac_status=$?
16808   egrep -v '^ *\+' conftest.er1 >conftest.err
16809   rm -f conftest.er1
16810   cat conftest.err >&5
16811   echo "$as_me:16811: \$? = $ac_status" >&5
16812   (exit $ac_status); } >/dev/null; then
16813   if test -s conftest.err; then
16814     ac_cpp_err=$ac_c_preproc_warn_flag
16815   else
16816     ac_cpp_err=
16817   fi
16818 else
16819   ac_cpp_err=yes
16820 fi
16821 if test -z "$ac_cpp_err"; then
16822   eval "$as_ac_Header=yes"
16823 else
16824   echo "$as_me: failed program was:" >&5
16825   cat conftest.$ac_ext >&5
16826   eval "$as_ac_Header=no"
16827 fi
16828 rm -f conftest.err conftest.$ac_ext
16829 fi
16830 echo "$as_me:16830: result: `eval echo '${'$as_ac_Header'}'`" >&5
16831 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16832 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16833   cat >>confdefs.h <<EOF
16834 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16835 EOF
16836
16837 fi
16838 done
16839
16840 if test "$ISC" = yes ; then
16841
16842 for ac_header in sys/termio.h
16843 do
16844 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16845 echo "$as_me:16845: checking for $ac_header" >&5
16846 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16847 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16848   echo $ECHO_N "(cached) $ECHO_C" >&6
16849 else
16850   cat >conftest.$ac_ext <<_ACEOF
16851 #line 16851 "configure"
16852 #include "confdefs.h"
16853 #include <$ac_header>
16854 _ACEOF
16855 if { (eval echo "$as_me:16855: \"$ac_cpp conftest.$ac_ext\"") >&5
16856   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16857   ac_status=$?
16858   egrep -v '^ *\+' conftest.er1 >conftest.err
16859   rm -f conftest.er1
16860   cat conftest.err >&5
16861   echo "$as_me:16861: \$? = $ac_status" >&5
16862   (exit $ac_status); } >/dev/null; then
16863   if test -s conftest.err; then
16864     ac_cpp_err=$ac_c_preproc_warn_flag
16865   else
16866     ac_cpp_err=
16867   fi
16868 else
16869   ac_cpp_err=yes
16870 fi
16871 if test -z "$ac_cpp_err"; then
16872   eval "$as_ac_Header=yes"
16873 else
16874   echo "$as_me: failed program was:" >&5
16875   cat conftest.$ac_ext >&5
16876   eval "$as_ac_Header=no"
16877 fi
16878 rm -f conftest.err conftest.$ac_ext
16879 fi
16880 echo "$as_me:16880: result: `eval echo '${'$as_ac_Header'}'`" >&5
16881 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16882 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16883   cat >>confdefs.h <<EOF
16884 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16885 EOF
16886
16887 fi
16888 done
16889
16890 fi
16891 if test "$ac_cv_header_termios_h" = yes ; then
16892         case "$CFLAGS $CPPFLAGS" in
16893         (*-D_POSIX_SOURCE*)
16894                 termios_bad=dunno ;;
16895         (*)     termios_bad=maybe ;;
16896         esac
16897         if test "$termios_bad" = maybe ; then
16898         echo "$as_me:16898: checking whether termios.h needs _POSIX_SOURCE" >&5
16899 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16900         cat >conftest.$ac_ext <<_ACEOF
16901 #line 16901 "configure"
16902 #include "confdefs.h"
16903 #include <termios.h>
16904 int
16905 main ()
16906 {
16907 struct termios foo; int x = foo.c_iflag
16908   ;
16909   return 0;
16910 }
16911 _ACEOF
16912 rm -f conftest.$ac_objext
16913 if { (eval echo "$as_me:16913: \"$ac_compile\"") >&5
16914   (eval $ac_compile) 2>&5
16915   ac_status=$?
16916   echo "$as_me:16916: \$? = $ac_status" >&5
16917   (exit $ac_status); } &&
16918          { ac_try='test -s conftest.$ac_objext'
16919   { (eval echo "$as_me:16919: \"$ac_try\"") >&5
16920   (eval $ac_try) 2>&5
16921   ac_status=$?
16922   echo "$as_me:16922: \$? = $ac_status" >&5
16923   (exit $ac_status); }; }; then
16924   termios_bad=no
16925 else
16926   echo "$as_me: failed program was:" >&5
16927 cat conftest.$ac_ext >&5
16928
16929                 cat >conftest.$ac_ext <<_ACEOF
16930 #line 16930 "configure"
16931 #include "confdefs.h"
16932
16933 #define _POSIX_SOURCE
16934 #include <termios.h>
16935 int
16936 main ()
16937 {
16938 struct termios foo; int x = foo.c_iflag
16939   ;
16940   return 0;
16941 }
16942 _ACEOF
16943 rm -f conftest.$ac_objext
16944 if { (eval echo "$as_me:16944: \"$ac_compile\"") >&5
16945   (eval $ac_compile) 2>&5
16946   ac_status=$?
16947   echo "$as_me:16947: \$? = $ac_status" >&5
16948   (exit $ac_status); } &&
16949          { ac_try='test -s conftest.$ac_objext'
16950   { (eval echo "$as_me:16950: \"$ac_try\"") >&5
16951   (eval $ac_try) 2>&5
16952   ac_status=$?
16953   echo "$as_me:16953: \$? = $ac_status" >&5
16954   (exit $ac_status); }; }; then
16955   termios_bad=unknown
16956 else
16957   echo "$as_me: failed program was:" >&5
16958 cat conftest.$ac_ext >&5
16959 termios_bad=yes
16960 cat >>confdefs.h <<\EOF
16961 #define _POSIX_SOURCE 1
16962 EOF
16963
16964 fi
16965 rm -f conftest.$ac_objext conftest.$ac_ext
16966
16967 fi
16968 rm -f conftest.$ac_objext conftest.$ac_ext
16969         echo "$as_me:16969: result: $termios_bad" >&5
16970 echo "${ECHO_T}$termios_bad" >&6
16971         fi
16972 fi
16973
16974 echo "$as_me:16974: checking for tcgetattr" >&5
16975 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16976 if test "${cf_cv_have_tcgetattr+set}" = set; then
16977   echo $ECHO_N "(cached) $ECHO_C" >&6
16978 else
16979
16980 cat >conftest.$ac_ext <<_ACEOF
16981 #line 16981 "configure"
16982 #include "confdefs.h"
16983
16984 #include <sys/types.h>
16985 #ifdef HAVE_UNISTD_H
16986 #include <unistd.h>
16987 #endif
16988 #ifdef HAVE_TERMIOS_H
16989 #include <termios.h>
16990 #define TTY struct termios
16991 #else
16992 #ifdef HAVE_TERMIO_H
16993 #include <termio.h>
16994 #define TTY struct termio
16995 #endif
16996 #endif
16997
16998 int
16999 main ()
17000 {
17001
17002 TTY foo;
17003 tcgetattr(1, &foo);
17004   ;
17005   return 0;
17006 }
17007 _ACEOF
17008 rm -f conftest.$ac_objext conftest$ac_exeext
17009 if { (eval echo "$as_me:17009: \"$ac_link\"") >&5
17010   (eval $ac_link) 2>&5
17011   ac_status=$?
17012   echo "$as_me:17012: \$? = $ac_status" >&5
17013   (exit $ac_status); } &&
17014          { ac_try='test -s conftest$ac_exeext'
17015   { (eval echo "$as_me:17015: \"$ac_try\"") >&5
17016   (eval $ac_try) 2>&5
17017   ac_status=$?
17018   echo "$as_me:17018: \$? = $ac_status" >&5
17019   (exit $ac_status); }; }; then
17020   cf_cv_have_tcgetattr=yes
17021 else
17022   echo "$as_me: failed program was:" >&5
17023 cat conftest.$ac_ext >&5
17024 cf_cv_have_tcgetattr=no
17025 fi
17026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17027 fi
17028 echo "$as_me:17028: result: $cf_cv_have_tcgetattr" >&5
17029 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17030 test "$cf_cv_have_tcgetattr" = yes &&
17031 cat >>confdefs.h <<\EOF
17032 #define HAVE_TCGETATTR 1
17033 EOF
17034
17035 echo "$as_me:17035: checking for vsscanf function or workaround" >&5
17036 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17037 if test "${cf_cv_func_vsscanf+set}" = set; then
17038   echo $ECHO_N "(cached) $ECHO_C" >&6
17039 else
17040
17041 cat >conftest.$ac_ext <<_ACEOF
17042 #line 17042 "configure"
17043 #include "confdefs.h"
17044
17045 #include <stdarg.h>
17046 #include <stdio.h>
17047 int
17048 main ()
17049 {
17050
17051         va_list ap;
17052         vsscanf("from", "%d", ap)
17053   ;
17054   return 0;
17055 }
17056 _ACEOF
17057 rm -f conftest.$ac_objext conftest$ac_exeext
17058 if { (eval echo "$as_me:17058: \"$ac_link\"") >&5
17059   (eval $ac_link) 2>&5
17060   ac_status=$?
17061   echo "$as_me:17061: \$? = $ac_status" >&5
17062   (exit $ac_status); } &&
17063          { ac_try='test -s conftest$ac_exeext'
17064   { (eval echo "$as_me:17064: \"$ac_try\"") >&5
17065   (eval $ac_try) 2>&5
17066   ac_status=$?
17067   echo "$as_me:17067: \$? = $ac_status" >&5
17068   (exit $ac_status); }; }; then
17069   cf_cv_func_vsscanf=vsscanf
17070 else
17071   echo "$as_me: failed program was:" >&5
17072 cat conftest.$ac_ext >&5
17073
17074 cat >conftest.$ac_ext <<_ACEOF
17075 #line 17075 "configure"
17076 #include "confdefs.h"
17077
17078 #include <stdarg.h>
17079 #include <stdio.h>
17080 int
17081 main ()
17082 {
17083
17084         FILE strbuf;
17085         char *str = "from";
17086
17087         strbuf._flag = _IOREAD;
17088         strbuf._ptr = strbuf._base = (unsigned char *) str;
17089         strbuf._cnt = strlen(str);
17090         strbuf._file = _NFILE;
17091         return (vfscanf(&strbuf, "%d", ap))
17092   ;
17093   return 0;
17094 }
17095 _ACEOF
17096 rm -f conftest.$ac_objext conftest$ac_exeext
17097 if { (eval echo "$as_me:17097: \"$ac_link\"") >&5
17098   (eval $ac_link) 2>&5
17099   ac_status=$?
17100   echo "$as_me:17100: \$? = $ac_status" >&5
17101   (exit $ac_status); } &&
17102          { ac_try='test -s conftest$ac_exeext'
17103   { (eval echo "$as_me:17103: \"$ac_try\"") >&5
17104   (eval $ac_try) 2>&5
17105   ac_status=$?
17106   echo "$as_me:17106: \$? = $ac_status" >&5
17107   (exit $ac_status); }; }; then
17108   cf_cv_func_vsscanf=vfscanf
17109 else
17110   echo "$as_me: failed program was:" >&5
17111 cat conftest.$ac_ext >&5
17112
17113 cat >conftest.$ac_ext <<_ACEOF
17114 #line 17114 "configure"
17115 #include "confdefs.h"
17116
17117 #include <stdarg.h>
17118 #include <stdio.h>
17119 int
17120 main ()
17121 {
17122
17123         FILE strbuf;
17124         char *str = "from";
17125
17126         strbuf._flag = _IOREAD;
17127         strbuf._ptr = strbuf._base = (unsigned char *) str;
17128         strbuf._cnt = strlen(str);
17129         strbuf._file = _NFILE;
17130         return (_doscan(&strbuf, "%d", ap))
17131   ;
17132   return 0;
17133 }
17134 _ACEOF
17135 rm -f conftest.$ac_objext conftest$ac_exeext
17136 if { (eval echo "$as_me:17136: \"$ac_link\"") >&5
17137   (eval $ac_link) 2>&5
17138   ac_status=$?
17139   echo "$as_me:17139: \$? = $ac_status" >&5
17140   (exit $ac_status); } &&
17141          { ac_try='test -s conftest$ac_exeext'
17142   { (eval echo "$as_me:17142: \"$ac_try\"") >&5
17143   (eval $ac_try) 2>&5
17144   ac_status=$?
17145   echo "$as_me:17145: \$? = $ac_status" >&5
17146   (exit $ac_status); }; }; then
17147   cf_cv_func_vsscanf=_doscan
17148 else
17149   echo "$as_me: failed program was:" >&5
17150 cat conftest.$ac_ext >&5
17151
17152 cf_cv_func_vsscanf=no
17153 fi
17154 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17155 fi
17156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17157 fi
17158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17159 fi
17160 echo "$as_me:17160: result: $cf_cv_func_vsscanf" >&5
17161 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17162
17163 case $cf_cv_func_vsscanf in
17164 (vsscanf)
17165 cat >>confdefs.h <<\EOF
17166 #define HAVE_VSSCANF 1
17167 EOF
17168 ;;
17169 (vfscanf)
17170 cat >>confdefs.h <<\EOF
17171 #define HAVE_VFSCANF 1
17172 EOF
17173 ;;
17174 (_doscan)
17175 cat >>confdefs.h <<\EOF
17176 #define HAVE__DOSCAN 1
17177 EOF
17178 ;;
17179 esac
17180
17181 echo "$as_me:17181: checking for working mkstemp" >&5
17182 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17183 if test "${cf_cv_func_mkstemp+set}" = set; then
17184   echo $ECHO_N "(cached) $ECHO_C" >&6
17185 else
17186
17187 rm -rf conftest*
17188 if test "$cross_compiling" = yes; then
17189   cf_cv_func_mkstemp=maybe
17190 else
17191   cat >conftest.$ac_ext <<_ACEOF
17192 #line 17192 "configure"
17193 #include "confdefs.h"
17194
17195 #include <sys/types.h>
17196 #include <stdlib.h>
17197 #include <stdio.h>
17198 #include <string.h>
17199 #include <sys/stat.h>
17200 int main()
17201 {
17202         char *tmpl = "conftestXXXXXX";
17203         char name[2][80];
17204         int n;
17205         int result = 0;
17206         int fd;
17207         struct stat sb;
17208
17209         umask(077);
17210         for (n = 0; n < 2; ++n) {
17211                 strcpy(name[n], tmpl);
17212                 if ((fd = mkstemp(name[n])) >= 0) {
17213                         if (!strcmp(name[n], tmpl)
17214                          || stat(name[n], &sb) != 0
17215                          || (sb.st_mode & S_IFMT) != S_IFREG
17216                          || (sb.st_mode & 077) != 0) {
17217                                 result = 1;
17218                         }
17219                         close(fd);
17220                 }
17221         }
17222         if (result == 0
17223          && !strcmp(name[0], name[1]))
17224                 result = 1;
17225         ${cf_cv_main_return:-return}(result);
17226 }
17227
17228 _ACEOF
17229 rm -f conftest$ac_exeext
17230 if { (eval echo "$as_me:17230: \"$ac_link\"") >&5
17231   (eval $ac_link) 2>&5
17232   ac_status=$?
17233   echo "$as_me:17233: \$? = $ac_status" >&5
17234   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17235   { (eval echo "$as_me:17235: \"$ac_try\"") >&5
17236   (eval $ac_try) 2>&5
17237   ac_status=$?
17238   echo "$as_me:17238: \$? = $ac_status" >&5
17239   (exit $ac_status); }; }; then
17240   cf_cv_func_mkstemp=yes
17241
17242 else
17243   echo "$as_me: program exited with status $ac_status" >&5
17244 echo "$as_me: failed program was:" >&5
17245 cat conftest.$ac_ext >&5
17246 cf_cv_func_mkstemp=no
17247
17248 fi
17249 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17250 fi
17251
17252 fi
17253 echo "$as_me:17253: result: $cf_cv_func_mkstemp" >&5
17254 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17255 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17256         echo "$as_me:17256: checking for mkstemp" >&5
17257 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17258 if test "${ac_cv_func_mkstemp+set}" = set; then
17259   echo $ECHO_N "(cached) $ECHO_C" >&6
17260 else
17261   cat >conftest.$ac_ext <<_ACEOF
17262 #line 17262 "configure"
17263 #include "confdefs.h"
17264 /* System header to define __stub macros and hopefully few prototypes,
17265     which can conflict with char mkstemp (); below.  */
17266 #include <assert.h>
17267 /* Override any gcc2 internal prototype to avoid an error.  */
17268 #ifdef __cplusplus
17269 extern "C"
17270 #endif
17271 /* We use char because int might match the return type of a gcc2
17272    builtin and then its argument prototype would still apply.  */
17273 char mkstemp ();
17274 char (*f) ();
17275
17276 int
17277 main ()
17278 {
17279 /* The GNU C library defines this for functions which it implements
17280     to always fail with ENOSYS.  Some functions are actually named
17281     something starting with __ and the normal name is an alias.  */
17282 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17283 choke me
17284 #else
17285 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17286 #endif
17287
17288   ;
17289   return 0;
17290 }
17291 _ACEOF
17292 rm -f conftest.$ac_objext conftest$ac_exeext
17293 if { (eval echo "$as_me:17293: \"$ac_link\"") >&5
17294   (eval $ac_link) 2>&5
17295   ac_status=$?
17296   echo "$as_me:17296: \$? = $ac_status" >&5
17297   (exit $ac_status); } &&
17298          { ac_try='test -s conftest$ac_exeext'
17299   { (eval echo "$as_me:17299: \"$ac_try\"") >&5
17300   (eval $ac_try) 2>&5
17301   ac_status=$?
17302   echo "$as_me:17302: \$? = $ac_status" >&5
17303   (exit $ac_status); }; }; then
17304   ac_cv_func_mkstemp=yes
17305 else
17306   echo "$as_me: failed program was:" >&5
17307 cat conftest.$ac_ext >&5
17308 ac_cv_func_mkstemp=no
17309 fi
17310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17311 fi
17312 echo "$as_me:17312: result: $ac_cv_func_mkstemp" >&5
17313 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17314
17315 fi
17316 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17317
17318 cat >>confdefs.h <<\EOF
17319 #define HAVE_MKSTEMP 1
17320 EOF
17321
17322 fi
17323
17324 # setup for prototype of fallback for vsscanf()
17325
17326 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17327         HAVE_VSSCANF=1
17328 else
17329         HAVE_VSSCANF=0
17330 fi
17331
17332 if test "x$cross_compiling" = xyes ; then
17333         { echo "$as_me:17333: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17334 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17335 else
17336         echo "$as_me:17336: checking whether setvbuf arguments are reversed" >&5
17337 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17338 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17339   echo $ECHO_N "(cached) $ECHO_C" >&6
17340 else
17341   if test "$cross_compiling" = yes; then
17342   { { echo "$as_me:17342: error: cannot run test program while cross compiling" >&5
17343 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17344    { (exit 1); exit 1; }; }
17345 else
17346   cat >conftest.$ac_ext <<_ACEOF
17347 #line 17347 "configure"
17348 #include "confdefs.h"
17349 #include <stdio.h>
17350 /* If setvbuf has the reversed format, exit 0. */
17351 int
17352 main ()
17353 {
17354   /* This call has the arguments reversed.
17355      A reversed system may check and see that the address of main
17356      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17357   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17358     $ac_main_return(1);
17359   putc('\r', stdout);
17360   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17361 }
17362 _ACEOF
17363 rm -f conftest$ac_exeext
17364 if { (eval echo "$as_me:17364: \"$ac_link\"") >&5
17365   (eval $ac_link) 2>&5
17366   ac_status=$?
17367   echo "$as_me:17367: \$? = $ac_status" >&5
17368   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17369   { (eval echo "$as_me:17369: \"$ac_try\"") >&5
17370   (eval $ac_try) 2>&5
17371   ac_status=$?
17372   echo "$as_me:17372: \$? = $ac_status" >&5
17373   (exit $ac_status); }; }; then
17374   ac_cv_func_setvbuf_reversed=yes
17375 else
17376   echo "$as_me: program exited with status $ac_status" >&5
17377 echo "$as_me: failed program was:" >&5
17378 cat conftest.$ac_ext >&5
17379 ac_cv_func_setvbuf_reversed=no
17380 fi
17381 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17382 fi
17383 rm -f core core.* *.core
17384 fi
17385 echo "$as_me:17385: result: $ac_cv_func_setvbuf_reversed" >&5
17386 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17387 if test $ac_cv_func_setvbuf_reversed = yes; then
17388
17389 cat >>confdefs.h <<\EOF
17390 #define SETVBUF_REVERSED 1
17391 EOF
17392
17393 fi
17394
17395 fi
17396 echo "$as_me:17396: checking for intptr_t" >&5
17397 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17398 if test "${ac_cv_type_intptr_t+set}" = set; then
17399   echo $ECHO_N "(cached) $ECHO_C" >&6
17400 else
17401   cat >conftest.$ac_ext <<_ACEOF
17402 #line 17402 "configure"
17403 #include "confdefs.h"
17404 $ac_includes_default
17405 int
17406 main ()
17407 {
17408 if ((intptr_t *) 0)
17409   return 0;
17410 if (sizeof (intptr_t))
17411   return 0;
17412   ;
17413   return 0;
17414 }
17415 _ACEOF
17416 rm -f conftest.$ac_objext
17417 if { (eval echo "$as_me:17417: \"$ac_compile\"") >&5
17418   (eval $ac_compile) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit $ac_status); } &&
17422          { ac_try='test -s conftest.$ac_objext'
17423   { (eval echo "$as_me:17423: \"$ac_try\"") >&5
17424   (eval $ac_try) 2>&5
17425   ac_status=$?
17426   echo "$as_me:17426: \$? = $ac_status" >&5
17427   (exit $ac_status); }; }; then
17428   ac_cv_type_intptr_t=yes
17429 else
17430   echo "$as_me: failed program was:" >&5
17431 cat conftest.$ac_ext >&5
17432 ac_cv_type_intptr_t=no
17433 fi
17434 rm -f conftest.$ac_objext conftest.$ac_ext
17435 fi
17436 echo "$as_me:17436: result: $ac_cv_type_intptr_t" >&5
17437 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17438 if test $ac_cv_type_intptr_t = yes; then
17439   :
17440 else
17441
17442 cat >>confdefs.h <<EOF
17443 #define intptr_t long
17444 EOF
17445
17446 fi
17447
17448 echo "$as_me:17448: checking for ssize_t" >&5
17449 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17450 if test "${ac_cv_type_ssize_t+set}" = set; then
17451   echo $ECHO_N "(cached) $ECHO_C" >&6
17452 else
17453   cat >conftest.$ac_ext <<_ACEOF
17454 #line 17454 "configure"
17455 #include "confdefs.h"
17456 $ac_includes_default
17457 int
17458 main ()
17459 {
17460 if ((ssize_t *) 0)
17461   return 0;
17462 if (sizeof (ssize_t))
17463   return 0;
17464   ;
17465   return 0;
17466 }
17467 _ACEOF
17468 rm -f conftest.$ac_objext
17469 if { (eval echo "$as_me:17469: \"$ac_compile\"") >&5
17470   (eval $ac_compile) 2>&5
17471   ac_status=$?
17472   echo "$as_me:17472: \$? = $ac_status" >&5
17473   (exit $ac_status); } &&
17474          { ac_try='test -s conftest.$ac_objext'
17475   { (eval echo "$as_me:17475: \"$ac_try\"") >&5
17476   (eval $ac_try) 2>&5
17477   ac_status=$?
17478   echo "$as_me:17478: \$? = $ac_status" >&5
17479   (exit $ac_status); }; }; then
17480   ac_cv_type_ssize_t=yes
17481 else
17482   echo "$as_me: failed program was:" >&5
17483 cat conftest.$ac_ext >&5
17484 ac_cv_type_ssize_t=no
17485 fi
17486 rm -f conftest.$ac_objext conftest.$ac_ext
17487 fi
17488 echo "$as_me:17488: result: $ac_cv_type_ssize_t" >&5
17489 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17490 if test $ac_cv_type_ssize_t = yes; then
17491   :
17492 else
17493
17494 cat >>confdefs.h <<EOF
17495 #define ssize_t int
17496 EOF
17497
17498 fi
17499
17500 echo "$as_me:17500: checking for type sigaction_t" >&5
17501 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17502 if test "${cf_cv_type_sigaction+set}" = set; then
17503   echo $ECHO_N "(cached) $ECHO_C" >&6
17504 else
17505
17506         cat >conftest.$ac_ext <<_ACEOF
17507 #line 17507 "configure"
17508 #include "confdefs.h"
17509
17510 #include <signal.h>
17511 int
17512 main ()
17513 {
17514 sigaction_t x
17515   ;
17516   return 0;
17517 }
17518 _ACEOF
17519 rm -f conftest.$ac_objext
17520 if { (eval echo "$as_me:17520: \"$ac_compile\"") >&5
17521   (eval $ac_compile) 2>&5
17522   ac_status=$?
17523   echo "$as_me:17523: \$? = $ac_status" >&5
17524   (exit $ac_status); } &&
17525          { ac_try='test -s conftest.$ac_objext'
17526   { (eval echo "$as_me:17526: \"$ac_try\"") >&5
17527   (eval $ac_try) 2>&5
17528   ac_status=$?
17529   echo "$as_me:17529: \$? = $ac_status" >&5
17530   (exit $ac_status); }; }; then
17531   cf_cv_type_sigaction=yes
17532 else
17533   echo "$as_me: failed program was:" >&5
17534 cat conftest.$ac_ext >&5
17535 cf_cv_type_sigaction=no
17536 fi
17537 rm -f conftest.$ac_objext conftest.$ac_ext
17538 fi
17539
17540 echo "$as_me:17540: result: $cf_cv_type_sigaction" >&5
17541 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17542 test "$cf_cv_type_sigaction" = yes &&
17543 cat >>confdefs.h <<\EOF
17544 #define HAVE_TYPE_SIGACTION 1
17545 EOF
17546
17547 echo "$as_me:17547: checking declaration of size-change" >&5
17548 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17549 if test "${cf_cv_sizechange+set}" = set; then
17550   echo $ECHO_N "(cached) $ECHO_C" >&6
17551 else
17552
17553         cf_cv_sizechange=unknown
17554         cf_save_CPPFLAGS="$CPPFLAGS"
17555
17556 for cf_opts in "" "NEED_PTEM_H"
17557 do
17558
17559         CPPFLAGS="$cf_save_CPPFLAGS"
17560         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17561         cat >conftest.$ac_ext <<_ACEOF
17562 #line 17562 "configure"
17563 #include "confdefs.h"
17564 #include <sys/types.h>
17565 #ifdef HAVE_TERMIOS_H
17566 #include <termios.h>
17567 #else
17568 #ifdef HAVE_TERMIO_H
17569 #include <termio.h>
17570 #endif
17571 #endif
17572 #ifdef NEED_PTEM_H
17573 /* This is a workaround for SCO:  they neglected to define struct winsize in
17574  * termios.h -- it's only in termio.h and ptem.h
17575  */
17576 #include        <sys/stream.h>
17577 #include        <sys/ptem.h>
17578 #endif
17579 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17580 #include <sys/ioctl.h>
17581 #endif
17582
17583 int
17584 main ()
17585 {
17586
17587 #ifdef TIOCGSIZE
17588         struct ttysize win;     /* FIXME: what system is this? */
17589         int y = win.ts_lines;
17590         int x = win.ts_cols;
17591 #else
17592 #ifdef TIOCGWINSZ
17593         struct winsize win;
17594         int y = win.ws_row;
17595         int x = win.ws_col;
17596 #else
17597         no TIOCGSIZE or TIOCGWINSZ
17598 #endif /* TIOCGWINSZ */
17599 #endif /* TIOCGSIZE */
17600
17601   ;
17602   return 0;
17603 }
17604 _ACEOF
17605 rm -f conftest.$ac_objext
17606 if { (eval echo "$as_me:17606: \"$ac_compile\"") >&5
17607   (eval $ac_compile) 2>&5
17608   ac_status=$?
17609   echo "$as_me:17609: \$? = $ac_status" >&5
17610   (exit $ac_status); } &&
17611          { ac_try='test -s conftest.$ac_objext'
17612   { (eval echo "$as_me:17612: \"$ac_try\"") >&5
17613   (eval $ac_try) 2>&5
17614   ac_status=$?
17615   echo "$as_me:17615: \$? = $ac_status" >&5
17616   (exit $ac_status); }; }; then
17617   cf_cv_sizechange=yes
17618 else
17619   echo "$as_me: failed program was:" >&5
17620 cat conftest.$ac_ext >&5
17621 cf_cv_sizechange=no
17622 fi
17623 rm -f conftest.$ac_objext conftest.$ac_ext
17624
17625         CPPFLAGS="$cf_save_CPPFLAGS"
17626         if test "$cf_cv_sizechange" = yes ; then
17627                 echo "size-change succeeded ($cf_opts)" >&5
17628                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17629                 break
17630         fi
17631 done
17632
17633 fi
17634 echo "$as_me:17634: result: $cf_cv_sizechange" >&5
17635 echo "${ECHO_T}$cf_cv_sizechange" >&6
17636 if test "$cf_cv_sizechange" != no ; then
17637
17638 cat >>confdefs.h <<\EOF
17639 #define HAVE_SIZECHANGE 1
17640 EOF
17641
17642         case $cf_cv_sizechange in
17643         (NEED*)
17644                 cat >>confdefs.h <<EOF
17645 #define $cf_cv_sizechange  1
17646 EOF
17647
17648                 ;;
17649         esac
17650 fi
17651
17652 echo "$as_me:17652: checking for memmove" >&5
17653 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17654 if test "${ac_cv_func_memmove+set}" = set; then
17655   echo $ECHO_N "(cached) $ECHO_C" >&6
17656 else
17657   cat >conftest.$ac_ext <<_ACEOF
17658 #line 17658 "configure"
17659 #include "confdefs.h"
17660 /* System header to define __stub macros and hopefully few prototypes,
17661     which can conflict with char memmove (); below.  */
17662 #include <assert.h>
17663 /* Override any gcc2 internal prototype to avoid an error.  */
17664 #ifdef __cplusplus
17665 extern "C"
17666 #endif
17667 /* We use char because int might match the return type of a gcc2
17668    builtin and then its argument prototype would still apply.  */
17669 char memmove ();
17670 char (*f) ();
17671
17672 int
17673 main ()
17674 {
17675 /* The GNU C library defines this for functions which it implements
17676     to always fail with ENOSYS.  Some functions are actually named
17677     something starting with __ and the normal name is an alias.  */
17678 #if defined (__stub_memmove) || defined (__stub___memmove)
17679 choke me
17680 #else
17681 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17682 #endif
17683
17684   ;
17685   return 0;
17686 }
17687 _ACEOF
17688 rm -f conftest.$ac_objext conftest$ac_exeext
17689 if { (eval echo "$as_me:17689: \"$ac_link\"") >&5
17690   (eval $ac_link) 2>&5
17691   ac_status=$?
17692   echo "$as_me:17692: \$? = $ac_status" >&5
17693   (exit $ac_status); } &&
17694          { ac_try='test -s conftest$ac_exeext'
17695   { (eval echo "$as_me:17695: \"$ac_try\"") >&5
17696   (eval $ac_try) 2>&5
17697   ac_status=$?
17698   echo "$as_me:17698: \$? = $ac_status" >&5
17699   (exit $ac_status); }; }; then
17700   ac_cv_func_memmove=yes
17701 else
17702   echo "$as_me: failed program was:" >&5
17703 cat conftest.$ac_ext >&5
17704 ac_cv_func_memmove=no
17705 fi
17706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17707 fi
17708 echo "$as_me:17708: result: $ac_cv_func_memmove" >&5
17709 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17710 if test $ac_cv_func_memmove = yes; then
17711   :
17712 else
17713
17714 echo "$as_me:17714: checking for bcopy" >&5
17715 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17716 if test "${ac_cv_func_bcopy+set}" = set; then
17717   echo $ECHO_N "(cached) $ECHO_C" >&6
17718 else
17719   cat >conftest.$ac_ext <<_ACEOF
17720 #line 17720 "configure"
17721 #include "confdefs.h"
17722 /* System header to define __stub macros and hopefully few prototypes,
17723     which can conflict with char bcopy (); below.  */
17724 #include <assert.h>
17725 /* Override any gcc2 internal prototype to avoid an error.  */
17726 #ifdef __cplusplus
17727 extern "C"
17728 #endif
17729 /* We use char because int might match the return type of a gcc2
17730    builtin and then its argument prototype would still apply.  */
17731 char bcopy ();
17732 char (*f) ();
17733
17734 int
17735 main ()
17736 {
17737 /* The GNU C library defines this for functions which it implements
17738     to always fail with ENOSYS.  Some functions are actually named
17739     something starting with __ and the normal name is an alias.  */
17740 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17741 choke me
17742 #else
17743 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17744 #endif
17745
17746   ;
17747   return 0;
17748 }
17749 _ACEOF
17750 rm -f conftest.$ac_objext conftest$ac_exeext
17751 if { (eval echo "$as_me:17751: \"$ac_link\"") >&5
17752   (eval $ac_link) 2>&5
17753   ac_status=$?
17754   echo "$as_me:17754: \$? = $ac_status" >&5
17755   (exit $ac_status); } &&
17756          { ac_try='test -s conftest$ac_exeext'
17757   { (eval echo "$as_me:17757: \"$ac_try\"") >&5
17758   (eval $ac_try) 2>&5
17759   ac_status=$?
17760   echo "$as_me:17760: \$? = $ac_status" >&5
17761   (exit $ac_status); }; }; then
17762   ac_cv_func_bcopy=yes
17763 else
17764   echo "$as_me: failed program was:" >&5
17765 cat conftest.$ac_ext >&5
17766 ac_cv_func_bcopy=no
17767 fi
17768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17769 fi
17770 echo "$as_me:17770: result: $ac_cv_func_bcopy" >&5
17771 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17772 if test $ac_cv_func_bcopy = yes; then
17773
17774         echo "$as_me:17774: checking if bcopy does overlapping moves" >&5
17775 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17776 if test "${cf_cv_good_bcopy+set}" = set; then
17777   echo $ECHO_N "(cached) $ECHO_C" >&6
17778 else
17779
17780                 if test "$cross_compiling" = yes; then
17781   cf_cv_good_bcopy=unknown
17782 else
17783   cat >conftest.$ac_ext <<_ACEOF
17784 #line 17784 "configure"
17785 #include "confdefs.h"
17786
17787 int main() {
17788         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17789         char temp[40];
17790         bcopy(data, temp, sizeof(data));
17791         bcopy(temp+10, temp, 15);
17792         bcopy(temp+5, temp+15, 10);
17793         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17794 }
17795
17796 _ACEOF
17797 rm -f conftest$ac_exeext
17798 if { (eval echo "$as_me:17798: \"$ac_link\"") >&5
17799   (eval $ac_link) 2>&5
17800   ac_status=$?
17801   echo "$as_me:17801: \$? = $ac_status" >&5
17802   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17803   { (eval echo "$as_me:17803: \"$ac_try\"") >&5
17804   (eval $ac_try) 2>&5
17805   ac_status=$?
17806   echo "$as_me:17806: \$? = $ac_status" >&5
17807   (exit $ac_status); }; }; then
17808   cf_cv_good_bcopy=yes
17809 else
17810   echo "$as_me: program exited with status $ac_status" >&5
17811 echo "$as_me: failed program was:" >&5
17812 cat conftest.$ac_ext >&5
17813 cf_cv_good_bcopy=no
17814 fi
17815 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17816 fi
17817
17818 fi
17819 echo "$as_me:17819: result: $cf_cv_good_bcopy" >&5
17820 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17821
17822 else
17823   cf_cv_good_bcopy=no
17824 fi
17825
17826         if test "$cf_cv_good_bcopy" = yes ; then
17827
17828 cat >>confdefs.h <<\EOF
17829 #define USE_OK_BCOPY 1
17830 EOF
17831
17832         else
17833
17834 cat >>confdefs.h <<\EOF
17835 #define USE_MY_MEMMOVE 1
17836 EOF
17837
17838         fi
17839
17840 fi
17841
17842 tty 2>&1 >/dev/null || {
17843 for ac_func in posix_openpt
17844 do
17845 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17846 echo "$as_me:17846: checking for $ac_func" >&5
17847 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17848 if eval "test \"\${$as_ac_var+set}\" = set"; then
17849   echo $ECHO_N "(cached) $ECHO_C" >&6
17850 else
17851   cat >conftest.$ac_ext <<_ACEOF
17852 #line 17852 "configure"
17853 #include "confdefs.h"
17854 /* System header to define __stub macros and hopefully few prototypes,
17855     which can conflict with char $ac_func (); below.  */
17856 #include <assert.h>
17857 /* Override any gcc2 internal prototype to avoid an error.  */
17858 #ifdef __cplusplus
17859 extern "C"
17860 #endif
17861 /* We use char because int might match the return type of a gcc2
17862    builtin and then its argument prototype would still apply.  */
17863 char $ac_func ();
17864 char (*f) ();
17865
17866 int
17867 main ()
17868 {
17869 /* The GNU C library defines this for functions which it implements
17870     to always fail with ENOSYS.  Some functions are actually named
17871     something starting with __ and the normal name is an alias.  */
17872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17873 choke me
17874 #else
17875 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17876 #endif
17877
17878   ;
17879   return 0;
17880 }
17881 _ACEOF
17882 rm -f conftest.$ac_objext conftest$ac_exeext
17883 if { (eval echo "$as_me:17883: \"$ac_link\"") >&5
17884   (eval $ac_link) 2>&5
17885   ac_status=$?
17886   echo "$as_me:17886: \$? = $ac_status" >&5
17887   (exit $ac_status); } &&
17888          { ac_try='test -s conftest$ac_exeext'
17889   { (eval echo "$as_me:17889: \"$ac_try\"") >&5
17890   (eval $ac_try) 2>&5
17891   ac_status=$?
17892   echo "$as_me:17892: \$? = $ac_status" >&5
17893   (exit $ac_status); }; }; then
17894   eval "$as_ac_var=yes"
17895 else
17896   echo "$as_me: failed program was:" >&5
17897 cat conftest.$ac_ext >&5
17898 eval "$as_ac_var=no"
17899 fi
17900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17901 fi
17902 echo "$as_me:17902: result: `eval echo '${'$as_ac_var'}'`" >&5
17903 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17904 if test `eval echo '${'$as_ac_var'}'` = yes; then
17905   cat >>confdefs.h <<EOF
17906 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17907 EOF
17908
17909 fi
17910 done
17911  }
17912 echo "$as_me:17912: checking if poll really works" >&5
17913 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17914 if test "${cf_cv_working_poll+set}" = set; then
17915   echo $ECHO_N "(cached) $ECHO_C" >&6
17916 else
17917
17918 if test "$cross_compiling" = yes; then
17919   cf_cv_working_poll=unknown
17920 else
17921   cat >conftest.$ac_ext <<_ACEOF
17922 #line 17922 "configure"
17923 #include "confdefs.h"
17924
17925 #include <stdlib.h>
17926 #include <stdio.h>
17927 #include <unistd.h>
17928 #include <fcntl.h>
17929 #ifdef HAVE_POLL_H
17930 #include <poll.h>
17931 #else
17932 #include <sys/poll.h>
17933 #endif
17934 int main(void) {
17935         struct pollfd myfds;
17936         int ret;
17937
17938         /* check for Darwin bug with respect to "devices" */
17939         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17940         if (myfds.fd < 0)
17941                 myfds.fd = 0;
17942         myfds.events = POLLIN;
17943         myfds.revents = 0;
17944
17945         ret = poll(&myfds, 1, 100);
17946
17947         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17948                 ret = -1;
17949         } else {
17950                 int fd = 0;
17951                 if (!isatty(fd)) {
17952                         fd = open("/dev/tty", 2);       /* O_RDWR */
17953                 }
17954 #ifdef HAVE_POSIX_OPENPT
17955                 if (fd < 0) {
17956                         fd = posix_openpt(O_RDWR);
17957                 }
17958 #endif
17959
17960                 if (fd >= 0) {
17961                         /* also check with standard input */
17962                         myfds.fd = fd;
17963                         myfds.events = POLLIN;
17964                         myfds.revents = 0;
17965                         ret = poll(&myfds, 1, 100);
17966                 } else {
17967                         ret = -1;
17968                 }
17969         }
17970         ${cf_cv_main_return:-return}(ret < 0);
17971 }
17972 _ACEOF
17973 rm -f conftest$ac_exeext
17974 if { (eval echo "$as_me:17974: \"$ac_link\"") >&5
17975   (eval $ac_link) 2>&5
17976   ac_status=$?
17977   echo "$as_me:17977: \$? = $ac_status" >&5
17978   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17979   { (eval echo "$as_me:17979: \"$ac_try\"") >&5
17980   (eval $ac_try) 2>&5
17981   ac_status=$?
17982   echo "$as_me:17982: \$? = $ac_status" >&5
17983   (exit $ac_status); }; }; then
17984   cf_cv_working_poll=yes
17985 else
17986   echo "$as_me: program exited with status $ac_status" >&5
17987 echo "$as_me: failed program was:" >&5
17988 cat conftest.$ac_ext >&5
17989 cf_cv_working_poll=no
17990 fi
17991 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17992 fi
17993 fi
17994 echo "$as_me:17994: result: $cf_cv_working_poll" >&5
17995 echo "${ECHO_T}$cf_cv_working_poll" >&6
17996 test "$cf_cv_working_poll" = "yes" &&
17997 cat >>confdefs.h <<\EOF
17998 #define HAVE_WORKING_POLL 1
17999 EOF
18000
18001 echo "$as_me:18001: checking for va_copy" >&5
18002 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18003 if test "${cf_cv_have_va_copy+set}" = set; then
18004   echo $ECHO_N "(cached) $ECHO_C" >&6
18005 else
18006
18007 cat >conftest.$ac_ext <<_ACEOF
18008 #line 18008 "configure"
18009 #include "confdefs.h"
18010
18011 #include <stdarg.h>
18012
18013 int
18014 main ()
18015 {
18016
18017         static va_list dst;
18018         static va_list src;
18019         va_copy(dst, src)
18020   ;
18021   return 0;
18022 }
18023 _ACEOF
18024 rm -f conftest.$ac_objext conftest$ac_exeext
18025 if { (eval echo "$as_me:18025: \"$ac_link\"") >&5
18026   (eval $ac_link) 2>&5
18027   ac_status=$?
18028   echo "$as_me:18028: \$? = $ac_status" >&5
18029   (exit $ac_status); } &&
18030          { ac_try='test -s conftest$ac_exeext'
18031   { (eval echo "$as_me:18031: \"$ac_try\"") >&5
18032   (eval $ac_try) 2>&5
18033   ac_status=$?
18034   echo "$as_me:18034: \$? = $ac_status" >&5
18035   (exit $ac_status); }; }; then
18036   cf_cv_have_va_copy=yes
18037 else
18038   echo "$as_me: failed program was:" >&5
18039 cat conftest.$ac_ext >&5
18040 cf_cv_have_va_copy=no
18041 fi
18042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18043 fi
18044 echo "$as_me:18044: result: $cf_cv_have_va_copy" >&5
18045 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18046
18047 test "$cf_cv_have_va_copy" = yes &&
18048 cat >>confdefs.h <<\EOF
18049 #define HAVE_VA_COPY 1
18050 EOF
18051
18052 echo "$as_me:18052: checking for __va_copy" >&5
18053 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18054 if test "${cf_cv_have___va_copy+set}" = set; then
18055   echo $ECHO_N "(cached) $ECHO_C" >&6
18056 else
18057
18058 cat >conftest.$ac_ext <<_ACEOF
18059 #line 18059 "configure"
18060 #include "confdefs.h"
18061
18062 #include <stdarg.h>
18063
18064 int
18065 main ()
18066 {
18067
18068         static va_list dst;
18069         static va_list src;
18070         __va_copy(dst, src)
18071   ;
18072   return 0;
18073 }
18074 _ACEOF
18075 rm -f conftest.$ac_objext conftest$ac_exeext
18076 if { (eval echo "$as_me:18076: \"$ac_link\"") >&5
18077   (eval $ac_link) 2>&5
18078   ac_status=$?
18079   echo "$as_me:18079: \$? = $ac_status" >&5
18080   (exit $ac_status); } &&
18081          { ac_try='test -s conftest$ac_exeext'
18082   { (eval echo "$as_me:18082: \"$ac_try\"") >&5
18083   (eval $ac_try) 2>&5
18084   ac_status=$?
18085   echo "$as_me:18085: \$? = $ac_status" >&5
18086   (exit $ac_status); }; }; then
18087   cf_cv_have___va_copy=yes
18088 else
18089   echo "$as_me: failed program was:" >&5
18090 cat conftest.$ac_ext >&5
18091 cf_cv_have___va_copy=no
18092 fi
18093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18094 fi
18095 echo "$as_me:18095: result: $cf_cv_have___va_copy" >&5
18096 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18097
18098 test "$cf_cv_have___va_copy" = yes &&
18099 cat >>confdefs.h <<\EOF
18100 #define HAVE___VA_COPY 1
18101 EOF
18102
18103 echo "$as_me:18103: checking for pid_t" >&5
18104 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18105 if test "${ac_cv_type_pid_t+set}" = set; then
18106   echo $ECHO_N "(cached) $ECHO_C" >&6
18107 else
18108   cat >conftest.$ac_ext <<_ACEOF
18109 #line 18109 "configure"
18110 #include "confdefs.h"
18111 $ac_includes_default
18112 int
18113 main ()
18114 {
18115 if ((pid_t *) 0)
18116   return 0;
18117 if (sizeof (pid_t))
18118   return 0;
18119   ;
18120   return 0;
18121 }
18122 _ACEOF
18123 rm -f conftest.$ac_objext
18124 if { (eval echo "$as_me:18124: \"$ac_compile\"") >&5
18125   (eval $ac_compile) 2>&5
18126   ac_status=$?
18127   echo "$as_me:18127: \$? = $ac_status" >&5
18128   (exit $ac_status); } &&
18129          { ac_try='test -s conftest.$ac_objext'
18130   { (eval echo "$as_me:18130: \"$ac_try\"") >&5
18131   (eval $ac_try) 2>&5
18132   ac_status=$?
18133   echo "$as_me:18133: \$? = $ac_status" >&5
18134   (exit $ac_status); }; }; then
18135   ac_cv_type_pid_t=yes
18136 else
18137   echo "$as_me: failed program was:" >&5
18138 cat conftest.$ac_ext >&5
18139 ac_cv_type_pid_t=no
18140 fi
18141 rm -f conftest.$ac_objext conftest.$ac_ext
18142 fi
18143 echo "$as_me:18143: result: $ac_cv_type_pid_t" >&5
18144 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18145 if test $ac_cv_type_pid_t = yes; then
18146   :
18147 else
18148
18149 cat >>confdefs.h <<EOF
18150 #define pid_t int
18151 EOF
18152
18153 fi
18154
18155 for ac_header in unistd.h vfork.h
18156 do
18157 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18158 echo "$as_me:18158: checking for $ac_header" >&5
18159 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18160 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18161   echo $ECHO_N "(cached) $ECHO_C" >&6
18162 else
18163   cat >conftest.$ac_ext <<_ACEOF
18164 #line 18164 "configure"
18165 #include "confdefs.h"
18166 #include <$ac_header>
18167 _ACEOF
18168 if { (eval echo "$as_me:18168: \"$ac_cpp conftest.$ac_ext\"") >&5
18169   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18170   ac_status=$?
18171   egrep -v '^ *\+' conftest.er1 >conftest.err
18172   rm -f conftest.er1
18173   cat conftest.err >&5
18174   echo "$as_me:18174: \$? = $ac_status" >&5
18175   (exit $ac_status); } >/dev/null; then
18176   if test -s conftest.err; then
18177     ac_cpp_err=$ac_c_preproc_warn_flag
18178   else
18179     ac_cpp_err=
18180   fi
18181 else
18182   ac_cpp_err=yes
18183 fi
18184 if test -z "$ac_cpp_err"; then
18185   eval "$as_ac_Header=yes"
18186 else
18187   echo "$as_me: failed program was:" >&5
18188   cat conftest.$ac_ext >&5
18189   eval "$as_ac_Header=no"
18190 fi
18191 rm -f conftest.err conftest.$ac_ext
18192 fi
18193 echo "$as_me:18193: result: `eval echo '${'$as_ac_Header'}'`" >&5
18194 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18195 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18196   cat >>confdefs.h <<EOF
18197 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18198 EOF
18199
18200 fi
18201 done
18202
18203 for ac_func in fork vfork
18204 do
18205 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18206 echo "$as_me:18206: checking for $ac_func" >&5
18207 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18208 if eval "test \"\${$as_ac_var+set}\" = set"; then
18209   echo $ECHO_N "(cached) $ECHO_C" >&6
18210 else
18211   cat >conftest.$ac_ext <<_ACEOF
18212 #line 18212 "configure"
18213 #include "confdefs.h"
18214 /* System header to define __stub macros and hopefully few prototypes,
18215     which can conflict with char $ac_func (); below.  */
18216 #include <assert.h>
18217 /* Override any gcc2 internal prototype to avoid an error.  */
18218 #ifdef __cplusplus
18219 extern "C"
18220 #endif
18221 /* We use char because int might match the return type of a gcc2
18222    builtin and then its argument prototype would still apply.  */
18223 char $ac_func ();
18224 char (*f) ();
18225
18226 int
18227 main ()
18228 {
18229 /* The GNU C library defines this for functions which it implements
18230     to always fail with ENOSYS.  Some functions are actually named
18231     something starting with __ and the normal name is an alias.  */
18232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18233 choke me
18234 #else
18235 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18236 #endif
18237
18238   ;
18239   return 0;
18240 }
18241 _ACEOF
18242 rm -f conftest.$ac_objext conftest$ac_exeext
18243 if { (eval echo "$as_me:18243: \"$ac_link\"") >&5
18244   (eval $ac_link) 2>&5
18245   ac_status=$?
18246   echo "$as_me:18246: \$? = $ac_status" >&5
18247   (exit $ac_status); } &&
18248          { ac_try='test -s conftest$ac_exeext'
18249   { (eval echo "$as_me:18249: \"$ac_try\"") >&5
18250   (eval $ac_try) 2>&5
18251   ac_status=$?
18252   echo "$as_me:18252: \$? = $ac_status" >&5
18253   (exit $ac_status); }; }; then
18254   eval "$as_ac_var=yes"
18255 else
18256   echo "$as_me: failed program was:" >&5
18257 cat conftest.$ac_ext >&5
18258 eval "$as_ac_var=no"
18259 fi
18260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18261 fi
18262 echo "$as_me:18262: result: `eval echo '${'$as_ac_var'}'`" >&5
18263 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18264 if test `eval echo '${'$as_ac_var'}'` = yes; then
18265   cat >>confdefs.h <<EOF
18266 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18267 EOF
18268
18269 fi
18270 done
18271
18272 ac_cv_func_fork_works=$ac_cv_func_fork
18273 if test "x$ac_cv_func_fork" = xyes; then
18274   echo "$as_me:18274: checking for working fork" >&5
18275 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18276 if test "${ac_cv_func_fork_works+set}" = set; then
18277   echo $ECHO_N "(cached) $ECHO_C" >&6
18278 else
18279   if test "$cross_compiling" = yes; then
18280   ac_cv_func_fork_works=cross
18281 else
18282   cat >conftest.$ac_ext <<_ACEOF
18283 /* By Rüdiger Kuhlmann. */
18284       #include <sys/types.h>
18285       #if HAVE_UNISTD_H
18286       # include <unistd.h>
18287       #endif
18288       /* Some systems only have a dummy stub for fork() */
18289       int main ()
18290       {
18291         if (fork() < 0)
18292           $ac_main_return (1);
18293         $ac_main_return (0);
18294       }
18295 _ACEOF
18296 rm -f conftest$ac_exeext
18297 if { (eval echo "$as_me:18297: \"$ac_link\"") >&5
18298   (eval $ac_link) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18302   { (eval echo "$as_me:18302: \"$ac_try\"") >&5
18303   (eval $ac_try) 2>&5
18304   ac_status=$?
18305   echo "$as_me:18305: \$? = $ac_status" >&5
18306   (exit $ac_status); }; }; then
18307   ac_cv_func_fork_works=yes
18308 else
18309   echo "$as_me: program exited with status $ac_status" >&5
18310 echo "$as_me: failed program was:" >&5
18311 cat conftest.$ac_ext >&5
18312 ac_cv_func_fork_works=no
18313 fi
18314 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18315 fi
18316 fi
18317 echo "$as_me:18317: result: $ac_cv_func_fork_works" >&5
18318 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18319
18320 fi
18321 if test "x$ac_cv_func_fork_works" = xcross; then
18322   case $host in
18323     *-*-amigaos* | *-*-msdosdjgpp*)
18324       # Override, as these systems have only a dummy fork() stub
18325       ac_cv_func_fork_works=no
18326       ;;
18327     *)
18328       ac_cv_func_fork_works=yes
18329       ;;
18330   esac
18331   { echo "$as_me:18331: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18332 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18333 fi
18334 ac_cv_func_vfork_works=$ac_cv_func_vfork
18335 if test "x$ac_cv_func_vfork" = xyes; then
18336   echo "$as_me:18336: checking for working vfork" >&5
18337 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18338 if test "${ac_cv_func_vfork_works+set}" = set; then
18339   echo $ECHO_N "(cached) $ECHO_C" >&6
18340 else
18341   if test "$cross_compiling" = yes; then
18342   ac_cv_func_vfork_works=cross
18343 else
18344   cat >conftest.$ac_ext <<_ACEOF
18345 #line 18345 "configure"
18346 #include "confdefs.h"
18347 /* Thanks to Paul Eggert for this test.  */
18348 #include <stdio.h>
18349 #include <sys/types.h>
18350 #include <sys/stat.h>
18351 #if HAVE_UNISTD_H
18352 # include <unistd.h>
18353 #endif
18354 #if HAVE_VFORK_H
18355 # include <vfork.h>
18356 #endif
18357 /* On some sparc systems, changes by the child to local and incoming
18358    argument registers are propagated back to the parent.  The compiler
18359    is told about this with #include <vfork.h>, but some compilers
18360    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18361    static variable whose address is put into a register that is
18362    clobbered by the vfork.  */
18363 static
18364 #ifdef __cplusplus
18365 sparc_address_test (int arg)
18366 # else
18367 sparc_address_test (arg) int arg;
18368 #endif
18369 {
18370   static pid_t child;
18371   if (!child) {
18372     child = vfork ();
18373     if (child < 0) {
18374       perror ("vfork");
18375       _exit(2);
18376     }
18377     if (!child) {
18378       arg = getpid();
18379       write(-1, "", 0);
18380       _exit (arg);
18381     }
18382   }
18383 }
18384
18385 int
18386 main ()
18387 {
18388   pid_t parent = getpid ();
18389   pid_t child;
18390
18391   sparc_address_test ();
18392
18393   child = vfork ();
18394
18395   if (child == 0) {
18396     /* Here is another test for sparc vfork register problems.  This
18397        test uses lots of local variables, at least as many local
18398        variables as main has allocated so far including compiler
18399        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18400        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18401        reuse the register of parent for one of the local variables,
18402        since it will think that parent can't possibly be used any more
18403        in this routine.  Assigning to the local variable will thus
18404        munge parent in the parent process.  */
18405     pid_t
18406       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18407       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18408     /* Convince the compiler that p..p7 are live; otherwise, it might
18409        use the same hardware register for all 8 local variables.  */
18410     if (p != p1 || p != p2 || p != p3 || p != p4
18411         || p != p5 || p != p6 || p != p7)
18412       _exit(1);
18413
18414     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18415        from child file descriptors.  If the child closes a descriptor
18416        before it execs or exits, this munges the parent's descriptor
18417        as well.  Test for this by closing stdout in the child.  */
18418     _exit(close(fileno(stdout)) != 0);
18419   } else {
18420     int status;
18421     struct stat st;
18422
18423     while (wait(&status) != child)
18424       ;
18425     $ac_main_return(
18426          /* Was there some problem with vforking?  */
18427          child < 0
18428
18429          /* Did the child fail?  (This shouldn't happen.)  */
18430          || status
18431
18432          /* Did the vfork/compiler bug occur?  */
18433          || parent != getpid()
18434
18435          /* Did the file descriptor bug occur?  */
18436          || fstat(fileno(stdout), &st) != 0
18437          );
18438   }
18439 }
18440 _ACEOF
18441 rm -f conftest$ac_exeext
18442 if { (eval echo "$as_me:18442: \"$ac_link\"") >&5
18443   (eval $ac_link) 2>&5
18444   ac_status=$?
18445   echo "$as_me:18445: \$? = $ac_status" >&5
18446   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18447   { (eval echo "$as_me:18447: \"$ac_try\"") >&5
18448   (eval $ac_try) 2>&5
18449   ac_status=$?
18450   echo "$as_me:18450: \$? = $ac_status" >&5
18451   (exit $ac_status); }; }; then
18452   ac_cv_func_vfork_works=yes
18453 else
18454   echo "$as_me: program exited with status $ac_status" >&5
18455 echo "$as_me: failed program was:" >&5
18456 cat conftest.$ac_ext >&5
18457 ac_cv_func_vfork_works=no
18458 fi
18459 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18460 fi
18461 fi
18462 echo "$as_me:18462: result: $ac_cv_func_vfork_works" >&5
18463 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18464
18465 fi;
18466 if test "x$ac_cv_func_fork_works" = xcross; then
18467   ac_cv_func_vfork_works=ac_cv_func_vfork
18468   { echo "$as_me:18468: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18469 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18470 fi
18471
18472 if test "x$ac_cv_func_vfork_works" = xyes; then
18473
18474 cat >>confdefs.h <<\EOF
18475 #define HAVE_WORKING_VFORK 1
18476 EOF
18477
18478 else
18479
18480 cat >>confdefs.h <<\EOF
18481 #define vfork fork
18482 EOF
18483
18484 fi
18485 if test "x$ac_cv_func_fork_works" = xyes; then
18486
18487 cat >>confdefs.h <<\EOF
18488 #define HAVE_WORKING_FORK 1
18489 EOF
18490
18491 fi
18492
18493 # special check for test/ditto.c
18494
18495 echo "$as_me:18495: checking for openpty in -lutil" >&5
18496 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18497 if test "${ac_cv_lib_util_openpty+set}" = set; then
18498   echo $ECHO_N "(cached) $ECHO_C" >&6
18499 else
18500   ac_check_lib_save_LIBS=$LIBS
18501 LIBS="-lutil  $LIBS"
18502 cat >conftest.$ac_ext <<_ACEOF
18503 #line 18503 "configure"
18504 #include "confdefs.h"
18505
18506 /* Override any gcc2 internal prototype to avoid an error.  */
18507 #ifdef __cplusplus
18508 extern "C"
18509 #endif
18510 /* We use char because int might match the return type of a gcc2
18511    builtin and then its argument prototype would still apply.  */
18512 char openpty ();
18513 int
18514 main ()
18515 {
18516 openpty ();
18517   ;
18518   return 0;
18519 }
18520 _ACEOF
18521 rm -f conftest.$ac_objext conftest$ac_exeext
18522 if { (eval echo "$as_me:18522: \"$ac_link\"") >&5
18523   (eval $ac_link) 2>&5
18524   ac_status=$?
18525   echo "$as_me:18525: \$? = $ac_status" >&5
18526   (exit $ac_status); } &&
18527          { ac_try='test -s conftest$ac_exeext'
18528   { (eval echo "$as_me:18528: \"$ac_try\"") >&5
18529   (eval $ac_try) 2>&5
18530   ac_status=$?
18531   echo "$as_me:18531: \$? = $ac_status" >&5
18532   (exit $ac_status); }; }; then
18533   ac_cv_lib_util_openpty=yes
18534 else
18535   echo "$as_me: failed program was:" >&5
18536 cat conftest.$ac_ext >&5
18537 ac_cv_lib_util_openpty=no
18538 fi
18539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18540 LIBS=$ac_check_lib_save_LIBS
18541 fi
18542 echo "$as_me:18542: result: $ac_cv_lib_util_openpty" >&5
18543 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18544 if test $ac_cv_lib_util_openpty = yes; then
18545   cf_cv_lib_util=yes
18546 else
18547   cf_cv_lib_util=no
18548 fi
18549
18550 echo "$as_me:18550: checking for openpty header" >&5
18551 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18552 if test "${cf_cv_func_openpty+set}" = set; then
18553   echo $ECHO_N "(cached) $ECHO_C" >&6
18554 else
18555
18556         cf_save_LIBS="$LIBS"
18557         test $cf_cv_lib_util = yes && {
18558 cf_add_libs="-lutil"
18559 # Filter out duplicates - this happens with badly-designed ".pc" files...
18560 for cf_add_1lib in $LIBS
18561 do
18562         for cf_add_2lib in $cf_add_libs
18563         do
18564                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18565                 then
18566                         cf_add_1lib=
18567                         break
18568                 fi
18569         done
18570         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18571 done
18572 LIBS="$cf_add_libs"
18573  }
18574         for cf_header in pty.h libutil.h util.h
18575         do
18576         cat >conftest.$ac_ext <<_ACEOF
18577 #line 18577 "configure"
18578 #include "confdefs.h"
18579
18580 #include <$cf_header>
18581
18582 int
18583 main ()
18584 {
18585
18586         int x = openpty((int *)0, (int *)0, (char *)0,
18587                                    (struct termios *)0, (struct winsize *)0);
18588
18589   ;
18590   return 0;
18591 }
18592 _ACEOF
18593 rm -f conftest.$ac_objext conftest$ac_exeext
18594 if { (eval echo "$as_me:18594: \"$ac_link\"") >&5
18595   (eval $ac_link) 2>&5
18596   ac_status=$?
18597   echo "$as_me:18597: \$? = $ac_status" >&5
18598   (exit $ac_status); } &&
18599          { ac_try='test -s conftest$ac_exeext'
18600   { (eval echo "$as_me:18600: \"$ac_try\"") >&5
18601   (eval $ac_try) 2>&5
18602   ac_status=$?
18603   echo "$as_me:18603: \$? = $ac_status" >&5
18604   (exit $ac_status); }; }; then
18605
18606                 cf_cv_func_openpty=$cf_header
18607                 break
18608
18609 else
18610   echo "$as_me: failed program was:" >&5
18611 cat conftest.$ac_ext >&5
18612
18613                 cf_cv_func_openpty=no
18614
18615 fi
18616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18617         done
18618         LIBS="$cf_save_LIBS"
18619
18620 fi
18621 echo "$as_me:18621: result: $cf_cv_func_openpty" >&5
18622 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18623
18624 if test "$cf_cv_func_openpty" != no ; then
18625
18626 cat >>confdefs.h <<EOF
18627 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18628 EOF
18629
18630 cat >>confdefs.h <<\EOF
18631 #define USE_XTERM_PTY 1
18632 EOF
18633
18634         if test "x$cf_cv_lib_util" = xyes ; then
18635
18636 cf_add_libs="-lutil"
18637 # Filter out duplicates - this happens with badly-designed ".pc" files...
18638 for cf_add_1lib in $TEST_LIBS
18639 do
18640         for cf_add_2lib in $cf_add_libs
18641         do
18642                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18643                 then
18644                         cf_add_1lib=
18645                         break
18646                 fi
18647         done
18648         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18649 done
18650 TEST_LIBS="$cf_add_libs"
18651
18652         fi
18653 fi
18654
18655 if test "$with_hashed_db" != no ; then
18656
18657 cat >>confdefs.h <<\EOF
18658 #define USE_HASHED_DB 1
18659 EOF
18660
18661 case $with_hashed_db in
18662 (yes|*able*)
18663         ;;
18664 (*)
18665         if test -d "$with_hashed_db" ; then
18666
18667 if test -n "$with_hashed_db/include" ; then
18668   for cf_add_incdir in $with_hashed_db/include
18669   do
18670         while test $cf_add_incdir != /usr/include
18671         do
18672           if test -d $cf_add_incdir
18673           then
18674                 cf_have_incdir=no
18675                 if test -n "$CFLAGS$CPPFLAGS" ; then
18676                   # a loop is needed to ensure we can add subdirs of existing dirs
18677                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18678                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18679                           cf_have_incdir=yes; break
18680                         fi
18681                   done
18682                 fi
18683
18684                 if test "$cf_have_incdir" = no ; then
18685                   if test "$cf_add_incdir" = /usr/local/include ; then
18686                         if test "$GCC" = yes
18687                         then
18688                           cf_save_CPPFLAGS=$CPPFLAGS
18689                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18690                           cat >conftest.$ac_ext <<_ACEOF
18691 #line 18691 "configure"
18692 #include "confdefs.h"
18693 #include <stdio.h>
18694 int
18695 main ()
18696 {
18697 printf("Hello")
18698   ;
18699   return 0;
18700 }
18701 _ACEOF
18702 rm -f conftest.$ac_objext
18703 if { (eval echo "$as_me:18703: \"$ac_compile\"") >&5
18704   (eval $ac_compile) 2>&5
18705   ac_status=$?
18706   echo "$as_me:18706: \$? = $ac_status" >&5
18707   (exit $ac_status); } &&
18708          { ac_try='test -s conftest.$ac_objext'
18709   { (eval echo "$as_me:18709: \"$ac_try\"") >&5
18710   (eval $ac_try) 2>&5
18711   ac_status=$?
18712   echo "$as_me:18712: \$? = $ac_status" >&5
18713   (exit $ac_status); }; }; then
18714   :
18715 else
18716   echo "$as_me: failed program was:" >&5
18717 cat conftest.$ac_ext >&5
18718 cf_have_incdir=yes
18719 fi
18720 rm -f conftest.$ac_objext conftest.$ac_ext
18721                           CPPFLAGS=$cf_save_CPPFLAGS
18722                         fi
18723                   fi
18724                 fi
18725
18726                 if test "$cf_have_incdir" = no ; then
18727                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18728
18729 echo "${as_me:-configure}:18729: testing adding $cf_add_incdir to include-path ..." 1>&5
18730
18731                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18732
18733                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18734                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18735                   cf_add_incdir="$cf_top_incdir"
18736                 else
18737                   break
18738                 fi
18739           else
18740                 break
18741           fi
18742         done
18743   done
18744 fi
18745
18746 if test -n "$with_hashed_db/lib" ; then
18747         for cf_add_libdir in $with_hashed_db/lib
18748         do
18749                 if test $cf_add_libdir = /usr/lib ; then
18750                         :
18751                 elif test -d $cf_add_libdir
18752                 then
18753                         cf_have_libdir=no
18754                         if test -n "$LDFLAGS$LIBS" ; then
18755                                 # a loop is needed to ensure we can add subdirs of existing dirs
18756                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18757                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18758                                                 cf_have_libdir=yes; break
18759                                         fi
18760                                 done
18761                         fi
18762                         if test "$cf_have_libdir" = no ; then
18763                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18764
18765 echo "${as_me:-configure}:18765: testing adding $cf_add_libdir to library-path ..." 1>&5
18766
18767                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18768                         fi
18769                 fi
18770         done
18771 fi
18772
18773         else
18774                 case "$with_hashed_db" in
18775                 (./*|../*|/*)
18776                         { echo "$as_me:18776: WARNING: no such directory $with_hashed_db" >&5
18777 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18778                         ;;
18779                 (*)
18780
18781 cf_search=
18782
18783 test "x$prefix" != "xNONE" && \
18784 test -d "$prefix" && \
18785  {
18786         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18787         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18788         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18789         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18790         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18791         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18792 }
18793
18794 for cf_subdir_prefix in \
18795         /usr \
18796         /usr/local \
18797         /usr/pkg \
18798         /opt \
18799         /opt/local \
18800         $HOME
18801 do
18802
18803 test "x$cf_subdir_prefix" != "x$prefix" && \
18804 test -d "$cf_subdir_prefix" && \
18805 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18806         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18807         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18808         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18809         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18810         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18811         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"
18812 }
18813
18814 done
18815
18816         for cf_item in $cf_search
18817         do
18818                 case $cf_item in
18819                 (*/$with_hashed_db)
18820
18821 if test -n "$cf_item" ; then
18822   for cf_add_incdir in $cf_item
18823   do
18824         while test $cf_add_incdir != /usr/include
18825         do
18826           if test -d $cf_add_incdir
18827           then
18828                 cf_have_incdir=no
18829                 if test -n "$CFLAGS$CPPFLAGS" ; then
18830                   # a loop is needed to ensure we can add subdirs of existing dirs
18831                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18832                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18833                           cf_have_incdir=yes; break
18834                         fi
18835                   done
18836                 fi
18837
18838                 if test "$cf_have_incdir" = no ; then
18839                   if test "$cf_add_incdir" = /usr/local/include ; then
18840                         if test "$GCC" = yes
18841                         then
18842                           cf_save_CPPFLAGS=$CPPFLAGS
18843                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18844                           cat >conftest.$ac_ext <<_ACEOF
18845 #line 18845 "configure"
18846 #include "confdefs.h"
18847 #include <stdio.h>
18848 int
18849 main ()
18850 {
18851 printf("Hello")
18852   ;
18853   return 0;
18854 }
18855 _ACEOF
18856 rm -f conftest.$ac_objext
18857 if { (eval echo "$as_me:18857: \"$ac_compile\"") >&5
18858   (eval $ac_compile) 2>&5
18859   ac_status=$?
18860   echo "$as_me:18860: \$? = $ac_status" >&5
18861   (exit $ac_status); } &&
18862          { ac_try='test -s conftest.$ac_objext'
18863   { (eval echo "$as_me:18863: \"$ac_try\"") >&5
18864   (eval $ac_try) 2>&5
18865   ac_status=$?
18866   echo "$as_me:18866: \$? = $ac_status" >&5
18867   (exit $ac_status); }; }; then
18868   :
18869 else
18870   echo "$as_me: failed program was:" >&5
18871 cat conftest.$ac_ext >&5
18872 cf_have_incdir=yes
18873 fi
18874 rm -f conftest.$ac_objext conftest.$ac_ext
18875                           CPPFLAGS=$cf_save_CPPFLAGS
18876                         fi
18877                   fi
18878                 fi
18879
18880                 if test "$cf_have_incdir" = no ; then
18881                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18882
18883 echo "${as_me:-configure}:18883: testing adding $cf_add_incdir to include-path ..." 1>&5
18884
18885                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18886
18887                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18888                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18889                   cf_add_incdir="$cf_top_incdir"
18890                 else
18891                   break
18892                 fi
18893           else
18894                 break
18895           fi
18896         done
18897   done
18898 fi
18899
18900                         ;;
18901                 esac
18902         done
18903
18904 cf_search=
18905
18906 test "x$prefix" != "xNONE" && \
18907 test -d "$prefix" && \
18908  {
18909         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18910         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18911         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18912         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18913         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18914         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18915 }
18916
18917 for cf_subdir_prefix in \
18918         /usr \
18919         /usr/local \
18920         /usr/pkg \
18921         /opt \
18922         /opt/local \
18923         $HOME
18924 do
18925
18926 test "x$cf_subdir_prefix" != "x$prefix" && \
18927 test -d "$cf_subdir_prefix" && \
18928 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18929         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18930         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18931         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18932         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18933         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18934         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"
18935 }
18936
18937 done
18938
18939         for cf_item in $cf_search
18940         do
18941                 case $cf_item in
18942                 (*/$with_hashed_db)
18943
18944 if test -n "$cf_item" ; then
18945         for cf_add_libdir in $cf_item
18946         do
18947                 if test $cf_add_libdir = /usr/lib ; then
18948                         :
18949                 elif test -d $cf_add_libdir
18950                 then
18951                         cf_have_libdir=no
18952                         if test -n "$LDFLAGS$LIBS" ; then
18953                                 # a loop is needed to ensure we can add subdirs of existing dirs
18954                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18955                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18956                                                 cf_have_libdir=yes; break
18957                                         fi
18958                                 done
18959                         fi
18960                         if test "$cf_have_libdir" = no ; then
18961                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18962
18963 echo "${as_me:-configure}:18963: testing adding $cf_add_libdir to library-path ..." 1>&5
18964
18965                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18966                         fi
18967                 fi
18968         done
18969 fi
18970
18971                         ;;
18972                 esac
18973         done
18974
18975                         ;;
18976                 esac
18977         fi
18978 esac
18979
18980 echo "$as_me:18980: checking for db.h" >&5
18981 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18982 if test "${ac_cv_header_db_h+set}" = set; then
18983   echo $ECHO_N "(cached) $ECHO_C" >&6
18984 else
18985   cat >conftest.$ac_ext <<_ACEOF
18986 #line 18986 "configure"
18987 #include "confdefs.h"
18988 #include <db.h>
18989 _ACEOF
18990 if { (eval echo "$as_me:18990: \"$ac_cpp conftest.$ac_ext\"") >&5
18991   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18992   ac_status=$?
18993   egrep -v '^ *\+' conftest.er1 >conftest.err
18994   rm -f conftest.er1
18995   cat conftest.err >&5
18996   echo "$as_me:18996: \$? = $ac_status" >&5
18997   (exit $ac_status); } >/dev/null; then
18998   if test -s conftest.err; then
18999     ac_cpp_err=$ac_c_preproc_warn_flag
19000   else
19001     ac_cpp_err=
19002   fi
19003 else
19004   ac_cpp_err=yes
19005 fi
19006 if test -z "$ac_cpp_err"; then
19007   ac_cv_header_db_h=yes
19008 else
19009   echo "$as_me: failed program was:" >&5
19010   cat conftest.$ac_ext >&5
19011   ac_cv_header_db_h=no
19012 fi
19013 rm -f conftest.err conftest.$ac_ext
19014 fi
19015 echo "$as_me:19015: result: $ac_cv_header_db_h" >&5
19016 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19017 if test $ac_cv_header_db_h = yes; then
19018
19019 echo "$as_me:19019: checking for version of db" >&5
19020 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19021 if test "${cf_cv_hashed_db_version+set}" = set; then
19022   echo $ECHO_N "(cached) $ECHO_C" >&6
19023 else
19024
19025 cf_cv_hashed_db_version=unknown
19026
19027 for cf_db_version in 1 2 3 4 5 6
19028 do
19029
19030 echo "${as_me:-configure}:19030: testing checking for db version $cf_db_version ..." 1>&5
19031
19032         cat >conftest.$ac_ext <<_ACEOF
19033 #line 19033 "configure"
19034 #include "confdefs.h"
19035
19036 $ac_includes_default
19037 #include <db.h>
19038
19039 #ifdef DB_VERSION_MAJOR
19040         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19041 #if $cf_db_version == DB_VERSION_MAJOR
19042         /* ok */
19043 #else
19044         make an error
19045 #endif
19046 #else
19047 #if $cf_db_version == 1
19048         /* ok: assuming this is DB 1.8.5 */
19049 #else
19050         make an error
19051 #endif
19052 #endif
19053
19054 int
19055 main ()
19056 {
19057 DBT *foo = 0
19058   ;
19059   return 0;
19060 }
19061 _ACEOF
19062 rm -f conftest.$ac_objext
19063 if { (eval echo "$as_me:19063: \"$ac_compile\"") >&5
19064   (eval $ac_compile) 2>&5
19065   ac_status=$?
19066   echo "$as_me:19066: \$? = $ac_status" >&5
19067   (exit $ac_status); } &&
19068          { ac_try='test -s conftest.$ac_objext'
19069   { (eval echo "$as_me:19069: \"$ac_try\"") >&5
19070   (eval $ac_try) 2>&5
19071   ac_status=$?
19072   echo "$as_me:19072: \$? = $ac_status" >&5
19073   (exit $ac_status); }; }; then
19074
19075         cf_cv_hashed_db_version=$cf_db_version
19076         break
19077
19078 else
19079   echo "$as_me: failed program was:" >&5
19080 cat conftest.$ac_ext >&5
19081 fi
19082 rm -f conftest.$ac_objext conftest.$ac_ext
19083 done
19084
19085 fi
19086 echo "$as_me:19086: result: $cf_cv_hashed_db_version" >&5
19087 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19088
19089 if test "$cf_cv_hashed_db_version" = unknown ; then
19090         { { echo "$as_me:19090: error: Cannot determine version of db" >&5
19091 echo "$as_me: error: Cannot determine version of db" >&2;}
19092    { (exit 1); exit 1; }; }
19093 else
19094
19095 echo "$as_me:19095: checking for db libraries" >&5
19096 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19097 if test "${cf_cv_hashed_db_libs+set}" = set; then
19098   echo $ECHO_N "(cached) $ECHO_C" >&6
19099 else
19100
19101 cf_cv_hashed_db_libs=unknown
19102 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19103 do
19104         cf_save_libs="$LIBS"
19105         if test -n "$cf_db_libs"; then
19106
19107 cf_add_libs="-l$cf_db_libs"
19108 # Filter out duplicates - this happens with badly-designed ".pc" files...
19109 for cf_add_1lib in $LIBS
19110 do
19111         for cf_add_2lib in $cf_add_libs
19112         do
19113                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19114                 then
19115                         cf_add_1lib=
19116                         break
19117                 fi
19118         done
19119         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19120 done
19121 LIBS="$cf_add_libs"
19122
19123         fi
19124
19125 echo "${as_me:-configure}:19125: testing checking for library "$cf_db_libs" ..." 1>&5
19126
19127         cat >conftest.$ac_ext <<_ACEOF
19128 #line 19128 "configure"
19129 #include "confdefs.h"
19130
19131 $ac_includes_default
19132 #include <db.h>
19133
19134 int
19135 main ()
19136 {
19137
19138         char *path = "/tmp/foo";
19139 #ifdef DB_VERSION_MAJOR
19140 #if DB_VERSION_MAJOR >= 4
19141         DB *result = 0;
19142         db_create(&result, NULL, 0);
19143         result->open(result,
19144                 NULL,
19145                 path,
19146                 path,
19147                 DB_HASH,
19148                 DB_CREATE,
19149                 0644);
19150 #elif DB_VERSION_MAJOR >= 3
19151         DB *result = 0;
19152         db_create(&result, NULL, 0);
19153         result->open(result,
19154                 path,
19155                 path,
19156                 DB_HASH,
19157                 DB_CREATE,
19158                 0644);
19159 #elif DB_VERSION_MAJOR >= 2
19160         DB *result = 0;
19161         db_open(path,
19162                 DB_HASH,
19163                 DB_CREATE,
19164                 0644,
19165                 (DB_ENV *) 0,
19166                 (DB_INFO *) 0,
19167                 &result);
19168 #endif /* DB_VERSION_MAJOR */
19169 #else
19170         DB *result = dbopen(path,
19171                      2,
19172                      0644,
19173                      DB_HASH,
19174                      0);
19175 #endif
19176         ${cf_cv_main_return:-return}(result != 0)
19177
19178   ;
19179   return 0;
19180 }
19181 _ACEOF
19182 rm -f conftest.$ac_objext conftest$ac_exeext
19183 if { (eval echo "$as_me:19183: \"$ac_link\"") >&5
19184   (eval $ac_link) 2>&5
19185   ac_status=$?
19186   echo "$as_me:19186: \$? = $ac_status" >&5
19187   (exit $ac_status); } &&
19188          { ac_try='test -s conftest$ac_exeext'
19189   { (eval echo "$as_me:19189: \"$ac_try\"") >&5
19190   (eval $ac_try) 2>&5
19191   ac_status=$?
19192   echo "$as_me:19192: \$? = $ac_status" >&5
19193   (exit $ac_status); }; }; then
19194
19195         if test -n "$cf_db_libs" ; then
19196                 cf_cv_hashed_db_libs=$cf_db_libs
19197         else
19198                 cf_cv_hashed_db_libs=default
19199         fi
19200         LIBS="$cf_save_libs"
19201         break
19202
19203 else
19204   echo "$as_me: failed program was:" >&5
19205 cat conftest.$ac_ext >&5
19206 fi
19207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19208         LIBS="$cf_save_libs"
19209 done
19210
19211 fi
19212 echo "$as_me:19212: result: $cf_cv_hashed_db_libs" >&5
19213 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19214
19215         if test "$cf_cv_hashed_db_libs" = unknown ; then
19216                 { { echo "$as_me:19216: error: Cannot determine library for db" >&5
19217 echo "$as_me: error: Cannot determine library for db" >&2;}
19218    { (exit 1); exit 1; }; }
19219         elif test "$cf_cv_hashed_db_libs" != default ; then
19220
19221 cf_add_libs="-l$cf_cv_hashed_db_libs"
19222 # Filter out duplicates - this happens with badly-designed ".pc" files...
19223 for cf_add_1lib in $LIBS
19224 do
19225         for cf_add_2lib in $cf_add_libs
19226         do
19227                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19228                 then
19229                         cf_add_1lib=
19230                         break
19231                 fi
19232         done
19233         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19234 done
19235 LIBS="$cf_add_libs"
19236
19237         fi
19238 fi
19239
19240 else
19241
19242         { { echo "$as_me:19242: error: Cannot find db.h" >&5
19243 echo "$as_me: error: Cannot find db.h" >&2;}
19244    { (exit 1); exit 1; }; }
19245
19246 fi
19247
19248 fi
19249
19250 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19251         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19252         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19253 fi
19254
19255 # Just in case, check if the C compiler has a bool type.
19256
19257 echo "$as_me:19257: checking if we should include stdbool.h" >&5
19258 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19259
19260 if test "${cf_cv_header_stdbool_h+set}" = set; then
19261   echo $ECHO_N "(cached) $ECHO_C" >&6
19262 else
19263
19264         cat >conftest.$ac_ext <<_ACEOF
19265 #line 19265 "configure"
19266 #include "confdefs.h"
19267
19268 int
19269 main ()
19270 {
19271 bool foo = false
19272   ;
19273   return 0;
19274 }
19275 _ACEOF
19276 rm -f conftest.$ac_objext
19277 if { (eval echo "$as_me:19277: \"$ac_compile\"") >&5
19278   (eval $ac_compile) 2>&5
19279   ac_status=$?
19280   echo "$as_me:19280: \$? = $ac_status" >&5
19281   (exit $ac_status); } &&
19282          { ac_try='test -s conftest.$ac_objext'
19283   { (eval echo "$as_me:19283: \"$ac_try\"") >&5
19284   (eval $ac_try) 2>&5
19285   ac_status=$?
19286   echo "$as_me:19286: \$? = $ac_status" >&5
19287   (exit $ac_status); }; }; then
19288   cf_cv_header_stdbool_h=0
19289 else
19290   echo "$as_me: failed program was:" >&5
19291 cat conftest.$ac_ext >&5
19292 cat >conftest.$ac_ext <<_ACEOF
19293 #line 19293 "configure"
19294 #include "confdefs.h"
19295
19296 #ifndef __BEOS__
19297 #include <stdbool.h>
19298 #endif
19299
19300 int
19301 main ()
19302 {
19303 bool foo = false
19304   ;
19305   return 0;
19306 }
19307 _ACEOF
19308 rm -f conftest.$ac_objext
19309 if { (eval echo "$as_me:19309: \"$ac_compile\"") >&5
19310   (eval $ac_compile) 2>&5
19311   ac_status=$?
19312   echo "$as_me:19312: \$? = $ac_status" >&5
19313   (exit $ac_status); } &&
19314          { ac_try='test -s conftest.$ac_objext'
19315   { (eval echo "$as_me:19315: \"$ac_try\"") >&5
19316   (eval $ac_try) 2>&5
19317   ac_status=$?
19318   echo "$as_me:19318: \$? = $ac_status" >&5
19319   (exit $ac_status); }; }; then
19320   cf_cv_header_stdbool_h=1
19321 else
19322   echo "$as_me: failed program was:" >&5
19323 cat conftest.$ac_ext >&5
19324 cf_cv_header_stdbool_h=0
19325 fi
19326 rm -f conftest.$ac_objext conftest.$ac_ext
19327 fi
19328 rm -f conftest.$ac_objext conftest.$ac_ext
19329 fi
19330
19331 if test "$cf_cv_header_stdbool_h" = 1
19332 then    echo "$as_me:19332: result: yes" >&5
19333 echo "${ECHO_T}yes" >&6
19334 else    echo "$as_me:19334: result: no" >&5
19335 echo "${ECHO_T}no" >&6
19336 fi
19337
19338 echo "$as_me:19338: checking for builtin bool type" >&5
19339 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19340
19341 if test "${cf_cv_cc_bool_type+set}" = set; then
19342   echo $ECHO_N "(cached) $ECHO_C" >&6
19343 else
19344
19345         cat >conftest.$ac_ext <<_ACEOF
19346 #line 19346 "configure"
19347 #include "confdefs.h"
19348
19349 #include <stdio.h>
19350 #include <sys/types.h>
19351
19352 int
19353 main ()
19354 {
19355 bool x = false
19356   ;
19357   return 0;
19358 }
19359 _ACEOF
19360 rm -f conftest.$ac_objext
19361 if { (eval echo "$as_me:19361: \"$ac_compile\"") >&5
19362   (eval $ac_compile) 2>&5
19363   ac_status=$?
19364   echo "$as_me:19364: \$? = $ac_status" >&5
19365   (exit $ac_status); } &&
19366          { ac_try='test -s conftest.$ac_objext'
19367   { (eval echo "$as_me:19367: \"$ac_try\"") >&5
19368   (eval $ac_try) 2>&5
19369   ac_status=$?
19370   echo "$as_me:19370: \$? = $ac_status" >&5
19371   (exit $ac_status); }; }; then
19372   cf_cv_cc_bool_type=1
19373 else
19374   echo "$as_me: failed program was:" >&5
19375 cat conftest.$ac_ext >&5
19376 cf_cv_cc_bool_type=0
19377 fi
19378 rm -f conftest.$ac_objext conftest.$ac_ext
19379
19380 fi
19381
19382 if test "$cf_cv_cc_bool_type" = 1
19383 then    echo "$as_me:19383: result: yes" >&5
19384 echo "${ECHO_T}yes" >&6
19385 else    echo "$as_me:19385: result: no" >&5
19386 echo "${ECHO_T}no" >&6
19387 fi
19388
19389 # Check for C++ compiler characteristics (and ensure that it's there!)
19390 if test -n "$CXX" ; then
19391         ac_ext=cc
19392 ac_cpp='$CXXCPP $CPPFLAGS'
19393 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19394 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19395 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19396 ac_main_return=return
19397
19398 if test -n "$GXX" ; then
19399
19400         cf_save="$LIBS"
19401         LIBS="$LIBS $CXXLIBS"
19402         echo "$as_me:19402: checking if we already have C++ library" >&5
19403 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19404         cat >conftest.$ac_ext <<_ACEOF
19405 #line 19405 "configure"
19406 #include "confdefs.h"
19407
19408                         #include <iostream>
19409 int
19410 main ()
19411 {
19412
19413                         std::cout << "Hello World!" << std::endl;
19414   ;
19415   return 0;
19416 }
19417 _ACEOF
19418 rm -f conftest.$ac_objext conftest$ac_exeext
19419 if { (eval echo "$as_me:19419: \"$ac_link\"") >&5
19420   (eval $ac_link) 2>&5
19421   ac_status=$?
19422   echo "$as_me:19422: \$? = $ac_status" >&5
19423   (exit $ac_status); } &&
19424          { ac_try='test -s conftest$ac_exeext'
19425   { (eval echo "$as_me:19425: \"$ac_try\"") >&5
19426   (eval $ac_try) 2>&5
19427   ac_status=$?
19428   echo "$as_me:19428: \$? = $ac_status" >&5
19429   (exit $ac_status); }; }; then
19430   cf_have_libstdcpp=yes
19431 else
19432   echo "$as_me: failed program was:" >&5
19433 cat conftest.$ac_ext >&5
19434 cf_have_libstdcpp=no
19435 fi
19436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19437         echo "$as_me:19437: result: $cf_have_libstdcpp" >&5
19438 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19439         LIBS="$cf_save"
19440
19441         if test $cf_have_libstdcpp != yes
19442         then
19443                 case $cf_cv_system_name in
19444                 (os2*)
19445                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19446                                 cf_stdcpp_libname=stdcpp
19447                         else
19448                                 cf_stdcpp_libname=stdc++
19449                         fi
19450                         ;;
19451                 (*)
19452                         cf_stdcpp_libname=stdc++
19453                         ;;
19454                 esac
19455
19456                 echo "$as_me:19456: checking for library $cf_stdcpp_libname" >&5
19457 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19458 if test "${cf_cv_libstdcpp+set}" = set; then
19459   echo $ECHO_N "(cached) $ECHO_C" >&6
19460 else
19461
19462                         cf_save="$LIBS"
19463                         LIBS="$LIBS $CXXLIBS"
19464
19465 cf_add_libs="-l$cf_stdcpp_libname"
19466 # Filter out duplicates - this happens with badly-designed ".pc" files...
19467 for cf_add_1lib in $LIBS
19468 do
19469         for cf_add_2lib in $cf_add_libs
19470         do
19471                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19472                 then
19473                         cf_add_1lib=
19474                         break
19475                 fi
19476         done
19477         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19478 done
19479 LIBS="$cf_add_libs"
19480
19481                 cat >conftest.$ac_ext <<_ACEOF
19482 #line 19482 "configure"
19483 #include "confdefs.h"
19484
19485                                 #include <iostream>
19486 int
19487 main ()
19488 {
19489
19490                                 std::cout << "Hello World!" << std::endl;
19491   ;
19492   return 0;
19493 }
19494 _ACEOF
19495 rm -f conftest.$ac_objext conftest$ac_exeext
19496 if { (eval echo "$as_me:19496: \"$ac_link\"") >&5
19497   (eval $ac_link) 2>&5
19498   ac_status=$?
19499   echo "$as_me:19499: \$? = $ac_status" >&5
19500   (exit $ac_status); } &&
19501          { ac_try='test -s conftest$ac_exeext'
19502   { (eval echo "$as_me:19502: \"$ac_try\"") >&5
19503   (eval $ac_try) 2>&5
19504   ac_status=$?
19505   echo "$as_me:19505: \$? = $ac_status" >&5
19506   (exit $ac_status); }; }; then
19507   cf_cv_libstdcpp=yes
19508 else
19509   echo "$as_me: failed program was:" >&5
19510 cat conftest.$ac_ext >&5
19511 cf_cv_libstdcpp=no
19512 fi
19513 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19514                         LIBS="$cf_save"
19515
19516 fi
19517 echo "$as_me:19517: result: $cf_cv_libstdcpp" >&5
19518 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19519                 test "$cf_cv_libstdcpp" = yes && {
19520 cf_add_libs="-l$cf_stdcpp_libname"
19521 # Filter out duplicates - this happens with badly-designed ".pc" files...
19522 for cf_add_1lib in $CXXLIBS
19523 do
19524         for cf_add_2lib in $cf_add_libs
19525         do
19526                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19527                 then
19528                         cf_add_1lib=
19529                         break
19530                 fi
19531         done
19532         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19533 done
19534 CXXLIBS="$cf_add_libs"
19535  }
19536         fi
19537 fi
19538
19539         echo "$as_me:19539: checking whether $CXX understands -c and -o together" >&5
19540 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19541 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19542   echo $ECHO_N "(cached) $ECHO_C" >&6
19543 else
19544
19545 cat > conftest.$ac_ext <<CF_EOF
19546 #include <stdio.h>
19547 int main()
19548 {
19549         ${cf_cv_main_return:-return}(0);
19550 }
19551 CF_EOF
19552 # We do the test twice because some compilers refuse to overwrite an
19553 # existing .o file with -o, though they will create one.
19554 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19555 if { (eval echo "$as_me:19555: \"$ac_try\"") >&5
19556   (eval $ac_try) 2>&5
19557   ac_status=$?
19558   echo "$as_me:19558: \$? = $ac_status" >&5
19559   (exit $ac_status); } &&
19560   test -f conftest2.$ac_objext && { (eval echo "$as_me:19560: \"$ac_try\"") >&5
19561   (eval $ac_try) 2>&5
19562   ac_status=$?
19563   echo "$as_me:19563: \$? = $ac_status" >&5
19564   (exit $ac_status); };
19565 then
19566   eval cf_cv_prog_CXX_c_o=yes
19567 else
19568   eval cf_cv_prog_CXX_c_o=no
19569 fi
19570 rm -rf conftest*
19571
19572 fi
19573 if test $cf_cv_prog_CXX_c_o = yes; then
19574   echo "$as_me:19574: result: yes" >&5
19575 echo "${ECHO_T}yes" >&6
19576 else
19577   echo "$as_me:19577: result: no" >&5
19578 echo "${ECHO_T}no" >&6
19579 fi
19580
19581         case $GXX_VERSION in
19582         (1*|2.0-6*)
19583                 cf_cxx_library=yes
19584                 ;;
19585         (*-2.7*|2.7*)
19586
19587 cf_cxx_library=unknown
19588 case $cf_cv_system_name in
19589 (os2*)
19590         cf_gpp_libname=gpp
19591         ;;
19592 (*)
19593         cf_gpp_libname=g++
19594         ;;
19595 esac
19596 if test "$GXX" = yes; then
19597         echo "$as_me:19597: checking for lib$cf_gpp_libname" >&5
19598 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19599         cf_save="$LIBS"
19600
19601 cf_add_libs="-l$cf_gpp_libname"
19602 # Filter out duplicates - this happens with badly-designed ".pc" files...
19603 for cf_add_1lib in $LIBS
19604 do
19605         for cf_add_2lib in $cf_add_libs
19606         do
19607                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19608                 then
19609                         cf_add_1lib=
19610                         break
19611                 fi
19612         done
19613         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19614 done
19615 LIBS="$cf_add_libs"
19616
19617         cat >conftest.$ac_ext <<_ACEOF
19618 #line 19618 "configure"
19619 #include "confdefs.h"
19620
19621 #include <$cf_gpp_libname/builtin.h>
19622
19623 int
19624 main ()
19625 {
19626 two_arg_error_handler_t foo2 = lib_error_handler
19627   ;
19628   return 0;
19629 }
19630 _ACEOF
19631 rm -f conftest.$ac_objext conftest$ac_exeext
19632 if { (eval echo "$as_me:19632: \"$ac_link\"") >&5
19633   (eval $ac_link) 2>&5
19634   ac_status=$?
19635   echo "$as_me:19635: \$? = $ac_status" >&5
19636   (exit $ac_status); } &&
19637          { ac_try='test -s conftest$ac_exeext'
19638   { (eval echo "$as_me:19638: \"$ac_try\"") >&5
19639   (eval $ac_try) 2>&5
19640   ac_status=$?
19641   echo "$as_me:19641: \$? = $ac_status" >&5
19642   (exit $ac_status); }; }; then
19643   cf_cxx_library=yes
19644
19645 cf_add_libs="-l$cf_gpp_libname"
19646 # Filter out duplicates - this happens with badly-designed ".pc" files...
19647 for cf_add_1lib in $CXXLIBS
19648 do
19649         for cf_add_2lib in $cf_add_libs
19650         do
19651                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19652                 then
19653                         cf_add_1lib=
19654                         break
19655                 fi
19656         done
19657         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19658 done
19659 CXXLIBS="$cf_add_libs"
19660
19661          if test "$cf_gpp_libname" = cpp ; then
19662
19663 cat >>confdefs.h <<\EOF
19664 #define HAVE_GPP_BUILTIN_H 1
19665 EOF
19666
19667          else
19668
19669 cat >>confdefs.h <<\EOF
19670 #define HAVE_GXX_BUILTIN_H 1
19671 EOF
19672
19673          fi
19674 else
19675   echo "$as_me: failed program was:" >&5
19676 cat conftest.$ac_ext >&5
19677 cat >conftest.$ac_ext <<_ACEOF
19678 #line 19678 "configure"
19679 #include "confdefs.h"
19680
19681 #include <builtin.h>
19682
19683 int
19684 main ()
19685 {
19686 two_arg_error_handler_t foo2 = lib_error_handler
19687   ;
19688   return 0;
19689 }
19690 _ACEOF
19691 rm -f conftest.$ac_objext conftest$ac_exeext
19692 if { (eval echo "$as_me:19692: \"$ac_link\"") >&5
19693   (eval $ac_link) 2>&5
19694   ac_status=$?
19695   echo "$as_me:19695: \$? = $ac_status" >&5
19696   (exit $ac_status); } &&
19697          { ac_try='test -s conftest$ac_exeext'
19698   { (eval echo "$as_me:19698: \"$ac_try\"") >&5
19699   (eval $ac_try) 2>&5
19700   ac_status=$?
19701   echo "$as_me:19701: \$? = $ac_status" >&5
19702   (exit $ac_status); }; }; then
19703   cf_cxx_library=yes
19704
19705 cf_add_libs="-l$cf_gpp_libname"
19706 # Filter out duplicates - this happens with badly-designed ".pc" files...
19707 for cf_add_1lib in $CXXLIBS
19708 do
19709         for cf_add_2lib in $cf_add_libs
19710         do
19711                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19712                 then
19713                         cf_add_1lib=
19714                         break
19715                 fi
19716         done
19717         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19718 done
19719 CXXLIBS="$cf_add_libs"
19720
19721 cat >>confdefs.h <<\EOF
19722 #define HAVE_BUILTIN_H 1
19723 EOF
19724
19725 else
19726   echo "$as_me: failed program was:" >&5
19727 cat conftest.$ac_ext >&5
19728 cf_cxx_library=no
19729 fi
19730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19731 fi
19732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19733         LIBS="$cf_save"
19734         echo "$as_me:19734: result: $cf_cxx_library" >&5
19735 echo "${ECHO_T}$cf_cxx_library" >&6
19736 fi
19737
19738                 ;;
19739         (*)
19740                 cf_cxx_library=no
19741                 ;;
19742         esac
19743
19744         ac_ext=cc
19745 ac_cpp='$CXXCPP $CPPFLAGS'
19746 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19747 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19748 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19749 ac_main_return=return
19750 echo "$as_me:19750: checking how to run the C++ preprocessor" >&5
19751 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19752 if test -z "$CXXCPP"; then
19753   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19754   echo $ECHO_N "(cached) $ECHO_C" >&6
19755 else
19756       # Double quotes because CXXCPP needs to be expanded
19757     for CXXCPP in "$CXX -E" "/lib/cpp"
19758     do
19759       ac_preproc_ok=false
19760 for ac_cxx_preproc_warn_flag in '' yes
19761 do
19762   # Use a header file that comes with gcc, so configuring glibc
19763   # with a fresh cross-compiler works.
19764   # On the NeXT, cc -E runs the code through the compiler's parser,
19765   # not just through cpp. "Syntax error" is here to catch this case.
19766   cat >conftest.$ac_ext <<_ACEOF
19767 #line 19767 "configure"
19768 #include "confdefs.h"
19769 #include <assert.h>
19770                      Syntax error
19771 _ACEOF
19772 if { (eval echo "$as_me:19772: \"$ac_cpp conftest.$ac_ext\"") >&5
19773   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19774   ac_status=$?
19775   egrep -v '^ *\+' conftest.er1 >conftest.err
19776   rm -f conftest.er1
19777   cat conftest.err >&5
19778   echo "$as_me:19778: \$? = $ac_status" >&5
19779   (exit $ac_status); } >/dev/null; then
19780   if test -s conftest.err; then
19781     ac_cpp_err=$ac_cxx_preproc_warn_flag
19782   else
19783     ac_cpp_err=
19784   fi
19785 else
19786   ac_cpp_err=yes
19787 fi
19788 if test -z "$ac_cpp_err"; then
19789   :
19790 else
19791   echo "$as_me: failed program was:" >&5
19792   cat conftest.$ac_ext >&5
19793   # Broken: fails on valid input.
19794 continue
19795 fi
19796 rm -f conftest.err conftest.$ac_ext
19797
19798   # OK, works on sane cases.  Now check whether non-existent headers
19799   # can be detected and how.
19800   cat >conftest.$ac_ext <<_ACEOF
19801 #line 19801 "configure"
19802 #include "confdefs.h"
19803 #include <ac_nonexistent.h>
19804 _ACEOF
19805 if { (eval echo "$as_me:19805: \"$ac_cpp conftest.$ac_ext\"") >&5
19806   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19807   ac_status=$?
19808   egrep -v '^ *\+' conftest.er1 >conftest.err
19809   rm -f conftest.er1
19810   cat conftest.err >&5
19811   echo "$as_me:19811: \$? = $ac_status" >&5
19812   (exit $ac_status); } >/dev/null; then
19813   if test -s conftest.err; then
19814     ac_cpp_err=$ac_cxx_preproc_warn_flag
19815   else
19816     ac_cpp_err=
19817   fi
19818 else
19819   ac_cpp_err=yes
19820 fi
19821 if test -z "$ac_cpp_err"; then
19822   # Broken: success on invalid input.
19823 continue
19824 else
19825   echo "$as_me: failed program was:" >&5
19826   cat conftest.$ac_ext >&5
19827   # Passes both tests.
19828 ac_preproc_ok=:
19829 break
19830 fi
19831 rm -f conftest.err conftest.$ac_ext
19832
19833 done
19834 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19835 rm -f conftest.err conftest.$ac_ext
19836 if $ac_preproc_ok; then
19837   break
19838 fi
19839
19840     done
19841     ac_cv_prog_CXXCPP=$CXXCPP
19842
19843 fi
19844   CXXCPP=$ac_cv_prog_CXXCPP
19845 else
19846   ac_cv_prog_CXXCPP=$CXXCPP
19847 fi
19848 echo "$as_me:19848: result: $CXXCPP" >&5
19849 echo "${ECHO_T}$CXXCPP" >&6
19850 ac_preproc_ok=false
19851 for ac_cxx_preproc_warn_flag in '' yes
19852 do
19853   # Use a header file that comes with gcc, so configuring glibc
19854   # with a fresh cross-compiler works.
19855   # On the NeXT, cc -E runs the code through the compiler's parser,
19856   # not just through cpp. "Syntax error" is here to catch this case.
19857   cat >conftest.$ac_ext <<_ACEOF
19858 #line 19858 "configure"
19859 #include "confdefs.h"
19860 #include <assert.h>
19861                      Syntax error
19862 _ACEOF
19863 if { (eval echo "$as_me:19863: \"$ac_cpp conftest.$ac_ext\"") >&5
19864   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19865   ac_status=$?
19866   egrep -v '^ *\+' conftest.er1 >conftest.err
19867   rm -f conftest.er1
19868   cat conftest.err >&5
19869   echo "$as_me:19869: \$? = $ac_status" >&5
19870   (exit $ac_status); } >/dev/null; then
19871   if test -s conftest.err; then
19872     ac_cpp_err=$ac_cxx_preproc_warn_flag
19873   else
19874     ac_cpp_err=
19875   fi
19876 else
19877   ac_cpp_err=yes
19878 fi
19879 if test -z "$ac_cpp_err"; then
19880   :
19881 else
19882   echo "$as_me: failed program was:" >&5
19883   cat conftest.$ac_ext >&5
19884   # Broken: fails on valid input.
19885 continue
19886 fi
19887 rm -f conftest.err conftest.$ac_ext
19888
19889   # OK, works on sane cases.  Now check whether non-existent headers
19890   # can be detected and how.
19891   cat >conftest.$ac_ext <<_ACEOF
19892 #line 19892 "configure"
19893 #include "confdefs.h"
19894 #include <ac_nonexistent.h>
19895 _ACEOF
19896 if { (eval echo "$as_me:19896: \"$ac_cpp conftest.$ac_ext\"") >&5
19897   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19898   ac_status=$?
19899   egrep -v '^ *\+' conftest.er1 >conftest.err
19900   rm -f conftest.er1
19901   cat conftest.err >&5
19902   echo "$as_me:19902: \$? = $ac_status" >&5
19903   (exit $ac_status); } >/dev/null; then
19904   if test -s conftest.err; then
19905     ac_cpp_err=$ac_cxx_preproc_warn_flag
19906   else
19907     ac_cpp_err=
19908   fi
19909 else
19910   ac_cpp_err=yes
19911 fi
19912 if test -z "$ac_cpp_err"; then
19913   # Broken: success on invalid input.
19914 continue
19915 else
19916   echo "$as_me: failed program was:" >&5
19917   cat conftest.$ac_ext >&5
19918   # Passes both tests.
19919 ac_preproc_ok=:
19920 break
19921 fi
19922 rm -f conftest.err conftest.$ac_ext
19923
19924 done
19925 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19926 rm -f conftest.err conftest.$ac_ext
19927 if $ac_preproc_ok; then
19928   :
19929 else
19930   { { echo "$as_me:19930: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19931 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19932    { (exit 1); exit 1; }; }
19933 fi
19934
19935 ac_ext=cc
19936 ac_cpp='$CXXCPP $CPPFLAGS'
19937 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19938 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19939 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19940 ac_main_return=return
19941
19942 for ac_header in typeinfo
19943 do
19944 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19945 echo "$as_me:19945: checking for $ac_header" >&5
19946 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19947 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19948   echo $ECHO_N "(cached) $ECHO_C" >&6
19949 else
19950   cat >conftest.$ac_ext <<_ACEOF
19951 #line 19951 "configure"
19952 #include "confdefs.h"
19953 #include <$ac_header>
19954 _ACEOF
19955 if { (eval echo "$as_me:19955: \"$ac_cpp conftest.$ac_ext\"") >&5
19956   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19957   ac_status=$?
19958   egrep -v '^ *\+' conftest.er1 >conftest.err
19959   rm -f conftest.er1
19960   cat conftest.err >&5
19961   echo "$as_me:19961: \$? = $ac_status" >&5
19962   (exit $ac_status); } >/dev/null; then
19963   if test -s conftest.err; then
19964     ac_cpp_err=$ac_cxx_preproc_warn_flag
19965   else
19966     ac_cpp_err=
19967   fi
19968 else
19969   ac_cpp_err=yes
19970 fi
19971 if test -z "$ac_cpp_err"; then
19972   eval "$as_ac_Header=yes"
19973 else
19974   echo "$as_me: failed program was:" >&5
19975   cat conftest.$ac_ext >&5
19976   eval "$as_ac_Header=no"
19977 fi
19978 rm -f conftest.err conftest.$ac_ext
19979 fi
19980 echo "$as_me:19980: result: `eval echo '${'$as_ac_Header'}'`" >&5
19981 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19982 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19983   cat >>confdefs.h <<EOF
19984 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19985 EOF
19986
19987 fi
19988 done
19989
19990 for ac_header in iostream
19991 do
19992 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19993 echo "$as_me:19993: checking for $ac_header" >&5
19994 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19995 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19996   echo $ECHO_N "(cached) $ECHO_C" >&6
19997 else
19998   cat >conftest.$ac_ext <<_ACEOF
19999 #line 19999 "configure"
20000 #include "confdefs.h"
20001 #include <$ac_header>
20002 _ACEOF
20003 if { (eval echo "$as_me:20003: \"$ac_cpp conftest.$ac_ext\"") >&5
20004   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20005   ac_status=$?
20006   egrep -v '^ *\+' conftest.er1 >conftest.err
20007   rm -f conftest.er1
20008   cat conftest.err >&5
20009   echo "$as_me:20009: \$? = $ac_status" >&5
20010   (exit $ac_status); } >/dev/null; then
20011   if test -s conftest.err; then
20012     ac_cpp_err=$ac_cxx_preproc_warn_flag
20013   else
20014     ac_cpp_err=
20015   fi
20016 else
20017   ac_cpp_err=yes
20018 fi
20019 if test -z "$ac_cpp_err"; then
20020   eval "$as_ac_Header=yes"
20021 else
20022   echo "$as_me: failed program was:" >&5
20023   cat conftest.$ac_ext >&5
20024   eval "$as_ac_Header=no"
20025 fi
20026 rm -f conftest.err conftest.$ac_ext
20027 fi
20028 echo "$as_me:20028: result: `eval echo '${'$as_ac_Header'}'`" >&5
20029 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20030 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20031   cat >>confdefs.h <<EOF
20032 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20033 EOF
20034
20035 fi
20036 done
20037
20038 if test x"$ac_cv_header_iostream" = xyes ; then
20039         echo "$as_me:20039: checking if iostream uses std-namespace" >&5
20040 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20041         cat >conftest.$ac_ext <<_ACEOF
20042 #line 20042 "configure"
20043 #include "confdefs.h"
20044
20045 #include <iostream>
20046 using std::endl;
20047 using std::cerr;
20048 int
20049 main ()
20050 {
20051
20052 cerr << "testing" << endl;
20053
20054   ;
20055   return 0;
20056 }
20057 _ACEOF
20058 rm -f conftest.$ac_objext
20059 if { (eval echo "$as_me:20059: \"$ac_compile\"") >&5
20060   (eval $ac_compile) 2>&5
20061   ac_status=$?
20062   echo "$as_me:20062: \$? = $ac_status" >&5
20063   (exit $ac_status); } &&
20064          { ac_try='test -s conftest.$ac_objext'
20065   { (eval echo "$as_me:20065: \"$ac_try\"") >&5
20066   (eval $ac_try) 2>&5
20067   ac_status=$?
20068   echo "$as_me:20068: \$? = $ac_status" >&5
20069   (exit $ac_status); }; }; then
20070   cf_iostream_namespace=yes
20071 else
20072   echo "$as_me: failed program was:" >&5
20073 cat conftest.$ac_ext >&5
20074 cf_iostream_namespace=no
20075 fi
20076 rm -f conftest.$ac_objext conftest.$ac_ext
20077         echo "$as_me:20077: result: $cf_iostream_namespace" >&5
20078 echo "${ECHO_T}$cf_iostream_namespace" >&6
20079         if test "$cf_iostream_namespace" = yes ; then
20080
20081 cat >>confdefs.h <<\EOF
20082 #define IOSTREAM_NAMESPACE 1
20083 EOF
20084
20085         fi
20086 fi
20087
20088 echo "$as_me:20088: checking if we should include stdbool.h" >&5
20089 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20090
20091 if test "${cf_cv_header_stdbool_h+set}" = set; then
20092   echo $ECHO_N "(cached) $ECHO_C" >&6
20093 else
20094
20095         cat >conftest.$ac_ext <<_ACEOF
20096 #line 20096 "configure"
20097 #include "confdefs.h"
20098
20099 int
20100 main ()
20101 {
20102 bool foo = false
20103   ;
20104   return 0;
20105 }
20106 _ACEOF
20107 rm -f conftest.$ac_objext
20108 if { (eval echo "$as_me:20108: \"$ac_compile\"") >&5
20109   (eval $ac_compile) 2>&5
20110   ac_status=$?
20111   echo "$as_me:20111: \$? = $ac_status" >&5
20112   (exit $ac_status); } &&
20113          { ac_try='test -s conftest.$ac_objext'
20114   { (eval echo "$as_me:20114: \"$ac_try\"") >&5
20115   (eval $ac_try) 2>&5
20116   ac_status=$?
20117   echo "$as_me:20117: \$? = $ac_status" >&5
20118   (exit $ac_status); }; }; then
20119   cf_cv_header_stdbool_h=0
20120 else
20121   echo "$as_me: failed program was:" >&5
20122 cat conftest.$ac_ext >&5
20123 cat >conftest.$ac_ext <<_ACEOF
20124 #line 20124 "configure"
20125 #include "confdefs.h"
20126
20127 #ifndef __BEOS__
20128 #include <stdbool.h>
20129 #endif
20130
20131 int
20132 main ()
20133 {
20134 bool foo = false
20135   ;
20136   return 0;
20137 }
20138 _ACEOF
20139 rm -f conftest.$ac_objext
20140 if { (eval echo "$as_me:20140: \"$ac_compile\"") >&5
20141   (eval $ac_compile) 2>&5
20142   ac_status=$?
20143   echo "$as_me:20143: \$? = $ac_status" >&5
20144   (exit $ac_status); } &&
20145          { ac_try='test -s conftest.$ac_objext'
20146   { (eval echo "$as_me:20146: \"$ac_try\"") >&5
20147   (eval $ac_try) 2>&5
20148   ac_status=$?
20149   echo "$as_me:20149: \$? = $ac_status" >&5
20150   (exit $ac_status); }; }; then
20151   cf_cv_header_stdbool_h=1
20152 else
20153   echo "$as_me: failed program was:" >&5
20154 cat conftest.$ac_ext >&5
20155 cf_cv_header_stdbool_h=0
20156 fi
20157 rm -f conftest.$ac_objext conftest.$ac_ext
20158 fi
20159 rm -f conftest.$ac_objext conftest.$ac_ext
20160 fi
20161
20162 if test "$cf_cv_header_stdbool_h" = 1
20163 then    echo "$as_me:20163: result: yes" >&5
20164 echo "${ECHO_T}yes" >&6
20165 else    echo "$as_me:20165: result: no" >&5
20166 echo "${ECHO_T}no" >&6
20167 fi
20168
20169 echo "$as_me:20169: checking for builtin bool type" >&5
20170 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20171
20172 if test "${cf_cv_builtin_bool+set}" = set; then
20173   echo $ECHO_N "(cached) $ECHO_C" >&6
20174 else
20175
20176         cat >conftest.$ac_ext <<_ACEOF
20177 #line 20177 "configure"
20178 #include "confdefs.h"
20179
20180 #include <stdio.h>
20181 #include <sys/types.h>
20182
20183 int
20184 main ()
20185 {
20186 bool x = false
20187   ;
20188   return 0;
20189 }
20190 _ACEOF
20191 rm -f conftest.$ac_objext
20192 if { (eval echo "$as_me:20192: \"$ac_compile\"") >&5
20193   (eval $ac_compile) 2>&5
20194   ac_status=$?
20195   echo "$as_me:20195: \$? = $ac_status" >&5
20196   (exit $ac_status); } &&
20197          { ac_try='test -s conftest.$ac_objext'
20198   { (eval echo "$as_me:20198: \"$ac_try\"") >&5
20199   (eval $ac_try) 2>&5
20200   ac_status=$?
20201   echo "$as_me:20201: \$? = $ac_status" >&5
20202   (exit $ac_status); }; }; then
20203   cf_cv_builtin_bool=1
20204 else
20205   echo "$as_me: failed program was:" >&5
20206 cat conftest.$ac_ext >&5
20207 cf_cv_builtin_bool=0
20208 fi
20209 rm -f conftest.$ac_objext conftest.$ac_ext
20210
20211 fi
20212
20213 if test "$cf_cv_builtin_bool" = 1
20214 then    echo "$as_me:20214: result: yes" >&5
20215 echo "${ECHO_T}yes" >&6
20216 else    echo "$as_me:20216: result: no" >&5
20217 echo "${ECHO_T}no" >&6
20218 fi
20219
20220 echo "$as_me:20220: checking for size of bool" >&5
20221 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20222 if test "${cf_cv_type_of_bool+set}" = set; then
20223   echo $ECHO_N "(cached) $ECHO_C" >&6
20224 else
20225
20226         rm -f cf_test.out
20227         if test "$cross_compiling" = yes; then
20228   cf_cv_type_of_bool=unknown
20229 else
20230   cat >conftest.$ac_ext <<_ACEOF
20231 #line 20231 "configure"
20232 #include "confdefs.h"
20233
20234 #include <stdlib.h>
20235 #include <stdio.h>
20236
20237 #if defined(__cplusplus)
20238
20239 #ifdef HAVE_GXX_BUILTIN_H
20240 #include <g++/builtin.h>
20241 #elif HAVE_GPP_BUILTIN_H
20242 #include <gpp/builtin.h>
20243 #elif HAVE_BUILTIN_H
20244 #include <builtin.h>
20245 #endif
20246
20247 #else
20248
20249 #if $cf_cv_header_stdbool_h
20250 #include <stdbool.h>
20251 #endif
20252
20253 #endif
20254
20255 int main()
20256 {
20257         FILE *fp = fopen("cf_test.out", "w");
20258         if (fp != 0) {
20259                 bool x = true;
20260                 if ((bool)(-x) >= 0)
20261                         fputs("unsigned ", fp);
20262                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20263                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20264                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20265                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20266                 fclose(fp);
20267         }
20268         ${cf_cv_main_return:-return}(0);
20269 }
20270
20271 _ACEOF
20272 rm -f conftest$ac_exeext
20273 if { (eval echo "$as_me:20273: \"$ac_link\"") >&5
20274   (eval $ac_link) 2>&5
20275   ac_status=$?
20276   echo "$as_me:20276: \$? = $ac_status" >&5
20277   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20278   { (eval echo "$as_me:20278: \"$ac_try\"") >&5
20279   (eval $ac_try) 2>&5
20280   ac_status=$?
20281   echo "$as_me:20281: \$? = $ac_status" >&5
20282   (exit $ac_status); }; }; then
20283   cf_cv_type_of_bool=`cat cf_test.out`
20284                  if test -z "$cf_cv_type_of_bool"; then
20285                    cf_cv_type_of_bool=unknown
20286                  fi
20287 else
20288   echo "$as_me: program exited with status $ac_status" >&5
20289 echo "$as_me: failed program was:" >&5
20290 cat conftest.$ac_ext >&5
20291 cf_cv_type_of_bool=unknown
20292 fi
20293 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20294 fi
20295
20296 fi
20297
20298         rm -f cf_test.out
20299 echo "$as_me:20299: result: $cf_cv_type_of_bool" >&5
20300 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20301 if test "$cf_cv_type_of_bool" = unknown ; then
20302         case .$NCURSES_BOOL in
20303         (.auto|.) NCURSES_BOOL=unsigned;;
20304         esac
20305         { echo "$as_me:20305: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20306 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20307         cf_cv_type_of_bool=$NCURSES_BOOL
20308 fi
20309
20310 echo "$as_me:20310: checking for special defines needed for etip.h" >&5
20311 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20312 cf_save_CXXFLAGS="$CXXFLAGS"
20313 cf_result="none"
20314
20315 # etip.h includes ncurses.h which includes ncurses_dll.h
20316 # But ncurses_dll.h is generated - fix here.
20317 test -d include || mkdir include
20318 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
20319
20320 for cf_math in "" MATH_H
20321 do
20322 for cf_excp in "" MATH_EXCEPTION
20323 do
20324         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20325         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20326         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20327 cat >conftest.$ac_ext <<_ACEOF
20328 #line 20328 "configure"
20329 #include "confdefs.h"
20330
20331 #include <etip.h.in>
20332
20333 int
20334 main ()
20335 {
20336
20337   ;
20338   return 0;
20339 }
20340 _ACEOF
20341 rm -f conftest.$ac_objext
20342 if { (eval echo "$as_me:20342: \"$ac_compile\"") >&5
20343   (eval $ac_compile) 2>&5
20344   ac_status=$?
20345   echo "$as_me:20345: \$? = $ac_status" >&5
20346   (exit $ac_status); } &&
20347          { ac_try='test -s conftest.$ac_objext'
20348   { (eval echo "$as_me:20348: \"$ac_try\"") >&5
20349   (eval $ac_try) 2>&5
20350   ac_status=$?
20351   echo "$as_me:20351: \$? = $ac_status" >&5
20352   (exit $ac_status); }; }; then
20353
20354         test -n "$cf_math" && cat >>confdefs.h <<EOF
20355 #define ETIP_NEEDS_${cf_math} 1
20356 EOF
20357
20358         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20359 #define ETIP_NEEDS_${cf_excp} 1
20360 EOF
20361
20362         cf_result="$cf_math $cf_excp"
20363         break 2
20364
20365 else
20366   echo "$as_me: failed program was:" >&5
20367 cat conftest.$ac_ext >&5
20368 fi
20369 rm -f conftest.$ac_objext conftest.$ac_ext
20370 done
20371 done
20372 echo "$as_me:20372: result: $cf_result" >&5
20373 echo "${ECHO_T}$cf_result" >&6
20374 CXXFLAGS="$cf_save_CXXFLAGS"
20375
20376 if test -n "$CXX"; then
20377 echo "$as_me:20377: checking if $CXX accepts parameter initialization" >&5
20378 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20379 if test "${cf_cv_cpp_param_init+set}" = set; then
20380   echo $ECHO_N "(cached) $ECHO_C" >&6
20381 else
20382
20383         ac_ext=cc
20384 ac_cpp='$CXXCPP $CPPFLAGS'
20385 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20386 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20387 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20388 ac_main_return=return
20389
20390         if test "$cross_compiling" = yes; then
20391   cf_cv_cpp_param_init=unknown
20392 else
20393   cat >conftest.$ac_ext <<_ACEOF
20394 #line 20394 "configure"
20395 #include "confdefs.h"
20396
20397 class TEST {
20398 private:
20399         int value;
20400 public:
20401         TEST(int x = 1);
20402         ~TEST();
20403 };
20404
20405 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20406 {
20407         value = x;
20408 }
20409 int main() { }
20410
20411 _ACEOF
20412 rm -f conftest$ac_exeext
20413 if { (eval echo "$as_me:20413: \"$ac_link\"") >&5
20414   (eval $ac_link) 2>&5
20415   ac_status=$?
20416   echo "$as_me:20416: \$? = $ac_status" >&5
20417   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20418   { (eval echo "$as_me:20418: \"$ac_try\"") >&5
20419   (eval $ac_try) 2>&5
20420   ac_status=$?
20421   echo "$as_me:20421: \$? = $ac_status" >&5
20422   (exit $ac_status); }; }; then
20423   cf_cv_cpp_param_init=yes
20424 else
20425   echo "$as_me: program exited with status $ac_status" >&5
20426 echo "$as_me: failed program was:" >&5
20427 cat conftest.$ac_ext >&5
20428 cf_cv_cpp_param_init=no
20429 fi
20430 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20431 fi
20432         ac_ext=cc
20433 ac_cpp='$CXXCPP $CPPFLAGS'
20434 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20435 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20436 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20437 ac_main_return=return
20438
20439 fi
20440 echo "$as_me:20440: result: $cf_cv_cpp_param_init" >&5
20441 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20442 fi
20443 test "$cf_cv_cpp_param_init" = yes &&
20444 cat >>confdefs.h <<\EOF
20445 #define CPP_HAS_PARAM_INIT 1
20446 EOF
20447
20448 if test -n "$CXX"; then
20449
20450 echo "$as_me:20450: checking if $CXX accepts static_cast" >&5
20451 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20452 if test "${cf_cv_cpp_static_cast+set}" = set; then
20453   echo $ECHO_N "(cached) $ECHO_C" >&6
20454 else
20455
20456         ac_ext=cc
20457 ac_cpp='$CXXCPP $CPPFLAGS'
20458 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20459 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20460 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20461 ac_main_return=return
20462
20463         cat >conftest.$ac_ext <<_ACEOF
20464 #line 20464 "configure"
20465 #include "confdefs.h"
20466
20467 class NCursesPanel
20468 {
20469 public:
20470   NCursesPanel(int nlines,
20471                int ncols,
20472                int begin_y = 0,
20473                int begin_x = 0)
20474   {
20475   }
20476   NCursesPanel();
20477   ~NCursesPanel();
20478 };
20479
20480 template<class T> class NCursesUserPanel : public NCursesPanel
20481 {
20482 public:
20483   NCursesUserPanel (int nlines,
20484                     int ncols,
20485                     int begin_y = 0,
20486                     int begin_x = 0,
20487                     const T* p_UserData = static_cast<T*>(0))
20488     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20489   {
20490   };
20491   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20492   {
20493   };
20494
20495   virtual ~NCursesUserPanel() {};
20496 };
20497
20498 int
20499 main ()
20500 {
20501
20502         const char* p_UserData = static_cast<char*>(0)
20503   ;
20504   return 0;
20505 }
20506 _ACEOF
20507 rm -f conftest.$ac_objext
20508 if { (eval echo "$as_me:20508: \"$ac_compile\"") >&5
20509   (eval $ac_compile) 2>&5
20510   ac_status=$?
20511   echo "$as_me:20511: \$? = $ac_status" >&5
20512   (exit $ac_status); } &&
20513          { ac_try='test -s conftest.$ac_objext'
20514   { (eval echo "$as_me:20514: \"$ac_try\"") >&5
20515   (eval $ac_try) 2>&5
20516   ac_status=$?
20517   echo "$as_me:20517: \$? = $ac_status" >&5
20518   (exit $ac_status); }; }; then
20519   cf_cv_cpp_static_cast=yes
20520 else
20521   echo "$as_me: failed program was:" >&5
20522 cat conftest.$ac_ext >&5
20523 cf_cv_cpp_static_cast=no
20524 fi
20525 rm -f conftest.$ac_objext conftest.$ac_ext
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 fi
20535 echo "$as_me:20535: result: $cf_cv_cpp_static_cast" >&5
20536 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20537
20538 fi
20539
20540 test "$cf_cv_cpp_static_cast" = yes &&
20541 cat >>confdefs.h <<\EOF
20542 #define CPP_HAS_STATIC_CAST 1
20543 EOF
20544
20545         CXX_AR='$(AR)'
20546         CXX_ARFLAGS='$(ARFLAGS)'
20547         case $cf_cv_system_name in
20548         (irix*)
20549             if test "$GXX" != yes ; then
20550                 CXX_AR='$(CXX)'
20551                 CXX_ARFLAGS='-ar -o'
20552             fi
20553             ;;
20554         (sco3.2v5*)
20555             CXXLDFLAGS="-u main"
20556             ;;
20557         (solaris2*)
20558             if test "$GXX" != yes ; then
20559                 CXX_AR='$(CXX)'
20560                 CXX_ARFLAGS='-xar -o'
20561             fi
20562             ;;
20563         esac
20564
20565 else
20566         cf_cxx_library=no
20567         cf_cv_builtin_bool=1
20568
20569         # Just because we are not configuring against C++ right now does not
20570         # mean that a user will not want to use C++.  Some distributors disable
20571         # the C++ portion of this configuration as a shortcut (or just to avoid
20572         # compiling the demo in the c++ directory).  So we need a reasonable
20573         # default for the 'bool' type.
20574         #
20575         # Caveat: since the storage of the bool type is not standardized, it
20576         # may change.
20577
20578         if test "$NCURSES_BOOL" != auto ; then
20579                 cf_cv_type_of_bool=$NCURSES_BOOL
20580                 cf_cv_header_stdbool_h=0
20581         else
20582                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20583
20584 echo "$as_me:20584: checking for size of bool" >&5
20585 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20586 if test "${cf_cv_type_of_bool+set}" = set; then
20587   echo $ECHO_N "(cached) $ECHO_C" >&6
20588 else
20589
20590         rm -f cf_test.out
20591         if test "$cross_compiling" = yes; then
20592   cf_cv_type_of_bool=unknown
20593 else
20594   cat >conftest.$ac_ext <<_ACEOF
20595 #line 20595 "configure"
20596 #include "confdefs.h"
20597
20598 #include <stdlib.h>
20599 #include <stdio.h>
20600
20601 #if defined(__cplusplus)
20602
20603 #ifdef HAVE_GXX_BUILTIN_H
20604 #include <g++/builtin.h>
20605 #elif HAVE_GPP_BUILTIN_H
20606 #include <gpp/builtin.h>
20607 #elif HAVE_BUILTIN_H
20608 #include <builtin.h>
20609 #endif
20610
20611 #else
20612
20613 #if $cf_cv_header_stdbool_h
20614 #include <stdbool.h>
20615 #endif
20616
20617 #endif
20618
20619 int main()
20620 {
20621         FILE *fp = fopen("cf_test.out", "w");
20622         if (fp != 0) {
20623                 bool x = true;
20624                 if ((bool)(-x) >= 0)
20625                         fputs("unsigned ", fp);
20626                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20627                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20628                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20629                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20630                 fclose(fp);
20631         }
20632         ${cf_cv_main_return:-return}(0);
20633 }
20634
20635 _ACEOF
20636 rm -f conftest$ac_exeext
20637 if { (eval echo "$as_me:20637: \"$ac_link\"") >&5
20638   (eval $ac_link) 2>&5
20639   ac_status=$?
20640   echo "$as_me:20640: \$? = $ac_status" >&5
20641   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20642   { (eval echo "$as_me:20642: \"$ac_try\"") >&5
20643   (eval $ac_try) 2>&5
20644   ac_status=$?
20645   echo "$as_me:20645: \$? = $ac_status" >&5
20646   (exit $ac_status); }; }; then
20647   cf_cv_type_of_bool=`cat cf_test.out`
20648                  if test -z "$cf_cv_type_of_bool"; then
20649                    cf_cv_type_of_bool=unknown
20650                  fi
20651 else
20652   echo "$as_me: program exited with status $ac_status" >&5
20653 echo "$as_me: failed program was:" >&5
20654 cat conftest.$ac_ext >&5
20655 cf_cv_type_of_bool=unknown
20656 fi
20657 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20658 fi
20659
20660 fi
20661
20662         rm -f cf_test.out
20663 echo "$as_me:20663: result: $cf_cv_type_of_bool" >&5
20664 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20665 if test "$cf_cv_type_of_bool" = unknown ; then
20666         case .$NCURSES_BOOL in
20667         (.auto|.) NCURSES_BOOL=unsigned;;
20668         esac
20669         { echo "$as_me:20669: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20670 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20671         cf_cv_type_of_bool=$NCURSES_BOOL
20672 fi
20673
20674                 else
20675                         echo "$as_me:20675: checking for fallback type of bool" >&5
20676 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20677                         case "$host_cpu" in
20678                         (i?86)  cf_cv_type_of_bool=char ;;
20679                         (*)     cf_cv_type_of_bool=int  ;;
20680                         esac
20681                         echo "$as_me:20681: result: $cf_cv_type_of_bool" >&5
20682 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20683                 fi
20684         fi
20685 fi
20686
20687 # If the C compiler did not declare bool, and we did not determine that the C++
20688 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20689 # ncurses library use the same type as C++ bool.  Note that this allows one to
20690 # specify the type of bool in a configure-script option and postpone
20691 # integration with the C++ compiler provided that the types are compatible.
20692 USE_CXX_BOOL=1
20693 if test $cf_cv_cc_bool_type = 1
20694 then
20695         # oops: C has a bool.  Unlikely, but C++ could differ.
20696         USE_CXX_BOOL=0
20697 elif test $cf_cv_builtin_bool = 0
20698 then
20699         # C++ has no bool
20700         USE_CXX_BOOL=0
20701 else
20702         # this is the normal case
20703         USE_CXX_BOOL='defined(__cplusplus)'
20704 fi
20705
20706 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20707
20708         if test "$cf_with_ada" != "no" ; then
20709                 if test "$with_libtool" != "no"; then
20710                         { echo "$as_me:20710: WARNING: libtool does not support Ada - disabling feature" >&5
20711 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20712                         cf_with_ada=no
20713                 fi
20714         fi
20715
20716         if test "$cf_with_ada" != "no" ; then
20717
20718 cf_ada_make=gnatmake
20719 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20720 set dummy $cf_ada_make; ac_word=$2
20721 echo "$as_me:20721: checking for $ac_word" >&5
20722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20723 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20724   echo $ECHO_N "(cached) $ECHO_C" >&6
20725 else
20726   if test -n "$gnat_exists"; then
20727   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20728 else
20729   ac_save_IFS=$IFS; IFS=$ac_path_separator
20730 ac_dummy="$PATH"
20731 for ac_dir in $ac_dummy; do
20732   IFS=$ac_save_IFS
20733   test -z "$ac_dir" && ac_dir=.
20734   $as_executable_p "$ac_dir/$ac_word" || continue
20735 ac_cv_prog_gnat_exists="yes"
20736 echo "$as_me:20736: found $ac_dir/$ac_word" >&5
20737 break
20738 done
20739
20740   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20741 fi
20742 fi
20743 gnat_exists=$ac_cv_prog_gnat_exists
20744 if test -n "$gnat_exists"; then
20745   echo "$as_me:20745: result: $gnat_exists" >&5
20746 echo "${ECHO_T}$gnat_exists" >&6
20747 else
20748   echo "$as_me:20748: result: no" >&5
20749 echo "${ECHO_T}no" >&6
20750 fi
20751
20752 if test "$ac_cv_prog_gnat_exists" = no; then
20753         cf_ada_make=
20754         cf_cv_prog_gnat_correct=no
20755 else
20756
20757 echo "$as_me:20757: checking for gnat version" >&5
20758 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20759 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20760         grep '[0-9].[0-9][0-9]*' |\
20761         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20762 echo "$as_me:20762: result: $cf_gnat_version" >&5
20763 echo "${ECHO_T}$cf_gnat_version" >&6
20764
20765 case $cf_gnat_version in
20766 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20767         cf_cv_prog_gnat_correct=yes
20768         ;;
20769 (*)
20770         { echo "$as_me:20770: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20771 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20772         cf_cv_prog_gnat_correct=no
20773         ;;
20774 esac
20775
20776         # Extract the first word of "m4", so it can be a program name with args.
20777 set dummy m4; ac_word=$2
20778 echo "$as_me:20778: checking for $ac_word" >&5
20779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20780 if test "${ac_cv_prog_M4_exists+set}" = set; then
20781   echo $ECHO_N "(cached) $ECHO_C" >&6
20782 else
20783   if test -n "$M4_exists"; then
20784   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20785 else
20786   ac_save_IFS=$IFS; IFS=$ac_path_separator
20787 ac_dummy="$PATH"
20788 for ac_dir in $ac_dummy; do
20789   IFS=$ac_save_IFS
20790   test -z "$ac_dir" && ac_dir=.
20791   $as_executable_p "$ac_dir/$ac_word" || continue
20792 ac_cv_prog_M4_exists="yes"
20793 echo "$as_me:20793: found $ac_dir/$ac_word" >&5
20794 break
20795 done
20796
20797   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20798 fi
20799 fi
20800 M4_exists=$ac_cv_prog_M4_exists
20801 if test -n "$M4_exists"; then
20802   echo "$as_me:20802: result: $M4_exists" >&5
20803 echo "${ECHO_T}$M4_exists" >&6
20804 else
20805   echo "$as_me:20805: result: no" >&5
20806 echo "${ECHO_T}no" >&6
20807 fi
20808
20809         if test "$ac_cv_prog_M4_exists" = no; then
20810                 cf_cv_prog_gnat_correct=no
20811                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20812         fi
20813         if test "$cf_cv_prog_gnat_correct" = yes; then
20814                 echo "$as_me:20814: checking if GNAT works" >&5
20815 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20816
20817 rm -rf conftest* *~conftest*
20818 cat >>conftest.ads <<CF_EOF
20819 procedure conftest;
20820 CF_EOF
20821 cat >>conftest.adb <<CF_EOF
20822 with Text_IO;
20823 with GNAT.OS_Lib;
20824 procedure conftest is
20825 begin
20826    Text_IO.Put ("Hello World");
20827    Text_IO.New_Line;
20828    GNAT.OS_Lib.OS_Exit (0);
20829 end conftest;
20830 CF_EOF
20831 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20832    if ( ./conftest 1>&5 2>&1 ) ; then
20833       cf_cv_prog_gnat_correct=yes
20834    else
20835       cf_cv_prog_gnat_correct=no
20836    fi
20837 else
20838    cf_cv_prog_gnat_correct=no
20839 fi
20840 rm -rf conftest* *~conftest*
20841
20842                 echo "$as_me:20842: result: $cf_cv_prog_gnat_correct" >&5
20843 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20844         fi
20845 fi
20846
20847                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20848
20849         ADAFLAGS="$ADAFLAGS -gnatpn"
20850
20851         echo "$as_me:20851: checking optimization options for ADAFLAGS" >&5
20852 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20853         case "$CFLAGS" in
20854         (*-g*)
20855
20856         ADAFLAGS="$ADAFLAGS -g"
20857
20858                 ;;
20859         esac
20860         case "$CFLAGS" in
20861         (*-O*)
20862                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20863
20864         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20865
20866                 ;;
20867         esac
20868         echo "$as_me:20868: result: $ADAFLAGS" >&5
20869 echo "${ECHO_T}$ADAFLAGS" >&6
20870
20871 echo "$as_me:20871: checking if GNATPREP supports -T option" >&5
20872 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20873 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20874   echo $ECHO_N "(cached) $ECHO_C" >&6
20875 else
20876
20877 cf_cv_gnatprep_opt_t=no
20878 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20879
20880 fi
20881 echo "$as_me:20881: result: $cf_cv_gnatprep_opt_t" >&5
20882 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20883 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20884
20885 echo "$as_me:20885: checking if GNAT supports generics" >&5
20886 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20887 case $cf_gnat_version in
20888 (3.[1-9]*|[4-9].*)
20889         cf_gnat_generics=yes
20890         ;;
20891 (*)
20892         cf_gnat_generics=no
20893         ;;
20894 esac
20895 echo "$as_me:20895: result: $cf_gnat_generics" >&5
20896 echo "${ECHO_T}$cf_gnat_generics" >&6
20897
20898 if test "$cf_gnat_generics" = yes
20899 then
20900         cf_compile_generics=generics
20901         cf_generic_objects="\${GENOBJS}"
20902 else
20903         cf_compile_generics=
20904         cf_generic_objects=
20905 fi
20906
20907 echo "$as_me:20907: checking if GNAT supports SIGINT" >&5
20908 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20909 if test "${cf_cv_gnat_sigint+set}" = set; then
20910   echo $ECHO_N "(cached) $ECHO_C" >&6
20911 else
20912
20913 rm -rf conftest* *~conftest*
20914 cat >>conftest.ads <<CF_EOF
20915 with Ada.Interrupts.Names;
20916
20917 package ConfTest is
20918
20919    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20920    pragma Unreserve_All_Interrupts;
20921    pragma Warnings (On);
20922
20923    protected Process is
20924       procedure Stop;
20925       function Continue return Boolean;
20926       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20927    private
20928       Done : Boolean := False;
20929    end Process;
20930
20931 end ConfTest;
20932 CF_EOF
20933 cat >>conftest.adb <<CF_EOF
20934 package body ConfTest is
20935    protected body Process is
20936       procedure Stop is
20937       begin
20938          Done := True;
20939       end Stop;
20940       function Continue return Boolean is
20941       begin
20942          return not Done;
20943       end Continue;
20944    end Process;
20945 end ConfTest;
20946 CF_EOF
20947 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20948       cf_cv_gnat_sigint=yes
20949 else
20950    cf_cv_gnat_sigint=no
20951 fi
20952 rm -rf conftest* *~conftest*
20953
20954 fi
20955 echo "$as_me:20955: result: $cf_cv_gnat_sigint" >&5
20956 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20957
20958 if test $cf_cv_gnat_sigint = yes ; then
20959         USE_GNAT_SIGINT=""
20960 else
20961         USE_GNAT_SIGINT="#"
20962 fi
20963
20964 cf_gnat_libraries=no
20965 cf_gnat_projects=no
20966
20967 if test "$enable_gnat_projects" != no ; then
20968 echo "$as_me:20968: checking if GNAT supports project files" >&5
20969 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20970 case $cf_gnat_version in
20971 (3.[0-9]*)
20972         ;;
20973 (*)
20974         case $cf_cv_system_name in
20975         (cygwin*|msys*)
20976                 ;;
20977         (*)
20978                 mkdir conftest.src conftest.bin conftest.lib
20979                 cd conftest.src
20980                 rm -rf conftest* *~conftest*
20981                 cat >>library.gpr <<CF_EOF
20982 project Library is
20983   Kind := External ("LIB_KIND");
20984   for Library_Name use "ConfTest";
20985   for Object_Dir use ".";
20986   for Library_ALI_Dir use External("LIBRARY_DIR");
20987   for Library_Version use External ("SONAME");
20988   for Library_Kind use Kind;
20989   for Library_Dir use External("BUILD_DIR");
20990   Source_Dir := External ("SOURCE_DIR");
20991   for Source_Dirs use (Source_Dir);
20992 end Library;
20993 CF_EOF
20994                 cat >>confpackage.ads <<CF_EOF
20995 package ConfPackage is
20996    procedure conftest;
20997 end ConfPackage;
20998 CF_EOF
20999                 cat >>confpackage.adb <<CF_EOF
21000 with Text_IO;
21001 package body ConfPackage is
21002    procedure conftest is
21003    begin
21004       Text_IO.Put ("Hello World");
21005       Text_IO.New_Line;
21006    end conftest;
21007 end ConfPackage;
21008 CF_EOF
21009                 if ( $cf_ada_make $ADAFLAGS \
21010                                 -Plibrary.gpr \
21011                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21012                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21013                                 -XSOURCE_DIR=`pwd` \
21014                                 -XSONAME=libConfTest.so.1 \
21015                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21016                         cf_gnat_projects=yes
21017                 fi
21018                 cd ..
21019                 if test -f conftest.lib/confpackage.ali
21020                 then
21021                         cf_gnat_libraries=yes
21022                 fi
21023                 rm -rf conftest* *~conftest*
21024                 ;;
21025         esac
21026         ;;
21027 esac
21028 echo "$as_me:21028: result: $cf_gnat_projects" >&5
21029 echo "${ECHO_T}$cf_gnat_projects" >&6
21030 fi # enable_gnat_projects
21031
21032 if test $cf_gnat_projects = yes
21033 then
21034         echo "$as_me:21034: checking if GNAT supports libraries" >&5
21035 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21036         echo "$as_me:21036: result: $cf_gnat_libraries" >&5
21037 echo "${ECHO_T}$cf_gnat_libraries" >&6
21038 fi
21039
21040 if test "$cf_gnat_projects" = yes
21041 then
21042         USE_OLD_MAKERULES="#"
21043         USE_GNAT_PROJECTS=""
21044 else
21045         USE_OLD_MAKERULES=""
21046         USE_GNAT_PROJECTS="#"
21047 fi
21048
21049 if test "$cf_gnat_libraries" = yes
21050 then
21051         USE_GNAT_LIBRARIES=""
21052 else
21053         USE_GNAT_LIBRARIES="#"
21054 fi
21055
21056 echo "$as_me:21056: checking for ada-compiler" >&5
21057 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21058
21059 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21060 if test "${with_ada_compiler+set}" = set; then
21061   withval="$with_ada_compiler"
21062   cf_ada_compiler=$withval
21063 else
21064   cf_ada_compiler=gnatmake
21065 fi;
21066
21067 echo "$as_me:21067: result: $cf_ada_compiler" >&5
21068 echo "${ECHO_T}$cf_ada_compiler" >&6
21069
21070                         cf_ada_package=terminal_interface
21071
21072 echo "$as_me:21072: checking for ada-include" >&5
21073 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21074
21075 # Check whether --with-ada-include or --without-ada-include was given.
21076 if test "${with_ada_include+set}" = set; then
21077   withval="$with_ada_include"
21078
21079 else
21080   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21081 fi; if test -n "$prefix/share/ada/adainclude" ; then
21082
21083 if test "x$prefix" != xNONE; then
21084         cf_path_syntax="$prefix"
21085 else
21086         cf_path_syntax="$ac_default_prefix"
21087 fi
21088
21089 case ".$withval" in
21090 (.\$\(*\)*|.\'*\'*)
21091         ;;
21092 (..|./*|.\\*)
21093         ;;
21094 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21095         ;;
21096 (.\${*prefix}*|.\${*dir}*)
21097         eval withval="$withval"
21098         case ".$withval" in
21099         (.NONE/*)
21100                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21101                 ;;
21102         esac
21103         ;;
21104 (.no|.NONE/*)
21105         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21106         ;;
21107 (*)
21108         { { echo "$as_me:21108: error: expected a pathname, not \"$withval\"" >&5
21109 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21110    { (exit 1); exit 1; }; }
21111         ;;
21112 esac
21113
21114 fi
21115 eval ADA_INCLUDE="$withval"
21116
21117 echo "$as_me:21117: result: $ADA_INCLUDE" >&5
21118 echo "${ECHO_T}$ADA_INCLUDE" >&6
21119
21120 echo "$as_me:21120: checking for ada-objects" >&5
21121 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21122
21123 # Check whether --with-ada-objects or --without-ada-objects was given.
21124 if test "${with_ada_objects+set}" = set; then
21125   withval="$with_ada_objects"
21126
21127 else
21128   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21129 fi; if test -n "$prefix/lib/ada/adalib" ; then
21130
21131 if test "x$prefix" != xNONE; then
21132         cf_path_syntax="$prefix"
21133 else
21134         cf_path_syntax="$ac_default_prefix"
21135 fi
21136
21137 case ".$withval" in
21138 (.\$\(*\)*|.\'*\'*)
21139         ;;
21140 (..|./*|.\\*)
21141         ;;
21142 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21143         ;;
21144 (.\${*prefix}*|.\${*dir}*)
21145         eval withval="$withval"
21146         case ".$withval" in
21147         (.NONE/*)
21148                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21149                 ;;
21150         esac
21151         ;;
21152 (.no|.NONE/*)
21153         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21154         ;;
21155 (*)
21156         { { echo "$as_me:21156: error: expected a pathname, not \"$withval\"" >&5
21157 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21158    { (exit 1); exit 1; }; }
21159         ;;
21160 esac
21161
21162 fi
21163 eval ADA_OBJECTS="$withval"
21164
21165 echo "$as_me:21165: result: $ADA_OBJECTS" >&5
21166 echo "${ECHO_T}$ADA_OBJECTS" >&6
21167
21168 echo "$as_me:21168: checking if an Ada95 shared-library should be built" >&5
21169 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21170
21171 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21172 if test "${with_ada_sharedlib+set}" = set; then
21173   withval="$with_ada_sharedlib"
21174   with_ada_sharedlib=$withval
21175 else
21176   with_ada_sharedlib=no
21177 fi;
21178 echo "$as_me:21178: result: $with_ada_sharedlib" >&5
21179 echo "${ECHO_T}$with_ada_sharedlib" >&6
21180
21181 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21182 MAKE_ADA_SHAREDLIB="#"
21183
21184 if test "x$with_ada_sharedlib" != xno
21185 then
21186         MAKE_ADA_SHAREDLIB=
21187         if test "x$with_ada_sharedlib" != xyes
21188         then
21189                 ADA_SHAREDLIB="$with_ada_sharedlib"
21190         fi
21191 fi
21192
21193                 fi
21194         fi
21195 else
21196         cf_with_ada=no
21197 fi
21198
21199 # do this "late" to avoid conflict with header-checks
21200 if test "x$with_widec" = xyes ; then
21201         echo "$as_me:21201: checking for wchar_t" >&5
21202 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21203 if test "${ac_cv_type_wchar_t+set}" = set; then
21204   echo $ECHO_N "(cached) $ECHO_C" >&6
21205 else
21206   cat >conftest.$ac_ext <<_ACEOF
21207 #line 21207 "configure"
21208 #include "confdefs.h"
21209 $ac_includes_default
21210 int
21211 main ()
21212 {
21213 if ((wchar_t *) 0)
21214   return 0;
21215 if (sizeof (wchar_t))
21216   return 0;
21217   ;
21218   return 0;
21219 }
21220 _ACEOF
21221 rm -f conftest.$ac_objext
21222 if { (eval echo "$as_me:21222: \"$ac_compile\"") >&5
21223   (eval $ac_compile) 2>&5
21224   ac_status=$?
21225   echo "$as_me:21225: \$? = $ac_status" >&5
21226   (exit $ac_status); } &&
21227          { ac_try='test -s conftest.$ac_objext'
21228   { (eval echo "$as_me:21228: \"$ac_try\"") >&5
21229   (eval $ac_try) 2>&5
21230   ac_status=$?
21231   echo "$as_me:21231: \$? = $ac_status" >&5
21232   (exit $ac_status); }; }; then
21233   ac_cv_type_wchar_t=yes
21234 else
21235   echo "$as_me: failed program was:" >&5
21236 cat conftest.$ac_ext >&5
21237 ac_cv_type_wchar_t=no
21238 fi
21239 rm -f conftest.$ac_objext conftest.$ac_ext
21240 fi
21241 echo "$as_me:21241: result: $ac_cv_type_wchar_t" >&5
21242 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21243
21244 echo "$as_me:21244: checking size of wchar_t" >&5
21245 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21246 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21247   echo $ECHO_N "(cached) $ECHO_C" >&6
21248 else
21249   if test "$ac_cv_type_wchar_t" = yes; then
21250   if test "$cross_compiling" = yes; then
21251   # Depending upon the size, compute the lo and hi bounds.
21252 cat >conftest.$ac_ext <<_ACEOF
21253 #line 21253 "configure"
21254 #include "confdefs.h"
21255 $ac_includes_default
21256 int
21257 main ()
21258 {
21259 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21260   ;
21261   return 0;
21262 }
21263 _ACEOF
21264 rm -f conftest.$ac_objext
21265 if { (eval echo "$as_me:21265: \"$ac_compile\"") >&5
21266   (eval $ac_compile) 2>&5
21267   ac_status=$?
21268   echo "$as_me:21268: \$? = $ac_status" >&5
21269   (exit $ac_status); } &&
21270          { ac_try='test -s conftest.$ac_objext'
21271   { (eval echo "$as_me:21271: \"$ac_try\"") >&5
21272   (eval $ac_try) 2>&5
21273   ac_status=$?
21274   echo "$as_me:21274: \$? = $ac_status" >&5
21275   (exit $ac_status); }; }; then
21276   ac_lo=0 ac_mid=0
21277   while :; do
21278     cat >conftest.$ac_ext <<_ACEOF
21279 #line 21279 "configure"
21280 #include "confdefs.h"
21281 $ac_includes_default
21282 int
21283 main ()
21284 {
21285 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21286   ;
21287   return 0;
21288 }
21289 _ACEOF
21290 rm -f conftest.$ac_objext
21291 if { (eval echo "$as_me:21291: \"$ac_compile\"") >&5
21292   (eval $ac_compile) 2>&5
21293   ac_status=$?
21294   echo "$as_me:21294: \$? = $ac_status" >&5
21295   (exit $ac_status); } &&
21296          { ac_try='test -s conftest.$ac_objext'
21297   { (eval echo "$as_me:21297: \"$ac_try\"") >&5
21298   (eval $ac_try) 2>&5
21299   ac_status=$?
21300   echo "$as_me:21300: \$? = $ac_status" >&5
21301   (exit $ac_status); }; }; then
21302   ac_hi=$ac_mid; break
21303 else
21304   echo "$as_me: failed program was:" >&5
21305 cat conftest.$ac_ext >&5
21306 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21307 fi
21308 rm -f conftest.$ac_objext conftest.$ac_ext
21309   done
21310 else
21311   echo "$as_me: failed program was:" >&5
21312 cat conftest.$ac_ext >&5
21313 ac_hi=-1 ac_mid=-1
21314   while :; do
21315     cat >conftest.$ac_ext <<_ACEOF
21316 #line 21316 "configure"
21317 #include "confdefs.h"
21318 $ac_includes_default
21319 int
21320 main ()
21321 {
21322 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21323   ;
21324   return 0;
21325 }
21326 _ACEOF
21327 rm -f conftest.$ac_objext
21328 if { (eval echo "$as_me:21328: \"$ac_compile\"") >&5
21329   (eval $ac_compile) 2>&5
21330   ac_status=$?
21331   echo "$as_me:21331: \$? = $ac_status" >&5
21332   (exit $ac_status); } &&
21333          { ac_try='test -s conftest.$ac_objext'
21334   { (eval echo "$as_me:21334: \"$ac_try\"") >&5
21335   (eval $ac_try) 2>&5
21336   ac_status=$?
21337   echo "$as_me:21337: \$? = $ac_status" >&5
21338   (exit $ac_status); }; }; then
21339   ac_lo=$ac_mid; break
21340 else
21341   echo "$as_me: failed program was:" >&5
21342 cat conftest.$ac_ext >&5
21343 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21344 fi
21345 rm -f conftest.$ac_objext conftest.$ac_ext
21346   done
21347 fi
21348 rm -f conftest.$ac_objext conftest.$ac_ext
21349 # Binary search between lo and hi bounds.
21350 while test "x$ac_lo" != "x$ac_hi"; do
21351   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21352   cat >conftest.$ac_ext <<_ACEOF
21353 #line 21353 "configure"
21354 #include "confdefs.h"
21355 $ac_includes_default
21356 int
21357 main ()
21358 {
21359 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21360   ;
21361   return 0;
21362 }
21363 _ACEOF
21364 rm -f conftest.$ac_objext
21365 if { (eval echo "$as_me:21365: \"$ac_compile\"") >&5
21366   (eval $ac_compile) 2>&5
21367   ac_status=$?
21368   echo "$as_me:21368: \$? = $ac_status" >&5
21369   (exit $ac_status); } &&
21370          { ac_try='test -s conftest.$ac_objext'
21371   { (eval echo "$as_me:21371: \"$ac_try\"") >&5
21372   (eval $ac_try) 2>&5
21373   ac_status=$?
21374   echo "$as_me:21374: \$? = $ac_status" >&5
21375   (exit $ac_status); }; }; then
21376   ac_hi=$ac_mid
21377 else
21378   echo "$as_me: failed program was:" >&5
21379 cat conftest.$ac_ext >&5
21380 ac_lo=`expr $ac_mid + 1`
21381 fi
21382 rm -f conftest.$ac_objext conftest.$ac_ext
21383 done
21384 ac_cv_sizeof_wchar_t=$ac_lo
21385 else
21386   if test "$cross_compiling" = yes; then
21387   { { echo "$as_me:21387: error: cannot run test program while cross compiling" >&5
21388 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21389    { (exit 1); exit 1; }; }
21390 else
21391   cat >conftest.$ac_ext <<_ACEOF
21392 #line 21392 "configure"
21393 #include "confdefs.h"
21394 $ac_includes_default
21395 int
21396 main ()
21397 {
21398 FILE *f = fopen ("conftest.val", "w");
21399 if (!f)
21400   $ac_main_return (1);
21401 fprintf (f, "%d", (sizeof (wchar_t)));
21402 fclose (f);
21403   ;
21404   return 0;
21405 }
21406 _ACEOF
21407 rm -f conftest$ac_exeext
21408 if { (eval echo "$as_me:21408: \"$ac_link\"") >&5
21409   (eval $ac_link) 2>&5
21410   ac_status=$?
21411   echo "$as_me:21411: \$? = $ac_status" >&5
21412   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21413   { (eval echo "$as_me:21413: \"$ac_try\"") >&5
21414   (eval $ac_try) 2>&5
21415   ac_status=$?
21416   echo "$as_me:21416: \$? = $ac_status" >&5
21417   (exit $ac_status); }; }; then
21418   ac_cv_sizeof_wchar_t=`cat conftest.val`
21419 else
21420   echo "$as_me: program exited with status $ac_status" >&5
21421 echo "$as_me: failed program was:" >&5
21422 cat conftest.$ac_ext >&5
21423 fi
21424 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21425 fi
21426 fi
21427 rm -f conftest.val
21428 else
21429   ac_cv_sizeof_wchar_t=0
21430 fi
21431 fi
21432 echo "$as_me:21432: result: $ac_cv_sizeof_wchar_t" >&5
21433 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21434 cat >>confdefs.h <<EOF
21435 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21436 EOF
21437
21438 fi
21439
21440 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21441 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21442 ###
21443 ### ticlib modules may be a separate library, otherwise contained in termlib.
21444 ### termlib modules may be a separate library, otherwise contained in ncurses.
21445 ###
21446 ### The of "+" or " " between the tokens controls the way the script
21447 ### chooses to split module lists into libraries.
21448 ###
21449 ### (see CF_LIB_RULES).
21450 echo "$as_me:21450: checking for library subsets" >&5
21451 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21452 LIB_SUBSETS=
21453
21454 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21455         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21456         if test "$with_ticlib" != no ; then
21457                 LIB_SUBSETS="${LIB_SUBSETS} "
21458         else
21459                 LIB_SUBSETS="${LIB_SUBSETS}+"
21460         fi
21461 fi
21462
21463 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21464 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21465
21466 if test "$with_termlib" != no ; then
21467         LIB_SUBSETS="${LIB_SUBSETS} "
21468 else
21469         LIB_SUBSETS="${LIB_SUBSETS}+"
21470 fi
21471
21472 LIB_SUBSETS="${LIB_SUBSETS}base"
21473
21474 # Most term-driver calls are to tinfo, but some like init_pair are to the
21475 # base library (so it resides in base).
21476 if test "$with_term_driver" != no ; then
21477         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21478         case $cf_cv_system_name in
21479         (*mingw32*|*mingw64*)
21480                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21481                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21482                 ;;
21483         (*)
21484                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21485                 ;;
21486         esac
21487 fi
21488
21489 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21490 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21491
21492 echo "$as_me:21492: result: $LIB_SUBSETS" >&5
21493 echo "${ECHO_T}$LIB_SUBSETS" >&6
21494
21495 ### Construct the list of include-directories to be generated
21496
21497 if test "$srcdir" != "."; then
21498         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21499 fi
21500 CPPFLAGS="-I../include $CPPFLAGS"
21501 if test "$srcdir" != "."; then
21502         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21503 fi
21504 CPPFLAGS="-I. $CPPFLAGS"
21505
21506 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21507 if test "$srcdir" != "."; then
21508         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21509 fi
21510 if test "$GCC" != yes; then
21511         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21512 elif test "$includedir" != "/usr/include"; then
21513         if test "$includedir" = '${prefix}/include' ; then
21514                 if test x$prefix != x/usr ; then
21515                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21516                 fi
21517         else
21518                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21519         fi
21520 fi
21521
21522 ### Build up pieces for makefile rules
21523 echo "$as_me:21523: checking default library suffix" >&5
21524 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21525
21526         case $DFT_LWR_MODEL in
21527         (libtool) DFT_ARG_SUFFIX=''   ;;
21528         (normal)  DFT_ARG_SUFFIX=''   ;;
21529         (debug)   DFT_ARG_SUFFIX='_g' ;;
21530         (profile) DFT_ARG_SUFFIX='_p' ;;
21531         (shared)  DFT_ARG_SUFFIX=''   ;;
21532         esac
21533         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21534 echo "$as_me:21534: result: $DFT_ARG_SUFFIX" >&5
21535 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21536
21537 echo "$as_me:21537: checking default library-dependency suffix" >&5
21538 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21539
21540         case X$DFT_LWR_MODEL in
21541         (Xlibtool)
21542                 DFT_LIB_SUFFIX='.la'
21543                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21544                 ;;
21545         (Xdebug)
21546                 DFT_LIB_SUFFIX='_g.a'
21547                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21548                 ;;
21549         (Xprofile)
21550                 DFT_LIB_SUFFIX='_p.a'
21551                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21552                 ;;
21553         (Xshared)
21554                 case $cf_cv_system_name in
21555                 (aix[5-7]*)
21556                         DFT_LIB_SUFFIX='.so'
21557                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21558                         ;;
21559                 (cygwin*|msys*|mingw*)
21560                         DFT_LIB_SUFFIX='.dll'
21561                         DFT_DEP_SUFFIX='.dll.a'
21562                         ;;
21563                 (darwin*)
21564                         DFT_LIB_SUFFIX='.dylib'
21565                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21566                         ;;
21567                 (hpux*)
21568                         case $target in
21569                         (ia64*)
21570                                 DFT_LIB_SUFFIX='.so'
21571                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21572                                 ;;
21573                         (*)
21574                                 DFT_LIB_SUFFIX='.sl'
21575                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21576                                 ;;
21577                         esac
21578                         ;;
21579                 (*)
21580                         DFT_LIB_SUFFIX='.so'
21581                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21582                         ;;
21583                 esac
21584                 ;;
21585         (*)
21586                 DFT_LIB_SUFFIX='.a'
21587                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21588                 ;;
21589         esac
21590         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21591         then
21592                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21593                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21594         fi
21595 echo "$as_me:21595: result: $DFT_DEP_SUFFIX" >&5
21596 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21597
21598 echo "$as_me:21598: checking default object directory" >&5
21599 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21600
21601         case $DFT_LWR_MODEL in
21602         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21603         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21604         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21605         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21606         (shared)
21607                 case $cf_cv_system_name in
21608                 (cygwin|msys)
21609                         DFT_OBJ_SUBDIR='objects' ;;
21610                 (*)
21611                         DFT_OBJ_SUBDIR='obj_s' ;;
21612                 esac
21613         esac
21614 echo "$as_me:21614: result: $DFT_OBJ_SUBDIR" >&5
21615 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21616
21617 if test "x$cf_with_cxx" = xyes ; then
21618 echo "$as_me:21618: checking c++ library-dependency suffix" >&5
21619 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21620 if test "$with_libtool" != "no"; then
21621         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21622         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21623 elif test "$with_shared_cxx" != "no"; then
21624         # also for g++ users...
21625         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21626 else
21627         # we normally make a static library because C/C++ library rules differ
21628
21629         case Xnormal in
21630         (Xlibtool)
21631                 CXX_LIB_SUFFIX='.la'
21632                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21633                 ;;
21634         (Xdebug)
21635                 CXX_LIB_SUFFIX='_g.a'
21636                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21637                 ;;
21638         (Xprofile)
21639                 CXX_LIB_SUFFIX='_p.a'
21640                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21641                 ;;
21642         (Xshared)
21643                 case $cf_cv_system_name in
21644                 (aix[5-7]*)
21645                         CXX_LIB_SUFFIX='.so'
21646                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21647                         ;;
21648                 (cygwin*|msys*|mingw*)
21649                         CXX_LIB_SUFFIX='.dll'
21650                         CXX_DEP_SUFFIX='.dll.a'
21651                         ;;
21652                 (darwin*)
21653                         CXX_LIB_SUFFIX='.dylib'
21654                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21655                         ;;
21656                 (hpux*)
21657                         case $target in
21658                         (ia64*)
21659                                 CXX_LIB_SUFFIX='.so'
21660                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21661                                 ;;
21662                         (*)
21663                                 CXX_LIB_SUFFIX='.sl'
21664                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21665                                 ;;
21666                         esac
21667                         ;;
21668                 (*)
21669                         CXX_LIB_SUFFIX='.so'
21670                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21671                         ;;
21672                 esac
21673                 ;;
21674         (*)
21675                 CXX_LIB_SUFFIX='.a'
21676                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21677                 ;;
21678         esac
21679         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21680         then
21681                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21682                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21683         fi
21684
21685 fi
21686 echo "$as_me:21686: result: $CXX_LIB_SUFFIX" >&5
21687 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21688
21689 fi
21690
21691 # do not want -ldl in build except as needed for -lncurses dependency
21692 if test "x$with_dlsym" = xyes ; then
21693 if test $DFT_LWR_MODEL = shared || \
21694    test $DFT_LWR_MODEL = libtool ; then
21695
21696 # remove dl library from $LIBS
21697 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21698
21699 fi
21700 fi
21701 ### Set up low-level terminfo dependencies for makefiles.
21702
21703 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21704 # do not need libdl
21705 TICS_LIST=
21706 if test "x$with_dlsym" = xyes ; then
21707
21708 # remove dl library from $SHLIB_LIST
21709 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21710
21711 fi
21712
21713 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21714 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21715 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21716 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21717 then
21718         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21719 fi
21720
21721 if test "$with_ticlib" != no ; then
21722
21723         if test "x$with_ticlib" != xyes ; then
21724                 TICS_NAME=$with_ticlib
21725                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21726                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21727                 TICS_LIB_SUFFIX="${with_ticlib}"
21728         else
21729                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21730                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21731                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21732         fi
21733         TICS_LDFLAGS="-L${LIB_DIR}"
21734         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21735 else
21736         TICS_LDFLAGS="-L${LIB_DIR}"
21737         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21738 fi
21739
21740 if test "$with_termlib" != no ; then
21741
21742         if test "x$with_termlib" != xyes ; then
21743                 TINFO_NAME=$with_termlib
21744                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21745                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21746                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21747                 TINFO_LIB_SUFFIX="${with_termlib}"
21748         else
21749                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21750                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21751                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21752                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21753         fi
21754
21755         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21756         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21757         if test "$DFT_LWR_MODEL" = "libtool"; then
21758                 TEST_ARGS="${TEST_DEPS}"
21759                 TEST_ARG2="${TEST_DEP2}"
21760                 TINFO_LDFLAGS="-L${LIB_DIR}"
21761                 TINFO_LIBS="$TEST_ARGS"
21762                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21763                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21764         else
21765                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21766                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21767                 if test "x$with_term_driver" != xno ; then
21768                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21769                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21770                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21771                 else
21772                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21773                         TINFO_LIBS="$TEST_ARGS"
21774                 fi
21775                 TINFO_LDFLAGS="-L${LIB_DIR}"
21776                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21777         fi
21778 else
21779         # the next lines are needed for linking libtic over libncurses
21780         TINFO_NAME=${LIB_NAME}
21781         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21782         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21783         if test "x$with_tic_depends" = xyes ; then
21784                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21785         else
21786                 TICS_LIST="$SHLIB_LIST"
21787         fi
21788
21789         TINFO_LDFLAGS="-L${LIB_DIR}"
21790         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21791 fi
21792
21793 if test "$DFT_LWR_MODEL" = shared ; then
21794         case $cf_cv_system_name in
21795         (cygwin*|msys*)
21796                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21797                 TINFO_SUFFIX=.dll
21798                 ;;
21799         esac
21800 fi
21801
21802 if test "x$with_dlsym" = xyes ; then
21803
21804 # remove dl library from $TICS_LIST
21805 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21806
21807 fi
21808
21809 if test "$DFT_LWR_MODEL" = "libtool"; then
21810         OBJEXT=lo
21811 fi
21812
21813 # needed for Ada95
21814 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21815
21816 case $DFT_LWR_MODEL in
21817 (normal|debug|profile)
21818
21819 if test "$GCC" = yes ; then
21820         case $cf_cv_system_name in
21821         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21822                 LDFLAGS_STATIC=
21823                 LDFLAGS_SHARED=
21824                 ;;
21825         (*)     # normally, except when broken
21826                 LDFLAGS_STATIC=-static
21827                 LDFLAGS_SHARED=-dynamic
21828                 ;;
21829         esac
21830 else
21831         case $cf_cv_system_name in
21832         (aix[4-7]*)     # from ld manpage
21833                 LDFLAGS_STATIC=-bstatic
21834                 LDFLAGS_SHARED=-bdynamic
21835                 ;;
21836         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21837                 # We could also use just "archive" and "shared".
21838                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21839                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21840                 ;;
21841         (irix*)         # from ld manpage IRIX64
21842                 LDFLAGS_STATIC=-Bstatic
21843                 LDFLAGS_SHARED=-Bdynamic
21844                 ;;
21845         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21846                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21847                 LDFLAGS_STATIC=-noso
21848                 LDFLAGS_SHARED=-so_archive
21849                 ;;
21850         (solaris2*)
21851                 LDFLAGS_STATIC=-Bstatic
21852                 LDFLAGS_SHARED=-Bdynamic
21853                 ;;
21854         esac
21855 fi
21856
21857 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21858 then
21859         echo "$as_me:21859: checking if linker supports switching between static/dynamic" >&5
21860 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21861
21862         rm -f libconftest.a
21863         cat >conftest.$ac_ext <<EOF
21864 #line 21864 "configure"
21865 #include <stdio.h>
21866 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21867 EOF
21868         if { (eval echo "$as_me:21868: \"$ac_compile\"") >&5
21869   (eval $ac_compile) 2>&5
21870   ac_status=$?
21871   echo "$as_me:21871: \$? = $ac_status" >&5
21872   (exit $ac_status); } ; then
21873                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21874                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21875         fi
21876         rm -f conftest.*
21877
21878         cf_save_LIBS="$LIBS"
21879
21880         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21881         cat >conftest.$ac_ext <<_ACEOF
21882 #line 21882 "configure"
21883 #include "confdefs.h"
21884
21885 #line 21885 "configure"
21886 #include <stdio.h>
21887 int cf_ldflags_static(FILE *fp);
21888
21889 int
21890 main ()
21891 {
21892
21893         return cf_ldflags_static(stdin);
21894
21895   ;
21896   return 0;
21897 }
21898 _ACEOF
21899 rm -f conftest.$ac_objext conftest$ac_exeext
21900 if { (eval echo "$as_me:21900: \"$ac_link\"") >&5
21901   (eval $ac_link) 2>&5
21902   ac_status=$?
21903   echo "$as_me:21903: \$? = $ac_status" >&5
21904   (exit $ac_status); } &&
21905          { ac_try='test -s conftest$ac_exeext'
21906   { (eval echo "$as_me:21906: \"$ac_try\"") >&5
21907   (eval $ac_try) 2>&5
21908   ac_status=$?
21909   echo "$as_me:21909: \$? = $ac_status" >&5
21910   (exit $ac_status); }; }; then
21911
21912         # some linkers simply ignore the -dynamic
21913         case x`file conftest$ac_exeext 2>/dev/null` in
21914         (*static*)
21915                 cf_ldflags_static=no
21916                 ;;
21917         (*)
21918                 cf_ldflags_static=yes
21919                 ;;
21920         esac
21921
21922 else
21923   echo "$as_me: failed program was:" >&5
21924 cat conftest.$ac_ext >&5
21925 cf_ldflags_static=no
21926 fi
21927 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21928
21929         rm -f libconftest.*
21930         LIBS="$cf_save_LIBS"
21931
21932         echo "$as_me:21932: result: $cf_ldflags_static" >&5
21933 echo "${ECHO_T}$cf_ldflags_static" >&6
21934
21935         if test $cf_ldflags_static != yes
21936         then
21937                 LDFLAGS_STATIC=
21938                 LDFLAGS_SHARED=
21939         fi
21940 else
21941         LDFLAGS_STATIC=
21942         LDFLAGS_SHARED=
21943 fi
21944
21945         ;;
21946 esac
21947
21948 echo "$as_me:21948: checking where we will install curses.h" >&5
21949 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21950
21951 includesubdir=
21952 if test "$with_overwrite" = no && \
21953  ( test "x$includedir" = 'x${prefix}/include' || \
21954    test "x$includedir" = "x${prefix}/include" )
21955 then
21956         includesubdir="/ncurses${USE_LIB_SUFFIX}"
21957 fi
21958 echo "$as_me:21958: result: ${includedir}${includesubdir}" >&5
21959 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21960
21961 ### Resolve a conflict between normal and wide-curses by forcing applications
21962 ### that will need libutf8 to add it to their configure script.
21963 if test "$with_overwrite" != no ; then
21964 if test "$NCURSES_LIBUTF8" = 1 ; then
21965         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21966         { echo "$as_me:21966: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21967 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21968 fi
21969 fi
21970 WITH_OVERWRITE=$with_overwrite
21971
21972 # used to separate tack out of the tree
21973 NCURSES_TREE=
21974
21975 ### predefined stuff for the test programs
21976
21977 cat >>confdefs.h <<\EOF
21978 #define HAVE_SLK_COLOR 1
21979 EOF
21980
21981 ### Construct the list of subdirectories for which we'll customize makefiles
21982 ### with the appropriate compile-rules.
21983
21984 echo "$as_me:21984: checking for src modules" >&5
21985 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21986
21987 # dependencies and linker-arguments for test-programs
21988 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21989 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21990 if test "$DFT_LWR_MODEL" = "libtool"; then
21991         TEST_ARGS="${TEST_DEPS}"
21992         TEST_ARG2="${TEST_DEP2}"
21993 else
21994         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21995         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21996 fi
21997
21998 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
21999 cf_cv_src_modules=
22000 for cf_dir in $modules_to_build
22001 do
22002         if test -f $srcdir/$cf_dir/modules; then
22003
22004                 # We may/may not have tack in the distribution, though the
22005                 # makefile is.
22006                 if test $cf_dir = tack ; then
22007                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22008                                 continue
22009                         fi
22010                 fi
22011
22012                 if test -z "$cf_cv_src_modules"; then
22013                         cf_cv_src_modules=$cf_dir
22014                 else
22015                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22016                 fi
22017
22018                 # Make the ncurses_cfg.h file record the library interface files as
22019                 # well.  These are header files that are the same name as their
22020                 # directory.  Ncurses is the only library that does not follow
22021                 # that pattern.
22022                 if test $cf_dir = tack ; then
22023                         continue
22024                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22025
22026 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22027
22028                         cat >>confdefs.h <<EOF
22029 #define HAVE_${cf_have_include}_H 1
22030 EOF
22031
22032                         cat >>confdefs.h <<EOF
22033 #define HAVE_LIB${cf_have_include} 1
22034 EOF
22035
22036                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22037                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22038                         if test "$DFT_LWR_MODEL" = "libtool"; then
22039                                 TEST_ARGS="${TEST_DEPS}"
22040                                 TEST_ARG2="${TEST_DEP2}"
22041                         else
22042                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22043                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22044                         fi
22045                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22046                 fi
22047         fi
22048 done
22049 echo "$as_me:22049: result: $cf_cv_src_modules" >&5
22050 echo "${ECHO_T}$cf_cv_src_modules" >&6
22051
22052 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22053 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22054
22055 SRC_SUBDIRS=
22056 if test "x$cf_with_manpages" != xno ; then
22057         SRC_SUBDIRS="$SRC_SUBDIRS man"
22058 fi
22059 SRC_SUBDIRS="$SRC_SUBDIRS include"
22060 for cf_dir in $cf_cv_src_modules
22061 do
22062         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22063 done
22064 if test "x$cf_with_tests" != "xno" ; then
22065         SRC_SUBDIRS="$SRC_SUBDIRS test"
22066 fi
22067 # always make this, to install the ncurses-config script
22068 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22069 if test "$cf_with_cxx_binding" != no; then
22070         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22071         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22072 fi
22073
22074 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22075 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22076
22077 ADA_SUBDIRS=
22078 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22079         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22080         ADA_SUBDIRS="gen src"
22081         if test "x$cf_with_tests" != "xno" ; then
22082                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22083         fi
22084 fi
22085
22086 SUB_MAKEFILES=
22087 for cf_dir in $SRC_SUBDIRS
22088 do
22089         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22090 done
22091
22092 if test -n "$ADA_SUBDIRS"; then
22093         for cf_dir in $ADA_SUBDIRS
22094         do
22095                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22096         done
22097
22098 fi
22099
22100 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22101    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22102    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22103 fi
22104
22105 DIRS_TO_MAKE="lib"
22106 for cf_item in $cf_list_models
22107 do
22108
22109         case $cf_item in
22110         (libtool) cf_subdir='obj_lo'  ;;
22111         (normal)  cf_subdir='objects' ;;
22112         (debug)   cf_subdir='obj_g' ;;
22113         (profile) cf_subdir='obj_p' ;;
22114         (shared)
22115                 case $cf_cv_system_name in
22116                 (cygwin|msys)
22117                         cf_subdir='objects' ;;
22118                 (*)
22119                         cf_subdir='obj_s' ;;
22120                 esac
22121         esac
22122
22123         for cf_item2 in $DIRS_TO_MAKE
22124         do
22125                 test $cf_item2 = $cf_subdir && break
22126         done
22127         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22128 done
22129 for cf_dir in $DIRS_TO_MAKE
22130 do
22131         test ! -d $cf_dir && mkdir $cf_dir
22132 done
22133
22134 # symbols that differ when compiling Ada95 by itself.
22135 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22136
22137 # values to use as strings
22138
22139 cat >>confdefs.h <<EOF
22140 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22141 EOF
22142
22143 cat >>confdefs.h <<EOF
22144 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22145 EOF
22146
22147 ### Now that we're done running tests, add the compiler-warnings, if any
22148
22149 cf_fix_cppflags=no
22150 cf_new_cflags=
22151 cf_new_cppflags=
22152 cf_new_extra_cppflags=
22153
22154 for cf_add_cflags in $EXTRA_CFLAGS
22155 do
22156 case $cf_fix_cppflags in
22157 (no)
22158         case $cf_add_cflags in
22159         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22160                 case $cf_add_cflags in
22161                 (-D*)
22162                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22163
22164                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22165                                 && test -z "${cf_tst_cflags}" \
22166                                 && cf_fix_cppflags=yes
22167
22168                         if test $cf_fix_cppflags = yes ; then
22169                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22170                                 continue
22171                         elif test "${cf_tst_cflags}" = "\"'" ; then
22172                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22173                                 continue
22174                         fi
22175                         ;;
22176                 esac
22177                 case "$CPPFLAGS" in
22178                 (*$cf_add_cflags)
22179                         ;;
22180                 (*)
22181                         case $cf_add_cflags in
22182                         (-D*)
22183                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22184
22185 CPPFLAGS=`echo "$CPPFLAGS" | \
22186         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22187                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22188
22189                                 ;;
22190                         esac
22191                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22192                         ;;
22193                 esac
22194                 ;;
22195         (*)
22196                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22197                 ;;
22198         esac
22199         ;;
22200 (yes)
22201         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22202
22203         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22204
22205         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22206                 && test -z "${cf_tst_cflags}" \
22207                 && cf_fix_cppflags=no
22208         ;;
22209 esac
22210 done
22211
22212 if test -n "$cf_new_cflags" ; then
22213
22214         CFLAGS="$CFLAGS $cf_new_cflags"
22215 fi
22216
22217 if test -n "$cf_new_cppflags" ; then
22218
22219         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22220 fi
22221
22222 if test -n "$cf_new_extra_cppflags" ; then
22223
22224         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22225 fi
22226
22227 ### Define substitutions for header files to avoid name-pollution
22228
22229 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22230         HAVE_TCGETATTR=1
22231 else
22232         HAVE_TCGETATTR=0
22233 fi
22234
22235 if test "x$ac_cv_header_stdint_h" = xyes ; then
22236         HAVE_STDINT_H=1
22237 else
22238         HAVE_STDINT_H=0
22239 fi
22240
22241 if test "x$ac_cv_header_termio_h" = xyes ; then
22242         HAVE_TERMIO_H=1
22243 else
22244         HAVE_TERMIO_H=0
22245 fi
22246
22247 if test "x$ac_cv_header_termios_h" = xyes ; then
22248         HAVE_TERMIOS_H=1
22249 else
22250         HAVE_TERMIOS_H=0
22251 fi
22252
22253 ################################################################################
22254 test "x$use_database" = xyes && \
22255 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22256
22257 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22258 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22259
22260 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22261 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22262 fi
22263
22264 # Extract the first word of "tic", so it can be a program name with args.
22265 set dummy tic; ac_word=$2
22266 echo "$as_me:22266: checking for $ac_word" >&5
22267 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22268 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22269   echo $ECHO_N "(cached) $ECHO_C" >&6
22270 else
22271   case $TIC_PATH in
22272   [\\/]* | ?:[\\/]*)
22273   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22274   ;;
22275   *)
22276   ac_save_IFS=$IFS; IFS=$ac_path_separator
22277 ac_dummy="$PATH:/usr/local/ncurses/bin"
22278 for ac_dir in $ac_dummy; do
22279   IFS=$ac_save_IFS
22280   test -z "$ac_dir" && ac_dir=.
22281   if $as_executable_p "$ac_dir/$ac_word"; then
22282    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22283    echo "$as_me:22283: found $ac_dir/$ac_word" >&5
22284    break
22285 fi
22286 done
22287
22288   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22289   ;;
22290 esac
22291 fi
22292 TIC_PATH=$ac_cv_path_TIC_PATH
22293
22294 if test -n "$TIC_PATH"; then
22295   echo "$as_me:22295: result: $TIC_PATH" >&5
22296 echo "${ECHO_T}$TIC_PATH" >&6
22297 else
22298   echo "$as_me:22298: result: no" >&5
22299 echo "${ECHO_T}no" >&6
22300 fi
22301
22302 if test -n "$FALLBACK_LIST"
22303 then
22304         if test "$TIC_PATH" = unknown
22305         then
22306                 { echo "$as_me:22306: WARNING: no tic program found for fallbacks" >&5
22307 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22308         fi
22309 fi
22310
22311 if test "x$cf_with_tests" != xno ; then
22312         MAKE_TESTS=
22313 else
22314         MAKE_TESTS="#"
22315 fi
22316
22317 ADAHTML_DIR=../../doc/html/ada
22318
22319 # these could be configurable, but are not currently
22320 PANEL_NAME=panel
22321 MENU_NAME=menu
22322 FORM_NAME=form
22323 CXX_NAME=ncurses++
22324
22325 # workaround for OS/2 (20151017)
22326 case $cf_cv_system_name in
22327 (os2*)
22328         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22329         ;;
22330 (*)
22331         LIBTOOL_OPTS_CXX=
22332         ;;
22333 esac
22334
22335 # workaround for g++ versus Solaris (20131116)
22336 case $cf_cv_system_name in
22337 (solaris2*)
22338         case "x$CPPFLAGS" in
22339         (*-D_XOPEN_SOURCE_EXTENDED*)
22340                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22341
22342 echo "${as_me:-configure}:22342: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22343
22344                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22345                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22346                 ;;
22347         esac
22348         ;;
22349 esac
22350
22351 # Help to automatically enable the extended curses features when using either
22352 # the *-config or the ".pc" files by adding defines.
22353 echo "$as_me:22353: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22354 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22355 PKG_CFLAGS=
22356 for cf_loop1 in $CPPFLAGS_after_XOPEN
22357 do
22358         cf_found=no
22359         for cf_loop2 in $CPPFLAGS_before_XOPEN
22360         do
22361                 if test "x$cf_loop1" = "x$cf_loop2"
22362                 then
22363                         cf_found=yes
22364                         break
22365                 fi
22366         done
22367         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22368 done
22369 echo "$as_me:22369: result: $PKG_CFLAGS" >&5
22370 echo "${ECHO_T}$PKG_CFLAGS" >&6
22371
22372 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22373 case "x$NCURSES_OSPEED" in
22374 (*short*)
22375         cf_compatible=1
22376         ;;
22377 (*)
22378         cf_compatible=0
22379         ;;
22380 esac
22381
22382 cat >>confdefs.h <<EOF
22383 #define NCURSES_OSPEED_COMPAT $cf_compatible
22384 EOF
22385
22386 case "x$cf_cv_typeof_chtype" in
22387 (xshort|xint|xlong)
22388         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22389         ;;
22390 esac
22391
22392 case "x$cf_cv_typeof_mmask_t" in
22393 (xshort|xint|xlong)
22394         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22395         ;;
22396 esac
22397
22398 # substitute into misc/Makefile to suppress
22399 # (un)install.data from the
22400 # (un)install rules.
22401 if test "x$cf_with_db_install" = "xno"; then
22402         MISC_INSTALL_DATA=
22403         MISC_UNINSTALL_DATA=
22404 else
22405         MISC_INSTALL_DATA=install.data
22406         MISC_UNINSTALL_DATA=uninstall.data
22407 fi
22408
22409 SUB_SCRIPTS=
22410
22411 if test -n "$PACKAGE"
22412 then
22413         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22414         export PACKAGE
22415         echo "package: $PACKAGE"
22416 fi
22417
22418 UNALTERED_SYMS=
22419 cf_filter_syms=no
22420
22421 if test -n "$RESULTING_SYMS"
22422 then
22423         cf_filter_syms=$cf_dft_filter_syms
22424         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22425
22426 echo "${as_me:-configure}:22426: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22427
22428 fi
22429
22430 if test "x$WILDCARD_SYMS" = xno
22431 then
22432         cf_filter_syms=yes
22433 fi
22434
22435 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22436 if test $cf_filter_syms = yes
22437 then
22438         RESULTING_SYMS=resulting.map
22439 fi
22440
22441 if test "x$cross_compiling" = xyes ; then
22442         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22443 else
22444         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22445 fi
22446
22447 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"
22448 ac_config_commands="$ac_config_commands default"
22449 cat >confcache <<\_ACEOF
22450 # This file is a shell script that caches the results of configure
22451 # tests run on this system so they can be shared between configure
22452 # scripts and configure runs, see configure's option --config-cache.
22453 # It is not useful on other systems.  If it contains results you don't
22454 # want to keep, you may remove or edit it.
22455 #
22456 # config.status only pays attention to the cache file if you give it
22457 # the --recheck option to rerun configure.
22458 #
22459 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22460 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22461 # following values.
22462
22463 _ACEOF
22464
22465 # The following way of writing the cache mishandles newlines in values,
22466 # but we know of no workaround that is simple, portable, and efficient.
22467 # So, don't put newlines in cache variables' values.
22468 # Ultrix sh set writes to stderr and can't be redirected directly,
22469 # and sets the high bit in the cache file unless we assign to the vars.
22470 {
22471   (set) 2>&1 |
22472     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22473     *ac_space=\ *)
22474       # `set' does not quote correctly, so add quotes (double-quote
22475       # substitution turns \\\\ into \\, and sed turns \\ into \).
22476       sed -n \
22477         "s/'/'\\\\''/g;
22478           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22479       ;;
22480     *)
22481       # `set' quotes correctly as required by POSIX, so do not add quotes.
22482       sed -n \
22483         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22484       ;;
22485     esac;
22486 } |
22487   sed '
22488      t clear
22489      : clear
22490      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22491      t end
22492      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22493      : end' >>confcache
22494 if cmp -s $cache_file confcache; then :; else
22495   if test -w $cache_file; then
22496     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22497     cat confcache >$cache_file
22498   else
22499     echo "not updating unwritable cache $cache_file"
22500   fi
22501 fi
22502 rm -f confcache
22503
22504 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22505 # Let make expand exec_prefix.
22506 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22507
22508 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22509 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22510 # trailing colons and then remove the whole line if VPATH becomes empty
22511 # (actually we leave an empty line to preserve line numbers).
22512 if test "x$srcdir" = x.; then
22513   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22514 s/:*\$(srcdir):*/:/;
22515 s/:*\${srcdir}:*/:/;
22516 s/:*@srcdir@:*/:/;
22517 s/^\([^=]*=[    ]*\):*/\1/;
22518 s/:*$//;
22519 s/^[^=]*=[      ]*$//;
22520 }'
22521 fi
22522
22523 DEFS=-DHAVE_CONFIG_H
22524
22525 : ${CONFIG_STATUS=./config.status}
22526 ac_clean_files_save=$ac_clean_files
22527 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22528 { echo "$as_me:22528: creating $CONFIG_STATUS" >&5
22529 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22530 cat >$CONFIG_STATUS <<_ACEOF
22531 #! $SHELL
22532 # Generated automatically by configure.
22533 # Run this file to recreate the current configuration.
22534 # Compiler output produced by configure, useful for debugging
22535 # configure, is in config.log if it exists.
22536
22537 debug=false
22538 SHELL=\${CONFIG_SHELL-$SHELL}
22539 ac_cs_invocation="\$0 \$@"
22540
22541 _ACEOF
22542
22543 cat >>$CONFIG_STATUS <<\_ACEOF
22544 # Be Bourne compatible
22545 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22546   emulate sh
22547   NULLCMD=:
22548 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22549   set -o posix
22550 fi
22551
22552 # Name of the executable.
22553 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22554
22555 if expr a : '\(a\)' >/dev/null 2>&1; then
22556   as_expr=expr
22557 else
22558   as_expr=false
22559 fi
22560
22561 rm -f conf$$ conf$$.exe conf$$.file
22562 echo >conf$$.file
22563 if ln -s conf$$.file conf$$ 2>/dev/null; then
22564   # We could just check for DJGPP; but this test a) works b) is more generic
22565   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22566   if test -f conf$$.exe; then
22567     # Don't use ln at all; we don't have any links
22568     as_ln_s='cp -p'
22569   else
22570     as_ln_s='ln -s'
22571   fi
22572 elif ln conf$$.file conf$$ 2>/dev/null; then
22573   as_ln_s=ln
22574 else
22575   as_ln_s='cp -p'
22576 fi
22577 rm -f conf$$ conf$$.exe conf$$.file
22578
22579 as_executable_p="test -f"
22580
22581 # Support unset when possible.
22582 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22583   as_unset=unset
22584 else
22585   as_unset=false
22586 fi
22587
22588 # NLS nuisances.
22589 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22590 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22591 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22592 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22593 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22594 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22595 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22596 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22597
22598 # IFS
22599 # We need space, tab and new line, in precisely that order.
22600 as_nl='
22601 '
22602 IFS="   $as_nl"
22603
22604 # CDPATH.
22605 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22606
22607 exec 6>&1
22608
22609 _ACEOF
22610
22611 # Files that config.status was made for.
22612 if test -n "$ac_config_files"; then
22613   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22614 fi
22615
22616 if test -n "$ac_config_headers"; then
22617   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22618 fi
22619
22620 if test -n "$ac_config_links"; then
22621   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22622 fi
22623
22624 if test -n "$ac_config_commands"; then
22625   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22626 fi
22627
22628 cat >>$CONFIG_STATUS <<\EOF
22629
22630 ac_cs_usage="\
22631 \`$as_me' instantiates files from templates according to the
22632 current configuration.
22633
22634 Usage: $0 [OPTIONS] [FILE]...
22635
22636   -h, --help       print this help, then exit
22637   -V, --version    print version number, then exit
22638   -d, --debug      don't remove temporary files
22639       --recheck    update $as_me by reconfiguring in the same conditions
22640   --file=FILE[:TEMPLATE]
22641                    instantiate the configuration file FILE
22642   --header=FILE[:TEMPLATE]
22643                    instantiate the configuration header FILE
22644
22645 Configuration files:
22646 $config_files
22647
22648 Configuration headers:
22649 $config_headers
22650
22651 Configuration commands:
22652 $config_commands
22653
22654 Report bugs to <dickey@invisible-island.net>."
22655 EOF
22656
22657 cat >>$CONFIG_STATUS <<EOF
22658 ac_cs_version="\\
22659 config.status
22660 configured by $0, generated by GNU Autoconf 2.52.20150926,
22661   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22662
22663 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22664 Free Software Foundation, Inc.
22665 This config.status script is free software; the Free Software Foundation
22666 gives unlimited permission to copy, distribute and modify it."
22667 srcdir=$srcdir
22668 INSTALL="$INSTALL"
22669 EOF
22670
22671 cat >>$CONFIG_STATUS <<\EOF
22672 # If no file are specified by the user, then we need to provide default
22673 # value.  By we need to know if files were specified by the user.
22674 ac_need_defaults=:
22675 while test $# != 0
22676 do
22677   case $1 in
22678   --*=*)
22679     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22680     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22681     shift
22682     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22683     shift
22684     ;;
22685   -*);;
22686   *) # This is not an option, so the user has probably given explicit
22687      # arguments.
22688      ac_need_defaults=false;;
22689   esac
22690
22691   case $1 in
22692   # Handling of the options.
22693 EOF
22694 cat >>$CONFIG_STATUS <<EOF
22695   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22696     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22697     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22698 EOF
22699 cat >>$CONFIG_STATUS <<\EOF
22700   --version | --vers* | -V )
22701     echo "$ac_cs_version"; exit 0 ;;
22702   --he | --h)
22703     # Conflict between --help and --header
22704     { { echo "$as_me:22704: error: ambiguous option: $1
22705 Try \`$0 --help' for more information." >&5
22706 echo "$as_me: error: ambiguous option: $1
22707 Try \`$0 --help' for more information." >&2;}
22708    { (exit 1); exit 1; }; };;
22709   --help | --hel | -h )
22710     echo "$ac_cs_usage"; exit 0 ;;
22711   --debug | --d* | -d )
22712     debug=: ;;
22713   --file | --fil | --fi | --f )
22714     shift
22715     CONFIG_FILES="$CONFIG_FILES $1"
22716     ac_need_defaults=false;;
22717   --header | --heade | --head | --hea )
22718     shift
22719     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22720     ac_need_defaults=false;;
22721
22722   # This is an error.
22723   -*) { { echo "$as_me:22723: error: unrecognized option: $1
22724 Try \`$0 --help' for more information." >&5
22725 echo "$as_me: error: unrecognized option: $1
22726 Try \`$0 --help' for more information." >&2;}
22727    { (exit 1); exit 1; }; } ;;
22728
22729   *) ac_config_targets="$ac_config_targets $1" ;;
22730
22731   esac
22732   shift
22733 done
22734
22735 exec 5>>config.log
22736 cat >&5 << _ACEOF
22737
22738 ## ----------------------- ##
22739 ## Running config.status.  ##
22740 ## ----------------------- ##
22741
22742 This file was extended by $as_me 2.52.20150926, executed with
22743   CONFIG_FILES    = $CONFIG_FILES
22744   CONFIG_HEADERS  = $CONFIG_HEADERS
22745   CONFIG_LINKS    = $CONFIG_LINKS
22746   CONFIG_COMMANDS = $CONFIG_COMMANDS
22747   > $ac_cs_invocation
22748 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22749
22750 _ACEOF
22751 EOF
22752
22753 cat >>$CONFIG_STATUS <<EOF
22754 #
22755 # INIT-COMMANDS section.
22756 #
22757
22758 ### Special initialization commands, used to pass information from the
22759 ### configuration-run into config.status
22760
22761 AWK="$AWK"
22762 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22763 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22764 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22765 ECHO_LD="$ECHO_LD"
22766 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22767 LDCONFIG="$LDCONFIG"
22768 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22769 LIB_NAME="$LIB_NAME"
22770 LIB_PREFIX="$LIB_PREFIX"
22771 LIB_SUBSETS="$LIB_SUBSETS"
22772 LIB_SUFFIX="$LIB_SUFFIX"
22773 LIB_TRACING="$LIB_TRACING"
22774 LN_S="$LN_S"
22775 MAKE_TERMINFO="$MAKE_TERMINFO"
22776 NCURSES_MAJOR="$NCURSES_MAJOR"
22777 NCURSES_MINOR="$NCURSES_MINOR"
22778 NCURSES_OSPEED="$NCURSES_OSPEED"
22779 NCURSES_PATCH="$NCURSES_PATCH"
22780 SRC_SUBDIRS="$SRC_SUBDIRS"
22781 TERMINFO="$TERMINFO"
22782 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22783 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22784 TICS_NAME="$TICS_NAME"
22785 TIC_PATH="$TIC_PATH"
22786 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22787 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22788 TINFO_NAME="$TINFO_NAME"
22789 TINFO_SUFFIX="$TINFO_SUFFIX"
22790 UNALTERED_SYMS="$UNALTERED_SYMS"
22791 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22792 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22793 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22794 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22795 WILDCARD_SYMS="$WILDCARD_SYMS"
22796 WITH_CURSES_H="$with_curses_h"
22797 WITH_ECHO="${enable_echo:=yes}"
22798 WITH_OVERWRITE="$with_overwrite"
22799 cf_LIST_MODELS="$cf_list_models"
22800 cf_cv_abi_version="$cf_cv_abi_version"
22801 cf_cv_do_relink="$cf_cv_do_relink"
22802 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22803 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22804 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22805 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22806 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22807 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22808 cf_cv_rel_version="$cf_cv_rel_version"
22809 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22810 cf_cv_shared_soname='$cf_cv_shared_soname'
22811 cf_cv_shlib_version="$cf_cv_shlib_version"
22812 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22813 cf_cv_system_name="$cf_cv_system_name"
22814 cf_cv_term_driver="$with_term_driver"
22815 cf_with_ada="$cf_with_ada"
22816 cf_with_cxx_binding="$cf_with_cxx_binding"
22817 cf_with_db_install="$cf_with_db_install"
22818 cf_with_manpages="$cf_with_manpages"
22819 cf_with_tests="$cf_with_tests"
22820 host="$host"
22821 target="$target"
22822 with_shared_cxx="$with_shared_cxx"
22823
22824 EOF
22825
22826 cat >>$CONFIG_STATUS <<\EOF
22827 for ac_config_target in $ac_config_targets
22828 do
22829   case "$ac_config_target" in
22830   # Handling of arguments.
22831   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22832   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22833   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22834   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22835   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22836   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22837   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22838   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22839   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22840   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22841   *) { { echo "$as_me:22841: error: invalid argument: $ac_config_target" >&5
22842 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22843    { (exit 1); exit 1; }; };;
22844   esac
22845 done
22846
22847 # If the user did not use the arguments to specify the items to instantiate,
22848 # then the envvar interface is used.  Set only those that are not.
22849 # We use the long form for the default assignment because of an extremely
22850 # bizarre bug on SunOS 4.1.3.
22851 if $ac_need_defaults; then
22852   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22853   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22854   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22855 fi
22856
22857 # Create a temporary directory, and hook for its removal unless debugging.
22858 $debug ||
22859 {
22860   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22861   trap '{ (exit 1); exit 1; }' 1 2 13 15
22862 }
22863
22864 # Create a (secure) tmp directory for tmp files.
22865 : ${TMPDIR=/tmp}
22866 {
22867   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22868   test -n "$tmp" && test -d "$tmp"
22869 }  ||
22870 {
22871   tmp=$TMPDIR/cs$$-$RANDOM
22872   (umask 077 && mkdir $tmp)
22873 } ||
22874 {
22875    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22876    { (exit 1); exit 1; }
22877 }
22878
22879 EOF
22880
22881 cat >>$CONFIG_STATUS <<EOF
22882
22883 #
22884 # CONFIG_FILES section.
22885 #
22886
22887 # No need to generate the scripts if there are no CONFIG_FILES.
22888 # This happens for instance when ./config.status config.h
22889 if test -n "\$CONFIG_FILES"; then
22890   # Protect against being on the right side of a sed subst in config.status.
22891   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22892    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22893 s,@SHELL@,$SHELL,;t t
22894 s,@exec_prefix@,$exec_prefix,;t t
22895 s,@prefix@,$prefix,;t t
22896 s,@program_transform_name@,$program_transform_name,;t t
22897 s,@bindir@,$bindir,;t t
22898 s,@sbindir@,$sbindir,;t t
22899 s,@libexecdir@,$libexecdir,;t t
22900 s,@datarootdir@,$datarootdir,;t t
22901 s,@datadir@,$datadir,;t t
22902 s,@sysconfdir@,$sysconfdir,;t t
22903 s,@sharedstatedir@,$sharedstatedir,;t t
22904 s,@localstatedir@,$localstatedir,;t t
22905 s,@libdir@,$libdir,;t t
22906 s,@includedir@,$includedir,;t t
22907 s,@oldincludedir@,$oldincludedir,;t t
22908 s,@infodir@,$infodir,;t t
22909 s,@mandir@,$mandir,;t t
22910 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22911 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22912 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22913 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22914 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22915 s,@build_alias@,$build_alias,;t t
22916 s,@host_alias@,$host_alias,;t t
22917 s,@target_alias@,$target_alias,;t t
22918 s,@ECHO_C@,$ECHO_C,;t t
22919 s,@ECHO_N@,$ECHO_N,;t t
22920 s,@ECHO_T@,$ECHO_T,;t t
22921 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22922 s,@DEFS@,$DEFS,;t t
22923 s,@LIBS@,$LIBS,;t t
22924 s,@top_builddir@,$top_builddir,;t t
22925 s,@EGREP@,$EGREP,;t t
22926 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22927 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22928 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22929 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22930 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22931 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22932 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22933 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22934 s,@VERSION@,$VERSION,;t t
22935 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22936 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22937 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22938 s,@PACKAGE@,$PACKAGE,;t t
22939 s,@build@,$build,;t t
22940 s,@build_cpu@,$build_cpu,;t t
22941 s,@build_vendor@,$build_vendor,;t t
22942 s,@build_os@,$build_os,;t t
22943 s,@host@,$host,;t t
22944 s,@host_cpu@,$host_cpu,;t t
22945 s,@host_vendor@,$host_vendor,;t t
22946 s,@host_os@,$host_os,;t t
22947 s,@target@,$target,;t t
22948 s,@target_cpu@,$target_cpu,;t t
22949 s,@target_vendor@,$target_vendor,;t t
22950 s,@target_os@,$target_os,;t t
22951 s,@CC@,$CC,;t t
22952 s,@CFLAGS@,$CFLAGS,;t t
22953 s,@LDFLAGS@,$LDFLAGS,;t t
22954 s,@CPPFLAGS@,$CPPFLAGS,;t t
22955 s,@ac_ct_CC@,$ac_ct_CC,;t t
22956 s,@EXEEXT@,$EXEEXT,;t t
22957 s,@OBJEXT@,$OBJEXT,;t t
22958 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22959 s,@CPP@,$CPP,;t t
22960 s,@LDCONFIG@,$LDCONFIG,;t t
22961 s,@CXX@,$CXX,;t t
22962 s,@CXXFLAGS@,$CXXFLAGS,;t t
22963 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22964 s,@AWK@,$AWK,;t t
22965 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22966 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22967 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22968 s,@LINT@,$LINT,;t t
22969 s,@LINT_OPTS@,$LINT_OPTS,;t t
22970 s,@LN_S@,$LN_S,;t t
22971 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22972 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22973 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22974 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22975 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22976 s,@SET_MAKE@,$SET_MAKE,;t t
22977 s,@CTAGS@,$CTAGS,;t t
22978 s,@ETAGS@,$ETAGS,;t t
22979 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22980 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22981 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22982 s,@RANLIB@,$RANLIB,;t t
22983 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22984 s,@LD@,$LD,;t t
22985 s,@ac_ct_LD@,$ac_ct_LD,;t t
22986 s,@AR@,$AR,;t t
22987 s,@ac_ct_AR@,$ac_ct_AR,;t t
22988 s,@NM@,$NM,;t t
22989 s,@ac_ct_NM@,$ac_ct_NM,;t t
22990 s,@ARFLAGS@,$ARFLAGS,;t t
22991 s,@DESTDIR@,$DESTDIR,;t t
22992 s,@BUILD_CC@,$BUILD_CC,;t t
22993 s,@BUILD_CPP@,$BUILD_CPP,;t t
22994 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22995 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22996 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22997 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22998 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22999 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23000 s,@cf_list_models@,$cf_list_models,;t t
23001 s,@ABI_VERSION@,$ABI_VERSION,;t t
23002 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23003 s,@LIBTOOL@,$LIBTOOL,;t t
23004 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23005 s,@LT_UNDEF@,$LT_UNDEF,;t t
23006 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23007 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23008 s,@LIB_CREATE@,$LIB_CREATE,;t t
23009 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23010 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23011 s,@LIB_PREP@,$LIB_PREP,;t t
23012 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23013 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23014 s,@LIB_LINK@,$LIB_LINK,;t t
23015 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23016 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23017 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23018 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23019 s,@TICS_NAME@,$TICS_NAME,;t t
23020 s,@TINFO_NAME@,$TINFO_NAME,;t t
23021 s,@LIB_NAME@,$LIB_NAME,;t t
23022 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23023 s,@CC_G_OPT@,$CC_G_OPT,;t t
23024 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23025 s,@LD_MODEL@,$LD_MODEL,;t t
23026 s,@shlibdir@,$shlibdir,;t t
23027 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23028 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23029 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23030 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23031 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23032 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23033 s,@LINK_PROGS@,$LINK_PROGS,;t t
23034 s,@LINK_TESTS@,$LINK_TESTS,;t t
23035 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23036 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23037 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23038 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23039 s,@RPATH_LIST@,$RPATH_LIST,;t t
23040 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23041 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23042 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23043 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23044 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23045 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23046 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23047 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23048 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23049 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23050 s,@XTERM_KBS@,$XTERM_KBS,;t t
23051 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23052 s,@TERMINFO@,$TERMINFO,;t t
23053 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23054 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23055 s,@TERMPATH@,$TERMPATH,;t t
23056 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23057 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23058 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23059 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23060 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23061 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23062 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23063 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23064 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23065 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23066 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23067 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23068 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23069 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23070 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23071 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23072 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23073 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23074 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23075 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23076 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23077 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23078 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23079 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23080 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23081 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23082 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23083 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23084 s,@PTHREAD@,$PTHREAD,;t t
23085 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23086 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23087 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23088 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23089 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23090 s,@ECHO_LT@,$ECHO_LT,;t t
23091 s,@ECHO_LD@,$ECHO_LD,;t t
23092 s,@RULE_CC@,$RULE_CC,;t t
23093 s,@SHOW_CC@,$SHOW_CC,;t t
23094 s,@ECHO_CC@,$ECHO_CC,;t t
23095 s,@ECHO_LINK@,$ECHO_LINK,;t t
23096 s,@ADAFLAGS@,$ADAFLAGS,;t t
23097 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23098 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23099 s,@ADA_TRACE@,$ADA_TRACE,;t t
23100 s,@MATH_LIB@,$MATH_LIB,;t t
23101 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23102 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23103 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23104 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23105 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23106 s,@TEST_LIBS@,$TEST_LIBS,;t t
23107 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23108 s,@CXXCPP@,$CXXCPP,;t t
23109 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23110 s,@CXX_AR@,$CXX_AR,;t t
23111 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23112 s,@CXXLIBS@,$CXXLIBS,;t t
23113 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23114 s,@gnat_exists@,$gnat_exists,;t t
23115 s,@M4_exists@,$M4_exists,;t t
23116 s,@cf_ada_make@,$cf_ada_make,;t t
23117 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23118 s,@cf_compile_generics@,$cf_compile_generics,;t t
23119 s,@cf_generic_objects@,$cf_generic_objects,;t t
23120 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23121 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23122 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23123 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23124 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23125 s,@cf_ada_package@,$cf_ada_package,;t t
23126 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23127 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23128 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23129 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23130 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23131 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23132 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23133 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23134 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23135 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23136 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23137 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23138 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23139 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23140 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23141 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23142 s,@TICS_LIBS@,$TICS_LIBS,;t t
23143 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23144 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23145 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23146 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23147 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23148 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23149 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23150 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23151 s,@includesubdir@,$includesubdir,;t t
23152 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23153 s,@TICS_LIST@,$TICS_LIST,;t t
23154 s,@TINFO_LIST@,$TINFO_LIST,;t t
23155 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23156 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23157 s,@TEST_ARGS@,$TEST_ARGS,;t t
23158 s,@TEST_DEPS@,$TEST_DEPS,;t t
23159 s,@TEST_ARG2@,$TEST_ARG2,;t t
23160 s,@TEST_DEP2@,$TEST_DEP2,;t t
23161 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23162 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23163 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23164 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23165 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23166 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23167 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23168 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23169 s,@cross_compiling@,$cross_compiling,;t t
23170 s,@TIC_PATH@,$TIC_PATH,;t t
23171 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23172 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23173 s,@PANEL_NAME@,$PANEL_NAME,;t t
23174 s,@MENU_NAME@,$MENU_NAME,;t t
23175 s,@FORM_NAME@,$FORM_NAME,;t t
23176 s,@CXX_NAME@,$CXX_NAME,;t t
23177 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23178 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23179 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23180 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23181 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23182 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23183 CEOF
23184
23185 EOF
23186
23187   cat >>$CONFIG_STATUS <<\EOF
23188   # Split the substitutions into bite-sized pieces for seds with
23189   # small command number limits, like on Digital OSF/1 and HP-UX.
23190   ac_max_sed_lines=48
23191   ac_sed_frag=1 # Number of current file.
23192   ac_beg=1 # First line for current file.
23193   ac_end=$ac_max_sed_lines # Line after last line for current file.
23194   ac_more_lines=:
23195   ac_sed_cmds=
23196   while $ac_more_lines; do
23197     if test $ac_beg -gt 1; then
23198       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23199     else
23200       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23201     fi
23202     if test ! -s $tmp/subs.frag; then
23203       ac_more_lines=false
23204     else
23205       # The purpose of the label and of the branching condition is to
23206       # speed up the sed processing (if there are no `@' at all, there
23207       # is no need to browse any of the substitutions).
23208       # These are the two extra sed commands mentioned above.
23209       (echo ':t
23210   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23211       # It is possible to make a multiline substitution using escaped newlines.
23212       # Ensure that we do not split the substitution between script fragments.
23213       ac_BEG=$ac_end
23214       ac_END=`expr $ac_end + $ac_max_sed_lines`
23215       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23216       if test -s $tmp/subs.next; then
23217         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23218         if test ! -s $tmp/subs.edit; then
23219           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23220           if test ! -s $tmp/subs.edit; then
23221             if test $ac_beg -gt 1; then
23222               ac_end=`expr $ac_end - 1`
23223               continue
23224             fi
23225           fi
23226         fi
23227       fi
23228
23229       if test -z "$ac_sed_cmds"; then
23230         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23231       else
23232         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23233       fi
23234       ac_sed_frag=`expr $ac_sed_frag + 1`
23235       ac_beg=$ac_end
23236       ac_end=`expr $ac_end + $ac_max_sed_lines`
23237     fi
23238   done
23239   if test -z "$ac_sed_cmds"; then
23240     ac_sed_cmds=cat
23241   fi
23242 fi # test -n "$CONFIG_FILES"
23243
23244 EOF
23245 cat >>$CONFIG_STATUS <<\EOF
23246 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23247   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23248   case $ac_file in
23249   - | *:- | *:-:* ) # input from stdin
23250         cat >$tmp/stdin
23251         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23252         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23253   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23254         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23255   * )   ac_file_in=$ac_file.in ;;
23256   esac
23257
23258   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23259   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23260          X"$ac_file" : 'X\(//\)[^/]' \| \
23261          X"$ac_file" : 'X\(//\)$' \| \
23262          X"$ac_file" : 'X\(/\)' \| \
23263          .     : '\(.\)' 2>/dev/null ||
23264 echo X"$ac_file" |
23265     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23266           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23267           /^X\(\/\/\)$/{ s//\1/; q; }
23268           /^X\(\/\).*/{ s//\1/; q; }
23269           s/.*/./; q'`
23270   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23271     { case "$ac_dir" in
23272   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23273   *)                      as_incr_dir=.;;
23274 esac
23275 as_dummy="$ac_dir"
23276 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23277   case $as_mkdir_dir in
23278     # Skip DOS drivespec
23279     ?:) as_incr_dir=$as_mkdir_dir ;;
23280     *)
23281       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23282       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23283     ;;
23284   esac
23285 done; }
23286
23287     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23288     # A "../" for each directory in $ac_dir_suffix.
23289     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23290   else
23291     ac_dir_suffix= ac_dots=
23292   fi
23293
23294   case $srcdir in
23295   .)  ac_srcdir=.
23296       if test -z "$ac_dots"; then
23297          ac_top_srcdir=.
23298       else
23299          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23300       fi ;;
23301   [\\/]* | ?:[\\/]* )
23302       ac_srcdir=$srcdir$ac_dir_suffix;
23303       ac_top_srcdir=$srcdir ;;
23304   *) # Relative path.
23305     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23306     ac_top_srcdir=$ac_dots$srcdir ;;
23307   esac
23308
23309   case $INSTALL in
23310   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23311   *) ac_INSTALL=$ac_dots$INSTALL ;;
23312   esac
23313
23314   if test x"$ac_file" != x-; then
23315     { echo "$as_me:23315: creating $ac_file" >&5
23316 echo "$as_me: creating $ac_file" >&6;}
23317     rm -f "$ac_file"
23318   fi
23319   # Let's still pretend it is `configure' which instantiates (i.e., don't
23320   # use $as_me), people would be surprised to read:
23321   #    /* config.h.  Generated automatically by config.status.  */
23322   configure_input="Generated automatically from `echo $ac_file_in |
23323                                                  sed 's,.*/,,'` by configure."
23324
23325   # First look for the input files in the build tree, otherwise in the
23326   # src tree.
23327   ac_file_inputs=`IFS=:
23328     for f in $ac_file_in; do
23329       case $f in
23330       -) echo $tmp/stdin ;;
23331       [\\/$]*)
23332          # Absolute (can't be DOS-style, as IFS=:)
23333          test -f "$f" || { { echo "$as_me:23333: error: cannot find input file: $f" >&5
23334 echo "$as_me: error: cannot find input file: $f" >&2;}
23335    { (exit 1); exit 1; }; }
23336          echo $f;;
23337       *) # Relative
23338          if test -f "$f"; then
23339            # Build tree
23340            echo $f
23341          elif test -f "$srcdir/$f"; then
23342            # Source tree
23343            echo $srcdir/$f
23344          else
23345            # /dev/null tree
23346            { { echo "$as_me:23346: error: cannot find input file: $f" >&5
23347 echo "$as_me: error: cannot find input file: $f" >&2;}
23348    { (exit 1); exit 1; }; }
23349          fi;;
23350       esac
23351     done` || { (exit 1); exit 1; }
23352 EOF
23353 cat >>$CONFIG_STATUS <<\EOF
23354   ac_warn_datarootdir=no
23355   if test x"$ac_file" != x-; then
23356     for ac_item in $ac_file_inputs
23357     do
23358       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23359       if test -n "$ac_seen"; then
23360         ac_used=`grep '@datarootdir@' $ac_item`
23361         if test -z "$ac_used"; then
23362           { echo "$as_me:23362: WARNING: datarootdir was used implicitly but not set:
23363 $ac_seen" >&5
23364 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23365 $ac_seen" >&2;}
23366           ac_warn_datarootdir=yes
23367         fi
23368       fi
23369       ac_seen=`grep '${datarootdir}' $ac_item`
23370       if test -n "$ac_seen"; then
23371         { echo "$as_me:23371: WARNING: datarootdir was used explicitly but not set:
23372 $ac_seen" >&5
23373 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23374 $ac_seen" >&2;}
23375         ac_warn_datarootdir=yes
23376       fi
23377     done
23378   fi
23379
23380 if test "x$ac_warn_datarootdir" = xyes; then
23381   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23382 fi
23383
23384 EOF
23385 cat >>$CONFIG_STATUS <<EOF
23386   sed "$ac_vpsub
23387 $extrasub
23388 EOF
23389 cat >>$CONFIG_STATUS <<\EOF
23390 :t
23391 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23392 s,@configure_input@,$configure_input,;t t
23393 s,@srcdir@,$ac_srcdir,;t t
23394 s,@top_srcdir@,$ac_top_srcdir,;t t
23395 s,@INSTALL@,$ac_INSTALL,;t t
23396 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23397   rm -f $tmp/stdin
23398   if test x"$ac_file" != x-; then
23399     cp $tmp/out $ac_file
23400
23401     for ac_name in prefix exec_prefix datarootdir
23402     do
23403         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23404         if test -n "$ac_seen"; then
23405             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23406             if test -z "$ac_init"; then
23407               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23408               { echo "$as_me:23408: WARNING: Variable $ac_name is used but was not set:
23409 $ac_seen" >&5
23410 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23411 $ac_seen" >&2;}
23412             fi
23413         fi
23414     done
23415     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23416     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23417     if test -s $tmp/out; then
23418       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23419       { echo "$as_me:23419: WARNING: Some variables may not be substituted:
23420 $ac_seen" >&5
23421 echo "$as_me: WARNING: Some variables may not be substituted:
23422 $ac_seen" >&2;}
23423     fi
23424   else
23425     cat $tmp/out
23426   fi
23427   rm -f $tmp/out
23428
23429 done
23430 EOF
23431 cat >>$CONFIG_STATUS <<\EOF
23432
23433 #
23434 # CONFIG_HEADER section.
23435 #
23436
23437 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23438 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23439 #
23440 # ac_d sets the value in "#define NAME VALUE" lines.
23441 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23442 ac_dB='[        ].*$,\1#\2'
23443 ac_dC=' '
23444 ac_dD=',;t'
23445 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23446 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23447 ac_iB='\([      ]\),\1#\2define\3'
23448 ac_iC=' '
23449 ac_iD='\4,;t'
23450 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23451 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23452 ac_uB='$,\1#\2define\3'
23453 ac_uC=' '
23454 ac_uD=',;t'
23455
23456 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23457   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23458   case $ac_file in
23459   - | *:- | *:-:* ) # input from stdin
23460         cat >$tmp/stdin
23461         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23462         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23463   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23464         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23465   * )   ac_file_in=$ac_file.in ;;
23466   esac
23467
23468   test x"$ac_file" != x- && { echo "$as_me:23468: creating $ac_file" >&5
23469 echo "$as_me: creating $ac_file" >&6;}
23470
23471   # First look for the input files in the build tree, otherwise in the
23472   # src tree.
23473   ac_file_inputs=`IFS=:
23474     for f in $ac_file_in; do
23475       case $f in
23476       -) echo $tmp/stdin ;;
23477       [\\/$]*)
23478          # Absolute (can't be DOS-style, as IFS=:)
23479          test -f "$f" || { { echo "$as_me:23479: error: cannot find input file: $f" >&5
23480 echo "$as_me: error: cannot find input file: $f" >&2;}
23481    { (exit 1); exit 1; }; }
23482          echo $f;;
23483       *) # Relative
23484          if test -f "$f"; then
23485            # Build tree
23486            echo $f
23487          elif test -f "$srcdir/$f"; then
23488            # Source tree
23489            echo $srcdir/$f
23490          else
23491            # /dev/null tree
23492            { { echo "$as_me:23492: error: cannot find input file: $f" >&5
23493 echo "$as_me: error: cannot find input file: $f" >&2;}
23494    { (exit 1); exit 1; }; }
23495          fi;;
23496       esac
23497     done` || { (exit 1); exit 1; }
23498   # Remove the trailing spaces.
23499   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23500
23501 EOF
23502
23503 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23504 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23505 # be either 'cat' or 'sort'.
23506 cat confdefs.h | uniq >conftest.vals
23507
23508 # Break up conftest.vals because some shells have a limit on
23509 # the size of here documents, and old seds have small limits too.
23510
23511 rm -f conftest.tail
23512 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23513 while grep . conftest.vals >/dev/null
23514 do
23515   # Write chunks of a limited-size here document to conftest.frag.
23516   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23517   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23518   echo 'CEOF' >> $CONFIG_STATUS
23519   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23520   rm -f conftest.vals
23521   mv conftest.tail conftest.vals
23522 done
23523 rm -f conftest.vals
23524
23525 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23526 # marker @DEFS@.
23527 echo '  cat >> conftest.edit <<CEOF
23528 /@DEFS@/r conftest.frag
23529 /@DEFS@/d
23530 CEOF
23531 sed -f conftest.edit $tmp/in > $tmp/out
23532 rm -f $tmp/in
23533 mv $tmp/out $tmp/in
23534 rm -f conftest.edit conftest.frag
23535 ' >> $CONFIG_STATUS
23536
23537 cat >>$CONFIG_STATUS <<\EOF
23538   # Let's still pretend it is `configure' which instantiates (i.e., don't
23539   # use $as_me), people would be surprised to read:
23540   #    /* config.h.  Generated automatically by config.status.  */
23541   if test x"$ac_file" = x-; then
23542     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23543   else
23544     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23545   fi
23546   cat $tmp/in >>$tmp/config.h
23547   rm -f $tmp/in
23548   if test x"$ac_file" != x-; then
23549     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23550       { echo "$as_me:23550: $ac_file is unchanged" >&5
23551 echo "$as_me: $ac_file is unchanged" >&6;}
23552     else
23553       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23554          X"$ac_file" : 'X\(//\)[^/]' \| \
23555          X"$ac_file" : 'X\(//\)$' \| \
23556          X"$ac_file" : 'X\(/\)' \| \
23557          .     : '\(.\)' 2>/dev/null ||
23558 echo X"$ac_file" |
23559     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23560           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23561           /^X\(\/\/\)$/{ s//\1/; q; }
23562           /^X\(\/\).*/{ s//\1/; q; }
23563           s/.*/./; q'`
23564       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23565         { case "$ac_dir" in
23566   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23567   *)                      as_incr_dir=.;;
23568 esac
23569 as_dummy="$ac_dir"
23570 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23571   case $as_mkdir_dir in
23572     # Skip DOS drivespec
23573     ?:) as_incr_dir=$as_mkdir_dir ;;
23574     *)
23575       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23576       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23577     ;;
23578   esac
23579 done; }
23580
23581       fi
23582       rm -f $ac_file
23583       mv $tmp/config.h $ac_file
23584     fi
23585   else
23586     cat $tmp/config.h
23587     rm -f $tmp/config.h
23588   fi
23589 done
23590 EOF
23591 cat >>$CONFIG_STATUS <<\EOF
23592 #
23593 # CONFIG_COMMANDS section.
23594 #
23595 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23596   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23597   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23598
23599   case $ac_dest in
23600     default )
23601 if test "x$cf_with_tests" != xno ; then
23602
23603 for cf_dir in test
23604 do
23605         if test ! -d $srcdir/$cf_dir; then
23606                 continue
23607         elif test -f $srcdir/$cf_dir/programs; then
23608                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23609         fi
23610 done
23611
23612 fi
23613
23614 cf_prefix=$LIB_PREFIX
23615
23616 case $cf_cv_shlib_version in
23617 (cygdll|msysdll|mingw)
23618         TINFO_NAME=$TINFO_ARG_SUFFIX
23619         TINFO_SUFFIX=.dll
23620         ;;
23621 esac
23622
23623 if test -n "$TINFO_SUFFIX" ; then
23624         case $TINFO_SUFFIX in
23625         (tw*)
23626                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23627                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23628                 ;;
23629         (t*)
23630                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23631                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23632                 ;;
23633         (w*)
23634                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23635                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23636                 ;;
23637         esac
23638 fi
23639
23640 for cf_dir in $SRC_SUBDIRS
23641 do
23642         if test ! -d $srcdir/$cf_dir ; then
23643                 continue
23644         elif test -f $srcdir/$cf_dir/modules; then
23645
23646                 SHARED_LIB=
23647                 Libs_To_Make=
23648
23649                 cf_awk_program="BEGIN { skip = 1; last=\"\"; }"
23650                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23651                 then
23652                         cf_awk_program="$cf_awk_program\
23653 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
23654 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
23655 "
23656                 fi
23657
23658                 if test "x$WILDCARD_SYMS" = xno
23659                 then
23660                         cf_awk_program="$cf_awk_program\
23661 /[      ]_\\*;/ { skip=1; next; }\
23662 "
23663                 fi
23664
23665                 if test "x$cf_awk_program" != "x"
23666                 then
23667                         cat >>$cf_dir/Makefile <<CF_EOF
23668
23669 # Generated by CF_LIB_RULES
23670 resulting.map: $UNALTERED_SYMS
23671         $AWK '$cf_awk_program \
23672 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
23673  skip = 0; last = \$\$0; } \
23674 END { print last; }' < $UNALTERED_SYMS >\$@
23675
23676 distclean::
23677         rm -f resulting.map
23678 CF_EOF
23679                 fi
23680
23681                 for cf_item in $cf_LIST_MODELS
23682                 do
23683
23684         case X$cf_item in
23685         (Xlibtool)
23686                 cf_suffix='.la'
23687                 cf_depsuf=$cf_suffix
23688                 ;;
23689         (Xdebug)
23690                 cf_suffix='_g.a'
23691                 cf_depsuf=$cf_suffix
23692                 ;;
23693         (Xprofile)
23694                 cf_suffix='_p.a'
23695                 cf_depsuf=$cf_suffix
23696                 ;;
23697         (Xshared)
23698                 case $cf_cv_system_name in
23699                 (aix[5-7]*)
23700                         cf_suffix='.so'
23701                         cf_depsuf=$cf_suffix
23702                         ;;
23703                 (cygwin*|msys*|mingw*)
23704                         cf_suffix='.dll'
23705                         cf_depsuf='.dll.a'
23706                         ;;
23707                 (darwin*)
23708                         cf_suffix='.dylib'
23709                         cf_depsuf=$cf_suffix
23710                         ;;
23711                 (hpux*)
23712                         case $target in
23713                         (ia64*)
23714                                 cf_suffix='.so'
23715                                 cf_depsuf=$cf_suffix
23716                                 ;;
23717                         (*)
23718                                 cf_suffix='.sl'
23719                                 cf_depsuf=$cf_suffix
23720                                 ;;
23721                         esac
23722                         ;;
23723                 (*)
23724                         cf_suffix='.so'
23725                         cf_depsuf=$cf_suffix
23726                         ;;
23727                 esac
23728                 ;;
23729         (*)
23730                 cf_suffix='.a'
23731                 cf_depsuf=$cf_suffix
23732                 ;;
23733         esac
23734         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23735         then
23736                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23737                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23738         fi
23739
23740                         cf_libname=$cf_dir
23741                         test "$cf_dir" = c++ && cf_libname=ncurses++
23742                         if test $cf_item = shared ; then
23743                                 if test -n "${LIB_SUFFIX}"
23744                                 then
23745                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23746                                 else
23747                                         cf_shared_suffix="$cf_suffix"
23748                                 fi
23749                                 if test "$cf_cv_do_symlinks" = yes ; then
23750                                         cf_version_name=
23751
23752                                         case "$cf_cv_shlib_version" in
23753                                         (rel)
23754                                                 cf_version_name=REL_VERSION
23755                                                 ;;
23756                                         (abi)
23757                                                 cf_version_name=ABI_VERSION
23758                                                 ;;
23759                                         esac
23760
23761                                         if test -n "$cf_version_name"
23762                                         then
23763                                                 case "$cf_cv_system_name" in
23764                                                 (darwin*)
23765                                                         # "w", etc?
23766                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23767                                                         ;;
23768                                                 (*)
23769                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23770                                                         ;;
23771                                                 esac
23772                                         fi
23773                                         if test -n "${USE_LIB_SUFFIX}"
23774                                         then
23775                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23776                                         else
23777                                                 cf_shared_suffix="$cf_suffix"
23778                                         fi
23779                                 fi
23780                                 # cygwin needs import library, and has unique naming convention
23781                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23782                                 # use 'cyg' prefix for shared lib.
23783                                 case $cf_cv_shlib_version in
23784                                 (cygdll)
23785                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23786                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23787                                         ;;
23788                                 (msysdll)
23789                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23790                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23791                                         ;;
23792                                 (mingw)
23793                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23794                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23795                                         ;;
23796                                 (*)
23797                                         cf_add_lib=
23798                                         ;;
23799                                 esac
23800                                 if test -n "$cf_add_lib"
23801                                 then
23802                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23803                                         continue
23804                                 fi
23805                         fi
23806                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23807                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23808                 done
23809
23810                 if test $cf_dir = ncurses ; then
23811                         cf_subsets="$LIB_SUBSETS"
23812                         cf_r_parts="$cf_subsets"
23813                         cf_liblist="$Libs_To_Make"
23814
23815                         while test -n "$cf_r_parts"
23816                         do
23817                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23818                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23819                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23820                                         cf_add_lib=
23821                                         case $cf_l_parts in
23822                                         (*termlib*)
23823                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23824                                                 ;;
23825                                         (*ticlib*)
23826                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23827                                                 ;;
23828                                         (*)
23829                                                 break
23830                                                 ;;
23831                                         esac
23832                                         if test -n "$cf_add_lib"; then
23833                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23834                                         fi
23835                                 else
23836                                         break
23837                                 fi
23838                         done
23839                 else
23840                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23841                 fi
23842
23843                 if test $cf_dir = c++; then
23844                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23845                                 cf_list=
23846                                 for cf_item in $Libs_To_Make
23847                                 do
23848                                         case $cf_item in
23849                                         (*.a)
23850                                                 ;;
23851                                         (*)
23852                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23853                                                 ;;
23854                                         esac
23855                                         for cf_test in $cf_list
23856                                         do
23857                                                 if test "$cf_test" = "$cf_item"
23858                                                 then
23859                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23860                                                         cf_item=
23861                                                         break
23862                                                 fi
23863                                         done
23864                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23865                                 done
23866                                 Libs_To_Make="$cf_list"
23867                         fi
23868                 fi
23869
23870                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23871                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23872                         $cf_dir/Makefile >$cf_dir/Makefile.out
23873                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23874
23875                 $AWK -f $srcdir/mk-0th.awk \
23876                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23877                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23878
23879                 for cf_subset in $cf_subsets
23880                 do
23881                         cf_subdirs=
23882                         for cf_item in $cf_LIST_MODELS
23883                         do
23884
23885                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23886
23887 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23888
23889                         CXX_MODEL=$cf_ITEM
23890                         if test "$CXX_MODEL" = SHARED; then
23891                                 case $cf_cv_shlib_version in
23892                                 (cygdll|msysdll|mingw)
23893                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23894
23895 echo "${as_me:-configure}:23895: testing overriding CXX_MODEL to SHARED ..." 1>&5
23896
23897                                         with_shared_cxx=yes
23898                                         ;;
23899                                 (*)
23900                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23901                                         ;;
23902                                 esac
23903                         fi
23904
23905         case X$cf_item in
23906         (Xlibtool)
23907                 cf_suffix='.la'
23908                 cf_depsuf=$cf_suffix
23909                 ;;
23910         (Xdebug)
23911                 cf_suffix='_g.a'
23912                 cf_depsuf=$cf_suffix
23913                 ;;
23914         (Xprofile)
23915                 cf_suffix='_p.a'
23916                 cf_depsuf=$cf_suffix
23917                 ;;
23918         (Xshared)
23919                 case $cf_cv_system_name in
23920                 (aix[5-7]*)
23921                         cf_suffix='.so'
23922                         cf_depsuf=$cf_suffix
23923                         ;;
23924                 (cygwin*|msys*|mingw*)
23925                         cf_suffix='.dll'
23926                         cf_depsuf='.dll.a'
23927                         ;;
23928                 (darwin*)
23929                         cf_suffix='.dylib'
23930                         cf_depsuf=$cf_suffix
23931                         ;;
23932                 (hpux*)
23933                         case $target in
23934                         (ia64*)
23935                                 cf_suffix='.so'
23936                                 cf_depsuf=$cf_suffix
23937                                 ;;
23938                         (*)
23939                                 cf_suffix='.sl'
23940                                 cf_depsuf=$cf_suffix
23941                                 ;;
23942                         esac
23943                         ;;
23944                 (*)
23945                         cf_suffix='.so'
23946                         cf_depsuf=$cf_suffix
23947                         ;;
23948                 esac
23949                 ;;
23950         (*)
23951                 cf_suffix='.a'
23952                 cf_depsuf=$cf_suffix
23953                 ;;
23954         esac
23955         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23956         then
23957                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23958                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23959         fi
23960
23961         case $cf_item in
23962         (libtool) cf_subdir='obj_lo'  ;;
23963         (normal)  cf_subdir='objects' ;;
23964         (debug)   cf_subdir='obj_g' ;;
23965         (profile) cf_subdir='obj_p' ;;
23966         (shared)
23967                 case $cf_cv_system_name in
23968                 (cygwin|msys)
23969                         cf_subdir='objects' ;;
23970                 (*)
23971                         cf_subdir='obj_s' ;;
23972                 esac
23973         esac
23974
23975                         # Test for case where we build libtinfo with a different name.
23976                         cf_libname=$cf_dir
23977                         if test $cf_dir = ncurses ; then
23978                                 case $cf_subset in
23979                                 (*base*)
23980                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
23981                                         ;;
23982                                 (*termlib*)
23983                                         cf_libname=$TINFO_LIB_SUFFIX
23984                                         ;;
23985                                 (ticlib*)
23986                                         cf_libname=$TICS_LIB_SUFFIX
23987                                         ;;
23988                                 esac
23989                         elif test $cf_dir = c++ ; then
23990                                 cf_libname=ncurses++$USE_LIB_SUFFIX
23991                         else
23992                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23993                         fi
23994                         if test -n "${USE_ARG_SUFFIX}" ; then
23995                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23996                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23997                         fi
23998
23999                         # These dependencies really are for development, not
24000                         # builds, but they are useful in porting, too.
24001                         cf_depend="../include/ncurses_cfg.h"
24002                         if test "$srcdir" = "."; then
24003                                 cf_reldir="."
24004                         else
24005                                 cf_reldir="\${srcdir}"
24006                         fi
24007
24008                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24009                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24010                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24011                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24012                         fi
24013
24014                         cf_dir_suffix=
24015                         old_cf_suffix="$cf_suffix"
24016                         if test "$cf_cv_shlib_version_infix" = yes ; then
24017                         if test -n "$USE_LIB_SUFFIX" ; then
24018                                 case $USE_LIB_SUFFIX in
24019                                 (tw*)
24020                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24021                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24022                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24023                                         ;;
24024                                 (t*)
24025                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24026                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24027                                         cf_dir_suffix=t$EXTRA_SUFFIX
24028                                         ;;
24029                                 (w*)
24030                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24031                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24032                                         cf_dir_suffix=w$EXTRA_SUFFIX
24033                                         ;;
24034                                 (*)
24035                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24036                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24037                                         cf_dir_suffix=$EXTRA_SUFFIX
24038                                         ;;
24039                                 esac
24040                         fi
24041                         fi
24042
24043                         $AWK -f $srcdir/mk-1st.awk \
24044                                 name=${cf_libname}${cf_dir_suffix} \
24045                                 traces=$LIB_TRACING \
24046                                 MODEL=$cf_ITEM \
24047                                 CXX_MODEL=$CXX_MODEL \
24048                                 model=$cf_subdir \
24049                                 prefix=$cf_prefix \
24050                                 suffix=$cf_suffix \
24051                                 subset=$cf_subset \
24052                                 driver=$cf_cv_term_driver \
24053                                 SymLink="$LN_S" \
24054                                 TermlibRoot=$TINFO_NAME \
24055                                 TermlibSuffix=$TINFO_SUFFIX \
24056                                 ShlibVer=$cf_cv_shlib_version \
24057                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24058                                 ReLink=${cf_cv_do_relink:-no} \
24059                                 DoLinks=$cf_cv_do_symlinks \
24060                                 rmSoLocs=$cf_cv_rm_so_locs \
24061                                 ldconfig="$LDCONFIG" \
24062                                 overwrite=$WITH_OVERWRITE \
24063                                 depend="$cf_depend" \
24064                                 host="$host" \
24065                                 libtool_version="$LIBTOOL_VERSION" \
24066                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24067
24068                         cf_suffix="$old_cf_suffix"
24069
24070                         for cf_subdir2 in $cf_subdirs lib
24071                         do
24072                                 test $cf_subdir = $cf_subdir2 && break
24073                         done
24074                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24075                         $AWK -f $srcdir/mk-2nd.awk \
24076                                 name=$cf_dir \
24077                                 traces=$LIB_TRACING \
24078                                 MODEL=$cf_ITEM \
24079                                 model=$cf_subdir \
24080                                 subset=$cf_subset \
24081                                 srcdir=$srcdir \
24082                                 echo=$WITH_ECHO \
24083                                 crenames=$cf_cv_prog_CC_c_o \
24084                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24085                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24086                         cf_subdirs="$cf_subdirs $cf_subdir"
24087                         done
24088                 done
24089         fi
24090
24091         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24092 done
24093
24094 for cf_dir in $SRC_SUBDIRS
24095 do
24096         if test ! -d $srcdir/$cf_dir ; then
24097                 continue
24098         fi
24099
24100         if test -f $cf_dir/Makefile ; then
24101                 case "$cf_dir" in
24102                 (Ada95)
24103                         echo 'libs \' >> Makefile
24104                         echo 'install.libs \' >> Makefile
24105                         echo 'uninstall.libs ::' >> Makefile
24106                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24107                         ;;
24108                 esac
24109         fi
24110
24111         if test -f $srcdir/$cf_dir/modules; then
24112                 echo >> Makefile
24113                 if test -f $srcdir/$cf_dir/headers; then
24114 cat >> Makefile <<CF_EOF
24115 install.includes \\
24116 uninstall.includes \\
24117 CF_EOF
24118                 fi
24119 if test "$cf_dir" != "c++" ; then
24120 echo 'lint \' >> Makefile
24121 fi
24122 cat >> Makefile <<CF_EOF
24123 libs \\
24124 lintlib \\
24125 install.libs \\
24126 uninstall.libs \\
24127 install.$cf_dir \\
24128 uninstall.$cf_dir ::
24129         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24130 CF_EOF
24131         elif test -f $srcdir/$cf_dir/headers; then
24132 cat >> Makefile <<CF_EOF
24133
24134 libs \\
24135 install.libs \\
24136 uninstall.libs \\
24137 install.includes \\
24138 uninstall.includes ::
24139         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24140 CF_EOF
24141 fi
24142 done
24143
24144 if test "x$cf_with_db_install" = xyes; then
24145 cat >> Makefile <<CF_EOF
24146
24147 install.libs uninstall.libs \\
24148 install.data uninstall.data ::
24149 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24150 CF_EOF
24151 else
24152 cat >> Makefile <<CF_EOF
24153
24154 install.libs uninstall.libs ::
24155         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24156 CF_EOF
24157 fi
24158
24159 if test "x$cf_with_manpages" = xyes; then
24160 cat >> Makefile <<CF_EOF
24161
24162 install.man \\
24163 uninstall.man ::
24164         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24165 CF_EOF
24166 fi
24167
24168 cat >> Makefile <<CF_EOF
24169
24170 distclean ::
24171         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24172         rm -f headers.sh headers.sed mk_shared_lib.sh
24173         rm -f edit_man.* man_alias.*
24174         rm -rf \${DIRS_TO_MAKE}
24175 CF_EOF
24176
24177 # Special case: tack's manpage lives in its own directory.
24178 if test "x$cf_with_manpages" = xyes; then
24179 if test -d tack ; then
24180 if test -f $srcdir/$tack.h; then
24181 cat >> Makefile <<CF_EOF
24182
24183 install.man \\
24184 uninstall.man ::
24185         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24186 CF_EOF
24187 fi
24188 fi
24189 fi
24190
24191 rm -f headers.sed headers.sh
24192
24193 echo creating headers.sh
24194 cat >headers.sh <<CF_EOF
24195 #! $SHELL
24196 # This shell script is generated by the 'configure' script.  It is invoked in a
24197 # subdirectory of the build tree.  It generates a sed-script in the parent
24198 # directory that is used to adjust includes for header files that reside in a
24199 # subdirectory of /usr/include, etc.
24200 PRG=""
24201 while test \$# != 3
24202 do
24203 PRG="\$PRG \$1"; shift
24204 done
24205 DST=\$1
24206 REF=\$2
24207 SRC=\$3
24208 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24209 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24210 echo installing \$SRC in \$DST
24211 CF_EOF
24212
24213 if test $WITH_CURSES_H = yes; then
24214         cat >>headers.sh <<CF_EOF
24215 case \$DST in
24216 (/*/include/*)
24217         END=\`basename \$DST\`
24218         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24219         do
24220                 NAME=\`basename \$i\`
24221                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24222         done
24223         ;;
24224 (*)
24225         echo "" >> \$TMPSED
24226         ;;
24227 esac
24228 CF_EOF
24229
24230 else
24231         cat >>headers.sh <<CF_EOF
24232 case \$DST in
24233 (/*/include/*)
24234         END=\`basename \$DST\`
24235         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24236         do
24237                 NAME=\`basename \$i\`
24238                 if test "\$NAME" = "curses.h"
24239                 then
24240                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24241                         NAME=ncurses.h
24242                 fi
24243                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24244         done
24245         ;;
24246 (*)
24247         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24248         ;;
24249 esac
24250 CF_EOF
24251 fi
24252 cat >>headers.sh <<CF_EOF
24253 rm -f \$TMPSRC
24254 sed -f \$TMPSED \$SRC > \$TMPSRC
24255 NAME=\`basename \$SRC\`
24256 CF_EOF
24257 if test $WITH_CURSES_H != yes; then
24258         cat >>headers.sh <<CF_EOF
24259 test "\$NAME" = "curses.h" && NAME=ncurses.h
24260 CF_EOF
24261 fi
24262 cat >>headers.sh <<CF_EOF
24263 # Just in case someone gzip'd manpages, remove the conflicting copy.
24264 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24265
24266 eval \$PRG \$TMPSRC \$DST/\$NAME
24267 rm -f \$TMPSRC \$TMPSED
24268 CF_EOF
24269
24270 chmod 0755 headers.sh
24271
24272 for cf_dir in $SRC_SUBDIRS
24273 do
24274         if test ! -d $srcdir/$cf_dir ; then
24275                 continue
24276         fi
24277
24278         if test -f $srcdir/$cf_dir/headers; then
24279                 $AWK -f $srcdir/mk-hdr.awk \
24280                         subset="$LIB_SUBSETS" \
24281                         compat="$WITH_CURSES_H" \
24282                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24283         fi
24284
24285         if test -f $srcdir/$cf_dir/modules; then
24286                 if test "$cf_dir" != "c++" ; then
24287                         cat >>$cf_dir/Makefile <<"CF_EOF"
24288 depend : ${AUTO_SRC}
24289         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24290
24291 # DO NOT DELETE THIS LINE -- make depend depends on it.
24292 CF_EOF
24293                 fi
24294         fi
24295 done
24296
24297 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24298 if test -z "$USE_OLD_MAKERULES" ; then
24299         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24300 fi
24301 fi
24302  ;;
24303   esac
24304 done
24305 EOF
24306
24307 cat >>$CONFIG_STATUS <<\EOF
24308
24309 { (exit 0); exit 0; }
24310 EOF
24311 chmod +x $CONFIG_STATUS
24312 ac_clean_files=$ac_clean_files_save
24313
24314 # configure is writing to config.log, and then calls config.status.
24315 # config.status does its own redirection, appending to config.log.
24316 # Unfortunately, on DOS this fails, as config.log is still kept open
24317 # by configure, so config.status won't be able to write to it; its
24318 # output is simply discarded.  So we exec the FD to /dev/null,
24319 # effectively closing config.log, so it can be properly (re)opened and
24320 # appended to by config.status.  When coming back to configure, we
24321 # need to make the FD available again.
24322 if test "$no_create" != yes; then
24323   ac_cs_success=:
24324   exec 5>/dev/null
24325   $SHELL $CONFIG_STATUS || ac_cs_success=false
24326   exec 5>>config.log
24327   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24328   # would make configure fail if this is the last instruction.
24329   $ac_cs_success || { (exit 1); exit 1; }
24330 fi
24331 ${MAKE:-make} preinstall