]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20111224
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.534 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
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 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
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     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-tests         suppress build with test-programs
703   --without-curses-h      install curses.h as ncurses.h only
704   --with-pkg-config{=path} enable/disable use of pkg-config
705   --with-pkg-config-libdir=XXX use given directory for installing pc-files
706   --enable-pc-files       generate and install .pc files for pkg-config
707   --enable-mixed-case     tic should assume mixed-case filenames
708   --with-install-prefix   prefixes actual install-location ($DESTDIR)
709 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
710   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
711   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
712   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
713   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
714   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
715   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
716 Options to Specify the Libraries Built/Used:
717   --disable-libtool-version  enable to use libtool's incompatible naming scheme
718   --with-libtool          generate libraries with libtool
719   --with-shared           generate shared-libraries
720   --with-normal           generate normal-libraries (default)
721   --with-debug            generate debug-libraries (default)
722   --with-profile          generate profile-libraries
723   --with-termlib          generate separate terminfo library
724   --with-ticlib           generate separate tic library
725   --with-gpm              use Alessandro Rubini's GPM library
726   --without-dlsym         do not use dlsym() to load GPM dynamically
727   --with-sysmouse         use sysmouse (FreeBSD console)
728   --enable-rpath          use rpath option when generating shared libraries
729   --disable-relink        relink shared libraries during install
730   --with-shlib-version=X  Specify rel or abi version for shared libs
731   --disable-rpath-hack    don't add rpath options for additional libraries
732 Fine-Tuning Your Configuration:
733   --disable-overwrite     leave out the link to -lcurses
734   --disable-database      do not use terminfo, only fallbacks/termcap
735   --with-database=XXX     specify terminfo source to install
736   --with-hashed-db        specify hashed-database library
737   --with-fallbacks=XXX    specify list of fallback terminal descriptions
738   --without-xterm-new     specify if xterm terminfo should be old version
739   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
740   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
741   --disable-big-core      assume machine has little memory
742   --disable-big-strings   assume compiler has only standard-size strings
743   --enable-termcap        compile in termcap fallback support
744   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
745   --enable-getcap         fast termcap load, no xrefs to terminfo
746   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
747   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
748   --disable-root-environ  restrict environment when running as root
749   --enable-symlinks       make tic use symbolic links not hard links
750   --enable-broken_linker  compile with broken-linker support code
751   --enable-bsdpad         recognize BSD-style prefix padding
752   --enable-widec          compile with wide-char/UTF-8 code
753   --disable-lp64          allow chtype to be long (ignore _LP64)
754   --disable-largefile     omit support for large files
755   --disable-tparm-varargs compile tparm() without varargs interface
756   --disable-tic-depends   link tic library without explicit dependency on ncurses library
757   --with-bool=TYPE        override fallback type of bool variable
758   --with-caps=alt         compile with alternate Caps file
759   --with-chtype=TYPE      override type of chtype
760   --with-ospeed=TYPE      override type of ospeed variable
761   --with-mmask-t=TYPE     override type of mmask_t
762   --with-ccharw-max=XXX   override size CCHARW_MAX
763   --with-rcs-ids          compile-in RCS identifiers
764 Options to Specify How Manpages are Installed:
765   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
766                           optionally formatted/catonly, e.g., gzip,formatted
767   --with-manpage-renames  specify manpage-renaming
768   --with-manpage-aliases  specify manpage-aliases using .so
769   --with-manpage-symlinks specify manpage-aliases using symlinks
770   --with-manpage-tbl      specify manpage processing with tbl
771 Extensions:
772   --disable-ext-funcs     disable function-extensions
773   --enable-sp-funcs       enable experimental SCREEN-extensions
774   --enable-term-driver    enable experimental terminal-driver
775   --enable-const          compile with extra/non-standard const
776   --enable-ext-colors     compile for 256-color support
777   --enable-ext-mouse      compile for extended mouse-encoding
778   --enable-no-padding     compile with $NCURSES_NO_PADDING code
779   --enable-signed-char    compile using signed Boolean's in term.h
780   --enable-sigwinch       compile with SIGWINCH handler
781   --enable-tcap-names     compile with user-definable terminal capabilities
782 Development Code:
783   --without-develop       disable development options
784   --enable-hard-tabs      compile with hard-tabs code
785   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
786 Experimental Code:
787   --disable-assumed-color do not assume anything about default-colors
788   --disable-hashmap       compile without hashmap scrolling-optimization
789   --enable-colorfgbg      compile-in experimental $COLORFGBG code
790   --enable-interop        compile-in experimental interop bindings
791   --with-pthread          use POSIX thread library
792   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
793   --enable-weak-symbols   enable weak-symbols for pthreads
794   --enable-reentrant      compile with experimental reentrant code
795   --with-wrap-prefix=XXX  override prefix used for public variables
796   --enable-safe-sprintf   compile with experimental safe-sprintf code
797   --disable-scroll-hints  compile without scroll-hints code
798   --enable-wgetch-events  compile with experimental wgetch-events code
799 Testing/development Options:
800   --enable-echo           build: display "compiling" commands (default)
801   --enable-warnings       build: turn on GCC compiler warnings
802   --enable-assertions     test: turn on generation of assertion code
803   --with-dmalloc          test: use Gray Watson's dmalloc library
804   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
805   --with-valgrind         test: use valgrind
806   --disable-leaks         test: free permanent memory, analyze leaks
807   --enable-expanded       test: generate functions for certain macros
808   --disable-macros        test: use functions rather than macros
809   --with-trace            test: add trace() function to all models of ncurses
810 Ada95 Binding Options:
811   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
812   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
813   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
814   --with-ada-sharedlib=XX build Ada95 shared-library
815
816 Some influential environment variables:
817   CC          C compiler command
818   CFLAGS      C compiler flags
819   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
820               nonstandard directory <lib dir>
821   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
822               headers in a nonstandard directory <include dir>
823   CPP         C preprocessor
824   CXX         C++ compiler command
825   CXXFLAGS    C++ compiler flags
826   CXXCPP      C++ preprocessor
827
828 Use these variables to override the choices made by `configure' or to help
829 it to find libraries and programs with nonstandard names/locations.
830
831 EOF
832 fi
833
834 if test "$ac_init_help" = "recursive"; then
835   # If there are subdirs, report their specific --help.
836   ac_popdir=`pwd`
837   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
838     cd $ac_subdir
839     # A "../" for each directory in /$ac_subdir.
840     ac_dots=`echo $ac_subdir |
841              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
842
843     case $srcdir in
844     .) # No --srcdir option.  We are building in place.
845       ac_sub_srcdir=$srcdir ;;
846     [\\/]* | ?:[\\/]* ) # Absolute path.
847       ac_sub_srcdir=$srcdir/$ac_subdir ;;
848     *) # Relative path.
849       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
850     esac
851
852     # Check for guested configure; otherwise get Cygnus style configure.
853     if test -f $ac_sub_srcdir/configure.gnu; then
854       echo
855       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
856     elif test -f $ac_sub_srcdir/configure; then
857       echo
858       $SHELL $ac_sub_srcdir/configure  --help=recursive
859     elif test -f $ac_sub_srcdir/configure.ac ||
860            test -f $ac_sub_srcdir/configure.in; then
861       echo
862       $ac_configure --help
863     else
864       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
865     fi
866     cd $ac_popdir
867   done
868 fi
869
870 test -n "$ac_init_help" && exit 0
871 if $ac_init_version; then
872   cat <<\EOF
873
874 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
875 Free Software Foundation, Inc.
876 This configure script is free software; the Free Software Foundation
877 gives unlimited permission to copy, distribute and modify it.
878 EOF
879   exit 0
880 fi
881 exec 5>config.log
882 cat >&5 <<EOF
883 This file contains any messages produced by compilers while
884 running configure, to aid debugging if configure makes a mistake.
885
886 It was created by $as_me, which was
887 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
888
889   $ $0 $@
890
891 EOF
892 {
893 cat <<_ASUNAME
894 ## ---------- ##
895 ## Platform.  ##
896 ## ---------- ##
897
898 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
899 uname -m = `(uname -m) 2>/dev/null || echo unknown`
900 uname -r = `(uname -r) 2>/dev/null || echo unknown`
901 uname -s = `(uname -s) 2>/dev/null || echo unknown`
902 uname -v = `(uname -v) 2>/dev/null || echo unknown`
903
904 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
905 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
906
907 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
908 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
909 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
910 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
911 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
912 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
913 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
914
915 PATH = $PATH
916
917 _ASUNAME
918 } >&5
919
920 cat >&5 <<EOF
921 ## ------------ ##
922 ## Core tests.  ##
923 ## ------------ ##
924
925 EOF
926
927 # Keep a trace of the command line.
928 # Strip out --no-create and --no-recursion so they do not pile up.
929 # Also quote any args containing shell meta-characters.
930 ac_configure_args=
931 ac_sep=
932 for ac_arg
933 do
934   case $ac_arg in
935   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
936   | --no-cr | --no-c) ;;
937   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
938   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
939   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
940     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
941     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
942     ac_sep=" " ;;
943   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
944      ac_sep=" " ;;
945   esac
946   # Get rid of the leading space.
947 done
948
949 # When interrupted or exit'd, cleanup temporary files, and complete
950 # config.log.  We remove comments because anyway the quotes in there
951 # would cause problems or look ugly.
952 trap 'exit_status=$?
953   # Save into config.log some information that might help in debugging.
954   echo >&5
955   echo "## ----------------- ##" >&5
956   echo "## Cache variables.  ##" >&5
957   echo "## ----------------- ##" >&5
958   echo >&5
959   # The following way of writing the cache mishandles newlines in values,
960 {
961   (set) 2>&1 |
962     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
963     *ac_space=\ *)
964       sed -n \
965         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
966           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
967       ;;
968     *)
969       sed -n \
970         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
971       ;;
972     esac;
973 } >&5
974   sed "/^$/d" confdefs.h >conftest.log
975   if test -s conftest.log; then
976     echo >&5
977     echo "## ------------ ##" >&5
978     echo "## confdefs.h.  ##" >&5
979     echo "## ------------ ##" >&5
980     echo >&5
981     cat conftest.log >&5
982   fi
983   (echo; echo) >&5
984   test "$ac_signal" != 0 &&
985     echo "$as_me: caught signal $ac_signal" >&5
986   echo "$as_me: exit $exit_status" >&5
987   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
988     exit $exit_status
989      ' 0
990 for ac_signal in 1 2 13 15; do
991   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
992 done
993 ac_signal=0
994
995 # confdefs.h avoids OS command line length limits that DEFS can exceed.
996 rm -rf conftest* confdefs.h
997 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
998 echo >confdefs.h
999
1000 # Let the site file select an alternate cache file if it wants to.
1001 # Prefer explicitly selected file to automatically selected ones.
1002 if test -z "$CONFIG_SITE"; then
1003   if test "x$prefix" != xNONE; then
1004     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1005   else
1006     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1007   fi
1008 fi
1009 for ac_site_file in $CONFIG_SITE; do
1010   if test -r "$ac_site_file"; then
1011     { echo "$as_me:1011: loading site script $ac_site_file" >&5
1012 echo "$as_me: loading site script $ac_site_file" >&6;}
1013     cat "$ac_site_file" >&5
1014     . "$ac_site_file"
1015   fi
1016 done
1017
1018 if test -r "$cache_file"; then
1019   # Some versions of bash will fail to source /dev/null (special
1020   # files actually), so we avoid doing that.
1021   if test -f "$cache_file"; then
1022     { echo "$as_me:1022: loading cache $cache_file" >&5
1023 echo "$as_me: loading cache $cache_file" >&6;}
1024     case $cache_file in
1025       [\\/]* | ?:[\\/]* ) . $cache_file;;
1026       *)                      . ./$cache_file;;
1027     esac
1028   fi
1029 else
1030   { echo "$as_me:1030: creating cache $cache_file" >&5
1031 echo "$as_me: creating cache $cache_file" >&6;}
1032   >$cache_file
1033 fi
1034
1035 # Check that the precious variables saved in the cache have kept the same
1036 # value.
1037 ac_cache_corrupted=false
1038 for ac_var in `(set) 2>&1 |
1039                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1040   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1041   eval ac_new_set=\$ac_env_${ac_var}_set
1042   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1043   eval ac_new_val="\$ac_env_${ac_var}_value"
1044   case $ac_old_set,$ac_new_set in
1045     set,)
1046       { echo "$as_me:1046: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1047 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1048       ac_cache_corrupted=: ;;
1049     ,set)
1050       { echo "$as_me:1050: error: \`$ac_var' was not set in the previous run" >&5
1051 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1052       ac_cache_corrupted=: ;;
1053     ,);;
1054     *)
1055       if test "x$ac_old_val" != "x$ac_new_val"; then
1056         { echo "$as_me:1056: error: \`$ac_var' has changed since the previous run:" >&5
1057 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1058         { echo "$as_me:1058:   former value:  $ac_old_val" >&5
1059 echo "$as_me:   former value:  $ac_old_val" >&2;}
1060         { echo "$as_me:1060:   current value: $ac_new_val" >&5
1061 echo "$as_me:   current value: $ac_new_val" >&2;}
1062         ac_cache_corrupted=:
1063       fi;;
1064   esac
1065   # Pass precious variables to config.status.  It doesn't matter if
1066   # we pass some twice (in addition to the command line arguments).
1067   if test "$ac_new_set" = set; then
1068     case $ac_new_val in
1069     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1070       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1071       ac_configure_args="$ac_configure_args '$ac_arg'"
1072       ;;
1073     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1074        ;;
1075     esac
1076   fi
1077 done
1078 if $ac_cache_corrupted; then
1079   { echo "$as_me:1079: error: changes in the environment can compromise the build" >&5
1080 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1081   { { echo "$as_me:1081: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1082 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1083    { (exit 1); exit 1; }; }
1084 fi
1085
1086 ac_ext=c
1087 ac_cpp='$CPP $CPPFLAGS'
1088 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1089 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1090 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1091 ac_main_return=return
1092
1093 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1094   *c*,-n*) ECHO_N= ECHO_C='
1095 ' ECHO_T='      ' ;;
1096   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1097   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1098 esac
1099 echo "#! $SHELL" >conftest.sh
1100 echo  "exit 0"   >>conftest.sh
1101 chmod +x conftest.sh
1102 if { (echo "$as_me:1102: PATH=\".;.\"; conftest.sh") >&5
1103   (PATH=".;."; conftest.sh) 2>&5
1104   ac_status=$?
1105   echo "$as_me:1105: \$? = $ac_status" >&5
1106   (exit $ac_status); }; then
1107   ac_path_separator=';'
1108 else
1109   ac_path_separator=:
1110 fi
1111 PATH_SEPARATOR="$ac_path_separator"
1112 rm -f conftest.sh
1113
1114 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1115
1116 top_builddir=`pwd`
1117
1118 echo "$as_me:1118: checking for egrep" >&5
1119 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1120 if test "${ac_cv_prog_egrep+set}" = set; then
1121   echo $ECHO_N "(cached) $ECHO_C" >&6
1122 else
1123   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1124     then ac_cv_prog_egrep='grep -E'
1125     else ac_cv_prog_egrep='egrep'
1126     fi
1127 fi
1128 echo "$as_me:1128: result: $ac_cv_prog_egrep" >&5
1129 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1130  EGREP=$ac_cv_prog_egrep
1131
1132 test -z "$EGREP" && { { echo "$as_me:1132: error: No egrep program found" >&5
1133 echo "$as_me: error: No egrep program found" >&2;}
1134    { (exit 1); exit 1; }; }
1135
1136 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1138 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1139 cf_cv_abi_version=${NCURSES_MAJOR}
1140 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1141 cf_cv_timestamp=`date`
1142 echo "$as_me:1142: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1143 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1144
1145 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1146
1147 # Check whether --with-rel-version or --without-rel-version was given.
1148 if test "${with_rel_version+set}" = set; then
1149   withval="$with_rel_version"
1150   { echo "$as_me:1150: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1151 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1152  cf_cv_rel_version=$withval
1153 fi;
1154
1155  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1156  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1157
1158 if test -n "$NCURSES_MAJOR" ; then
1159   case $NCURSES_MAJOR in #(vi
1160   [0-9]*) #(vi
1161         ;;
1162   *)
1163         { { echo "$as_me:1163: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1164 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1165    { (exit 1); exit 1; }; }
1166         ;;
1167   esac
1168 else
1169   { { echo "$as_me:1169: error: Release major-version value is empty" >&5
1170 echo "$as_me: error: Release major-version value is empty" >&2;}
1171    { (exit 1); exit 1; }; }
1172 fi
1173
1174 if test -n "$NCURSES_MINOR" ; then
1175   case $NCURSES_MINOR in #(vi
1176   [0-9]*) #(vi
1177         ;;
1178   *)
1179         { { echo "$as_me:1179: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1180 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1181    { (exit 1); exit 1; }; }
1182         ;;
1183   esac
1184 else
1185   { { echo "$as_me:1185: error: Release minor-version value is empty" >&5
1186 echo "$as_me: error: Release minor-version value is empty" >&2;}
1187    { (exit 1); exit 1; }; }
1188 fi
1189
1190 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1191
1192 # Check whether --with-abi-version or --without-abi-version was given.
1193 if test "${with_abi_version+set}" = set; then
1194   withval="$with_abi_version"
1195   { echo "$as_me:1195: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1196 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1197  cf_cv_abi_version=$withval
1198 fi;
1199
1200 if test -n "$cf_cv_abi_version" ; then
1201   case $cf_cv_abi_version in #(vi
1202   [0-9]*) #(vi
1203         ;;
1204   *)
1205         { { echo "$as_me:1205: error: ABI version is not a number: $cf_cv_abi_version" >&5
1206 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1207    { (exit 1); exit 1; }; }
1208         ;;
1209   esac
1210 else
1211   { { echo "$as_me:1211: error: ABI version value is empty" >&5
1212 echo "$as_me: error: ABI version value is empty" >&2;}
1213    { (exit 1); exit 1; }; }
1214 fi
1215
1216 ac_aux_dir=
1217 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1218   if test -f $ac_dir/install-sh; then
1219     ac_aux_dir=$ac_dir
1220     ac_install_sh="$ac_aux_dir/install-sh -c"
1221     break
1222   elif test -f $ac_dir/install.sh; then
1223     ac_aux_dir=$ac_dir
1224     ac_install_sh="$ac_aux_dir/install.sh -c"
1225     break
1226   elif test -f $ac_dir/shtool; then
1227     ac_aux_dir=$ac_dir
1228     ac_install_sh="$ac_aux_dir/shtool install -c"
1229     break
1230   fi
1231 done
1232 if test -z "$ac_aux_dir"; then
1233   { { echo "$as_me:1233: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1234 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1235    { (exit 1); exit 1; }; }
1236 fi
1237 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1238 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1239 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1240
1241 # Make sure we can run config.sub.
1242 $ac_config_sub sun4 >/dev/null 2>&1 ||
1243   { { echo "$as_me:1243: error: cannot run $ac_config_sub" >&5
1244 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1245    { (exit 1); exit 1; }; }
1246
1247 echo "$as_me:1247: checking build system type" >&5
1248 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1249 if test "${ac_cv_build+set}" = set; then
1250   echo $ECHO_N "(cached) $ECHO_C" >&6
1251 else
1252   ac_cv_build_alias=$build_alias
1253 test -z "$ac_cv_build_alias" &&
1254   ac_cv_build_alias=`$ac_config_guess`
1255 test -z "$ac_cv_build_alias" &&
1256   { { echo "$as_me:1256: error: cannot guess build type; you must specify one" >&5
1257 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1258    { (exit 1); exit 1; }; }
1259 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1260   { { echo "$as_me:1260: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1261 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 fi
1265 echo "$as_me:1265: result: $ac_cv_build" >&5
1266 echo "${ECHO_T}$ac_cv_build" >&6
1267 build=$ac_cv_build
1268 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1269 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1270 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1271
1272 echo "$as_me:1272: checking host system type" >&5
1273 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1274 if test "${ac_cv_host+set}" = set; then
1275   echo $ECHO_N "(cached) $ECHO_C" >&6
1276 else
1277   ac_cv_host_alias=$host_alias
1278 test -z "$ac_cv_host_alias" &&
1279   ac_cv_host_alias=$ac_cv_build_alias
1280 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1281   { { echo "$as_me:1281: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1282 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1283    { (exit 1); exit 1; }; }
1284
1285 fi
1286 echo "$as_me:1286: result: $ac_cv_host" >&5
1287 echo "${ECHO_T}$ac_cv_host" >&6
1288 host=$ac_cv_host
1289 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1290 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1291 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1292
1293 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1294         echo "$as_me:1294: checking target system type" >&5
1295 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1296 if test "${ac_cv_target+set}" = set; then
1297   echo $ECHO_N "(cached) $ECHO_C" >&6
1298 else
1299   ac_cv_target_alias=$target_alias
1300 test "x$ac_cv_target_alias" = "x" &&
1301   ac_cv_target_alias=$ac_cv_host_alias
1302 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1303   { { echo "$as_me:1303: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1304 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1305    { (exit 1); exit 1; }; }
1306
1307 fi
1308 echo "$as_me:1308: result: $ac_cv_target" >&5
1309 echo "${ECHO_T}$ac_cv_target" >&6
1310 target=$ac_cv_target
1311 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1312 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1313 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1314
1315 # The aliases save the names the user supplied, while $host etc.
1316 # will get canonicalized.
1317 test -n "$target_alias" &&
1318   test "$program_prefix$program_suffix$program_transform_name" = \
1319     NONENONEs,x,x, &&
1320   program_prefix=${target_alias}-
1321         system_name="$host_os"
1322 else
1323         system_name="`(uname -s -r) 2>/dev/null`"
1324         if test -z "$system_name" ; then
1325                 system_name="`(hostname) 2>/dev/null`"
1326         fi
1327 fi
1328 test -n "$system_name" && cat >>confdefs.h <<EOF
1329 #define SYSTEM_NAME "$system_name"
1330 EOF
1331
1332 if test "${cf_cv_system_name+set}" = set; then
1333   echo $ECHO_N "(cached) $ECHO_C" >&6
1334 else
1335   cf_cv_system_name="$system_name"
1336 fi
1337
1338 test -z "$system_name" && system_name="$cf_cv_system_name"
1339 test -n "$cf_cv_system_name" && echo "$as_me:1339: result: Configuring for $cf_cv_system_name" >&5
1340 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1341
1342 if test ".$system_name" != ".$cf_cv_system_name" ; then
1343         echo "$as_me:1343: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1344 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1345         { { echo "$as_me:1345: error: \"Please remove config.cache and try again.\"" >&5
1346 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1347    { (exit 1); exit 1; }; }
1348 fi
1349
1350 # Check whether --with-system-type or --without-system-type was given.
1351 if test "${with_system_type+set}" = set; then
1352   withval="$with_system_type"
1353   { echo "$as_me:1353: WARNING: overriding system type to $withval" >&5
1354 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1355  cf_cv_system_name=$withval
1356 fi;
1357
1358 ###     Save the given $CFLAGS to allow user-override.
1359 cf_user_CFLAGS="$CFLAGS"
1360
1361 ###     Default install-location
1362
1363 echo "$as_me:1363: checking for prefix" >&5
1364 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1365 if test "x$prefix" = "xNONE" ; then
1366         case "$cf_cv_system_name" in
1367                 # non-vendor systems don't have a conflict
1368         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1369                 prefix=/usr
1370                 ;;
1371         *)      prefix=$ac_default_prefix
1372                 ;;
1373         esac
1374 fi
1375 echo "$as_me:1375: result: $prefix" >&5
1376 echo "${ECHO_T}$prefix" >&6
1377
1378 if test "x$prefix" = "xNONE" ; then
1379 echo "$as_me:1379: checking for default include-directory" >&5
1380 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1381 test -n "$verbose" && echo 1>&6
1382 for cf_symbol in \
1383         $includedir \
1384         $includedir/ncurses \
1385         $prefix/include \
1386         $prefix/include/ncurses \
1387         /usr/local/include \
1388         /usr/local/include/ncurses \
1389         /usr/include \
1390         /usr/include/ncurses
1391 do
1392         cf_dir=`eval echo $cf_symbol`
1393         if test -f $cf_dir/curses.h ; then
1394         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1395                 includedir="$cf_symbol"
1396                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1397                 break
1398         fi
1399         fi
1400         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1401 done
1402 echo "$as_me:1402: result: $includedir" >&5
1403 echo "${ECHO_T}$includedir" >&6
1404 fi
1405
1406 ###     Checks for programs.
1407 ac_ext=c
1408 ac_cpp='$CPP $CPPFLAGS'
1409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1412 ac_main_return=return
1413 if test -n "$ac_tool_prefix"; then
1414   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1415 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1416 echo "$as_me:1416: checking for $ac_word" >&5
1417 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1418 if test "${ac_cv_prog_CC+set}" = set; then
1419   echo $ECHO_N "(cached) $ECHO_C" >&6
1420 else
1421   if test -n "$CC"; then
1422   ac_cv_prog_CC="$CC" # Let the user override the test.
1423 else
1424   ac_save_IFS=$IFS; IFS=$ac_path_separator
1425 ac_dummy="$PATH"
1426 for ac_dir in $ac_dummy; do
1427   IFS=$ac_save_IFS
1428   test -z "$ac_dir" && ac_dir=.
1429   $as_executable_p "$ac_dir/$ac_word" || continue
1430 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1431 echo "$as_me:1431: found $ac_dir/$ac_word" >&5
1432 break
1433 done
1434
1435 fi
1436 fi
1437 CC=$ac_cv_prog_CC
1438 if test -n "$CC"; then
1439   echo "$as_me:1439: result: $CC" >&5
1440 echo "${ECHO_T}$CC" >&6
1441 else
1442   echo "$as_me:1442: result: no" >&5
1443 echo "${ECHO_T}no" >&6
1444 fi
1445
1446 fi
1447 if test -z "$ac_cv_prog_CC"; then
1448   ac_ct_CC=$CC
1449   # Extract the first word of "gcc", so it can be a program name with args.
1450 set dummy gcc; ac_word=$2
1451 echo "$as_me:1451: checking for $ac_word" >&5
1452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1453 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1454   echo $ECHO_N "(cached) $ECHO_C" >&6
1455 else
1456   if test -n "$ac_ct_CC"; then
1457   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1458 else
1459   ac_save_IFS=$IFS; IFS=$ac_path_separator
1460 ac_dummy="$PATH"
1461 for ac_dir in $ac_dummy; do
1462   IFS=$ac_save_IFS
1463   test -z "$ac_dir" && ac_dir=.
1464   $as_executable_p "$ac_dir/$ac_word" || continue
1465 ac_cv_prog_ac_ct_CC="gcc"
1466 echo "$as_me:1466: found $ac_dir/$ac_word" >&5
1467 break
1468 done
1469
1470 fi
1471 fi
1472 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1473 if test -n "$ac_ct_CC"; then
1474   echo "$as_me:1474: result: $ac_ct_CC" >&5
1475 echo "${ECHO_T}$ac_ct_CC" >&6
1476 else
1477   echo "$as_me:1477: result: no" >&5
1478 echo "${ECHO_T}no" >&6
1479 fi
1480
1481   CC=$ac_ct_CC
1482 else
1483   CC="$ac_cv_prog_CC"
1484 fi
1485
1486 if test -z "$CC"; then
1487   if test -n "$ac_tool_prefix"; then
1488   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1489 set dummy ${ac_tool_prefix}cc; ac_word=$2
1490 echo "$as_me:1490: checking for $ac_word" >&5
1491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1492 if test "${ac_cv_prog_CC+set}" = set; then
1493   echo $ECHO_N "(cached) $ECHO_C" >&6
1494 else
1495   if test -n "$CC"; then
1496   ac_cv_prog_CC="$CC" # Let the user override the test.
1497 else
1498   ac_save_IFS=$IFS; IFS=$ac_path_separator
1499 ac_dummy="$PATH"
1500 for ac_dir in $ac_dummy; do
1501   IFS=$ac_save_IFS
1502   test -z "$ac_dir" && ac_dir=.
1503   $as_executable_p "$ac_dir/$ac_word" || continue
1504 ac_cv_prog_CC="${ac_tool_prefix}cc"
1505 echo "$as_me:1505: found $ac_dir/$ac_word" >&5
1506 break
1507 done
1508
1509 fi
1510 fi
1511 CC=$ac_cv_prog_CC
1512 if test -n "$CC"; then
1513   echo "$as_me:1513: result: $CC" >&5
1514 echo "${ECHO_T}$CC" >&6
1515 else
1516   echo "$as_me:1516: result: no" >&5
1517 echo "${ECHO_T}no" >&6
1518 fi
1519
1520 fi
1521 if test -z "$ac_cv_prog_CC"; then
1522   ac_ct_CC=$CC
1523   # Extract the first word of "cc", so it can be a program name with args.
1524 set dummy cc; ac_word=$2
1525 echo "$as_me:1525: checking for $ac_word" >&5
1526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1527 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   if test -n "$ac_ct_CC"; then
1531   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1532 else
1533   ac_save_IFS=$IFS; IFS=$ac_path_separator
1534 ac_dummy="$PATH"
1535 for ac_dir in $ac_dummy; do
1536   IFS=$ac_save_IFS
1537   test -z "$ac_dir" && ac_dir=.
1538   $as_executable_p "$ac_dir/$ac_word" || continue
1539 ac_cv_prog_ac_ct_CC="cc"
1540 echo "$as_me:1540: found $ac_dir/$ac_word" >&5
1541 break
1542 done
1543
1544 fi
1545 fi
1546 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1547 if test -n "$ac_ct_CC"; then
1548   echo "$as_me:1548: result: $ac_ct_CC" >&5
1549 echo "${ECHO_T}$ac_ct_CC" >&6
1550 else
1551   echo "$as_me:1551: result: no" >&5
1552 echo "${ECHO_T}no" >&6
1553 fi
1554
1555   CC=$ac_ct_CC
1556 else
1557   CC="$ac_cv_prog_CC"
1558 fi
1559
1560 fi
1561 if test -z "$CC"; then
1562   # Extract the first word of "cc", so it can be a program name with args.
1563 set dummy cc; ac_word=$2
1564 echo "$as_me:1564: checking for $ac_word" >&5
1565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1566 if test "${ac_cv_prog_CC+set}" = set; then
1567   echo $ECHO_N "(cached) $ECHO_C" >&6
1568 else
1569   if test -n "$CC"; then
1570   ac_cv_prog_CC="$CC" # Let the user override the test.
1571 else
1572   ac_prog_rejected=no
1573   ac_save_IFS=$IFS; IFS=$ac_path_separator
1574 ac_dummy="$PATH"
1575 for ac_dir in $ac_dummy; do
1576   IFS=$ac_save_IFS
1577   test -z "$ac_dir" && ac_dir=.
1578   $as_executable_p "$ac_dir/$ac_word" || continue
1579 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1580   ac_prog_rejected=yes
1581   continue
1582 fi
1583 ac_cv_prog_CC="cc"
1584 echo "$as_me:1584: found $ac_dir/$ac_word" >&5
1585 break
1586 done
1587
1588 if test $ac_prog_rejected = yes; then
1589   # We found a bogon in the path, so make sure we never use it.
1590   set dummy $ac_cv_prog_CC
1591   shift
1592   if test $# != 0; then
1593     # We chose a different compiler from the bogus one.
1594     # However, it has the same basename, so the bogon will be chosen
1595     # first if we set CC to just the basename; use the full file name.
1596     shift
1597     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1598     shift
1599     ac_cv_prog_CC="$@"
1600   fi
1601 fi
1602 fi
1603 fi
1604 CC=$ac_cv_prog_CC
1605 if test -n "$CC"; then
1606   echo "$as_me:1606: result: $CC" >&5
1607 echo "${ECHO_T}$CC" >&6
1608 else
1609   echo "$as_me:1609: result: no" >&5
1610 echo "${ECHO_T}no" >&6
1611 fi
1612
1613 fi
1614 if test -z "$CC"; then
1615   if test -n "$ac_tool_prefix"; then
1616   for ac_prog in cl
1617   do
1618     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1619 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1620 echo "$as_me:1620: checking for $ac_word" >&5
1621 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1622 if test "${ac_cv_prog_CC+set}" = set; then
1623   echo $ECHO_N "(cached) $ECHO_C" >&6
1624 else
1625   if test -n "$CC"; then
1626   ac_cv_prog_CC="$CC" # Let the user override the test.
1627 else
1628   ac_save_IFS=$IFS; IFS=$ac_path_separator
1629 ac_dummy="$PATH"
1630 for ac_dir in $ac_dummy; do
1631   IFS=$ac_save_IFS
1632   test -z "$ac_dir" && ac_dir=.
1633   $as_executable_p "$ac_dir/$ac_word" || continue
1634 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1635 echo "$as_me:1635: found $ac_dir/$ac_word" >&5
1636 break
1637 done
1638
1639 fi
1640 fi
1641 CC=$ac_cv_prog_CC
1642 if test -n "$CC"; then
1643   echo "$as_me:1643: result: $CC" >&5
1644 echo "${ECHO_T}$CC" >&6
1645 else
1646   echo "$as_me:1646: result: no" >&5
1647 echo "${ECHO_T}no" >&6
1648 fi
1649
1650     test -n "$CC" && break
1651   done
1652 fi
1653 if test -z "$CC"; then
1654   ac_ct_CC=$CC
1655   for ac_prog in cl
1656 do
1657   # Extract the first word of "$ac_prog", so it can be a program name with args.
1658 set dummy $ac_prog; ac_word=$2
1659 echo "$as_me:1659: checking for $ac_word" >&5
1660 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1661 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1662   echo $ECHO_N "(cached) $ECHO_C" >&6
1663 else
1664   if test -n "$ac_ct_CC"; then
1665   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1666 else
1667   ac_save_IFS=$IFS; IFS=$ac_path_separator
1668 ac_dummy="$PATH"
1669 for ac_dir in $ac_dummy; do
1670   IFS=$ac_save_IFS
1671   test -z "$ac_dir" && ac_dir=.
1672   $as_executable_p "$ac_dir/$ac_word" || continue
1673 ac_cv_prog_ac_ct_CC="$ac_prog"
1674 echo "$as_me:1674: found $ac_dir/$ac_word" >&5
1675 break
1676 done
1677
1678 fi
1679 fi
1680 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1681 if test -n "$ac_ct_CC"; then
1682   echo "$as_me:1682: result: $ac_ct_CC" >&5
1683 echo "${ECHO_T}$ac_ct_CC" >&6
1684 else
1685   echo "$as_me:1685: result: no" >&5
1686 echo "${ECHO_T}no" >&6
1687 fi
1688
1689   test -n "$ac_ct_CC" && break
1690 done
1691
1692   CC=$ac_ct_CC
1693 fi
1694
1695 fi
1696
1697 test -z "$CC" && { { echo "$as_me:1697: error: no acceptable cc found in \$PATH" >&5
1698 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1699    { (exit 1); exit 1; }; }
1700
1701 # Provide some information about the compiler.
1702 echo "$as_me:1702:" \
1703      "checking for C compiler version" >&5
1704 ac_compiler=`set X $ac_compile; echo $2`
1705 { (eval echo "$as_me:1705: \"$ac_compiler --version </dev/null >&5\"") >&5
1706   (eval $ac_compiler --version </dev/null >&5) 2>&5
1707   ac_status=$?
1708   echo "$as_me:1708: \$? = $ac_status" >&5
1709   (exit $ac_status); }
1710 { (eval echo "$as_me:1710: \"$ac_compiler -v </dev/null >&5\"") >&5
1711   (eval $ac_compiler -v </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715 { (eval echo "$as_me:1715: \"$ac_compiler -V </dev/null >&5\"") >&5
1716   (eval $ac_compiler -V </dev/null >&5) 2>&5
1717   ac_status=$?
1718   echo "$as_me:1718: \$? = $ac_status" >&5
1719   (exit $ac_status); }
1720
1721 cat >conftest.$ac_ext <<_ACEOF
1722 #line 1722 "configure"
1723 #include "confdefs.h"
1724
1725 int
1726 main ()
1727 {
1728
1729   ;
1730   return 0;
1731 }
1732 _ACEOF
1733 ac_clean_files_save=$ac_clean_files
1734 ac_clean_files="$ac_clean_files a.out a.exe"
1735 # Try to create an executable without -o first, disregard a.out.
1736 # It will help us diagnose broken compilers, and finding out an intuition
1737 # of exeext.
1738 echo "$as_me:1738: checking for C compiler default output" >&5
1739 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1740 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1741 if { (eval echo "$as_me:1741: \"$ac_link_default\"") >&5
1742   (eval $ac_link_default) 2>&5
1743   ac_status=$?
1744   echo "$as_me:1744: \$? = $ac_status" >&5
1745   (exit $ac_status); }; then
1746   # Find the output, starting from the most likely.  This scheme is
1747 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1748 # resort.
1749 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1750                 ls a.out conftest 2>/dev/null;
1751                 ls a.* conftest.* 2>/dev/null`; do
1752   case $ac_file in
1753     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1754     a.out ) # We found the default executable, but exeext='' is most
1755             # certainly right.
1756             break;;
1757     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1758           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1759           export ac_cv_exeext
1760           break;;
1761     * ) break;;
1762   esac
1763 done
1764 else
1765   echo "$as_me: failed program was:" >&5
1766 cat conftest.$ac_ext >&5
1767 { { echo "$as_me:1767: error: C compiler cannot create executables" >&5
1768 echo "$as_me: error: C compiler cannot create executables" >&2;}
1769    { (exit 77); exit 77; }; }
1770 fi
1771
1772 ac_exeext=$ac_cv_exeext
1773 echo "$as_me:1773: result: $ac_file" >&5
1774 echo "${ECHO_T}$ac_file" >&6
1775
1776 # Check the compiler produces executables we can run.  If not, either
1777 # the compiler is broken, or we cross compile.
1778 echo "$as_me:1778: checking whether the C compiler works" >&5
1779 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1780 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1781 # If not cross compiling, check that we can run a simple program.
1782 if test "$cross_compiling" != yes; then
1783   if { ac_try='./$ac_file'
1784   { (eval echo "$as_me:1784: \"$ac_try\"") >&5
1785   (eval $ac_try) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; }; then
1789     cross_compiling=no
1790   else
1791     if test "$cross_compiling" = maybe; then
1792         cross_compiling=yes
1793     else
1794         { { echo "$as_me:1794: error: cannot run C compiled programs.
1795 If you meant to cross compile, use \`--host'." >&5
1796 echo "$as_me: error: cannot run C compiled programs.
1797 If you meant to cross compile, use \`--host'." >&2;}
1798    { (exit 1); exit 1; }; }
1799     fi
1800   fi
1801 fi
1802 echo "$as_me:1802: result: yes" >&5
1803 echo "${ECHO_T}yes" >&6
1804
1805 rm -f a.out a.exe conftest$ac_cv_exeext
1806 ac_clean_files=$ac_clean_files_save
1807 # Check the compiler produces executables we can run.  If not, either
1808 # the compiler is broken, or we cross compile.
1809 echo "$as_me:1809: checking whether we are cross compiling" >&5
1810 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1811 echo "$as_me:1811: result: $cross_compiling" >&5
1812 echo "${ECHO_T}$cross_compiling" >&6
1813
1814 echo "$as_me:1814: checking for executable suffix" >&5
1815 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1816 if { (eval echo "$as_me:1816: \"$ac_link\"") >&5
1817   (eval $ac_link) 2>&5
1818   ac_status=$?
1819   echo "$as_me:1819: \$? = $ac_status" >&5
1820   (exit $ac_status); }; then
1821   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1822 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1823 # work properly (i.e., refer to `conftest.exe'), while it won't with
1824 # `rm'.
1825 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1826   case $ac_file in
1827     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1828     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1829           export ac_cv_exeext
1830           break;;
1831     * ) break;;
1832   esac
1833 done
1834 else
1835   { { echo "$as_me:1835: error: cannot compute EXEEXT: cannot compile and link" >&5
1836 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1837    { (exit 1); exit 1; }; }
1838 fi
1839
1840 rm -f conftest$ac_cv_exeext
1841 echo "$as_me:1841: result: $ac_cv_exeext" >&5
1842 echo "${ECHO_T}$ac_cv_exeext" >&6
1843
1844 rm -f conftest.$ac_ext
1845 EXEEXT=$ac_cv_exeext
1846 ac_exeext=$EXEEXT
1847 echo "$as_me:1847: checking for object suffix" >&5
1848 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1849 if test "${ac_cv_objext+set}" = set; then
1850   echo $ECHO_N "(cached) $ECHO_C" >&6
1851 else
1852   cat >conftest.$ac_ext <<_ACEOF
1853 #line 1853 "configure"
1854 #include "confdefs.h"
1855
1856 int
1857 main ()
1858 {
1859
1860   ;
1861   return 0;
1862 }
1863 _ACEOF
1864 rm -f conftest.o conftest.obj
1865 if { (eval echo "$as_me:1865: \"$ac_compile\"") >&5
1866   (eval $ac_compile) 2>&5
1867   ac_status=$?
1868   echo "$as_me:1868: \$? = $ac_status" >&5
1869   (exit $ac_status); }; then
1870   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1871   case $ac_file in
1872     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1873     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1874        break;;
1875   esac
1876 done
1877 else
1878   echo "$as_me: failed program was:" >&5
1879 cat conftest.$ac_ext >&5
1880 { { echo "$as_me:1880: error: cannot compute OBJEXT: cannot compile" >&5
1881 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1882    { (exit 1); exit 1; }; }
1883 fi
1884
1885 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1886 fi
1887 echo "$as_me:1887: result: $ac_cv_objext" >&5
1888 echo "${ECHO_T}$ac_cv_objext" >&6
1889 OBJEXT=$ac_cv_objext
1890 ac_objext=$OBJEXT
1891 echo "$as_me:1891: checking whether we are using the GNU C compiler" >&5
1892 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1893 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1894   echo $ECHO_N "(cached) $ECHO_C" >&6
1895 else
1896   cat >conftest.$ac_ext <<_ACEOF
1897 #line 1897 "configure"
1898 #include "confdefs.h"
1899
1900 int
1901 main ()
1902 {
1903 #ifndef __GNUC__
1904        choke me
1905 #endif
1906
1907   ;
1908   return 0;
1909 }
1910 _ACEOF
1911 rm -f conftest.$ac_objext
1912 if { (eval echo "$as_me:1912: \"$ac_compile\"") >&5
1913   (eval $ac_compile) 2>&5
1914   ac_status=$?
1915   echo "$as_me:1915: \$? = $ac_status" >&5
1916   (exit $ac_status); } &&
1917          { ac_try='test -s conftest.$ac_objext'
1918   { (eval echo "$as_me:1918: \"$ac_try\"") >&5
1919   (eval $ac_try) 2>&5
1920   ac_status=$?
1921   echo "$as_me:1921: \$? = $ac_status" >&5
1922   (exit $ac_status); }; }; then
1923   ac_compiler_gnu=yes
1924 else
1925   echo "$as_me: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1927 ac_compiler_gnu=no
1928 fi
1929 rm -f conftest.$ac_objext conftest.$ac_ext
1930 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1931
1932 fi
1933 echo "$as_me:1933: result: $ac_cv_c_compiler_gnu" >&5
1934 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1935 GCC=`test $ac_compiler_gnu = yes && echo yes`
1936 ac_test_CFLAGS=${CFLAGS+set}
1937 ac_save_CFLAGS=$CFLAGS
1938 CFLAGS="-g"
1939 echo "$as_me:1939: checking whether $CC accepts -g" >&5
1940 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1941 if test "${ac_cv_prog_cc_g+set}" = set; then
1942   echo $ECHO_N "(cached) $ECHO_C" >&6
1943 else
1944   cat >conftest.$ac_ext <<_ACEOF
1945 #line 1945 "configure"
1946 #include "confdefs.h"
1947
1948 int
1949 main ()
1950 {
1951
1952   ;
1953   return 0;
1954 }
1955 _ACEOF
1956 rm -f conftest.$ac_objext
1957 if { (eval echo "$as_me:1957: \"$ac_compile\"") >&5
1958   (eval $ac_compile) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); } &&
1962          { ac_try='test -s conftest.$ac_objext'
1963   { (eval echo "$as_me:1963: \"$ac_try\"") >&5
1964   (eval $ac_try) 2>&5
1965   ac_status=$?
1966   echo "$as_me:1966: \$? = $ac_status" >&5
1967   (exit $ac_status); }; }; then
1968   ac_cv_prog_cc_g=yes
1969 else
1970   echo "$as_me: failed program was:" >&5
1971 cat conftest.$ac_ext >&5
1972 ac_cv_prog_cc_g=no
1973 fi
1974 rm -f conftest.$ac_objext conftest.$ac_ext
1975 fi
1976 echo "$as_me:1976: result: $ac_cv_prog_cc_g" >&5
1977 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1978 if test "$ac_test_CFLAGS" = set; then
1979   CFLAGS=$ac_save_CFLAGS
1980 elif test $ac_cv_prog_cc_g = yes; then
1981   if test "$GCC" = yes; then
1982     CFLAGS="-g -O2"
1983   else
1984     CFLAGS="-g"
1985   fi
1986 else
1987   if test "$GCC" = yes; then
1988     CFLAGS="-O2"
1989   else
1990     CFLAGS=
1991   fi
1992 fi
1993 # Some people use a C++ compiler to compile C.  Since we use `exit',
1994 # in C++ we need to declare it.  In case someone uses the same compiler
1995 # for both compiling C and C++ we need to have the C++ compiler decide
1996 # the declaration of exit, since it's the most demanding environment.
1997 cat >conftest.$ac_ext <<_ACEOF
1998 #ifndef __cplusplus
1999   choke me
2000 #endif
2001 _ACEOF
2002 rm -f conftest.$ac_objext
2003 if { (eval echo "$as_me:2003: \"$ac_compile\"") >&5
2004   (eval $ac_compile) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); } &&
2008          { ac_try='test -s conftest.$ac_objext'
2009   { (eval echo "$as_me:2009: \"$ac_try\"") >&5
2010   (eval $ac_try) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); }; }; then
2014   for ac_declaration in \
2015    ''\
2016    '#include <stdlib.h>' \
2017    'extern "C" void std::exit (int) throw (); using std::exit;' \
2018    'extern "C" void std::exit (int); using std::exit;' \
2019    'extern "C" void exit (int) throw ();' \
2020    'extern "C" void exit (int);' \
2021    'void exit (int);'
2022 do
2023   cat >conftest.$ac_ext <<_ACEOF
2024 #line 2024 "configure"
2025 #include "confdefs.h"
2026 #include <stdlib.h>
2027 $ac_declaration
2028 int
2029 main ()
2030 {
2031 exit (42);
2032   ;
2033   return 0;
2034 }
2035 _ACEOF
2036 rm -f conftest.$ac_objext
2037 if { (eval echo "$as_me:2037: \"$ac_compile\"") >&5
2038   (eval $ac_compile) 2>&5
2039   ac_status=$?
2040   echo "$as_me:2040: \$? = $ac_status" >&5
2041   (exit $ac_status); } &&
2042          { ac_try='test -s conftest.$ac_objext'
2043   { (eval echo "$as_me:2043: \"$ac_try\"") >&5
2044   (eval $ac_try) 2>&5
2045   ac_status=$?
2046   echo "$as_me:2046: \$? = $ac_status" >&5
2047   (exit $ac_status); }; }; then
2048   :
2049 else
2050   echo "$as_me: failed program was:" >&5
2051 cat conftest.$ac_ext >&5
2052 continue
2053 fi
2054 rm -f conftest.$ac_objext conftest.$ac_ext
2055   cat >conftest.$ac_ext <<_ACEOF
2056 #line 2056 "configure"
2057 #include "confdefs.h"
2058 $ac_declaration
2059 int
2060 main ()
2061 {
2062 exit (42);
2063   ;
2064   return 0;
2065 }
2066 _ACEOF
2067 rm -f conftest.$ac_objext
2068 if { (eval echo "$as_me:2068: \"$ac_compile\"") >&5
2069   (eval $ac_compile) 2>&5
2070   ac_status=$?
2071   echo "$as_me:2071: \$? = $ac_status" >&5
2072   (exit $ac_status); } &&
2073          { ac_try='test -s conftest.$ac_objext'
2074   { (eval echo "$as_me:2074: \"$ac_try\"") >&5
2075   (eval $ac_try) 2>&5
2076   ac_status=$?
2077   echo "$as_me:2077: \$? = $ac_status" >&5
2078   (exit $ac_status); }; }; then
2079   break
2080 else
2081   echo "$as_me: failed program was:" >&5
2082 cat conftest.$ac_ext >&5
2083 fi
2084 rm -f conftest.$ac_objext conftest.$ac_ext
2085 done
2086 rm -rf conftest*
2087 if test -n "$ac_declaration"; then
2088   echo '#ifdef __cplusplus' >>confdefs.h
2089   echo $ac_declaration      >>confdefs.h
2090   echo '#endif'             >>confdefs.h
2091 fi
2092
2093 else
2094   echo "$as_me: failed program was:" >&5
2095 cat conftest.$ac_ext >&5
2096 fi
2097 rm -f conftest.$ac_objext conftest.$ac_ext
2098 ac_ext=c
2099 ac_cpp='$CPP $CPPFLAGS'
2100 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2101 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2102 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2103 ac_main_return=return
2104
2105 GCC_VERSION=none
2106 if test "$GCC" = yes ; then
2107         echo "$as_me:2107: checking version of $CC" >&5
2108 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2109         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2110         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2111         echo "$as_me:2111: result: $GCC_VERSION" >&5
2112 echo "${ECHO_T}$GCC_VERSION" >&6
2113 fi
2114
2115 ac_ext=c
2116 ac_cpp='$CPP $CPPFLAGS'
2117 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2118 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2119 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2120 ac_main_return=return
2121 echo "$as_me:2121: checking how to run the C preprocessor" >&5
2122 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2123 # On Suns, sometimes $CPP names a directory.
2124 if test -n "$CPP" && test -d "$CPP"; then
2125   CPP=
2126 fi
2127 if test -z "$CPP"; then
2128   if test "${ac_cv_prog_CPP+set}" = set; then
2129   echo $ECHO_N "(cached) $ECHO_C" >&6
2130 else
2131       # Double quotes because CPP needs to be expanded
2132     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2133     do
2134       ac_preproc_ok=false
2135 for ac_c_preproc_warn_flag in '' yes
2136 do
2137   # Use a header file that comes with gcc, so configuring glibc
2138   # with a fresh cross-compiler works.
2139   # On the NeXT, cc -E runs the code through the compiler's parser,
2140   # not just through cpp. "Syntax error" is here to catch this case.
2141   cat >conftest.$ac_ext <<_ACEOF
2142 #line 2142 "configure"
2143 #include "confdefs.h"
2144 #include <assert.h>
2145                      Syntax error
2146 _ACEOF
2147 if { (eval echo "$as_me:2147: \"$ac_cpp conftest.$ac_ext\"") >&5
2148   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2149   ac_status=$?
2150   egrep -v '^ *\+' conftest.er1 >conftest.err
2151   rm -f conftest.er1
2152   cat conftest.err >&5
2153   echo "$as_me:2153: \$? = $ac_status" >&5
2154   (exit $ac_status); } >/dev/null; then
2155   if test -s conftest.err; then
2156     ac_cpp_err=$ac_c_preproc_warn_flag
2157   else
2158     ac_cpp_err=
2159   fi
2160 else
2161   ac_cpp_err=yes
2162 fi
2163 if test -z "$ac_cpp_err"; then
2164   :
2165 else
2166   echo "$as_me: failed program was:" >&5
2167   cat conftest.$ac_ext >&5
2168   # Broken: fails on valid input.
2169 continue
2170 fi
2171 rm -f conftest.err conftest.$ac_ext
2172
2173   # OK, works on sane cases.  Now check whether non-existent headers
2174   # can be detected and how.
2175   cat >conftest.$ac_ext <<_ACEOF
2176 #line 2176 "configure"
2177 #include "confdefs.h"
2178 #include <ac_nonexistent.h>
2179 _ACEOF
2180 if { (eval echo "$as_me:2180: \"$ac_cpp conftest.$ac_ext\"") >&5
2181   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2182   ac_status=$?
2183   egrep -v '^ *\+' conftest.er1 >conftest.err
2184   rm -f conftest.er1
2185   cat conftest.err >&5
2186   echo "$as_me:2186: \$? = $ac_status" >&5
2187   (exit $ac_status); } >/dev/null; then
2188   if test -s conftest.err; then
2189     ac_cpp_err=$ac_c_preproc_warn_flag
2190   else
2191     ac_cpp_err=
2192   fi
2193 else
2194   ac_cpp_err=yes
2195 fi
2196 if test -z "$ac_cpp_err"; then
2197   # Broken: success on invalid input.
2198 continue
2199 else
2200   echo "$as_me: failed program was:" >&5
2201   cat conftest.$ac_ext >&5
2202   # Passes both tests.
2203 ac_preproc_ok=:
2204 break
2205 fi
2206 rm -f conftest.err conftest.$ac_ext
2207
2208 done
2209 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2210 rm -f conftest.err conftest.$ac_ext
2211 if $ac_preproc_ok; then
2212   break
2213 fi
2214
2215     done
2216     ac_cv_prog_CPP=$CPP
2217
2218 fi
2219   CPP=$ac_cv_prog_CPP
2220 else
2221   ac_cv_prog_CPP=$CPP
2222 fi
2223 echo "$as_me:2223: result: $CPP" >&5
2224 echo "${ECHO_T}$CPP" >&6
2225 ac_preproc_ok=false
2226 for ac_c_preproc_warn_flag in '' yes
2227 do
2228   # Use a header file that comes with gcc, so configuring glibc
2229   # with a fresh cross-compiler works.
2230   # On the NeXT, cc -E runs the code through the compiler's parser,
2231   # not just through cpp. "Syntax error" is here to catch this case.
2232   cat >conftest.$ac_ext <<_ACEOF
2233 #line 2233 "configure"
2234 #include "confdefs.h"
2235 #include <assert.h>
2236                      Syntax error
2237 _ACEOF
2238 if { (eval echo "$as_me:2238: \"$ac_cpp conftest.$ac_ext\"") >&5
2239   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2240   ac_status=$?
2241   egrep -v '^ *\+' conftest.er1 >conftest.err
2242   rm -f conftest.er1
2243   cat conftest.err >&5
2244   echo "$as_me:2244: \$? = $ac_status" >&5
2245   (exit $ac_status); } >/dev/null; then
2246   if test -s conftest.err; then
2247     ac_cpp_err=$ac_c_preproc_warn_flag
2248   else
2249     ac_cpp_err=
2250   fi
2251 else
2252   ac_cpp_err=yes
2253 fi
2254 if test -z "$ac_cpp_err"; then
2255   :
2256 else
2257   echo "$as_me: failed program was:" >&5
2258   cat conftest.$ac_ext >&5
2259   # Broken: fails on valid input.
2260 continue
2261 fi
2262 rm -f conftest.err conftest.$ac_ext
2263
2264   # OK, works on sane cases.  Now check whether non-existent headers
2265   # can be detected and how.
2266   cat >conftest.$ac_ext <<_ACEOF
2267 #line 2267 "configure"
2268 #include "confdefs.h"
2269 #include <ac_nonexistent.h>
2270 _ACEOF
2271 if { (eval echo "$as_me:2271: \"$ac_cpp conftest.$ac_ext\"") >&5
2272   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2273   ac_status=$?
2274   egrep -v '^ *\+' conftest.er1 >conftest.err
2275   rm -f conftest.er1
2276   cat conftest.err >&5
2277   echo "$as_me:2277: \$? = $ac_status" >&5
2278   (exit $ac_status); } >/dev/null; then
2279   if test -s conftest.err; then
2280     ac_cpp_err=$ac_c_preproc_warn_flag
2281   else
2282     ac_cpp_err=
2283   fi
2284 else
2285   ac_cpp_err=yes
2286 fi
2287 if test -z "$ac_cpp_err"; then
2288   # Broken: success on invalid input.
2289 continue
2290 else
2291   echo "$as_me: failed program was:" >&5
2292   cat conftest.$ac_ext >&5
2293   # Passes both tests.
2294 ac_preproc_ok=:
2295 break
2296 fi
2297 rm -f conftest.err conftest.$ac_ext
2298
2299 done
2300 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2301 rm -f conftest.err conftest.$ac_ext
2302 if $ac_preproc_ok; then
2303   :
2304 else
2305   { { echo "$as_me:2305: error: C preprocessor \"$CPP\" fails sanity check" >&5
2306 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2307    { (exit 1); exit 1; }; }
2308 fi
2309
2310 ac_ext=c
2311 ac_cpp='$CPP $CPPFLAGS'
2312 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2313 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2314 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2315 ac_main_return=return
2316
2317 if test $ac_cv_c_compiler_gnu = yes; then
2318     echo "$as_me:2318: checking whether $CC needs -traditional" >&5
2319 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2320 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2321   echo $ECHO_N "(cached) $ECHO_C" >&6
2322 else
2323     ac_pattern="Autoconf.*'x'"
2324   cat >conftest.$ac_ext <<_ACEOF
2325 #line 2325 "configure"
2326 #include "confdefs.h"
2327 #include <sgtty.h>
2328 int Autoconf = TIOCGETP;
2329 _ACEOF
2330 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2331   egrep "$ac_pattern" >/dev/null 2>&1; then
2332   ac_cv_prog_gcc_traditional=yes
2333 else
2334   ac_cv_prog_gcc_traditional=no
2335 fi
2336 rm -rf conftest*
2337
2338   if test $ac_cv_prog_gcc_traditional = no; then
2339     cat >conftest.$ac_ext <<_ACEOF
2340 #line 2340 "configure"
2341 #include "confdefs.h"
2342 #include <termio.h>
2343 int Autoconf = TCGETA;
2344 _ACEOF
2345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2346   egrep "$ac_pattern" >/dev/null 2>&1; then
2347   ac_cv_prog_gcc_traditional=yes
2348 fi
2349 rm -rf conftest*
2350
2351   fi
2352 fi
2353 echo "$as_me:2353: result: $ac_cv_prog_gcc_traditional" >&5
2354 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2355   if test $ac_cv_prog_gcc_traditional = yes; then
2356     CC="$CC -traditional"
2357   fi
2358 fi
2359
2360 echo "$as_me:2360: checking whether $CC understands -c and -o together" >&5
2361 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2362 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2363   echo $ECHO_N "(cached) $ECHO_C" >&6
2364 else
2365
2366 cat > conftest.$ac_ext <<CF_EOF
2367 #include <stdio.h>
2368 int main()
2369 {
2370         ${cf_cv_main_return:-return}(0);
2371 }
2372 CF_EOF
2373 # We do the test twice because some compilers refuse to overwrite an
2374 # existing .o file with -o, though they will create one.
2375 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2376 if { (eval echo "$as_me:2376: \"$ac_try\"") >&5
2377   (eval $ac_try) 2>&5
2378   ac_status=$?
2379   echo "$as_me:2379: \$? = $ac_status" >&5
2380   (exit $ac_status); } &&
2381   test -f conftest2.$ac_objext && { (eval echo "$as_me:2381: \"$ac_try\"") >&5
2382   (eval $ac_try) 2>&5
2383   ac_status=$?
2384   echo "$as_me:2384: \$? = $ac_status" >&5
2385   (exit $ac_status); };
2386 then
2387   eval cf_cv_prog_CC_c_o=yes
2388 else
2389   eval cf_cv_prog_CC_c_o=no
2390 fi
2391 rm -rf conftest*
2392
2393 fi
2394 if test $cf_cv_prog_CC_c_o = yes; then
2395   echo "$as_me:2395: result: yes" >&5
2396 echo "${ECHO_T}yes" >&6
2397 else
2398   echo "$as_me:2398: result: no" >&5
2399 echo "${ECHO_T}no" >&6
2400 fi
2401
2402 echo "$as_me:2402: checking for POSIXized ISC" >&5
2403 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2404 if test -d /etc/conf/kconfig.d &&
2405    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2406 then
2407   echo "$as_me:2407: result: yes" >&5
2408 echo "${ECHO_T}yes" >&6
2409   ISC=yes # If later tests want to check for ISC.
2410
2411 cat >>confdefs.h <<\EOF
2412 #define _POSIX_SOURCE 1
2413 EOF
2414
2415   if test "$GCC" = yes; then
2416     CC="$CC -posix"
2417   else
2418     CC="$CC -Xp"
2419   fi
2420 else
2421   echo "$as_me:2421: result: no" >&5
2422 echo "${ECHO_T}no" >&6
2423   ISC=
2424 fi
2425
2426 # This should have been defined by AC_PROG_CC
2427 : ${CC:=cc}
2428
2429 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2430 # into CC.  This will not help with broken scripts that wrap the compiler with
2431 # options, but eliminates a more common category of user confusion.
2432 echo "$as_me:2432: checking \$CC variable" >&5
2433 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2434 case "$CC" in #(vi
2435 *[\ \   ]-[IUD]*)
2436         echo "$as_me:2436: result: broken" >&5
2437 echo "${ECHO_T}broken" >&6
2438         { echo "$as_me:2438: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2439 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2440         # humor him...
2441         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2442         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2443
2444 cf_fix_cppflags=no
2445 cf_new_cflags=
2446 cf_new_cppflags=
2447 cf_new_extra_cppflags=
2448
2449 for cf_add_cflags in $cf_flags
2450 do
2451 case $cf_fix_cppflags in
2452 no)
2453         case $cf_add_cflags in #(vi
2454         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2455                 case $cf_add_cflags in
2456                 -D*)
2457                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2458
2459                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2460                                 && test -z "${cf_tst_cflags}" \
2461                                 && cf_fix_cppflags=yes
2462
2463                         if test $cf_fix_cppflags = yes ; then
2464                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2465                                 continue
2466                         elif test "${cf_tst_cflags}" = "\"'" ; then
2467                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2468                                 continue
2469                         fi
2470                         ;;
2471                 esac
2472                 case "$CPPFLAGS" in
2473                 *$cf_add_cflags) #(vi
2474                         ;;
2475                 *) #(vi
2476                         case $cf_add_cflags in #(vi
2477                         -D*)
2478                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2479
2480 CPPFLAGS=`echo "$CPPFLAGS" | \
2481         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2482                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2483
2484                                 ;;
2485                         esac
2486                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2487                         ;;
2488                 esac
2489                 ;;
2490         *)
2491                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2492                 ;;
2493         esac
2494         ;;
2495 yes)
2496         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2497
2498         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2499
2500         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2501                 && test -z "${cf_tst_cflags}" \
2502                 && cf_fix_cppflags=no
2503         ;;
2504 esac
2505 done
2506
2507 if test -n "$cf_new_cflags" ; then
2508
2509         CFLAGS="$CFLAGS $cf_new_cflags"
2510 fi
2511
2512 if test -n "$cf_new_cppflags" ; then
2513
2514         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2515 fi
2516
2517 if test -n "$cf_new_extra_cppflags" ; then
2518
2519         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2520 fi
2521
2522         ;;
2523 *)
2524         echo "$as_me:2524: result: ok" >&5
2525 echo "${ECHO_T}ok" >&6
2526         ;;
2527 esac
2528
2529 echo "$as_me:2529: checking for ${CC:-cc} option to accept ANSI C" >&5
2530 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2531 if test "${cf_cv_ansi_cc+set}" = set; then
2532   echo $ECHO_N "(cached) $ECHO_C" >&6
2533 else
2534
2535 cf_cv_ansi_cc=no
2536 cf_save_CFLAGS="$CFLAGS"
2537 cf_save_CPPFLAGS="$CPPFLAGS"
2538 # Don't try gcc -ansi; that turns off useful extensions and
2539 # breaks some systems' header files.
2540 # AIX                   -qlanglvl=ansi
2541 # Ultrix and OSF/1      -std1
2542 # HP-UX                 -Aa -D_HPUX_SOURCE
2543 # SVR4                  -Xc
2544 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2545 for cf_arg in "-DCC_HAS_PROTOS" \
2546         "" \
2547         -qlanglvl=ansi \
2548         -std1 \
2549         -Ae \
2550         "-Aa -D_HPUX_SOURCE" \
2551         -Xc
2552 do
2553
2554 cf_fix_cppflags=no
2555 cf_new_cflags=
2556 cf_new_cppflags=
2557 cf_new_extra_cppflags=
2558
2559 for cf_add_cflags in $cf_arg
2560 do
2561 case $cf_fix_cppflags in
2562 no)
2563         case $cf_add_cflags in #(vi
2564         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2565                 case $cf_add_cflags in
2566                 -D*)
2567                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2568
2569                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2570                                 && test -z "${cf_tst_cflags}" \
2571                                 && cf_fix_cppflags=yes
2572
2573                         if test $cf_fix_cppflags = yes ; then
2574                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2575                                 continue
2576                         elif test "${cf_tst_cflags}" = "\"'" ; then
2577                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2578                                 continue
2579                         fi
2580                         ;;
2581                 esac
2582                 case "$CPPFLAGS" in
2583                 *$cf_add_cflags) #(vi
2584                         ;;
2585                 *) #(vi
2586                         case $cf_add_cflags in #(vi
2587                         -D*)
2588                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2589
2590 CPPFLAGS=`echo "$CPPFLAGS" | \
2591         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2592                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2593
2594                                 ;;
2595                         esac
2596                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2597                         ;;
2598                 esac
2599                 ;;
2600         *)
2601                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2602                 ;;
2603         esac
2604         ;;
2605 yes)
2606         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2607
2608         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2609
2610         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2611                 && test -z "${cf_tst_cflags}" \
2612                 && cf_fix_cppflags=no
2613         ;;
2614 esac
2615 done
2616
2617 if test -n "$cf_new_cflags" ; then
2618
2619         CFLAGS="$CFLAGS $cf_new_cflags"
2620 fi
2621
2622 if test -n "$cf_new_cppflags" ; then
2623
2624         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2625 fi
2626
2627 if test -n "$cf_new_extra_cppflags" ; then
2628
2629         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2630 fi
2631
2632         cat >conftest.$ac_ext <<_ACEOF
2633 #line 2633 "configure"
2634 #include "confdefs.h"
2635
2636 #ifndef CC_HAS_PROTOS
2637 #if !defined(__STDC__) || (__STDC__ != 1)
2638 choke me
2639 #endif
2640 #endif
2641
2642 int
2643 main ()
2644 {
2645
2646         int test (int i, double x);
2647         struct s1 {int (*f) (int a);};
2648         struct s2 {int (*f) (double a);};
2649   ;
2650   return 0;
2651 }
2652 _ACEOF
2653 rm -f conftest.$ac_objext
2654 if { (eval echo "$as_me:2654: \"$ac_compile\"") >&5
2655   (eval $ac_compile) 2>&5
2656   ac_status=$?
2657   echo "$as_me:2657: \$? = $ac_status" >&5
2658   (exit $ac_status); } &&
2659          { ac_try='test -s conftest.$ac_objext'
2660   { (eval echo "$as_me:2660: \"$ac_try\"") >&5
2661   (eval $ac_try) 2>&5
2662   ac_status=$?
2663   echo "$as_me:2663: \$? = $ac_status" >&5
2664   (exit $ac_status); }; }; then
2665   cf_cv_ansi_cc="$cf_arg"; break
2666 else
2667   echo "$as_me: failed program was:" >&5
2668 cat conftest.$ac_ext >&5
2669 fi
2670 rm -f conftest.$ac_objext conftest.$ac_ext
2671 done
2672 CFLAGS="$cf_save_CFLAGS"
2673 CPPFLAGS="$cf_save_CPPFLAGS"
2674
2675 fi
2676 echo "$as_me:2676: result: $cf_cv_ansi_cc" >&5
2677 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2678
2679 if test "$cf_cv_ansi_cc" != "no"; then
2680 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2681
2682 cf_fix_cppflags=no
2683 cf_new_cflags=
2684 cf_new_cppflags=
2685 cf_new_extra_cppflags=
2686
2687 for cf_add_cflags in $cf_cv_ansi_cc
2688 do
2689 case $cf_fix_cppflags in
2690 no)
2691         case $cf_add_cflags in #(vi
2692         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2693                 case $cf_add_cflags in
2694                 -D*)
2695                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2696
2697                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2698                                 && test -z "${cf_tst_cflags}" \
2699                                 && cf_fix_cppflags=yes
2700
2701                         if test $cf_fix_cppflags = yes ; then
2702                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2703                                 continue
2704                         elif test "${cf_tst_cflags}" = "\"'" ; then
2705                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2706                                 continue
2707                         fi
2708                         ;;
2709                 esac
2710                 case "$CPPFLAGS" in
2711                 *$cf_add_cflags) #(vi
2712                         ;;
2713                 *) #(vi
2714                         case $cf_add_cflags in #(vi
2715                         -D*)
2716                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2717
2718 CPPFLAGS=`echo "$CPPFLAGS" | \
2719         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2720                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2721
2722                                 ;;
2723                         esac
2724                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2725                         ;;
2726                 esac
2727                 ;;
2728         *)
2729                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2730                 ;;
2731         esac
2732         ;;
2733 yes)
2734         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2735
2736         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2737
2738         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2739                 && test -z "${cf_tst_cflags}" \
2740                 && cf_fix_cppflags=no
2741         ;;
2742 esac
2743 done
2744
2745 if test -n "$cf_new_cflags" ; then
2746
2747         CFLAGS="$CFLAGS $cf_new_cflags"
2748 fi
2749
2750 if test -n "$cf_new_cppflags" ; then
2751
2752         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2753 fi
2754
2755 if test -n "$cf_new_extra_cppflags" ; then
2756
2757         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2758 fi
2759
2760 else
2761         cat >>confdefs.h <<\EOF
2762 #define CC_HAS_PROTOS 1
2763 EOF
2764
2765 fi
2766 fi
2767
2768 if test "$cf_cv_ansi_cc" = "no"; then
2769         { { echo "$as_me:2769: error: Your compiler does not appear to recognize prototypes.
2770 You have the following choices:
2771         a. adjust your compiler options
2772         b. get an up-to-date compiler
2773         c. use a wrapper such as unproto" >&5
2774 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2775 You have the following choices:
2776         a. adjust your compiler options
2777         b. get an up-to-date compiler
2778         c. use a wrapper such as unproto" >&2;}
2779    { (exit 1); exit 1; }; }
2780 fi
2781
2782 case $cf_cv_system_name in
2783 os2*)
2784     CFLAGS="$CFLAGS -Zmt"
2785     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2786     CXXFLAGS="$CXXFLAGS -Zmt"
2787     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2788     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2789     ac_cv_exeext=.exe
2790     ;;
2791 esac
2792
2793 PROG_EXT="$EXEEXT"
2794
2795 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2796 #define PROG_EXT "$PROG_EXT"
2797 EOF
2798
2799 if test "$cross_compiling" = yes ; then
2800   LDCONFIG=:
2801 else
2802 case "$cf_cv_system_name" in #(vi
2803 dragonfly*|mirbsd*|freebsd*) #(vi
2804   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2805   ;;
2806 *) LDPATH=$PATH:/sbin:/usr/sbin
2807   # Extract the first word of "ldconfig", so it can be a program name with args.
2808 set dummy ldconfig; ac_word=$2
2809 echo "$as_me:2809: checking for $ac_word" >&5
2810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2811 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2812   echo $ECHO_N "(cached) $ECHO_C" >&6
2813 else
2814   case $LDCONFIG in
2815   [\\/]* | ?:[\\/]*)
2816   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2817   ;;
2818   *)
2819   ac_save_IFS=$IFS; IFS=$ac_path_separator
2820 ac_dummy="$LDPATH"
2821 for ac_dir in $ac_dummy; do
2822   IFS=$ac_save_IFS
2823   test -z "$ac_dir" && ac_dir=.
2824   if $as_executable_p "$ac_dir/$ac_word"; then
2825    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2826    echo "$as_me:2826: found $ac_dir/$ac_word" >&5
2827    break
2828 fi
2829 done
2830
2831   ;;
2832 esac
2833 fi
2834 LDCONFIG=$ac_cv_path_LDCONFIG
2835
2836 if test -n "$LDCONFIG"; then
2837   echo "$as_me:2837: result: $LDCONFIG" >&5
2838 echo "${ECHO_T}$LDCONFIG" >&6
2839 else
2840   echo "$as_me:2840: result: no" >&5
2841 echo "${ECHO_T}no" >&6
2842 fi
2843
2844   ;;
2845 esac
2846 fi
2847
2848 echo "$as_me:2848: checking if you want to ensure bool is consistent with C++" >&5
2849 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2850
2851 # Check whether --with-cxx or --without-cxx was given.
2852 if test "${with_cxx+set}" = set; then
2853   withval="$with_cxx"
2854   cf_with_cxx=$withval
2855 else
2856   cf_with_cxx=yes
2857 fi;
2858 echo "$as_me:2858: result: $cf_with_cxx" >&5
2859 echo "${ECHO_T}$cf_with_cxx" >&6
2860 if test "X$cf_with_cxx" = Xno ; then
2861         CXX=""
2862         GXX=""
2863 else
2864         # with autoconf 2.13, we can change the error to a warning:
2865                 ac_ext=cc
2866 ac_cpp='$CXXCPP $CPPFLAGS'
2867 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2868 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2869 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2870 ac_main_return=return
2871 if test -n "$ac_tool_prefix"; then
2872   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2873   do
2874     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2875 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2876 echo "$as_me:2876: checking for $ac_word" >&5
2877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2878 if test "${ac_cv_prog_CXX+set}" = set; then
2879   echo $ECHO_N "(cached) $ECHO_C" >&6
2880 else
2881   if test -n "$CXX"; then
2882   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2883 else
2884   ac_save_IFS=$IFS; IFS=$ac_path_separator
2885 ac_dummy="$PATH"
2886 for ac_dir in $ac_dummy; do
2887   IFS=$ac_save_IFS
2888   test -z "$ac_dir" && ac_dir=.
2889   $as_executable_p "$ac_dir/$ac_word" || continue
2890 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2891 echo "$as_me:2891: found $ac_dir/$ac_word" >&5
2892 break
2893 done
2894
2895 fi
2896 fi
2897 CXX=$ac_cv_prog_CXX
2898 if test -n "$CXX"; then
2899   echo "$as_me:2899: result: $CXX" >&5
2900 echo "${ECHO_T}$CXX" >&6
2901 else
2902   echo "$as_me:2902: result: no" >&5
2903 echo "${ECHO_T}no" >&6
2904 fi
2905
2906     test -n "$CXX" && break
2907   done
2908 fi
2909 if test -z "$CXX"; then
2910   ac_ct_CXX=$CXX
2911   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2912 do
2913   # Extract the first word of "$ac_prog", so it can be a program name with args.
2914 set dummy $ac_prog; ac_word=$2
2915 echo "$as_me:2915: checking for $ac_word" >&5
2916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2917 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2918   echo $ECHO_N "(cached) $ECHO_C" >&6
2919 else
2920   if test -n "$ac_ct_CXX"; then
2921   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2922 else
2923   ac_save_IFS=$IFS; IFS=$ac_path_separator
2924 ac_dummy="$PATH"
2925 for ac_dir in $ac_dummy; do
2926   IFS=$ac_save_IFS
2927   test -z "$ac_dir" && ac_dir=.
2928   $as_executable_p "$ac_dir/$ac_word" || continue
2929 ac_cv_prog_ac_ct_CXX="$ac_prog"
2930 echo "$as_me:2930: found $ac_dir/$ac_word" >&5
2931 break
2932 done
2933
2934 fi
2935 fi
2936 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2937 if test -n "$ac_ct_CXX"; then
2938   echo "$as_me:2938: result: $ac_ct_CXX" >&5
2939 echo "${ECHO_T}$ac_ct_CXX" >&6
2940 else
2941   echo "$as_me:2941: result: no" >&5
2942 echo "${ECHO_T}no" >&6
2943 fi
2944
2945   test -n "$ac_ct_CXX" && break
2946 done
2947 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2948
2949   CXX=$ac_ct_CXX
2950 fi
2951
2952 # Provide some information about the compiler.
2953 echo "$as_me:2953:" \
2954      "checking for C++ compiler version" >&5
2955 ac_compiler=`set X $ac_compile; echo $2`
2956 { (eval echo "$as_me:2956: \"$ac_compiler --version </dev/null >&5\"") >&5
2957   (eval $ac_compiler --version </dev/null >&5) 2>&5
2958   ac_status=$?
2959   echo "$as_me:2959: \$? = $ac_status" >&5
2960   (exit $ac_status); }
2961 { (eval echo "$as_me:2961: \"$ac_compiler -v </dev/null >&5\"") >&5
2962   (eval $ac_compiler -v </dev/null >&5) 2>&5
2963   ac_status=$?
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit $ac_status); }
2966 { (eval echo "$as_me:2966: \"$ac_compiler -V </dev/null >&5\"") >&5
2967   (eval $ac_compiler -V </dev/null >&5) 2>&5
2968   ac_status=$?
2969   echo "$as_me:2969: \$? = $ac_status" >&5
2970   (exit $ac_status); }
2971
2972 echo "$as_me:2972: checking whether we are using the GNU C++ compiler" >&5
2973 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2974 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2975   echo $ECHO_N "(cached) $ECHO_C" >&6
2976 else
2977   cat >conftest.$ac_ext <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980
2981 int
2982 main ()
2983 {
2984 #ifndef __GNUC__
2985        choke me
2986 #endif
2987
2988   ;
2989   return 0;
2990 }
2991 _ACEOF
2992 rm -f conftest.$ac_objext
2993 if { (eval echo "$as_me:2993: \"$ac_compile\"") >&5
2994   (eval $ac_compile) 2>&5
2995   ac_status=$?
2996   echo "$as_me:2996: \$? = $ac_status" >&5
2997   (exit $ac_status); } &&
2998          { ac_try='test -s conftest.$ac_objext'
2999   { (eval echo "$as_me:2999: \"$ac_try\"") >&5
3000   (eval $ac_try) 2>&5
3001   ac_status=$?
3002   echo "$as_me:3002: \$? = $ac_status" >&5
3003   (exit $ac_status); }; }; then
3004   ac_compiler_gnu=yes
3005 else
3006   echo "$as_me: failed program was:" >&5
3007 cat conftest.$ac_ext >&5
3008 ac_compiler_gnu=no
3009 fi
3010 rm -f conftest.$ac_objext conftest.$ac_ext
3011 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3012
3013 fi
3014 echo "$as_me:3014: result: $ac_cv_cxx_compiler_gnu" >&5
3015 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3016 GXX=`test $ac_compiler_gnu = yes && echo yes`
3017 ac_test_CXXFLAGS=${CXXFLAGS+set}
3018 ac_save_CXXFLAGS=$CXXFLAGS
3019 CXXFLAGS="-g"
3020 echo "$as_me:3020: checking whether $CXX accepts -g" >&5
3021 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3022 if test "${ac_cv_prog_cxx_g+set}" = set; then
3023   echo $ECHO_N "(cached) $ECHO_C" >&6
3024 else
3025   cat >conftest.$ac_ext <<_ACEOF
3026 #line 3026 "configure"
3027 #include "confdefs.h"
3028
3029 int
3030 main ()
3031 {
3032
3033   ;
3034   return 0;
3035 }
3036 _ACEOF
3037 rm -f conftest.$ac_objext
3038 if { (eval echo "$as_me:3038: \"$ac_compile\"") >&5
3039   (eval $ac_compile) 2>&5
3040   ac_status=$?
3041   echo "$as_me:3041: \$? = $ac_status" >&5
3042   (exit $ac_status); } &&
3043          { ac_try='test -s conftest.$ac_objext'
3044   { (eval echo "$as_me:3044: \"$ac_try\"") >&5
3045   (eval $ac_try) 2>&5
3046   ac_status=$?
3047   echo "$as_me:3047: \$? = $ac_status" >&5
3048   (exit $ac_status); }; }; then
3049   ac_cv_prog_cxx_g=yes
3050 else
3051   echo "$as_me: failed program was:" >&5
3052 cat conftest.$ac_ext >&5
3053 ac_cv_prog_cxx_g=no
3054 fi
3055 rm -f conftest.$ac_objext conftest.$ac_ext
3056 fi
3057 echo "$as_me:3057: result: $ac_cv_prog_cxx_g" >&5
3058 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3059 if test "$ac_test_CXXFLAGS" = set; then
3060   CXXFLAGS=$ac_save_CXXFLAGS
3061 elif test $ac_cv_prog_cxx_g = yes; then
3062   if test "$GXX" = yes; then
3063     CXXFLAGS="-g -O2"
3064   else
3065     CXXFLAGS="-g"
3066   fi
3067 else
3068   if test "$GXX" = yes; then
3069     CXXFLAGS="-O2"
3070   else
3071     CXXFLAGS=
3072   fi
3073 fi
3074 for ac_declaration in \
3075    ''\
3076    '#include <stdlib.h>' \
3077    'extern "C" void std::exit (int) throw (); using std::exit;' \
3078    'extern "C" void std::exit (int); using std::exit;' \
3079    'extern "C" void exit (int) throw ();' \
3080    'extern "C" void exit (int);' \
3081    'void exit (int);'
3082 do
3083   cat >conftest.$ac_ext <<_ACEOF
3084 #line 3084 "configure"
3085 #include "confdefs.h"
3086 #include <stdlib.h>
3087 $ac_declaration
3088 int
3089 main ()
3090 {
3091 exit (42);
3092   ;
3093   return 0;
3094 }
3095 _ACEOF
3096 rm -f conftest.$ac_objext
3097 if { (eval echo "$as_me:3097: \"$ac_compile\"") >&5
3098   (eval $ac_compile) 2>&5
3099   ac_status=$?
3100   echo "$as_me:3100: \$? = $ac_status" >&5
3101   (exit $ac_status); } &&
3102          { ac_try='test -s conftest.$ac_objext'
3103   { (eval echo "$as_me:3103: \"$ac_try\"") >&5
3104   (eval $ac_try) 2>&5
3105   ac_status=$?
3106   echo "$as_me:3106: \$? = $ac_status" >&5
3107   (exit $ac_status); }; }; then
3108   :
3109 else
3110   echo "$as_me: failed program was:" >&5
3111 cat conftest.$ac_ext >&5
3112 continue
3113 fi
3114 rm -f conftest.$ac_objext conftest.$ac_ext
3115   cat >conftest.$ac_ext <<_ACEOF
3116 #line 3116 "configure"
3117 #include "confdefs.h"
3118 $ac_declaration
3119 int
3120 main ()
3121 {
3122 exit (42);
3123   ;
3124   return 0;
3125 }
3126 _ACEOF
3127 rm -f conftest.$ac_objext
3128 if { (eval echo "$as_me:3128: \"$ac_compile\"") >&5
3129   (eval $ac_compile) 2>&5
3130   ac_status=$?
3131   echo "$as_me:3131: \$? = $ac_status" >&5
3132   (exit $ac_status); } &&
3133          { ac_try='test -s conftest.$ac_objext'
3134   { (eval echo "$as_me:3134: \"$ac_try\"") >&5
3135   (eval $ac_try) 2>&5
3136   ac_status=$?
3137   echo "$as_me:3137: \$? = $ac_status" >&5
3138   (exit $ac_status); }; }; then
3139   break
3140 else
3141   echo "$as_me: failed program was:" >&5
3142 cat conftest.$ac_ext >&5
3143 fi
3144 rm -f conftest.$ac_objext conftest.$ac_ext
3145 done
3146 rm -rf conftest*
3147 if test -n "$ac_declaration"; then
3148   echo '#ifdef __cplusplus' >>confdefs.h
3149   echo $ac_declaration      >>confdefs.h
3150   echo '#endif'             >>confdefs.h
3151 fi
3152
3153 ac_ext=c
3154 ac_cpp='$CPP $CPPFLAGS'
3155 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3156 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3157 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3158 ac_main_return=return
3159
3160                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3161         if test "$CXX" = "g++" ; then
3162                 # Extract the first word of "g++", so it can be a program name with args.
3163 set dummy g++; ac_word=$2
3164 echo "$as_me:3164: checking for $ac_word" >&5
3165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3166 if test "${ac_cv_path_CXX+set}" = set; then
3167   echo $ECHO_N "(cached) $ECHO_C" >&6
3168 else
3169   case $CXX in
3170   [\\/]* | ?:[\\/]*)
3171   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3172   ;;
3173   *)
3174   ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 ac_dummy="$PATH"
3176 for ac_dir in $ac_dummy; do
3177   IFS=$ac_save_IFS
3178   test -z "$ac_dir" && ac_dir=.
3179   if $as_executable_p "$ac_dir/$ac_word"; then
3180    ac_cv_path_CXX="$ac_dir/$ac_word"
3181    echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182    break
3183 fi
3184 done
3185
3186   ;;
3187 esac
3188 fi
3189 CXX=$ac_cv_path_CXX
3190
3191 if test -n "$CXX"; then
3192   echo "$as_me:3192: result: $CXX" >&5
3193 echo "${ECHO_T}$CXX" >&6
3194 else
3195   echo "$as_me:3195: result: no" >&5
3196 echo "${ECHO_T}no" >&6
3197 fi
3198
3199         fi
3200         if test "$CXX" = "g++" ; then
3201                 { echo "$as_me:3201: WARNING: ignoring hardcoded g++" >&5
3202 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3203                 cf_with_cxx=no; CXX=""; GXX="";
3204         fi
3205 fi
3206
3207 GXX_VERSION=none
3208 if test "$GXX" = yes; then
3209         echo "$as_me:3209: checking version of g++" >&5
3210 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3211         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3212         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3213         echo "$as_me:3213: result: $GXX_VERSION" >&5
3214 echo "${ECHO_T}$GXX_VERSION" >&6
3215 fi
3216
3217 case $GXX_VERSION in
3218 1*|2.[0-6]*)
3219         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3220         # cf_cxx_library=no
3221         { echo "$as_me:3221: WARNING: templates do not work" >&5
3222 echo "$as_me: WARNING: templates do not work" >&2;}
3223         ;;
3224 esac
3225
3226 echo "$as_me:3226: checking if you want to build C++ binding and demo" >&5
3227 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3228
3229 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3230 if test "${with_cxx_binding+set}" = set; then
3231   withval="$with_cxx_binding"
3232   cf_with_cxx_binding=$withval
3233 else
3234   cf_with_cxx_binding=$cf_with_cxx
3235 fi;
3236 echo "$as_me:3236: result: $cf_with_cxx_binding" >&5
3237 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3238
3239 echo "$as_me:3239: checking if you want to build with Ada95" >&5
3240 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3241
3242 # Check whether --with-ada or --without-ada was given.
3243 if test "${with_ada+set}" = set; then
3244   withval="$with_ada"
3245   cf_with_ada=$withval
3246 else
3247   cf_with_ada=yes
3248 fi;
3249 echo "$as_me:3249: result: $cf_with_ada" >&5
3250 echo "${ECHO_T}$cf_with_ada" >&6
3251
3252 echo "$as_me:3252: checking if you want to install manpages" >&5
3253 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3254
3255 # Check whether --with-manpages or --without-manpages was given.
3256 if test "${with_manpages+set}" = set; then
3257   withval="$with_manpages"
3258   cf_with_manpages=$withval
3259 else
3260   cf_with_manpages=yes
3261 fi;
3262 echo "$as_me:3262: result: $cf_with_manpages" >&5
3263 echo "${ECHO_T}$cf_with_manpages" >&6
3264
3265 echo "$as_me:3265: checking if you want to build programs such as tic" >&5
3266 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3267
3268 # Check whether --with-progs or --without-progs was given.
3269 if test "${with_progs+set}" = set; then
3270   withval="$with_progs"
3271   cf_with_progs=$withval
3272 else
3273   cf_with_progs=yes
3274 fi;
3275 echo "$as_me:3275: result: $cf_with_progs" >&5
3276 echo "${ECHO_T}$cf_with_progs" >&6
3277
3278 echo "$as_me:3278: checking if you want to build test-programs" >&5
3279 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3280
3281 # Check whether --with-tests or --without-tests was given.
3282 if test "${with_tests+set}" = set; then
3283   withval="$with_tests"
3284   cf_with_tests=$withval
3285 else
3286   cf_with_tests=yes
3287 fi;
3288 echo "$as_me:3288: result: $cf_with_tests" >&5
3289 echo "${ECHO_T}$cf_with_tests" >&6
3290
3291 echo "$as_me:3291: checking if you wish to install curses.h" >&5
3292 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3293
3294 # Check whether --with-curses-h or --without-curses-h was given.
3295 if test "${with_curses_h+set}" = set; then
3296   withval="$with_curses_h"
3297   with_curses_h=$withval
3298 else
3299   with_curses_h=yes
3300 fi;
3301 echo "$as_me:3301: result: $with_curses_h" >&5
3302 echo "${ECHO_T}$with_curses_h" >&6
3303
3304 modules_to_build="ncurses"
3305 if test "X$cf_with_progs" != Xno ; then
3306 modules_to_build="$modules_to_build progs tack"
3307 fi
3308 modules_to_build="$modules_to_build panel menu form"
3309
3310 test "$program_prefix" != NONE &&
3311   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3312 # Use a double $ so make ignores it.
3313 test "$program_suffix" != NONE &&
3314   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3315 # Double any \ or $.  echo might interpret backslashes.
3316 # By default was `s,x,x', remove it if useless.
3317 cat <<\_ACEOF >conftest.sed
3318 s/[\\$]/&&/g;s/;s,x,x,$//
3319 _ACEOF
3320 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3321 rm conftest.sed
3322
3323 for ac_prog in mawk gawk nawk awk
3324 do
3325   # Extract the first word of "$ac_prog", so it can be a program name with args.
3326 set dummy $ac_prog; ac_word=$2
3327 echo "$as_me:3327: checking for $ac_word" >&5
3328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3329 if test "${ac_cv_prog_AWK+set}" = set; then
3330   echo $ECHO_N "(cached) $ECHO_C" >&6
3331 else
3332   if test -n "$AWK"; then
3333   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3334 else
3335   ac_save_IFS=$IFS; IFS=$ac_path_separator
3336 ac_dummy="$PATH"
3337 for ac_dir in $ac_dummy; do
3338   IFS=$ac_save_IFS
3339   test -z "$ac_dir" && ac_dir=.
3340   $as_executable_p "$ac_dir/$ac_word" || continue
3341 ac_cv_prog_AWK="$ac_prog"
3342 echo "$as_me:3342: found $ac_dir/$ac_word" >&5
3343 break
3344 done
3345
3346 fi
3347 fi
3348 AWK=$ac_cv_prog_AWK
3349 if test -n "$AWK"; then
3350   echo "$as_me:3350: result: $AWK" >&5
3351 echo "${ECHO_T}$AWK" >&6
3352 else
3353   echo "$as_me:3353: result: no" >&5
3354 echo "${ECHO_T}no" >&6
3355 fi
3356
3357   test -n "$AWK" && break
3358 done
3359
3360 test -z "$AWK" && { { echo "$as_me:3360: error: No awk program found" >&5
3361 echo "$as_me: error: No awk program found" >&2;}
3362    { (exit 1); exit 1; }; }
3363
3364 echo "$as_me:3364: checking for egrep" >&5
3365 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3366 if test "${ac_cv_prog_egrep+set}" = set; then
3367   echo $ECHO_N "(cached) $ECHO_C" >&6
3368 else
3369   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3370     then ac_cv_prog_egrep='grep -E'
3371     else ac_cv_prog_egrep='egrep'
3372     fi
3373 fi
3374 echo "$as_me:3374: result: $ac_cv_prog_egrep" >&5
3375 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3376  EGREP=$ac_cv_prog_egrep
3377
3378 test -z "$EGREP" && { { echo "$as_me:3378: error: No egrep program found" >&5
3379 echo "$as_me: error: No egrep program found" >&2;}
3380    { (exit 1); exit 1; }; }
3381
3382 # Find a good install program.  We prefer a C program (faster),
3383 # so one script is as good as another.  But avoid the broken or
3384 # incompatible versions:
3385 # SysV /etc/install, /usr/sbin/install
3386 # SunOS /usr/etc/install
3387 # IRIX /sbin/install
3388 # AIX /bin/install
3389 # AmigaOS /C/install, which installs bootblocks on floppy discs
3390 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3391 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3392 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3393 # ./install, which can be erroneously created by make from ./install.sh.
3394 echo "$as_me:3394: checking for a BSD compatible install" >&5
3395 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3396 if test -z "$INSTALL"; then
3397 if test "${ac_cv_path_install+set}" = set; then
3398   echo $ECHO_N "(cached) $ECHO_C" >&6
3399 else
3400     ac_save_IFS=$IFS; IFS=$ac_path_separator
3401   for ac_dir in $PATH; do
3402     IFS=$ac_save_IFS
3403     # Account for people who put trailing slashes in PATH elements.
3404     case $ac_dir/ in
3405     / | ./ | .// | /cC/* \
3406     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3407     | /usr/ucb/* ) ;;
3408     *)
3409       # OSF1 and SCO ODT 3.0 have their own names for install.
3410       # Don't use installbsd from OSF since it installs stuff as root
3411       # by default.
3412       for ac_prog in ginstall scoinst install; do
3413         if $as_executable_p "$ac_dir/$ac_prog"; then
3414           if test $ac_prog = install &&
3415             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3416             # AIX install.  It has an incompatible calling convention.
3417             :
3418           elif test $ac_prog = install &&
3419             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3420             # program-specific install script used by HP pwplus--don't use.
3421             :
3422           else
3423             ac_cv_path_install="$ac_dir/$ac_prog -c"
3424             break 2
3425           fi
3426         fi
3427       done
3428       ;;
3429     esac
3430   done
3431
3432 fi
3433   if test "${ac_cv_path_install+set}" = set; then
3434     INSTALL=$ac_cv_path_install
3435   else
3436     # As a last resort, use the slow shell script.  We don't cache a
3437     # path for INSTALL within a source directory, because that will
3438     # break other packages using the cache if that directory is
3439     # removed, or if the path is relative.
3440     INSTALL=$ac_install_sh
3441   fi
3442 fi
3443 echo "$as_me:3443: result: $INSTALL" >&5
3444 echo "${ECHO_T}$INSTALL" >&6
3445
3446 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3447 # It thinks the first close brace ends the variable substitution.
3448 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3449
3450 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3451
3452 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3453
3454 case $INSTALL in
3455 /*)
3456   ;;
3457 *)
3458   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3459   test -z "$cf_dir" && cf_dir=.
3460   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3461   ;;
3462 esac
3463
3464 for ac_prog in tdlint lint alint splint lclint
3465 do
3466   # Extract the first word of "$ac_prog", so it can be a program name with args.
3467 set dummy $ac_prog; ac_word=$2
3468 echo "$as_me:3468: checking for $ac_word" >&5
3469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3470 if test "${ac_cv_prog_LINT+set}" = set; then
3471   echo $ECHO_N "(cached) $ECHO_C" >&6
3472 else
3473   if test -n "$LINT"; then
3474   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3475 else
3476   ac_save_IFS=$IFS; IFS=$ac_path_separator
3477 ac_dummy="$PATH"
3478 for ac_dir in $ac_dummy; do
3479   IFS=$ac_save_IFS
3480   test -z "$ac_dir" && ac_dir=.
3481   $as_executable_p "$ac_dir/$ac_word" || continue
3482 ac_cv_prog_LINT="$ac_prog"
3483 echo "$as_me:3483: found $ac_dir/$ac_word" >&5
3484 break
3485 done
3486
3487 fi
3488 fi
3489 LINT=$ac_cv_prog_LINT
3490 if test -n "$LINT"; then
3491   echo "$as_me:3491: result: $LINT" >&5
3492 echo "${ECHO_T}$LINT" >&6
3493 else
3494   echo "$as_me:3494: result: no" >&5
3495 echo "${ECHO_T}no" >&6
3496 fi
3497
3498   test -n "$LINT" && break
3499 done
3500
3501 echo "$as_me:3501: checking whether ln -s works" >&5
3502 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3503 LN_S=$as_ln_s
3504 if test "$LN_S" = "ln -s"; then
3505   echo "$as_me:3505: result: yes" >&5
3506 echo "${ECHO_T}yes" >&6
3507 else
3508   echo "$as_me:3508: result: no, using $LN_S" >&5
3509 echo "${ECHO_T}no, using $LN_S" >&6
3510 fi
3511
3512 echo "$as_me:3512: checking if $LN_S -f options work" >&5
3513 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3514
3515 rm -f conf$$.src conf$$dst
3516 echo >conf$$.dst
3517 echo first >conf$$.src
3518 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3519         cf_prog_ln_sf=yes
3520 else
3521         cf_prog_ln_sf=no
3522 fi
3523 rm -f conf$$.dst conf$$src
3524 echo "$as_me:3524: result: $cf_prog_ln_sf" >&5
3525 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3526
3527 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3528
3529 echo "$as_me:3529: checking for long file names" >&5
3530 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3531 if test "${ac_cv_sys_long_file_names+set}" = set; then
3532   echo $ECHO_N "(cached) $ECHO_C" >&6
3533 else
3534   ac_cv_sys_long_file_names=yes
3535 # Test for long file names in all the places we know might matter:
3536 #      .                the current directory, where building will happen
3537 #      $prefix/lib      where we will be installing things
3538 #      $exec_prefix/lib likewise
3539 # eval it to expand exec_prefix.
3540 #      $TMPDIR          if set, where it might want to write temporary files
3541 # if $TMPDIR is not set:
3542 #      /tmp             where it might want to write temporary files
3543 #      /var/tmp         likewise
3544 #      /usr/tmp         likewise
3545 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3546   ac_tmpdirs=$TMPDIR
3547 else
3548   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3549 fi
3550 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3551   test -d $ac_dir || continue
3552   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3553   ac_xdir=$ac_dir/cf$$
3554   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3555   ac_tf1=$ac_xdir/conftest9012345
3556   ac_tf2=$ac_xdir/conftest9012346
3557   (echo 1 >$ac_tf1) 2>/dev/null
3558   (echo 2 >$ac_tf2) 2>/dev/null
3559   ac_val=`cat $ac_tf1 2>/dev/null`
3560   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3561     ac_cv_sys_long_file_names=no
3562     rm -rf $ac_xdir 2>/dev/null
3563     break
3564   fi
3565   rm -rf $ac_xdir 2>/dev/null
3566 done
3567 fi
3568 echo "$as_me:3568: result: $ac_cv_sys_long_file_names" >&5
3569 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3570 if test $ac_cv_sys_long_file_names = yes; then
3571
3572 cat >>confdefs.h <<\EOF
3573 #define HAVE_LONG_FILE_NAMES 1
3574 EOF
3575
3576 fi
3577
3578 # if we find pkg-config, check if we should install the ".pc" files.
3579
3580 echo "$as_me:3580: checking if you want to use pkg-config" >&5
3581 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3582
3583 # Check whether --with-pkg-config or --without-pkg-config was given.
3584 if test "${with_pkg_config+set}" = set; then
3585   withval="$with_pkg_config"
3586   cf_pkg_config=$withval
3587 else
3588   cf_pkg_config=yes
3589 fi;
3590 echo "$as_me:3590: result: $cf_pkg_config" >&5
3591 echo "${ECHO_T}$cf_pkg_config" >&6
3592
3593 case $cf_pkg_config in #(vi
3594 no) #(vi
3595         PKG_CONFIG=none
3596         ;;
3597 yes) #(vi
3598
3599 if test -n "$ac_tool_prefix"; then
3600   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3601 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3602 echo "$as_me:3602: checking for $ac_word" >&5
3603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3604 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3605   echo $ECHO_N "(cached) $ECHO_C" >&6
3606 else
3607   case $PKG_CONFIG in
3608   [\\/]* | ?:[\\/]*)
3609   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3610   ;;
3611   *)
3612   ac_save_IFS=$IFS; IFS=$ac_path_separator
3613 ac_dummy="$PATH"
3614 for ac_dir in $ac_dummy; do
3615   IFS=$ac_save_IFS
3616   test -z "$ac_dir" && ac_dir=.
3617   if $as_executable_p "$ac_dir/$ac_word"; then
3618    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3619    echo "$as_me:3619: found $ac_dir/$ac_word" >&5
3620    break
3621 fi
3622 done
3623
3624   ;;
3625 esac
3626 fi
3627 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3628
3629 if test -n "$PKG_CONFIG"; then
3630   echo "$as_me:3630: result: $PKG_CONFIG" >&5
3631 echo "${ECHO_T}$PKG_CONFIG" >&6
3632 else
3633   echo "$as_me:3633: result: no" >&5
3634 echo "${ECHO_T}no" >&6
3635 fi
3636
3637 fi
3638 if test -z "$ac_cv_path_PKG_CONFIG"; then
3639   ac_pt_PKG_CONFIG=$PKG_CONFIG
3640   # Extract the first word of "pkg-config", so it can be a program name with args.
3641 set dummy pkg-config; ac_word=$2
3642 echo "$as_me:3642: checking for $ac_word" >&5
3643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3644 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3645   echo $ECHO_N "(cached) $ECHO_C" >&6
3646 else
3647   case $ac_pt_PKG_CONFIG in
3648   [\\/]* | ?:[\\/]*)
3649   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3650   ;;
3651   *)
3652   ac_save_IFS=$IFS; IFS=$ac_path_separator
3653 ac_dummy="$PATH"
3654 for ac_dir in $ac_dummy; do
3655   IFS=$ac_save_IFS
3656   test -z "$ac_dir" && ac_dir=.
3657   if $as_executable_p "$ac_dir/$ac_word"; then
3658    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3659    echo "$as_me:3659: found $ac_dir/$ac_word" >&5
3660    break
3661 fi
3662 done
3663
3664   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3665   ;;
3666 esac
3667 fi
3668 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3669
3670 if test -n "$ac_pt_PKG_CONFIG"; then
3671   echo "$as_me:3671: result: $ac_pt_PKG_CONFIG" >&5
3672 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3673 else
3674   echo "$as_me:3674: result: no" >&5
3675 echo "${ECHO_T}no" >&6
3676 fi
3677
3678   PKG_CONFIG=$ac_pt_PKG_CONFIG
3679 else
3680   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3681 fi
3682
3683         ;;
3684 *)
3685         PKG_CONFIG=$withval
3686         ;;
3687 esac
3688
3689 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3690 if test "$PKG_CONFIG" != none ; then
3691
3692 if test "x$prefix" != xNONE; then
3693   cf_path_syntax="$prefix"
3694 else
3695   cf_path_syntax="$ac_default_prefix"
3696 fi
3697
3698 case ".$PKG_CONFIG" in #(vi
3699 .\$\(*\)*|.\'*\'*) #(vi
3700   ;;
3701 ..|./*|.\\*) #(vi
3702   ;;
3703 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3704   ;;
3705 .\${*prefix}*) #(vi
3706   eval PKG_CONFIG="$PKG_CONFIG"
3707   case ".$PKG_CONFIG" in #(vi
3708   .NONE/*)
3709     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3710     ;;
3711   esac
3712   ;; #(vi
3713 .no|.NONE/*)
3714   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3715   ;;
3716 *)
3717   { { echo "$as_me:3717: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3718 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3719    { (exit 1); exit 1; }; }
3720   ;;
3721 esac
3722
3723 fi
3724
3725 if test "$PKG_CONFIG" != none ; then
3726         echo "$as_me:3726: checking for $PKG_CONFIG library directory" >&5
3727 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3728
3729 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3730 if test "${with_pkg_config_libdir+set}" = set; then
3731   withval="$with_pkg_config_libdir"
3732   PKG_CONFIG_LIBDIR=$withval
3733 else
3734   PKG_CONFIG_LIBDIR=yes
3735 fi;
3736
3737         case x$PKG_CONFIG_LIBDIR in #(vi
3738         x/*) #(vi
3739                 ;;
3740         xyes) #(vi
3741                 # look for the library directory using the same prefix as the executable
3742                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3743                 case x`(arch) 2>/dev/null` in #(vi
3744                 *64) #(vi
3745                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3746                         do
3747                                 if test -d $cf_config/pkgconfig
3748                                 then
3749                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3750                                         break
3751                                 fi
3752                         done
3753                         ;;
3754                 *)
3755                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3756                         ;;
3757                 esac
3758                 ;;
3759         *)
3760                 ;;
3761         esac
3762
3763         echo "$as_me:3763: result: $PKG_CONFIG_LIBDIR" >&5
3764 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3765 fi
3766
3767 if test "$PKG_CONFIG" != none ; then
3768         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3769                 echo "$as_me:3769: checking if we should install .pc files for $PKG_CONFIG" >&5
3770 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3771
3772 # Check whether --enable-pc-files or --disable-pc-files was given.
3773 if test "${enable_pc_files+set}" = set; then
3774   enableval="$enable_pc_files"
3775   enable_pc_files=$enableval
3776 else
3777   enable_pc_files=no
3778 fi;
3779                 echo "$as_me:3779: result: $enable_pc_files" >&5
3780 echo "${ECHO_T}$enable_pc_files" >&6
3781         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3782                 enable_pc_files=no
3783                 { echo "$as_me:3783: WARNING: did not find $PKG_CONFIG library" >&5
3784 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3785         fi
3786 else
3787         enable_pc_files=no
3788 fi
3789
3790 echo "$as_me:3790: checking if we should assume mixed-case filenames" >&5
3791 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3792
3793 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3794 if test "${enable_mixed_case+set}" = set; then
3795   enableval="$enable_mixed_case"
3796   enable_mixedcase=$enableval
3797 else
3798   enable_mixedcase=auto
3799 fi;
3800 echo "$as_me:3800: result: $enable_mixedcase" >&5
3801 echo "${ECHO_T}$enable_mixedcase" >&6
3802 if test "$enable_mixedcase" = "auto" ; then
3803
3804 echo "$as_me:3804: checking if filesystem supports mixed-case filenames" >&5
3805 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3806 if test "${cf_cv_mixedcase+set}" = set; then
3807   echo $ECHO_N "(cached) $ECHO_C" >&6
3808 else
3809
3810 if test "$cross_compiling" = yes ; then
3811         case $target_alias in #(vi
3812         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3813                 cf_cv_mixedcase=no
3814                 ;;
3815         *)
3816                 cf_cv_mixedcase=yes
3817                 ;;
3818         esac
3819 else
3820         rm -f conftest CONFTEST
3821         echo test >conftest
3822         if test -f CONFTEST ; then
3823                 cf_cv_mixedcase=no
3824         else
3825                 cf_cv_mixedcase=yes
3826         fi
3827         rm -f conftest CONFTEST
3828 fi
3829
3830 fi
3831 echo "$as_me:3831: result: $cf_cv_mixedcase" >&5
3832 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3833 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3834 #define MIXEDCASE_FILENAMES 1
3835 EOF
3836
3837 else
3838     cf_cv_mixedcase=$enable_mixedcase
3839     if test "$enable_mixedcase" = "yes" ; then
3840         cat >>confdefs.h <<\EOF
3841 #define MIXEDCASE_FILENAMES 1
3842 EOF
3843
3844     fi
3845 fi
3846
3847 # do this after mixed-case option (tags/TAGS is not as important as tic).
3848 echo "$as_me:3848: checking whether ${MAKE-make} sets \${MAKE}" >&5
3849 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3850 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3851 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3852   echo $ECHO_N "(cached) $ECHO_C" >&6
3853 else
3854   cat >conftest.make <<\EOF
3855 all:
3856         @echo 'ac_maketemp="${MAKE}"'
3857 EOF
3858 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3859 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3860 if test -n "$ac_maketemp"; then
3861   eval ac_cv_prog_make_${ac_make}_set=yes
3862 else
3863   eval ac_cv_prog_make_${ac_make}_set=no
3864 fi
3865 rm -f conftest.make
3866 fi
3867 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3868   echo "$as_me:3868: result: yes" >&5
3869 echo "${ECHO_T}yes" >&6
3870   SET_MAKE=
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874   SET_MAKE="MAKE=${MAKE-make}"
3875 fi
3876
3877 for ac_prog in exctags ctags
3878 do
3879   # Extract the first word of "$ac_prog", so it can be a program name with args.
3880 set dummy $ac_prog; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_CTAGS+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886   if test -n "$CTAGS"; then
3887   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3888 else
3889   ac_save_IFS=$IFS; IFS=$ac_path_separator
3890 ac_dummy="$PATH"
3891 for ac_dir in $ac_dummy; do
3892   IFS=$ac_save_IFS
3893   test -z "$ac_dir" && ac_dir=.
3894   $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_CTAGS="$ac_prog"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3897 break
3898 done
3899
3900 fi
3901 fi
3902 CTAGS=$ac_cv_prog_CTAGS
3903 if test -n "$CTAGS"; then
3904   echo "$as_me:3904: result: $CTAGS" >&5
3905 echo "${ECHO_T}$CTAGS" >&6
3906 else
3907   echo "$as_me:3907: result: no" >&5
3908 echo "${ECHO_T}no" >&6
3909 fi
3910
3911   test -n "$CTAGS" && break
3912 done
3913
3914 for ac_prog in exetags etags
3915 do
3916   # Extract the first word of "$ac_prog", so it can be a program name with args.
3917 set dummy $ac_prog; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ETAGS+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ETAGS"; then
3924   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ETAGS="$ac_prog"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937 fi
3938 fi
3939 ETAGS=$ac_cv_prog_ETAGS
3940 if test -n "$ETAGS"; then
3941   echo "$as_me:3941: result: $ETAGS" >&5
3942 echo "${ECHO_T}$ETAGS" >&6
3943 else
3944   echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3946 fi
3947
3948   test -n "$ETAGS" && break
3949 done
3950
3951 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3952 set dummy ${CTAGS:-ctags}; ac_word=$2
3953 echo "$as_me:3953: checking for $ac_word" >&5
3954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3955 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3956   echo $ECHO_N "(cached) $ECHO_C" >&6
3957 else
3958   if test -n "$MAKE_LOWER_TAGS"; then
3959   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3960 else
3961   ac_save_IFS=$IFS; IFS=$ac_path_separator
3962 ac_dummy="$PATH"
3963 for ac_dir in $ac_dummy; do
3964   IFS=$ac_save_IFS
3965   test -z "$ac_dir" && ac_dir=.
3966   $as_executable_p "$ac_dir/$ac_word" || continue
3967 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3968 echo "$as_me:3968: found $ac_dir/$ac_word" >&5
3969 break
3970 done
3971
3972   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3973 fi
3974 fi
3975 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3976 if test -n "$MAKE_LOWER_TAGS"; then
3977   echo "$as_me:3977: result: $MAKE_LOWER_TAGS" >&5
3978 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3979 else
3980   echo "$as_me:3980: result: no" >&5
3981 echo "${ECHO_T}no" >&6
3982 fi
3983
3984 if test "$cf_cv_mixedcase" = yes ; then
3985         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3986 set dummy ${ETAGS:-etags}; ac_word=$2
3987 echo "$as_me:3987: checking for $ac_word" >&5
3988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3989 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3990   echo $ECHO_N "(cached) $ECHO_C" >&6
3991 else
3992   if test -n "$MAKE_UPPER_TAGS"; then
3993   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3994 else
3995   ac_save_IFS=$IFS; IFS=$ac_path_separator
3996 ac_dummy="$PATH"
3997 for ac_dir in $ac_dummy; do
3998   IFS=$ac_save_IFS
3999   test -z "$ac_dir" && ac_dir=.
4000   $as_executable_p "$ac_dir/$ac_word" || continue
4001 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4002 echo "$as_me:4002: found $ac_dir/$ac_word" >&5
4003 break
4004 done
4005
4006   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4007 fi
4008 fi
4009 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4010 if test -n "$MAKE_UPPER_TAGS"; then
4011   echo "$as_me:4011: result: $MAKE_UPPER_TAGS" >&5
4012 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4013 else
4014   echo "$as_me:4014: result: no" >&5
4015 echo "${ECHO_T}no" >&6
4016 fi
4017
4018 else
4019         MAKE_UPPER_TAGS=no
4020 fi
4021
4022 if test "$MAKE_UPPER_TAGS" = yes ; then
4023         MAKE_UPPER_TAGS=
4024 else
4025         MAKE_UPPER_TAGS="#"
4026 fi
4027
4028 if test "$MAKE_LOWER_TAGS" = yes ; then
4029         MAKE_LOWER_TAGS=
4030 else
4031         MAKE_LOWER_TAGS="#"
4032 fi
4033
4034 echo "$as_me:4034: checking for makeflags variable" >&5
4035 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4036 if test "${cf_cv_makeflags+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039
4040         cf_cv_makeflags=''
4041         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4042         do
4043                 cat >cf_makeflags.tmp <<CF_EOF
4044 SHELL = /bin/sh
4045 all :
4046         @ echo '.$cf_option'
4047 CF_EOF
4048                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4049                 case "$cf_result" in
4050                 .*k)
4051                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4052                         case "$cf_result" in
4053                         .*CC=*) cf_cv_makeflags=
4054                                 ;;
4055                         *)      cf_cv_makeflags=$cf_option
4056                                 ;;
4057                         esac
4058                         break
4059                         ;;
4060                 .-)     ;;
4061                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4062                         ;;
4063                 esac
4064         done
4065         rm -f cf_makeflags.tmp
4066
4067 fi
4068 echo "$as_me:4068: result: $cf_cv_makeflags" >&5
4069 echo "${ECHO_T}$cf_cv_makeflags" >&6
4070
4071 if test -n "$ac_tool_prefix"; then
4072   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4073 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4074 echo "$as_me:4074: checking for $ac_word" >&5
4075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4076 if test "${ac_cv_prog_RANLIB+set}" = set; then
4077   echo $ECHO_N "(cached) $ECHO_C" >&6
4078 else
4079   if test -n "$RANLIB"; then
4080   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4081 else
4082   ac_save_IFS=$IFS; IFS=$ac_path_separator
4083 ac_dummy="$PATH"
4084 for ac_dir in $ac_dummy; do
4085   IFS=$ac_save_IFS
4086   test -z "$ac_dir" && ac_dir=.
4087   $as_executable_p "$ac_dir/$ac_word" || continue
4088 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4089 echo "$as_me:4089: found $ac_dir/$ac_word" >&5
4090 break
4091 done
4092
4093 fi
4094 fi
4095 RANLIB=$ac_cv_prog_RANLIB
4096 if test -n "$RANLIB"; then
4097   echo "$as_me:4097: result: $RANLIB" >&5
4098 echo "${ECHO_T}$RANLIB" >&6
4099 else
4100   echo "$as_me:4100: result: no" >&5
4101 echo "${ECHO_T}no" >&6
4102 fi
4103
4104 fi
4105 if test -z "$ac_cv_prog_RANLIB"; then
4106   ac_ct_RANLIB=$RANLIB
4107   # Extract the first word of "ranlib", so it can be a program name with args.
4108 set dummy ranlib; ac_word=$2
4109 echo "$as_me:4109: checking for $ac_word" >&5
4110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4111 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$ac_ct_RANLIB"; then
4115   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4116 else
4117   ac_save_IFS=$IFS; IFS=$ac_path_separator
4118 ac_dummy="$PATH"
4119 for ac_dir in $ac_dummy; do
4120   IFS=$ac_save_IFS
4121   test -z "$ac_dir" && ac_dir=.
4122   $as_executable_p "$ac_dir/$ac_word" || continue
4123 ac_cv_prog_ac_ct_RANLIB="ranlib"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4129 fi
4130 fi
4131 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4132 if test -n "$ac_ct_RANLIB"; then
4133   echo "$as_me:4133: result: $ac_ct_RANLIB" >&5
4134 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4135 else
4136   echo "$as_me:4136: result: no" >&5
4137 echo "${ECHO_T}no" >&6
4138 fi
4139
4140   RANLIB=$ac_ct_RANLIB
4141 else
4142   RANLIB="$ac_cv_prog_RANLIB"
4143 fi
4144
4145 if test -n "$ac_tool_prefix"; then
4146   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4147 set dummy ${ac_tool_prefix}ld; ac_word=$2
4148 echo "$as_me:4148: checking for $ac_word" >&5
4149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4150 if test "${ac_cv_prog_LD+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153   if test -n "$LD"; then
4154   ac_cv_prog_LD="$LD" # Let the user override the test.
4155 else
4156   ac_save_IFS=$IFS; IFS=$ac_path_separator
4157 ac_dummy="$PATH"
4158 for ac_dir in $ac_dummy; do
4159   IFS=$ac_save_IFS
4160   test -z "$ac_dir" && ac_dir=.
4161   $as_executable_p "$ac_dir/$ac_word" || continue
4162 ac_cv_prog_LD="${ac_tool_prefix}ld"
4163 echo "$as_me:4163: found $ac_dir/$ac_word" >&5
4164 break
4165 done
4166
4167 fi
4168 fi
4169 LD=$ac_cv_prog_LD
4170 if test -n "$LD"; then
4171   echo "$as_me:4171: result: $LD" >&5
4172 echo "${ECHO_T}$LD" >&6
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176 fi
4177
4178 fi
4179 if test -z "$ac_cv_prog_LD"; then
4180   ac_ct_LD=$LD
4181   # Extract the first word of "ld", so it can be a program name with args.
4182 set dummy ld; ac_word=$2
4183 echo "$as_me:4183: checking for $ac_word" >&5
4184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4186   echo $ECHO_N "(cached) $ECHO_C" >&6
4187 else
4188   if test -n "$ac_ct_LD"; then
4189   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4190 else
4191   ac_save_IFS=$IFS; IFS=$ac_path_separator
4192 ac_dummy="$PATH"
4193 for ac_dir in $ac_dummy; do
4194   IFS=$ac_save_IFS
4195   test -z "$ac_dir" && ac_dir=.
4196   $as_executable_p "$ac_dir/$ac_word" || continue
4197 ac_cv_prog_ac_ct_LD="ld"
4198 echo "$as_me:4198: found $ac_dir/$ac_word" >&5
4199 break
4200 done
4201
4202   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4203 fi
4204 fi
4205 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4206 if test -n "$ac_ct_LD"; then
4207   echo "$as_me:4207: result: $ac_ct_LD" >&5
4208 echo "${ECHO_T}$ac_ct_LD" >&6
4209 else
4210   echo "$as_me:4210: result: no" >&5
4211 echo "${ECHO_T}no" >&6
4212 fi
4213
4214   LD=$ac_ct_LD
4215 else
4216   LD="$ac_cv_prog_LD"
4217 fi
4218
4219 if test -n "$ac_tool_prefix"; then
4220   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4221 set dummy ${ac_tool_prefix}ar; ac_word=$2
4222 echo "$as_me:4222: checking for $ac_word" >&5
4223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4224 if test "${ac_cv_prog_AR+set}" = set; then
4225   echo $ECHO_N "(cached) $ECHO_C" >&6
4226 else
4227   if test -n "$AR"; then
4228   ac_cv_prog_AR="$AR" # Let the user override the test.
4229 else
4230   ac_save_IFS=$IFS; IFS=$ac_path_separator
4231 ac_dummy="$PATH"
4232 for ac_dir in $ac_dummy; do
4233   IFS=$ac_save_IFS
4234   test -z "$ac_dir" && ac_dir=.
4235   $as_executable_p "$ac_dir/$ac_word" || continue
4236 ac_cv_prog_AR="${ac_tool_prefix}ar"
4237 echo "$as_me:4237: found $ac_dir/$ac_word" >&5
4238 break
4239 done
4240
4241 fi
4242 fi
4243 AR=$ac_cv_prog_AR
4244 if test -n "$AR"; then
4245   echo "$as_me:4245: result: $AR" >&5
4246 echo "${ECHO_T}$AR" >&6
4247 else
4248   echo "$as_me:4248: result: no" >&5
4249 echo "${ECHO_T}no" >&6
4250 fi
4251
4252 fi
4253 if test -z "$ac_cv_prog_AR"; then
4254   ac_ct_AR=$AR
4255   # Extract the first word of "ar", so it can be a program name with args.
4256 set dummy ar; ac_word=$2
4257 echo "$as_me:4257: checking for $ac_word" >&5
4258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4259 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   if test -n "$ac_ct_AR"; then
4263   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4264 else
4265   ac_save_IFS=$IFS; IFS=$ac_path_separator
4266 ac_dummy="$PATH"
4267 for ac_dir in $ac_dummy; do
4268   IFS=$ac_save_IFS
4269   test -z "$ac_dir" && ac_dir=.
4270   $as_executable_p "$ac_dir/$ac_word" || continue
4271 ac_cv_prog_ac_ct_AR="ar"
4272 echo "$as_me:4272: found $ac_dir/$ac_word" >&5
4273 break
4274 done
4275
4276   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4277 fi
4278 fi
4279 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4280 if test -n "$ac_ct_AR"; then
4281   echo "$as_me:4281: result: $ac_ct_AR" >&5
4282 echo "${ECHO_T}$ac_ct_AR" >&6
4283 else
4284   echo "$as_me:4284: result: no" >&5
4285 echo "${ECHO_T}no" >&6
4286 fi
4287
4288   AR=$ac_ct_AR
4289 else
4290   AR="$ac_cv_prog_AR"
4291 fi
4292
4293 if test -n "$ac_tool_prefix"; then
4294   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4295 set dummy ${ac_tool_prefix}ar; ac_word=$2
4296 echo "$as_me:4296: checking for $ac_word" >&5
4297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4298 if test "${ac_cv_prog_AR+set}" = set; then
4299   echo $ECHO_N "(cached) $ECHO_C" >&6
4300 else
4301   if test -n "$AR"; then
4302   ac_cv_prog_AR="$AR" # Let the user override the test.
4303 else
4304   ac_save_IFS=$IFS; IFS=$ac_path_separator
4305 ac_dummy="$PATH"
4306 for ac_dir in $ac_dummy; do
4307   IFS=$ac_save_IFS
4308   test -z "$ac_dir" && ac_dir=.
4309   $as_executable_p "$ac_dir/$ac_word" || continue
4310 ac_cv_prog_AR="${ac_tool_prefix}ar"
4311 echo "$as_me:4311: found $ac_dir/$ac_word" >&5
4312 break
4313 done
4314
4315 fi
4316 fi
4317 AR=$ac_cv_prog_AR
4318 if test -n "$AR"; then
4319   echo "$as_me:4319: result: $AR" >&5
4320 echo "${ECHO_T}$AR" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326 fi
4327 if test -z "$ac_cv_prog_AR"; then
4328   ac_ct_AR=$AR
4329   # Extract the first word of "ar", so it can be a program name with args.
4330 set dummy ar; ac_word=$2
4331 echo "$as_me:4331: checking for $ac_word" >&5
4332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4333 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4334   echo $ECHO_N "(cached) $ECHO_C" >&6
4335 else
4336   if test -n "$ac_ct_AR"; then
4337   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4338 else
4339   ac_save_IFS=$IFS; IFS=$ac_path_separator
4340 ac_dummy="$PATH"
4341 for ac_dir in $ac_dummy; do
4342   IFS=$ac_save_IFS
4343   test -z "$ac_dir" && ac_dir=.
4344   $as_executable_p "$ac_dir/$ac_word" || continue
4345 ac_cv_prog_ac_ct_AR="ar"
4346 echo "$as_me:4346: found $ac_dir/$ac_word" >&5
4347 break
4348 done
4349
4350   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4351 fi
4352 fi
4353 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4354 if test -n "$ac_ct_AR"; then
4355   echo "$as_me:4355: result: $ac_ct_AR" >&5
4356 echo "${ECHO_T}$ac_ct_AR" >&6
4357 else
4358   echo "$as_me:4358: result: no" >&5
4359 echo "${ECHO_T}no" >&6
4360 fi
4361
4362   AR=$ac_ct_AR
4363 else
4364   AR="$ac_cv_prog_AR"
4365 fi
4366
4367 echo "$as_me:4367: checking for options to update archives" >&5
4368 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4369 if test "${cf_cv_ar_flags+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372
4373         cf_cv_ar_flags=unknown
4374         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4375         do
4376
4377                 # check if $ARFLAGS already contains this choice
4378                 if test "x$ARFLAGS" != "x" ; then
4379                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4380                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4381                                 cf_cv_ar_flags=
4382                                 break
4383                         fi
4384                 fi
4385
4386                 rm -f conftest.$ac_cv_objext
4387                 rm -f conftest.a
4388
4389                 cat >conftest.$ac_ext <<EOF
4390 #line 4390 "configure"
4391 int     testdata[3] = { 123, 456, 789 };
4392 EOF
4393                 if { (eval echo "$as_me:4393: \"$ac_compile\"") >&5
4394   (eval $ac_compile) 2>&5
4395   ac_status=$?
4396   echo "$as_me:4396: \$? = $ac_status" >&5
4397   (exit $ac_status); } ; then
4398                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4399                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4400                         if test -f conftest.a ; then
4401                                 cf_cv_ar_flags=$cf_ar_flags
4402                                 break
4403                         fi
4404                 else
4405                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4406
4407 echo "${as_me:-configure}:4407: testing cannot compile test-program ..." 1>&5
4408
4409                         break
4410                 fi
4411         done
4412         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4413
4414 fi
4415 echo "$as_me:4415: result: $cf_cv_ar_flags" >&5
4416 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4417
4418 if test -n "$ARFLAGS" ; then
4419         if test -n "$cf_cv_ar_flags" ; then
4420                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4421         fi
4422 else
4423         ARFLAGS=$cf_cv_ar_flags
4424 fi
4425
4426 echo "$as_me:4426: checking if you have specified an install-prefix" >&5
4427 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4428
4429 # Check whether --with-install-prefix or --without-install-prefix was given.
4430 if test "${with_install_prefix+set}" = set; then
4431   withval="$with_install_prefix"
4432   case "$withval" in #(vi
4433         yes|no) #(vi
4434                 ;;
4435         *)      DESTDIR="$withval"
4436                 ;;
4437         esac
4438 fi;
4439 echo "$as_me:4439: result: $DESTDIR" >&5
4440 echo "${ECHO_T}$DESTDIR" >&6
4441
4442 ###############################################################################
4443
4444 # If we're cross-compiling, allow the user to override the tools and their
4445 # options.  The configure script is oriented toward identifying the host
4446 # compiler, etc., but we need a build compiler to generate parts of the source.
4447
4448 if test "$cross_compiling" = yes ; then
4449
4450         # defaults that we might want to override
4451         : ${BUILD_CFLAGS:=''}
4452         : ${BUILD_CPPFLAGS:=''}
4453         : ${BUILD_LDFLAGS:=''}
4454         : ${BUILD_LIBS:=''}
4455         : ${BUILD_EXEEXT:='$x'}
4456         : ${BUILD_OBJEXT:='o'}
4457
4458 # Check whether --with-build-cc or --without-build-cc was given.
4459 if test "${with_build_cc+set}" = set; then
4460   withval="$with_build_cc"
4461   BUILD_CC="$withval"
4462 else
4463   for ac_prog in gcc cc cl
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 echo "$as_me:4467: checking for $ac_word" >&5
4468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4469 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   if test -n "$BUILD_CC"; then
4473   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4474 else
4475   ac_save_IFS=$IFS; IFS=$ac_path_separator
4476 ac_dummy="$PATH"
4477 for ac_dir in $ac_dummy; do
4478   IFS=$ac_save_IFS
4479   test -z "$ac_dir" && ac_dir=.
4480   $as_executable_p "$ac_dir/$ac_word" || continue
4481 ac_cv_prog_BUILD_CC="$ac_prog"
4482 echo "$as_me:4482: found $ac_dir/$ac_word" >&5
4483 break
4484 done
4485
4486 fi
4487 fi
4488 BUILD_CC=$ac_cv_prog_BUILD_CC
4489 if test -n "$BUILD_CC"; then
4490   echo "$as_me:4490: result: $BUILD_CC" >&5
4491 echo "${ECHO_T}$BUILD_CC" >&6
4492 else
4493   echo "$as_me:4493: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$BUILD_CC" && break
4498 done
4499
4500 fi;
4501         echo "$as_me:4501: checking for native build C compiler" >&5
4502 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4503         echo "$as_me:4503: result: $BUILD_CC" >&5
4504 echo "${ECHO_T}$BUILD_CC" >&6
4505
4506         echo "$as_me:4506: checking for native build C preprocessor" >&5
4507 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4508
4509 # Check whether --with-build-cpp or --without-build-cpp was given.
4510 if test "${with_build_cpp+set}" = set; then
4511   withval="$with_build_cpp"
4512   BUILD_CPP="$withval"
4513 else
4514   BUILD_CPP='${BUILD_CC} -E'
4515 fi;
4516         echo "$as_me:4516: result: $BUILD_CPP" >&5
4517 echo "${ECHO_T}$BUILD_CPP" >&6
4518
4519         echo "$as_me:4519: checking for native build C flags" >&5
4520 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4521
4522 # Check whether --with-build-cflags or --without-build-cflags was given.
4523 if test "${with_build_cflags+set}" = set; then
4524   withval="$with_build_cflags"
4525   BUILD_CFLAGS="$withval"
4526 fi;
4527         echo "$as_me:4527: result: $BUILD_CFLAGS" >&5
4528 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4529
4530         echo "$as_me:4530: checking for native build C preprocessor-flags" >&5
4531 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4532
4533 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4534 if test "${with_build_cppflags+set}" = set; then
4535   withval="$with_build_cppflags"
4536   BUILD_CPPFLAGS="$withval"
4537 fi;
4538         echo "$as_me:4538: result: $BUILD_CPPFLAGS" >&5
4539 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4540
4541         echo "$as_me:4541: checking for native build linker-flags" >&5
4542 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4543
4544 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4545 if test "${with_build_ldflags+set}" = set; then
4546   withval="$with_build_ldflags"
4547   BUILD_LDFLAGS="$withval"
4548 fi;
4549         echo "$as_me:4549: result: $BUILD_LDFLAGS" >&5
4550 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4551
4552         echo "$as_me:4552: checking for native build linker-libraries" >&5
4553 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4554
4555 # Check whether --with-build-libs or --without-build-libs was given.
4556 if test "${with_build_libs+set}" = set; then
4557   withval="$with_build_libs"
4558   BUILD_LIBS="$withval"
4559 fi;
4560         echo "$as_me:4560: result: $BUILD_LIBS" >&5
4561 echo "${ECHO_T}$BUILD_LIBS" >&6
4562
4563         # this assumes we're on Unix.
4564         BUILD_EXEEXT=
4565         BUILD_OBJEXT=o
4566
4567         : ${BUILD_CC:='${CC}'}
4568
4569         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4570                 { { echo "$as_me:4570: error: Cross-build requires two compilers.
4571 Use --with-build-cc to specify the native compiler." >&5
4572 echo "$as_me: error: Cross-build requires two compilers.
4573 Use --with-build-cc to specify the native compiler." >&2;}
4574    { (exit 1); exit 1; }; }
4575         fi
4576
4577 else
4578         : ${BUILD_CC:='${CC}'}
4579         : ${BUILD_CPP:='${CPP}'}
4580         : ${BUILD_CFLAGS:='${CFLAGS}'}
4581         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4582         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4583         : ${BUILD_LIBS:='${LIBS}'}
4584         : ${BUILD_EXEEXT:='$x'}
4585         : ${BUILD_OBJEXT:='o'}
4586 fi
4587
4588 ###############################################################################
4589
4590 ### Options to allow the user to specify the set of libraries which are used.
4591 ### Use "--without-normal --with-shared" to allow the default model to be
4592 ### shared, for example.
4593 cf_list_models=""
4594
4595 echo "$as_me:4595: checking if libtool -version-number should be used" >&5
4596 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4597
4598 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4599 if test "${enable_libtool_version+set}" = set; then
4600   enableval="$enable_libtool_version"
4601   test "$enableval" != no && enableval=yes
4602   if test "$enableval" != "yes" ; then
4603     cf_libtool_version=no
4604   else
4605     cf_libtool_version=yes
4606   fi
4607 else
4608   enableval=yes
4609   cf_libtool_version=yes
4610
4611 fi;
4612 echo "$as_me:4612: result: $cf_libtool_version" >&5
4613 echo "${ECHO_T}$cf_libtool_version" >&6
4614
4615 if test "$cf_libtool_version" = yes ; then
4616         LIBTOOL_VERSION="-version-number"
4617 else
4618         LIBTOOL_VERSION="-version-info"
4619 fi
4620
4621 LIBTOOL=
4622
4623 # common library maintenance symbols that are convenient for libtool scripts:
4624 LIB_CREATE='${AR} -cr'
4625 LIB_OBJECT='${OBJECTS}'
4626 LIB_SUFFIX=.a
4627 LIB_PREP="$RANLIB"
4628
4629 # symbols used to prop libtool up to enable it to determine what it should be
4630 # doing:
4631 LIB_CLEAN=
4632 LIB_COMPILE=
4633 LIB_LINK='${CC}'
4634 LIB_INSTALL=
4635 LIB_UNINSTALL=
4636
4637 echo "$as_me:4637: checking if you want to build libraries with libtool" >&5
4638 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4639
4640 # Check whether --with-libtool or --without-libtool was given.
4641 if test "${with_libtool+set}" = set; then
4642   withval="$with_libtool"
4643   with_libtool=$withval
4644 else
4645   with_libtool=no
4646 fi;
4647 echo "$as_me:4647: result: $with_libtool" >&5
4648 echo "${ECHO_T}$with_libtool" >&6
4649 if test "$with_libtool" != "no"; then
4650
4651         if test "$with_libtool" != "yes" ; then
4652
4653 if test "x$prefix" != xNONE; then
4654   cf_path_syntax="$prefix"
4655 else
4656   cf_path_syntax="$ac_default_prefix"
4657 fi
4658
4659 case ".$with_libtool" in #(vi
4660 .\$\(*\)*|.\'*\'*) #(vi
4661   ;;
4662 ..|./*|.\\*) #(vi
4663   ;;
4664 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4665   ;;
4666 .\${*prefix}*) #(vi
4667   eval with_libtool="$with_libtool"
4668   case ".$with_libtool" in #(vi
4669   .NONE/*)
4670     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4671     ;;
4672   esac
4673   ;; #(vi
4674 .no|.NONE/*)
4675   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4676   ;;
4677 *)
4678   { { echo "$as_me:4678: error: expected a pathname, not \"$with_libtool\"" >&5
4679 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4680    { (exit 1); exit 1; }; }
4681   ;;
4682 esac
4683
4684                 LIBTOOL=$with_libtool
4685         else
4686                 # Extract the first word of "libtool", so it can be a program name with args.
4687 set dummy libtool; ac_word=$2
4688 echo "$as_me:4688: checking for $ac_word" >&5
4689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4690 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4691   echo $ECHO_N "(cached) $ECHO_C" >&6
4692 else
4693   case $LIBTOOL in
4694   [\\/]* | ?:[\\/]*)
4695   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4696   ;;
4697   *)
4698   ac_save_IFS=$IFS; IFS=$ac_path_separator
4699 ac_dummy="$PATH"
4700 for ac_dir in $ac_dummy; do
4701   IFS=$ac_save_IFS
4702   test -z "$ac_dir" && ac_dir=.
4703   if $as_executable_p "$ac_dir/$ac_word"; then
4704    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4705    echo "$as_me:4705: found $ac_dir/$ac_word" >&5
4706    break
4707 fi
4708 done
4709
4710   ;;
4711 esac
4712 fi
4713 LIBTOOL=$ac_cv_path_LIBTOOL
4714
4715 if test -n "$LIBTOOL"; then
4716   echo "$as_me:4716: result: $LIBTOOL" >&5
4717 echo "${ECHO_T}$LIBTOOL" >&6
4718 else
4719   echo "$as_me:4719: result: no" >&5
4720 echo "${ECHO_T}no" >&6
4721 fi
4722
4723         fi
4724         if test -z "$LIBTOOL" ; then
4725                 { { echo "$as_me:4725: error: Cannot find libtool" >&5
4726 echo "$as_me: error: Cannot find libtool" >&2;}
4727    { (exit 1); exit 1; }; }
4728         fi
4729         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4730         LIB_OBJECT='${OBJECTS:.o=.lo}'
4731         LIB_SUFFIX=.la
4732         LIB_CLEAN='${LIBTOOL} --mode=clean'
4733         LIB_COMPILE='${LIBTOOL} --mode=compile'
4734         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4735         LIB_INSTALL='${LIBTOOL} --mode=install'
4736         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4737         LIB_PREP=:
4738
4739         # Show the version of libtool
4740         echo "$as_me:4740: checking version of libtool" >&5
4741 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4742
4743         # Save the version in a cache variable - this is not entirely a good
4744         # thing, but the version string from libtool is very ugly, and for
4745         # bug reports it might be useful to have the original string. "("
4746         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.].*//'`
4747         echo "$as_me:4747: result: $cf_cv_libtool_version" >&5
4748 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4749         if test -z "$cf_cv_libtool_version" ; then
4750                 { { echo "$as_me:4750: error: This is not GNU libtool" >&5
4751 echo "$as_me: error: This is not GNU libtool" >&2;}
4752    { (exit 1); exit 1; }; }
4753         fi
4754
4755         # special hack to add -no-undefined (which libtool should do for itself)
4756         LT_UNDEF=
4757         case "$cf_cv_system_name" in #(vi
4758         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4759                 LT_UNDEF=-no-undefined
4760                 ;;
4761         esac
4762
4763         # special hack to add --tag option for C++ compiler
4764         case $cf_cv_libtool_version in #(vi
4765         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4766                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4767                 LIBTOOL="$LIBTOOL --tag=CC"
4768                 ;;
4769         *)
4770                 LIBTOOL_CXX="$LIBTOOL"
4771                 ;;
4772         esac
4773 else
4774         LIBTOOL=""
4775         LIBTOOL_CXX=""
4776 fi
4777
4778 test -z "$LIBTOOL" && ECHO_LT=
4779
4780 if test "$with_libtool" != "no" ; then
4781
4782 cf_list_models="$cf_list_models libtool"
4783
4784 else
4785
4786 echo "$as_me:4786: checking if you want to build shared libraries" >&5
4787 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4788
4789 # Check whether --with-shared or --without-shared was given.
4790 if test "${with_shared+set}" = set; then
4791   withval="$with_shared"
4792   with_shared=$withval
4793 else
4794   with_shared=no
4795 fi;
4796 echo "$as_me:4796: result: $with_shared" >&5
4797 echo "${ECHO_T}$with_shared" >&6
4798 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4799
4800 echo "$as_me:4800: checking if you want to build static libraries" >&5
4801 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4802
4803 # Check whether --with-normal or --without-normal was given.
4804 if test "${with_normal+set}" = set; then
4805   withval="$with_normal"
4806   with_normal=$withval
4807 else
4808   with_normal=yes
4809 fi;
4810 echo "$as_me:4810: result: $with_normal" >&5
4811 echo "${ECHO_T}$with_normal" >&6
4812 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4813
4814 echo "$as_me:4814: checking if you want to build debug libraries" >&5
4815 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4816
4817 # Check whether --with-debug or --without-debug was given.
4818 if test "${with_debug+set}" = set; then
4819   withval="$with_debug"
4820   with_debug=$withval
4821 else
4822   with_debug=yes
4823 fi;
4824 echo "$as_me:4824: result: $with_debug" >&5
4825 echo "${ECHO_T}$with_debug" >&6
4826 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4827
4828 echo "$as_me:4828: checking if you want to build profiling libraries" >&5
4829 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4830
4831 # Check whether --with-profile or --without-profile was given.
4832 if test "${with_profile+set}" = set; then
4833   withval="$with_profile"
4834   with_profile=$withval
4835 else
4836   with_profile=no
4837 fi;
4838 echo "$as_me:4838: result: $with_profile" >&5
4839 echo "${ECHO_T}$with_profile" >&6
4840 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4841
4842 fi
4843
4844 ###############################################################################
4845
4846 echo "$as_me:4846: checking for specified models" >&5
4847 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4848 test -z "$cf_list_models" && cf_list_models=normal
4849 test "$with_libtool" != "no" && cf_list_models=libtool
4850 echo "$as_me:4850: result: $cf_list_models" >&5
4851 echo "${ECHO_T}$cf_list_models" >&6
4852
4853 ### Use the first model as the default, and save its suffix for use in building
4854 ### up test-applications.
4855 echo "$as_me:4855: checking for default model" >&5
4856 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4857 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4858 echo "$as_me:4858: result: $DFT_LWR_MODEL" >&5
4859 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4860
4861 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4862
4863 TICS_NAME=tic
4864
4865 TINFO_NAME=tinfo
4866
4867 LIB_NAME=ncurses
4868
4869 LIB_DIR=../lib
4870 LIB_2ND=../../lib
4871
4872         case $cf_cv_system_name in #(vi
4873         OS/2*|os2*) #(vi
4874         LIB_PREFIX=''
4875         ;;
4876         *)      LIB_PREFIX='lib'
4877         ;;
4878         esac
4879 cf_prefix=$LIB_PREFIX
4880
4881 LIB_PREFIX=$cf_prefix
4882
4883 LIB_SUFFIX=
4884
4885 ###############################################################################
4886
4887 echo "$as_me:4887: checking if you want to build a separate terminfo library" >&5
4888 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4889
4890 # Check whether --with-termlib or --without-termlib was given.
4891 if test "${with_termlib+set}" = set; then
4892   withval="$with_termlib"
4893   with_termlib=$withval
4894 else
4895   with_termlib=no
4896 fi;
4897 echo "$as_me:4897: result: $with_termlib" >&5
4898 echo "${ECHO_T}$with_termlib" >&6
4899
4900 echo "$as_me:4900: checking if you want to build a separate tic library" >&5
4901 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4902
4903 # Check whether --with-ticlib or --without-ticlib was given.
4904 if test "${with_ticlib+set}" = set; then
4905   withval="$with_ticlib"
4906   with_ticlib=$withval
4907 else
4908   with_ticlib=no
4909 fi;
4910 echo "$as_me:4910: result: $with_ticlib" >&5
4911 echo "${ECHO_T}$with_ticlib" >&6
4912
4913 ### Checks for special libraries, must be done up-front.
4914 SHLIB_LIST=""
4915
4916 echo "$as_me:4916: checking if you want to link with the GPM mouse library" >&5
4917 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4918
4919 # Check whether --with-gpm or --without-gpm was given.
4920 if test "${with_gpm+set}" = set; then
4921   withval="$with_gpm"
4922   with_gpm=$withval
4923 else
4924   with_gpm=maybe
4925 fi;
4926 echo "$as_me:4926: result: $with_gpm" >&5
4927 echo "${ECHO_T}$with_gpm" >&6
4928
4929 if test "$with_gpm" != no ; then
4930         echo "$as_me:4930: checking for gpm.h" >&5
4931 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4932 if test "${ac_cv_header_gpm_h+set}" = set; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935   cat >conftest.$ac_ext <<_ACEOF
4936 #line 4936 "configure"
4937 #include "confdefs.h"
4938 #include <gpm.h>
4939 _ACEOF
4940 if { (eval echo "$as_me:4940: \"$ac_cpp conftest.$ac_ext\"") >&5
4941   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4942   ac_status=$?
4943   egrep -v '^ *\+' conftest.er1 >conftest.err
4944   rm -f conftest.er1
4945   cat conftest.err >&5
4946   echo "$as_me:4946: \$? = $ac_status" >&5
4947   (exit $ac_status); } >/dev/null; then
4948   if test -s conftest.err; then
4949     ac_cpp_err=$ac_c_preproc_warn_flag
4950   else
4951     ac_cpp_err=
4952   fi
4953 else
4954   ac_cpp_err=yes
4955 fi
4956 if test -z "$ac_cpp_err"; then
4957   ac_cv_header_gpm_h=yes
4958 else
4959   echo "$as_me: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   ac_cv_header_gpm_h=no
4962 fi
4963 rm -f conftest.err conftest.$ac_ext
4964 fi
4965 echo "$as_me:4965: result: $ac_cv_header_gpm_h" >&5
4966 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4967 if test $ac_cv_header_gpm_h = yes; then
4968
4969                 cat >>confdefs.h <<\EOF
4970 #define HAVE_GPM_H 1
4971 EOF
4972
4973                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4974                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4975
4976 echo "${as_me:-configure}:4976: testing assuming we really have GPM library ..." 1>&5
4977
4978                         cat >>confdefs.h <<\EOF
4979 #define HAVE_LIBGPM 1
4980 EOF
4981
4982                 else
4983                         echo "$as_me:4983: checking for Gpm_Open in -lgpm" >&5
4984 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4985 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4986   echo $ECHO_N "(cached) $ECHO_C" >&6
4987 else
4988   ac_check_lib_save_LIBS=$LIBS
4989 LIBS="-lgpm  $LIBS"
4990 cat >conftest.$ac_ext <<_ACEOF
4991 #line 4991 "configure"
4992 #include "confdefs.h"
4993
4994 /* Override any gcc2 internal prototype to avoid an error.  */
4995 #ifdef __cplusplus
4996 extern "C"
4997 #endif
4998 /* We use char because int might match the return type of a gcc2
4999    builtin and then its argument prototype would still apply.  */
5000 char Gpm_Open ();
5001 int
5002 main ()
5003 {
5004 Gpm_Open ();
5005   ;
5006   return 0;
5007 }
5008 _ACEOF
5009 rm -f conftest.$ac_objext conftest$ac_exeext
5010 if { (eval echo "$as_me:5010: \"$ac_link\"") >&5
5011   (eval $ac_link) 2>&5
5012   ac_status=$?
5013   echo "$as_me:5013: \$? = $ac_status" >&5
5014   (exit $ac_status); } &&
5015          { ac_try='test -s conftest$ac_exeext'
5016   { (eval echo "$as_me:5016: \"$ac_try\"") >&5
5017   (eval $ac_try) 2>&5
5018   ac_status=$?
5019   echo "$as_me:5019: \$? = $ac_status" >&5
5020   (exit $ac_status); }; }; then
5021   ac_cv_lib_gpm_Gpm_Open=yes
5022 else
5023   echo "$as_me: failed program was:" >&5
5024 cat conftest.$ac_ext >&5
5025 ac_cv_lib_gpm_Gpm_Open=no
5026 fi
5027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5028 LIBS=$ac_check_lib_save_LIBS
5029 fi
5030 echo "$as_me:5030: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5031 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5032 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5033   :
5034 else
5035
5036                                 { { echo "$as_me:5036: error: Cannot link with GPM library" >&5
5037 echo "$as_me: error: Cannot link with GPM library" >&2;}
5038    { (exit 1); exit 1; }; }
5039                 fi
5040                 with_gpm=yes
5041
5042 fi
5043
5044 else
5045
5046                 test "$with_gpm" != maybe && { echo "$as_me:5046: WARNING: Cannot find GPM header" >&5
5047 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5048                 with_gpm=no
5049
5050 fi
5051
5052 fi
5053
5054 if test "$with_gpm" != no ; then
5055         echo "$as_me:5055: checking if you want to load GPM dynamically" >&5
5056 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5057
5058 # Check whether --with-dlsym or --without-dlsym was given.
5059 if test "${with_dlsym+set}" = set; then
5060   withval="$with_dlsym"
5061   with_dlsym=$withval
5062 else
5063   with_dlsym=yes
5064 fi;
5065         echo "$as_me:5065: result: $with_dlsym" >&5
5066 echo "${ECHO_T}$with_dlsym" >&6
5067         if test "$with_dlsym" = yes ; then
5068
5069 cf_have_dlsym=no
5070 echo "$as_me:5070: checking for dlsym" >&5
5071 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5072 if test "${ac_cv_func_dlsym+set}" = set; then
5073   echo $ECHO_N "(cached) $ECHO_C" >&6
5074 else
5075   cat >conftest.$ac_ext <<_ACEOF
5076 #line 5076 "configure"
5077 #include "confdefs.h"
5078 /* System header to define __stub macros and hopefully few prototypes,
5079     which can conflict with char dlsym (); below.  */
5080 #include <assert.h>
5081 /* Override any gcc2 internal prototype to avoid an error.  */
5082 #ifdef __cplusplus
5083 extern "C"
5084 #endif
5085 /* We use char because int might match the return type of a gcc2
5086    builtin and then its argument prototype would still apply.  */
5087 char dlsym ();
5088 char (*f) ();
5089
5090 int
5091 main ()
5092 {
5093 /* The GNU C library defines this for functions which it implements
5094     to always fail with ENOSYS.  Some functions are actually named
5095     something starting with __ and the normal name is an alias.  */
5096 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5097 choke me
5098 #else
5099 f = dlsym;
5100 #endif
5101
5102   ;
5103   return 0;
5104 }
5105 _ACEOF
5106 rm -f conftest.$ac_objext conftest$ac_exeext
5107 if { (eval echo "$as_me:5107: \"$ac_link\"") >&5
5108   (eval $ac_link) 2>&5
5109   ac_status=$?
5110   echo "$as_me:5110: \$? = $ac_status" >&5
5111   (exit $ac_status); } &&
5112          { ac_try='test -s conftest$ac_exeext'
5113   { (eval echo "$as_me:5113: \"$ac_try\"") >&5
5114   (eval $ac_try) 2>&5
5115   ac_status=$?
5116   echo "$as_me:5116: \$? = $ac_status" >&5
5117   (exit $ac_status); }; }; then
5118   ac_cv_func_dlsym=yes
5119 else
5120   echo "$as_me: failed program was:" >&5
5121 cat conftest.$ac_ext >&5
5122 ac_cv_func_dlsym=no
5123 fi
5124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5125 fi
5126 echo "$as_me:5126: result: $ac_cv_func_dlsym" >&5
5127 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5128 if test $ac_cv_func_dlsym = yes; then
5129   cf_have_dlsym=yes
5130 else
5131
5132 cf_have_libdl=no
5133 echo "$as_me:5133: checking for dlsym in -ldl" >&5
5134 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5135 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5136   echo $ECHO_N "(cached) $ECHO_C" >&6
5137 else
5138   ac_check_lib_save_LIBS=$LIBS
5139 LIBS="-ldl  $LIBS"
5140 cat >conftest.$ac_ext <<_ACEOF
5141 #line 5141 "configure"
5142 #include "confdefs.h"
5143
5144 /* Override any gcc2 internal prototype to avoid an error.  */
5145 #ifdef __cplusplus
5146 extern "C"
5147 #endif
5148 /* We use char because int might match the return type of a gcc2
5149    builtin and then its argument prototype would still apply.  */
5150 char dlsym ();
5151 int
5152 main ()
5153 {
5154 dlsym ();
5155   ;
5156   return 0;
5157 }
5158 _ACEOF
5159 rm -f conftest.$ac_objext conftest$ac_exeext
5160 if { (eval echo "$as_me:5160: \"$ac_link\"") >&5
5161   (eval $ac_link) 2>&5
5162   ac_status=$?
5163   echo "$as_me:5163: \$? = $ac_status" >&5
5164   (exit $ac_status); } &&
5165          { ac_try='test -s conftest$ac_exeext'
5166   { (eval echo "$as_me:5166: \"$ac_try\"") >&5
5167   (eval $ac_try) 2>&5
5168   ac_status=$?
5169   echo "$as_me:5169: \$? = $ac_status" >&5
5170   (exit $ac_status); }; }; then
5171   ac_cv_lib_dl_dlsym=yes
5172 else
5173   echo "$as_me: failed program was:" >&5
5174 cat conftest.$ac_ext >&5
5175 ac_cv_lib_dl_dlsym=no
5176 fi
5177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5178 LIBS=$ac_check_lib_save_LIBS
5179 fi
5180 echo "$as_me:5180: result: $ac_cv_lib_dl_dlsym" >&5
5181 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5182 if test $ac_cv_lib_dl_dlsym = yes; then
5183
5184         cf_have_dlsym=yes
5185         cf_have_libdl=yes
5186 fi
5187
5188 fi
5189
5190 if test "$cf_have_dlsym" = yes ; then
5191         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5192
5193         echo "$as_me:5193: checking whether able to link to dl*() functions" >&5
5194 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5195         cat >conftest.$ac_ext <<_ACEOF
5196 #line 5196 "configure"
5197 #include "confdefs.h"
5198 #include <dlfcn.h>
5199 int
5200 main ()
5201 {
5202
5203                 void *obj;
5204                 if ((obj = dlopen("filename", 0)) != 0) {
5205                         if (dlsym(obj, "symbolname") == 0) {
5206                         dlclose(obj);
5207                         }
5208                 }
5209   ;
5210   return 0;
5211 }
5212 _ACEOF
5213 rm -f conftest.$ac_objext conftest$ac_exeext
5214 if { (eval echo "$as_me:5214: \"$ac_link\"") >&5
5215   (eval $ac_link) 2>&5
5216   ac_status=$?
5217   echo "$as_me:5217: \$? = $ac_status" >&5
5218   (exit $ac_status); } &&
5219          { ac_try='test -s conftest$ac_exeext'
5220   { (eval echo "$as_me:5220: \"$ac_try\"") >&5
5221   (eval $ac_try) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); }; }; then
5225
5226                 cat >>confdefs.h <<\EOF
5227 #define HAVE_LIBDL 1
5228 EOF
5229
5230 else
5231   echo "$as_me: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233
5234                 { { echo "$as_me:5234: error: Cannot link test program for libdl" >&5
5235 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5236    { (exit 1); exit 1; }; }
5237 fi
5238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5239         echo "$as_me:5239: result: ok" >&5
5240 echo "${ECHO_T}ok" >&6
5241 else
5242         { { echo "$as_me:5242: error: Cannot find dlsym function" >&5
5243 echo "$as_me: error: Cannot find dlsym function" >&2;}
5244    { (exit 1); exit 1; }; }
5245 fi
5246
5247                 if test "$with_gpm" != yes ; then
5248                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5249
5250 echo "${as_me:-configure}:5250: testing assuming soname for gpm is $with_gpm ..." 1>&5
5251
5252                         cf_cv_gpm_soname="$with_gpm"
5253                 else
5254
5255 echo "$as_me:5255: checking for soname of gpm library" >&5
5256 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5257 if test "${cf_cv_gpm_soname+set}" = set; then
5258   echo $ECHO_N "(cached) $ECHO_C" >&6
5259 else
5260
5261 cf_cv_gpm_soname=unknown
5262 if test "$cross_compiling" != yes ; then
5263 cat >conftest.$ac_ext <<CF_EOF
5264 #include <gpm.h>
5265 int main()
5266 {
5267 if (Gpm_Open(0,0)) Gpm_Close();
5268         ${cf_cv_main_return:-return}(0);
5269 }
5270 CF_EOF
5271 cf_save_LIBS="$LIBS"
5272         LIBS="-lgpm $LIBS"
5273         if { (eval echo "$as_me:5273: \"$ac_compile\"") >&5
5274   (eval $ac_compile) 2>&5
5275   ac_status=$?
5276   echo "$as_me:5276: \$? = $ac_status" >&5
5277   (exit $ac_status); } ; then
5278                 if { (eval echo "$as_me:5278: \"$ac_link\"") >&5
5279   (eval $ac_link) 2>&5
5280   ac_status=$?
5281   echo "$as_me:5281: \$? = $ac_status" >&5
5282   (exit $ac_status); } ; then
5283                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5284                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5285                 fi
5286         fi
5287 rm -rf conftest*
5288 LIBS="$cf_save_LIBS"
5289 fi
5290
5291 fi
5292 echo "$as_me:5292: result: $cf_cv_gpm_soname" >&5
5293 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5294
5295                 fi
5296                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5297 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5298 EOF
5299
5300                 SHLIB_LIST="-ldl $SHLIB_LIST"
5301         else
5302                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5303                 TEST_LIBS="-lgpm $TEST_LIBS"
5304         fi
5305         cat >>confdefs.h <<\EOF
5306 #define HAVE_LIBGPM 1
5307 EOF
5308
5309 echo "$as_me:5309: checking for Gpm_Wgetch in -lgpm" >&5
5310 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5311 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5312   echo $ECHO_N "(cached) $ECHO_C" >&6
5313 else
5314   ac_check_lib_save_LIBS=$LIBS
5315 LIBS="-lgpm  $LIBS"
5316 cat >conftest.$ac_ext <<_ACEOF
5317 #line 5317 "configure"
5318 #include "confdefs.h"
5319
5320 /* Override any gcc2 internal prototype to avoid an error.  */
5321 #ifdef __cplusplus
5322 extern "C"
5323 #endif
5324 /* We use char because int might match the return type of a gcc2
5325    builtin and then its argument prototype would still apply.  */
5326 char Gpm_Wgetch ();
5327 int
5328 main ()
5329 {
5330 Gpm_Wgetch ();
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 rm -f conftest.$ac_objext conftest$ac_exeext
5336 if { (eval echo "$as_me:5336: \"$ac_link\"") >&5
5337   (eval $ac_link) 2>&5
5338   ac_status=$?
5339   echo "$as_me:5339: \$? = $ac_status" >&5
5340   (exit $ac_status); } &&
5341          { ac_try='test -s conftest$ac_exeext'
5342   { (eval echo "$as_me:5342: \"$ac_try\"") >&5
5343   (eval $ac_try) 2>&5
5344   ac_status=$?
5345   echo "$as_me:5345: \$? = $ac_status" >&5
5346   (exit $ac_status); }; }; then
5347   ac_cv_lib_gpm_Gpm_Wgetch=yes
5348 else
5349   echo "$as_me: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 ac_cv_lib_gpm_Gpm_Wgetch=no
5352 fi
5353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5354 LIBS=$ac_check_lib_save_LIBS
5355 fi
5356 echo "$as_me:5356: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5357 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5358 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5359
5360 echo "$as_me:5360: checking if GPM is weakly bound to curses library" >&5
5361 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5362 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5363   echo $ECHO_N "(cached) $ECHO_C" >&6
5364 else
5365
5366 cf_cv_check_gpm_wgetch=unknown
5367 if test "$cross_compiling" != yes ; then
5368
5369 cat >conftest.$ac_ext <<CF_EOF
5370 #include <gpm.h>
5371 int main()
5372 {
5373         Gpm_Wgetch();
5374         ${cf_cv_main_return:-return}(0);
5375 }
5376 CF_EOF
5377
5378         cf_save_LIBS="$LIBS"
5379         # This only works if we can look at the symbol table.  If a shared
5380         # library is stripped for install, we cannot use that.  So we're forced
5381         # to rely on the static library, noting that some packagers may not
5382         # include it.
5383         LIBS="-static -lgpm -dynamic $LIBS"
5384         if { (eval echo "$as_me:5384: \"$ac_compile\"") >&5
5385   (eval $ac_compile) 2>&5
5386   ac_status=$?
5387   echo "$as_me:5387: \$? = $ac_status" >&5
5388   (exit $ac_status); } ; then
5389                 if { (eval echo "$as_me:5389: \"$ac_link\"") >&5
5390   (eval $ac_link) 2>&5
5391   ac_status=$?
5392   echo "$as_me:5392: \$? = $ac_status" >&5
5393   (exit $ac_status); } ; then
5394                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5395                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5396                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5397                 fi
5398         fi
5399         rm -rf conftest*
5400         LIBS="$cf_save_LIBS"
5401 fi
5402
5403 fi
5404 echo "$as_me:5404: result: $cf_cv_check_gpm_wgetch" >&5
5405 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5406
5407 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5408         { echo "$as_me:5408: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5409 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5410 fi
5411
5412 fi
5413
5414 fi
5415
5416 # not everyone has "test -c"
5417 if test -c /dev/sysmouse 2>/dev/null ; then
5418 echo "$as_me:5418: checking if you want to use sysmouse" >&5
5419 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5420
5421 # Check whether --with-sysmouse or --without-sysmouse was given.
5422 if test "${with_sysmouse+set}" = set; then
5423   withval="$with_sysmouse"
5424   cf_with_sysmouse=$withval
5425 else
5426   cf_with_sysmouse=maybe
5427 fi;
5428         if test "$cf_with_sysmouse" != no ; then
5429         cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5432
5433 #include <osreldate.h>
5434 #if (__FreeBSD_version >= 400017)
5435 #include <sys/consio.h>
5436 #include <sys/fbio.h>
5437 #else
5438 #include <machine/console.h>
5439 #endif
5440
5441 int
5442 main ()
5443 {
5444
5445         struct mouse_info the_mouse;
5446         ioctl(0, CONS_MOUSECTL, &the_mouse);
5447
5448   ;
5449   return 0;
5450 }
5451 _ACEOF
5452 rm -f conftest.$ac_objext
5453 if { (eval echo "$as_me:5453: \"$ac_compile\"") >&5
5454   (eval $ac_compile) 2>&5
5455   ac_status=$?
5456   echo "$as_me:5456: \$? = $ac_status" >&5
5457   (exit $ac_status); } &&
5458          { ac_try='test -s conftest.$ac_objext'
5459   { (eval echo "$as_me:5459: \"$ac_try\"") >&5
5460   (eval $ac_try) 2>&5
5461   ac_status=$?
5462   echo "$as_me:5462: \$? = $ac_status" >&5
5463   (exit $ac_status); }; }; then
5464   cf_with_sysmouse=yes
5465 else
5466   echo "$as_me: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5468 cf_with_sysmouse=no
5469 fi
5470 rm -f conftest.$ac_objext conftest.$ac_ext
5471         fi
5472 echo "$as_me:5472: result: $cf_with_sysmouse" >&5
5473 echo "${ECHO_T}$cf_with_sysmouse" >&6
5474 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5475 #define USE_SYSMOUSE 1
5476 EOF
5477
5478 fi
5479
5480 if test X"$CC_G_OPT" = X"" ; then
5481         CC_G_OPT='-g'
5482         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5483 fi
5484
5485 if test X"$CXX_G_OPT" = X"" ; then
5486         CXX_G_OPT='-g'
5487         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5488 fi
5489
5490 echo "$as_me:5490: checking for default loader flags" >&5
5491 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5492 case $DFT_LWR_MODEL in
5493 libtool) LD_MODEL=''   ;;
5494 normal)  LD_MODEL=''   ;;
5495 debug)   LD_MODEL=$CC_G_OPT ;;
5496 profile) LD_MODEL='-pg';;
5497 shared)  LD_MODEL=''   ;;
5498 esac
5499 echo "$as_me:5499: result: $LD_MODEL" >&5
5500 echo "${ECHO_T}$LD_MODEL" >&6
5501
5502 case $DFT_LWR_MODEL in
5503 shared)
5504
5505 echo "$as_me:5505: checking if rpath option should be used" >&5
5506 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5507
5508 # Check whether --enable-rpath or --disable-rpath was given.
5509 if test "${enable_rpath+set}" = set; then
5510   enableval="$enable_rpath"
5511   cf_cv_enable_rpath=$enableval
5512 else
5513   cf_cv_enable_rpath=no
5514 fi;
5515 echo "$as_me:5515: result: $cf_cv_enable_rpath" >&5
5516 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5517
5518 echo "$as_me:5518: checking if shared libraries should be relinked during install" >&5
5519 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5520
5521 # Check whether --enable-relink or --disable-relink was given.
5522 if test "${enable_relink+set}" = set; then
5523   enableval="$enable_relink"
5524   cf_cv_do_relink=$enableval
5525 else
5526   cf_cv_do_relink=yes
5527 fi;
5528 echo "$as_me:5528: result: $cf_cv_do_relink" >&5
5529 echo "${ECHO_T}$cf_cv_do_relink" >&6
5530         ;;
5531 esac
5532
5533 LD_RPATH_OPT=
5534 echo "$as_me:5534: checking for an rpath option" >&5
5535 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5536 case $cf_cv_system_name in #(vi
5537 irix*) #(vi
5538         if test "$GCC" = yes; then
5539                 LD_RPATH_OPT="-Wl,-rpath,"
5540         else
5541                 LD_RPATH_OPT="-rpath "
5542         fi
5543         ;;
5544 linux*|gnu*|k*bsd*-gnu) #(vi
5545         LD_RPATH_OPT="-Wl,-rpath,"
5546         ;;
5547 openbsd[2-9].*|mirbsd*) #(vi
5548         LD_RPATH_OPT="-Wl,-rpath,"
5549         ;;
5550 dragonfly*|freebsd*) #(vi
5551         LD_RPATH_OPT="-rpath "
5552         ;;
5553 netbsd*) #(vi
5554         LD_RPATH_OPT="-Wl,-rpath,"
5555         ;;
5556 osf*|mls+*) #(vi
5557         LD_RPATH_OPT="-rpath "
5558         ;;
5559 solaris2*) #(vi
5560         LD_RPATH_OPT="-R"
5561         ;;
5562 *)
5563         ;;
5564 esac
5565 echo "$as_me:5565: result: $LD_RPATH_OPT" >&5
5566 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5567
5568 case "x$LD_RPATH_OPT" in #(vi
5569 x-R*)
5570         echo "$as_me:5570: checking if we need a space after rpath option" >&5
5571 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5572         cf_save_LIBS="$LIBS"
5573         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5574         cat >conftest.$ac_ext <<_ACEOF
5575 #line 5575 "configure"
5576 #include "confdefs.h"
5577
5578 int
5579 main ()
5580 {
5581
5582   ;
5583   return 0;
5584 }
5585 _ACEOF
5586 rm -f conftest.$ac_objext conftest$ac_exeext
5587 if { (eval echo "$as_me:5587: \"$ac_link\"") >&5
5588   (eval $ac_link) 2>&5
5589   ac_status=$?
5590   echo "$as_me:5590: \$? = $ac_status" >&5
5591   (exit $ac_status); } &&
5592          { ac_try='test -s conftest$ac_exeext'
5593   { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5594   (eval $ac_try) 2>&5
5595   ac_status=$?
5596   echo "$as_me:5596: \$? = $ac_status" >&5
5597   (exit $ac_status); }; }; then
5598   cf_rpath_space=no
5599 else
5600   echo "$as_me: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 cf_rpath_space=yes
5603 fi
5604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5605         LIBS="$cf_save_LIBS"
5606         echo "$as_me:5606: result: $cf_rpath_space" >&5
5607 echo "${ECHO_T}$cf_rpath_space" >&6
5608         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5609         ;;
5610 esac
5611
5612         LOCAL_LDFLAGS=
5613         LOCAL_LDFLAGS2=
5614         LD_SHARED_OPTS=
5615         INSTALL_LIB="-m 644"
5616
5617         cf_cv_do_symlinks=no
5618         cf_ld_rpath_opt=
5619         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5620
5621         echo "$as_me:5621: checking if release/abi version should be used for shared libs" >&5
5622 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5623
5624 # Check whether --with-shlib-version or --without-shlib-version was given.
5625 if test "${with_shlib_version+set}" = set; then
5626   withval="$with_shlib_version"
5627   test -z "$withval" && withval=auto
5628         case $withval in #(vi
5629         yes) #(vi
5630                 cf_cv_shlib_version=auto
5631                 ;;
5632         rel|abi|auto|no) #(vi
5633                 cf_cv_shlib_version=$withval
5634                 ;;
5635         *)
5636                 { { echo "$as_me:5636: error: option value must be one of: rel, abi, auto or no" >&5
5637 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5638    { (exit 1); exit 1; }; }
5639                 ;;
5640         esac
5641
5642 else
5643   cf_cv_shlib_version=auto
5644 fi;
5645         echo "$as_me:5645: result: $cf_cv_shlib_version" >&5
5646 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5647
5648         cf_cv_rm_so_locs=no
5649
5650         # Some less-capable ports of gcc support only -fpic
5651         CC_SHARED_OPTS=
5652         if test "$GCC" = yes
5653         then
5654                 echo "$as_me:5654: checking which $CC option to use" >&5
5655 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5656                 cf_save_CFLAGS="$CFLAGS"
5657                 for CC_SHARED_OPTS in -fPIC -fpic ''
5658                 do
5659                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5660                         cat >conftest.$ac_ext <<_ACEOF
5661 #line 5661 "configure"
5662 #include "confdefs.h"
5663 #include <stdio.h>
5664 int
5665 main ()
5666 {
5667 int x = 1
5668   ;
5669   return 0;
5670 }
5671 _ACEOF
5672 rm -f conftest.$ac_objext
5673 if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
5674   (eval $ac_compile) 2>&5
5675   ac_status=$?
5676   echo "$as_me:5676: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -s conftest.$ac_objext'
5679   { (eval echo "$as_me:5679: \"$ac_try\"") >&5
5680   (eval $ac_try) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); }; }; then
5684   break
5685 else
5686   echo "$as_me: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5688 fi
5689 rm -f conftest.$ac_objext conftest.$ac_ext
5690                 done
5691                 echo "$as_me:5691: result: $CC_SHARED_OPTS" >&5
5692 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5693                 CFLAGS="$cf_save_CFLAGS"
5694         fi
5695
5696         cf_cv_shlib_version_infix=no
5697
5698         case $cf_cv_system_name in #(vi
5699         aix4.3-9*|aix[5-7]*) #(vi
5700                 if test "$GCC" = yes; then
5701                         CC_SHARED_OPTS=
5702                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5703                 else
5704                         # CC_SHARED_OPTS='-qpic=large -G'
5705                         # perhaps "-bM:SRE -bnoentry -bexpall"
5706                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5707                 fi
5708                 ;;
5709         beos*) #(vi
5710                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5711                 ;;
5712         cygwin*) #(vi
5713                 CC_SHARED_OPTS=
5714                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5715                 cf_cv_shlib_version=cygdll
5716                 cf_cv_shlib_version_infix=cygdll
5717                 cat >mk_shared_lib.sh <<-CF_EOF
5718                 #!/bin/sh
5719                 SHARED_LIB=\$1
5720                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5721                 shift
5722                 cat <<-EOF
5723                 Linking shared library
5724                 ** SHARED_LIB \$SHARED_LIB
5725                 ** IMPORT_LIB \$IMPORT_LIB
5726 EOF
5727                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5728 CF_EOF
5729                 chmod +x mk_shared_lib.sh
5730                 ;;
5731         darwin*) #(vi
5732                 EXTRA_CFLAGS="-no-cpp-precomp"
5733                 CC_SHARED_OPTS="-dynamic"
5734                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5735                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5736                 cf_cv_shlib_version_infix=yes
5737                 echo "$as_me:5737: checking if ld -search_paths_first works" >&5
5738 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5739 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5740   echo $ECHO_N "(cached) $ECHO_C" >&6
5741 else
5742
5743                         cf_save_LDFLAGS=$LDFLAGS
5744                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5745                         cat >conftest.$ac_ext <<_ACEOF
5746 #line 5746 "configure"
5747 #include "confdefs.h"
5748
5749 int
5750 main ()
5751 {
5752 int i;
5753   ;
5754   return 0;
5755 }
5756 _ACEOF
5757 rm -f conftest.$ac_objext conftest$ac_exeext
5758 if { (eval echo "$as_me:5758: \"$ac_link\"") >&5
5759   (eval $ac_link) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); } &&
5763          { ac_try='test -s conftest$ac_exeext'
5764   { (eval echo "$as_me:5764: \"$ac_try\"") >&5
5765   (eval $ac_try) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); }; }; then
5769   cf_cv_ldflags_search_paths_first=yes
5770 else
5771   echo "$as_me: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 cf_cv_ldflags_search_paths_first=no
5774 fi
5775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5776                                 LDFLAGS=$cf_save_LDFLAGS
5777 fi
5778 echo "$as_me:5778: result: $cf_cv_ldflags_search_paths_first" >&5
5779 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5780                 if test $cf_cv_ldflags_search_paths_first = yes; then
5781                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5782                 fi
5783                 ;;
5784         hpux*) #(vi
5785                 # (tested with gcc 2.7.2 -- I don't have c89)
5786                 if test "$GCC" = yes; then
5787                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5788                 else
5789                         CC_SHARED_OPTS='+Z'
5790                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5791                 fi
5792                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5793                 # HP-UX shared libraries must be executable, and should be
5794                 # readonly to exploit a quirk in the memory manager.
5795                 INSTALL_LIB="-m 555"
5796                 ;;
5797         interix*)
5798                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5799                 if test "$cf_cv_shlib_version" = rel; then
5800                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5801                 else
5802                         cf_shared_soname='`basename `'
5803                 fi
5804                 CC_SHARED_OPTS=
5805                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5806                 ;;
5807         irix*) #(vi
5808                 if test "$cf_cv_enable_rpath" = yes ; then
5809                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5810                 fi
5811                 # tested with IRIX 5.2 and 'cc'.
5812                 if test "$GCC" != yes; then
5813                         CC_SHARED_OPTS='-KPIC'
5814                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5815                 else
5816                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5817                 fi
5818                 cf_cv_rm_so_locs=yes
5819                 ;;
5820         linux*|gnu*|k*bsd*-gnu) #(vi
5821                 if test "$DFT_LWR_MODEL" = "shared" ; then
5822                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5823                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5824                 fi
5825                 if test "$cf_cv_enable_rpath" = yes ; then
5826                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5827                 fi
5828
5829         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5830         if test "$cf_cv_shlib_version" = rel; then
5831                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5832         else
5833                 cf_cv_shared_soname='`basename $@`'
5834         fi
5835
5836                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5837                 ;;
5838         openbsd[2-9].*|mirbsd*) #(vi
5839                 if test "$DFT_LWR_MODEL" = "shared" ; then
5840                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5841                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5842                 fi
5843                 if test "$cf_cv_enable_rpath" = yes ; then
5844                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5845                 fi
5846                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5847
5848         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5849         if test "$cf_cv_shlib_version" = rel; then
5850                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5851         else
5852                 cf_cv_shared_soname='`basename $@`'
5853         fi
5854
5855                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5856                 ;;
5857         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5858                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5859                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5860                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5861                 ;;
5862         dragonfly*|freebsd*) #(vi
5863                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5864                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5865                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5866                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5867                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5868                 fi
5869
5870         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5871         if test "$cf_cv_shlib_version" = rel; then
5872                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5873         else
5874                 cf_cv_shared_soname='`basename $@`'
5875         fi
5876
5877                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5878                 ;;
5879         netbsd*) #(vi
5880                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5881                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5882                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5883                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5884                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5885                         if test "$cf_cv_shlib_version" = auto; then
5886                         if test -f /usr/libexec/ld.elf_so; then
5887                                 cf_cv_shlib_version=abi
5888                         else
5889                                 cf_cv_shlib_version=rel
5890                         fi
5891                         fi
5892
5893         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5894         if test "$cf_cv_shlib_version" = rel; then
5895                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5896         else
5897                 cf_cv_shared_soname='`basename $@`'
5898         fi
5899
5900                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5901                 else
5902                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5903                 fi
5904                 ;;
5905         osf*|mls+*) #(vi
5906                 # tested with OSF/1 V3.2 and 'cc'
5907                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5908                 # link with shared libs).
5909                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5910                 case $host_os in #(vi
5911                 osf4*)
5912                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5913                         ;;
5914                 esac
5915                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5916                 if test "$DFT_LWR_MODEL" = "shared" ; then
5917                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5918                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5919                 fi
5920                 cf_cv_rm_so_locs=yes
5921                 ;;
5922         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5923                 # tested with osr5.0.5
5924                 if test "$GCC" != yes; then
5925                         CC_SHARED_OPTS='-belf -KPIC'
5926                 fi
5927                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5928                 if test "$cf_cv_enable_rpath" = yes ; then
5929                         # only way is to set LD_RUN_PATH but no switch for it
5930                         RUN_PATH=$libdir
5931                 fi
5932                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5933                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5934                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5935                 ;;
5936         sunos4*) #(vi
5937                 # tested with SunOS 4.1.1 and gcc 2.7.0
5938                 if test "$GCC" != yes; then
5939                         CC_SHARED_OPTS='-KPIC'
5940                 fi
5941                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5942                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5943                 ;;
5944         solaris2*) #(vi
5945                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5946                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5947                 if test "$DFT_LWR_MODEL" = "shared" ; then
5948                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950                 fi
5951                 if test "$cf_cv_enable_rpath" = yes ; then
5952                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5953                 fi
5954
5955         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956         if test "$cf_cv_shlib_version" = rel; then
5957                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5958         else
5959                 cf_cv_shared_soname='`basename $@`'
5960         fi
5961
5962                 if test "$GCC" != yes; then
5963                         cf_save_CFLAGS="$CFLAGS"
5964                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5965                         do
5966                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5967                                 cat >conftest.$ac_ext <<_ACEOF
5968 #line 5968 "configure"
5969 #include "confdefs.h"
5970 #include <stdio.h>
5971 int
5972 main ()
5973 {
5974 printf("Hello\n");
5975   ;
5976   return 0;
5977 }
5978 _ACEOF
5979 rm -f conftest.$ac_objext
5980 if { (eval echo "$as_me:5980: \"$ac_compile\"") >&5
5981   (eval $ac_compile) 2>&5
5982   ac_status=$?
5983   echo "$as_me:5983: \$? = $ac_status" >&5
5984   (exit $ac_status); } &&
5985          { ac_try='test -s conftest.$ac_objext'
5986   { (eval echo "$as_me:5986: \"$ac_try\"") >&5
5987   (eval $ac_try) 2>&5
5988   ac_status=$?
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit $ac_status); }; }; then
5991   break
5992 else
5993   echo "$as_me: failed program was:" >&5
5994 cat conftest.$ac_ext >&5
5995 fi
5996 rm -f conftest.$ac_objext conftest.$ac_ext
5997                         done
5998                         CFLAGS="$cf_save_CFLAGS"
5999                         CC_SHARED_OPTS=$cf_shared_opts
6000                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6001                 else
6002                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6003                 fi
6004                 ;;
6005         sysv5uw7*|unix_sv*) #(vi
6006                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6007                 if test "$GCC" != yes; then
6008                         CC_SHARED_OPTS='-KPIC'
6009                 fi
6010                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6011                 ;;
6012         *)
6013                 CC_SHARED_OPTS='unknown'
6014                 MK_SHARED_LIB='echo unknown'
6015                 ;;
6016         esac
6017
6018         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6019         case "$cf_cv_shlib_version" in #(vi
6020         rel|abi)
6021                 case "$MK_SHARED_LIB" in #(vi
6022                 *'-o $@') #(vi
6023                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6024                         ;;
6025                 *)
6026                         { echo "$as_me:6026: WARNING: ignored --with-shlib-version" >&5
6027 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6028                         ;;
6029                 esac
6030                 ;;
6031         esac
6032
6033         # RPATH_LIST is a colon-separated list of directories
6034         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6035         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6036
6037 if test "$CC_SHARED_OPTS" = "unknown"; then
6038         for model in $cf_list_models; do
6039                 if test "$model" = "shared"; then
6040                         { { echo "$as_me:6040: error: Shared libraries are not supported in this version" >&5
6041 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6042    { (exit 1); exit 1; }; }
6043                 fi
6044         done
6045 fi
6046
6047 ### If we're building with rpath, try to link non-standard libs that way too.
6048 if test "$DFT_LWR_MODEL" = "shared"; then
6049
6050 echo "$as_me:6050: checking if rpath-hack should be disabled" >&5
6051 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6052
6053 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6054 if test "${enable_rpath_hack+set}" = set; then
6055   enableval="$enable_rpath_hack"
6056   test "$enableval" != no && enableval=yes
6057   if test "$enableval" != "yes" ; then
6058     cf_disable_rpath_hack=yes
6059   else
6060     cf_disable_rpath_hack=no
6061   fi
6062 else
6063   enableval=yes
6064   cf_disable_rpath_hack=no
6065
6066 fi;
6067 echo "$as_me:6067: result: $cf_disable_rpath_hack" >&5
6068 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6069 if test "$cf_disable_rpath_hack" = no ; then
6070
6071 echo "$as_me:6071: checking for updated LDFLAGS" >&5
6072 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6073 if test -n "$LD_RPATH_OPT" ; then
6074         echo "$as_me:6074: result: maybe" >&5
6075 echo "${ECHO_T}maybe" >&6
6076
6077         for ac_prog in ldd
6078 do
6079   # Extract the first word of "$ac_prog", so it can be a program name with args.
6080 set dummy $ac_prog; ac_word=$2
6081 echo "$as_me:6081: checking for $ac_word" >&5
6082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6083 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6084   echo $ECHO_N "(cached) $ECHO_C" >&6
6085 else
6086   if test -n "$cf_ldd_prog"; then
6087   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6088 else
6089   ac_save_IFS=$IFS; IFS=$ac_path_separator
6090 ac_dummy="$PATH"
6091 for ac_dir in $ac_dummy; do
6092   IFS=$ac_save_IFS
6093   test -z "$ac_dir" && ac_dir=.
6094   $as_executable_p "$ac_dir/$ac_word" || continue
6095 ac_cv_prog_cf_ldd_prog="$ac_prog"
6096 echo "$as_me:6096: found $ac_dir/$ac_word" >&5
6097 break
6098 done
6099
6100 fi
6101 fi
6102 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6103 if test -n "$cf_ldd_prog"; then
6104   echo "$as_me:6104: result: $cf_ldd_prog" >&5
6105 echo "${ECHO_T}$cf_ldd_prog" >&6
6106 else
6107   echo "$as_me:6107: result: no" >&5
6108 echo "${ECHO_T}no" >&6
6109 fi
6110
6111   test -n "$cf_ldd_prog" && break
6112 done
6113 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6114
6115         cf_rpath_list="/usr/lib /lib"
6116         if test "$cf_ldd_prog" != no
6117         then
6118                 cf_rpath_oops=
6119
6120 cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123 #include <stdio.h>
6124 int
6125 main ()
6126 {
6127 printf("Hello");
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_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6145                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6146 else
6147   echo "$as_me: failed program was:" >&5
6148 cat conftest.$ac_ext >&5
6149 fi
6150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6151
6152                 # If we passed the link-test, but get a "not found" on a given library,
6153                 # this could be due to inept reconfiguration of gcc to make it only
6154                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6155                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6156                 # /usr/local libraries.
6157                 if test -n "$cf_rpath_oops"
6158                 then
6159                         for cf_rpath_src in $cf_rpath_oops
6160                         do
6161                                 for cf_rpath_dir in \
6162                                         /usr/local \
6163                                         /usr/pkg \
6164                                         /opt/sfw
6165                                 do
6166                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6167                                         then
6168                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6169
6170 echo "${as_me:-configure}:6170: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6171
6172                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6173                                                 break
6174                                         fi
6175                                 done
6176                         done
6177                 fi
6178         fi
6179
6180         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6181
6182 echo "${as_me:-configure}:6182: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6183
6184 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6185
6186 echo "${as_me:-configure}:6186: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6187
6188 cf_rpath_dst=
6189 for cf_rpath_src in $LDFLAGS
6190 do
6191         case $cf_rpath_src in #(vi
6192         -L*) #(vi
6193
6194                 # check if this refers to a directory which we will ignore
6195                 cf_rpath_skip=no
6196                 if test -n "$cf_rpath_list"
6197                 then
6198                         for cf_rpath_item in $cf_rpath_list
6199                         do
6200                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6201                                 then
6202                                         cf_rpath_skip=yes
6203                                         break
6204                                 fi
6205                         done
6206                 fi
6207
6208                 if test "$cf_rpath_skip" = no
6209                 then
6210                         # transform the option
6211                         if test "$LD_RPATH_OPT" = "-R " ; then
6212                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6213                         else
6214                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6215                         fi
6216
6217                         # if we have not already added this, add it now
6218                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6219                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6220                         then
6221                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6222
6223 echo "${as_me:-configure}:6223: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6224
6225                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6226                         fi
6227                 fi
6228                 ;;
6229         esac
6230         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6231 done
6232 LDFLAGS=$cf_rpath_dst
6233
6234 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6235
6236 echo "${as_me:-configure}:6236: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6237
6238 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6239
6240 echo "${as_me:-configure}:6240: testing ...checking LIBS $LIBS ..." 1>&5
6241
6242 cf_rpath_dst=
6243 for cf_rpath_src in $LIBS
6244 do
6245         case $cf_rpath_src in #(vi
6246         -L*) #(vi
6247
6248                 # check if this refers to a directory which we will ignore
6249                 cf_rpath_skip=no
6250                 if test -n "$cf_rpath_list"
6251                 then
6252                         for cf_rpath_item in $cf_rpath_list
6253                         do
6254                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6255                                 then
6256                                         cf_rpath_skip=yes
6257                                         break
6258                                 fi
6259                         done
6260                 fi
6261
6262                 if test "$cf_rpath_skip" = no
6263                 then
6264                         # transform the option
6265                         if test "$LD_RPATH_OPT" = "-R " ; then
6266                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6267                         else
6268                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6269                         fi
6270
6271                         # if we have not already added this, add it now
6272                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6273                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6274                         then
6275                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6276
6277 echo "${as_me:-configure}:6277: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6278
6279                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6280                         fi
6281                 fi
6282                 ;;
6283         esac
6284         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6285 done
6286 LIBS=$cf_rpath_dst
6287
6288 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6289
6290 echo "${as_me:-configure}:6290: testing ...checked LIBS $LIBS ..." 1>&5
6291
6292         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6293
6294 echo "${as_me:-configure}:6294: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6295
6296 fi
6297
6298 fi
6299
6300 fi
6301
6302 ###############################################################################
6303
6304 ###     use option --disable-overwrite to leave out the link to -lcurses
6305 echo "$as_me:6305: checking if you wish to install ncurses overwriting curses" >&5
6306 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6307
6308 # Check whether --enable-overwrite or --disable-overwrite was given.
6309 if test "${enable_overwrite+set}" = set; then
6310   enableval="$enable_overwrite"
6311   with_overwrite=$enableval
6312 else
6313   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6314 fi;
6315 echo "$as_me:6315: result: $with_overwrite" >&5
6316 echo "${ECHO_T}$with_overwrite" >&6
6317
6318 echo "$as_me:6318: checking if external terminfo-database is used" >&5
6319 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6320
6321 # Check whether --enable-database or --disable-database was given.
6322 if test "${enable_database+set}" = set; then
6323   enableval="$enable_database"
6324   use_database=$enableval
6325 else
6326   use_database=yes
6327 fi;
6328 echo "$as_me:6328: result: $use_database" >&5
6329 echo "${ECHO_T}$use_database" >&6
6330
6331 case $host_os in #(vi
6332 os2*) #(vi
6333         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6334         ;;
6335 *) #(vi
6336         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6337         ;;
6338 esac
6339
6340 if test "$use_database" != no ; then
6341         cat >>confdefs.h <<\EOF
6342 #define USE_DATABASE 1
6343 EOF
6344
6345         echo "$as_me:6345: checking which terminfo source-file will be installed" >&5
6346 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6347
6348 # Check whether --with-database or --without-database was given.
6349 if test "${with_database+set}" = set; then
6350   withval="$with_database"
6351   TERMINFO_SRC=$withval
6352 fi;
6353         echo "$as_me:6353: result: $TERMINFO_SRC" >&5
6354 echo "${ECHO_T}$TERMINFO_SRC" >&6
6355
6356         echo "$as_me:6356: checking whether to use hashed database instead of directory/tree" >&5
6357 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6358
6359 # Check whether --with-hashed-db or --without-hashed-db was given.
6360 if test "${with_hashed_db+set}" = set; then
6361   withval="$with_hashed_db"
6362
6363 else
6364   with_hashed_db=no
6365 fi;
6366         echo "$as_me:6366: result: $with_hashed_db" >&5
6367 echo "${ECHO_T}$with_hashed_db" >&6
6368 else
6369         with_hashed_db=no
6370 fi
6371
6372 echo "$as_me:6372: checking for list of fallback descriptions" >&5
6373 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6374
6375 # Check whether --with-fallbacks or --without-fallbacks was given.
6376 if test "${with_fallbacks+set}" = set; then
6377   withval="$with_fallbacks"
6378   with_fallback=$withval
6379 else
6380   with_fallback=
6381 fi;
6382 echo "$as_me:6382: result: $with_fallback" >&5
6383 echo "${ECHO_T}$with_fallback" >&6
6384 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6385
6386 echo "$as_me:6386: checking if you want modern xterm or antique" >&5
6387 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6388
6389 # Check whether --with-xterm-new or --without-xterm-new was given.
6390 if test "${with_xterm_new+set}" = set; then
6391   withval="$with_xterm_new"
6392   with_xterm_new=$withval
6393 else
6394   with_xterm_new=yes
6395 fi;
6396 case $with_xterm_new in
6397 no)     with_xterm_new=xterm-old;;
6398 *)      with_xterm_new=xterm-new;;
6399 esac
6400 echo "$as_me:6400: result: $with_xterm_new" >&5
6401 echo "${ECHO_T}$with_xterm_new" >&6
6402 WHICH_XTERM=$with_xterm_new
6403
6404 MAKE_TERMINFO=
6405 if test "$use_database" = no ; then
6406         TERMINFO="${datadir}/terminfo"
6407         MAKE_TERMINFO="#"
6408 else
6409
6410 echo "$as_me:6410: checking for list of terminfo directories" >&5
6411 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6412
6413         case $cf_cv_system_name in
6414         os2*)   PATH_SEPARATOR=';'  ;;
6415         *)      PATH_SEPARATOR=':'  ;;
6416         esac
6417
6418 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6419 if test "${with_terminfo_dirs+set}" = set; then
6420   withval="$with_terminfo_dirs"
6421
6422 else
6423   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6424 fi;
6425 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6426 cf_dst_path=
6427 for cf_src_path in $withval
6428 do
6429
6430 if test "x$prefix" != xNONE; then
6431   cf_path_syntax="$prefix"
6432 else
6433   cf_path_syntax="$ac_default_prefix"
6434 fi
6435
6436 case ".$cf_src_path" in #(vi
6437 .\$\(*\)*|.\'*\'*) #(vi
6438   ;;
6439 ..|./*|.\\*) #(vi
6440   ;;
6441 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6442   ;;
6443 .\${*prefix}*) #(vi
6444   eval cf_src_path="$cf_src_path"
6445   case ".$cf_src_path" in #(vi
6446   .NONE/*)
6447     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6448     ;;
6449   esac
6450   ;; #(vi
6451 .no|.NONE/*)
6452   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6453   ;;
6454 *)
6455   { { echo "$as_me:6455: error: expected a pathname, not \"$cf_src_path\"" >&5
6456 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6457    { (exit 1); exit 1; }; }
6458   ;;
6459 esac
6460
6461   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6462   cf_dst_path="${cf_dst_path}${cf_src_path}"
6463 done
6464 IFS="$ac_save_ifs"
6465
6466 eval 'TERMINFO_DIRS="$cf_dst_path"'
6467
6468 echo "$as_me:6468: result: $TERMINFO_DIRS" >&5
6469 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6470 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6471 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6472 EOF
6473
6474 echo "$as_me:6474: checking for default terminfo directory" >&5
6475 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6476
6477 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6478 if test "${with_default_terminfo_dir+set}" = set; then
6479   withval="$with_default_terminfo_dir"
6480
6481 else
6482   withval="${TERMINFO:-${datadir}/terminfo}"
6483 fi; if test -n "${datadir}/terminfo" ; then
6484
6485 if test "x$prefix" != xNONE; then
6486   cf_path_syntax="$prefix"
6487 else
6488   cf_path_syntax="$ac_default_prefix"
6489 fi
6490
6491 case ".$withval" in #(vi
6492 .\$\(*\)*|.\'*\'*) #(vi
6493   ;;
6494 ..|./*|.\\*) #(vi
6495   ;;
6496 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6497   ;;
6498 .\${*prefix}*) #(vi
6499   eval withval="$withval"
6500   case ".$withval" in #(vi
6501   .NONE/*)
6502     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6503     ;;
6504   esac
6505   ;; #(vi
6506 .no|.NONE/*)
6507   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6508   ;;
6509 *)
6510   { { echo "$as_me:6510: error: expected a pathname, not \"$withval\"" >&5
6511 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6512    { (exit 1); exit 1; }; }
6513   ;;
6514 esac
6515
6516 fi
6517 TERMINFO="$withval"
6518
6519 echo "$as_me:6519: result: $TERMINFO" >&5
6520 echo "${ECHO_T}$TERMINFO" >&6
6521 cat >>confdefs.h <<EOF
6522 #define TERMINFO "$TERMINFO"
6523 EOF
6524
6525 fi
6526
6527 ###     use option --disable-big-core to make tic run on small machines
6528 ###     We need 4Mb, check if we can allocate 50% more than that.
6529 echo "$as_me:6529: checking if big-core option selected" >&5
6530 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6531
6532 # Check whether --enable-big-core or --disable-big-core was given.
6533 if test "${enable_big_core+set}" = set; then
6534   enableval="$enable_big_core"
6535   with_big_core=$enableval
6536 else
6537   if test "$cross_compiling" = yes; then
6538   with_big_core=no
6539 else
6540   cat >conftest.$ac_ext <<_ACEOF
6541 #line 6541 "configure"
6542 #include "confdefs.h"
6543
6544 #include <stdlib.h>
6545 #include <string.h>
6546 int main() {
6547         unsigned long n = 6000000L;
6548         char *s = malloc(n);
6549         if (s != 0)
6550                 s[0] = s[n-1] = 0;
6551         ${cf_cv_main_return:-return}(s == 0);
6552 }
6553 _ACEOF
6554 rm -f conftest$ac_exeext
6555 if { (eval echo "$as_me:6555: \"$ac_link\"") >&5
6556   (eval $ac_link) 2>&5
6557   ac_status=$?
6558   echo "$as_me:6558: \$? = $ac_status" >&5
6559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6560   { (eval echo "$as_me:6560: \"$ac_try\"") >&5
6561   (eval $ac_try) 2>&5
6562   ac_status=$?
6563   echo "$as_me:6563: \$? = $ac_status" >&5
6564   (exit $ac_status); }; }; then
6565   with_big_core=yes
6566 else
6567   echo "$as_me: program exited with status $ac_status" >&5
6568 echo "$as_me: failed program was:" >&5
6569 cat conftest.$ac_ext >&5
6570 with_big_core=no
6571 fi
6572 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6573 fi
6574 fi;
6575 echo "$as_me:6575: result: $with_big_core" >&5
6576 echo "${ECHO_T}$with_big_core" >&6
6577 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6578 #define HAVE_BIG_CORE 1
6579 EOF
6580
6581 ### ISO C only guarantees 512-char strings, we have tables which load faster
6582 ### when constructed using "big" strings.  More than the C compiler, the awk
6583 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6584 echo "$as_me:6584: checking if big-strings option selected" >&5
6585 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6586
6587 # Check whether --enable-big-strings or --disable-big-strings was given.
6588 if test "${enable_big_strings+set}" = set; then
6589   enableval="$enable_big_strings"
6590   with_big_strings=$enableval
6591 else
6592
6593         case x$AWK in #(vi
6594         x)
6595                 eval with_big_strings=no
6596                 ;;
6597         *) #(vi
6598                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6599                         | $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
6600                         eval with_big_strings=yes
6601                 else
6602                         eval with_big_strings=no
6603                 fi
6604                 ;;
6605         esac
6606
6607 fi;
6608 echo "$as_me:6608: result: $with_big_strings" >&5
6609 echo "${ECHO_T}$with_big_strings" >&6
6610
6611 USE_BIG_STRINGS=0
6612 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6613
6614 ###     use option --enable-termcap to compile in the termcap fallback support
6615 echo "$as_me:6615: checking if you want termcap-fallback support" >&5
6616 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6617
6618 # Check whether --enable-termcap or --disable-termcap was given.
6619 if test "${enable_termcap+set}" = set; then
6620   enableval="$enable_termcap"
6621   with_termcap=$enableval
6622 else
6623   with_termcap=no
6624 fi;
6625 echo "$as_me:6625: result: $with_termcap" >&5
6626 echo "${ECHO_T}$with_termcap" >&6
6627
6628 if test "$with_termcap" != "yes" ; then
6629         if test "$use_database" = no ; then
6630                 if test -z "$with_fallback" ; then
6631                         { { echo "$as_me:6631: error: You have disabled the database w/o specifying fallbacks" >&5
6632 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6633    { (exit 1); exit 1; }; }
6634                 fi
6635         fi
6636         cat >>confdefs.h <<\EOF
6637 #define PURE_TERMINFO 1
6638 EOF
6639
6640 else
6641
6642 if test "$with_ticlib" != no ; then
6643         { { echo "$as_me:6643: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6644 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6645    { (exit 1); exit 1; }; }
6646 fi
6647
6648 cat >>confdefs.h <<\EOF
6649 #define USE_TERMCAP 1
6650 EOF
6651
6652 echo "$as_me:6652: checking for list of termcap files" >&5
6653 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6654
6655 # Check whether --with-termpath or --without-termpath was given.
6656 if test "${with_termpath+set}" = set; then
6657   withval="$with_termpath"
6658
6659 else
6660   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6661 fi;
6662 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6663 cf_dst_path=
6664 for cf_src_path in $withval
6665 do
6666
6667 if test "x$prefix" != xNONE; then
6668   cf_path_syntax="$prefix"
6669 else
6670   cf_path_syntax="$ac_default_prefix"
6671 fi
6672
6673 case ".$cf_src_path" in #(vi
6674 .\$\(*\)*|.\'*\'*) #(vi
6675   ;;
6676 ..|./*|.\\*) #(vi
6677   ;;
6678 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6679   ;;
6680 .\${*prefix}*) #(vi
6681   eval cf_src_path="$cf_src_path"
6682   case ".$cf_src_path" in #(vi
6683   .NONE/*)
6684     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6685     ;;
6686   esac
6687   ;; #(vi
6688 .no|.NONE/*)
6689   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6690   ;;
6691 *)
6692   { { echo "$as_me:6692: error: expected a pathname, not \"$cf_src_path\"" >&5
6693 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6694    { (exit 1); exit 1; }; }
6695   ;;
6696 esac
6697
6698   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6699   cf_dst_path="${cf_dst_path}${cf_src_path}"
6700 done
6701 IFS="$ac_save_ifs"
6702
6703 eval 'TERMPATH="$cf_dst_path"'
6704
6705 echo "$as_me:6705: result: $TERMPATH" >&5
6706 echo "${ECHO_T}$TERMPATH" >&6
6707 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6708 #define TERMPATH "$TERMPATH"
6709 EOF
6710
6711 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6712 echo "$as_me:6712: checking if fast termcap-loader is needed" >&5
6713 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6714
6715 # Check whether --enable-getcap or --disable-getcap was given.
6716 if test "${enable_getcap+set}" = set; then
6717   enableval="$enable_getcap"
6718   with_getcap=$enableval
6719 else
6720   with_getcap=no
6721 fi;
6722 echo "$as_me:6722: result: $with_getcap" >&5
6723 echo "${ECHO_T}$with_getcap" >&6
6724 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6725 #define USE_GETCAP 1
6726 EOF
6727
6728 echo "$as_me:6728: checking if translated termcaps will be cached in ~/.terminfo" >&5
6729 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6730
6731 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6732 if test "${enable_getcap_cache+set}" = set; then
6733   enableval="$enable_getcap_cache"
6734   with_getcap_cache=$enableval
6735 else
6736   with_getcap_cache=no
6737 fi;
6738 echo "$as_me:6738: result: $with_getcap_cache" >&5
6739 echo "${ECHO_T}$with_getcap_cache" >&6
6740 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6741 #define USE_GETCAP_CACHE 1
6742 EOF
6743
6744 fi
6745
6746 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6747 echo "$as_me:6747: checking if ~/.terminfo is wanted" >&5
6748 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6749
6750 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6751 if test "${enable_home_terminfo+set}" = set; then
6752   enableval="$enable_home_terminfo"
6753   with_home_terminfo=$enableval
6754 else
6755   with_home_terminfo=yes
6756 fi;
6757 echo "$as_me:6757: result: $with_home_terminfo" >&5
6758 echo "${ECHO_T}$with_home_terminfo" >&6
6759 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6760 #define USE_HOME_TERMINFO 1
6761 EOF
6762
6763 echo "$as_me:6763: checking if you want to use restricted environment when running as root" >&5
6764 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6765
6766 # Check whether --enable-root-environ or --disable-root-environ was given.
6767 if test "${enable_root_environ+set}" = set; then
6768   enableval="$enable_root_environ"
6769   with_root_environ=$enableval
6770 else
6771   with_root_environ=yes
6772 fi;
6773 echo "$as_me:6773: result: $with_root_environ" >&5
6774 echo "${ECHO_T}$with_root_environ" >&6
6775 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6776 #define USE_ROOT_ENVIRON 1
6777 EOF
6778
6779 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6780 ###   to reduce storage requirements for the terminfo database.
6781
6782 for ac_func in \
6783         remove \
6784         unlink
6785 do
6786 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6787 echo "$as_me:6787: checking for $ac_func" >&5
6788 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6789 if eval "test \"\${$as_ac_var+set}\" = set"; then
6790   echo $ECHO_N "(cached) $ECHO_C" >&6
6791 else
6792   cat >conftest.$ac_ext <<_ACEOF
6793 #line 6793 "configure"
6794 #include "confdefs.h"
6795 /* System header to define __stub macros and hopefully few prototypes,
6796     which can conflict with char $ac_func (); below.  */
6797 #include <assert.h>
6798 /* Override any gcc2 internal prototype to avoid an error.  */
6799 #ifdef __cplusplus
6800 extern "C"
6801 #endif
6802 /* We use char because int might match the return type of a gcc2
6803    builtin and then its argument prototype would still apply.  */
6804 char $ac_func ();
6805 char (*f) ();
6806
6807 int
6808 main ()
6809 {
6810 /* The GNU C library defines this for functions which it implements
6811     to always fail with ENOSYS.  Some functions are actually named
6812     something starting with __ and the normal name is an alias.  */
6813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6814 choke me
6815 #else
6816 f = $ac_func;
6817 #endif
6818
6819   ;
6820   return 0;
6821 }
6822 _ACEOF
6823 rm -f conftest.$ac_objext conftest$ac_exeext
6824 if { (eval echo "$as_me:6824: \"$ac_link\"") >&5
6825   (eval $ac_link) 2>&5
6826   ac_status=$?
6827   echo "$as_me:6827: \$? = $ac_status" >&5
6828   (exit $ac_status); } &&
6829          { ac_try='test -s conftest$ac_exeext'
6830   { (eval echo "$as_me:6830: \"$ac_try\"") >&5
6831   (eval $ac_try) 2>&5
6832   ac_status=$?
6833   echo "$as_me:6833: \$? = $ac_status" >&5
6834   (exit $ac_status); }; }; then
6835   eval "$as_ac_var=yes"
6836 else
6837   echo "$as_me: failed program was:" >&5
6838 cat conftest.$ac_ext >&5
6839 eval "$as_ac_var=no"
6840 fi
6841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6842 fi
6843 echo "$as_me:6843: result: `eval echo '${'$as_ac_var'}'`" >&5
6844 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6845 if test `eval echo '${'$as_ac_var'}'` = yes; then
6846   cat >>confdefs.h <<EOF
6847 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6848 EOF
6849
6850 fi
6851 done
6852
6853 if test "$cross_compiling" = yes ; then
6854
6855 for ac_func in \
6856                 link \
6857                 symlink
6858 do
6859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6860 echo "$as_me:6860: checking for $ac_func" >&5
6861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6862 if eval "test \"\${$as_ac_var+set}\" = set"; then
6863   echo $ECHO_N "(cached) $ECHO_C" >&6
6864 else
6865   cat >conftest.$ac_ext <<_ACEOF
6866 #line 6866 "configure"
6867 #include "confdefs.h"
6868 /* System header to define __stub macros and hopefully few prototypes,
6869     which can conflict with char $ac_func (); below.  */
6870 #include <assert.h>
6871 /* Override any gcc2 internal prototype to avoid an error.  */
6872 #ifdef __cplusplus
6873 extern "C"
6874 #endif
6875 /* We use char because int might match the return type of a gcc2
6876    builtin and then its argument prototype would still apply.  */
6877 char $ac_func ();
6878 char (*f) ();
6879
6880 int
6881 main ()
6882 {
6883 /* The GNU C library defines this for functions which it implements
6884     to always fail with ENOSYS.  Some functions are actually named
6885     something starting with __ and the normal name is an alias.  */
6886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6887 choke me
6888 #else
6889 f = $ac_func;
6890 #endif
6891
6892   ;
6893   return 0;
6894 }
6895 _ACEOF
6896 rm -f conftest.$ac_objext conftest$ac_exeext
6897 if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
6898   (eval $ac_link) 2>&5
6899   ac_status=$?
6900   echo "$as_me:6900: \$? = $ac_status" >&5
6901   (exit $ac_status); } &&
6902          { ac_try='test -s conftest$ac_exeext'
6903   { (eval echo "$as_me:6903: \"$ac_try\"") >&5
6904   (eval $ac_try) 2>&5
6905   ac_status=$?
6906   echo "$as_me:6906: \$? = $ac_status" >&5
6907   (exit $ac_status); }; }; then
6908   eval "$as_ac_var=yes"
6909 else
6910   echo "$as_me: failed program was:" >&5
6911 cat conftest.$ac_ext >&5
6912 eval "$as_ac_var=no"
6913 fi
6914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6915 fi
6916 echo "$as_me:6916: result: `eval echo '${'$as_ac_var'}'`" >&5
6917 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6918 if test `eval echo '${'$as_ac_var'}'` = yes; then
6919   cat >>confdefs.h <<EOF
6920 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6921 EOF
6922
6923 fi
6924 done
6925
6926 else
6927         echo "$as_me:6927: checking if link/symlink functions work" >&5
6928 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6929 if test "${cf_cv_link_funcs+set}" = set; then
6930   echo $ECHO_N "(cached) $ECHO_C" >&6
6931 else
6932
6933                 cf_cv_link_funcs=
6934                 for cf_func in link symlink ; do
6935                         if test "$cross_compiling" = yes; then
6936
6937                         eval 'ac_cv_func_'$cf_func'=error'
6938 else
6939   cat >conftest.$ac_ext <<_ACEOF
6940 #line 6940 "configure"
6941 #include "confdefs.h"
6942
6943 #include <sys/types.h>
6944 #include <sys/stat.h>
6945 #ifdef HAVE_UNISTD_H
6946 #include <unistd.h>
6947 #endif
6948 int main()
6949 {
6950         int fail = 0;
6951         char *src = "config.log";
6952         char *dst = "conftest.chk";
6953         struct stat src_sb;
6954         struct stat dst_sb;
6955
6956         stat(src, &src_sb);
6957         fail = ($cf_func("config.log", "conftest.chk") < 0)
6958             || (stat(dst, &dst_sb) < 0)
6959             || (dst_sb.st_mtime != src_sb.st_mtime);
6960 #ifdef HAVE_UNLINK
6961         unlink(dst);
6962 #else
6963         remove(dst);
6964 #endif
6965         ${cf_cv_main_return:-return} (fail);
6966 }
6967
6968 _ACEOF
6969 rm -f conftest$ac_exeext
6970 if { (eval echo "$as_me:6970: \"$ac_link\"") >&5
6971   (eval $ac_link) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6975   { (eval echo "$as_me:6975: \"$ac_try\"") >&5
6976   (eval $ac_try) 2>&5
6977   ac_status=$?
6978   echo "$as_me:6978: \$? = $ac_status" >&5
6979   (exit $ac_status); }; }; then
6980
6981                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6982                         eval 'ac_cv_func_'$cf_func'=yes'
6983 else
6984   echo "$as_me: program exited with status $ac_status" >&5
6985 echo "$as_me: failed program was:" >&5
6986 cat conftest.$ac_ext >&5
6987
6988                         eval 'ac_cv_func_'$cf_func'=no'
6989 fi
6990 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6991 fi
6992                 done
6993                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6994
6995 fi
6996 echo "$as_me:6996: result: $cf_cv_link_funcs" >&5
6997 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6998         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6999 #define HAVE_LINK 1
7000 EOF
7001
7002         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
7003 #define HAVE_SYMLINK 1
7004 EOF
7005
7006 fi
7007
7008 with_links=no
7009 with_symlinks=no
7010
7011 # soft links (symbolic links) are useful for some systems where hard links do
7012 # not work, or to make it simpler to copy terminfo trees around.
7013 if test "$ac_cv_func_symlink" = yes ; then
7014     echo "$as_me:7014: checking if tic should use symbolic links" >&5
7015 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7016
7017 # Check whether --enable-symlinks or --disable-symlinks was given.
7018 if test "${enable_symlinks+set}" = set; then
7019   enableval="$enable_symlinks"
7020   with_symlinks=$enableval
7021 else
7022   with_symlinks=no
7023 fi;
7024     echo "$as_me:7024: result: $with_symlinks" >&5
7025 echo "${ECHO_T}$with_symlinks" >&6
7026 fi
7027
7028 # If we have hard links and did not choose to use soft links instead, there is
7029 # no reason to make this choice optional - use the hard links.
7030 if test "$with_symlinks" = no ; then
7031     echo "$as_me:7031: checking if tic should use hard links" >&5
7032 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7033     if test "$ac_cv_func_link" = yes ; then
7034         with_links=yes
7035     else
7036         with_links=no
7037     fi
7038     echo "$as_me:7038: result: $with_links" >&5
7039 echo "${ECHO_T}$with_links" >&6
7040 fi
7041
7042 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7043 #define USE_LINKS 1
7044 EOF
7045
7046 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7047 #define USE_SYMLINKS 1
7048 EOF
7049
7050 ###   use option --enable-broken-linker to force on use of broken-linker support
7051 echo "$as_me:7051: checking if you want broken-linker support code" >&5
7052 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7053
7054 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7055 if test "${enable_broken_linker+set}" = set; then
7056   enableval="$enable_broken_linker"
7057   with_broken_linker=$enableval
7058 else
7059   with_broken_linker=${BROKEN_LINKER:-no}
7060 fi;
7061 echo "$as_me:7061: result: $with_broken_linker" >&5
7062 echo "${ECHO_T}$with_broken_linker" >&6
7063
7064 BROKEN_LINKER=0
7065 if test "$with_broken_linker" = yes ; then
7066         cat >>confdefs.h <<\EOF
7067 #define BROKEN_LINKER 1
7068 EOF
7069
7070         BROKEN_LINKER=1
7071 elif test "$DFT_LWR_MODEL" = shared ; then
7072         case $cf_cv_system_name in #(vi
7073         cygwin*)
7074                 cat >>confdefs.h <<\EOF
7075 #define BROKEN_LINKER 1
7076 EOF
7077
7078                 BROKEN_LINKER=1
7079                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7080
7081 echo "${as_me:-configure}:7081: testing cygwin linker is broken anyway ..." 1>&5
7082
7083                 ;;
7084         esac
7085 fi
7086
7087 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7088 echo "$as_me:7088: checking if tputs should process BSD-style prefix padding" >&5
7089 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7090
7091 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7092 if test "${enable_bsdpad+set}" = set; then
7093   enableval="$enable_bsdpad"
7094   with_bsdpad=$enableval
7095 else
7096   with_bsdpad=no
7097 fi;
7098 echo "$as_me:7098: result: $with_bsdpad" >&5
7099 echo "${ECHO_T}$with_bsdpad" >&6
7100 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7101 #define BSD_TPUTS 1
7102 EOF
7103
7104 ###   use option --enable-widec to turn on use of wide-character support
7105 NCURSES_CH_T=chtype
7106 NCURSES_LIBUTF8=0
7107
7108 NEED_WCHAR_H=0
7109 NCURSES_MBSTATE_T=0
7110 NCURSES_WCHAR_T=0
7111 NCURSES_WINT_T=0
7112
7113 # Check to define _XOPEN_SOURCE "automatically"
7114
7115 cf_XOPEN_SOURCE=500
7116 cf_POSIX_C_SOURCE=199506L
7117 cf_xopen_source=
7118
7119 case $host_os in #(vi
7120 aix[4-7]*) #(vi
7121         cf_xopen_source="-D_ALL_SOURCE"
7122         ;;
7123 cygwin) #(vi
7124         cf_XOPEN_SOURCE=600
7125         ;;
7126 darwin[0-8].*) #(vi
7127         cf_xopen_source="-D_APPLE_C_SOURCE"
7128         ;;
7129 darwin*) #(vi
7130         cf_xopen_source="-D_DARWIN_C_SOURCE"
7131         ;;
7132 freebsd*|dragonfly*) #(vi
7133         # 5.x headers associate
7134         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7135         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7136         cf_POSIX_C_SOURCE=200112L
7137         cf_XOPEN_SOURCE=600
7138         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7139         ;;
7140 hpux11*) #(vi
7141         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7142         ;;
7143 hpux*) #(vi
7144         cf_xopen_source="-D_HPUX_SOURCE"
7145         ;;
7146 irix[56].*) #(vi
7147         cf_xopen_source="-D_SGI_SOURCE"
7148         cf_XOPEN_SOURCE=
7149         ;;
7150 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7151
7152 echo "$as_me:7152: checking if we must define _GNU_SOURCE" >&5
7153 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7154 if test "${cf_cv_gnu_source+set}" = set; then
7155   echo $ECHO_N "(cached) $ECHO_C" >&6
7156 else
7157
7158 cat >conftest.$ac_ext <<_ACEOF
7159 #line 7159 "configure"
7160 #include "confdefs.h"
7161 #include <sys/types.h>
7162 int
7163 main ()
7164 {
7165
7166 #ifndef _XOPEN_SOURCE
7167 make an error
7168 #endif
7169   ;
7170   return 0;
7171 }
7172 _ACEOF
7173 rm -f conftest.$ac_objext
7174 if { (eval echo "$as_me:7174: \"$ac_compile\"") >&5
7175   (eval $ac_compile) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit $ac_status); } &&
7179          { ac_try='test -s conftest.$ac_objext'
7180   { (eval echo "$as_me:7180: \"$ac_try\"") >&5
7181   (eval $ac_try) 2>&5
7182   ac_status=$?
7183   echo "$as_me:7183: \$? = $ac_status" >&5
7184   (exit $ac_status); }; }; then
7185   cf_cv_gnu_source=no
7186 else
7187   echo "$as_me: failed program was:" >&5
7188 cat conftest.$ac_ext >&5
7189 cf_save="$CPPFLAGS"
7190          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7191          cat >conftest.$ac_ext <<_ACEOF
7192 #line 7192 "configure"
7193 #include "confdefs.h"
7194 #include <sys/types.h>
7195 int
7196 main ()
7197 {
7198
7199 #ifdef _XOPEN_SOURCE
7200 make an error
7201 #endif
7202   ;
7203   return 0;
7204 }
7205 _ACEOF
7206 rm -f conftest.$ac_objext
7207 if { (eval echo "$as_me:7207: \"$ac_compile\"") >&5
7208   (eval $ac_compile) 2>&5
7209   ac_status=$?
7210   echo "$as_me:7210: \$? = $ac_status" >&5
7211   (exit $ac_status); } &&
7212          { ac_try='test -s conftest.$ac_objext'
7213   { (eval echo "$as_me:7213: \"$ac_try\"") >&5
7214   (eval $ac_try) 2>&5
7215   ac_status=$?
7216   echo "$as_me:7216: \$? = $ac_status" >&5
7217   (exit $ac_status); }; }; then
7218   cf_cv_gnu_source=no
7219 else
7220   echo "$as_me: failed program was:" >&5
7221 cat conftest.$ac_ext >&5
7222 cf_cv_gnu_source=yes
7223 fi
7224 rm -f conftest.$ac_objext conftest.$ac_ext
7225         CPPFLAGS="$cf_save"
7226
7227 fi
7228 rm -f conftest.$ac_objext conftest.$ac_ext
7229
7230 fi
7231 echo "$as_me:7231: result: $cf_cv_gnu_source" >&5
7232 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7233 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7234
7235         ;;
7236 mirbsd*) #(vi
7237         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7238         cf_XOPEN_SOURCE=
7239
7240 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7241
7242 cf_save_CFLAGS="$CFLAGS"
7243 cf_save_CPPFLAGS="$CPPFLAGS"
7244
7245 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7246         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7247                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7248
7249 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7250         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7251                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7252
7253 echo "$as_me:7253: checking if we should define _POSIX_C_SOURCE" >&5
7254 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7255 if test "${cf_cv_posix_c_source+set}" = set; then
7256   echo $ECHO_N "(cached) $ECHO_C" >&6
7257 else
7258
7259 echo "${as_me:-configure}:7259: testing if the symbol is already defined go no further ..." 1>&5
7260
7261         cat >conftest.$ac_ext <<_ACEOF
7262 #line 7262 "configure"
7263 #include "confdefs.h"
7264 #include <sys/types.h>
7265 int
7266 main ()
7267 {
7268
7269 #ifndef _POSIX_C_SOURCE
7270 make an error
7271 #endif
7272   ;
7273   return 0;
7274 }
7275 _ACEOF
7276 rm -f conftest.$ac_objext
7277 if { (eval echo "$as_me:7277: \"$ac_compile\"") >&5
7278   (eval $ac_compile) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit $ac_status); } &&
7282          { ac_try='test -s conftest.$ac_objext'
7283   { (eval echo "$as_me:7283: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:7286: \$? = $ac_status" >&5
7287   (exit $ac_status); }; }; then
7288   cf_cv_posix_c_source=no
7289 else
7290   echo "$as_me: failed program was:" >&5
7291 cat conftest.$ac_ext >&5
7292 cf_want_posix_source=no
7293          case .$cf_POSIX_C_SOURCE in #(vi
7294          .[12]??*) #(vi
7295                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7296                 ;;
7297          .2) #(vi
7298                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7299                 cf_want_posix_source=yes
7300                 ;;
7301          .*)
7302                 cf_want_posix_source=yes
7303                 ;;
7304          esac
7305          if test "$cf_want_posix_source" = yes ; then
7306                 cat >conftest.$ac_ext <<_ACEOF
7307 #line 7307 "configure"
7308 #include "confdefs.h"
7309 #include <sys/types.h>
7310 int
7311 main ()
7312 {
7313
7314 #ifdef _POSIX_SOURCE
7315 make an error
7316 #endif
7317   ;
7318   return 0;
7319 }
7320 _ACEOF
7321 rm -f conftest.$ac_objext
7322 if { (eval echo "$as_me:7322: \"$ac_compile\"") >&5
7323   (eval $ac_compile) 2>&5
7324   ac_status=$?
7325   echo "$as_me:7325: \$? = $ac_status" >&5
7326   (exit $ac_status); } &&
7327          { ac_try='test -s conftest.$ac_objext'
7328   { (eval echo "$as_me:7328: \"$ac_try\"") >&5
7329   (eval $ac_try) 2>&5
7330   ac_status=$?
7331   echo "$as_me:7331: \$? = $ac_status" >&5
7332   (exit $ac_status); }; }; then
7333   :
7334 else
7335   echo "$as_me: failed program was:" >&5
7336 cat conftest.$ac_ext >&5
7337 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7338 fi
7339 rm -f conftest.$ac_objext conftest.$ac_ext
7340          fi
7341
7342 echo "${as_me:-configure}:7342: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7343
7344          CFLAGS="$cf_trim_CFLAGS"
7345          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7346
7347 echo "${as_me:-configure}:7347: testing if the second compile does not leave our definition intact error ..." 1>&5
7348
7349          cat >conftest.$ac_ext <<_ACEOF
7350 #line 7350 "configure"
7351 #include "confdefs.h"
7352 #include <sys/types.h>
7353 int
7354 main ()
7355 {
7356
7357 #ifndef _POSIX_C_SOURCE
7358 make an error
7359 #endif
7360   ;
7361   return 0;
7362 }
7363 _ACEOF
7364 rm -f conftest.$ac_objext
7365 if { (eval echo "$as_me:7365: \"$ac_compile\"") >&5
7366   (eval $ac_compile) 2>&5
7367   ac_status=$?
7368   echo "$as_me:7368: \$? = $ac_status" >&5
7369   (exit $ac_status); } &&
7370          { ac_try='test -s conftest.$ac_objext'
7371   { (eval echo "$as_me:7371: \"$ac_try\"") >&5
7372   (eval $ac_try) 2>&5
7373   ac_status=$?
7374   echo "$as_me:7374: \$? = $ac_status" >&5
7375   (exit $ac_status); }; }; then
7376   :
7377 else
7378   echo "$as_me: failed program was:" >&5
7379 cat conftest.$ac_ext >&5
7380 cf_cv_posix_c_source=no
7381 fi
7382 rm -f conftest.$ac_objext conftest.$ac_ext
7383          CFLAGS="$cf_save_CFLAGS"
7384          CPPFLAGS="$cf_save_CPPFLAGS"
7385
7386 fi
7387 rm -f conftest.$ac_objext conftest.$ac_ext
7388
7389 fi
7390 echo "$as_me:7390: result: $cf_cv_posix_c_source" >&5
7391 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7392
7393 if test "$cf_cv_posix_c_source" != no ; then
7394         CFLAGS="$cf_trim_CFLAGS"
7395         CPPFLAGS="$cf_trim_CPPFLAGS"
7396
7397 cf_fix_cppflags=no
7398 cf_new_cflags=
7399 cf_new_cppflags=
7400 cf_new_extra_cppflags=
7401
7402 for cf_add_cflags in $cf_cv_posix_c_source
7403 do
7404 case $cf_fix_cppflags in
7405 no)
7406         case $cf_add_cflags in #(vi
7407         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7408                 case $cf_add_cflags in
7409                 -D*)
7410                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7411
7412                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7413                                 && test -z "${cf_tst_cflags}" \
7414                                 && cf_fix_cppflags=yes
7415
7416                         if test $cf_fix_cppflags = yes ; then
7417                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7418                                 continue
7419                         elif test "${cf_tst_cflags}" = "\"'" ; then
7420                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7421                                 continue
7422                         fi
7423                         ;;
7424                 esac
7425                 case "$CPPFLAGS" in
7426                 *$cf_add_cflags) #(vi
7427                         ;;
7428                 *) #(vi
7429                         case $cf_add_cflags in #(vi
7430                         -D*)
7431                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7432
7433 CPPFLAGS=`echo "$CPPFLAGS" | \
7434         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7435                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7436
7437                                 ;;
7438                         esac
7439                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7440                         ;;
7441                 esac
7442                 ;;
7443         *)
7444                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7445                 ;;
7446         esac
7447         ;;
7448 yes)
7449         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7450
7451         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7452
7453         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7454                 && test -z "${cf_tst_cflags}" \
7455                 && cf_fix_cppflags=no
7456         ;;
7457 esac
7458 done
7459
7460 if test -n "$cf_new_cflags" ; then
7461
7462         CFLAGS="$CFLAGS $cf_new_cflags"
7463 fi
7464
7465 if test -n "$cf_new_cppflags" ; then
7466
7467         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7468 fi
7469
7470 if test -n "$cf_new_extra_cppflags" ; then
7471
7472         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7473 fi
7474
7475 fi
7476
7477         ;;
7478 netbsd*) #(vi
7479         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7480         ;;
7481 openbsd[4-9]*) #(vi
7482         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7483         cf_XOPEN_SOURCE=600
7484         ;;
7485 openbsd*) #(vi
7486         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7487         ;;
7488 osf[45]*) #(vi
7489         cf_xopen_source="-D_OSF_SOURCE"
7490         ;;
7491 nto-qnx*) #(vi
7492         cf_xopen_source="-D_QNX_SOURCE"
7493         ;;
7494 sco*) #(vi
7495         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7496         ;;
7497 solaris2.*) #(vi
7498         cf_xopen_source="-D__EXTENSIONS__"
7499         ;;
7500 *)
7501
7502 echo "$as_me:7502: checking if we should define _XOPEN_SOURCE" >&5
7503 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7504 if test "${cf_cv_xopen_source+set}" = set; then
7505   echo $ECHO_N "(cached) $ECHO_C" >&6
7506 else
7507
7508         cat >conftest.$ac_ext <<_ACEOF
7509 #line 7509 "configure"
7510 #include "confdefs.h"
7511
7512 #include <stdlib.h>
7513 #include <string.h>
7514 #include <sys/types.h>
7515
7516 int
7517 main ()
7518 {
7519
7520 #ifndef _XOPEN_SOURCE
7521 make an error
7522 #endif
7523   ;
7524   return 0;
7525 }
7526 _ACEOF
7527 rm -f conftest.$ac_objext
7528 if { (eval echo "$as_me:7528: \"$ac_compile\"") >&5
7529   (eval $ac_compile) 2>&5
7530   ac_status=$?
7531   echo "$as_me:7531: \$? = $ac_status" >&5
7532   (exit $ac_status); } &&
7533          { ac_try='test -s conftest.$ac_objext'
7534   { (eval echo "$as_me:7534: \"$ac_try\"") >&5
7535   (eval $ac_try) 2>&5
7536   ac_status=$?
7537   echo "$as_me:7537: \$? = $ac_status" >&5
7538   (exit $ac_status); }; }; then
7539   cf_cv_xopen_source=no
7540 else
7541   echo "$as_me: failed program was:" >&5
7542 cat conftest.$ac_ext >&5
7543 cf_save="$CPPFLAGS"
7544          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7545          cat >conftest.$ac_ext <<_ACEOF
7546 #line 7546 "configure"
7547 #include "confdefs.h"
7548
7549 #include <stdlib.h>
7550 #include <string.h>
7551 #include <sys/types.h>
7552
7553 int
7554 main ()
7555 {
7556
7557 #ifdef _XOPEN_SOURCE
7558 make an error
7559 #endif
7560   ;
7561   return 0;
7562 }
7563 _ACEOF
7564 rm -f conftest.$ac_objext
7565 if { (eval echo "$as_me:7565: \"$ac_compile\"") >&5
7566   (eval $ac_compile) 2>&5
7567   ac_status=$?
7568   echo "$as_me:7568: \$? = $ac_status" >&5
7569   (exit $ac_status); } &&
7570          { ac_try='test -s conftest.$ac_objext'
7571   { (eval echo "$as_me:7571: \"$ac_try\"") >&5
7572   (eval $ac_try) 2>&5
7573   ac_status=$?
7574   echo "$as_me:7574: \$? = $ac_status" >&5
7575   (exit $ac_status); }; }; then
7576   cf_cv_xopen_source=no
7577 else
7578   echo "$as_me: failed program was:" >&5
7579 cat conftest.$ac_ext >&5
7580 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7581 fi
7582 rm -f conftest.$ac_objext conftest.$ac_ext
7583         CPPFLAGS="$cf_save"
7584
7585 fi
7586 rm -f conftest.$ac_objext conftest.$ac_ext
7587
7588 fi
7589 echo "$as_me:7589: result: $cf_cv_xopen_source" >&5
7590 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7591
7592 if test "$cf_cv_xopen_source" != no ; then
7593
7594 CFLAGS=`echo "$CFLAGS" | \
7595         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7596                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7597
7598 CPPFLAGS=`echo "$CPPFLAGS" | \
7599         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7600                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7601
7602         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7603
7604 cf_fix_cppflags=no
7605 cf_new_cflags=
7606 cf_new_cppflags=
7607 cf_new_extra_cppflags=
7608
7609 for cf_add_cflags in $cf_temp_xopen_source
7610 do
7611 case $cf_fix_cppflags in
7612 no)
7613         case $cf_add_cflags in #(vi
7614         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7615                 case $cf_add_cflags in
7616                 -D*)
7617                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7618
7619                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7620                                 && test -z "${cf_tst_cflags}" \
7621                                 && cf_fix_cppflags=yes
7622
7623                         if test $cf_fix_cppflags = yes ; then
7624                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7625                                 continue
7626                         elif test "${cf_tst_cflags}" = "\"'" ; then
7627                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7628                                 continue
7629                         fi
7630                         ;;
7631                 esac
7632                 case "$CPPFLAGS" in
7633                 *$cf_add_cflags) #(vi
7634                         ;;
7635                 *) #(vi
7636                         case $cf_add_cflags in #(vi
7637                         -D*)
7638                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7639
7640 CPPFLAGS=`echo "$CPPFLAGS" | \
7641         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7642                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7643
7644                                 ;;
7645                         esac
7646                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7647                         ;;
7648                 esac
7649                 ;;
7650         *)
7651                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7652                 ;;
7653         esac
7654         ;;
7655 yes)
7656         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7657
7658         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7659
7660         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7661                 && test -z "${cf_tst_cflags}" \
7662                 && cf_fix_cppflags=no
7663         ;;
7664 esac
7665 done
7666
7667 if test -n "$cf_new_cflags" ; then
7668
7669         CFLAGS="$CFLAGS $cf_new_cflags"
7670 fi
7671
7672 if test -n "$cf_new_cppflags" ; then
7673
7674         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7675 fi
7676
7677 if test -n "$cf_new_extra_cppflags" ; then
7678
7679         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7680 fi
7681
7682 fi
7683
7684 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7685
7686 cf_save_CFLAGS="$CFLAGS"
7687 cf_save_CPPFLAGS="$CPPFLAGS"
7688
7689 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7690         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7691                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7692
7693 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7694         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7695                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7696
7697 echo "$as_me:7697: checking if we should define _POSIX_C_SOURCE" >&5
7698 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7699 if test "${cf_cv_posix_c_source+set}" = set; then
7700   echo $ECHO_N "(cached) $ECHO_C" >&6
7701 else
7702
7703 echo "${as_me:-configure}:7703: testing if the symbol is already defined go no further ..." 1>&5
7704
7705         cat >conftest.$ac_ext <<_ACEOF
7706 #line 7706 "configure"
7707 #include "confdefs.h"
7708 #include <sys/types.h>
7709 int
7710 main ()
7711 {
7712
7713 #ifndef _POSIX_C_SOURCE
7714 make an error
7715 #endif
7716   ;
7717   return 0;
7718 }
7719 _ACEOF
7720 rm -f conftest.$ac_objext
7721 if { (eval echo "$as_me:7721: \"$ac_compile\"") >&5
7722   (eval $ac_compile) 2>&5
7723   ac_status=$?
7724   echo "$as_me:7724: \$? = $ac_status" >&5
7725   (exit $ac_status); } &&
7726          { ac_try='test -s conftest.$ac_objext'
7727   { (eval echo "$as_me:7727: \"$ac_try\"") >&5
7728   (eval $ac_try) 2>&5
7729   ac_status=$?
7730   echo "$as_me:7730: \$? = $ac_status" >&5
7731   (exit $ac_status); }; }; then
7732   cf_cv_posix_c_source=no
7733 else
7734   echo "$as_me: failed program was:" >&5
7735 cat conftest.$ac_ext >&5
7736 cf_want_posix_source=no
7737          case .$cf_POSIX_C_SOURCE in #(vi
7738          .[12]??*) #(vi
7739                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7740                 ;;
7741          .2) #(vi
7742                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7743                 cf_want_posix_source=yes
7744                 ;;
7745          .*)
7746                 cf_want_posix_source=yes
7747                 ;;
7748          esac
7749          if test "$cf_want_posix_source" = yes ; then
7750                 cat >conftest.$ac_ext <<_ACEOF
7751 #line 7751 "configure"
7752 #include "confdefs.h"
7753 #include <sys/types.h>
7754 int
7755 main ()
7756 {
7757
7758 #ifdef _POSIX_SOURCE
7759 make an error
7760 #endif
7761   ;
7762   return 0;
7763 }
7764 _ACEOF
7765 rm -f conftest.$ac_objext
7766 if { (eval echo "$as_me:7766: \"$ac_compile\"") >&5
7767   (eval $ac_compile) 2>&5
7768   ac_status=$?
7769   echo "$as_me:7769: \$? = $ac_status" >&5
7770   (exit $ac_status); } &&
7771          { ac_try='test -s conftest.$ac_objext'
7772   { (eval echo "$as_me:7772: \"$ac_try\"") >&5
7773   (eval $ac_try) 2>&5
7774   ac_status=$?
7775   echo "$as_me:7775: \$? = $ac_status" >&5
7776   (exit $ac_status); }; }; then
7777   :
7778 else
7779   echo "$as_me: failed program was:" >&5
7780 cat conftest.$ac_ext >&5
7781 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7782 fi
7783 rm -f conftest.$ac_objext conftest.$ac_ext
7784          fi
7785
7786 echo "${as_me:-configure}:7786: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7787
7788          CFLAGS="$cf_trim_CFLAGS"
7789          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7790
7791 echo "${as_me:-configure}:7791: testing if the second compile does not leave our definition intact error ..." 1>&5
7792
7793          cat >conftest.$ac_ext <<_ACEOF
7794 #line 7794 "configure"
7795 #include "confdefs.h"
7796 #include <sys/types.h>
7797 int
7798 main ()
7799 {
7800
7801 #ifndef _POSIX_C_SOURCE
7802 make an error
7803 #endif
7804   ;
7805   return 0;
7806 }
7807 _ACEOF
7808 rm -f conftest.$ac_objext
7809 if { (eval echo "$as_me:7809: \"$ac_compile\"") >&5
7810   (eval $ac_compile) 2>&5
7811   ac_status=$?
7812   echo "$as_me:7812: \$? = $ac_status" >&5
7813   (exit $ac_status); } &&
7814          { ac_try='test -s conftest.$ac_objext'
7815   { (eval echo "$as_me:7815: \"$ac_try\"") >&5
7816   (eval $ac_try) 2>&5
7817   ac_status=$?
7818   echo "$as_me:7818: \$? = $ac_status" >&5
7819   (exit $ac_status); }; }; then
7820   :
7821 else
7822   echo "$as_me: failed program was:" >&5
7823 cat conftest.$ac_ext >&5
7824 cf_cv_posix_c_source=no
7825 fi
7826 rm -f conftest.$ac_objext conftest.$ac_ext
7827          CFLAGS="$cf_save_CFLAGS"
7828          CPPFLAGS="$cf_save_CPPFLAGS"
7829
7830 fi
7831 rm -f conftest.$ac_objext conftest.$ac_ext
7832
7833 fi
7834 echo "$as_me:7834: result: $cf_cv_posix_c_source" >&5
7835 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7836
7837 if test "$cf_cv_posix_c_source" != no ; then
7838         CFLAGS="$cf_trim_CFLAGS"
7839         CPPFLAGS="$cf_trim_CPPFLAGS"
7840
7841 cf_fix_cppflags=no
7842 cf_new_cflags=
7843 cf_new_cppflags=
7844 cf_new_extra_cppflags=
7845
7846 for cf_add_cflags in $cf_cv_posix_c_source
7847 do
7848 case $cf_fix_cppflags in
7849 no)
7850         case $cf_add_cflags in #(vi
7851         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7852                 case $cf_add_cflags in
7853                 -D*)
7854                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7855
7856                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7857                                 && test -z "${cf_tst_cflags}" \
7858                                 && cf_fix_cppflags=yes
7859
7860                         if test $cf_fix_cppflags = yes ; then
7861                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7862                                 continue
7863                         elif test "${cf_tst_cflags}" = "\"'" ; then
7864                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7865                                 continue
7866                         fi
7867                         ;;
7868                 esac
7869                 case "$CPPFLAGS" in
7870                 *$cf_add_cflags) #(vi
7871                         ;;
7872                 *) #(vi
7873                         case $cf_add_cflags in #(vi
7874                         -D*)
7875                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7876
7877 CPPFLAGS=`echo "$CPPFLAGS" | \
7878         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7879                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7880
7881                                 ;;
7882                         esac
7883                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7884                         ;;
7885                 esac
7886                 ;;
7887         *)
7888                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7889                 ;;
7890         esac
7891         ;;
7892 yes)
7893         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7894
7895         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7896
7897         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7898                 && test -z "${cf_tst_cflags}" \
7899                 && cf_fix_cppflags=no
7900         ;;
7901 esac
7902 done
7903
7904 if test -n "$cf_new_cflags" ; then
7905
7906         CFLAGS="$CFLAGS $cf_new_cflags"
7907 fi
7908
7909 if test -n "$cf_new_cppflags" ; then
7910
7911         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7912 fi
7913
7914 if test -n "$cf_new_extra_cppflags" ; then
7915
7916         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7917 fi
7918
7919 fi
7920
7921         ;;
7922 esac
7923
7924 if test -n "$cf_xopen_source" ; then
7925
7926 cf_fix_cppflags=no
7927 cf_new_cflags=
7928 cf_new_cppflags=
7929 cf_new_extra_cppflags=
7930
7931 for cf_add_cflags in $cf_xopen_source
7932 do
7933 case $cf_fix_cppflags in
7934 no)
7935         case $cf_add_cflags in #(vi
7936         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7937                 case $cf_add_cflags in
7938                 -D*)
7939                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7940
7941                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7942                                 && test -z "${cf_tst_cflags}" \
7943                                 && cf_fix_cppflags=yes
7944
7945                         if test $cf_fix_cppflags = yes ; then
7946                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7947                                 continue
7948                         elif test "${cf_tst_cflags}" = "\"'" ; then
7949                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7950                                 continue
7951                         fi
7952                         ;;
7953                 esac
7954                 case "$CPPFLAGS" in
7955                 *$cf_add_cflags) #(vi
7956                         ;;
7957                 *) #(vi
7958                         case $cf_add_cflags in #(vi
7959                         -D*)
7960                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7961
7962 CPPFLAGS=`echo "$CPPFLAGS" | \
7963         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7964                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7965
7966                                 ;;
7967                         esac
7968                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7969                         ;;
7970                 esac
7971                 ;;
7972         *)
7973                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7974                 ;;
7975         esac
7976         ;;
7977 yes)
7978         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7979
7980         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7981
7982         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7983                 && test -z "${cf_tst_cflags}" \
7984                 && cf_fix_cppflags=no
7985         ;;
7986 esac
7987 done
7988
7989 if test -n "$cf_new_cflags" ; then
7990
7991         CFLAGS="$CFLAGS $cf_new_cflags"
7992 fi
7993
7994 if test -n "$cf_new_cppflags" ; then
7995
7996         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7997 fi
7998
7999 if test -n "$cf_new_extra_cppflags" ; then
8000
8001         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8002 fi
8003
8004 fi
8005
8006 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8007         echo "$as_me:8007: checking if _XOPEN_SOURCE really is set" >&5
8008 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8009         cat >conftest.$ac_ext <<_ACEOF
8010 #line 8010 "configure"
8011 #include "confdefs.h"
8012 #include <stdlib.h>
8013 int
8014 main ()
8015 {
8016
8017 #ifndef _XOPEN_SOURCE
8018 make an error
8019 #endif
8020   ;
8021   return 0;
8022 }
8023 _ACEOF
8024 rm -f conftest.$ac_objext
8025 if { (eval echo "$as_me:8025: \"$ac_compile\"") >&5
8026   (eval $ac_compile) 2>&5
8027   ac_status=$?
8028   echo "$as_me:8028: \$? = $ac_status" >&5
8029   (exit $ac_status); } &&
8030          { ac_try='test -s conftest.$ac_objext'
8031   { (eval echo "$as_me:8031: \"$ac_try\"") >&5
8032   (eval $ac_try) 2>&5
8033   ac_status=$?
8034   echo "$as_me:8034: \$? = $ac_status" >&5
8035   (exit $ac_status); }; }; then
8036   cf_XOPEN_SOURCE_set=yes
8037 else
8038   echo "$as_me: failed program was:" >&5
8039 cat conftest.$ac_ext >&5
8040 cf_XOPEN_SOURCE_set=no
8041 fi
8042 rm -f conftest.$ac_objext conftest.$ac_ext
8043         echo "$as_me:8043: result: $cf_XOPEN_SOURCE_set" >&5
8044 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8045         if test $cf_XOPEN_SOURCE_set = yes
8046         then
8047                 cat >conftest.$ac_ext <<_ACEOF
8048 #line 8048 "configure"
8049 #include "confdefs.h"
8050 #include <stdlib.h>
8051 int
8052 main ()
8053 {
8054
8055 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8056 make an error
8057 #endif
8058   ;
8059   return 0;
8060 }
8061 _ACEOF
8062 rm -f conftest.$ac_objext
8063 if { (eval echo "$as_me:8063: \"$ac_compile\"") >&5
8064   (eval $ac_compile) 2>&5
8065   ac_status=$?
8066   echo "$as_me:8066: \$? = $ac_status" >&5
8067   (exit $ac_status); } &&
8068          { ac_try='test -s conftest.$ac_objext'
8069   { (eval echo "$as_me:8069: \"$ac_try\"") >&5
8070   (eval $ac_try) 2>&5
8071   ac_status=$?
8072   echo "$as_me:8072: \$? = $ac_status" >&5
8073   (exit $ac_status); }; }; then
8074   cf_XOPEN_SOURCE_set_ok=yes
8075 else
8076   echo "$as_me: failed program was:" >&5
8077 cat conftest.$ac_ext >&5
8078 cf_XOPEN_SOURCE_set_ok=no
8079 fi
8080 rm -f conftest.$ac_objext conftest.$ac_ext
8081                 if test $cf_XOPEN_SOURCE_set_ok = no
8082                 then
8083                         { echo "$as_me:8083: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8084 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8085                 fi
8086         else
8087
8088 echo "$as_me:8088: checking if we should define _XOPEN_SOURCE" >&5
8089 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8090 if test "${cf_cv_xopen_source+set}" = set; then
8091   echo $ECHO_N "(cached) $ECHO_C" >&6
8092 else
8093
8094         cat >conftest.$ac_ext <<_ACEOF
8095 #line 8095 "configure"
8096 #include "confdefs.h"
8097
8098 #include <stdlib.h>
8099 #include <string.h>
8100 #include <sys/types.h>
8101
8102 int
8103 main ()
8104 {
8105
8106 #ifndef _XOPEN_SOURCE
8107 make an error
8108 #endif
8109   ;
8110   return 0;
8111 }
8112 _ACEOF
8113 rm -f conftest.$ac_objext
8114 if { (eval echo "$as_me:8114: \"$ac_compile\"") >&5
8115   (eval $ac_compile) 2>&5
8116   ac_status=$?
8117   echo "$as_me:8117: \$? = $ac_status" >&5
8118   (exit $ac_status); } &&
8119          { ac_try='test -s conftest.$ac_objext'
8120   { (eval echo "$as_me:8120: \"$ac_try\"") >&5
8121   (eval $ac_try) 2>&5
8122   ac_status=$?
8123   echo "$as_me:8123: \$? = $ac_status" >&5
8124   (exit $ac_status); }; }; then
8125   cf_cv_xopen_source=no
8126 else
8127   echo "$as_me: failed program was:" >&5
8128 cat conftest.$ac_ext >&5
8129 cf_save="$CPPFLAGS"
8130          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8131          cat >conftest.$ac_ext <<_ACEOF
8132 #line 8132 "configure"
8133 #include "confdefs.h"
8134
8135 #include <stdlib.h>
8136 #include <string.h>
8137 #include <sys/types.h>
8138
8139 int
8140 main ()
8141 {
8142
8143 #ifdef _XOPEN_SOURCE
8144 make an error
8145 #endif
8146   ;
8147   return 0;
8148 }
8149 _ACEOF
8150 rm -f conftest.$ac_objext
8151 if { (eval echo "$as_me:8151: \"$ac_compile\"") >&5
8152   (eval $ac_compile) 2>&5
8153   ac_status=$?
8154   echo "$as_me:8154: \$? = $ac_status" >&5
8155   (exit $ac_status); } &&
8156          { ac_try='test -s conftest.$ac_objext'
8157   { (eval echo "$as_me:8157: \"$ac_try\"") >&5
8158   (eval $ac_try) 2>&5
8159   ac_status=$?
8160   echo "$as_me:8160: \$? = $ac_status" >&5
8161   (exit $ac_status); }; }; then
8162   cf_cv_xopen_source=no
8163 else
8164   echo "$as_me: failed program was:" >&5
8165 cat conftest.$ac_ext >&5
8166 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8167 fi
8168 rm -f conftest.$ac_objext conftest.$ac_ext
8169         CPPFLAGS="$cf_save"
8170
8171 fi
8172 rm -f conftest.$ac_objext conftest.$ac_ext
8173
8174 fi
8175 echo "$as_me:8175: result: $cf_cv_xopen_source" >&5
8176 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8177
8178 if test "$cf_cv_xopen_source" != no ; then
8179
8180 CFLAGS=`echo "$CFLAGS" | \
8181         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8182                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8183
8184 CPPFLAGS=`echo "$CPPFLAGS" | \
8185         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8186                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8187
8188         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8189
8190 cf_fix_cppflags=no
8191 cf_new_cflags=
8192 cf_new_cppflags=
8193 cf_new_extra_cppflags=
8194
8195 for cf_add_cflags in $cf_temp_xopen_source
8196 do
8197 case $cf_fix_cppflags in
8198 no)
8199         case $cf_add_cflags in #(vi
8200         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8201                 case $cf_add_cflags in
8202                 -D*)
8203                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8204
8205                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8206                                 && test -z "${cf_tst_cflags}" \
8207                                 && cf_fix_cppflags=yes
8208
8209                         if test $cf_fix_cppflags = yes ; then
8210                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8211                                 continue
8212                         elif test "${cf_tst_cflags}" = "\"'" ; then
8213                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8214                                 continue
8215                         fi
8216                         ;;
8217                 esac
8218                 case "$CPPFLAGS" in
8219                 *$cf_add_cflags) #(vi
8220                         ;;
8221                 *) #(vi
8222                         case $cf_add_cflags in #(vi
8223                         -D*)
8224                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8225
8226 CPPFLAGS=`echo "$CPPFLAGS" | \
8227         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8228                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8229
8230                                 ;;
8231                         esac
8232                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8233                         ;;
8234                 esac
8235                 ;;
8236         *)
8237                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8238                 ;;
8239         esac
8240         ;;
8241 yes)
8242         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8243
8244         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8245
8246         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8247                 && test -z "${cf_tst_cflags}" \
8248                 && cf_fix_cppflags=no
8249         ;;
8250 esac
8251 done
8252
8253 if test -n "$cf_new_cflags" ; then
8254
8255         CFLAGS="$CFLAGS $cf_new_cflags"
8256 fi
8257
8258 if test -n "$cf_new_cppflags" ; then
8259
8260         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8261 fi
8262
8263 if test -n "$cf_new_extra_cppflags" ; then
8264
8265         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8266 fi
8267
8268 fi
8269
8270         fi
8271 fi
8272
8273 # Work around breakage on OS X
8274
8275 echo "$as_me:8275: checking if SIGWINCH is defined" >&5
8276 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8277 if test "${cf_cv_define_sigwinch+set}" = set; then
8278   echo $ECHO_N "(cached) $ECHO_C" >&6
8279 else
8280
8281         cat >conftest.$ac_ext <<_ACEOF
8282 #line 8282 "configure"
8283 #include "confdefs.h"
8284
8285 #include <sys/types.h>
8286 #include <sys/signal.h>
8287
8288 int
8289 main ()
8290 {
8291 int x = SIGWINCH
8292   ;
8293   return 0;
8294 }
8295 _ACEOF
8296 rm -f conftest.$ac_objext
8297 if { (eval echo "$as_me:8297: \"$ac_compile\"") >&5
8298   (eval $ac_compile) 2>&5
8299   ac_status=$?
8300   echo "$as_me:8300: \$? = $ac_status" >&5
8301   (exit $ac_status); } &&
8302          { ac_try='test -s conftest.$ac_objext'
8303   { (eval echo "$as_me:8303: \"$ac_try\"") >&5
8304   (eval $ac_try) 2>&5
8305   ac_status=$?
8306   echo "$as_me:8306: \$? = $ac_status" >&5
8307   (exit $ac_status); }; }; then
8308   cf_cv_define_sigwinch=yes
8309 else
8310   echo "$as_me: failed program was:" >&5
8311 cat conftest.$ac_ext >&5
8312 cat >conftest.$ac_ext <<_ACEOF
8313 #line 8313 "configure"
8314 #include "confdefs.h"
8315
8316 #undef _XOPEN_SOURCE
8317 #undef _POSIX_SOURCE
8318 #undef _POSIX_C_SOURCE
8319 #include <sys/types.h>
8320 #include <sys/signal.h>
8321
8322 int
8323 main ()
8324 {
8325 int x = SIGWINCH
8326   ;
8327   return 0;
8328 }
8329 _ACEOF
8330 rm -f conftest.$ac_objext
8331 if { (eval echo "$as_me:8331: \"$ac_compile\"") >&5
8332   (eval $ac_compile) 2>&5
8333   ac_status=$?
8334   echo "$as_me:8334: \$? = $ac_status" >&5
8335   (exit $ac_status); } &&
8336          { ac_try='test -s conftest.$ac_objext'
8337   { (eval echo "$as_me:8337: \"$ac_try\"") >&5
8338   (eval $ac_try) 2>&5
8339   ac_status=$?
8340   echo "$as_me:8340: \$? = $ac_status" >&5
8341   (exit $ac_status); }; }; then
8342   cf_cv_define_sigwinch=maybe
8343 else
8344   echo "$as_me: failed program was:" >&5
8345 cat conftest.$ac_ext >&5
8346 cf_cv_define_sigwinch=no
8347 fi
8348 rm -f conftest.$ac_objext conftest.$ac_ext
8349
8350 fi
8351 rm -f conftest.$ac_objext conftest.$ac_ext
8352
8353 fi
8354 echo "$as_me:8354: result: $cf_cv_define_sigwinch" >&5
8355 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8356
8357 if test "$cf_cv_define_sigwinch" = maybe ; then
8358 echo "$as_me:8358: checking for actual SIGWINCH definition" >&5
8359 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8360 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8361   echo $ECHO_N "(cached) $ECHO_C" >&6
8362 else
8363
8364 cf_cv_fixup_sigwinch=unknown
8365 cf_sigwinch=32
8366 while test $cf_sigwinch != 1
8367 do
8368         cat >conftest.$ac_ext <<_ACEOF
8369 #line 8369 "configure"
8370 #include "confdefs.h"
8371
8372 #undef _XOPEN_SOURCE
8373 #undef _POSIX_SOURCE
8374 #undef _POSIX_C_SOURCE
8375 #include <sys/types.h>
8376 #include <sys/signal.h>
8377
8378 int
8379 main ()
8380 {
8381
8382 #if SIGWINCH != $cf_sigwinch
8383 make an error
8384 #endif
8385 int x = SIGWINCH
8386   ;
8387   return 0;
8388 }
8389 _ACEOF
8390 rm -f conftest.$ac_objext
8391 if { (eval echo "$as_me:8391: \"$ac_compile\"") >&5
8392   (eval $ac_compile) 2>&5
8393   ac_status=$?
8394   echo "$as_me:8394: \$? = $ac_status" >&5
8395   (exit $ac_status); } &&
8396          { ac_try='test -s conftest.$ac_objext'
8397   { (eval echo "$as_me:8397: \"$ac_try\"") >&5
8398   (eval $ac_try) 2>&5
8399   ac_status=$?
8400   echo "$as_me:8400: \$? = $ac_status" >&5
8401   (exit $ac_status); }; }; then
8402   cf_cv_fixup_sigwinch=$cf_sigwinch
8403          break
8404 else
8405   echo "$as_me: failed program was:" >&5
8406 cat conftest.$ac_ext >&5
8407 fi
8408 rm -f conftest.$ac_objext conftest.$ac_ext
8409
8410 cf_sigwinch=`expr $cf_sigwinch - 1`
8411 done
8412
8413 fi
8414 echo "$as_me:8414: result: $cf_cv_fixup_sigwinch" >&5
8415 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8416
8417         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8418                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8419         fi
8420 fi
8421
8422 # Checks for CODESET support.
8423
8424   echo "$as_me:8424: checking for nl_langinfo and CODESET" >&5
8425 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8426 if test "${am_cv_langinfo_codeset+set}" = set; then
8427   echo $ECHO_N "(cached) $ECHO_C" >&6
8428 else
8429   cat >conftest.$ac_ext <<_ACEOF
8430 #line 8430 "configure"
8431 #include "confdefs.h"
8432 #include <langinfo.h>
8433 int
8434 main ()
8435 {
8436 char* cs = nl_langinfo(CODESET);
8437   ;
8438   return 0;
8439 }
8440 _ACEOF
8441 rm -f conftest.$ac_objext conftest$ac_exeext
8442 if { (eval echo "$as_me:8442: \"$ac_link\"") >&5
8443   (eval $ac_link) 2>&5
8444   ac_status=$?
8445   echo "$as_me:8445: \$? = $ac_status" >&5
8446   (exit $ac_status); } &&
8447          { ac_try='test -s conftest$ac_exeext'
8448   { (eval echo "$as_me:8448: \"$ac_try\"") >&5
8449   (eval $ac_try) 2>&5
8450   ac_status=$?
8451   echo "$as_me:8451: \$? = $ac_status" >&5
8452   (exit $ac_status); }; }; then
8453   am_cv_langinfo_codeset=yes
8454 else
8455   echo "$as_me: failed program was:" >&5
8456 cat conftest.$ac_ext >&5
8457 am_cv_langinfo_codeset=no
8458 fi
8459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8460
8461 fi
8462 echo "$as_me:8462: result: $am_cv_langinfo_codeset" >&5
8463 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8464   if test $am_cv_langinfo_codeset = yes; then
8465
8466 cat >>confdefs.h <<\EOF
8467 #define HAVE_LANGINFO_CODESET 1
8468 EOF
8469
8470   fi
8471
8472 # use these variables to work around a defect in gcc's fixincludes.
8473 NCURSES_OK_WCHAR_T=
8474 NCURSES_OK_WINT_T=
8475
8476 echo "$as_me:8476: checking if you want wide-character code" >&5
8477 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8478
8479 # Check whether --enable-widec or --disable-widec was given.
8480 if test "${enable_widec+set}" = set; then
8481   enableval="$enable_widec"
8482   with_widec=$enableval
8483 else
8484   with_widec=no
8485 fi;
8486 echo "$as_me:8486: result: $with_widec" >&5
8487 echo "${ECHO_T}$with_widec" >&6
8488 if test "$with_widec" = yes ; then
8489         LIB_SUFFIX="w${LIB_SUFFIX}"
8490         cat >>confdefs.h <<\EOF
8491 #define USE_WIDEC_SUPPORT 1
8492 EOF
8493
8494         cat >>confdefs.h <<\EOF
8495 #define NCURSES_WIDECHAR 1
8496 EOF
8497
8498 echo "$as_me:8498: checking if wchar.h can be used as is" >&5
8499 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8500 if test "${cf_cv_wchar_h_okay+set}" = set; then
8501   echo $ECHO_N "(cached) $ECHO_C" >&6
8502 else
8503
8504 cat >conftest.$ac_ext <<_ACEOF
8505 #line 8505 "configure"
8506 #include "confdefs.h"
8507
8508 #include <stdlib.h>
8509 #include <wchar.h>
8510
8511 int
8512 main ()
8513 {
8514
8515         wint_t foo = 0;
8516         int bar = iswpunct(foo)
8517   ;
8518   return 0;
8519 }
8520 _ACEOF
8521 rm -f conftest.$ac_objext
8522 if { (eval echo "$as_me:8522: \"$ac_compile\"") >&5
8523   (eval $ac_compile) 2>&5
8524   ac_status=$?
8525   echo "$as_me:8525: \$? = $ac_status" >&5
8526   (exit $ac_status); } &&
8527          { ac_try='test -s conftest.$ac_objext'
8528   { (eval echo "$as_me:8528: \"$ac_try\"") >&5
8529   (eval $ac_try) 2>&5
8530   ac_status=$?
8531   echo "$as_me:8531: \$? = $ac_status" >&5
8532   (exit $ac_status); }; }; then
8533   cf_cv_wchar_h_okay=yes
8534 else
8535   echo "$as_me: failed program was:" >&5
8536 cat conftest.$ac_ext >&5
8537 cf_cv_wchar_h_okay=no
8538 fi
8539 rm -f conftest.$ac_objext conftest.$ac_ext
8540 fi
8541 echo "$as_me:8541: result: $cf_cv_wchar_h_okay" >&5
8542 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8543
8544 if test $cf_cv_wchar_h_okay = no
8545 then
8546
8547 echo "$as_me:8547: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8548 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8549 cat >conftest.$ac_ext <<_ACEOF
8550 #line 8550 "configure"
8551 #include "confdefs.h"
8552 #include <sys/types.h>
8553
8554 int
8555 main ()
8556 {
8557
8558 #ifndef _XOPEN_SOURCE_EXTENDED
8559 make an error
8560 #endif
8561   ;
8562   return 0;
8563 }
8564 _ACEOF
8565 rm -f conftest.$ac_objext
8566 if { (eval echo "$as_me:8566: \"$ac_compile\"") >&5
8567   (eval $ac_compile) 2>&5
8568   ac_status=$?
8569   echo "$as_me:8569: \$? = $ac_status" >&5
8570   (exit $ac_status); } &&
8571          { ac_try='test -s conftest.$ac_objext'
8572   { (eval echo "$as_me:8572: \"$ac_try\"") >&5
8573   (eval $ac_try) 2>&5
8574   ac_status=$?
8575   echo "$as_me:8575: \$? = $ac_status" >&5
8576   (exit $ac_status); }; }; then
8577   cf_result=no
8578 else
8579   echo "$as_me: failed program was:" >&5
8580 cat conftest.$ac_ext >&5
8581 cf_result=yes
8582 fi
8583 rm -f conftest.$ac_objext conftest.$ac_ext
8584 echo "$as_me:8584: result: $cf_result" >&5
8585 echo "${ECHO_T}$cf_result" >&6
8586
8587 if test "$cf_result" = yes ; then
8588         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8589 elif test "x" != "x" ; then
8590         echo "$as_me:8590: checking checking for compatible value versus " >&5
8591 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8592         cat >conftest.$ac_ext <<_ACEOF
8593 #line 8593 "configure"
8594 #include "confdefs.h"
8595 #include <sys/types.h>
8596
8597 int
8598 main ()
8599 {
8600
8601 #if _XOPEN_SOURCE_EXTENDED- < 0
8602 make an error
8603 #endif
8604   ;
8605   return 0;
8606 }
8607 _ACEOF
8608 rm -f conftest.$ac_objext
8609 if { (eval echo "$as_me:8609: \"$ac_compile\"") >&5
8610   (eval $ac_compile) 2>&5
8611   ac_status=$?
8612   echo "$as_me:8612: \$? = $ac_status" >&5
8613   (exit $ac_status); } &&
8614          { ac_try='test -s conftest.$ac_objext'
8615   { (eval echo "$as_me:8615: \"$ac_try\"") >&5
8616   (eval $ac_try) 2>&5
8617   ac_status=$?
8618   echo "$as_me:8618: \$? = $ac_status" >&5
8619   (exit $ac_status); }; }; then
8620   cf_result=yes
8621 else
8622   echo "$as_me: failed program was:" >&5
8623 cat conftest.$ac_ext >&5
8624 cf_result=no
8625 fi
8626 rm -f conftest.$ac_objext conftest.$ac_ext
8627         echo "$as_me:8627: result: $cf_result" >&5
8628 echo "${ECHO_T}$cf_result" >&6
8629         if test "$cf_result" = no ; then
8630                 # perhaps we can override it - try...
8631                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8632         fi
8633 fi
8634
8635 fi
8636
8637         # with_overwrite=no
8638         NCURSES_CH_T=cchar_t
8639
8640 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8641 do
8642 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8643 echo "$as_me:8643: checking for $ac_func" >&5
8644 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8645 if eval "test \"\${$as_ac_var+set}\" = set"; then
8646   echo $ECHO_N "(cached) $ECHO_C" >&6
8647 else
8648   cat >conftest.$ac_ext <<_ACEOF
8649 #line 8649 "configure"
8650 #include "confdefs.h"
8651 /* System header to define __stub macros and hopefully few prototypes,
8652     which can conflict with char $ac_func (); below.  */
8653 #include <assert.h>
8654 /* Override any gcc2 internal prototype to avoid an error.  */
8655 #ifdef __cplusplus
8656 extern "C"
8657 #endif
8658 /* We use char because int might match the return type of a gcc2
8659    builtin and then its argument prototype would still apply.  */
8660 char $ac_func ();
8661 char (*f) ();
8662
8663 int
8664 main ()
8665 {
8666 /* The GNU C library defines this for functions which it implements
8667     to always fail with ENOSYS.  Some functions are actually named
8668     something starting with __ and the normal name is an alias.  */
8669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8670 choke me
8671 #else
8672 f = $ac_func;
8673 #endif
8674
8675   ;
8676   return 0;
8677 }
8678 _ACEOF
8679 rm -f conftest.$ac_objext conftest$ac_exeext
8680 if { (eval echo "$as_me:8680: \"$ac_link\"") >&5
8681   (eval $ac_link) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); } &&
8685          { ac_try='test -s conftest$ac_exeext'
8686   { (eval echo "$as_me:8686: \"$ac_try\"") >&5
8687   (eval $ac_try) 2>&5
8688   ac_status=$?
8689   echo "$as_me:8689: \$? = $ac_status" >&5
8690   (exit $ac_status); }; }; then
8691   eval "$as_ac_var=yes"
8692 else
8693   echo "$as_me: failed program was:" >&5
8694 cat conftest.$ac_ext >&5
8695 eval "$as_ac_var=no"
8696 fi
8697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8698 fi
8699 echo "$as_me:8699: result: `eval echo '${'$as_ac_var'}'`" >&5
8700 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8701 if test `eval echo '${'$as_ac_var'}'` = yes; then
8702   cat >>confdefs.h <<EOF
8703 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8704 EOF
8705
8706 fi
8707 done
8708
8709         if test "$ac_cv_func_putwc" != yes ; then
8710
8711 echo "$as_me:8711: checking for multibyte character support" >&5
8712 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8713 if test "${cf_cv_utf8_lib+set}" = set; then
8714   echo $ECHO_N "(cached) $ECHO_C" >&6
8715 else
8716
8717         cf_save_LIBS="$LIBS"
8718         cat >conftest.$ac_ext <<_ACEOF
8719 #line 8719 "configure"
8720 #include "confdefs.h"
8721
8722 #include <stdlib.h>
8723 int
8724 main ()
8725 {
8726 putwc(0,0);
8727   ;
8728   return 0;
8729 }
8730 _ACEOF
8731 rm -f conftest.$ac_objext conftest$ac_exeext
8732 if { (eval echo "$as_me:8732: \"$ac_link\"") >&5
8733   (eval $ac_link) 2>&5
8734   ac_status=$?
8735   echo "$as_me:8735: \$? = $ac_status" >&5
8736   (exit $ac_status); } &&
8737          { ac_try='test -s conftest$ac_exeext'
8738   { (eval echo "$as_me:8738: \"$ac_try\"") >&5
8739   (eval $ac_try) 2>&5
8740   ac_status=$?
8741   echo "$as_me:8741: \$? = $ac_status" >&5
8742   (exit $ac_status); }; }; then
8743   cf_cv_utf8_lib=yes
8744 else
8745   echo "$as_me: failed program was:" >&5
8746 cat conftest.$ac_ext >&5
8747
8748 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8749 # will be set on completion of the AC_TRY_LINK below.
8750 cf_cv_header_path_utf8=
8751 cf_cv_library_path_utf8=
8752
8753 echo "${as_me:-configure}:8753: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8754
8755 cf_save_LIBS="$LIBS"
8756
8757 cat >conftest.$ac_ext <<_ACEOF
8758 #line 8758 "configure"
8759 #include "confdefs.h"
8760
8761 #include <libutf8.h>
8762 int
8763 main ()
8764 {
8765 putwc(0,0);
8766   ;
8767   return 0;
8768 }
8769 _ACEOF
8770 rm -f conftest.$ac_objext conftest$ac_exeext
8771 if { (eval echo "$as_me:8771: \"$ac_link\"") >&5
8772   (eval $ac_link) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); } &&
8776          { ac_try='test -s conftest$ac_exeext'
8777   { (eval echo "$as_me:8777: \"$ac_try\"") >&5
8778   (eval $ac_try) 2>&5
8779   ac_status=$?
8780   echo "$as_me:8780: \$? = $ac_status" >&5
8781   (exit $ac_status); }; }; then
8782
8783         cf_cv_find_linkage_utf8=yes
8784         cf_cv_header_path_utf8=/usr/include
8785         cf_cv_library_path_utf8=/usr/lib
8786
8787 else
8788   echo "$as_me: failed program was:" >&5
8789 cat conftest.$ac_ext >&5
8790
8791 LIBS="-lutf8  $cf_save_LIBS"
8792
8793 cat >conftest.$ac_ext <<_ACEOF
8794 #line 8794 "configure"
8795 #include "confdefs.h"
8796
8797 #include <libutf8.h>
8798 int
8799 main ()
8800 {
8801 putwc(0,0);
8802   ;
8803   return 0;
8804 }
8805 _ACEOF
8806 rm -f conftest.$ac_objext conftest$ac_exeext
8807 if { (eval echo "$as_me:8807: \"$ac_link\"") >&5
8808   (eval $ac_link) 2>&5
8809   ac_status=$?
8810   echo "$as_me:8810: \$? = $ac_status" >&5
8811   (exit $ac_status); } &&
8812          { ac_try='test -s conftest$ac_exeext'
8813   { (eval echo "$as_me:8813: \"$ac_try\"") >&5
8814   (eval $ac_try) 2>&5
8815   ac_status=$?
8816   echo "$as_me:8816: \$? = $ac_status" >&5
8817   (exit $ac_status); }; }; then
8818
8819         cf_cv_find_linkage_utf8=yes
8820         cf_cv_header_path_utf8=/usr/include
8821         cf_cv_library_path_utf8=/usr/lib
8822         cf_cv_library_file_utf8="-lutf8"
8823
8824 else
8825   echo "$as_me: failed program was:" >&5
8826 cat conftest.$ac_ext >&5
8827
8828         cf_cv_find_linkage_utf8=no
8829         LIBS="$cf_save_LIBS"
8830
8831     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8832
8833 echo "${as_me:-configure}:8833: testing find linkage for utf8 library ..." 1>&5
8834
8835 echo "${as_me:-configure}:8835: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8836
8837     cf_save_CPPFLAGS="$CPPFLAGS"
8838     cf_test_CPPFLAGS="$CPPFLAGS"
8839
8840 cf_search=
8841
8842 # collect the current set of include-directories from compiler flags
8843 cf_header_path_list=""
8844 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8845         for cf_header_path in $CPPFLAGS $CFLAGS
8846         do
8847                 case $cf_header_path in #(vi
8848                 -I*)
8849                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8850
8851 test "$cf_header_path" != "NONE" && \
8852 test -d "$cf_header_path" && \
8853  {
8854         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8855         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8856         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8857         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8858         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8859         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8860 }
8861
8862                         cf_header_path_list="$cf_header_path_list $cf_search"
8863                         ;;
8864                 esac
8865         done
8866 fi
8867
8868 # add the variations for the package we are looking for
8869
8870 cf_search=
8871
8872 test "/usr" != "$prefix" && \
8873 test -d "/usr" && \
8874 (test $prefix = NONE || test "/usr" != "$prefix") && {
8875         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8876         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8877         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8878         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8879         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8880         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8881 }
8882
8883 test "$prefix" != "NONE" && \
8884 test -d "$prefix" && \
8885  {
8886         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8887         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8888         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8889         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8890         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8891         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8892 }
8893
8894 test "/usr/local" != "$prefix" && \
8895 test -d "/usr/local" && \
8896 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8897         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8898         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8899         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8900         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8901         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8902         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8903 }
8904
8905 test "/opt" != "$prefix" && \
8906 test -d "/opt" && \
8907 (test $prefix = NONE || test "/opt" != "$prefix") && {
8908         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8909         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8910         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8911         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8912         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8913         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8914 }
8915
8916 test "$HOME" != "$prefix" && \
8917 test -d "$HOME" && \
8918 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8919         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8920         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8921         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8922         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8923         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8924         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8925 }
8926
8927 test "$includedir" != NONE && \
8928 test "$includedir" != "/usr/include" && \
8929 test -d "$includedir" && {
8930         test -d $includedir &&    cf_search="$cf_search $includedir"
8931         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8932 }
8933
8934 test "$oldincludedir" != NONE && \
8935 test "$oldincludedir" != "/usr/include" && \
8936 test -d "$oldincludedir" && {
8937         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8938         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8939 }
8940
8941 cf_search="$cf_search $cf_header_path_list"
8942
8943     for cf_cv_header_path_utf8 in $cf_search
8944     do
8945       if test -d $cf_cv_header_path_utf8 ; then
8946         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8947
8948 echo "${as_me:-configure}:8948: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8949
8950         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8951         cat >conftest.$ac_ext <<_ACEOF
8952 #line 8952 "configure"
8953 #include "confdefs.h"
8954
8955 #include <libutf8.h>
8956 int
8957 main ()
8958 {
8959 putwc(0,0);
8960   ;
8961   return 0;
8962 }
8963 _ACEOF
8964 rm -f conftest.$ac_objext
8965 if { (eval echo "$as_me:8965: \"$ac_compile\"") >&5
8966   (eval $ac_compile) 2>&5
8967   ac_status=$?
8968   echo "$as_me:8968: \$? = $ac_status" >&5
8969   (exit $ac_status); } &&
8970          { ac_try='test -s conftest.$ac_objext'
8971   { (eval echo "$as_me:8971: \"$ac_try\"") >&5
8972   (eval $ac_try) 2>&5
8973   ac_status=$?
8974   echo "$as_me:8974: \$? = $ac_status" >&5
8975   (exit $ac_status); }; }; then
8976
8977             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8978
8979 echo "${as_me:-configure}:8979: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8980
8981             cf_cv_find_linkage_utf8=maybe
8982             cf_test_CPPFLAGS="$CPPFLAGS"
8983             break
8984 else
8985   echo "$as_me: failed program was:" >&5
8986 cat conftest.$ac_ext >&5
8987
8988             CPPFLAGS="$cf_save_CPPFLAGS"
8989
8990 fi
8991 rm -f conftest.$ac_objext conftest.$ac_ext
8992       fi
8993     done
8994
8995     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8996
8997 echo "${as_me:-configure}:8997: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8998
8999       cf_save_LIBS="$LIBS"
9000       cf_save_LDFLAGS="$LDFLAGS"
9001
9002       if test "$cf_cv_find_linkage_utf8" != yes ; then
9003
9004 cf_search=
9005 cf_library_path_list=""
9006 if test -n "${LDFLAGS}${LIBS}" ; then
9007         for cf_library_path in $LDFLAGS $LIBS
9008         do
9009                 case $cf_library_path in #(vi
9010                 -L*)
9011                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9012
9013 test "$cf_library_path" != "NONE" && \
9014 test -d "$cf_library_path" && \
9015  {
9016         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9017         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9018         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9019         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9020         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9021         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9022 }
9023
9024                         cf_library_path_list="$cf_library_path_list $cf_search"
9025                         ;;
9026                 esac
9027         done
9028 fi
9029
9030 cf_search=
9031
9032 test "/usr" != "$prefix" && \
9033 test -d "/usr" && \
9034 (test $prefix = NONE || test "/usr" != "$prefix") && {
9035         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9036         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9037         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9038         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9039         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9040         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9041 }
9042
9043 test "$prefix" != "NONE" && \
9044 test -d "$prefix" && \
9045  {
9046         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9047         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9048         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9049         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9050         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9051         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9052 }
9053
9054 test "/usr/local" != "$prefix" && \
9055 test -d "/usr/local" && \
9056 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9057         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9058         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9059         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9060         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9061         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9062         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9063 }
9064
9065 test "/opt" != "$prefix" && \
9066 test -d "/opt" && \
9067 (test $prefix = NONE || test "/opt" != "$prefix") && {
9068         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9069         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9070         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9071         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9072         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9073         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9074 }
9075
9076 test "$HOME" != "$prefix" && \
9077 test -d "$HOME" && \
9078 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9079         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9080         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9081         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9082         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9083         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9084         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9085 }
9086
9087 cf_search="$cf_library_path_list $cf_search"
9088
9089         for cf_cv_library_path_utf8 in $cf_search
9090         do
9091           if test -d $cf_cv_library_path_utf8 ; then
9092             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9093
9094 echo "${as_me:-configure}:9094: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9095
9096             CPPFLAGS="$cf_test_CPPFLAGS"
9097             LIBS="-lutf8  $cf_save_LIBS"
9098             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9099             cat >conftest.$ac_ext <<_ACEOF
9100 #line 9100 "configure"
9101 #include "confdefs.h"
9102
9103 #include <libutf8.h>
9104 int
9105 main ()
9106 {
9107 putwc(0,0);
9108   ;
9109   return 0;
9110 }
9111 _ACEOF
9112 rm -f conftest.$ac_objext conftest$ac_exeext
9113 if { (eval echo "$as_me:9113: \"$ac_link\"") >&5
9114   (eval $ac_link) 2>&5
9115   ac_status=$?
9116   echo "$as_me:9116: \$? = $ac_status" >&5
9117   (exit $ac_status); } &&
9118          { ac_try='test -s conftest$ac_exeext'
9119   { (eval echo "$as_me:9119: \"$ac_try\"") >&5
9120   (eval $ac_try) 2>&5
9121   ac_status=$?
9122   echo "$as_me:9122: \$? = $ac_status" >&5
9123   (exit $ac_status); }; }; then
9124
9125                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9126
9127 echo "${as_me:-configure}:9127: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9128
9129                 cf_cv_find_linkage_utf8=yes
9130                 cf_cv_library_file_utf8="-lutf8"
9131                 break
9132 else
9133   echo "$as_me: failed program was:" >&5
9134 cat conftest.$ac_ext >&5
9135
9136                 CPPFLAGS="$cf_save_CPPFLAGS"
9137                 LIBS="$cf_save_LIBS"
9138                 LDFLAGS="$cf_save_LDFLAGS"
9139
9140 fi
9141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9142           fi
9143         done
9144         CPPFLAGS="$cf_save_CPPFLAGS"
9145         LDFLAGS="$cf_save_LDFLAGS"
9146       fi
9147
9148     else
9149       cf_cv_find_linkage_utf8=no
9150     fi
9151
9152 fi
9153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9154
9155 fi
9156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9157
9158 LIBS="$cf_save_LIBS"
9159
9160 if test "$cf_cv_find_linkage_utf8" = yes ; then
9161 cf_cv_utf8_lib=add-on
9162 else
9163 cf_cv_utf8_lib=no
9164 fi
9165
9166 fi
9167 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9168 fi
9169 echo "$as_me:9169: result: $cf_cv_utf8_lib" >&5
9170 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9171
9172 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9173 # ncurses/ncursesw:
9174 if test "$cf_cv_utf8_lib" = "add-on" ; then
9175         cat >>confdefs.h <<\EOF
9176 #define HAVE_LIBUTF8_H 1
9177 EOF
9178
9179 if test -n "$cf_cv_header_path_utf8" ; then
9180   for cf_add_incdir in $cf_cv_header_path_utf8
9181   do
9182         while test $cf_add_incdir != /usr/include
9183         do
9184           if test -d $cf_add_incdir
9185           then
9186                 cf_have_incdir=no
9187                 if test -n "$CFLAGS$CPPFLAGS" ; then
9188                   # a loop is needed to ensure we can add subdirs of existing dirs
9189                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9190                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9191                           cf_have_incdir=yes; break
9192                         fi
9193                   done
9194                 fi
9195
9196                 if test "$cf_have_incdir" = no ; then
9197                   if test "$cf_add_incdir" = /usr/local/include ; then
9198                         if test "$GCC" = yes
9199                         then
9200                           cf_save_CPPFLAGS=$CPPFLAGS
9201                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9202                           cat >conftest.$ac_ext <<_ACEOF
9203 #line 9203 "configure"
9204 #include "confdefs.h"
9205 #include <stdio.h>
9206 int
9207 main ()
9208 {
9209 printf("Hello")
9210   ;
9211   return 0;
9212 }
9213 _ACEOF
9214 rm -f conftest.$ac_objext
9215 if { (eval echo "$as_me:9215: \"$ac_compile\"") >&5
9216   (eval $ac_compile) 2>&5
9217   ac_status=$?
9218   echo "$as_me:9218: \$? = $ac_status" >&5
9219   (exit $ac_status); } &&
9220          { ac_try='test -s conftest.$ac_objext'
9221   { (eval echo "$as_me:9221: \"$ac_try\"") >&5
9222   (eval $ac_try) 2>&5
9223   ac_status=$?
9224   echo "$as_me:9224: \$? = $ac_status" >&5
9225   (exit $ac_status); }; }; then
9226   :
9227 else
9228   echo "$as_me: failed program was:" >&5
9229 cat conftest.$ac_ext >&5
9230 cf_have_incdir=yes
9231 fi
9232 rm -f conftest.$ac_objext conftest.$ac_ext
9233                           CPPFLAGS=$cf_save_CPPFLAGS
9234                         fi
9235                   fi
9236                 fi
9237
9238                 if test "$cf_have_incdir" = no ; then
9239                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9240
9241 echo "${as_me:-configure}:9241: testing adding $cf_add_incdir to include-path ..." 1>&5
9242
9243                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9244
9245                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9246                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9247                   cf_add_incdir="$cf_top_incdir"
9248                 else
9249                   break
9250                 fi
9251           fi
9252         done
9253   done
9254 fi
9255
9256 if test -n "$cf_cv_library_path_utf8" ; then
9257   for cf_add_libdir in $cf_cv_library_path_utf8
9258   do
9259     if test $cf_add_libdir = /usr/lib ; then
9260       :
9261     elif test -d $cf_add_libdir
9262     then
9263       cf_have_libdir=no
9264       if test -n "$LDFLAGS$LIBS" ; then
9265         # a loop is needed to ensure we can add subdirs of existing dirs
9266         for cf_test_libdir in $LDFLAGS $LIBS ; do
9267           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9268             cf_have_libdir=yes; break
9269           fi
9270         done
9271       fi
9272       if test "$cf_have_libdir" = no ; then
9273         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9274
9275 echo "${as_me:-configure}:9275: testing adding $cf_add_libdir to library-path ..." 1>&5
9276
9277         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9278       fi
9279     fi
9280   done
9281 fi
9282
9283         LIBS="$cf_cv_library_file_utf8 $LIBS"
9284 fi
9285
9286                 if test "$cf_cv_utf8_lib" != no ; then
9287                         NCURSES_LIBUTF8=1
9288                 fi
9289         fi
9290
9291 # This is needed on Tru64 5.0 to declare mbstate_t
9292 echo "$as_me:9292: checking if we must include wchar.h to declare mbstate_t" >&5
9293 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9294 if test "${cf_cv_mbstate_t+set}" = set; then
9295   echo $ECHO_N "(cached) $ECHO_C" >&6
9296 else
9297
9298 cat >conftest.$ac_ext <<_ACEOF
9299 #line 9299 "configure"
9300 #include "confdefs.h"
9301
9302 #include <stdlib.h>
9303 #include <stdarg.h>
9304 #include <stdio.h>
9305 #ifdef HAVE_LIBUTF8_H
9306 #include <libutf8.h>
9307 #endif
9308 int
9309 main ()
9310 {
9311 mbstate_t state
9312   ;
9313   return 0;
9314 }
9315 _ACEOF
9316 rm -f conftest.$ac_objext
9317 if { (eval echo "$as_me:9317: \"$ac_compile\"") >&5
9318   (eval $ac_compile) 2>&5
9319   ac_status=$?
9320   echo "$as_me:9320: \$? = $ac_status" >&5
9321   (exit $ac_status); } &&
9322          { ac_try='test -s conftest.$ac_objext'
9323   { (eval echo "$as_me:9323: \"$ac_try\"") >&5
9324   (eval $ac_try) 2>&5
9325   ac_status=$?
9326   echo "$as_me:9326: \$? = $ac_status" >&5
9327   (exit $ac_status); }; }; then
9328   cf_cv_mbstate_t=no
9329 else
9330   echo "$as_me: failed program was:" >&5
9331 cat conftest.$ac_ext >&5
9332 cat >conftest.$ac_ext <<_ACEOF
9333 #line 9333 "configure"
9334 #include "confdefs.h"
9335
9336 #include <stdlib.h>
9337 #include <stdarg.h>
9338 #include <stdio.h>
9339 #include <wchar.h>
9340 #ifdef HAVE_LIBUTF8_H
9341 #include <libutf8.h>
9342 #endif
9343 int
9344 main ()
9345 {
9346 mbstate_t value
9347   ;
9348   return 0;
9349 }
9350 _ACEOF
9351 rm -f conftest.$ac_objext
9352 if { (eval echo "$as_me:9352: \"$ac_compile\"") >&5
9353   (eval $ac_compile) 2>&5
9354   ac_status=$?
9355   echo "$as_me:9355: \$? = $ac_status" >&5
9356   (exit $ac_status); } &&
9357          { ac_try='test -s conftest.$ac_objext'
9358   { (eval echo "$as_me:9358: \"$ac_try\"") >&5
9359   (eval $ac_try) 2>&5
9360   ac_status=$?
9361   echo "$as_me:9361: \$? = $ac_status" >&5
9362   (exit $ac_status); }; }; then
9363   cf_cv_mbstate_t=yes
9364 else
9365   echo "$as_me: failed program was:" >&5
9366 cat conftest.$ac_ext >&5
9367 cf_cv_mbstate_t=unknown
9368 fi
9369 rm -f conftest.$ac_objext conftest.$ac_ext
9370 fi
9371 rm -f conftest.$ac_objext conftest.$ac_ext
9372 fi
9373 echo "$as_me:9373: result: $cf_cv_mbstate_t" >&5
9374 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9375
9376 if test "$cf_cv_mbstate_t" = yes ; then
9377         cat >>confdefs.h <<\EOF
9378 #define NEED_WCHAR_H 1
9379 EOF
9380
9381         NEED_WCHAR_H=1
9382 fi
9383
9384 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9385 if test "$cf_cv_mbstate_t" = unknown ; then
9386         NCURSES_MBSTATE_T=1
9387 fi
9388
9389 # This is needed on Tru64 5.0 to declare wchar_t
9390 echo "$as_me:9390: checking if we must include wchar.h to declare wchar_t" >&5
9391 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9392 if test "${cf_cv_wchar_t+set}" = set; then
9393   echo $ECHO_N "(cached) $ECHO_C" >&6
9394 else
9395
9396 cat >conftest.$ac_ext <<_ACEOF
9397 #line 9397 "configure"
9398 #include "confdefs.h"
9399
9400 #include <stdlib.h>
9401 #include <stdarg.h>
9402 #include <stdio.h>
9403 #ifdef HAVE_LIBUTF8_H
9404 #include <libutf8.h>
9405 #endif
9406 int
9407 main ()
9408 {
9409 wchar_t state
9410   ;
9411   return 0;
9412 }
9413 _ACEOF
9414 rm -f conftest.$ac_objext
9415 if { (eval echo "$as_me:9415: \"$ac_compile\"") >&5
9416   (eval $ac_compile) 2>&5
9417   ac_status=$?
9418   echo "$as_me:9418: \$? = $ac_status" >&5
9419   (exit $ac_status); } &&
9420          { ac_try='test -s conftest.$ac_objext'
9421   { (eval echo "$as_me:9421: \"$ac_try\"") >&5
9422   (eval $ac_try) 2>&5
9423   ac_status=$?
9424   echo "$as_me:9424: \$? = $ac_status" >&5
9425   (exit $ac_status); }; }; then
9426   cf_cv_wchar_t=no
9427 else
9428   echo "$as_me: failed program was:" >&5
9429 cat conftest.$ac_ext >&5
9430 cat >conftest.$ac_ext <<_ACEOF
9431 #line 9431 "configure"
9432 #include "confdefs.h"
9433
9434 #include <stdlib.h>
9435 #include <stdarg.h>
9436 #include <stdio.h>
9437 #include <wchar.h>
9438 #ifdef HAVE_LIBUTF8_H
9439 #include <libutf8.h>
9440 #endif
9441 int
9442 main ()
9443 {
9444 wchar_t value
9445   ;
9446   return 0;
9447 }
9448 _ACEOF
9449 rm -f conftest.$ac_objext
9450 if { (eval echo "$as_me:9450: \"$ac_compile\"") >&5
9451   (eval $ac_compile) 2>&5
9452   ac_status=$?
9453   echo "$as_me:9453: \$? = $ac_status" >&5
9454   (exit $ac_status); } &&
9455          { ac_try='test -s conftest.$ac_objext'
9456   { (eval echo "$as_me:9456: \"$ac_try\"") >&5
9457   (eval $ac_try) 2>&5
9458   ac_status=$?
9459   echo "$as_me:9459: \$? = $ac_status" >&5
9460   (exit $ac_status); }; }; then
9461   cf_cv_wchar_t=yes
9462 else
9463   echo "$as_me: failed program was:" >&5
9464 cat conftest.$ac_ext >&5
9465 cf_cv_wchar_t=unknown
9466 fi
9467 rm -f conftest.$ac_objext conftest.$ac_ext
9468 fi
9469 rm -f conftest.$ac_objext conftest.$ac_ext
9470 fi
9471 echo "$as_me:9471: result: $cf_cv_wchar_t" >&5
9472 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9473
9474 if test "$cf_cv_wchar_t" = yes ; then
9475         cat >>confdefs.h <<\EOF
9476 #define NEED_WCHAR_H 1
9477 EOF
9478
9479         NEED_WCHAR_H=1
9480 fi
9481
9482 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9483 if test "$cf_cv_wchar_t" = unknown ; then
9484         NCURSES_WCHAR_T=1
9485 fi
9486
9487 # if we find wchar_t in either place, use substitution to provide a fallback.
9488 if test "$cf_cv_wchar_t" != unknown ; then
9489         NCURSES_OK_WCHAR_T=1
9490 fi
9491
9492 # This is needed on Tru64 5.0 to declare wint_t
9493 echo "$as_me:9493: checking if we must include wchar.h to declare wint_t" >&5
9494 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9495 if test "${cf_cv_wint_t+set}" = set; then
9496   echo $ECHO_N "(cached) $ECHO_C" >&6
9497 else
9498
9499 cat >conftest.$ac_ext <<_ACEOF
9500 #line 9500 "configure"
9501 #include "confdefs.h"
9502
9503 #include <stdlib.h>
9504 #include <stdarg.h>
9505 #include <stdio.h>
9506 #ifdef HAVE_LIBUTF8_H
9507 #include <libutf8.h>
9508 #endif
9509 int
9510 main ()
9511 {
9512 wint_t state
9513   ;
9514   return 0;
9515 }
9516 _ACEOF
9517 rm -f conftest.$ac_objext
9518 if { (eval echo "$as_me:9518: \"$ac_compile\"") >&5
9519   (eval $ac_compile) 2>&5
9520   ac_status=$?
9521   echo "$as_me:9521: \$? = $ac_status" >&5
9522   (exit $ac_status); } &&
9523          { ac_try='test -s conftest.$ac_objext'
9524   { (eval echo "$as_me:9524: \"$ac_try\"") >&5
9525   (eval $ac_try) 2>&5
9526   ac_status=$?
9527   echo "$as_me:9527: \$? = $ac_status" >&5
9528   (exit $ac_status); }; }; then
9529   cf_cv_wint_t=no
9530 else
9531   echo "$as_me: failed program was:" >&5
9532 cat conftest.$ac_ext >&5
9533 cat >conftest.$ac_ext <<_ACEOF
9534 #line 9534 "configure"
9535 #include "confdefs.h"
9536
9537 #include <stdlib.h>
9538 #include <stdarg.h>
9539 #include <stdio.h>
9540 #include <wchar.h>
9541 #ifdef HAVE_LIBUTF8_H
9542 #include <libutf8.h>
9543 #endif
9544 int
9545 main ()
9546 {
9547 wint_t value
9548   ;
9549   return 0;
9550 }
9551 _ACEOF
9552 rm -f conftest.$ac_objext
9553 if { (eval echo "$as_me:9553: \"$ac_compile\"") >&5
9554   (eval $ac_compile) 2>&5
9555   ac_status=$?
9556   echo "$as_me:9556: \$? = $ac_status" >&5
9557   (exit $ac_status); } &&
9558          { ac_try='test -s conftest.$ac_objext'
9559   { (eval echo "$as_me:9559: \"$ac_try\"") >&5
9560   (eval $ac_try) 2>&5
9561   ac_status=$?
9562   echo "$as_me:9562: \$? = $ac_status" >&5
9563   (exit $ac_status); }; }; then
9564   cf_cv_wint_t=yes
9565 else
9566   echo "$as_me: failed program was:" >&5
9567 cat conftest.$ac_ext >&5
9568 cf_cv_wint_t=unknown
9569 fi
9570 rm -f conftest.$ac_objext conftest.$ac_ext
9571 fi
9572 rm -f conftest.$ac_objext conftest.$ac_ext
9573 fi
9574 echo "$as_me:9574: result: $cf_cv_wint_t" >&5
9575 echo "${ECHO_T}$cf_cv_wint_t" >&6
9576
9577 if test "$cf_cv_wint_t" = yes ; then
9578         cat >>confdefs.h <<\EOF
9579 #define NEED_WCHAR_H 1
9580 EOF
9581
9582         NEED_WCHAR_H=1
9583 fi
9584
9585 # if we do not find wint_t in either place, use substitution to provide a fallback.
9586 if test "$cf_cv_wint_t" = unknown ; then
9587         NCURSES_WINT_T=1
9588 fi
9589
9590 # if we find wint_t in either place, use substitution to provide a fallback.
9591 if test "$cf_cv_wint_t" != unknown ; then
9592         NCURSES_OK_WINT_T=1
9593 fi
9594
9595         if test "$NCURSES_MBSTATE_T" != 0; then
9596                 cat >>confdefs.h <<\EOF
9597 #define NEED_MBSTATE_T_DEF 1
9598 EOF
9599
9600         fi
9601 fi
9602
9603 ###   use option --disable-lp64 to allow long chtype
9604 case $cf_cv_abi_version in
9605 [345]*)
9606         default_with_lp64=no
9607         ;;
9608 *)
9609         default_with_lp64=yes
9610         ;;
9611 esac
9612
9613 echo "$as_me:9613: checking whether to enable _LP64 definition in curses.h" >&5
9614 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9615
9616 # Check whether --enable-lp64 or --disable-lp64 was given.
9617 if test "${enable_lp64+set}" = set; then
9618   enableval="$enable_lp64"
9619   with_lp64=$enableval
9620 else
9621   with_lp64=$default_with_lp64
9622 fi;
9623 echo "$as_me:9623: result: $with_lp64" >&5
9624 echo "${ECHO_T}$with_lp64" >&6
9625
9626 if test "$with_lp64" = yes ; then
9627         cf_cv_enable_lp64=1
9628 else
9629         cf_cv_enable_lp64=0
9630 fi
9631
9632 # Check whether --enable-largefile or --disable-largefile was given.
9633 if test "${enable_largefile+set}" = set; then
9634   enableval="$enable_largefile"
9635
9636 fi;
9637 if test "$enable_largefile" != no; then
9638
9639   echo "$as_me:9639: checking for special C compiler options needed for large files" >&5
9640 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9641 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9642   echo $ECHO_N "(cached) $ECHO_C" >&6
9643 else
9644   ac_cv_sys_largefile_CC=no
9645      if test "$GCC" != yes; then
9646        ac_save_CC=$CC
9647        while :; do
9648          # IRIX 6.2 and later do not support large files by default,
9649          # so use the C compiler's -n32 option if that helps.
9650          cat >conftest.$ac_ext <<_ACEOF
9651 #line 9651 "configure"
9652 #include "confdefs.h"
9653 #include <sys/types.h>
9654  /* Check that off_t can represent 2**63 - 1 correctly.
9655     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9656     since some C++ compilers masquerading as C compilers
9657     incorrectly reject 9223372036854775807.  */
9658 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9659   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9660                        && LARGE_OFF_T % 2147483647 == 1)
9661                       ? 1 : -1];
9662 int
9663 main ()
9664 {
9665
9666   ;
9667   return 0;
9668 }
9669 _ACEOF
9670          rm -f conftest.$ac_objext
9671 if { (eval echo "$as_me:9671: \"$ac_compile\"") >&5
9672   (eval $ac_compile) 2>&5
9673   ac_status=$?
9674   echo "$as_me:9674: \$? = $ac_status" >&5
9675   (exit $ac_status); } &&
9676          { ac_try='test -s conftest.$ac_objext'
9677   { (eval echo "$as_me:9677: \"$ac_try\"") >&5
9678   (eval $ac_try) 2>&5
9679   ac_status=$?
9680   echo "$as_me:9680: \$? = $ac_status" >&5
9681   (exit $ac_status); }; }; then
9682   break
9683 else
9684   echo "$as_me: failed program was:" >&5
9685 cat conftest.$ac_ext >&5
9686 fi
9687 rm -f conftest.$ac_objext
9688          CC="$CC -n32"
9689          rm -f conftest.$ac_objext
9690 if { (eval echo "$as_me:9690: \"$ac_compile\"") >&5
9691   (eval $ac_compile) 2>&5
9692   ac_status=$?
9693   echo "$as_me:9693: \$? = $ac_status" >&5
9694   (exit $ac_status); } &&
9695          { ac_try='test -s conftest.$ac_objext'
9696   { (eval echo "$as_me:9696: \"$ac_try\"") >&5
9697   (eval $ac_try) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); }; }; then
9701   ac_cv_sys_largefile_CC=' -n32'; break
9702 else
9703   echo "$as_me: failed program was:" >&5
9704 cat conftest.$ac_ext >&5
9705 fi
9706 rm -f conftest.$ac_objext
9707          break
9708        done
9709        CC=$ac_save_CC
9710        rm -f conftest.$ac_ext
9711     fi
9712 fi
9713 echo "$as_me:9713: result: $ac_cv_sys_largefile_CC" >&5
9714 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9715   if test "$ac_cv_sys_largefile_CC" != no; then
9716     CC=$CC$ac_cv_sys_largefile_CC
9717   fi
9718
9719   echo "$as_me:9719: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9720 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9721 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9722   echo $ECHO_N "(cached) $ECHO_C" >&6
9723 else
9724   while :; do
9725   ac_cv_sys_file_offset_bits=no
9726   cat >conftest.$ac_ext <<_ACEOF
9727 #line 9727 "configure"
9728 #include "confdefs.h"
9729 #include <sys/types.h>
9730  /* Check that off_t can represent 2**63 - 1 correctly.
9731     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9732     since some C++ compilers masquerading as C compilers
9733     incorrectly reject 9223372036854775807.  */
9734 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9735   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9736                        && LARGE_OFF_T % 2147483647 == 1)
9737                       ? 1 : -1];
9738 int
9739 main ()
9740 {
9741
9742   ;
9743   return 0;
9744 }
9745 _ACEOF
9746 rm -f conftest.$ac_objext
9747 if { (eval echo "$as_me:9747: \"$ac_compile\"") >&5
9748   (eval $ac_compile) 2>&5
9749   ac_status=$?
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); } &&
9752          { ac_try='test -s conftest.$ac_objext'
9753   { (eval echo "$as_me:9753: \"$ac_try\"") >&5
9754   (eval $ac_try) 2>&5
9755   ac_status=$?
9756   echo "$as_me:9756: \$? = $ac_status" >&5
9757   (exit $ac_status); }; }; then
9758   break
9759 else
9760   echo "$as_me: failed program was:" >&5
9761 cat conftest.$ac_ext >&5
9762 fi
9763 rm -f conftest.$ac_objext conftest.$ac_ext
9764   cat >conftest.$ac_ext <<_ACEOF
9765 #line 9765 "configure"
9766 #include "confdefs.h"
9767 #define _FILE_OFFSET_BITS 64
9768 #include <sys/types.h>
9769  /* Check that off_t can represent 2**63 - 1 correctly.
9770     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9771     since some C++ compilers masquerading as C compilers
9772     incorrectly reject 9223372036854775807.  */
9773 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9774   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9775                        && LARGE_OFF_T % 2147483647 == 1)
9776                       ? 1 : -1];
9777 int
9778 main ()
9779 {
9780
9781   ;
9782   return 0;
9783 }
9784 _ACEOF
9785 rm -f conftest.$ac_objext
9786 if { (eval echo "$as_me:9786: \"$ac_compile\"") >&5
9787   (eval $ac_compile) 2>&5
9788   ac_status=$?
9789   echo "$as_me:9789: \$? = $ac_status" >&5
9790   (exit $ac_status); } &&
9791          { ac_try='test -s conftest.$ac_objext'
9792   { (eval echo "$as_me:9792: \"$ac_try\"") >&5
9793   (eval $ac_try) 2>&5
9794   ac_status=$?
9795   echo "$as_me:9795: \$? = $ac_status" >&5
9796   (exit $ac_status); }; }; then
9797   ac_cv_sys_file_offset_bits=64; break
9798 else
9799   echo "$as_me: failed program was:" >&5
9800 cat conftest.$ac_ext >&5
9801 fi
9802 rm -f conftest.$ac_objext conftest.$ac_ext
9803   break
9804 done
9805 fi
9806 echo "$as_me:9806: result: $ac_cv_sys_file_offset_bits" >&5
9807 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9808 if test "$ac_cv_sys_file_offset_bits" != no; then
9809
9810 cat >>confdefs.h <<EOF
9811 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9812 EOF
9813
9814 fi
9815 rm -rf conftest*
9816   echo "$as_me:9816: checking for _LARGE_FILES value needed for large files" >&5
9817 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9818 if test "${ac_cv_sys_large_files+set}" = set; then
9819   echo $ECHO_N "(cached) $ECHO_C" >&6
9820 else
9821   while :; do
9822   ac_cv_sys_large_files=no
9823   cat >conftest.$ac_ext <<_ACEOF
9824 #line 9824 "configure"
9825 #include "confdefs.h"
9826 #include <sys/types.h>
9827  /* Check that off_t can represent 2**63 - 1 correctly.
9828     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9829     since some C++ compilers masquerading as C compilers
9830     incorrectly reject 9223372036854775807.  */
9831 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9832   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9833                        && LARGE_OFF_T % 2147483647 == 1)
9834                       ? 1 : -1];
9835 int
9836 main ()
9837 {
9838
9839   ;
9840   return 0;
9841 }
9842 _ACEOF
9843 rm -f conftest.$ac_objext
9844 if { (eval echo "$as_me:9844: \"$ac_compile\"") >&5
9845   (eval $ac_compile) 2>&5
9846   ac_status=$?
9847   echo "$as_me:9847: \$? = $ac_status" >&5
9848   (exit $ac_status); } &&
9849          { ac_try='test -s conftest.$ac_objext'
9850   { (eval echo "$as_me:9850: \"$ac_try\"") >&5
9851   (eval $ac_try) 2>&5
9852   ac_status=$?
9853   echo "$as_me:9853: \$? = $ac_status" >&5
9854   (exit $ac_status); }; }; then
9855   break
9856 else
9857   echo "$as_me: failed program was:" >&5
9858 cat conftest.$ac_ext >&5
9859 fi
9860 rm -f conftest.$ac_objext conftest.$ac_ext
9861   cat >conftest.$ac_ext <<_ACEOF
9862 #line 9862 "configure"
9863 #include "confdefs.h"
9864 #define _LARGE_FILES 1
9865 #include <sys/types.h>
9866  /* Check that off_t can represent 2**63 - 1 correctly.
9867     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9868     since some C++ compilers masquerading as C compilers
9869     incorrectly reject 9223372036854775807.  */
9870 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9871   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9872                        && LARGE_OFF_T % 2147483647 == 1)
9873                       ? 1 : -1];
9874 int
9875 main ()
9876 {
9877
9878   ;
9879   return 0;
9880 }
9881 _ACEOF
9882 rm -f conftest.$ac_objext
9883 if { (eval echo "$as_me:9883: \"$ac_compile\"") >&5
9884   (eval $ac_compile) 2>&5
9885   ac_status=$?
9886   echo "$as_me:9886: \$? = $ac_status" >&5
9887   (exit $ac_status); } &&
9888          { ac_try='test -s conftest.$ac_objext'
9889   { (eval echo "$as_me:9889: \"$ac_try\"") >&5
9890   (eval $ac_try) 2>&5
9891   ac_status=$?
9892   echo "$as_me:9892: \$? = $ac_status" >&5
9893   (exit $ac_status); }; }; then
9894   ac_cv_sys_large_files=1; break
9895 else
9896   echo "$as_me: failed program was:" >&5
9897 cat conftest.$ac_ext >&5
9898 fi
9899 rm -f conftest.$ac_objext conftest.$ac_ext
9900   break
9901 done
9902 fi
9903 echo "$as_me:9903: result: $ac_cv_sys_large_files" >&5
9904 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9905 if test "$ac_cv_sys_large_files" != no; then
9906
9907 cat >>confdefs.h <<EOF
9908 #define _LARGE_FILES $ac_cv_sys_large_files
9909 EOF
9910
9911 fi
9912 rm -rf conftest*
9913 fi
9914
9915     if test "$enable_largefile" != no ; then
9916         echo "$as_me:9916: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9917 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9918 if test "${ac_cv_sys_largefile_source+set}" = set; then
9919   echo $ECHO_N "(cached) $ECHO_C" >&6
9920 else
9921   while :; do
9922   ac_cv_sys_largefile_source=no
9923   cat >conftest.$ac_ext <<_ACEOF
9924 #line 9924 "configure"
9925 #include "confdefs.h"
9926 #include <stdio.h>
9927 int
9928 main ()
9929 {
9930 return !fseeko;
9931   ;
9932   return 0;
9933 }
9934 _ACEOF
9935 rm -f conftest.$ac_objext
9936 if { (eval echo "$as_me:9936: \"$ac_compile\"") >&5
9937   (eval $ac_compile) 2>&5
9938   ac_status=$?
9939   echo "$as_me:9939: \$? = $ac_status" >&5
9940   (exit $ac_status); } &&
9941          { ac_try='test -s conftest.$ac_objext'
9942   { (eval echo "$as_me:9942: \"$ac_try\"") >&5
9943   (eval $ac_try) 2>&5
9944   ac_status=$?
9945   echo "$as_me:9945: \$? = $ac_status" >&5
9946   (exit $ac_status); }; }; then
9947   break
9948 else
9949   echo "$as_me: failed program was:" >&5
9950 cat conftest.$ac_ext >&5
9951 fi
9952 rm -f conftest.$ac_objext conftest.$ac_ext
9953   cat >conftest.$ac_ext <<_ACEOF
9954 #line 9954 "configure"
9955 #include "confdefs.h"
9956 #define _LARGEFILE_SOURCE 1
9957 #include <stdio.h>
9958 int
9959 main ()
9960 {
9961 return !fseeko;
9962   ;
9963   return 0;
9964 }
9965 _ACEOF
9966 rm -f conftest.$ac_objext
9967 if { (eval echo "$as_me:9967: \"$ac_compile\"") >&5
9968   (eval $ac_compile) 2>&5
9969   ac_status=$?
9970   echo "$as_me:9970: \$? = $ac_status" >&5
9971   (exit $ac_status); } &&
9972          { ac_try='test -s conftest.$ac_objext'
9973   { (eval echo "$as_me:9973: \"$ac_try\"") >&5
9974   (eval $ac_try) 2>&5
9975   ac_status=$?
9976   echo "$as_me:9976: \$? = $ac_status" >&5
9977   (exit $ac_status); }; }; then
9978   ac_cv_sys_largefile_source=1; break
9979 else
9980   echo "$as_me: failed program was:" >&5
9981 cat conftest.$ac_ext >&5
9982 fi
9983 rm -f conftest.$ac_objext conftest.$ac_ext
9984   break
9985 done
9986 fi
9987 echo "$as_me:9987: result: $ac_cv_sys_largefile_source" >&5
9988 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9989 if test "$ac_cv_sys_largefile_source" != no; then
9990
9991 cat >>confdefs.h <<EOF
9992 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9993 EOF
9994
9995 fi
9996 rm -rf conftest*
9997
9998 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9999 # in glibc 2.1.3, but that breaks too many other things.
10000 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10001 echo "$as_me:10001: checking for fseeko" >&5
10002 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10003 if test "${ac_cv_func_fseeko+set}" = set; then
10004   echo $ECHO_N "(cached) $ECHO_C" >&6
10005 else
10006   cat >conftest.$ac_ext <<_ACEOF
10007 #line 10007 "configure"
10008 #include "confdefs.h"
10009 #include <stdio.h>
10010 int
10011 main ()
10012 {
10013 return fseeko && fseeko (stdin, 0, 0);
10014   ;
10015   return 0;
10016 }
10017 _ACEOF
10018 rm -f conftest.$ac_objext conftest$ac_exeext
10019 if { (eval echo "$as_me:10019: \"$ac_link\"") >&5
10020   (eval $ac_link) 2>&5
10021   ac_status=$?
10022   echo "$as_me:10022: \$? = $ac_status" >&5
10023   (exit $ac_status); } &&
10024          { ac_try='test -s conftest$ac_exeext'
10025   { (eval echo "$as_me:10025: \"$ac_try\"") >&5
10026   (eval $ac_try) 2>&5
10027   ac_status=$?
10028   echo "$as_me:10028: \$? = $ac_status" >&5
10029   (exit $ac_status); }; }; then
10030   ac_cv_func_fseeko=yes
10031 else
10032   echo "$as_me: failed program was:" >&5
10033 cat conftest.$ac_ext >&5
10034 ac_cv_func_fseeko=no
10035 fi
10036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10037 fi
10038 echo "$as_me:10038: result: $ac_cv_func_fseeko" >&5
10039 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10040 if test $ac_cv_func_fseeko = yes; then
10041
10042 cat >>confdefs.h <<\EOF
10043 #define HAVE_FSEEKO 1
10044 EOF
10045
10046 fi
10047
10048         # Normally we would collect these definitions in the config.h,
10049         # but (like _XOPEN_SOURCE), some environments rely on having these
10050         # defined before any of the system headers are included.  Another
10051         # case comes up with C++, e.g., on AIX the compiler compiles the
10052         # header files by themselves before looking at the body files it is
10053         # told to compile.  For ncurses, those header files do not include
10054         # the config.h
10055         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10056         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10057         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10058
10059         echo "$as_me:10059: checking whether to use struct dirent64" >&5
10060 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10061 if test "${cf_cv_struct_dirent64+set}" = set; then
10062   echo $ECHO_N "(cached) $ECHO_C" >&6
10063 else
10064
10065                 cat >conftest.$ac_ext <<_ACEOF
10066 #line 10066 "configure"
10067 #include "confdefs.h"
10068
10069 #include <sys/types.h>
10070 #include <dirent.h>
10071
10072 int
10073 main ()
10074 {
10075
10076                 /* if transitional largefile support is setup, this is true */
10077                 extern struct dirent64 * readdir(DIR *);
10078                 struct dirent64 *x = readdir((DIR *)0);
10079                 struct dirent *y = readdir((DIR *)0);
10080                 int z = x - y;
10081
10082   ;
10083   return 0;
10084 }
10085 _ACEOF
10086 rm -f conftest.$ac_objext
10087 if { (eval echo "$as_me:10087: \"$ac_compile\"") >&5
10088   (eval $ac_compile) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); } &&
10092          { ac_try='test -s conftest.$ac_objext'
10093   { (eval echo "$as_me:10093: \"$ac_try\"") >&5
10094   (eval $ac_try) 2>&5
10095   ac_status=$?
10096   echo "$as_me:10096: \$? = $ac_status" >&5
10097   (exit $ac_status); }; }; then
10098   cf_cv_struct_dirent64=yes
10099 else
10100   echo "$as_me: failed program was:" >&5
10101 cat conftest.$ac_ext >&5
10102 cf_cv_struct_dirent64=no
10103 fi
10104 rm -f conftest.$ac_objext conftest.$ac_ext
10105
10106 fi
10107 echo "$as_me:10107: result: $cf_cv_struct_dirent64" >&5
10108 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10109         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
10110 #define HAVE_STRUCT_DIRENT64 1
10111 EOF
10112
10113     fi
10114
10115 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10116 echo "$as_me:10116: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10117 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10118
10119 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10120 if test "${enable_tparm_varargs+set}" = set; then
10121   enableval="$enable_tparm_varargs"
10122   with_tparm_varargs=$enableval
10123 else
10124   with_tparm_varargs=yes
10125 fi;
10126 echo "$as_me:10126: result: $with_tparm_varargs" >&5
10127 echo "${ECHO_T}$with_tparm_varargs" >&6
10128 NCURSES_TPARM_VARARGS=0
10129 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10130
10131 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10132 if test "$with_ticlib" != no ; then
10133 echo "$as_me:10133: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10134 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10135
10136 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10137 if test "${enable_tic_depends+set}" = set; then
10138   enableval="$enable_tic_depends"
10139   with_tic_depends=$enableval
10140 else
10141   with_tic_depends=yes
10142 fi;
10143 echo "$as_me:10143: result: $with_tic_depends" >&5
10144 echo "${ECHO_T}$with_tic_depends" >&6
10145 else
10146         with_tic_depends=no
10147 fi
10148
10149 ###   use option --with-bool to override bool's type
10150 echo "$as_me:10150: checking for type of bool" >&5
10151 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10152
10153 # Check whether --with-bool or --without-bool was given.
10154 if test "${with_bool+set}" = set; then
10155   withval="$with_bool"
10156   NCURSES_BOOL="$withval"
10157 else
10158   NCURSES_BOOL=auto
10159 fi;
10160 echo "$as_me:10160: result: $NCURSES_BOOL" >&5
10161 echo "${ECHO_T}$NCURSES_BOOL" >&6
10162
10163 echo "$as_me:10163: checking for alternate terminal capabilities file" >&5
10164 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10165
10166 # Check whether --with-caps or --without-caps was given.
10167 if test "${with_caps+set}" = set; then
10168   withval="$with_caps"
10169   TERMINFO_CAPS=Caps.$withval
10170 else
10171   TERMINFO_CAPS=Caps
10172 fi;
10173 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10174 echo "$as_me:10174: result: $TERMINFO_CAPS" >&5
10175 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10176
10177 ###   use option --with-chtype to override chtype's type
10178 echo "$as_me:10178: checking for type of chtype" >&5
10179 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10180
10181 # Check whether --with-chtype or --without-chtype was given.
10182 if test "${with_chtype+set}" = set; then
10183   withval="$with_chtype"
10184   NCURSES_CHTYPE="$withval"
10185 else
10186   NCURSES_CHTYPE=auto
10187 fi;
10188 echo "$as_me:10188: result: $NCURSES_CHTYPE" >&5
10189 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10190
10191 ###   use option --with-ospeed to override ospeed's type
10192 echo "$as_me:10192: checking for type of ospeed" >&5
10193 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10194
10195 # Check whether --with-ospeed or --without-ospeed was given.
10196 if test "${with_ospeed+set}" = set; then
10197   withval="$with_ospeed"
10198   NCURSES_OSPEED="$withval"
10199 else
10200   NCURSES_OSPEED=short
10201 fi;
10202 echo "$as_me:10202: result: $NCURSES_OSPEED" >&5
10203 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10204
10205 ###   use option --with-mmask-t to override mmask_t's type
10206 echo "$as_me:10206: checking for type of mmask_t" >&5
10207 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10208
10209 # Check whether --with-mmask-t or --without-mmask-t was given.
10210 if test "${with_mmask_t+set}" = set; then
10211   withval="$with_mmask_t"
10212   NCURSES_MMASK_T="$withval"
10213 else
10214   NCURSES_MMASK_T=auto
10215 fi;
10216 echo "$as_me:10216: result: $NCURSES_MMASK_T" >&5
10217 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10218
10219 ###   use option --with-ccharw-max to override CCHARW_MAX size
10220 echo "$as_me:10220: checking for size CCHARW_MAX" >&5
10221 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10222
10223 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10224 if test "${with_ccharw_max+set}" = set; then
10225   withval="$with_ccharw_max"
10226   NCURSES_CCHARW_MAX="$withval"
10227 else
10228   NCURSES_CCHARW_MAX=5
10229 fi;
10230 echo "$as_me:10230: result: $NCURSES_CCHARW_MAX" >&5
10231 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10232
10233 ### Enable compiling-in rcs id's
10234 echo "$as_me:10234: checking if RCS identifiers should be compiled-in" >&5
10235 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10236
10237 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10238 if test "${with_rcs_ids+set}" = set; then
10239   withval="$with_rcs_ids"
10240   with_rcs_ids=$withval
10241 else
10242   with_rcs_ids=no
10243 fi;
10244 echo "$as_me:10244: result: $with_rcs_ids" >&5
10245 echo "${ECHO_T}$with_rcs_ids" >&6
10246 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10247 #define USE_RCS_IDS 1
10248 EOF
10249
10250 ###############################################################################
10251
10252 echo "$as_me:10252: checking format of man-pages" >&5
10253 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10254
10255 # Check whether --with-manpage-format or --without-manpage-format was given.
10256 if test "${with_manpage_format+set}" = set; then
10257   withval="$with_manpage_format"
10258   MANPAGE_FORMAT=$withval
10259 else
10260   MANPAGE_FORMAT=unknown
10261 fi;
10262
10263 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10264 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10265
10266 cf_unknown=
10267
10268 case $MANPAGE_FORMAT in
10269 unknown)
10270   if test -z "$MANPATH" ; then
10271     MANPATH="/usr/man:/usr/share/man"
10272   fi
10273
10274   # look for the 'date' man-page (it's most likely to be installed!)
10275   MANPAGE_FORMAT=
10276   cf_preform=no
10277   cf_catonly=yes
10278   cf_example=date
10279
10280   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10281   for cf_dir in $MANPATH; do
10282     test -z "$cf_dir" && cf_dir=/usr/man
10283     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
10284     do
10285       cf_test=`echo $cf_name | sed -e 's/*//'`
10286       if test "x$cf_test" = "x$cf_name" ; then
10287
10288         case "$cf_name" in
10289         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10290         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10291         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10292         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10293         esac
10294
10295         case "$cf_name" in
10296         $cf_dir/man*)
10297           cf_catonly=no
10298           ;;
10299         $cf_dir/cat*)
10300           cf_preform=yes
10301           ;;
10302         esac
10303         break
10304       fi
10305
10306       # if we found a match in either man* or cat*, stop looking
10307       if test -n "$MANPAGE_FORMAT" ; then
10308         cf_found=no
10309         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10310         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10311         case "$cf_name" in
10312         $cf_dir/cat*)
10313           cf_found=yes
10314           ;;
10315         esac
10316         test $cf_found=yes && break
10317       fi
10318     done
10319     # only check the first directory in $MANPATH where we find manpages
10320     if test -n "$MANPAGE_FORMAT" ; then
10321        break
10322     fi
10323   done
10324   # if we did not find the example, just assume it is normal
10325   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10326   IFS="$ac_save_ifs"
10327   ;;
10328 *)
10329   for cf_option in $MANPAGE_FORMAT; do
10330      case $cf_option in #(vi
10331      gzip|compress|BSDI|normal|formatted|catonly)
10332        ;;
10333      *)
10334        cf_unknown="$cf_unknown $cf_option"
10335        ;;
10336      esac
10337   done
10338   ;;
10339 esac
10340
10341 echo "$as_me:10341: result: $MANPAGE_FORMAT" >&5
10342 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10343 if test -n "$cf_unknown" ; then
10344   { echo "$as_me:10344: WARNING: Unexpected manpage-format $cf_unknown" >&5
10345 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10346 fi
10347
10348 echo "$as_me:10348: checking for manpage renaming" >&5
10349 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10350
10351 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10352 if test "${with_manpage_renames+set}" = set; then
10353   withval="$with_manpage_renames"
10354   MANPAGE_RENAMES=$withval
10355 else
10356   MANPAGE_RENAMES=yes
10357 fi;
10358
10359 case ".$MANPAGE_RENAMES" in #(vi
10360 .no) #(vi
10361   ;;
10362 .|.yes)
10363   # Debian 'man' program?
10364   if test -f /etc/debian_version ; then
10365     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10366   else
10367     MANPAGE_RENAMES=no
10368   fi
10369   ;;
10370 esac
10371
10372 if test "$MANPAGE_RENAMES" != no ; then
10373   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10374     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10375   elif test ! -f $MANPAGE_RENAMES ; then
10376     { { echo "$as_me:10376: error: not a filename: $MANPAGE_RENAMES" >&5
10377 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10378    { (exit 1); exit 1; }; }
10379   fi
10380
10381   test ! -d man && mkdir man
10382
10383   # Construct a sed-script to perform renaming within man-pages
10384   if test -n "$MANPAGE_RENAMES" ; then
10385     test ! -d man && mkdir man
10386     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10387   fi
10388 fi
10389
10390 echo "$as_me:10390: result: $MANPAGE_RENAMES" >&5
10391 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10392
10393 echo "$as_me:10393: checking if manpage aliases will be installed" >&5
10394 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10395
10396 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10397 if test "${with_manpage_aliases+set}" = set; then
10398   withval="$with_manpage_aliases"
10399   MANPAGE_ALIASES=$withval
10400 else
10401   MANPAGE_ALIASES=yes
10402 fi;
10403
10404 echo "$as_me:10404: result: $MANPAGE_ALIASES" >&5
10405 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10406
10407 case "x$LN_S" in #(vi
10408 xln*) #(vi
10409         cf_use_symlinks=yes
10410         ;;
10411 *)
10412         cf_use_symlinks=no
10413         ;;
10414 esac
10415
10416 MANPAGE_SYMLINKS=no
10417 if test "$MANPAGE_ALIASES" = yes ; then
10418 echo "$as_me:10418: checking if manpage symlinks should be used" >&5
10419 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10420
10421 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10422 if test "${with_manpage_symlinks+set}" = set; then
10423   withval="$with_manpage_symlinks"
10424   MANPAGE_SYMLINKS=$withval
10425 else
10426   MANPAGE_SYMLINKS=$cf_use_symlinks
10427 fi;
10428
10429 if test "$$cf_use_symlinks" = no; then
10430 if test "$MANPAGE_SYMLINKS" = yes ; then
10431         { echo "$as_me:10431: WARNING: cannot make symlinks" >&5
10432 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10433         MANPAGE_SYMLINKS=no
10434 fi
10435 fi
10436
10437 echo "$as_me:10437: result: $MANPAGE_SYMLINKS" >&5
10438 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10439 fi
10440
10441 echo "$as_me:10441: checking for manpage tbl" >&5
10442 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10443
10444 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10445 if test "${with_manpage_tbl+set}" = set; then
10446   withval="$with_manpage_tbl"
10447   MANPAGE_TBL=$withval
10448 else
10449   MANPAGE_TBL=no
10450 fi;
10451
10452 echo "$as_me:10452: result: $MANPAGE_TBL" >&5
10453 echo "${ECHO_T}$MANPAGE_TBL" >&6
10454
10455   if test "$prefix" = "NONE" ; then
10456      cf_prefix="$ac_default_prefix"
10457   else
10458      cf_prefix="$prefix"
10459   fi
10460
10461   case "$MANPAGE_FORMAT" in # (vi
10462   *catonly*) # (vi
10463     cf_format=yes
10464     cf_inboth=no
10465     ;;
10466   *formatted*) # (vi
10467     cf_format=yes
10468     cf_inboth=yes
10469     ;;
10470   *)
10471     cf_format=no
10472     cf_inboth=no
10473     ;;
10474   esac
10475
10476 test ! -d man && mkdir man
10477
10478 cf_so_strip=
10479 cf_compress=
10480 case "$MANPAGE_FORMAT" in #(vi
10481 *compress*) #(vi
10482         cf_so_strip="Z"
10483         cf_compress=compress
10484   ;;
10485 *gzip*)
10486         cf_so_strip="gz"
10487         cf_compress=gzip
10488   ;;
10489 esac
10490
10491 cf_edit_man=./edit_man.sh
10492 cf_man_alias=`pwd`/man_alias.sed
10493
10494 cat >$cf_edit_man <<CF_EOF
10495 #! /bin/sh
10496 # this script is generated by the configure-script CF_MAN_PAGES macro.
10497
10498 prefix="$cf_prefix"
10499 datadir="$datadir"
10500
10501 NCURSES_MAJOR="$NCURSES_MAJOR"
10502 NCURSES_MINOR="$NCURSES_MINOR"
10503 NCURSES_PATCH="$NCURSES_PATCH"
10504
10505 NCURSES_OSPEED="$NCURSES_OSPEED"
10506 TERMINFO="$TERMINFO"
10507
10508 INSTALL="$INSTALL"
10509 INSTALL_DATA="$INSTALL_DATA"
10510
10511 transform="$program_transform_name"
10512
10513 TMP=\${TMPDIR:=/tmp}/man\$\$
10514 trap "rm -f \$TMP" 0 1 2 5 15
10515
10516 form=\$1
10517 shift || exit 1
10518
10519 verb=\$1
10520 shift || exit 1
10521
10522 mandir=\$1
10523 shift || exit 1
10524
10525 srcdir=\$1
10526 top_srcdir=\$srcdir/..
10527 shift || exit 1
10528
10529 if test "\$form" = normal ; then
10530         if test "$cf_format" = yes ; then
10531         if test "$cf_inboth" = no ; then
10532                 sh \$0 format \$verb \$mandir \$srcdir \$*
10533                 exit $?
10534         fi
10535         fi
10536         cf_subdir=\$mandir/man
10537         cf_tables=$MANPAGE_TBL
10538 else
10539         cf_subdir=\$mandir/cat
10540         cf_tables=yes
10541 fi
10542
10543 # process the list of source-files
10544 for i in \$* ; do
10545 case \$i in #(vi
10546 *.orig|*.rej) ;; #(vi
10547 *.[0-9]*)
10548         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10549         if test \$verb = installing ; then
10550         if test ! -d \$cf_subdir\${section} ; then
10551                 mkdir -p \$cf_subdir\$section
10552         fi
10553         fi
10554
10555         # replace variables in man page
10556         if test ! -f $cf_man_alias ; then
10557 cat >>$cf_man_alias <<-CF_EOF2
10558                 s,@DATADIR@,\$datadir,g
10559                 s,@TERMINFO@,\$TERMINFO,g
10560                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10561                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10562                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10563                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10564 CF_EOF
10565
10566         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10567         do
10568                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10569                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10570 cat >>$cf_edit_man <<-CF_EOF
10571                 s,@$cf_NAME@,$cf_name,g
10572 CF_EOF
10573         done
10574
10575 cat >>$cf_edit_man <<CF_EOF
10576 CF_EOF2
10577                 echo "...made $cf_man_alias"
10578         fi
10579
10580         aliases=
10581         cf_source=\`basename \$i\`
10582         inalias=\$cf_source
10583         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10584         if test ! -f \$inalias ; then
10585                 echo .. skipped \$cf_source
10586                 continue
10587         fi
10588 CF_EOF
10589
10590 if test "$MANPAGE_ALIASES" != no ; then
10591 cat >>$cf_edit_man <<CF_EOF
10592         nCurses=ignore.3x
10593         test $with_curses_h = yes && nCurses=ncurses.3x
10594         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10595 CF_EOF
10596 fi
10597
10598 if test "$MANPAGE_RENAMES" = no ; then
10599 cat >>$cf_edit_man <<CF_EOF
10600         # perform program transformations for section 1 man pages
10601         if test \$section = 1 ; then
10602                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10603         else
10604                 cf_target=\$cf_subdir\${section}/\$cf_source
10605         fi
10606 CF_EOF
10607 else
10608 cat >>$cf_edit_man <<CF_EOF
10609         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10610         if test -z "\$cf_target" ; then
10611                 echo '? missing rename for '\$cf_source
10612                 cf_target="\$cf_source"
10613         fi
10614         cf_target="\$cf_subdir\${section}/\${cf_target}"
10615
10616 CF_EOF
10617 fi
10618
10619 cat >>$cf_edit_man <<CF_EOF
10620         sed     -f $cf_man_alias \\
10621 CF_EOF
10622
10623 if test -f $MANPAGE_RENAMES ; then
10624 cat >>$cf_edit_man <<CF_EOF
10625                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10626 CF_EOF
10627 else
10628 cat >>$cf_edit_man <<CF_EOF
10629                 < \$i >\$TMP
10630 CF_EOF
10631 fi
10632
10633 cat >>$cf_edit_man <<CF_EOF
10634 if test \$cf_tables = yes ; then
10635         tbl \$TMP >\$TMP.out
10636         mv \$TMP.out \$TMP
10637 fi
10638 CF_EOF
10639
10640 if test $with_overwrite != yes ; then
10641 cat >>$cf_edit_man <<CF_EOF
10642         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10643         mv \$TMP.out \$TMP
10644 CF_EOF
10645 fi
10646
10647 if test $with_curses_h != yes ; then
10648 cat >>$cf_edit_man <<CF_EOF
10649         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10650         mv \$TMP.out \$TMP
10651 CF_EOF
10652 fi
10653
10654 cat >>$cf_edit_man <<CF_EOF
10655         if test \$form = format ; then
10656                 nroff -man \$TMP >\$TMP.out
10657                 mv \$TMP.out \$TMP
10658         fi
10659 CF_EOF
10660
10661 if test -n "$cf_compress" ; then
10662 cat >>$cf_edit_man <<CF_EOF
10663         if test \$verb = installing ; then
10664         if ( $cf_compress -f \$TMP )
10665         then
10666                 mv \$TMP.$cf_so_strip \$TMP
10667         fi
10668         fi
10669         cf_target="\$cf_target.$cf_so_strip"
10670 CF_EOF
10671 fi
10672
10673 case "$MANPAGE_FORMAT" in #(vi
10674 *BSDI*)
10675 cat >>$cf_edit_man <<CF_EOF
10676         if test \$form = format ; then
10677                 # BSDI installs only .0 suffixes in the cat directories
10678                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10679         fi
10680 CF_EOF
10681   ;;
10682 esac
10683
10684 cat >>$cf_edit_man <<CF_EOF
10685         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10686         if test \$verb = installing ; then
10687                 echo \$verb \$cf_target
10688                 \$INSTALL_DATA \$TMP \$cf_target
10689                 test -d \$cf_subdir\${section} &&
10690                 test -n "\$aliases" && (
10691                         cd \$cf_subdir\${section} && (
10692                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10693                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10694                                 cf_target=\`basename \$cf_target\`
10695                                 for cf_alias in \$aliases
10696                                 do
10697                                         if test \$section = 1 ; then
10698                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10699                                         fi
10700
10701                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10702                                                 if test -f \$cf_alias\${suffix} ; then
10703                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10704                                                         then
10705                                                                 continue
10706                                                         fi
10707                                                 fi
10708                                                 echo .. \$verb alias \$cf_alias\${suffix}
10709 CF_EOF
10710 case "x$LN_S" in #(vi
10711 *-f) #(vi
10712 cat >>$cf_edit_man <<CF_EOF
10713                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10714 CF_EOF
10715         ;;
10716 *)
10717 cat >>$cf_edit_man <<CF_EOF
10718                                                 rm -f \$cf_alias\${suffix}
10719                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10720 CF_EOF
10721         ;;
10722 esac
10723 cat >>$cf_edit_man <<CF_EOF
10724                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10725                                                 echo ".so \$cf_source" >\$TMP
10726 CF_EOF
10727 if test -n "$cf_compress" ; then
10728 cat >>$cf_edit_man <<CF_EOF
10729                                                 if test -n "$cf_so_strip" ; then
10730                                                         $cf_compress -f \$TMP
10731                                                         mv \$TMP.$cf_so_strip \$TMP
10732                                                 fi
10733 CF_EOF
10734 fi
10735 cat >>$cf_edit_man <<CF_EOF
10736                                                 echo .. \$verb alias \$cf_alias\${suffix}
10737                                                 rm -f \$cf_alias\${suffix}
10738                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10739                                         fi
10740                                 done
10741                         )
10742                 )
10743         elif test \$verb = removing ; then
10744                 test -f \$cf_target && (
10745                         echo \$verb \$cf_target
10746                         rm -f \$cf_target
10747                 )
10748                 test -d \$cf_subdir\${section} &&
10749                 test -n "\$aliases" && (
10750                         cd \$cf_subdir\${section} && (
10751                                 for cf_alias in \$aliases
10752                                 do
10753                                         if test \$section = 1 ; then
10754                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10755                                         fi
10756
10757                                         echo .. \$verb alias \$cf_alias\${suffix}
10758                                         rm -f \$cf_alias\${suffix}
10759                                 done
10760                         )
10761                 )
10762         else
10763 #               echo ".hy 0"
10764                 cat \$TMP
10765         fi
10766         ;;
10767 esac
10768 done
10769
10770 if test $cf_inboth = yes ; then
10771 if test \$form != format ; then
10772         sh \$0 format \$verb \$mandir \$srcdir \$*
10773 fi
10774 fi
10775
10776 exit 0
10777 CF_EOF
10778 chmod 755 $cf_edit_man
10779
10780 ###############################################################################
10781
10782 ### Note that some functions (such as const) are normally disabled anyway.
10783 echo "$as_me:10783: checking if you want to build with function extensions" >&5
10784 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10785
10786 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10787 if test "${enable_ext_funcs+set}" = set; then
10788   enableval="$enable_ext_funcs"
10789   with_ext_funcs=$enableval
10790 else
10791   with_ext_funcs=yes
10792 fi;
10793 echo "$as_me:10793: result: $with_ext_funcs" >&5
10794 echo "${ECHO_T}$with_ext_funcs" >&6
10795 if test "$with_ext_funcs" = yes ; then
10796         NCURSES_EXT_FUNCS=1
10797         cat >>confdefs.h <<\EOF
10798 #define HAVE_ASSUME_DEFAULT_COLORS 1
10799 EOF
10800
10801         cat >>confdefs.h <<\EOF
10802 #define HAVE_CURSES_VERSION 1
10803 EOF
10804
10805         cat >>confdefs.h <<\EOF
10806 #define HAVE_HAS_KEY 1
10807 EOF
10808
10809         cat >>confdefs.h <<\EOF
10810 #define HAVE_RESIZETERM 1
10811 EOF
10812
10813         cat >>confdefs.h <<\EOF
10814 #define HAVE_RESIZE_TERM 1
10815 EOF
10816
10817         cat >>confdefs.h <<\EOF
10818 #define HAVE_TERM_ENTRY_H 1
10819 EOF
10820
10821         cat >>confdefs.h <<\EOF
10822 #define HAVE_USE_DEFAULT_COLORS 1
10823 EOF
10824
10825         cat >>confdefs.h <<\EOF
10826 #define HAVE_USE_SCREEN 1
10827 EOF
10828
10829         cat >>confdefs.h <<\EOF
10830 #define HAVE_USE_WINDOW 1
10831 EOF
10832
10833         cat >>confdefs.h <<\EOF
10834 #define HAVE_WRESIZE 1
10835 EOF
10836
10837         cat >>confdefs.h <<\EOF
10838 #define NCURSES_EXT_FUNCS 1
10839 EOF
10840
10841         GENERATED_EXT_FUNCS=generated
10842 else
10843         NCURSES_EXT_FUNCS=0
10844         GENERATED_EXT_FUNCS=
10845 fi
10846
10847 echo "$as_me:10847: checking if you want to build with experimental SCREEN extensions" >&5
10848 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10849
10850 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10851 if test "${enable_sp_funcs+set}" = set; then
10852   enableval="$enable_sp_funcs"
10853   with_sp_funcs=$enableval
10854 else
10855   with_sp_funcs=no
10856 fi;
10857 echo "$as_me:10857: result: $with_sp_funcs" >&5
10858 echo "${ECHO_T}$with_sp_funcs" >&6
10859 if test "$with_sp_funcs" = yes ; then
10860         NCURSES_SP_FUNCS=1
10861         cat >>confdefs.h <<\EOF
10862 #define NCURSES_SP_FUNCS 1
10863 EOF
10864
10865         GENERATED_SP_FUNCS=generated
10866 else
10867         NCURSES_SP_FUNCS=0
10868         GENERATED_SP_FUNCS=
10869 fi
10870
10871 echo "$as_me:10871: checking if you want to build with experimental terminal-driver" >&5
10872 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10873
10874 # Check whether --enable-term-driver or --disable-term-driver was given.
10875 if test "${enable_term_driver+set}" = set; then
10876   enableval="$enable_term_driver"
10877   with_term_driver=$enableval
10878 else
10879   with_term_driver=no
10880 fi;
10881 echo "$as_me:10881: result: $with_term_driver" >&5
10882 echo "${ECHO_T}$with_term_driver" >&6
10883 if test "$with_term_driver" = yes ; then
10884         cat >>confdefs.h <<\EOF
10885 #define USE_TERM_DRIVER 1
10886 EOF
10887
10888         if test "$with_sp_funcs" != yes ; then
10889                 { { echo "$as_me:10889: error: The term-driver option relies upon sp-funcs" >&5
10890 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10891    { (exit 1); exit 1; }; }
10892         fi
10893 fi
10894
10895 ###   use option --enable-const to turn on use of const beyond that in XSI.
10896 echo "$as_me:10896: checking for extended use of const keyword" >&5
10897 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10898
10899 # Check whether --enable-const or --disable-const was given.
10900 if test "${enable_const+set}" = set; then
10901   enableval="$enable_const"
10902   with_ext_const=$enableval
10903 else
10904   with_ext_const=no
10905 fi;
10906 echo "$as_me:10906: result: $with_ext_const" >&5
10907 echo "${ECHO_T}$with_ext_const" >&6
10908 NCURSES_CONST='/*nothing*/'
10909 if test "$with_ext_const" = yes ; then
10910         NCURSES_CONST=const
10911 fi
10912
10913 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10914 echo "$as_me:10914: checking if you want to use extended colors" >&5
10915 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10916
10917 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10918 if test "${enable_ext_colors+set}" = set; then
10919   enableval="$enable_ext_colors"
10920   with_ext_colors=$enableval
10921 else
10922   with_ext_colors=no
10923 fi;
10924 echo "$as_me:10924: result: $with_ext_colors" >&5
10925 echo "${ECHO_T}$with_ext_colors" >&6
10926 NCURSES_EXT_COLORS=0
10927 if test "$with_ext_colors" = yes ; then
10928         if test "$with_widec" != yes ; then
10929                 { { echo "$as_me:10929: error: This option applies only to wide-character library" >&5
10930 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10931    { (exit 1); exit 1; }; }
10932         else
10933                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10934
10935 if test "${with_abi_version+set}" != set; then
10936         case $cf_cv_rel_version in
10937         5.*)
10938                 cf_cv_rel_version=6.0
10939                 cf_cv_abi_version=6
10940                 { echo "$as_me:10940: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10941 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10942                 ;;
10943         esac
10944 fi
10945
10946         fi
10947         NCURSES_EXT_COLORS=1
10948         cat >>confdefs.h <<\EOF
10949 #define NCURSES_EXT_COLORS 1
10950 EOF
10951
10952 fi
10953
10954 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10955 echo "$as_me:10955: checking if you want to use extended mouse encoding" >&5
10956 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10957
10958 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10959 if test "${enable_ext_mouse+set}" = set; then
10960   enableval="$enable_ext_mouse"
10961   with_ext_mouse=$enableval
10962 else
10963   with_ext_mouse=no
10964 fi;
10965 echo "$as_me:10965: result: $with_ext_mouse" >&5
10966 echo "${ECHO_T}$with_ext_mouse" >&6
10967 NCURSES_MOUSE_VERSION=1
10968 if test "$with_ext_mouse" = yes ; then
10969         NCURSES_MOUSE_VERSION=2
10970
10971 if test "${with_abi_version+set}" != set; then
10972         case $cf_cv_rel_version in
10973         5.*)
10974                 cf_cv_rel_version=6.0
10975                 cf_cv_abi_version=6
10976                 { echo "$as_me:10976: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10977 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10978                 ;;
10979         esac
10980 fi
10981
10982 fi
10983
10984 echo "$as_me:10984: checking if you want \$NCURSES_NO_PADDING code" >&5
10985 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10986
10987 # Check whether --enable-no-padding or --disable-no-padding was given.
10988 if test "${enable_no_padding+set}" = set; then
10989   enableval="$enable_no_padding"
10990   with_no_padding=$enableval
10991 else
10992   with_no_padding=$with_ext_funcs
10993 fi;
10994 echo "$as_me:10994: result: $with_no_padding" >&5
10995 echo "${ECHO_T}$with_no_padding" >&6
10996 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10997 #define NCURSES_NO_PADDING 1
10998 EOF
10999
11000 echo "$as_me:11000: checking for ANSI C header files" >&5
11001 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11002 if test "${ac_cv_header_stdc+set}" = set; then
11003   echo $ECHO_N "(cached) $ECHO_C" >&6
11004 else
11005   cat >conftest.$ac_ext <<_ACEOF
11006 #line 11006 "configure"
11007 #include "confdefs.h"
11008 #include <stdlib.h>
11009 #include <stdarg.h>
11010 #include <string.h>
11011 #include <float.h>
11012
11013 _ACEOF
11014 if { (eval echo "$as_me:11014: \"$ac_cpp conftest.$ac_ext\"") >&5
11015   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11016   ac_status=$?
11017   egrep -v '^ *\+' conftest.er1 >conftest.err
11018   rm -f conftest.er1
11019   cat conftest.err >&5
11020   echo "$as_me:11020: \$? = $ac_status" >&5
11021   (exit $ac_status); } >/dev/null; then
11022   if test -s conftest.err; then
11023     ac_cpp_err=$ac_c_preproc_warn_flag
11024   else
11025     ac_cpp_err=
11026   fi
11027 else
11028   ac_cpp_err=yes
11029 fi
11030 if test -z "$ac_cpp_err"; then
11031   ac_cv_header_stdc=yes
11032 else
11033   echo "$as_me: failed program was:" >&5
11034   cat conftest.$ac_ext >&5
11035   ac_cv_header_stdc=no
11036 fi
11037 rm -f conftest.err conftest.$ac_ext
11038
11039 if test $ac_cv_header_stdc = yes; then
11040   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11041   cat >conftest.$ac_ext <<_ACEOF
11042 #line 11042 "configure"
11043 #include "confdefs.h"
11044 #include <string.h>
11045
11046 _ACEOF
11047 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11048   egrep "memchr" >/dev/null 2>&1; then
11049   :
11050 else
11051   ac_cv_header_stdc=no
11052 fi
11053 rm -rf conftest*
11054
11055 fi
11056
11057 if test $ac_cv_header_stdc = yes; then
11058   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11059   cat >conftest.$ac_ext <<_ACEOF
11060 #line 11060 "configure"
11061 #include "confdefs.h"
11062 #include <stdlib.h>
11063
11064 _ACEOF
11065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11066   egrep "free" >/dev/null 2>&1; then
11067   :
11068 else
11069   ac_cv_header_stdc=no
11070 fi
11071 rm -rf conftest*
11072
11073 fi
11074
11075 if test $ac_cv_header_stdc = yes; then
11076   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11077   if test "$cross_compiling" = yes; then
11078   :
11079 else
11080   cat >conftest.$ac_ext <<_ACEOF
11081 #line 11081 "configure"
11082 #include "confdefs.h"
11083 #include <ctype.h>
11084 #if ((' ' & 0x0FF) == 0x020)
11085 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11086 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11087 #else
11088 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11089                      || ('j' <= (c) && (c) <= 'r') \
11090                      || ('s' <= (c) && (c) <= 'z'))
11091 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11092 #endif
11093
11094 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11095 int
11096 main ()
11097 {
11098   int i;
11099   for (i = 0; i < 256; i++)
11100     if (XOR (islower (i), ISLOWER (i))
11101         || toupper (i) != TOUPPER (i))
11102       $ac_main_return(2);
11103   $ac_main_return (0);
11104 }
11105 _ACEOF
11106 rm -f conftest$ac_exeext
11107 if { (eval echo "$as_me:11107: \"$ac_link\"") >&5
11108   (eval $ac_link) 2>&5
11109   ac_status=$?
11110   echo "$as_me:11110: \$? = $ac_status" >&5
11111   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11112   { (eval echo "$as_me:11112: \"$ac_try\"") >&5
11113   (eval $ac_try) 2>&5
11114   ac_status=$?
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); }; }; then
11117   :
11118 else
11119   echo "$as_me: program exited with status $ac_status" >&5
11120 echo "$as_me: failed program was:" >&5
11121 cat conftest.$ac_ext >&5
11122 ac_cv_header_stdc=no
11123 fi
11124 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11125 fi
11126 fi
11127 fi
11128 echo "$as_me:11128: result: $ac_cv_header_stdc" >&5
11129 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11130 if test $ac_cv_header_stdc = yes; then
11131
11132 cat >>confdefs.h <<\EOF
11133 #define STDC_HEADERS 1
11134 EOF
11135
11136 fi
11137
11138 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11139
11140 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11141                   inttypes.h stdint.h unistd.h
11142 do
11143 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11144 echo "$as_me:11144: checking for $ac_header" >&5
11145 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11146 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11147   echo $ECHO_N "(cached) $ECHO_C" >&6
11148 else
11149   cat >conftest.$ac_ext <<_ACEOF
11150 #line 11150 "configure"
11151 #include "confdefs.h"
11152 $ac_includes_default
11153 #include <$ac_header>
11154 _ACEOF
11155 rm -f conftest.$ac_objext
11156 if { (eval echo "$as_me:11156: \"$ac_compile\"") >&5
11157   (eval $ac_compile) 2>&5
11158   ac_status=$?
11159   echo "$as_me:11159: \$? = $ac_status" >&5
11160   (exit $ac_status); } &&
11161          { ac_try='test -s conftest.$ac_objext'
11162   { (eval echo "$as_me:11162: \"$ac_try\"") >&5
11163   (eval $ac_try) 2>&5
11164   ac_status=$?
11165   echo "$as_me:11165: \$? = $ac_status" >&5
11166   (exit $ac_status); }; }; then
11167   eval "$as_ac_Header=yes"
11168 else
11169   echo "$as_me: failed program was:" >&5
11170 cat conftest.$ac_ext >&5
11171 eval "$as_ac_Header=no"
11172 fi
11173 rm -f conftest.$ac_objext conftest.$ac_ext
11174 fi
11175 echo "$as_me:11175: result: `eval echo '${'$as_ac_Header'}'`" >&5
11176 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11177 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11178   cat >>confdefs.h <<EOF
11179 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11180 EOF
11181
11182 fi
11183 done
11184
11185 echo "$as_me:11185: checking for signed char" >&5
11186 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11187 if test "${ac_cv_type_signed_char+set}" = set; then
11188   echo $ECHO_N "(cached) $ECHO_C" >&6
11189 else
11190   cat >conftest.$ac_ext <<_ACEOF
11191 #line 11191 "configure"
11192 #include "confdefs.h"
11193 $ac_includes_default
11194 int
11195 main ()
11196 {
11197 if ((signed char *) 0)
11198   return 0;
11199 if (sizeof (signed char))
11200   return 0;
11201   ;
11202   return 0;
11203 }
11204 _ACEOF
11205 rm -f conftest.$ac_objext
11206 if { (eval echo "$as_me:11206: \"$ac_compile\"") >&5
11207   (eval $ac_compile) 2>&5
11208   ac_status=$?
11209   echo "$as_me:11209: \$? = $ac_status" >&5
11210   (exit $ac_status); } &&
11211          { ac_try='test -s conftest.$ac_objext'
11212   { (eval echo "$as_me:11212: \"$ac_try\"") >&5
11213   (eval $ac_try) 2>&5
11214   ac_status=$?
11215   echo "$as_me:11215: \$? = $ac_status" >&5
11216   (exit $ac_status); }; }; then
11217   ac_cv_type_signed_char=yes
11218 else
11219   echo "$as_me: failed program was:" >&5
11220 cat conftest.$ac_ext >&5
11221 ac_cv_type_signed_char=no
11222 fi
11223 rm -f conftest.$ac_objext conftest.$ac_ext
11224 fi
11225 echo "$as_me:11225: result: $ac_cv_type_signed_char" >&5
11226 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11227
11228 echo "$as_me:11228: checking size of signed char" >&5
11229 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11230 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11231   echo $ECHO_N "(cached) $ECHO_C" >&6
11232 else
11233   if test "$ac_cv_type_signed_char" = yes; then
11234   if test "$cross_compiling" = yes; then
11235   # Depending upon the size, compute the lo and hi bounds.
11236 cat >conftest.$ac_ext <<_ACEOF
11237 #line 11237 "configure"
11238 #include "confdefs.h"
11239 $ac_includes_default
11240 int
11241 main ()
11242 {
11243 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11244   ;
11245   return 0;
11246 }
11247 _ACEOF
11248 rm -f conftest.$ac_objext
11249 if { (eval echo "$as_me:11249: \"$ac_compile\"") >&5
11250   (eval $ac_compile) 2>&5
11251   ac_status=$?
11252   echo "$as_me:11252: \$? = $ac_status" >&5
11253   (exit $ac_status); } &&
11254          { ac_try='test -s conftest.$ac_objext'
11255   { (eval echo "$as_me:11255: \"$ac_try\"") >&5
11256   (eval $ac_try) 2>&5
11257   ac_status=$?
11258   echo "$as_me:11258: \$? = $ac_status" >&5
11259   (exit $ac_status); }; }; then
11260   ac_lo=0 ac_mid=0
11261   while :; do
11262     cat >conftest.$ac_ext <<_ACEOF
11263 #line 11263 "configure"
11264 #include "confdefs.h"
11265 $ac_includes_default
11266 int
11267 main ()
11268 {
11269 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11270   ;
11271   return 0;
11272 }
11273 _ACEOF
11274 rm -f conftest.$ac_objext
11275 if { (eval echo "$as_me:11275: \"$ac_compile\"") >&5
11276   (eval $ac_compile) 2>&5
11277   ac_status=$?
11278   echo "$as_me:11278: \$? = $ac_status" >&5
11279   (exit $ac_status); } &&
11280          { ac_try='test -s conftest.$ac_objext'
11281   { (eval echo "$as_me:11281: \"$ac_try\"") >&5
11282   (eval $ac_try) 2>&5
11283   ac_status=$?
11284   echo "$as_me:11284: \$? = $ac_status" >&5
11285   (exit $ac_status); }; }; then
11286   ac_hi=$ac_mid; break
11287 else
11288   echo "$as_me: failed program was:" >&5
11289 cat conftest.$ac_ext >&5
11290 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11291 fi
11292 rm -f conftest.$ac_objext conftest.$ac_ext
11293   done
11294 else
11295   echo "$as_me: failed program was:" >&5
11296 cat conftest.$ac_ext >&5
11297 ac_hi=-1 ac_mid=-1
11298   while :; do
11299     cat >conftest.$ac_ext <<_ACEOF
11300 #line 11300 "configure"
11301 #include "confdefs.h"
11302 $ac_includes_default
11303 int
11304 main ()
11305 {
11306 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11307   ;
11308   return 0;
11309 }
11310 _ACEOF
11311 rm -f conftest.$ac_objext
11312 if { (eval echo "$as_me:11312: \"$ac_compile\"") >&5
11313   (eval $ac_compile) 2>&5
11314   ac_status=$?
11315   echo "$as_me:11315: \$? = $ac_status" >&5
11316   (exit $ac_status); } &&
11317          { ac_try='test -s conftest.$ac_objext'
11318   { (eval echo "$as_me:11318: \"$ac_try\"") >&5
11319   (eval $ac_try) 2>&5
11320   ac_status=$?
11321   echo "$as_me:11321: \$? = $ac_status" >&5
11322   (exit $ac_status); }; }; then
11323   ac_lo=$ac_mid; break
11324 else
11325   echo "$as_me: failed program was:" >&5
11326 cat conftest.$ac_ext >&5
11327 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11328 fi
11329 rm -f conftest.$ac_objext conftest.$ac_ext
11330   done
11331 fi
11332 rm -f conftest.$ac_objext conftest.$ac_ext
11333 # Binary search between lo and hi bounds.
11334 while test "x$ac_lo" != "x$ac_hi"; do
11335   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11336   cat >conftest.$ac_ext <<_ACEOF
11337 #line 11337 "configure"
11338 #include "confdefs.h"
11339 $ac_includes_default
11340 int
11341 main ()
11342 {
11343 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11344   ;
11345   return 0;
11346 }
11347 _ACEOF
11348 rm -f conftest.$ac_objext
11349 if { (eval echo "$as_me:11349: \"$ac_compile\"") >&5
11350   (eval $ac_compile) 2>&5
11351   ac_status=$?
11352   echo "$as_me:11352: \$? = $ac_status" >&5
11353   (exit $ac_status); } &&
11354          { ac_try='test -s conftest.$ac_objext'
11355   { (eval echo "$as_me:11355: \"$ac_try\"") >&5
11356   (eval $ac_try) 2>&5
11357   ac_status=$?
11358   echo "$as_me:11358: \$? = $ac_status" >&5
11359   (exit $ac_status); }; }; then
11360   ac_hi=$ac_mid
11361 else
11362   echo "$as_me: failed program was:" >&5
11363 cat conftest.$ac_ext >&5
11364 ac_lo=`expr $ac_mid + 1`
11365 fi
11366 rm -f conftest.$ac_objext conftest.$ac_ext
11367 done
11368 ac_cv_sizeof_signed_char=$ac_lo
11369 else
11370   if test "$cross_compiling" = yes; then
11371   { { echo "$as_me:11371: error: cannot run test program while cross compiling" >&5
11372 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11373    { (exit 1); exit 1; }; }
11374 else
11375   cat >conftest.$ac_ext <<_ACEOF
11376 #line 11376 "configure"
11377 #include "confdefs.h"
11378 $ac_includes_default
11379 int
11380 main ()
11381 {
11382 FILE *f = fopen ("conftest.val", "w");
11383 if (!f)
11384   $ac_main_return (1);
11385 fprintf (f, "%d", (sizeof (signed char)));
11386 fclose (f);
11387   ;
11388   return 0;
11389 }
11390 _ACEOF
11391 rm -f conftest$ac_exeext
11392 if { (eval echo "$as_me:11392: \"$ac_link\"") >&5
11393   (eval $ac_link) 2>&5
11394   ac_status=$?
11395   echo "$as_me:11395: \$? = $ac_status" >&5
11396   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11397   { (eval echo "$as_me:11397: \"$ac_try\"") >&5
11398   (eval $ac_try) 2>&5
11399   ac_status=$?
11400   echo "$as_me:11400: \$? = $ac_status" >&5
11401   (exit $ac_status); }; }; then
11402   ac_cv_sizeof_signed_char=`cat conftest.val`
11403 else
11404   echo "$as_me: program exited with status $ac_status" >&5
11405 echo "$as_me: failed program was:" >&5
11406 cat conftest.$ac_ext >&5
11407 fi
11408 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11409 fi
11410 fi
11411 rm -f conftest.val
11412 else
11413   ac_cv_sizeof_signed_char=0
11414 fi
11415 fi
11416 echo "$as_me:11416: result: $ac_cv_sizeof_signed_char" >&5
11417 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11418 cat >>confdefs.h <<EOF
11419 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11420 EOF
11421
11422 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11423         NCURSES_SBOOL="signed char"
11424 else
11425         NCURSES_SBOOL="char"
11426 fi
11427 echo "$as_me:11427: checking if you want to use signed Boolean array in term.h" >&5
11428 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11429
11430 # Check whether --enable-signed-char or --disable-signed-char was given.
11431 if test "${enable_signed_char+set}" = set; then
11432   enableval="$enable_signed_char"
11433   with_signed_char=$enableval
11434 else
11435   with_signed_char=no
11436 fi;
11437 echo "$as_me:11437: result: $with_signed_char" >&5
11438 echo "${ECHO_T}$with_signed_char" >&6
11439 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11440
11441 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11442 echo "$as_me:11442: checking if you want SIGWINCH handler" >&5
11443 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11444
11445 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11446 if test "${enable_sigwinch+set}" = set; then
11447   enableval="$enable_sigwinch"
11448   with_sigwinch=$enableval
11449 else
11450   with_sigwinch=$with_ext_funcs
11451 fi;
11452 echo "$as_me:11452: result: $with_sigwinch" >&5
11453 echo "${ECHO_T}$with_sigwinch" >&6
11454 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11455 #define USE_SIGWINCH 1
11456 EOF
11457
11458 ###   use option --enable-tcap-names to allow user to define new capabilities
11459 echo "$as_me:11459: checking if you want user-definable terminal capabilities like termcap" >&5
11460 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11461
11462 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11463 if test "${enable_tcap_names+set}" = set; then
11464   enableval="$enable_tcap_names"
11465   with_tcap_names=$enableval
11466 else
11467   with_tcap_names=$with_ext_funcs
11468 fi;
11469 echo "$as_me:11469: result: $with_tcap_names" >&5
11470 echo "${ECHO_T}$with_tcap_names" >&6
11471 NCURSES_XNAMES=0
11472 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11473
11474 ###############################################################################
11475 # These options are relatively safe to experiment with.
11476
11477 echo "$as_me:11477: checking if you want all development code" >&5
11478 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11479
11480 # Check whether --with-develop or --without-develop was given.
11481 if test "${with_develop+set}" = set; then
11482   withval="$with_develop"
11483   with_develop=$withval
11484 else
11485   with_develop=no
11486 fi;
11487 echo "$as_me:11487: result: $with_develop" >&5
11488 echo "${ECHO_T}$with_develop" >&6
11489
11490 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11491 echo "$as_me:11491: checking if you want hard-tabs code" >&5
11492 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11493
11494 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11495 if test "${enable_hard_tabs+set}" = set; then
11496   enableval="$enable_hard_tabs"
11497
11498 else
11499   enable_hard_tabs=$with_develop
11500 fi;
11501 echo "$as_me:11501: result: $enable_hard_tabs" >&5
11502 echo "${ECHO_T}$enable_hard_tabs" >&6
11503 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11504 #define USE_HARD_TABS 1
11505 EOF
11506
11507 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11508 echo "$as_me:11508: checking if you want limited support for xmc" >&5
11509 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11510
11511 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11512 if test "${enable_xmc_glitch+set}" = set; then
11513   enableval="$enable_xmc_glitch"
11514
11515 else
11516   enable_xmc_glitch=$with_develop
11517 fi;
11518 echo "$as_me:11518: result: $enable_xmc_glitch" >&5
11519 echo "${ECHO_T}$enable_xmc_glitch" >&6
11520 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11521 #define USE_XMC_SUPPORT 1
11522 EOF
11523
11524 ###############################################################################
11525 # These are just experimental, probably should not be in a package:
11526
11527 echo "$as_me:11527: checking if you do not want to assume colors are white-on-black" >&5
11528 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11529
11530 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11531 if test "${enable_assumed_color+set}" = set; then
11532   enableval="$enable_assumed_color"
11533   with_assumed_color=$enableval
11534 else
11535   with_assumed_color=yes
11536 fi;
11537 echo "$as_me:11537: result: $with_assumed_color" >&5
11538 echo "${ECHO_T}$with_assumed_color" >&6
11539 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11540 #define USE_ASSUMED_COLOR 1
11541 EOF
11542
11543 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11544 echo "$as_me:11544: checking if you want hashmap scrolling-optimization code" >&5
11545 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11546
11547 # Check whether --enable-hashmap or --disable-hashmap was given.
11548 if test "${enable_hashmap+set}" = set; then
11549   enableval="$enable_hashmap"
11550   with_hashmap=$enableval
11551 else
11552   with_hashmap=yes
11553 fi;
11554 echo "$as_me:11554: result: $with_hashmap" >&5
11555 echo "${ECHO_T}$with_hashmap" >&6
11556 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11557 #define USE_HASHMAP 1
11558 EOF
11559
11560 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11561 echo "$as_me:11561: checking if you want colorfgbg code" >&5
11562 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11563
11564 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11565 if test "${enable_colorfgbg+set}" = set; then
11566   enableval="$enable_colorfgbg"
11567   with_colorfgbg=$enableval
11568 else
11569   with_colorfgbg=no
11570 fi;
11571 echo "$as_me:11571: result: $with_colorfgbg" >&5
11572 echo "${ECHO_T}$with_colorfgbg" >&6
11573 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11574 #define USE_COLORFGBG 1
11575 EOF
11576
11577 ###   use option --enable-interop to turn on use of bindings used for interop
11578 echo "$as_me:11578: checking if you want interop bindings" >&5
11579 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11580
11581 # Check whether --enable-interop or --disable-interop was given.
11582 if test "${enable_interop+set}" = set; then
11583   enableval="$enable_interop"
11584   with_exp_interop=$enableval
11585 else
11586   with_exp_interop=no
11587 fi;
11588 echo "$as_me:11588: result: $with_exp_interop" >&5
11589 echo "${ECHO_T}$with_exp_interop" >&6
11590
11591 NCURSES_INTEROP_FUNCS=0
11592 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11593
11594 # This is still experimental (20080329), but should ultimately be moved to
11595 # the script-block --with-normal, etc.
11596
11597 echo "$as_me:11597: checking if you want to link with the pthread library" >&5
11598 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11599
11600 # Check whether --with-pthread or --without-pthread was given.
11601 if test "${with_pthread+set}" = set; then
11602   withval="$with_pthread"
11603   with_pthread=$withval
11604 else
11605   with_pthread=no
11606 fi;
11607 echo "$as_me:11607: result: $with_pthread" >&5
11608 echo "${ECHO_T}$with_pthread" >&6
11609
11610 if test "$with_pthread" != no ; then
11611     echo "$as_me:11611: checking for pthread.h" >&5
11612 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11613 if test "${ac_cv_header_pthread_h+set}" = set; then
11614   echo $ECHO_N "(cached) $ECHO_C" >&6
11615 else
11616   cat >conftest.$ac_ext <<_ACEOF
11617 #line 11617 "configure"
11618 #include "confdefs.h"
11619 #include <pthread.h>
11620 _ACEOF
11621 if { (eval echo "$as_me:11621: \"$ac_cpp conftest.$ac_ext\"") >&5
11622   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11623   ac_status=$?
11624   egrep -v '^ *\+' conftest.er1 >conftest.err
11625   rm -f conftest.er1
11626   cat conftest.err >&5
11627   echo "$as_me:11627: \$? = $ac_status" >&5
11628   (exit $ac_status); } >/dev/null; then
11629   if test -s conftest.err; then
11630     ac_cpp_err=$ac_c_preproc_warn_flag
11631   else
11632     ac_cpp_err=
11633   fi
11634 else
11635   ac_cpp_err=yes
11636 fi
11637 if test -z "$ac_cpp_err"; then
11638   ac_cv_header_pthread_h=yes
11639 else
11640   echo "$as_me: failed program was:" >&5
11641   cat conftest.$ac_ext >&5
11642   ac_cv_header_pthread_h=no
11643 fi
11644 rm -f conftest.err conftest.$ac_ext
11645 fi
11646 echo "$as_me:11646: result: $ac_cv_header_pthread_h" >&5
11647 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11648 if test $ac_cv_header_pthread_h = yes; then
11649
11650         cat >>confdefs.h <<\EOF
11651 #define HAVE_PTHREADS_H 1
11652 EOF
11653
11654         for cf_lib_pthread in pthread c_r
11655         do
11656             echo "$as_me:11656: checking if we can link with the $cf_lib_pthread library" >&5
11657 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11658             cf_save_LIBS="$LIBS"
11659             LIBS="-l$cf_lib_pthread $LIBS"
11660             cat >conftest.$ac_ext <<_ACEOF
11661 #line 11661 "configure"
11662 #include "confdefs.h"
11663
11664 #include <pthread.h>
11665
11666 int
11667 main ()
11668 {
11669
11670                 int rc = pthread_create(0,0,0,0);
11671                 int r2 = pthread_mutexattr_settype(0, 0);
11672
11673   ;
11674   return 0;
11675 }
11676 _ACEOF
11677 rm -f conftest.$ac_objext conftest$ac_exeext
11678 if { (eval echo "$as_me:11678: \"$ac_link\"") >&5
11679   (eval $ac_link) 2>&5
11680   ac_status=$?
11681   echo "$as_me:11681: \$? = $ac_status" >&5
11682   (exit $ac_status); } &&
11683          { ac_try='test -s conftest$ac_exeext'
11684   { (eval echo "$as_me:11684: \"$ac_try\"") >&5
11685   (eval $ac_try) 2>&5
11686   ac_status=$?
11687   echo "$as_me:11687: \$? = $ac_status" >&5
11688   (exit $ac_status); }; }; then
11689   with_pthread=yes
11690 else
11691   echo "$as_me: failed program was:" >&5
11692 cat conftest.$ac_ext >&5
11693 with_pthread=no
11694 fi
11695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11696             LIBS="$cf_save_LIBS"
11697             echo "$as_me:11697: result: $with_pthread" >&5
11698 echo "${ECHO_T}$with_pthread" >&6
11699             test "$with_pthread" = yes && break
11700         done
11701
11702         if test "$with_pthread" = yes ; then
11703             LIBS="-l$cf_lib_pthread $LIBS"
11704             cat >>confdefs.h <<\EOF
11705 #define HAVE_LIBPTHREADS 1
11706 EOF
11707
11708         else
11709             { { echo "$as_me:11709: error: Cannot link with pthread library" >&5
11710 echo "$as_me: error: Cannot link with pthread library" >&2;}
11711    { (exit 1); exit 1; }; }
11712         fi
11713
11714 fi
11715
11716 fi
11717
11718 if test "x$with_pthread" != xno; then
11719         echo "$as_me:11719: checking for pthread_kill" >&5
11720 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11721 if test "${ac_cv_func_pthread_kill+set}" = set; then
11722   echo $ECHO_N "(cached) $ECHO_C" >&6
11723 else
11724   cat >conftest.$ac_ext <<_ACEOF
11725 #line 11725 "configure"
11726 #include "confdefs.h"
11727 /* System header to define __stub macros and hopefully few prototypes,
11728     which can conflict with char pthread_kill (); below.  */
11729 #include <assert.h>
11730 /* Override any gcc2 internal prototype to avoid an error.  */
11731 #ifdef __cplusplus
11732 extern "C"
11733 #endif
11734 /* We use char because int might match the return type of a gcc2
11735    builtin and then its argument prototype would still apply.  */
11736 char pthread_kill ();
11737 char (*f) ();
11738
11739 int
11740 main ()
11741 {
11742 /* The GNU C library defines this for functions which it implements
11743     to always fail with ENOSYS.  Some functions are actually named
11744     something starting with __ and the normal name is an alias.  */
11745 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11746 choke me
11747 #else
11748 f = pthread_kill;
11749 #endif
11750
11751   ;
11752   return 0;
11753 }
11754 _ACEOF
11755 rm -f conftest.$ac_objext conftest$ac_exeext
11756 if { (eval echo "$as_me:11756: \"$ac_link\"") >&5
11757   (eval $ac_link) 2>&5
11758   ac_status=$?
11759   echo "$as_me:11759: \$? = $ac_status" >&5
11760   (exit $ac_status); } &&
11761          { ac_try='test -s conftest$ac_exeext'
11762   { (eval echo "$as_me:11762: \"$ac_try\"") >&5
11763   (eval $ac_try) 2>&5
11764   ac_status=$?
11765   echo "$as_me:11765: \$? = $ac_status" >&5
11766   (exit $ac_status); }; }; then
11767   ac_cv_func_pthread_kill=yes
11768 else
11769   echo "$as_me: failed program was:" >&5
11770 cat conftest.$ac_ext >&5
11771 ac_cv_func_pthread_kill=no
11772 fi
11773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11774 fi
11775 echo "$as_me:11775: result: $ac_cv_func_pthread_kill" >&5
11776 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11777 if test $ac_cv_func_pthread_kill = yes; then
11778
11779                 echo "$as_me:11779: checking if you want to allow EINTR in wgetch with pthreads" >&5
11780 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11781
11782 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11783 if test "${enable_pthreads_eintr+set}" = set; then
11784   enableval="$enable_pthreads_eintr"
11785   use_pthreads_eintr=$enableval
11786 else
11787   use_pthreads_eintr=no
11788 fi;
11789                 echo "$as_me:11789: result: $use_pthreads_eintr" >&5
11790 echo "${ECHO_T}$use_pthreads_eintr" >&6
11791                 if test $use_pthreads_eintr = yes ; then
11792                         cat >>confdefs.h <<\EOF
11793 #define USE_PTHREADS_EINTR 1
11794 EOF
11795
11796                 fi
11797 fi
11798
11799         echo "$as_me:11799: checking if you want to use weak-symbols for pthreads" >&5
11800 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11801
11802 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11803 if test "${enable_weak_symbols+set}" = set; then
11804   enableval="$enable_weak_symbols"
11805   use_weak_symbols=$enableval
11806 else
11807   use_weak_symbols=no
11808 fi;
11809         echo "$as_me:11809: result: $use_weak_symbols" >&5
11810 echo "${ECHO_T}$use_weak_symbols" >&6
11811         if test "$use_weak_symbols" = yes ; then
11812
11813 echo "$as_me:11813: checking if $CC supports weak symbols" >&5
11814 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11815 if test "${cf_cv_weak_symbols+set}" = set; then
11816   echo $ECHO_N "(cached) $ECHO_C" >&6
11817 else
11818
11819 cat >conftest.$ac_ext <<_ACEOF
11820 #line 11820 "configure"
11821 #include "confdefs.h"
11822
11823 #include <stdio.h>
11824 int
11825 main ()
11826 {
11827
11828 #if defined(__GNUC__)
11829 #  if defined __USE_ISOC99
11830 #    define _cat_pragma(exp)    _Pragma(#exp)
11831 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11832 #  else
11833 #    define _weak_pragma(exp)
11834 #  endif
11835 #  define _declare(name)        __extension__ extern __typeof__(name) name
11836 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11837 #endif
11838
11839 weak_symbol(fopen);
11840
11841   ;
11842   return 0;
11843 }
11844 _ACEOF
11845 rm -f conftest.$ac_objext
11846 if { (eval echo "$as_me:11846: \"$ac_compile\"") >&5
11847   (eval $ac_compile) 2>&5
11848   ac_status=$?
11849   echo "$as_me:11849: \$? = $ac_status" >&5
11850   (exit $ac_status); } &&
11851          { ac_try='test -s conftest.$ac_objext'
11852   { (eval echo "$as_me:11852: \"$ac_try\"") >&5
11853   (eval $ac_try) 2>&5
11854   ac_status=$?
11855   echo "$as_me:11855: \$? = $ac_status" >&5
11856   (exit $ac_status); }; }; then
11857   cf_cv_weak_symbols=yes
11858 else
11859   echo "$as_me: failed program was:" >&5
11860 cat conftest.$ac_ext >&5
11861 cf_cv_weak_symbols=no
11862 fi
11863 rm -f conftest.$ac_objext conftest.$ac_ext
11864
11865 fi
11866 echo "$as_me:11866: result: $cf_cv_weak_symbols" >&5
11867 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11868
11869         else
11870                 cf_cv_weak_symbols=no
11871         fi
11872
11873         if test $cf_cv_weak_symbols = yes ; then
11874                 cat >>confdefs.h <<\EOF
11875 #define USE_WEAK_SYMBOLS 1
11876 EOF
11877
11878         fi
11879 fi
11880
11881 PTHREAD=
11882 if test "$with_pthread" = "yes" ; then
11883     cat >>confdefs.h <<\EOF
11884 #define USE_PTHREADS 1
11885 EOF
11886
11887     enable_reentrant=yes
11888     if test $cf_cv_weak_symbols = yes ; then
11889         PTHREAD=-lpthread
11890     fi
11891 fi
11892
11893 # Reentrant code has to be opaque; there's little advantage to making ncurses
11894 # opaque outside of that, so there is no --enable-opaque option.  We can use
11895 # this option without --with-pthreads, but this will be always set for
11896 # pthreads.
11897 echo "$as_me:11897: checking if you want experimental reentrant code" >&5
11898 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11899
11900 # Check whether --enable-reentrant or --disable-reentrant was given.
11901 if test "${enable_reentrant+set}" = set; then
11902   enableval="$enable_reentrant"
11903   with_reentrant=$enableval
11904 else
11905   with_reentrant=no
11906 fi;
11907 echo "$as_me:11907: result: $with_reentrant" >&5
11908 echo "${ECHO_T}$with_reentrant" >&6
11909 if test "$with_reentrant" = yes ; then
11910         cf_cv_enable_reentrant=1
11911         cf_cv_enable_opaque="NCURSES_INTERNALS"
11912         NCURSES_OPAQUE=1
11913         NCURSES_SIZE_T=int
11914         if test $cf_cv_weak_symbols = yes ; then
11915
11916 # remove pthread library from $LIBS
11917 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11918
11919                 TEST_LIBS="-lpthread $TEST_LIBS"
11920                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11921         else
11922                 LIB_SUFFIX="t${LIB_SUFFIX}"
11923         fi
11924         cat >>confdefs.h <<\EOF
11925 #define USE_REENTRANT 1
11926 EOF
11927
11928 if test "${with_abi_version+set}" != set; then
11929         case $cf_cv_rel_version in
11930         5.*)
11931                 cf_cv_rel_version=6.0
11932                 cf_cv_abi_version=6
11933                 { echo "$as_me:11933: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11934 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11935                 ;;
11936         esac
11937 fi
11938
11939 else
11940         cf_cv_enable_reentrant=0
11941         cf_cv_enable_opaque="NCURSES_OPAQUE"
11942         NCURSES_OPAQUE=0
11943         NCURSES_SIZE_T=short
11944 fi
11945
11946 ### Allow using a different wrap-prefix
11947 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11948         echo "$as_me:11948: checking for prefix used to wrap public variables" >&5
11949 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11950
11951 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11952 if test "${with_wrap_prefix+set}" = set; then
11953   withval="$with_wrap_prefix"
11954   NCURSES_WRAP_PREFIX=$withval
11955 else
11956   NCURSES_WRAP_PREFIX=_nc_
11957 fi;
11958         echo "$as_me:11958: result: $NCURSES_WRAP_PREFIX" >&5
11959 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11960 else
11961         NCURSES_WRAP_PREFIX=_nc_
11962 fi
11963
11964 cat >>confdefs.h <<EOF
11965 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11966 EOF
11967
11968 echo "$as_me:11968: checking if you want experimental safe-sprintf code" >&5
11969 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11970
11971 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11972 if test "${enable_safe_sprintf+set}" = set; then
11973   enableval="$enable_safe_sprintf"
11974   with_safe_sprintf=$enableval
11975 else
11976   with_safe_sprintf=no
11977 fi;
11978 echo "$as_me:11978: result: $with_safe_sprintf" >&5
11979 echo "${ECHO_T}$with_safe_sprintf" >&6
11980 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11981 #define USE_SAFE_SPRINTF 1
11982 EOF
11983
11984 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11985 # when hashmap is used scroll hints are useless
11986 if test "$with_hashmap" = no ; then
11987 echo "$as_me:11987: checking if you want to experiment without scrolling-hints code" >&5
11988 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11989
11990 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11991 if test "${enable_scroll_hints+set}" = set; then
11992   enableval="$enable_scroll_hints"
11993   with_scroll_hints=$enableval
11994 else
11995   with_scroll_hints=yes
11996 fi;
11997 echo "$as_me:11997: result: $with_scroll_hints" >&5
11998 echo "${ECHO_T}$with_scroll_hints" >&6
11999 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
12000 #define USE_SCROLL_HINTS 1
12001 EOF
12002
12003 fi
12004
12005 echo "$as_me:12005: checking if you want experimental wgetch-events code" >&5
12006 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12007
12008 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12009 if test "${enable_wgetch_events+set}" = set; then
12010   enableval="$enable_wgetch_events"
12011   with_wgetch_events=$enableval
12012 else
12013   with_wgetch_events=no
12014 fi;
12015 echo "$as_me:12015: result: $with_wgetch_events" >&5
12016 echo "${ECHO_T}$with_wgetch_events" >&6
12017 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
12018 #define NCURSES_WGETCH_EVENTS 1
12019 EOF
12020
12021 ###############################################################################
12022
12023 ###     use option --disable-echo to suppress full display compiling commands
12024 echo "$as_me:12024: checking if you want to display full commands during build" >&5
12025 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
12026
12027 # Check whether --enable-echo or --disable-echo was given.
12028 if test "${enable_echo+set}" = set; then
12029   enableval="$enable_echo"
12030   with_echo=$enableval
12031 else
12032   with_echo=yes
12033 fi;
12034 if test "$with_echo" = yes; then
12035         ECHO_LINK=
12036 else
12037         ECHO_LINK='@ echo linking $@ ... ;'
12038         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12039         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12040 fi
12041 echo "$as_me:12041: result: $with_echo" >&5
12042 echo "${ECHO_T}$with_echo" >&6
12043
12044 ###     use option --enable-warnings to turn on all gcc warnings
12045 echo "$as_me:12045: checking if you want to see compiler warnings" >&5
12046 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12047
12048 # Check whether --enable-warnings or --disable-warnings was given.
12049 if test "${enable_warnings+set}" = set; then
12050   enableval="$enable_warnings"
12051   with_warnings=$enableval
12052 fi;
12053 echo "$as_me:12053: result: $with_warnings" >&5
12054 echo "${ECHO_T}$with_warnings" >&6
12055
12056 if test "x$with_warnings" = "xyes"; then
12057
12058         ADAFLAGS="$ADAFLAGS -gnatg"
12059
12060 INTEL_COMPILER=no
12061
12062 if test "$GCC" = yes ; then
12063         case $host_os in
12064         linux*|gnu*)
12065                 echo "$as_me:12065: checking if this is really Intel C compiler" >&5
12066 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12067                 cf_save_CFLAGS="$CFLAGS"
12068                 CFLAGS="$CFLAGS -no-gcc"
12069                 cat >conftest.$ac_ext <<_ACEOF
12070 #line 12070 "configure"
12071 #include "confdefs.h"
12072
12073 int
12074 main ()
12075 {
12076
12077 #ifdef __INTEL_COMPILER
12078 #else
12079 make an error
12080 #endif
12081
12082   ;
12083   return 0;
12084 }
12085 _ACEOF
12086 rm -f conftest.$ac_objext
12087 if { (eval echo "$as_me:12087: \"$ac_compile\"") >&5
12088   (eval $ac_compile) 2>&5
12089   ac_status=$?
12090   echo "$as_me:12090: \$? = $ac_status" >&5
12091   (exit $ac_status); } &&
12092          { ac_try='test -s conftest.$ac_objext'
12093   { (eval echo "$as_me:12093: \"$ac_try\"") >&5
12094   (eval $ac_try) 2>&5
12095   ac_status=$?
12096   echo "$as_me:12096: \$? = $ac_status" >&5
12097   (exit $ac_status); }; }; then
12098   INTEL_COMPILER=yes
12099 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12100
12101 else
12102   echo "$as_me: failed program was:" >&5
12103 cat conftest.$ac_ext >&5
12104 fi
12105 rm -f conftest.$ac_objext conftest.$ac_ext
12106                 CFLAGS="$cf_save_CFLAGS"
12107                 echo "$as_me:12107: result: $INTEL_COMPILER" >&5
12108 echo "${ECHO_T}$INTEL_COMPILER" >&6
12109                 ;;
12110         esac
12111 fi
12112
12113 cat > conftest.$ac_ext <<EOF
12114 #line 12114 "${as_me:-configure}"
12115 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12116 EOF
12117
12118 if test "$INTEL_COMPILER" = yes
12119 then
12120 # The "-wdXXX" options suppress warnings:
12121 # remark #1419: external declaration in primary source file
12122 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12123 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12124 # remark #193: zero used for undefined preprocessing identifier
12125 # remark #593: variable "curs_sb_left_arrow" was set but never used
12126 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12127 # remark #869: parameter "tw" was never referenced
12128 # remark #981: operands are evaluated in unspecified order
12129 # warning #279: controlling expression is constant
12130
12131         { echo "$as_me:12131: checking for $CC warning options..." >&5
12132 echo "$as_me: checking for $CC warning options..." >&6;}
12133         cf_save_CFLAGS="$CFLAGS"
12134         EXTRA_CFLAGS="-Wall"
12135         for cf_opt in \
12136                 wd1419 \
12137                 wd1683 \
12138                 wd1684 \
12139                 wd193 \
12140                 wd593 \
12141                 wd279 \
12142                 wd810 \
12143                 wd869 \
12144                 wd981
12145         do
12146                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12147                 if { (eval echo "$as_me:12147: \"$ac_compile\"") >&5
12148   (eval $ac_compile) 2>&5
12149   ac_status=$?
12150   echo "$as_me:12150: \$? = $ac_status" >&5
12151   (exit $ac_status); }; then
12152                         test -n "$verbose" && echo "$as_me:12152: result: ... -$cf_opt" >&5
12153 echo "${ECHO_T}... -$cf_opt" >&6
12154                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12155                 fi
12156         done
12157         CFLAGS="$cf_save_CFLAGS"
12158
12159 elif test "$GCC" = yes
12160 then
12161         { echo "$as_me:12161: checking for $CC warning options..." >&5
12162 echo "$as_me: checking for $CC warning options..." >&6;}
12163         cf_save_CFLAGS="$CFLAGS"
12164         EXTRA_CFLAGS=
12165         cf_warn_CONST=""
12166         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12167         for cf_opt in W Wall \
12168                 Wbad-function-cast \
12169                 Wcast-align \
12170                 Wcast-qual \
12171                 Winline \
12172                 Wmissing-declarations \
12173                 Wmissing-prototypes \
12174                 Wnested-externs \
12175                 Wpointer-arith \
12176                 Wshadow \
12177                 Wstrict-prototypes \
12178                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12179         do
12180                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12181                 if { (eval echo "$as_me:12181: \"$ac_compile\"") >&5
12182   (eval $ac_compile) 2>&5
12183   ac_status=$?
12184   echo "$as_me:12184: \$? = $ac_status" >&5
12185   (exit $ac_status); }; then
12186                         test -n "$verbose" && echo "$as_me:12186: result: ... -$cf_opt" >&5
12187 echo "${ECHO_T}... -$cf_opt" >&6
12188                         case $cf_opt in #(vi
12189                         Wcast-qual) #(vi
12190                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12191                                 ;;
12192                         Winline) #(vi
12193                                 case $GCC_VERSION in
12194                                 [34].*)
12195                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12196
12197 echo "${as_me:-configure}:12197: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12198
12199                                         continue;;
12200                                 esac
12201                                 ;;
12202                         esac
12203                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12204                 fi
12205         done
12206         CFLAGS="$cf_save_CFLAGS"
12207 fi
12208 rm -rf conftest*
12209
12210         if test "$cf_with_cxx" = yes ; then
12211
12212 INTEL_CPLUSPLUS=no
12213
12214 if test "$GCC" = yes ; then
12215         case $host_os in
12216         linux*|gnu*)
12217                 echo "$as_me:12217: checking if this is really Intel C++ compiler" >&5
12218 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12219                 cf_save_CFLAGS="$CXXFLAGS"
12220                 CXXFLAGS="$CXXFLAGS -no-gcc"
12221                 cat >conftest.$ac_ext <<_ACEOF
12222 #line 12222 "configure"
12223 #include "confdefs.h"
12224
12225 int
12226 main ()
12227 {
12228
12229 #ifdef __INTEL_COMPILER
12230 #else
12231 make an error
12232 #endif
12233
12234   ;
12235   return 0;
12236 }
12237 _ACEOF
12238 rm -f conftest.$ac_objext
12239 if { (eval echo "$as_me:12239: \"$ac_compile\"") >&5
12240   (eval $ac_compile) 2>&5
12241   ac_status=$?
12242   echo "$as_me:12242: \$? = $ac_status" >&5
12243   (exit $ac_status); } &&
12244          { ac_try='test -s conftest.$ac_objext'
12245   { (eval echo "$as_me:12245: \"$ac_try\"") >&5
12246   (eval $ac_try) 2>&5
12247   ac_status=$?
12248   echo "$as_me:12248: \$? = $ac_status" >&5
12249   (exit $ac_status); }; }; then
12250   INTEL_CPLUSPLUS=yes
12251 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12252
12253 else
12254   echo "$as_me: failed program was:" >&5
12255 cat conftest.$ac_ext >&5
12256 fi
12257 rm -f conftest.$ac_objext conftest.$ac_ext
12258                 CXXFLAGS="$cf_save_CFLAGS"
12259                 echo "$as_me:12259: result: $INTEL_CPLUSPLUS" >&5
12260 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12261                 ;;
12262         esac
12263 fi
12264
12265 ac_ext=cc
12266 ac_cpp='$CXXCPP $CPPFLAGS'
12267 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12268 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12269 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12270 ac_main_return=return
12271
12272 cat > conftest.$ac_ext <<EOF
12273 #line 12273 "configure"
12274 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12275 EOF
12276
12277 if test "$INTEL_CPLUSPLUS" = yes
12278 then
12279 # The "-wdXXX" options suppress warnings:
12280 # remark #1419: external declaration in primary source file
12281 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12282 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12283 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12284 # remark #193: zero used for undefined preprocessing identifier
12285 # remark #593: variable "curs_sb_left_arrow" was set but never used
12286 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12287 # remark #869: parameter "tw" was never referenced
12288 # remark #981: operands are evaluated in unspecified order
12289 # warning #269: invalid format string conversion
12290
12291         { echo "$as_me:12291: checking for $CC warning options..." >&5
12292 echo "$as_me: checking for $CC warning options..." >&6;}
12293         cf_save_CXXFLAGS="$CXXFLAGS"
12294         EXTRA_CXXFLAGS="-Wall"
12295         for cf_opt in \
12296                 wd1419 \
12297                 wd1682 \
12298                 wd1683 \
12299                 wd1684 \
12300                 wd193 \
12301                 wd279 \
12302                 wd593 \
12303                 wd810 \
12304                 wd869 \
12305                 wd981
12306         do
12307                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12308                 if { (eval echo "$as_me:12308: \"$ac_compile\"") >&5
12309   (eval $ac_compile) 2>&5
12310   ac_status=$?
12311   echo "$as_me:12311: \$? = $ac_status" >&5
12312   (exit $ac_status); }; then
12313                         test -n "$verbose" && echo "$as_me:12313: result: ... -$cf_opt" >&5
12314 echo "${ECHO_T}... -$cf_opt" >&6
12315                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12316                 fi
12317         done
12318         CXXFLAGS="$cf_save_CXXFLAGS"
12319
12320 elif test "$GXX" = yes
12321 then
12322         { echo "$as_me:12322: checking for $CXX warning options..." >&5
12323 echo "$as_me: checking for $CXX warning options..." >&6;}
12324         cf_save_CXXFLAGS="$CXXFLAGS"
12325         EXTRA_CXXFLAGS="-W -Wall"
12326         cf_gxx_extra_warnings=""
12327         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12328         case "$GCC_VERSION" in
12329         [1-2].*)
12330                 ;;
12331         *)
12332                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12333                 ;;
12334         esac
12335         for cf_opt in \
12336                 Wabi \
12337                 fabi-version=0 \
12338                 Woverloaded-virtual \
12339                 Wsign-promo \
12340                 Wsynth \
12341                 Wold-style-cast \
12342                 Wcast-align \
12343                 Wcast-qual \
12344                 Wmissing-prototypes \
12345                 Wpointer-arith \
12346                 Wshadow \
12347                 Wstrict-prototypes \
12348                 Wundef $cf_gxx_extra_warnings Wno-unused
12349         do
12350                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12351                 if { (eval echo "$as_me:12351: \"$ac_compile\"") >&5
12352   (eval $ac_compile) 2>&5
12353   ac_status=$?
12354   echo "$as_me:12354: \$? = $ac_status" >&5
12355   (exit $ac_status); }; then
12356                         test -n "$verbose" && echo "$as_me:12356: result: ... -$cf_opt" >&5
12357 echo "${ECHO_T}... -$cf_opt" >&6
12358                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12359                 else
12360                         test -n "$verbose" && echo "$as_me:12360: result: ... no -$cf_opt" >&5
12361 echo "${ECHO_T}... no -$cf_opt" >&6
12362                 fi
12363         done
12364         CXXFLAGS="$cf_save_CXXFLAGS"
12365 fi
12366
12367 rm -rf conftest*
12368 ac_ext=c
12369 ac_cpp='$CPP $CPPFLAGS'
12370 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12371 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12372 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12373 ac_main_return=return
12374
12375         fi
12376 fi
12377
12378 if test "$GCC" = yes
12379 then
12380 cat > conftest.i <<EOF
12381 #ifndef GCC_PRINTF
12382 #define GCC_PRINTF 0
12383 #endif
12384 #ifndef GCC_SCANF
12385 #define GCC_SCANF 0
12386 #endif
12387 #ifndef GCC_NORETURN
12388 #define GCC_NORETURN /* nothing */
12389 #endif
12390 #ifndef GCC_UNUSED
12391 #define GCC_UNUSED /* nothing */
12392 #endif
12393 EOF
12394 if test "$GCC" = yes
12395 then
12396         { echo "$as_me:12396: checking for $CC __attribute__ directives..." >&5
12397 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12398 cat > conftest.$ac_ext <<EOF
12399 #line 12399 "${as_me:-configure}"
12400 #include "confdefs.h"
12401 #include "conftest.h"
12402 #include "conftest.i"
12403 #if     GCC_PRINTF
12404 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12405 #else
12406 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12407 #endif
12408 #if     GCC_SCANF
12409 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12410 #else
12411 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12412 #endif
12413 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12414 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12415 extern void foo(void) GCC_NORETURN;
12416 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12417 EOF
12418         cf_printf_attribute=no
12419         cf_scanf_attribute=no
12420         for cf_attribute in scanf printf unused noreturn
12421         do
12422
12423 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12424
12425                 cf_directive="__attribute__(($cf_attribute))"
12426                 echo "checking for $CC $cf_directive" 1>&5
12427
12428                 case $cf_attribute in #(vi
12429                 printf) #(vi
12430                         cf_printf_attribute=yes
12431                         cat >conftest.h <<EOF
12432 #define GCC_$cf_ATTRIBUTE 1
12433 EOF
12434                         ;;
12435                 scanf) #(vi
12436                         cf_scanf_attribute=yes
12437                         cat >conftest.h <<EOF
12438 #define GCC_$cf_ATTRIBUTE 1
12439 EOF
12440                         ;;
12441                 *) #(vi
12442                         cat >conftest.h <<EOF
12443 #define GCC_$cf_ATTRIBUTE $cf_directive
12444 EOF
12445                         ;;
12446                 esac
12447
12448                 if { (eval echo "$as_me:12448: \"$ac_compile\"") >&5
12449   (eval $ac_compile) 2>&5
12450   ac_status=$?
12451   echo "$as_me:12451: \$? = $ac_status" >&5
12452   (exit $ac_status); }; then
12453                         test -n "$verbose" && echo "$as_me:12453: result: ... $cf_attribute" >&5
12454 echo "${ECHO_T}... $cf_attribute" >&6
12455                         cat conftest.h >>confdefs.h
12456                         case $cf_attribute in #(vi
12457                         printf) #(vi
12458                                 if test "$cf_printf_attribute" = no ; then
12459                                         cat >>confdefs.h <<EOF
12460 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12461 EOF
12462                                 else
12463                                         cat >>confdefs.h <<EOF
12464 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12465 EOF
12466                                 fi
12467                                 ;;
12468                         scanf) #(vi
12469                                 if test "$cf_scanf_attribute" = no ; then
12470                                         cat >>confdefs.h <<EOF
12471 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12472 EOF
12473                                 else
12474                                         cat >>confdefs.h <<EOF
12475 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12476 EOF
12477                                 fi
12478                                 ;;
12479                         esac
12480                 fi
12481         done
12482 else
12483         fgrep define conftest.i >>confdefs.h
12484 fi
12485 rm -rf conftest*
12486 fi
12487
12488 ###     use option --enable-assertions to turn on generation of assertion code
12489 echo "$as_me:12489: checking if you want to enable runtime assertions" >&5
12490 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12491
12492 # Check whether --enable-assertions or --disable-assertions was given.
12493 if test "${enable_assertions+set}" = set; then
12494   enableval="$enable_assertions"
12495   with_assertions=$enableval
12496 else
12497   with_assertions=no
12498 fi;
12499 echo "$as_me:12499: result: $with_assertions" >&5
12500 echo "${ECHO_T}$with_assertions" >&6
12501 if test -n "$GCC"
12502 then
12503         if test "$with_assertions" = no
12504         then
12505                 cat >>confdefs.h <<\EOF
12506 #define NDEBUG 1
12507 EOF
12508
12509                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12510         else
12511
12512         ADAFLAGS="$ADAFLAGS -gnata"
12513
12514         fi
12515 fi
12516
12517 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12518
12519 echo "$as_me:12519: checking if you want to use dmalloc for testing" >&5
12520 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12521
12522 # Check whether --with-dmalloc or --without-dmalloc was given.
12523 if test "${with_dmalloc+set}" = set; then
12524   withval="$with_dmalloc"
12525   cat >>confdefs.h <<\EOF
12526 #define USE_DMALLOC 1
12527 EOF
12528
12529         : ${with_cflags:=-g}
12530         : ${with_no_leaks:=yes}
12531          with_dmalloc=yes
12532 else
12533   with_dmalloc=
12534 fi;
12535 echo "$as_me:12535: result: ${with_dmalloc:-no}" >&5
12536 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12537
12538 case .$with_cflags in #(vi
12539 .*-g*)
12540         case .$CFLAGS in #(vi
12541         .*-g*) #(vi
12542                 ;;
12543         *)
12544
12545 cf_fix_cppflags=no
12546 cf_new_cflags=
12547 cf_new_cppflags=
12548 cf_new_extra_cppflags=
12549
12550 for cf_add_cflags in -g
12551 do
12552 case $cf_fix_cppflags in
12553 no)
12554         case $cf_add_cflags in #(vi
12555         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12556                 case $cf_add_cflags in
12557                 -D*)
12558                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12559
12560                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12561                                 && test -z "${cf_tst_cflags}" \
12562                                 && cf_fix_cppflags=yes
12563
12564                         if test $cf_fix_cppflags = yes ; then
12565                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12566                                 continue
12567                         elif test "${cf_tst_cflags}" = "\"'" ; then
12568                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12569                                 continue
12570                         fi
12571                         ;;
12572                 esac
12573                 case "$CPPFLAGS" in
12574                 *$cf_add_cflags) #(vi
12575                         ;;
12576                 *) #(vi
12577                         case $cf_add_cflags in #(vi
12578                         -D*)
12579                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12580
12581 CPPFLAGS=`echo "$CPPFLAGS" | \
12582         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12583                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12584
12585                                 ;;
12586                         esac
12587                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12588                         ;;
12589                 esac
12590                 ;;
12591         *)
12592                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12593                 ;;
12594         esac
12595         ;;
12596 yes)
12597         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12598
12599         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12600
12601         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12602                 && test -z "${cf_tst_cflags}" \
12603                 && cf_fix_cppflags=no
12604         ;;
12605 esac
12606 done
12607
12608 if test -n "$cf_new_cflags" ; then
12609
12610         CFLAGS="$CFLAGS $cf_new_cflags"
12611 fi
12612
12613 if test -n "$cf_new_cppflags" ; then
12614
12615         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12616 fi
12617
12618 if test -n "$cf_new_extra_cppflags" ; then
12619
12620         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12621 fi
12622
12623                 ;;
12624         esac
12625         ;;
12626 esac
12627
12628 if test "$with_dmalloc" = yes ; then
12629         echo "$as_me:12629: checking for dmalloc.h" >&5
12630 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12631 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12632   echo $ECHO_N "(cached) $ECHO_C" >&6
12633 else
12634   cat >conftest.$ac_ext <<_ACEOF
12635 #line 12635 "configure"
12636 #include "confdefs.h"
12637 #include <dmalloc.h>
12638 _ACEOF
12639 if { (eval echo "$as_me:12639: \"$ac_cpp conftest.$ac_ext\"") >&5
12640   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12641   ac_status=$?
12642   egrep -v '^ *\+' conftest.er1 >conftest.err
12643   rm -f conftest.er1
12644   cat conftest.err >&5
12645   echo "$as_me:12645: \$? = $ac_status" >&5
12646   (exit $ac_status); } >/dev/null; then
12647   if test -s conftest.err; then
12648     ac_cpp_err=$ac_c_preproc_warn_flag
12649   else
12650     ac_cpp_err=
12651   fi
12652 else
12653   ac_cpp_err=yes
12654 fi
12655 if test -z "$ac_cpp_err"; then
12656   ac_cv_header_dmalloc_h=yes
12657 else
12658   echo "$as_me: failed program was:" >&5
12659   cat conftest.$ac_ext >&5
12660   ac_cv_header_dmalloc_h=no
12661 fi
12662 rm -f conftest.err conftest.$ac_ext
12663 fi
12664 echo "$as_me:12664: result: $ac_cv_header_dmalloc_h" >&5
12665 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12666 if test $ac_cv_header_dmalloc_h = yes; then
12667
12668 echo "$as_me:12668: checking for dmalloc_debug in -ldmalloc" >&5
12669 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12670 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12671   echo $ECHO_N "(cached) $ECHO_C" >&6
12672 else
12673   ac_check_lib_save_LIBS=$LIBS
12674 LIBS="-ldmalloc  $LIBS"
12675 cat >conftest.$ac_ext <<_ACEOF
12676 #line 12676 "configure"
12677 #include "confdefs.h"
12678
12679 /* Override any gcc2 internal prototype to avoid an error.  */
12680 #ifdef __cplusplus
12681 extern "C"
12682 #endif
12683 /* We use char because int might match the return type of a gcc2
12684    builtin and then its argument prototype would still apply.  */
12685 char dmalloc_debug ();
12686 int
12687 main ()
12688 {
12689 dmalloc_debug ();
12690   ;
12691   return 0;
12692 }
12693 _ACEOF
12694 rm -f conftest.$ac_objext conftest$ac_exeext
12695 if { (eval echo "$as_me:12695: \"$ac_link\"") >&5
12696   (eval $ac_link) 2>&5
12697   ac_status=$?
12698   echo "$as_me:12698: \$? = $ac_status" >&5
12699   (exit $ac_status); } &&
12700          { ac_try='test -s conftest$ac_exeext'
12701   { (eval echo "$as_me:12701: \"$ac_try\"") >&5
12702   (eval $ac_try) 2>&5
12703   ac_status=$?
12704   echo "$as_me:12704: \$? = $ac_status" >&5
12705   (exit $ac_status); }; }; then
12706   ac_cv_lib_dmalloc_dmalloc_debug=yes
12707 else
12708   echo "$as_me: failed program was:" >&5
12709 cat conftest.$ac_ext >&5
12710 ac_cv_lib_dmalloc_dmalloc_debug=no
12711 fi
12712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12713 LIBS=$ac_check_lib_save_LIBS
12714 fi
12715 echo "$as_me:12715: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12716 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12717 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12718   cat >>confdefs.h <<EOF
12719 #define HAVE_LIBDMALLOC 1
12720 EOF
12721
12722   LIBS="-ldmalloc $LIBS"
12723
12724 fi
12725
12726 fi
12727
12728 fi
12729
12730 echo "$as_me:12730: checking if you want to use dbmalloc for testing" >&5
12731 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12732
12733 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12734 if test "${with_dbmalloc+set}" = set; then
12735   withval="$with_dbmalloc"
12736   cat >>confdefs.h <<\EOF
12737 #define USE_DBMALLOC 1
12738 EOF
12739
12740         : ${with_cflags:=-g}
12741         : ${with_no_leaks:=yes}
12742          with_dbmalloc=yes
12743 else
12744   with_dbmalloc=
12745 fi;
12746 echo "$as_me:12746: result: ${with_dbmalloc:-no}" >&5
12747 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12748
12749 case .$with_cflags in #(vi
12750 .*-g*)
12751         case .$CFLAGS in #(vi
12752         .*-g*) #(vi
12753                 ;;
12754         *)
12755
12756 cf_fix_cppflags=no
12757 cf_new_cflags=
12758 cf_new_cppflags=
12759 cf_new_extra_cppflags=
12760
12761 for cf_add_cflags in -g
12762 do
12763 case $cf_fix_cppflags in
12764 no)
12765         case $cf_add_cflags in #(vi
12766         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12767                 case $cf_add_cflags in
12768                 -D*)
12769                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12770
12771                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12772                                 && test -z "${cf_tst_cflags}" \
12773                                 && cf_fix_cppflags=yes
12774
12775                         if test $cf_fix_cppflags = yes ; then
12776                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12777                                 continue
12778                         elif test "${cf_tst_cflags}" = "\"'" ; then
12779                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12780                                 continue
12781                         fi
12782                         ;;
12783                 esac
12784                 case "$CPPFLAGS" in
12785                 *$cf_add_cflags) #(vi
12786                         ;;
12787                 *) #(vi
12788                         case $cf_add_cflags in #(vi
12789                         -D*)
12790                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12791
12792 CPPFLAGS=`echo "$CPPFLAGS" | \
12793         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12794                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12795
12796                                 ;;
12797                         esac
12798                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12799                         ;;
12800                 esac
12801                 ;;
12802         *)
12803                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12804                 ;;
12805         esac
12806         ;;
12807 yes)
12808         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12809
12810         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12811
12812         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12813                 && test -z "${cf_tst_cflags}" \
12814                 && cf_fix_cppflags=no
12815         ;;
12816 esac
12817 done
12818
12819 if test -n "$cf_new_cflags" ; then
12820
12821         CFLAGS="$CFLAGS $cf_new_cflags"
12822 fi
12823
12824 if test -n "$cf_new_cppflags" ; then
12825
12826         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12827 fi
12828
12829 if test -n "$cf_new_extra_cppflags" ; then
12830
12831         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12832 fi
12833
12834                 ;;
12835         esac
12836         ;;
12837 esac
12838
12839 if test "$with_dbmalloc" = yes ; then
12840         echo "$as_me:12840: checking for dbmalloc.h" >&5
12841 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12842 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12843   echo $ECHO_N "(cached) $ECHO_C" >&6
12844 else
12845   cat >conftest.$ac_ext <<_ACEOF
12846 #line 12846 "configure"
12847 #include "confdefs.h"
12848 #include <dbmalloc.h>
12849 _ACEOF
12850 if { (eval echo "$as_me:12850: \"$ac_cpp conftest.$ac_ext\"") >&5
12851   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12852   ac_status=$?
12853   egrep -v '^ *\+' conftest.er1 >conftest.err
12854   rm -f conftest.er1
12855   cat conftest.err >&5
12856   echo "$as_me:12856: \$? = $ac_status" >&5
12857   (exit $ac_status); } >/dev/null; then
12858   if test -s conftest.err; then
12859     ac_cpp_err=$ac_c_preproc_warn_flag
12860   else
12861     ac_cpp_err=
12862   fi
12863 else
12864   ac_cpp_err=yes
12865 fi
12866 if test -z "$ac_cpp_err"; then
12867   ac_cv_header_dbmalloc_h=yes
12868 else
12869   echo "$as_me: failed program was:" >&5
12870   cat conftest.$ac_ext >&5
12871   ac_cv_header_dbmalloc_h=no
12872 fi
12873 rm -f conftest.err conftest.$ac_ext
12874 fi
12875 echo "$as_me:12875: result: $ac_cv_header_dbmalloc_h" >&5
12876 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12877 if test $ac_cv_header_dbmalloc_h = yes; then
12878
12879 echo "$as_me:12879: checking for debug_malloc in -ldbmalloc" >&5
12880 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12881 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12882   echo $ECHO_N "(cached) $ECHO_C" >&6
12883 else
12884   ac_check_lib_save_LIBS=$LIBS
12885 LIBS="-ldbmalloc  $LIBS"
12886 cat >conftest.$ac_ext <<_ACEOF
12887 #line 12887 "configure"
12888 #include "confdefs.h"
12889
12890 /* Override any gcc2 internal prototype to avoid an error.  */
12891 #ifdef __cplusplus
12892 extern "C"
12893 #endif
12894 /* We use char because int might match the return type of a gcc2
12895    builtin and then its argument prototype would still apply.  */
12896 char debug_malloc ();
12897 int
12898 main ()
12899 {
12900 debug_malloc ();
12901   ;
12902   return 0;
12903 }
12904 _ACEOF
12905 rm -f conftest.$ac_objext conftest$ac_exeext
12906 if { (eval echo "$as_me:12906: \"$ac_link\"") >&5
12907   (eval $ac_link) 2>&5
12908   ac_status=$?
12909   echo "$as_me:12909: \$? = $ac_status" >&5
12910   (exit $ac_status); } &&
12911          { ac_try='test -s conftest$ac_exeext'
12912   { (eval echo "$as_me:12912: \"$ac_try\"") >&5
12913   (eval $ac_try) 2>&5
12914   ac_status=$?
12915   echo "$as_me:12915: \$? = $ac_status" >&5
12916   (exit $ac_status); }; }; then
12917   ac_cv_lib_dbmalloc_debug_malloc=yes
12918 else
12919   echo "$as_me: failed program was:" >&5
12920 cat conftest.$ac_ext >&5
12921 ac_cv_lib_dbmalloc_debug_malloc=no
12922 fi
12923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12924 LIBS=$ac_check_lib_save_LIBS
12925 fi
12926 echo "$as_me:12926: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12927 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12928 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12929   cat >>confdefs.h <<EOF
12930 #define HAVE_LIBDBMALLOC 1
12931 EOF
12932
12933   LIBS="-ldbmalloc $LIBS"
12934
12935 fi
12936
12937 fi
12938
12939 fi
12940
12941 echo "$as_me:12941: checking if you want to use valgrind for testing" >&5
12942 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12943
12944 # Check whether --with-valgrind or --without-valgrind was given.
12945 if test "${with_valgrind+set}" = set; then
12946   withval="$with_valgrind"
12947   cat >>confdefs.h <<\EOF
12948 #define USE_VALGRIND 1
12949 EOF
12950
12951         : ${with_cflags:=-g}
12952         : ${with_no_leaks:=yes}
12953          with_valgrind=yes
12954 else
12955   with_valgrind=
12956 fi;
12957 echo "$as_me:12957: result: ${with_valgrind:-no}" >&5
12958 echo "${ECHO_T}${with_valgrind:-no}" >&6
12959
12960 case .$with_cflags in #(vi
12961 .*-g*)
12962         case .$CFLAGS in #(vi
12963         .*-g*) #(vi
12964                 ;;
12965         *)
12966
12967 cf_fix_cppflags=no
12968 cf_new_cflags=
12969 cf_new_cppflags=
12970 cf_new_extra_cppflags=
12971
12972 for cf_add_cflags in -g
12973 do
12974 case $cf_fix_cppflags in
12975 no)
12976         case $cf_add_cflags in #(vi
12977         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12978                 case $cf_add_cflags in
12979                 -D*)
12980                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12981
12982                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12983                                 && test -z "${cf_tst_cflags}" \
12984                                 && cf_fix_cppflags=yes
12985
12986                         if test $cf_fix_cppflags = yes ; then
12987                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12988                                 continue
12989                         elif test "${cf_tst_cflags}" = "\"'" ; then
12990                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12991                                 continue
12992                         fi
12993                         ;;
12994                 esac
12995                 case "$CPPFLAGS" in
12996                 *$cf_add_cflags) #(vi
12997                         ;;
12998                 *) #(vi
12999                         case $cf_add_cflags in #(vi
13000                         -D*)
13001                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13002
13003 CPPFLAGS=`echo "$CPPFLAGS" | \
13004         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13005                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13006
13007                                 ;;
13008                         esac
13009                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13010                         ;;
13011                 esac
13012                 ;;
13013         *)
13014                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13015                 ;;
13016         esac
13017         ;;
13018 yes)
13019         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13020
13021         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13022
13023         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13024                 && test -z "${cf_tst_cflags}" \
13025                 && cf_fix_cppflags=no
13026         ;;
13027 esac
13028 done
13029
13030 if test -n "$cf_new_cflags" ; then
13031
13032         CFLAGS="$CFLAGS $cf_new_cflags"
13033 fi
13034
13035 if test -n "$cf_new_cppflags" ; then
13036
13037         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13038 fi
13039
13040 if test -n "$cf_new_extra_cppflags" ; then
13041
13042         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13043 fi
13044
13045                 ;;
13046         esac
13047         ;;
13048 esac
13049
13050 echo "$as_me:13050: checking if you want to perform memory-leak testing" >&5
13051 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13052
13053 # Check whether --enable-leaks or --disable-leaks was given.
13054 if test "${enable_leaks+set}" = set; then
13055   enableval="$enable_leaks"
13056   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13057 else
13058   : ${with_no_leaks:=no}
13059 fi;
13060 echo "$as_me:13060: result: $with_no_leaks" >&5
13061 echo "${ECHO_T}$with_no_leaks" >&6
13062
13063 if test "$with_no_leaks" = yes ; then
13064         cat >>confdefs.h <<\EOF
13065 #define NO_LEAKS 1
13066 EOF
13067
13068         cat >>confdefs.h <<\EOF
13069 #define YY_NO_LEAKS 1
13070 EOF
13071
13072 fi
13073
13074 cat >>confdefs.h <<\EOF
13075 #define HAVE_NC_ALLOC_H 1
13076 EOF
13077
13078 ###     use option --enable-expanded to generate certain macros as functions
13079
13080 # Check whether --enable-expanded or --disable-expanded was given.
13081 if test "${enable_expanded+set}" = set; then
13082   enableval="$enable_expanded"
13083   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13084 #define NCURSES_EXPANDED 1
13085 EOF
13086
13087 fi;
13088
13089 ###     use option --disable-macros to suppress macros in favor of functions
13090
13091 # Check whether --enable-macros or --disable-macros was given.
13092 if test "${enable_macros+set}" = set; then
13093   enableval="$enable_macros"
13094   test "$enableval" = no && cat >>confdefs.h <<\EOF
13095 #define NCURSES_NOMACROS 1
13096 EOF
13097
13098 fi;
13099
13100 # Normally we only add trace() to the debug-library.  Allow this to be
13101 # extended to all models of the ncurses library:
13102 cf_all_traces=no
13103 case "$CFLAGS $CPPFLAGS" in
13104 *-DTRACE*)
13105         cf_all_traces=yes
13106         ;;
13107 esac
13108
13109 echo "$as_me:13109: checking whether to add trace feature to all models" >&5
13110 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13111
13112 # Check whether --with-trace or --without-trace was given.
13113 if test "${with_trace+set}" = set; then
13114   withval="$with_trace"
13115   cf_with_trace=$withval
13116 else
13117   cf_with_trace=$cf_all_traces
13118 fi;
13119 echo "$as_me:13119: result: $cf_with_trace" >&5
13120 echo "${ECHO_T}$cf_with_trace" >&6
13121
13122 if test "$cf_with_trace" = yes ; then
13123         LIB_TRACING=all
13124         ADA_TRACE=TRUE
13125
13126 cf_fix_cppflags=no
13127 cf_new_cflags=
13128 cf_new_cppflags=
13129 cf_new_extra_cppflags=
13130
13131 for cf_add_cflags in -DTRACE
13132 do
13133 case $cf_fix_cppflags in
13134 no)
13135         case $cf_add_cflags in #(vi
13136         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13137                 case $cf_add_cflags in
13138                 -D*)
13139                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13140
13141                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13142                                 && test -z "${cf_tst_cflags}" \
13143                                 && cf_fix_cppflags=yes
13144
13145                         if test $cf_fix_cppflags = yes ; then
13146                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13147                                 continue
13148                         elif test "${cf_tst_cflags}" = "\"'" ; then
13149                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13150                                 continue
13151                         fi
13152                         ;;
13153                 esac
13154                 case "$CPPFLAGS" in
13155                 *$cf_add_cflags) #(vi
13156                         ;;
13157                 *) #(vi
13158                         case $cf_add_cflags in #(vi
13159                         -D*)
13160                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13161
13162 CPPFLAGS=`echo "$CPPFLAGS" | \
13163         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13164                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13165
13166                                 ;;
13167                         esac
13168                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13169                         ;;
13170                 esac
13171                 ;;
13172         *)
13173                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13174                 ;;
13175         esac
13176         ;;
13177 yes)
13178         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13179
13180         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13181
13182         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13183                 && test -z "${cf_tst_cflags}" \
13184                 && cf_fix_cppflags=no
13185         ;;
13186 esac
13187 done
13188
13189 if test -n "$cf_new_cflags" ; then
13190
13191         CFLAGS="$CFLAGS $cf_new_cflags"
13192 fi
13193
13194 if test -n "$cf_new_cppflags" ; then
13195
13196         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13197 fi
13198
13199 if test -n "$cf_new_extra_cppflags" ; then
13200
13201         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13202 fi
13203
13204 else
13205         LIB_TRACING=DEBUG
13206         ADA_TRACE=FALSE
13207 fi
13208
13209 ###     Checks for libraries.
13210 case $cf_cv_system_name in #(vi
13211 *mingw32*) #(vi
13212         ;;
13213 *)
13214 echo "$as_me:13214: checking for gettimeofday" >&5
13215 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13216 if test "${ac_cv_func_gettimeofday+set}" = set; then
13217   echo $ECHO_N "(cached) $ECHO_C" >&6
13218 else
13219   cat >conftest.$ac_ext <<_ACEOF
13220 #line 13220 "configure"
13221 #include "confdefs.h"
13222 /* System header to define __stub macros and hopefully few prototypes,
13223     which can conflict with char gettimeofday (); below.  */
13224 #include <assert.h>
13225 /* Override any gcc2 internal prototype to avoid an error.  */
13226 #ifdef __cplusplus
13227 extern "C"
13228 #endif
13229 /* We use char because int might match the return type of a gcc2
13230    builtin and then its argument prototype would still apply.  */
13231 char gettimeofday ();
13232 char (*f) ();
13233
13234 int
13235 main ()
13236 {
13237 /* The GNU C library defines this for functions which it implements
13238     to always fail with ENOSYS.  Some functions are actually named
13239     something starting with __ and the normal name is an alias.  */
13240 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13241 choke me
13242 #else
13243 f = gettimeofday;
13244 #endif
13245
13246   ;
13247   return 0;
13248 }
13249 _ACEOF
13250 rm -f conftest.$ac_objext conftest$ac_exeext
13251 if { (eval echo "$as_me:13251: \"$ac_link\"") >&5
13252   (eval $ac_link) 2>&5
13253   ac_status=$?
13254   echo "$as_me:13254: \$? = $ac_status" >&5
13255   (exit $ac_status); } &&
13256          { ac_try='test -s conftest$ac_exeext'
13257   { (eval echo "$as_me:13257: \"$ac_try\"") >&5
13258   (eval $ac_try) 2>&5
13259   ac_status=$?
13260   echo "$as_me:13260: \$? = $ac_status" >&5
13261   (exit $ac_status); }; }; then
13262   ac_cv_func_gettimeofday=yes
13263 else
13264   echo "$as_me: failed program was:" >&5
13265 cat conftest.$ac_ext >&5
13266 ac_cv_func_gettimeofday=no
13267 fi
13268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13269 fi
13270 echo "$as_me:13270: result: $ac_cv_func_gettimeofday" >&5
13271 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13272 if test $ac_cv_func_gettimeofday = yes; then
13273   cat >>confdefs.h <<\EOF
13274 #define HAVE_GETTIMEOFDAY 1
13275 EOF
13276
13277 else
13278
13279 echo "$as_me:13279: checking for gettimeofday in -lbsd" >&5
13280 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13281 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13282   echo $ECHO_N "(cached) $ECHO_C" >&6
13283 else
13284   ac_check_lib_save_LIBS=$LIBS
13285 LIBS="-lbsd  $LIBS"
13286 cat >conftest.$ac_ext <<_ACEOF
13287 #line 13287 "configure"
13288 #include "confdefs.h"
13289
13290 /* Override any gcc2 internal prototype to avoid an error.  */
13291 #ifdef __cplusplus
13292 extern "C"
13293 #endif
13294 /* We use char because int might match the return type of a gcc2
13295    builtin and then its argument prototype would still apply.  */
13296 char gettimeofday ();
13297 int
13298 main ()
13299 {
13300 gettimeofday ();
13301   ;
13302   return 0;
13303 }
13304 _ACEOF
13305 rm -f conftest.$ac_objext conftest$ac_exeext
13306 if { (eval echo "$as_me:13306: \"$ac_link\"") >&5
13307   (eval $ac_link) 2>&5
13308   ac_status=$?
13309   echo "$as_me:13309: \$? = $ac_status" >&5
13310   (exit $ac_status); } &&
13311          { ac_try='test -s conftest$ac_exeext'
13312   { (eval echo "$as_me:13312: \"$ac_try\"") >&5
13313   (eval $ac_try) 2>&5
13314   ac_status=$?
13315   echo "$as_me:13315: \$? = $ac_status" >&5
13316   (exit $ac_status); }; }; then
13317   ac_cv_lib_bsd_gettimeofday=yes
13318 else
13319   echo "$as_me: failed program was:" >&5
13320 cat conftest.$ac_ext >&5
13321 ac_cv_lib_bsd_gettimeofday=no
13322 fi
13323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13324 LIBS=$ac_check_lib_save_LIBS
13325 fi
13326 echo "$as_me:13326: result: $ac_cv_lib_bsd_gettimeofday" >&5
13327 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13328 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13329   cat >>confdefs.h <<\EOF
13330 #define HAVE_GETTIMEOFDAY 1
13331 EOF
13332
13333         LIBS="-lbsd $LIBS"
13334 fi
13335
13336 fi
13337         ;;
13338 esac
13339
13340 echo "$as_me:13340: checking if -lm needed for math functions" >&5
13341 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13342 if test "${cf_cv_need_libm+set}" = set; then
13343   echo $ECHO_N "(cached) $ECHO_C" >&6
13344 else
13345
13346         cat >conftest.$ac_ext <<_ACEOF
13347 #line 13347 "configure"
13348 #include "confdefs.h"
13349
13350         #include <stdio.h>
13351         #include <math.h>
13352
13353 int
13354 main ()
13355 {
13356 double x = rand(); printf("result = %g\n", sin(x))
13357   ;
13358   return 0;
13359 }
13360 _ACEOF
13361 rm -f conftest.$ac_objext conftest$ac_exeext
13362 if { (eval echo "$as_me:13362: \"$ac_link\"") >&5
13363   (eval $ac_link) 2>&5
13364   ac_status=$?
13365   echo "$as_me:13365: \$? = $ac_status" >&5
13366   (exit $ac_status); } &&
13367          { ac_try='test -s conftest$ac_exeext'
13368   { (eval echo "$as_me:13368: \"$ac_try\"") >&5
13369   (eval $ac_try) 2>&5
13370   ac_status=$?
13371   echo "$as_me:13371: \$? = $ac_status" >&5
13372   (exit $ac_status); }; }; then
13373   cf_cv_need_libm=no
13374 else
13375   echo "$as_me: failed program was:" >&5
13376 cat conftest.$ac_ext >&5
13377 cf_cv_need_libm=yes
13378 fi
13379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13380 fi
13381 echo "$as_me:13381: result: $cf_cv_need_libm" >&5
13382 echo "${ECHO_T}$cf_cv_need_libm" >&6
13383 if test "$cf_cv_need_libm" = yes
13384 then
13385 MATH_LIB=-lm
13386 fi
13387
13388 ###     Checks for header files.
13389 echo "$as_me:13389: checking for ANSI C header files" >&5
13390 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13391 if test "${ac_cv_header_stdc+set}" = set; then
13392   echo $ECHO_N "(cached) $ECHO_C" >&6
13393 else
13394   cat >conftest.$ac_ext <<_ACEOF
13395 #line 13395 "configure"
13396 #include "confdefs.h"
13397 #include <stdlib.h>
13398 #include <stdarg.h>
13399 #include <string.h>
13400 #include <float.h>
13401
13402 _ACEOF
13403 if { (eval echo "$as_me:13403: \"$ac_cpp conftest.$ac_ext\"") >&5
13404   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13405   ac_status=$?
13406   egrep -v '^ *\+' conftest.er1 >conftest.err
13407   rm -f conftest.er1
13408   cat conftest.err >&5
13409   echo "$as_me:13409: \$? = $ac_status" >&5
13410   (exit $ac_status); } >/dev/null; then
13411   if test -s conftest.err; then
13412     ac_cpp_err=$ac_c_preproc_warn_flag
13413   else
13414     ac_cpp_err=
13415   fi
13416 else
13417   ac_cpp_err=yes
13418 fi
13419 if test -z "$ac_cpp_err"; then
13420   ac_cv_header_stdc=yes
13421 else
13422   echo "$as_me: failed program was:" >&5
13423   cat conftest.$ac_ext >&5
13424   ac_cv_header_stdc=no
13425 fi
13426 rm -f conftest.err conftest.$ac_ext
13427
13428 if test $ac_cv_header_stdc = yes; then
13429   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13430   cat >conftest.$ac_ext <<_ACEOF
13431 #line 13431 "configure"
13432 #include "confdefs.h"
13433 #include <string.h>
13434
13435 _ACEOF
13436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13437   egrep "memchr" >/dev/null 2>&1; then
13438   :
13439 else
13440   ac_cv_header_stdc=no
13441 fi
13442 rm -rf conftest*
13443
13444 fi
13445
13446 if test $ac_cv_header_stdc = yes; then
13447   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13448   cat >conftest.$ac_ext <<_ACEOF
13449 #line 13449 "configure"
13450 #include "confdefs.h"
13451 #include <stdlib.h>
13452
13453 _ACEOF
13454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13455   egrep "free" >/dev/null 2>&1; then
13456   :
13457 else
13458   ac_cv_header_stdc=no
13459 fi
13460 rm -rf conftest*
13461
13462 fi
13463
13464 if test $ac_cv_header_stdc = yes; then
13465   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13466   if test "$cross_compiling" = yes; then
13467   :
13468 else
13469   cat >conftest.$ac_ext <<_ACEOF
13470 #line 13470 "configure"
13471 #include "confdefs.h"
13472 #include <ctype.h>
13473 #if ((' ' & 0x0FF) == 0x020)
13474 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13475 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13476 #else
13477 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13478                      || ('j' <= (c) && (c) <= 'r') \
13479                      || ('s' <= (c) && (c) <= 'z'))
13480 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13481 #endif
13482
13483 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13484 int
13485 main ()
13486 {
13487   int i;
13488   for (i = 0; i < 256; i++)
13489     if (XOR (islower (i), ISLOWER (i))
13490         || toupper (i) != TOUPPER (i))
13491       $ac_main_return(2);
13492   $ac_main_return (0);
13493 }
13494 _ACEOF
13495 rm -f conftest$ac_exeext
13496 if { (eval echo "$as_me:13496: \"$ac_link\"") >&5
13497   (eval $ac_link) 2>&5
13498   ac_status=$?
13499   echo "$as_me:13499: \$? = $ac_status" >&5
13500   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13501   { (eval echo "$as_me:13501: \"$ac_try\"") >&5
13502   (eval $ac_try) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit $ac_status); }; }; then
13506   :
13507 else
13508   echo "$as_me: program exited with status $ac_status" >&5
13509 echo "$as_me: failed program was:" >&5
13510 cat conftest.$ac_ext >&5
13511 ac_cv_header_stdc=no
13512 fi
13513 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13514 fi
13515 fi
13516 fi
13517 echo "$as_me:13517: result: $ac_cv_header_stdc" >&5
13518 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13519 if test $ac_cv_header_stdc = yes; then
13520
13521 cat >>confdefs.h <<\EOF
13522 #define STDC_HEADERS 1
13523 EOF
13524
13525 fi
13526
13527 ac_header_dirent=no
13528 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13529   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13530 echo "$as_me:13530: checking for $ac_hdr that defines DIR" >&5
13531 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13532 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13533   echo $ECHO_N "(cached) $ECHO_C" >&6
13534 else
13535   cat >conftest.$ac_ext <<_ACEOF
13536 #line 13536 "configure"
13537 #include "confdefs.h"
13538 #include <sys/types.h>
13539 #include <$ac_hdr>
13540
13541 int
13542 main ()
13543 {
13544 if ((DIR *) 0)
13545 return 0;
13546   ;
13547   return 0;
13548 }
13549 _ACEOF
13550 rm -f conftest.$ac_objext
13551 if { (eval echo "$as_me:13551: \"$ac_compile\"") >&5
13552   (eval $ac_compile) 2>&5
13553   ac_status=$?
13554   echo "$as_me:13554: \$? = $ac_status" >&5
13555   (exit $ac_status); } &&
13556          { ac_try='test -s conftest.$ac_objext'
13557   { (eval echo "$as_me:13557: \"$ac_try\"") >&5
13558   (eval $ac_try) 2>&5
13559   ac_status=$?
13560   echo "$as_me:13560: \$? = $ac_status" >&5
13561   (exit $ac_status); }; }; then
13562   eval "$as_ac_Header=yes"
13563 else
13564   echo "$as_me: failed program was:" >&5
13565 cat conftest.$ac_ext >&5
13566 eval "$as_ac_Header=no"
13567 fi
13568 rm -f conftest.$ac_objext conftest.$ac_ext
13569 fi
13570 echo "$as_me:13570: result: `eval echo '${'$as_ac_Header'}'`" >&5
13571 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13572 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13573   cat >>confdefs.h <<EOF
13574 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13575 EOF
13576
13577 ac_header_dirent=$ac_hdr; break
13578 fi
13579
13580 done
13581 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13582 if test $ac_header_dirent = dirent.h; then
13583   echo "$as_me:13583: checking for opendir in -ldir" >&5
13584 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13585 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13586   echo $ECHO_N "(cached) $ECHO_C" >&6
13587 else
13588   ac_check_lib_save_LIBS=$LIBS
13589 LIBS="-ldir  $LIBS"
13590 cat >conftest.$ac_ext <<_ACEOF
13591 #line 13591 "configure"
13592 #include "confdefs.h"
13593
13594 /* Override any gcc2 internal prototype to avoid an error.  */
13595 #ifdef __cplusplus
13596 extern "C"
13597 #endif
13598 /* We use char because int might match the return type of a gcc2
13599    builtin and then its argument prototype would still apply.  */
13600 char opendir ();
13601 int
13602 main ()
13603 {
13604 opendir ();
13605   ;
13606   return 0;
13607 }
13608 _ACEOF
13609 rm -f conftest.$ac_objext conftest$ac_exeext
13610 if { (eval echo "$as_me:13610: \"$ac_link\"") >&5
13611   (eval $ac_link) 2>&5
13612   ac_status=$?
13613   echo "$as_me:13613: \$? = $ac_status" >&5
13614   (exit $ac_status); } &&
13615          { ac_try='test -s conftest$ac_exeext'
13616   { (eval echo "$as_me:13616: \"$ac_try\"") >&5
13617   (eval $ac_try) 2>&5
13618   ac_status=$?
13619   echo "$as_me:13619: \$? = $ac_status" >&5
13620   (exit $ac_status); }; }; then
13621   ac_cv_lib_dir_opendir=yes
13622 else
13623   echo "$as_me: failed program was:" >&5
13624 cat conftest.$ac_ext >&5
13625 ac_cv_lib_dir_opendir=no
13626 fi
13627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13628 LIBS=$ac_check_lib_save_LIBS
13629 fi
13630 echo "$as_me:13630: result: $ac_cv_lib_dir_opendir" >&5
13631 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13632 if test $ac_cv_lib_dir_opendir = yes; then
13633   LIBS="$LIBS -ldir"
13634 fi
13635
13636 else
13637   echo "$as_me:13637: checking for opendir in -lx" >&5
13638 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13639 if test "${ac_cv_lib_x_opendir+set}" = set; then
13640   echo $ECHO_N "(cached) $ECHO_C" >&6
13641 else
13642   ac_check_lib_save_LIBS=$LIBS
13643 LIBS="-lx  $LIBS"
13644 cat >conftest.$ac_ext <<_ACEOF
13645 #line 13645 "configure"
13646 #include "confdefs.h"
13647
13648 /* Override any gcc2 internal prototype to avoid an error.  */
13649 #ifdef __cplusplus
13650 extern "C"
13651 #endif
13652 /* We use char because int might match the return type of a gcc2
13653    builtin and then its argument prototype would still apply.  */
13654 char opendir ();
13655 int
13656 main ()
13657 {
13658 opendir ();
13659   ;
13660   return 0;
13661 }
13662 _ACEOF
13663 rm -f conftest.$ac_objext conftest$ac_exeext
13664 if { (eval echo "$as_me:13664: \"$ac_link\"") >&5
13665   (eval $ac_link) 2>&5
13666   ac_status=$?
13667   echo "$as_me:13667: \$? = $ac_status" >&5
13668   (exit $ac_status); } &&
13669          { ac_try='test -s conftest$ac_exeext'
13670   { (eval echo "$as_me:13670: \"$ac_try\"") >&5
13671   (eval $ac_try) 2>&5
13672   ac_status=$?
13673   echo "$as_me:13673: \$? = $ac_status" >&5
13674   (exit $ac_status); }; }; then
13675   ac_cv_lib_x_opendir=yes
13676 else
13677   echo "$as_me: failed program was:" >&5
13678 cat conftest.$ac_ext >&5
13679 ac_cv_lib_x_opendir=no
13680 fi
13681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13682 LIBS=$ac_check_lib_save_LIBS
13683 fi
13684 echo "$as_me:13684: result: $ac_cv_lib_x_opendir" >&5
13685 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13686 if test $ac_cv_lib_x_opendir = yes; then
13687   LIBS="$LIBS -lx"
13688 fi
13689
13690 fi
13691
13692 echo "$as_me:13692: checking whether time.h and sys/time.h may both be included" >&5
13693 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13694 if test "${ac_cv_header_time+set}" = set; then
13695   echo $ECHO_N "(cached) $ECHO_C" >&6
13696 else
13697   cat >conftest.$ac_ext <<_ACEOF
13698 #line 13698 "configure"
13699 #include "confdefs.h"
13700 #include <sys/types.h>
13701 #include <sys/time.h>
13702 #include <time.h>
13703
13704 int
13705 main ()
13706 {
13707 if ((struct tm *) 0)
13708 return 0;
13709   ;
13710   return 0;
13711 }
13712 _ACEOF
13713 rm -f conftest.$ac_objext
13714 if { (eval echo "$as_me:13714: \"$ac_compile\"") >&5
13715   (eval $ac_compile) 2>&5
13716   ac_status=$?
13717   echo "$as_me:13717: \$? = $ac_status" >&5
13718   (exit $ac_status); } &&
13719          { ac_try='test -s conftest.$ac_objext'
13720   { (eval echo "$as_me:13720: \"$ac_try\"") >&5
13721   (eval $ac_try) 2>&5
13722   ac_status=$?
13723   echo "$as_me:13723: \$? = $ac_status" >&5
13724   (exit $ac_status); }; }; then
13725   ac_cv_header_time=yes
13726 else
13727   echo "$as_me: failed program was:" >&5
13728 cat conftest.$ac_ext >&5
13729 ac_cv_header_time=no
13730 fi
13731 rm -f conftest.$ac_objext conftest.$ac_ext
13732 fi
13733 echo "$as_me:13733: result: $ac_cv_header_time" >&5
13734 echo "${ECHO_T}$ac_cv_header_time" >&6
13735 if test $ac_cv_header_time = yes; then
13736
13737 cat >>confdefs.h <<\EOF
13738 #define TIME_WITH_SYS_TIME 1
13739 EOF
13740
13741 fi
13742
13743 cf_regex_func=no
13744
13745 cf_regex_libs="regex re"
13746 case $host_os in #(vi
13747 mingw*)
13748         cf_regex_libs="regex.dll $cf_regex_libs"
13749         ;;
13750 esac
13751
13752 echo "$as_me:13752: checking for regcomp" >&5
13753 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13754 if test "${ac_cv_func_regcomp+set}" = set; then
13755   echo $ECHO_N "(cached) $ECHO_C" >&6
13756 else
13757   cat >conftest.$ac_ext <<_ACEOF
13758 #line 13758 "configure"
13759 #include "confdefs.h"
13760 /* System header to define __stub macros and hopefully few prototypes,
13761     which can conflict with char regcomp (); below.  */
13762 #include <assert.h>
13763 /* Override any gcc2 internal prototype to avoid an error.  */
13764 #ifdef __cplusplus
13765 extern "C"
13766 #endif
13767 /* We use char because int might match the return type of a gcc2
13768    builtin and then its argument prototype would still apply.  */
13769 char regcomp ();
13770 char (*f) ();
13771
13772 int
13773 main ()
13774 {
13775 /* The GNU C library defines this for functions which it implements
13776     to always fail with ENOSYS.  Some functions are actually named
13777     something starting with __ and the normal name is an alias.  */
13778 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13779 choke me
13780 #else
13781 f = regcomp;
13782 #endif
13783
13784   ;
13785   return 0;
13786 }
13787 _ACEOF
13788 rm -f conftest.$ac_objext conftest$ac_exeext
13789 if { (eval echo "$as_me:13789: \"$ac_link\"") >&5
13790   (eval $ac_link) 2>&5
13791   ac_status=$?
13792   echo "$as_me:13792: \$? = $ac_status" >&5
13793   (exit $ac_status); } &&
13794          { ac_try='test -s conftest$ac_exeext'
13795   { (eval echo "$as_me:13795: \"$ac_try\"") >&5
13796   (eval $ac_try) 2>&5
13797   ac_status=$?
13798   echo "$as_me:13798: \$? = $ac_status" >&5
13799   (exit $ac_status); }; }; then
13800   ac_cv_func_regcomp=yes
13801 else
13802   echo "$as_me: failed program was:" >&5
13803 cat conftest.$ac_ext >&5
13804 ac_cv_func_regcomp=no
13805 fi
13806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13807 fi
13808 echo "$as_me:13808: result: $ac_cv_func_regcomp" >&5
13809 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13810 if test $ac_cv_func_regcomp = yes; then
13811   cf_regex_func=regcomp
13812 else
13813
13814         for cf_regex_lib in $cf_regex_libs
13815         do
13816                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13817 echo "$as_me:13817: checking for regcomp in -l$cf_regex_lib" >&5
13818 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13819 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13820   echo $ECHO_N "(cached) $ECHO_C" >&6
13821 else
13822   ac_check_lib_save_LIBS=$LIBS
13823 LIBS="-l$cf_regex_lib  $LIBS"
13824 cat >conftest.$ac_ext <<_ACEOF
13825 #line 13825 "configure"
13826 #include "confdefs.h"
13827
13828 /* Override any gcc2 internal prototype to avoid an error.  */
13829 #ifdef __cplusplus
13830 extern "C"
13831 #endif
13832 /* We use char because int might match the return type of a gcc2
13833    builtin and then its argument prototype would still apply.  */
13834 char regcomp ();
13835 int
13836 main ()
13837 {
13838 regcomp ();
13839   ;
13840   return 0;
13841 }
13842 _ACEOF
13843 rm -f conftest.$ac_objext conftest$ac_exeext
13844 if { (eval echo "$as_me:13844: \"$ac_link\"") >&5
13845   (eval $ac_link) 2>&5
13846   ac_status=$?
13847   echo "$as_me:13847: \$? = $ac_status" >&5
13848   (exit $ac_status); } &&
13849          { ac_try='test -s conftest$ac_exeext'
13850   { (eval echo "$as_me:13850: \"$ac_try\"") >&5
13851   (eval $ac_try) 2>&5
13852   ac_status=$?
13853   echo "$as_me:13853: \$? = $ac_status" >&5
13854   (exit $ac_status); }; }; then
13855   eval "$as_ac_Lib=yes"
13856 else
13857   echo "$as_me: failed program was:" >&5
13858 cat conftest.$ac_ext >&5
13859 eval "$as_ac_Lib=no"
13860 fi
13861 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13862 LIBS=$ac_check_lib_save_LIBS
13863 fi
13864 echo "$as_me:13864: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13865 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13866 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13867
13868                                 LIBS="-l$cf_regex_lib $LIBS"
13869                                 cf_regex_func=regcomp
13870                                 break
13871 fi
13872
13873         done
13874
13875 fi
13876
13877 if test "$cf_regex_func" = no ; then
13878         echo "$as_me:13878: checking for compile" >&5
13879 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13880 if test "${ac_cv_func_compile+set}" = set; then
13881   echo $ECHO_N "(cached) $ECHO_C" >&6
13882 else
13883   cat >conftest.$ac_ext <<_ACEOF
13884 #line 13884 "configure"
13885 #include "confdefs.h"
13886 /* System header to define __stub macros and hopefully few prototypes,
13887     which can conflict with char compile (); below.  */
13888 #include <assert.h>
13889 /* Override any gcc2 internal prototype to avoid an error.  */
13890 #ifdef __cplusplus
13891 extern "C"
13892 #endif
13893 /* We use char because int might match the return type of a gcc2
13894    builtin and then its argument prototype would still apply.  */
13895 char compile ();
13896 char (*f) ();
13897
13898 int
13899 main ()
13900 {
13901 /* The GNU C library defines this for functions which it implements
13902     to always fail with ENOSYS.  Some functions are actually named
13903     something starting with __ and the normal name is an alias.  */
13904 #if defined (__stub_compile) || defined (__stub___compile)
13905 choke me
13906 #else
13907 f = compile;
13908 #endif
13909
13910   ;
13911   return 0;
13912 }
13913 _ACEOF
13914 rm -f conftest.$ac_objext conftest$ac_exeext
13915 if { (eval echo "$as_me:13915: \"$ac_link\"") >&5
13916   (eval $ac_link) 2>&5
13917   ac_status=$?
13918   echo "$as_me:13918: \$? = $ac_status" >&5
13919   (exit $ac_status); } &&
13920          { ac_try='test -s conftest$ac_exeext'
13921   { (eval echo "$as_me:13921: \"$ac_try\"") >&5
13922   (eval $ac_try) 2>&5
13923   ac_status=$?
13924   echo "$as_me:13924: \$? = $ac_status" >&5
13925   (exit $ac_status); }; }; then
13926   ac_cv_func_compile=yes
13927 else
13928   echo "$as_me: failed program was:" >&5
13929 cat conftest.$ac_ext >&5
13930 ac_cv_func_compile=no
13931 fi
13932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13933 fi
13934 echo "$as_me:13934: result: $ac_cv_func_compile" >&5
13935 echo "${ECHO_T}$ac_cv_func_compile" >&6
13936 if test $ac_cv_func_compile = yes; then
13937   cf_regex_func=compile
13938 else
13939
13940                 echo "$as_me:13940: checking for compile in -lgen" >&5
13941 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13942 if test "${ac_cv_lib_gen_compile+set}" = set; then
13943   echo $ECHO_N "(cached) $ECHO_C" >&6
13944 else
13945   ac_check_lib_save_LIBS=$LIBS
13946 LIBS="-lgen  $LIBS"
13947 cat >conftest.$ac_ext <<_ACEOF
13948 #line 13948 "configure"
13949 #include "confdefs.h"
13950
13951 /* Override any gcc2 internal prototype to avoid an error.  */
13952 #ifdef __cplusplus
13953 extern "C"
13954 #endif
13955 /* We use char because int might match the return type of a gcc2
13956    builtin and then its argument prototype would still apply.  */
13957 char compile ();
13958 int
13959 main ()
13960 {
13961 compile ();
13962   ;
13963   return 0;
13964 }
13965 _ACEOF
13966 rm -f conftest.$ac_objext conftest$ac_exeext
13967 if { (eval echo "$as_me:13967: \"$ac_link\"") >&5
13968   (eval $ac_link) 2>&5
13969   ac_status=$?
13970   echo "$as_me:13970: \$? = $ac_status" >&5
13971   (exit $ac_status); } &&
13972          { ac_try='test -s conftest$ac_exeext'
13973   { (eval echo "$as_me:13973: \"$ac_try\"") >&5
13974   (eval $ac_try) 2>&5
13975   ac_status=$?
13976   echo "$as_me:13976: \$? = $ac_status" >&5
13977   (exit $ac_status); }; }; then
13978   ac_cv_lib_gen_compile=yes
13979 else
13980   echo "$as_me: failed program was:" >&5
13981 cat conftest.$ac_ext >&5
13982 ac_cv_lib_gen_compile=no
13983 fi
13984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13985 LIBS=$ac_check_lib_save_LIBS
13986 fi
13987 echo "$as_me:13987: result: $ac_cv_lib_gen_compile" >&5
13988 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13989 if test $ac_cv_lib_gen_compile = yes; then
13990
13991                                 LIBS="-lgen $LIBS"
13992                                 cf_regex_func=compile
13993 fi
13994
13995 fi
13996
13997 fi
13998
13999 if test "$cf_regex_func" = no ; then
14000         { echo "$as_me:14000: WARNING: cannot find regular expression library" >&5
14001 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14002 fi
14003
14004 echo "$as_me:14004: checking for regular-expression headers" >&5
14005 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14006 if test "${cf_cv_regex_hdrs+set}" = set; then
14007   echo $ECHO_N "(cached) $ECHO_C" >&6
14008 else
14009
14010 cf_cv_regex_hdrs=no
14011 case $cf_regex_func in #(vi
14012 compile) #(vi
14013         for cf_regex_hdr in regexp.h regexpr.h
14014         do
14015                 cat >conftest.$ac_ext <<_ACEOF
14016 #line 14016 "configure"
14017 #include "confdefs.h"
14018 #include <$cf_regex_hdr>
14019 int
14020 main ()
14021 {
14022
14023                         char *p = compile("", "", "", 0);
14024                         int x = step("", "");
14025
14026   ;
14027   return 0;
14028 }
14029 _ACEOF
14030 rm -f conftest.$ac_objext conftest$ac_exeext
14031 if { (eval echo "$as_me:14031: \"$ac_link\"") >&5
14032   (eval $ac_link) 2>&5
14033   ac_status=$?
14034   echo "$as_me:14034: \$? = $ac_status" >&5
14035   (exit $ac_status); } &&
14036          { ac_try='test -s conftest$ac_exeext'
14037   { (eval echo "$as_me:14037: \"$ac_try\"") >&5
14038   (eval $ac_try) 2>&5
14039   ac_status=$?
14040   echo "$as_me:14040: \$? = $ac_status" >&5
14041   (exit $ac_status); }; }; then
14042
14043                         cf_cv_regex_hdrs=$cf_regex_hdr
14044                         break
14045
14046 else
14047   echo "$as_me: failed program was:" >&5
14048 cat conftest.$ac_ext >&5
14049 fi
14050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14051         done
14052         ;;
14053 *)
14054         for cf_regex_hdr in regex.h
14055         do
14056                 cat >conftest.$ac_ext <<_ACEOF
14057 #line 14057 "configure"
14058 #include "confdefs.h"
14059 #include <sys/types.h>
14060 #include <$cf_regex_hdr>
14061 int
14062 main ()
14063 {
14064
14065                         regex_t *p;
14066                         int x = regcomp(p, "", 0);
14067                         int y = regexec(p, "", 0, 0, 0);
14068                         regfree(p);
14069
14070   ;
14071   return 0;
14072 }
14073 _ACEOF
14074 rm -f conftest.$ac_objext conftest$ac_exeext
14075 if { (eval echo "$as_me:14075: \"$ac_link\"") >&5
14076   (eval $ac_link) 2>&5
14077   ac_status=$?
14078   echo "$as_me:14078: \$? = $ac_status" >&5
14079   (exit $ac_status); } &&
14080          { ac_try='test -s conftest$ac_exeext'
14081   { (eval echo "$as_me:14081: \"$ac_try\"") >&5
14082   (eval $ac_try) 2>&5
14083   ac_status=$?
14084   echo "$as_me:14084: \$? = $ac_status" >&5
14085   (exit $ac_status); }; }; then
14086
14087                         cf_cv_regex_hdrs=$cf_regex_hdr
14088                         break
14089
14090 else
14091   echo "$as_me: failed program was:" >&5
14092 cat conftest.$ac_ext >&5
14093 fi
14094 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14095         done
14096         ;;
14097 esac
14098
14099 fi
14100 echo "$as_me:14100: result: $cf_cv_regex_hdrs" >&5
14101 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14102
14103 case $cf_cv_regex_hdrs in #(vi
14104     no)        { echo "$as_me:14104: WARNING: no regular expression header found" >&5
14105 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14106     regex.h)   cat >>confdefs.h <<\EOF
14107 #define HAVE_REGEX_H_FUNCS 1
14108 EOF
14109  ;; #(vi
14110     regexp.h)  cat >>confdefs.h <<\EOF
14111 #define HAVE_REGEXP_H_FUNCS 1
14112 EOF
14113  ;; #(vi
14114     regexpr.h) cat >>confdefs.h <<\EOF
14115 #define HAVE_REGEXPR_H_FUNCS 1
14116 EOF
14117  ;;
14118 esac
14119
14120 for ac_header in \
14121 fcntl.h \
14122 getopt.h \
14123 limits.h \
14124 locale.h \
14125 math.h \
14126 poll.h \
14127 sys/bsdtypes.h \
14128 sys/ioctl.h \
14129 sys/param.h \
14130 sys/poll.h \
14131 sys/select.h \
14132 sys/time.h \
14133 sys/times.h \
14134 ttyent.h \
14135 unistd.h \
14136 wctype.h \
14137
14138 do
14139 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14140 echo "$as_me:14140: checking for $ac_header" >&5
14141 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14142 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14143   echo $ECHO_N "(cached) $ECHO_C" >&6
14144 else
14145   cat >conftest.$ac_ext <<_ACEOF
14146 #line 14146 "configure"
14147 #include "confdefs.h"
14148 #include <$ac_header>
14149 _ACEOF
14150 if { (eval echo "$as_me:14150: \"$ac_cpp conftest.$ac_ext\"") >&5
14151   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14152   ac_status=$?
14153   egrep -v '^ *\+' conftest.er1 >conftest.err
14154   rm -f conftest.er1
14155   cat conftest.err >&5
14156   echo "$as_me:14156: \$? = $ac_status" >&5
14157   (exit $ac_status); } >/dev/null; then
14158   if test -s conftest.err; then
14159     ac_cpp_err=$ac_c_preproc_warn_flag
14160   else
14161     ac_cpp_err=
14162   fi
14163 else
14164   ac_cpp_err=yes
14165 fi
14166 if test -z "$ac_cpp_err"; then
14167   eval "$as_ac_Header=yes"
14168 else
14169   echo "$as_me: failed program was:" >&5
14170   cat conftest.$ac_ext >&5
14171   eval "$as_ac_Header=no"
14172 fi
14173 rm -f conftest.err conftest.$ac_ext
14174 fi
14175 echo "$as_me:14175: result: `eval echo '${'$as_ac_Header'}'`" >&5
14176 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14177 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14178   cat >>confdefs.h <<EOF
14179 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14180 EOF
14181
14182 fi
14183 done
14184
14185 for ac_header in unistd.h getopt.h
14186 do
14187 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14188 echo "$as_me:14188: checking for $ac_header" >&5
14189 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14190 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14191   echo $ECHO_N "(cached) $ECHO_C" >&6
14192 else
14193   cat >conftest.$ac_ext <<_ACEOF
14194 #line 14194 "configure"
14195 #include "confdefs.h"
14196 #include <$ac_header>
14197 _ACEOF
14198 if { (eval echo "$as_me:14198: \"$ac_cpp conftest.$ac_ext\"") >&5
14199   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14200   ac_status=$?
14201   egrep -v '^ *\+' conftest.er1 >conftest.err
14202   rm -f conftest.er1
14203   cat conftest.err >&5
14204   echo "$as_me:14204: \$? = $ac_status" >&5
14205   (exit $ac_status); } >/dev/null; then
14206   if test -s conftest.err; then
14207     ac_cpp_err=$ac_c_preproc_warn_flag
14208   else
14209     ac_cpp_err=
14210   fi
14211 else
14212   ac_cpp_err=yes
14213 fi
14214 if test -z "$ac_cpp_err"; then
14215   eval "$as_ac_Header=yes"
14216 else
14217   echo "$as_me: failed program was:" >&5
14218   cat conftest.$ac_ext >&5
14219   eval "$as_ac_Header=no"
14220 fi
14221 rm -f conftest.err conftest.$ac_ext
14222 fi
14223 echo "$as_me:14223: result: `eval echo '${'$as_ac_Header'}'`" >&5
14224 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14225 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14226   cat >>confdefs.h <<EOF
14227 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14228 EOF
14229
14230 fi
14231 done
14232
14233 echo "$as_me:14233: checking for header declaring getopt variables" >&5
14234 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14235 if test "${cf_cv_getopt_header+set}" = set; then
14236   echo $ECHO_N "(cached) $ECHO_C" >&6
14237 else
14238
14239 cf_cv_getopt_header=none
14240 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14241 do
14242 cat >conftest.$ac_ext <<_ACEOF
14243 #line 14243 "configure"
14244 #include "confdefs.h"
14245
14246 #include <$cf_header>
14247 int
14248 main ()
14249 {
14250 int x = optind; char *y = optarg
14251   ;
14252   return 0;
14253 }
14254 _ACEOF
14255 rm -f conftest.$ac_objext
14256 if { (eval echo "$as_me:14256: \"$ac_compile\"") >&5
14257   (eval $ac_compile) 2>&5
14258   ac_status=$?
14259   echo "$as_me:14259: \$? = $ac_status" >&5
14260   (exit $ac_status); } &&
14261          { ac_try='test -s conftest.$ac_objext'
14262   { (eval echo "$as_me:14262: \"$ac_try\"") >&5
14263   (eval $ac_try) 2>&5
14264   ac_status=$?
14265   echo "$as_me:14265: \$? = $ac_status" >&5
14266   (exit $ac_status); }; }; then
14267   cf_cv_getopt_header=$cf_header
14268  break
14269 else
14270   echo "$as_me: failed program was:" >&5
14271 cat conftest.$ac_ext >&5
14272 fi
14273 rm -f conftest.$ac_objext conftest.$ac_ext
14274 done
14275
14276 fi
14277 echo "$as_me:14277: result: $cf_cv_getopt_header" >&5
14278 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14279 if test $cf_cv_getopt_header != none ; then
14280         cat >>confdefs.h <<\EOF
14281 #define HAVE_GETOPT_HEADER 1
14282 EOF
14283
14284 fi
14285
14286 # check for ISC (this may also define _POSIX_SOURCE)
14287 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14288 if test "$ISC" = yes ; then
14289
14290 echo "$as_me:14290: checking for main in -lcposix" >&5
14291 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14292 if test "${ac_cv_lib_cposix_main+set}" = set; then
14293   echo $ECHO_N "(cached) $ECHO_C" >&6
14294 else
14295   ac_check_lib_save_LIBS=$LIBS
14296 LIBS="-lcposix  $LIBS"
14297 cat >conftest.$ac_ext <<_ACEOF
14298 #line 14298 "configure"
14299 #include "confdefs.h"
14300
14301 int
14302 main ()
14303 {
14304 main ();
14305   ;
14306   return 0;
14307 }
14308 _ACEOF
14309 rm -f conftest.$ac_objext conftest$ac_exeext
14310 if { (eval echo "$as_me:14310: \"$ac_link\"") >&5
14311   (eval $ac_link) 2>&5
14312   ac_status=$?
14313   echo "$as_me:14313: \$? = $ac_status" >&5
14314   (exit $ac_status); } &&
14315          { ac_try='test -s conftest$ac_exeext'
14316   { (eval echo "$as_me:14316: \"$ac_try\"") >&5
14317   (eval $ac_try) 2>&5
14318   ac_status=$?
14319   echo "$as_me:14319: \$? = $ac_status" >&5
14320   (exit $ac_status); }; }; then
14321   ac_cv_lib_cposix_main=yes
14322 else
14323   echo "$as_me: failed program was:" >&5
14324 cat conftest.$ac_ext >&5
14325 ac_cv_lib_cposix_main=no
14326 fi
14327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14328 LIBS=$ac_check_lib_save_LIBS
14329 fi
14330 echo "$as_me:14330: result: $ac_cv_lib_cposix_main" >&5
14331 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14332 if test $ac_cv_lib_cposix_main = yes; then
14333   cat >>confdefs.h <<EOF
14334 #define HAVE_LIBCPOSIX 1
14335 EOF
14336
14337   LIBS="-lcposix $LIBS"
14338
14339 fi
14340
14341         echo "$as_me:14341: checking for bzero in -linet" >&5
14342 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14343 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14344   echo $ECHO_N "(cached) $ECHO_C" >&6
14345 else
14346   ac_check_lib_save_LIBS=$LIBS
14347 LIBS="-linet  $LIBS"
14348 cat >conftest.$ac_ext <<_ACEOF
14349 #line 14349 "configure"
14350 #include "confdefs.h"
14351
14352 /* Override any gcc2 internal prototype to avoid an error.  */
14353 #ifdef __cplusplus
14354 extern "C"
14355 #endif
14356 /* We use char because int might match the return type of a gcc2
14357    builtin and then its argument prototype would still apply.  */
14358 char bzero ();
14359 int
14360 main ()
14361 {
14362 bzero ();
14363   ;
14364   return 0;
14365 }
14366 _ACEOF
14367 rm -f conftest.$ac_objext conftest$ac_exeext
14368 if { (eval echo "$as_me:14368: \"$ac_link\"") >&5
14369   (eval $ac_link) 2>&5
14370   ac_status=$?
14371   echo "$as_me:14371: \$? = $ac_status" >&5
14372   (exit $ac_status); } &&
14373          { ac_try='test -s conftest$ac_exeext'
14374   { (eval echo "$as_me:14374: \"$ac_try\"") >&5
14375   (eval $ac_try) 2>&5
14376   ac_status=$?
14377   echo "$as_me:14377: \$? = $ac_status" >&5
14378   (exit $ac_status); }; }; then
14379   ac_cv_lib_inet_bzero=yes
14380 else
14381   echo "$as_me: failed program was:" >&5
14382 cat conftest.$ac_ext >&5
14383 ac_cv_lib_inet_bzero=no
14384 fi
14385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14386 LIBS=$ac_check_lib_save_LIBS
14387 fi
14388 echo "$as_me:14388: result: $ac_cv_lib_inet_bzero" >&5
14389 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14390 if test $ac_cv_lib_inet_bzero = yes; then
14391   LIBS="-linet $LIBS"
14392 fi
14393 fi
14394
14395 echo "$as_me:14395: checking if sys/time.h works with sys/select.h" >&5
14396 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14397 if test "${cf_cv_sys_time_select+set}" = set; then
14398   echo $ECHO_N "(cached) $ECHO_C" >&6
14399 else
14400
14401 cat >conftest.$ac_ext <<_ACEOF
14402 #line 14402 "configure"
14403 #include "confdefs.h"
14404
14405 #include <sys/types.h>
14406 #ifdef HAVE_SYS_TIME_H
14407 #include <sys/time.h>
14408 #endif
14409 #ifdef HAVE_SYS_SELECT_H
14410 #include <sys/select.h>
14411 #endif
14412
14413 int
14414 main ()
14415 {
14416
14417   ;
14418   return 0;
14419 }
14420 _ACEOF
14421 rm -f conftest.$ac_objext
14422 if { (eval echo "$as_me:14422: \"$ac_compile\"") >&5
14423   (eval $ac_compile) 2>&5
14424   ac_status=$?
14425   echo "$as_me:14425: \$? = $ac_status" >&5
14426   (exit $ac_status); } &&
14427          { ac_try='test -s conftest.$ac_objext'
14428   { (eval echo "$as_me:14428: \"$ac_try\"") >&5
14429   (eval $ac_try) 2>&5
14430   ac_status=$?
14431   echo "$as_me:14431: \$? = $ac_status" >&5
14432   (exit $ac_status); }; }; then
14433   cf_cv_sys_time_select=yes
14434 else
14435   echo "$as_me: failed program was:" >&5
14436 cat conftest.$ac_ext >&5
14437 cf_cv_sys_time_select=no
14438 fi
14439 rm -f conftest.$ac_objext conftest.$ac_ext
14440
14441 fi
14442
14443 echo "$as_me:14443: result: $cf_cv_sys_time_select" >&5
14444 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14445 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14446 #define HAVE_SYS_TIME_SELECT 1
14447 EOF
14448
14449 ###     checks for compiler characteristics
14450 ac_ext=c
14451 ac_cpp='$CPP $CPPFLAGS'
14452 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14453 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14455 ac_main_return=return
14456
14457 echo "$as_me:14457: checking for $CC option to accept ANSI C" >&5
14458 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14459 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14460   echo $ECHO_N "(cached) $ECHO_C" >&6
14461 else
14462   ac_cv_prog_cc_stdc=no
14463 ac_save_CC=$CC
14464 cat >conftest.$ac_ext <<_ACEOF
14465 #line 14465 "configure"
14466 #include "confdefs.h"
14467 #include <stdarg.h>
14468 #include <stdio.h>
14469 #include <sys/types.h>
14470 #include <sys/stat.h>
14471 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14472 struct buf { int x; };
14473 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14474 static char *e (p, i)
14475      char **p;
14476      int i;
14477 {
14478   return p[i];
14479 }
14480 static char *f (char * (*g) (char **, int), char **p, ...)
14481 {
14482   char *s;
14483   va_list v;
14484   va_start (v,p);
14485   s = g (p, va_arg (v,int));
14486   va_end (v);
14487   return s;
14488 }
14489 int test (int i, double x);
14490 struct s1 {int (*f) (int a);};
14491 struct s2 {int (*f) (double a);};
14492 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14493 int argc;
14494 char **argv;
14495 int
14496 main ()
14497 {
14498 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14499   ;
14500   return 0;
14501 }
14502 _ACEOF
14503 # Don't try gcc -ansi; that turns off useful extensions and
14504 # breaks some systems' header files.
14505 # AIX                   -qlanglvl=ansi
14506 # Ultrix and OSF/1      -std1
14507 # HP-UX 10.20 and later -Ae
14508 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14509 # SVR4                  -Xc -D__EXTENSIONS__
14510 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14511 do
14512   CC="$ac_save_CC $ac_arg"
14513   rm -f conftest.$ac_objext
14514 if { (eval echo "$as_me:14514: \"$ac_compile\"") >&5
14515   (eval $ac_compile) 2>&5
14516   ac_status=$?
14517   echo "$as_me:14517: \$? = $ac_status" >&5
14518   (exit $ac_status); } &&
14519          { ac_try='test -s conftest.$ac_objext'
14520   { (eval echo "$as_me:14520: \"$ac_try\"") >&5
14521   (eval $ac_try) 2>&5
14522   ac_status=$?
14523   echo "$as_me:14523: \$? = $ac_status" >&5
14524   (exit $ac_status); }; }; then
14525   ac_cv_prog_cc_stdc=$ac_arg
14526 break
14527 else
14528   echo "$as_me: failed program was:" >&5
14529 cat conftest.$ac_ext >&5
14530 fi
14531 rm -f conftest.$ac_objext
14532 done
14533 rm -f conftest.$ac_ext conftest.$ac_objext
14534 CC=$ac_save_CC
14535
14536 fi
14537
14538 case "x$ac_cv_prog_cc_stdc" in
14539   x|xno)
14540     echo "$as_me:14540: result: none needed" >&5
14541 echo "${ECHO_T}none needed" >&6 ;;
14542   *)
14543     echo "$as_me:14543: result: $ac_cv_prog_cc_stdc" >&5
14544 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14545     CC="$CC $ac_cv_prog_cc_stdc" ;;
14546 esac
14547
14548 echo "$as_me:14548: checking for an ANSI C-conforming const" >&5
14549 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14550 if test "${ac_cv_c_const+set}" = set; then
14551   echo $ECHO_N "(cached) $ECHO_C" >&6
14552 else
14553   cat >conftest.$ac_ext <<_ACEOF
14554 #line 14554 "configure"
14555 #include "confdefs.h"
14556
14557 int
14558 main ()
14559 {
14560 /* FIXME: Include the comments suggested by Paul. */
14561 #ifndef __cplusplus
14562   /* Ultrix mips cc rejects this.  */
14563   typedef int charset[2];
14564   const charset x;
14565   /* SunOS 4.1.1 cc rejects this.  */
14566   char const *const *ccp;
14567   char **p;
14568   /* NEC SVR4.0.2 mips cc rejects this.  */
14569   struct point {int x, y;};
14570   static struct point const zero = {0,0};
14571   /* AIX XL C 1.02.0.0 rejects this.
14572      It does not let you subtract one const X* pointer from another in
14573      an arm of an if-expression whose if-part is not a constant
14574      expression */
14575   const char *g = "string";
14576   ccp = &g + (g ? g-g : 0);
14577   /* HPUX 7.0 cc rejects these. */
14578   ++ccp;
14579   p = (char**) ccp;
14580   ccp = (char const *const *) p;
14581   { /* SCO 3.2v4 cc rejects this.  */
14582     char *t;
14583     char const *s = 0 ? (char *) 0 : (char const *) 0;
14584
14585     *t++ = 0;
14586   }
14587   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14588     int x[] = {25, 17};
14589     const int *foo = &x[0];
14590     ++foo;
14591   }
14592   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14593     typedef const int *iptr;
14594     iptr p = 0;
14595     ++p;
14596   }
14597   { /* AIX XL C 1.02.0.0 rejects this saying
14598        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14599     struct s { int j; const int *ap[3]; };
14600     struct s *b; b->j = 5;
14601   }
14602   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14603     const int foo = 10;
14604   }
14605 #endif
14606
14607   ;
14608   return 0;
14609 }
14610 _ACEOF
14611 rm -f conftest.$ac_objext
14612 if { (eval echo "$as_me:14612: \"$ac_compile\"") >&5
14613   (eval $ac_compile) 2>&5
14614   ac_status=$?
14615   echo "$as_me:14615: \$? = $ac_status" >&5
14616   (exit $ac_status); } &&
14617          { ac_try='test -s conftest.$ac_objext'
14618   { (eval echo "$as_me:14618: \"$ac_try\"") >&5
14619   (eval $ac_try) 2>&5
14620   ac_status=$?
14621   echo "$as_me:14621: \$? = $ac_status" >&5
14622   (exit $ac_status); }; }; then
14623   ac_cv_c_const=yes
14624 else
14625   echo "$as_me: failed program was:" >&5
14626 cat conftest.$ac_ext >&5
14627 ac_cv_c_const=no
14628 fi
14629 rm -f conftest.$ac_objext conftest.$ac_ext
14630 fi
14631 echo "$as_me:14631: result: $ac_cv_c_const" >&5
14632 echo "${ECHO_T}$ac_cv_c_const" >&6
14633 if test $ac_cv_c_const = no; then
14634
14635 cat >>confdefs.h <<\EOF
14636 #define const
14637 EOF
14638
14639 fi
14640
14641 echo "$as_me:14641: checking for inline" >&5
14642 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14643 if test "${ac_cv_c_inline+set}" = set; then
14644   echo $ECHO_N "(cached) $ECHO_C" >&6
14645 else
14646   ac_cv_c_inline=no
14647 for ac_kw in inline __inline__ __inline; do
14648   cat >conftest.$ac_ext <<_ACEOF
14649 #line 14649 "configure"
14650 #include "confdefs.h"
14651 #ifndef __cplusplus
14652 static $ac_kw int static_foo () {return 0; }
14653 $ac_kw int foo () {return 0; }
14654 #endif
14655
14656 _ACEOF
14657 rm -f conftest.$ac_objext
14658 if { (eval echo "$as_me:14658: \"$ac_compile\"") >&5
14659   (eval $ac_compile) 2>&5
14660   ac_status=$?
14661   echo "$as_me:14661: \$? = $ac_status" >&5
14662   (exit $ac_status); } &&
14663          { ac_try='test -s conftest.$ac_objext'
14664   { (eval echo "$as_me:14664: \"$ac_try\"") >&5
14665   (eval $ac_try) 2>&5
14666   ac_status=$?
14667   echo "$as_me:14667: \$? = $ac_status" >&5
14668   (exit $ac_status); }; }; then
14669   ac_cv_c_inline=$ac_kw; break
14670 else
14671   echo "$as_me: failed program was:" >&5
14672 cat conftest.$ac_ext >&5
14673 fi
14674 rm -f conftest.$ac_objext conftest.$ac_ext
14675 done
14676
14677 fi
14678 echo "$as_me:14678: result: $ac_cv_c_inline" >&5
14679 echo "${ECHO_T}$ac_cv_c_inline" >&6
14680 case $ac_cv_c_inline in
14681   inline | yes) ;;
14682   no)
14683 cat >>confdefs.h <<\EOF
14684 #define inline
14685 EOF
14686  ;;
14687   *)  cat >>confdefs.h <<EOF
14688 #define inline $ac_cv_c_inline
14689 EOF
14690  ;;
14691 esac
14692
14693 NCURSES_INLINE=
14694 if test "$ac_cv_c_inline" != no ; then
14695   NCURSES_INLINE=inline
14696   if test "$INTEL_COMPILER" = yes
14697   then
14698     :
14699   elif test "$GCC" = yes
14700   then
14701     echo "$as_me:14701: checking if $CC supports options to tune inlining" >&5
14702 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14703 if test "${cf_cv_gcc_inline+set}" = set; then
14704   echo $ECHO_N "(cached) $ECHO_C" >&6
14705 else
14706
14707       cf_save_CFLAGS=$CFLAGS
14708       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14709       cat >conftest.$ac_ext <<_ACEOF
14710 #line 14710 "configure"
14711 #include "confdefs.h"
14712 inline int foo(void) { return 1; }
14713 int
14714 main ()
14715 {
14716 ${cf_cv_main_return:-return} foo()
14717   ;
14718   return 0;
14719 }
14720 _ACEOF
14721 rm -f conftest.$ac_objext
14722 if { (eval echo "$as_me:14722: \"$ac_compile\"") >&5
14723   (eval $ac_compile) 2>&5
14724   ac_status=$?
14725   echo "$as_me:14725: \$? = $ac_status" >&5
14726   (exit $ac_status); } &&
14727          { ac_try='test -s conftest.$ac_objext'
14728   { (eval echo "$as_me:14728: \"$ac_try\"") >&5
14729   (eval $ac_try) 2>&5
14730   ac_status=$?
14731   echo "$as_me:14731: \$? = $ac_status" >&5
14732   (exit $ac_status); }; }; then
14733   cf_cv_gcc_inline=yes
14734 else
14735   echo "$as_me: failed program was:" >&5
14736 cat conftest.$ac_ext >&5
14737 cf_cv_gcc_inline=no
14738 fi
14739 rm -f conftest.$ac_objext conftest.$ac_ext
14740       CFLAGS=$cf_save_CFLAGS
14741
14742 fi
14743 echo "$as_me:14743: result: $cf_cv_gcc_inline" >&5
14744 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14745     if test "$cf_cv_gcc_inline" = yes ; then
14746
14747 cf_fix_cppflags=no
14748 cf_new_cflags=
14749 cf_new_cppflags=
14750 cf_new_extra_cppflags=
14751
14752 for cf_add_cflags in --param max-inline-insns-single=1200
14753 do
14754 case $cf_fix_cppflags in
14755 no)
14756         case $cf_add_cflags in #(vi
14757         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14758                 case $cf_add_cflags in
14759                 -D*)
14760                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14761
14762                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14763                                 && test -z "${cf_tst_cflags}" \
14764                                 && cf_fix_cppflags=yes
14765
14766                         if test $cf_fix_cppflags = yes ; then
14767                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14768                                 continue
14769                         elif test "${cf_tst_cflags}" = "\"'" ; then
14770                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14771                                 continue
14772                         fi
14773                         ;;
14774                 esac
14775                 case "$CPPFLAGS" in
14776                 *$cf_add_cflags) #(vi
14777                         ;;
14778                 *) #(vi
14779                         case $cf_add_cflags in #(vi
14780                         -D*)
14781                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14782
14783 CPPFLAGS=`echo "$CPPFLAGS" | \
14784         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14785                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14786
14787                                 ;;
14788                         esac
14789                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14790                         ;;
14791                 esac
14792                 ;;
14793         *)
14794                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14795                 ;;
14796         esac
14797         ;;
14798 yes)
14799         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14800
14801         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14802
14803         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14804                 && test -z "${cf_tst_cflags}" \
14805                 && cf_fix_cppflags=no
14806         ;;
14807 esac
14808 done
14809
14810 if test -n "$cf_new_cflags" ; then
14811
14812         CFLAGS="$CFLAGS $cf_new_cflags"
14813 fi
14814
14815 if test -n "$cf_new_cppflags" ; then
14816
14817         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14818 fi
14819
14820 if test -n "$cf_new_extra_cppflags" ; then
14821
14822         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14823 fi
14824
14825     fi
14826   fi
14827 fi
14828
14829 echo "$as_me:14829: checking for signal global datatype" >&5
14830 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14831 if test "${cf_cv_sig_atomic_t+set}" = set; then
14832   echo $ECHO_N "(cached) $ECHO_C" >&6
14833 else
14834
14835         for cf_type in \
14836                 "volatile sig_atomic_t" \
14837                 "sig_atomic_t" \
14838                 "int"
14839         do
14840         cat >conftest.$ac_ext <<_ACEOF
14841 #line 14841 "configure"
14842 #include "confdefs.h"
14843
14844 #include <sys/types.h>
14845 #include <signal.h>
14846 #include <stdio.h>
14847
14848 extern $cf_type x;
14849 $cf_type x;
14850 static void handler(int sig)
14851 {
14852         x = 5;
14853 }
14854 int
14855 main ()
14856 {
14857 signal(SIGINT, handler);
14858                  x = 1
14859   ;
14860   return 0;
14861 }
14862 _ACEOF
14863 rm -f conftest.$ac_objext
14864 if { (eval echo "$as_me:14864: \"$ac_compile\"") >&5
14865   (eval $ac_compile) 2>&5
14866   ac_status=$?
14867   echo "$as_me:14867: \$? = $ac_status" >&5
14868   (exit $ac_status); } &&
14869          { ac_try='test -s conftest.$ac_objext'
14870   { (eval echo "$as_me:14870: \"$ac_try\"") >&5
14871   (eval $ac_try) 2>&5
14872   ac_status=$?
14873   echo "$as_me:14873: \$? = $ac_status" >&5
14874   (exit $ac_status); }; }; then
14875   cf_cv_sig_atomic_t=$cf_type
14876 else
14877   echo "$as_me: failed program was:" >&5
14878 cat conftest.$ac_ext >&5
14879 cf_cv_sig_atomic_t=no
14880 fi
14881 rm -f conftest.$ac_objext conftest.$ac_ext
14882                 test "$cf_cv_sig_atomic_t" != no && break
14883         done
14884
14885 fi
14886
14887 echo "$as_me:14887: result: $cf_cv_sig_atomic_t" >&5
14888 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14889 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14890 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14891 EOF
14892
14893 if test $NCURSES_CHTYPE = auto ; then
14894
14895 echo "$as_me:14895: checking for type of chtype" >&5
14896 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14897 if test "${cf_cv_typeof_chtype+set}" = set; then
14898   echo $ECHO_N "(cached) $ECHO_C" >&6
14899 else
14900
14901                 if test "$cross_compiling" = yes; then
14902   cf_cv_typeof_chtype=long
14903 else
14904   cat >conftest.$ac_ext <<_ACEOF
14905 #line 14905 "configure"
14906 #include "confdefs.h"
14907
14908 #define WANT_BITS 31
14909 #include <stdio.h>
14910 int main()
14911 {
14912         FILE *fp = fopen("cf_test.out", "w");
14913         if (fp != 0) {
14914                 char *result = "long";
14915                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14916                         int n;
14917                         unsigned int x, y;
14918                         for (n = 0; n < WANT_BITS; n++) {
14919                                 x = (1 << n);
14920                                 y = (x >> n);
14921                                 if (y != 1 || x == 0) {
14922                                         x = 0;
14923                                         break;
14924                                 }
14925                         }
14926                         /*
14927                          * If x is nonzero, an int is big enough for the bits
14928                          * that we want.
14929                          */
14930                         result = (x != 0) ? "int" : "long";
14931                 }
14932                 fputs(result, fp);
14933                 fclose(fp);
14934         }
14935         ${cf_cv_main_return:-return}(0);
14936 }
14937
14938 _ACEOF
14939 rm -f conftest$ac_exeext
14940 if { (eval echo "$as_me:14940: \"$ac_link\"") >&5
14941   (eval $ac_link) 2>&5
14942   ac_status=$?
14943   echo "$as_me:14943: \$? = $ac_status" >&5
14944   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14945   { (eval echo "$as_me:14945: \"$ac_try\"") >&5
14946   (eval $ac_try) 2>&5
14947   ac_status=$?
14948   echo "$as_me:14948: \$? = $ac_status" >&5
14949   (exit $ac_status); }; }; then
14950   cf_cv_typeof_chtype=`cat cf_test.out`
14951 else
14952   echo "$as_me: program exited with status $ac_status" >&5
14953 echo "$as_me: failed program was:" >&5
14954 cat conftest.$ac_ext >&5
14955 cf_cv_typeof_chtype=long
14956 fi
14957 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14958 fi
14959                 rm -f cf_test.out
14960
14961 fi
14962
14963 echo "$as_me:14963: result: $cf_cv_typeof_chtype" >&5
14964 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14965
14966 cat >>confdefs.h <<EOF
14967 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14968 EOF
14969
14970 else
14971         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14972 fi
14973 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14974
14975 echo "$as_me:14975: checking if unsigned literals are legal" >&5
14976 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14977 if test "${cf_cv_unsigned_literals+set}" = set; then
14978   echo $ECHO_N "(cached) $ECHO_C" >&6
14979 else
14980
14981         cat >conftest.$ac_ext <<_ACEOF
14982 #line 14982 "configure"
14983 #include "confdefs.h"
14984
14985 int
14986 main ()
14987 {
14988 long x = 1L + 1UL + 1U + 1
14989   ;
14990   return 0;
14991 }
14992 _ACEOF
14993 rm -f conftest.$ac_objext
14994 if { (eval echo "$as_me:14994: \"$ac_compile\"") >&5
14995   (eval $ac_compile) 2>&5
14996   ac_status=$?
14997   echo "$as_me:14997: \$? = $ac_status" >&5
14998   (exit $ac_status); } &&
14999          { ac_try='test -s conftest.$ac_objext'
15000   { (eval echo "$as_me:15000: \"$ac_try\"") >&5
15001   (eval $ac_try) 2>&5
15002   ac_status=$?
15003   echo "$as_me:15003: \$? = $ac_status" >&5
15004   (exit $ac_status); }; }; then
15005   cf_cv_unsigned_literals=yes
15006 else
15007   echo "$as_me: failed program was:" >&5
15008 cat conftest.$ac_ext >&5
15009 cf_cv_unsigned_literals=no
15010 fi
15011 rm -f conftest.$ac_objext conftest.$ac_ext
15012
15013 fi
15014
15015 echo "$as_me:15015: result: $cf_cv_unsigned_literals" >&5
15016 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15017
15018 cf_cv_1UL="1"
15019 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15020 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15021
15022 if test $NCURSES_MMASK_T = auto ; then
15023         cf_cv_typeof_mmask_t=long
15024 else
15025         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15026 fi
15027 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15028
15029 ###     Checks for external-data
15030
15031 echo "$as_me:15031: checking if external errno is declared" >&5
15032 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15033 if test "${cf_cv_dcl_errno+set}" = set; then
15034   echo $ECHO_N "(cached) $ECHO_C" >&6
15035 else
15036
15037     cat >conftest.$ac_ext <<_ACEOF
15038 #line 15038 "configure"
15039 #include "confdefs.h"
15040
15041 #ifdef HAVE_STDLIB_H
15042 #include <stdlib.h>
15043 #endif
15044 #include <stdio.h>
15045 #include <sys/types.h>
15046 #include <errno.h>
15047 int
15048 main ()
15049 {
15050 int x = (int) errno
15051   ;
15052   return 0;
15053 }
15054 _ACEOF
15055 rm -f conftest.$ac_objext
15056 if { (eval echo "$as_me:15056: \"$ac_compile\"") >&5
15057   (eval $ac_compile) 2>&5
15058   ac_status=$?
15059   echo "$as_me:15059: \$? = $ac_status" >&5
15060   (exit $ac_status); } &&
15061          { ac_try='test -s conftest.$ac_objext'
15062   { (eval echo "$as_me:15062: \"$ac_try\"") >&5
15063   (eval $ac_try) 2>&5
15064   ac_status=$?
15065   echo "$as_me:15065: \$? = $ac_status" >&5
15066   (exit $ac_status); }; }; then
15067   cf_cv_dcl_errno=yes
15068 else
15069   echo "$as_me: failed program was:" >&5
15070 cat conftest.$ac_ext >&5
15071 cf_cv_dcl_errno=no
15072 fi
15073 rm -f conftest.$ac_objext conftest.$ac_ext
15074
15075 fi
15076 echo "$as_me:15076: result: $cf_cv_dcl_errno" >&5
15077 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15078
15079 if test "$cf_cv_dcl_errno" = no ; then
15080
15081 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15082
15083     cat >>confdefs.h <<EOF
15084 #define $cf_result 1
15085 EOF
15086
15087 fi
15088
15089 # It's possible (for near-UNIX clones) that the data doesn't exist
15090
15091 echo "$as_me:15091: checking if external errno exists" >&5
15092 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15093 if test "${cf_cv_have_errno+set}" = set; then
15094   echo $ECHO_N "(cached) $ECHO_C" >&6
15095 else
15096
15097     cat >conftest.$ac_ext <<_ACEOF
15098 #line 15098 "configure"
15099 #include "confdefs.h"
15100
15101 #undef errno
15102 extern int errno;
15103
15104 int
15105 main ()
15106 {
15107 errno = 2
15108   ;
15109   return 0;
15110 }
15111 _ACEOF
15112 rm -f conftest.$ac_objext conftest$ac_exeext
15113 if { (eval echo "$as_me:15113: \"$ac_link\"") >&5
15114   (eval $ac_link) 2>&5
15115   ac_status=$?
15116   echo "$as_me:15116: \$? = $ac_status" >&5
15117   (exit $ac_status); } &&
15118          { ac_try='test -s conftest$ac_exeext'
15119   { (eval echo "$as_me:15119: \"$ac_try\"") >&5
15120   (eval $ac_try) 2>&5
15121   ac_status=$?
15122   echo "$as_me:15122: \$? = $ac_status" >&5
15123   (exit $ac_status); }; }; then
15124   cf_cv_have_errno=yes
15125 else
15126   echo "$as_me: failed program was:" >&5
15127 cat conftest.$ac_ext >&5
15128 cf_cv_have_errno=no
15129 fi
15130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15131
15132 fi
15133 echo "$as_me:15133: result: $cf_cv_have_errno" >&5
15134 echo "${ECHO_T}$cf_cv_have_errno" >&6
15135
15136 if test "$cf_cv_have_errno" = yes ; then
15137
15138 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15139
15140     cat >>confdefs.h <<EOF
15141 #define $cf_result 1
15142 EOF
15143
15144 fi
15145
15146 echo "$as_me:15146: checking if data-only library module links" >&5
15147 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15148 if test "${cf_cv_link_dataonly+set}" = set; then
15149   echo $ECHO_N "(cached) $ECHO_C" >&6
15150 else
15151
15152         rm -f conftest.a
15153         cat >conftest.$ac_ext <<EOF
15154 #line 15154 "configure"
15155 int     testdata[3] = { 123, 456, 789 };
15156 EOF
15157         if { (eval echo "$as_me:15157: \"$ac_compile\"") >&5
15158   (eval $ac_compile) 2>&5
15159   ac_status=$?
15160   echo "$as_me:15160: \$? = $ac_status" >&5
15161   (exit $ac_status); } ; then
15162                 mv conftest.o data.o && \
15163                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15164         fi
15165         rm -f conftest.$ac_ext data.o
15166         cat >conftest.$ac_ext <<EOF
15167 #line 15167 "configure"
15168 int     testfunc()
15169 {
15170 #if defined(NeXT)
15171         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15172 #else
15173         extern int testdata[3];
15174         return testdata[0] == 123
15175            &&  testdata[1] == 456
15176            &&  testdata[2] == 789;
15177 #endif
15178 }
15179 EOF
15180         if { (eval echo "$as_me:15180: \"$ac_compile\"") >&5
15181   (eval $ac_compile) 2>&5
15182   ac_status=$?
15183   echo "$as_me:15183: \$? = $ac_status" >&5
15184   (exit $ac_status); }; then
15185                 mv conftest.o func.o && \
15186                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15187         fi
15188         rm -f conftest.$ac_ext func.o
15189         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15190         cf_saveLIBS="$LIBS"
15191         LIBS="conftest.a $LIBS"
15192         if test "$cross_compiling" = yes; then
15193   cf_cv_link_dataonly=unknown
15194 else
15195   cat >conftest.$ac_ext <<_ACEOF
15196 #line 15196 "configure"
15197 #include "confdefs.h"
15198
15199         int main()
15200         {
15201                 extern int testfunc();
15202                 ${cf_cv_main_return:-return} (!testfunc());
15203         }
15204
15205 _ACEOF
15206 rm -f conftest$ac_exeext
15207 if { (eval echo "$as_me:15207: \"$ac_link\"") >&5
15208   (eval $ac_link) 2>&5
15209   ac_status=$?
15210   echo "$as_me:15210: \$? = $ac_status" >&5
15211   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15212   { (eval echo "$as_me:15212: \"$ac_try\"") >&5
15213   (eval $ac_try) 2>&5
15214   ac_status=$?
15215   echo "$as_me:15215: \$? = $ac_status" >&5
15216   (exit $ac_status); }; }; then
15217   cf_cv_link_dataonly=yes
15218 else
15219   echo "$as_me: program exited with status $ac_status" >&5
15220 echo "$as_me: failed program was:" >&5
15221 cat conftest.$ac_ext >&5
15222 cf_cv_link_dataonly=no
15223 fi
15224 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15225 fi
15226         LIBS="$cf_saveLIBS"
15227
15228 fi
15229
15230 echo "$as_me:15230: result: $cf_cv_link_dataonly" >&5
15231 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15232
15233 if test "$cf_cv_link_dataonly" = no ; then
15234         cat >>confdefs.h <<\EOF
15235 #define BROKEN_LINKER 1
15236 EOF
15237
15238         BROKEN_LINKER=1
15239 fi
15240
15241 ###     Checks for library functions.
15242
15243 for ac_func in \
15244 getcwd \
15245 getegid \
15246 geteuid \
15247 getttynam \
15248 issetugid \
15249 poll \
15250 remove \
15251 select \
15252 setbuf \
15253 setbuffer \
15254 setvbuf \
15255 sigaction \
15256 sigvec \
15257 strdup \
15258 strstr \
15259 tcgetpgrp \
15260 times \
15261 vsnprintf \
15262
15263 do
15264 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15265 echo "$as_me:15265: checking for $ac_func" >&5
15266 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15267 if eval "test \"\${$as_ac_var+set}\" = set"; then
15268   echo $ECHO_N "(cached) $ECHO_C" >&6
15269 else
15270   cat >conftest.$ac_ext <<_ACEOF
15271 #line 15271 "configure"
15272 #include "confdefs.h"
15273 /* System header to define __stub macros and hopefully few prototypes,
15274     which can conflict with char $ac_func (); below.  */
15275 #include <assert.h>
15276 /* Override any gcc2 internal prototype to avoid an error.  */
15277 #ifdef __cplusplus
15278 extern "C"
15279 #endif
15280 /* We use char because int might match the return type of a gcc2
15281    builtin and then its argument prototype would still apply.  */
15282 char $ac_func ();
15283 char (*f) ();
15284
15285 int
15286 main ()
15287 {
15288 /* The GNU C library defines this for functions which it implements
15289     to always fail with ENOSYS.  Some functions are actually named
15290     something starting with __ and the normal name is an alias.  */
15291 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15292 choke me
15293 #else
15294 f = $ac_func;
15295 #endif
15296
15297   ;
15298   return 0;
15299 }
15300 _ACEOF
15301 rm -f conftest.$ac_objext conftest$ac_exeext
15302 if { (eval echo "$as_me:15302: \"$ac_link\"") >&5
15303   (eval $ac_link) 2>&5
15304   ac_status=$?
15305   echo "$as_me:15305: \$? = $ac_status" >&5
15306   (exit $ac_status); } &&
15307          { ac_try='test -s conftest$ac_exeext'
15308   { (eval echo "$as_me:15308: \"$ac_try\"") >&5
15309   (eval $ac_try) 2>&5
15310   ac_status=$?
15311   echo "$as_me:15311: \$? = $ac_status" >&5
15312   (exit $ac_status); }; }; then
15313   eval "$as_ac_var=yes"
15314 else
15315   echo "$as_me: failed program was:" >&5
15316 cat conftest.$ac_ext >&5
15317 eval "$as_ac_var=no"
15318 fi
15319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15320 fi
15321 echo "$as_me:15321: result: `eval echo '${'$as_ac_var'}'`" >&5
15322 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15323 if test `eval echo '${'$as_ac_var'}'` = yes; then
15324   cat >>confdefs.h <<EOF
15325 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15326 EOF
15327
15328 fi
15329 done
15330
15331 if test "$with_getcap" = "yes" ; then
15332
15333 echo "$as_me:15333: checking for terminal-capability database functions" >&5
15334 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15335 if test "${cf_cv_cgetent+set}" = set; then
15336   echo $ECHO_N "(cached) $ECHO_C" >&6
15337 else
15338
15339 cat >conftest.$ac_ext <<_ACEOF
15340 #line 15340 "configure"
15341 #include "confdefs.h"
15342
15343 #include <stdlib.h>
15344 int
15345 main ()
15346 {
15347
15348         char temp[128];
15349         char *buf = temp;
15350         char *db_array = temp;
15351         cgetent(&buf, &db_array, "vt100");
15352         cgetcap(buf, "tc", '=');
15353         cgetmatch(buf, "tc");
15354
15355   ;
15356   return 0;
15357 }
15358 _ACEOF
15359 rm -f conftest.$ac_objext conftest$ac_exeext
15360 if { (eval echo "$as_me:15360: \"$ac_link\"") >&5
15361   (eval $ac_link) 2>&5
15362   ac_status=$?
15363   echo "$as_me:15363: \$? = $ac_status" >&5
15364   (exit $ac_status); } &&
15365          { ac_try='test -s conftest$ac_exeext'
15366   { (eval echo "$as_me:15366: \"$ac_try\"") >&5
15367   (eval $ac_try) 2>&5
15368   ac_status=$?
15369   echo "$as_me:15369: \$? = $ac_status" >&5
15370   (exit $ac_status); }; }; then
15371   cf_cv_cgetent=yes
15372 else
15373   echo "$as_me: failed program was:" >&5
15374 cat conftest.$ac_ext >&5
15375 cf_cv_cgetent=no
15376 fi
15377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15378
15379 fi
15380 echo "$as_me:15380: result: $cf_cv_cgetent" >&5
15381 echo "${ECHO_T}$cf_cv_cgetent" >&6
15382
15383 if test "$cf_cv_cgetent" = yes
15384 then
15385         cat >>confdefs.h <<\EOF
15386 #define HAVE_BSD_CGETENT 1
15387 EOF
15388
15389 echo "$as_me:15389: checking if cgetent uses const parameter" >&5
15390 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15391 if test "${cf_cv_cgetent_const+set}" = set; then
15392   echo $ECHO_N "(cached) $ECHO_C" >&6
15393 else
15394
15395 cat >conftest.$ac_ext <<_ACEOF
15396 #line 15396 "configure"
15397 #include "confdefs.h"
15398
15399 #include <stdlib.h>
15400 int
15401 main ()
15402 {
15403
15404         char temp[128];
15405         char *buf = temp;
15406 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15407         const char *db_array = temp;
15408         cgetent(&buf, &db_array, "vt100");
15409 #endif
15410         cgetcap(buf, "tc", '=');
15411         cgetmatch(buf, "tc");
15412
15413   ;
15414   return 0;
15415 }
15416 _ACEOF
15417 rm -f conftest.$ac_objext conftest$ac_exeext
15418 if { (eval echo "$as_me:15418: \"$ac_link\"") >&5
15419   (eval $ac_link) 2>&5
15420   ac_status=$?
15421   echo "$as_me:15421: \$? = $ac_status" >&5
15422   (exit $ac_status); } &&
15423          { ac_try='test -s conftest$ac_exeext'
15424   { (eval echo "$as_me:15424: \"$ac_try\"") >&5
15425   (eval $ac_try) 2>&5
15426   ac_status=$?
15427   echo "$as_me:15427: \$? = $ac_status" >&5
15428   (exit $ac_status); }; }; then
15429   cf_cv_cgetent_const=yes
15430 else
15431   echo "$as_me: failed program was:" >&5
15432 cat conftest.$ac_ext >&5
15433 cf_cv_cgetent_const=no
15434 fi
15435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15436
15437 fi
15438 echo "$as_me:15438: result: $cf_cv_cgetent_const" >&5
15439 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15440         if test "$cf_cv_cgetent_const" = yes
15441         then
15442                 cat >>confdefs.h <<EOF
15443 #define CGETENT_CONST const
15444 EOF
15445
15446         fi
15447 fi
15448
15449 fi
15450
15451 echo "$as_me:15451: checking for isascii" >&5
15452 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15453 if test "${cf_cv_have_isascii+set}" = set; then
15454   echo $ECHO_N "(cached) $ECHO_C" >&6
15455 else
15456
15457         cat >conftest.$ac_ext <<_ACEOF
15458 #line 15458 "configure"
15459 #include "confdefs.h"
15460 #include <ctype.h>
15461 int
15462 main ()
15463 {
15464 int x = isascii(' ')
15465   ;
15466   return 0;
15467 }
15468 _ACEOF
15469 rm -f conftest.$ac_objext conftest$ac_exeext
15470 if { (eval echo "$as_me:15470: \"$ac_link\"") >&5
15471   (eval $ac_link) 2>&5
15472   ac_status=$?
15473   echo "$as_me:15473: \$? = $ac_status" >&5
15474   (exit $ac_status); } &&
15475          { ac_try='test -s conftest$ac_exeext'
15476   { (eval echo "$as_me:15476: \"$ac_try\"") >&5
15477   (eval $ac_try) 2>&5
15478   ac_status=$?
15479   echo "$as_me:15479: \$? = $ac_status" >&5
15480   (exit $ac_status); }; }; then
15481   cf_cv_have_isascii=yes
15482 else
15483   echo "$as_me: failed program was:" >&5
15484 cat conftest.$ac_ext >&5
15485 cf_cv_have_isascii=no
15486 fi
15487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15488
15489 fi
15490 echo "$as_me:15490: result: $cf_cv_have_isascii" >&5
15491 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15492 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15493 #define HAVE_ISASCII 1
15494 EOF
15495
15496 if test "$ac_cv_func_sigaction" = yes; then
15497 echo "$as_me:15497: checking whether sigaction needs _POSIX_SOURCE" >&5
15498 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15499 cat >conftest.$ac_ext <<_ACEOF
15500 #line 15500 "configure"
15501 #include "confdefs.h"
15502
15503 #include <sys/types.h>
15504 #include <signal.h>
15505 int
15506 main ()
15507 {
15508 struct sigaction act
15509   ;
15510   return 0;
15511 }
15512 _ACEOF
15513 rm -f conftest.$ac_objext
15514 if { (eval echo "$as_me:15514: \"$ac_compile\"") >&5
15515   (eval $ac_compile) 2>&5
15516   ac_status=$?
15517   echo "$as_me:15517: \$? = $ac_status" >&5
15518   (exit $ac_status); } &&
15519          { ac_try='test -s conftest.$ac_objext'
15520   { (eval echo "$as_me:15520: \"$ac_try\"") >&5
15521   (eval $ac_try) 2>&5
15522   ac_status=$?
15523   echo "$as_me:15523: \$? = $ac_status" >&5
15524   (exit $ac_status); }; }; then
15525   sigact_bad=no
15526 else
15527   echo "$as_me: failed program was:" >&5
15528 cat conftest.$ac_ext >&5
15529
15530 cat >conftest.$ac_ext <<_ACEOF
15531 #line 15531 "configure"
15532 #include "confdefs.h"
15533
15534 #define _POSIX_SOURCE
15535 #include <sys/types.h>
15536 #include <signal.h>
15537 int
15538 main ()
15539 {
15540 struct sigaction act
15541   ;
15542   return 0;
15543 }
15544 _ACEOF
15545 rm -f conftest.$ac_objext
15546 if { (eval echo "$as_me:15546: \"$ac_compile\"") >&5
15547   (eval $ac_compile) 2>&5
15548   ac_status=$?
15549   echo "$as_me:15549: \$? = $ac_status" >&5
15550   (exit $ac_status); } &&
15551          { ac_try='test -s conftest.$ac_objext'
15552   { (eval echo "$as_me:15552: \"$ac_try\"") >&5
15553   (eval $ac_try) 2>&5
15554   ac_status=$?
15555   echo "$as_me:15555: \$? = $ac_status" >&5
15556   (exit $ac_status); }; }; then
15557   sigact_bad=yes
15558          cat >>confdefs.h <<\EOF
15559 #define _POSIX_SOURCE 1
15560 EOF
15561
15562 else
15563   echo "$as_me: failed program was:" >&5
15564 cat conftest.$ac_ext >&5
15565 sigact_bad=unknown
15566 fi
15567 rm -f conftest.$ac_objext conftest.$ac_ext
15568 fi
15569 rm -f conftest.$ac_objext conftest.$ac_ext
15570 echo "$as_me:15570: result: $sigact_bad" >&5
15571 echo "${ECHO_T}$sigact_bad" >&6
15572 fi
15573
15574 echo "$as_me:15574: checking if nanosleep really works" >&5
15575 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15576 if test "${cf_cv_func_nanosleep+set}" = set; then
15577   echo $ECHO_N "(cached) $ECHO_C" >&6
15578 else
15579
15580 if test "$cross_compiling" = yes; then
15581   cf_cv_func_nanosleep=unknown
15582 else
15583   cat >conftest.$ac_ext <<_ACEOF
15584 #line 15584 "configure"
15585 #include "confdefs.h"
15586
15587 #include <stdio.h>
15588 #include <errno.h>
15589 #include <time.h>
15590
15591 #ifdef HAVE_SYS_TIME_H
15592 #include <sys/time.h>
15593 #endif
15594
15595 int main() {
15596         struct timespec ts1, ts2;
15597         int code;
15598         ts1.tv_sec  = 0;
15599         ts1.tv_nsec = 750000000;
15600         ts2.tv_sec  = 0;
15601         ts2.tv_nsec = 0;
15602         errno = 0;
15603         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15604         ${cf_cv_main_return:-return}(code != 0);
15605 }
15606
15607 _ACEOF
15608 rm -f conftest$ac_exeext
15609 if { (eval echo "$as_me:15609: \"$ac_link\"") >&5
15610   (eval $ac_link) 2>&5
15611   ac_status=$?
15612   echo "$as_me:15612: \$? = $ac_status" >&5
15613   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15614   { (eval echo "$as_me:15614: \"$ac_try\"") >&5
15615   (eval $ac_try) 2>&5
15616   ac_status=$?
15617   echo "$as_me:15617: \$? = $ac_status" >&5
15618   (exit $ac_status); }; }; then
15619   cf_cv_func_nanosleep=yes
15620 else
15621   echo "$as_me: program exited with status $ac_status" >&5
15622 echo "$as_me: failed program was:" >&5
15623 cat conftest.$ac_ext >&5
15624 cf_cv_func_nanosleep=no
15625 fi
15626 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15627 fi
15628 fi
15629 echo "$as_me:15629: result: $cf_cv_func_nanosleep" >&5
15630 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15631
15632 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15633 #define HAVE_NANOSLEEP 1
15634 EOF
15635
15636 for ac_header in \
15637 termio.h \
15638 termios.h \
15639 unistd.h \
15640
15641 do
15642 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15643 echo "$as_me:15643: checking for $ac_header" >&5
15644 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15645 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15646   echo $ECHO_N "(cached) $ECHO_C" >&6
15647 else
15648   cat >conftest.$ac_ext <<_ACEOF
15649 #line 15649 "configure"
15650 #include "confdefs.h"
15651 #include <$ac_header>
15652 _ACEOF
15653 if { (eval echo "$as_me:15653: \"$ac_cpp conftest.$ac_ext\"") >&5
15654   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15655   ac_status=$?
15656   egrep -v '^ *\+' conftest.er1 >conftest.err
15657   rm -f conftest.er1
15658   cat conftest.err >&5
15659   echo "$as_me:15659: \$? = $ac_status" >&5
15660   (exit $ac_status); } >/dev/null; then
15661   if test -s conftest.err; then
15662     ac_cpp_err=$ac_c_preproc_warn_flag
15663   else
15664     ac_cpp_err=
15665   fi
15666 else
15667   ac_cpp_err=yes
15668 fi
15669 if test -z "$ac_cpp_err"; then
15670   eval "$as_ac_Header=yes"
15671 else
15672   echo "$as_me: failed program was:" >&5
15673   cat conftest.$ac_ext >&5
15674   eval "$as_ac_Header=no"
15675 fi
15676 rm -f conftest.err conftest.$ac_ext
15677 fi
15678 echo "$as_me:15678: result: `eval echo '${'$as_ac_Header'}'`" >&5
15679 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15680 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15681   cat >>confdefs.h <<EOF
15682 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15683 EOF
15684
15685 fi
15686 done
15687
15688 if test "$ISC" = yes ; then
15689
15690 for ac_header in sys/termio.h
15691 do
15692 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15693 echo "$as_me:15693: checking for $ac_header" >&5
15694 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15695 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15696   echo $ECHO_N "(cached) $ECHO_C" >&6
15697 else
15698   cat >conftest.$ac_ext <<_ACEOF
15699 #line 15699 "configure"
15700 #include "confdefs.h"
15701 #include <$ac_header>
15702 _ACEOF
15703 if { (eval echo "$as_me:15703: \"$ac_cpp conftest.$ac_ext\"") >&5
15704   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15705   ac_status=$?
15706   egrep -v '^ *\+' conftest.er1 >conftest.err
15707   rm -f conftest.er1
15708   cat conftest.err >&5
15709   echo "$as_me:15709: \$? = $ac_status" >&5
15710   (exit $ac_status); } >/dev/null; then
15711   if test -s conftest.err; then
15712     ac_cpp_err=$ac_c_preproc_warn_flag
15713   else
15714     ac_cpp_err=
15715   fi
15716 else
15717   ac_cpp_err=yes
15718 fi
15719 if test -z "$ac_cpp_err"; then
15720   eval "$as_ac_Header=yes"
15721 else
15722   echo "$as_me: failed program was:" >&5
15723   cat conftest.$ac_ext >&5
15724   eval "$as_ac_Header=no"
15725 fi
15726 rm -f conftest.err conftest.$ac_ext
15727 fi
15728 echo "$as_me:15728: result: `eval echo '${'$as_ac_Header'}'`" >&5
15729 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15730 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15731   cat >>confdefs.h <<EOF
15732 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15733 EOF
15734
15735 fi
15736 done
15737
15738 fi
15739 if test "$ac_cv_header_termios_h" = yes ; then
15740         case "$CFLAGS $CPPFLAGS" in
15741         *-D_POSIX_SOURCE*)
15742                 termios_bad=dunno ;;
15743         *)      termios_bad=maybe ;;
15744         esac
15745         if test "$termios_bad" = maybe ; then
15746         echo "$as_me:15746: checking whether termios.h needs _POSIX_SOURCE" >&5
15747 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15748         cat >conftest.$ac_ext <<_ACEOF
15749 #line 15749 "configure"
15750 #include "confdefs.h"
15751 #include <termios.h>
15752 int
15753 main ()
15754 {
15755 struct termios foo; int x = foo.c_iflag
15756   ;
15757   return 0;
15758 }
15759 _ACEOF
15760 rm -f conftest.$ac_objext
15761 if { (eval echo "$as_me:15761: \"$ac_compile\"") >&5
15762   (eval $ac_compile) 2>&5
15763   ac_status=$?
15764   echo "$as_me:15764: \$? = $ac_status" >&5
15765   (exit $ac_status); } &&
15766          { ac_try='test -s conftest.$ac_objext'
15767   { (eval echo "$as_me:15767: \"$ac_try\"") >&5
15768   (eval $ac_try) 2>&5
15769   ac_status=$?
15770   echo "$as_me:15770: \$? = $ac_status" >&5
15771   (exit $ac_status); }; }; then
15772   termios_bad=no
15773 else
15774   echo "$as_me: failed program was:" >&5
15775 cat conftest.$ac_ext >&5
15776
15777                 cat >conftest.$ac_ext <<_ACEOF
15778 #line 15778 "configure"
15779 #include "confdefs.h"
15780
15781 #define _POSIX_SOURCE
15782 #include <termios.h>
15783 int
15784 main ()
15785 {
15786 struct termios foo; int x = foo.c_iflag
15787   ;
15788   return 0;
15789 }
15790 _ACEOF
15791 rm -f conftest.$ac_objext
15792 if { (eval echo "$as_me:15792: \"$ac_compile\"") >&5
15793   (eval $ac_compile) 2>&5
15794   ac_status=$?
15795   echo "$as_me:15795: \$? = $ac_status" >&5
15796   (exit $ac_status); } &&
15797          { ac_try='test -s conftest.$ac_objext'
15798   { (eval echo "$as_me:15798: \"$ac_try\"") >&5
15799   (eval $ac_try) 2>&5
15800   ac_status=$?
15801   echo "$as_me:15801: \$? = $ac_status" >&5
15802   (exit $ac_status); }; }; then
15803   termios_bad=unknown
15804 else
15805   echo "$as_me: failed program was:" >&5
15806 cat conftest.$ac_ext >&5
15807 termios_bad=yes cat >>confdefs.h <<\EOF
15808 #define _POSIX_SOURCE 1
15809 EOF
15810
15811 fi
15812 rm -f conftest.$ac_objext conftest.$ac_ext
15813
15814 fi
15815 rm -f conftest.$ac_objext conftest.$ac_ext
15816         echo "$as_me:15816: result: $termios_bad" >&5
15817 echo "${ECHO_T}$termios_bad" >&6
15818         fi
15819 fi
15820
15821 echo "$as_me:15821: checking for tcgetattr" >&5
15822 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15823 if test "${cf_cv_have_tcgetattr+set}" = set; then
15824   echo $ECHO_N "(cached) $ECHO_C" >&6
15825 else
15826
15827 cat >conftest.$ac_ext <<_ACEOF
15828 #line 15828 "configure"
15829 #include "confdefs.h"
15830
15831 #include <sys/types.h>
15832 #ifdef HAVE_UNISTD_H
15833 #include <unistd.h>
15834 #endif
15835 #ifdef HAVE_TERMIOS_H
15836 #include <termios.h>
15837 #define TTY struct termios
15838 #else
15839 #ifdef HAVE_TERMIO_H
15840 #include <termio.h>
15841 #define TTY struct termio
15842 #endif
15843 #endif
15844
15845 int
15846 main ()
15847 {
15848
15849 TTY foo;
15850 tcgetattr(1, &foo);
15851   ;
15852   return 0;
15853 }
15854 _ACEOF
15855 rm -f conftest.$ac_objext conftest$ac_exeext
15856 if { (eval echo "$as_me:15856: \"$ac_link\"") >&5
15857   (eval $ac_link) 2>&5
15858   ac_status=$?
15859   echo "$as_me:15859: \$? = $ac_status" >&5
15860   (exit $ac_status); } &&
15861          { ac_try='test -s conftest$ac_exeext'
15862   { (eval echo "$as_me:15862: \"$ac_try\"") >&5
15863   (eval $ac_try) 2>&5
15864   ac_status=$?
15865   echo "$as_me:15865: \$? = $ac_status" >&5
15866   (exit $ac_status); }; }; then
15867   cf_cv_have_tcgetattr=yes
15868 else
15869   echo "$as_me: failed program was:" >&5
15870 cat conftest.$ac_ext >&5
15871 cf_cv_have_tcgetattr=no
15872 fi
15873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15874 fi
15875 echo "$as_me:15875: result: $cf_cv_have_tcgetattr" >&5
15876 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15877 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15878 #define HAVE_TCGETATTR 1
15879 EOF
15880
15881 echo "$as_me:15881: checking for vsscanf function or workaround" >&5
15882 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15883 if test "${cf_cv_func_vsscanf+set}" = set; then
15884   echo $ECHO_N "(cached) $ECHO_C" >&6
15885 else
15886
15887 cat >conftest.$ac_ext <<_ACEOF
15888 #line 15888 "configure"
15889 #include "confdefs.h"
15890
15891 #include <stdarg.h>
15892 #include <stdio.h>
15893 int
15894 main ()
15895 {
15896
15897         va_list ap;
15898         vsscanf("from", "%d", ap)
15899   ;
15900   return 0;
15901 }
15902 _ACEOF
15903 rm -f conftest.$ac_objext conftest$ac_exeext
15904 if { (eval echo "$as_me:15904: \"$ac_link\"") >&5
15905   (eval $ac_link) 2>&5
15906   ac_status=$?
15907   echo "$as_me:15907: \$? = $ac_status" >&5
15908   (exit $ac_status); } &&
15909          { ac_try='test -s conftest$ac_exeext'
15910   { (eval echo "$as_me:15910: \"$ac_try\"") >&5
15911   (eval $ac_try) 2>&5
15912   ac_status=$?
15913   echo "$as_me:15913: \$? = $ac_status" >&5
15914   (exit $ac_status); }; }; then
15915   cf_cv_func_vsscanf=vsscanf
15916 else
15917   echo "$as_me: failed program was:" >&5
15918 cat conftest.$ac_ext >&5
15919
15920 cat >conftest.$ac_ext <<_ACEOF
15921 #line 15921 "configure"
15922 #include "confdefs.h"
15923
15924 #include <stdarg.h>
15925 #include <stdio.h>
15926 int
15927 main ()
15928 {
15929
15930     FILE strbuf;
15931     char *str = "from";
15932
15933     strbuf._flag = _IOREAD;
15934     strbuf._ptr = strbuf._base = (unsigned char *) str;
15935     strbuf._cnt = strlen(str);
15936     strbuf._file = _NFILE;
15937     return (vfscanf(&strbuf, "%d", ap))
15938   ;
15939   return 0;
15940 }
15941 _ACEOF
15942 rm -f conftest.$ac_objext conftest$ac_exeext
15943 if { (eval echo "$as_me:15943: \"$ac_link\"") >&5
15944   (eval $ac_link) 2>&5
15945   ac_status=$?
15946   echo "$as_me:15946: \$? = $ac_status" >&5
15947   (exit $ac_status); } &&
15948          { ac_try='test -s conftest$ac_exeext'
15949   { (eval echo "$as_me:15949: \"$ac_try\"") >&5
15950   (eval $ac_try) 2>&5
15951   ac_status=$?
15952   echo "$as_me:15952: \$? = $ac_status" >&5
15953   (exit $ac_status); }; }; then
15954   cf_cv_func_vsscanf=vfscanf
15955 else
15956   echo "$as_me: failed program was:" >&5
15957 cat conftest.$ac_ext >&5
15958
15959 cat >conftest.$ac_ext <<_ACEOF
15960 #line 15960 "configure"
15961 #include "confdefs.h"
15962
15963 #include <stdarg.h>
15964 #include <stdio.h>
15965 int
15966 main ()
15967 {
15968
15969     FILE strbuf;
15970     char *str = "from";
15971
15972     strbuf._flag = _IOREAD;
15973     strbuf._ptr = strbuf._base = (unsigned char *) str;
15974     strbuf._cnt = strlen(str);
15975     strbuf._file = _NFILE;
15976     return (_doscan(&strbuf, "%d", ap))
15977   ;
15978   return 0;
15979 }
15980 _ACEOF
15981 rm -f conftest.$ac_objext conftest$ac_exeext
15982 if { (eval echo "$as_me:15982: \"$ac_link\"") >&5
15983   (eval $ac_link) 2>&5
15984   ac_status=$?
15985   echo "$as_me:15985: \$? = $ac_status" >&5
15986   (exit $ac_status); } &&
15987          { ac_try='test -s conftest$ac_exeext'
15988   { (eval echo "$as_me:15988: \"$ac_try\"") >&5
15989   (eval $ac_try) 2>&5
15990   ac_status=$?
15991   echo "$as_me:15991: \$? = $ac_status" >&5
15992   (exit $ac_status); }; }; then
15993   cf_cv_func_vsscanf=_doscan
15994 else
15995   echo "$as_me: failed program was:" >&5
15996 cat conftest.$ac_ext >&5
15997
15998 cf_cv_func_vsscanf=no
15999 fi
16000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16001 fi
16002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16003 fi
16004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16005 fi
16006 echo "$as_me:16006: result: $cf_cv_func_vsscanf" >&5
16007 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16008
16009 case $cf_cv_func_vsscanf in #(vi
16010 vsscanf) cat >>confdefs.h <<\EOF
16011 #define HAVE_VSSCANF 1
16012 EOF
16013 ;; #(vi
16014 vfscanf) cat >>confdefs.h <<\EOF
16015 #define HAVE_VFSCANF 1
16016 EOF
16017 ;; #(vi
16018 _doscan) cat >>confdefs.h <<\EOF
16019 #define HAVE__DOSCAN 1
16020 EOF
16021 ;;
16022 esac
16023
16024 echo "$as_me:16024: checking for working mkstemp" >&5
16025 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16026 if test "${cf_cv_func_mkstemp+set}" = set; then
16027   echo $ECHO_N "(cached) $ECHO_C" >&6
16028 else
16029
16030 rm -rf conftest*
16031 if test "$cross_compiling" = yes; then
16032   echo "$as_me:16032: checking for mkstemp" >&5
16033 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16034 if test "${ac_cv_func_mkstemp+set}" = set; then
16035   echo $ECHO_N "(cached) $ECHO_C" >&6
16036 else
16037   cat >conftest.$ac_ext <<_ACEOF
16038 #line 16038 "configure"
16039 #include "confdefs.h"
16040 /* System header to define __stub macros and hopefully few prototypes,
16041     which can conflict with char mkstemp (); below.  */
16042 #include <assert.h>
16043 /* Override any gcc2 internal prototype to avoid an error.  */
16044 #ifdef __cplusplus
16045 extern "C"
16046 #endif
16047 /* We use char because int might match the return type of a gcc2
16048    builtin and then its argument prototype would still apply.  */
16049 char mkstemp ();
16050 char (*f) ();
16051
16052 int
16053 main ()
16054 {
16055 /* The GNU C library defines this for functions which it implements
16056     to always fail with ENOSYS.  Some functions are actually named
16057     something starting with __ and the normal name is an alias.  */
16058 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16059 choke me
16060 #else
16061 f = mkstemp;
16062 #endif
16063
16064   ;
16065   return 0;
16066 }
16067 _ACEOF
16068 rm -f conftest.$ac_objext conftest$ac_exeext
16069 if { (eval echo "$as_me:16069: \"$ac_link\"") >&5
16070   (eval $ac_link) 2>&5
16071   ac_status=$?
16072   echo "$as_me:16072: \$? = $ac_status" >&5
16073   (exit $ac_status); } &&
16074          { ac_try='test -s conftest$ac_exeext'
16075   { (eval echo "$as_me:16075: \"$ac_try\"") >&5
16076   (eval $ac_try) 2>&5
16077   ac_status=$?
16078   echo "$as_me:16078: \$? = $ac_status" >&5
16079   (exit $ac_status); }; }; then
16080   ac_cv_func_mkstemp=yes
16081 else
16082   echo "$as_me: failed program was:" >&5
16083 cat conftest.$ac_ext >&5
16084 ac_cv_func_mkstemp=no
16085 fi
16086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16087 fi
16088 echo "$as_me:16088: result: $ac_cv_func_mkstemp" >&5
16089 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16090
16091 else
16092   cat >conftest.$ac_ext <<_ACEOF
16093 #line 16093 "configure"
16094 #include "confdefs.h"
16095
16096 #include <sys/types.h>
16097 #include <stdlib.h>
16098 #include <stdio.h>
16099 #include <string.h>
16100 #include <sys/stat.h>
16101 int main()
16102 {
16103         char *tmpl = "conftestXXXXXX";
16104         char name[2][80];
16105         int n;
16106         int result = 0;
16107         int fd;
16108         struct stat sb;
16109
16110         umask(077);
16111         for (n = 0; n < 2; ++n) {
16112                 strcpy(name[n], tmpl);
16113                 if ((fd = mkstemp(name[n])) >= 0) {
16114                         if (!strcmp(name[n], tmpl)
16115                          || stat(name[n], &sb) != 0
16116                          || (sb.st_mode & S_IFMT) != S_IFREG
16117                          || (sb.st_mode & 077) != 0) {
16118                                 result = 1;
16119                         }
16120                         close(fd);
16121                 }
16122         }
16123         if (result == 0
16124          && !strcmp(name[0], name[1]))
16125                 result = 1;
16126         ${cf_cv_main_return:-return}(result);
16127 }
16128
16129 _ACEOF
16130 rm -f conftest$ac_exeext
16131 if { (eval echo "$as_me:16131: \"$ac_link\"") >&5
16132   (eval $ac_link) 2>&5
16133   ac_status=$?
16134   echo "$as_me:16134: \$? = $ac_status" >&5
16135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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_func_mkstemp=yes
16142
16143 else
16144   echo "$as_me: program exited with status $ac_status" >&5
16145 echo "$as_me: failed program was:" >&5
16146 cat conftest.$ac_ext >&5
16147 cf_cv_func_mkstemp=no
16148
16149 fi
16150 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16151 fi
16152
16153 fi
16154 echo "$as_me:16154: result: $cf_cv_func_mkstemp" >&5
16155 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16156 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16157         cat >>confdefs.h <<\EOF
16158 #define HAVE_MKSTEMP 1
16159 EOF
16160
16161 fi
16162
16163 # setup for prototype of fallback for vsscanf()
16164
16165 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16166         HAVE_VSSCANF=1
16167 else
16168         HAVE_VSSCANF=0
16169 fi
16170
16171 if test "$cross_compiling" = yes ; then
16172         { echo "$as_me:16172: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16173 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16174 else
16175         echo "$as_me:16175: checking whether setvbuf arguments are reversed" >&5
16176 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16177 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16178   echo $ECHO_N "(cached) $ECHO_C" >&6
16179 else
16180   if test "$cross_compiling" = yes; then
16181   { { echo "$as_me:16181: error: cannot run test program while cross compiling" >&5
16182 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16183    { (exit 1); exit 1; }; }
16184 else
16185   cat >conftest.$ac_ext <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16188 #include <stdio.h>
16189 /* If setvbuf has the reversed format, exit 0. */
16190 int
16191 main ()
16192 {
16193   /* This call has the arguments reversed.
16194      A reversed system may check and see that the address of main
16195      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16196   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16197     $ac_main_return(1);
16198   putc('\r', stdout);
16199   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16200 }
16201 _ACEOF
16202 rm -f conftest$ac_exeext
16203 if { (eval echo "$as_me:16203: \"$ac_link\"") >&5
16204   (eval $ac_link) 2>&5
16205   ac_status=$?
16206   echo "$as_me:16206: \$? = $ac_status" >&5
16207   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16208   { (eval echo "$as_me:16208: \"$ac_try\"") >&5
16209   (eval $ac_try) 2>&5
16210   ac_status=$?
16211   echo "$as_me:16211: \$? = $ac_status" >&5
16212   (exit $ac_status); }; }; then
16213   ac_cv_func_setvbuf_reversed=yes
16214 else
16215   echo "$as_me: program exited with status $ac_status" >&5
16216 echo "$as_me: failed program was:" >&5
16217 cat conftest.$ac_ext >&5
16218 ac_cv_func_setvbuf_reversed=no
16219 fi
16220 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16221 fi
16222 rm -f core core.* *.core
16223 fi
16224 echo "$as_me:16224: result: $ac_cv_func_setvbuf_reversed" >&5
16225 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16226 if test $ac_cv_func_setvbuf_reversed = yes; then
16227
16228 cat >>confdefs.h <<\EOF
16229 #define SETVBUF_REVERSED 1
16230 EOF
16231
16232 fi
16233
16234 fi
16235 echo "$as_me:16235: checking return type of signal handlers" >&5
16236 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16237 if test "${ac_cv_type_signal+set}" = set; then
16238   echo $ECHO_N "(cached) $ECHO_C" >&6
16239 else
16240   cat >conftest.$ac_ext <<_ACEOF
16241 #line 16241 "configure"
16242 #include "confdefs.h"
16243 #include <sys/types.h>
16244 #include <signal.h>
16245 #ifdef signal
16246 # undef signal
16247 #endif
16248 #ifdef __cplusplus
16249 extern "C" void (*signal (int, void (*)(int)))(int);
16250 #else
16251 void (*signal ()) ();
16252 #endif
16253
16254 int
16255 main ()
16256 {
16257 int i;
16258   ;
16259   return 0;
16260 }
16261 _ACEOF
16262 rm -f conftest.$ac_objext
16263 if { (eval echo "$as_me:16263: \"$ac_compile\"") >&5
16264   (eval $ac_compile) 2>&5
16265   ac_status=$?
16266   echo "$as_me:16266: \$? = $ac_status" >&5
16267   (exit $ac_status); } &&
16268          { ac_try='test -s conftest.$ac_objext'
16269   { (eval echo "$as_me:16269: \"$ac_try\"") >&5
16270   (eval $ac_try) 2>&5
16271   ac_status=$?
16272   echo "$as_me:16272: \$? = $ac_status" >&5
16273   (exit $ac_status); }; }; then
16274   ac_cv_type_signal=void
16275 else
16276   echo "$as_me: failed program was:" >&5
16277 cat conftest.$ac_ext >&5
16278 ac_cv_type_signal=int
16279 fi
16280 rm -f conftest.$ac_objext conftest.$ac_ext
16281 fi
16282 echo "$as_me:16282: result: $ac_cv_type_signal" >&5
16283 echo "${ECHO_T}$ac_cv_type_signal" >&6
16284
16285 cat >>confdefs.h <<EOF
16286 #define RETSIGTYPE $ac_cv_type_signal
16287 EOF
16288
16289 echo "$as_me:16289: checking for intptr_t" >&5
16290 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16291 if test "${ac_cv_type_intptr_t+set}" = set; then
16292   echo $ECHO_N "(cached) $ECHO_C" >&6
16293 else
16294   cat >conftest.$ac_ext <<_ACEOF
16295 #line 16295 "configure"
16296 #include "confdefs.h"
16297 $ac_includes_default
16298 int
16299 main ()
16300 {
16301 if ((intptr_t *) 0)
16302   return 0;
16303 if (sizeof (intptr_t))
16304   return 0;
16305   ;
16306   return 0;
16307 }
16308 _ACEOF
16309 rm -f conftest.$ac_objext
16310 if { (eval echo "$as_me:16310: \"$ac_compile\"") >&5
16311   (eval $ac_compile) 2>&5
16312   ac_status=$?
16313   echo "$as_me:16313: \$? = $ac_status" >&5
16314   (exit $ac_status); } &&
16315          { ac_try='test -s conftest.$ac_objext'
16316   { (eval echo "$as_me:16316: \"$ac_try\"") >&5
16317   (eval $ac_try) 2>&5
16318   ac_status=$?
16319   echo "$as_me:16319: \$? = $ac_status" >&5
16320   (exit $ac_status); }; }; then
16321   ac_cv_type_intptr_t=yes
16322 else
16323   echo "$as_me: failed program was:" >&5
16324 cat conftest.$ac_ext >&5
16325 ac_cv_type_intptr_t=no
16326 fi
16327 rm -f conftest.$ac_objext conftest.$ac_ext
16328 fi
16329 echo "$as_me:16329: result: $ac_cv_type_intptr_t" >&5
16330 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16331 if test $ac_cv_type_intptr_t = yes; then
16332   :
16333 else
16334
16335 cat >>confdefs.h <<EOF
16336 #define intptr_t long
16337 EOF
16338
16339 fi
16340
16341 echo "$as_me:16341: checking for type sigaction_t" >&5
16342 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16343 if test "${cf_cv_type_sigaction+set}" = set; then
16344   echo $ECHO_N "(cached) $ECHO_C" >&6
16345 else
16346
16347         cat >conftest.$ac_ext <<_ACEOF
16348 #line 16348 "configure"
16349 #include "confdefs.h"
16350
16351 #include <signal.h>
16352 int
16353 main ()
16354 {
16355 sigaction_t x
16356   ;
16357   return 0;
16358 }
16359 _ACEOF
16360 rm -f conftest.$ac_objext
16361 if { (eval echo "$as_me:16361: \"$ac_compile\"") >&5
16362   (eval $ac_compile) 2>&5
16363   ac_status=$?
16364   echo "$as_me:16364: \$? = $ac_status" >&5
16365   (exit $ac_status); } &&
16366          { ac_try='test -s conftest.$ac_objext'
16367   { (eval echo "$as_me:16367: \"$ac_try\"") >&5
16368   (eval $ac_try) 2>&5
16369   ac_status=$?
16370   echo "$as_me:16370: \$? = $ac_status" >&5
16371   (exit $ac_status); }; }; then
16372   cf_cv_type_sigaction=yes
16373 else
16374   echo "$as_me: failed program was:" >&5
16375 cat conftest.$ac_ext >&5
16376 cf_cv_type_sigaction=no
16377 fi
16378 rm -f conftest.$ac_objext conftest.$ac_ext
16379 fi
16380
16381 echo "$as_me:16381: result: $cf_cv_type_sigaction" >&5
16382 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16383 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16384 #define HAVE_TYPE_SIGACTION 1
16385 EOF
16386
16387 echo "$as_me:16387: checking declaration of size-change" >&5
16388 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16389 if test "${cf_cv_sizechange+set}" = set; then
16390   echo $ECHO_N "(cached) $ECHO_C" >&6
16391 else
16392
16393     cf_cv_sizechange=unknown
16394     cf_save_CPPFLAGS="$CPPFLAGS"
16395
16396 for cf_opts in "" "NEED_PTEM_H"
16397 do
16398
16399     CPPFLAGS="$cf_save_CPPFLAGS"
16400     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16401     cat >conftest.$ac_ext <<_ACEOF
16402 #line 16402 "configure"
16403 #include "confdefs.h"
16404 #include <sys/types.h>
16405 #ifdef HAVE_TERMIOS_H
16406 #include <termios.h>
16407 #else
16408 #ifdef HAVE_TERMIO_H
16409 #include <termio.h>
16410 #endif
16411 #endif
16412 #ifdef NEED_PTEM_H
16413 /* This is a workaround for SCO:  they neglected to define struct winsize in
16414  * termios.h -- it's only in termio.h and ptem.h
16415  */
16416 #include        <sys/stream.h>
16417 #include        <sys/ptem.h>
16418 #endif
16419 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16420 #include <sys/ioctl.h>
16421 #endif
16422
16423 int
16424 main ()
16425 {
16426
16427 #ifdef TIOCGSIZE
16428         struct ttysize win;     /* FIXME: what system is this? */
16429         int y = win.ts_lines;
16430         int x = win.ts_cols;
16431 #else
16432 #ifdef TIOCGWINSZ
16433         struct winsize win;
16434         int y = win.ws_row;
16435         int x = win.ws_col;
16436 #else
16437         no TIOCGSIZE or TIOCGWINSZ
16438 #endif /* TIOCGWINSZ */
16439 #endif /* TIOCGSIZE */
16440
16441   ;
16442   return 0;
16443 }
16444 _ACEOF
16445 rm -f conftest.$ac_objext
16446 if { (eval echo "$as_me:16446: \"$ac_compile\"") >&5
16447   (eval $ac_compile) 2>&5
16448   ac_status=$?
16449   echo "$as_me:16449: \$? = $ac_status" >&5
16450   (exit $ac_status); } &&
16451          { ac_try='test -s conftest.$ac_objext'
16452   { (eval echo "$as_me:16452: \"$ac_try\"") >&5
16453   (eval $ac_try) 2>&5
16454   ac_status=$?
16455   echo "$as_me:16455: \$? = $ac_status" >&5
16456   (exit $ac_status); }; }; then
16457   cf_cv_sizechange=yes
16458 else
16459   echo "$as_me: failed program was:" >&5
16460 cat conftest.$ac_ext >&5
16461 cf_cv_sizechange=no
16462 fi
16463 rm -f conftest.$ac_objext conftest.$ac_ext
16464
16465         CPPFLAGS="$cf_save_CPPFLAGS"
16466         if test "$cf_cv_sizechange" = yes ; then
16467                 echo "size-change succeeded ($cf_opts)" >&5
16468                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16469                 break
16470         fi
16471 done
16472
16473 fi
16474 echo "$as_me:16474: result: $cf_cv_sizechange" >&5
16475 echo "${ECHO_T}$cf_cv_sizechange" >&6
16476 if test "$cf_cv_sizechange" != no ; then
16477         cat >>confdefs.h <<\EOF
16478 #define HAVE_SIZECHANGE 1
16479 EOF
16480
16481         case $cf_cv_sizechange in #(vi
16482         NEED*)
16483                 cat >>confdefs.h <<EOF
16484 #define $cf_cv_sizechange  1
16485 EOF
16486
16487                 ;;
16488         esac
16489 fi
16490
16491 echo "$as_me:16491: checking for memmove" >&5
16492 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16493 if test "${ac_cv_func_memmove+set}" = set; then
16494   echo $ECHO_N "(cached) $ECHO_C" >&6
16495 else
16496   cat >conftest.$ac_ext <<_ACEOF
16497 #line 16497 "configure"
16498 #include "confdefs.h"
16499 /* System header to define __stub macros and hopefully few prototypes,
16500     which can conflict with char memmove (); below.  */
16501 #include <assert.h>
16502 /* Override any gcc2 internal prototype to avoid an error.  */
16503 #ifdef __cplusplus
16504 extern "C"
16505 #endif
16506 /* We use char because int might match the return type of a gcc2
16507    builtin and then its argument prototype would still apply.  */
16508 char memmove ();
16509 char (*f) ();
16510
16511 int
16512 main ()
16513 {
16514 /* The GNU C library defines this for functions which it implements
16515     to always fail with ENOSYS.  Some functions are actually named
16516     something starting with __ and the normal name is an alias.  */
16517 #if defined (__stub_memmove) || defined (__stub___memmove)
16518 choke me
16519 #else
16520 f = memmove;
16521 #endif
16522
16523   ;
16524   return 0;
16525 }
16526 _ACEOF
16527 rm -f conftest.$ac_objext conftest$ac_exeext
16528 if { (eval echo "$as_me:16528: \"$ac_link\"") >&5
16529   (eval $ac_link) 2>&5
16530   ac_status=$?
16531   echo "$as_me:16531: \$? = $ac_status" >&5
16532   (exit $ac_status); } &&
16533          { ac_try='test -s conftest$ac_exeext'
16534   { (eval echo "$as_me:16534: \"$ac_try\"") >&5
16535   (eval $ac_try) 2>&5
16536   ac_status=$?
16537   echo "$as_me:16537: \$? = $ac_status" >&5
16538   (exit $ac_status); }; }; then
16539   ac_cv_func_memmove=yes
16540 else
16541   echo "$as_me: failed program was:" >&5
16542 cat conftest.$ac_ext >&5
16543 ac_cv_func_memmove=no
16544 fi
16545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16546 fi
16547 echo "$as_me:16547: result: $ac_cv_func_memmove" >&5
16548 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16549 if test $ac_cv_func_memmove = yes; then
16550   :
16551 else
16552
16553 echo "$as_me:16553: checking for bcopy" >&5
16554 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16555 if test "${ac_cv_func_bcopy+set}" = set; then
16556   echo $ECHO_N "(cached) $ECHO_C" >&6
16557 else
16558   cat >conftest.$ac_ext <<_ACEOF
16559 #line 16559 "configure"
16560 #include "confdefs.h"
16561 /* System header to define __stub macros and hopefully few prototypes,
16562     which can conflict with char bcopy (); below.  */
16563 #include <assert.h>
16564 /* Override any gcc2 internal prototype to avoid an error.  */
16565 #ifdef __cplusplus
16566 extern "C"
16567 #endif
16568 /* We use char because int might match the return type of a gcc2
16569    builtin and then its argument prototype would still apply.  */
16570 char bcopy ();
16571 char (*f) ();
16572
16573 int
16574 main ()
16575 {
16576 /* The GNU C library defines this for functions which it implements
16577     to always fail with ENOSYS.  Some functions are actually named
16578     something starting with __ and the normal name is an alias.  */
16579 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16580 choke me
16581 #else
16582 f = bcopy;
16583 #endif
16584
16585   ;
16586   return 0;
16587 }
16588 _ACEOF
16589 rm -f conftest.$ac_objext conftest$ac_exeext
16590 if { (eval echo "$as_me:16590: \"$ac_link\"") >&5
16591   (eval $ac_link) 2>&5
16592   ac_status=$?
16593   echo "$as_me:16593: \$? = $ac_status" >&5
16594   (exit $ac_status); } &&
16595          { ac_try='test -s conftest$ac_exeext'
16596   { (eval echo "$as_me:16596: \"$ac_try\"") >&5
16597   (eval $ac_try) 2>&5
16598   ac_status=$?
16599   echo "$as_me:16599: \$? = $ac_status" >&5
16600   (exit $ac_status); }; }; then
16601   ac_cv_func_bcopy=yes
16602 else
16603   echo "$as_me: failed program was:" >&5
16604 cat conftest.$ac_ext >&5
16605 ac_cv_func_bcopy=no
16606 fi
16607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16608 fi
16609 echo "$as_me:16609: result: $ac_cv_func_bcopy" >&5
16610 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16611 if test $ac_cv_func_bcopy = yes; then
16612
16613         echo "$as_me:16613: checking if bcopy does overlapping moves" >&5
16614 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16615 if test "${cf_cv_good_bcopy+set}" = set; then
16616   echo $ECHO_N "(cached) $ECHO_C" >&6
16617 else
16618
16619                 if test "$cross_compiling" = yes; then
16620   cf_cv_good_bcopy=unknown
16621 else
16622   cat >conftest.$ac_ext <<_ACEOF
16623 #line 16623 "configure"
16624 #include "confdefs.h"
16625
16626 int main() {
16627         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16628         char temp[40];
16629         bcopy(data, temp, sizeof(data));
16630         bcopy(temp+10, temp, 15);
16631         bcopy(temp+5, temp+15, 10);
16632         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16633 }
16634
16635 _ACEOF
16636 rm -f conftest$ac_exeext
16637 if { (eval echo "$as_me:16637: \"$ac_link\"") >&5
16638   (eval $ac_link) 2>&5
16639   ac_status=$?
16640   echo "$as_me:16640: \$? = $ac_status" >&5
16641   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16642   { (eval echo "$as_me:16642: \"$ac_try\"") >&5
16643   (eval $ac_try) 2>&5
16644   ac_status=$?
16645   echo "$as_me:16645: \$? = $ac_status" >&5
16646   (exit $ac_status); }; }; then
16647   cf_cv_good_bcopy=yes
16648 else
16649   echo "$as_me: program exited with status $ac_status" >&5
16650 echo "$as_me: failed program was:" >&5
16651 cat conftest.$ac_ext >&5
16652 cf_cv_good_bcopy=no
16653 fi
16654 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16655 fi
16656
16657 fi
16658 echo "$as_me:16658: result: $cf_cv_good_bcopy" >&5
16659 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16660
16661 else
16662   cf_cv_good_bcopy=no
16663 fi
16664
16665         if test "$cf_cv_good_bcopy" = yes ; then
16666                 cat >>confdefs.h <<\EOF
16667 #define USE_OK_BCOPY 1
16668 EOF
16669
16670         else
16671                 cat >>confdefs.h <<\EOF
16672 #define USE_MY_MEMMOVE 1
16673 EOF
16674
16675         fi
16676
16677 fi
16678
16679 echo "$as_me:16679: checking if poll really works" >&5
16680 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16681 if test "${cf_cv_working_poll+set}" = set; then
16682   echo $ECHO_N "(cached) $ECHO_C" >&6
16683 else
16684
16685 if test "$cross_compiling" = yes; then
16686   cf_cv_working_poll=unknown
16687 else
16688   cat >conftest.$ac_ext <<_ACEOF
16689 #line 16689 "configure"
16690 #include "confdefs.h"
16691
16692 #include <stdio.h>
16693 #ifdef HAVE_POLL_H
16694 #include <poll.h>
16695 #else
16696 #include <sys/poll.h>
16697 #endif
16698 int main() {
16699         struct pollfd myfds;
16700         int ret;
16701
16702         myfds.fd = 0;
16703         myfds.events = POLLIN;
16704
16705         ret = poll(&myfds, 1, 100);
16706         ${cf_cv_main_return:-return}(ret != 0);
16707 }
16708 _ACEOF
16709 rm -f conftest$ac_exeext
16710 if { (eval echo "$as_me:16710: \"$ac_link\"") >&5
16711   (eval $ac_link) 2>&5
16712   ac_status=$?
16713   echo "$as_me:16713: \$? = $ac_status" >&5
16714   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16715   { (eval echo "$as_me:16715: \"$ac_try\"") >&5
16716   (eval $ac_try) 2>&5
16717   ac_status=$?
16718   echo "$as_me:16718: \$? = $ac_status" >&5
16719   (exit $ac_status); }; }; then
16720   cf_cv_working_poll=yes
16721 else
16722   echo "$as_me: program exited with status $ac_status" >&5
16723 echo "$as_me: failed program was:" >&5
16724 cat conftest.$ac_ext >&5
16725 cf_cv_working_poll=no
16726 fi
16727 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16728 fi
16729 fi
16730 echo "$as_me:16730: result: $cf_cv_working_poll" >&5
16731 echo "${ECHO_T}$cf_cv_working_poll" >&6
16732 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16733 #define HAVE_WORKING_POLL 1
16734 EOF
16735
16736 echo "$as_me:16736: checking for va_copy" >&5
16737 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16738 if test "${cf_cv_have_va_copy+set}" = set; then
16739   echo $ECHO_N "(cached) $ECHO_C" >&6
16740 else
16741
16742 cat >conftest.$ac_ext <<_ACEOF
16743 #line 16743 "configure"
16744 #include "confdefs.h"
16745
16746 #include <stdarg.h>
16747
16748 int
16749 main ()
16750 {
16751
16752         static va_list dst;
16753         static va_list src;
16754         va_copy(dst, src)
16755   ;
16756   return 0;
16757 }
16758 _ACEOF
16759 rm -f conftest.$ac_objext 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); } &&
16765          { ac_try='test -s conftest$ac_exeext'
16766   { (eval echo "$as_me:16766: \"$ac_try\"") >&5
16767   (eval $ac_try) 2>&5
16768   ac_status=$?
16769   echo "$as_me:16769: \$? = $ac_status" >&5
16770   (exit $ac_status); }; }; then
16771   cf_cv_have_va_copy=yes
16772 else
16773   echo "$as_me: failed program was:" >&5
16774 cat conftest.$ac_ext >&5
16775 cf_cv_have_va_copy=no
16776 fi
16777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16778 fi
16779 echo "$as_me:16779: result: $cf_cv_have_va_copy" >&5
16780 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16781
16782 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16783 #define HAVE_VA_COPY 1
16784 EOF
16785
16786 echo "$as_me:16786: checking for __va_copy" >&5
16787 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16788 if test "${cf_cv_have___va_copy+set}" = set; then
16789   echo $ECHO_N "(cached) $ECHO_C" >&6
16790 else
16791
16792 cat >conftest.$ac_ext <<_ACEOF
16793 #line 16793 "configure"
16794 #include "confdefs.h"
16795
16796 #include <stdarg.h>
16797
16798 int
16799 main ()
16800 {
16801
16802         static va_list dst;
16803         static va_list src;
16804         __va_copy(dst, src)
16805   ;
16806   return 0;
16807 }
16808 _ACEOF
16809 rm -f conftest.$ac_objext conftest$ac_exeext
16810 if { (eval echo "$as_me:16810: \"$ac_link\"") >&5
16811   (eval $ac_link) 2>&5
16812   ac_status=$?
16813   echo "$as_me:16813: \$? = $ac_status" >&5
16814   (exit $ac_status); } &&
16815          { ac_try='test -s conftest$ac_exeext'
16816   { (eval echo "$as_me:16816: \"$ac_try\"") >&5
16817   (eval $ac_try) 2>&5
16818   ac_status=$?
16819   echo "$as_me:16819: \$? = $ac_status" >&5
16820   (exit $ac_status); }; }; then
16821   cf_cv_have___va_copy=yes
16822 else
16823   echo "$as_me: failed program was:" >&5
16824 cat conftest.$ac_ext >&5
16825 cf_cv_have___va_copy=no
16826 fi
16827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16828 fi
16829 echo "$as_me:16829: result: $cf_cv_have___va_copy" >&5
16830 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16831
16832 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16833 #define HAVE___VA_COPY 1
16834 EOF
16835
16836 echo "$as_me:16836: checking for pid_t" >&5
16837 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16838 if test "${ac_cv_type_pid_t+set}" = set; then
16839   echo $ECHO_N "(cached) $ECHO_C" >&6
16840 else
16841   cat >conftest.$ac_ext <<_ACEOF
16842 #line 16842 "configure"
16843 #include "confdefs.h"
16844 $ac_includes_default
16845 int
16846 main ()
16847 {
16848 if ((pid_t *) 0)
16849   return 0;
16850 if (sizeof (pid_t))
16851   return 0;
16852   ;
16853   return 0;
16854 }
16855 _ACEOF
16856 rm -f conftest.$ac_objext
16857 if { (eval echo "$as_me:16857: \"$ac_compile\"") >&5
16858   (eval $ac_compile) 2>&5
16859   ac_status=$?
16860   echo "$as_me:16860: \$? = $ac_status" >&5
16861   (exit $ac_status); } &&
16862          { ac_try='test -s conftest.$ac_objext'
16863   { (eval echo "$as_me:16863: \"$ac_try\"") >&5
16864   (eval $ac_try) 2>&5
16865   ac_status=$?
16866   echo "$as_me:16866: \$? = $ac_status" >&5
16867   (exit $ac_status); }; }; then
16868   ac_cv_type_pid_t=yes
16869 else
16870   echo "$as_me: failed program was:" >&5
16871 cat conftest.$ac_ext >&5
16872 ac_cv_type_pid_t=no
16873 fi
16874 rm -f conftest.$ac_objext conftest.$ac_ext
16875 fi
16876 echo "$as_me:16876: result: $ac_cv_type_pid_t" >&5
16877 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16878 if test $ac_cv_type_pid_t = yes; then
16879   :
16880 else
16881
16882 cat >>confdefs.h <<EOF
16883 #define pid_t int
16884 EOF
16885
16886 fi
16887
16888 for ac_header in unistd.h vfork.h
16889 do
16890 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16891 echo "$as_me:16891: checking for $ac_header" >&5
16892 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16893 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16894   echo $ECHO_N "(cached) $ECHO_C" >&6
16895 else
16896   cat >conftest.$ac_ext <<_ACEOF
16897 #line 16897 "configure"
16898 #include "confdefs.h"
16899 #include <$ac_header>
16900 _ACEOF
16901 if { (eval echo "$as_me:16901: \"$ac_cpp conftest.$ac_ext\"") >&5
16902   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16903   ac_status=$?
16904   egrep -v '^ *\+' conftest.er1 >conftest.err
16905   rm -f conftest.er1
16906   cat conftest.err >&5
16907   echo "$as_me:16907: \$? = $ac_status" >&5
16908   (exit $ac_status); } >/dev/null; then
16909   if test -s conftest.err; then
16910     ac_cpp_err=$ac_c_preproc_warn_flag
16911   else
16912     ac_cpp_err=
16913   fi
16914 else
16915   ac_cpp_err=yes
16916 fi
16917 if test -z "$ac_cpp_err"; then
16918   eval "$as_ac_Header=yes"
16919 else
16920   echo "$as_me: failed program was:" >&5
16921   cat conftest.$ac_ext >&5
16922   eval "$as_ac_Header=no"
16923 fi
16924 rm -f conftest.err conftest.$ac_ext
16925 fi
16926 echo "$as_me:16926: result: `eval echo '${'$as_ac_Header'}'`" >&5
16927 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16928 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16929   cat >>confdefs.h <<EOF
16930 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16931 EOF
16932
16933 fi
16934 done
16935
16936 for ac_func in fork vfork
16937 do
16938 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16939 echo "$as_me:16939: checking for $ac_func" >&5
16940 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16941 if eval "test \"\${$as_ac_var+set}\" = set"; then
16942   echo $ECHO_N "(cached) $ECHO_C" >&6
16943 else
16944   cat >conftest.$ac_ext <<_ACEOF
16945 #line 16945 "configure"
16946 #include "confdefs.h"
16947 /* System header to define __stub macros and hopefully few prototypes,
16948     which can conflict with char $ac_func (); below.  */
16949 #include <assert.h>
16950 /* Override any gcc2 internal prototype to avoid an error.  */
16951 #ifdef __cplusplus
16952 extern "C"
16953 #endif
16954 /* We use char because int might match the return type of a gcc2
16955    builtin and then its argument prototype would still apply.  */
16956 char $ac_func ();
16957 char (*f) ();
16958
16959 int
16960 main ()
16961 {
16962 /* The GNU C library defines this for functions which it implements
16963     to always fail with ENOSYS.  Some functions are actually named
16964     something starting with __ and the normal name is an alias.  */
16965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16966 choke me
16967 #else
16968 f = $ac_func;
16969 #endif
16970
16971   ;
16972   return 0;
16973 }
16974 _ACEOF
16975 rm -f conftest.$ac_objext conftest$ac_exeext
16976 if { (eval echo "$as_me:16976: \"$ac_link\"") >&5
16977   (eval $ac_link) 2>&5
16978   ac_status=$?
16979   echo "$as_me:16979: \$? = $ac_status" >&5
16980   (exit $ac_status); } &&
16981          { ac_try='test -s conftest$ac_exeext'
16982   { (eval echo "$as_me:16982: \"$ac_try\"") >&5
16983   (eval $ac_try) 2>&5
16984   ac_status=$?
16985   echo "$as_me:16985: \$? = $ac_status" >&5
16986   (exit $ac_status); }; }; then
16987   eval "$as_ac_var=yes"
16988 else
16989   echo "$as_me: failed program was:" >&5
16990 cat conftest.$ac_ext >&5
16991 eval "$as_ac_var=no"
16992 fi
16993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16994 fi
16995 echo "$as_me:16995: result: `eval echo '${'$as_ac_var'}'`" >&5
16996 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16997 if test `eval echo '${'$as_ac_var'}'` = yes; then
16998   cat >>confdefs.h <<EOF
16999 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17000 EOF
17001
17002 fi
17003 done
17004
17005 ac_cv_func_fork_works=$ac_cv_func_fork
17006 if test "x$ac_cv_func_fork" = xyes; then
17007   echo "$as_me:17007: checking for working fork" >&5
17008 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17009 if test "${ac_cv_func_fork_works+set}" = set; then
17010   echo $ECHO_N "(cached) $ECHO_C" >&6
17011 else
17012   if test "$cross_compiling" = yes; then
17013   ac_cv_func_fork_works=cross
17014 else
17015   cat >conftest.$ac_ext <<_ACEOF
17016 /* By Rüdiger Kuhlmann. */
17017       #include <sys/types.h>
17018       #if HAVE_UNISTD_H
17019       # include <unistd.h>
17020       #endif
17021       /* Some systems only have a dummy stub for fork() */
17022       int main ()
17023       {
17024         if (fork() < 0)
17025           $ac_main_return (1);
17026         $ac_main_return (0);
17027       }
17028 _ACEOF
17029 rm -f conftest$ac_exeext
17030 if { (eval echo "$as_me:17030: \"$ac_link\"") >&5
17031   (eval $ac_link) 2>&5
17032   ac_status=$?
17033   echo "$as_me:17033: \$? = $ac_status" >&5
17034   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17035   { (eval echo "$as_me:17035: \"$ac_try\"") >&5
17036   (eval $ac_try) 2>&5
17037   ac_status=$?
17038   echo "$as_me:17038: \$? = $ac_status" >&5
17039   (exit $ac_status); }; }; then
17040   ac_cv_func_fork_works=yes
17041 else
17042   echo "$as_me: program exited with status $ac_status" >&5
17043 echo "$as_me: failed program was:" >&5
17044 cat conftest.$ac_ext >&5
17045 ac_cv_func_fork_works=no
17046 fi
17047 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17048 fi
17049 fi
17050 echo "$as_me:17050: result: $ac_cv_func_fork_works" >&5
17051 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17052
17053 fi
17054 if test "x$ac_cv_func_fork_works" = xcross; then
17055   case $host in
17056     *-*-amigaos* | *-*-msdosdjgpp*)
17057       # Override, as these systems have only a dummy fork() stub
17058       ac_cv_func_fork_works=no
17059       ;;
17060     *)
17061       ac_cv_func_fork_works=yes
17062       ;;
17063   esac
17064   { echo "$as_me:17064: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17065 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17066 fi
17067 ac_cv_func_vfork_works=$ac_cv_func_vfork
17068 if test "x$ac_cv_func_vfork" = xyes; then
17069   echo "$as_me:17069: checking for working vfork" >&5
17070 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17071 if test "${ac_cv_func_vfork_works+set}" = set; then
17072   echo $ECHO_N "(cached) $ECHO_C" >&6
17073 else
17074   if test "$cross_compiling" = yes; then
17075   ac_cv_func_vfork_works=cross
17076 else
17077   cat >conftest.$ac_ext <<_ACEOF
17078 #line 17078 "configure"
17079 #include "confdefs.h"
17080 /* Thanks to Paul Eggert for this test.  */
17081 #include <stdio.h>
17082 #include <sys/types.h>
17083 #include <sys/stat.h>
17084 #if HAVE_UNISTD_H
17085 # include <unistd.h>
17086 #endif
17087 #if HAVE_VFORK_H
17088 # include <vfork.h>
17089 #endif
17090 /* On some sparc systems, changes by the child to local and incoming
17091    argument registers are propagated back to the parent.  The compiler
17092    is told about this with #include <vfork.h>, but some compilers
17093    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17094    static variable whose address is put into a register that is
17095    clobbered by the vfork.  */
17096 static
17097 #ifdef __cplusplus
17098 sparc_address_test (int arg)
17099 # else
17100 sparc_address_test (arg) int arg;
17101 #endif
17102 {
17103   static pid_t child;
17104   if (!child) {
17105     child = vfork ();
17106     if (child < 0) {
17107       perror ("vfork");
17108       _exit(2);
17109     }
17110     if (!child) {
17111       arg = getpid();
17112       write(-1, "", 0);
17113       _exit (arg);
17114     }
17115   }
17116 }
17117
17118 int
17119 main ()
17120 {
17121   pid_t parent = getpid ();
17122   pid_t child;
17123
17124   sparc_address_test ();
17125
17126   child = vfork ();
17127
17128   if (child == 0) {
17129     /* Here is another test for sparc vfork register problems.  This
17130        test uses lots of local variables, at least as many local
17131        variables as main has allocated so far including compiler
17132        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17133        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17134        reuse the register of parent for one of the local variables,
17135        since it will think that parent can't possibly be used any more
17136        in this routine.  Assigning to the local variable will thus
17137        munge parent in the parent process.  */
17138     pid_t
17139       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17140       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17141     /* Convince the compiler that p..p7 are live; otherwise, it might
17142        use the same hardware register for all 8 local variables.  */
17143     if (p != p1 || p != p2 || p != p3 || p != p4
17144         || p != p5 || p != p6 || p != p7)
17145       _exit(1);
17146
17147     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17148        from child file descriptors.  If the child closes a descriptor
17149        before it execs or exits, this munges the parent's descriptor
17150        as well.  Test for this by closing stdout in the child.  */
17151     _exit(close(fileno(stdout)) != 0);
17152   } else {
17153     int status;
17154     struct stat st;
17155
17156     while (wait(&status) != child)
17157       ;
17158     $ac_main_return(
17159          /* Was there some problem with vforking?  */
17160          child < 0
17161
17162          /* Did the child fail?  (This shouldn't happen.)  */
17163          || status
17164
17165          /* Did the vfork/compiler bug occur?  */
17166          || parent != getpid()
17167
17168          /* Did the file descriptor bug occur?  */
17169          || fstat(fileno(stdout), &st) != 0
17170          );
17171   }
17172 }
17173 _ACEOF
17174 rm -f conftest$ac_exeext
17175 if { (eval echo "$as_me:17175: \"$ac_link\"") >&5
17176   (eval $ac_link) 2>&5
17177   ac_status=$?
17178   echo "$as_me:17178: \$? = $ac_status" >&5
17179   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17180   { (eval echo "$as_me:17180: \"$ac_try\"") >&5
17181   (eval $ac_try) 2>&5
17182   ac_status=$?
17183   echo "$as_me:17183: \$? = $ac_status" >&5
17184   (exit $ac_status); }; }; then
17185   ac_cv_func_vfork_works=yes
17186 else
17187   echo "$as_me: program exited with status $ac_status" >&5
17188 echo "$as_me: failed program was:" >&5
17189 cat conftest.$ac_ext >&5
17190 ac_cv_func_vfork_works=no
17191 fi
17192 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17193 fi
17194 fi
17195 echo "$as_me:17195: result: $ac_cv_func_vfork_works" >&5
17196 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17197
17198 fi;
17199 if test "x$ac_cv_func_fork_works" = xcross; then
17200   ac_cv_func_vfork_works=ac_cv_func_vfork
17201   { echo "$as_me:17201: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17202 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17203 fi
17204
17205 if test "x$ac_cv_func_vfork_works" = xyes; then
17206
17207 cat >>confdefs.h <<\EOF
17208 #define HAVE_WORKING_VFORK 1
17209 EOF
17210
17211 else
17212
17213 cat >>confdefs.h <<\EOF
17214 #define vfork fork
17215 EOF
17216
17217 fi
17218 if test "x$ac_cv_func_fork_works" = xyes; then
17219
17220 cat >>confdefs.h <<\EOF
17221 #define HAVE_WORKING_FORK 1
17222 EOF
17223
17224 fi
17225
17226 # special check for test/ditto.c
17227
17228 echo "$as_me:17228: checking for openpty in -lutil" >&5
17229 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17230 if test "${ac_cv_lib_util_openpty+set}" = set; then
17231   echo $ECHO_N "(cached) $ECHO_C" >&6
17232 else
17233   ac_check_lib_save_LIBS=$LIBS
17234 LIBS="-lutil  $LIBS"
17235 cat >conftest.$ac_ext <<_ACEOF
17236 #line 17236 "configure"
17237 #include "confdefs.h"
17238
17239 /* Override any gcc2 internal prototype to avoid an error.  */
17240 #ifdef __cplusplus
17241 extern "C"
17242 #endif
17243 /* We use char because int might match the return type of a gcc2
17244    builtin and then its argument prototype would still apply.  */
17245 char openpty ();
17246 int
17247 main ()
17248 {
17249 openpty ();
17250   ;
17251   return 0;
17252 }
17253 _ACEOF
17254 rm -f conftest.$ac_objext conftest$ac_exeext
17255 if { (eval echo "$as_me:17255: \"$ac_link\"") >&5
17256   (eval $ac_link) 2>&5
17257   ac_status=$?
17258   echo "$as_me:17258: \$? = $ac_status" >&5
17259   (exit $ac_status); } &&
17260          { ac_try='test -s conftest$ac_exeext'
17261   { (eval echo "$as_me:17261: \"$ac_try\"") >&5
17262   (eval $ac_try) 2>&5
17263   ac_status=$?
17264   echo "$as_me:17264: \$? = $ac_status" >&5
17265   (exit $ac_status); }; }; then
17266   ac_cv_lib_util_openpty=yes
17267 else
17268   echo "$as_me: failed program was:" >&5
17269 cat conftest.$ac_ext >&5
17270 ac_cv_lib_util_openpty=no
17271 fi
17272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17273 LIBS=$ac_check_lib_save_LIBS
17274 fi
17275 echo "$as_me:17275: result: $ac_cv_lib_util_openpty" >&5
17276 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17277 if test $ac_cv_lib_util_openpty = yes; then
17278   cf_cv_lib_util=yes
17279 else
17280   cf_cv_lib_util=no
17281 fi
17282
17283 echo "$as_me:17283: checking for openpty header" >&5
17284 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17285 if test "${cf_cv_func_openpty+set}" = set; then
17286   echo $ECHO_N "(cached) $ECHO_C" >&6
17287 else
17288
17289     cf_save_LIBS="$LIBS"
17290     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17291     for cf_header in pty.h libutil.h util.h
17292     do
17293     cat >conftest.$ac_ext <<_ACEOF
17294 #line 17294 "configure"
17295 #include "confdefs.h"
17296
17297 #include <$cf_header>
17298
17299 int
17300 main ()
17301 {
17302
17303     int x = openpty((int *)0, (int *)0, (char *)0,
17304                    (struct termios *)0, (struct winsize *)0);
17305
17306   ;
17307   return 0;
17308 }
17309 _ACEOF
17310 rm -f conftest.$ac_objext conftest$ac_exeext
17311 if { (eval echo "$as_me:17311: \"$ac_link\"") >&5
17312   (eval $ac_link) 2>&5
17313   ac_status=$?
17314   echo "$as_me:17314: \$? = $ac_status" >&5
17315   (exit $ac_status); } &&
17316          { ac_try='test -s conftest$ac_exeext'
17317   { (eval echo "$as_me:17317: \"$ac_try\"") >&5
17318   (eval $ac_try) 2>&5
17319   ac_status=$?
17320   echo "$as_me:17320: \$? = $ac_status" >&5
17321   (exit $ac_status); }; }; then
17322
17323         cf_cv_func_openpty=$cf_header
17324         break
17325
17326 else
17327   echo "$as_me: failed program was:" >&5
17328 cat conftest.$ac_ext >&5
17329
17330         cf_cv_func_openpty=no
17331
17332 fi
17333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17334     done
17335     LIBS="$cf_save_LIBS"
17336
17337 fi
17338 echo "$as_me:17338: result: $cf_cv_func_openpty" >&5
17339 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17340
17341 if test "$cf_cv_func_openpty" != no ; then
17342     cat >>confdefs.h <<EOF
17343 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17344 EOF
17345
17346     cat >>confdefs.h <<\EOF
17347 #define USE_XTERM_PTY 1
17348 EOF
17349
17350     if test "$cf_cv_lib_util" = yes ; then
17351         TEST_LIBS="-lutil $TEST_LIBS"
17352     fi
17353 fi
17354
17355 if test "$with_hashed_db" != no ; then
17356         cat >>confdefs.h <<\EOF
17357 #define USE_HASHED_DB 1
17358 EOF
17359
17360 case $with_hashed_db in #(vi
17361 yes|*able*) #(vi
17362     ;;
17363 *)
17364     if test -d "$with_hashed_db" ; then
17365
17366 if test -n "$with_hashed_db/include" ; then
17367   for cf_add_incdir in $with_hashed_db/include
17368   do
17369         while test $cf_add_incdir != /usr/include
17370         do
17371           if test -d $cf_add_incdir
17372           then
17373                 cf_have_incdir=no
17374                 if test -n "$CFLAGS$CPPFLAGS" ; then
17375                   # a loop is needed to ensure we can add subdirs of existing dirs
17376                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17377                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17378                           cf_have_incdir=yes; break
17379                         fi
17380                   done
17381                 fi
17382
17383                 if test "$cf_have_incdir" = no ; then
17384                   if test "$cf_add_incdir" = /usr/local/include ; then
17385                         if test "$GCC" = yes
17386                         then
17387                           cf_save_CPPFLAGS=$CPPFLAGS
17388                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17389                           cat >conftest.$ac_ext <<_ACEOF
17390 #line 17390 "configure"
17391 #include "confdefs.h"
17392 #include <stdio.h>
17393 int
17394 main ()
17395 {
17396 printf("Hello")
17397   ;
17398   return 0;
17399 }
17400 _ACEOF
17401 rm -f conftest.$ac_objext
17402 if { (eval echo "$as_me:17402: \"$ac_compile\"") >&5
17403   (eval $ac_compile) 2>&5
17404   ac_status=$?
17405   echo "$as_me:17405: \$? = $ac_status" >&5
17406   (exit $ac_status); } &&
17407          { ac_try='test -s conftest.$ac_objext'
17408   { (eval echo "$as_me:17408: \"$ac_try\"") >&5
17409   (eval $ac_try) 2>&5
17410   ac_status=$?
17411   echo "$as_me:17411: \$? = $ac_status" >&5
17412   (exit $ac_status); }; }; then
17413   :
17414 else
17415   echo "$as_me: failed program was:" >&5
17416 cat conftest.$ac_ext >&5
17417 cf_have_incdir=yes
17418 fi
17419 rm -f conftest.$ac_objext conftest.$ac_ext
17420                           CPPFLAGS=$cf_save_CPPFLAGS
17421                         fi
17422                   fi
17423                 fi
17424
17425                 if test "$cf_have_incdir" = no ; then
17426                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17427
17428 echo "${as_me:-configure}:17428: testing adding $cf_add_incdir to include-path ..." 1>&5
17429
17430                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17431
17432                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17433                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17434                   cf_add_incdir="$cf_top_incdir"
17435                 else
17436                   break
17437                 fi
17438           fi
17439         done
17440   done
17441 fi
17442
17443 if test -n "$with_hashed_db/lib" ; then
17444   for cf_add_libdir in $with_hashed_db/lib
17445   do
17446     if test $cf_add_libdir = /usr/lib ; then
17447       :
17448     elif test -d $cf_add_libdir
17449     then
17450       cf_have_libdir=no
17451       if test -n "$LDFLAGS$LIBS" ; then
17452         # a loop is needed to ensure we can add subdirs of existing dirs
17453         for cf_test_libdir in $LDFLAGS $LIBS ; do
17454           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17455             cf_have_libdir=yes; break
17456           fi
17457         done
17458       fi
17459       if test "$cf_have_libdir" = no ; then
17460         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17461
17462 echo "${as_me:-configure}:17462: testing adding $cf_add_libdir to library-path ..." 1>&5
17463
17464         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17465       fi
17466     fi
17467   done
17468 fi
17469
17470     fi
17471 esac
17472
17473 echo "$as_me:17473: checking for db.h" >&5
17474 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17475 if test "${ac_cv_header_db_h+set}" = set; then
17476   echo $ECHO_N "(cached) $ECHO_C" >&6
17477 else
17478   cat >conftest.$ac_ext <<_ACEOF
17479 #line 17479 "configure"
17480 #include "confdefs.h"
17481 #include <db.h>
17482 _ACEOF
17483 if { (eval echo "$as_me:17483: \"$ac_cpp conftest.$ac_ext\"") >&5
17484   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17485   ac_status=$?
17486   egrep -v '^ *\+' conftest.er1 >conftest.err
17487   rm -f conftest.er1
17488   cat conftest.err >&5
17489   echo "$as_me:17489: \$? = $ac_status" >&5
17490   (exit $ac_status); } >/dev/null; then
17491   if test -s conftest.err; then
17492     ac_cpp_err=$ac_c_preproc_warn_flag
17493   else
17494     ac_cpp_err=
17495   fi
17496 else
17497   ac_cpp_err=yes
17498 fi
17499 if test -z "$ac_cpp_err"; then
17500   ac_cv_header_db_h=yes
17501 else
17502   echo "$as_me: failed program was:" >&5
17503   cat conftest.$ac_ext >&5
17504   ac_cv_header_db_h=no
17505 fi
17506 rm -f conftest.err conftest.$ac_ext
17507 fi
17508 echo "$as_me:17508: result: $ac_cv_header_db_h" >&5
17509 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17510 if test $ac_cv_header_db_h = yes; then
17511
17512 echo "$as_me:17512: checking for version of db" >&5
17513 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17514 if test "${cf_cv_hashed_db_version+set}" = set; then
17515   echo $ECHO_N "(cached) $ECHO_C" >&6
17516 else
17517
17518 cf_cv_hashed_db_version=unknown
17519
17520 for cf_db_version in 1 2 3 4 5
17521 do
17522
17523 echo "${as_me:-configure}:17523: testing checking for db version $cf_db_version ..." 1>&5
17524
17525         cat >conftest.$ac_ext <<_ACEOF
17526 #line 17526 "configure"
17527 #include "confdefs.h"
17528
17529 $ac_includes_default
17530 #include <db.h>
17531
17532 #ifdef DB_VERSION_MAJOR
17533         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17534 #if $cf_db_version == DB_VERSION_MAJOR
17535         /* ok */
17536 #else
17537         make an error
17538 #endif
17539 #else
17540 #if $cf_db_version == 1
17541         /* ok: assuming this is DB 1.8.5 */
17542 #else
17543         make an error
17544 #endif
17545 #endif
17546
17547 int
17548 main ()
17549 {
17550 DBT *foo = 0
17551   ;
17552   return 0;
17553 }
17554 _ACEOF
17555 rm -f conftest.$ac_objext
17556 if { (eval echo "$as_me:17556: \"$ac_compile\"") >&5
17557   (eval $ac_compile) 2>&5
17558   ac_status=$?
17559   echo "$as_me:17559: \$? = $ac_status" >&5
17560   (exit $ac_status); } &&
17561          { ac_try='test -s conftest.$ac_objext'
17562   { (eval echo "$as_me:17562: \"$ac_try\"") >&5
17563   (eval $ac_try) 2>&5
17564   ac_status=$?
17565   echo "$as_me:17565: \$? = $ac_status" >&5
17566   (exit $ac_status); }; }; then
17567
17568         cf_cv_hashed_db_version=$cf_db_version
17569         break
17570
17571 else
17572   echo "$as_me: failed program was:" >&5
17573 cat conftest.$ac_ext >&5
17574 fi
17575 rm -f conftest.$ac_objext conftest.$ac_ext
17576 done
17577
17578 fi
17579 echo "$as_me:17579: result: $cf_cv_hashed_db_version" >&5
17580 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17581
17582 if test "$cf_cv_hashed_db_version" = unknown ; then
17583         { { echo "$as_me:17583: error: Cannot determine version of db" >&5
17584 echo "$as_me: error: Cannot determine version of db" >&2;}
17585    { (exit 1); exit 1; }; }
17586 else
17587
17588 echo "$as_me:17588: checking for db libraries" >&5
17589 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17590 if test "${cf_cv_hashed_db_libs+set}" = set; then
17591   echo $ECHO_N "(cached) $ECHO_C" >&6
17592 else
17593
17594 cf_cv_hashed_db_libs=unknown
17595 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17596 do
17597         cf_save_libs="$LIBS"
17598         if test -n "$cf_db_libs"; then
17599                 LIBS="-l$cf_db_libs $LIBS"
17600         fi
17601
17602 echo "${as_me:-configure}:17602: testing checking for library "$cf_db_libs" ..." 1>&5
17603
17604         cat >conftest.$ac_ext <<_ACEOF
17605 #line 17605 "configure"
17606 #include "confdefs.h"
17607
17608 $ac_includes_default
17609 #include <db.h>
17610
17611 int
17612 main ()
17613 {
17614
17615         char *path = "/tmp/foo";
17616 #ifdef DB_VERSION_MAJOR
17617 #if DB_VERSION_MAJOR >= 4
17618         DB *result = 0;
17619         db_create(&result, NULL, 0);
17620         result->open(result,
17621                 NULL,
17622                 path,
17623                 path,
17624                 DB_HASH,
17625                 DB_CREATE,
17626                 0644);
17627 #elif DB_VERSION_MAJOR >= 3
17628         DB *result = 0;
17629         db_create(&result, NULL, 0);
17630         result->open(result,
17631                 path,
17632                 path,
17633                 DB_HASH,
17634                 DB_CREATE,
17635                 0644);
17636 #elif DB_VERSION_MAJOR >= 2
17637         DB *result = 0;
17638         db_open(path,
17639                 DB_HASH,
17640                 DB_CREATE,
17641                 0644,
17642                 (DB_ENV *) 0,
17643                 (DB_INFO *) 0,
17644                 &result);
17645 #endif /* DB_VERSION_MAJOR */
17646 #else
17647         DB *result = dbopen(path,
17648                      2,
17649                      0644,
17650                      DB_HASH,
17651                      0);
17652 #endif
17653         ${cf_cv_main_return:-return}(result != 0)
17654
17655   ;
17656   return 0;
17657 }
17658 _ACEOF
17659 rm -f conftest.$ac_objext conftest$ac_exeext
17660 if { (eval echo "$as_me:17660: \"$ac_link\"") >&5
17661   (eval $ac_link) 2>&5
17662   ac_status=$?
17663   echo "$as_me:17663: \$? = $ac_status" >&5
17664   (exit $ac_status); } &&
17665          { ac_try='test -s conftest$ac_exeext'
17666   { (eval echo "$as_me:17666: \"$ac_try\"") >&5
17667   (eval $ac_try) 2>&5
17668   ac_status=$?
17669   echo "$as_me:17669: \$? = $ac_status" >&5
17670   (exit $ac_status); }; }; then
17671
17672         if test -n "$cf_db_libs" ; then
17673                 cf_cv_hashed_db_libs=$cf_db_libs
17674         else
17675                 cf_cv_hashed_db_libs=default
17676         fi
17677         LIBS="$cf_save_libs"
17678         break
17679
17680 else
17681   echo "$as_me: failed program was:" >&5
17682 cat conftest.$ac_ext >&5
17683 fi
17684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17685         LIBS="$cf_save_libs"
17686 done
17687
17688 fi
17689 echo "$as_me:17689: result: $cf_cv_hashed_db_libs" >&5
17690 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17691
17692         if test "$cf_cv_hashed_db_libs" = unknown ; then
17693                 { { echo "$as_me:17693: error: Cannot determine library for db" >&5
17694 echo "$as_me: error: Cannot determine library for db" >&2;}
17695    { (exit 1); exit 1; }; }
17696         elif test "$cf_cv_hashed_db_libs" != default ; then
17697                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17698         fi
17699 fi
17700
17701 else
17702
17703         { { echo "$as_me:17703: error: Cannot find db.h" >&5
17704 echo "$as_me: error: Cannot find db.h" >&2;}
17705    { (exit 1); exit 1; }; }
17706
17707 fi
17708
17709 fi
17710
17711 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17712         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17713         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17714 fi
17715
17716 # Just in case, check if the C compiler has a bool type.
17717
17718 echo "$as_me:17718: checking if we should include stdbool.h" >&5
17719 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17720
17721 if test "${cf_cv_header_stdbool_h+set}" = set; then
17722   echo $ECHO_N "(cached) $ECHO_C" >&6
17723 else
17724
17725         cat >conftest.$ac_ext <<_ACEOF
17726 #line 17726 "configure"
17727 #include "confdefs.h"
17728
17729 int
17730 main ()
17731 {
17732 bool foo = false
17733   ;
17734   return 0;
17735 }
17736 _ACEOF
17737 rm -f conftest.$ac_objext
17738 if { (eval echo "$as_me:17738: \"$ac_compile\"") >&5
17739   (eval $ac_compile) 2>&5
17740   ac_status=$?
17741   echo "$as_me:17741: \$? = $ac_status" >&5
17742   (exit $ac_status); } &&
17743          { ac_try='test -s conftest.$ac_objext'
17744   { (eval echo "$as_me:17744: \"$ac_try\"") >&5
17745   (eval $ac_try) 2>&5
17746   ac_status=$?
17747   echo "$as_me:17747: \$? = $ac_status" >&5
17748   (exit $ac_status); }; }; then
17749   cf_cv_header_stdbool_h=0
17750 else
17751   echo "$as_me: failed program was:" >&5
17752 cat conftest.$ac_ext >&5
17753 cat >conftest.$ac_ext <<_ACEOF
17754 #line 17754 "configure"
17755 #include "confdefs.h"
17756
17757 #ifndef __BEOS__
17758 #include <stdbool.h>
17759 #endif
17760
17761 int
17762 main ()
17763 {
17764 bool foo = false
17765   ;
17766   return 0;
17767 }
17768 _ACEOF
17769 rm -f conftest.$ac_objext
17770 if { (eval echo "$as_me:17770: \"$ac_compile\"") >&5
17771   (eval $ac_compile) 2>&5
17772   ac_status=$?
17773   echo "$as_me:17773: \$? = $ac_status" >&5
17774   (exit $ac_status); } &&
17775          { ac_try='test -s conftest.$ac_objext'
17776   { (eval echo "$as_me:17776: \"$ac_try\"") >&5
17777   (eval $ac_try) 2>&5
17778   ac_status=$?
17779   echo "$as_me:17779: \$? = $ac_status" >&5
17780   (exit $ac_status); }; }; then
17781   cf_cv_header_stdbool_h=1
17782 else
17783   echo "$as_me: failed program was:" >&5
17784 cat conftest.$ac_ext >&5
17785 cf_cv_header_stdbool_h=0
17786 fi
17787 rm -f conftest.$ac_objext conftest.$ac_ext
17788 fi
17789 rm -f conftest.$ac_objext conftest.$ac_ext
17790 fi
17791
17792 if test "$cf_cv_header_stdbool_h" = 1
17793 then    echo "$as_me:17793: result: yes" >&5
17794 echo "${ECHO_T}yes" >&6
17795 else    echo "$as_me:17795: result: no" >&5
17796 echo "${ECHO_T}no" >&6
17797 fi
17798
17799 echo "$as_me:17799: checking for builtin bool type" >&5
17800 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17801
17802 if test "${cf_cv_cc_bool_type+set}" = set; then
17803   echo $ECHO_N "(cached) $ECHO_C" >&6
17804 else
17805
17806         cat >conftest.$ac_ext <<_ACEOF
17807 #line 17807 "configure"
17808 #include "confdefs.h"
17809
17810 #include <stdio.h>
17811 #include <sys/types.h>
17812
17813 int
17814 main ()
17815 {
17816 bool x = false
17817   ;
17818   return 0;
17819 }
17820 _ACEOF
17821 rm -f conftest.$ac_objext
17822 if { (eval echo "$as_me:17822: \"$ac_compile\"") >&5
17823   (eval $ac_compile) 2>&5
17824   ac_status=$?
17825   echo "$as_me:17825: \$? = $ac_status" >&5
17826   (exit $ac_status); } &&
17827          { ac_try='test -s conftest.$ac_objext'
17828   { (eval echo "$as_me:17828: \"$ac_try\"") >&5
17829   (eval $ac_try) 2>&5
17830   ac_status=$?
17831   echo "$as_me:17831: \$? = $ac_status" >&5
17832   (exit $ac_status); }; }; then
17833   cf_cv_cc_bool_type=1
17834 else
17835   echo "$as_me: failed program was:" >&5
17836 cat conftest.$ac_ext >&5
17837 cf_cv_cc_bool_type=0
17838 fi
17839 rm -f conftest.$ac_objext conftest.$ac_ext
17840
17841 fi
17842
17843 if test "$cf_cv_cc_bool_type" = 1
17844 then    echo "$as_me:17844: result: yes" >&5
17845 echo "${ECHO_T}yes" >&6
17846 else    echo "$as_me:17846: result: no" >&5
17847 echo "${ECHO_T}no" >&6
17848 fi
17849
17850 # Check for C++ compiler characteristics (and ensure that it's there!)
17851 if test -n "$CXX" ; then
17852         ac_ext=cc
17853 ac_cpp='$CXXCPP $CPPFLAGS'
17854 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17855 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17856 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17857 ac_main_return=return
17858
17859 if test -n "$GXX" ; then
17860 case $cf_cv_system_name in #(vi
17861 os2*) #(vi
17862         cf_stdcpp_libname=stdcpp
17863         ;;
17864 *)
17865         cf_stdcpp_libname=stdc++
17866         ;;
17867 esac
17868 echo "$as_me:17868: checking for library $cf_stdcpp_libname" >&5
17869 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17870 if test "${cf_cv_libstdcpp+set}" = set; then
17871   echo $ECHO_N "(cached) $ECHO_C" >&6
17872 else
17873
17874         cf_save="$LIBS"
17875         LIBS="-l$cf_stdcpp_libname $LIBS"
17876 cat >conftest.$ac_ext <<_ACEOF
17877 #line 17877 "configure"
17878 #include "confdefs.h"
17879
17880 #include <strstream.h>
17881 int
17882 main ()
17883 {
17884
17885 char buf[80];
17886 strstreambuf foo(buf, sizeof(buf))
17887
17888   ;
17889   return 0;
17890 }
17891 _ACEOF
17892 rm -f conftest.$ac_objext conftest$ac_exeext
17893 if { (eval echo "$as_me:17893: \"$ac_link\"") >&5
17894   (eval $ac_link) 2>&5
17895   ac_status=$?
17896   echo "$as_me:17896: \$? = $ac_status" >&5
17897   (exit $ac_status); } &&
17898          { ac_try='test -s conftest$ac_exeext'
17899   { (eval echo "$as_me:17899: \"$ac_try\"") >&5
17900   (eval $ac_try) 2>&5
17901   ac_status=$?
17902   echo "$as_me:17902: \$? = $ac_status" >&5
17903   (exit $ac_status); }; }; then
17904   cf_cv_libstdcpp=yes
17905 else
17906   echo "$as_me: failed program was:" >&5
17907 cat conftest.$ac_ext >&5
17908 cf_cv_libstdcpp=no
17909 fi
17910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17911         LIBS="$cf_save"
17912
17913 fi
17914 echo "$as_me:17914: result: $cf_cv_libstdcpp" >&5
17915 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17916 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17917 fi
17918
17919         echo "$as_me:17919: checking whether $CXX understands -c and -o together" >&5
17920 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17921 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17922   echo $ECHO_N "(cached) $ECHO_C" >&6
17923 else
17924
17925 cat > conftest.$ac_ext <<CF_EOF
17926 #include <stdio.h>
17927 int main()
17928 {
17929         ${cf_cv_main_return:-return}(0);
17930 }
17931 CF_EOF
17932 # We do the test twice because some compilers refuse to overwrite an
17933 # existing .o file with -o, though they will create one.
17934 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17935 if { (eval echo "$as_me:17935: \"$ac_try\"") >&5
17936   (eval $ac_try) 2>&5
17937   ac_status=$?
17938   echo "$as_me:17938: \$? = $ac_status" >&5
17939   (exit $ac_status); } &&
17940   test -f conftest2.$ac_objext && { (eval echo "$as_me:17940: \"$ac_try\"") >&5
17941   (eval $ac_try) 2>&5
17942   ac_status=$?
17943   echo "$as_me:17943: \$? = $ac_status" >&5
17944   (exit $ac_status); };
17945 then
17946   eval cf_cv_prog_CXX_c_o=yes
17947 else
17948   eval cf_cv_prog_CXX_c_o=no
17949 fi
17950 rm -rf conftest*
17951
17952 fi
17953 if test $cf_cv_prog_CXX_c_o = yes; then
17954   echo "$as_me:17954: result: yes" >&5
17955 echo "${ECHO_T}yes" >&6
17956 else
17957   echo "$as_me:17957: result: no" >&5
17958 echo "${ECHO_T}no" >&6
17959 fi
17960
17961         case $GXX_VERSION in
17962         1*|2.0-6*)
17963                 cf_cxx_library=yes
17964                 ;;
17965         *-2.7*|2.7*)
17966
17967 cf_cxx_library=unknown
17968 case $cf_cv_system_name in #(vi
17969 os2*) #(vi
17970         cf_gpp_libname=gpp
17971         ;;
17972 *)
17973         cf_gpp_libname=g++
17974         ;;
17975 esac
17976 if test "$GXX" = yes; then
17977         echo "$as_me:17977: checking for lib$cf_gpp_libname" >&5
17978 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17979         cf_save="$LIBS"
17980         LIBS="-l$cf_gpp_libname $LIBS"
17981         cat >conftest.$ac_ext <<_ACEOF
17982 #line 17982 "configure"
17983 #include "confdefs.h"
17984
17985 #include <$cf_gpp_libname/builtin.h>
17986
17987 int
17988 main ()
17989 {
17990 two_arg_error_handler_t foo2 = lib_error_handler
17991   ;
17992   return 0;
17993 }
17994 _ACEOF
17995 rm -f conftest.$ac_objext conftest$ac_exeext
17996 if { (eval echo "$as_me:17996: \"$ac_link\"") >&5
17997   (eval $ac_link) 2>&5
17998   ac_status=$?
17999   echo "$as_me:17999: \$? = $ac_status" >&5
18000   (exit $ac_status); } &&
18001          { ac_try='test -s conftest$ac_exeext'
18002   { (eval echo "$as_me:18002: \"$ac_try\"") >&5
18003   (eval $ac_try) 2>&5
18004   ac_status=$?
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); }; }; then
18007   cf_cxx_library=yes
18008          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18009          if test "$cf_gpp_libname" = cpp ; then
18010             cat >>confdefs.h <<\EOF
18011 #define HAVE_GPP_BUILTIN_H 1
18012 EOF
18013
18014          else
18015             cat >>confdefs.h <<\EOF
18016 #define HAVE_GXX_BUILTIN_H 1
18017 EOF
18018
18019          fi
18020 else
18021   echo "$as_me: failed program was:" >&5
18022 cat conftest.$ac_ext >&5
18023 cat >conftest.$ac_ext <<_ACEOF
18024 #line 18024 "configure"
18025 #include "confdefs.h"
18026
18027 #include <builtin.h>
18028
18029 int
18030 main ()
18031 {
18032 two_arg_error_handler_t foo2 = lib_error_handler
18033   ;
18034   return 0;
18035 }
18036 _ACEOF
18037 rm -f conftest.$ac_objext conftest$ac_exeext
18038 if { (eval echo "$as_me:18038: \"$ac_link\"") >&5
18039   (eval $ac_link) 2>&5
18040   ac_status=$?
18041   echo "$as_me:18041: \$? = $ac_status" >&5
18042   (exit $ac_status); } &&
18043          { ac_try='test -s conftest$ac_exeext'
18044   { (eval echo "$as_me:18044: \"$ac_try\"") >&5
18045   (eval $ac_try) 2>&5
18046   ac_status=$?
18047   echo "$as_me:18047: \$? = $ac_status" >&5
18048   (exit $ac_status); }; }; then
18049   cf_cxx_library=yes
18050          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18051          cat >>confdefs.h <<\EOF
18052 #define HAVE_BUILTIN_H 1
18053 EOF
18054
18055 else
18056   echo "$as_me: failed program was:" >&5
18057 cat conftest.$ac_ext >&5
18058 cf_cxx_library=no
18059 fi
18060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18061 fi
18062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18063         LIBS="$cf_save"
18064         echo "$as_me:18064: result: $cf_cxx_library" >&5
18065 echo "${ECHO_T}$cf_cxx_library" >&6
18066 fi
18067
18068                 ;;
18069         *)
18070                 cf_cxx_library=no
18071                 ;;
18072         esac
18073
18074         ac_ext=cc
18075 ac_cpp='$CXXCPP $CPPFLAGS'
18076 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18077 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18078 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18079 ac_main_return=return
18080 echo "$as_me:18080: checking how to run the C++ preprocessor" >&5
18081 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18082 if test -z "$CXXCPP"; then
18083   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18084   echo $ECHO_N "(cached) $ECHO_C" >&6
18085 else
18086       # Double quotes because CXXCPP needs to be expanded
18087     for CXXCPP in "$CXX -E" "/lib/cpp"
18088     do
18089       ac_preproc_ok=false
18090 for ac_cxx_preproc_warn_flag in '' yes
18091 do
18092   # Use a header file that comes with gcc, so configuring glibc
18093   # with a fresh cross-compiler works.
18094   # On the NeXT, cc -E runs the code through the compiler's parser,
18095   # not just through cpp. "Syntax error" is here to catch this case.
18096   cat >conftest.$ac_ext <<_ACEOF
18097 #line 18097 "configure"
18098 #include "confdefs.h"
18099 #include <assert.h>
18100                      Syntax error
18101 _ACEOF
18102 if { (eval echo "$as_me:18102: \"$ac_cpp conftest.$ac_ext\"") >&5
18103   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18104   ac_status=$?
18105   egrep -v '^ *\+' conftest.er1 >conftest.err
18106   rm -f conftest.er1
18107   cat conftest.err >&5
18108   echo "$as_me:18108: \$? = $ac_status" >&5
18109   (exit $ac_status); } >/dev/null; then
18110   if test -s conftest.err; then
18111     ac_cpp_err=$ac_cxx_preproc_warn_flag
18112   else
18113     ac_cpp_err=
18114   fi
18115 else
18116   ac_cpp_err=yes
18117 fi
18118 if test -z "$ac_cpp_err"; then
18119   :
18120 else
18121   echo "$as_me: failed program was:" >&5
18122   cat conftest.$ac_ext >&5
18123   # Broken: fails on valid input.
18124 continue
18125 fi
18126 rm -f conftest.err conftest.$ac_ext
18127
18128   # OK, works on sane cases.  Now check whether non-existent headers
18129   # can be detected and how.
18130   cat >conftest.$ac_ext <<_ACEOF
18131 #line 18131 "configure"
18132 #include "confdefs.h"
18133 #include <ac_nonexistent.h>
18134 _ACEOF
18135 if { (eval echo "$as_me:18135: \"$ac_cpp conftest.$ac_ext\"") >&5
18136   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18137   ac_status=$?
18138   egrep -v '^ *\+' conftest.er1 >conftest.err
18139   rm -f conftest.er1
18140   cat conftest.err >&5
18141   echo "$as_me:18141: \$? = $ac_status" >&5
18142   (exit $ac_status); } >/dev/null; then
18143   if test -s conftest.err; then
18144     ac_cpp_err=$ac_cxx_preproc_warn_flag
18145   else
18146     ac_cpp_err=
18147   fi
18148 else
18149   ac_cpp_err=yes
18150 fi
18151 if test -z "$ac_cpp_err"; then
18152   # Broken: success on invalid input.
18153 continue
18154 else
18155   echo "$as_me: failed program was:" >&5
18156   cat conftest.$ac_ext >&5
18157   # Passes both tests.
18158 ac_preproc_ok=:
18159 break
18160 fi
18161 rm -f conftest.err conftest.$ac_ext
18162
18163 done
18164 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18165 rm -f conftest.err conftest.$ac_ext
18166 if $ac_preproc_ok; then
18167   break
18168 fi
18169
18170     done
18171     ac_cv_prog_CXXCPP=$CXXCPP
18172
18173 fi
18174   CXXCPP=$ac_cv_prog_CXXCPP
18175 else
18176   ac_cv_prog_CXXCPP=$CXXCPP
18177 fi
18178 echo "$as_me:18178: result: $CXXCPP" >&5
18179 echo "${ECHO_T}$CXXCPP" >&6
18180 ac_preproc_ok=false
18181 for ac_cxx_preproc_warn_flag in '' yes
18182 do
18183   # Use a header file that comes with gcc, so configuring glibc
18184   # with a fresh cross-compiler works.
18185   # On the NeXT, cc -E runs the code through the compiler's parser,
18186   # not just through cpp. "Syntax error" is here to catch this case.
18187   cat >conftest.$ac_ext <<_ACEOF
18188 #line 18188 "configure"
18189 #include "confdefs.h"
18190 #include <assert.h>
18191                      Syntax error
18192 _ACEOF
18193 if { (eval echo "$as_me:18193: \"$ac_cpp conftest.$ac_ext\"") >&5
18194   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18195   ac_status=$?
18196   egrep -v '^ *\+' conftest.er1 >conftest.err
18197   rm -f conftest.er1
18198   cat conftest.err >&5
18199   echo "$as_me:18199: \$? = $ac_status" >&5
18200   (exit $ac_status); } >/dev/null; then
18201   if test -s conftest.err; then
18202     ac_cpp_err=$ac_cxx_preproc_warn_flag
18203   else
18204     ac_cpp_err=
18205   fi
18206 else
18207   ac_cpp_err=yes
18208 fi
18209 if test -z "$ac_cpp_err"; then
18210   :
18211 else
18212   echo "$as_me: failed program was:" >&5
18213   cat conftest.$ac_ext >&5
18214   # Broken: fails on valid input.
18215 continue
18216 fi
18217 rm -f conftest.err conftest.$ac_ext
18218
18219   # OK, works on sane cases.  Now check whether non-existent headers
18220   # can be detected and how.
18221   cat >conftest.$ac_ext <<_ACEOF
18222 #line 18222 "configure"
18223 #include "confdefs.h"
18224 #include <ac_nonexistent.h>
18225 _ACEOF
18226 if { (eval echo "$as_me:18226: \"$ac_cpp conftest.$ac_ext\"") >&5
18227   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18228   ac_status=$?
18229   egrep -v '^ *\+' conftest.er1 >conftest.err
18230   rm -f conftest.er1
18231   cat conftest.err >&5
18232   echo "$as_me:18232: \$? = $ac_status" >&5
18233   (exit $ac_status); } >/dev/null; then
18234   if test -s conftest.err; then
18235     ac_cpp_err=$ac_cxx_preproc_warn_flag
18236   else
18237     ac_cpp_err=
18238   fi
18239 else
18240   ac_cpp_err=yes
18241 fi
18242 if test -z "$ac_cpp_err"; then
18243   # Broken: success on invalid input.
18244 continue
18245 else
18246   echo "$as_me: failed program was:" >&5
18247   cat conftest.$ac_ext >&5
18248   # Passes both tests.
18249 ac_preproc_ok=:
18250 break
18251 fi
18252 rm -f conftest.err conftest.$ac_ext
18253
18254 done
18255 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18256 rm -f conftest.err conftest.$ac_ext
18257 if $ac_preproc_ok; then
18258   :
18259 else
18260   { { echo "$as_me:18260: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18261 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18262    { (exit 1); exit 1; }; }
18263 fi
18264
18265 ac_ext=cc
18266 ac_cpp='$CXXCPP $CPPFLAGS'
18267 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18268 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18269 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18270 ac_main_return=return
18271
18272 for ac_header in typeinfo
18273 do
18274 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18275 echo "$as_me:18275: checking for $ac_header" >&5
18276 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18277 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18278   echo $ECHO_N "(cached) $ECHO_C" >&6
18279 else
18280   cat >conftest.$ac_ext <<_ACEOF
18281 #line 18281 "configure"
18282 #include "confdefs.h"
18283 #include <$ac_header>
18284 _ACEOF
18285 if { (eval echo "$as_me:18285: \"$ac_cpp conftest.$ac_ext\"") >&5
18286   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18287   ac_status=$?
18288   egrep -v '^ *\+' conftest.er1 >conftest.err
18289   rm -f conftest.er1
18290   cat conftest.err >&5
18291   echo "$as_me:18291: \$? = $ac_status" >&5
18292   (exit $ac_status); } >/dev/null; then
18293   if test -s conftest.err; then
18294     ac_cpp_err=$ac_cxx_preproc_warn_flag
18295   else
18296     ac_cpp_err=
18297   fi
18298 else
18299   ac_cpp_err=yes
18300 fi
18301 if test -z "$ac_cpp_err"; then
18302   eval "$as_ac_Header=yes"
18303 else
18304   echo "$as_me: failed program was:" >&5
18305   cat conftest.$ac_ext >&5
18306   eval "$as_ac_Header=no"
18307 fi
18308 rm -f conftest.err conftest.$ac_ext
18309 fi
18310 echo "$as_me:18310: result: `eval echo '${'$as_ac_Header'}'`" >&5
18311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18312 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18313   cat >>confdefs.h <<EOF
18314 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18315 EOF
18316
18317 fi
18318 done
18319
18320 for ac_header in iostream
18321 do
18322 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18323 echo "$as_me:18323: checking for $ac_header" >&5
18324 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18325 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18326   echo $ECHO_N "(cached) $ECHO_C" >&6
18327 else
18328   cat >conftest.$ac_ext <<_ACEOF
18329 #line 18329 "configure"
18330 #include "confdefs.h"
18331 #include <$ac_header>
18332 _ACEOF
18333 if { (eval echo "$as_me:18333: \"$ac_cpp conftest.$ac_ext\"") >&5
18334   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18335   ac_status=$?
18336   egrep -v '^ *\+' conftest.er1 >conftest.err
18337   rm -f conftest.er1
18338   cat conftest.err >&5
18339   echo "$as_me:18339: \$? = $ac_status" >&5
18340   (exit $ac_status); } >/dev/null; then
18341   if test -s conftest.err; then
18342     ac_cpp_err=$ac_cxx_preproc_warn_flag
18343   else
18344     ac_cpp_err=
18345   fi
18346 else
18347   ac_cpp_err=yes
18348 fi
18349 if test -z "$ac_cpp_err"; then
18350   eval "$as_ac_Header=yes"
18351 else
18352   echo "$as_me: failed program was:" >&5
18353   cat conftest.$ac_ext >&5
18354   eval "$as_ac_Header=no"
18355 fi
18356 rm -f conftest.err conftest.$ac_ext
18357 fi
18358 echo "$as_me:18358: result: `eval echo '${'$as_ac_Header'}'`" >&5
18359 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18360 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18361   cat >>confdefs.h <<EOF
18362 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18363 EOF
18364
18365 fi
18366 done
18367
18368 if test x"$ac_cv_header_iostream" = xyes ; then
18369         echo "$as_me:18369: checking if iostream uses std-namespace" >&5
18370 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18371         cat >conftest.$ac_ext <<_ACEOF
18372 #line 18372 "configure"
18373 #include "confdefs.h"
18374
18375 #include <iostream>
18376 using std::endl;
18377 using std::cerr;
18378 int
18379 main ()
18380 {
18381
18382 cerr << "testing" << endl;
18383
18384   ;
18385   return 0;
18386 }
18387 _ACEOF
18388 rm -f conftest.$ac_objext
18389 if { (eval echo "$as_me:18389: \"$ac_compile\"") >&5
18390   (eval $ac_compile) 2>&5
18391   ac_status=$?
18392   echo "$as_me:18392: \$? = $ac_status" >&5
18393   (exit $ac_status); } &&
18394          { ac_try='test -s conftest.$ac_objext'
18395   { (eval echo "$as_me:18395: \"$ac_try\"") >&5
18396   (eval $ac_try) 2>&5
18397   ac_status=$?
18398   echo "$as_me:18398: \$? = $ac_status" >&5
18399   (exit $ac_status); }; }; then
18400   cf_iostream_namespace=yes
18401 else
18402   echo "$as_me: failed program was:" >&5
18403 cat conftest.$ac_ext >&5
18404 cf_iostream_namespace=no
18405 fi
18406 rm -f conftest.$ac_objext conftest.$ac_ext
18407         echo "$as_me:18407: result: $cf_iostream_namespace" >&5
18408 echo "${ECHO_T}$cf_iostream_namespace" >&6
18409         if test "$cf_iostream_namespace" = yes ; then
18410                 cat >>confdefs.h <<\EOF
18411 #define IOSTREAM_NAMESPACE 1
18412 EOF
18413
18414         fi
18415 fi
18416
18417 echo "$as_me:18417: checking if we should include stdbool.h" >&5
18418 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18419
18420 if test "${cf_cv_header_stdbool_h+set}" = set; then
18421   echo $ECHO_N "(cached) $ECHO_C" >&6
18422 else
18423
18424         cat >conftest.$ac_ext <<_ACEOF
18425 #line 18425 "configure"
18426 #include "confdefs.h"
18427
18428 int
18429 main ()
18430 {
18431 bool foo = false
18432   ;
18433   return 0;
18434 }
18435 _ACEOF
18436 rm -f conftest.$ac_objext
18437 if { (eval echo "$as_me:18437: \"$ac_compile\"") >&5
18438   (eval $ac_compile) 2>&5
18439   ac_status=$?
18440   echo "$as_me:18440: \$? = $ac_status" >&5
18441   (exit $ac_status); } &&
18442          { ac_try='test -s conftest.$ac_objext'
18443   { (eval echo "$as_me:18443: \"$ac_try\"") >&5
18444   (eval $ac_try) 2>&5
18445   ac_status=$?
18446   echo "$as_me:18446: \$? = $ac_status" >&5
18447   (exit $ac_status); }; }; then
18448   cf_cv_header_stdbool_h=0
18449 else
18450   echo "$as_me: failed program was:" >&5
18451 cat conftest.$ac_ext >&5
18452 cat >conftest.$ac_ext <<_ACEOF
18453 #line 18453 "configure"
18454 #include "confdefs.h"
18455
18456 #ifndef __BEOS__
18457 #include <stdbool.h>
18458 #endif
18459
18460 int
18461 main ()
18462 {
18463 bool foo = false
18464   ;
18465   return 0;
18466 }
18467 _ACEOF
18468 rm -f conftest.$ac_objext
18469 if { (eval echo "$as_me:18469: \"$ac_compile\"") >&5
18470   (eval $ac_compile) 2>&5
18471   ac_status=$?
18472   echo "$as_me:18472: \$? = $ac_status" >&5
18473   (exit $ac_status); } &&
18474          { ac_try='test -s conftest.$ac_objext'
18475   { (eval echo "$as_me:18475: \"$ac_try\"") >&5
18476   (eval $ac_try) 2>&5
18477   ac_status=$?
18478   echo "$as_me:18478: \$? = $ac_status" >&5
18479   (exit $ac_status); }; }; then
18480   cf_cv_header_stdbool_h=1
18481 else
18482   echo "$as_me: failed program was:" >&5
18483 cat conftest.$ac_ext >&5
18484 cf_cv_header_stdbool_h=0
18485 fi
18486 rm -f conftest.$ac_objext conftest.$ac_ext
18487 fi
18488 rm -f conftest.$ac_objext conftest.$ac_ext
18489 fi
18490
18491 if test "$cf_cv_header_stdbool_h" = 1
18492 then    echo "$as_me:18492: result: yes" >&5
18493 echo "${ECHO_T}yes" >&6
18494 else    echo "$as_me:18494: result: no" >&5
18495 echo "${ECHO_T}no" >&6
18496 fi
18497
18498 echo "$as_me:18498: checking for builtin bool type" >&5
18499 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18500
18501 if test "${cf_cv_builtin_bool+set}" = set; then
18502   echo $ECHO_N "(cached) $ECHO_C" >&6
18503 else
18504
18505         cat >conftest.$ac_ext <<_ACEOF
18506 #line 18506 "configure"
18507 #include "confdefs.h"
18508
18509 #include <stdio.h>
18510 #include <sys/types.h>
18511
18512 int
18513 main ()
18514 {
18515 bool x = false
18516   ;
18517   return 0;
18518 }
18519 _ACEOF
18520 rm -f conftest.$ac_objext
18521 if { (eval echo "$as_me:18521: \"$ac_compile\"") >&5
18522   (eval $ac_compile) 2>&5
18523   ac_status=$?
18524   echo "$as_me:18524: \$? = $ac_status" >&5
18525   (exit $ac_status); } &&
18526          { ac_try='test -s conftest.$ac_objext'
18527   { (eval echo "$as_me:18527: \"$ac_try\"") >&5
18528   (eval $ac_try) 2>&5
18529   ac_status=$?
18530   echo "$as_me:18530: \$? = $ac_status" >&5
18531   (exit $ac_status); }; }; then
18532   cf_cv_builtin_bool=1
18533 else
18534   echo "$as_me: failed program was:" >&5
18535 cat conftest.$ac_ext >&5
18536 cf_cv_builtin_bool=0
18537 fi
18538 rm -f conftest.$ac_objext conftest.$ac_ext
18539
18540 fi
18541
18542 if test "$cf_cv_builtin_bool" = 1
18543 then    echo "$as_me:18543: result: yes" >&5
18544 echo "${ECHO_T}yes" >&6
18545 else    echo "$as_me:18545: result: no" >&5
18546 echo "${ECHO_T}no" >&6
18547 fi
18548
18549 echo "$as_me:18549: checking for size of bool" >&5
18550 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18551 if test "${cf_cv_type_of_bool+set}" = set; then
18552   echo $ECHO_N "(cached) $ECHO_C" >&6
18553 else
18554
18555         rm -f cf_test.out
18556         if test "$cross_compiling" = yes; then
18557   cf_cv_type_of_bool=unknown
18558 else
18559   cat >conftest.$ac_ext <<_ACEOF
18560 #line 18560 "configure"
18561 #include "confdefs.h"
18562
18563 #include <stdlib.h>
18564 #include <stdio.h>
18565
18566 #if defined(__cplusplus)
18567
18568 #ifdef HAVE_GXX_BUILTIN_H
18569 #include <g++/builtin.h>
18570 #elif HAVE_GPP_BUILTIN_H
18571 #include <gpp/builtin.h>
18572 #elif HAVE_BUILTIN_H
18573 #include <builtin.h>
18574 #endif
18575
18576 #else
18577
18578 #if $cf_cv_header_stdbool_h
18579 #include <stdbool.h>
18580 #endif
18581
18582 #endif
18583
18584 main()
18585 {
18586         FILE *fp = fopen("cf_test.out", "w");
18587         if (fp != 0) {
18588                 bool x = true;
18589                 if ((bool)(-x) >= 0)
18590                         fputs("unsigned ", fp);
18591                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18592                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18593                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18594                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18595                 fclose(fp);
18596         }
18597         ${cf_cv_main_return:-return}(0);
18598 }
18599
18600 _ACEOF
18601 rm -f conftest$ac_exeext
18602 if { (eval echo "$as_me:18602: \"$ac_link\"") >&5
18603   (eval $ac_link) 2>&5
18604   ac_status=$?
18605   echo "$as_me:18605: \$? = $ac_status" >&5
18606   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18607   { (eval echo "$as_me:18607: \"$ac_try\"") >&5
18608   (eval $ac_try) 2>&5
18609   ac_status=$?
18610   echo "$as_me:18610: \$? = $ac_status" >&5
18611   (exit $ac_status); }; }; then
18612   cf_cv_type_of_bool=`cat cf_test.out`
18613                  if test -z "$cf_cv_type_of_bool"; then
18614                    cf_cv_type_of_bool=unknown
18615                  fi
18616 else
18617   echo "$as_me: program exited with status $ac_status" >&5
18618 echo "$as_me: failed program was:" >&5
18619 cat conftest.$ac_ext >&5
18620 cf_cv_type_of_bool=unknown
18621 fi
18622 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18623 fi
18624
18625 fi
18626
18627         rm -f cf_test.out
18628 echo "$as_me:18628: result: $cf_cv_type_of_bool" >&5
18629 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18630 if test "$cf_cv_type_of_bool" = unknown ; then
18631         case .$NCURSES_BOOL in #(vi
18632         .auto|.) NCURSES_BOOL=unsigned;;
18633         esac
18634         { echo "$as_me:18634: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18635 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18636         cf_cv_type_of_bool=$NCURSES_BOOL
18637 fi
18638
18639 echo "$as_me:18639: checking for special defines needed for etip.h" >&5
18640 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18641 cf_save_CXXFLAGS="$CXXFLAGS"
18642 cf_result="none"
18643
18644 # etip.h includes ncurses.h which includes ncurses_dll.h
18645 # But ncurses_dll.h is generated - fix here.
18646 test -d include || mkdir include
18647 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
18648
18649 for cf_math in "" MATH_H
18650 do
18651 for cf_excp in "" MATH_EXCEPTION
18652 do
18653         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18654         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18655         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18656 cat >conftest.$ac_ext <<_ACEOF
18657 #line 18657 "configure"
18658 #include "confdefs.h"
18659
18660 #include <etip.h.in>
18661
18662 int
18663 main ()
18664 {
18665
18666   ;
18667   return 0;
18668 }
18669 _ACEOF
18670 rm -f conftest.$ac_objext
18671 if { (eval echo "$as_me:18671: \"$ac_compile\"") >&5
18672   (eval $ac_compile) 2>&5
18673   ac_status=$?
18674   echo "$as_me:18674: \$? = $ac_status" >&5
18675   (exit $ac_status); } &&
18676          { ac_try='test -s conftest.$ac_objext'
18677   { (eval echo "$as_me:18677: \"$ac_try\"") >&5
18678   (eval $ac_try) 2>&5
18679   ac_status=$?
18680   echo "$as_me:18680: \$? = $ac_status" >&5
18681   (exit $ac_status); }; }; then
18682
18683         test -n "$cf_math" && cat >>confdefs.h <<EOF
18684 #define ETIP_NEEDS_${cf_math} 1
18685 EOF
18686
18687         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18688 #define ETIP_NEEDS_${cf_excp} 1
18689 EOF
18690
18691         cf_result="$cf_math $cf_excp"
18692         break
18693
18694 else
18695   echo "$as_me: failed program was:" >&5
18696 cat conftest.$ac_ext >&5
18697 fi
18698 rm -f conftest.$ac_objext conftest.$ac_ext
18699 done
18700 done
18701 echo "$as_me:18701: result: $cf_result" >&5
18702 echo "${ECHO_T}$cf_result" >&6
18703 CXXFLAGS="$cf_save_CXXFLAGS"
18704
18705 if test -n "$CXX"; then
18706 echo "$as_me:18706: checking if $CXX accepts parameter initialization" >&5
18707 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18708 if test "${cf_cv_cpp_param_init+set}" = set; then
18709   echo $ECHO_N "(cached) $ECHO_C" >&6
18710 else
18711
18712         ac_ext=cc
18713 ac_cpp='$CXXCPP $CPPFLAGS'
18714 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18715 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18716 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18717 ac_main_return=return
18718
18719         if test "$cross_compiling" = yes; then
18720   cf_cv_cpp_param_init=unknown
18721 else
18722   cat >conftest.$ac_ext <<_ACEOF
18723 #line 18723 "configure"
18724 #include "confdefs.h"
18725
18726 class TEST {
18727 private:
18728         int value;
18729 public:
18730         TEST(int x = 1);
18731         ~TEST();
18732 };
18733
18734 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18735 {
18736         value = x;
18737 }
18738 int main() { }
18739
18740 _ACEOF
18741 rm -f conftest$ac_exeext
18742 if { (eval echo "$as_me:18742: \"$ac_link\"") >&5
18743   (eval $ac_link) 2>&5
18744   ac_status=$?
18745   echo "$as_me:18745: \$? = $ac_status" >&5
18746   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18747   { (eval echo "$as_me:18747: \"$ac_try\"") >&5
18748   (eval $ac_try) 2>&5
18749   ac_status=$?
18750   echo "$as_me:18750: \$? = $ac_status" >&5
18751   (exit $ac_status); }; }; then
18752   cf_cv_cpp_param_init=yes
18753 else
18754   echo "$as_me: program exited with status $ac_status" >&5
18755 echo "$as_me: failed program was:" >&5
18756 cat conftest.$ac_ext >&5
18757 cf_cv_cpp_param_init=no
18758 fi
18759 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18760 fi
18761         ac_ext=cc
18762 ac_cpp='$CXXCPP $CPPFLAGS'
18763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18766 ac_main_return=return
18767
18768 fi
18769 echo "$as_me:18769: result: $cf_cv_cpp_param_init" >&5
18770 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18771 fi
18772 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18773 #define CPP_HAS_PARAM_INIT 1
18774 EOF
18775
18776 if test -n "$CXX"; then
18777
18778 echo "$as_me:18778: checking if $CXX accepts static_cast" >&5
18779 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18780 if test "${cf_cv_cpp_static_cast+set}" = set; then
18781   echo $ECHO_N "(cached) $ECHO_C" >&6
18782 else
18783
18784         ac_ext=cc
18785 ac_cpp='$CXXCPP $CPPFLAGS'
18786 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18787 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18788 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18789 ac_main_return=return
18790
18791         cat >conftest.$ac_ext <<_ACEOF
18792 #line 18792 "configure"
18793 #include "confdefs.h"
18794
18795 class NCursesPanel
18796 {
18797 public:
18798   NCursesPanel(int nlines,
18799                int ncols,
18800                int begin_y = 0,
18801                int begin_x = 0)
18802   {
18803   }
18804
18805   ~NCursesPanel();
18806 };
18807
18808 template<class T> class NCursesUserPanel : public NCursesPanel
18809 {
18810 public:
18811   NCursesUserPanel (int nlines,
18812                     int ncols,
18813                     int begin_y = 0,
18814                     int begin_x = 0,
18815                     const T* p_UserData = static_cast<T*>(0))
18816     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18817   {
18818   };
18819   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18820   {
18821   };
18822
18823   virtual ~NCursesUserPanel() {};
18824 };
18825
18826 int
18827 main ()
18828 {
18829
18830         const char* p_UserData = static_cast<char*>(0)
18831   ;
18832   return 0;
18833 }
18834 _ACEOF
18835 rm -f conftest.$ac_objext
18836 if { (eval echo "$as_me:18836: \"$ac_compile\"") >&5
18837   (eval $ac_compile) 2>&5
18838   ac_status=$?
18839   echo "$as_me:18839: \$? = $ac_status" >&5
18840   (exit $ac_status); } &&
18841          { ac_try='test -s conftest.$ac_objext'
18842   { (eval echo "$as_me:18842: \"$ac_try\"") >&5
18843   (eval $ac_try) 2>&5
18844   ac_status=$?
18845   echo "$as_me:18845: \$? = $ac_status" >&5
18846   (exit $ac_status); }; }; then
18847   cf_cv_cpp_static_cast=yes
18848 else
18849   echo "$as_me: failed program was:" >&5
18850 cat conftest.$ac_ext >&5
18851 cf_cv_cpp_static_cast=no
18852 fi
18853 rm -f conftest.$ac_objext conftest.$ac_ext
18854
18855         ac_ext=cc
18856 ac_cpp='$CXXCPP $CPPFLAGS'
18857 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18858 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18859 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18860 ac_main_return=return
18861
18862 fi
18863 echo "$as_me:18863: result: $cf_cv_cpp_static_cast" >&5
18864 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18865
18866 fi
18867
18868 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18869 #define CPP_HAS_STATIC_CAST 1
18870 EOF
18871
18872         CXX_AR='$(AR)'
18873         CXX_ARFLAGS='$(ARFLAGS)'
18874         case $cf_cv_system_name in #(vi
18875         irix*) #(vi
18876             if test "$GXX" != yes ; then
18877                 CXX_AR='$(CXX)'
18878                 CXX_ARFLAGS='-ar -o'
18879             fi
18880             ;;
18881         sco3.2v5*) #(vi
18882             CXXLDFLAGS="-u main"
18883             ;;
18884         solaris2*)
18885             if test "$GXX" != yes ; then
18886                 CXX_AR='$(CXX)'
18887                 CXX_ARFLAGS='-xar -o'
18888             fi
18889             ;;
18890         esac
18891
18892 else
18893         cf_cxx_library=no
18894         cf_cv_builtin_bool=1
18895
18896         # Just because we are not configuring against C++ right now does not
18897         # mean that a user will not want to use C++.  Some distributors disable
18898         # the C++ portion of this configuration as a shortcut (or just to avoid
18899         # compiling the demo in the c++ directory).  So we need a reasonable
18900         # default for the 'bool' type.
18901         #
18902         # Caveat: since the storage of the bool type is not standardized, it
18903         # may change.
18904
18905         if test "$NCURSES_BOOL" != auto ; then
18906                 cf_cv_type_of_bool=$NCURSES_BOOL
18907                 cf_cv_header_stdbool_h=0
18908         else
18909                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18910
18911 echo "$as_me:18911: checking for size of bool" >&5
18912 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18913 if test "${cf_cv_type_of_bool+set}" = set; then
18914   echo $ECHO_N "(cached) $ECHO_C" >&6
18915 else
18916
18917         rm -f cf_test.out
18918         if test "$cross_compiling" = yes; then
18919   cf_cv_type_of_bool=unknown
18920 else
18921   cat >conftest.$ac_ext <<_ACEOF
18922 #line 18922 "configure"
18923 #include "confdefs.h"
18924
18925 #include <stdlib.h>
18926 #include <stdio.h>
18927
18928 #if defined(__cplusplus)
18929
18930 #ifdef HAVE_GXX_BUILTIN_H
18931 #include <g++/builtin.h>
18932 #elif HAVE_GPP_BUILTIN_H
18933 #include <gpp/builtin.h>
18934 #elif HAVE_BUILTIN_H
18935 #include <builtin.h>
18936 #endif
18937
18938 #else
18939
18940 #if $cf_cv_header_stdbool_h
18941 #include <stdbool.h>
18942 #endif
18943
18944 #endif
18945
18946 main()
18947 {
18948         FILE *fp = fopen("cf_test.out", "w");
18949         if (fp != 0) {
18950                 bool x = true;
18951                 if ((bool)(-x) >= 0)
18952                         fputs("unsigned ", fp);
18953                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18954                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18955                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18956                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18957                 fclose(fp);
18958         }
18959         ${cf_cv_main_return:-return}(0);
18960 }
18961
18962 _ACEOF
18963 rm -f conftest$ac_exeext
18964 if { (eval echo "$as_me:18964: \"$ac_link\"") >&5
18965   (eval $ac_link) 2>&5
18966   ac_status=$?
18967   echo "$as_me:18967: \$? = $ac_status" >&5
18968   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18969   { (eval echo "$as_me:18969: \"$ac_try\"") >&5
18970   (eval $ac_try) 2>&5
18971   ac_status=$?
18972   echo "$as_me:18972: \$? = $ac_status" >&5
18973   (exit $ac_status); }; }; then
18974   cf_cv_type_of_bool=`cat cf_test.out`
18975                  if test -z "$cf_cv_type_of_bool"; then
18976                    cf_cv_type_of_bool=unknown
18977                  fi
18978 else
18979   echo "$as_me: program exited with status $ac_status" >&5
18980 echo "$as_me: failed program was:" >&5
18981 cat conftest.$ac_ext >&5
18982 cf_cv_type_of_bool=unknown
18983 fi
18984 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18985 fi
18986
18987 fi
18988
18989         rm -f cf_test.out
18990 echo "$as_me:18990: result: $cf_cv_type_of_bool" >&5
18991 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18992 if test "$cf_cv_type_of_bool" = unknown ; then
18993         case .$NCURSES_BOOL in #(vi
18994         .auto|.) NCURSES_BOOL=unsigned;;
18995         esac
18996         { echo "$as_me:18996: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18997 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18998         cf_cv_type_of_bool=$NCURSES_BOOL
18999 fi
19000
19001                 else
19002                         echo "$as_me:19002: checking for fallback type of bool" >&5
19003 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19004                         case "$host_cpu" in #(vi
19005                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19006                         *)      cf_cv_type_of_bool=int  ;;
19007                         esac
19008                         echo "$as_me:19008: result: $cf_cv_type_of_bool" >&5
19009 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19010                 fi
19011         fi
19012 fi
19013
19014 # If the C compiler did not declare bool, and we did not determine that the C++
19015 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19016 # ncurses library use the same type as C++ bool.  Note that this allows one to
19017 # specify the type of bool in a configure-script option and postpone
19018 # integration with the C++ compiler provided that the types are compatible.
19019 USE_CXX_BOOL=1
19020 if test $cf_cv_cc_bool_type = 1
19021 then
19022         # oops: C has a bool.  Unlikely, but C++ could differ.
19023         USE_CXX_BOOL=0
19024 elif test $cf_cv_builtin_bool = 0
19025 then
19026         # C++ has no bool
19027         USE_CXX_BOOL=0
19028 else
19029         # this is the normal case
19030         USE_CXX_BOOL='defined(__cplusplus)'
19031 fi
19032
19033 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19034
19035         if test "$cf_with_ada" != "no" ; then
19036                 if test "$with_libtool" != "no"; then
19037                         { echo "$as_me:19037: WARNING: libtool does not support Ada - disabling feature" >&5
19038 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19039                         cf_with_ada=no
19040                 fi
19041         fi
19042
19043         if test "$cf_with_ada" != "no" ; then
19044
19045 cf_ada_make=gnatmake
19046 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19047 set dummy $cf_ada_make; ac_word=$2
19048 echo "$as_me:19048: checking for $ac_word" >&5
19049 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19050 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19051   echo $ECHO_N "(cached) $ECHO_C" >&6
19052 else
19053   if test -n "$gnat_exists"; then
19054   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19055 else
19056   ac_save_IFS=$IFS; IFS=$ac_path_separator
19057 ac_dummy="$PATH"
19058 for ac_dir in $ac_dummy; do
19059   IFS=$ac_save_IFS
19060   test -z "$ac_dir" && ac_dir=.
19061   $as_executable_p "$ac_dir/$ac_word" || continue
19062 ac_cv_prog_gnat_exists="yes"
19063 echo "$as_me:19063: found $ac_dir/$ac_word" >&5
19064 break
19065 done
19066
19067   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19068 fi
19069 fi
19070 gnat_exists=$ac_cv_prog_gnat_exists
19071 if test -n "$gnat_exists"; then
19072   echo "$as_me:19072: result: $gnat_exists" >&5
19073 echo "${ECHO_T}$gnat_exists" >&6
19074 else
19075   echo "$as_me:19075: result: no" >&5
19076 echo "${ECHO_T}no" >&6
19077 fi
19078
19079 if test "$ac_cv_prog_gnat_exists" = no; then
19080    cf_ada_make=
19081    cf_cv_prog_gnat_correct=no
19082 else
19083
19084 echo "$as_me:19084: checking for gnat version" >&5
19085 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19086 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19087         grep '[0-9].[0-9][0-9]*' |\
19088     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19089 echo "$as_me:19089: result: $cf_gnat_version" >&5
19090 echo "${ECHO_T}$cf_gnat_version" >&6
19091
19092 case $cf_gnat_version in #(vi
19093 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
19094         cf_cv_prog_gnat_correct=yes
19095         ;;
19096 *)
19097         { echo "$as_me:19097: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19098 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19099         cf_cv_prog_gnat_correct=no
19100         ;;
19101 esac
19102
19103    # Extract the first word of "m4", so it can be a program name with args.
19104 set dummy m4; ac_word=$2
19105 echo "$as_me:19105: checking for $ac_word" >&5
19106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19107 if test "${ac_cv_prog_M4_exists+set}" = set; then
19108   echo $ECHO_N "(cached) $ECHO_C" >&6
19109 else
19110   if test -n "$M4_exists"; then
19111   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19112 else
19113   ac_save_IFS=$IFS; IFS=$ac_path_separator
19114 ac_dummy="$PATH"
19115 for ac_dir in $ac_dummy; do
19116   IFS=$ac_save_IFS
19117   test -z "$ac_dir" && ac_dir=.
19118   $as_executable_p "$ac_dir/$ac_word" || continue
19119 ac_cv_prog_M4_exists="yes"
19120 echo "$as_me:19120: found $ac_dir/$ac_word" >&5
19121 break
19122 done
19123
19124   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19125 fi
19126 fi
19127 M4_exists=$ac_cv_prog_M4_exists
19128 if test -n "$M4_exists"; then
19129   echo "$as_me:19129: result: $M4_exists" >&5
19130 echo "${ECHO_T}$M4_exists" >&6
19131 else
19132   echo "$as_me:19132: result: no" >&5
19133 echo "${ECHO_T}no" >&6
19134 fi
19135
19136    if test "$ac_cv_prog_M4_exists" = no; then
19137       cf_cv_prog_gnat_correct=no
19138       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19139    fi
19140    if test "$cf_cv_prog_gnat_correct" = yes; then
19141       echo "$as_me:19141: checking if GNAT works" >&5
19142 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19143
19144 rm -rf conftest* *~conftest*
19145 cat >>conftest.ads <<CF_EOF
19146 procedure conftest;
19147 CF_EOF
19148 cat >>conftest.adb <<CF_EOF
19149 with Text_IO;
19150 with GNAT.OS_Lib;
19151 procedure conftest is
19152 begin
19153    Text_IO.Put ("Hello World");
19154    Text_IO.New_Line;
19155    GNAT.OS_Lib.OS_Exit (0);
19156 end conftest;
19157 CF_EOF
19158 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19159    if ( ./conftest 1>&5 2>&1 ) ; then
19160       cf_cv_prog_gnat_correct=yes
19161    else
19162       cf_cv_prog_gnat_correct=no
19163    fi
19164 else
19165    cf_cv_prog_gnat_correct=no
19166 fi
19167 rm -rf conftest* *~conftest*
19168
19169       echo "$as_me:19169: result: $cf_cv_prog_gnat_correct" >&5
19170 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19171    fi
19172 fi
19173
19174                 if test "$cf_cv_prog_gnat_correct" = yes; then
19175
19176         ADAFLAGS="$ADAFLAGS -gnatpn"
19177
19178                         # make ADAFLAGS consistent with CFLAGS
19179                         case "$CFLAGS" in
19180                         *-g*)
19181
19182         ADAFLAGS="$ADAFLAGS -g"
19183
19184                                 ;;
19185                         esac
19186                         case "$CFLAGS" in
19187                         *-O*)
19188
19189         ADAFLAGS="$ADAFLAGS -O3"
19190
19191                                 ;;
19192                         esac
19193
19194 echo "$as_me:19194: checking if GNAT supports generics" >&5
19195 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19196 case $cf_gnat_version in #(vi
19197 3.[1-9]*|[4-9].*) #(vi
19198         cf_gnat_generics=yes
19199         ;;
19200 *)
19201         cf_gnat_generics=no
19202         ;;
19203 esac
19204 echo "$as_me:19204: result: $cf_gnat_generics" >&5
19205 echo "${ECHO_T}$cf_gnat_generics" >&6
19206
19207 if test "$cf_gnat_generics" = yes
19208 then
19209         cf_compile_generics=generics
19210         cf_generic_objects="\${GENOBJS}"
19211 else
19212         cf_compile_generics=
19213         cf_generic_objects=
19214 fi
19215
19216 echo "$as_me:19216: checking if GNAT supports SIGINT" >&5
19217 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19218 if test "${cf_cv_gnat_sigint+set}" = set; then
19219   echo $ECHO_N "(cached) $ECHO_C" >&6
19220 else
19221
19222 rm -rf conftest* *~conftest*
19223 cat >>conftest.ads <<CF_EOF
19224 with Ada.Interrupts.Names;
19225
19226 package ConfTest is
19227
19228    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19229    pragma Unreserve_All_Interrupts;
19230    pragma Warnings (On);
19231
19232    protected Process is
19233       procedure Stop;
19234       function Continue return Boolean;
19235       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19236    private
19237       Done : Boolean := False;
19238    end Process;
19239
19240 end ConfTest;
19241 CF_EOF
19242 cat >>conftest.adb <<CF_EOF
19243 package body ConfTest is
19244    protected body Process is
19245       procedure Stop is
19246       begin
19247          Done := True;
19248       end Stop;
19249       function Continue return Boolean is
19250       begin
19251          return not Done;
19252       end Continue;
19253    end Process;
19254 end ConfTest;
19255 CF_EOF
19256 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19257       cf_cv_gnat_sigint=yes
19258 else
19259    cf_cv_gnat_sigint=no
19260 fi
19261 rm -rf conftest* *~conftest*
19262
19263 fi
19264 echo "$as_me:19264: result: $cf_cv_gnat_sigint" >&5
19265 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19266
19267 if test $cf_cv_gnat_sigint = yes ; then
19268         USE_GNAT_SIGINT=""
19269 else
19270         USE_GNAT_SIGINT="#"
19271 fi
19272
19273 echo "$as_me:19273: checking if GNAT pragma Unreferenced works" >&5
19274 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19275 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19276   echo $ECHO_N "(cached) $ECHO_C" >&6
19277 else
19278
19279 rm -rf conftest* *~conftest*
19280 cat >>conftest.ads <<CF_EOF
19281 procedure conftest;
19282 CF_EOF
19283 cat >>conftest.adb <<CF_EOF
19284 with Text_IO;
19285 with GNAT.OS_Lib;
19286 procedure conftest is
19287    test : Integer;
19288    pragma Unreferenced (test);
19289 begin
19290    test := 1;
19291    Text_IO.Put ("Hello World");
19292    Text_IO.New_Line;
19293    GNAT.OS_Lib.OS_Exit (0);
19294 end conftest;
19295 CF_EOF
19296 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19297       cf_cv_pragma_unreferenced=yes
19298 else
19299    cf_cv_pragma_unreferenced=no
19300 fi
19301 rm -rf conftest* *~conftest*
19302
19303 fi
19304 echo "$as_me:19304: result: $cf_cv_pragma_unreferenced" >&5
19305 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19306
19307 # if the pragma is supported, use it (needed in the Trace code).
19308 if test $cf_cv_pragma_unreferenced = yes ; then
19309         PRAGMA_UNREF=TRUE
19310 else
19311         PRAGMA_UNREF=FALSE
19312 fi
19313
19314 cf_gnat_libraries=no
19315 cf_gnat_projects=no
19316
19317 echo "$as_me:19317: checking if GNAT supports project files" >&5
19318 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19319 case $cf_gnat_version in #(vi
19320 3.[0-9]*) #(vi
19321         ;;
19322 *)
19323         case $cf_cv_system_name in #(vi
19324         cygwin*) #(vi
19325                 ;;
19326         *)
19327                 mkdir conftest.src conftest.bin conftest.lib
19328                 cd conftest.src
19329                 rm -rf conftest* *~conftest*
19330                 cat >>library.gpr <<CF_EOF
19331 project Library is
19332   Kind := External ("LIB_KIND");
19333   for Library_Name use "ConfTest";
19334   for Object_Dir use ".";
19335   for Library_ALI_Dir use External("LIBRARY_DIR");
19336   for Library_Version use External ("SONAME");
19337   for Library_Kind use Kind;
19338   for Library_Dir use External("BUILD_DIR");
19339   Source_Dir := External ("SOURCE_DIR");
19340   for Source_Dirs use (Source_Dir);
19341   package Compiler is
19342      for Default_Switches ("Ada") use
19343        ("-g",
19344         "-O2",
19345         "-gnatafno",
19346         "-gnatVa",   -- All validity checks
19347         "-gnatwa");  -- Activate all optional errors
19348   end Compiler;
19349 end Library;
19350 CF_EOF
19351                 cat >>confpackage.ads <<CF_EOF
19352 package ConfPackage is
19353    procedure conftest;
19354 end ConfPackage;
19355 CF_EOF
19356                 cat >>confpackage.adb <<CF_EOF
19357 with Text_IO;
19358 package body ConfPackage is
19359    procedure conftest is
19360    begin
19361       Text_IO.Put ("Hello World");
19362       Text_IO.New_Line;
19363    end conftest;
19364 end ConfPackage;
19365 CF_EOF
19366                 if ( $cf_ada_make $ADAFLAGS \
19367                                 -Plibrary.gpr \
19368                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19369                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19370                                 -XSOURCE_DIR=`pwd` \
19371                                 -XSONAME=libConfTest.so.1 \
19372                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19373                         cf_gnat_projects=yes
19374                 fi
19375                 cd ..
19376                 if test -f conftest.lib/confpackage.ali
19377                 then
19378                         cf_gnat_libraries=yes
19379                 fi
19380                 rm -rf conftest* *~conftest*
19381                 ;;
19382         esac
19383         ;;
19384 esac
19385 echo "$as_me:19385: result: $cf_gnat_projects" >&5
19386 echo "${ECHO_T}$cf_gnat_projects" >&6
19387
19388 if test $cf_gnat_projects = yes
19389 then
19390         echo "$as_me:19390: checking if GNAT supports libraries" >&5
19391 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19392         echo "$as_me:19392: result: $cf_gnat_libraries" >&5
19393 echo "${ECHO_T}$cf_gnat_libraries" >&6
19394 fi
19395
19396 if test "$cf_gnat_projects" = yes
19397 then
19398         USE_OLD_MAKERULES="#"
19399         USE_GNAT_PROJECTS=""
19400 else
19401         USE_OLD_MAKERULES=""
19402         USE_GNAT_PROJECTS="#"
19403 fi
19404
19405 if test "$cf_gnat_libraries" = yes
19406 then
19407         USE_GNAT_LIBRARIES=""
19408 else
19409         USE_GNAT_LIBRARIES="#"
19410 fi
19411
19412 echo "$as_me:19412: checking for ada-compiler" >&5
19413 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19414
19415 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19416 if test "${with_ada_compiler+set}" = set; then
19417   withval="$with_ada_compiler"
19418   cf_ada_compiler=$withval
19419 else
19420   cf_ada_compiler=gnatmake
19421 fi;
19422
19423 echo "$as_me:19423: result: $cf_ada_compiler" >&5
19424 echo "${ECHO_T}$cf_ada_compiler" >&6
19425
19426                         cf_ada_package=terminal_interface
19427
19428 echo "$as_me:19428: checking for ada-include" >&5
19429 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19430
19431 # Check whether --with-ada-include or --without-ada-include was given.
19432 if test "${with_ada_include+set}" = set; then
19433   withval="$with_ada_include"
19434
19435 else
19436   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19437 fi; if test -n "$prefix/share/ada/adainclude" ; then
19438
19439 if test "x$prefix" != xNONE; then
19440   cf_path_syntax="$prefix"
19441 else
19442   cf_path_syntax="$ac_default_prefix"
19443 fi
19444
19445 case ".$withval" in #(vi
19446 .\$\(*\)*|.\'*\'*) #(vi
19447   ;;
19448 ..|./*|.\\*) #(vi
19449   ;;
19450 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19451   ;;
19452 .\${*prefix}*) #(vi
19453   eval withval="$withval"
19454   case ".$withval" in #(vi
19455   .NONE/*)
19456     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19457     ;;
19458   esac
19459   ;; #(vi
19460 .no|.NONE/*)
19461   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19462   ;;
19463 *)
19464   { { echo "$as_me:19464: error: expected a pathname, not \"$withval\"" >&5
19465 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19466    { (exit 1); exit 1; }; }
19467   ;;
19468 esac
19469
19470 fi
19471 ADA_INCLUDE="$withval"
19472
19473 echo "$as_me:19473: result: $ADA_INCLUDE" >&5
19474 echo "${ECHO_T}$ADA_INCLUDE" >&6
19475
19476 echo "$as_me:19476: checking for ada-objects" >&5
19477 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19478
19479 # Check whether --with-ada-objects or --without-ada-objects was given.
19480 if test "${with_ada_objects+set}" = set; then
19481   withval="$with_ada_objects"
19482
19483 else
19484   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19485 fi; if test -n "$prefix/lib/ada/adalib" ; then
19486
19487 if test "x$prefix" != xNONE; then
19488   cf_path_syntax="$prefix"
19489 else
19490   cf_path_syntax="$ac_default_prefix"
19491 fi
19492
19493 case ".$withval" in #(vi
19494 .\$\(*\)*|.\'*\'*) #(vi
19495   ;;
19496 ..|./*|.\\*) #(vi
19497   ;;
19498 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19499   ;;
19500 .\${*prefix}*) #(vi
19501   eval withval="$withval"
19502   case ".$withval" in #(vi
19503   .NONE/*)
19504     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19505     ;;
19506   esac
19507   ;; #(vi
19508 .no|.NONE/*)
19509   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19510   ;;
19511 *)
19512   { { echo "$as_me:19512: error: expected a pathname, not \"$withval\"" >&5
19513 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19514    { (exit 1); exit 1; }; }
19515   ;;
19516 esac
19517
19518 fi
19519 ADA_OBJECTS="$withval"
19520
19521 echo "$as_me:19521: result: $ADA_OBJECTS" >&5
19522 echo "${ECHO_T}$ADA_OBJECTS" >&6
19523
19524 echo "$as_me:19524: checking if an Ada95 shared-library should be built" >&5
19525 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19526
19527 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19528 if test "${with_ada_sharedlib+set}" = set; then
19529   withval="$with_ada_sharedlib"
19530   with_ada_sharedlib=$withval
19531 else
19532   with_ada_sharedlib=no
19533 fi;
19534 echo "$as_me:19534: result: $with_ada_sharedlib" >&5
19535 echo "${ECHO_T}$with_ada_sharedlib" >&6
19536
19537 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19538 MAKE_ADA_SHAREDLIB="#"
19539
19540 if test "x$with_ada_sharedlib" != xno
19541 then
19542         MAKE_ADA_SHAREDLIB=
19543         if test "x$with_ada_sharedlib" != xyes
19544         then
19545                 ADA_SHAREDLIB="$with_ada_sharedlib"
19546         fi
19547 fi
19548
19549                 fi
19550         fi
19551 else
19552         cf_with_ada=no
19553 fi
19554
19555 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19556 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19557 ###
19558 ### ticlib modules may be a separate library, otherwise contained in termlib.
19559 ### termlib modules may be a separate library, otherwise contained in ncurses.
19560 ###
19561 ### The of "+" or " " between the tokens controls the way the script
19562 ### chooses to split module lists into libraries.
19563 ###
19564 ### (see CF_LIB_RULES).
19565 echo "$as_me:19565: checking for library subsets" >&5
19566 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19567 LIB_SUBSETS=
19568
19569 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19570         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19571         if test "$with_ticlib" != no ; then
19572                 LIB_SUBSETS="${LIB_SUBSETS} "
19573         else
19574                 LIB_SUBSETS="${LIB_SUBSETS}+"
19575         fi
19576 fi
19577
19578 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19579 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19580
19581 if test "$with_termlib" != no ; then
19582         LIB_SUBSETS="${LIB_SUBSETS} "
19583 else
19584         LIB_SUBSETS="${LIB_SUBSETS}+"
19585 fi
19586
19587 LIB_SUBSETS="${LIB_SUBSETS}base"
19588
19589 # Most term-driver calls are to tinfo, but some like init_pair are to the
19590 # base library (so it resides in base).
19591 if test "$with_term_driver" != no ; then
19592         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19593         case $cf_cv_system_name in #(vi
19594         *mingw32*) #(vi
19595                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19596                 ;;
19597         *) #(vi
19598                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19599                 ;;
19600         esac
19601 fi
19602
19603 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19604 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19605
19606 echo "$as_me:19606: result: $LIB_SUBSETS" >&5
19607 echo "${ECHO_T}$LIB_SUBSETS" >&6
19608
19609 ### Construct the list of include-directories to be generated
19610
19611 CPPFLAGS="$CPPFLAGS -I. -I../include"
19612 if test "$srcdir" != "."; then
19613         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19614 fi
19615 if test "$GCC" != yes; then
19616         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19617 elif test "$includedir" != "/usr/include"; then
19618         if test "$includedir" = '${prefix}/include' ; then
19619                 if test $prefix != /usr ; then
19620                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19621                 fi
19622         else
19623                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19624         fi
19625 fi
19626
19627 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19628 if test "$srcdir" != "."; then
19629         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19630 fi
19631 if test "$GCC" != yes; then
19632         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19633 elif test "$includedir" != "/usr/include"; then
19634         if test "$includedir" = '${prefix}/include' ; then
19635                 if test $prefix != /usr ; then
19636                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19637                 fi
19638         else
19639                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19640         fi
19641 fi
19642
19643 ### Build up pieces for makefile rules
19644 echo "$as_me:19644: checking default library suffix" >&5
19645 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19646
19647         case $DFT_LWR_MODEL in
19648         libtool) DFT_ARG_SUFFIX=''   ;;
19649         normal)  DFT_ARG_SUFFIX=''   ;;
19650         debug)   DFT_ARG_SUFFIX='_g' ;;
19651         profile) DFT_ARG_SUFFIX='_p' ;;
19652         shared)  DFT_ARG_SUFFIX=''   ;;
19653         esac
19654         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19655 echo "$as_me:19655: result: $DFT_ARG_SUFFIX" >&5
19656 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19657
19658 echo "$as_me:19658: checking default library-dependency suffix" >&5
19659 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19660
19661         case $DFT_LWR_MODEL in #(vi
19662         libtool) #(vi
19663                 DFT_LIB_SUFFIX='.la'
19664                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19665                 ;;
19666         normal) #(vi
19667                 DFT_LIB_SUFFIX='.a'
19668                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19669                 ;;
19670         debug) #(vi
19671                 DFT_LIB_SUFFIX='_g.a'
19672                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19673                 ;;
19674         profile) #(vi
19675                 DFT_LIB_SUFFIX='_p.a'
19676                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19677                 ;;
19678         shared) #(vi
19679                 case $cf_cv_system_name in
19680                 aix[5-7]*) #(vi
19681                         DFT_LIB_SUFFIX='.a'
19682                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19683                         ;;
19684                 cygwin*) #(vi
19685                         DFT_LIB_SUFFIX='.dll'
19686                         DFT_DEP_SUFFIX='.dll.a'
19687                         ;;
19688                 darwin*) #(vi
19689                         DFT_LIB_SUFFIX='.dylib'
19690                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19691                         ;;
19692                 hpux*) #(vi
19693                         case $target in
19694                         ia64*) #(vi
19695                                 DFT_LIB_SUFFIX='.so'
19696                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19697                                 ;;
19698                         *) #(vi
19699                                 DFT_LIB_SUFFIX='.sl'
19700                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19701                                 ;;
19702                         esac
19703                         ;;
19704                 *)      DFT_LIB_SUFFIX='.so'
19705                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19706                         ;;
19707                 esac
19708         esac
19709         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19710         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19711 echo "$as_me:19711: result: $DFT_DEP_SUFFIX" >&5
19712 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19713
19714 echo "$as_me:19714: checking default object directory" >&5
19715 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19716
19717         case $DFT_LWR_MODEL in
19718         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19719         normal)  DFT_OBJ_SUBDIR='objects' ;;
19720         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19721         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19722         shared)
19723                 case $cf_cv_system_name in #(vi
19724                 cygwin) #(vi
19725                         DFT_OBJ_SUBDIR='objects' ;;
19726                 *)
19727                         DFT_OBJ_SUBDIR='obj_s' ;;
19728                 esac
19729         esac
19730 echo "$as_me:19730: result: $DFT_OBJ_SUBDIR" >&5
19731 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19732
19733 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19734 if test "$cf_with_cxx" = yes ; then
19735 echo "$as_me:19735: checking c++ library-dependency suffix" >&5
19736 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19737 if test "$with_libtool" != "no"; then
19738         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19739 else
19740
19741         case normal in #(vi
19742         libtool) #(vi
19743                 CXX_LIB_SUFFIX='.la'
19744                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19745                 ;;
19746         normal) #(vi
19747                 CXX_LIB_SUFFIX='.a'
19748                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19749                 ;;
19750         debug) #(vi
19751                 CXX_LIB_SUFFIX='_g.a'
19752                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19753                 ;;
19754         profile) #(vi
19755                 CXX_LIB_SUFFIX='_p.a'
19756                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19757                 ;;
19758         shared) #(vi
19759                 case $cf_cv_system_name in
19760                 aix[5-7]*) #(vi
19761                         CXX_LIB_SUFFIX='.a'
19762                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19763                         ;;
19764                 cygwin*) #(vi
19765                         CXX_LIB_SUFFIX='.dll'
19766                         CXX_DEP_SUFFIX='.dll.a'
19767                         ;;
19768                 darwin*) #(vi
19769                         CXX_LIB_SUFFIX='.dylib'
19770                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19771                         ;;
19772                 hpux*) #(vi
19773                         case $target in
19774                         ia64*) #(vi
19775                                 CXX_LIB_SUFFIX='.so'
19776                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19777                                 ;;
19778                         *) #(vi
19779                                 CXX_LIB_SUFFIX='.sl'
19780                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19781                                 ;;
19782                         esac
19783                         ;;
19784                 *)      CXX_LIB_SUFFIX='.so'
19785                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19786                         ;;
19787                 esac
19788         esac
19789         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19790         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19791 fi
19792 echo "$as_me:19792: result: $CXX_LIB_SUFFIX" >&5
19793 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19794
19795 fi
19796
19797 # do not want -ldl in build except as needed for -lncurses dependency
19798 if test "$with_dlsym" = yes ; then
19799 if test $DFT_LWR_MODEL = shared || \
19800    test $DFT_LWR_MODEL = libtool ; then
19801
19802 # remove dl library from $LIBS
19803 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19804
19805 fi
19806 fi
19807 ### Set up low-level terminfo dependencies for makefiles.
19808
19809 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19810 # do not need libdl
19811 TICS_LIST=
19812 if test "$with_dlsym" = yes ; then
19813
19814 # remove dl library from $SHLIB_LIST
19815 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19816
19817 fi
19818
19819 if test "$with_ticlib" != no ; then
19820
19821         if test "$with_ticlib" != yes ; then
19822                 TICS_NAME=$with_ticlib
19823                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19824                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19825                 TICS_LIB_SUFFIX="${with_ticlib}"
19826         else
19827                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19828                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19829                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19830         fi
19831         TICS_LDFLAGS="-L${LIB_DIR}"
19832         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19833 else
19834         TICS_LDFLAGS="-L${LIB_DIR}"
19835         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19836 fi
19837
19838 if test "$with_termlib" != no ; then
19839
19840         if test "$with_termlib" != yes ; then
19841                 TINFO_NAME=$with_termlib
19842                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19843                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19844                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19845                 TINFO_LIB_SUFFIX="${with_termlib}"
19846         else
19847                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19848                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19849                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19850                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19851         fi
19852
19853         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19854         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19855         if test "$DFT_LWR_MODEL" = "libtool"; then
19856                 TEST_ARGS="${TEST_DEPS}"
19857                 TEST_ARG2="${TEST_DEP2}"
19858                 TINFO_LDFLAGS="-L${LIB_DIR}"
19859                 TINFO_LIBS="$TEST_ARGS"
19860                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19861                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19862         else
19863                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19864                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19865                 if test "x$with_term_driver" != xno ; then
19866                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19867                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19868                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19869                 else
19870                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19871                         TINFO_LIBS="$TEST_ARGS"
19872                 fi
19873                 TINFO_LDFLAGS="-L${LIB_DIR}"
19874                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19875         fi
19876 else
19877         # the next lines are needed for linking libtic over libncurses
19878         TINFO_NAME=${LIB_NAME}
19879         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19880         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19881         if test "$with_tic_depends" = yes ; then
19882                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19883         else
19884                 TICS_LIST="$SHLIB_LIST"
19885         fi
19886
19887         TINFO_LDFLAGS="-L${LIB_DIR}"
19888         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19889 fi
19890
19891 if test "$DFT_LWR_MODEL" = shared ; then
19892         case $cf_cv_system_name in #(vi
19893         cygwin*)
19894                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19895                 TINFO_SUFFIX=.dll
19896                 ;;
19897         esac
19898 fi
19899
19900 if test "$with_dlsym" = yes ; then
19901
19902 # remove dl library from $TICS_LIST
19903 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19904
19905 fi
19906
19907 if test "$DFT_LWR_MODEL" = "libtool"; then
19908     OBJEXT=lo
19909 fi
19910
19911 # needed for Ada95
19912 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
19913
19914 case $DFT_LWR_MODEL in
19915 normal|debug|profile)
19916
19917 if test "$GCC" = yes ; then
19918         case $cf_cv_system_name in #(
19919         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19920                 LDFLAGS_STATIC=
19921                 LDFLAGS_SHARED=
19922                 ;;
19923     *)  #( normally, except when broken
19924         LDFLAGS_STATIC=-static
19925         LDFLAGS_SHARED=-dynamic
19926         ;;
19927     esac
19928 else
19929         case $cf_cv_system_name in #(
19930         aix[4-7]*)      #( from ld manpage
19931                 LDFLAGS_STATIC=-bstatic
19932                 LDFLAGS_SHARED=-bdynamic
19933                 ;;
19934         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19935                 # We could also use just "archive" and "shared".
19936                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19937                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19938                 ;;
19939         irix*)          #( from ld manpage IRIX64
19940                 LDFLAGS_STATIC=-Bstatic
19941                 LDFLAGS_SHARED=-Bdynamic
19942                 ;;
19943         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19944                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19945                 LDFLAGS_STATIC=-noso
19946                 LDFLAGS_SHARED=-so_archive
19947                 ;;
19948         solaris2*)
19949                 LDFLAGS_STATIC=-Bstatic
19950                 LDFLAGS_SHARED=-Bdynamic
19951                 ;;
19952         esac
19953 fi
19954
19955 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19956 then
19957         echo "$as_me:19957: checking if linker supports switching between static/dynamic" >&5
19958 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19959
19960         rm -f libconftest.a
19961         cat >conftest.$ac_ext <<EOF
19962 #line 19962 "configure"
19963 #include <stdio.h>
19964 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19965 EOF
19966         if { (eval echo "$as_me:19966: \"$ac_compile\"") >&5
19967   (eval $ac_compile) 2>&5
19968   ac_status=$?
19969   echo "$as_me:19969: \$? = $ac_status" >&5
19970   (exit $ac_status); } ; then
19971                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19972                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19973         fi
19974         rm -f conftest.*
19975
19976         cf_save_LIBS="$LIBS"
19977
19978         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19979         cat >conftest.$ac_ext <<_ACEOF
19980 #line 19980 "configure"
19981 #include "confdefs.h"
19982
19983 #line 19983 "configure"
19984 #include <stdio.h>
19985 int cf_ldflags_static(FILE *fp);
19986
19987 int
19988 main ()
19989 {
19990
19991         return cf_ldflags_static(stdin);
19992
19993   ;
19994   return 0;
19995 }
19996 _ACEOF
19997 rm -f conftest.$ac_objext conftest$ac_exeext
19998 if { (eval echo "$as_me:19998: \"$ac_link\"") >&5
19999   (eval $ac_link) 2>&5
20000   ac_status=$?
20001   echo "$as_me:20001: \$? = $ac_status" >&5
20002   (exit $ac_status); } &&
20003          { ac_try='test -s conftest$ac_exeext'
20004   { (eval echo "$as_me:20004: \"$ac_try\"") >&5
20005   (eval $ac_try) 2>&5
20006   ac_status=$?
20007   echo "$as_me:20007: \$? = $ac_status" >&5
20008   (exit $ac_status); }; }; then
20009
20010         # some linkers simply ignore the -dynamic
20011         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20012         *static*) # (vi
20013                 cf_ldflags_static=no
20014                 ;;
20015         *)
20016                 cf_ldflags_static=yes
20017                 ;;
20018         esac
20019
20020 else
20021   echo "$as_me: failed program was:" >&5
20022 cat conftest.$ac_ext >&5
20023 cf_ldflags_static=no
20024 fi
20025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20026
20027         rm -f libconftest.*
20028         LIBS="$cf_save_LIBS"
20029
20030         echo "$as_me:20030: result: $cf_ldflags_static" >&5
20031 echo "${ECHO_T}$cf_ldflags_static" >&6
20032
20033         if test $cf_ldflags_static != yes
20034         then
20035                 LDFLAGS_STATIC=
20036                 LDFLAGS_SHARED=
20037         fi
20038 else
20039         LDFLAGS_STATIC=
20040         LDFLAGS_SHARED=
20041 fi
20042
20043         ;;
20044 esac
20045
20046 echo "$as_me:20046: checking where we will install curses.h" >&5
20047 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20048 test "$with_overwrite" = no && \
20049 test "x$includedir" = 'x${prefix}/include' && \
20050         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20051 echo "$as_me:20051: result: $includedir" >&5
20052 echo "${ECHO_T}$includedir" >&6
20053
20054 ### Resolve a conflict between normal and wide-curses by forcing applications
20055 ### that will need libutf8 to add it to their configure script.
20056 if test "$with_overwrite" != no ; then
20057 if test "$NCURSES_LIBUTF8" = 1 ; then
20058         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20059         { echo "$as_me:20059: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20060 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20061 fi
20062 fi
20063 WITH_OVERWRITE=$with_overwrite
20064
20065 # used to separate tack out of the tree
20066 NCURSES_TREE=
20067
20068 ### predefined stuff for the test programs
20069 cat >>confdefs.h <<\EOF
20070 #define HAVE_SLK_COLOR 1
20071 EOF
20072
20073 ### Construct the list of subdirectories for which we'll customize makefiles
20074 ### with the appropriate compile-rules.
20075
20076 echo "$as_me:20076: checking for src modules" >&5
20077 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20078
20079 # dependencies and linker-arguments for test-programs
20080 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20081 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20082 if test "$DFT_LWR_MODEL" = "libtool"; then
20083         TEST_ARGS="${TEST_DEPS}"
20084         TEST_ARG2="${TEST_DEP2}"
20085 else
20086         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20087         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20088 fi
20089
20090 PC_MODULES_TO_MAKE="ncurses"
20091 cf_cv_src_modules=
20092 for cf_dir in $modules_to_build
20093 do
20094         if test -f $srcdir/$cf_dir/modules; then
20095
20096                 # We may/may not have tack in the distribution, though the
20097                 # makefile is.
20098                 if test $cf_dir = tack ; then
20099                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20100                                 continue
20101                         fi
20102                 fi
20103
20104                 if test -z "$cf_cv_src_modules"; then
20105                         cf_cv_src_modules=$cf_dir
20106                 else
20107                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20108                 fi
20109
20110                 # Make the ncurses_cfg.h file record the library interface files as
20111                 # well.  These are header files that are the same name as their
20112                 # directory.  Ncurses is the only library that does not follow
20113                 # that pattern.
20114                 if test $cf_dir = tack ; then
20115                         continue
20116                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20117
20118 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20119
20120                         cat >>confdefs.h <<EOF
20121 #define HAVE_${cf_have_include}_H 1
20122 EOF
20123
20124                         cat >>confdefs.h <<EOF
20125 #define HAVE_LIB${cf_have_include} 1
20126 EOF
20127
20128                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20129                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20130                         if test "$DFT_LWR_MODEL" = "libtool"; then
20131                                 TEST_ARGS="${TEST_DEPS}"
20132                                 TEST_ARG2="${TEST_DEP2}"
20133                         else
20134                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20135                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20136                         fi
20137                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}"
20138                 fi
20139         fi
20140 done
20141 echo "$as_me:20141: result: $cf_cv_src_modules" >&5
20142 echo "${ECHO_T}$cf_cv_src_modules" >&6
20143
20144 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20145 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20146
20147 SRC_SUBDIRS=
20148 if test "x$cf_with_manpages" != xno ; then
20149         SRC_SUBDIRS="$SRC_SUBDIRS man"
20150 fi
20151 SRC_SUBDIRS="$SRC_SUBDIRS include"
20152 for cf_dir in $cf_cv_src_modules
20153 do
20154         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20155 done
20156 if test "x$cf_with_tests" != "xno" ; then
20157         SRC_SUBDIRS="$SRC_SUBDIRS test"
20158 fi
20159 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20160 if test "$cf_with_cxx_binding" != no; then
20161         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++"
20162         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20163 fi
20164
20165 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_NAME"
20166 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE tic"
20167
20168 ADA_SUBDIRS=
20169 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20170         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20171         ADA_SUBDIRS="gen src"
20172         if test "x$cf_with_tests" != "xno" ; then
20173                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20174         fi
20175 fi
20176
20177 SUB_MAKEFILES=
20178 for cf_dir in $SRC_SUBDIRS
20179 do
20180         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20181 done
20182
20183 if test -n "$ADA_SUBDIRS"; then
20184         for cf_dir in $ADA_SUBDIRS
20185         do
20186                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20187         done
20188
20189 fi
20190
20191 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20192    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20193    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20194 fi
20195
20196 DIRS_TO_MAKE="lib"
20197 for cf_item in $cf_list_models
20198 do
20199
20200         case $cf_item in
20201         libtool) cf_subdir='obj_lo'  ;;
20202         normal)  cf_subdir='objects' ;;
20203         debug)   cf_subdir='obj_g' ;;
20204         profile) cf_subdir='obj_p' ;;
20205         shared)
20206                 case $cf_cv_system_name in #(vi
20207                 cygwin) #(vi
20208                         cf_subdir='objects' ;;
20209                 *)
20210                         cf_subdir='obj_s' ;;
20211                 esac
20212         esac
20213
20214         for cf_item2 in $DIRS_TO_MAKE
20215         do
20216                 test $cf_item2 = $cf_subdir && break
20217         done
20218         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20219 done
20220 for cf_dir in $DIRS_TO_MAKE
20221 do
20222         test ! -d $cf_dir && mkdir $cf_dir
20223 done
20224
20225 # symbols that differ when compiling Ada95 by itself.
20226 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20227
20228 # values to use as strings
20229 cat >>confdefs.h <<EOF
20230 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20231 EOF
20232
20233 cat >>confdefs.h <<EOF
20234 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20235 EOF
20236
20237 ### Now that we're done running tests, add the compiler-warnings, if any
20238
20239 cf_fix_cppflags=no
20240 cf_new_cflags=
20241 cf_new_cppflags=
20242 cf_new_extra_cppflags=
20243
20244 for cf_add_cflags in $EXTRA_CFLAGS
20245 do
20246 case $cf_fix_cppflags in
20247 no)
20248         case $cf_add_cflags in #(vi
20249         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20250                 case $cf_add_cflags in
20251                 -D*)
20252                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20253
20254                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20255                                 && test -z "${cf_tst_cflags}" \
20256                                 && cf_fix_cppflags=yes
20257
20258                         if test $cf_fix_cppflags = yes ; then
20259                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20260                                 continue
20261                         elif test "${cf_tst_cflags}" = "\"'" ; then
20262                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20263                                 continue
20264                         fi
20265                         ;;
20266                 esac
20267                 case "$CPPFLAGS" in
20268                 *$cf_add_cflags) #(vi
20269                         ;;
20270                 *) #(vi
20271                         case $cf_add_cflags in #(vi
20272                         -D*)
20273                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20274
20275 CPPFLAGS=`echo "$CPPFLAGS" | \
20276         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20277                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20278
20279                                 ;;
20280                         esac
20281                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20282                         ;;
20283                 esac
20284                 ;;
20285         *)
20286                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20287                 ;;
20288         esac
20289         ;;
20290 yes)
20291         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20292
20293         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20294
20295         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20296                 && test -z "${cf_tst_cflags}" \
20297                 && cf_fix_cppflags=no
20298         ;;
20299 esac
20300 done
20301
20302 if test -n "$cf_new_cflags" ; then
20303
20304         CFLAGS="$CFLAGS $cf_new_cflags"
20305 fi
20306
20307 if test -n "$cf_new_cppflags" ; then
20308
20309         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20310 fi
20311
20312 if test -n "$cf_new_extra_cppflags" ; then
20313
20314         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20315 fi
20316
20317 ### Define substitutions for header files to avoid name-pollution
20318
20319 if test "$cf_cv_have_tcgetattr" = yes ; then
20320         HAVE_TCGETATTR=1
20321 else
20322         HAVE_TCGETATTR=0
20323 fi
20324
20325 if test "$ac_cv_header_termio_h" = yes ; then
20326         HAVE_TERMIO_H=1
20327 else
20328         HAVE_TERMIO_H=0
20329 fi
20330
20331 if test "$ac_cv_header_termios_h" = yes ; then
20332         HAVE_TERMIOS_H=1
20333 else
20334         HAVE_TERMIOS_H=0
20335 fi
20336
20337 ################################################################################
20338 test "$use_database" = yes && \
20339 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20340
20341 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20342 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20343
20344 if test x"$enable_pc_files" = xyes ; then \
20345 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20346 MAKE_PC_FILES=
20347 else
20348 MAKE_PC_FILES="#"
20349 fi
20350
20351 # Extract the first word of "tic", so it can be a program name with args.
20352 set dummy tic; ac_word=$2
20353 echo "$as_me:20353: checking for $ac_word" >&5
20354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20355 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20356   echo $ECHO_N "(cached) $ECHO_C" >&6
20357 else
20358   case $TIC_PATH in
20359   [\\/]* | ?:[\\/]*)
20360   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20361   ;;
20362   *)
20363   ac_save_IFS=$IFS; IFS=$ac_path_separator
20364 ac_dummy="$PATH:/usr/local/ncurses/bin"
20365 for ac_dir in $ac_dummy; do
20366   IFS=$ac_save_IFS
20367   test -z "$ac_dir" && ac_dir=.
20368   if $as_executable_p "$ac_dir/$ac_word"; then
20369    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20370    echo "$as_me:20370: found $ac_dir/$ac_word" >&5
20371    break
20372 fi
20373 done
20374
20375   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20376   ;;
20377 esac
20378 fi
20379 TIC_PATH=$ac_cv_path_TIC_PATH
20380
20381 if test -n "$TIC_PATH"; then
20382   echo "$as_me:20382: result: $TIC_PATH" >&5
20383 echo "${ECHO_T}$TIC_PATH" >&6
20384 else
20385   echo "$as_me:20385: result: no" >&5
20386 echo "${ECHO_T}no" >&6
20387 fi
20388
20389 if test -n "$FALLBACK_LIST"
20390 then
20391         if test "$TIC_PATH" = unknown
20392         then
20393                 { echo "$as_me:20393: WARNING: no tic program found for fallbacks" >&5
20394 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20395         fi
20396 fi
20397
20398 if test "x$cf_with_tests" != xno ; then
20399         MAKE_TESTS=
20400 else
20401         MAKE_TESTS="#"
20402 fi
20403
20404 ADAHTML_DIR=../../doc/html/ada
20405
20406 SUB_SCRIPTS=
20407 case $cf_cv_system_name in #(vi
20408 *mingw32*) #(vi
20409         SUB_SCRIPTS="mk-dlls.sh"
20410         ;;
20411 esac
20412
20413 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"
20414 ac_config_commands="$ac_config_commands default"
20415 cat >confcache <<\_ACEOF
20416 # This file is a shell script that caches the results of configure
20417 # tests run on this system so they can be shared between configure
20418 # scripts and configure runs, see configure's option --config-cache.
20419 # It is not useful on other systems.  If it contains results you don't
20420 # want to keep, you may remove or edit it.
20421 #
20422 # config.status only pays attention to the cache file if you give it
20423 # the --recheck option to rerun configure.
20424 #
20425 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20426 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20427 # following values.
20428
20429 _ACEOF
20430
20431 # The following way of writing the cache mishandles newlines in values,
20432 # but we know of no workaround that is simple, portable, and efficient.
20433 # So, don't put newlines in cache variables' values.
20434 # Ultrix sh set writes to stderr and can't be redirected directly,
20435 # and sets the high bit in the cache file unless we assign to the vars.
20436 {
20437   (set) 2>&1 |
20438     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20439     *ac_space=\ *)
20440       # `set' does not quote correctly, so add quotes (double-quote
20441       # substitution turns \\\\ into \\, and sed turns \\ into \).
20442       sed -n \
20443         "s/'/'\\\\''/g;
20444           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20445       ;;
20446     *)
20447       # `set' quotes correctly as required by POSIX, so do not add quotes.
20448       sed -n \
20449         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20450       ;;
20451     esac;
20452 } |
20453   sed '
20454      t clear
20455      : clear
20456      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20457      t end
20458      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20459      : end' >>confcache
20460 if cmp -s $cache_file confcache; then :; else
20461   if test -w $cache_file; then
20462     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20463     cat confcache >$cache_file
20464   else
20465     echo "not updating unwritable cache $cache_file"
20466   fi
20467 fi
20468 rm -f confcache
20469
20470 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20471 # Let make expand exec_prefix.
20472 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20473
20474 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20475 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20476 # trailing colons and then remove the whole line if VPATH becomes empty
20477 # (actually we leave an empty line to preserve line numbers).
20478 if test "x$srcdir" = x.; then
20479   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20480 s/:*\$(srcdir):*/:/;
20481 s/:*\${srcdir}:*/:/;
20482 s/:*@srcdir@:*/:/;
20483 s/^\([^=]*=[    ]*\):*/\1/;
20484 s/:*$//;
20485 s/^[^=]*=[      ]*$//;
20486 }'
20487 fi
20488
20489 DEFS=-DHAVE_CONFIG_H
20490
20491 : ${CONFIG_STATUS=./config.status}
20492 ac_clean_files_save=$ac_clean_files
20493 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20494 { echo "$as_me:20494: creating $CONFIG_STATUS" >&5
20495 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20496 cat >$CONFIG_STATUS <<_ACEOF
20497 #! $SHELL
20498 # Generated automatically by configure.
20499 # Run this file to recreate the current configuration.
20500 # Compiler output produced by configure, useful for debugging
20501 # configure, is in config.log if it exists.
20502
20503 debug=false
20504 SHELL=\${CONFIG_SHELL-$SHELL}
20505 ac_cs_invocation="\$0 \$@"
20506
20507 _ACEOF
20508
20509 cat >>$CONFIG_STATUS <<\_ACEOF
20510 # Be Bourne compatible
20511 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20512   emulate sh
20513   NULLCMD=:
20514 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20515   set -o posix
20516 fi
20517
20518 # Name of the executable.
20519 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20520
20521 if expr a : '\(a\)' >/dev/null 2>&1; then
20522   as_expr=expr
20523 else
20524   as_expr=false
20525 fi
20526
20527 rm -f conf$$ conf$$.exe conf$$.file
20528 echo >conf$$.file
20529 if ln -s conf$$.file conf$$ 2>/dev/null; then
20530   # We could just check for DJGPP; but this test a) works b) is more generic
20531   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20532   if test -f conf$$.exe; then
20533     # Don't use ln at all; we don't have any links
20534     as_ln_s='cp -p'
20535   else
20536     as_ln_s='ln -s'
20537   fi
20538 elif ln conf$$.file conf$$ 2>/dev/null; then
20539   as_ln_s=ln
20540 else
20541   as_ln_s='cp -p'
20542 fi
20543 rm -f conf$$ conf$$.exe conf$$.file
20544
20545 as_executable_p="test -f"
20546
20547 # Support unset when possible.
20548 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20549   as_unset=unset
20550 else
20551   as_unset=false
20552 fi
20553
20554 # NLS nuisances.
20555 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20556 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20557 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20558 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20559 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20560 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20561 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20562 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20563
20564 # IFS
20565 # We need space, tab and new line, in precisely that order.
20566 as_nl='
20567 '
20568 IFS="   $as_nl"
20569
20570 # CDPATH.
20571 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20572
20573 exec 6>&1
20574
20575 _ACEOF
20576
20577 # Files that config.status was made for.
20578 if test -n "$ac_config_files"; then
20579   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20580 fi
20581
20582 if test -n "$ac_config_headers"; then
20583   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20584 fi
20585
20586 if test -n "$ac_config_links"; then
20587   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20588 fi
20589
20590 if test -n "$ac_config_commands"; then
20591   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20592 fi
20593
20594 cat >>$CONFIG_STATUS <<\EOF
20595
20596 ac_cs_usage="\
20597 \`$as_me' instantiates files from templates according to the
20598 current configuration.
20599
20600 Usage: $0 [OPTIONS] [FILE]...
20601
20602   -h, --help       print this help, then exit
20603   -V, --version    print version number, then exit
20604   -d, --debug      don't remove temporary files
20605       --recheck    update $as_me by reconfiguring in the same conditions
20606   --file=FILE[:TEMPLATE]
20607                    instantiate the configuration file FILE
20608   --header=FILE[:TEMPLATE]
20609                    instantiate the configuration header FILE
20610
20611 Configuration files:
20612 $config_files
20613
20614 Configuration headers:
20615 $config_headers
20616
20617 Configuration commands:
20618 $config_commands
20619
20620 Report bugs to <dickey@invisible-island.net>."
20621 EOF
20622
20623 cat >>$CONFIG_STATUS <<EOF
20624 ac_cs_version="\\
20625 config.status
20626 configured by $0, generated by GNU Autoconf 2.52.20101002,
20627   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20628
20629 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20630 Free Software Foundation, Inc.
20631 This config.status script is free software; the Free Software Foundation
20632 gives unlimited permission to copy, distribute and modify it."
20633 srcdir=$srcdir
20634 INSTALL="$INSTALL"
20635 EOF
20636
20637 cat >>$CONFIG_STATUS <<\EOF
20638 # If no file are specified by the user, then we need to provide default
20639 # value.  By we need to know if files were specified by the user.
20640 ac_need_defaults=:
20641 while test $# != 0
20642 do
20643   case $1 in
20644   --*=*)
20645     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20646     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20647     shift
20648     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20649     shift
20650     ;;
20651   -*);;
20652   *) # This is not an option, so the user has probably given explicit
20653      # arguments.
20654      ac_need_defaults=false;;
20655   esac
20656
20657   case $1 in
20658   # Handling of the options.
20659 EOF
20660 cat >>$CONFIG_STATUS <<EOF
20661   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20662     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20663     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20664 EOF
20665 cat >>$CONFIG_STATUS <<\EOF
20666   --version | --vers* | -V )
20667     echo "$ac_cs_version"; exit 0 ;;
20668   --he | --h)
20669     # Conflict between --help and --header
20670     { { echo "$as_me:20670: error: ambiguous option: $1
20671 Try \`$0 --help' for more information." >&5
20672 echo "$as_me: error: ambiguous option: $1
20673 Try \`$0 --help' for more information." >&2;}
20674    { (exit 1); exit 1; }; };;
20675   --help | --hel | -h )
20676     echo "$ac_cs_usage"; exit 0 ;;
20677   --debug | --d* | -d )
20678     debug=: ;;
20679   --file | --fil | --fi | --f )
20680     shift
20681     CONFIG_FILES="$CONFIG_FILES $1"
20682     ac_need_defaults=false;;
20683   --header | --heade | --head | --hea )
20684     shift
20685     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20686     ac_need_defaults=false;;
20687
20688   # This is an error.
20689   -*) { { echo "$as_me:20689: error: unrecognized option: $1
20690 Try \`$0 --help' for more information." >&5
20691 echo "$as_me: error: unrecognized option: $1
20692 Try \`$0 --help' for more information." >&2;}
20693    { (exit 1); exit 1; }; } ;;
20694
20695   *) ac_config_targets="$ac_config_targets $1" ;;
20696
20697   esac
20698   shift
20699 done
20700
20701 exec 5>>config.log
20702 cat >&5 << _ACEOF
20703
20704 ## ----------------------- ##
20705 ## Running config.status.  ##
20706 ## ----------------------- ##
20707
20708 This file was extended by $as_me 2.52.20101002, executed with
20709   CONFIG_FILES    = $CONFIG_FILES
20710   CONFIG_HEADERS  = $CONFIG_HEADERS
20711   CONFIG_LINKS    = $CONFIG_LINKS
20712   CONFIG_COMMANDS = $CONFIG_COMMANDS
20713   > $ac_cs_invocation
20714 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20715
20716 _ACEOF
20717 EOF
20718
20719 cat >>$CONFIG_STATUS <<EOF
20720 #
20721 # INIT-COMMANDS section.
20722 #
20723
20724 ### Special initialization commands, used to pass information from the
20725 ### configuration-run into config.status
20726
20727 AWK="$AWK"
20728 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20729 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20730 ECHO_LINK="$ECHO_LINK"
20731 LDCONFIG="$LDCONFIG"
20732 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20733 LIB_NAME="$LIB_NAME"
20734 LIB_SUBSETS="$LIB_SUBSETS"
20735 LIB_SUFFIX="$LIB_SUFFIX"
20736 LIB_TRACING="$LIB_TRACING"
20737 LN_S="$LN_S"
20738 MAKE_TERMINFO="$MAKE_TERMINFO"
20739 NCURSES_MAJOR="$NCURSES_MAJOR"
20740 NCURSES_MINOR="$NCURSES_MINOR"
20741 NCURSES_OSPEED="$NCURSES_OSPEED"
20742 NCURSES_PATCH="$NCURSES_PATCH"
20743 SRC_SUBDIRS="$SRC_SUBDIRS"
20744 TERMINFO="$TERMINFO"
20745 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20746 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20747 TICS_NAME="$TICS_NAME"
20748 TIC_PATH="$TIC_PATH"
20749 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20750 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20751 TINFO_NAME="$TINFO_NAME"
20752 TINFO_SUFFIX="$TINFO_SUFFIX"
20753 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20754 WITH_CURSES_H="$with_curses_h"
20755 WITH_ECHO="$with_echo"
20756 WITH_OVERWRITE="$with_overwrite"
20757 cf_LIST_MODELS="$cf_list_models"
20758 cf_cv_abi_version="$cf_cv_abi_version"
20759 cf_cv_do_relink="$cf_cv_do_relink"
20760 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20761 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20762 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20763 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20764 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20765 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20766 cf_cv_rel_version="$cf_cv_rel_version"
20767 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20768 cf_cv_shared_soname='$cf_cv_shared_soname'
20769 cf_cv_shlib_version="$cf_cv_shlib_version"
20770 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20771 cf_cv_system_name="$cf_cv_system_name"
20772 cf_cv_term_driver="$with_term_driver"
20773 cf_with_ada="$cf_with_ada"
20774 cf_with_cxx_binding="$cf_with_cxx_binding"
20775 cf_with_manpages="$cf_with_manpages"
20776 cf_with_tests="$cf_with_tests"
20777 host="$host"
20778 target="$target"
20779
20780 EOF
20781
20782 cat >>$CONFIG_STATUS <<\EOF
20783 for ac_config_target in $ac_config_targets
20784 do
20785   case "$ac_config_target" in
20786   # Handling of arguments.
20787   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20788   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20789   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20790   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20791   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20792   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20793   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20794   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20795   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20796   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20797   *) { { echo "$as_me:20797: error: invalid argument: $ac_config_target" >&5
20798 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20799    { (exit 1); exit 1; }; };;
20800   esac
20801 done
20802
20803 # If the user did not use the arguments to specify the items to instantiate,
20804 # then the envvar interface is used.  Set only those that are not.
20805 # We use the long form for the default assignment because of an extremely
20806 # bizarre bug on SunOS 4.1.3.
20807 if $ac_need_defaults; then
20808   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20809   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20810   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20811 fi
20812
20813 # Create a temporary directory, and hook for its removal unless debugging.
20814 $debug ||
20815 {
20816   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20817   trap '{ (exit 1); exit 1; }' 1 2 13 15
20818 }
20819
20820 # Create a (secure) tmp directory for tmp files.
20821 : ${TMPDIR=/tmp}
20822 {
20823   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20824   test -n "$tmp" && test -d "$tmp"
20825 }  ||
20826 {
20827   tmp=$TMPDIR/cs$$-$RANDOM
20828   (umask 077 && mkdir $tmp)
20829 } ||
20830 {
20831    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20832    { (exit 1); exit 1; }
20833 }
20834
20835 EOF
20836
20837 cat >>$CONFIG_STATUS <<EOF
20838
20839 #
20840 # CONFIG_FILES section.
20841 #
20842
20843 # No need to generate the scripts if there are no CONFIG_FILES.
20844 # This happens for instance when ./config.status config.h
20845 if test -n "\$CONFIG_FILES"; then
20846   # Protect against being on the right side of a sed subst in config.status.
20847   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20848    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20849 s,@SHELL@,$SHELL,;t t
20850 s,@exec_prefix@,$exec_prefix,;t t
20851 s,@prefix@,$prefix,;t t
20852 s,@program_transform_name@,$program_transform_name,;t t
20853 s,@bindir@,$bindir,;t t
20854 s,@sbindir@,$sbindir,;t t
20855 s,@libexecdir@,$libexecdir,;t t
20856 s,@datadir@,$datadir,;t t
20857 s,@sysconfdir@,$sysconfdir,;t t
20858 s,@sharedstatedir@,$sharedstatedir,;t t
20859 s,@localstatedir@,$localstatedir,;t t
20860 s,@libdir@,$libdir,;t t
20861 s,@includedir@,$includedir,;t t
20862 s,@oldincludedir@,$oldincludedir,;t t
20863 s,@infodir@,$infodir,;t t
20864 s,@mandir@,$mandir,;t t
20865 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20866 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20867 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20868 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20869 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20870 s,@build_alias@,$build_alias,;t t
20871 s,@host_alias@,$host_alias,;t t
20872 s,@target_alias@,$target_alias,;t t
20873 s,@ECHO_C@,$ECHO_C,;t t
20874 s,@ECHO_N@,$ECHO_N,;t t
20875 s,@ECHO_T@,$ECHO_T,;t t
20876 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20877 s,@DEFS@,$DEFS,;t t
20878 s,@LIBS@,$LIBS,;t t
20879 s,@top_builddir@,$top_builddir,;t t
20880 s,@EGREP@,$EGREP,;t t
20881 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20882 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20883 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20884 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20885 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20886 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20887 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20888 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20889 s,@build@,$build,;t t
20890 s,@build_cpu@,$build_cpu,;t t
20891 s,@build_vendor@,$build_vendor,;t t
20892 s,@build_os@,$build_os,;t t
20893 s,@host@,$host,;t t
20894 s,@host_cpu@,$host_cpu,;t t
20895 s,@host_vendor@,$host_vendor,;t t
20896 s,@host_os@,$host_os,;t t
20897 s,@target@,$target,;t t
20898 s,@target_cpu@,$target_cpu,;t t
20899 s,@target_vendor@,$target_vendor,;t t
20900 s,@target_os@,$target_os,;t t
20901 s,@CC@,$CC,;t t
20902 s,@CFLAGS@,$CFLAGS,;t t
20903 s,@LDFLAGS@,$LDFLAGS,;t t
20904 s,@CPPFLAGS@,$CPPFLAGS,;t t
20905 s,@ac_ct_CC@,$ac_ct_CC,;t t
20906 s,@EXEEXT@,$EXEEXT,;t t
20907 s,@OBJEXT@,$OBJEXT,;t t
20908 s,@CPP@,$CPP,;t t
20909 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20910 s,@PROG_EXT@,$PROG_EXT,;t t
20911 s,@LDCONFIG@,$LDCONFIG,;t t
20912 s,@CXX@,$CXX,;t t
20913 s,@CXXFLAGS@,$CXXFLAGS,;t t
20914 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20915 s,@AWK@,$AWK,;t t
20916 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20917 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20918 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20919 s,@LINT@,$LINT,;t t
20920 s,@LINT_OPTS@,$LINT_OPTS,;t t
20921 s,@LN_S@,$LN_S,;t t
20922 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20923 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20924 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20925 s,@SET_MAKE@,$SET_MAKE,;t t
20926 s,@CTAGS@,$CTAGS,;t t
20927 s,@ETAGS@,$ETAGS,;t t
20928 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20929 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20930 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20931 s,@RANLIB@,$RANLIB,;t t
20932 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20933 s,@LD@,$LD,;t t
20934 s,@ac_ct_LD@,$ac_ct_LD,;t t
20935 s,@AR@,$AR,;t t
20936 s,@ac_ct_AR@,$ac_ct_AR,;t t
20937 s,@ARFLAGS@,$ARFLAGS,;t t
20938 s,@DESTDIR@,$DESTDIR,;t t
20939 s,@BUILD_CC@,$BUILD_CC,;t t
20940 s,@BUILD_CPP@,$BUILD_CPP,;t t
20941 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20942 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20943 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20944 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20945 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20946 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20947 s,@cf_list_models@,$cf_list_models,;t t
20948 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20949 s,@LIBTOOL@,$LIBTOOL,;t t
20950 s,@LT_UNDEF@,$LT_UNDEF,;t t
20951 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20952 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20953 s,@LIB_CREATE@,$LIB_CREATE,;t t
20954 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20955 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20956 s,@LIB_PREP@,$LIB_PREP,;t t
20957 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20958 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20959 s,@LIB_LINK@,$LIB_LINK,;t t
20960 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20961 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20962 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20963 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20964 s,@TICS_NAME@,$TICS_NAME,;t t
20965 s,@TINFO_NAME@,$TINFO_NAME,;t t
20966 s,@LIB_NAME@,$LIB_NAME,;t t
20967 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20968 s,@CC_G_OPT@,$CC_G_OPT,;t t
20969 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20970 s,@LD_MODEL@,$LD_MODEL,;t t
20971 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20972 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20973 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20974 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20975 s,@LINK_PROGS@,$LINK_PROGS,;t t
20976 s,@LINK_TESTS@,$LINK_TESTS,;t t
20977 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20978 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20979 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20980 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20981 s,@RPATH_LIST@,$RPATH_LIST,;t t
20982 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20983 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20984 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20985 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20986 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20987 s,@TERMINFO@,$TERMINFO,;t t
20988 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20989 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20990 s,@TERMPATH@,$TERMPATH,;t t
20991 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20992 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20993 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20994 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20995 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20996 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20997 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20998 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20999 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21000 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21001 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21002 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21003 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21004 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21005 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21006 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21007 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21008 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21009 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21010 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21011 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21012 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21013 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21014 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21015 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21016 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21017 s,@PTHREAD@,$PTHREAD,;t t
21018 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21019 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21020 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21021 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21022 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21023 s,@ECHO_LINK@,$ECHO_LINK,;t t
21024 s,@ADAFLAGS@,$ADAFLAGS,;t t
21025 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21026 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21027 s,@ADA_TRACE@,$ADA_TRACE,;t t
21028 s,@MATH_LIB@,$MATH_LIB,;t t
21029 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21030 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21031 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21032 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21033 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21034 s,@TEST_LIBS@,$TEST_LIBS,;t t
21035 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21036 s,@CXXCPP@,$CXXCPP,;t t
21037 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21038 s,@CXX_AR@,$CXX_AR,;t t
21039 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21040 s,@CXXLIBS@,$CXXLIBS,;t t
21041 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21042 s,@gnat_exists@,$gnat_exists,;t t
21043 s,@M4_exists@,$M4_exists,;t t
21044 s,@cf_ada_make@,$cf_ada_make,;t t
21045 s,@cf_compile_generics@,$cf_compile_generics,;t t
21046 s,@cf_generic_objects@,$cf_generic_objects,;t t
21047 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21048 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21049 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21050 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21051 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21052 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21053 s,@cf_ada_package@,$cf_ada_package,;t t
21054 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21055 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21056 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21057 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21058 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21059 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21060 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21061 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21062 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21063 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21064 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21065 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21066 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21067 s,@TICS_LIBS@,$TICS_LIBS,;t t
21068 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21069 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21070 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21071 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21072 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21073 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21074 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21075 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21076 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21077 s,@TICS_LIST@,$TICS_LIST,;t t
21078 s,@TINFO_LIST@,$TINFO_LIST,;t t
21079 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21080 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21081 s,@TEST_ARGS@,$TEST_ARGS,;t t
21082 s,@TEST_DEPS@,$TEST_DEPS,;t t
21083 s,@TEST_ARG2@,$TEST_ARG2,;t t
21084 s,@TEST_DEP2@,$TEST_DEP2,;t t
21085 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21086 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21087 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21088 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21089 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21090 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21091 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21092 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21093 s,@cross_compiling@,$cross_compiling,;t t
21094 s,@TIC_PATH@,$TIC_PATH,;t t
21095 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21096 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21097 CEOF
21098
21099 EOF
21100
21101   cat >>$CONFIG_STATUS <<\EOF
21102   # Split the substitutions into bite-sized pieces for seds with
21103   # small command number limits, like on Digital OSF/1 and HP-UX.
21104   ac_max_sed_lines=48
21105   ac_sed_frag=1 # Number of current file.
21106   ac_beg=1 # First line for current file.
21107   ac_end=$ac_max_sed_lines # Line after last line for current file.
21108   ac_more_lines=:
21109   ac_sed_cmds=
21110   while $ac_more_lines; do
21111     if test $ac_beg -gt 1; then
21112       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21113     else
21114       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21115     fi
21116     if test ! -s $tmp/subs.frag; then
21117       ac_more_lines=false
21118     else
21119       # The purpose of the label and of the branching condition is to
21120       # speed up the sed processing (if there are no `@' at all, there
21121       # is no need to browse any of the substitutions).
21122       # These are the two extra sed commands mentioned above.
21123       (echo ':t
21124   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21125       if test -z "$ac_sed_cmds"; then
21126         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21127       else
21128         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21129       fi
21130       ac_sed_frag=`expr $ac_sed_frag + 1`
21131       ac_beg=$ac_end
21132       ac_end=`expr $ac_end + $ac_max_sed_lines`
21133     fi
21134   done
21135   if test -z "$ac_sed_cmds"; then
21136     ac_sed_cmds=cat
21137   fi
21138 fi # test -n "$CONFIG_FILES"
21139
21140 EOF
21141 cat >>$CONFIG_STATUS <<\EOF
21142 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21143   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21144   case $ac_file in
21145   - | *:- | *:-:* ) # input from stdin
21146         cat >$tmp/stdin
21147         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21148         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21149   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21150         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21151   * )   ac_file_in=$ac_file.in ;;
21152   esac
21153
21154   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21155   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21156          X"$ac_file" : 'X\(//\)[^/]' \| \
21157          X"$ac_file" : 'X\(//\)$' \| \
21158          X"$ac_file" : 'X\(/\)' \| \
21159          .     : '\(.\)' 2>/dev/null ||
21160 echo X"$ac_file" |
21161     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21162           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21163           /^X\(\/\/\)$/{ s//\1/; q; }
21164           /^X\(\/\).*/{ s//\1/; q; }
21165           s/.*/./; q'`
21166   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21167     { case "$ac_dir" in
21168   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21169   *)                      as_incr_dir=.;;
21170 esac
21171 as_dummy="$ac_dir"
21172 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21173   case $as_mkdir_dir in
21174     # Skip DOS drivespec
21175     ?:) as_incr_dir=$as_mkdir_dir ;;
21176     *)
21177       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21178       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21179     ;;
21180   esac
21181 done; }
21182
21183     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21184     # A "../" for each directory in $ac_dir_suffix.
21185     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21186   else
21187     ac_dir_suffix= ac_dots=
21188   fi
21189
21190   case $srcdir in
21191   .)  ac_srcdir=.
21192       if test -z "$ac_dots"; then
21193          ac_top_srcdir=.
21194       else
21195          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21196       fi ;;
21197   [\\/]* | ?:[\\/]* )
21198       ac_srcdir=$srcdir$ac_dir_suffix;
21199       ac_top_srcdir=$srcdir ;;
21200   *) # Relative path.
21201     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21202     ac_top_srcdir=$ac_dots$srcdir ;;
21203   esac
21204
21205   case $INSTALL in
21206   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21207   *) ac_INSTALL=$ac_dots$INSTALL ;;
21208   esac
21209
21210   if test x"$ac_file" != x-; then
21211     { echo "$as_me:21211: creating $ac_file" >&5
21212 echo "$as_me: creating $ac_file" >&6;}
21213     rm -f "$ac_file"
21214   fi
21215   # Let's still pretend it is `configure' which instantiates (i.e., don't
21216   # use $as_me), people would be surprised to read:
21217   #    /* config.h.  Generated automatically by config.status.  */
21218   configure_input="Generated automatically from `echo $ac_file_in |
21219                                                  sed 's,.*/,,'` by configure."
21220
21221   # First look for the input files in the build tree, otherwise in the
21222   # src tree.
21223   ac_file_inputs=`IFS=:
21224     for f in $ac_file_in; do
21225       case $f in
21226       -) echo $tmp/stdin ;;
21227       [\\/$]*)
21228          # Absolute (can't be DOS-style, as IFS=:)
21229          test -f "$f" || { { echo "$as_me:21229: error: cannot find input file: $f" >&5
21230 echo "$as_me: error: cannot find input file: $f" >&2;}
21231    { (exit 1); exit 1; }; }
21232          echo $f;;
21233       *) # Relative
21234          if test -f "$f"; then
21235            # Build tree
21236            echo $f
21237          elif test -f "$srcdir/$f"; then
21238            # Source tree
21239            echo $srcdir/$f
21240          else
21241            # /dev/null tree
21242            { { echo "$as_me:21242: error: cannot find input file: $f" >&5
21243 echo "$as_me: error: cannot find input file: $f" >&2;}
21244    { (exit 1); exit 1; }; }
21245          fi;;
21246       esac
21247     done` || { (exit 1); exit 1; }
21248 EOF
21249 cat >>$CONFIG_STATUS <<EOF
21250   sed "$ac_vpsub
21251 $extrasub
21252 EOF
21253 cat >>$CONFIG_STATUS <<\EOF
21254 :t
21255 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21256 s,@configure_input@,$configure_input,;t t
21257 s,@srcdir@,$ac_srcdir,;t t
21258 s,@top_srcdir@,$ac_top_srcdir,;t t
21259 s,@INSTALL@,$ac_INSTALL,;t t
21260 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21261   rm -f $tmp/stdin
21262   if test x"$ac_file" != x-; then
21263     mv $tmp/out $ac_file
21264   else
21265     cat $tmp/out
21266     rm -f $tmp/out
21267   fi
21268
21269 done
21270 EOF
21271 cat >>$CONFIG_STATUS <<\EOF
21272
21273 #
21274 # CONFIG_HEADER section.
21275 #
21276
21277 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21278 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21279 #
21280 # ac_d sets the value in "#define NAME VALUE" lines.
21281 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21282 ac_dB='[        ].*$,\1#\2'
21283 ac_dC=' '
21284 ac_dD=',;t'
21285 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21286 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21287 ac_iB='\([      ]\),\1#\2define\3'
21288 ac_iC=' '
21289 ac_iD='\4,;t'
21290 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21291 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21292 ac_uB='$,\1#\2define\3'
21293 ac_uC=' '
21294 ac_uD=',;t'
21295
21296 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21297   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21298   case $ac_file in
21299   - | *:- | *:-:* ) # input from stdin
21300         cat >$tmp/stdin
21301         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21302         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21303   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21304         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21305   * )   ac_file_in=$ac_file.in ;;
21306   esac
21307
21308   test x"$ac_file" != x- && { echo "$as_me:21308: creating $ac_file" >&5
21309 echo "$as_me: creating $ac_file" >&6;}
21310
21311   # First look for the input files in the build tree, otherwise in the
21312   # src tree.
21313   ac_file_inputs=`IFS=:
21314     for f in $ac_file_in; do
21315       case $f in
21316       -) echo $tmp/stdin ;;
21317       [\\/$]*)
21318          # Absolute (can't be DOS-style, as IFS=:)
21319          test -f "$f" || { { echo "$as_me:21319: error: cannot find input file: $f" >&5
21320 echo "$as_me: error: cannot find input file: $f" >&2;}
21321    { (exit 1); exit 1; }; }
21322          echo $f;;
21323       *) # Relative
21324          if test -f "$f"; then
21325            # Build tree
21326            echo $f
21327          elif test -f "$srcdir/$f"; then
21328            # Source tree
21329            echo $srcdir/$f
21330          else
21331            # /dev/null tree
21332            { { echo "$as_me:21332: error: cannot find input file: $f" >&5
21333 echo "$as_me: error: cannot find input file: $f" >&2;}
21334    { (exit 1); exit 1; }; }
21335          fi;;
21336       esac
21337     done` || { (exit 1); exit 1; }
21338   # Remove the trailing spaces.
21339   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21340
21341 EOF
21342
21343 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21344 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21345 # be either 'cat' or 'sort'.
21346 cat confdefs.h | uniq >conftest.vals
21347
21348 # Break up conftest.vals because some shells have a limit on
21349 # the size of here documents, and old seds have small limits too.
21350
21351 rm -f conftest.tail
21352 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21353 while grep . conftest.vals >/dev/null
21354 do
21355   # Write chunks of a limited-size here document to conftest.frag.
21356   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21357   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21358   echo 'CEOF' >> $CONFIG_STATUS
21359   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21360   rm -f conftest.vals
21361   mv conftest.tail conftest.vals
21362 done
21363 rm -f conftest.vals
21364
21365 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21366 # marker @DEFS@.
21367 echo '  cat >> conftest.edit <<CEOF
21368 /@DEFS@/r conftest.frag
21369 /@DEFS@/d
21370 CEOF
21371 sed -f conftest.edit $tmp/in > $tmp/out
21372 rm -f $tmp/in
21373 mv $tmp/out $tmp/in
21374 rm -f conftest.edit conftest.frag
21375 ' >> $CONFIG_STATUS
21376
21377 cat >>$CONFIG_STATUS <<\EOF
21378   # Let's still pretend it is `configure' which instantiates (i.e., don't
21379   # use $as_me), people would be surprised to read:
21380   #    /* config.h.  Generated automatically by config.status.  */
21381   if test x"$ac_file" = x-; then
21382     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21383   else
21384     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21385   fi
21386   cat $tmp/in >>$tmp/config.h
21387   rm -f $tmp/in
21388   if test x"$ac_file" != x-; then
21389     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21390       { echo "$as_me:21390: $ac_file is unchanged" >&5
21391 echo "$as_me: $ac_file is unchanged" >&6;}
21392     else
21393       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21394          X"$ac_file" : 'X\(//\)[^/]' \| \
21395          X"$ac_file" : 'X\(//\)$' \| \
21396          X"$ac_file" : 'X\(/\)' \| \
21397          .     : '\(.\)' 2>/dev/null ||
21398 echo X"$ac_file" |
21399     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21400           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21401           /^X\(\/\/\)$/{ s//\1/; q; }
21402           /^X\(\/\).*/{ s//\1/; q; }
21403           s/.*/./; q'`
21404       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21405         { case "$ac_dir" in
21406   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21407   *)                      as_incr_dir=.;;
21408 esac
21409 as_dummy="$ac_dir"
21410 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21411   case $as_mkdir_dir in
21412     # Skip DOS drivespec
21413     ?:) as_incr_dir=$as_mkdir_dir ;;
21414     *)
21415       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21416       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21417     ;;
21418   esac
21419 done; }
21420
21421       fi
21422       rm -f $ac_file
21423       mv $tmp/config.h $ac_file
21424     fi
21425   else
21426     cat $tmp/config.h
21427     rm -f $tmp/config.h
21428   fi
21429 done
21430 EOF
21431 cat >>$CONFIG_STATUS <<\EOF
21432 #
21433 # CONFIG_COMMANDS section.
21434 #
21435 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21436   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21437   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21438
21439   case $ac_dest in
21440     default )
21441 if test "x$cf_with_tests" != xno ; then
21442
21443 for cf_dir in test
21444 do
21445         if test ! -d $srcdir/$cf_dir; then
21446                 continue
21447         elif test -f $srcdir/$cf_dir/programs; then
21448                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21449         fi
21450 done
21451
21452 fi
21453
21454         case $cf_cv_system_name in #(vi
21455         OS/2*|os2*) #(vi
21456         LIB_PREFIX=''
21457         ;;
21458         *)      LIB_PREFIX='lib'
21459         ;;
21460         esac
21461 cf_prefix=$LIB_PREFIX
21462
21463 if test $cf_cv_shlib_version = cygdll ; then
21464         TINFO_NAME=$TINFO_ARG_SUFFIX
21465         TINFO_SUFFIX=.dll
21466 fi
21467
21468 if test -n "$TINFO_SUFFIX" ; then
21469         case $TINFO_SUFFIX in
21470         tw*)
21471                 TINFO_NAME="${TINFO_NAME}tw"
21472                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21473                 ;;
21474         t*)
21475                 TINFO_NAME="${TINFO_NAME}t"
21476                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21477                 ;;
21478         w*)
21479                 TINFO_NAME="${TINFO_NAME}w"
21480                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21481                 ;;
21482         esac
21483 fi
21484
21485 for cf_dir in $SRC_SUBDIRS
21486 do
21487         if test ! -d $srcdir/$cf_dir ; then
21488                 continue
21489         elif test -f $srcdir/$cf_dir/modules; then
21490
21491                 SHARED_LIB=
21492                 LIBS_TO_MAKE=
21493                 for cf_item in $cf_LIST_MODELS
21494                 do
21495
21496         case $cf_item in #(vi
21497         libtool) #(vi
21498                 cf_suffix='.la'
21499                 cf_depsuf=$cf_suffix
21500                 ;;
21501         normal) #(vi
21502                 cf_suffix='.a'
21503                 cf_depsuf=$cf_suffix
21504                 ;;
21505         debug) #(vi
21506                 cf_suffix='_g.a'
21507                 cf_depsuf=$cf_suffix
21508                 ;;
21509         profile) #(vi
21510                 cf_suffix='_p.a'
21511                 cf_depsuf=$cf_suffix
21512                 ;;
21513         shared) #(vi
21514                 case $cf_cv_system_name in
21515                 aix[5-7]*) #(vi
21516                         cf_suffix='.a'
21517                         cf_depsuf=$cf_suffix
21518                         ;;
21519                 cygwin*) #(vi
21520                         cf_suffix='.dll'
21521                         cf_depsuf='.dll.a'
21522                         ;;
21523                 darwin*) #(vi
21524                         cf_suffix='.dylib'
21525                         cf_depsuf=$cf_suffix
21526                         ;;
21527                 hpux*) #(vi
21528                         case $target in
21529                         ia64*) #(vi
21530                                 cf_suffix='.so'
21531                                 cf_depsuf=$cf_suffix
21532                                 ;;
21533                         *) #(vi
21534                                 cf_suffix='.sl'
21535                                 cf_depsuf=$cf_suffix
21536                                 ;;
21537                         esac
21538                         ;;
21539                 *)      cf_suffix='.so'
21540                         cf_depsuf=$cf_suffix
21541                         ;;
21542                 esac
21543         esac
21544         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21545         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21546
21547                         if test $cf_item = shared ; then
21548                         if test "$cf_cv_do_symlinks" = yes ; then
21549                                 case "$cf_cv_shlib_version" in #(vi
21550                                 rel) #(vi
21551                                         case "$cf_cv_system_name" in #(vi
21552                                         darwin*)
21553                                         case .${LIB_SUFFIX} in
21554                                         .tw*)
21555                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21556                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21557                                                 ;;
21558                                         .t*)
21559                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21560                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21561                                                 ;;
21562                                         .w*)
21563                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21564                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21565                                                 ;;
21566                                         *)
21567                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21568                                                 ;;
21569                                         esac
21570                                         ;; #(vi
21571                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21572                                         esac
21573                                         ;;
21574                                 abi)
21575                                         case "$cf_cv_system_name" in #(vi
21576                                         darwin*)
21577                                         case .${LIB_SUFFIX} in
21578                                         .tw*)
21579                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21580                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21581                                                 ;;
21582                                         .t*)
21583                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21584                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21585                                                 ;;
21586                                         .w*)
21587                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21588                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21589                                                 ;;
21590                                         *)
21591                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21592                                                 ;;
21593                                         esac
21594                                         ;; #(vi
21595                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21596                                         esac
21597                                         ;;
21598                                 esac
21599                         fi
21600                         # cygwin needs import library, and has unique naming convention
21601                         # use autodetected ${cf_prefix} for import lib and static lib, but
21602                         # use 'cyg' prefix for shared lib.
21603                         if test $cf_cv_shlib_version = cygdll ; then
21604                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21605                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21606                                 continue
21607                         fi
21608                         fi
21609                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21610                 done
21611
21612                 if test $cf_dir = ncurses ; then
21613                         cf_subsets="$LIB_SUBSETS"
21614                         cf_r_parts="$cf_subsets"
21615                         cf_liblist="$LIBS_TO_MAKE"
21616
21617                         while test -n "$cf_r_parts"
21618                         do
21619                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21620                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21621                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21622                                         cf_item=
21623                                         case $cf_l_parts in #(vi
21624                                         *termlib*) #(vi
21625                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21626                                                 ;;
21627                                         *ticlib*)
21628                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21629                                                 ;;
21630                                         *)
21631                                                 break
21632                                                 ;;
21633                                         esac
21634                                         if test -n "$cf_item"; then
21635                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21636                                         fi
21637                                 else
21638                                         break
21639                                 fi
21640                         done
21641                 else
21642                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21643                 fi
21644
21645                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21646                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21647                         $cf_dir/Makefile >$cf_dir/Makefile.out
21648                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21649
21650                 $AWK -f $srcdir/mk-0th.awk \
21651                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
21652                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21653
21654                 for cf_subset in $cf_subsets
21655                 do
21656                         cf_subdirs=
21657                         for cf_item in $cf_LIST_MODELS
21658                         do
21659                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21660
21661 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21662
21663         case $cf_item in #(vi
21664         libtool) #(vi
21665                 cf_suffix='.la'
21666                 cf_depsuf=$cf_suffix
21667                 ;;
21668         normal) #(vi
21669                 cf_suffix='.a'
21670                 cf_depsuf=$cf_suffix
21671                 ;;
21672         debug) #(vi
21673                 cf_suffix='_g.a'
21674                 cf_depsuf=$cf_suffix
21675                 ;;
21676         profile) #(vi
21677                 cf_suffix='_p.a'
21678                 cf_depsuf=$cf_suffix
21679                 ;;
21680         shared) #(vi
21681                 case $cf_cv_system_name in
21682                 aix[5-7]*) #(vi
21683                         cf_suffix='.a'
21684                         cf_depsuf=$cf_suffix
21685                         ;;
21686                 cygwin*) #(vi
21687                         cf_suffix='.dll'
21688                         cf_depsuf='.dll.a'
21689                         ;;
21690                 darwin*) #(vi
21691                         cf_suffix='.dylib'
21692                         cf_depsuf=$cf_suffix
21693                         ;;
21694                 hpux*) #(vi
21695                         case $target in
21696                         ia64*) #(vi
21697                                 cf_suffix='.so'
21698                                 cf_depsuf=$cf_suffix
21699                                 ;;
21700                         *) #(vi
21701                                 cf_suffix='.sl'
21702                                 cf_depsuf=$cf_suffix
21703                                 ;;
21704                         esac
21705                         ;;
21706                 *)      cf_suffix='.so'
21707                         cf_depsuf=$cf_suffix
21708                         ;;
21709                 esac
21710         esac
21711         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21712         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21713
21714         case $cf_item in
21715         libtool) cf_subdir='obj_lo'  ;;
21716         normal)  cf_subdir='objects' ;;
21717         debug)   cf_subdir='obj_g' ;;
21718         profile) cf_subdir='obj_p' ;;
21719         shared)
21720                 case $cf_cv_system_name in #(vi
21721                 cygwin) #(vi
21722                         cf_subdir='objects' ;;
21723                 *)
21724                         cf_subdir='obj_s' ;;
21725                 esac
21726         esac
21727
21728                         # Test for case where we build libtinfo with a different name.
21729                         cf_libname=$cf_dir
21730                         if test $cf_dir = ncurses ; then
21731                                 case $cf_subset in
21732                                 *base*)
21733                                         cf_libname=${cf_libname}$LIB_SUFFIX
21734                                         ;;
21735                                 *termlib*)
21736                                         cf_libname=$TINFO_LIB_SUFFIX
21737                                         ;;
21738                                 ticlib*)
21739                                         cf_libname=$TICS_LIB_SUFFIX
21740                                         ;;
21741                                 esac
21742                         else
21743                                 cf_libname=${cf_libname}$LIB_SUFFIX
21744                         fi
21745                         if test -n "${DFT_ARG_SUFFIX}" ; then
21746                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21747                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21748                         fi
21749
21750                         # These dependencies really are for development, not
21751                         # builds, but they are useful in porting, too.
21752                         cf_depend="../include/ncurses_cfg.h"
21753                         if test "$srcdir" = "."; then
21754                                 cf_reldir="."
21755                         else
21756                                 cf_reldir="\${srcdir}"
21757                         fi
21758
21759                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21760                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21761                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21762                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21763                         fi
21764
21765                         cf_dir_suffix=
21766                         old_cf_suffix="$cf_suffix"
21767                         if test "$cf_cv_shlib_version_infix" = yes ; then
21768                         if test -n "$LIB_SUFFIX" ; then
21769                                 case $LIB_SUFFIX in
21770                                 tw*)
21771                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21772                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21773                                         cf_dir_suffix=tw
21774                                         ;;
21775                                 t*)
21776                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21777                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21778                                         cf_dir_suffix=t
21779                                         ;;
21780                                 w*)
21781                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21782                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21783                                         cf_dir_suffix=w
21784                                         ;;
21785                                 esac
21786                         fi
21787                         fi
21788
21789                         $AWK -f $srcdir/mk-1st.awk \
21790                                 name=${cf_libname}${cf_dir_suffix} \
21791                                 traces=$LIB_TRACING \
21792                                 MODEL=$cf_ITEM \
21793                                 model=$cf_subdir \
21794                                 prefix=$cf_prefix \
21795                                 suffix=$cf_suffix \
21796                                 subset=$cf_subset \
21797                                 driver=$cf_cv_term_driver \
21798                                 SymLink="$LN_S" \
21799                                 TermlibRoot=$TINFO_NAME \
21800                                 TermlibSuffix=$TINFO_SUFFIX \
21801                                 ShlibVer=$cf_cv_shlib_version \
21802                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21803                                 ReLink=${cf_cv_do_relink:-no} \
21804                                 DoLinks=$cf_cv_do_symlinks \
21805                                 rmSoLocs=$cf_cv_rm_so_locs \
21806                                 ldconfig="$LDCONFIG" \
21807                                 overwrite=$WITH_OVERWRITE \
21808                                 depend="$cf_depend" \
21809                                 host="$host" \
21810                                 libtool_version="$LIBTOOL_VERSION" \
21811                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21812
21813                         cf_suffix="$old_cf_suffix"
21814
21815                         for cf_subdir2 in $cf_subdirs lib
21816                         do
21817                                 test $cf_subdir = $cf_subdir2 && break
21818                         done
21819                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21820                         $AWK -f $srcdir/mk-2nd.awk \
21821                                 name=$cf_dir \
21822                                 traces=$LIB_TRACING \
21823                                 MODEL=$cf_ITEM \
21824                                 model=$cf_subdir \
21825                                 subset=$cf_subset \
21826                                 srcdir=$srcdir \
21827                                 echo=$WITH_ECHO \
21828                                 crenames=$cf_cv_prog_CC_c_o \
21829                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21830                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21831                         cf_subdirs="$cf_subdirs $cf_subdir"
21832                         done
21833                 done
21834         fi
21835
21836         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21837 done
21838
21839 for cf_dir in $SRC_SUBDIRS
21840 do
21841         if test ! -d $srcdir/$cf_dir ; then
21842                 continue
21843         fi
21844
21845         if test -f $cf_dir/Makefile ; then
21846                 case "$cf_dir" in
21847                 Ada95) #(vi
21848                         echo 'libs \' >> Makefile
21849                         echo 'install.libs \' >> Makefile
21850                         echo 'uninstall.libs ::' >> Makefile
21851                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21852                         ;;
21853                 esac
21854         fi
21855
21856         if test -f $srcdir/$cf_dir/modules; then
21857                 echo >> Makefile
21858                 if test -f $srcdir/$cf_dir/headers; then
21859 cat >> Makefile <<CF_EOF
21860 install.includes \\
21861 uninstall.includes \\
21862 CF_EOF
21863                 fi
21864 if test "$cf_dir" != "c++" ; then
21865 echo 'lint \' >> Makefile
21866 fi
21867 cat >> Makefile <<CF_EOF
21868 libs \\
21869 lintlib \\
21870 install.libs \\
21871 uninstall.libs \\
21872 install.$cf_dir \\
21873 uninstall.$cf_dir ::
21874         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21875 CF_EOF
21876         elif test -f $srcdir/$cf_dir/headers; then
21877 cat >> Makefile <<CF_EOF
21878
21879 libs \\
21880 install.libs \\
21881 uninstall.libs \\
21882 install.includes \\
21883 uninstall.includes ::
21884         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21885 CF_EOF
21886 fi
21887 done
21888
21889 cat >> Makefile <<CF_EOF
21890
21891 install.libs uninstall.libs \\
21892 install.data uninstall.data ::
21893 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21894 CF_EOF
21895
21896 if test "x$cf_with_manpages" = xyes; then
21897 cat >> Makefile <<CF_EOF
21898
21899 install.man \\
21900 uninstall.man ::
21901         cd man && \${MAKE} \${CF_MFLAGS} \$@
21902 CF_EOF
21903 fi
21904
21905 cat >> Makefile <<CF_EOF
21906
21907 distclean ::
21908         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21909         rm -f headers.sh headers.sed mk_shared_lib.sh
21910         rm -f edit_man.* man_alias.*
21911         rm -rf \${DIRS_TO_MAKE}
21912 CF_EOF
21913
21914 # Special case: tack's manpage lives in its own directory.
21915 if test "x$cf_with_manpages" = xyes; then
21916 if test -d tack ; then
21917 if test -f $srcdir/$tack.h; then
21918 cat >> Makefile <<CF_EOF
21919
21920 install.man \\
21921 uninstall.man ::
21922         cd tack && \${MAKE} \${CF_MFLAGS} \$@
21923 CF_EOF
21924 fi
21925 fi
21926 fi
21927
21928 rm -f headers.sed headers.sh
21929
21930 echo creating headers.sh
21931 cat >headers.sh <<CF_EOF
21932 #! /bin/sh
21933 # This shell script is generated by the 'configure' script.  It is invoked in a
21934 # subdirectory of the build tree.  It generates a sed-script in the parent
21935 # directory that is used to adjust includes for header files that reside in a
21936 # subdirectory of /usr/include, etc.
21937 PRG=""
21938 while test \$# != 3
21939 do
21940 PRG="\$PRG \$1"; shift
21941 done
21942 DST=\$1
21943 REF=\$2
21944 SRC=\$3
21945 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21946 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21947 echo installing \$SRC in \$DST
21948 CF_EOF
21949
21950 if test $WITH_CURSES_H = yes; then
21951         cat >>headers.sh <<CF_EOF
21952 case \$DST in
21953 /*/include/*)
21954         END=\`basename \$DST\`
21955         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21956         do
21957                 NAME=\`basename \$i\`
21958                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21959         done
21960         ;;
21961 *)
21962         echo "" >> \$TMPSED
21963         ;;
21964 esac
21965 CF_EOF
21966
21967 else
21968         cat >>headers.sh <<CF_EOF
21969 case \$DST in
21970 /*/include/*)
21971         END=\`basename \$DST\`
21972         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21973         do
21974                 NAME=\`basename \$i\`
21975                 if test "\$NAME" = "curses.h"
21976                 then
21977                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21978                         NAME=ncurses.h
21979                 fi
21980                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21981         done
21982         ;;
21983 *)
21984         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21985         ;;
21986 esac
21987 CF_EOF
21988 fi
21989 cat >>headers.sh <<CF_EOF
21990 rm -f \$TMPSRC
21991 sed -f \$TMPSED \$SRC > \$TMPSRC
21992 NAME=\`basename \$SRC\`
21993 CF_EOF
21994 if test $WITH_CURSES_H != yes; then
21995         cat >>headers.sh <<CF_EOF
21996 test "\$NAME" = "curses.h" && NAME=ncurses.h
21997 CF_EOF
21998 fi
21999 cat >>headers.sh <<CF_EOF
22000 # Just in case someone gzip'd manpages, remove the conflicting copy.
22001 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22002
22003 eval \$PRG \$TMPSRC \$DST/\$NAME
22004 rm -f \$TMPSRC \$TMPSED
22005 CF_EOF
22006
22007 chmod 0755 headers.sh
22008
22009 for cf_dir in $SRC_SUBDIRS
22010 do
22011         if test ! -d $srcdir/$cf_dir ; then
22012                 continue
22013         fi
22014
22015         if test -f $srcdir/$cf_dir/headers; then
22016                 $AWK -f $srcdir/mk-hdr.awk \
22017                         subset="$LIB_SUBSETS" \
22018                         compat="$WITH_CURSES_H" \
22019                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22020         fi
22021
22022         if test -f $srcdir/$cf_dir/modules; then
22023                 if test "$cf_dir" != "c++" ; then
22024                         cat >>$cf_dir/Makefile <<"CF_EOF"
22025 depend : ${AUTO_SRC}
22026         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22027
22028 # DO NOT DELETE THIS LINE -- make depend depends on it.
22029 CF_EOF
22030                 fi
22031         fi
22032 done
22033
22034 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22035 if test -z "$USE_OLD_MAKERULES" ; then
22036         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22037 fi
22038 fi
22039  ;;
22040   esac
22041 done
22042 EOF
22043
22044 cat >>$CONFIG_STATUS <<\EOF
22045
22046 { (exit 0); exit 0; }
22047 EOF
22048 chmod +x $CONFIG_STATUS
22049 ac_clean_files=$ac_clean_files_save
22050
22051 # configure is writing to config.log, and then calls config.status.
22052 # config.status does its own redirection, appending to config.log.
22053 # Unfortunately, on DOS this fails, as config.log is still kept open
22054 # by configure, so config.status won't be able to write to it; its
22055 # output is simply discarded.  So we exec the FD to /dev/null,
22056 # effectively closing config.log, so it can be properly (re)opened and
22057 # appended to by config.status.  When coming back to configure, we
22058 # need to make the FD available again.
22059 if test "$no_create" != yes; then
22060   ac_cs_success=:
22061   exec 5>/dev/null
22062   $SHELL $CONFIG_STATUS || ac_cs_success=false
22063   exec 5>>config.log
22064   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22065   # would make configure fail if this is the last instruction.
22066   $ac_cs_success || { (exit 1); exit 1; }
22067 fi
22068 ${MAKE:-make} preinstall