]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
58db77c7239bfbbf03c5b9d13f4bc4cc0167424a
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.522 .
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   --enable-pc-files       generate and install .pc files for pkg-config
706   --enable-mixed-case     tic should assume mixed-case filenames
707   --with-install-prefix   prefixes actual install-location ($DESTDIR)
708 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
709   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
710   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
711   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
712   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
713   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
714   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
715 Options to Specify the Libraries Built/Used:
716   --disable-libtool-version  enable to use libtool's incompatible naming scheme
717   --with-libtool          generate libraries with libtool
718   --with-shared           generate shared-libraries
719   --with-normal           generate normal-libraries (default)
720   --with-debug            generate debug-libraries (default)
721   --with-profile          generate profile-libraries
722   --with-termlib          generate separate terminfo library
723   --with-ticlib           generate separate tic library
724   --with-gpm              use Alessandro Rubini's GPM library
725   --without-dlsym         do not use dlsym() to load GPM dynamically
726   --with-sysmouse         use sysmouse (FreeBSD console)
727   --enable-rpath          use rpath option when generating shared libraries
728   --disable-relink        relink shared libraries during install
729   --with-shlib-version=X  Specify rel or abi version for shared libs
730   --disable-rpath-hack    don't add rpath options for additional libraries
731 Fine-Tuning Your Configuration:
732   --disable-overwrite     leave out the link to -lcurses
733   --disable-database      do not use terminfo, only fallbacks/termcap
734   --with-database=XXX     specify terminfo source to install
735   --with-hashed-db        specify hashed-database library
736   --with-fallbacks=XXX    specify list of fallback terminal descriptions
737   --without-xterm-new     specify if xterm terminfo should be old version
738   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
739   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
740   --disable-big-core      assume machine has little memory
741   --disable-big-strings   assume compiler has only standard-size strings
742   --enable-termcap        compile in termcap fallback support
743   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
744   --enable-getcap         fast termcap load, no xrefs to terminfo
745   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
746   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
747   --disable-root-environ  restrict environment when running as root
748   --enable-symlinks       make tic use symbolic links not hard links
749   --enable-broken_linker  compile with broken-linker support code
750   --enable-bsdpad         recognize BSD-style prefix padding
751   --enable-widec          compile with wide-char/UTF-8 code
752   --disable-lp64          allow chtype to be long (ignore _LP64)
753   --disable-largefile     omit support for large files
754   --disable-tparm-varargs compile tparm() without varargs interface
755   --disable-tic-depends   link tic library without explicit dependency on ncurses library
756   --with-bool=TYPE        override fallback type of bool variable
757   --with-caps=alt         compile with alternate Caps file
758   --with-chtype=TYPE      override type of chtype
759   --with-ospeed=TYPE      override type of ospeed variable
760   --with-mmask-t=TYPE     override type of mmask_t
761   --with-ccharw-max=XXX   override size CCHARW_MAX
762   --with-rcs-ids          compile-in RCS identifiers
763 Options to Specify How Manpages are Installed:
764   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
765                           optionally formatted/catonly, e.g., gzip,formatted
766   --with-manpage-renames  specify manpage-renaming
767   --with-manpage-aliases  specify manpage-aliases using .so
768   --with-manpage-symlinks specify manpage-aliases using symlinks
769   --with-manpage-tbl      specify manpage processing with tbl
770 Extensions:
771   --disable-ext-funcs     disable function-extensions
772   --enable-sp-funcs       enable experimental SCREEN-extensions
773   --enable-term-driver    enable experimental terminal-driver
774   --enable-const          compile with extra/non-standard const
775   --enable-ext-colors     compile for 256-color support
776   --enable-ext-mouse      compile for extended mouse-encoding
777   --enable-no-padding     compile with $NCURSES_NO_PADDING code
778   --enable-signed-char    compile using signed Boolean's in term.h
779   --enable-sigwinch       compile with SIGWINCH handler
780   --enable-tcap-names     compile with user-definable terminal capabilities
781 Development Code:
782   --without-develop       disable development options
783   --enable-hard-tabs      compile with hard-tabs code
784   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
785 Experimental Code:
786   --disable-assumed-color do not assume anything about default-colors
787   --disable-hashmap       compile without hashmap scrolling-optimization
788   --enable-colorfgbg      compile-in experimental $COLORFGBG code
789   --enable-interop        compile-in experimental interop bindings
790   --with-pthread          use POSIX thread library
791   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
792   --enable-weak-symbols   enable weak-symbols for pthreads
793   --enable-reentrant      compile with experimental reentrant code
794   --with-wrap-prefix=XXX  override prefix used for public variables
795   --enable-safe-sprintf   compile with experimental safe-sprintf code
796   --disable-scroll-hints  compile without scroll-hints code
797   --enable-wgetch-events  compile with experimental wgetch-events code
798 Testing/development Options:
799   --enable-echo           build: display "compiling" commands (default)
800   --enable-warnings       build: turn on GCC compiler warnings
801   --enable-assertions     test: turn on generation of assertion code
802   --with-dmalloc          test: use Gray Watson's dmalloc library
803   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
804   --with-valgrind         test: use valgrind
805   --disable-leaks         test: free permanent memory, analyze leaks
806   --enable-expanded       test: generate functions for certain macros
807   --disable-macros        test: use functions rather than macros
808   --with-trace            test: add trace() function to all models of ncurses
809 Ada95 Binding Options:
810   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
811   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
812   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
813   --with-ada-sharedlib=XX build Ada95 shared-library
814
815 Some influential environment variables:
816   CC          C compiler command
817   CFLAGS      C compiler flags
818   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
819               nonstandard directory <lib dir>
820   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
821               headers in a nonstandard directory <include dir>
822   CPP         C preprocessor
823   CXX         C++ compiler command
824   CXXFLAGS    C++ compiler flags
825   CXXCPP      C++ preprocessor
826
827 Use these variables to override the choices made by `configure' or to help
828 it to find libraries and programs with nonstandard names/locations.
829
830 EOF
831 fi
832
833 if test "$ac_init_help" = "recursive"; then
834   # If there are subdirs, report their specific --help.
835   ac_popdir=`pwd`
836   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
837     cd $ac_subdir
838     # A "../" for each directory in /$ac_subdir.
839     ac_dots=`echo $ac_subdir |
840              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
841
842     case $srcdir in
843     .) # No --srcdir option.  We are building in place.
844       ac_sub_srcdir=$srcdir ;;
845     [\\/]* | ?:[\\/]* ) # Absolute path.
846       ac_sub_srcdir=$srcdir/$ac_subdir ;;
847     *) # Relative path.
848       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
849     esac
850
851     # Check for guested configure; otherwise get Cygnus style configure.
852     if test -f $ac_sub_srcdir/configure.gnu; then
853       echo
854       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
855     elif test -f $ac_sub_srcdir/configure; then
856       echo
857       $SHELL $ac_sub_srcdir/configure  --help=recursive
858     elif test -f $ac_sub_srcdir/configure.ac ||
859            test -f $ac_sub_srcdir/configure.in; then
860       echo
861       $ac_configure --help
862     else
863       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
864     fi
865     cd $ac_popdir
866   done
867 fi
868
869 test -n "$ac_init_help" && exit 0
870 if $ac_init_version; then
871   cat <<\EOF
872
873 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
874 Free Software Foundation, Inc.
875 This configure script is free software; the Free Software Foundation
876 gives unlimited permission to copy, distribute and modify it.
877 EOF
878   exit 0
879 fi
880 exec 5>config.log
881 cat >&5 <<EOF
882 This file contains any messages produced by compilers while
883 running configure, to aid debugging if configure makes a mistake.
884
885 It was created by $as_me, which was
886 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
887
888   $ $0 $@
889
890 EOF
891 {
892 cat <<_ASUNAME
893 ## ---------- ##
894 ## Platform.  ##
895 ## ---------- ##
896
897 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
898 uname -m = `(uname -m) 2>/dev/null || echo unknown`
899 uname -r = `(uname -r) 2>/dev/null || echo unknown`
900 uname -s = `(uname -s) 2>/dev/null || echo unknown`
901 uname -v = `(uname -v) 2>/dev/null || echo unknown`
902
903 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
904 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
905
906 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
907 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
908 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
909 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
910 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
911 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
912 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
913
914 PATH = $PATH
915
916 _ASUNAME
917 } >&5
918
919 cat >&5 <<EOF
920 ## ------------ ##
921 ## Core tests.  ##
922 ## ------------ ##
923
924 EOF
925
926 # Keep a trace of the command line.
927 # Strip out --no-create and --no-recursion so they do not pile up.
928 # Also quote any args containing shell meta-characters.
929 ac_configure_args=
930 ac_sep=
931 for ac_arg
932 do
933   case $ac_arg in
934   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
935   | --no-cr | --no-c) ;;
936   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
937   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
938   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
939     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
940     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
941     ac_sep=" " ;;
942   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
943      ac_sep=" " ;;
944   esac
945   # Get rid of the leading space.
946 done
947
948 # When interrupted or exit'd, cleanup temporary files, and complete
949 # config.log.  We remove comments because anyway the quotes in there
950 # would cause problems or look ugly.
951 trap 'exit_status=$?
952   # Save into config.log some information that might help in debugging.
953   echo >&5
954   echo "## ----------------- ##" >&5
955   echo "## Cache variables.  ##" >&5
956   echo "## ----------------- ##" >&5
957   echo >&5
958   # The following way of writing the cache mishandles newlines in values,
959 {
960   (set) 2>&1 |
961     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
962     *ac_space=\ *)
963       sed -n \
964         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
965           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
966       ;;
967     *)
968       sed -n \
969         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
970       ;;
971     esac;
972 } >&5
973   sed "/^$/d" confdefs.h >conftest.log
974   if test -s conftest.log; then
975     echo >&5
976     echo "## ------------ ##" >&5
977     echo "## confdefs.h.  ##" >&5
978     echo "## ------------ ##" >&5
979     echo >&5
980     cat conftest.log >&5
981   fi
982   (echo; echo) >&5
983   test "$ac_signal" != 0 &&
984     echo "$as_me: caught signal $ac_signal" >&5
985   echo "$as_me: exit $exit_status" >&5
986   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
987     exit $exit_status
988      ' 0
989 for ac_signal in 1 2 13 15; do
990   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
991 done
992 ac_signal=0
993
994 # confdefs.h avoids OS command line length limits that DEFS can exceed.
995 rm -rf conftest* confdefs.h
996 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
997 echo >confdefs.h
998
999 # Let the site file select an alternate cache file if it wants to.
1000 # Prefer explicitly selected file to automatically selected ones.
1001 if test -z "$CONFIG_SITE"; then
1002   if test "x$prefix" != xNONE; then
1003     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1004   else
1005     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1006   fi
1007 fi
1008 for ac_site_file in $CONFIG_SITE; do
1009   if test -r "$ac_site_file"; then
1010     { echo "$as_me:1010: loading site script $ac_site_file" >&5
1011 echo "$as_me: loading site script $ac_site_file" >&6;}
1012     cat "$ac_site_file" >&5
1013     . "$ac_site_file"
1014   fi
1015 done
1016
1017 if test -r "$cache_file"; then
1018   # Some versions of bash will fail to source /dev/null (special
1019   # files actually), so we avoid doing that.
1020   if test -f "$cache_file"; then
1021     { echo "$as_me:1021: loading cache $cache_file" >&5
1022 echo "$as_me: loading cache $cache_file" >&6;}
1023     case $cache_file in
1024       [\\/]* | ?:[\\/]* ) . $cache_file;;
1025       *)                      . ./$cache_file;;
1026     esac
1027   fi
1028 else
1029   { echo "$as_me:1029: creating cache $cache_file" >&5
1030 echo "$as_me: creating cache $cache_file" >&6;}
1031   >$cache_file
1032 fi
1033
1034 # Check that the precious variables saved in the cache have kept the same
1035 # value.
1036 ac_cache_corrupted=false
1037 for ac_var in `(set) 2>&1 |
1038                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1039   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1040   eval ac_new_set=\$ac_env_${ac_var}_set
1041   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1042   eval ac_new_val="\$ac_env_${ac_var}_value"
1043   case $ac_old_set,$ac_new_set in
1044     set,)
1045       { echo "$as_me:1045: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1046 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1047       ac_cache_corrupted=: ;;
1048     ,set)
1049       { echo "$as_me:1049: error: \`$ac_var' was not set in the previous run" >&5
1050 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1051       ac_cache_corrupted=: ;;
1052     ,);;
1053     *)
1054       if test "x$ac_old_val" != "x$ac_new_val"; then
1055         { echo "$as_me:1055: error: \`$ac_var' has changed since the previous run:" >&5
1056 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1057         { echo "$as_me:1057:   former value:  $ac_old_val" >&5
1058 echo "$as_me:   former value:  $ac_old_val" >&2;}
1059         { echo "$as_me:1059:   current value: $ac_new_val" >&5
1060 echo "$as_me:   current value: $ac_new_val" >&2;}
1061         ac_cache_corrupted=:
1062       fi;;
1063   esac
1064   # Pass precious variables to config.status.  It doesn't matter if
1065   # we pass some twice (in addition to the command line arguments).
1066   if test "$ac_new_set" = set; then
1067     case $ac_new_val in
1068     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1069       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1070       ac_configure_args="$ac_configure_args '$ac_arg'"
1071       ;;
1072     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1073        ;;
1074     esac
1075   fi
1076 done
1077 if $ac_cache_corrupted; then
1078   { echo "$as_me:1078: error: changes in the environment can compromise the build" >&5
1079 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1080   { { echo "$as_me:1080: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1081 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1082    { (exit 1); exit 1; }; }
1083 fi
1084
1085 ac_ext=c
1086 ac_cpp='$CPP $CPPFLAGS'
1087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1090 ac_main_return=return
1091
1092 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1093   *c*,-n*) ECHO_N= ECHO_C='
1094 ' ECHO_T='      ' ;;
1095   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1096   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1097 esac
1098 echo "#! $SHELL" >conftest.sh
1099 echo  "exit 0"   >>conftest.sh
1100 chmod +x conftest.sh
1101 if { (echo "$as_me:1101: PATH=\".;.\"; conftest.sh") >&5
1102   (PATH=".;."; conftest.sh) 2>&5
1103   ac_status=$?
1104   echo "$as_me:1104: \$? = $ac_status" >&5
1105   (exit $ac_status); }; then
1106   ac_path_separator=';'
1107 else
1108   ac_path_separator=:
1109 fi
1110 PATH_SEPARATOR="$ac_path_separator"
1111 rm -f conftest.sh
1112
1113 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1114
1115 top_builddir=`pwd`
1116
1117 echo "$as_me:1117: checking for egrep" >&5
1118 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1119 if test "${ac_cv_prog_egrep+set}" = set; then
1120   echo $ECHO_N "(cached) $ECHO_C" >&6
1121 else
1122   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1123     then ac_cv_prog_egrep='grep -E'
1124     else ac_cv_prog_egrep='egrep'
1125     fi
1126 fi
1127 echo "$as_me:1127: result: $ac_cv_prog_egrep" >&5
1128 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1129  EGREP=$ac_cv_prog_egrep
1130
1131 test -z "$EGREP" && { { echo "$as_me:1131: error: No egrep program found" >&5
1132 echo "$as_me: error: No egrep program found" >&2;}
1133    { (exit 1); exit 1; }; }
1134
1135 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1138 cf_cv_abi_version=${NCURSES_MAJOR}
1139 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1140 cf_cv_timestamp=`date`
1141 echo "$as_me:1141: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1142 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1143
1144 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1145
1146 # Check whether --with-rel-version or --without-rel-version was given.
1147 if test "${with_rel_version+set}" = set; then
1148   withval="$with_rel_version"
1149   { echo "$as_me:1149: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1150 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1151  cf_cv_rel_version=$withval
1152 fi;
1153
1154  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1155  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1156
1157 if test -n "$NCURSES_MAJOR" ; then
1158   case $NCURSES_MAJOR in #(vi
1159   [0-9]*) #(vi
1160         ;;
1161   *)
1162         { { echo "$as_me:1162: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1163 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1164    { (exit 1); exit 1; }; }
1165         ;;
1166   esac
1167 else
1168   { { echo "$as_me:1168: error: Release major-version value is empty" >&5
1169 echo "$as_me: error: Release major-version value is empty" >&2;}
1170    { (exit 1); exit 1; }; }
1171 fi
1172
1173 if test -n "$NCURSES_MINOR" ; then
1174   case $NCURSES_MINOR in #(vi
1175   [0-9]*) #(vi
1176         ;;
1177   *)
1178         { { echo "$as_me:1178: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1179 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1180    { (exit 1); exit 1; }; }
1181         ;;
1182   esac
1183 else
1184   { { echo "$as_me:1184: error: Release minor-version value is empty" >&5
1185 echo "$as_me: error: Release minor-version value is empty" >&2;}
1186    { (exit 1); exit 1; }; }
1187 fi
1188
1189 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1190
1191 # Check whether --with-abi-version or --without-abi-version was given.
1192 if test "${with_abi_version+set}" = set; then
1193   withval="$with_abi_version"
1194   { echo "$as_me:1194: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1195 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1196  cf_cv_abi_version=$withval
1197 fi;
1198
1199 if test -n "$cf_cv_abi_version" ; then
1200   case $cf_cv_abi_version in #(vi
1201   [0-9]*) #(vi
1202         ;;
1203   *)
1204         { { echo "$as_me:1204: error: ABI version is not a number: $cf_cv_abi_version" >&5
1205 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1206    { (exit 1); exit 1; }; }
1207         ;;
1208   esac
1209 else
1210   { { echo "$as_me:1210: error: ABI version value is empty" >&5
1211 echo "$as_me: error: ABI version value is empty" >&2;}
1212    { (exit 1); exit 1; }; }
1213 fi
1214
1215 ac_aux_dir=
1216 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1217   if test -f $ac_dir/install-sh; then
1218     ac_aux_dir=$ac_dir
1219     ac_install_sh="$ac_aux_dir/install-sh -c"
1220     break
1221   elif test -f $ac_dir/install.sh; then
1222     ac_aux_dir=$ac_dir
1223     ac_install_sh="$ac_aux_dir/install.sh -c"
1224     break
1225   elif test -f $ac_dir/shtool; then
1226     ac_aux_dir=$ac_dir
1227     ac_install_sh="$ac_aux_dir/shtool install -c"
1228     break
1229   fi
1230 done
1231 if test -z "$ac_aux_dir"; then
1232   { { echo "$as_me:1232: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1233 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1234    { (exit 1); exit 1; }; }
1235 fi
1236 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1237 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1238 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1239
1240 # Make sure we can run config.sub.
1241 $ac_config_sub sun4 >/dev/null 2>&1 ||
1242   { { echo "$as_me:1242: error: cannot run $ac_config_sub" >&5
1243 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1244    { (exit 1); exit 1; }; }
1245
1246 echo "$as_me:1246: checking build system type" >&5
1247 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1248 if test "${ac_cv_build+set}" = set; then
1249   echo $ECHO_N "(cached) $ECHO_C" >&6
1250 else
1251   ac_cv_build_alias=$build_alias
1252 test -z "$ac_cv_build_alias" &&
1253   ac_cv_build_alias=`$ac_config_guess`
1254 test -z "$ac_cv_build_alias" &&
1255   { { echo "$as_me:1255: error: cannot guess build type; you must specify one" >&5
1256 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1257    { (exit 1); exit 1; }; }
1258 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1259   { { echo "$as_me:1259: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1260 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1261    { (exit 1); exit 1; }; }
1262
1263 fi
1264 echo "$as_me:1264: result: $ac_cv_build" >&5
1265 echo "${ECHO_T}$ac_cv_build" >&6
1266 build=$ac_cv_build
1267 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270
1271 echo "$as_me:1271: checking host system type" >&5
1272 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1273 if test "${ac_cv_host+set}" = set; then
1274   echo $ECHO_N "(cached) $ECHO_C" >&6
1275 else
1276   ac_cv_host_alias=$host_alias
1277 test -z "$ac_cv_host_alias" &&
1278   ac_cv_host_alias=$ac_cv_build_alias
1279 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1280   { { echo "$as_me:1280: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1281 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1282    { (exit 1); exit 1; }; }
1283
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_host" >&5
1286 echo "${ECHO_T}$ac_cv_host" >&6
1287 host=$ac_cv_host
1288 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1289 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1290 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1291
1292 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1293         echo "$as_me:1293: checking target system type" >&5
1294 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1295 if test "${ac_cv_target+set}" = set; then
1296   echo $ECHO_N "(cached) $ECHO_C" >&6
1297 else
1298   ac_cv_target_alias=$target_alias
1299 test "x$ac_cv_target_alias" = "x" &&
1300   ac_cv_target_alias=$ac_cv_host_alias
1301 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1302   { { echo "$as_me:1302: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1303 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1304    { (exit 1); exit 1; }; }
1305
1306 fi
1307 echo "$as_me:1307: result: $ac_cv_target" >&5
1308 echo "${ECHO_T}$ac_cv_target" >&6
1309 target=$ac_cv_target
1310 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1311 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1312 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1313
1314 # The aliases save the names the user supplied, while $host etc.
1315 # will get canonicalized.
1316 test -n "$target_alias" &&
1317   test "$program_prefix$program_suffix$program_transform_name" = \
1318     NONENONEs,x,x, &&
1319   program_prefix=${target_alias}-
1320         system_name="$host_os"
1321 else
1322         system_name="`(uname -s -r) 2>/dev/null`"
1323         if test -z "$system_name" ; then
1324                 system_name="`(hostname) 2>/dev/null`"
1325         fi
1326 fi
1327 test -n "$system_name" && cat >>confdefs.h <<EOF
1328 #define SYSTEM_NAME "$system_name"
1329 EOF
1330
1331 if test "${cf_cv_system_name+set}" = set; then
1332   echo $ECHO_N "(cached) $ECHO_C" >&6
1333 else
1334   cf_cv_system_name="$system_name"
1335 fi
1336
1337 test -z "$system_name" && system_name="$cf_cv_system_name"
1338 test -n "$cf_cv_system_name" && echo "$as_me:1338: result: Configuring for $cf_cv_system_name" >&5
1339 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1340
1341 if test ".$system_name" != ".$cf_cv_system_name" ; then
1342         echo "$as_me:1342: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1343 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1344         { { echo "$as_me:1344: error: \"Please remove config.cache and try again.\"" >&5
1345 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # Check whether --with-system-type or --without-system-type was given.
1350 if test "${with_system_type+set}" = set; then
1351   withval="$with_system_type"
1352   { echo "$as_me:1352: WARNING: overriding system type to $withval" >&5
1353 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1354  cf_cv_system_name=$withval
1355 fi;
1356
1357 ###     Save the given $CFLAGS to allow user-override.
1358 cf_user_CFLAGS="$CFLAGS"
1359
1360 ###     Default install-location
1361
1362 echo "$as_me:1362: checking for prefix" >&5
1363 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1364 if test "x$prefix" = "xNONE" ; then
1365         case "$cf_cv_system_name" in
1366                 # non-vendor systems don't have a conflict
1367         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1368                 prefix=/usr
1369                 ;;
1370         *)      prefix=$ac_default_prefix
1371                 ;;
1372         esac
1373 fi
1374 echo "$as_me:1374: result: $prefix" >&5
1375 echo "${ECHO_T}$prefix" >&6
1376
1377 if test "x$prefix" = "xNONE" ; then
1378 echo "$as_me:1378: checking for default include-directory" >&5
1379 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1380 test -n "$verbose" && echo 1>&6
1381 for cf_symbol in \
1382         $includedir \
1383         $includedir/ncurses \
1384         $prefix/include \
1385         $prefix/include/ncurses \
1386         /usr/local/include \
1387         /usr/local/include/ncurses \
1388         /usr/include \
1389         /usr/include/ncurses
1390 do
1391         cf_dir=`eval echo $cf_symbol`
1392         if test -f $cf_dir/curses.h ; then
1393         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1394                 includedir="$cf_symbol"
1395                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1396                 break
1397         fi
1398         fi
1399         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1400 done
1401 echo "$as_me:1401: result: $includedir" >&5
1402 echo "${ECHO_T}$includedir" >&6
1403 fi
1404
1405 ###     Checks for programs.
1406 ac_ext=c
1407 ac_cpp='$CPP $CPPFLAGS'
1408 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1409 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1410 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1411 ac_main_return=return
1412 if test -n "$ac_tool_prefix"; then
1413   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1414 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1415 echo "$as_me:1415: checking for $ac_word" >&5
1416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1417 if test "${ac_cv_prog_CC+set}" = set; then
1418   echo $ECHO_N "(cached) $ECHO_C" >&6
1419 else
1420   if test -n "$CC"; then
1421   ac_cv_prog_CC="$CC" # Let the user override the test.
1422 else
1423   ac_save_IFS=$IFS; IFS=$ac_path_separator
1424 ac_dummy="$PATH"
1425 for ac_dir in $ac_dummy; do
1426   IFS=$ac_save_IFS
1427   test -z "$ac_dir" && ac_dir=.
1428   $as_executable_p "$ac_dir/$ac_word" || continue
1429 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1430 echo "$as_me:1430: found $ac_dir/$ac_word" >&5
1431 break
1432 done
1433
1434 fi
1435 fi
1436 CC=$ac_cv_prog_CC
1437 if test -n "$CC"; then
1438   echo "$as_me:1438: result: $CC" >&5
1439 echo "${ECHO_T}$CC" >&6
1440 else
1441   echo "$as_me:1441: result: no" >&5
1442 echo "${ECHO_T}no" >&6
1443 fi
1444
1445 fi
1446 if test -z "$ac_cv_prog_CC"; then
1447   ac_ct_CC=$CC
1448   # Extract the first word of "gcc", so it can be a program name with args.
1449 set dummy gcc; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$ac_ct_CC"; then
1456   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_ac_ct_CC="gcc"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1472 if test -n "$ac_ct_CC"; then
1473   echo "$as_me:1473: result: $ac_ct_CC" >&5
1474 echo "${ECHO_T}$ac_ct_CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480   CC=$ac_ct_CC
1481 else
1482   CC="$ac_cv_prog_CC"
1483 fi
1484
1485 if test -z "$CC"; then
1486   if test -n "$ac_tool_prefix"; then
1487   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1488 set dummy ${ac_tool_prefix}cc; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$CC"; then
1495   ac_cv_prog_CC="$CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_CC="${ac_tool_prefix}cc"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 CC=$ac_cv_prog_CC
1511 if test -n "$CC"; then
1512   echo "$as_me:1512: result: $CC" >&5
1513 echo "${ECHO_T}$CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519 fi
1520 if test -z "$ac_cv_prog_CC"; then
1521   ac_ct_CC=$CC
1522   # Extract the first word of "cc", so it can be a program name with args.
1523 set dummy cc; ac_word=$2
1524 echo "$as_me:1524: checking for $ac_word" >&5
1525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1526 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   if test -n "$ac_ct_CC"; then
1530   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1531 else
1532   ac_save_IFS=$IFS; IFS=$ac_path_separator
1533 ac_dummy="$PATH"
1534 for ac_dir in $ac_dummy; do
1535   IFS=$ac_save_IFS
1536   test -z "$ac_dir" && ac_dir=.
1537   $as_executable_p "$ac_dir/$ac_word" || continue
1538 ac_cv_prog_ac_ct_CC="cc"
1539 echo "$as_me:1539: found $ac_dir/$ac_word" >&5
1540 break
1541 done
1542
1543 fi
1544 fi
1545 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1546 if test -n "$ac_ct_CC"; then
1547   echo "$as_me:1547: result: $ac_ct_CC" >&5
1548 echo "${ECHO_T}$ac_ct_CC" >&6
1549 else
1550   echo "$as_me:1550: result: no" >&5
1551 echo "${ECHO_T}no" >&6
1552 fi
1553
1554   CC=$ac_ct_CC
1555 else
1556   CC="$ac_cv_prog_CC"
1557 fi
1558
1559 fi
1560 if test -z "$CC"; then
1561   # Extract the first word of "cc", so it can be a program name with args.
1562 set dummy cc; ac_word=$2
1563 echo "$as_me:1563: checking for $ac_word" >&5
1564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1565 if test "${ac_cv_prog_CC+set}" = set; then
1566   echo $ECHO_N "(cached) $ECHO_C" >&6
1567 else
1568   if test -n "$CC"; then
1569   ac_cv_prog_CC="$CC" # Let the user override the test.
1570 else
1571   ac_prog_rejected=no
1572   ac_save_IFS=$IFS; IFS=$ac_path_separator
1573 ac_dummy="$PATH"
1574 for ac_dir in $ac_dummy; do
1575   IFS=$ac_save_IFS
1576   test -z "$ac_dir" && ac_dir=.
1577   $as_executable_p "$ac_dir/$ac_word" || continue
1578 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1579   ac_prog_rejected=yes
1580   continue
1581 fi
1582 ac_cv_prog_CC="cc"
1583 echo "$as_me:1583: found $ac_dir/$ac_word" >&5
1584 break
1585 done
1586
1587 if test $ac_prog_rejected = yes; then
1588   # We found a bogon in the path, so make sure we never use it.
1589   set dummy $ac_cv_prog_CC
1590   shift
1591   if test $# != 0; then
1592     # We chose a different compiler from the bogus one.
1593     # However, it has the same basename, so the bogon will be chosen
1594     # first if we set CC to just the basename; use the full file name.
1595     shift
1596     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1597     shift
1598     ac_cv_prog_CC="$@"
1599   fi
1600 fi
1601 fi
1602 fi
1603 CC=$ac_cv_prog_CC
1604 if test -n "$CC"; then
1605   echo "$as_me:1605: result: $CC" >&5
1606 echo "${ECHO_T}$CC" >&6
1607 else
1608   echo "$as_me:1608: result: no" >&5
1609 echo "${ECHO_T}no" >&6
1610 fi
1611
1612 fi
1613 if test -z "$CC"; then
1614   if test -n "$ac_tool_prefix"; then
1615   for ac_prog in cl
1616   do
1617     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1619 echo "$as_me:1619: checking for $ac_word" >&5
1620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1621 if test "${ac_cv_prog_CC+set}" = set; then
1622   echo $ECHO_N "(cached) $ECHO_C" >&6
1623 else
1624   if test -n "$CC"; then
1625   ac_cv_prog_CC="$CC" # Let the user override the test.
1626 else
1627   ac_save_IFS=$IFS; IFS=$ac_path_separator
1628 ac_dummy="$PATH"
1629 for ac_dir in $ac_dummy; do
1630   IFS=$ac_save_IFS
1631   test -z "$ac_dir" && ac_dir=.
1632   $as_executable_p "$ac_dir/$ac_word" || continue
1633 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1634 echo "$as_me:1634: found $ac_dir/$ac_word" >&5
1635 break
1636 done
1637
1638 fi
1639 fi
1640 CC=$ac_cv_prog_CC
1641 if test -n "$CC"; then
1642   echo "$as_me:1642: result: $CC" >&5
1643 echo "${ECHO_T}$CC" >&6
1644 else
1645   echo "$as_me:1645: result: no" >&5
1646 echo "${ECHO_T}no" >&6
1647 fi
1648
1649     test -n "$CC" && break
1650   done
1651 fi
1652 if test -z "$CC"; then
1653   ac_ct_CC=$CC
1654   for ac_prog in cl
1655 do
1656   # Extract the first word of "$ac_prog", so it can be a program name with args.
1657 set dummy $ac_prog; ac_word=$2
1658 echo "$as_me:1658: checking for $ac_word" >&5
1659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1660 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1661   echo $ECHO_N "(cached) $ECHO_C" >&6
1662 else
1663   if test -n "$ac_ct_CC"; then
1664   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1665 else
1666   ac_save_IFS=$IFS; IFS=$ac_path_separator
1667 ac_dummy="$PATH"
1668 for ac_dir in $ac_dummy; do
1669   IFS=$ac_save_IFS
1670   test -z "$ac_dir" && ac_dir=.
1671   $as_executable_p "$ac_dir/$ac_word" || continue
1672 ac_cv_prog_ac_ct_CC="$ac_prog"
1673 echo "$as_me:1673: found $ac_dir/$ac_word" >&5
1674 break
1675 done
1676
1677 fi
1678 fi
1679 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1680 if test -n "$ac_ct_CC"; then
1681   echo "$as_me:1681: result: $ac_ct_CC" >&5
1682 echo "${ECHO_T}$ac_ct_CC" >&6
1683 else
1684   echo "$as_me:1684: result: no" >&5
1685 echo "${ECHO_T}no" >&6
1686 fi
1687
1688   test -n "$ac_ct_CC" && break
1689 done
1690
1691   CC=$ac_ct_CC
1692 fi
1693
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710   (eval $ac_compiler -v </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main ()
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main ()
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main ()
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main ()
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main ()
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main ()
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 ac_ext=c
2115 ac_cpp='$CPP $CPPFLAGS'
2116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2119 ac_main_return=return
2120 echo "$as_me:2120: checking how to run the C preprocessor" >&5
2121 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2122 # On Suns, sometimes $CPP names a directory.
2123 if test -n "$CPP" && test -d "$CPP"; then
2124   CPP=
2125 fi
2126 if test -z "$CPP"; then
2127   if test "${ac_cv_prog_CPP+set}" = set; then
2128   echo $ECHO_N "(cached) $ECHO_C" >&6
2129 else
2130       # Double quotes because CPP needs to be expanded
2131     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2132     do
2133       ac_preproc_ok=false
2134 for ac_c_preproc_warn_flag in '' yes
2135 do
2136   # Use a header file that comes with gcc, so configuring glibc
2137   # with a fresh cross-compiler works.
2138   # On the NeXT, cc -E runs the code through the compiler's parser,
2139   # not just through cpp. "Syntax error" is here to catch this case.
2140   cat >conftest.$ac_ext <<_ACEOF
2141 #line 2141 "configure"
2142 #include "confdefs.h"
2143 #include <assert.h>
2144                      Syntax error
2145 _ACEOF
2146 if { (eval echo "$as_me:2146: \"$ac_cpp conftest.$ac_ext\"") >&5
2147   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2148   ac_status=$?
2149   egrep -v '^ *\+' conftest.er1 >conftest.err
2150   rm -f conftest.er1
2151   cat conftest.err >&5
2152   echo "$as_me:2152: \$? = $ac_status" >&5
2153   (exit $ac_status); } >/dev/null; then
2154   if test -s conftest.err; then
2155     ac_cpp_err=$ac_c_preproc_warn_flag
2156   else
2157     ac_cpp_err=
2158   fi
2159 else
2160   ac_cpp_err=yes
2161 fi
2162 if test -z "$ac_cpp_err"; then
2163   :
2164 else
2165   echo "$as_me: failed program was:" >&5
2166   cat conftest.$ac_ext >&5
2167   # Broken: fails on valid input.
2168 continue
2169 fi
2170 rm -f conftest.err conftest.$ac_ext
2171
2172   # OK, works on sane cases.  Now check whether non-existent headers
2173   # can be detected and how.
2174   cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177 #include <ac_nonexistent.h>
2178 _ACEOF
2179 if { (eval echo "$as_me:2179: \"$ac_cpp conftest.$ac_ext\"") >&5
2180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2181   ac_status=$?
2182   egrep -v '^ *\+' conftest.er1 >conftest.err
2183   rm -f conftest.er1
2184   cat conftest.err >&5
2185   echo "$as_me:2185: \$? = $ac_status" >&5
2186   (exit $ac_status); } >/dev/null; then
2187   if test -s conftest.err; then
2188     ac_cpp_err=$ac_c_preproc_warn_flag
2189   else
2190     ac_cpp_err=
2191   fi
2192 else
2193   ac_cpp_err=yes
2194 fi
2195 if test -z "$ac_cpp_err"; then
2196   # Broken: success on invalid input.
2197 continue
2198 else
2199   echo "$as_me: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201   # Passes both tests.
2202 ac_preproc_ok=:
2203 break
2204 fi
2205 rm -f conftest.err conftest.$ac_ext
2206
2207 done
2208 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2209 rm -f conftest.err conftest.$ac_ext
2210 if $ac_preproc_ok; then
2211   break
2212 fi
2213
2214     done
2215     ac_cv_prog_CPP=$CPP
2216
2217 fi
2218   CPP=$ac_cv_prog_CPP
2219 else
2220   ac_cv_prog_CPP=$CPP
2221 fi
2222 echo "$as_me:2222: result: $CPP" >&5
2223 echo "${ECHO_T}$CPP" >&6
2224 ac_preproc_ok=false
2225 for ac_c_preproc_warn_flag in '' yes
2226 do
2227   # Use a header file that comes with gcc, so configuring glibc
2228   # with a fresh cross-compiler works.
2229   # On the NeXT, cc -E runs the code through the compiler's parser,
2230   # not just through cpp. "Syntax error" is here to catch this case.
2231   cat >conftest.$ac_ext <<_ACEOF
2232 #line 2232 "configure"
2233 #include "confdefs.h"
2234 #include <assert.h>
2235                      Syntax error
2236 _ACEOF
2237 if { (eval echo "$as_me:2237: \"$ac_cpp conftest.$ac_ext\"") >&5
2238   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2239   ac_status=$?
2240   egrep -v '^ *\+' conftest.er1 >conftest.err
2241   rm -f conftest.er1
2242   cat conftest.err >&5
2243   echo "$as_me:2243: \$? = $ac_status" >&5
2244   (exit $ac_status); } >/dev/null; then
2245   if test -s conftest.err; then
2246     ac_cpp_err=$ac_c_preproc_warn_flag
2247   else
2248     ac_cpp_err=
2249   fi
2250 else
2251   ac_cpp_err=yes
2252 fi
2253 if test -z "$ac_cpp_err"; then
2254   :
2255 else
2256   echo "$as_me: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   # Broken: fails on valid input.
2259 continue
2260 fi
2261 rm -f conftest.err conftest.$ac_ext
2262
2263   # OK, works on sane cases.  Now check whether non-existent headers
2264   # can be detected and how.
2265   cat >conftest.$ac_ext <<_ACEOF
2266 #line 2266 "configure"
2267 #include "confdefs.h"
2268 #include <ac_nonexistent.h>
2269 _ACEOF
2270 if { (eval echo "$as_me:2270: \"$ac_cpp conftest.$ac_ext\"") >&5
2271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2272   ac_status=$?
2273   egrep -v '^ *\+' conftest.er1 >conftest.err
2274   rm -f conftest.er1
2275   cat conftest.err >&5
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } >/dev/null; then
2278   if test -s conftest.err; then
2279     ac_cpp_err=$ac_c_preproc_warn_flag
2280   else
2281     ac_cpp_err=
2282   fi
2283 else
2284   ac_cpp_err=yes
2285 fi
2286 if test -z "$ac_cpp_err"; then
2287   # Broken: success on invalid input.
2288 continue
2289 else
2290   echo "$as_me: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   # Passes both tests.
2293 ac_preproc_ok=:
2294 break
2295 fi
2296 rm -f conftest.err conftest.$ac_ext
2297
2298 done
2299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2300 rm -f conftest.err conftest.$ac_ext
2301 if $ac_preproc_ok; then
2302   :
2303 else
2304   { { echo "$as_me:2304: error: C preprocessor \"$CPP\" fails sanity check" >&5
2305 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2306    { (exit 1); exit 1; }; }
2307 fi
2308
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2312 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return=return
2315
2316 if test $ac_cv_c_compiler_gnu = yes; then
2317     echo "$as_me:2317: checking whether $CC needs -traditional" >&5
2318 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2319 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322     ac_pattern="Autoconf.*'x'"
2323   cat >conftest.$ac_ext <<_ACEOF
2324 #line 2324 "configure"
2325 #include "confdefs.h"
2326 #include <sgtty.h>
2327 int Autoconf = TIOCGETP;
2328 _ACEOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330   egrep "$ac_pattern" >/dev/null 2>&1; then
2331   ac_cv_prog_gcc_traditional=yes
2332 else
2333   ac_cv_prog_gcc_traditional=no
2334 fi
2335 rm -rf conftest*
2336
2337   if test $ac_cv_prog_gcc_traditional = no; then
2338     cat >conftest.$ac_ext <<_ACEOF
2339 #line 2339 "configure"
2340 #include "confdefs.h"
2341 #include <termio.h>
2342 int Autoconf = TCGETA;
2343 _ACEOF
2344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2345   egrep "$ac_pattern" >/dev/null 2>&1; then
2346   ac_cv_prog_gcc_traditional=yes
2347 fi
2348 rm -rf conftest*
2349
2350   fi
2351 fi
2352 echo "$as_me:2352: result: $ac_cv_prog_gcc_traditional" >&5
2353 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2354   if test $ac_cv_prog_gcc_traditional = yes; then
2355     CC="$CC -traditional"
2356   fi
2357 fi
2358
2359 echo "$as_me:2359: checking whether $CC understands -c and -o together" >&5
2360 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2361 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2362   echo $ECHO_N "(cached) $ECHO_C" >&6
2363 else
2364
2365 cat > conftest.$ac_ext <<CF_EOF
2366 #include <stdio.h>
2367 int main()
2368 {
2369         ${cf_cv_main_return:-return}(0);
2370 }
2371 CF_EOF
2372 # We do the test twice because some compilers refuse to overwrite an
2373 # existing .o file with -o, though they will create one.
2374 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2375 if { (eval echo "$as_me:2375: \"$ac_try\"") >&5
2376   (eval $ac_try) 2>&5
2377   ac_status=$?
2378   echo "$as_me:2378: \$? = $ac_status" >&5
2379   (exit $ac_status); } &&
2380   test -f conftest2.$ac_objext && { (eval echo "$as_me:2380: \"$ac_try\"") >&5
2381   (eval $ac_try) 2>&5
2382   ac_status=$?
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); };
2385 then
2386   eval cf_cv_prog_CC_c_o=yes
2387 else
2388   eval cf_cv_prog_CC_c_o=no
2389 fi
2390 rm -rf conftest*
2391
2392 fi
2393 if test $cf_cv_prog_CC_c_o = yes; then
2394   echo "$as_me:2394: result: yes" >&5
2395 echo "${ECHO_T}yes" >&6
2396 else
2397   echo "$as_me:2397: result: no" >&5
2398 echo "${ECHO_T}no" >&6
2399 fi
2400
2401 echo "$as_me:2401: checking for POSIXized ISC" >&5
2402 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2403 if test -d /etc/conf/kconfig.d &&
2404    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2405 then
2406   echo "$as_me:2406: result: yes" >&5
2407 echo "${ECHO_T}yes" >&6
2408   ISC=yes # If later tests want to check for ISC.
2409
2410 cat >>confdefs.h <<\EOF
2411 #define _POSIX_SOURCE 1
2412 EOF
2413
2414   if test "$GCC" = yes; then
2415     CC="$CC -posix"
2416   else
2417     CC="$CC -Xp"
2418   fi
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422   ISC=
2423 fi
2424
2425 echo "$as_me:2425: checking for ${CC:-cc} option to accept ANSI C" >&5
2426 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2427 if test "${cf_cv_ansi_cc+set}" = set; then
2428   echo $ECHO_N "(cached) $ECHO_C" >&6
2429 else
2430
2431 cf_cv_ansi_cc=no
2432 cf_save_CFLAGS="$CFLAGS"
2433 cf_save_CPPFLAGS="$CPPFLAGS"
2434 # Don't try gcc -ansi; that turns off useful extensions and
2435 # breaks some systems' header files.
2436 # AIX                   -qlanglvl=ansi
2437 # Ultrix and OSF/1      -std1
2438 # HP-UX                 -Aa -D_HPUX_SOURCE
2439 # SVR4                  -Xc
2440 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2441 for cf_arg in "-DCC_HAS_PROTOS" \
2442         "" \
2443         -qlanglvl=ansi \
2444         -std1 \
2445         -Ae \
2446         "-Aa -D_HPUX_SOURCE" \
2447         -Xc
2448 do
2449
2450 cf_fix_cppflags=no
2451 cf_new_cflags=
2452 cf_new_cppflags=
2453 cf_new_extra_cppflags=
2454
2455 for cf_add_cflags in $cf_arg
2456 do
2457 case $cf_fix_cppflags in
2458 no)
2459         case $cf_add_cflags in #(vi
2460         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2461                 case $cf_add_cflags in
2462                 -D*)
2463                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2464
2465                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2466                                 && test -z "${cf_tst_cflags}" \
2467                                 && cf_fix_cppflags=yes
2468
2469                         if test $cf_fix_cppflags = yes ; then
2470                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2471                                 continue
2472                         elif test "${cf_tst_cflags}" = "\"'" ; then
2473                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2474                                 continue
2475                         fi
2476                         ;;
2477                 esac
2478                 case "$CPPFLAGS" in
2479                 *$cf_add_cflags) #(vi
2480                         ;;
2481                 *) #(vi
2482                         case $cf_add_cflags in #(vi
2483                         -D*)
2484                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2485
2486 CPPFLAGS=`echo "$CPPFLAGS" | \
2487         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2488                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2489
2490                                 ;;
2491                         esac
2492                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2493                         ;;
2494                 esac
2495                 ;;
2496         *)
2497                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2498                 ;;
2499         esac
2500         ;;
2501 yes)
2502         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2503
2504         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2505
2506         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2507                 && test -z "${cf_tst_cflags}" \
2508                 && cf_fix_cppflags=no
2509         ;;
2510 esac
2511 done
2512
2513 if test -n "$cf_new_cflags" ; then
2514
2515         CFLAGS="$CFLAGS $cf_new_cflags"
2516 fi
2517
2518 if test -n "$cf_new_cppflags" ; then
2519
2520         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2521 fi
2522
2523 if test -n "$cf_new_extra_cppflags" ; then
2524
2525         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2526 fi
2527
2528         cat >conftest.$ac_ext <<_ACEOF
2529 #line 2529 "configure"
2530 #include "confdefs.h"
2531
2532 #ifndef CC_HAS_PROTOS
2533 #if !defined(__STDC__) || (__STDC__ != 1)
2534 choke me
2535 #endif
2536 #endif
2537
2538 int
2539 main ()
2540 {
2541
2542         int test (int i, double x);
2543         struct s1 {int (*f) (int a);};
2544         struct s2 {int (*f) (double a);};
2545   ;
2546   return 0;
2547 }
2548 _ACEOF
2549 rm -f conftest.$ac_objext
2550 if { (eval echo "$as_me:2550: \"$ac_compile\"") >&5
2551   (eval $ac_compile) 2>&5
2552   ac_status=$?
2553   echo "$as_me:2553: \$? = $ac_status" >&5
2554   (exit $ac_status); } &&
2555          { ac_try='test -s conftest.$ac_objext'
2556   { (eval echo "$as_me:2556: \"$ac_try\"") >&5
2557   (eval $ac_try) 2>&5
2558   ac_status=$?
2559   echo "$as_me:2559: \$? = $ac_status" >&5
2560   (exit $ac_status); }; }; then
2561   cf_cv_ansi_cc="$cf_arg"; break
2562 else
2563   echo "$as_me: failed program was:" >&5
2564 cat conftest.$ac_ext >&5
2565 fi
2566 rm -f conftest.$ac_objext conftest.$ac_ext
2567 done
2568 CFLAGS="$cf_save_CFLAGS"
2569 CPPFLAGS="$cf_save_CPPFLAGS"
2570
2571 fi
2572 echo "$as_me:2572: result: $cf_cv_ansi_cc" >&5
2573 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2574
2575 if test "$cf_cv_ansi_cc" != "no"; then
2576 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2577
2578 cf_fix_cppflags=no
2579 cf_new_cflags=
2580 cf_new_cppflags=
2581 cf_new_extra_cppflags=
2582
2583 for cf_add_cflags in $cf_cv_ansi_cc
2584 do
2585 case $cf_fix_cppflags in
2586 no)
2587         case $cf_add_cflags in #(vi
2588         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2589                 case $cf_add_cflags in
2590                 -D*)
2591                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2592
2593                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2594                                 && test -z "${cf_tst_cflags}" \
2595                                 && cf_fix_cppflags=yes
2596
2597                         if test $cf_fix_cppflags = yes ; then
2598                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2599                                 continue
2600                         elif test "${cf_tst_cflags}" = "\"'" ; then
2601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2602                                 continue
2603                         fi
2604                         ;;
2605                 esac
2606                 case "$CPPFLAGS" in
2607                 *$cf_add_cflags) #(vi
2608                         ;;
2609                 *) #(vi
2610                         case $cf_add_cflags in #(vi
2611                         -D*)
2612                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2613
2614 CPPFLAGS=`echo "$CPPFLAGS" | \
2615         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2616                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2617
2618                                 ;;
2619                         esac
2620                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2621                         ;;
2622                 esac
2623                 ;;
2624         *)
2625                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2626                 ;;
2627         esac
2628         ;;
2629 yes)
2630         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2631
2632         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2633
2634         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2635                 && test -z "${cf_tst_cflags}" \
2636                 && cf_fix_cppflags=no
2637         ;;
2638 esac
2639 done
2640
2641 if test -n "$cf_new_cflags" ; then
2642
2643         CFLAGS="$CFLAGS $cf_new_cflags"
2644 fi
2645
2646 if test -n "$cf_new_cppflags" ; then
2647
2648         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2649 fi
2650
2651 if test -n "$cf_new_extra_cppflags" ; then
2652
2653         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2654 fi
2655
2656 else
2657         cat >>confdefs.h <<\EOF
2658 #define CC_HAS_PROTOS 1
2659 EOF
2660
2661 fi
2662 fi
2663
2664 if test "$cf_cv_ansi_cc" = "no"; then
2665         { { echo "$as_me:2665: error: Your compiler does not appear to recognize prototypes.
2666 You have the following choices:
2667         a. adjust your compiler options
2668         b. get an up-to-date compiler
2669         c. use a wrapper such as unproto" >&5
2670 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2671 You have the following choices:
2672         a. adjust your compiler options
2673         b. get an up-to-date compiler
2674         c. use a wrapper such as unproto" >&2;}
2675    { (exit 1); exit 1; }; }
2676 fi
2677
2678 case $cf_cv_system_name in
2679 os2*)
2680     CFLAGS="$CFLAGS -Zmt"
2681     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2682     CXXFLAGS="$CXXFLAGS -Zmt"
2683     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2684     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2685     ac_cv_exeext=.exe
2686     ;;
2687 esac
2688
2689 PROG_EXT="$EXEEXT"
2690
2691 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2692 #define PROG_EXT "$PROG_EXT"
2693 EOF
2694
2695 if test "$cross_compiling" = yes ; then
2696   LDCONFIG=:
2697 else
2698 case "$cf_cv_system_name" in #(vi
2699 dragonfly*|freebsd*) #(vi
2700   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2701   ;;
2702 *) LDPATH=$PATH:/sbin:/usr/sbin
2703   # Extract the first word of "ldconfig", so it can be a program name with args.
2704 set dummy ldconfig; ac_word=$2
2705 echo "$as_me:2705: checking for $ac_word" >&5
2706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2707 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2708   echo $ECHO_N "(cached) $ECHO_C" >&6
2709 else
2710   case $LDCONFIG in
2711   [\\/]* | ?:[\\/]*)
2712   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2713   ;;
2714   *)
2715   ac_save_IFS=$IFS; IFS=$ac_path_separator
2716 ac_dummy="$LDPATH"
2717 for ac_dir in $ac_dummy; do
2718   IFS=$ac_save_IFS
2719   test -z "$ac_dir" && ac_dir=.
2720   if $as_executable_p "$ac_dir/$ac_word"; then
2721    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2722    echo "$as_me:2722: found $ac_dir/$ac_word" >&5
2723    break
2724 fi
2725 done
2726
2727   ;;
2728 esac
2729 fi
2730 LDCONFIG=$ac_cv_path_LDCONFIG
2731
2732 if test -n "$LDCONFIG"; then
2733   echo "$as_me:2733: result: $LDCONFIG" >&5
2734 echo "${ECHO_T}$LDCONFIG" >&6
2735 else
2736   echo "$as_me:2736: result: no" >&5
2737 echo "${ECHO_T}no" >&6
2738 fi
2739
2740   ;;
2741 esac
2742 fi
2743
2744 echo "$as_me:2744: checking if you want to ensure bool is consistent with C++" >&5
2745 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2746
2747 # Check whether --with-cxx or --without-cxx was given.
2748 if test "${with_cxx+set}" = set; then
2749   withval="$with_cxx"
2750   cf_with_cxx=$withval
2751 else
2752   cf_with_cxx=yes
2753 fi;
2754 echo "$as_me:2754: result: $cf_with_cxx" >&5
2755 echo "${ECHO_T}$cf_with_cxx" >&6
2756 if test "X$cf_with_cxx" = Xno ; then
2757         CXX=""
2758         GXX=""
2759 else
2760         # with autoconf 2.13, we can change the error to a warning:
2761                 ac_ext=cc
2762 ac_cpp='$CXXCPP $CPPFLAGS'
2763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2766 ac_main_return=return
2767 if test -n "$ac_tool_prefix"; then
2768   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2769   do
2770     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2771 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2772 echo "$as_me:2772: checking for $ac_word" >&5
2773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2774 if test "${ac_cv_prog_CXX+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777   if test -n "$CXX"; then
2778   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2779 else
2780   ac_save_IFS=$IFS; IFS=$ac_path_separator
2781 ac_dummy="$PATH"
2782 for ac_dir in $ac_dummy; do
2783   IFS=$ac_save_IFS
2784   test -z "$ac_dir" && ac_dir=.
2785   $as_executable_p "$ac_dir/$ac_word" || continue
2786 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2787 echo "$as_me:2787: found $ac_dir/$ac_word" >&5
2788 break
2789 done
2790
2791 fi
2792 fi
2793 CXX=$ac_cv_prog_CXX
2794 if test -n "$CXX"; then
2795   echo "$as_me:2795: result: $CXX" >&5
2796 echo "${ECHO_T}$CXX" >&6
2797 else
2798   echo "$as_me:2798: result: no" >&5
2799 echo "${ECHO_T}no" >&6
2800 fi
2801
2802     test -n "$CXX" && break
2803   done
2804 fi
2805 if test -z "$CXX"; then
2806   ac_ct_CXX=$CXX
2807   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2808 do
2809   # Extract the first word of "$ac_prog", so it can be a program name with args.
2810 set dummy $ac_prog; ac_word=$2
2811 echo "$as_me:2811: checking for $ac_word" >&5
2812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2814   echo $ECHO_N "(cached) $ECHO_C" >&6
2815 else
2816   if test -n "$ac_ct_CXX"; then
2817   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2818 else
2819   ac_save_IFS=$IFS; IFS=$ac_path_separator
2820 ac_dummy="$PATH"
2821 for ac_dir in $ac_dummy; do
2822   IFS=$ac_save_IFS
2823   test -z "$ac_dir" && ac_dir=.
2824   $as_executable_p "$ac_dir/$ac_word" || continue
2825 ac_cv_prog_ac_ct_CXX="$ac_prog"
2826 echo "$as_me:2826: found $ac_dir/$ac_word" >&5
2827 break
2828 done
2829
2830 fi
2831 fi
2832 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2833 if test -n "$ac_ct_CXX"; then
2834   echo "$as_me:2834: result: $ac_ct_CXX" >&5
2835 echo "${ECHO_T}$ac_ct_CXX" >&6
2836 else
2837   echo "$as_me:2837: result: no" >&5
2838 echo "${ECHO_T}no" >&6
2839 fi
2840
2841   test -n "$ac_ct_CXX" && break
2842 done
2843 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2844
2845   CXX=$ac_ct_CXX
2846 fi
2847
2848 # Provide some information about the compiler.
2849 echo "$as_me:2849:" \
2850      "checking for C++ compiler version" >&5
2851 ac_compiler=`set X $ac_compile; echo $2`
2852 { (eval echo "$as_me:2852: \"$ac_compiler --version </dev/null >&5\"") >&5
2853   (eval $ac_compiler --version </dev/null >&5) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); }
2857 { (eval echo "$as_me:2857: \"$ac_compiler -v </dev/null >&5\"") >&5
2858   (eval $ac_compiler -v </dev/null >&5) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }
2862 { (eval echo "$as_me:2862: \"$ac_compiler -V </dev/null >&5\"") >&5
2863   (eval $ac_compiler -V </dev/null >&5) 2>&5
2864   ac_status=$?
2865   echo "$as_me:2865: \$? = $ac_status" >&5
2866   (exit $ac_status); }
2867
2868 echo "$as_me:2868: checking whether we are using the GNU C++ compiler" >&5
2869 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2870 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2871   echo $ECHO_N "(cached) $ECHO_C" >&6
2872 else
2873   cat >conftest.$ac_ext <<_ACEOF
2874 #line 2874 "configure"
2875 #include "confdefs.h"
2876
2877 int
2878 main ()
2879 {
2880 #ifndef __GNUC__
2881        choke me
2882 #endif
2883
2884   ;
2885   return 0;
2886 }
2887 _ACEOF
2888 rm -f conftest.$ac_objext
2889 if { (eval echo "$as_me:2889: \"$ac_compile\"") >&5
2890   (eval $ac_compile) 2>&5
2891   ac_status=$?
2892   echo "$as_me:2892: \$? = $ac_status" >&5
2893   (exit $ac_status); } &&
2894          { ac_try='test -s conftest.$ac_objext'
2895   { (eval echo "$as_me:2895: \"$ac_try\"") >&5
2896   (eval $ac_try) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); }; }; then
2900   ac_compiler_gnu=yes
2901 else
2902   echo "$as_me: failed program was:" >&5
2903 cat conftest.$ac_ext >&5
2904 ac_compiler_gnu=no
2905 fi
2906 rm -f conftest.$ac_objext conftest.$ac_ext
2907 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2908
2909 fi
2910 echo "$as_me:2910: result: $ac_cv_cxx_compiler_gnu" >&5
2911 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2912 GXX=`test $ac_compiler_gnu = yes && echo yes`
2913 ac_test_CXXFLAGS=${CXXFLAGS+set}
2914 ac_save_CXXFLAGS=$CXXFLAGS
2915 CXXFLAGS="-g"
2916 echo "$as_me:2916: checking whether $CXX accepts -g" >&5
2917 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2918 if test "${ac_cv_prog_cxx_g+set}" = set; then
2919   echo $ECHO_N "(cached) $ECHO_C" >&6
2920 else
2921   cat >conftest.$ac_ext <<_ACEOF
2922 #line 2922 "configure"
2923 #include "confdefs.h"
2924
2925 int
2926 main ()
2927 {
2928
2929   ;
2930   return 0;
2931 }
2932 _ACEOF
2933 rm -f conftest.$ac_objext
2934 if { (eval echo "$as_me:2934: \"$ac_compile\"") >&5
2935   (eval $ac_compile) 2>&5
2936   ac_status=$?
2937   echo "$as_me:2937: \$? = $ac_status" >&5
2938   (exit $ac_status); } &&
2939          { ac_try='test -s conftest.$ac_objext'
2940   { (eval echo "$as_me:2940: \"$ac_try\"") >&5
2941   (eval $ac_try) 2>&5
2942   ac_status=$?
2943   echo "$as_me:2943: \$? = $ac_status" >&5
2944   (exit $ac_status); }; }; then
2945   ac_cv_prog_cxx_g=yes
2946 else
2947   echo "$as_me: failed program was:" >&5
2948 cat conftest.$ac_ext >&5
2949 ac_cv_prog_cxx_g=no
2950 fi
2951 rm -f conftest.$ac_objext conftest.$ac_ext
2952 fi
2953 echo "$as_me:2953: result: $ac_cv_prog_cxx_g" >&5
2954 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2955 if test "$ac_test_CXXFLAGS" = set; then
2956   CXXFLAGS=$ac_save_CXXFLAGS
2957 elif test $ac_cv_prog_cxx_g = yes; then
2958   if test "$GXX" = yes; then
2959     CXXFLAGS="-g -O2"
2960   else
2961     CXXFLAGS="-g"
2962   fi
2963 else
2964   if test "$GXX" = yes; then
2965     CXXFLAGS="-O2"
2966   else
2967     CXXFLAGS=
2968   fi
2969 fi
2970 for ac_declaration in \
2971    ''\
2972    '#include <stdlib.h>' \
2973    'extern "C" void std::exit (int) throw (); using std::exit;' \
2974    'extern "C" void std::exit (int); using std::exit;' \
2975    'extern "C" void exit (int) throw ();' \
2976    'extern "C" void exit (int);' \
2977    'void exit (int);'
2978 do
2979   cat >conftest.$ac_ext <<_ACEOF
2980 #line 2980 "configure"
2981 #include "confdefs.h"
2982 #include <stdlib.h>
2983 $ac_declaration
2984 int
2985 main ()
2986 {
2987 exit (42);
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   :
3005 else
3006   echo "$as_me: failed program was:" >&5
3007 cat conftest.$ac_ext >&5
3008 continue
3009 fi
3010 rm -f conftest.$ac_objext conftest.$ac_ext
3011   cat >conftest.$ac_ext <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 $ac_declaration
3015 int
3016 main ()
3017 {
3018 exit (42);
3019   ;
3020   return 0;
3021 }
3022 _ACEOF
3023 rm -f conftest.$ac_objext
3024 if { (eval echo "$as_me:3024: \"$ac_compile\"") >&5
3025   (eval $ac_compile) 2>&5
3026   ac_status=$?
3027   echo "$as_me:3027: \$? = $ac_status" >&5
3028   (exit $ac_status); } &&
3029          { ac_try='test -s conftest.$ac_objext'
3030   { (eval echo "$as_me:3030: \"$ac_try\"") >&5
3031   (eval $ac_try) 2>&5
3032   ac_status=$?
3033   echo "$as_me:3033: \$? = $ac_status" >&5
3034   (exit $ac_status); }; }; then
3035   break
3036 else
3037   echo "$as_me: failed program was:" >&5
3038 cat conftest.$ac_ext >&5
3039 fi
3040 rm -f conftest.$ac_objext conftest.$ac_ext
3041 done
3042 rm -rf conftest*
3043 if test -n "$ac_declaration"; then
3044   echo '#ifdef __cplusplus' >>confdefs.h
3045   echo $ac_declaration      >>confdefs.h
3046   echo '#endif'             >>confdefs.h
3047 fi
3048
3049 ac_ext=c
3050 ac_cpp='$CPP $CPPFLAGS'
3051 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3052 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3054 ac_main_return=return
3055
3056                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3057         if test "$CXX" = "g++" ; then
3058                 # Extract the first word of "g++", so it can be a program name with args.
3059 set dummy g++; ac_word=$2
3060 echo "$as_me:3060: checking for $ac_word" >&5
3061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3062 if test "${ac_cv_path_CXX+set}" = set; then
3063   echo $ECHO_N "(cached) $ECHO_C" >&6
3064 else
3065   case $CXX in
3066   [\\/]* | ?:[\\/]*)
3067   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3068   ;;
3069   *)
3070   ac_save_IFS=$IFS; IFS=$ac_path_separator
3071 ac_dummy="$PATH"
3072 for ac_dir in $ac_dummy; do
3073   IFS=$ac_save_IFS
3074   test -z "$ac_dir" && ac_dir=.
3075   if $as_executable_p "$ac_dir/$ac_word"; then
3076    ac_cv_path_CXX="$ac_dir/$ac_word"
3077    echo "$as_me:3077: found $ac_dir/$ac_word" >&5
3078    break
3079 fi
3080 done
3081
3082   ;;
3083 esac
3084 fi
3085 CXX=$ac_cv_path_CXX
3086
3087 if test -n "$CXX"; then
3088   echo "$as_me:3088: result: $CXX" >&5
3089 echo "${ECHO_T}$CXX" >&6
3090 else
3091   echo "$as_me:3091: result: no" >&5
3092 echo "${ECHO_T}no" >&6
3093 fi
3094
3095         fi
3096         if test "$CXX" = "g++" ; then
3097                 { echo "$as_me:3097: WARNING: ignoring hardcoded g++" >&5
3098 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3099                 cf_with_cxx=no; CXX=""; GXX="";
3100         fi
3101 fi
3102
3103 GXX_VERSION=none
3104 if test "$GXX" = yes; then
3105         echo "$as_me:3105: checking version of g++" >&5
3106 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3107         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3108         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3109         echo "$as_me:3109: result: $GXX_VERSION" >&5
3110 echo "${ECHO_T}$GXX_VERSION" >&6
3111 fi
3112
3113 case $GXX_VERSION in
3114 1*|2.[0-6]*)
3115         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3116         # cf_cxx_library=no
3117         { echo "$as_me:3117: WARNING: templates do not work" >&5
3118 echo "$as_me: WARNING: templates do not work" >&2;}
3119         ;;
3120 esac
3121
3122 echo "$as_me:3122: checking if you want to build C++ binding and demo" >&5
3123 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3124
3125 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3126 if test "${with_cxx_binding+set}" = set; then
3127   withval="$with_cxx_binding"
3128   cf_with_cxx_binding=$withval
3129 else
3130   cf_with_cxx_binding=$cf_with_cxx
3131 fi;
3132 echo "$as_me:3132: result: $cf_with_cxx_binding" >&5
3133 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3134
3135 echo "$as_me:3135: checking if you want to build with Ada95" >&5
3136 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3137
3138 # Check whether --with-ada or --without-ada was given.
3139 if test "${with_ada+set}" = set; then
3140   withval="$with_ada"
3141   cf_with_ada=$withval
3142 else
3143   cf_with_ada=yes
3144 fi;
3145 echo "$as_me:3145: result: $cf_with_ada" >&5
3146 echo "${ECHO_T}$cf_with_ada" >&6
3147
3148 echo "$as_me:3148: checking if you want to install manpages" >&5
3149 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3150
3151 # Check whether --with-manpages or --without-manpages was given.
3152 if test "${with_manpages+set}" = set; then
3153   withval="$with_manpages"
3154   cf_with_manpages=$withval
3155 else
3156   cf_with_manpages=yes
3157 fi;
3158 echo "$as_me:3158: result: $cf_with_manpages" >&5
3159 echo "${ECHO_T}$cf_with_manpages" >&6
3160
3161 echo "$as_me:3161: checking if you want to build programs such as tic" >&5
3162 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3163
3164 # Check whether --with-progs or --without-progs was given.
3165 if test "${with_progs+set}" = set; then
3166   withval="$with_progs"
3167   cf_with_progs=$withval
3168 else
3169   cf_with_progs=yes
3170 fi;
3171 echo "$as_me:3171: result: $cf_with_progs" >&5
3172 echo "${ECHO_T}$cf_with_progs" >&6
3173
3174 echo "$as_me:3174: checking if you want to build test-programs" >&5
3175 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3176
3177 # Check whether --with-tests or --without-tests was given.
3178 if test "${with_tests+set}" = set; then
3179   withval="$with_tests"
3180   cf_with_tests=$withval
3181 else
3182   cf_with_tests=yes
3183 fi;
3184 echo "$as_me:3184: result: $cf_with_tests" >&5
3185 echo "${ECHO_T}$cf_with_tests" >&6
3186
3187 echo "$as_me:3187: checking if you wish to install curses.h" >&5
3188 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3189
3190 # Check whether --with-curses-h or --without-curses-h was given.
3191 if test "${with_curses_h+set}" = set; then
3192   withval="$with_curses_h"
3193   with_curses_h=$withval
3194 else
3195   with_curses_h=yes
3196 fi;
3197 echo "$as_me:3197: result: $with_curses_h" >&5
3198 echo "${ECHO_T}$with_curses_h" >&6
3199
3200 modules_to_build="ncurses"
3201 if test "X$cf_with_progs" != Xno ; then
3202 modules_to_build="$modules_to_build progs tack"
3203 fi
3204 modules_to_build="$modules_to_build panel menu form"
3205
3206 test "$program_prefix" != NONE &&
3207   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3208 # Use a double $ so make ignores it.
3209 test "$program_suffix" != NONE &&
3210   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3211 # Double any \ or $.  echo might interpret backslashes.
3212 # By default was `s,x,x', remove it if useless.
3213 cat <<\_ACEOF >conftest.sed
3214 s/[\\$]/&&/g;s/;s,x,x,$//
3215 _ACEOF
3216 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3217 rm conftest.sed
3218
3219 for ac_prog in mawk gawk nawk awk
3220 do
3221   # Extract the first word of "$ac_prog", so it can be a program name with args.
3222 set dummy $ac_prog; ac_word=$2
3223 echo "$as_me:3223: checking for $ac_word" >&5
3224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3225 if test "${ac_cv_prog_AWK+set}" = set; then
3226   echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228   if test -n "$AWK"; then
3229   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3230 else
3231   ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 ac_dummy="$PATH"
3233 for ac_dir in $ac_dummy; do
3234   IFS=$ac_save_IFS
3235   test -z "$ac_dir" && ac_dir=.
3236   $as_executable_p "$ac_dir/$ac_word" || continue
3237 ac_cv_prog_AWK="$ac_prog"
3238 echo "$as_me:3238: found $ac_dir/$ac_word" >&5
3239 break
3240 done
3241
3242 fi
3243 fi
3244 AWK=$ac_cv_prog_AWK
3245 if test -n "$AWK"; then
3246   echo "$as_me:3246: result: $AWK" >&5
3247 echo "${ECHO_T}$AWK" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253   test -n "$AWK" && break
3254 done
3255
3256 test -z "$AWK" && { { echo "$as_me:3256: error: No awk program found" >&5
3257 echo "$as_me: error: No awk program found" >&2;}
3258    { (exit 1); exit 1; }; }
3259
3260 echo "$as_me:3260: checking for egrep" >&5
3261 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3262 if test "${ac_cv_prog_egrep+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3266     then ac_cv_prog_egrep='grep -E'
3267     else ac_cv_prog_egrep='egrep'
3268     fi
3269 fi
3270 echo "$as_me:3270: result: $ac_cv_prog_egrep" >&5
3271 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3272  EGREP=$ac_cv_prog_egrep
3273
3274 test -z "$EGREP" && { { echo "$as_me:3274: error: No egrep program found" >&5
3275 echo "$as_me: error: No egrep program found" >&2;}
3276    { (exit 1); exit 1; }; }
3277
3278 # Find a good install program.  We prefer a C program (faster),
3279 # so one script is as good as another.  But avoid the broken or
3280 # incompatible versions:
3281 # SysV /etc/install, /usr/sbin/install
3282 # SunOS /usr/etc/install
3283 # IRIX /sbin/install
3284 # AIX /bin/install
3285 # AmigaOS /C/install, which installs bootblocks on floppy discs
3286 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3287 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3288 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3289 # ./install, which can be erroneously created by make from ./install.sh.
3290 echo "$as_me:3290: checking for a BSD compatible install" >&5
3291 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3292 if test -z "$INSTALL"; then
3293 if test "${ac_cv_path_install+set}" = set; then
3294   echo $ECHO_N "(cached) $ECHO_C" >&6
3295 else
3296     ac_save_IFS=$IFS; IFS=$ac_path_separator
3297   for ac_dir in $PATH; do
3298     IFS=$ac_save_IFS
3299     # Account for people who put trailing slashes in PATH elements.
3300     case $ac_dir/ in
3301     / | ./ | .// | /cC/* \
3302     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3303     | /usr/ucb/* ) ;;
3304     *)
3305       # OSF1 and SCO ODT 3.0 have their own names for install.
3306       # Don't use installbsd from OSF since it installs stuff as root
3307       # by default.
3308       for ac_prog in ginstall scoinst install; do
3309         if $as_executable_p "$ac_dir/$ac_prog"; then
3310           if test $ac_prog = install &&
3311             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3312             # AIX install.  It has an incompatible calling convention.
3313             :
3314           elif test $ac_prog = install &&
3315             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3316             # program-specific install script used by HP pwplus--don't use.
3317             :
3318           else
3319             ac_cv_path_install="$ac_dir/$ac_prog -c"
3320             break 2
3321           fi
3322         fi
3323       done
3324       ;;
3325     esac
3326   done
3327
3328 fi
3329   if test "${ac_cv_path_install+set}" = set; then
3330     INSTALL=$ac_cv_path_install
3331   else
3332     # As a last resort, use the slow shell script.  We don't cache a
3333     # path for INSTALL within a source directory, because that will
3334     # break other packages using the cache if that directory is
3335     # removed, or if the path is relative.
3336     INSTALL=$ac_install_sh
3337   fi
3338 fi
3339 echo "$as_me:3339: result: $INSTALL" >&5
3340 echo "${ECHO_T}$INSTALL" >&6
3341
3342 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3343 # It thinks the first close brace ends the variable substitution.
3344 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3345
3346 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3347
3348 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3349
3350 case $INSTALL in
3351 /*)
3352   ;;
3353 *)
3354   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3355   test -z "$cf_dir" && cf_dir=.
3356   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3357   ;;
3358 esac
3359
3360 for ac_prog in tdlint lint alint splint lclint
3361 do
3362   # Extract the first word of "$ac_prog", so it can be a program name with args.
3363 set dummy $ac_prog; ac_word=$2
3364 echo "$as_me:3364: checking for $ac_word" >&5
3365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3366 if test "${ac_cv_prog_LINT+set}" = set; then
3367   echo $ECHO_N "(cached) $ECHO_C" >&6
3368 else
3369   if test -n "$LINT"; then
3370   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3371 else
3372   ac_save_IFS=$IFS; IFS=$ac_path_separator
3373 ac_dummy="$PATH"
3374 for ac_dir in $ac_dummy; do
3375   IFS=$ac_save_IFS
3376   test -z "$ac_dir" && ac_dir=.
3377   $as_executable_p "$ac_dir/$ac_word" || continue
3378 ac_cv_prog_LINT="$ac_prog"
3379 echo "$as_me:3379: found $ac_dir/$ac_word" >&5
3380 break
3381 done
3382
3383 fi
3384 fi
3385 LINT=$ac_cv_prog_LINT
3386 if test -n "$LINT"; then
3387   echo "$as_me:3387: result: $LINT" >&5
3388 echo "${ECHO_T}$LINT" >&6
3389 else
3390   echo "$as_me:3390: result: no" >&5
3391 echo "${ECHO_T}no" >&6
3392 fi
3393
3394   test -n "$LINT" && break
3395 done
3396
3397 echo "$as_me:3397: checking whether ln -s works" >&5
3398 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3399 LN_S=$as_ln_s
3400 if test "$LN_S" = "ln -s"; then
3401   echo "$as_me:3401: result: yes" >&5
3402 echo "${ECHO_T}yes" >&6
3403 else
3404   echo "$as_me:3404: result: no, using $LN_S" >&5
3405 echo "${ECHO_T}no, using $LN_S" >&6
3406 fi
3407
3408 echo "$as_me:3408: checking if $LN_S -f options work" >&5
3409 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3410
3411 rm -f conf$$.src conf$$dst
3412 echo >conf$$.dst
3413 echo first >conf$$.src
3414 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3415         cf_prog_ln_sf=yes
3416 else
3417         cf_prog_ln_sf=no
3418 fi
3419 rm -f conf$$.dst conf$$src
3420 echo "$as_me:3420: result: $cf_prog_ln_sf" >&5
3421 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3422
3423 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3424
3425 echo "$as_me:3425: checking for long file names" >&5
3426 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3427 if test "${ac_cv_sys_long_file_names+set}" = set; then
3428   echo $ECHO_N "(cached) $ECHO_C" >&6
3429 else
3430   ac_cv_sys_long_file_names=yes
3431 # Test for long file names in all the places we know might matter:
3432 #      .                the current directory, where building will happen
3433 #      $prefix/lib      where we will be installing things
3434 #      $exec_prefix/lib likewise
3435 # eval it to expand exec_prefix.
3436 #      $TMPDIR          if set, where it might want to write temporary files
3437 # if $TMPDIR is not set:
3438 #      /tmp             where it might want to write temporary files
3439 #      /var/tmp         likewise
3440 #      /usr/tmp         likewise
3441 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3442   ac_tmpdirs=$TMPDIR
3443 else
3444   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3445 fi
3446 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3447   test -d $ac_dir || continue
3448   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3449   ac_xdir=$ac_dir/cf$$
3450   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3451   ac_tf1=$ac_xdir/conftest9012345
3452   ac_tf2=$ac_xdir/conftest9012346
3453   (echo 1 >$ac_tf1) 2>/dev/null
3454   (echo 2 >$ac_tf2) 2>/dev/null
3455   ac_val=`cat $ac_tf1 2>/dev/null`
3456   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3457     ac_cv_sys_long_file_names=no
3458     rm -rf $ac_xdir 2>/dev/null
3459     break
3460   fi
3461   rm -rf $ac_xdir 2>/dev/null
3462 done
3463 fi
3464 echo "$as_me:3464: result: $ac_cv_sys_long_file_names" >&5
3465 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3466 if test $ac_cv_sys_long_file_names = yes; then
3467
3468 cat >>confdefs.h <<\EOF
3469 #define HAVE_LONG_FILE_NAMES 1
3470 EOF
3471
3472 fi
3473
3474 # if we find pkg-config, check if we should install the ".pc" files.
3475
3476 echo "$as_me:3476: checking if you want to use pkg-config" >&5
3477 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3478
3479 # Check whether --with-pkg-config or --without-pkg-config was given.
3480 if test "${with_pkg_config+set}" = set; then
3481   withval="$with_pkg_config"
3482   cf_pkg_config=$withval
3483 else
3484   cf_pkg_config=yes
3485 fi;
3486 echo "$as_me:3486: result: $cf_pkg_config" >&5
3487 echo "${ECHO_T}$cf_pkg_config" >&6
3488
3489 case $cf_pkg_config in #(vi
3490 no) #(vi
3491         PKG_CONFIG=none
3492         ;;
3493 yes) #(vi
3494
3495 if test -n "$ac_tool_prefix"; then
3496   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3497 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3498 echo "$as_me:3498: checking for $ac_word" >&5
3499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3500 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3501   echo $ECHO_N "(cached) $ECHO_C" >&6
3502 else
3503   case $PKG_CONFIG in
3504   [\\/]* | ?:[\\/]*)
3505   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3506   ;;
3507   *)
3508   ac_save_IFS=$IFS; IFS=$ac_path_separator
3509 ac_dummy="$PATH"
3510 for ac_dir in $ac_dummy; do
3511   IFS=$ac_save_IFS
3512   test -z "$ac_dir" && ac_dir=.
3513   if $as_executable_p "$ac_dir/$ac_word"; then
3514    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3515    echo "$as_me:3515: found $ac_dir/$ac_word" >&5
3516    break
3517 fi
3518 done
3519
3520   ;;
3521 esac
3522 fi
3523 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3524
3525 if test -n "$PKG_CONFIG"; then
3526   echo "$as_me:3526: result: $PKG_CONFIG" >&5
3527 echo "${ECHO_T}$PKG_CONFIG" >&6
3528 else
3529   echo "$as_me:3529: result: no" >&5
3530 echo "${ECHO_T}no" >&6
3531 fi
3532
3533 fi
3534 if test -z "$ac_cv_path_PKG_CONFIG"; then
3535   ac_pt_PKG_CONFIG=$PKG_CONFIG
3536   # Extract the first word of "pkg-config", so it can be a program name with args.
3537 set dummy pkg-config; ac_word=$2
3538 echo "$as_me:3538: checking for $ac_word" >&5
3539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3540 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3541   echo $ECHO_N "(cached) $ECHO_C" >&6
3542 else
3543   case $ac_pt_PKG_CONFIG in
3544   [\\/]* | ?:[\\/]*)
3545   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3546   ;;
3547   *)
3548   ac_save_IFS=$IFS; IFS=$ac_path_separator
3549 ac_dummy="$PATH"
3550 for ac_dir in $ac_dummy; do
3551   IFS=$ac_save_IFS
3552   test -z "$ac_dir" && ac_dir=.
3553   if $as_executable_p "$ac_dir/$ac_word"; then
3554    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3555    echo "$as_me:3555: found $ac_dir/$ac_word" >&5
3556    break
3557 fi
3558 done
3559
3560   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3561   ;;
3562 esac
3563 fi
3564 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3565
3566 if test -n "$ac_pt_PKG_CONFIG"; then
3567   echo "$as_me:3567: result: $ac_pt_PKG_CONFIG" >&5
3568 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3569 else
3570   echo "$as_me:3570: result: no" >&5
3571 echo "${ECHO_T}no" >&6
3572 fi
3573
3574   PKG_CONFIG=$ac_pt_PKG_CONFIG
3575 else
3576   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3577 fi
3578
3579         ;;
3580 *)
3581         PKG_CONFIG=$withval
3582         ;;
3583 esac
3584
3585 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3586 if test "$PKG_CONFIG" != none ; then
3587
3588 if test "x$prefix" != xNONE; then
3589   cf_path_syntax="$prefix"
3590 else
3591   cf_path_syntax="$ac_default_prefix"
3592 fi
3593
3594 case ".$PKG_CONFIG" in #(vi
3595 .\$\(*\)*|.\'*\'*) #(vi
3596   ;;
3597 ..|./*|.\\*) #(vi
3598   ;;
3599 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3600   ;;
3601 .\${*prefix}*) #(vi
3602   eval PKG_CONFIG="$PKG_CONFIG"
3603   case ".$PKG_CONFIG" in #(vi
3604   .NONE/*)
3605     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3606     ;;
3607   esac
3608   ;; #(vi
3609 .no|.NONE/*)
3610   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3611   ;;
3612 *)
3613   { { echo "$as_me:3613: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3614 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3615    { (exit 1); exit 1; }; }
3616   ;;
3617 esac
3618
3619 fi
3620
3621 if test "$PKG_CONFIG" != no ; then
3622         echo "$as_me:3622: checking if we should install .pc files for $PKG_CONFIG" >&5
3623 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3624
3625         # Leave this as something that can be overridden in the environment.
3626         if test -z "$PKG_CONFIG_LIBDIR" ; then
3627                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3628         fi
3629         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3630         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3631
3632 # Check whether --enable-pc-files or --disable-pc-files was given.
3633 if test "${enable_pc_files+set}" = set; then
3634   enableval="$enable_pc_files"
3635   enable_pc_files=$enableval
3636 else
3637   enable_pc_files=no
3638 fi;
3639                 echo "$as_me:3639: result: $enable_pc_files" >&5
3640 echo "${ECHO_T}$enable_pc_files" >&6
3641         else
3642                 echo "$as_me:3642: result: no" >&5
3643 echo "${ECHO_T}no" >&6
3644                 { echo "$as_me:3644: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3645 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3646                 enable_pc_files=no
3647         fi
3648 fi
3649
3650 echo "$as_me:3650: checking if we should assume mixed-case filenames" >&5
3651 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3652
3653 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3654 if test "${enable_mixed_case+set}" = set; then
3655   enableval="$enable_mixed_case"
3656   enable_mixedcase=$enableval
3657 else
3658   enable_mixedcase=auto
3659 fi;
3660 echo "$as_me:3660: result: $enable_mixedcase" >&5
3661 echo "${ECHO_T}$enable_mixedcase" >&6
3662 if test "$enable_mixedcase" = "auto" ; then
3663
3664 echo "$as_me:3664: checking if filesystem supports mixed-case filenames" >&5
3665 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3666 if test "${cf_cv_mixedcase+set}" = set; then
3667   echo $ECHO_N "(cached) $ECHO_C" >&6
3668 else
3669
3670 if test "$cross_compiling" = yes ; then
3671         case $target_alias in #(vi
3672         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3673                 cf_cv_mixedcase=no
3674                 ;;
3675         *)
3676                 cf_cv_mixedcase=yes
3677                 ;;
3678         esac
3679 else
3680         rm -f conftest CONFTEST
3681         echo test >conftest
3682         if test -f CONFTEST ; then
3683                 cf_cv_mixedcase=no
3684         else
3685                 cf_cv_mixedcase=yes
3686         fi
3687         rm -f conftest CONFTEST
3688 fi
3689
3690 fi
3691 echo "$as_me:3691: result: $cf_cv_mixedcase" >&5
3692 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3693 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3694 #define MIXEDCASE_FILENAMES 1
3695 EOF
3696
3697 else
3698     cf_cv_mixedcase=$enable_mixedcase
3699     if test "$enable_mixedcase" = "yes" ; then
3700         cat >>confdefs.h <<\EOF
3701 #define MIXEDCASE_FILENAMES 1
3702 EOF
3703
3704     fi
3705 fi
3706
3707 # do this after mixed-case option (tags/TAGS is not as important as tic).
3708 echo "$as_me:3708: checking whether ${MAKE-make} sets \${MAKE}" >&5
3709 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3710 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3711 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3712   echo $ECHO_N "(cached) $ECHO_C" >&6
3713 else
3714   cat >conftest.make <<\EOF
3715 all:
3716         @echo 'ac_maketemp="${MAKE}"'
3717 EOF
3718 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3719 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3720 if test -n "$ac_maketemp"; then
3721   eval ac_cv_prog_make_${ac_make}_set=yes
3722 else
3723   eval ac_cv_prog_make_${ac_make}_set=no
3724 fi
3725 rm -f conftest.make
3726 fi
3727 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3728   echo "$as_me:3728: result: yes" >&5
3729 echo "${ECHO_T}yes" >&6
3730   SET_MAKE=
3731 else
3732   echo "$as_me:3732: result: no" >&5
3733 echo "${ECHO_T}no" >&6
3734   SET_MAKE="MAKE=${MAKE-make}"
3735 fi
3736
3737 for ac_prog in exctags ctags
3738 do
3739   # Extract the first word of "$ac_prog", so it can be a program name with args.
3740 set dummy $ac_prog; ac_word=$2
3741 echo "$as_me:3741: checking for $ac_word" >&5
3742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3743 if test "${ac_cv_prog_CTAGS+set}" = set; then
3744   echo $ECHO_N "(cached) $ECHO_C" >&6
3745 else
3746   if test -n "$CTAGS"; then
3747   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3748 else
3749   ac_save_IFS=$IFS; IFS=$ac_path_separator
3750 ac_dummy="$PATH"
3751 for ac_dir in $ac_dummy; do
3752   IFS=$ac_save_IFS
3753   test -z "$ac_dir" && ac_dir=.
3754   $as_executable_p "$ac_dir/$ac_word" || continue
3755 ac_cv_prog_CTAGS="$ac_prog"
3756 echo "$as_me:3756: found $ac_dir/$ac_word" >&5
3757 break
3758 done
3759
3760 fi
3761 fi
3762 CTAGS=$ac_cv_prog_CTAGS
3763 if test -n "$CTAGS"; then
3764   echo "$as_me:3764: result: $CTAGS" >&5
3765 echo "${ECHO_T}$CTAGS" >&6
3766 else
3767   echo "$as_me:3767: result: no" >&5
3768 echo "${ECHO_T}no" >&6
3769 fi
3770
3771   test -n "$CTAGS" && break
3772 done
3773
3774 for ac_prog in exetags etags
3775 do
3776   # Extract the first word of "$ac_prog", so it can be a program name with args.
3777 set dummy $ac_prog; ac_word=$2
3778 echo "$as_me:3778: checking for $ac_word" >&5
3779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780 if test "${ac_cv_prog_ETAGS+set}" = set; then
3781   echo $ECHO_N "(cached) $ECHO_C" >&6
3782 else
3783   if test -n "$ETAGS"; then
3784   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3785 else
3786   ac_save_IFS=$IFS; IFS=$ac_path_separator
3787 ac_dummy="$PATH"
3788 for ac_dir in $ac_dummy; do
3789   IFS=$ac_save_IFS
3790   test -z "$ac_dir" && ac_dir=.
3791   $as_executable_p "$ac_dir/$ac_word" || continue
3792 ac_cv_prog_ETAGS="$ac_prog"
3793 echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3794 break
3795 done
3796
3797 fi
3798 fi
3799 ETAGS=$ac_cv_prog_ETAGS
3800 if test -n "$ETAGS"; then
3801   echo "$as_me:3801: result: $ETAGS" >&5
3802 echo "${ECHO_T}$ETAGS" >&6
3803 else
3804   echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806 fi
3807
3808   test -n "$ETAGS" && break
3809 done
3810
3811 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3812 set dummy ${CTAGS:-ctags}; ac_word=$2
3813 echo "$as_me:3813: checking for $ac_word" >&5
3814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3815 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3816   echo $ECHO_N "(cached) $ECHO_C" >&6
3817 else
3818   if test -n "$MAKE_LOWER_TAGS"; then
3819   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3820 else
3821   ac_save_IFS=$IFS; IFS=$ac_path_separator
3822 ac_dummy="$PATH"
3823 for ac_dir in $ac_dummy; do
3824   IFS=$ac_save_IFS
3825   test -z "$ac_dir" && ac_dir=.
3826   $as_executable_p "$ac_dir/$ac_word" || continue
3827 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3828 echo "$as_me:3828: found $ac_dir/$ac_word" >&5
3829 break
3830 done
3831
3832   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3833 fi
3834 fi
3835 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3836 if test -n "$MAKE_LOWER_TAGS"; then
3837   echo "$as_me:3837: result: $MAKE_LOWER_TAGS" >&5
3838 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3839 else
3840   echo "$as_me:3840: result: no" >&5
3841 echo "${ECHO_T}no" >&6
3842 fi
3843
3844 if test "$cf_cv_mixedcase" = yes ; then
3845         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3846 set dummy ${ETAGS:-etags}; ac_word=$2
3847 echo "$as_me:3847: checking for $ac_word" >&5
3848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3849 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3850   echo $ECHO_N "(cached) $ECHO_C" >&6
3851 else
3852   if test -n "$MAKE_UPPER_TAGS"; then
3853   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3854 else
3855   ac_save_IFS=$IFS; IFS=$ac_path_separator
3856 ac_dummy="$PATH"
3857 for ac_dir in $ac_dummy; do
3858   IFS=$ac_save_IFS
3859   test -z "$ac_dir" && ac_dir=.
3860   $as_executable_p "$ac_dir/$ac_word" || continue
3861 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3862 echo "$as_me:3862: found $ac_dir/$ac_word" >&5
3863 break
3864 done
3865
3866   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3867 fi
3868 fi
3869 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3870 if test -n "$MAKE_UPPER_TAGS"; then
3871   echo "$as_me:3871: result: $MAKE_UPPER_TAGS" >&5
3872 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3873 else
3874   echo "$as_me:3874: result: no" >&5
3875 echo "${ECHO_T}no" >&6
3876 fi
3877
3878 else
3879         MAKE_UPPER_TAGS=no
3880 fi
3881
3882 if test "$MAKE_UPPER_TAGS" = yes ; then
3883         MAKE_UPPER_TAGS=
3884 else
3885         MAKE_UPPER_TAGS="#"
3886 fi
3887
3888 if test "$MAKE_LOWER_TAGS" = yes ; then
3889         MAKE_LOWER_TAGS=
3890 else
3891         MAKE_LOWER_TAGS="#"
3892 fi
3893
3894 echo "$as_me:3894: checking for makeflags variable" >&5
3895 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3896 if test "${cf_cv_makeflags+set}" = set; then
3897   echo $ECHO_N "(cached) $ECHO_C" >&6
3898 else
3899
3900         cf_cv_makeflags=''
3901         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3902         do
3903                 cat >cf_makeflags.tmp <<CF_EOF
3904 SHELL = /bin/sh
3905 all :
3906         @ echo '.$cf_option'
3907 CF_EOF
3908                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3909                 case "$cf_result" in
3910                 .*k)
3911                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3912                         case "$cf_result" in
3913                         .*CC=*) cf_cv_makeflags=
3914                                 ;;
3915                         *)      cf_cv_makeflags=$cf_option
3916                                 ;;
3917                         esac
3918                         break
3919                         ;;
3920                 .-)     ;;
3921                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3922                         ;;
3923                 esac
3924         done
3925         rm -f cf_makeflags.tmp
3926
3927 fi
3928 echo "$as_me:3928: result: $cf_cv_makeflags" >&5
3929 echo "${ECHO_T}$cf_cv_makeflags" >&6
3930
3931 if test -n "$ac_tool_prefix"; then
3932   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3933 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3934 echo "$as_me:3934: checking for $ac_word" >&5
3935 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3936 if test "${ac_cv_prog_RANLIB+set}" = set; then
3937   echo $ECHO_N "(cached) $ECHO_C" >&6
3938 else
3939   if test -n "$RANLIB"; then
3940   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3941 else
3942   ac_save_IFS=$IFS; IFS=$ac_path_separator
3943 ac_dummy="$PATH"
3944 for ac_dir in $ac_dummy; do
3945   IFS=$ac_save_IFS
3946   test -z "$ac_dir" && ac_dir=.
3947   $as_executable_p "$ac_dir/$ac_word" || continue
3948 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3949 echo "$as_me:3949: found $ac_dir/$ac_word" >&5
3950 break
3951 done
3952
3953 fi
3954 fi
3955 RANLIB=$ac_cv_prog_RANLIB
3956 if test -n "$RANLIB"; then
3957   echo "$as_me:3957: result: $RANLIB" >&5
3958 echo "${ECHO_T}$RANLIB" >&6
3959 else
3960   echo "$as_me:3960: result: no" >&5
3961 echo "${ECHO_T}no" >&6
3962 fi
3963
3964 fi
3965 if test -z "$ac_cv_prog_RANLIB"; then
3966   ac_ct_RANLIB=$RANLIB
3967   # Extract the first word of "ranlib", so it can be a program name with args.
3968 set dummy ranlib; ac_word=$2
3969 echo "$as_me:3969: checking for $ac_word" >&5
3970 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3971 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3972   echo $ECHO_N "(cached) $ECHO_C" >&6
3973 else
3974   if test -n "$ac_ct_RANLIB"; then
3975   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3976 else
3977   ac_save_IFS=$IFS; IFS=$ac_path_separator
3978 ac_dummy="$PATH"
3979 for ac_dir in $ac_dummy; do
3980   IFS=$ac_save_IFS
3981   test -z "$ac_dir" && ac_dir=.
3982   $as_executable_p "$ac_dir/$ac_word" || continue
3983 ac_cv_prog_ac_ct_RANLIB="ranlib"
3984 echo "$as_me:3984: found $ac_dir/$ac_word" >&5
3985 break
3986 done
3987
3988   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3989 fi
3990 fi
3991 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3992 if test -n "$ac_ct_RANLIB"; then
3993   echo "$as_me:3993: result: $ac_ct_RANLIB" >&5
3994 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3995 else
3996   echo "$as_me:3996: result: no" >&5
3997 echo "${ECHO_T}no" >&6
3998 fi
3999
4000   RANLIB=$ac_ct_RANLIB
4001 else
4002   RANLIB="$ac_cv_prog_RANLIB"
4003 fi
4004
4005 if test -n "$ac_tool_prefix"; then
4006   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4007 set dummy ${ac_tool_prefix}ld; ac_word=$2
4008 echo "$as_me:4008: checking for $ac_word" >&5
4009 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4010 if test "${ac_cv_prog_LD+set}" = set; then
4011   echo $ECHO_N "(cached) $ECHO_C" >&6
4012 else
4013   if test -n "$LD"; then
4014   ac_cv_prog_LD="$LD" # Let the user override the test.
4015 else
4016   ac_save_IFS=$IFS; IFS=$ac_path_separator
4017 ac_dummy="$PATH"
4018 for ac_dir in $ac_dummy; do
4019   IFS=$ac_save_IFS
4020   test -z "$ac_dir" && ac_dir=.
4021   $as_executable_p "$ac_dir/$ac_word" || continue
4022 ac_cv_prog_LD="${ac_tool_prefix}ld"
4023 echo "$as_me:4023: found $ac_dir/$ac_word" >&5
4024 break
4025 done
4026
4027 fi
4028 fi
4029 LD=$ac_cv_prog_LD
4030 if test -n "$LD"; then
4031   echo "$as_me:4031: result: $LD" >&5
4032 echo "${ECHO_T}$LD" >&6
4033 else
4034   echo "$as_me:4034: result: no" >&5
4035 echo "${ECHO_T}no" >&6
4036 fi
4037
4038 fi
4039 if test -z "$ac_cv_prog_LD"; then
4040   ac_ct_LD=$LD
4041   # Extract the first word of "ld", so it can be a program name with args.
4042 set dummy ld; ac_word=$2
4043 echo "$as_me:4043: checking for $ac_word" >&5
4044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4045 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4046   echo $ECHO_N "(cached) $ECHO_C" >&6
4047 else
4048   if test -n "$ac_ct_LD"; then
4049   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4050 else
4051   ac_save_IFS=$IFS; IFS=$ac_path_separator
4052 ac_dummy="$PATH"
4053 for ac_dir in $ac_dummy; do
4054   IFS=$ac_save_IFS
4055   test -z "$ac_dir" && ac_dir=.
4056   $as_executable_p "$ac_dir/$ac_word" || continue
4057 ac_cv_prog_ac_ct_LD="ld"
4058 echo "$as_me:4058: found $ac_dir/$ac_word" >&5
4059 break
4060 done
4061
4062   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4063 fi
4064 fi
4065 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4066 if test -n "$ac_ct_LD"; then
4067   echo "$as_me:4067: result: $ac_ct_LD" >&5
4068 echo "${ECHO_T}$ac_ct_LD" >&6
4069 else
4070   echo "$as_me:4070: result: no" >&5
4071 echo "${ECHO_T}no" >&6
4072 fi
4073
4074   LD=$ac_ct_LD
4075 else
4076   LD="$ac_cv_prog_LD"
4077 fi
4078
4079 if test -n "$ac_tool_prefix"; then
4080   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4081 set dummy ${ac_tool_prefix}ar; ac_word=$2
4082 echo "$as_me:4082: checking for $ac_word" >&5
4083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4084 if test "${ac_cv_prog_AR+set}" = set; then
4085   echo $ECHO_N "(cached) $ECHO_C" >&6
4086 else
4087   if test -n "$AR"; then
4088   ac_cv_prog_AR="$AR" # Let the user override the test.
4089 else
4090   ac_save_IFS=$IFS; IFS=$ac_path_separator
4091 ac_dummy="$PATH"
4092 for ac_dir in $ac_dummy; do
4093   IFS=$ac_save_IFS
4094   test -z "$ac_dir" && ac_dir=.
4095   $as_executable_p "$ac_dir/$ac_word" || continue
4096 ac_cv_prog_AR="${ac_tool_prefix}ar"
4097 echo "$as_me:4097: found $ac_dir/$ac_word" >&5
4098 break
4099 done
4100
4101 fi
4102 fi
4103 AR=$ac_cv_prog_AR
4104 if test -n "$AR"; then
4105   echo "$as_me:4105: result: $AR" >&5
4106 echo "${ECHO_T}$AR" >&6
4107 else
4108   echo "$as_me:4108: result: no" >&5
4109 echo "${ECHO_T}no" >&6
4110 fi
4111
4112 fi
4113 if test -z "$ac_cv_prog_AR"; then
4114   ac_ct_AR=$AR
4115   # Extract the first word of "ar", so it can be a program name with args.
4116 set dummy ar; ac_word=$2
4117 echo "$as_me:4117: checking for $ac_word" >&5
4118 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4119 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4120   echo $ECHO_N "(cached) $ECHO_C" >&6
4121 else
4122   if test -n "$ac_ct_AR"; then
4123   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4124 else
4125   ac_save_IFS=$IFS; IFS=$ac_path_separator
4126 ac_dummy="$PATH"
4127 for ac_dir in $ac_dummy; do
4128   IFS=$ac_save_IFS
4129   test -z "$ac_dir" && ac_dir=.
4130   $as_executable_p "$ac_dir/$ac_word" || continue
4131 ac_cv_prog_ac_ct_AR="ar"
4132 echo "$as_me:4132: found $ac_dir/$ac_word" >&5
4133 break
4134 done
4135
4136   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4137 fi
4138 fi
4139 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4140 if test -n "$ac_ct_AR"; then
4141   echo "$as_me:4141: result: $ac_ct_AR" >&5
4142 echo "${ECHO_T}$ac_ct_AR" >&6
4143 else
4144   echo "$as_me:4144: result: no" >&5
4145 echo "${ECHO_T}no" >&6
4146 fi
4147
4148   AR=$ac_ct_AR
4149 else
4150   AR="$ac_cv_prog_AR"
4151 fi
4152
4153 if test -n "$ac_tool_prefix"; then
4154   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4155 set dummy ${ac_tool_prefix}ar; ac_word=$2
4156 echo "$as_me:4156: checking for $ac_word" >&5
4157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4158 if test "${ac_cv_prog_AR+set}" = set; then
4159   echo $ECHO_N "(cached) $ECHO_C" >&6
4160 else
4161   if test -n "$AR"; then
4162   ac_cv_prog_AR="$AR" # Let the user override the test.
4163 else
4164   ac_save_IFS=$IFS; IFS=$ac_path_separator
4165 ac_dummy="$PATH"
4166 for ac_dir in $ac_dummy; do
4167   IFS=$ac_save_IFS
4168   test -z "$ac_dir" && ac_dir=.
4169   $as_executable_p "$ac_dir/$ac_word" || continue
4170 ac_cv_prog_AR="${ac_tool_prefix}ar"
4171 echo "$as_me:4171: found $ac_dir/$ac_word" >&5
4172 break
4173 done
4174
4175 fi
4176 fi
4177 AR=$ac_cv_prog_AR
4178 if test -n "$AR"; then
4179   echo "$as_me:4179: result: $AR" >&5
4180 echo "${ECHO_T}$AR" >&6
4181 else
4182   echo "$as_me:4182: result: no" >&5
4183 echo "${ECHO_T}no" >&6
4184 fi
4185
4186 fi
4187 if test -z "$ac_cv_prog_AR"; then
4188   ac_ct_AR=$AR
4189   # Extract the first word of "ar", so it can be a program name with args.
4190 set dummy ar; ac_word=$2
4191 echo "$as_me:4191: checking for $ac_word" >&5
4192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4193 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4194   echo $ECHO_N "(cached) $ECHO_C" >&6
4195 else
4196   if test -n "$ac_ct_AR"; then
4197   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4198 else
4199   ac_save_IFS=$IFS; IFS=$ac_path_separator
4200 ac_dummy="$PATH"
4201 for ac_dir in $ac_dummy; do
4202   IFS=$ac_save_IFS
4203   test -z "$ac_dir" && ac_dir=.
4204   $as_executable_p "$ac_dir/$ac_word" || continue
4205 ac_cv_prog_ac_ct_AR="ar"
4206 echo "$as_me:4206: found $ac_dir/$ac_word" >&5
4207 break
4208 done
4209
4210   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4211 fi
4212 fi
4213 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4214 if test -n "$ac_ct_AR"; then
4215   echo "$as_me:4215: result: $ac_ct_AR" >&5
4216 echo "${ECHO_T}$ac_ct_AR" >&6
4217 else
4218   echo "$as_me:4218: result: no" >&5
4219 echo "${ECHO_T}no" >&6
4220 fi
4221
4222   AR=$ac_ct_AR
4223 else
4224   AR="$ac_cv_prog_AR"
4225 fi
4226
4227 echo "$as_me:4227: checking for options to update archives" >&5
4228 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4229 if test "${cf_cv_ar_flags+set}" = set; then
4230   echo $ECHO_N "(cached) $ECHO_C" >&6
4231 else
4232
4233         cf_cv_ar_flags=unknown
4234         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4235         do
4236
4237                 # check if $ARFLAGS already contains this choice
4238                 if test "x$ARFLAGS" != "x" ; then
4239                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4240                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4241                                 cf_cv_ar_flags=
4242                                 break
4243                         fi
4244                 fi
4245
4246                 rm -f conftest.$ac_cv_objext
4247                 rm -f conftest.a
4248
4249                 cat >conftest.$ac_ext <<EOF
4250 #line 4250 "configure"
4251 int     testdata[3] = { 123, 456, 789 };
4252 EOF
4253                 if { (eval echo "$as_me:4253: \"$ac_compile\"") >&5
4254   (eval $ac_compile) 2>&5
4255   ac_status=$?
4256   echo "$as_me:4256: \$? = $ac_status" >&5
4257   (exit $ac_status); } ; then
4258                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4259                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4260                         if test -f conftest.a ; then
4261                                 cf_cv_ar_flags=$cf_ar_flags
4262                                 break
4263                         fi
4264                 else
4265                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4266
4267 echo "${as_me:-configure}:4267: testing cannot compile test-program ..." 1>&5
4268
4269                         break
4270                 fi
4271         done
4272         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4273
4274 fi
4275 echo "$as_me:4275: result: $cf_cv_ar_flags" >&5
4276 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4277
4278 if test -n "$ARFLAGS" ; then
4279         if test -n "$cf_cv_ar_flags" ; then
4280                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4281         fi
4282 else
4283         ARFLAGS=$cf_cv_ar_flags
4284 fi
4285
4286 echo "$as_me:4286: checking if you have specified an install-prefix" >&5
4287 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4288
4289 # Check whether --with-install-prefix or --without-install-prefix was given.
4290 if test "${with_install_prefix+set}" = set; then
4291   withval="$with_install_prefix"
4292   case "$withval" in #(vi
4293         yes|no) #(vi
4294                 ;;
4295         *)      DESTDIR="$withval"
4296                 ;;
4297         esac
4298 fi;
4299 echo "$as_me:4299: result: $DESTDIR" >&5
4300 echo "${ECHO_T}$DESTDIR" >&6
4301
4302 ###############################################################################
4303
4304 # If we're cross-compiling, allow the user to override the tools and their
4305 # options.  The configure script is oriented toward identifying the host
4306 # compiler, etc., but we need a build compiler to generate parts of the source.
4307
4308 if test "$cross_compiling" = yes ; then
4309
4310         # defaults that we might want to override
4311         : ${BUILD_CFLAGS:=''}
4312         : ${BUILD_CPPFLAGS:=''}
4313         : ${BUILD_LDFLAGS:=''}
4314         : ${BUILD_LIBS:=''}
4315         : ${BUILD_EXEEXT:='$x'}
4316         : ${BUILD_OBJEXT:='o'}
4317
4318 # Check whether --with-build-cc or --without-build-cc was given.
4319 if test "${with_build_cc+set}" = set; then
4320   withval="$with_build_cc"
4321   BUILD_CC="$withval"
4322 else
4323   for ac_prog in gcc cc cl
4324 do
4325   # Extract the first word of "$ac_prog", so it can be a program name with args.
4326 set dummy $ac_prog; ac_word=$2
4327 echo "$as_me:4327: checking for $ac_word" >&5
4328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4329 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4330   echo $ECHO_N "(cached) $ECHO_C" >&6
4331 else
4332   if test -n "$BUILD_CC"; then
4333   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4334 else
4335   ac_save_IFS=$IFS; IFS=$ac_path_separator
4336 ac_dummy="$PATH"
4337 for ac_dir in $ac_dummy; do
4338   IFS=$ac_save_IFS
4339   test -z "$ac_dir" && ac_dir=.
4340   $as_executable_p "$ac_dir/$ac_word" || continue
4341 ac_cv_prog_BUILD_CC="$ac_prog"
4342 echo "$as_me:4342: found $ac_dir/$ac_word" >&5
4343 break
4344 done
4345
4346 fi
4347 fi
4348 BUILD_CC=$ac_cv_prog_BUILD_CC
4349 if test -n "$BUILD_CC"; then
4350   echo "$as_me:4350: result: $BUILD_CC" >&5
4351 echo "${ECHO_T}$BUILD_CC" >&6
4352 else
4353   echo "$as_me:4353: result: no" >&5
4354 echo "${ECHO_T}no" >&6
4355 fi
4356
4357   test -n "$BUILD_CC" && break
4358 done
4359
4360 fi;
4361         echo "$as_me:4361: checking for native build C compiler" >&5
4362 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4363         echo "$as_me:4363: result: $BUILD_CC" >&5
4364 echo "${ECHO_T}$BUILD_CC" >&6
4365
4366         echo "$as_me:4366: checking for native build C preprocessor" >&5
4367 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4368
4369 # Check whether --with-build-cpp or --without-build-cpp was given.
4370 if test "${with_build_cpp+set}" = set; then
4371   withval="$with_build_cpp"
4372   BUILD_CPP="$withval"
4373 else
4374   BUILD_CPP='${BUILD_CC} -E'
4375 fi;
4376         echo "$as_me:4376: result: $BUILD_CPP" >&5
4377 echo "${ECHO_T}$BUILD_CPP" >&6
4378
4379         echo "$as_me:4379: checking for native build C flags" >&5
4380 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4381
4382 # Check whether --with-build-cflags or --without-build-cflags was given.
4383 if test "${with_build_cflags+set}" = set; then
4384   withval="$with_build_cflags"
4385   BUILD_CFLAGS="$withval"
4386 fi;
4387         echo "$as_me:4387: result: $BUILD_CFLAGS" >&5
4388 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4389
4390         echo "$as_me:4390: checking for native build C preprocessor-flags" >&5
4391 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4392
4393 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4394 if test "${with_build_cppflags+set}" = set; then
4395   withval="$with_build_cppflags"
4396   BUILD_CPPFLAGS="$withval"
4397 fi;
4398         echo "$as_me:4398: result: $BUILD_CPPFLAGS" >&5
4399 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4400
4401         echo "$as_me:4401: checking for native build linker-flags" >&5
4402 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4403
4404 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4405 if test "${with_build_ldflags+set}" = set; then
4406   withval="$with_build_ldflags"
4407   BUILD_LDFLAGS="$withval"
4408 fi;
4409         echo "$as_me:4409: result: $BUILD_LDFLAGS" >&5
4410 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4411
4412         echo "$as_me:4412: checking for native build linker-libraries" >&5
4413 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4414
4415 # Check whether --with-build-libs or --without-build-libs was given.
4416 if test "${with_build_libs+set}" = set; then
4417   withval="$with_build_libs"
4418   BUILD_LIBS="$withval"
4419 fi;
4420         echo "$as_me:4420: result: $BUILD_LIBS" >&5
4421 echo "${ECHO_T}$BUILD_LIBS" >&6
4422
4423         # this assumes we're on Unix.
4424         BUILD_EXEEXT=
4425         BUILD_OBJEXT=o
4426
4427         : ${BUILD_CC:='${CC}'}
4428
4429         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4430                 { { echo "$as_me:4430: error: Cross-build requires two compilers.
4431 Use --with-build-cc to specify the native compiler." >&5
4432 echo "$as_me: error: Cross-build requires two compilers.
4433 Use --with-build-cc to specify the native compiler." >&2;}
4434    { (exit 1); exit 1; }; }
4435         fi
4436
4437 else
4438         : ${BUILD_CC:='${CC}'}
4439         : ${BUILD_CPP:='${CPP}'}
4440         : ${BUILD_CFLAGS:='${CFLAGS}'}
4441         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4442         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4443         : ${BUILD_LIBS:='${LIBS}'}
4444         : ${BUILD_EXEEXT:='$x'}
4445         : ${BUILD_OBJEXT:='o'}
4446 fi
4447
4448 ###############################################################################
4449
4450 ### Options to allow the user to specify the set of libraries which are used.
4451 ### Use "--without-normal --with-shared" to allow the default model to be
4452 ### shared, for example.
4453 cf_list_models=""
4454
4455 echo "$as_me:4455: checking if libtool -version-number should be used" >&5
4456 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4457
4458 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4459 if test "${enable_libtool_version+set}" = set; then
4460   enableval="$enable_libtool_version"
4461   test "$enableval" != no && enableval=yes
4462   if test "$enableval" != "yes" ; then
4463     cf_libtool_version=no
4464   else
4465     cf_libtool_version=yes
4466   fi
4467 else
4468   enableval=yes
4469   cf_libtool_version=yes
4470
4471 fi;
4472 echo "$as_me:4472: result: $cf_libtool_version" >&5
4473 echo "${ECHO_T}$cf_libtool_version" >&6
4474
4475 if test "$cf_libtool_version" = yes ; then
4476         LIBTOOL_VERSION="-version-number"
4477 else
4478         LIBTOOL_VERSION="-version-info"
4479 fi
4480
4481 LIBTOOL=
4482
4483 # common library maintenance symbols that are convenient for libtool scripts:
4484 LIB_CREATE='${AR} -cr'
4485 LIB_OBJECT='${OBJECTS}'
4486 LIB_SUFFIX=.a
4487 LIB_PREP="$RANLIB"
4488
4489 # symbols used to prop libtool up to enable it to determine what it should be
4490 # doing:
4491 LIB_CLEAN=
4492 LIB_COMPILE=
4493 LIB_LINK='${CC}'
4494 LIB_INSTALL=
4495 LIB_UNINSTALL=
4496
4497 echo "$as_me:4497: checking if you want to build libraries with libtool" >&5
4498 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4499
4500 # Check whether --with-libtool or --without-libtool was given.
4501 if test "${with_libtool+set}" = set; then
4502   withval="$with_libtool"
4503   with_libtool=$withval
4504 else
4505   with_libtool=no
4506 fi;
4507 echo "$as_me:4507: result: $with_libtool" >&5
4508 echo "${ECHO_T}$with_libtool" >&6
4509 if test "$with_libtool" != "no"; then
4510
4511         if test "$with_libtool" != "yes" ; then
4512
4513 if test "x$prefix" != xNONE; then
4514   cf_path_syntax="$prefix"
4515 else
4516   cf_path_syntax="$ac_default_prefix"
4517 fi
4518
4519 case ".$with_libtool" in #(vi
4520 .\$\(*\)*|.\'*\'*) #(vi
4521   ;;
4522 ..|./*|.\\*) #(vi
4523   ;;
4524 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4525   ;;
4526 .\${*prefix}*) #(vi
4527   eval with_libtool="$with_libtool"
4528   case ".$with_libtool" in #(vi
4529   .NONE/*)
4530     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4531     ;;
4532   esac
4533   ;; #(vi
4534 .no|.NONE/*)
4535   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4536   ;;
4537 *)
4538   { { echo "$as_me:4538: error: expected a pathname, not \"$with_libtool\"" >&5
4539 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4540    { (exit 1); exit 1; }; }
4541   ;;
4542 esac
4543
4544                 LIBTOOL=$with_libtool
4545         else
4546                 # Extract the first word of "libtool", so it can be a program name with args.
4547 set dummy libtool; ac_word=$2
4548 echo "$as_me:4548: checking for $ac_word" >&5
4549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4550 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4551   echo $ECHO_N "(cached) $ECHO_C" >&6
4552 else
4553   case $LIBTOOL in
4554   [\\/]* | ?:[\\/]*)
4555   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4556   ;;
4557   *)
4558   ac_save_IFS=$IFS; IFS=$ac_path_separator
4559 ac_dummy="$PATH"
4560 for ac_dir in $ac_dummy; do
4561   IFS=$ac_save_IFS
4562   test -z "$ac_dir" && ac_dir=.
4563   if $as_executable_p "$ac_dir/$ac_word"; then
4564    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4565    echo "$as_me:4565: found $ac_dir/$ac_word" >&5
4566    break
4567 fi
4568 done
4569
4570   ;;
4571 esac
4572 fi
4573 LIBTOOL=$ac_cv_path_LIBTOOL
4574
4575 if test -n "$LIBTOOL"; then
4576   echo "$as_me:4576: result: $LIBTOOL" >&5
4577 echo "${ECHO_T}$LIBTOOL" >&6
4578 else
4579   echo "$as_me:4579: result: no" >&5
4580 echo "${ECHO_T}no" >&6
4581 fi
4582
4583         fi
4584         if test -z "$LIBTOOL" ; then
4585                 { { echo "$as_me:4585: error: Cannot find libtool" >&5
4586 echo "$as_me: error: Cannot find libtool" >&2;}
4587    { (exit 1); exit 1; }; }
4588         fi
4589         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4590         LIB_OBJECT='${OBJECTS:.o=.lo}'
4591         LIB_SUFFIX=.la
4592         LIB_CLEAN='${LIBTOOL} --mode=clean'
4593         LIB_COMPILE='${LIBTOOL} --mode=compile'
4594         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4595         LIB_INSTALL='${LIBTOOL} --mode=install'
4596         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4597         LIB_PREP=:
4598
4599         # Show the version of libtool
4600         echo "$as_me:4600: checking version of libtool" >&5
4601 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4602
4603         # Save the version in a cache variable - this is not entirely a good
4604         # thing, but the version string from libtool is very ugly, and for
4605         # bug reports it might be useful to have the original string. "("
4606         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.].*//'`
4607         echo "$as_me:4607: result: $cf_cv_libtool_version" >&5
4608 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4609         if test -z "$cf_cv_libtool_version" ; then
4610                 { { echo "$as_me:4610: error: This is not GNU libtool" >&5
4611 echo "$as_me: error: This is not GNU libtool" >&2;}
4612    { (exit 1); exit 1; }; }
4613         fi
4614
4615         # special hack to add -no-undefined (which libtool should do for itself)
4616         LT_UNDEF=
4617         case "$cf_cv_system_name" in #(vi
4618         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4619                 LT_UNDEF=-no-undefined
4620                 ;;
4621         esac
4622
4623         # special hack to add --tag option for C++ compiler
4624         case $cf_cv_libtool_version in #(vi
4625         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4626                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4627                 LIBTOOL="$LIBTOOL --tag=CC"
4628                 ;;
4629         *)
4630                 LIBTOOL_CXX="$LIBTOOL"
4631                 ;;
4632         esac
4633 else
4634         LIBTOOL=""
4635         LIBTOOL_CXX=""
4636 fi
4637
4638 test -z "$LIBTOOL" && ECHO_LT=
4639
4640 if test "$with_libtool" != "no" ; then
4641
4642 cf_list_models="$cf_list_models libtool"
4643
4644 else
4645
4646 echo "$as_me:4646: checking if you want to build shared libraries" >&5
4647 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4648
4649 # Check whether --with-shared or --without-shared was given.
4650 if test "${with_shared+set}" = set; then
4651   withval="$with_shared"
4652   with_shared=$withval
4653 else
4654   with_shared=no
4655 fi;
4656 echo "$as_me:4656: result: $with_shared" >&5
4657 echo "${ECHO_T}$with_shared" >&6
4658 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4659
4660 echo "$as_me:4660: checking if you want to build static libraries" >&5
4661 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4662
4663 # Check whether --with-normal or --without-normal was given.
4664 if test "${with_normal+set}" = set; then
4665   withval="$with_normal"
4666   with_normal=$withval
4667 else
4668   with_normal=yes
4669 fi;
4670 echo "$as_me:4670: result: $with_normal" >&5
4671 echo "${ECHO_T}$with_normal" >&6
4672 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4673
4674 echo "$as_me:4674: checking if you want to build debug libraries" >&5
4675 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4676
4677 # Check whether --with-debug or --without-debug was given.
4678 if test "${with_debug+set}" = set; then
4679   withval="$with_debug"
4680   with_debug=$withval
4681 else
4682   with_debug=yes
4683 fi;
4684 echo "$as_me:4684: result: $with_debug" >&5
4685 echo "${ECHO_T}$with_debug" >&6
4686 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4687
4688 echo "$as_me:4688: checking if you want to build profiling libraries" >&5
4689 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4690
4691 # Check whether --with-profile or --without-profile was given.
4692 if test "${with_profile+set}" = set; then
4693   withval="$with_profile"
4694   with_profile=$withval
4695 else
4696   with_profile=no
4697 fi;
4698 echo "$as_me:4698: result: $with_profile" >&5
4699 echo "${ECHO_T}$with_profile" >&6
4700 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4701
4702 fi
4703
4704 ###############################################################################
4705
4706 echo "$as_me:4706: checking for specified models" >&5
4707 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4708 test -z "$cf_list_models" && cf_list_models=normal
4709 test "$with_libtool" != "no" && cf_list_models=libtool
4710 echo "$as_me:4710: result: $cf_list_models" >&5
4711 echo "${ECHO_T}$cf_list_models" >&6
4712
4713 ### Use the first model as the default, and save its suffix for use in building
4714 ### up test-applications.
4715 echo "$as_me:4715: checking for default model" >&5
4716 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4717 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4718 echo "$as_me:4718: result: $DFT_LWR_MODEL" >&5
4719 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4720
4721 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4722
4723 TICS_NAME=tic
4724
4725 TINFO_NAME=tinfo
4726
4727 LIB_NAME=ncurses
4728
4729 LIB_DIR=../lib
4730 LIB_2ND=../../lib
4731
4732         case $cf_cv_system_name in #(vi
4733         OS/2*|os2*) #(vi
4734         LIB_PREFIX=''
4735         ;;
4736         *)      LIB_PREFIX='lib'
4737         ;;
4738         esac
4739 cf_prefix=$LIB_PREFIX
4740
4741 LIB_PREFIX=$cf_prefix
4742
4743 LIB_SUFFIX=
4744
4745 ###############################################################################
4746
4747 echo "$as_me:4747: checking if you want to build a separate terminfo library" >&5
4748 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4749
4750 # Check whether --with-termlib or --without-termlib was given.
4751 if test "${with_termlib+set}" = set; then
4752   withval="$with_termlib"
4753   with_termlib=$withval
4754 else
4755   with_termlib=no
4756 fi;
4757 echo "$as_me:4757: result: $with_termlib" >&5
4758 echo "${ECHO_T}$with_termlib" >&6
4759
4760 echo "$as_me:4760: checking if you want to build a separate tic library" >&5
4761 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4762
4763 # Check whether --with-ticlib or --without-ticlib was given.
4764 if test "${with_ticlib+set}" = set; then
4765   withval="$with_ticlib"
4766   with_ticlib=$withval
4767 else
4768   with_ticlib=no
4769 fi;
4770 echo "$as_me:4770: result: $with_ticlib" >&5
4771 echo "${ECHO_T}$with_ticlib" >&6
4772
4773 ### Checks for special libraries, must be done up-front.
4774 SHLIB_LIST=""
4775
4776 echo "$as_me:4776: checking if you want to link with the GPM mouse library" >&5
4777 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4778
4779 # Check whether --with-gpm or --without-gpm was given.
4780 if test "${with_gpm+set}" = set; then
4781   withval="$with_gpm"
4782   with_gpm=$withval
4783 else
4784   with_gpm=maybe
4785 fi;
4786 echo "$as_me:4786: result: $with_gpm" >&5
4787 echo "${ECHO_T}$with_gpm" >&6
4788
4789 if test "$with_gpm" != no ; then
4790         echo "$as_me:4790: checking for gpm.h" >&5
4791 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4792 if test "${ac_cv_header_gpm_h+set}" = set; then
4793   echo $ECHO_N "(cached) $ECHO_C" >&6
4794 else
4795   cat >conftest.$ac_ext <<_ACEOF
4796 #line 4796 "configure"
4797 #include "confdefs.h"
4798 #include <gpm.h>
4799 _ACEOF
4800 if { (eval echo "$as_me:4800: \"$ac_cpp conftest.$ac_ext\"") >&5
4801   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4802   ac_status=$?
4803   egrep -v '^ *\+' conftest.er1 >conftest.err
4804   rm -f conftest.er1
4805   cat conftest.err >&5
4806   echo "$as_me:4806: \$? = $ac_status" >&5
4807   (exit $ac_status); } >/dev/null; then
4808   if test -s conftest.err; then
4809     ac_cpp_err=$ac_c_preproc_warn_flag
4810   else
4811     ac_cpp_err=
4812   fi
4813 else
4814   ac_cpp_err=yes
4815 fi
4816 if test -z "$ac_cpp_err"; then
4817   ac_cv_header_gpm_h=yes
4818 else
4819   echo "$as_me: failed program was:" >&5
4820   cat conftest.$ac_ext >&5
4821   ac_cv_header_gpm_h=no
4822 fi
4823 rm -f conftest.err conftest.$ac_ext
4824 fi
4825 echo "$as_me:4825: result: $ac_cv_header_gpm_h" >&5
4826 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4827 if test $ac_cv_header_gpm_h = yes; then
4828
4829                 cat >>confdefs.h <<\EOF
4830 #define HAVE_GPM_H 1
4831 EOF
4832
4833                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4834                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4835
4836 echo "${as_me:-configure}:4836: testing assuming we really have GPM library ..." 1>&5
4837
4838                         cat >>confdefs.h <<\EOF
4839 #define HAVE_LIBGPM 1
4840 EOF
4841
4842                 else
4843                         echo "$as_me:4843: checking for Gpm_Open in -lgpm" >&5
4844 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4845 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4846   echo $ECHO_N "(cached) $ECHO_C" >&6
4847 else
4848   ac_check_lib_save_LIBS=$LIBS
4849 LIBS="-lgpm  $LIBS"
4850 cat >conftest.$ac_ext <<_ACEOF
4851 #line 4851 "configure"
4852 #include "confdefs.h"
4853
4854 /* Override any gcc2 internal prototype to avoid an error.  */
4855 #ifdef __cplusplus
4856 extern "C"
4857 #endif
4858 /* We use char because int might match the return type of a gcc2
4859    builtin and then its argument prototype would still apply.  */
4860 char Gpm_Open ();
4861 int
4862 main ()
4863 {
4864 Gpm_Open ();
4865   ;
4866   return 0;
4867 }
4868 _ACEOF
4869 rm -f conftest.$ac_objext conftest$ac_exeext
4870 if { (eval echo "$as_me:4870: \"$ac_link\"") >&5
4871   (eval $ac_link) 2>&5
4872   ac_status=$?
4873   echo "$as_me:4873: \$? = $ac_status" >&5
4874   (exit $ac_status); } &&
4875          { ac_try='test -s conftest$ac_exeext'
4876   { (eval echo "$as_me:4876: \"$ac_try\"") >&5
4877   (eval $ac_try) 2>&5
4878   ac_status=$?
4879   echo "$as_me:4879: \$? = $ac_status" >&5
4880   (exit $ac_status); }; }; then
4881   ac_cv_lib_gpm_Gpm_Open=yes
4882 else
4883   echo "$as_me: failed program was:" >&5
4884 cat conftest.$ac_ext >&5
4885 ac_cv_lib_gpm_Gpm_Open=no
4886 fi
4887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4888 LIBS=$ac_check_lib_save_LIBS
4889 fi
4890 echo "$as_me:4890: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4891 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4892 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4893   :
4894 else
4895
4896                                 { { echo "$as_me:4896: error: Cannot link with GPM library" >&5
4897 echo "$as_me: error: Cannot link with GPM library" >&2;}
4898    { (exit 1); exit 1; }; }
4899                 fi
4900                 with_gpm=yes
4901
4902 fi
4903
4904 else
4905
4906                 test "$with_gpm" != maybe && { echo "$as_me:4906: WARNING: Cannot find GPM header" >&5
4907 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4908                 with_gpm=no
4909
4910 fi
4911
4912 fi
4913
4914 if test "$with_gpm" != no ; then
4915         echo "$as_me:4915: checking if you want to load GPM dynamically" >&5
4916 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4917
4918 # Check whether --with-dlsym or --without-dlsym was given.
4919 if test "${with_dlsym+set}" = set; then
4920   withval="$with_dlsym"
4921   with_dlsym=$withval
4922 else
4923   with_dlsym=yes
4924 fi;
4925         echo "$as_me:4925: result: $with_dlsym" >&5
4926 echo "${ECHO_T}$with_dlsym" >&6
4927         if test "$with_dlsym" = yes ; then
4928
4929 cf_have_dlsym=no
4930 echo "$as_me:4930: checking for dlsym" >&5
4931 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4932 if test "${ac_cv_func_dlsym+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 /* System header to define __stub macros and hopefully few prototypes,
4939     which can conflict with char dlsym (); below.  */
4940 #include <assert.h>
4941 /* Override any gcc2 internal prototype to avoid an error.  */
4942 #ifdef __cplusplus
4943 extern "C"
4944 #endif
4945 /* We use char because int might match the return type of a gcc2
4946    builtin and then its argument prototype would still apply.  */
4947 char dlsym ();
4948 char (*f) ();
4949
4950 int
4951 main ()
4952 {
4953 /* The GNU C library defines this for functions which it implements
4954     to always fail with ENOSYS.  Some functions are actually named
4955     something starting with __ and the normal name is an alias.  */
4956 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4957 choke me
4958 #else
4959 f = dlsym;
4960 #endif
4961
4962   ;
4963   return 0;
4964 }
4965 _ACEOF
4966 rm -f conftest.$ac_objext conftest$ac_exeext
4967 if { (eval echo "$as_me:4967: \"$ac_link\"") >&5
4968   (eval $ac_link) 2>&5
4969   ac_status=$?
4970   echo "$as_me:4970: \$? = $ac_status" >&5
4971   (exit $ac_status); } &&
4972          { ac_try='test -s conftest$ac_exeext'
4973   { (eval echo "$as_me:4973: \"$ac_try\"") >&5
4974   (eval $ac_try) 2>&5
4975   ac_status=$?
4976   echo "$as_me:4976: \$? = $ac_status" >&5
4977   (exit $ac_status); }; }; then
4978   ac_cv_func_dlsym=yes
4979 else
4980   echo "$as_me: failed program was:" >&5
4981 cat conftest.$ac_ext >&5
4982 ac_cv_func_dlsym=no
4983 fi
4984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4985 fi
4986 echo "$as_me:4986: result: $ac_cv_func_dlsym" >&5
4987 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4988 if test $ac_cv_func_dlsym = yes; then
4989   cf_have_dlsym=yes
4990 else
4991
4992 cf_have_libdl=no
4993 echo "$as_me:4993: checking for dlsym in -ldl" >&5
4994 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4995 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4996   echo $ECHO_N "(cached) $ECHO_C" >&6
4997 else
4998   ac_check_lib_save_LIBS=$LIBS
4999 LIBS="-ldl  $LIBS"
5000 cat >conftest.$ac_ext <<_ACEOF
5001 #line 5001 "configure"
5002 #include "confdefs.h"
5003
5004 /* Override any gcc2 internal prototype to avoid an error.  */
5005 #ifdef __cplusplus
5006 extern "C"
5007 #endif
5008 /* We use char because int might match the return type of a gcc2
5009    builtin and then its argument prototype would still apply.  */
5010 char dlsym ();
5011 int
5012 main ()
5013 {
5014 dlsym ();
5015   ;
5016   return 0;
5017 }
5018 _ACEOF
5019 rm -f conftest.$ac_objext conftest$ac_exeext
5020 if { (eval echo "$as_me:5020: \"$ac_link\"") >&5
5021   (eval $ac_link) 2>&5
5022   ac_status=$?
5023   echo "$as_me:5023: \$? = $ac_status" >&5
5024   (exit $ac_status); } &&
5025          { ac_try='test -s conftest$ac_exeext'
5026   { (eval echo "$as_me:5026: \"$ac_try\"") >&5
5027   (eval $ac_try) 2>&5
5028   ac_status=$?
5029   echo "$as_me:5029: \$? = $ac_status" >&5
5030   (exit $ac_status); }; }; then
5031   ac_cv_lib_dl_dlsym=yes
5032 else
5033   echo "$as_me: failed program was:" >&5
5034 cat conftest.$ac_ext >&5
5035 ac_cv_lib_dl_dlsym=no
5036 fi
5037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5038 LIBS=$ac_check_lib_save_LIBS
5039 fi
5040 echo "$as_me:5040: result: $ac_cv_lib_dl_dlsym" >&5
5041 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5042 if test $ac_cv_lib_dl_dlsym = yes; then
5043
5044         cf_have_dlsym=yes
5045         cf_have_libdl=yes
5046 fi
5047
5048 fi
5049
5050 if test "$cf_have_dlsym" = yes ; then
5051         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5052
5053         echo "$as_me:5053: checking whether able to link to dl*() functions" >&5
5054 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5055         cat >conftest.$ac_ext <<_ACEOF
5056 #line 5056 "configure"
5057 #include "confdefs.h"
5058 #include <dlfcn.h>
5059 int
5060 main ()
5061 {
5062
5063                 void *obj;
5064                 if ((obj = dlopen("filename", 0)) != 0) {
5065                         if (dlsym(obj, "symbolname") == 0) {
5066                         dlclose(obj);
5067                         }
5068                 }
5069   ;
5070   return 0;
5071 }
5072 _ACEOF
5073 rm -f conftest.$ac_objext conftest$ac_exeext
5074 if { (eval echo "$as_me:5074: \"$ac_link\"") >&5
5075   (eval $ac_link) 2>&5
5076   ac_status=$?
5077   echo "$as_me:5077: \$? = $ac_status" >&5
5078   (exit $ac_status); } &&
5079          { ac_try='test -s conftest$ac_exeext'
5080   { (eval echo "$as_me:5080: \"$ac_try\"") >&5
5081   (eval $ac_try) 2>&5
5082   ac_status=$?
5083   echo "$as_me:5083: \$? = $ac_status" >&5
5084   (exit $ac_status); }; }; then
5085
5086                 cat >>confdefs.h <<\EOF
5087 #define HAVE_LIBDL 1
5088 EOF
5089
5090 else
5091   echo "$as_me: failed program was:" >&5
5092 cat conftest.$ac_ext >&5
5093
5094                 { { echo "$as_me:5094: error: Cannot link test program for libdl" >&5
5095 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5096    { (exit 1); exit 1; }; }
5097 fi
5098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5099         echo "$as_me:5099: result: ok" >&5
5100 echo "${ECHO_T}ok" >&6
5101 else
5102         { { echo "$as_me:5102: error: Cannot find dlsym function" >&5
5103 echo "$as_me: error: Cannot find dlsym function" >&2;}
5104    { (exit 1); exit 1; }; }
5105 fi
5106
5107                 if test "$with_gpm" != yes ; then
5108                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5109
5110 echo "${as_me:-configure}:5110: testing assuming soname for gpm is $with_gpm ..." 1>&5
5111
5112                         cf_cv_gpm_soname="$with_gpm"
5113                 else
5114
5115 echo "$as_me:5115: checking for soname of gpm library" >&5
5116 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5117 if test "${cf_cv_gpm_soname+set}" = set; then
5118   echo $ECHO_N "(cached) $ECHO_C" >&6
5119 else
5120
5121 cf_cv_gpm_soname=unknown
5122 if test "$cross_compiling" != yes ; then
5123 cat >conftest.$ac_ext <<CF_EOF
5124 #include <gpm.h>
5125 int main()
5126 {
5127 if (Gpm_Open(0,0)) Gpm_Close();
5128         ${cf_cv_main_return:-return}(0);
5129 }
5130 CF_EOF
5131 cf_save_LIBS="$LIBS"
5132         LIBS="-lgpm $LIBS"
5133         if { (eval echo "$as_me:5133: \"$ac_compile\"") >&5
5134   (eval $ac_compile) 2>&5
5135   ac_status=$?
5136   echo "$as_me:5136: \$? = $ac_status" >&5
5137   (exit $ac_status); } ; then
5138                 if { (eval echo "$as_me:5138: \"$ac_link\"") >&5
5139   (eval $ac_link) 2>&5
5140   ac_status=$?
5141   echo "$as_me:5141: \$? = $ac_status" >&5
5142   (exit $ac_status); } ; then
5143                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5144                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5145                 fi
5146         fi
5147 rm -rf conftest*
5148 LIBS="$cf_save_LIBS"
5149 fi
5150
5151 fi
5152 echo "$as_me:5152: result: $cf_cv_gpm_soname" >&5
5153 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5154
5155                 fi
5156                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5157 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5158 EOF
5159
5160                 SHLIB_LIST="-ldl $SHLIB_LIST"
5161         else
5162                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5163                 TEST_LIBS="-lgpm $TEST_LIBS"
5164         fi
5165         cat >>confdefs.h <<\EOF
5166 #define HAVE_LIBGPM 1
5167 EOF
5168
5169 echo "$as_me:5169: checking for Gpm_Wgetch in -lgpm" >&5
5170 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5171 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5172   echo $ECHO_N "(cached) $ECHO_C" >&6
5173 else
5174   ac_check_lib_save_LIBS=$LIBS
5175 LIBS="-lgpm  $LIBS"
5176 cat >conftest.$ac_ext <<_ACEOF
5177 #line 5177 "configure"
5178 #include "confdefs.h"
5179
5180 /* Override any gcc2 internal prototype to avoid an error.  */
5181 #ifdef __cplusplus
5182 extern "C"
5183 #endif
5184 /* We use char because int might match the return type of a gcc2
5185    builtin and then its argument prototype would still apply.  */
5186 char Gpm_Wgetch ();
5187 int
5188 main ()
5189 {
5190 Gpm_Wgetch ();
5191   ;
5192   return 0;
5193 }
5194 _ACEOF
5195 rm -f conftest.$ac_objext conftest$ac_exeext
5196 if { (eval echo "$as_me:5196: \"$ac_link\"") >&5
5197   (eval $ac_link) 2>&5
5198   ac_status=$?
5199   echo "$as_me:5199: \$? = $ac_status" >&5
5200   (exit $ac_status); } &&
5201          { ac_try='test -s conftest$ac_exeext'
5202   { (eval echo "$as_me:5202: \"$ac_try\"") >&5
5203   (eval $ac_try) 2>&5
5204   ac_status=$?
5205   echo "$as_me:5205: \$? = $ac_status" >&5
5206   (exit $ac_status); }; }; then
5207   ac_cv_lib_gpm_Gpm_Wgetch=yes
5208 else
5209   echo "$as_me: failed program was:" >&5
5210 cat conftest.$ac_ext >&5
5211 ac_cv_lib_gpm_Gpm_Wgetch=no
5212 fi
5213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5214 LIBS=$ac_check_lib_save_LIBS
5215 fi
5216 echo "$as_me:5216: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5217 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5218 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5219
5220 echo "$as_me:5220: checking if GPM is weakly bound to curses library" >&5
5221 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5222 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5223   echo $ECHO_N "(cached) $ECHO_C" >&6
5224 else
5225
5226 cf_cv_check_gpm_wgetch=unknown
5227 if test "$cross_compiling" != yes ; then
5228
5229 cat >conftest.$ac_ext <<CF_EOF
5230 #include <gpm.h>
5231 int main()
5232 {
5233         Gpm_Wgetch();
5234         ${cf_cv_main_return:-return}(0);
5235 }
5236 CF_EOF
5237
5238         cf_save_LIBS="$LIBS"
5239         # This only works if we can look at the symbol table.  If a shared
5240         # library is stripped for install, we cannot use that.  So we're forced
5241         # to rely on the static library, noting that some packagers may not
5242         # include it.
5243         LIBS="-static -lgpm -dynamic $LIBS"
5244         if { (eval echo "$as_me:5244: \"$ac_compile\"") >&5
5245   (eval $ac_compile) 2>&5
5246   ac_status=$?
5247   echo "$as_me:5247: \$? = $ac_status" >&5
5248   (exit $ac_status); } ; then
5249                 if { (eval echo "$as_me:5249: \"$ac_link\"") >&5
5250   (eval $ac_link) 2>&5
5251   ac_status=$?
5252   echo "$as_me:5252: \$? = $ac_status" >&5
5253   (exit $ac_status); } ; then
5254                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5255                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5256                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5257                 fi
5258         fi
5259         rm -rf conftest*
5260         LIBS="$cf_save_LIBS"
5261 fi
5262
5263 fi
5264 echo "$as_me:5264: result: $cf_cv_check_gpm_wgetch" >&5
5265 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5266
5267 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5268         { echo "$as_me:5268: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5269 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5270 fi
5271
5272 fi
5273
5274 fi
5275
5276 # not everyone has "test -c"
5277 if test -c /dev/sysmouse 2>/dev/null ; then
5278 echo "$as_me:5278: checking if you want to use sysmouse" >&5
5279 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5280
5281 # Check whether --with-sysmouse or --without-sysmouse was given.
5282 if test "${with_sysmouse+set}" = set; then
5283   withval="$with_sysmouse"
5284   cf_with_sysmouse=$withval
5285 else
5286   cf_with_sysmouse=maybe
5287 fi;
5288         if test "$cf_with_sysmouse" != no ; then
5289         cat >conftest.$ac_ext <<_ACEOF
5290 #line 5290 "configure"
5291 #include "confdefs.h"
5292
5293 #include <osreldate.h>
5294 #if (__FreeBSD_version >= 400017)
5295 #include <sys/consio.h>
5296 #include <sys/fbio.h>
5297 #else
5298 #include <machine/console.h>
5299 #endif
5300
5301 int
5302 main ()
5303 {
5304
5305         struct mouse_info the_mouse;
5306         ioctl(0, CONS_MOUSECTL, &the_mouse);
5307
5308   ;
5309   return 0;
5310 }
5311 _ACEOF
5312 rm -f conftest.$ac_objext
5313 if { (eval echo "$as_me:5313: \"$ac_compile\"") >&5
5314   (eval $ac_compile) 2>&5
5315   ac_status=$?
5316   echo "$as_me:5316: \$? = $ac_status" >&5
5317   (exit $ac_status); } &&
5318          { ac_try='test -s conftest.$ac_objext'
5319   { (eval echo "$as_me:5319: \"$ac_try\"") >&5
5320   (eval $ac_try) 2>&5
5321   ac_status=$?
5322   echo "$as_me:5322: \$? = $ac_status" >&5
5323   (exit $ac_status); }; }; then
5324   cf_with_sysmouse=yes
5325 else
5326   echo "$as_me: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 cf_with_sysmouse=no
5329 fi
5330 rm -f conftest.$ac_objext conftest.$ac_ext
5331         fi
5332 echo "$as_me:5332: result: $cf_with_sysmouse" >&5
5333 echo "${ECHO_T}$cf_with_sysmouse" >&6
5334 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5335 #define USE_SYSMOUSE 1
5336 EOF
5337
5338 fi
5339
5340 if test X"$CC_G_OPT" = X"" ; then
5341         CC_G_OPT='-g'
5342         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5343 fi
5344
5345 if test X"$CXX_G_OPT" = X"" ; then
5346         CXX_G_OPT='-g'
5347         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5348 fi
5349
5350 echo "$as_me:5350: checking for default loader flags" >&5
5351 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5352 case $DFT_LWR_MODEL in
5353 libtool) LD_MODEL=''   ;;
5354 normal)  LD_MODEL=''   ;;
5355 debug)   LD_MODEL=$CC_G_OPT ;;
5356 profile) LD_MODEL='-pg';;
5357 shared)  LD_MODEL=''   ;;
5358 esac
5359 echo "$as_me:5359: result: $LD_MODEL" >&5
5360 echo "${ECHO_T}$LD_MODEL" >&6
5361
5362 case $DFT_LWR_MODEL in
5363 shared)
5364
5365 echo "$as_me:5365: checking if rpath option should be used" >&5
5366 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5367
5368 # Check whether --enable-rpath or --disable-rpath was given.
5369 if test "${enable_rpath+set}" = set; then
5370   enableval="$enable_rpath"
5371   cf_cv_enable_rpath=$enableval
5372 else
5373   cf_cv_enable_rpath=no
5374 fi;
5375 echo "$as_me:5375: result: $cf_cv_enable_rpath" >&5
5376 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5377
5378 echo "$as_me:5378: checking if shared libraries should be relinked during install" >&5
5379 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5380
5381 # Check whether --enable-relink or --disable-relink was given.
5382 if test "${enable_relink+set}" = set; then
5383   enableval="$enable_relink"
5384   cf_cv_do_relink=$enableval
5385 else
5386   cf_cv_do_relink=yes
5387 fi;
5388 echo "$as_me:5388: result: $cf_cv_do_relink" >&5
5389 echo "${ECHO_T}$cf_cv_do_relink" >&6
5390         ;;
5391 esac
5392
5393 LD_RPATH_OPT=
5394 echo "$as_me:5394: checking for an rpath option" >&5
5395 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5396 case $cf_cv_system_name in #(vi
5397 irix*) #(vi
5398         if test "$GCC" = yes; then
5399                 LD_RPATH_OPT="-Wl,-rpath,"
5400         else
5401                 LD_RPATH_OPT="-rpath "
5402         fi
5403         ;;
5404 linux*|gnu*|k*bsd*-gnu) #(vi
5405         LD_RPATH_OPT="-Wl,-rpath,"
5406         ;;
5407 openbsd[2-9].*) #(vi
5408         LD_RPATH_OPT="-Wl,-rpath,"
5409         ;;
5410 freebsd*) #(vi
5411         LD_RPATH_OPT="-rpath "
5412         ;;
5413 netbsd*) #(vi
5414         LD_RPATH_OPT="-Wl,-rpath,"
5415         ;;
5416 osf*|mls+*) #(vi
5417         LD_RPATH_OPT="-rpath "
5418         ;;
5419 solaris2*) #(vi
5420         LD_RPATH_OPT="-R"
5421         ;;
5422 *)
5423         ;;
5424 esac
5425 echo "$as_me:5425: result: $LD_RPATH_OPT" >&5
5426 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5427
5428 case "x$LD_RPATH_OPT" in #(vi
5429 x-R*)
5430         echo "$as_me:5430: checking if we need a space after rpath option" >&5
5431 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5432         cf_save_LIBS="$LIBS"
5433         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5434         cat >conftest.$ac_ext <<_ACEOF
5435 #line 5435 "configure"
5436 #include "confdefs.h"
5437
5438 int
5439 main ()
5440 {
5441
5442   ;
5443   return 0;
5444 }
5445 _ACEOF
5446 rm -f conftest.$ac_objext conftest$ac_exeext
5447 if { (eval echo "$as_me:5447: \"$ac_link\"") >&5
5448   (eval $ac_link) 2>&5
5449   ac_status=$?
5450   echo "$as_me:5450: \$? = $ac_status" >&5
5451   (exit $ac_status); } &&
5452          { ac_try='test -s conftest$ac_exeext'
5453   { (eval echo "$as_me:5453: \"$ac_try\"") >&5
5454   (eval $ac_try) 2>&5
5455   ac_status=$?
5456   echo "$as_me:5456: \$? = $ac_status" >&5
5457   (exit $ac_status); }; }; then
5458   cf_rpath_space=no
5459 else
5460   echo "$as_me: failed program was:" >&5
5461 cat conftest.$ac_ext >&5
5462 cf_rpath_space=yes
5463 fi
5464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5465         LIBS="$cf_save_LIBS"
5466         echo "$as_me:5466: result: $cf_rpath_space" >&5
5467 echo "${ECHO_T}$cf_rpath_space" >&6
5468         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5469         ;;
5470 esac
5471
5472         LOCAL_LDFLAGS=
5473         LOCAL_LDFLAGS2=
5474         LD_SHARED_OPTS=
5475         INSTALL_LIB="-m 644"
5476
5477         cf_cv_do_symlinks=no
5478         cf_ld_rpath_opt=
5479         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5480
5481         echo "$as_me:5481: checking if release/abi version should be used for shared libs" >&5
5482 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5483
5484 # Check whether --with-shlib-version or --without-shlib-version was given.
5485 if test "${with_shlib_version+set}" = set; then
5486   withval="$with_shlib_version"
5487   test -z "$withval" && withval=auto
5488         case $withval in #(vi
5489         yes) #(vi
5490                 cf_cv_shlib_version=auto
5491                 ;;
5492         rel|abi|auto|no) #(vi
5493                 cf_cv_shlib_version=$withval
5494                 ;;
5495         *)
5496                 { { echo "$as_me:5496: error: option value must be one of: rel, abi, auto or no" >&5
5497 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5498    { (exit 1); exit 1; }; }
5499                 ;;
5500         esac
5501
5502 else
5503   cf_cv_shlib_version=auto
5504 fi;
5505         echo "$as_me:5505: result: $cf_cv_shlib_version" >&5
5506 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5507
5508         cf_cv_rm_so_locs=no
5509
5510         # Some less-capable ports of gcc support only -fpic
5511         CC_SHARED_OPTS=
5512         if test "$GCC" = yes
5513         then
5514                 echo "$as_me:5514: checking which $CC option to use" >&5
5515 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5516                 cf_save_CFLAGS="$CFLAGS"
5517                 for CC_SHARED_OPTS in -fPIC -fpic ''
5518                 do
5519                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5520                         cat >conftest.$ac_ext <<_ACEOF
5521 #line 5521 "configure"
5522 #include "confdefs.h"
5523 #include <stdio.h>
5524 int
5525 main ()
5526 {
5527 int x = 1
5528   ;
5529   return 0;
5530 }
5531 _ACEOF
5532 rm -f conftest.$ac_objext
5533 if { (eval echo "$as_me:5533: \"$ac_compile\"") >&5
5534   (eval $ac_compile) 2>&5
5535   ac_status=$?
5536   echo "$as_me:5536: \$? = $ac_status" >&5
5537   (exit $ac_status); } &&
5538          { ac_try='test -s conftest.$ac_objext'
5539   { (eval echo "$as_me:5539: \"$ac_try\"") >&5
5540   (eval $ac_try) 2>&5
5541   ac_status=$?
5542   echo "$as_me:5542: \$? = $ac_status" >&5
5543   (exit $ac_status); }; }; then
5544   break
5545 else
5546   echo "$as_me: failed program was:" >&5
5547 cat conftest.$ac_ext >&5
5548 fi
5549 rm -f conftest.$ac_objext conftest.$ac_ext
5550                 done
5551                 echo "$as_me:5551: result: $CC_SHARED_OPTS" >&5
5552 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5553                 CFLAGS="$cf_save_CFLAGS"
5554         fi
5555
5556         cf_cv_shlib_version_infix=no
5557
5558         case $cf_cv_system_name in #(vi
5559         aix[56]*) #(vi
5560                 if test "$GCC" = yes; then
5561                         CC_SHARED_OPTS=
5562                         MK_SHARED_LIB='$(CC) -shared'
5563                 fi
5564                 ;;
5565         beos*) #(vi
5566                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5567                 ;;
5568         cygwin*) #(vi
5569                 CC_SHARED_OPTS=
5570                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5571                 cf_cv_shlib_version=cygdll
5572                 cf_cv_shlib_version_infix=cygdll
5573                 cat >mk_shared_lib.sh <<-CF_EOF
5574                 #!/bin/sh
5575                 SHARED_LIB=\$1
5576                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5577                 shift
5578                 cat <<-EOF
5579                 Linking shared library
5580                 ** SHARED_LIB \$SHARED_LIB
5581                 ** IMPORT_LIB \$IMPORT_LIB
5582 EOF
5583                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5584 CF_EOF
5585                 chmod +x mk_shared_lib.sh
5586                 ;;
5587         darwin*) #(vi
5588                 EXTRA_CFLAGS="-no-cpp-precomp"
5589                 CC_SHARED_OPTS="-dynamic"
5590                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5591                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5592                 cf_cv_shlib_version_infix=yes
5593                 echo "$as_me:5593: checking if ld -search_paths_first works" >&5
5594 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5595 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5596   echo $ECHO_N "(cached) $ECHO_C" >&6
5597 else
5598
5599                         cf_save_LDFLAGS=$LDFLAGS
5600                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5601                         cat >conftest.$ac_ext <<_ACEOF
5602 #line 5602 "configure"
5603 #include "confdefs.h"
5604
5605 int
5606 main ()
5607 {
5608 int i;
5609   ;
5610   return 0;
5611 }
5612 _ACEOF
5613 rm -f conftest.$ac_objext conftest$ac_exeext
5614 if { (eval echo "$as_me:5614: \"$ac_link\"") >&5
5615   (eval $ac_link) 2>&5
5616   ac_status=$?
5617   echo "$as_me:5617: \$? = $ac_status" >&5
5618   (exit $ac_status); } &&
5619          { ac_try='test -s conftest$ac_exeext'
5620   { (eval echo "$as_me:5620: \"$ac_try\"") >&5
5621   (eval $ac_try) 2>&5
5622   ac_status=$?
5623   echo "$as_me:5623: \$? = $ac_status" >&5
5624   (exit $ac_status); }; }; then
5625   cf_cv_ldflags_search_paths_first=yes
5626 else
5627   echo "$as_me: failed program was:" >&5
5628 cat conftest.$ac_ext >&5
5629 cf_cv_ldflags_search_paths_first=no
5630 fi
5631 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5632                                 LDFLAGS=$cf_save_LDFLAGS
5633 fi
5634 echo "$as_me:5634: result: $cf_cv_ldflags_search_paths_first" >&5
5635 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5636                 if test $cf_cv_ldflags_search_paths_first = yes; then
5637                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5638                 fi
5639                 ;;
5640         hpux*) #(vi
5641                 # (tested with gcc 2.7.2 -- I don't have c89)
5642                 if test "$GCC" = yes; then
5643                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5644                 else
5645                         CC_SHARED_OPTS='+Z'
5646                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5647                 fi
5648                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5649                 # HP-UX shared libraries must be executable, and should be
5650                 # readonly to exploit a quirk in the memory manager.
5651                 INSTALL_LIB="-m 555"
5652                 ;;
5653         interix*)
5654                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5655                 if test "$cf_cv_shlib_version" = rel; then
5656                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5657                 else
5658                         cf_shared_soname='`basename `'
5659                 fi
5660                 CC_SHARED_OPTS=
5661                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${libdir} -Wl,-h,'$cf_shared_soname' -o '
5662                 ;;
5663         irix*) #(vi
5664                 if test "$cf_cv_enable_rpath" = yes ; then
5665                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5666                 fi
5667                 # tested with IRIX 5.2 and 'cc'.
5668                 if test "$GCC" != yes; then
5669                         CC_SHARED_OPTS='-KPIC'
5670                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5671                 else
5672                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5673                 fi
5674                 cf_cv_rm_so_locs=yes
5675                 ;;
5676         linux*|gnu*|k*bsd*-gnu) #(vi
5677                 if test "$DFT_LWR_MODEL" = "shared" ; then
5678                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5679                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5680                 fi
5681                 if test "$cf_cv_enable_rpath" = yes ; then
5682                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5683                 fi
5684
5685         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5686         if test "$cf_cv_shlib_version" = rel; then
5687                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5688         else
5689                 cf_cv_shared_soname='`basename $@`'
5690         fi
5691
5692                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5693                 ;;
5694         openbsd[2-9].*) #(vi
5695                 if test "$DFT_LWR_MODEL" = "shared" ; then
5696                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5697                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5698                 fi
5699                 if test "$cf_cv_enable_rpath" = yes ; then
5700                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5701                 fi
5702                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5703
5704         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5705         if test "$cf_cv_shlib_version" = rel; then
5706                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5707         else
5708                 cf_cv_shared_soname='`basename $@`'
5709         fi
5710
5711                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5712                 ;;
5713         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5714                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5715                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5716                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5717                 ;;
5718         freebsd*) #(vi
5719                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5720                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5721                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5722                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5723                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5724                 fi
5725
5726         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5727         if test "$cf_cv_shlib_version" = rel; then
5728                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5729         else
5730                 cf_cv_shared_soname='`basename $@`'
5731         fi
5732
5733                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5734                 ;;
5735         netbsd*) #(vi
5736                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5737                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5738                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5739                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5740                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5741                         if test "$cf_cv_shlib_version" = auto; then
5742                         if test -f /usr/libexec/ld.elf_so; then
5743                                 cf_cv_shlib_version=abi
5744                         else
5745                                 cf_cv_shlib_version=rel
5746                         fi
5747                         fi
5748
5749         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5750         if test "$cf_cv_shlib_version" = rel; then
5751                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5752         else
5753                 cf_cv_shared_soname='`basename $@`'
5754         fi
5755
5756                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5757                 else
5758                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5759                 fi
5760                 ;;
5761         osf*|mls+*) #(vi
5762                 # tested with OSF/1 V3.2 and 'cc'
5763                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5764                 # link with shared libs).
5765                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5766                 case $host_os in #(vi
5767                 osf4*)
5768                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5769                         ;;
5770                 esac
5771                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5772                 if test "$DFT_LWR_MODEL" = "shared" ; then
5773                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5774                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5775                 fi
5776                 cf_cv_rm_so_locs=yes
5777                 ;;
5778         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5779                 # tested with osr5.0.5
5780                 if test "$GCC" != yes; then
5781                         CC_SHARED_OPTS='-belf -KPIC'
5782                 fi
5783                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5784                 if test "$cf_cv_enable_rpath" = yes ; then
5785                         # only way is to set LD_RUN_PATH but no switch for it
5786                         RUN_PATH=$libdir
5787                 fi
5788                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5789                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5790                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5791                 ;;
5792         sunos4*) #(vi
5793                 # tested with SunOS 4.1.1 and gcc 2.7.0
5794                 if test "$GCC" != yes; then
5795                         CC_SHARED_OPTS='-KPIC'
5796                 fi
5797                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5798                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5799                 ;;
5800         solaris2*) #(vi
5801                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5802                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5803                 if test "$DFT_LWR_MODEL" = "shared" ; then
5804                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5805                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5806                 fi
5807                 if test "$cf_cv_enable_rpath" = yes ; then
5808                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5809                 fi
5810
5811         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5812         if test "$cf_cv_shlib_version" = rel; then
5813                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5814         else
5815                 cf_cv_shared_soname='`basename $@`'
5816         fi
5817
5818                 if test "$GCC" != yes; then
5819                         cf_save_CFLAGS="$CFLAGS"
5820                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5821                         do
5822                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5823                                 cat >conftest.$ac_ext <<_ACEOF
5824 #line 5824 "configure"
5825 #include "confdefs.h"
5826 #include <stdio.h>
5827 int
5828 main ()
5829 {
5830 printf("Hello\n");
5831   ;
5832   return 0;
5833 }
5834 _ACEOF
5835 rm -f conftest.$ac_objext
5836 if { (eval echo "$as_me:5836: \"$ac_compile\"") >&5
5837   (eval $ac_compile) 2>&5
5838   ac_status=$?
5839   echo "$as_me:5839: \$? = $ac_status" >&5
5840   (exit $ac_status); } &&
5841          { ac_try='test -s conftest.$ac_objext'
5842   { (eval echo "$as_me:5842: \"$ac_try\"") >&5
5843   (eval $ac_try) 2>&5
5844   ac_status=$?
5845   echo "$as_me:5845: \$? = $ac_status" >&5
5846   (exit $ac_status); }; }; then
5847   break
5848 else
5849   echo "$as_me: failed program was:" >&5
5850 cat conftest.$ac_ext >&5
5851 fi
5852 rm -f conftest.$ac_objext conftest.$ac_ext
5853                         done
5854                         CFLAGS="$cf_save_CFLAGS"
5855                         CC_SHARED_OPTS=$cf_shared_opts
5856                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5857                 else
5858                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5859                 fi
5860                 ;;
5861         sysv5uw7*|unix_sv*) #(vi
5862                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5863                 if test "$GCC" != yes; then
5864                         CC_SHARED_OPTS='-KPIC'
5865                 fi
5866                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5867                 ;;
5868         *)
5869                 CC_SHARED_OPTS='unknown'
5870                 MK_SHARED_LIB='echo unknown'
5871                 ;;
5872         esac
5873
5874         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5875         case "$cf_cv_shlib_version" in #(vi
5876         rel|abi)
5877                 case "$MK_SHARED_LIB" in #(vi
5878                 *'-o $@') #(vi
5879                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5880                         ;;
5881                 *)
5882                         { echo "$as_me:5882: WARNING: ignored --with-shlib-version" >&5
5883 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5884                         ;;
5885                 esac
5886                 ;;
5887         esac
5888
5889         if test -n "$cf_ld_rpath_opt" ; then
5890                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5891         fi
5892
5893 if test "$CC_SHARED_OPTS" = "unknown"; then
5894         for model in $cf_list_models; do
5895                 if test "$model" = "shared"; then
5896                         { { echo "$as_me:5896: error: Shared libraries are not supported in this version" >&5
5897 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5898    { (exit 1); exit 1; }; }
5899                 fi
5900         done
5901 fi
5902
5903 ### If we're building with rpath, try to link non-standard libs that way too.
5904 if test "$DFT_LWR_MODEL" = "shared"; then
5905
5906 echo "$as_me:5906: checking if rpath-hack should be disabled" >&5
5907 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5908
5909 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5910 if test "${enable_rpath_hack+set}" = set; then
5911   enableval="$enable_rpath_hack"
5912   test "$enableval" != no && enableval=yes
5913   if test "$enableval" != "yes" ; then
5914     cf_disable_rpath_hack=yes
5915   else
5916     cf_disable_rpath_hack=no
5917   fi
5918 else
5919   enableval=yes
5920   cf_disable_rpath_hack=no
5921
5922 fi;
5923 echo "$as_me:5923: result: $cf_disable_rpath_hack" >&5
5924 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5925 if test "$cf_disable_rpath_hack" = no ; then
5926
5927 echo "$as_me:5927: checking for updated LDFLAGS" >&5
5928 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5929 if test -n "$LD_RPATH_OPT" ; then
5930         echo "$as_me:5930: result: maybe" >&5
5931 echo "${ECHO_T}maybe" >&6
5932
5933         for ac_prog in ldd
5934 do
5935   # Extract the first word of "$ac_prog", so it can be a program name with args.
5936 set dummy $ac_prog; ac_word=$2
5937 echo "$as_me:5937: checking for $ac_word" >&5
5938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5939 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5940   echo $ECHO_N "(cached) $ECHO_C" >&6
5941 else
5942   if test -n "$cf_ldd_prog"; then
5943   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5944 else
5945   ac_save_IFS=$IFS; IFS=$ac_path_separator
5946 ac_dummy="$PATH"
5947 for ac_dir in $ac_dummy; do
5948   IFS=$ac_save_IFS
5949   test -z "$ac_dir" && ac_dir=.
5950   $as_executable_p "$ac_dir/$ac_word" || continue
5951 ac_cv_prog_cf_ldd_prog="$ac_prog"
5952 echo "$as_me:5952: found $ac_dir/$ac_word" >&5
5953 break
5954 done
5955
5956 fi
5957 fi
5958 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5959 if test -n "$cf_ldd_prog"; then
5960   echo "$as_me:5960: result: $cf_ldd_prog" >&5
5961 echo "${ECHO_T}$cf_ldd_prog" >&6
5962 else
5963   echo "$as_me:5963: result: no" >&5
5964 echo "${ECHO_T}no" >&6
5965 fi
5966
5967   test -n "$cf_ldd_prog" && break
5968 done
5969 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5970
5971         cf_rpath_list="/usr/lib /lib"
5972         if test "$cf_ldd_prog" != no
5973         then
5974                 cf_rpath_oops=
5975
5976 cat >conftest.$ac_ext <<_ACEOF
5977 #line 5977 "configure"
5978 #include "confdefs.h"
5979 #include <stdio.h>
5980 int
5981 main ()
5982 {
5983 printf("Hello");
5984   ;
5985   return 0;
5986 }
5987 _ACEOF
5988 rm -f conftest.$ac_objext conftest$ac_exeext
5989 if { (eval echo "$as_me:5989: \"$ac_link\"") >&5
5990   (eval $ac_link) 2>&5
5991   ac_status=$?
5992   echo "$as_me:5992: \$? = $ac_status" >&5
5993   (exit $ac_status); } &&
5994          { ac_try='test -s conftest$ac_exeext'
5995   { (eval echo "$as_me:5995: \"$ac_try\"") >&5
5996   (eval $ac_try) 2>&5
5997   ac_status=$?
5998   echo "$as_me:5998: \$? = $ac_status" >&5
5999   (exit $ac_status); }; }; then
6000   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6001                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6002 else
6003   echo "$as_me: failed program was:" >&5
6004 cat conftest.$ac_ext >&5
6005 fi
6006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6007
6008                 # If we passed the link-test, but get a "not found" on a given library,
6009                 # this could be due to inept reconfiguration of gcc to make it only
6010                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6011                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6012                 # /usr/local libraries.
6013                 if test -n "$cf_rpath_oops"
6014                 then
6015                         for cf_rpath_src in $cf_rpath_oops
6016                         do
6017                                 for cf_rpath_dir in \
6018                                         /usr/local \
6019                                         /usr/pkg \
6020                                         /opt/sfw
6021                                 do
6022                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6023                                         then
6024                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6025
6026 echo "${as_me:-configure}:6026: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6027
6028                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6029                                                 break
6030                                         fi
6031                                 done
6032                         done
6033                 fi
6034         fi
6035
6036         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6037
6038 echo "${as_me:-configure}:6038: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6039
6040 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6041
6042 echo "${as_me:-configure}:6042: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6043
6044 cf_rpath_dst=
6045 for cf_rpath_src in $LDFLAGS
6046 do
6047         case $cf_rpath_src in #(vi
6048         -L*) #(vi
6049
6050                 # check if this refers to a directory which we will ignore
6051                 cf_rpath_skip=no
6052                 if test -n "$cf_rpath_list"
6053                 then
6054                         for cf_rpath_item in $cf_rpath_list
6055                         do
6056                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6057                                 then
6058                                         cf_rpath_skip=yes
6059                                         break
6060                                 fi
6061                         done
6062                 fi
6063
6064                 if test "$cf_rpath_skip" = no
6065                 then
6066                         # transform the option
6067                         if test "$LD_RPATH_OPT" = "-R " ; then
6068                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6069                         else
6070                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6071                         fi
6072
6073                         # if we have not already added this, add it now
6074                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6075                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6076                         then
6077                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6078
6079 echo "${as_me:-configure}:6079: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6080
6081                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6082                         fi
6083                 fi
6084                 ;;
6085         esac
6086         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6087 done
6088 LDFLAGS=$cf_rpath_dst
6089
6090 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6091
6092 echo "${as_me:-configure}:6092: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6093
6094 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6095
6096 echo "${as_me:-configure}:6096: testing ...checking LIBS $LIBS ..." 1>&5
6097
6098 cf_rpath_dst=
6099 for cf_rpath_src in $LIBS
6100 do
6101         case $cf_rpath_src in #(vi
6102         -L*) #(vi
6103
6104                 # check if this refers to a directory which we will ignore
6105                 cf_rpath_skip=no
6106                 if test -n "$cf_rpath_list"
6107                 then
6108                         for cf_rpath_item in $cf_rpath_list
6109                         do
6110                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6111                                 then
6112                                         cf_rpath_skip=yes
6113                                         break
6114                                 fi
6115                         done
6116                 fi
6117
6118                 if test "$cf_rpath_skip" = no
6119                 then
6120                         # transform the option
6121                         if test "$LD_RPATH_OPT" = "-R " ; then
6122                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6123                         else
6124                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6125                         fi
6126
6127                         # if we have not already added this, add it now
6128                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6129                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6130                         then
6131                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6132
6133 echo "${as_me:-configure}:6133: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6134
6135                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6136                         fi
6137                 fi
6138                 ;;
6139         esac
6140         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6141 done
6142 LIBS=$cf_rpath_dst
6143
6144 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6145
6146 echo "${as_me:-configure}:6146: testing ...checked LIBS $LIBS ..." 1>&5
6147
6148         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6149
6150 echo "${as_me:-configure}:6150: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6151
6152 fi
6153
6154 fi
6155
6156 fi
6157
6158 ###############################################################################
6159
6160 ###     use option --disable-overwrite to leave out the link to -lcurses
6161 echo "$as_me:6161: checking if you wish to install ncurses overwriting curses" >&5
6162 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6163
6164 # Check whether --enable-overwrite or --disable-overwrite was given.
6165 if test "${enable_overwrite+set}" = set; then
6166   enableval="$enable_overwrite"
6167   with_overwrite=$enableval
6168 else
6169   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6170 fi;
6171 echo "$as_me:6171: result: $with_overwrite" >&5
6172 echo "${ECHO_T}$with_overwrite" >&6
6173
6174 echo "$as_me:6174: checking if external terminfo-database is used" >&5
6175 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6176
6177 # Check whether --enable-database or --disable-database was given.
6178 if test "${enable_database+set}" = set; then
6179   enableval="$enable_database"
6180   use_database=$enableval
6181 else
6182   use_database=yes
6183 fi;
6184 echo "$as_me:6184: result: $use_database" >&5
6185 echo "${ECHO_T}$use_database" >&6
6186
6187 case $host_os in #(vi
6188 os2*) #(vi
6189         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6190         ;;
6191 *) #(vi
6192         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6193         ;;
6194 esac
6195
6196         case $cf_cv_system_name in
6197         os2*)   PATH_SEPARATOR=';'  ;;
6198         *)      PATH_SEPARATOR=':'  ;;
6199         esac
6200
6201 if test "$use_database" != no ; then
6202         cat >>confdefs.h <<\EOF
6203 #define USE_DATABASE 1
6204 EOF
6205
6206         echo "$as_me:6206: checking which terminfo source-file will be installed" >&5
6207 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6208
6209 # Check whether --with-database or --without-database was given.
6210 if test "${with_database+set}" = set; then
6211   withval="$with_database"
6212   TERMINFO_SRC=$withval
6213 fi;
6214         echo "$as_me:6214: result: $TERMINFO_SRC" >&5
6215 echo "${ECHO_T}$TERMINFO_SRC" >&6
6216
6217         echo "$as_me:6217: checking whether to use hashed database instead of directory/tree" >&5
6218 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6219
6220 # Check whether --with-hashed-db or --without-hashed-db was given.
6221 if test "${with_hashed_db+set}" = set; then
6222   withval="$with_hashed_db"
6223
6224 else
6225   with_hashed_db=no
6226 fi;
6227         echo "$as_me:6227: result: $with_hashed_db" >&5
6228 echo "${ECHO_T}$with_hashed_db" >&6
6229 else
6230         with_hashed_db=no
6231 fi
6232
6233 echo "$as_me:6233: checking for list of fallback descriptions" >&5
6234 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6235
6236 # Check whether --with-fallbacks or --without-fallbacks was given.
6237 if test "${with_fallbacks+set}" = set; then
6238   withval="$with_fallbacks"
6239   with_fallback=$withval
6240 else
6241   with_fallback=
6242 fi;
6243 echo "$as_me:6243: result: $with_fallback" >&5
6244 echo "${ECHO_T}$with_fallback" >&6
6245 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6246
6247 echo "$as_me:6247: checking if you want modern xterm or antique" >&5
6248 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6249
6250 # Check whether --with-xterm-new or --without-xterm-new was given.
6251 if test "${with_xterm_new+set}" = set; then
6252   withval="$with_xterm_new"
6253   with_xterm_new=$withval
6254 else
6255   with_xterm_new=yes
6256 fi;
6257 case $with_xterm_new in
6258 no)     with_xterm_new=xterm-old;;
6259 *)      with_xterm_new=xterm-new;;
6260 esac
6261 echo "$as_me:6261: result: $with_xterm_new" >&5
6262 echo "${ECHO_T}$with_xterm_new" >&6
6263 WHICH_XTERM=$with_xterm_new
6264
6265 MAKE_TERMINFO=
6266 if test "$use_database" = no ; then
6267         TERMINFO="${datadir}/terminfo"
6268         MAKE_TERMINFO="#"
6269 else
6270
6271 echo "$as_me:6271: checking for list of terminfo directories" >&5
6272 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6273
6274 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6275 if test "${with_terminfo_dirs+set}" = set; then
6276   withval="$with_terminfo_dirs"
6277
6278 else
6279   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6280 fi;
6281 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6282 cf_dst_path=
6283 for cf_src_path in $withval
6284 do
6285
6286 if test "x$prefix" != xNONE; then
6287   cf_path_syntax="$prefix"
6288 else
6289   cf_path_syntax="$ac_default_prefix"
6290 fi
6291
6292 case ".$cf_src_path" in #(vi
6293 .\$\(*\)*|.\'*\'*) #(vi
6294   ;;
6295 ..|./*|.\\*) #(vi
6296   ;;
6297 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6298   ;;
6299 .\${*prefix}*) #(vi
6300   eval cf_src_path="$cf_src_path"
6301   case ".$cf_src_path" in #(vi
6302   .NONE/*)
6303     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6304     ;;
6305   esac
6306   ;; #(vi
6307 .no|.NONE/*)
6308   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6309   ;;
6310 *)
6311   { { echo "$as_me:6311: error: expected a pathname, not \"$cf_src_path\"" >&5
6312 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6313    { (exit 1); exit 1; }; }
6314   ;;
6315 esac
6316
6317   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6318   cf_dst_path="${cf_dst_path}${cf_src_path}"
6319 done
6320 IFS="$ac_save_ifs"
6321
6322 eval 'TERMINFO_DIRS="$cf_dst_path"'
6323
6324 echo "$as_me:6324: result: $TERMINFO_DIRS" >&5
6325 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6326 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6327 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6328 EOF
6329
6330 echo "$as_me:6330: checking for default terminfo directory" >&5
6331 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6332
6333 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6334 if test "${with_default_terminfo_dir+set}" = set; then
6335   withval="$with_default_terminfo_dir"
6336
6337 else
6338   withval="${TERMINFO:-${datadir}/terminfo}"
6339 fi; if test -n "${datadir}/terminfo" ; then
6340
6341 if test "x$prefix" != xNONE; then
6342   cf_path_syntax="$prefix"
6343 else
6344   cf_path_syntax="$ac_default_prefix"
6345 fi
6346
6347 case ".$withval" in #(vi
6348 .\$\(*\)*|.\'*\'*) #(vi
6349   ;;
6350 ..|./*|.\\*) #(vi
6351   ;;
6352 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6353   ;;
6354 .\${*prefix}*) #(vi
6355   eval withval="$withval"
6356   case ".$withval" in #(vi
6357   .NONE/*)
6358     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6359     ;;
6360   esac
6361   ;; #(vi
6362 .no|.NONE/*)
6363   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6364   ;;
6365 *)
6366   { { echo "$as_me:6366: error: expected a pathname, not \"$withval\"" >&5
6367 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6368    { (exit 1); exit 1; }; }
6369   ;;
6370 esac
6371
6372 fi
6373 TERMINFO="$withval"
6374
6375 echo "$as_me:6375: result: $TERMINFO" >&5
6376 echo "${ECHO_T}$TERMINFO" >&6
6377 cat >>confdefs.h <<EOF
6378 #define TERMINFO "$TERMINFO"
6379 EOF
6380
6381 fi
6382
6383 ###     use option --disable-big-core to make tic run on small machines
6384 ###     We need 4Mb, check if we can allocate 50% more than that.
6385 echo "$as_me:6385: checking if big-core option selected" >&5
6386 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6387
6388 # Check whether --enable-big-core or --disable-big-core was given.
6389 if test "${enable_big_core+set}" = set; then
6390   enableval="$enable_big_core"
6391   with_big_core=$enableval
6392 else
6393   if test "$cross_compiling" = yes; then
6394   with_big_core=no
6395 else
6396   cat >conftest.$ac_ext <<_ACEOF
6397 #line 6397 "configure"
6398 #include "confdefs.h"
6399
6400 #include <stdlib.h>
6401 #include <string.h>
6402 int main() {
6403         unsigned long n = 6000000L;
6404         char *s = malloc(n);
6405         if (s != 0)
6406                 s[0] = s[n-1] = 0;
6407         ${cf_cv_main_return:-return}(s == 0);
6408 }
6409 _ACEOF
6410 rm -f conftest$ac_exeext
6411 if { (eval echo "$as_me:6411: \"$ac_link\"") >&5
6412   (eval $ac_link) 2>&5
6413   ac_status=$?
6414   echo "$as_me:6414: \$? = $ac_status" >&5
6415   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6416   { (eval echo "$as_me:6416: \"$ac_try\"") >&5
6417   (eval $ac_try) 2>&5
6418   ac_status=$?
6419   echo "$as_me:6419: \$? = $ac_status" >&5
6420   (exit $ac_status); }; }; then
6421   with_big_core=yes
6422 else
6423   echo "$as_me: program exited with status $ac_status" >&5
6424 echo "$as_me: failed program was:" >&5
6425 cat conftest.$ac_ext >&5
6426 with_big_core=no
6427 fi
6428 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6429 fi
6430 fi;
6431 echo "$as_me:6431: result: $with_big_core" >&5
6432 echo "${ECHO_T}$with_big_core" >&6
6433 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6434 #define HAVE_BIG_CORE 1
6435 EOF
6436
6437 ### ISO C only guarantees 512-char strings, we have tables which load faster
6438 ### when constructed using "big" strings.  More than the C compiler, the awk
6439 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6440 echo "$as_me:6440: checking if big-strings option selected" >&5
6441 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6442
6443 # Check whether --enable-big-strings or --disable-big-strings was given.
6444 if test "${enable_big_strings+set}" = set; then
6445   enableval="$enable_big_strings"
6446   with_big_strings=$enableval
6447 else
6448
6449         case x$AWK in #(vi
6450         x)
6451                 eval with_big_strings=no
6452                 ;;
6453         *) #(vi
6454                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6455                         | $AWK '{ printf "%d\n", length($0); }' | $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
6456                         eval with_big_strings=yes
6457                 else
6458                         eval with_big_strings=no
6459                 fi
6460                 ;;
6461         esac
6462
6463 fi;
6464 echo "$as_me:6464: result: $with_big_strings" >&5
6465 echo "${ECHO_T}$with_big_strings" >&6
6466
6467 USE_BIG_STRINGS=0
6468 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6469
6470 ###     use option --enable-termcap to compile in the termcap fallback support
6471 echo "$as_me:6471: checking if you want termcap-fallback support" >&5
6472 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6473
6474 # Check whether --enable-termcap or --disable-termcap was given.
6475 if test "${enable_termcap+set}" = set; then
6476   enableval="$enable_termcap"
6477   with_termcap=$enableval
6478 else
6479   with_termcap=no
6480 fi;
6481 echo "$as_me:6481: result: $with_termcap" >&5
6482 echo "${ECHO_T}$with_termcap" >&6
6483
6484 if test "$with_termcap" != "yes" ; then
6485         if test "$use_database" = no ; then
6486                 if test -z "$with_fallback" ; then
6487                         { { echo "$as_me:6487: error: You have disabled the database w/o specifying fallbacks" >&5
6488 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6489    { (exit 1); exit 1; }; }
6490                 fi
6491         fi
6492         cat >>confdefs.h <<\EOF
6493 #define PURE_TERMINFO 1
6494 EOF
6495
6496 else
6497
6498 if test "$with_ticlib" != no ; then
6499         { { echo "$as_me:6499: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6500 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6501    { (exit 1); exit 1; }; }
6502 fi
6503
6504 cat >>confdefs.h <<\EOF
6505 #define USE_TERMCAP 1
6506 EOF
6507
6508 echo "$as_me:6508: checking for list of termcap files" >&5
6509 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6510
6511 # Check whether --with-termpath or --without-termpath was given.
6512 if test "${with_termpath+set}" = set; then
6513   withval="$with_termpath"
6514
6515 else
6516   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6517 fi;
6518 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6519 cf_dst_path=
6520 for cf_src_path in $withval
6521 do
6522
6523 if test "x$prefix" != xNONE; then
6524   cf_path_syntax="$prefix"
6525 else
6526   cf_path_syntax="$ac_default_prefix"
6527 fi
6528
6529 case ".$cf_src_path" in #(vi
6530 .\$\(*\)*|.\'*\'*) #(vi
6531   ;;
6532 ..|./*|.\\*) #(vi
6533   ;;
6534 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6535   ;;
6536 .\${*prefix}*) #(vi
6537   eval cf_src_path="$cf_src_path"
6538   case ".$cf_src_path" in #(vi
6539   .NONE/*)
6540     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6541     ;;
6542   esac
6543   ;; #(vi
6544 .no|.NONE/*)
6545   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6546   ;;
6547 *)
6548   { { echo "$as_me:6548: error: expected a pathname, not \"$cf_src_path\"" >&5
6549 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6550    { (exit 1); exit 1; }; }
6551   ;;
6552 esac
6553
6554   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6555   cf_dst_path="${cf_dst_path}${cf_src_path}"
6556 done
6557 IFS="$ac_save_ifs"
6558
6559 eval 'TERMPATH="$cf_dst_path"'
6560
6561 echo "$as_me:6561: result: $TERMPATH" >&5
6562 echo "${ECHO_T}$TERMPATH" >&6
6563 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6564 #define TERMPATH "$TERMPATH"
6565 EOF
6566
6567 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6568 echo "$as_me:6568: checking if fast termcap-loader is needed" >&5
6569 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6570
6571 # Check whether --enable-getcap or --disable-getcap was given.
6572 if test "${enable_getcap+set}" = set; then
6573   enableval="$enable_getcap"
6574   with_getcap=$enableval
6575 else
6576   with_getcap=no
6577 fi;
6578 echo "$as_me:6578: result: $with_getcap" >&5
6579 echo "${ECHO_T}$with_getcap" >&6
6580 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6581 #define USE_GETCAP 1
6582 EOF
6583
6584 echo "$as_me:6584: checking if translated termcaps will be cached in ~/.terminfo" >&5
6585 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6586
6587 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6588 if test "${enable_getcap_cache+set}" = set; then
6589   enableval="$enable_getcap_cache"
6590   with_getcap_cache=$enableval
6591 else
6592   with_getcap_cache=no
6593 fi;
6594 echo "$as_me:6594: result: $with_getcap_cache" >&5
6595 echo "${ECHO_T}$with_getcap_cache" >&6
6596 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6597 #define USE_GETCAP_CACHE 1
6598 EOF
6599
6600 fi
6601
6602 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6603 echo "$as_me:6603: checking if ~/.terminfo is wanted" >&5
6604 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6605
6606 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6607 if test "${enable_home_terminfo+set}" = set; then
6608   enableval="$enable_home_terminfo"
6609   with_home_terminfo=$enableval
6610 else
6611   with_home_terminfo=yes
6612 fi;
6613 echo "$as_me:6613: result: $with_home_terminfo" >&5
6614 echo "${ECHO_T}$with_home_terminfo" >&6
6615 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6616 #define USE_HOME_TERMINFO 1
6617 EOF
6618
6619 echo "$as_me:6619: checking if you want to use restricted environment when running as root" >&5
6620 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6621
6622 # Check whether --enable-root-environ or --disable-root-environ was given.
6623 if test "${enable_root_environ+set}" = set; then
6624   enableval="$enable_root_environ"
6625   with_root_environ=$enableval
6626 else
6627   with_root_environ=yes
6628 fi;
6629 echo "$as_me:6629: result: $with_root_environ" >&5
6630 echo "${ECHO_T}$with_root_environ" >&6
6631 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6632 #define USE_ROOT_ENVIRON 1
6633 EOF
6634
6635 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6636 ###   to reduce storage requirements for the terminfo database.
6637
6638 for ac_func in \
6639         remove \
6640         unlink
6641 do
6642 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6643 echo "$as_me:6643: checking for $ac_func" >&5
6644 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6645 if eval "test \"\${$as_ac_var+set}\" = set"; then
6646   echo $ECHO_N "(cached) $ECHO_C" >&6
6647 else
6648   cat >conftest.$ac_ext <<_ACEOF
6649 #line 6649 "configure"
6650 #include "confdefs.h"
6651 /* System header to define __stub macros and hopefully few prototypes,
6652     which can conflict with char $ac_func (); below.  */
6653 #include <assert.h>
6654 /* Override any gcc2 internal prototype to avoid an error.  */
6655 #ifdef __cplusplus
6656 extern "C"
6657 #endif
6658 /* We use char because int might match the return type of a gcc2
6659    builtin and then its argument prototype would still apply.  */
6660 char $ac_func ();
6661 char (*f) ();
6662
6663 int
6664 main ()
6665 {
6666 /* The GNU C library defines this for functions which it implements
6667     to always fail with ENOSYS.  Some functions are actually named
6668     something starting with __ and the normal name is an alias.  */
6669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6670 choke me
6671 #else
6672 f = $ac_func;
6673 #endif
6674
6675   ;
6676   return 0;
6677 }
6678 _ACEOF
6679 rm -f conftest.$ac_objext conftest$ac_exeext
6680 if { (eval echo "$as_me:6680: \"$ac_link\"") >&5
6681   (eval $ac_link) 2>&5
6682   ac_status=$?
6683   echo "$as_me:6683: \$? = $ac_status" >&5
6684   (exit $ac_status); } &&
6685          { ac_try='test -s conftest$ac_exeext'
6686   { (eval echo "$as_me:6686: \"$ac_try\"") >&5
6687   (eval $ac_try) 2>&5
6688   ac_status=$?
6689   echo "$as_me:6689: \$? = $ac_status" >&5
6690   (exit $ac_status); }; }; then
6691   eval "$as_ac_var=yes"
6692 else
6693   echo "$as_me: failed program was:" >&5
6694 cat conftest.$ac_ext >&5
6695 eval "$as_ac_var=no"
6696 fi
6697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6698 fi
6699 echo "$as_me:6699: result: `eval echo '${'$as_ac_var'}'`" >&5
6700 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6701 if test `eval echo '${'$as_ac_var'}'` = yes; then
6702   cat >>confdefs.h <<EOF
6703 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6704 EOF
6705
6706 fi
6707 done
6708
6709 if test "$cross_compiling" = yes ; then
6710
6711 for ac_func in \
6712                 link \
6713                 symlink
6714 do
6715 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6716 echo "$as_me:6716: checking for $ac_func" >&5
6717 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6718 if eval "test \"\${$as_ac_var+set}\" = set"; then
6719   echo $ECHO_N "(cached) $ECHO_C" >&6
6720 else
6721   cat >conftest.$ac_ext <<_ACEOF
6722 #line 6722 "configure"
6723 #include "confdefs.h"
6724 /* System header to define __stub macros and hopefully few prototypes,
6725     which can conflict with char $ac_func (); below.  */
6726 #include <assert.h>
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 #ifdef __cplusplus
6729 extern "C"
6730 #endif
6731 /* We use char because int might match the return type of a gcc2
6732    builtin and then its argument prototype would still apply.  */
6733 char $ac_func ();
6734 char (*f) ();
6735
6736 int
6737 main ()
6738 {
6739 /* The GNU C library defines this for functions which it implements
6740     to always fail with ENOSYS.  Some functions are actually named
6741     something starting with __ and the normal name is an alias.  */
6742 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6743 choke me
6744 #else
6745 f = $ac_func;
6746 #endif
6747
6748   ;
6749   return 0;
6750 }
6751 _ACEOF
6752 rm -f conftest.$ac_objext conftest$ac_exeext
6753 if { (eval echo "$as_me:6753: \"$ac_link\"") >&5
6754   (eval $ac_link) 2>&5
6755   ac_status=$?
6756   echo "$as_me:6756: \$? = $ac_status" >&5
6757   (exit $ac_status); } &&
6758          { ac_try='test -s conftest$ac_exeext'
6759   { (eval echo "$as_me:6759: \"$ac_try\"") >&5
6760   (eval $ac_try) 2>&5
6761   ac_status=$?
6762   echo "$as_me:6762: \$? = $ac_status" >&5
6763   (exit $ac_status); }; }; then
6764   eval "$as_ac_var=yes"
6765 else
6766   echo "$as_me: failed program was:" >&5
6767 cat conftest.$ac_ext >&5
6768 eval "$as_ac_var=no"
6769 fi
6770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6771 fi
6772 echo "$as_me:6772: result: `eval echo '${'$as_ac_var'}'`" >&5
6773 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6774 if test `eval echo '${'$as_ac_var'}'` = yes; then
6775   cat >>confdefs.h <<EOF
6776 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6777 EOF
6778
6779 fi
6780 done
6781
6782 else
6783         echo "$as_me:6783: checking if link/symlink functions work" >&5
6784 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6785 if test "${cf_cv_link_funcs+set}" = set; then
6786   echo $ECHO_N "(cached) $ECHO_C" >&6
6787 else
6788
6789                 cf_cv_link_funcs=
6790                 for cf_func in link symlink ; do
6791                         if test "$cross_compiling" = yes; then
6792
6793                         eval 'ac_cv_func_'$cf_func'=error'
6794 else
6795   cat >conftest.$ac_ext <<_ACEOF
6796 #line 6796 "configure"
6797 #include "confdefs.h"
6798
6799 #include <sys/types.h>
6800 #include <sys/stat.h>
6801 #ifdef HAVE_UNISTD_H
6802 #include <unistd.h>
6803 #endif
6804 int main()
6805 {
6806         int fail = 0;
6807         char *src = "config.log";
6808         char *dst = "conftest.chk";
6809         struct stat src_sb;
6810         struct stat dst_sb;
6811
6812         stat(src, &src_sb);
6813         fail = ($cf_func("config.log", "conftest.chk") < 0)
6814             || (stat(dst, &dst_sb) < 0)
6815             || (dst_sb.st_mtime != src_sb.st_mtime);
6816 #ifdef HAVE_UNLINK
6817         unlink(dst);
6818 #else
6819         remove(dst);
6820 #endif
6821         ${cf_cv_main_return:-return} (fail);
6822 }
6823
6824 _ACEOF
6825 rm -f conftest$ac_exeext
6826 if { (eval echo "$as_me:6826: \"$ac_link\"") >&5
6827   (eval $ac_link) 2>&5
6828   ac_status=$?
6829   echo "$as_me:6829: \$? = $ac_status" >&5
6830   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6831   { (eval echo "$as_me:6831: \"$ac_try\"") >&5
6832   (eval $ac_try) 2>&5
6833   ac_status=$?
6834   echo "$as_me:6834: \$? = $ac_status" >&5
6835   (exit $ac_status); }; }; then
6836
6837                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6838                         eval 'ac_cv_func_'$cf_func'=yes'
6839 else
6840   echo "$as_me: program exited with status $ac_status" >&5
6841 echo "$as_me: failed program was:" >&5
6842 cat conftest.$ac_ext >&5
6843
6844                         eval 'ac_cv_func_'$cf_func'=no'
6845 fi
6846 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6847 fi
6848                 done
6849                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6850
6851 fi
6852 echo "$as_me:6852: result: $cf_cv_link_funcs" >&5
6853 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6854         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6855 #define HAVE_LINK 1
6856 EOF
6857
6858         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6859 #define HAVE_SYMLINK 1
6860 EOF
6861
6862 fi
6863
6864 with_links=no
6865 with_symlinks=no
6866
6867 # soft links (symbolic links) are useful for some systems where hard links do
6868 # not work, or to make it simpler to copy terminfo trees around.
6869 if test "$ac_cv_func_symlink" = yes ; then
6870     echo "$as_me:6870: checking if tic should use symbolic links" >&5
6871 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6872
6873 # Check whether --enable-symlinks or --disable-symlinks was given.
6874 if test "${enable_symlinks+set}" = set; then
6875   enableval="$enable_symlinks"
6876   with_symlinks=$enableval
6877 else
6878   with_symlinks=no
6879 fi;
6880     echo "$as_me:6880: result: $with_symlinks" >&5
6881 echo "${ECHO_T}$with_symlinks" >&6
6882 fi
6883
6884 # If we have hard links and did not choose to use soft links instead, there is
6885 # no reason to make this choice optional - use the hard links.
6886 if test "$with_symlinks" = no ; then
6887     echo "$as_me:6887: checking if tic should use hard links" >&5
6888 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6889     if test "$ac_cv_func_link" = yes ; then
6890         with_links=yes
6891     else
6892         with_links=no
6893     fi
6894     echo "$as_me:6894: result: $with_links" >&5
6895 echo "${ECHO_T}$with_links" >&6
6896 fi
6897
6898 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6899 #define USE_LINKS 1
6900 EOF
6901
6902 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6903 #define USE_SYMLINKS 1
6904 EOF
6905
6906 ###   use option --enable-broken-linker to force on use of broken-linker support
6907 echo "$as_me:6907: checking if you want broken-linker support code" >&5
6908 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6909
6910 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6911 if test "${enable_broken_linker+set}" = set; then
6912   enableval="$enable_broken_linker"
6913   with_broken_linker=$enableval
6914 else
6915   with_broken_linker=${BROKEN_LINKER:-no}
6916 fi;
6917 echo "$as_me:6917: result: $with_broken_linker" >&5
6918 echo "${ECHO_T}$with_broken_linker" >&6
6919
6920 BROKEN_LINKER=0
6921 if test "$with_broken_linker" = yes ; then
6922         cat >>confdefs.h <<\EOF
6923 #define BROKEN_LINKER 1
6924 EOF
6925
6926         BROKEN_LINKER=1
6927 elif test "$DFT_LWR_MODEL" = shared ; then
6928         case $cf_cv_system_name in #(vi
6929         cygwin*)
6930                 cat >>confdefs.h <<\EOF
6931 #define BROKEN_LINKER 1
6932 EOF
6933
6934                 BROKEN_LINKER=1
6935                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6936
6937 echo "${as_me:-configure}:6937: testing cygwin linker is broken anyway ..." 1>&5
6938
6939                 ;;
6940         esac
6941 fi
6942
6943 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6944 echo "$as_me:6944: checking if tputs should process BSD-style prefix padding" >&5
6945 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6946
6947 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6948 if test "${enable_bsdpad+set}" = set; then
6949   enableval="$enable_bsdpad"
6950   with_bsdpad=$enableval
6951 else
6952   with_bsdpad=no
6953 fi;
6954 echo "$as_me:6954: result: $with_bsdpad" >&5
6955 echo "${ECHO_T}$with_bsdpad" >&6
6956 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6957 #define BSD_TPUTS 1
6958 EOF
6959
6960 ###   use option --enable-widec to turn on use of wide-character support
6961 NCURSES_CH_T=chtype
6962 NCURSES_LIBUTF8=0
6963
6964 NEED_WCHAR_H=0
6965 NCURSES_MBSTATE_T=0
6966 NCURSES_WCHAR_T=0
6967 NCURSES_WINT_T=0
6968
6969 # Check to define _XOPEN_SOURCE "automatically"
6970
6971 cf_XOPEN_SOURCE=500
6972 cf_POSIX_C_SOURCE=199506L
6973 cf_xopen_source=
6974
6975 case $host_os in #(vi
6976 aix[456]*) #(vi
6977         cf_xopen_source="-D_ALL_SOURCE"
6978         ;;
6979 cygwin) #(vi
6980         cf_XOPEN_SOURCE=600
6981         ;;
6982 darwin[0-8].*) #(vi
6983         cf_xopen_source="-D_APPLE_C_SOURCE"
6984         ;;
6985 darwin*) #(vi
6986         cf_xopen_source="-D_DARWIN_C_SOURCE"
6987         ;;
6988 freebsd*|dragonfly*) #(vi
6989         # 5.x headers associate
6990         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6991         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6992         cf_POSIX_C_SOURCE=200112L
6993         cf_XOPEN_SOURCE=600
6994         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6995         ;;
6996 hpux11*) #(vi
6997         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6998         ;;
6999 hpux*) #(vi
7000         cf_xopen_source="-D_HPUX_SOURCE"
7001         ;;
7002 irix[56].*) #(vi
7003         cf_xopen_source="-D_SGI_SOURCE"
7004         ;;
7005 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7006
7007 echo "$as_me:7007: checking if we must define _GNU_SOURCE" >&5
7008 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7009 if test "${cf_cv_gnu_source+set}" = set; then
7010   echo $ECHO_N "(cached) $ECHO_C" >&6
7011 else
7012
7013 cat >conftest.$ac_ext <<_ACEOF
7014 #line 7014 "configure"
7015 #include "confdefs.h"
7016 #include <sys/types.h>
7017 int
7018 main ()
7019 {
7020
7021 #ifndef _XOPEN_SOURCE
7022 make an error
7023 #endif
7024   ;
7025   return 0;
7026 }
7027 _ACEOF
7028 rm -f conftest.$ac_objext
7029 if { (eval echo "$as_me:7029: \"$ac_compile\"") >&5
7030   (eval $ac_compile) 2>&5
7031   ac_status=$?
7032   echo "$as_me:7032: \$? = $ac_status" >&5
7033   (exit $ac_status); } &&
7034          { ac_try='test -s conftest.$ac_objext'
7035   { (eval echo "$as_me:7035: \"$ac_try\"") >&5
7036   (eval $ac_try) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit $ac_status); }; }; then
7040   cf_cv_gnu_source=no
7041 else
7042   echo "$as_me: failed program was:" >&5
7043 cat conftest.$ac_ext >&5
7044 cf_save="$CPPFLAGS"
7045          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7046          cat >conftest.$ac_ext <<_ACEOF
7047 #line 7047 "configure"
7048 #include "confdefs.h"
7049 #include <sys/types.h>
7050 int
7051 main ()
7052 {
7053
7054 #ifdef _XOPEN_SOURCE
7055 make an error
7056 #endif
7057   ;
7058   return 0;
7059 }
7060 _ACEOF
7061 rm -f conftest.$ac_objext
7062 if { (eval echo "$as_me:7062: \"$ac_compile\"") >&5
7063   (eval $ac_compile) 2>&5
7064   ac_status=$?
7065   echo "$as_me:7065: \$? = $ac_status" >&5
7066   (exit $ac_status); } &&
7067          { ac_try='test -s conftest.$ac_objext'
7068   { (eval echo "$as_me:7068: \"$ac_try\"") >&5
7069   (eval $ac_try) 2>&5
7070   ac_status=$?
7071   echo "$as_me:7071: \$? = $ac_status" >&5
7072   (exit $ac_status); }; }; then
7073   cf_cv_gnu_source=no
7074 else
7075   echo "$as_me: failed program was:" >&5
7076 cat conftest.$ac_ext >&5
7077 cf_cv_gnu_source=yes
7078 fi
7079 rm -f conftest.$ac_objext conftest.$ac_ext
7080         CPPFLAGS="$cf_save"
7081
7082 fi
7083 rm -f conftest.$ac_objext conftest.$ac_ext
7084
7085 fi
7086 echo "$as_me:7086: result: $cf_cv_gnu_source" >&5
7087 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7088 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7089
7090         ;;
7091 mirbsd*) #(vi
7092         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7093         ;;
7094 netbsd*) #(vi
7095         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7096         ;;
7097 openbsd*) #(vi
7098         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7099         ;;
7100 osf[45]*) #(vi
7101         cf_xopen_source="-D_OSF_SOURCE"
7102         ;;
7103 nto-qnx*) #(vi
7104         cf_xopen_source="-D_QNX_SOURCE"
7105         ;;
7106 sco*) #(vi
7107         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7108         ;;
7109 solaris2.1[0-9]) #(vi
7110         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7111         ;;
7112 solaris2.[1-9]) #(vi
7113         cf_xopen_source="-D__EXTENSIONS__"
7114         ;;
7115 *)
7116         echo "$as_me:7116: checking if we should define _XOPEN_SOURCE" >&5
7117 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7118 if test "${cf_cv_xopen_source+set}" = set; then
7119   echo $ECHO_N "(cached) $ECHO_C" >&6
7120 else
7121
7122         cat >conftest.$ac_ext <<_ACEOF
7123 #line 7123 "configure"
7124 #include "confdefs.h"
7125 #include <sys/types.h>
7126 int
7127 main ()
7128 {
7129
7130 #ifndef _XOPEN_SOURCE
7131 make an error
7132 #endif
7133   ;
7134   return 0;
7135 }
7136 _ACEOF
7137 rm -f conftest.$ac_objext
7138 if { (eval echo "$as_me:7138: \"$ac_compile\"") >&5
7139   (eval $ac_compile) 2>&5
7140   ac_status=$?
7141   echo "$as_me:7141: \$? = $ac_status" >&5
7142   (exit $ac_status); } &&
7143          { ac_try='test -s conftest.$ac_objext'
7144   { (eval echo "$as_me:7144: \"$ac_try\"") >&5
7145   (eval $ac_try) 2>&5
7146   ac_status=$?
7147   echo "$as_me:7147: \$? = $ac_status" >&5
7148   (exit $ac_status); }; }; then
7149   cf_cv_xopen_source=no
7150 else
7151   echo "$as_me: failed program was:" >&5
7152 cat conftest.$ac_ext >&5
7153 cf_save="$CPPFLAGS"
7154          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7155          cat >conftest.$ac_ext <<_ACEOF
7156 #line 7156 "configure"
7157 #include "confdefs.h"
7158 #include <sys/types.h>
7159 int
7160 main ()
7161 {
7162
7163 #ifdef _XOPEN_SOURCE
7164 make an error
7165 #endif
7166   ;
7167   return 0;
7168 }
7169 _ACEOF
7170 rm -f conftest.$ac_objext
7171 if { (eval echo "$as_me:7171: \"$ac_compile\"") >&5
7172   (eval $ac_compile) 2>&5
7173   ac_status=$?
7174   echo "$as_me:7174: \$? = $ac_status" >&5
7175   (exit $ac_status); } &&
7176          { ac_try='test -s conftest.$ac_objext'
7177   { (eval echo "$as_me:7177: \"$ac_try\"") >&5
7178   (eval $ac_try) 2>&5
7179   ac_status=$?
7180   echo "$as_me:7180: \$? = $ac_status" >&5
7181   (exit $ac_status); }; }; then
7182   cf_cv_xopen_source=no
7183 else
7184   echo "$as_me: failed program was:" >&5
7185 cat conftest.$ac_ext >&5
7186 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7187 fi
7188 rm -f conftest.$ac_objext conftest.$ac_ext
7189         CPPFLAGS="$cf_save"
7190
7191 fi
7192 rm -f conftest.$ac_objext conftest.$ac_ext
7193
7194 fi
7195 echo "$as_me:7195: result: $cf_cv_xopen_source" >&5
7196 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7197         if test "$cf_cv_xopen_source" != no ; then
7198
7199 CFLAGS=`echo "$CFLAGS" | \
7200         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7201                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7202
7203 CPPFLAGS=`echo "$CPPFLAGS" | \
7204         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7205                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7206
7207                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7208
7209 cf_fix_cppflags=no
7210 cf_new_cflags=
7211 cf_new_cppflags=
7212 cf_new_extra_cppflags=
7213
7214 for cf_add_cflags in $cf_temp_xopen_source
7215 do
7216 case $cf_fix_cppflags in
7217 no)
7218         case $cf_add_cflags in #(vi
7219         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7220                 case $cf_add_cflags in
7221                 -D*)
7222                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7223
7224                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7225                                 && test -z "${cf_tst_cflags}" \
7226                                 && cf_fix_cppflags=yes
7227
7228                         if test $cf_fix_cppflags = yes ; then
7229                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7230                                 continue
7231                         elif test "${cf_tst_cflags}" = "\"'" ; then
7232                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7233                                 continue
7234                         fi
7235                         ;;
7236                 esac
7237                 case "$CPPFLAGS" in
7238                 *$cf_add_cflags) #(vi
7239                         ;;
7240                 *) #(vi
7241                         case $cf_add_cflags in #(vi
7242                         -D*)
7243                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7244
7245 CPPFLAGS=`echo "$CPPFLAGS" | \
7246         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7247                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7248
7249                                 ;;
7250                         esac
7251                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7252                         ;;
7253                 esac
7254                 ;;
7255         *)
7256                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7257                 ;;
7258         esac
7259         ;;
7260 yes)
7261         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7262
7263         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7264
7265         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7266                 && test -z "${cf_tst_cflags}" \
7267                 && cf_fix_cppflags=no
7268         ;;
7269 esac
7270 done
7271
7272 if test -n "$cf_new_cflags" ; then
7273
7274         CFLAGS="$CFLAGS $cf_new_cflags"
7275 fi
7276
7277 if test -n "$cf_new_cppflags" ; then
7278
7279         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7280 fi
7281
7282 if test -n "$cf_new_extra_cppflags" ; then
7283
7284         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7285 fi
7286
7287         fi
7288
7289 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7290
7291 cf_save_CFLAGS="$CFLAGS"
7292 cf_save_CPPFLAGS="$CPPFLAGS"
7293
7294 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7295         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7296                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7297
7298 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7299         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7300                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7301
7302 echo "$as_me:7302: checking if we should define _POSIX_C_SOURCE" >&5
7303 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7304 if test "${cf_cv_posix_c_source+set}" = set; then
7305   echo $ECHO_N "(cached) $ECHO_C" >&6
7306 else
7307
7308 echo "${as_me:-configure}:7308: testing if the symbol is already defined go no further ..." 1>&5
7309
7310         cat >conftest.$ac_ext <<_ACEOF
7311 #line 7311 "configure"
7312 #include "confdefs.h"
7313 #include <sys/types.h>
7314 int
7315 main ()
7316 {
7317
7318 #ifndef _POSIX_C_SOURCE
7319 make an error
7320 #endif
7321   ;
7322   return 0;
7323 }
7324 _ACEOF
7325 rm -f conftest.$ac_objext
7326 if { (eval echo "$as_me:7326: \"$ac_compile\"") >&5
7327   (eval $ac_compile) 2>&5
7328   ac_status=$?
7329   echo "$as_me:7329: \$? = $ac_status" >&5
7330   (exit $ac_status); } &&
7331          { ac_try='test -s conftest.$ac_objext'
7332   { (eval echo "$as_me:7332: \"$ac_try\"") >&5
7333   (eval $ac_try) 2>&5
7334   ac_status=$?
7335   echo "$as_me:7335: \$? = $ac_status" >&5
7336   (exit $ac_status); }; }; then
7337   cf_cv_posix_c_source=no
7338 else
7339   echo "$as_me: failed program was:" >&5
7340 cat conftest.$ac_ext >&5
7341 cf_want_posix_source=no
7342          case .$cf_POSIX_C_SOURCE in #(vi
7343          .[12]??*) #(vi
7344                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7345                 ;;
7346          .2) #(vi
7347                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7348                 cf_want_posix_source=yes
7349                 ;;
7350          .*)
7351                 cf_want_posix_source=yes
7352                 ;;
7353          esac
7354          if test "$cf_want_posix_source" = yes ; then
7355                 cat >conftest.$ac_ext <<_ACEOF
7356 #line 7356 "configure"
7357 #include "confdefs.h"
7358 #include <sys/types.h>
7359 int
7360 main ()
7361 {
7362
7363 #ifdef _POSIX_SOURCE
7364 make an error
7365 #endif
7366   ;
7367   return 0;
7368 }
7369 _ACEOF
7370 rm -f conftest.$ac_objext
7371 if { (eval echo "$as_me:7371: \"$ac_compile\"") >&5
7372   (eval $ac_compile) 2>&5
7373   ac_status=$?
7374   echo "$as_me:7374: \$? = $ac_status" >&5
7375   (exit $ac_status); } &&
7376          { ac_try='test -s conftest.$ac_objext'
7377   { (eval echo "$as_me:7377: \"$ac_try\"") >&5
7378   (eval $ac_try) 2>&5
7379   ac_status=$?
7380   echo "$as_me:7380: \$? = $ac_status" >&5
7381   (exit $ac_status); }; }; then
7382   :
7383 else
7384   echo "$as_me: failed program was:" >&5
7385 cat conftest.$ac_ext >&5
7386 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7387 fi
7388 rm -f conftest.$ac_objext conftest.$ac_ext
7389          fi
7390
7391 echo "${as_me:-configure}:7391: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7392
7393          CFLAGS="$cf_trim_CFLAGS"
7394          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7395
7396 echo "${as_me:-configure}:7396: testing if the second compile does not leave our definition intact error ..." 1>&5
7397
7398          cat >conftest.$ac_ext <<_ACEOF
7399 #line 7399 "configure"
7400 #include "confdefs.h"
7401 #include <sys/types.h>
7402 int
7403 main ()
7404 {
7405
7406 #ifndef _POSIX_C_SOURCE
7407 make an error
7408 #endif
7409   ;
7410   return 0;
7411 }
7412 _ACEOF
7413 rm -f conftest.$ac_objext
7414 if { (eval echo "$as_me:7414: \"$ac_compile\"") >&5
7415   (eval $ac_compile) 2>&5
7416   ac_status=$?
7417   echo "$as_me:7417: \$? = $ac_status" >&5
7418   (exit $ac_status); } &&
7419          { ac_try='test -s conftest.$ac_objext'
7420   { (eval echo "$as_me:7420: \"$ac_try\"") >&5
7421   (eval $ac_try) 2>&5
7422   ac_status=$?
7423   echo "$as_me:7423: \$? = $ac_status" >&5
7424   (exit $ac_status); }; }; then
7425   :
7426 else
7427   echo "$as_me: failed program was:" >&5
7428 cat conftest.$ac_ext >&5
7429 cf_cv_posix_c_source=no
7430 fi
7431 rm -f conftest.$ac_objext conftest.$ac_ext
7432          CFLAGS="$cf_save_CFLAGS"
7433          CPPFLAGS="$cf_save_CPPFLAGS"
7434
7435 fi
7436 rm -f conftest.$ac_objext conftest.$ac_ext
7437
7438 fi
7439 echo "$as_me:7439: result: $cf_cv_posix_c_source" >&5
7440 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7441
7442 if test "$cf_cv_posix_c_source" != no ; then
7443         CFLAGS="$cf_trim_CFLAGS"
7444         CPPFLAGS="$cf_trim_CPPFLAGS"
7445
7446 cf_fix_cppflags=no
7447 cf_new_cflags=
7448 cf_new_cppflags=
7449 cf_new_extra_cppflags=
7450
7451 for cf_add_cflags in $cf_cv_posix_c_source
7452 do
7453 case $cf_fix_cppflags in
7454 no)
7455         case $cf_add_cflags in #(vi
7456         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7457                 case $cf_add_cflags in
7458                 -D*)
7459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7460
7461                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7462                                 && test -z "${cf_tst_cflags}" \
7463                                 && cf_fix_cppflags=yes
7464
7465                         if test $cf_fix_cppflags = yes ; then
7466                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7467                                 continue
7468                         elif test "${cf_tst_cflags}" = "\"'" ; then
7469                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7470                                 continue
7471                         fi
7472                         ;;
7473                 esac
7474                 case "$CPPFLAGS" in
7475                 *$cf_add_cflags) #(vi
7476                         ;;
7477                 *) #(vi
7478                         case $cf_add_cflags in #(vi
7479                         -D*)
7480                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7481
7482 CPPFLAGS=`echo "$CPPFLAGS" | \
7483         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7484                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7485
7486                                 ;;
7487                         esac
7488                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7489                         ;;
7490                 esac
7491                 ;;
7492         *)
7493                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7494                 ;;
7495         esac
7496         ;;
7497 yes)
7498         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7499
7500         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7501
7502         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7503                 && test -z "${cf_tst_cflags}" \
7504                 && cf_fix_cppflags=no
7505         ;;
7506 esac
7507 done
7508
7509 if test -n "$cf_new_cflags" ; then
7510
7511         CFLAGS="$CFLAGS $cf_new_cflags"
7512 fi
7513
7514 if test -n "$cf_new_cppflags" ; then
7515
7516         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7517 fi
7518
7519 if test -n "$cf_new_extra_cppflags" ; then
7520
7521         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7522 fi
7523
7524 fi
7525
7526         ;;
7527 esac
7528
7529 if test -n "$cf_xopen_source" ; then
7530
7531 cf_fix_cppflags=no
7532 cf_new_cflags=
7533 cf_new_cppflags=
7534 cf_new_extra_cppflags=
7535
7536 for cf_add_cflags in $cf_xopen_source
7537 do
7538 case $cf_fix_cppflags in
7539 no)
7540         case $cf_add_cflags in #(vi
7541         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7542                 case $cf_add_cflags in
7543                 -D*)
7544                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7545
7546                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7547                                 && test -z "${cf_tst_cflags}" \
7548                                 && cf_fix_cppflags=yes
7549
7550                         if test $cf_fix_cppflags = yes ; then
7551                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7552                                 continue
7553                         elif test "${cf_tst_cflags}" = "\"'" ; then
7554                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7555                                 continue
7556                         fi
7557                         ;;
7558                 esac
7559                 case "$CPPFLAGS" in
7560                 *$cf_add_cflags) #(vi
7561                         ;;
7562                 *) #(vi
7563                         case $cf_add_cflags in #(vi
7564                         -D*)
7565                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7566
7567 CPPFLAGS=`echo "$CPPFLAGS" | \
7568         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7569                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7570
7571                                 ;;
7572                         esac
7573                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7574                         ;;
7575                 esac
7576                 ;;
7577         *)
7578                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7579                 ;;
7580         esac
7581         ;;
7582 yes)
7583         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7584
7585         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7586
7587         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7588                 && test -z "${cf_tst_cflags}" \
7589                 && cf_fix_cppflags=no
7590         ;;
7591 esac
7592 done
7593
7594 if test -n "$cf_new_cflags" ; then
7595
7596         CFLAGS="$CFLAGS $cf_new_cflags"
7597 fi
7598
7599 if test -n "$cf_new_cppflags" ; then
7600
7601         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7602 fi
7603
7604 if test -n "$cf_new_extra_cppflags" ; then
7605
7606         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7607 fi
7608
7609 fi
7610
7611 # Work around breakage on OS X
7612
7613 echo "$as_me:7613: checking if SIGWINCH is defined" >&5
7614 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7615 if test "${cf_cv_define_sigwinch+set}" = set; then
7616   echo $ECHO_N "(cached) $ECHO_C" >&6
7617 else
7618
7619         cat >conftest.$ac_ext <<_ACEOF
7620 #line 7620 "configure"
7621 #include "confdefs.h"
7622
7623 #include <sys/types.h>
7624 #include <sys/signal.h>
7625
7626 int
7627 main ()
7628 {
7629 int x = SIGWINCH
7630   ;
7631   return 0;
7632 }
7633 _ACEOF
7634 rm -f conftest.$ac_objext
7635 if { (eval echo "$as_me:7635: \"$ac_compile\"") >&5
7636   (eval $ac_compile) 2>&5
7637   ac_status=$?
7638   echo "$as_me:7638: \$? = $ac_status" >&5
7639   (exit $ac_status); } &&
7640          { ac_try='test -s conftest.$ac_objext'
7641   { (eval echo "$as_me:7641: \"$ac_try\"") >&5
7642   (eval $ac_try) 2>&5
7643   ac_status=$?
7644   echo "$as_me:7644: \$? = $ac_status" >&5
7645   (exit $ac_status); }; }; then
7646   cf_cv_define_sigwinch=yes
7647 else
7648   echo "$as_me: failed program was:" >&5
7649 cat conftest.$ac_ext >&5
7650 cat >conftest.$ac_ext <<_ACEOF
7651 #line 7651 "configure"
7652 #include "confdefs.h"
7653
7654 #undef _XOPEN_SOURCE
7655 #undef _POSIX_SOURCE
7656 #undef _POSIX_C_SOURCE
7657 #include <sys/types.h>
7658 #include <sys/signal.h>
7659
7660 int
7661 main ()
7662 {
7663 int x = SIGWINCH
7664   ;
7665   return 0;
7666 }
7667 _ACEOF
7668 rm -f conftest.$ac_objext
7669 if { (eval echo "$as_me:7669: \"$ac_compile\"") >&5
7670   (eval $ac_compile) 2>&5
7671   ac_status=$?
7672   echo "$as_me:7672: \$? = $ac_status" >&5
7673   (exit $ac_status); } &&
7674          { ac_try='test -s conftest.$ac_objext'
7675   { (eval echo "$as_me:7675: \"$ac_try\"") >&5
7676   (eval $ac_try) 2>&5
7677   ac_status=$?
7678   echo "$as_me:7678: \$? = $ac_status" >&5
7679   (exit $ac_status); }; }; then
7680   cf_cv_define_sigwinch=maybe
7681 else
7682   echo "$as_me: failed program was:" >&5
7683 cat conftest.$ac_ext >&5
7684 cf_cv_define_sigwinch=no
7685 fi
7686 rm -f conftest.$ac_objext conftest.$ac_ext
7687
7688 fi
7689 rm -f conftest.$ac_objext conftest.$ac_ext
7690
7691 fi
7692 echo "$as_me:7692: result: $cf_cv_define_sigwinch" >&5
7693 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7694
7695 if test "$cf_cv_define_sigwinch" = maybe ; then
7696 echo "$as_me:7696: checking for actual SIGWINCH definition" >&5
7697 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7698 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7699   echo $ECHO_N "(cached) $ECHO_C" >&6
7700 else
7701
7702 cf_cv_fixup_sigwinch=unknown
7703 cf_sigwinch=32
7704 while test $cf_sigwinch != 1
7705 do
7706         cat >conftest.$ac_ext <<_ACEOF
7707 #line 7707 "configure"
7708 #include "confdefs.h"
7709
7710 #undef _XOPEN_SOURCE
7711 #undef _POSIX_SOURCE
7712 #undef _POSIX_C_SOURCE
7713 #include <sys/types.h>
7714 #include <sys/signal.h>
7715
7716 int
7717 main ()
7718 {
7719
7720 #if SIGWINCH != $cf_sigwinch
7721 make an error
7722 #endif
7723 int x = SIGWINCH
7724   ;
7725   return 0;
7726 }
7727 _ACEOF
7728 rm -f conftest.$ac_objext
7729 if { (eval echo "$as_me:7729: \"$ac_compile\"") >&5
7730   (eval $ac_compile) 2>&5
7731   ac_status=$?
7732   echo "$as_me:7732: \$? = $ac_status" >&5
7733   (exit $ac_status); } &&
7734          { ac_try='test -s conftest.$ac_objext'
7735   { (eval echo "$as_me:7735: \"$ac_try\"") >&5
7736   (eval $ac_try) 2>&5
7737   ac_status=$?
7738   echo "$as_me:7738: \$? = $ac_status" >&5
7739   (exit $ac_status); }; }; then
7740   cf_cv_fixup_sigwinch=$cf_sigwinch
7741          break
7742 else
7743   echo "$as_me: failed program was:" >&5
7744 cat conftest.$ac_ext >&5
7745 fi
7746 rm -f conftest.$ac_objext conftest.$ac_ext
7747
7748 cf_sigwinch=`expr $cf_sigwinch - 1`
7749 done
7750
7751 fi
7752 echo "$as_me:7752: result: $cf_cv_fixup_sigwinch" >&5
7753 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7754
7755         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7756                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7757         fi
7758 fi
7759
7760 # Checks for CODESET support.
7761
7762   echo "$as_me:7762: checking for nl_langinfo and CODESET" >&5
7763 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7764 if test "${am_cv_langinfo_codeset+set}" = set; then
7765   echo $ECHO_N "(cached) $ECHO_C" >&6
7766 else
7767   cat >conftest.$ac_ext <<_ACEOF
7768 #line 7768 "configure"
7769 #include "confdefs.h"
7770 #include <langinfo.h>
7771 int
7772 main ()
7773 {
7774 char* cs = nl_langinfo(CODESET);
7775   ;
7776   return 0;
7777 }
7778 _ACEOF
7779 rm -f conftest.$ac_objext conftest$ac_exeext
7780 if { (eval echo "$as_me:7780: \"$ac_link\"") >&5
7781   (eval $ac_link) 2>&5
7782   ac_status=$?
7783   echo "$as_me:7783: \$? = $ac_status" >&5
7784   (exit $ac_status); } &&
7785          { ac_try='test -s conftest$ac_exeext'
7786   { (eval echo "$as_me:7786: \"$ac_try\"") >&5
7787   (eval $ac_try) 2>&5
7788   ac_status=$?
7789   echo "$as_me:7789: \$? = $ac_status" >&5
7790   (exit $ac_status); }; }; then
7791   am_cv_langinfo_codeset=yes
7792 else
7793   echo "$as_me: failed program was:" >&5
7794 cat conftest.$ac_ext >&5
7795 am_cv_langinfo_codeset=no
7796 fi
7797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7798
7799 fi
7800 echo "$as_me:7800: result: $am_cv_langinfo_codeset" >&5
7801 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7802   if test $am_cv_langinfo_codeset = yes; then
7803
7804 cat >>confdefs.h <<\EOF
7805 #define HAVE_LANGINFO_CODESET 1
7806 EOF
7807
7808   fi
7809
7810 # use these variables to work around a defect in gcc's fixincludes.
7811 NCURSES_OK_WCHAR_T=
7812 NCURSES_OK_WINT_T=
7813
7814 echo "$as_me:7814: checking if you want wide-character code" >&5
7815 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7816
7817 # Check whether --enable-widec or --disable-widec was given.
7818 if test "${enable_widec+set}" = set; then
7819   enableval="$enable_widec"
7820   with_widec=$enableval
7821 else
7822   with_widec=no
7823 fi;
7824 echo "$as_me:7824: result: $with_widec" >&5
7825 echo "${ECHO_T}$with_widec" >&6
7826 if test "$with_widec" = yes ; then
7827         LIB_SUFFIX="w${LIB_SUFFIX}"
7828         cat >>confdefs.h <<\EOF
7829 #define USE_WIDEC_SUPPORT 1
7830 EOF
7831
7832         case "$CFLAGS $CPPFLAGS" in #(vi
7833         *-D_XOPEN_SOURCE=500) #(vi
7834                 ;;
7835         *)
7836
7837 echo "$as_me:7837: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7838 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7839 cat >conftest.$ac_ext <<_ACEOF
7840 #line 7840 "configure"
7841 #include "confdefs.h"
7842 #include <sys/types.h>
7843
7844 int
7845 main ()
7846 {
7847
7848 #ifndef _XOPEN_SOURCE_EXTENDED
7849 make an error
7850 #endif
7851   ;
7852   return 0;
7853 }
7854 _ACEOF
7855 rm -f conftest.$ac_objext
7856 if { (eval echo "$as_me:7856: \"$ac_compile\"") >&5
7857   (eval $ac_compile) 2>&5
7858   ac_status=$?
7859   echo "$as_me:7859: \$? = $ac_status" >&5
7860   (exit $ac_status); } &&
7861          { ac_try='test -s conftest.$ac_objext'
7862   { (eval echo "$as_me:7862: \"$ac_try\"") >&5
7863   (eval $ac_try) 2>&5
7864   ac_status=$?
7865   echo "$as_me:7865: \$? = $ac_status" >&5
7866   (exit $ac_status); }; }; then
7867   cf_result=no
7868 else
7869   echo "$as_me: failed program was:" >&5
7870 cat conftest.$ac_ext >&5
7871 cf_result=yes
7872 fi
7873 rm -f conftest.$ac_objext conftest.$ac_ext
7874 echo "$as_me:7874: result: $cf_result" >&5
7875 echo "${ECHO_T}$cf_result" >&6
7876
7877 if test "$cf_result" = yes ; then
7878         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7879 elif test "x" != "x" ; then
7880         echo "$as_me:7880: checking checking for compatible value versus " >&5
7881 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7882         cat >conftest.$ac_ext <<_ACEOF
7883 #line 7883 "configure"
7884 #include "confdefs.h"
7885 #include <sys/types.h>
7886
7887 int
7888 main ()
7889 {
7890
7891 #if _XOPEN_SOURCE_EXTENDED- < 0
7892 make an error
7893 #endif
7894   ;
7895   return 0;
7896 }
7897 _ACEOF
7898 rm -f conftest.$ac_objext
7899 if { (eval echo "$as_me:7899: \"$ac_compile\"") >&5
7900   (eval $ac_compile) 2>&5
7901   ac_status=$?
7902   echo "$as_me:7902: \$? = $ac_status" >&5
7903   (exit $ac_status); } &&
7904          { ac_try='test -s conftest.$ac_objext'
7905   { (eval echo "$as_me:7905: \"$ac_try\"") >&5
7906   (eval $ac_try) 2>&5
7907   ac_status=$?
7908   echo "$as_me:7908: \$? = $ac_status" >&5
7909   (exit $ac_status); }; }; then
7910   cf_result=yes
7911 else
7912   echo "$as_me: failed program was:" >&5
7913 cat conftest.$ac_ext >&5
7914 cf_result=no
7915 fi
7916 rm -f conftest.$ac_objext conftest.$ac_ext
7917         echo "$as_me:7917: result: $cf_result" >&5
7918 echo "${ECHO_T}$cf_result" >&6
7919         if test "$cf_result" = no ; then
7920                 # perhaps we can override it - try...
7921                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7922         fi
7923 fi
7924
7925                 ;;
7926         esac
7927
7928         # with_overwrite=no
7929         NCURSES_CH_T=cchar_t
7930
7931 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7932 do
7933 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7934 echo "$as_me:7934: checking for $ac_func" >&5
7935 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7936 if eval "test \"\${$as_ac_var+set}\" = set"; then
7937   echo $ECHO_N "(cached) $ECHO_C" >&6
7938 else
7939   cat >conftest.$ac_ext <<_ACEOF
7940 #line 7940 "configure"
7941 #include "confdefs.h"
7942 /* System header to define __stub macros and hopefully few prototypes,
7943     which can conflict with char $ac_func (); below.  */
7944 #include <assert.h>
7945 /* Override any gcc2 internal prototype to avoid an error.  */
7946 #ifdef __cplusplus
7947 extern "C"
7948 #endif
7949 /* We use char because int might match the return type of a gcc2
7950    builtin and then its argument prototype would still apply.  */
7951 char $ac_func ();
7952 char (*f) ();
7953
7954 int
7955 main ()
7956 {
7957 /* The GNU C library defines this for functions which it implements
7958     to always fail with ENOSYS.  Some functions are actually named
7959     something starting with __ and the normal name is an alias.  */
7960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7961 choke me
7962 #else
7963 f = $ac_func;
7964 #endif
7965
7966   ;
7967   return 0;
7968 }
7969 _ACEOF
7970 rm -f conftest.$ac_objext conftest$ac_exeext
7971 if { (eval echo "$as_me:7971: \"$ac_link\"") >&5
7972   (eval $ac_link) 2>&5
7973   ac_status=$?
7974   echo "$as_me:7974: \$? = $ac_status" >&5
7975   (exit $ac_status); } &&
7976          { ac_try='test -s conftest$ac_exeext'
7977   { (eval echo "$as_me:7977: \"$ac_try\"") >&5
7978   (eval $ac_try) 2>&5
7979   ac_status=$?
7980   echo "$as_me:7980: \$? = $ac_status" >&5
7981   (exit $ac_status); }; }; then
7982   eval "$as_ac_var=yes"
7983 else
7984   echo "$as_me: failed program was:" >&5
7985 cat conftest.$ac_ext >&5
7986 eval "$as_ac_var=no"
7987 fi
7988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7989 fi
7990 echo "$as_me:7990: result: `eval echo '${'$as_ac_var'}'`" >&5
7991 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7992 if test `eval echo '${'$as_ac_var'}'` = yes; then
7993   cat >>confdefs.h <<EOF
7994 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7995 EOF
7996
7997 fi
7998 done
7999
8000         if test "$ac_cv_func_putwc" != yes ; then
8001
8002 echo "$as_me:8002: checking for multibyte character support" >&5
8003 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8004 if test "${cf_cv_utf8_lib+set}" = set; then
8005   echo $ECHO_N "(cached) $ECHO_C" >&6
8006 else
8007
8008         cf_save_LIBS="$LIBS"
8009         cat >conftest.$ac_ext <<_ACEOF
8010 #line 8010 "configure"
8011 #include "confdefs.h"
8012
8013 #include <stdlib.h>
8014 int
8015 main ()
8016 {
8017 putwc(0,0);
8018   ;
8019   return 0;
8020 }
8021 _ACEOF
8022 rm -f conftest.$ac_objext conftest$ac_exeext
8023 if { (eval echo "$as_me:8023: \"$ac_link\"") >&5
8024   (eval $ac_link) 2>&5
8025   ac_status=$?
8026   echo "$as_me:8026: \$? = $ac_status" >&5
8027   (exit $ac_status); } &&
8028          { ac_try='test -s conftest$ac_exeext'
8029   { (eval echo "$as_me:8029: \"$ac_try\"") >&5
8030   (eval $ac_try) 2>&5
8031   ac_status=$?
8032   echo "$as_me:8032: \$? = $ac_status" >&5
8033   (exit $ac_status); }; }; then
8034   cf_cv_utf8_lib=yes
8035 else
8036   echo "$as_me: failed program was:" >&5
8037 cat conftest.$ac_ext >&5
8038
8039 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8040 # will be set on completion of the AC_TRY_LINK below.
8041 cf_cv_header_path_utf8=
8042 cf_cv_library_path_utf8=
8043
8044 echo "${as_me:-configure}:8044: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8045
8046 cf_save_LIBS="$LIBS"
8047
8048 cat >conftest.$ac_ext <<_ACEOF
8049 #line 8049 "configure"
8050 #include "confdefs.h"
8051
8052 #include <libutf8.h>
8053 int
8054 main ()
8055 {
8056 putwc(0,0);
8057   ;
8058   return 0;
8059 }
8060 _ACEOF
8061 rm -f conftest.$ac_objext conftest$ac_exeext
8062 if { (eval echo "$as_me:8062: \"$ac_link\"") >&5
8063   (eval $ac_link) 2>&5
8064   ac_status=$?
8065   echo "$as_me:8065: \$? = $ac_status" >&5
8066   (exit $ac_status); } &&
8067          { ac_try='test -s conftest$ac_exeext'
8068   { (eval echo "$as_me:8068: \"$ac_try\"") >&5
8069   (eval $ac_try) 2>&5
8070   ac_status=$?
8071   echo "$as_me:8071: \$? = $ac_status" >&5
8072   (exit $ac_status); }; }; then
8073
8074         cf_cv_find_linkage_utf8=yes
8075         cf_cv_header_path_utf8=/usr/include
8076         cf_cv_library_path_utf8=/usr/lib
8077
8078 else
8079   echo "$as_me: failed program was:" >&5
8080 cat conftest.$ac_ext >&5
8081
8082 LIBS="-lutf8  $cf_save_LIBS"
8083
8084 cat >conftest.$ac_ext <<_ACEOF
8085 #line 8085 "configure"
8086 #include "confdefs.h"
8087
8088 #include <libutf8.h>
8089 int
8090 main ()
8091 {
8092 putwc(0,0);
8093   ;
8094   return 0;
8095 }
8096 _ACEOF
8097 rm -f conftest.$ac_objext conftest$ac_exeext
8098 if { (eval echo "$as_me:8098: \"$ac_link\"") >&5
8099   (eval $ac_link) 2>&5
8100   ac_status=$?
8101   echo "$as_me:8101: \$? = $ac_status" >&5
8102   (exit $ac_status); } &&
8103          { ac_try='test -s conftest$ac_exeext'
8104   { (eval echo "$as_me:8104: \"$ac_try\"") >&5
8105   (eval $ac_try) 2>&5
8106   ac_status=$?
8107   echo "$as_me:8107: \$? = $ac_status" >&5
8108   (exit $ac_status); }; }; then
8109
8110         cf_cv_find_linkage_utf8=yes
8111         cf_cv_header_path_utf8=/usr/include
8112         cf_cv_library_path_utf8=/usr/lib
8113         cf_cv_library_file_utf8="-lutf8"
8114
8115 else
8116   echo "$as_me: failed program was:" >&5
8117 cat conftest.$ac_ext >&5
8118
8119         cf_cv_find_linkage_utf8=no
8120         LIBS="$cf_save_LIBS"
8121
8122     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8123
8124 echo "${as_me:-configure}:8124: testing find linkage for utf8 library ..." 1>&5
8125
8126 echo "${as_me:-configure}:8126: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8127
8128     cf_save_CPPFLAGS="$CPPFLAGS"
8129     cf_test_CPPFLAGS="$CPPFLAGS"
8130
8131 cf_search=
8132
8133 # collect the current set of include-directories from compiler flags
8134 cf_header_path_list=""
8135 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8136         for cf_header_path in $CPPFLAGS $CFLAGS
8137         do
8138                 case $cf_header_path in #(vi
8139                 -I*)
8140                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8141
8142 test "$cf_header_path" != "NONE" && \
8143 test -d "$cf_header_path" && \
8144  {
8145         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8146         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8147         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8148         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8149         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8150         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8151 }
8152
8153                         cf_header_path_list="$cf_header_path_list $cf_search"
8154                         ;;
8155                 esac
8156         done
8157 fi
8158
8159 # add the variations for the package we are looking for
8160
8161 cf_search=
8162
8163 test "/usr" != "$prefix" && \
8164 test -d "/usr" && \
8165 (test $prefix = NONE || test "/usr" != "$prefix") && {
8166         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8167         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8168         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8169         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8170         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8171         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8172 }
8173
8174 test "$prefix" != "NONE" && \
8175 test -d "$prefix" && \
8176  {
8177         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8178         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8179         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8180         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8181         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8182         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8183 }
8184
8185 test "/usr/local" != "$prefix" && \
8186 test -d "/usr/local" && \
8187 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8188         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8189         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8190         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8191         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8192         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8193         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8194 }
8195
8196 test "/opt" != "$prefix" && \
8197 test -d "/opt" && \
8198 (test $prefix = NONE || test "/opt" != "$prefix") && {
8199         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8200         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8201         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8202         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8203         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8204         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8205 }
8206
8207 test "$HOME" != "$prefix" && \
8208 test -d "$HOME" && \
8209 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8210         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8211         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8212         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8213         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8214         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8215         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8216 }
8217
8218 test "$includedir" != NONE && \
8219 test "$includedir" != "/usr/include" && \
8220 test -d "$includedir" && {
8221         test -d $includedir &&    cf_search="$cf_search $includedir"
8222         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8223 }
8224
8225 test "$oldincludedir" != NONE && \
8226 test "$oldincludedir" != "/usr/include" && \
8227 test -d "$oldincludedir" && {
8228         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8229         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8230 }
8231
8232 cf_search="$cf_search $cf_header_path_list"
8233
8234     for cf_cv_header_path_utf8 in $cf_search
8235     do
8236       if test -d $cf_cv_header_path_utf8 ; then
8237         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8238
8239 echo "${as_me:-configure}:8239: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8240
8241         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8242         cat >conftest.$ac_ext <<_ACEOF
8243 #line 8243 "configure"
8244 #include "confdefs.h"
8245
8246 #include <libutf8.h>
8247 int
8248 main ()
8249 {
8250 putwc(0,0);
8251   ;
8252   return 0;
8253 }
8254 _ACEOF
8255 rm -f conftest.$ac_objext
8256 if { (eval echo "$as_me:8256: \"$ac_compile\"") >&5
8257   (eval $ac_compile) 2>&5
8258   ac_status=$?
8259   echo "$as_me:8259: \$? = $ac_status" >&5
8260   (exit $ac_status); } &&
8261          { ac_try='test -s conftest.$ac_objext'
8262   { (eval echo "$as_me:8262: \"$ac_try\"") >&5
8263   (eval $ac_try) 2>&5
8264   ac_status=$?
8265   echo "$as_me:8265: \$? = $ac_status" >&5
8266   (exit $ac_status); }; }; then
8267
8268             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8269
8270 echo "${as_me:-configure}:8270: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8271
8272             cf_cv_find_linkage_utf8=maybe
8273             cf_test_CPPFLAGS="$CPPFLAGS"
8274             break
8275 else
8276   echo "$as_me: failed program was:" >&5
8277 cat conftest.$ac_ext >&5
8278
8279             CPPFLAGS="$cf_save_CPPFLAGS"
8280
8281 fi
8282 rm -f conftest.$ac_objext conftest.$ac_ext
8283       fi
8284     done
8285
8286     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8287
8288 echo "${as_me:-configure}:8288: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8289
8290       cf_save_LIBS="$LIBS"
8291       cf_save_LDFLAGS="$LDFLAGS"
8292
8293       if test "$cf_cv_find_linkage_utf8" != yes ; then
8294
8295 cf_search=
8296 cf_library_path_list=""
8297 if test -n "${LDFLAGS}${LIBS}" ; then
8298         for cf_library_path in $LDFLAGS $LIBS
8299         do
8300                 case $cf_library_path in #(vi
8301                 -L*)
8302                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8303
8304 test "$cf_library_path" != "NONE" && \
8305 test -d "$cf_library_path" && \
8306  {
8307         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8308         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8309         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8310         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8311         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8312         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8313 }
8314
8315                         cf_library_path_list="$cf_library_path_list $cf_search"
8316                         ;;
8317                 esac
8318         done
8319 fi
8320
8321 cf_search=
8322
8323 test "/usr" != "$prefix" && \
8324 test -d "/usr" && \
8325 (test $prefix = NONE || test "/usr" != "$prefix") && {
8326         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8327         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8328         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8329         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8330         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8331         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8332 }
8333
8334 test "$prefix" != "NONE" && \
8335 test -d "$prefix" && \
8336  {
8337         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8338         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8339         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8340         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8341         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8342         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8343 }
8344
8345 test "/usr/local" != "$prefix" && \
8346 test -d "/usr/local" && \
8347 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8348         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8349         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8350         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8351         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8352         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8353         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8354 }
8355
8356 test "/opt" != "$prefix" && \
8357 test -d "/opt" && \
8358 (test $prefix = NONE || test "/opt" != "$prefix") && {
8359         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8360         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8361         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8362         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8363         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8364         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8365 }
8366
8367 test "$HOME" != "$prefix" && \
8368 test -d "$HOME" && \
8369 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8370         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8371         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8372         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8373         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8374         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8375         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8376 }
8377
8378 cf_search="$cf_library_path_list $cf_search"
8379
8380         for cf_cv_library_path_utf8 in $cf_search
8381         do
8382           if test -d $cf_cv_library_path_utf8 ; then
8383             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8384
8385 echo "${as_me:-configure}:8385: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8386
8387             CPPFLAGS="$cf_test_CPPFLAGS"
8388             LIBS="-lutf8  $cf_save_LIBS"
8389             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8390             cat >conftest.$ac_ext <<_ACEOF
8391 #line 8391 "configure"
8392 #include "confdefs.h"
8393
8394 #include <libutf8.h>
8395 int
8396 main ()
8397 {
8398 putwc(0,0);
8399   ;
8400   return 0;
8401 }
8402 _ACEOF
8403 rm -f conftest.$ac_objext conftest$ac_exeext
8404 if { (eval echo "$as_me:8404: \"$ac_link\"") >&5
8405   (eval $ac_link) 2>&5
8406   ac_status=$?
8407   echo "$as_me:8407: \$? = $ac_status" >&5
8408   (exit $ac_status); } &&
8409          { ac_try='test -s conftest$ac_exeext'
8410   { (eval echo "$as_me:8410: \"$ac_try\"") >&5
8411   (eval $ac_try) 2>&5
8412   ac_status=$?
8413   echo "$as_me:8413: \$? = $ac_status" >&5
8414   (exit $ac_status); }; }; then
8415
8416                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8417
8418 echo "${as_me:-configure}:8418: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8419
8420                 cf_cv_find_linkage_utf8=yes
8421                 cf_cv_library_file_utf8="-lutf8"
8422                 break
8423 else
8424   echo "$as_me: failed program was:" >&5
8425 cat conftest.$ac_ext >&5
8426
8427                 CPPFLAGS="$cf_save_CPPFLAGS"
8428                 LIBS="$cf_save_LIBS"
8429                 LDFLAGS="$cf_save_LDFLAGS"
8430
8431 fi
8432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8433           fi
8434         done
8435         CPPFLAGS="$cf_save_CPPFLAGS"
8436         LDFLAGS="$cf_save_LDFLAGS"
8437       fi
8438
8439     else
8440       cf_cv_find_linkage_utf8=no
8441     fi
8442
8443 fi
8444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8445
8446 fi
8447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8448
8449 LIBS="$cf_save_LIBS"
8450
8451 if test "$cf_cv_find_linkage_utf8" = yes ; then
8452 cf_cv_utf8_lib=add-on
8453 else
8454 cf_cv_utf8_lib=no
8455 fi
8456
8457 fi
8458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8459 fi
8460 echo "$as_me:8460: result: $cf_cv_utf8_lib" >&5
8461 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8462
8463 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8464 # ncurses/ncursesw:
8465 if test "$cf_cv_utf8_lib" = "add-on" ; then
8466         cat >>confdefs.h <<\EOF
8467 #define HAVE_LIBUTF8_H 1
8468 EOF
8469
8470 if test -n "$cf_cv_header_path_utf8" ; then
8471   for cf_add_incdir in $cf_cv_header_path_utf8
8472   do
8473         while test $cf_add_incdir != /usr/include
8474         do
8475           if test -d $cf_add_incdir
8476           then
8477                 cf_have_incdir=no
8478                 if test -n "$CFLAGS$CPPFLAGS" ; then
8479                   # a loop is needed to ensure we can add subdirs of existing dirs
8480                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8481                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8482                           cf_have_incdir=yes; break
8483                         fi
8484                   done
8485                 fi
8486
8487                 if test "$cf_have_incdir" = no ; then
8488                   if test "$cf_add_incdir" = /usr/local/include ; then
8489                         if test "$GCC" = yes
8490                         then
8491                           cf_save_CPPFLAGS=$CPPFLAGS
8492                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8493                           cat >conftest.$ac_ext <<_ACEOF
8494 #line 8494 "configure"
8495 #include "confdefs.h"
8496 #include <stdio.h>
8497 int
8498 main ()
8499 {
8500 printf("Hello")
8501   ;
8502   return 0;
8503 }
8504 _ACEOF
8505 rm -f conftest.$ac_objext
8506 if { (eval echo "$as_me:8506: \"$ac_compile\"") >&5
8507   (eval $ac_compile) 2>&5
8508   ac_status=$?
8509   echo "$as_me:8509: \$? = $ac_status" >&5
8510   (exit $ac_status); } &&
8511          { ac_try='test -s conftest.$ac_objext'
8512   { (eval echo "$as_me:8512: \"$ac_try\"") >&5
8513   (eval $ac_try) 2>&5
8514   ac_status=$?
8515   echo "$as_me:8515: \$? = $ac_status" >&5
8516   (exit $ac_status); }; }; then
8517   :
8518 else
8519   echo "$as_me: failed program was:" >&5
8520 cat conftest.$ac_ext >&5
8521 cf_have_incdir=yes
8522 fi
8523 rm -f conftest.$ac_objext conftest.$ac_ext
8524                           CPPFLAGS=$cf_save_CPPFLAGS
8525                         fi
8526                   fi
8527                 fi
8528
8529                 if test "$cf_have_incdir" = no ; then
8530                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8531
8532 echo "${as_me:-configure}:8532: testing adding $cf_add_incdir to include-path ..." 1>&5
8533
8534                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8535
8536                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8537                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8538                   cf_add_incdir="$cf_top_incdir"
8539                 else
8540                   break
8541                 fi
8542           fi
8543         done
8544   done
8545 fi
8546
8547 if test -n "$cf_cv_library_path_utf8" ; then
8548   for cf_add_libdir in $cf_cv_library_path_utf8
8549   do
8550     if test $cf_add_libdir = /usr/lib ; then
8551       :
8552     elif test -d $cf_add_libdir
8553     then
8554       cf_have_libdir=no
8555       if test -n "$LDFLAGS$LIBS" ; then
8556         # a loop is needed to ensure we can add subdirs of existing dirs
8557         for cf_test_libdir in $LDFLAGS $LIBS ; do
8558           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8559             cf_have_libdir=yes; break
8560           fi
8561         done
8562       fi
8563       if test "$cf_have_libdir" = no ; then
8564         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8565
8566 echo "${as_me:-configure}:8566: testing adding $cf_add_libdir to library-path ..." 1>&5
8567
8568         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8569       fi
8570     fi
8571   done
8572 fi
8573
8574         LIBS="$cf_cv_library_file_utf8 $LIBS"
8575 fi
8576
8577                 if test "$cf_cv_utf8_lib" != no ; then
8578                         NCURSES_LIBUTF8=1
8579                 fi
8580         fi
8581
8582 # This is needed on Tru64 5.0 to declare mbstate_t
8583 echo "$as_me:8583: checking if we must include wchar.h to declare mbstate_t" >&5
8584 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8585 if test "${cf_cv_mbstate_t+set}" = set; then
8586   echo $ECHO_N "(cached) $ECHO_C" >&6
8587 else
8588
8589 cat >conftest.$ac_ext <<_ACEOF
8590 #line 8590 "configure"
8591 #include "confdefs.h"
8592
8593 #include <stdlib.h>
8594 #include <stdarg.h>
8595 #include <stdio.h>
8596 #ifdef HAVE_LIBUTF8_H
8597 #include <libutf8.h>
8598 #endif
8599 int
8600 main ()
8601 {
8602 mbstate_t state
8603   ;
8604   return 0;
8605 }
8606 _ACEOF
8607 rm -f conftest.$ac_objext
8608 if { (eval echo "$as_me:8608: \"$ac_compile\"") >&5
8609   (eval $ac_compile) 2>&5
8610   ac_status=$?
8611   echo "$as_me:8611: \$? = $ac_status" >&5
8612   (exit $ac_status); } &&
8613          { ac_try='test -s conftest.$ac_objext'
8614   { (eval echo "$as_me:8614: \"$ac_try\"") >&5
8615   (eval $ac_try) 2>&5
8616   ac_status=$?
8617   echo "$as_me:8617: \$? = $ac_status" >&5
8618   (exit $ac_status); }; }; then
8619   cf_cv_mbstate_t=no
8620 else
8621   echo "$as_me: failed program was:" >&5
8622 cat conftest.$ac_ext >&5
8623 cat >conftest.$ac_ext <<_ACEOF
8624 #line 8624 "configure"
8625 #include "confdefs.h"
8626
8627 #include <stdlib.h>
8628 #include <stdarg.h>
8629 #include <stdio.h>
8630 #include <wchar.h>
8631 #ifdef HAVE_LIBUTF8_H
8632 #include <libutf8.h>
8633 #endif
8634 int
8635 main ()
8636 {
8637 mbstate_t value
8638   ;
8639   return 0;
8640 }
8641 _ACEOF
8642 rm -f conftest.$ac_objext
8643 if { (eval echo "$as_me:8643: \"$ac_compile\"") >&5
8644   (eval $ac_compile) 2>&5
8645   ac_status=$?
8646   echo "$as_me:8646: \$? = $ac_status" >&5
8647   (exit $ac_status); } &&
8648          { ac_try='test -s conftest.$ac_objext'
8649   { (eval echo "$as_me:8649: \"$ac_try\"") >&5
8650   (eval $ac_try) 2>&5
8651   ac_status=$?
8652   echo "$as_me:8652: \$? = $ac_status" >&5
8653   (exit $ac_status); }; }; then
8654   cf_cv_mbstate_t=yes
8655 else
8656   echo "$as_me: failed program was:" >&5
8657 cat conftest.$ac_ext >&5
8658 cf_cv_mbstate_t=unknown
8659 fi
8660 rm -f conftest.$ac_objext conftest.$ac_ext
8661 fi
8662 rm -f conftest.$ac_objext conftest.$ac_ext
8663 fi
8664 echo "$as_me:8664: result: $cf_cv_mbstate_t" >&5
8665 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8666
8667 if test "$cf_cv_mbstate_t" = yes ; then
8668         cat >>confdefs.h <<\EOF
8669 #define NEED_WCHAR_H 1
8670 EOF
8671
8672         NEED_WCHAR_H=1
8673 fi
8674
8675 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8676 if test "$cf_cv_mbstate_t" = unknown ; then
8677         NCURSES_MBSTATE_T=1
8678 fi
8679
8680 # This is needed on Tru64 5.0 to declare wchar_t
8681 echo "$as_me:8681: checking if we must include wchar.h to declare wchar_t" >&5
8682 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8683 if test "${cf_cv_wchar_t+set}" = set; then
8684   echo $ECHO_N "(cached) $ECHO_C" >&6
8685 else
8686
8687 cat >conftest.$ac_ext <<_ACEOF
8688 #line 8688 "configure"
8689 #include "confdefs.h"
8690
8691 #include <stdlib.h>
8692 #include <stdarg.h>
8693 #include <stdio.h>
8694 #ifdef HAVE_LIBUTF8_H
8695 #include <libutf8.h>
8696 #endif
8697 int
8698 main ()
8699 {
8700 wchar_t state
8701   ;
8702   return 0;
8703 }
8704 _ACEOF
8705 rm -f conftest.$ac_objext
8706 if { (eval echo "$as_me:8706: \"$ac_compile\"") >&5
8707   (eval $ac_compile) 2>&5
8708   ac_status=$?
8709   echo "$as_me:8709: \$? = $ac_status" >&5
8710   (exit $ac_status); } &&
8711          { ac_try='test -s conftest.$ac_objext'
8712   { (eval echo "$as_me:8712: \"$ac_try\"") >&5
8713   (eval $ac_try) 2>&5
8714   ac_status=$?
8715   echo "$as_me:8715: \$? = $ac_status" >&5
8716   (exit $ac_status); }; }; then
8717   cf_cv_wchar_t=no
8718 else
8719   echo "$as_me: failed program was:" >&5
8720 cat conftest.$ac_ext >&5
8721 cat >conftest.$ac_ext <<_ACEOF
8722 #line 8722 "configure"
8723 #include "confdefs.h"
8724
8725 #include <stdlib.h>
8726 #include <stdarg.h>
8727 #include <stdio.h>
8728 #include <wchar.h>
8729 #ifdef HAVE_LIBUTF8_H
8730 #include <libutf8.h>
8731 #endif
8732 int
8733 main ()
8734 {
8735 wchar_t value
8736   ;
8737   return 0;
8738 }
8739 _ACEOF
8740 rm -f conftest.$ac_objext
8741 if { (eval echo "$as_me:8741: \"$ac_compile\"") >&5
8742   (eval $ac_compile) 2>&5
8743   ac_status=$?
8744   echo "$as_me:8744: \$? = $ac_status" >&5
8745   (exit $ac_status); } &&
8746          { ac_try='test -s conftest.$ac_objext'
8747   { (eval echo "$as_me:8747: \"$ac_try\"") >&5
8748   (eval $ac_try) 2>&5
8749   ac_status=$?
8750   echo "$as_me:8750: \$? = $ac_status" >&5
8751   (exit $ac_status); }; }; then
8752   cf_cv_wchar_t=yes
8753 else
8754   echo "$as_me: failed program was:" >&5
8755 cat conftest.$ac_ext >&5
8756 cf_cv_wchar_t=unknown
8757 fi
8758 rm -f conftest.$ac_objext conftest.$ac_ext
8759 fi
8760 rm -f conftest.$ac_objext conftest.$ac_ext
8761 fi
8762 echo "$as_me:8762: result: $cf_cv_wchar_t" >&5
8763 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8764
8765 if test "$cf_cv_wchar_t" = yes ; then
8766         cat >>confdefs.h <<\EOF
8767 #define NEED_WCHAR_H 1
8768 EOF
8769
8770         NEED_WCHAR_H=1
8771 fi
8772
8773 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8774 if test "$cf_cv_wchar_t" = unknown ; then
8775         NCURSES_WCHAR_T=1
8776 fi
8777
8778 # if we find wchar_t in either place, use substitution to provide a fallback.
8779 if test "$cf_cv_wchar_t" != unknown ; then
8780         NCURSES_OK_WCHAR_T=1
8781 fi
8782
8783 # This is needed on Tru64 5.0 to declare wint_t
8784 echo "$as_me:8784: checking if we must include wchar.h to declare wint_t" >&5
8785 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8786 if test "${cf_cv_wint_t+set}" = set; then
8787   echo $ECHO_N "(cached) $ECHO_C" >&6
8788 else
8789
8790 cat >conftest.$ac_ext <<_ACEOF
8791 #line 8791 "configure"
8792 #include "confdefs.h"
8793
8794 #include <stdlib.h>
8795 #include <stdarg.h>
8796 #include <stdio.h>
8797 #ifdef HAVE_LIBUTF8_H
8798 #include <libutf8.h>
8799 #endif
8800 int
8801 main ()
8802 {
8803 wint_t state
8804   ;
8805   return 0;
8806 }
8807 _ACEOF
8808 rm -f conftest.$ac_objext
8809 if { (eval echo "$as_me:8809: \"$ac_compile\"") >&5
8810   (eval $ac_compile) 2>&5
8811   ac_status=$?
8812   echo "$as_me:8812: \$? = $ac_status" >&5
8813   (exit $ac_status); } &&
8814          { ac_try='test -s conftest.$ac_objext'
8815   { (eval echo "$as_me:8815: \"$ac_try\"") >&5
8816   (eval $ac_try) 2>&5
8817   ac_status=$?
8818   echo "$as_me:8818: \$? = $ac_status" >&5
8819   (exit $ac_status); }; }; then
8820   cf_cv_wint_t=no
8821 else
8822   echo "$as_me: failed program was:" >&5
8823 cat conftest.$ac_ext >&5
8824 cat >conftest.$ac_ext <<_ACEOF
8825 #line 8825 "configure"
8826 #include "confdefs.h"
8827
8828 #include <stdlib.h>
8829 #include <stdarg.h>
8830 #include <stdio.h>
8831 #include <wchar.h>
8832 #ifdef HAVE_LIBUTF8_H
8833 #include <libutf8.h>
8834 #endif
8835 int
8836 main ()
8837 {
8838 wint_t value
8839   ;
8840   return 0;
8841 }
8842 _ACEOF
8843 rm -f conftest.$ac_objext
8844 if { (eval echo "$as_me:8844: \"$ac_compile\"") >&5
8845   (eval $ac_compile) 2>&5
8846   ac_status=$?
8847   echo "$as_me:8847: \$? = $ac_status" >&5
8848   (exit $ac_status); } &&
8849          { ac_try='test -s conftest.$ac_objext'
8850   { (eval echo "$as_me:8850: \"$ac_try\"") >&5
8851   (eval $ac_try) 2>&5
8852   ac_status=$?
8853   echo "$as_me:8853: \$? = $ac_status" >&5
8854   (exit $ac_status); }; }; then
8855   cf_cv_wint_t=yes
8856 else
8857   echo "$as_me: failed program was:" >&5
8858 cat conftest.$ac_ext >&5
8859 cf_cv_wint_t=unknown
8860 fi
8861 rm -f conftest.$ac_objext conftest.$ac_ext
8862 fi
8863 rm -f conftest.$ac_objext conftest.$ac_ext
8864 fi
8865 echo "$as_me:8865: result: $cf_cv_wint_t" >&5
8866 echo "${ECHO_T}$cf_cv_wint_t" >&6
8867
8868 if test "$cf_cv_wint_t" = yes ; then
8869         cat >>confdefs.h <<\EOF
8870 #define NEED_WCHAR_H 1
8871 EOF
8872
8873         NEED_WCHAR_H=1
8874 fi
8875
8876 # if we do not find wint_t in either place, use substitution to provide a fallback.
8877 if test "$cf_cv_wint_t" = unknown ; then
8878         NCURSES_WINT_T=1
8879 fi
8880
8881 # if we find wint_t in either place, use substitution to provide a fallback.
8882 if test "$cf_cv_wint_t" != unknown ; then
8883         NCURSES_OK_WINT_T=1
8884 fi
8885
8886         if test "$NCURSES_MBSTATE_T" != 0; then
8887                 cat >>confdefs.h <<\EOF
8888 #define NEED_MBSTATE_T_DEF 1
8889 EOF
8890
8891         fi
8892 fi
8893
8894 ###   use option --disable-lp64 to allow long chtype
8895 case $cf_cv_abi_version in
8896 [345]*)
8897         default_with_lp64=no
8898         ;;
8899 *)
8900         default_with_lp64=yes
8901         ;;
8902 esac
8903
8904 echo "$as_me:8904: checking whether to enable _LP64 definition in curses.h" >&5
8905 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8906
8907 # Check whether --enable-lp64 or --disable-lp64 was given.
8908 if test "${enable_lp64+set}" = set; then
8909   enableval="$enable_lp64"
8910   with_lp64=$enableval
8911 else
8912   with_lp64=$default_with_lp64
8913 fi;
8914 echo "$as_me:8914: result: $with_lp64" >&5
8915 echo "${ECHO_T}$with_lp64" >&6
8916
8917 if test "$with_lp64" = yes ; then
8918         cf_cv_enable_lp64=1
8919 else
8920         cf_cv_enable_lp64=0
8921 fi
8922
8923 # Check whether --enable-largefile or --disable-largefile was given.
8924 if test "${enable_largefile+set}" = set; then
8925   enableval="$enable_largefile"
8926
8927 fi;
8928 if test "$enable_largefile" != no; then
8929
8930   echo "$as_me:8930: checking for special C compiler options needed for large files" >&5
8931 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8932 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8933   echo $ECHO_N "(cached) $ECHO_C" >&6
8934 else
8935   ac_cv_sys_largefile_CC=no
8936      if test "$GCC" != yes; then
8937        ac_save_CC=$CC
8938        while :; do
8939          # IRIX 6.2 and later do not support large files by default,
8940          # so use the C compiler's -n32 option if that helps.
8941          cat >conftest.$ac_ext <<_ACEOF
8942 #line 8942 "configure"
8943 #include "confdefs.h"
8944 #include <sys/types.h>
8945  /* Check that off_t can represent 2**63 - 1 correctly.
8946     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8947     since some C++ compilers masquerading as C compilers
8948     incorrectly reject 9223372036854775807.  */
8949 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8950   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8951                        && LARGE_OFF_T % 2147483647 == 1)
8952                       ? 1 : -1];
8953 int
8954 main ()
8955 {
8956
8957   ;
8958   return 0;
8959 }
8960 _ACEOF
8961          rm -f conftest.$ac_objext
8962 if { (eval echo "$as_me:8962: \"$ac_compile\"") >&5
8963   (eval $ac_compile) 2>&5
8964   ac_status=$?
8965   echo "$as_me:8965: \$? = $ac_status" >&5
8966   (exit $ac_status); } &&
8967          { ac_try='test -s conftest.$ac_objext'
8968   { (eval echo "$as_me:8968: \"$ac_try\"") >&5
8969   (eval $ac_try) 2>&5
8970   ac_status=$?
8971   echo "$as_me:8971: \$? = $ac_status" >&5
8972   (exit $ac_status); }; }; then
8973   break
8974 else
8975   echo "$as_me: failed program was:" >&5
8976 cat conftest.$ac_ext >&5
8977 fi
8978 rm -f conftest.$ac_objext
8979          CC="$CC -n32"
8980          rm -f conftest.$ac_objext
8981 if { (eval echo "$as_me:8981: \"$ac_compile\"") >&5
8982   (eval $ac_compile) 2>&5
8983   ac_status=$?
8984   echo "$as_me:8984: \$? = $ac_status" >&5
8985   (exit $ac_status); } &&
8986          { ac_try='test -s conftest.$ac_objext'
8987   { (eval echo "$as_me:8987: \"$ac_try\"") >&5
8988   (eval $ac_try) 2>&5
8989   ac_status=$?
8990   echo "$as_me:8990: \$? = $ac_status" >&5
8991   (exit $ac_status); }; }; then
8992   ac_cv_sys_largefile_CC=' -n32'; break
8993 else
8994   echo "$as_me: failed program was:" >&5
8995 cat conftest.$ac_ext >&5
8996 fi
8997 rm -f conftest.$ac_objext
8998          break
8999        done
9000        CC=$ac_save_CC
9001        rm -f conftest.$ac_ext
9002     fi
9003 fi
9004 echo "$as_me:9004: result: $ac_cv_sys_largefile_CC" >&5
9005 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9006   if test "$ac_cv_sys_largefile_CC" != no; then
9007     CC=$CC$ac_cv_sys_largefile_CC
9008   fi
9009
9010   echo "$as_me:9010: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9011 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9012 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9013   echo $ECHO_N "(cached) $ECHO_C" >&6
9014 else
9015   while :; do
9016   ac_cv_sys_file_offset_bits=no
9017   cat >conftest.$ac_ext <<_ACEOF
9018 #line 9018 "configure"
9019 #include "confdefs.h"
9020 #include <sys/types.h>
9021  /* Check that off_t can represent 2**63 - 1 correctly.
9022     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9023     since some C++ compilers masquerading as C compilers
9024     incorrectly reject 9223372036854775807.  */
9025 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9026   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9027                        && LARGE_OFF_T % 2147483647 == 1)
9028                       ? 1 : -1];
9029 int
9030 main ()
9031 {
9032
9033   ;
9034   return 0;
9035 }
9036 _ACEOF
9037 rm -f conftest.$ac_objext
9038 if { (eval echo "$as_me:9038: \"$ac_compile\"") >&5
9039   (eval $ac_compile) 2>&5
9040   ac_status=$?
9041   echo "$as_me:9041: \$? = $ac_status" >&5
9042   (exit $ac_status); } &&
9043          { ac_try='test -s conftest.$ac_objext'
9044   { (eval echo "$as_me:9044: \"$ac_try\"") >&5
9045   (eval $ac_try) 2>&5
9046   ac_status=$?
9047   echo "$as_me:9047: \$? = $ac_status" >&5
9048   (exit $ac_status); }; }; then
9049   break
9050 else
9051   echo "$as_me: failed program was:" >&5
9052 cat conftest.$ac_ext >&5
9053 fi
9054 rm -f conftest.$ac_objext conftest.$ac_ext
9055   cat >conftest.$ac_ext <<_ACEOF
9056 #line 9056 "configure"
9057 #include "confdefs.h"
9058 #define _FILE_OFFSET_BITS 64
9059 #include <sys/types.h>
9060  /* Check that off_t can represent 2**63 - 1 correctly.
9061     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9062     since some C++ compilers masquerading as C compilers
9063     incorrectly reject 9223372036854775807.  */
9064 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9065   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9066                        && LARGE_OFF_T % 2147483647 == 1)
9067                       ? 1 : -1];
9068 int
9069 main ()
9070 {
9071
9072   ;
9073   return 0;
9074 }
9075 _ACEOF
9076 rm -f conftest.$ac_objext
9077 if { (eval echo "$as_me:9077: \"$ac_compile\"") >&5
9078   (eval $ac_compile) 2>&5
9079   ac_status=$?
9080   echo "$as_me:9080: \$? = $ac_status" >&5
9081   (exit $ac_status); } &&
9082          { ac_try='test -s conftest.$ac_objext'
9083   { (eval echo "$as_me:9083: \"$ac_try\"") >&5
9084   (eval $ac_try) 2>&5
9085   ac_status=$?
9086   echo "$as_me:9086: \$? = $ac_status" >&5
9087   (exit $ac_status); }; }; then
9088   ac_cv_sys_file_offset_bits=64; break
9089 else
9090   echo "$as_me: failed program was:" >&5
9091 cat conftest.$ac_ext >&5
9092 fi
9093 rm -f conftest.$ac_objext conftest.$ac_ext
9094   break
9095 done
9096 fi
9097 echo "$as_me:9097: result: $ac_cv_sys_file_offset_bits" >&5
9098 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9099 if test "$ac_cv_sys_file_offset_bits" != no; then
9100
9101 cat >>confdefs.h <<EOF
9102 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9103 EOF
9104
9105 fi
9106 rm -rf conftest*
9107   echo "$as_me:9107: checking for _LARGE_FILES value needed for large files" >&5
9108 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9109 if test "${ac_cv_sys_large_files+set}" = set; then
9110   echo $ECHO_N "(cached) $ECHO_C" >&6
9111 else
9112   while :; do
9113   ac_cv_sys_large_files=no
9114   cat >conftest.$ac_ext <<_ACEOF
9115 #line 9115 "configure"
9116 #include "confdefs.h"
9117 #include <sys/types.h>
9118  /* Check that off_t can represent 2**63 - 1 correctly.
9119     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9120     since some C++ compilers masquerading as C compilers
9121     incorrectly reject 9223372036854775807.  */
9122 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9123   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9124                        && LARGE_OFF_T % 2147483647 == 1)
9125                       ? 1 : -1];
9126 int
9127 main ()
9128 {
9129
9130   ;
9131   return 0;
9132 }
9133 _ACEOF
9134 rm -f conftest.$ac_objext
9135 if { (eval echo "$as_me:9135: \"$ac_compile\"") >&5
9136   (eval $ac_compile) 2>&5
9137   ac_status=$?
9138   echo "$as_me:9138: \$? = $ac_status" >&5
9139   (exit $ac_status); } &&
9140          { ac_try='test -s conftest.$ac_objext'
9141   { (eval echo "$as_me:9141: \"$ac_try\"") >&5
9142   (eval $ac_try) 2>&5
9143   ac_status=$?
9144   echo "$as_me:9144: \$? = $ac_status" >&5
9145   (exit $ac_status); }; }; then
9146   break
9147 else
9148   echo "$as_me: failed program was:" >&5
9149 cat conftest.$ac_ext >&5
9150 fi
9151 rm -f conftest.$ac_objext conftest.$ac_ext
9152   cat >conftest.$ac_ext <<_ACEOF
9153 #line 9153 "configure"
9154 #include "confdefs.h"
9155 #define _LARGE_FILES 1
9156 #include <sys/types.h>
9157  /* Check that off_t can represent 2**63 - 1 correctly.
9158     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9159     since some C++ compilers masquerading as C compilers
9160     incorrectly reject 9223372036854775807.  */
9161 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9162   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9163                        && LARGE_OFF_T % 2147483647 == 1)
9164                       ? 1 : -1];
9165 int
9166 main ()
9167 {
9168
9169   ;
9170   return 0;
9171 }
9172 _ACEOF
9173 rm -f conftest.$ac_objext
9174 if { (eval echo "$as_me:9174: \"$ac_compile\"") >&5
9175   (eval $ac_compile) 2>&5
9176   ac_status=$?
9177   echo "$as_me:9177: \$? = $ac_status" >&5
9178   (exit $ac_status); } &&
9179          { ac_try='test -s conftest.$ac_objext'
9180   { (eval echo "$as_me:9180: \"$ac_try\"") >&5
9181   (eval $ac_try) 2>&5
9182   ac_status=$?
9183   echo "$as_me:9183: \$? = $ac_status" >&5
9184   (exit $ac_status); }; }; then
9185   ac_cv_sys_large_files=1; break
9186 else
9187   echo "$as_me: failed program was:" >&5
9188 cat conftest.$ac_ext >&5
9189 fi
9190 rm -f conftest.$ac_objext conftest.$ac_ext
9191   break
9192 done
9193 fi
9194 echo "$as_me:9194: result: $ac_cv_sys_large_files" >&5
9195 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9196 if test "$ac_cv_sys_large_files" != no; then
9197
9198 cat >>confdefs.h <<EOF
9199 #define _LARGE_FILES $ac_cv_sys_large_files
9200 EOF
9201
9202 fi
9203 rm -rf conftest*
9204 fi
9205
9206     if test "$enable_largefile" != no ; then
9207         echo "$as_me:9207: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9208 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9209 if test "${ac_cv_sys_largefile_source+set}" = set; then
9210   echo $ECHO_N "(cached) $ECHO_C" >&6
9211 else
9212   while :; do
9213   ac_cv_sys_largefile_source=no
9214   cat >conftest.$ac_ext <<_ACEOF
9215 #line 9215 "configure"
9216 #include "confdefs.h"
9217 #include <stdio.h>
9218 int
9219 main ()
9220 {
9221 return !fseeko;
9222   ;
9223   return 0;
9224 }
9225 _ACEOF
9226 rm -f conftest.$ac_objext
9227 if { (eval echo "$as_me:9227: \"$ac_compile\"") >&5
9228   (eval $ac_compile) 2>&5
9229   ac_status=$?
9230   echo "$as_me:9230: \$? = $ac_status" >&5
9231   (exit $ac_status); } &&
9232          { ac_try='test -s conftest.$ac_objext'
9233   { (eval echo "$as_me:9233: \"$ac_try\"") >&5
9234   (eval $ac_try) 2>&5
9235   ac_status=$?
9236   echo "$as_me:9236: \$? = $ac_status" >&5
9237   (exit $ac_status); }; }; then
9238   break
9239 else
9240   echo "$as_me: failed program was:" >&5
9241 cat conftest.$ac_ext >&5
9242 fi
9243 rm -f conftest.$ac_objext conftest.$ac_ext
9244   cat >conftest.$ac_ext <<_ACEOF
9245 #line 9245 "configure"
9246 #include "confdefs.h"
9247 #define _LARGEFILE_SOURCE 1
9248 #include <stdio.h>
9249 int
9250 main ()
9251 {
9252 return !fseeko;
9253   ;
9254   return 0;
9255 }
9256 _ACEOF
9257 rm -f conftest.$ac_objext
9258 if { (eval echo "$as_me:9258: \"$ac_compile\"") >&5
9259   (eval $ac_compile) 2>&5
9260   ac_status=$?
9261   echo "$as_me:9261: \$? = $ac_status" >&5
9262   (exit $ac_status); } &&
9263          { ac_try='test -s conftest.$ac_objext'
9264   { (eval echo "$as_me:9264: \"$ac_try\"") >&5
9265   (eval $ac_try) 2>&5
9266   ac_status=$?
9267   echo "$as_me:9267: \$? = $ac_status" >&5
9268   (exit $ac_status); }; }; then
9269   ac_cv_sys_largefile_source=1; break
9270 else
9271   echo "$as_me: failed program was:" >&5
9272 cat conftest.$ac_ext >&5
9273 fi
9274 rm -f conftest.$ac_objext conftest.$ac_ext
9275   break
9276 done
9277 fi
9278 echo "$as_me:9278: result: $ac_cv_sys_largefile_source" >&5
9279 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9280 if test "$ac_cv_sys_largefile_source" != no; then
9281
9282 cat >>confdefs.h <<EOF
9283 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9284 EOF
9285
9286 fi
9287 rm -rf conftest*
9288
9289 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9290 # in glibc 2.1.3, but that breaks too many other things.
9291 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9292 echo "$as_me:9292: checking for fseeko" >&5
9293 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9294 if test "${ac_cv_func_fseeko+set}" = set; then
9295   echo $ECHO_N "(cached) $ECHO_C" >&6
9296 else
9297   cat >conftest.$ac_ext <<_ACEOF
9298 #line 9298 "configure"
9299 #include "confdefs.h"
9300 #include <stdio.h>
9301 int
9302 main ()
9303 {
9304 return fseeko && fseeko (stdin, 0, 0);
9305   ;
9306   return 0;
9307 }
9308 _ACEOF
9309 rm -f conftest.$ac_objext conftest$ac_exeext
9310 if { (eval echo "$as_me:9310: \"$ac_link\"") >&5
9311   (eval $ac_link) 2>&5
9312   ac_status=$?
9313   echo "$as_me:9313: \$? = $ac_status" >&5
9314   (exit $ac_status); } &&
9315          { ac_try='test -s conftest$ac_exeext'
9316   { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9317   (eval $ac_try) 2>&5
9318   ac_status=$?
9319   echo "$as_me:9319: \$? = $ac_status" >&5
9320   (exit $ac_status); }; }; then
9321   ac_cv_func_fseeko=yes
9322 else
9323   echo "$as_me: failed program was:" >&5
9324 cat conftest.$ac_ext >&5
9325 ac_cv_func_fseeko=no
9326 fi
9327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9328 fi
9329 echo "$as_me:9329: result: $ac_cv_func_fseeko" >&5
9330 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9331 if test $ac_cv_func_fseeko = yes; then
9332
9333 cat >>confdefs.h <<\EOF
9334 #define HAVE_FSEEKO 1
9335 EOF
9336
9337 fi
9338
9339         # Normally we would collect these definitions in the config.h,
9340         # but (like _XOPEN_SOURCE), some environments rely on having these
9341         # defined before any of the system headers are included.  Another
9342         # case comes up with C++, e.g., on AIX the compiler compiles the
9343         # header files by themselves before looking at the body files it is
9344         # told to compile.  For ncurses, those header files do not include
9345         # the config.h
9346         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9347         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9348         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9349
9350         echo "$as_me:9350: checking whether to use struct dirent64" >&5
9351 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9352 if test "${cf_cv_struct_dirent64+set}" = set; then
9353   echo $ECHO_N "(cached) $ECHO_C" >&6
9354 else
9355
9356                 cat >conftest.$ac_ext <<_ACEOF
9357 #line 9357 "configure"
9358 #include "confdefs.h"
9359
9360 #include <sys/types.h>
9361 #include <dirent.h>
9362
9363 int
9364 main ()
9365 {
9366
9367                 /* if transitional largefile support is setup, this is true */
9368                 extern struct dirent64 * readdir(DIR *);
9369                 struct dirent64 *x = readdir((DIR *)0);
9370                 struct dirent *y = readdir((DIR *)0);
9371                 int z = x - y;
9372
9373   ;
9374   return 0;
9375 }
9376 _ACEOF
9377 rm -f conftest.$ac_objext
9378 if { (eval echo "$as_me:9378: \"$ac_compile\"") >&5
9379   (eval $ac_compile) 2>&5
9380   ac_status=$?
9381   echo "$as_me:9381: \$? = $ac_status" >&5
9382   (exit $ac_status); } &&
9383          { ac_try='test -s conftest.$ac_objext'
9384   { (eval echo "$as_me:9384: \"$ac_try\"") >&5
9385   (eval $ac_try) 2>&5
9386   ac_status=$?
9387   echo "$as_me:9387: \$? = $ac_status" >&5
9388   (exit $ac_status); }; }; then
9389   cf_cv_struct_dirent64=yes
9390 else
9391   echo "$as_me: failed program was:" >&5
9392 cat conftest.$ac_ext >&5
9393 cf_cv_struct_dirent64=no
9394 fi
9395 rm -f conftest.$ac_objext conftest.$ac_ext
9396
9397 fi
9398 echo "$as_me:9398: result: $cf_cv_struct_dirent64" >&5
9399 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9400         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9401 #define HAVE_STRUCT_DIRENT64 1
9402 EOF
9403
9404     fi
9405
9406 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9407 echo "$as_me:9407: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9408 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9409
9410 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9411 if test "${enable_tparm_varargs+set}" = set; then
9412   enableval="$enable_tparm_varargs"
9413   with_tparm_varargs=$enableval
9414 else
9415   with_tparm_varargs=yes
9416 fi;
9417 echo "$as_me:9417: result: $with_tparm_varargs" >&5
9418 echo "${ECHO_T}$with_tparm_varargs" >&6
9419 NCURSES_TPARM_VARARGS=0
9420 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9421
9422 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9423 if test "$with_ticlib" != no ; then
9424 echo "$as_me:9424: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9425 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9426
9427 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9428 if test "${enable_tic_depends+set}" = set; then
9429   enableval="$enable_tic_depends"
9430   with_tic_depends=$enableval
9431 else
9432   with_tic_depends=yes
9433 fi;
9434 echo "$as_me:9434: result: $with_tic_depends" >&5
9435 echo "${ECHO_T}$with_tic_depends" >&6
9436 else
9437         with_tic_depends=no
9438 fi
9439
9440 ###   use option --with-bool to override bool's type
9441 echo "$as_me:9441: checking for type of bool" >&5
9442 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9443
9444 # Check whether --with-bool or --without-bool was given.
9445 if test "${with_bool+set}" = set; then
9446   withval="$with_bool"
9447   NCURSES_BOOL="$withval"
9448 else
9449   NCURSES_BOOL=auto
9450 fi;
9451 echo "$as_me:9451: result: $NCURSES_BOOL" >&5
9452 echo "${ECHO_T}$NCURSES_BOOL" >&6
9453
9454 echo "$as_me:9454: checking for alternate terminal capabilities file" >&5
9455 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9456
9457 # Check whether --with-caps or --without-caps was given.
9458 if test "${with_caps+set}" = set; then
9459   withval="$with_caps"
9460   TERMINFO_CAPS=Caps.$withval
9461 else
9462   TERMINFO_CAPS=Caps
9463 fi;
9464 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9465 echo "$as_me:9465: result: $TERMINFO_CAPS" >&5
9466 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9467
9468 ###   use option --with-chtype to override chtype's type
9469 echo "$as_me:9469: checking for type of chtype" >&5
9470 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9471
9472 # Check whether --with-chtype or --without-chtype was given.
9473 if test "${with_chtype+set}" = set; then
9474   withval="$with_chtype"
9475   NCURSES_CHTYPE="$withval"
9476 else
9477   NCURSES_CHTYPE=auto
9478 fi;
9479 echo "$as_me:9479: result: $NCURSES_CHTYPE" >&5
9480 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9481
9482 ###   use option --with-ospeed to override ospeed's type
9483 echo "$as_me:9483: checking for type of ospeed" >&5
9484 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9485
9486 # Check whether --with-ospeed or --without-ospeed was given.
9487 if test "${with_ospeed+set}" = set; then
9488   withval="$with_ospeed"
9489   NCURSES_OSPEED="$withval"
9490 else
9491   NCURSES_OSPEED=short
9492 fi;
9493 echo "$as_me:9493: result: $NCURSES_OSPEED" >&5
9494 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9495
9496 ###   use option --with-mmask-t to override mmask_t's type
9497 echo "$as_me:9497: checking for type of mmask_t" >&5
9498 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9499
9500 # Check whether --with-mmask-t or --without-mmask-t was given.
9501 if test "${with_mmask_t+set}" = set; then
9502   withval="$with_mmask_t"
9503   NCURSES_MMASK_T="$withval"
9504 else
9505   NCURSES_MMASK_T=auto
9506 fi;
9507 echo "$as_me:9507: result: $NCURSES_MMASK_T" >&5
9508 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9509
9510 ###   use option --with-ccharw-max to override CCHARW_MAX size
9511 echo "$as_me:9511: checking for size CCHARW_MAX" >&5
9512 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9513
9514 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9515 if test "${with_ccharw_max+set}" = set; then
9516   withval="$with_ccharw_max"
9517   NCURSES_CCHARW_MAX="$withval"
9518 else
9519   NCURSES_CCHARW_MAX=5
9520 fi;
9521 echo "$as_me:9521: result: $NCURSES_CCHARW_MAX" >&5
9522 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9523
9524 ### Enable compiling-in rcs id's
9525 echo "$as_me:9525: checking if RCS identifiers should be compiled-in" >&5
9526 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9527
9528 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9529 if test "${with_rcs_ids+set}" = set; then
9530   withval="$with_rcs_ids"
9531   with_rcs_ids=$withval
9532 else
9533   with_rcs_ids=no
9534 fi;
9535 echo "$as_me:9535: result: $with_rcs_ids" >&5
9536 echo "${ECHO_T}$with_rcs_ids" >&6
9537 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9538 #define USE_RCS_IDS 1
9539 EOF
9540
9541 ###############################################################################
9542
9543 echo "$as_me:9543: checking format of man-pages" >&5
9544 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9545
9546 # Check whether --with-manpage-format or --without-manpage-format was given.
9547 if test "${with_manpage_format+set}" = set; then
9548   withval="$with_manpage_format"
9549   MANPAGE_FORMAT=$withval
9550 else
9551   MANPAGE_FORMAT=unknown
9552 fi;
9553
9554 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9555 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9556
9557 cf_unknown=
9558
9559 case $MANPAGE_FORMAT in
9560 unknown)
9561   if test -z "$MANPATH" ; then
9562     MANPATH="/usr/man:/usr/share/man"
9563   fi
9564
9565   # look for the 'date' man-page (it's most likely to be installed!)
9566   MANPAGE_FORMAT=
9567   cf_preform=no
9568   cf_catonly=yes
9569   cf_example=date
9570
9571   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9572   for cf_dir in $MANPATH; do
9573     test -z "$cf_dir" && cf_dir=/usr/man
9574     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
9575     do
9576       cf_test=`echo $cf_name | sed -e 's/*//'`
9577       if test "x$cf_test" = "x$cf_name" ; then
9578
9579         case "$cf_name" in
9580         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9581         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9582         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9583         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9584         esac
9585
9586         case "$cf_name" in
9587         $cf_dir/man*)
9588           cf_catonly=no
9589           ;;
9590         $cf_dir/cat*)
9591           cf_preform=yes
9592           ;;
9593         esac
9594         break
9595       fi
9596
9597       # if we found a match in either man* or cat*, stop looking
9598       if test -n "$MANPAGE_FORMAT" ; then
9599         cf_found=no
9600         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9601         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9602         case "$cf_name" in
9603         $cf_dir/cat*)
9604           cf_found=yes
9605           ;;
9606         esac
9607         test $cf_found=yes && break
9608       fi
9609     done
9610     # only check the first directory in $MANPATH where we find manpages
9611     if test -n "$MANPAGE_FORMAT" ; then
9612        break
9613     fi
9614   done
9615   # if we did not find the example, just assume it is normal
9616   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9617   IFS="$ac_save_ifs"
9618   ;;
9619 *)
9620   for cf_option in $MANPAGE_FORMAT; do
9621      case $cf_option in #(vi
9622      gzip|compress|BSDI|normal|formatted|catonly)
9623        ;;
9624      *)
9625        cf_unknown="$cf_unknown $cf_option"
9626        ;;
9627      esac
9628   done
9629   ;;
9630 esac
9631
9632 echo "$as_me:9632: result: $MANPAGE_FORMAT" >&5
9633 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9634 if test -n "$cf_unknown" ; then
9635   { echo "$as_me:9635: WARNING: Unexpected manpage-format $cf_unknown" >&5
9636 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9637 fi
9638
9639 echo "$as_me:9639: checking for manpage renaming" >&5
9640 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9641
9642 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9643 if test "${with_manpage_renames+set}" = set; then
9644   withval="$with_manpage_renames"
9645   MANPAGE_RENAMES=$withval
9646 else
9647   MANPAGE_RENAMES=yes
9648 fi;
9649
9650 case ".$MANPAGE_RENAMES" in #(vi
9651 .no) #(vi
9652   ;;
9653 .|.yes)
9654   # Debian 'man' program?
9655   if test -f /etc/debian_version ; then
9656     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9657   else
9658     MANPAGE_RENAMES=no
9659   fi
9660   ;;
9661 esac
9662
9663 if test "$MANPAGE_RENAMES" != no ; then
9664   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9665     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9666   elif test ! -f $MANPAGE_RENAMES ; then
9667     { { echo "$as_me:9667: error: not a filename: $MANPAGE_RENAMES" >&5
9668 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9669    { (exit 1); exit 1; }; }
9670   fi
9671
9672   test ! -d man && mkdir man
9673
9674   # Construct a sed-script to perform renaming within man-pages
9675   if test -n "$MANPAGE_RENAMES" ; then
9676     test ! -d man && mkdir man
9677     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9678   fi
9679 fi
9680
9681 echo "$as_me:9681: result: $MANPAGE_RENAMES" >&5
9682 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9683
9684 echo "$as_me:9684: checking if manpage aliases will be installed" >&5
9685 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9686
9687 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9688 if test "${with_manpage_aliases+set}" = set; then
9689   withval="$with_manpage_aliases"
9690   MANPAGE_ALIASES=$withval
9691 else
9692   MANPAGE_ALIASES=yes
9693 fi;
9694
9695 echo "$as_me:9695: result: $MANPAGE_ALIASES" >&5
9696 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9697
9698 case "x$LN_S" in #(vi
9699 xln*) #(vi
9700         cf_use_symlinks=yes
9701         ;;
9702 *)
9703         cf_use_symlinks=no
9704         ;;
9705 esac
9706
9707 MANPAGE_SYMLINKS=no
9708 if test "$MANPAGE_ALIASES" = yes ; then
9709 echo "$as_me:9709: checking if manpage symlinks should be used" >&5
9710 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9711
9712 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9713 if test "${with_manpage_symlinks+set}" = set; then
9714   withval="$with_manpage_symlinks"
9715   MANPAGE_SYMLINKS=$withval
9716 else
9717   MANPAGE_SYMLINKS=$cf_use_symlinks
9718 fi;
9719
9720 if test "$$cf_use_symlinks" = no; then
9721 if test "$MANPAGE_SYMLINKS" = yes ; then
9722         { echo "$as_me:9722: WARNING: cannot make symlinks" >&5
9723 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9724         MANPAGE_SYMLINKS=no
9725 fi
9726 fi
9727
9728 echo "$as_me:9728: result: $MANPAGE_SYMLINKS" >&5
9729 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9730 fi
9731
9732 echo "$as_me:9732: checking for manpage tbl" >&5
9733 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9734
9735 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9736 if test "${with_manpage_tbl+set}" = set; then
9737   withval="$with_manpage_tbl"
9738   MANPAGE_TBL=$withval
9739 else
9740   MANPAGE_TBL=no
9741 fi;
9742
9743 echo "$as_me:9743: result: $MANPAGE_TBL" >&5
9744 echo "${ECHO_T}$MANPAGE_TBL" >&6
9745
9746   if test "$prefix" = "NONE" ; then
9747      cf_prefix="$ac_default_prefix"
9748   else
9749      cf_prefix="$prefix"
9750   fi
9751
9752   case "$MANPAGE_FORMAT" in # (vi
9753   *catonly*) # (vi
9754     cf_format=yes
9755     cf_inboth=no
9756     ;;
9757   *formatted*) # (vi
9758     cf_format=yes
9759     cf_inboth=yes
9760     ;;
9761   *)
9762     cf_format=no
9763     cf_inboth=no
9764     ;;
9765   esac
9766
9767 test ! -d man && mkdir man
9768
9769 cf_so_strip=
9770 cf_compress=
9771 case "$MANPAGE_FORMAT" in #(vi
9772 *compress*) #(vi
9773         cf_so_strip="Z"
9774         cf_compress=compress
9775   ;;
9776 *gzip*)
9777         cf_so_strip="gz"
9778         cf_compress=gzip
9779   ;;
9780 esac
9781
9782 cf_edit_man=./edit_man.sh
9783 cf_man_alias=`pwd`/man_alias.sed
9784
9785 cat >$cf_edit_man <<CF_EOF
9786 #! /bin/sh
9787 # this script is generated by the configure-script CF_MAN_PAGES macro.
9788
9789 prefix="$cf_prefix"
9790 datadir="$datadir"
9791
9792 NCURSES_MAJOR="$NCURSES_MAJOR"
9793 NCURSES_MINOR="$NCURSES_MINOR"
9794 NCURSES_PATCH="$NCURSES_PATCH"
9795
9796 NCURSES_OSPEED="$NCURSES_OSPEED"
9797 TERMINFO="$TERMINFO"
9798
9799 INSTALL="$INSTALL"
9800 INSTALL_DATA="$INSTALL_DATA"
9801
9802 transform="$program_transform_name"
9803
9804 TMP=\${TMPDIR:=/tmp}/man\$\$
9805 trap "rm -f \$TMP" 0 1 2 5 15
9806
9807 form=\$1
9808 shift || exit 1
9809
9810 verb=\$1
9811 shift || exit 1
9812
9813 mandir=\$1
9814 shift || exit 1
9815
9816 srcdir=\$1
9817 top_srcdir=\$srcdir/..
9818 shift || exit 1
9819
9820 if test "\$form" = normal ; then
9821         if test "$cf_format" = yes ; then
9822         if test "$cf_inboth" = no ; then
9823                 sh \$0 format \$verb \$mandir \$srcdir \$*
9824                 exit $?
9825         fi
9826         fi
9827         cf_subdir=\$mandir/man
9828         cf_tables=$MANPAGE_TBL
9829 else
9830         cf_subdir=\$mandir/cat
9831         cf_tables=yes
9832 fi
9833
9834 # process the list of source-files
9835 for i in \$* ; do
9836 case \$i in #(vi
9837 *.orig|*.rej) ;; #(vi
9838 *.[0-9]*)
9839         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9840         if test \$verb = installing ; then
9841         if test ! -d \$cf_subdir\${section} ; then
9842                 mkdir -p \$cf_subdir\$section
9843         fi
9844         fi
9845
9846         # replace variables in man page
9847         if test ! -f $cf_man_alias ; then
9848 cat >>$cf_man_alias <<-CF_EOF2
9849                 s,@DATADIR@,\$datadir,g
9850                 s,@TERMINFO@,\$TERMINFO,g
9851                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9852                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9853                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9854                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9855 CF_EOF
9856
9857         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9858         do
9859                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9860                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9861 cat >>$cf_edit_man <<-CF_EOF
9862                 s,@$cf_NAME@,$cf_name,g
9863 CF_EOF
9864         done
9865
9866 cat >>$cf_edit_man <<CF_EOF
9867 CF_EOF2
9868                 echo "...made $cf_man_alias"
9869         fi
9870
9871         aliases=
9872         cf_source=\`basename \$i\`
9873         inalias=\$cf_source
9874         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9875         if test ! -f \$inalias ; then
9876                 echo .. skipped \$cf_source
9877                 continue
9878         fi
9879 CF_EOF
9880
9881 if test "$MANPAGE_ALIASES" != no ; then
9882 cat >>$cf_edit_man <<CF_EOF
9883         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9884 CF_EOF
9885 fi
9886
9887 if test "$MANPAGE_RENAMES" = no ; then
9888 cat >>$cf_edit_man <<CF_EOF
9889         # perform program transformations for section 1 man pages
9890         if test \$section = 1 ; then
9891                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9892         else
9893                 cf_target=\$cf_subdir\${section}/\$cf_source
9894         fi
9895 CF_EOF
9896 else
9897 cat >>$cf_edit_man <<CF_EOF
9898         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9899         if test -z "\$cf_target" ; then
9900                 echo '? missing rename for '\$cf_source
9901                 cf_target="\$cf_source"
9902         fi
9903         cf_target="\$cf_subdir\${section}/\${cf_target}"
9904
9905 CF_EOF
9906 fi
9907
9908 cat >>$cf_edit_man <<CF_EOF
9909         sed     -f $cf_man_alias \\
9910 CF_EOF
9911
9912 if test -f $MANPAGE_RENAMES ; then
9913 cat >>$cf_edit_man <<CF_EOF
9914                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9915 CF_EOF
9916 else
9917 cat >>$cf_edit_man <<CF_EOF
9918                 < \$i >\$TMP
9919 CF_EOF
9920 fi
9921
9922 cat >>$cf_edit_man <<CF_EOF
9923 if test \$cf_tables = yes ; then
9924         tbl \$TMP >\$TMP.out
9925         mv \$TMP.out \$TMP
9926 fi
9927 CF_EOF
9928
9929 if test $with_curses_h != yes ; then
9930 cat >>$cf_edit_man <<CF_EOF
9931         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9932         mv \$TMP.out \$TMP
9933 CF_EOF
9934 fi
9935
9936 cat >>$cf_edit_man <<CF_EOF
9937         if test \$form = format ; then
9938                 nroff -man \$TMP >\$TMP.out
9939                 mv \$TMP.out \$TMP
9940         fi
9941 CF_EOF
9942
9943 if test -n "$cf_compress" ; then
9944 cat >>$cf_edit_man <<CF_EOF
9945         if test \$verb = installing ; then
9946         if ( $cf_compress -f \$TMP )
9947         then
9948                 mv \$TMP.$cf_so_strip \$TMP
9949         fi
9950         fi
9951         cf_target="\$cf_target.$cf_so_strip"
9952 CF_EOF
9953 fi
9954
9955 case "$MANPAGE_FORMAT" in #(vi
9956 *BSDI*)
9957 cat >>$cf_edit_man <<CF_EOF
9958         if test \$form = format ; then
9959                 # BSDI installs only .0 suffixes in the cat directories
9960                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9961         fi
9962 CF_EOF
9963   ;;
9964 esac
9965
9966 cat >>$cf_edit_man <<CF_EOF
9967         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9968         if test \$verb = installing ; then
9969                 echo \$verb \$cf_target
9970                 \$INSTALL_DATA \$TMP \$cf_target
9971                 test -d \$cf_subdir\${section} &&
9972                 test -n "\$aliases" && (
9973                         cd \$cf_subdir\${section} && (
9974                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9975                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9976                                 cf_target=\`basename \$cf_target\`
9977                                 for cf_alias in \$aliases
9978                                 do
9979                                         if test \$section = 1 ; then
9980                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9981                                         fi
9982
9983                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9984                                                 if test -f \$cf_alias\${suffix} ; then
9985                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9986                                                         then
9987                                                                 continue
9988                                                         fi
9989                                                 fi
9990                                                 echo .. \$verb alias \$cf_alias\${suffix}
9991 CF_EOF
9992 case "x$LN_S" in #(vi
9993 *-f) #(vi
9994 cat >>$cf_edit_man <<CF_EOF
9995                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9996 CF_EOF
9997         ;;
9998 *)
9999 cat >>$cf_edit_man <<CF_EOF
10000                                                 rm -f \$cf_alias\${suffix}
10001                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10002 CF_EOF
10003         ;;
10004 esac
10005 cat >>$cf_edit_man <<CF_EOF
10006                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10007                                                 echo ".so \$cf_source" >\$TMP
10008 CF_EOF
10009 if test -n "$cf_compress" ; then
10010 cat >>$cf_edit_man <<CF_EOF
10011                                                 if test -n "$cf_so_strip" ; then
10012                                                         $cf_compress -f \$TMP
10013                                                         mv \$TMP.$cf_so_strip \$TMP
10014                                                 fi
10015 CF_EOF
10016 fi
10017 cat >>$cf_edit_man <<CF_EOF
10018                                                 echo .. \$verb alias \$cf_alias\${suffix}
10019                                                 rm -f \$cf_alias\${suffix}
10020                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10021                                         fi
10022                                 done
10023                         )
10024                 )
10025         elif test \$verb = removing ; then
10026                 test -f \$cf_target && (
10027                         echo \$verb \$cf_target
10028                         rm -f \$cf_target
10029                 )
10030                 test -d \$cf_subdir\${section} &&
10031                 test -n "\$aliases" && (
10032                         cd \$cf_subdir\${section} && (
10033                                 for cf_alias in \$aliases
10034                                 do
10035                                         if test \$section = 1 ; then
10036                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10037                                         fi
10038
10039                                         echo .. \$verb alias \$cf_alias\${suffix}
10040                                         rm -f \$cf_alias\${suffix}
10041                                 done
10042                         )
10043                 )
10044         else
10045 #               echo ".hy 0"
10046                 cat \$TMP
10047         fi
10048         ;;
10049 esac
10050 done
10051
10052 if test $cf_inboth = yes ; then
10053 if test \$form != format ; then
10054         sh \$0 format \$verb \$mandir \$srcdir \$*
10055 fi
10056 fi
10057
10058 exit 0
10059 CF_EOF
10060 chmod 755 $cf_edit_man
10061
10062 ###############################################################################
10063
10064 ### Note that some functions (such as const) are normally disabled anyway.
10065 echo "$as_me:10065: checking if you want to build with function extensions" >&5
10066 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10067
10068 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10069 if test "${enable_ext_funcs+set}" = set; then
10070   enableval="$enable_ext_funcs"
10071   with_ext_funcs=$enableval
10072 else
10073   with_ext_funcs=yes
10074 fi;
10075 echo "$as_me:10075: result: $with_ext_funcs" >&5
10076 echo "${ECHO_T}$with_ext_funcs" >&6
10077 if test "$with_ext_funcs" = yes ; then
10078         NCURSES_EXT_FUNCS=1
10079         cat >>confdefs.h <<\EOF
10080 #define HAVE_ASSUME_DEFAULT_COLORS 1
10081 EOF
10082
10083         cat >>confdefs.h <<\EOF
10084 #define HAVE_CURSES_VERSION 1
10085 EOF
10086
10087         cat >>confdefs.h <<\EOF
10088 #define HAVE_HAS_KEY 1
10089 EOF
10090
10091         cat >>confdefs.h <<\EOF
10092 #define HAVE_RESIZETERM 1
10093 EOF
10094
10095         cat >>confdefs.h <<\EOF
10096 #define HAVE_RESIZE_TERM 1
10097 EOF
10098
10099         cat >>confdefs.h <<\EOF
10100 #define HAVE_TERM_ENTRY_H 1
10101 EOF
10102
10103         cat >>confdefs.h <<\EOF
10104 #define HAVE_USE_DEFAULT_COLORS 1
10105 EOF
10106
10107         cat >>confdefs.h <<\EOF
10108 #define HAVE_USE_SCREEN 1
10109 EOF
10110
10111         cat >>confdefs.h <<\EOF
10112 #define HAVE_USE_WINDOW 1
10113 EOF
10114
10115         cat >>confdefs.h <<\EOF
10116 #define HAVE_WRESIZE 1
10117 EOF
10118
10119         cat >>confdefs.h <<\EOF
10120 #define NCURSES_EXT_FUNCS 1
10121 EOF
10122
10123         GENERATED_EXT_FUNCS=generated
10124 else
10125         NCURSES_EXT_FUNCS=0
10126         GENERATED_EXT_FUNCS=
10127 fi
10128
10129 echo "$as_me:10129: checking if you want to build with experimental SCREEN extensions" >&5
10130 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10131
10132 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10133 if test "${enable_sp_funcs+set}" = set; then
10134   enableval="$enable_sp_funcs"
10135   with_sp_funcs=$enableval
10136 else
10137   with_sp_funcs=no
10138 fi;
10139 echo "$as_me:10139: result: $with_sp_funcs" >&5
10140 echo "${ECHO_T}$with_sp_funcs" >&6
10141 if test "$with_sp_funcs" = yes ; then
10142         NCURSES_SP_FUNCS=1
10143         cat >>confdefs.h <<\EOF
10144 #define NCURSES_SP_FUNCS 1
10145 EOF
10146
10147         GENERATED_SP_FUNCS=generated
10148 else
10149         NCURSES_SP_FUNCS=0
10150         GENERATED_SP_FUNCS=
10151 fi
10152
10153 echo "$as_me:10153: checking if you want to build with experimental terminal-driver" >&5
10154 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10155
10156 # Check whether --enable-term-driver or --disable-term-driver was given.
10157 if test "${enable_term_driver+set}" = set; then
10158   enableval="$enable_term_driver"
10159   with_term_driver=$enableval
10160 else
10161   with_term_driver=no
10162 fi;
10163 echo "$as_me:10163: result: $with_term_driver" >&5
10164 echo "${ECHO_T}$with_term_driver" >&6
10165 if test "$with_term_driver" = yes ; then
10166         cat >>confdefs.h <<\EOF
10167 #define USE_TERM_DRIVER 1
10168 EOF
10169
10170         if test "$with_sp_funcs" != yes ; then
10171                 { { echo "$as_me:10171: error: The term-driver option relies upon sp-funcs" >&5
10172 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10173    { (exit 1); exit 1; }; }
10174         fi
10175 fi
10176
10177 ###   use option --enable-const to turn on use of const beyond that in XSI.
10178 echo "$as_me:10178: checking for extended use of const keyword" >&5
10179 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10180
10181 # Check whether --enable-const or --disable-const was given.
10182 if test "${enable_const+set}" = set; then
10183   enableval="$enable_const"
10184   with_ext_const=$enableval
10185 else
10186   with_ext_const=no
10187 fi;
10188 echo "$as_me:10188: result: $with_ext_const" >&5
10189 echo "${ECHO_T}$with_ext_const" >&6
10190 NCURSES_CONST='/*nothing*/'
10191 if test "$with_ext_const" = yes ; then
10192         NCURSES_CONST=const
10193 fi
10194
10195 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10196 echo "$as_me:10196: checking if you want to use extended colors" >&5
10197 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10198
10199 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10200 if test "${enable_ext_colors+set}" = set; then
10201   enableval="$enable_ext_colors"
10202   with_ext_colors=$enableval
10203 else
10204   with_ext_colors=no
10205 fi;
10206 echo "$as_me:10206: result: $with_ext_colors" >&5
10207 echo "${ECHO_T}$with_ext_colors" >&6
10208 NCURSES_EXT_COLORS=0
10209 if test "$with_ext_colors" = yes ; then
10210         if test "$with_widec" != yes ; then
10211                 { { echo "$as_me:10211: error: This option applies only to wide-character library" >&5
10212 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10213    { (exit 1); exit 1; }; }
10214         else
10215                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10216
10217 if test "${with_abi_version+set}" != set; then
10218         case $cf_cv_rel_version in
10219         5.*)
10220                 cf_cv_rel_version=6.0
10221                 cf_cv_abi_version=6
10222                 { echo "$as_me:10222: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10223 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10224                 ;;
10225         esac
10226 fi
10227
10228         fi
10229         NCURSES_EXT_COLORS=1
10230         cat >>confdefs.h <<\EOF
10231 #define NCURSES_EXT_COLORS 1
10232 EOF
10233
10234 fi
10235
10236 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10237 echo "$as_me:10237: checking if you want to use extended mouse encoding" >&5
10238 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10239
10240 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10241 if test "${enable_ext_mouse+set}" = set; then
10242   enableval="$enable_ext_mouse"
10243   with_ext_mouse=$enableval
10244 else
10245   with_ext_mouse=no
10246 fi;
10247 echo "$as_me:10247: result: $with_ext_mouse" >&5
10248 echo "${ECHO_T}$with_ext_mouse" >&6
10249 NCURSES_MOUSE_VERSION=1
10250 if test "$with_ext_mouse" = yes ; then
10251         NCURSES_MOUSE_VERSION=2
10252
10253 if test "${with_abi_version+set}" != set; then
10254         case $cf_cv_rel_version in
10255         5.*)
10256                 cf_cv_rel_version=6.0
10257                 cf_cv_abi_version=6
10258                 { echo "$as_me:10258: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10259 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10260                 ;;
10261         esac
10262 fi
10263
10264 fi
10265
10266 echo "$as_me:10266: checking if you want \$NCURSES_NO_PADDING code" >&5
10267 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10268
10269 # Check whether --enable-no-padding or --disable-no-padding was given.
10270 if test "${enable_no_padding+set}" = set; then
10271   enableval="$enable_no_padding"
10272   with_no_padding=$enableval
10273 else
10274   with_no_padding=$with_ext_funcs
10275 fi;
10276 echo "$as_me:10276: result: $with_no_padding" >&5
10277 echo "${ECHO_T}$with_no_padding" >&6
10278 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10279 #define NCURSES_NO_PADDING 1
10280 EOF
10281
10282 echo "$as_me:10282: checking for ANSI C header files" >&5
10283 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10284 if test "${ac_cv_header_stdc+set}" = set; then
10285   echo $ECHO_N "(cached) $ECHO_C" >&6
10286 else
10287   cat >conftest.$ac_ext <<_ACEOF
10288 #line 10288 "configure"
10289 #include "confdefs.h"
10290 #include <stdlib.h>
10291 #include <stdarg.h>
10292 #include <string.h>
10293 #include <float.h>
10294
10295 _ACEOF
10296 if { (eval echo "$as_me:10296: \"$ac_cpp conftest.$ac_ext\"") >&5
10297   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10298   ac_status=$?
10299   egrep -v '^ *\+' conftest.er1 >conftest.err
10300   rm -f conftest.er1
10301   cat conftest.err >&5
10302   echo "$as_me:10302: \$? = $ac_status" >&5
10303   (exit $ac_status); } >/dev/null; then
10304   if test -s conftest.err; then
10305     ac_cpp_err=$ac_c_preproc_warn_flag
10306   else
10307     ac_cpp_err=
10308   fi
10309 else
10310   ac_cpp_err=yes
10311 fi
10312 if test -z "$ac_cpp_err"; then
10313   ac_cv_header_stdc=yes
10314 else
10315   echo "$as_me: failed program was:" >&5
10316   cat conftest.$ac_ext >&5
10317   ac_cv_header_stdc=no
10318 fi
10319 rm -f conftest.err conftest.$ac_ext
10320
10321 if test $ac_cv_header_stdc = yes; then
10322   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10323   cat >conftest.$ac_ext <<_ACEOF
10324 #line 10324 "configure"
10325 #include "confdefs.h"
10326 #include <string.h>
10327
10328 _ACEOF
10329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10330   egrep "memchr" >/dev/null 2>&1; then
10331   :
10332 else
10333   ac_cv_header_stdc=no
10334 fi
10335 rm -rf conftest*
10336
10337 fi
10338
10339 if test $ac_cv_header_stdc = yes; then
10340   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10341   cat >conftest.$ac_ext <<_ACEOF
10342 #line 10342 "configure"
10343 #include "confdefs.h"
10344 #include <stdlib.h>
10345
10346 _ACEOF
10347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10348   egrep "free" >/dev/null 2>&1; then
10349   :
10350 else
10351   ac_cv_header_stdc=no
10352 fi
10353 rm -rf conftest*
10354
10355 fi
10356
10357 if test $ac_cv_header_stdc = yes; then
10358   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10359   if test "$cross_compiling" = yes; then
10360   :
10361 else
10362   cat >conftest.$ac_ext <<_ACEOF
10363 #line 10363 "configure"
10364 #include "confdefs.h"
10365 #include <ctype.h>
10366 #if ((' ' & 0x0FF) == 0x020)
10367 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10368 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10369 #else
10370 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10371                      || ('j' <= (c) && (c) <= 'r') \
10372                      || ('s' <= (c) && (c) <= 'z'))
10373 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10374 #endif
10375
10376 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10377 int
10378 main ()
10379 {
10380   int i;
10381   for (i = 0; i < 256; i++)
10382     if (XOR (islower (i), ISLOWER (i))
10383         || toupper (i) != TOUPPER (i))
10384       $ac_main_return(2);
10385   $ac_main_return (0);
10386 }
10387 _ACEOF
10388 rm -f conftest$ac_exeext
10389 if { (eval echo "$as_me:10389: \"$ac_link\"") >&5
10390   (eval $ac_link) 2>&5
10391   ac_status=$?
10392   echo "$as_me:10392: \$? = $ac_status" >&5
10393   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10394   { (eval echo "$as_me:10394: \"$ac_try\"") >&5
10395   (eval $ac_try) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); }; }; then
10399   :
10400 else
10401   echo "$as_me: program exited with status $ac_status" >&5
10402 echo "$as_me: failed program was:" >&5
10403 cat conftest.$ac_ext >&5
10404 ac_cv_header_stdc=no
10405 fi
10406 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10407 fi
10408 fi
10409 fi
10410 echo "$as_me:10410: result: $ac_cv_header_stdc" >&5
10411 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10412 if test $ac_cv_header_stdc = yes; then
10413
10414 cat >>confdefs.h <<\EOF
10415 #define STDC_HEADERS 1
10416 EOF
10417
10418 fi
10419
10420 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10421
10422 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10423                   inttypes.h stdint.h unistd.h
10424 do
10425 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10426 echo "$as_me:10426: checking for $ac_header" >&5
10427 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10428 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10429   echo $ECHO_N "(cached) $ECHO_C" >&6
10430 else
10431   cat >conftest.$ac_ext <<_ACEOF
10432 #line 10432 "configure"
10433 #include "confdefs.h"
10434 $ac_includes_default
10435 #include <$ac_header>
10436 _ACEOF
10437 rm -f conftest.$ac_objext
10438 if { (eval echo "$as_me:10438: \"$ac_compile\"") >&5
10439   (eval $ac_compile) 2>&5
10440   ac_status=$?
10441   echo "$as_me:10441: \$? = $ac_status" >&5
10442   (exit $ac_status); } &&
10443          { ac_try='test -s conftest.$ac_objext'
10444   { (eval echo "$as_me:10444: \"$ac_try\"") >&5
10445   (eval $ac_try) 2>&5
10446   ac_status=$?
10447   echo "$as_me:10447: \$? = $ac_status" >&5
10448   (exit $ac_status); }; }; then
10449   eval "$as_ac_Header=yes"
10450 else
10451   echo "$as_me: failed program was:" >&5
10452 cat conftest.$ac_ext >&5
10453 eval "$as_ac_Header=no"
10454 fi
10455 rm -f conftest.$ac_objext conftest.$ac_ext
10456 fi
10457 echo "$as_me:10457: result: `eval echo '${'$as_ac_Header'}'`" >&5
10458 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10459 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10460   cat >>confdefs.h <<EOF
10461 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10462 EOF
10463
10464 fi
10465 done
10466
10467 echo "$as_me:10467: checking for signed char" >&5
10468 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10469 if test "${ac_cv_type_signed_char+set}" = set; then
10470   echo $ECHO_N "(cached) $ECHO_C" >&6
10471 else
10472   cat >conftest.$ac_ext <<_ACEOF
10473 #line 10473 "configure"
10474 #include "confdefs.h"
10475 $ac_includes_default
10476 int
10477 main ()
10478 {
10479 if ((signed char *) 0)
10480   return 0;
10481 if (sizeof (signed char))
10482   return 0;
10483   ;
10484   return 0;
10485 }
10486 _ACEOF
10487 rm -f conftest.$ac_objext
10488 if { (eval echo "$as_me:10488: \"$ac_compile\"") >&5
10489   (eval $ac_compile) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); } &&
10493          { ac_try='test -s conftest.$ac_objext'
10494   { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495   (eval $ac_try) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit $ac_status); }; }; then
10499   ac_cv_type_signed_char=yes
10500 else
10501   echo "$as_me: failed program was:" >&5
10502 cat conftest.$ac_ext >&5
10503 ac_cv_type_signed_char=no
10504 fi
10505 rm -f conftest.$ac_objext conftest.$ac_ext
10506 fi
10507 echo "$as_me:10507: result: $ac_cv_type_signed_char" >&5
10508 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10509
10510 echo "$as_me:10510: checking size of signed char" >&5
10511 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10512 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10513   echo $ECHO_N "(cached) $ECHO_C" >&6
10514 else
10515   if test "$ac_cv_type_signed_char" = yes; then
10516   if test "$cross_compiling" = yes; then
10517   # Depending upon the size, compute the lo and hi bounds.
10518 cat >conftest.$ac_ext <<_ACEOF
10519 #line 10519 "configure"
10520 #include "confdefs.h"
10521 $ac_includes_default
10522 int
10523 main ()
10524 {
10525 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10526   ;
10527   return 0;
10528 }
10529 _ACEOF
10530 rm -f conftest.$ac_objext
10531 if { (eval echo "$as_me:10531: \"$ac_compile\"") >&5
10532   (eval $ac_compile) 2>&5
10533   ac_status=$?
10534   echo "$as_me:10534: \$? = $ac_status" >&5
10535   (exit $ac_status); } &&
10536          { ac_try='test -s conftest.$ac_objext'
10537   { (eval echo "$as_me:10537: \"$ac_try\"") >&5
10538   (eval $ac_try) 2>&5
10539   ac_status=$?
10540   echo "$as_me:10540: \$? = $ac_status" >&5
10541   (exit $ac_status); }; }; then
10542   ac_lo=0 ac_mid=0
10543   while :; do
10544     cat >conftest.$ac_ext <<_ACEOF
10545 #line 10545 "configure"
10546 #include "confdefs.h"
10547 $ac_includes_default
10548 int
10549 main ()
10550 {
10551 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10552   ;
10553   return 0;
10554 }
10555 _ACEOF
10556 rm -f conftest.$ac_objext
10557 if { (eval echo "$as_me:10557: \"$ac_compile\"") >&5
10558   (eval $ac_compile) 2>&5
10559   ac_status=$?
10560   echo "$as_me:10560: \$? = $ac_status" >&5
10561   (exit $ac_status); } &&
10562          { ac_try='test -s conftest.$ac_objext'
10563   { (eval echo "$as_me:10563: \"$ac_try\"") >&5
10564   (eval $ac_try) 2>&5
10565   ac_status=$?
10566   echo "$as_me:10566: \$? = $ac_status" >&5
10567   (exit $ac_status); }; }; then
10568   ac_hi=$ac_mid; break
10569 else
10570   echo "$as_me: failed program was:" >&5
10571 cat conftest.$ac_ext >&5
10572 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10573 fi
10574 rm -f conftest.$ac_objext conftest.$ac_ext
10575   done
10576 else
10577   echo "$as_me: failed program was:" >&5
10578 cat conftest.$ac_ext >&5
10579 ac_hi=-1 ac_mid=-1
10580   while :; do
10581     cat >conftest.$ac_ext <<_ACEOF
10582 #line 10582 "configure"
10583 #include "confdefs.h"
10584 $ac_includes_default
10585 int
10586 main ()
10587 {
10588 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10589   ;
10590   return 0;
10591 }
10592 _ACEOF
10593 rm -f conftest.$ac_objext
10594 if { (eval echo "$as_me:10594: \"$ac_compile\"") >&5
10595   (eval $ac_compile) 2>&5
10596   ac_status=$?
10597   echo "$as_me:10597: \$? = $ac_status" >&5
10598   (exit $ac_status); } &&
10599          { ac_try='test -s conftest.$ac_objext'
10600   { (eval echo "$as_me:10600: \"$ac_try\"") >&5
10601   (eval $ac_try) 2>&5
10602   ac_status=$?
10603   echo "$as_me:10603: \$? = $ac_status" >&5
10604   (exit $ac_status); }; }; then
10605   ac_lo=$ac_mid; break
10606 else
10607   echo "$as_me: failed program was:" >&5
10608 cat conftest.$ac_ext >&5
10609 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10610 fi
10611 rm -f conftest.$ac_objext conftest.$ac_ext
10612   done
10613 fi
10614 rm -f conftest.$ac_objext conftest.$ac_ext
10615 # Binary search between lo and hi bounds.
10616 while test "x$ac_lo" != "x$ac_hi"; do
10617   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10618   cat >conftest.$ac_ext <<_ACEOF
10619 #line 10619 "configure"
10620 #include "confdefs.h"
10621 $ac_includes_default
10622 int
10623 main ()
10624 {
10625 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10626   ;
10627   return 0;
10628 }
10629 _ACEOF
10630 rm -f conftest.$ac_objext
10631 if { (eval echo "$as_me:10631: \"$ac_compile\"") >&5
10632   (eval $ac_compile) 2>&5
10633   ac_status=$?
10634   echo "$as_me:10634: \$? = $ac_status" >&5
10635   (exit $ac_status); } &&
10636          { ac_try='test -s conftest.$ac_objext'
10637   { (eval echo "$as_me:10637: \"$ac_try\"") >&5
10638   (eval $ac_try) 2>&5
10639   ac_status=$?
10640   echo "$as_me:10640: \$? = $ac_status" >&5
10641   (exit $ac_status); }; }; then
10642   ac_hi=$ac_mid
10643 else
10644   echo "$as_me: failed program was:" >&5
10645 cat conftest.$ac_ext >&5
10646 ac_lo=`expr $ac_mid + 1`
10647 fi
10648 rm -f conftest.$ac_objext conftest.$ac_ext
10649 done
10650 ac_cv_sizeof_signed_char=$ac_lo
10651 else
10652   if test "$cross_compiling" = yes; then
10653   { { echo "$as_me:10653: error: cannot run test program while cross compiling" >&5
10654 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10655    { (exit 1); exit 1; }; }
10656 else
10657   cat >conftest.$ac_ext <<_ACEOF
10658 #line 10658 "configure"
10659 #include "confdefs.h"
10660 $ac_includes_default
10661 int
10662 main ()
10663 {
10664 FILE *f = fopen ("conftest.val", "w");
10665 if (!f)
10666   $ac_main_return (1);
10667 fprintf (f, "%d", (sizeof (signed char)));
10668 fclose (f);
10669   ;
10670   return 0;
10671 }
10672 _ACEOF
10673 rm -f conftest$ac_exeext
10674 if { (eval echo "$as_me:10674: \"$ac_link\"") >&5
10675   (eval $ac_link) 2>&5
10676   ac_status=$?
10677   echo "$as_me:10677: \$? = $ac_status" >&5
10678   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10679   { (eval echo "$as_me:10679: \"$ac_try\"") >&5
10680   (eval $ac_try) 2>&5
10681   ac_status=$?
10682   echo "$as_me:10682: \$? = $ac_status" >&5
10683   (exit $ac_status); }; }; then
10684   ac_cv_sizeof_signed_char=`cat conftest.val`
10685 else
10686   echo "$as_me: program exited with status $ac_status" >&5
10687 echo "$as_me: failed program was:" >&5
10688 cat conftest.$ac_ext >&5
10689 fi
10690 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10691 fi
10692 fi
10693 rm -f conftest.val
10694 else
10695   ac_cv_sizeof_signed_char=0
10696 fi
10697 fi
10698 echo "$as_me:10698: result: $ac_cv_sizeof_signed_char" >&5
10699 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10700 cat >>confdefs.h <<EOF
10701 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10702 EOF
10703
10704 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10705         NCURSES_SBOOL="signed char"
10706 else
10707         NCURSES_SBOOL="char"
10708 fi
10709 echo "$as_me:10709: checking if you want to use signed Boolean array in term.h" >&5
10710 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10711
10712 # Check whether --enable-signed-char or --disable-signed-char was given.
10713 if test "${enable_signed_char+set}" = set; then
10714   enableval="$enable_signed_char"
10715   with_signed_char=$enableval
10716 else
10717   with_signed_char=no
10718 fi;
10719 echo "$as_me:10719: result: $with_signed_char" >&5
10720 echo "${ECHO_T}$with_signed_char" >&6
10721 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10722
10723 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10724 echo "$as_me:10724: checking if you want SIGWINCH handler" >&5
10725 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10726
10727 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10728 if test "${enable_sigwinch+set}" = set; then
10729   enableval="$enable_sigwinch"
10730   with_sigwinch=$enableval
10731 else
10732   with_sigwinch=$with_ext_funcs
10733 fi;
10734 echo "$as_me:10734: result: $with_sigwinch" >&5
10735 echo "${ECHO_T}$with_sigwinch" >&6
10736 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10737 #define USE_SIGWINCH 1
10738 EOF
10739
10740 ###   use option --enable-tcap-names to allow user to define new capabilities
10741 echo "$as_me:10741: checking if you want user-definable terminal capabilities like termcap" >&5
10742 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10743
10744 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10745 if test "${enable_tcap_names+set}" = set; then
10746   enableval="$enable_tcap_names"
10747   with_tcap_names=$enableval
10748 else
10749   with_tcap_names=$with_ext_funcs
10750 fi;
10751 echo "$as_me:10751: result: $with_tcap_names" >&5
10752 echo "${ECHO_T}$with_tcap_names" >&6
10753 NCURSES_XNAMES=0
10754 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10755
10756 ###############################################################################
10757 # These options are relatively safe to experiment with.
10758
10759 echo "$as_me:10759: checking if you want all development code" >&5
10760 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10761
10762 # Check whether --with-develop or --without-develop was given.
10763 if test "${with_develop+set}" = set; then
10764   withval="$with_develop"
10765   with_develop=$withval
10766 else
10767   with_develop=no
10768 fi;
10769 echo "$as_me:10769: result: $with_develop" >&5
10770 echo "${ECHO_T}$with_develop" >&6
10771
10772 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10773 echo "$as_me:10773: checking if you want hard-tabs code" >&5
10774 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10775
10776 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10777 if test "${enable_hard_tabs+set}" = set; then
10778   enableval="$enable_hard_tabs"
10779
10780 else
10781   enable_hard_tabs=$with_develop
10782 fi;
10783 echo "$as_me:10783: result: $enable_hard_tabs" >&5
10784 echo "${ECHO_T}$enable_hard_tabs" >&6
10785 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10786 #define USE_HARD_TABS 1
10787 EOF
10788
10789 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10790 echo "$as_me:10790: checking if you want limited support for xmc" >&5
10791 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10792
10793 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10794 if test "${enable_xmc_glitch+set}" = set; then
10795   enableval="$enable_xmc_glitch"
10796
10797 else
10798   enable_xmc_glitch=$with_develop
10799 fi;
10800 echo "$as_me:10800: result: $enable_xmc_glitch" >&5
10801 echo "${ECHO_T}$enable_xmc_glitch" >&6
10802 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10803 #define USE_XMC_SUPPORT 1
10804 EOF
10805
10806 ###############################################################################
10807 # These are just experimental, probably should not be in a package:
10808
10809 echo "$as_me:10809: checking if you do not want to assume colors are white-on-black" >&5
10810 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10811
10812 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10813 if test "${enable_assumed_color+set}" = set; then
10814   enableval="$enable_assumed_color"
10815   with_assumed_color=$enableval
10816 else
10817   with_assumed_color=yes
10818 fi;
10819 echo "$as_me:10819: result: $with_assumed_color" >&5
10820 echo "${ECHO_T}$with_assumed_color" >&6
10821 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10822 #define USE_ASSUMED_COLOR 1
10823 EOF
10824
10825 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10826 echo "$as_me:10826: checking if you want hashmap scrolling-optimization code" >&5
10827 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10828
10829 # Check whether --enable-hashmap or --disable-hashmap was given.
10830 if test "${enable_hashmap+set}" = set; then
10831   enableval="$enable_hashmap"
10832   with_hashmap=$enableval
10833 else
10834   with_hashmap=yes
10835 fi;
10836 echo "$as_me:10836: result: $with_hashmap" >&5
10837 echo "${ECHO_T}$with_hashmap" >&6
10838 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10839 #define USE_HASHMAP 1
10840 EOF
10841
10842 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10843 echo "$as_me:10843: checking if you want colorfgbg code" >&5
10844 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10845
10846 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10847 if test "${enable_colorfgbg+set}" = set; then
10848   enableval="$enable_colorfgbg"
10849   with_colorfgbg=$enableval
10850 else
10851   with_colorfgbg=no
10852 fi;
10853 echo "$as_me:10853: result: $with_colorfgbg" >&5
10854 echo "${ECHO_T}$with_colorfgbg" >&6
10855 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10856 #define USE_COLORFGBG 1
10857 EOF
10858
10859 ###   use option --enable-interop to turn on use of bindings used for interop
10860 echo "$as_me:10860: checking if you want interop bindings" >&5
10861 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10862
10863 # Check whether --enable-interop or --disable-interop was given.
10864 if test "${enable_interop+set}" = set; then
10865   enableval="$enable_interop"
10866   with_exp_interop=$enableval
10867 else
10868   with_exp_interop=no
10869 fi;
10870 echo "$as_me:10870: result: $with_exp_interop" >&5
10871 echo "${ECHO_T}$with_exp_interop" >&6
10872
10873 NCURSES_INTEROP_FUNCS=0
10874 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10875
10876 # This is still experimental (20080329), but should ultimately be moved to
10877 # the script-block --with-normal, etc.
10878
10879 echo "$as_me:10879: checking if you want to link with the pthread library" >&5
10880 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10881
10882 # Check whether --with-pthread or --without-pthread was given.
10883 if test "${with_pthread+set}" = set; then
10884   withval="$with_pthread"
10885   with_pthread=$withval
10886 else
10887   with_pthread=no
10888 fi;
10889 echo "$as_me:10889: result: $with_pthread" >&5
10890 echo "${ECHO_T}$with_pthread" >&6
10891
10892 if test "$with_pthread" != no ; then
10893     echo "$as_me:10893: checking for pthread.h" >&5
10894 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10895 if test "${ac_cv_header_pthread_h+set}" = set; then
10896   echo $ECHO_N "(cached) $ECHO_C" >&6
10897 else
10898   cat >conftest.$ac_ext <<_ACEOF
10899 #line 10899 "configure"
10900 #include "confdefs.h"
10901 #include <pthread.h>
10902 _ACEOF
10903 if { (eval echo "$as_me:10903: \"$ac_cpp conftest.$ac_ext\"") >&5
10904   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10905   ac_status=$?
10906   egrep -v '^ *\+' conftest.er1 >conftest.err
10907   rm -f conftest.er1
10908   cat conftest.err >&5
10909   echo "$as_me:10909: \$? = $ac_status" >&5
10910   (exit $ac_status); } >/dev/null; then
10911   if test -s conftest.err; then
10912     ac_cpp_err=$ac_c_preproc_warn_flag
10913   else
10914     ac_cpp_err=
10915   fi
10916 else
10917   ac_cpp_err=yes
10918 fi
10919 if test -z "$ac_cpp_err"; then
10920   ac_cv_header_pthread_h=yes
10921 else
10922   echo "$as_me: failed program was:" >&5
10923   cat conftest.$ac_ext >&5
10924   ac_cv_header_pthread_h=no
10925 fi
10926 rm -f conftest.err conftest.$ac_ext
10927 fi
10928 echo "$as_me:10928: result: $ac_cv_header_pthread_h" >&5
10929 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10930 if test $ac_cv_header_pthread_h = yes; then
10931
10932         cat >>confdefs.h <<\EOF
10933 #define HAVE_PTHREADS_H 1
10934 EOF
10935
10936         echo "$as_me:10936: checking if we can link with the pthread library" >&5
10937 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10938         cf_save_LIBS="$LIBS"
10939         LIBS="-lpthread $LIBS"
10940         cat >conftest.$ac_ext <<_ACEOF
10941 #line 10941 "configure"
10942 #include "confdefs.h"
10943
10944 #include <pthread.h>
10945
10946 int
10947 main ()
10948 {
10949
10950         int rc = pthread_create(0,0,0,0);
10951
10952   ;
10953   return 0;
10954 }
10955 _ACEOF
10956 rm -f conftest.$ac_objext conftest$ac_exeext
10957 if { (eval echo "$as_me:10957: \"$ac_link\"") >&5
10958   (eval $ac_link) 2>&5
10959   ac_status=$?
10960   echo "$as_me:10960: \$? = $ac_status" >&5
10961   (exit $ac_status); } &&
10962          { ac_try='test -s conftest$ac_exeext'
10963   { (eval echo "$as_me:10963: \"$ac_try\"") >&5
10964   (eval $ac_try) 2>&5
10965   ac_status=$?
10966   echo "$as_me:10966: \$? = $ac_status" >&5
10967   (exit $ac_status); }; }; then
10968   with_pthread=yes
10969 else
10970   echo "$as_me: failed program was:" >&5
10971 cat conftest.$ac_ext >&5
10972 with_pthread=no
10973 fi
10974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10975         LIBS="$cf_save_LIBS"
10976         echo "$as_me:10976: result: $with_pthread" >&5
10977 echo "${ECHO_T}$with_pthread" >&6
10978
10979         if test "$with_pthread" = yes ; then
10980             LIBS="-lpthread $LIBS"
10981             cat >>confdefs.h <<\EOF
10982 #define HAVE_LIBPTHREADS 1
10983 EOF
10984
10985         else
10986             { { echo "$as_me:10986: error: Cannot link with pthread library" >&5
10987 echo "$as_me: error: Cannot link with pthread library" >&2;}
10988    { (exit 1); exit 1; }; }
10989         fi
10990
10991 fi
10992
10993 fi
10994
10995 if test "x$with_pthread" != xno; then
10996         echo "$as_me:10996: checking for pthread_kill" >&5
10997 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
10998 if test "${ac_cv_func_pthread_kill+set}" = set; then
10999   echo $ECHO_N "(cached) $ECHO_C" >&6
11000 else
11001   cat >conftest.$ac_ext <<_ACEOF
11002 #line 11002 "configure"
11003 #include "confdefs.h"
11004 /* System header to define __stub macros and hopefully few prototypes,
11005     which can conflict with char pthread_kill (); below.  */
11006 #include <assert.h>
11007 /* Override any gcc2 internal prototype to avoid an error.  */
11008 #ifdef __cplusplus
11009 extern "C"
11010 #endif
11011 /* We use char because int might match the return type of a gcc2
11012    builtin and then its argument prototype would still apply.  */
11013 char pthread_kill ();
11014 char (*f) ();
11015
11016 int
11017 main ()
11018 {
11019 /* The GNU C library defines this for functions which it implements
11020     to always fail with ENOSYS.  Some functions are actually named
11021     something starting with __ and the normal name is an alias.  */
11022 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11023 choke me
11024 #else
11025 f = pthread_kill;
11026 #endif
11027
11028   ;
11029   return 0;
11030 }
11031 _ACEOF
11032 rm -f conftest.$ac_objext conftest$ac_exeext
11033 if { (eval echo "$as_me:11033: \"$ac_link\"") >&5
11034   (eval $ac_link) 2>&5
11035   ac_status=$?
11036   echo "$as_me:11036: \$? = $ac_status" >&5
11037   (exit $ac_status); } &&
11038          { ac_try='test -s conftest$ac_exeext'
11039   { (eval echo "$as_me:11039: \"$ac_try\"") >&5
11040   (eval $ac_try) 2>&5
11041   ac_status=$?
11042   echo "$as_me:11042: \$? = $ac_status" >&5
11043   (exit $ac_status); }; }; then
11044   ac_cv_func_pthread_kill=yes
11045 else
11046   echo "$as_me: failed program was:" >&5
11047 cat conftest.$ac_ext >&5
11048 ac_cv_func_pthread_kill=no
11049 fi
11050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11051 fi
11052 echo "$as_me:11052: result: $ac_cv_func_pthread_kill" >&5
11053 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11054 if test $ac_cv_func_pthread_kill = yes; then
11055
11056                 echo "$as_me:11056: checking if you want to allow EINTR in wgetch with pthreads" >&5
11057 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11058
11059 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11060 if test "${enable_pthreads_eintr+set}" = set; then
11061   enableval="$enable_pthreads_eintr"
11062   use_pthreads_eintr=$enableval
11063 else
11064   use_pthreads_eintr=no
11065 fi;
11066                 echo "$as_me:11066: result: $use_pthreads_eintr" >&5
11067 echo "${ECHO_T}$use_pthreads_eintr" >&6
11068                 if test $use_pthreads_eintr = yes ; then
11069                         cat >>confdefs.h <<\EOF
11070 #define USE_PTHREADS_EINTR 1
11071 EOF
11072
11073                 fi
11074 fi
11075
11076         echo "$as_me:11076: checking if you want to use weak-symbols for pthreads" >&5
11077 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11078
11079 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11080 if test "${enable_weak_symbols+set}" = set; then
11081   enableval="$enable_weak_symbols"
11082   use_weak_symbols=$enableval
11083 else
11084   use_weak_symbols=no
11085 fi;
11086         echo "$as_me:11086: result: $use_weak_symbols" >&5
11087 echo "${ECHO_T}$use_weak_symbols" >&6
11088         if test "$use_weak_symbols" = yes ; then
11089
11090 echo "$as_me:11090: checking if $CC supports weak symbols" >&5
11091 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11092 if test "${cf_cv_weak_symbols+set}" = set; then
11093   echo $ECHO_N "(cached) $ECHO_C" >&6
11094 else
11095
11096 cat >conftest.$ac_ext <<_ACEOF
11097 #line 11097 "configure"
11098 #include "confdefs.h"
11099
11100 #include <stdio.h>
11101 int
11102 main ()
11103 {
11104
11105 #if defined(__GNUC__)
11106 #  if defined __USE_ISOC99
11107 #    define _cat_pragma(exp)    _Pragma(#exp)
11108 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11109 #  else
11110 #    define _weak_pragma(exp)
11111 #  endif
11112 #  define _declare(name)        __extension__ extern __typeof__(name) name
11113 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11114 #endif
11115
11116 weak_symbol(fopen);
11117
11118   ;
11119   return 0;
11120 }
11121 _ACEOF
11122 rm -f conftest.$ac_objext
11123 if { (eval echo "$as_me:11123: \"$ac_compile\"") >&5
11124   (eval $ac_compile) 2>&5
11125   ac_status=$?
11126   echo "$as_me:11126: \$? = $ac_status" >&5
11127   (exit $ac_status); } &&
11128          { ac_try='test -s conftest.$ac_objext'
11129   { (eval echo "$as_me:11129: \"$ac_try\"") >&5
11130   (eval $ac_try) 2>&5
11131   ac_status=$?
11132   echo "$as_me:11132: \$? = $ac_status" >&5
11133   (exit $ac_status); }; }; then
11134   cf_cv_weak_symbols=yes
11135 else
11136   echo "$as_me: failed program was:" >&5
11137 cat conftest.$ac_ext >&5
11138 cf_cv_weak_symbols=no
11139 fi
11140 rm -f conftest.$ac_objext conftest.$ac_ext
11141
11142 fi
11143 echo "$as_me:11143: result: $cf_cv_weak_symbols" >&5
11144 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11145
11146         else
11147                 cf_cv_weak_symbols=no
11148         fi
11149
11150         if test $cf_cv_weak_symbols = yes ; then
11151                 cat >>confdefs.h <<\EOF
11152 #define USE_WEAK_SYMBOLS 1
11153 EOF
11154
11155         fi
11156 fi
11157
11158 PTHREAD=
11159 if test "$with_pthread" = "yes" ; then
11160     cat >>confdefs.h <<\EOF
11161 #define USE_PTHREADS 1
11162 EOF
11163
11164     enable_reentrant=yes
11165     if test $cf_cv_weak_symbols = yes ; then
11166         PTHREAD=-lpthread
11167     fi
11168 fi
11169
11170 # Reentrant code has to be opaque; there's little advantage to making ncurses
11171 # opaque outside of that, so there is no --enable-opaque option.  We can use
11172 # this option without --with-pthreads, but this will be always set for
11173 # pthreads.
11174 echo "$as_me:11174: checking if you want experimental reentrant code" >&5
11175 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11176
11177 # Check whether --enable-reentrant or --disable-reentrant was given.
11178 if test "${enable_reentrant+set}" = set; then
11179   enableval="$enable_reentrant"
11180   with_reentrant=$enableval
11181 else
11182   with_reentrant=no
11183 fi;
11184 echo "$as_me:11184: result: $with_reentrant" >&5
11185 echo "${ECHO_T}$with_reentrant" >&6
11186 if test "$with_reentrant" = yes ; then
11187         cf_cv_enable_reentrant=1
11188         cf_cv_enable_opaque="NCURSES_INTERNALS"
11189         NCURSES_OPAQUE=1
11190         NCURSES_SIZE_T=int
11191         if test $cf_cv_weak_symbols = yes ; then
11192
11193 # remove pthread library from $LIBS
11194 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11195
11196                 TEST_LIBS="-lpthread $TEST_LIBS"
11197                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11198         else
11199                 LIB_SUFFIX="t${LIB_SUFFIX}"
11200         fi
11201         cat >>confdefs.h <<\EOF
11202 #define USE_REENTRANT 1
11203 EOF
11204
11205 if test "${with_abi_version+set}" != set; then
11206         case $cf_cv_rel_version in
11207         5.*)
11208                 cf_cv_rel_version=6.0
11209                 cf_cv_abi_version=6
11210                 { echo "$as_me:11210: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11211 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11212                 ;;
11213         esac
11214 fi
11215
11216 else
11217         cf_cv_enable_reentrant=0
11218         cf_cv_enable_opaque="NCURSES_OPAQUE"
11219         NCURSES_OPAQUE=0
11220         NCURSES_SIZE_T=short
11221 fi
11222
11223 ### Allow using a different wrap-prefix
11224 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11225         echo "$as_me:11225: checking for prefix used to wrap public variables" >&5
11226 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11227
11228 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11229 if test "${with_wrap_prefix+set}" = set; then
11230   withval="$with_wrap_prefix"
11231   NCURSES_WRAP_PREFIX=$withval
11232 else
11233   NCURSES_WRAP_PREFIX=_nc_
11234 fi;
11235         echo "$as_me:11235: result: $NCURSES_WRAP_PREFIX" >&5
11236 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11237 else
11238         NCURSES_WRAP_PREFIX=_nc_
11239 fi
11240
11241 cat >>confdefs.h <<EOF
11242 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11243 EOF
11244
11245 echo "$as_me:11245: checking if you want experimental safe-sprintf code" >&5
11246 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11247
11248 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11249 if test "${enable_safe_sprintf+set}" = set; then
11250   enableval="$enable_safe_sprintf"
11251   with_safe_sprintf=$enableval
11252 else
11253   with_safe_sprintf=no
11254 fi;
11255 echo "$as_me:11255: result: $with_safe_sprintf" >&5
11256 echo "${ECHO_T}$with_safe_sprintf" >&6
11257 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11258 #define USE_SAFE_SPRINTF 1
11259 EOF
11260
11261 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11262 # when hashmap is used scroll hints are useless
11263 if test "$with_hashmap" = no ; then
11264 echo "$as_me:11264: checking if you want to experiment without scrolling-hints code" >&5
11265 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11266
11267 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11268 if test "${enable_scroll_hints+set}" = set; then
11269   enableval="$enable_scroll_hints"
11270   with_scroll_hints=$enableval
11271 else
11272   with_scroll_hints=yes
11273 fi;
11274 echo "$as_me:11274: result: $with_scroll_hints" >&5
11275 echo "${ECHO_T}$with_scroll_hints" >&6
11276 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11277 #define USE_SCROLL_HINTS 1
11278 EOF
11279
11280 fi
11281
11282 echo "$as_me:11282: checking if you want experimental wgetch-events code" >&5
11283 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11284
11285 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11286 if test "${enable_wgetch_events+set}" = set; then
11287   enableval="$enable_wgetch_events"
11288   with_wgetch_events=$enableval
11289 else
11290   with_wgetch_events=no
11291 fi;
11292 echo "$as_me:11292: result: $with_wgetch_events" >&5
11293 echo "${ECHO_T}$with_wgetch_events" >&6
11294 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11295 #define NCURSES_WGETCH_EVENTS 1
11296 EOF
11297
11298 ###############################################################################
11299
11300 ###     use option --disable-echo to suppress full display compiling commands
11301 echo "$as_me:11301: checking if you want to display full commands during build" >&5
11302 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11303
11304 # Check whether --enable-echo or --disable-echo was given.
11305 if test "${enable_echo+set}" = set; then
11306   enableval="$enable_echo"
11307   with_echo=$enableval
11308 else
11309   with_echo=yes
11310 fi;
11311 if test "$with_echo" = yes; then
11312         ECHO_LINK=
11313 else
11314         ECHO_LINK='@ echo linking $@ ... ;'
11315         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11316         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11317 fi
11318 echo "$as_me:11318: result: $with_echo" >&5
11319 echo "${ECHO_T}$with_echo" >&6
11320
11321 ###     use option --enable-warnings to turn on all gcc warnings
11322 echo "$as_me:11322: checking if you want to see compiler warnings" >&5
11323 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11324
11325 # Check whether --enable-warnings or --disable-warnings was given.
11326 if test "${enable_warnings+set}" = set; then
11327   enableval="$enable_warnings"
11328   with_warnings=$enableval
11329 fi;
11330 echo "$as_me:11330: result: $with_warnings" >&5
11331 echo "${ECHO_T}$with_warnings" >&6
11332
11333 if test "x$with_warnings" = "xyes"; then
11334
11335         ADAFLAGS="$ADAFLAGS -gnatg"
11336
11337 INTEL_COMPILER=no
11338
11339 if test "$GCC" = yes ; then
11340         case $host_os in
11341         linux*|gnu*)
11342                 echo "$as_me:11342: checking if this is really Intel C compiler" >&5
11343 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11344                 cf_save_CFLAGS="$CFLAGS"
11345                 CFLAGS="$CFLAGS -no-gcc"
11346                 cat >conftest.$ac_ext <<_ACEOF
11347 #line 11347 "configure"
11348 #include "confdefs.h"
11349
11350 int
11351 main ()
11352 {
11353
11354 #ifdef __INTEL_COMPILER
11355 #else
11356 make an error
11357 #endif
11358
11359   ;
11360   return 0;
11361 }
11362 _ACEOF
11363 rm -f conftest.$ac_objext
11364 if { (eval echo "$as_me:11364: \"$ac_compile\"") >&5
11365   (eval $ac_compile) 2>&5
11366   ac_status=$?
11367   echo "$as_me:11367: \$? = $ac_status" >&5
11368   (exit $ac_status); } &&
11369          { ac_try='test -s conftest.$ac_objext'
11370   { (eval echo "$as_me:11370: \"$ac_try\"") >&5
11371   (eval $ac_try) 2>&5
11372   ac_status=$?
11373   echo "$as_me:11373: \$? = $ac_status" >&5
11374   (exit $ac_status); }; }; then
11375   INTEL_COMPILER=yes
11376 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11377
11378 else
11379   echo "$as_me: failed program was:" >&5
11380 cat conftest.$ac_ext >&5
11381 fi
11382 rm -f conftest.$ac_objext conftest.$ac_ext
11383                 CFLAGS="$cf_save_CFLAGS"
11384                 echo "$as_me:11384: result: $INTEL_COMPILER" >&5
11385 echo "${ECHO_T}$INTEL_COMPILER" >&6
11386                 ;;
11387         esac
11388 fi
11389
11390 cat > conftest.$ac_ext <<EOF
11391 #line 11391 "${as_me:-configure}"
11392 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11393 EOF
11394
11395 if test "$INTEL_COMPILER" = yes
11396 then
11397 # The "-wdXXX" options suppress warnings:
11398 # remark #1419: external declaration in primary source file
11399 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11400 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11401 # remark #193: zero used for undefined preprocessing identifier
11402 # remark #593: variable "curs_sb_left_arrow" was set but never used
11403 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11404 # remark #869: parameter "tw" was never referenced
11405 # remark #981: operands are evaluated in unspecified order
11406 # warning #279: controlling expression is constant
11407
11408         { echo "$as_me:11408: checking for $CC warning options..." >&5
11409 echo "$as_me: checking for $CC warning options..." >&6;}
11410         cf_save_CFLAGS="$CFLAGS"
11411         EXTRA_CFLAGS="-Wall"
11412         for cf_opt in \
11413                 wd1419 \
11414                 wd1683 \
11415                 wd1684 \
11416                 wd193 \
11417                 wd593 \
11418                 wd279 \
11419                 wd810 \
11420                 wd869 \
11421                 wd981
11422         do
11423                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11424                 if { (eval echo "$as_me:11424: \"$ac_compile\"") >&5
11425   (eval $ac_compile) 2>&5
11426   ac_status=$?
11427   echo "$as_me:11427: \$? = $ac_status" >&5
11428   (exit $ac_status); }; then
11429                         test -n "$verbose" && echo "$as_me:11429: result: ... -$cf_opt" >&5
11430 echo "${ECHO_T}... -$cf_opt" >&6
11431                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11432                 fi
11433         done
11434         CFLAGS="$cf_save_CFLAGS"
11435
11436 elif test "$GCC" = yes
11437 then
11438         { echo "$as_me:11438: checking for $CC warning options..." >&5
11439 echo "$as_me: checking for $CC warning options..." >&6;}
11440         cf_save_CFLAGS="$CFLAGS"
11441         EXTRA_CFLAGS=
11442         cf_warn_CONST=""
11443         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11444         for cf_opt in W Wall \
11445                 Wbad-function-cast \
11446                 Wcast-align \
11447                 Wcast-qual \
11448                 Winline \
11449                 Wmissing-declarations \
11450                 Wmissing-prototypes \
11451                 Wnested-externs \
11452                 Wpointer-arith \
11453                 Wshadow \
11454                 Wstrict-prototypes \
11455                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11456         do
11457                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11458                 if { (eval echo "$as_me:11458: \"$ac_compile\"") >&5
11459   (eval $ac_compile) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit $ac_status); }; then
11463                         test -n "$verbose" && echo "$as_me:11463: result: ... -$cf_opt" >&5
11464 echo "${ECHO_T}... -$cf_opt" >&6
11465                         case $cf_opt in #(vi
11466                         Wcast-qual) #(vi
11467                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11468                                 ;;
11469                         Winline) #(vi
11470                                 case $GCC_VERSION in
11471                                 [34].*)
11472                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11473
11474 echo "${as_me:-configure}:11474: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11475
11476                                         continue;;
11477                                 esac
11478                                 ;;
11479                         esac
11480                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11481                 fi
11482         done
11483         CFLAGS="$cf_save_CFLAGS"
11484 fi
11485 rm -rf conftest*
11486
11487         if test "$cf_with_cxx" = yes ; then
11488
11489 INTEL_CPLUSPLUS=no
11490
11491 if test "$GCC" = yes ; then
11492         case $host_os in
11493         linux*|gnu*)
11494                 echo "$as_me:11494: checking if this is really Intel C++ compiler" >&5
11495 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11496                 cf_save_CFLAGS="$CXXFLAGS"
11497                 CXXFLAGS="$CXXFLAGS -no-gcc"
11498                 cat >conftest.$ac_ext <<_ACEOF
11499 #line 11499 "configure"
11500 #include "confdefs.h"
11501
11502 int
11503 main ()
11504 {
11505
11506 #ifdef __INTEL_COMPILER
11507 #else
11508 make an error
11509 #endif
11510
11511   ;
11512   return 0;
11513 }
11514 _ACEOF
11515 rm -f conftest.$ac_objext
11516 if { (eval echo "$as_me:11516: \"$ac_compile\"") >&5
11517   (eval $ac_compile) 2>&5
11518   ac_status=$?
11519   echo "$as_me:11519: \$? = $ac_status" >&5
11520   (exit $ac_status); } &&
11521          { ac_try='test -s conftest.$ac_objext'
11522   { (eval echo "$as_me:11522: \"$ac_try\"") >&5
11523   (eval $ac_try) 2>&5
11524   ac_status=$?
11525   echo "$as_me:11525: \$? = $ac_status" >&5
11526   (exit $ac_status); }; }; then
11527   INTEL_CPLUSPLUS=yes
11528 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11529
11530 else
11531   echo "$as_me: failed program was:" >&5
11532 cat conftest.$ac_ext >&5
11533 fi
11534 rm -f conftest.$ac_objext conftest.$ac_ext
11535                 CXXFLAGS="$cf_save_CFLAGS"
11536                 echo "$as_me:11536: result: $INTEL_CPLUSPLUS" >&5
11537 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11538                 ;;
11539         esac
11540 fi
11541
11542 ac_ext=cc
11543 ac_cpp='$CXXCPP $CPPFLAGS'
11544 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11545 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11546 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11547 ac_main_return=return
11548
11549 cat > conftest.$ac_ext <<EOF
11550 #line 11550 "configure"
11551 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11552 EOF
11553
11554 if test "$INTEL_CPLUSPLUS" = yes
11555 then
11556 # The "-wdXXX" options suppress warnings:
11557 # remark #1419: external declaration in primary source file
11558 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11559 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11560 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11561 # remark #193: zero used for undefined preprocessing identifier
11562 # remark #593: variable "curs_sb_left_arrow" was set but never used
11563 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11564 # remark #869: parameter "tw" was never referenced
11565 # remark #981: operands are evaluated in unspecified order
11566 # warning #269: invalid format string conversion
11567
11568         { echo "$as_me:11568: checking for $CC warning options..." >&5
11569 echo "$as_me: checking for $CC warning options..." >&6;}
11570         cf_save_CXXFLAGS="$CXXFLAGS"
11571         EXTRA_CXXFLAGS="-Wall"
11572         for cf_opt in \
11573                 wd1419 \
11574                 wd1682 \
11575                 wd1683 \
11576                 wd1684 \
11577                 wd193 \
11578                 wd279 \
11579                 wd593 \
11580                 wd810 \
11581                 wd869 \
11582                 wd981
11583         do
11584                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11585                 if { (eval echo "$as_me:11585: \"$ac_compile\"") >&5
11586   (eval $ac_compile) 2>&5
11587   ac_status=$?
11588   echo "$as_me:11588: \$? = $ac_status" >&5
11589   (exit $ac_status); }; then
11590                         test -n "$verbose" && echo "$as_me:11590: result: ... -$cf_opt" >&5
11591 echo "${ECHO_T}... -$cf_opt" >&6
11592                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11593                 fi
11594         done
11595         CXXFLAGS="$cf_save_CXXFLAGS"
11596
11597 elif test "$GXX" = yes
11598 then
11599         { echo "$as_me:11599: checking for $CXX warning options..." >&5
11600 echo "$as_me: checking for $CXX warning options..." >&6;}
11601         cf_save_CXXFLAGS="$CXXFLAGS"
11602         EXTRA_CXXFLAGS="-W -Wall"
11603         cf_gxx_extra_warnings=""
11604         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11605         case "$GCC_VERSION" in
11606         [1-2].*)
11607                 ;;
11608         *)
11609                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11610                 ;;
11611         esac
11612         for cf_opt in \
11613                 Wabi \
11614                 fabi-version=0 \
11615                 Woverloaded-virtual \
11616                 Wsign-promo \
11617                 Wsynth \
11618                 Wold-style-cast \
11619                 Wcast-align \
11620                 Wcast-qual \
11621                 Wmissing-prototypes \
11622                 Wpointer-arith \
11623                 Wshadow \
11624                 Wstrict-prototypes \
11625                 Wundef $cf_gxx_extra_warnings Wno-unused
11626         do
11627                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11628                 if { (eval echo "$as_me:11628: \"$ac_compile\"") >&5
11629   (eval $ac_compile) 2>&5
11630   ac_status=$?
11631   echo "$as_me:11631: \$? = $ac_status" >&5
11632   (exit $ac_status); }; then
11633                         test -n "$verbose" && echo "$as_me:11633: result: ... -$cf_opt" >&5
11634 echo "${ECHO_T}... -$cf_opt" >&6
11635                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11636                 else
11637                         test -n "$verbose" && echo "$as_me:11637: result: ... no -$cf_opt" >&5
11638 echo "${ECHO_T}... no -$cf_opt" >&6
11639                 fi
11640         done
11641         CXXFLAGS="$cf_save_CXXFLAGS"
11642 fi
11643
11644 rm -rf conftest*
11645 ac_ext=c
11646 ac_cpp='$CPP $CPPFLAGS'
11647 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11648 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11650 ac_main_return=return
11651
11652         fi
11653 fi
11654
11655 if test "$GCC" = yes
11656 then
11657 cat > conftest.i <<EOF
11658 #ifndef GCC_PRINTF
11659 #define GCC_PRINTF 0
11660 #endif
11661 #ifndef GCC_SCANF
11662 #define GCC_SCANF 0
11663 #endif
11664 #ifndef GCC_NORETURN
11665 #define GCC_NORETURN /* nothing */
11666 #endif
11667 #ifndef GCC_UNUSED
11668 #define GCC_UNUSED /* nothing */
11669 #endif
11670 EOF
11671 if test "$GCC" = yes
11672 then
11673         { echo "$as_me:11673: checking for $CC __attribute__ directives..." >&5
11674 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11675 cat > conftest.$ac_ext <<EOF
11676 #line 11676 "${as_me:-configure}"
11677 #include "confdefs.h"
11678 #include "conftest.h"
11679 #include "conftest.i"
11680 #if     GCC_PRINTF
11681 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11682 #else
11683 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11684 #endif
11685 #if     GCC_SCANF
11686 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11687 #else
11688 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11689 #endif
11690 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11691 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11692 extern void foo(void) GCC_NORETURN;
11693 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11694 EOF
11695         cf_printf_attribute=no
11696         cf_scanf_attribute=no
11697         for cf_attribute in scanf printf unused noreturn
11698         do
11699
11700 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11701
11702                 cf_directive="__attribute__(($cf_attribute))"
11703                 echo "checking for $CC $cf_directive" 1>&5
11704
11705                 case $cf_attribute in #(vi
11706                 printf) #(vi
11707                         cf_printf_attribute=yes
11708                         cat >conftest.h <<EOF
11709 #define GCC_$cf_ATTRIBUTE 1
11710 EOF
11711                         ;;
11712                 scanf) #(vi
11713                         cf_scanf_attribute=yes
11714                         cat >conftest.h <<EOF
11715 #define GCC_$cf_ATTRIBUTE 1
11716 EOF
11717                         ;;
11718                 *) #(vi
11719                         cat >conftest.h <<EOF
11720 #define GCC_$cf_ATTRIBUTE $cf_directive
11721 EOF
11722                         ;;
11723                 esac
11724
11725                 if { (eval echo "$as_me:11725: \"$ac_compile\"") >&5
11726   (eval $ac_compile) 2>&5
11727   ac_status=$?
11728   echo "$as_me:11728: \$? = $ac_status" >&5
11729   (exit $ac_status); }; then
11730                         test -n "$verbose" && echo "$as_me:11730: result: ... $cf_attribute" >&5
11731 echo "${ECHO_T}... $cf_attribute" >&6
11732                         cat conftest.h >>confdefs.h
11733                         case $cf_attribute in #(vi
11734                         printf) #(vi
11735                                 if test "$cf_printf_attribute" = no ; then
11736                                         cat >>confdefs.h <<EOF
11737 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11738 EOF
11739                                 else
11740                                         cat >>confdefs.h <<EOF
11741 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11742 EOF
11743                                 fi
11744                                 ;;
11745                         scanf) #(vi
11746                                 if test "$cf_scanf_attribute" = no ; then
11747                                         cat >>confdefs.h <<EOF
11748 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11749 EOF
11750                                 else
11751                                         cat >>confdefs.h <<EOF
11752 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11753 EOF
11754                                 fi
11755                                 ;;
11756                         esac
11757                 fi
11758         done
11759 else
11760         fgrep define conftest.i >>confdefs.h
11761 fi
11762 rm -rf conftest*
11763 fi
11764
11765 ###     use option --enable-assertions to turn on generation of assertion code
11766 echo "$as_me:11766: checking if you want to enable runtime assertions" >&5
11767 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11768
11769 # Check whether --enable-assertions or --disable-assertions was given.
11770 if test "${enable_assertions+set}" = set; then
11771   enableval="$enable_assertions"
11772   with_assertions=$enableval
11773 else
11774   with_assertions=no
11775 fi;
11776 echo "$as_me:11776: result: $with_assertions" >&5
11777 echo "${ECHO_T}$with_assertions" >&6
11778 if test -n "$GCC"
11779 then
11780         if test "$with_assertions" = no
11781         then
11782                 cat >>confdefs.h <<\EOF
11783 #define NDEBUG 1
11784 EOF
11785
11786                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11787         else
11788
11789         ADAFLAGS="$ADAFLAGS -gnata"
11790
11791         fi
11792 fi
11793
11794 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11795
11796 echo "$as_me:11796: checking if you want to use dmalloc for testing" >&5
11797 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11798
11799 # Check whether --with-dmalloc or --without-dmalloc was given.
11800 if test "${with_dmalloc+set}" = set; then
11801   withval="$with_dmalloc"
11802   cat >>confdefs.h <<\EOF
11803 #define USE_DMALLOC 1
11804 EOF
11805
11806         : ${with_cflags:=-g}
11807         : ${with_no_leaks:=yes}
11808          with_dmalloc=yes
11809 else
11810   with_dmalloc=
11811 fi;
11812 echo "$as_me:11812: result: ${with_dmalloc:-no}" >&5
11813 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11814
11815 case .$with_cflags in #(vi
11816 .*-g*)
11817         case .$CFLAGS in #(vi
11818         .*-g*) #(vi
11819                 ;;
11820         *)
11821
11822 cf_fix_cppflags=no
11823 cf_new_cflags=
11824 cf_new_cppflags=
11825 cf_new_extra_cppflags=
11826
11827 for cf_add_cflags in -g
11828 do
11829 case $cf_fix_cppflags in
11830 no)
11831         case $cf_add_cflags in #(vi
11832         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11833                 case $cf_add_cflags in
11834                 -D*)
11835                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11836
11837                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11838                                 && test -z "${cf_tst_cflags}" \
11839                                 && cf_fix_cppflags=yes
11840
11841                         if test $cf_fix_cppflags = yes ; then
11842                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11843                                 continue
11844                         elif test "${cf_tst_cflags}" = "\"'" ; then
11845                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11846                                 continue
11847                         fi
11848                         ;;
11849                 esac
11850                 case "$CPPFLAGS" in
11851                 *$cf_add_cflags) #(vi
11852                         ;;
11853                 *) #(vi
11854                         case $cf_add_cflags in #(vi
11855                         -D*)
11856                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11857
11858 CPPFLAGS=`echo "$CPPFLAGS" | \
11859         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11860                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11861
11862                                 ;;
11863                         esac
11864                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11865                         ;;
11866                 esac
11867                 ;;
11868         *)
11869                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11870                 ;;
11871         esac
11872         ;;
11873 yes)
11874         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11875
11876         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11877
11878         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11879                 && test -z "${cf_tst_cflags}" \
11880                 && cf_fix_cppflags=no
11881         ;;
11882 esac
11883 done
11884
11885 if test -n "$cf_new_cflags" ; then
11886
11887         CFLAGS="$CFLAGS $cf_new_cflags"
11888 fi
11889
11890 if test -n "$cf_new_cppflags" ; then
11891
11892         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11893 fi
11894
11895 if test -n "$cf_new_extra_cppflags" ; then
11896
11897         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11898 fi
11899
11900                 ;;
11901         esac
11902         ;;
11903 esac
11904
11905 if test "$with_dmalloc" = yes ; then
11906         echo "$as_me:11906: checking for dmalloc.h" >&5
11907 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11908 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11909   echo $ECHO_N "(cached) $ECHO_C" >&6
11910 else
11911   cat >conftest.$ac_ext <<_ACEOF
11912 #line 11912 "configure"
11913 #include "confdefs.h"
11914 #include <dmalloc.h>
11915 _ACEOF
11916 if { (eval echo "$as_me:11916: \"$ac_cpp conftest.$ac_ext\"") >&5
11917   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11918   ac_status=$?
11919   egrep -v '^ *\+' conftest.er1 >conftest.err
11920   rm -f conftest.er1
11921   cat conftest.err >&5
11922   echo "$as_me:11922: \$? = $ac_status" >&5
11923   (exit $ac_status); } >/dev/null; then
11924   if test -s conftest.err; then
11925     ac_cpp_err=$ac_c_preproc_warn_flag
11926   else
11927     ac_cpp_err=
11928   fi
11929 else
11930   ac_cpp_err=yes
11931 fi
11932 if test -z "$ac_cpp_err"; then
11933   ac_cv_header_dmalloc_h=yes
11934 else
11935   echo "$as_me: failed program was:" >&5
11936   cat conftest.$ac_ext >&5
11937   ac_cv_header_dmalloc_h=no
11938 fi
11939 rm -f conftest.err conftest.$ac_ext
11940 fi
11941 echo "$as_me:11941: result: $ac_cv_header_dmalloc_h" >&5
11942 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11943 if test $ac_cv_header_dmalloc_h = yes; then
11944
11945 echo "$as_me:11945: checking for dmalloc_debug in -ldmalloc" >&5
11946 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11947 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11948   echo $ECHO_N "(cached) $ECHO_C" >&6
11949 else
11950   ac_check_lib_save_LIBS=$LIBS
11951 LIBS="-ldmalloc  $LIBS"
11952 cat >conftest.$ac_ext <<_ACEOF
11953 #line 11953 "configure"
11954 #include "confdefs.h"
11955
11956 /* Override any gcc2 internal prototype to avoid an error.  */
11957 #ifdef __cplusplus
11958 extern "C"
11959 #endif
11960 /* We use char because int might match the return type of a gcc2
11961    builtin and then its argument prototype would still apply.  */
11962 char dmalloc_debug ();
11963 int
11964 main ()
11965 {
11966 dmalloc_debug ();
11967   ;
11968   return 0;
11969 }
11970 _ACEOF
11971 rm -f conftest.$ac_objext conftest$ac_exeext
11972 if { (eval echo "$as_me:11972: \"$ac_link\"") >&5
11973   (eval $ac_link) 2>&5
11974   ac_status=$?
11975   echo "$as_me:11975: \$? = $ac_status" >&5
11976   (exit $ac_status); } &&
11977          { ac_try='test -s conftest$ac_exeext'
11978   { (eval echo "$as_me:11978: \"$ac_try\"") >&5
11979   (eval $ac_try) 2>&5
11980   ac_status=$?
11981   echo "$as_me:11981: \$? = $ac_status" >&5
11982   (exit $ac_status); }; }; then
11983   ac_cv_lib_dmalloc_dmalloc_debug=yes
11984 else
11985   echo "$as_me: failed program was:" >&5
11986 cat conftest.$ac_ext >&5
11987 ac_cv_lib_dmalloc_dmalloc_debug=no
11988 fi
11989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11990 LIBS=$ac_check_lib_save_LIBS
11991 fi
11992 echo "$as_me:11992: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11993 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11994 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11995   cat >>confdefs.h <<EOF
11996 #define HAVE_LIBDMALLOC 1
11997 EOF
11998
11999   LIBS="-ldmalloc $LIBS"
12000
12001 fi
12002
12003 fi
12004
12005 fi
12006
12007 echo "$as_me:12007: checking if you want to use dbmalloc for testing" >&5
12008 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12009
12010 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12011 if test "${with_dbmalloc+set}" = set; then
12012   withval="$with_dbmalloc"
12013   cat >>confdefs.h <<\EOF
12014 #define USE_DBMALLOC 1
12015 EOF
12016
12017         : ${with_cflags:=-g}
12018         : ${with_no_leaks:=yes}
12019          with_dbmalloc=yes
12020 else
12021   with_dbmalloc=
12022 fi;
12023 echo "$as_me:12023: result: ${with_dbmalloc:-no}" >&5
12024 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12025
12026 case .$with_cflags in #(vi
12027 .*-g*)
12028         case .$CFLAGS in #(vi
12029         .*-g*) #(vi
12030                 ;;
12031         *)
12032
12033 cf_fix_cppflags=no
12034 cf_new_cflags=
12035 cf_new_cppflags=
12036 cf_new_extra_cppflags=
12037
12038 for cf_add_cflags in -g
12039 do
12040 case $cf_fix_cppflags in
12041 no)
12042         case $cf_add_cflags in #(vi
12043         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12044                 case $cf_add_cflags in
12045                 -D*)
12046                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12047
12048                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12049                                 && test -z "${cf_tst_cflags}" \
12050                                 && cf_fix_cppflags=yes
12051
12052                         if test $cf_fix_cppflags = yes ; then
12053                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12054                                 continue
12055                         elif test "${cf_tst_cflags}" = "\"'" ; then
12056                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12057                                 continue
12058                         fi
12059                         ;;
12060                 esac
12061                 case "$CPPFLAGS" in
12062                 *$cf_add_cflags) #(vi
12063                         ;;
12064                 *) #(vi
12065                         case $cf_add_cflags in #(vi
12066                         -D*)
12067                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12068
12069 CPPFLAGS=`echo "$CPPFLAGS" | \
12070         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12071                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12072
12073                                 ;;
12074                         esac
12075                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12076                         ;;
12077                 esac
12078                 ;;
12079         *)
12080                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12081                 ;;
12082         esac
12083         ;;
12084 yes)
12085         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12086
12087         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12088
12089         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12090                 && test -z "${cf_tst_cflags}" \
12091                 && cf_fix_cppflags=no
12092         ;;
12093 esac
12094 done
12095
12096 if test -n "$cf_new_cflags" ; then
12097
12098         CFLAGS="$CFLAGS $cf_new_cflags"
12099 fi
12100
12101 if test -n "$cf_new_cppflags" ; then
12102
12103         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12104 fi
12105
12106 if test -n "$cf_new_extra_cppflags" ; then
12107
12108         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12109 fi
12110
12111                 ;;
12112         esac
12113         ;;
12114 esac
12115
12116 if test "$with_dbmalloc" = yes ; then
12117         echo "$as_me:12117: checking for dbmalloc.h" >&5
12118 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12119 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12120   echo $ECHO_N "(cached) $ECHO_C" >&6
12121 else
12122   cat >conftest.$ac_ext <<_ACEOF
12123 #line 12123 "configure"
12124 #include "confdefs.h"
12125 #include <dbmalloc.h>
12126 _ACEOF
12127 if { (eval echo "$as_me:12127: \"$ac_cpp conftest.$ac_ext\"") >&5
12128   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12129   ac_status=$?
12130   egrep -v '^ *\+' conftest.er1 >conftest.err
12131   rm -f conftest.er1
12132   cat conftest.err >&5
12133   echo "$as_me:12133: \$? = $ac_status" >&5
12134   (exit $ac_status); } >/dev/null; then
12135   if test -s conftest.err; then
12136     ac_cpp_err=$ac_c_preproc_warn_flag
12137   else
12138     ac_cpp_err=
12139   fi
12140 else
12141   ac_cpp_err=yes
12142 fi
12143 if test -z "$ac_cpp_err"; then
12144   ac_cv_header_dbmalloc_h=yes
12145 else
12146   echo "$as_me: failed program was:" >&5
12147   cat conftest.$ac_ext >&5
12148   ac_cv_header_dbmalloc_h=no
12149 fi
12150 rm -f conftest.err conftest.$ac_ext
12151 fi
12152 echo "$as_me:12152: result: $ac_cv_header_dbmalloc_h" >&5
12153 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12154 if test $ac_cv_header_dbmalloc_h = yes; then
12155
12156 echo "$as_me:12156: checking for debug_malloc in -ldbmalloc" >&5
12157 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12158 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12159   echo $ECHO_N "(cached) $ECHO_C" >&6
12160 else
12161   ac_check_lib_save_LIBS=$LIBS
12162 LIBS="-ldbmalloc  $LIBS"
12163 cat >conftest.$ac_ext <<_ACEOF
12164 #line 12164 "configure"
12165 #include "confdefs.h"
12166
12167 /* Override any gcc2 internal prototype to avoid an error.  */
12168 #ifdef __cplusplus
12169 extern "C"
12170 #endif
12171 /* We use char because int might match the return type of a gcc2
12172    builtin and then its argument prototype would still apply.  */
12173 char debug_malloc ();
12174 int
12175 main ()
12176 {
12177 debug_malloc ();
12178   ;
12179   return 0;
12180 }
12181 _ACEOF
12182 rm -f conftest.$ac_objext conftest$ac_exeext
12183 if { (eval echo "$as_me:12183: \"$ac_link\"") >&5
12184   (eval $ac_link) 2>&5
12185   ac_status=$?
12186   echo "$as_me:12186: \$? = $ac_status" >&5
12187   (exit $ac_status); } &&
12188          { ac_try='test -s conftest$ac_exeext'
12189   { (eval echo "$as_me:12189: \"$ac_try\"") >&5
12190   (eval $ac_try) 2>&5
12191   ac_status=$?
12192   echo "$as_me:12192: \$? = $ac_status" >&5
12193   (exit $ac_status); }; }; then
12194   ac_cv_lib_dbmalloc_debug_malloc=yes
12195 else
12196   echo "$as_me: failed program was:" >&5
12197 cat conftest.$ac_ext >&5
12198 ac_cv_lib_dbmalloc_debug_malloc=no
12199 fi
12200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12201 LIBS=$ac_check_lib_save_LIBS
12202 fi
12203 echo "$as_me:12203: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12204 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12205 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12206   cat >>confdefs.h <<EOF
12207 #define HAVE_LIBDBMALLOC 1
12208 EOF
12209
12210   LIBS="-ldbmalloc $LIBS"
12211
12212 fi
12213
12214 fi
12215
12216 fi
12217
12218 echo "$as_me:12218: checking if you want to use valgrind for testing" >&5
12219 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12220
12221 # Check whether --with-valgrind or --without-valgrind was given.
12222 if test "${with_valgrind+set}" = set; then
12223   withval="$with_valgrind"
12224   cat >>confdefs.h <<\EOF
12225 #define USE_VALGRIND 1
12226 EOF
12227
12228         : ${with_cflags:=-g}
12229         : ${with_no_leaks:=yes}
12230          with_valgrind=yes
12231 else
12232   with_valgrind=
12233 fi;
12234 echo "$as_me:12234: result: ${with_valgrind:-no}" >&5
12235 echo "${ECHO_T}${with_valgrind:-no}" >&6
12236
12237 case .$with_cflags in #(vi
12238 .*-g*)
12239         case .$CFLAGS in #(vi
12240         .*-g*) #(vi
12241                 ;;
12242         *)
12243
12244 cf_fix_cppflags=no
12245 cf_new_cflags=
12246 cf_new_cppflags=
12247 cf_new_extra_cppflags=
12248
12249 for cf_add_cflags in -g
12250 do
12251 case $cf_fix_cppflags in
12252 no)
12253         case $cf_add_cflags in #(vi
12254         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12255                 case $cf_add_cflags in
12256                 -D*)
12257                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12258
12259                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12260                                 && test -z "${cf_tst_cflags}" \
12261                                 && cf_fix_cppflags=yes
12262
12263                         if test $cf_fix_cppflags = yes ; then
12264                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12265                                 continue
12266                         elif test "${cf_tst_cflags}" = "\"'" ; then
12267                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12268                                 continue
12269                         fi
12270                         ;;
12271                 esac
12272                 case "$CPPFLAGS" in
12273                 *$cf_add_cflags) #(vi
12274                         ;;
12275                 *) #(vi
12276                         case $cf_add_cflags in #(vi
12277                         -D*)
12278                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12279
12280 CPPFLAGS=`echo "$CPPFLAGS" | \
12281         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12282                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12283
12284                                 ;;
12285                         esac
12286                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12287                         ;;
12288                 esac
12289                 ;;
12290         *)
12291                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12292                 ;;
12293         esac
12294         ;;
12295 yes)
12296         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12297
12298         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12299
12300         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12301                 && test -z "${cf_tst_cflags}" \
12302                 && cf_fix_cppflags=no
12303         ;;
12304 esac
12305 done
12306
12307 if test -n "$cf_new_cflags" ; then
12308
12309         CFLAGS="$CFLAGS $cf_new_cflags"
12310 fi
12311
12312 if test -n "$cf_new_cppflags" ; then
12313
12314         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12315 fi
12316
12317 if test -n "$cf_new_extra_cppflags" ; then
12318
12319         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12320 fi
12321
12322                 ;;
12323         esac
12324         ;;
12325 esac
12326
12327 echo "$as_me:12327: checking if you want to perform memory-leak testing" >&5
12328 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12329
12330 # Check whether --enable-leaks or --disable-leaks was given.
12331 if test "${enable_leaks+set}" = set; then
12332   enableval="$enable_leaks"
12333   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12334 else
12335   : ${with_no_leaks:=no}
12336 fi;
12337 echo "$as_me:12337: result: $with_no_leaks" >&5
12338 echo "${ECHO_T}$with_no_leaks" >&6
12339
12340 if test "$with_no_leaks" = yes ; then
12341         cat >>confdefs.h <<\EOF
12342 #define NO_LEAKS 1
12343 EOF
12344
12345         cat >>confdefs.h <<\EOF
12346 #define YY_NO_LEAKS 1
12347 EOF
12348
12349 fi
12350
12351 cat >>confdefs.h <<\EOF
12352 #define HAVE_NC_ALLOC_H 1
12353 EOF
12354
12355 ###     use option --enable-expanded to generate certain macros as functions
12356
12357 # Check whether --enable-expanded or --disable-expanded was given.
12358 if test "${enable_expanded+set}" = set; then
12359   enableval="$enable_expanded"
12360   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12361 #define NCURSES_EXPANDED 1
12362 EOF
12363
12364 fi;
12365
12366 ###     use option --disable-macros to suppress macros in favor of functions
12367
12368 # Check whether --enable-macros or --disable-macros was given.
12369 if test "${enable_macros+set}" = set; then
12370   enableval="$enable_macros"
12371   test "$enableval" = no && cat >>confdefs.h <<\EOF
12372 #define NCURSES_NOMACROS 1
12373 EOF
12374
12375 fi;
12376
12377 # Normally we only add trace() to the debug-library.  Allow this to be
12378 # extended to all models of the ncurses library:
12379 cf_all_traces=no
12380 case "$CFLAGS $CPPFLAGS" in
12381 *-DTRACE*)
12382         cf_all_traces=yes
12383         ;;
12384 esac
12385
12386 echo "$as_me:12386: checking whether to add trace feature to all models" >&5
12387 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12388
12389 # Check whether --with-trace or --without-trace was given.
12390 if test "${with_trace+set}" = set; then
12391   withval="$with_trace"
12392   cf_with_trace=$withval
12393 else
12394   cf_with_trace=$cf_all_traces
12395 fi;
12396 echo "$as_me:12396: result: $cf_with_trace" >&5
12397 echo "${ECHO_T}$cf_with_trace" >&6
12398
12399 if test "$cf_with_trace" = yes ; then
12400         LIB_TRACING=all
12401         ADA_TRACE=TRUE
12402
12403 cf_fix_cppflags=no
12404 cf_new_cflags=
12405 cf_new_cppflags=
12406 cf_new_extra_cppflags=
12407
12408 for cf_add_cflags in -DTRACE
12409 do
12410 case $cf_fix_cppflags in
12411 no)
12412         case $cf_add_cflags in #(vi
12413         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12414                 case $cf_add_cflags in
12415                 -D*)
12416                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12417
12418                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12419                                 && test -z "${cf_tst_cflags}" \
12420                                 && cf_fix_cppflags=yes
12421
12422                         if test $cf_fix_cppflags = yes ; then
12423                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12424                                 continue
12425                         elif test "${cf_tst_cflags}" = "\"'" ; then
12426                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12427                                 continue
12428                         fi
12429                         ;;
12430                 esac
12431                 case "$CPPFLAGS" in
12432                 *$cf_add_cflags) #(vi
12433                         ;;
12434                 *) #(vi
12435                         case $cf_add_cflags in #(vi
12436                         -D*)
12437                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12438
12439 CPPFLAGS=`echo "$CPPFLAGS" | \
12440         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12441                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12442
12443                                 ;;
12444                         esac
12445                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12446                         ;;
12447                 esac
12448                 ;;
12449         *)
12450                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12451                 ;;
12452         esac
12453         ;;
12454 yes)
12455         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12456
12457         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12458
12459         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12460                 && test -z "${cf_tst_cflags}" \
12461                 && cf_fix_cppflags=no
12462         ;;
12463 esac
12464 done
12465
12466 if test -n "$cf_new_cflags" ; then
12467
12468         CFLAGS="$CFLAGS $cf_new_cflags"
12469 fi
12470
12471 if test -n "$cf_new_cppflags" ; then
12472
12473         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12474 fi
12475
12476 if test -n "$cf_new_extra_cppflags" ; then
12477
12478         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12479 fi
12480
12481 else
12482         LIB_TRACING=DEBUG
12483         ADA_TRACE=FALSE
12484 fi
12485
12486 ###     Checks for libraries.
12487 case $cf_cv_system_name in #(vi
12488 *mingw32*) #(vi
12489         ;;
12490 *)
12491 echo "$as_me:12491: checking for gettimeofday" >&5
12492 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12493 if test "${ac_cv_func_gettimeofday+set}" = set; then
12494   echo $ECHO_N "(cached) $ECHO_C" >&6
12495 else
12496   cat >conftest.$ac_ext <<_ACEOF
12497 #line 12497 "configure"
12498 #include "confdefs.h"
12499 /* System header to define __stub macros and hopefully few prototypes,
12500     which can conflict with char gettimeofday (); below.  */
12501 #include <assert.h>
12502 /* Override any gcc2 internal prototype to avoid an error.  */
12503 #ifdef __cplusplus
12504 extern "C"
12505 #endif
12506 /* We use char because int might match the return type of a gcc2
12507    builtin and then its argument prototype would still apply.  */
12508 char gettimeofday ();
12509 char (*f) ();
12510
12511 int
12512 main ()
12513 {
12514 /* The GNU C library defines this for functions which it implements
12515     to always fail with ENOSYS.  Some functions are actually named
12516     something starting with __ and the normal name is an alias.  */
12517 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12518 choke me
12519 #else
12520 f = gettimeofday;
12521 #endif
12522
12523   ;
12524   return 0;
12525 }
12526 _ACEOF
12527 rm -f conftest.$ac_objext conftest$ac_exeext
12528 if { (eval echo "$as_me:12528: \"$ac_link\"") >&5
12529   (eval $ac_link) 2>&5
12530   ac_status=$?
12531   echo "$as_me:12531: \$? = $ac_status" >&5
12532   (exit $ac_status); } &&
12533          { ac_try='test -s conftest$ac_exeext'
12534   { (eval echo "$as_me:12534: \"$ac_try\"") >&5
12535   (eval $ac_try) 2>&5
12536   ac_status=$?
12537   echo "$as_me:12537: \$? = $ac_status" >&5
12538   (exit $ac_status); }; }; then
12539   ac_cv_func_gettimeofday=yes
12540 else
12541   echo "$as_me: failed program was:" >&5
12542 cat conftest.$ac_ext >&5
12543 ac_cv_func_gettimeofday=no
12544 fi
12545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12546 fi
12547 echo "$as_me:12547: result: $ac_cv_func_gettimeofday" >&5
12548 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12549 if test $ac_cv_func_gettimeofday = yes; then
12550   cat >>confdefs.h <<\EOF
12551 #define HAVE_GETTIMEOFDAY 1
12552 EOF
12553
12554 else
12555
12556 echo "$as_me:12556: checking for gettimeofday in -lbsd" >&5
12557 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12558 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12559   echo $ECHO_N "(cached) $ECHO_C" >&6
12560 else
12561   ac_check_lib_save_LIBS=$LIBS
12562 LIBS="-lbsd  $LIBS"
12563 cat >conftest.$ac_ext <<_ACEOF
12564 #line 12564 "configure"
12565 #include "confdefs.h"
12566
12567 /* Override any gcc2 internal prototype to avoid an error.  */
12568 #ifdef __cplusplus
12569 extern "C"
12570 #endif
12571 /* We use char because int might match the return type of a gcc2
12572    builtin and then its argument prototype would still apply.  */
12573 char gettimeofday ();
12574 int
12575 main ()
12576 {
12577 gettimeofday ();
12578   ;
12579   return 0;
12580 }
12581 _ACEOF
12582 rm -f conftest.$ac_objext conftest$ac_exeext
12583 if { (eval echo "$as_me:12583: \"$ac_link\"") >&5
12584   (eval $ac_link) 2>&5
12585   ac_status=$?
12586   echo "$as_me:12586: \$? = $ac_status" >&5
12587   (exit $ac_status); } &&
12588          { ac_try='test -s conftest$ac_exeext'
12589   { (eval echo "$as_me:12589: \"$ac_try\"") >&5
12590   (eval $ac_try) 2>&5
12591   ac_status=$?
12592   echo "$as_me:12592: \$? = $ac_status" >&5
12593   (exit $ac_status); }; }; then
12594   ac_cv_lib_bsd_gettimeofday=yes
12595 else
12596   echo "$as_me: failed program was:" >&5
12597 cat conftest.$ac_ext >&5
12598 ac_cv_lib_bsd_gettimeofday=no
12599 fi
12600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12601 LIBS=$ac_check_lib_save_LIBS
12602 fi
12603 echo "$as_me:12603: result: $ac_cv_lib_bsd_gettimeofday" >&5
12604 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12605 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12606   cat >>confdefs.h <<\EOF
12607 #define HAVE_GETTIMEOFDAY 1
12608 EOF
12609
12610         LIBS="-lbsd $LIBS"
12611 fi
12612
12613 fi
12614         ;;
12615 esac
12616
12617 echo "$as_me:12617: checking if -lm needed for math functions" >&5
12618 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12619 if test "${cf_cv_need_libm+set}" = set; then
12620   echo $ECHO_N "(cached) $ECHO_C" >&6
12621 else
12622
12623         cat >conftest.$ac_ext <<_ACEOF
12624 #line 12624 "configure"
12625 #include "confdefs.h"
12626
12627         #include <stdio.h>
12628         #include <math.h>
12629
12630 int
12631 main ()
12632 {
12633 double x = rand(); printf("result = %g\n", sin(x))
12634   ;
12635   return 0;
12636 }
12637 _ACEOF
12638 rm -f conftest.$ac_objext conftest$ac_exeext
12639 if { (eval echo "$as_me:12639: \"$ac_link\"") >&5
12640   (eval $ac_link) 2>&5
12641   ac_status=$?
12642   echo "$as_me:12642: \$? = $ac_status" >&5
12643   (exit $ac_status); } &&
12644          { ac_try='test -s conftest$ac_exeext'
12645   { (eval echo "$as_me:12645: \"$ac_try\"") >&5
12646   (eval $ac_try) 2>&5
12647   ac_status=$?
12648   echo "$as_me:12648: \$? = $ac_status" >&5
12649   (exit $ac_status); }; }; then
12650   cf_cv_need_libm=no
12651 else
12652   echo "$as_me: failed program was:" >&5
12653 cat conftest.$ac_ext >&5
12654 cf_cv_need_libm=yes
12655 fi
12656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12657 fi
12658 echo "$as_me:12658: result: $cf_cv_need_libm" >&5
12659 echo "${ECHO_T}$cf_cv_need_libm" >&6
12660 if test "$cf_cv_need_libm" = yes
12661 then
12662 MATH_LIB=-lm
12663 fi
12664
12665 ###     Checks for header files.
12666 echo "$as_me:12666: checking for ANSI C header files" >&5
12667 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12668 if test "${ac_cv_header_stdc+set}" = set; then
12669   echo $ECHO_N "(cached) $ECHO_C" >&6
12670 else
12671   cat >conftest.$ac_ext <<_ACEOF
12672 #line 12672 "configure"
12673 #include "confdefs.h"
12674 #include <stdlib.h>
12675 #include <stdarg.h>
12676 #include <string.h>
12677 #include <float.h>
12678
12679 _ACEOF
12680 if { (eval echo "$as_me:12680: \"$ac_cpp conftest.$ac_ext\"") >&5
12681   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12682   ac_status=$?
12683   egrep -v '^ *\+' conftest.er1 >conftest.err
12684   rm -f conftest.er1
12685   cat conftest.err >&5
12686   echo "$as_me:12686: \$? = $ac_status" >&5
12687   (exit $ac_status); } >/dev/null; then
12688   if test -s conftest.err; then
12689     ac_cpp_err=$ac_c_preproc_warn_flag
12690   else
12691     ac_cpp_err=
12692   fi
12693 else
12694   ac_cpp_err=yes
12695 fi
12696 if test -z "$ac_cpp_err"; then
12697   ac_cv_header_stdc=yes
12698 else
12699   echo "$as_me: failed program was:" >&5
12700   cat conftest.$ac_ext >&5
12701   ac_cv_header_stdc=no
12702 fi
12703 rm -f conftest.err conftest.$ac_ext
12704
12705 if test $ac_cv_header_stdc = yes; then
12706   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12707   cat >conftest.$ac_ext <<_ACEOF
12708 #line 12708 "configure"
12709 #include "confdefs.h"
12710 #include <string.h>
12711
12712 _ACEOF
12713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12714   egrep "memchr" >/dev/null 2>&1; then
12715   :
12716 else
12717   ac_cv_header_stdc=no
12718 fi
12719 rm -rf conftest*
12720
12721 fi
12722
12723 if test $ac_cv_header_stdc = yes; then
12724   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12725   cat >conftest.$ac_ext <<_ACEOF
12726 #line 12726 "configure"
12727 #include "confdefs.h"
12728 #include <stdlib.h>
12729
12730 _ACEOF
12731 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12732   egrep "free" >/dev/null 2>&1; then
12733   :
12734 else
12735   ac_cv_header_stdc=no
12736 fi
12737 rm -rf conftest*
12738
12739 fi
12740
12741 if test $ac_cv_header_stdc = yes; then
12742   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12743   if test "$cross_compiling" = yes; then
12744   :
12745 else
12746   cat >conftest.$ac_ext <<_ACEOF
12747 #line 12747 "configure"
12748 #include "confdefs.h"
12749 #include <ctype.h>
12750 #if ((' ' & 0x0FF) == 0x020)
12751 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12752 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12753 #else
12754 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12755                      || ('j' <= (c) && (c) <= 'r') \
12756                      || ('s' <= (c) && (c) <= 'z'))
12757 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12758 #endif
12759
12760 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12761 int
12762 main ()
12763 {
12764   int i;
12765   for (i = 0; i < 256; i++)
12766     if (XOR (islower (i), ISLOWER (i))
12767         || toupper (i) != TOUPPER (i))
12768       $ac_main_return(2);
12769   $ac_main_return (0);
12770 }
12771 _ACEOF
12772 rm -f conftest$ac_exeext
12773 if { (eval echo "$as_me:12773: \"$ac_link\"") >&5
12774   (eval $ac_link) 2>&5
12775   ac_status=$?
12776   echo "$as_me:12776: \$? = $ac_status" >&5
12777   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12778   { (eval echo "$as_me:12778: \"$ac_try\"") >&5
12779   (eval $ac_try) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit $ac_status); }; }; then
12783   :
12784 else
12785   echo "$as_me: program exited with status $ac_status" >&5
12786 echo "$as_me: failed program was:" >&5
12787 cat conftest.$ac_ext >&5
12788 ac_cv_header_stdc=no
12789 fi
12790 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12791 fi
12792 fi
12793 fi
12794 echo "$as_me:12794: result: $ac_cv_header_stdc" >&5
12795 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12796 if test $ac_cv_header_stdc = yes; then
12797
12798 cat >>confdefs.h <<\EOF
12799 #define STDC_HEADERS 1
12800 EOF
12801
12802 fi
12803
12804 ac_header_dirent=no
12805 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12806   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12807 echo "$as_me:12807: checking for $ac_hdr that defines DIR" >&5
12808 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12809 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12810   echo $ECHO_N "(cached) $ECHO_C" >&6
12811 else
12812   cat >conftest.$ac_ext <<_ACEOF
12813 #line 12813 "configure"
12814 #include "confdefs.h"
12815 #include <sys/types.h>
12816 #include <$ac_hdr>
12817
12818 int
12819 main ()
12820 {
12821 if ((DIR *) 0)
12822 return 0;
12823   ;
12824   return 0;
12825 }
12826 _ACEOF
12827 rm -f conftest.$ac_objext
12828 if { (eval echo "$as_me:12828: \"$ac_compile\"") >&5
12829   (eval $ac_compile) 2>&5
12830   ac_status=$?
12831   echo "$as_me:12831: \$? = $ac_status" >&5
12832   (exit $ac_status); } &&
12833          { ac_try='test -s conftest.$ac_objext'
12834   { (eval echo "$as_me:12834: \"$ac_try\"") >&5
12835   (eval $ac_try) 2>&5
12836   ac_status=$?
12837   echo "$as_me:12837: \$? = $ac_status" >&5
12838   (exit $ac_status); }; }; then
12839   eval "$as_ac_Header=yes"
12840 else
12841   echo "$as_me: failed program was:" >&5
12842 cat conftest.$ac_ext >&5
12843 eval "$as_ac_Header=no"
12844 fi
12845 rm -f conftest.$ac_objext conftest.$ac_ext
12846 fi
12847 echo "$as_me:12847: result: `eval echo '${'$as_ac_Header'}'`" >&5
12848 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12849 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12850   cat >>confdefs.h <<EOF
12851 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12852 EOF
12853
12854 ac_header_dirent=$ac_hdr; break
12855 fi
12856
12857 done
12858 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12859 if test $ac_header_dirent = dirent.h; then
12860   echo "$as_me:12860: checking for opendir in -ldir" >&5
12861 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12862 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12863   echo $ECHO_N "(cached) $ECHO_C" >&6
12864 else
12865   ac_check_lib_save_LIBS=$LIBS
12866 LIBS="-ldir  $LIBS"
12867 cat >conftest.$ac_ext <<_ACEOF
12868 #line 12868 "configure"
12869 #include "confdefs.h"
12870
12871 /* Override any gcc2 internal prototype to avoid an error.  */
12872 #ifdef __cplusplus
12873 extern "C"
12874 #endif
12875 /* We use char because int might match the return type of a gcc2
12876    builtin and then its argument prototype would still apply.  */
12877 char opendir ();
12878 int
12879 main ()
12880 {
12881 opendir ();
12882   ;
12883   return 0;
12884 }
12885 _ACEOF
12886 rm -f conftest.$ac_objext conftest$ac_exeext
12887 if { (eval echo "$as_me:12887: \"$ac_link\"") >&5
12888   (eval $ac_link) 2>&5
12889   ac_status=$?
12890   echo "$as_me:12890: \$? = $ac_status" >&5
12891   (exit $ac_status); } &&
12892          { ac_try='test -s conftest$ac_exeext'
12893   { (eval echo "$as_me:12893: \"$ac_try\"") >&5
12894   (eval $ac_try) 2>&5
12895   ac_status=$?
12896   echo "$as_me:12896: \$? = $ac_status" >&5
12897   (exit $ac_status); }; }; then
12898   ac_cv_lib_dir_opendir=yes
12899 else
12900   echo "$as_me: failed program was:" >&5
12901 cat conftest.$ac_ext >&5
12902 ac_cv_lib_dir_opendir=no
12903 fi
12904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12905 LIBS=$ac_check_lib_save_LIBS
12906 fi
12907 echo "$as_me:12907: result: $ac_cv_lib_dir_opendir" >&5
12908 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12909 if test $ac_cv_lib_dir_opendir = yes; then
12910   LIBS="$LIBS -ldir"
12911 fi
12912
12913 else
12914   echo "$as_me:12914: checking for opendir in -lx" >&5
12915 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12916 if test "${ac_cv_lib_x_opendir+set}" = set; then
12917   echo $ECHO_N "(cached) $ECHO_C" >&6
12918 else
12919   ac_check_lib_save_LIBS=$LIBS
12920 LIBS="-lx  $LIBS"
12921 cat >conftest.$ac_ext <<_ACEOF
12922 #line 12922 "configure"
12923 #include "confdefs.h"
12924
12925 /* Override any gcc2 internal prototype to avoid an error.  */
12926 #ifdef __cplusplus
12927 extern "C"
12928 #endif
12929 /* We use char because int might match the return type of a gcc2
12930    builtin and then its argument prototype would still apply.  */
12931 char opendir ();
12932 int
12933 main ()
12934 {
12935 opendir ();
12936   ;
12937   return 0;
12938 }
12939 _ACEOF
12940 rm -f conftest.$ac_objext conftest$ac_exeext
12941 if { (eval echo "$as_me:12941: \"$ac_link\"") >&5
12942   (eval $ac_link) 2>&5
12943   ac_status=$?
12944   echo "$as_me:12944: \$? = $ac_status" >&5
12945   (exit $ac_status); } &&
12946          { ac_try='test -s conftest$ac_exeext'
12947   { (eval echo "$as_me:12947: \"$ac_try\"") >&5
12948   (eval $ac_try) 2>&5
12949   ac_status=$?
12950   echo "$as_me:12950: \$? = $ac_status" >&5
12951   (exit $ac_status); }; }; then
12952   ac_cv_lib_x_opendir=yes
12953 else
12954   echo "$as_me: failed program was:" >&5
12955 cat conftest.$ac_ext >&5
12956 ac_cv_lib_x_opendir=no
12957 fi
12958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12959 LIBS=$ac_check_lib_save_LIBS
12960 fi
12961 echo "$as_me:12961: result: $ac_cv_lib_x_opendir" >&5
12962 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12963 if test $ac_cv_lib_x_opendir = yes; then
12964   LIBS="$LIBS -lx"
12965 fi
12966
12967 fi
12968
12969 echo "$as_me:12969: checking whether time.h and sys/time.h may both be included" >&5
12970 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12971 if test "${ac_cv_header_time+set}" = set; then
12972   echo $ECHO_N "(cached) $ECHO_C" >&6
12973 else
12974   cat >conftest.$ac_ext <<_ACEOF
12975 #line 12975 "configure"
12976 #include "confdefs.h"
12977 #include <sys/types.h>
12978 #include <sys/time.h>
12979 #include <time.h>
12980
12981 int
12982 main ()
12983 {
12984 if ((struct tm *) 0)
12985 return 0;
12986   ;
12987   return 0;
12988 }
12989 _ACEOF
12990 rm -f conftest.$ac_objext
12991 if { (eval echo "$as_me:12991: \"$ac_compile\"") >&5
12992   (eval $ac_compile) 2>&5
12993   ac_status=$?
12994   echo "$as_me:12994: \$? = $ac_status" >&5
12995   (exit $ac_status); } &&
12996          { ac_try='test -s conftest.$ac_objext'
12997   { (eval echo "$as_me:12997: \"$ac_try\"") >&5
12998   (eval $ac_try) 2>&5
12999   ac_status=$?
13000   echo "$as_me:13000: \$? = $ac_status" >&5
13001   (exit $ac_status); }; }; then
13002   ac_cv_header_time=yes
13003 else
13004   echo "$as_me: failed program was:" >&5
13005 cat conftest.$ac_ext >&5
13006 ac_cv_header_time=no
13007 fi
13008 rm -f conftest.$ac_objext conftest.$ac_ext
13009 fi
13010 echo "$as_me:13010: result: $ac_cv_header_time" >&5
13011 echo "${ECHO_T}$ac_cv_header_time" >&6
13012 if test $ac_cv_header_time = yes; then
13013
13014 cat >>confdefs.h <<\EOF
13015 #define TIME_WITH_SYS_TIME 1
13016 EOF
13017
13018 fi
13019
13020 cf_regex_func=no
13021
13022 cf_regex_libs="regex re"
13023 case $host_os in #(vi
13024 mingw*)
13025         cf_regex_libs="regex.dll $cf_regex_libs"
13026         ;;
13027 esac
13028
13029 echo "$as_me:13029: checking for regcomp" >&5
13030 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13031 if test "${ac_cv_func_regcomp+set}" = set; then
13032   echo $ECHO_N "(cached) $ECHO_C" >&6
13033 else
13034   cat >conftest.$ac_ext <<_ACEOF
13035 #line 13035 "configure"
13036 #include "confdefs.h"
13037 /* System header to define __stub macros and hopefully few prototypes,
13038     which can conflict with char regcomp (); below.  */
13039 #include <assert.h>
13040 /* Override any gcc2 internal prototype to avoid an error.  */
13041 #ifdef __cplusplus
13042 extern "C"
13043 #endif
13044 /* We use char because int might match the return type of a gcc2
13045    builtin and then its argument prototype would still apply.  */
13046 char regcomp ();
13047 char (*f) ();
13048
13049 int
13050 main ()
13051 {
13052 /* The GNU C library defines this for functions which it implements
13053     to always fail with ENOSYS.  Some functions are actually named
13054     something starting with __ and the normal name is an alias.  */
13055 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13056 choke me
13057 #else
13058 f = regcomp;
13059 #endif
13060
13061   ;
13062   return 0;
13063 }
13064 _ACEOF
13065 rm -f conftest.$ac_objext conftest$ac_exeext
13066 if { (eval echo "$as_me:13066: \"$ac_link\"") >&5
13067   (eval $ac_link) 2>&5
13068   ac_status=$?
13069   echo "$as_me:13069: \$? = $ac_status" >&5
13070   (exit $ac_status); } &&
13071          { ac_try='test -s conftest$ac_exeext'
13072   { (eval echo "$as_me:13072: \"$ac_try\"") >&5
13073   (eval $ac_try) 2>&5
13074   ac_status=$?
13075   echo "$as_me:13075: \$? = $ac_status" >&5
13076   (exit $ac_status); }; }; then
13077   ac_cv_func_regcomp=yes
13078 else
13079   echo "$as_me: failed program was:" >&5
13080 cat conftest.$ac_ext >&5
13081 ac_cv_func_regcomp=no
13082 fi
13083 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13084 fi
13085 echo "$as_me:13085: result: $ac_cv_func_regcomp" >&5
13086 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13087 if test $ac_cv_func_regcomp = yes; then
13088   cf_regex_func=regcomp
13089 else
13090
13091         for cf_regex_lib in $cf_regex_libs
13092         do
13093                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13094 echo "$as_me:13094: checking for regcomp in -l$cf_regex_lib" >&5
13095 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13096 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13097   echo $ECHO_N "(cached) $ECHO_C" >&6
13098 else
13099   ac_check_lib_save_LIBS=$LIBS
13100 LIBS="-l$cf_regex_lib  $LIBS"
13101 cat >conftest.$ac_ext <<_ACEOF
13102 #line 13102 "configure"
13103 #include "confdefs.h"
13104
13105 /* Override any gcc2 internal prototype to avoid an error.  */
13106 #ifdef __cplusplus
13107 extern "C"
13108 #endif
13109 /* We use char because int might match the return type of a gcc2
13110    builtin and then its argument prototype would still apply.  */
13111 char regcomp ();
13112 int
13113 main ()
13114 {
13115 regcomp ();
13116   ;
13117   return 0;
13118 }
13119 _ACEOF
13120 rm -f conftest.$ac_objext conftest$ac_exeext
13121 if { (eval echo "$as_me:13121: \"$ac_link\"") >&5
13122   (eval $ac_link) 2>&5
13123   ac_status=$?
13124   echo "$as_me:13124: \$? = $ac_status" >&5
13125   (exit $ac_status); } &&
13126          { ac_try='test -s conftest$ac_exeext'
13127   { (eval echo "$as_me:13127: \"$ac_try\"") >&5
13128   (eval $ac_try) 2>&5
13129   ac_status=$?
13130   echo "$as_me:13130: \$? = $ac_status" >&5
13131   (exit $ac_status); }; }; then
13132   eval "$as_ac_Lib=yes"
13133 else
13134   echo "$as_me: failed program was:" >&5
13135 cat conftest.$ac_ext >&5
13136 eval "$as_ac_Lib=no"
13137 fi
13138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13139 LIBS=$ac_check_lib_save_LIBS
13140 fi
13141 echo "$as_me:13141: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13142 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13143 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13144
13145                                 LIBS="-l$cf_regex_lib $LIBS"
13146                                 cf_regex_func=regcomp
13147                                 break
13148 fi
13149
13150         done
13151
13152 fi
13153
13154 if test "$cf_regex_func" = no ; then
13155         echo "$as_me:13155: checking for compile" >&5
13156 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13157 if test "${ac_cv_func_compile+set}" = set; then
13158   echo $ECHO_N "(cached) $ECHO_C" >&6
13159 else
13160   cat >conftest.$ac_ext <<_ACEOF
13161 #line 13161 "configure"
13162 #include "confdefs.h"
13163 /* System header to define __stub macros and hopefully few prototypes,
13164     which can conflict with char compile (); below.  */
13165 #include <assert.h>
13166 /* Override any gcc2 internal prototype to avoid an error.  */
13167 #ifdef __cplusplus
13168 extern "C"
13169 #endif
13170 /* We use char because int might match the return type of a gcc2
13171    builtin and then its argument prototype would still apply.  */
13172 char compile ();
13173 char (*f) ();
13174
13175 int
13176 main ()
13177 {
13178 /* The GNU C library defines this for functions which it implements
13179     to always fail with ENOSYS.  Some functions are actually named
13180     something starting with __ and the normal name is an alias.  */
13181 #if defined (__stub_compile) || defined (__stub___compile)
13182 choke me
13183 #else
13184 f = compile;
13185 #endif
13186
13187   ;
13188   return 0;
13189 }
13190 _ACEOF
13191 rm -f conftest.$ac_objext conftest$ac_exeext
13192 if { (eval echo "$as_me:13192: \"$ac_link\"") >&5
13193   (eval $ac_link) 2>&5
13194   ac_status=$?
13195   echo "$as_me:13195: \$? = $ac_status" >&5
13196   (exit $ac_status); } &&
13197          { ac_try='test -s conftest$ac_exeext'
13198   { (eval echo "$as_me:13198: \"$ac_try\"") >&5
13199   (eval $ac_try) 2>&5
13200   ac_status=$?
13201   echo "$as_me:13201: \$? = $ac_status" >&5
13202   (exit $ac_status); }; }; then
13203   ac_cv_func_compile=yes
13204 else
13205   echo "$as_me: failed program was:" >&5
13206 cat conftest.$ac_ext >&5
13207 ac_cv_func_compile=no
13208 fi
13209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13210 fi
13211 echo "$as_me:13211: result: $ac_cv_func_compile" >&5
13212 echo "${ECHO_T}$ac_cv_func_compile" >&6
13213 if test $ac_cv_func_compile = yes; then
13214   cf_regex_func=compile
13215 else
13216
13217                 echo "$as_me:13217: checking for compile in -lgen" >&5
13218 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13219 if test "${ac_cv_lib_gen_compile+set}" = set; then
13220   echo $ECHO_N "(cached) $ECHO_C" >&6
13221 else
13222   ac_check_lib_save_LIBS=$LIBS
13223 LIBS="-lgen  $LIBS"
13224 cat >conftest.$ac_ext <<_ACEOF
13225 #line 13225 "configure"
13226 #include "confdefs.h"
13227
13228 /* Override any gcc2 internal prototype to avoid an error.  */
13229 #ifdef __cplusplus
13230 extern "C"
13231 #endif
13232 /* We use char because int might match the return type of a gcc2
13233    builtin and then its argument prototype would still apply.  */
13234 char compile ();
13235 int
13236 main ()
13237 {
13238 compile ();
13239   ;
13240   return 0;
13241 }
13242 _ACEOF
13243 rm -f conftest.$ac_objext conftest$ac_exeext
13244 if { (eval echo "$as_me:13244: \"$ac_link\"") >&5
13245   (eval $ac_link) 2>&5
13246   ac_status=$?
13247   echo "$as_me:13247: \$? = $ac_status" >&5
13248   (exit $ac_status); } &&
13249          { ac_try='test -s conftest$ac_exeext'
13250   { (eval echo "$as_me:13250: \"$ac_try\"") >&5
13251   (eval $ac_try) 2>&5
13252   ac_status=$?
13253   echo "$as_me:13253: \$? = $ac_status" >&5
13254   (exit $ac_status); }; }; then
13255   ac_cv_lib_gen_compile=yes
13256 else
13257   echo "$as_me: failed program was:" >&5
13258 cat conftest.$ac_ext >&5
13259 ac_cv_lib_gen_compile=no
13260 fi
13261 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13262 LIBS=$ac_check_lib_save_LIBS
13263 fi
13264 echo "$as_me:13264: result: $ac_cv_lib_gen_compile" >&5
13265 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13266 if test $ac_cv_lib_gen_compile = yes; then
13267
13268                                 LIBS="-lgen $LIBS"
13269                                 cf_regex_func=compile
13270 fi
13271
13272 fi
13273
13274 fi
13275
13276 if test "$cf_regex_func" = no ; then
13277         { echo "$as_me:13277: WARNING: cannot find regular expression library" >&5
13278 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13279 fi
13280
13281 echo "$as_me:13281: checking for regular-expression headers" >&5
13282 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13283 if test "${cf_cv_regex_hdrs+set}" = set; then
13284   echo $ECHO_N "(cached) $ECHO_C" >&6
13285 else
13286
13287 cf_cv_regex_hdrs=no
13288 case $cf_regex_func in #(vi
13289 compile) #(vi
13290         for cf_regex_hdr in regexp.h regexpr.h
13291         do
13292                 cat >conftest.$ac_ext <<_ACEOF
13293 #line 13293 "configure"
13294 #include "confdefs.h"
13295 #include <$cf_regex_hdr>
13296 int
13297 main ()
13298 {
13299
13300                         char *p = compile("", "", "", 0);
13301                         int x = step("", "");
13302
13303   ;
13304   return 0;
13305 }
13306 _ACEOF
13307 rm -f conftest.$ac_objext conftest$ac_exeext
13308 if { (eval echo "$as_me:13308: \"$ac_link\"") >&5
13309   (eval $ac_link) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); } &&
13313          { ac_try='test -s conftest$ac_exeext'
13314   { (eval echo "$as_me:13314: \"$ac_try\"") >&5
13315   (eval $ac_try) 2>&5
13316   ac_status=$?
13317   echo "$as_me:13317: \$? = $ac_status" >&5
13318   (exit $ac_status); }; }; then
13319
13320                         cf_cv_regex_hdrs=$cf_regex_hdr
13321                         break
13322
13323 else
13324   echo "$as_me: failed program was:" >&5
13325 cat conftest.$ac_ext >&5
13326 fi
13327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13328         done
13329         ;;
13330 *)
13331         for cf_regex_hdr in regex.h
13332         do
13333                 cat >conftest.$ac_ext <<_ACEOF
13334 #line 13334 "configure"
13335 #include "confdefs.h"
13336 #include <sys/types.h>
13337 #include <$cf_regex_hdr>
13338 int
13339 main ()
13340 {
13341
13342                         regex_t *p;
13343                         int x = regcomp(p, "", 0);
13344                         int y = regexec(p, "", 0, 0, 0);
13345                         regfree(p);
13346
13347   ;
13348   return 0;
13349 }
13350 _ACEOF
13351 rm -f conftest.$ac_objext conftest$ac_exeext
13352 if { (eval echo "$as_me:13352: \"$ac_link\"") >&5
13353   (eval $ac_link) 2>&5
13354   ac_status=$?
13355   echo "$as_me:13355: \$? = $ac_status" >&5
13356   (exit $ac_status); } &&
13357          { ac_try='test -s conftest$ac_exeext'
13358   { (eval echo "$as_me:13358: \"$ac_try\"") >&5
13359   (eval $ac_try) 2>&5
13360   ac_status=$?
13361   echo "$as_me:13361: \$? = $ac_status" >&5
13362   (exit $ac_status); }; }; then
13363
13364                         cf_cv_regex_hdrs=$cf_regex_hdr
13365                         break
13366
13367 else
13368   echo "$as_me: failed program was:" >&5
13369 cat conftest.$ac_ext >&5
13370 fi
13371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13372         done
13373         ;;
13374 esac
13375
13376 fi
13377 echo "$as_me:13377: result: $cf_cv_regex_hdrs" >&5
13378 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13379
13380 case $cf_cv_regex_hdrs in #(vi
13381     no)        { echo "$as_me:13381: WARNING: no regular expression header found" >&5
13382 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13383     regex.h)   cat >>confdefs.h <<\EOF
13384 #define HAVE_REGEX_H_FUNCS 1
13385 EOF
13386  ;; #(vi
13387     regexp.h)  cat >>confdefs.h <<\EOF
13388 #define HAVE_REGEXP_H_FUNCS 1
13389 EOF
13390  ;; #(vi
13391     regexpr.h) cat >>confdefs.h <<\EOF
13392 #define HAVE_REGEXPR_H_FUNCS 1
13393 EOF
13394  ;;
13395 esac
13396
13397 for ac_header in \
13398 fcntl.h \
13399 getopt.h \
13400 limits.h \
13401 locale.h \
13402 math.h \
13403 poll.h \
13404 sys/bsdtypes.h \
13405 sys/ioctl.h \
13406 sys/param.h \
13407 sys/poll.h \
13408 sys/select.h \
13409 sys/time.h \
13410 sys/times.h \
13411 ttyent.h \
13412 unistd.h \
13413 wctype.h \
13414
13415 do
13416 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13417 echo "$as_me:13417: checking for $ac_header" >&5
13418 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13419 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13420   echo $ECHO_N "(cached) $ECHO_C" >&6
13421 else
13422   cat >conftest.$ac_ext <<_ACEOF
13423 #line 13423 "configure"
13424 #include "confdefs.h"
13425 #include <$ac_header>
13426 _ACEOF
13427 if { (eval echo "$as_me:13427: \"$ac_cpp conftest.$ac_ext\"") >&5
13428   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13429   ac_status=$?
13430   egrep -v '^ *\+' conftest.er1 >conftest.err
13431   rm -f conftest.er1
13432   cat conftest.err >&5
13433   echo "$as_me:13433: \$? = $ac_status" >&5
13434   (exit $ac_status); } >/dev/null; then
13435   if test -s conftest.err; then
13436     ac_cpp_err=$ac_c_preproc_warn_flag
13437   else
13438     ac_cpp_err=
13439   fi
13440 else
13441   ac_cpp_err=yes
13442 fi
13443 if test -z "$ac_cpp_err"; then
13444   eval "$as_ac_Header=yes"
13445 else
13446   echo "$as_me: failed program was:" >&5
13447   cat conftest.$ac_ext >&5
13448   eval "$as_ac_Header=no"
13449 fi
13450 rm -f conftest.err conftest.$ac_ext
13451 fi
13452 echo "$as_me:13452: result: `eval echo '${'$as_ac_Header'}'`" >&5
13453 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13454 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13455   cat >>confdefs.h <<EOF
13456 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13457 EOF
13458
13459 fi
13460 done
13461
13462 for ac_header in unistd.h getopt.h
13463 do
13464 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13465 echo "$as_me:13465: checking for $ac_header" >&5
13466 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13467 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13468   echo $ECHO_N "(cached) $ECHO_C" >&6
13469 else
13470   cat >conftest.$ac_ext <<_ACEOF
13471 #line 13471 "configure"
13472 #include "confdefs.h"
13473 #include <$ac_header>
13474 _ACEOF
13475 if { (eval echo "$as_me:13475: \"$ac_cpp conftest.$ac_ext\"") >&5
13476   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13477   ac_status=$?
13478   egrep -v '^ *\+' conftest.er1 >conftest.err
13479   rm -f conftest.er1
13480   cat conftest.err >&5
13481   echo "$as_me:13481: \$? = $ac_status" >&5
13482   (exit $ac_status); } >/dev/null; then
13483   if test -s conftest.err; then
13484     ac_cpp_err=$ac_c_preproc_warn_flag
13485   else
13486     ac_cpp_err=
13487   fi
13488 else
13489   ac_cpp_err=yes
13490 fi
13491 if test -z "$ac_cpp_err"; then
13492   eval "$as_ac_Header=yes"
13493 else
13494   echo "$as_me: failed program was:" >&5
13495   cat conftest.$ac_ext >&5
13496   eval "$as_ac_Header=no"
13497 fi
13498 rm -f conftest.err conftest.$ac_ext
13499 fi
13500 echo "$as_me:13500: result: `eval echo '${'$as_ac_Header'}'`" >&5
13501 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13502 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13503   cat >>confdefs.h <<EOF
13504 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13505 EOF
13506
13507 fi
13508 done
13509
13510 echo "$as_me:13510: checking for header declaring getopt variables" >&5
13511 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13512 if test "${cf_cv_getopt_header+set}" = set; then
13513   echo $ECHO_N "(cached) $ECHO_C" >&6
13514 else
13515
13516 cf_cv_getopt_header=none
13517 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13518 do
13519 cat >conftest.$ac_ext <<_ACEOF
13520 #line 13520 "configure"
13521 #include "confdefs.h"
13522
13523 #include <$cf_header>
13524 int
13525 main ()
13526 {
13527 int x = optind; char *y = optarg
13528   ;
13529   return 0;
13530 }
13531 _ACEOF
13532 rm -f conftest.$ac_objext
13533 if { (eval echo "$as_me:13533: \"$ac_compile\"") >&5
13534   (eval $ac_compile) 2>&5
13535   ac_status=$?
13536   echo "$as_me:13536: \$? = $ac_status" >&5
13537   (exit $ac_status); } &&
13538          { ac_try='test -s conftest.$ac_objext'
13539   { (eval echo "$as_me:13539: \"$ac_try\"") >&5
13540   (eval $ac_try) 2>&5
13541   ac_status=$?
13542   echo "$as_me:13542: \$? = $ac_status" >&5
13543   (exit $ac_status); }; }; then
13544   cf_cv_getopt_header=$cf_header
13545  break
13546 else
13547   echo "$as_me: failed program was:" >&5
13548 cat conftest.$ac_ext >&5
13549 fi
13550 rm -f conftest.$ac_objext conftest.$ac_ext
13551 done
13552
13553 fi
13554 echo "$as_me:13554: result: $cf_cv_getopt_header" >&5
13555 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13556 if test $cf_cv_getopt_header != none ; then
13557         cat >>confdefs.h <<\EOF
13558 #define HAVE_GETOPT_HEADER 1
13559 EOF
13560
13561 fi
13562
13563 # check for ISC (this may also define _POSIX_SOURCE)
13564 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13565 if test "$ISC" = yes ; then
13566
13567 echo "$as_me:13567: checking for main in -lcposix" >&5
13568 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13569 if test "${ac_cv_lib_cposix_main+set}" = set; then
13570   echo $ECHO_N "(cached) $ECHO_C" >&6
13571 else
13572   ac_check_lib_save_LIBS=$LIBS
13573 LIBS="-lcposix  $LIBS"
13574 cat >conftest.$ac_ext <<_ACEOF
13575 #line 13575 "configure"
13576 #include "confdefs.h"
13577
13578 int
13579 main ()
13580 {
13581 main ();
13582   ;
13583   return 0;
13584 }
13585 _ACEOF
13586 rm -f conftest.$ac_objext conftest$ac_exeext
13587 if { (eval echo "$as_me:13587: \"$ac_link\"") >&5
13588   (eval $ac_link) 2>&5
13589   ac_status=$?
13590   echo "$as_me:13590: \$? = $ac_status" >&5
13591   (exit $ac_status); } &&
13592          { ac_try='test -s conftest$ac_exeext'
13593   { (eval echo "$as_me:13593: \"$ac_try\"") >&5
13594   (eval $ac_try) 2>&5
13595   ac_status=$?
13596   echo "$as_me:13596: \$? = $ac_status" >&5
13597   (exit $ac_status); }; }; then
13598   ac_cv_lib_cposix_main=yes
13599 else
13600   echo "$as_me: failed program was:" >&5
13601 cat conftest.$ac_ext >&5
13602 ac_cv_lib_cposix_main=no
13603 fi
13604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13605 LIBS=$ac_check_lib_save_LIBS
13606 fi
13607 echo "$as_me:13607: result: $ac_cv_lib_cposix_main" >&5
13608 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13609 if test $ac_cv_lib_cposix_main = yes; then
13610   cat >>confdefs.h <<EOF
13611 #define HAVE_LIBCPOSIX 1
13612 EOF
13613
13614   LIBS="-lcposix $LIBS"
13615
13616 fi
13617
13618         echo "$as_me:13618: checking for bzero in -linet" >&5
13619 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13620 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13621   echo $ECHO_N "(cached) $ECHO_C" >&6
13622 else
13623   ac_check_lib_save_LIBS=$LIBS
13624 LIBS="-linet  $LIBS"
13625 cat >conftest.$ac_ext <<_ACEOF
13626 #line 13626 "configure"
13627 #include "confdefs.h"
13628
13629 /* Override any gcc2 internal prototype to avoid an error.  */
13630 #ifdef __cplusplus
13631 extern "C"
13632 #endif
13633 /* We use char because int might match the return type of a gcc2
13634    builtin and then its argument prototype would still apply.  */
13635 char bzero ();
13636 int
13637 main ()
13638 {
13639 bzero ();
13640   ;
13641   return 0;
13642 }
13643 _ACEOF
13644 rm -f conftest.$ac_objext conftest$ac_exeext
13645 if { (eval echo "$as_me:13645: \"$ac_link\"") >&5
13646   (eval $ac_link) 2>&5
13647   ac_status=$?
13648   echo "$as_me:13648: \$? = $ac_status" >&5
13649   (exit $ac_status); } &&
13650          { ac_try='test -s conftest$ac_exeext'
13651   { (eval echo "$as_me:13651: \"$ac_try\"") >&5
13652   (eval $ac_try) 2>&5
13653   ac_status=$?
13654   echo "$as_me:13654: \$? = $ac_status" >&5
13655   (exit $ac_status); }; }; then
13656   ac_cv_lib_inet_bzero=yes
13657 else
13658   echo "$as_me: failed program was:" >&5
13659 cat conftest.$ac_ext >&5
13660 ac_cv_lib_inet_bzero=no
13661 fi
13662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13663 LIBS=$ac_check_lib_save_LIBS
13664 fi
13665 echo "$as_me:13665: result: $ac_cv_lib_inet_bzero" >&5
13666 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13667 if test $ac_cv_lib_inet_bzero = yes; then
13668   LIBS="-linet $LIBS"
13669 fi
13670 fi
13671
13672 echo "$as_me:13672: checking if sys/time.h works with sys/select.h" >&5
13673 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13674 if test "${cf_cv_sys_time_select+set}" = set; then
13675   echo $ECHO_N "(cached) $ECHO_C" >&6
13676 else
13677
13678 cat >conftest.$ac_ext <<_ACEOF
13679 #line 13679 "configure"
13680 #include "confdefs.h"
13681
13682 #include <sys/types.h>
13683 #ifdef HAVE_SYS_TIME_H
13684 #include <sys/time.h>
13685 #endif
13686 #ifdef HAVE_SYS_SELECT_H
13687 #include <sys/select.h>
13688 #endif
13689
13690 int
13691 main ()
13692 {
13693
13694   ;
13695   return 0;
13696 }
13697 _ACEOF
13698 rm -f conftest.$ac_objext
13699 if { (eval echo "$as_me:13699: \"$ac_compile\"") >&5
13700   (eval $ac_compile) 2>&5
13701   ac_status=$?
13702   echo "$as_me:13702: \$? = $ac_status" >&5
13703   (exit $ac_status); } &&
13704          { ac_try='test -s conftest.$ac_objext'
13705   { (eval echo "$as_me:13705: \"$ac_try\"") >&5
13706   (eval $ac_try) 2>&5
13707   ac_status=$?
13708   echo "$as_me:13708: \$? = $ac_status" >&5
13709   (exit $ac_status); }; }; then
13710   cf_cv_sys_time_select=yes
13711 else
13712   echo "$as_me: failed program was:" >&5
13713 cat conftest.$ac_ext >&5
13714 cf_cv_sys_time_select=no
13715 fi
13716 rm -f conftest.$ac_objext conftest.$ac_ext
13717
13718 fi
13719
13720 echo "$as_me:13720: result: $cf_cv_sys_time_select" >&5
13721 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13722 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13723 #define HAVE_SYS_TIME_SELECT 1
13724 EOF
13725
13726 ###     checks for compiler characteristics
13727 ac_ext=c
13728 ac_cpp='$CPP $CPPFLAGS'
13729 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13730 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13731 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13732 ac_main_return=return
13733
13734 echo "$as_me:13734: checking for $CC option to accept ANSI C" >&5
13735 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13736 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13737   echo $ECHO_N "(cached) $ECHO_C" >&6
13738 else
13739   ac_cv_prog_cc_stdc=no
13740 ac_save_CC=$CC
13741 cat >conftest.$ac_ext <<_ACEOF
13742 #line 13742 "configure"
13743 #include "confdefs.h"
13744 #include <stdarg.h>
13745 #include <stdio.h>
13746 #include <sys/types.h>
13747 #include <sys/stat.h>
13748 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13749 struct buf { int x; };
13750 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13751 static char *e (p, i)
13752      char **p;
13753      int i;
13754 {
13755   return p[i];
13756 }
13757 static char *f (char * (*g) (char **, int), char **p, ...)
13758 {
13759   char *s;
13760   va_list v;
13761   va_start (v,p);
13762   s = g (p, va_arg (v,int));
13763   va_end (v);
13764   return s;
13765 }
13766 int test (int i, double x);
13767 struct s1 {int (*f) (int a);};
13768 struct s2 {int (*f) (double a);};
13769 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13770 int argc;
13771 char **argv;
13772 int
13773 main ()
13774 {
13775 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13776   ;
13777   return 0;
13778 }
13779 _ACEOF
13780 # Don't try gcc -ansi; that turns off useful extensions and
13781 # breaks some systems' header files.
13782 # AIX                   -qlanglvl=ansi
13783 # Ultrix and OSF/1      -std1
13784 # HP-UX 10.20 and later -Ae
13785 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13786 # SVR4                  -Xc -D__EXTENSIONS__
13787 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13788 do
13789   CC="$ac_save_CC $ac_arg"
13790   rm -f conftest.$ac_objext
13791 if { (eval echo "$as_me:13791: \"$ac_compile\"") >&5
13792   (eval $ac_compile) 2>&5
13793   ac_status=$?
13794   echo "$as_me:13794: \$? = $ac_status" >&5
13795   (exit $ac_status); } &&
13796          { ac_try='test -s conftest.$ac_objext'
13797   { (eval echo "$as_me:13797: \"$ac_try\"") >&5
13798   (eval $ac_try) 2>&5
13799   ac_status=$?
13800   echo "$as_me:13800: \$? = $ac_status" >&5
13801   (exit $ac_status); }; }; then
13802   ac_cv_prog_cc_stdc=$ac_arg
13803 break
13804 else
13805   echo "$as_me: failed program was:" >&5
13806 cat conftest.$ac_ext >&5
13807 fi
13808 rm -f conftest.$ac_objext
13809 done
13810 rm -f conftest.$ac_ext conftest.$ac_objext
13811 CC=$ac_save_CC
13812
13813 fi
13814
13815 case "x$ac_cv_prog_cc_stdc" in
13816   x|xno)
13817     echo "$as_me:13817: result: none needed" >&5
13818 echo "${ECHO_T}none needed" >&6 ;;
13819   *)
13820     echo "$as_me:13820: result: $ac_cv_prog_cc_stdc" >&5
13821 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13822     CC="$CC $ac_cv_prog_cc_stdc" ;;
13823 esac
13824
13825 echo "$as_me:13825: checking for an ANSI C-conforming const" >&5
13826 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13827 if test "${ac_cv_c_const+set}" = set; then
13828   echo $ECHO_N "(cached) $ECHO_C" >&6
13829 else
13830   cat >conftest.$ac_ext <<_ACEOF
13831 #line 13831 "configure"
13832 #include "confdefs.h"
13833
13834 int
13835 main ()
13836 {
13837 /* FIXME: Include the comments suggested by Paul. */
13838 #ifndef __cplusplus
13839   /* Ultrix mips cc rejects this.  */
13840   typedef int charset[2];
13841   const charset x;
13842   /* SunOS 4.1.1 cc rejects this.  */
13843   char const *const *ccp;
13844   char **p;
13845   /* NEC SVR4.0.2 mips cc rejects this.  */
13846   struct point {int x, y;};
13847   static struct point const zero = {0,0};
13848   /* AIX XL C 1.02.0.0 rejects this.
13849      It does not let you subtract one const X* pointer from another in
13850      an arm of an if-expression whose if-part is not a constant
13851      expression */
13852   const char *g = "string";
13853   ccp = &g + (g ? g-g : 0);
13854   /* HPUX 7.0 cc rejects these. */
13855   ++ccp;
13856   p = (char**) ccp;
13857   ccp = (char const *const *) p;
13858   { /* SCO 3.2v4 cc rejects this.  */
13859     char *t;
13860     char const *s = 0 ? (char *) 0 : (char const *) 0;
13861
13862     *t++ = 0;
13863   }
13864   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13865     int x[] = {25, 17};
13866     const int *foo = &x[0];
13867     ++foo;
13868   }
13869   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13870     typedef const int *iptr;
13871     iptr p = 0;
13872     ++p;
13873   }
13874   { /* AIX XL C 1.02.0.0 rejects this saying
13875        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13876     struct s { int j; const int *ap[3]; };
13877     struct s *b; b->j = 5;
13878   }
13879   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13880     const int foo = 10;
13881   }
13882 #endif
13883
13884   ;
13885   return 0;
13886 }
13887 _ACEOF
13888 rm -f conftest.$ac_objext
13889 if { (eval echo "$as_me:13889: \"$ac_compile\"") >&5
13890   (eval $ac_compile) 2>&5
13891   ac_status=$?
13892   echo "$as_me:13892: \$? = $ac_status" >&5
13893   (exit $ac_status); } &&
13894          { ac_try='test -s conftest.$ac_objext'
13895   { (eval echo "$as_me:13895: \"$ac_try\"") >&5
13896   (eval $ac_try) 2>&5
13897   ac_status=$?
13898   echo "$as_me:13898: \$? = $ac_status" >&5
13899   (exit $ac_status); }; }; then
13900   ac_cv_c_const=yes
13901 else
13902   echo "$as_me: failed program was:" >&5
13903 cat conftest.$ac_ext >&5
13904 ac_cv_c_const=no
13905 fi
13906 rm -f conftest.$ac_objext conftest.$ac_ext
13907 fi
13908 echo "$as_me:13908: result: $ac_cv_c_const" >&5
13909 echo "${ECHO_T}$ac_cv_c_const" >&6
13910 if test $ac_cv_c_const = no; then
13911
13912 cat >>confdefs.h <<\EOF
13913 #define const
13914 EOF
13915
13916 fi
13917
13918 echo "$as_me:13918: checking for inline" >&5
13919 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13920 if test "${ac_cv_c_inline+set}" = set; then
13921   echo $ECHO_N "(cached) $ECHO_C" >&6
13922 else
13923   ac_cv_c_inline=no
13924 for ac_kw in inline __inline__ __inline; do
13925   cat >conftest.$ac_ext <<_ACEOF
13926 #line 13926 "configure"
13927 #include "confdefs.h"
13928 #ifndef __cplusplus
13929 static $ac_kw int static_foo () {return 0; }
13930 $ac_kw int foo () {return 0; }
13931 #endif
13932
13933 _ACEOF
13934 rm -f conftest.$ac_objext
13935 if { (eval echo "$as_me:13935: \"$ac_compile\"") >&5
13936   (eval $ac_compile) 2>&5
13937   ac_status=$?
13938   echo "$as_me:13938: \$? = $ac_status" >&5
13939   (exit $ac_status); } &&
13940          { ac_try='test -s conftest.$ac_objext'
13941   { (eval echo "$as_me:13941: \"$ac_try\"") >&5
13942   (eval $ac_try) 2>&5
13943   ac_status=$?
13944   echo "$as_me:13944: \$? = $ac_status" >&5
13945   (exit $ac_status); }; }; then
13946   ac_cv_c_inline=$ac_kw; break
13947 else
13948   echo "$as_me: failed program was:" >&5
13949 cat conftest.$ac_ext >&5
13950 fi
13951 rm -f conftest.$ac_objext conftest.$ac_ext
13952 done
13953
13954 fi
13955 echo "$as_me:13955: result: $ac_cv_c_inline" >&5
13956 echo "${ECHO_T}$ac_cv_c_inline" >&6
13957 case $ac_cv_c_inline in
13958   inline | yes) ;;
13959   no)
13960 cat >>confdefs.h <<\EOF
13961 #define inline
13962 EOF
13963  ;;
13964   *)  cat >>confdefs.h <<EOF
13965 #define inline $ac_cv_c_inline
13966 EOF
13967  ;;
13968 esac
13969
13970 NCURSES_INLINE=
13971 if test "$ac_cv_c_inline" != no ; then
13972   NCURSES_INLINE=inline
13973   if test "$INTEL_COMPILER" = yes
13974   then
13975     :
13976   elif test "$GCC" = yes
13977   then
13978     echo "$as_me:13978: checking if $CC supports options to tune inlining" >&5
13979 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13980 if test "${cf_cv_gcc_inline+set}" = set; then
13981   echo $ECHO_N "(cached) $ECHO_C" >&6
13982 else
13983
13984       cf_save_CFLAGS=$CFLAGS
13985       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13986       cat >conftest.$ac_ext <<_ACEOF
13987 #line 13987 "configure"
13988 #include "confdefs.h"
13989 inline int foo(void) { return 1; }
13990 int
13991 main ()
13992 {
13993 ${cf_cv_main_return:-return} foo()
13994   ;
13995   return 0;
13996 }
13997 _ACEOF
13998 rm -f conftest.$ac_objext
13999 if { (eval echo "$as_me:13999: \"$ac_compile\"") >&5
14000   (eval $ac_compile) 2>&5
14001   ac_status=$?
14002   echo "$as_me:14002: \$? = $ac_status" >&5
14003   (exit $ac_status); } &&
14004          { ac_try='test -s conftest.$ac_objext'
14005   { (eval echo "$as_me:14005: \"$ac_try\"") >&5
14006   (eval $ac_try) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); }; }; then
14010   cf_cv_gcc_inline=yes
14011 else
14012   echo "$as_me: failed program was:" >&5
14013 cat conftest.$ac_ext >&5
14014 cf_cv_gcc_inline=no
14015 fi
14016 rm -f conftest.$ac_objext conftest.$ac_ext
14017       CFLAGS=$cf_save_CFLAGS
14018
14019 fi
14020 echo "$as_me:14020: result: $cf_cv_gcc_inline" >&5
14021 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14022     if test "$cf_cv_gcc_inline" = yes ; then
14023
14024 cf_fix_cppflags=no
14025 cf_new_cflags=
14026 cf_new_cppflags=
14027 cf_new_extra_cppflags=
14028
14029 for cf_add_cflags in --param max-inline-insns-single=1200
14030 do
14031 case $cf_fix_cppflags in
14032 no)
14033         case $cf_add_cflags in #(vi
14034         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14035                 case $cf_add_cflags in
14036                 -D*)
14037                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14038
14039                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14040                                 && test -z "${cf_tst_cflags}" \
14041                                 && cf_fix_cppflags=yes
14042
14043                         if test $cf_fix_cppflags = yes ; then
14044                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14045                                 continue
14046                         elif test "${cf_tst_cflags}" = "\"'" ; then
14047                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14048                                 continue
14049                         fi
14050                         ;;
14051                 esac
14052                 case "$CPPFLAGS" in
14053                 *$cf_add_cflags) #(vi
14054                         ;;
14055                 *) #(vi
14056                         case $cf_add_cflags in #(vi
14057                         -D*)
14058                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14059
14060 CPPFLAGS=`echo "$CPPFLAGS" | \
14061         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14062                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14063
14064                                 ;;
14065                         esac
14066                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14067                         ;;
14068                 esac
14069                 ;;
14070         *)
14071                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14072                 ;;
14073         esac
14074         ;;
14075 yes)
14076         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14077
14078         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14079
14080         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14081                 && test -z "${cf_tst_cflags}" \
14082                 && cf_fix_cppflags=no
14083         ;;
14084 esac
14085 done
14086
14087 if test -n "$cf_new_cflags" ; then
14088
14089         CFLAGS="$CFLAGS $cf_new_cflags"
14090 fi
14091
14092 if test -n "$cf_new_cppflags" ; then
14093
14094         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14095 fi
14096
14097 if test -n "$cf_new_extra_cppflags" ; then
14098
14099         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14100 fi
14101
14102     fi
14103   fi
14104 fi
14105
14106 echo "$as_me:14106: checking for signal global datatype" >&5
14107 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14108 if test "${cf_cv_sig_atomic_t+set}" = set; then
14109   echo $ECHO_N "(cached) $ECHO_C" >&6
14110 else
14111
14112         for cf_type in \
14113                 "volatile sig_atomic_t" \
14114                 "sig_atomic_t" \
14115                 "int"
14116         do
14117         cat >conftest.$ac_ext <<_ACEOF
14118 #line 14118 "configure"
14119 #include "confdefs.h"
14120
14121 #include <sys/types.h>
14122 #include <signal.h>
14123 #include <stdio.h>
14124
14125 extern $cf_type x;
14126 $cf_type x;
14127 static void handler(int sig)
14128 {
14129         x = 5;
14130 }
14131 int
14132 main ()
14133 {
14134 signal(SIGINT, handler);
14135                  x = 1
14136   ;
14137   return 0;
14138 }
14139 _ACEOF
14140 rm -f conftest.$ac_objext
14141 if { (eval echo "$as_me:14141: \"$ac_compile\"") >&5
14142   (eval $ac_compile) 2>&5
14143   ac_status=$?
14144   echo "$as_me:14144: \$? = $ac_status" >&5
14145   (exit $ac_status); } &&
14146          { ac_try='test -s conftest.$ac_objext'
14147   { (eval echo "$as_me:14147: \"$ac_try\"") >&5
14148   (eval $ac_try) 2>&5
14149   ac_status=$?
14150   echo "$as_me:14150: \$? = $ac_status" >&5
14151   (exit $ac_status); }; }; then
14152   cf_cv_sig_atomic_t=$cf_type
14153 else
14154   echo "$as_me: failed program was:" >&5
14155 cat conftest.$ac_ext >&5
14156 cf_cv_sig_atomic_t=no
14157 fi
14158 rm -f conftest.$ac_objext conftest.$ac_ext
14159                 test "$cf_cv_sig_atomic_t" != no && break
14160         done
14161
14162 fi
14163
14164 echo "$as_me:14164: result: $cf_cv_sig_atomic_t" >&5
14165 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14166 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14167 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14168 EOF
14169
14170 if test $NCURSES_CHTYPE = auto ; then
14171
14172 echo "$as_me:14172: checking for type of chtype" >&5
14173 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14174 if test "${cf_cv_typeof_chtype+set}" = set; then
14175   echo $ECHO_N "(cached) $ECHO_C" >&6
14176 else
14177
14178                 if test "$cross_compiling" = yes; then
14179   cf_cv_typeof_chtype=long
14180 else
14181   cat >conftest.$ac_ext <<_ACEOF
14182 #line 14182 "configure"
14183 #include "confdefs.h"
14184
14185 #define WANT_BITS 31
14186 #include <stdio.h>
14187 int main()
14188 {
14189         FILE *fp = fopen("cf_test.out", "w");
14190         if (fp != 0) {
14191                 char *result = "long";
14192                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14193                         int n;
14194                         unsigned int x, y;
14195                         for (n = 0; n < WANT_BITS; n++) {
14196                                 x = (1 << n);
14197                                 y = (x >> n);
14198                                 if (y != 1 || x == 0) {
14199                                         x = 0;
14200                                         break;
14201                                 }
14202                         }
14203                         /*
14204                          * If x is nonzero, an int is big enough for the bits
14205                          * that we want.
14206                          */
14207                         result = (x != 0) ? "int" : "long";
14208                 }
14209                 fputs(result, fp);
14210                 fclose(fp);
14211         }
14212         ${cf_cv_main_return:-return}(0);
14213 }
14214
14215 _ACEOF
14216 rm -f conftest$ac_exeext
14217 if { (eval echo "$as_me:14217: \"$ac_link\"") >&5
14218   (eval $ac_link) 2>&5
14219   ac_status=$?
14220   echo "$as_me:14220: \$? = $ac_status" >&5
14221   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14222   { (eval echo "$as_me:14222: \"$ac_try\"") >&5
14223   (eval $ac_try) 2>&5
14224   ac_status=$?
14225   echo "$as_me:14225: \$? = $ac_status" >&5
14226   (exit $ac_status); }; }; then
14227   cf_cv_typeof_chtype=`cat cf_test.out`
14228 else
14229   echo "$as_me: program exited with status $ac_status" >&5
14230 echo "$as_me: failed program was:" >&5
14231 cat conftest.$ac_ext >&5
14232 cf_cv_typeof_chtype=long
14233 fi
14234 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14235 fi
14236                 rm -f cf_test.out
14237
14238 fi
14239
14240 echo "$as_me:14240: result: $cf_cv_typeof_chtype" >&5
14241 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14242
14243 cat >>confdefs.h <<EOF
14244 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14245 EOF
14246
14247 else
14248         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14249 fi
14250 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14251
14252 echo "$as_me:14252: checking if unsigned literals are legal" >&5
14253 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14254 if test "${cf_cv_unsigned_literals+set}" = set; then
14255   echo $ECHO_N "(cached) $ECHO_C" >&6
14256 else
14257
14258         cat >conftest.$ac_ext <<_ACEOF
14259 #line 14259 "configure"
14260 #include "confdefs.h"
14261
14262 int
14263 main ()
14264 {
14265 long x = 1L + 1UL + 1U + 1
14266   ;
14267   return 0;
14268 }
14269 _ACEOF
14270 rm -f conftest.$ac_objext
14271 if { (eval echo "$as_me:14271: \"$ac_compile\"") >&5
14272   (eval $ac_compile) 2>&5
14273   ac_status=$?
14274   echo "$as_me:14274: \$? = $ac_status" >&5
14275   (exit $ac_status); } &&
14276          { ac_try='test -s conftest.$ac_objext'
14277   { (eval echo "$as_me:14277: \"$ac_try\"") >&5
14278   (eval $ac_try) 2>&5
14279   ac_status=$?
14280   echo "$as_me:14280: \$? = $ac_status" >&5
14281   (exit $ac_status); }; }; then
14282   cf_cv_unsigned_literals=yes
14283 else
14284   echo "$as_me: failed program was:" >&5
14285 cat conftest.$ac_ext >&5
14286 cf_cv_unsigned_literals=no
14287 fi
14288 rm -f conftest.$ac_objext conftest.$ac_ext
14289
14290 fi
14291
14292 echo "$as_me:14292: result: $cf_cv_unsigned_literals" >&5
14293 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14294
14295 cf_cv_1UL="1"
14296 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14297 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14298
14299 if test $NCURSES_MMASK_T = auto ; then
14300         cf_cv_typeof_mmask_t=long
14301 else
14302         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14303 fi
14304 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14305
14306 ###     Checks for external-data
14307
14308 echo "$as_me:14308: checking if external errno is declared" >&5
14309 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14310 if test "${cf_cv_dcl_errno+set}" = set; then
14311   echo $ECHO_N "(cached) $ECHO_C" >&6
14312 else
14313
14314     cat >conftest.$ac_ext <<_ACEOF
14315 #line 14315 "configure"
14316 #include "confdefs.h"
14317
14318 #ifdef HAVE_STDLIB_H
14319 #include <stdlib.h>
14320 #endif
14321 #include <stdio.h>
14322 #include <sys/types.h>
14323 #include <errno.h>
14324 int
14325 main ()
14326 {
14327 int x = (int) errno
14328   ;
14329   return 0;
14330 }
14331 _ACEOF
14332 rm -f conftest.$ac_objext
14333 if { (eval echo "$as_me:14333: \"$ac_compile\"") >&5
14334   (eval $ac_compile) 2>&5
14335   ac_status=$?
14336   echo "$as_me:14336: \$? = $ac_status" >&5
14337   (exit $ac_status); } &&
14338          { ac_try='test -s conftest.$ac_objext'
14339   { (eval echo "$as_me:14339: \"$ac_try\"") >&5
14340   (eval $ac_try) 2>&5
14341   ac_status=$?
14342   echo "$as_me:14342: \$? = $ac_status" >&5
14343   (exit $ac_status); }; }; then
14344   cf_cv_dcl_errno=yes
14345 else
14346   echo "$as_me: failed program was:" >&5
14347 cat conftest.$ac_ext >&5
14348 cf_cv_dcl_errno=no
14349 fi
14350 rm -f conftest.$ac_objext conftest.$ac_ext
14351
14352 fi
14353 echo "$as_me:14353: result: $cf_cv_dcl_errno" >&5
14354 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14355
14356 if test "$cf_cv_dcl_errno" = no ; then
14357
14358 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14359
14360     cat >>confdefs.h <<EOF
14361 #define $cf_result 1
14362 EOF
14363
14364 fi
14365
14366 # It's possible (for near-UNIX clones) that the data doesn't exist
14367
14368 echo "$as_me:14368: checking if external errno exists" >&5
14369 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14370 if test "${cf_cv_have_errno+set}" = set; then
14371   echo $ECHO_N "(cached) $ECHO_C" >&6
14372 else
14373
14374     cat >conftest.$ac_ext <<_ACEOF
14375 #line 14375 "configure"
14376 #include "confdefs.h"
14377
14378 #undef errno
14379 extern int errno;
14380
14381 int
14382 main ()
14383 {
14384 errno = 2
14385   ;
14386   return 0;
14387 }
14388 _ACEOF
14389 rm -f conftest.$ac_objext conftest$ac_exeext
14390 if { (eval echo "$as_me:14390: \"$ac_link\"") >&5
14391   (eval $ac_link) 2>&5
14392   ac_status=$?
14393   echo "$as_me:14393: \$? = $ac_status" >&5
14394   (exit $ac_status); } &&
14395          { ac_try='test -s conftest$ac_exeext'
14396   { (eval echo "$as_me:14396: \"$ac_try\"") >&5
14397   (eval $ac_try) 2>&5
14398   ac_status=$?
14399   echo "$as_me:14399: \$? = $ac_status" >&5
14400   (exit $ac_status); }; }; then
14401   cf_cv_have_errno=yes
14402 else
14403   echo "$as_me: failed program was:" >&5
14404 cat conftest.$ac_ext >&5
14405 cf_cv_have_errno=no
14406 fi
14407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14408
14409 fi
14410 echo "$as_me:14410: result: $cf_cv_have_errno" >&5
14411 echo "${ECHO_T}$cf_cv_have_errno" >&6
14412
14413 if test "$cf_cv_have_errno" = yes ; then
14414
14415 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14416
14417     cat >>confdefs.h <<EOF
14418 #define $cf_result 1
14419 EOF
14420
14421 fi
14422
14423 echo "$as_me:14423: checking if data-only library module links" >&5
14424 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14425 if test "${cf_cv_link_dataonly+set}" = set; then
14426   echo $ECHO_N "(cached) $ECHO_C" >&6
14427 else
14428
14429         rm -f conftest.a
14430         cat >conftest.$ac_ext <<EOF
14431 #line 14431 "configure"
14432 int     testdata[3] = { 123, 456, 789 };
14433 EOF
14434         if { (eval echo "$as_me:14434: \"$ac_compile\"") >&5
14435   (eval $ac_compile) 2>&5
14436   ac_status=$?
14437   echo "$as_me:14437: \$? = $ac_status" >&5
14438   (exit $ac_status); } ; then
14439                 mv conftest.o data.o && \
14440                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14441         fi
14442         rm -f conftest.$ac_ext data.o
14443         cat >conftest.$ac_ext <<EOF
14444 #line 14444 "configure"
14445 int     testfunc()
14446 {
14447 #if defined(NeXT)
14448         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14449 #else
14450         extern int testdata[3];
14451         return testdata[0] == 123
14452            &&  testdata[1] == 456
14453            &&  testdata[2] == 789;
14454 #endif
14455 }
14456 EOF
14457         if { (eval echo "$as_me:14457: \"$ac_compile\"") >&5
14458   (eval $ac_compile) 2>&5
14459   ac_status=$?
14460   echo "$as_me:14460: \$? = $ac_status" >&5
14461   (exit $ac_status); }; then
14462                 mv conftest.o func.o && \
14463                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14464         fi
14465         rm -f conftest.$ac_ext func.o
14466         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14467         cf_saveLIBS="$LIBS"
14468         LIBS="conftest.a $LIBS"
14469         if test "$cross_compiling" = yes; then
14470   cf_cv_link_dataonly=unknown
14471 else
14472   cat >conftest.$ac_ext <<_ACEOF
14473 #line 14473 "configure"
14474 #include "confdefs.h"
14475
14476         int main()
14477         {
14478                 extern int testfunc();
14479                 ${cf_cv_main_return:-return} (!testfunc());
14480         }
14481
14482 _ACEOF
14483 rm -f conftest$ac_exeext
14484 if { (eval echo "$as_me:14484: \"$ac_link\"") >&5
14485   (eval $ac_link) 2>&5
14486   ac_status=$?
14487   echo "$as_me:14487: \$? = $ac_status" >&5
14488   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14489   { (eval echo "$as_me:14489: \"$ac_try\"") >&5
14490   (eval $ac_try) 2>&5
14491   ac_status=$?
14492   echo "$as_me:14492: \$? = $ac_status" >&5
14493   (exit $ac_status); }; }; then
14494   cf_cv_link_dataonly=yes
14495 else
14496   echo "$as_me: program exited with status $ac_status" >&5
14497 echo "$as_me: failed program was:" >&5
14498 cat conftest.$ac_ext >&5
14499 cf_cv_link_dataonly=no
14500 fi
14501 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14502 fi
14503         LIBS="$cf_saveLIBS"
14504
14505 fi
14506
14507 echo "$as_me:14507: result: $cf_cv_link_dataonly" >&5
14508 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14509
14510 if test "$cf_cv_link_dataonly" = no ; then
14511         cat >>confdefs.h <<\EOF
14512 #define BROKEN_LINKER 1
14513 EOF
14514
14515         BROKEN_LINKER=1
14516 fi
14517
14518 ###     Checks for library functions.
14519
14520 for ac_func in \
14521 getcwd \
14522 getegid \
14523 geteuid \
14524 getttynam \
14525 issetugid \
14526 poll \
14527 remove \
14528 select \
14529 setbuf \
14530 setbuffer \
14531 setvbuf \
14532 sigaction \
14533 sigvec \
14534 strdup \
14535 strstr \
14536 tcgetpgrp \
14537 times \
14538 vsnprintf \
14539
14540 do
14541 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14542 echo "$as_me:14542: checking for $ac_func" >&5
14543 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14544 if eval "test \"\${$as_ac_var+set}\" = set"; then
14545   echo $ECHO_N "(cached) $ECHO_C" >&6
14546 else
14547   cat >conftest.$ac_ext <<_ACEOF
14548 #line 14548 "configure"
14549 #include "confdefs.h"
14550 /* System header to define __stub macros and hopefully few prototypes,
14551     which can conflict with char $ac_func (); below.  */
14552 #include <assert.h>
14553 /* Override any gcc2 internal prototype to avoid an error.  */
14554 #ifdef __cplusplus
14555 extern "C"
14556 #endif
14557 /* We use char because int might match the return type of a gcc2
14558    builtin and then its argument prototype would still apply.  */
14559 char $ac_func ();
14560 char (*f) ();
14561
14562 int
14563 main ()
14564 {
14565 /* The GNU C library defines this for functions which it implements
14566     to always fail with ENOSYS.  Some functions are actually named
14567     something starting with __ and the normal name is an alias.  */
14568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14569 choke me
14570 #else
14571 f = $ac_func;
14572 #endif
14573
14574   ;
14575   return 0;
14576 }
14577 _ACEOF
14578 rm -f conftest.$ac_objext conftest$ac_exeext
14579 if { (eval echo "$as_me:14579: \"$ac_link\"") >&5
14580   (eval $ac_link) 2>&5
14581   ac_status=$?
14582   echo "$as_me:14582: \$? = $ac_status" >&5
14583   (exit $ac_status); } &&
14584          { ac_try='test -s conftest$ac_exeext'
14585   { (eval echo "$as_me:14585: \"$ac_try\"") >&5
14586   (eval $ac_try) 2>&5
14587   ac_status=$?
14588   echo "$as_me:14588: \$? = $ac_status" >&5
14589   (exit $ac_status); }; }; then
14590   eval "$as_ac_var=yes"
14591 else
14592   echo "$as_me: failed program was:" >&5
14593 cat conftest.$ac_ext >&5
14594 eval "$as_ac_var=no"
14595 fi
14596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14597 fi
14598 echo "$as_me:14598: result: `eval echo '${'$as_ac_var'}'`" >&5
14599 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14600 if test `eval echo '${'$as_ac_var'}'` = yes; then
14601   cat >>confdefs.h <<EOF
14602 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14603 EOF
14604
14605 fi
14606 done
14607
14608 if test "$with_getcap" = "yes" ; then
14609
14610 echo "$as_me:14610: checking for terminal-capability database functions" >&5
14611 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14612 if test "${cf_cv_cgetent+set}" = set; then
14613   echo $ECHO_N "(cached) $ECHO_C" >&6
14614 else
14615
14616 cat >conftest.$ac_ext <<_ACEOF
14617 #line 14617 "configure"
14618 #include "confdefs.h"
14619
14620 #include <stdlib.h>
14621 int
14622 main ()
14623 {
14624
14625         char temp[128];
14626         char *buf = temp;
14627         char *db_array = temp;
14628         cgetent(&buf, /* int *, */ &db_array, "vt100");
14629         cgetcap(buf, "tc", '=');
14630         cgetmatch(buf, "tc");
14631
14632   ;
14633   return 0;
14634 }
14635 _ACEOF
14636 rm -f conftest.$ac_objext conftest$ac_exeext
14637 if { (eval echo "$as_me:14637: \"$ac_link\"") >&5
14638   (eval $ac_link) 2>&5
14639   ac_status=$?
14640   echo "$as_me:14640: \$? = $ac_status" >&5
14641   (exit $ac_status); } &&
14642          { ac_try='test -s conftest$ac_exeext'
14643   { (eval echo "$as_me:14643: \"$ac_try\"") >&5
14644   (eval $ac_try) 2>&5
14645   ac_status=$?
14646   echo "$as_me:14646: \$? = $ac_status" >&5
14647   (exit $ac_status); }; }; then
14648   cf_cv_cgetent=yes
14649 else
14650   echo "$as_me: failed program was:" >&5
14651 cat conftest.$ac_ext >&5
14652 cf_cv_cgetent=no
14653 fi
14654 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14655
14656 fi
14657
14658 echo "$as_me:14658: result: $cf_cv_cgetent" >&5
14659 echo "${ECHO_T}$cf_cv_cgetent" >&6
14660 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14661 #define HAVE_BSD_CGETENT 1
14662 EOF
14663
14664 fi
14665
14666 echo "$as_me:14666: checking for isascii" >&5
14667 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14668 if test "${cf_cv_have_isascii+set}" = set; then
14669   echo $ECHO_N "(cached) $ECHO_C" >&6
14670 else
14671
14672         cat >conftest.$ac_ext <<_ACEOF
14673 #line 14673 "configure"
14674 #include "confdefs.h"
14675 #include <ctype.h>
14676 int
14677 main ()
14678 {
14679 int x = isascii(' ')
14680   ;
14681   return 0;
14682 }
14683 _ACEOF
14684 rm -f conftest.$ac_objext conftest$ac_exeext
14685 if { (eval echo "$as_me:14685: \"$ac_link\"") >&5
14686   (eval $ac_link) 2>&5
14687   ac_status=$?
14688   echo "$as_me:14688: \$? = $ac_status" >&5
14689   (exit $ac_status); } &&
14690          { ac_try='test -s conftest$ac_exeext'
14691   { (eval echo "$as_me:14691: \"$ac_try\"") >&5
14692   (eval $ac_try) 2>&5
14693   ac_status=$?
14694   echo "$as_me:14694: \$? = $ac_status" >&5
14695   (exit $ac_status); }; }; then
14696   cf_cv_have_isascii=yes
14697 else
14698   echo "$as_me: failed program was:" >&5
14699 cat conftest.$ac_ext >&5
14700 cf_cv_have_isascii=no
14701 fi
14702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14703
14704 fi
14705 echo "$as_me:14705: result: $cf_cv_have_isascii" >&5
14706 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14707 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14708 #define HAVE_ISASCII 1
14709 EOF
14710
14711 if test "$ac_cv_func_sigaction" = yes; then
14712 echo "$as_me:14712: checking whether sigaction needs _POSIX_SOURCE" >&5
14713 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14714 cat >conftest.$ac_ext <<_ACEOF
14715 #line 14715 "configure"
14716 #include "confdefs.h"
14717
14718 #include <sys/types.h>
14719 #include <signal.h>
14720 int
14721 main ()
14722 {
14723 struct sigaction act
14724   ;
14725   return 0;
14726 }
14727 _ACEOF
14728 rm -f conftest.$ac_objext
14729 if { (eval echo "$as_me:14729: \"$ac_compile\"") >&5
14730   (eval $ac_compile) 2>&5
14731   ac_status=$?
14732   echo "$as_me:14732: \$? = $ac_status" >&5
14733   (exit $ac_status); } &&
14734          { ac_try='test -s conftest.$ac_objext'
14735   { (eval echo "$as_me:14735: \"$ac_try\"") >&5
14736   (eval $ac_try) 2>&5
14737   ac_status=$?
14738   echo "$as_me:14738: \$? = $ac_status" >&5
14739   (exit $ac_status); }; }; then
14740   sigact_bad=no
14741 else
14742   echo "$as_me: failed program was:" >&5
14743 cat conftest.$ac_ext >&5
14744
14745 cat >conftest.$ac_ext <<_ACEOF
14746 #line 14746 "configure"
14747 #include "confdefs.h"
14748
14749 #define _POSIX_SOURCE
14750 #include <sys/types.h>
14751 #include <signal.h>
14752 int
14753 main ()
14754 {
14755 struct sigaction act
14756   ;
14757   return 0;
14758 }
14759 _ACEOF
14760 rm -f conftest.$ac_objext
14761 if { (eval echo "$as_me:14761: \"$ac_compile\"") >&5
14762   (eval $ac_compile) 2>&5
14763   ac_status=$?
14764   echo "$as_me:14764: \$? = $ac_status" >&5
14765   (exit $ac_status); } &&
14766          { ac_try='test -s conftest.$ac_objext'
14767   { (eval echo "$as_me:14767: \"$ac_try\"") >&5
14768   (eval $ac_try) 2>&5
14769   ac_status=$?
14770   echo "$as_me:14770: \$? = $ac_status" >&5
14771   (exit $ac_status); }; }; then
14772   sigact_bad=yes
14773          cat >>confdefs.h <<\EOF
14774 #define _POSIX_SOURCE 1
14775 EOF
14776
14777 else
14778   echo "$as_me: failed program was:" >&5
14779 cat conftest.$ac_ext >&5
14780 sigact_bad=unknown
14781 fi
14782 rm -f conftest.$ac_objext conftest.$ac_ext
14783 fi
14784 rm -f conftest.$ac_objext conftest.$ac_ext
14785 echo "$as_me:14785: result: $sigact_bad" >&5
14786 echo "${ECHO_T}$sigact_bad" >&6
14787 fi
14788
14789 echo "$as_me:14789: checking if nanosleep really works" >&5
14790 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14791 if test "${cf_cv_func_nanosleep+set}" = set; then
14792   echo $ECHO_N "(cached) $ECHO_C" >&6
14793 else
14794
14795 if test "$cross_compiling" = yes; then
14796   cf_cv_func_nanosleep=unknown
14797 else
14798   cat >conftest.$ac_ext <<_ACEOF
14799 #line 14799 "configure"
14800 #include "confdefs.h"
14801
14802 #include <stdio.h>
14803 #include <errno.h>
14804 #include <time.h>
14805
14806 #ifdef HAVE_SYS_TIME_H
14807 #include <sys/time.h>
14808 #endif
14809
14810 int main() {
14811         struct timespec ts1, ts2;
14812         int code;
14813         ts1.tv_sec  = 0;
14814         ts1.tv_nsec = 750000000;
14815         ts2.tv_sec  = 0;
14816         ts2.tv_nsec = 0;
14817         errno = 0;
14818         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14819         ${cf_cv_main_return:-return}(code != 0);
14820 }
14821
14822 _ACEOF
14823 rm -f conftest$ac_exeext
14824 if { (eval echo "$as_me:14824: \"$ac_link\"") >&5
14825   (eval $ac_link) 2>&5
14826   ac_status=$?
14827   echo "$as_me:14827: \$? = $ac_status" >&5
14828   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14829   { (eval echo "$as_me:14829: \"$ac_try\"") >&5
14830   (eval $ac_try) 2>&5
14831   ac_status=$?
14832   echo "$as_me:14832: \$? = $ac_status" >&5
14833   (exit $ac_status); }; }; then
14834   cf_cv_func_nanosleep=yes
14835 else
14836   echo "$as_me: program exited with status $ac_status" >&5
14837 echo "$as_me: failed program was:" >&5
14838 cat conftest.$ac_ext >&5
14839 cf_cv_func_nanosleep=no
14840 fi
14841 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14842 fi
14843 fi
14844 echo "$as_me:14844: result: $cf_cv_func_nanosleep" >&5
14845 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14846
14847 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14848 #define HAVE_NANOSLEEP 1
14849 EOF
14850
14851 for ac_header in \
14852 termio.h \
14853 termios.h \
14854 unistd.h \
14855
14856 do
14857 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14858 echo "$as_me:14858: checking for $ac_header" >&5
14859 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14860 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14861   echo $ECHO_N "(cached) $ECHO_C" >&6
14862 else
14863   cat >conftest.$ac_ext <<_ACEOF
14864 #line 14864 "configure"
14865 #include "confdefs.h"
14866 #include <$ac_header>
14867 _ACEOF
14868 if { (eval echo "$as_me:14868: \"$ac_cpp conftest.$ac_ext\"") >&5
14869   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14870   ac_status=$?
14871   egrep -v '^ *\+' conftest.er1 >conftest.err
14872   rm -f conftest.er1
14873   cat conftest.err >&5
14874   echo "$as_me:14874: \$? = $ac_status" >&5
14875   (exit $ac_status); } >/dev/null; then
14876   if test -s conftest.err; then
14877     ac_cpp_err=$ac_c_preproc_warn_flag
14878   else
14879     ac_cpp_err=
14880   fi
14881 else
14882   ac_cpp_err=yes
14883 fi
14884 if test -z "$ac_cpp_err"; then
14885   eval "$as_ac_Header=yes"
14886 else
14887   echo "$as_me: failed program was:" >&5
14888   cat conftest.$ac_ext >&5
14889   eval "$as_ac_Header=no"
14890 fi
14891 rm -f conftest.err conftest.$ac_ext
14892 fi
14893 echo "$as_me:14893: result: `eval echo '${'$as_ac_Header'}'`" >&5
14894 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14895 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14896   cat >>confdefs.h <<EOF
14897 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14898 EOF
14899
14900 fi
14901 done
14902
14903 if test "$ISC" = yes ; then
14904
14905 for ac_header in sys/termio.h
14906 do
14907 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14908 echo "$as_me:14908: checking for $ac_header" >&5
14909 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14911   echo $ECHO_N "(cached) $ECHO_C" >&6
14912 else
14913   cat >conftest.$ac_ext <<_ACEOF
14914 #line 14914 "configure"
14915 #include "confdefs.h"
14916 #include <$ac_header>
14917 _ACEOF
14918 if { (eval echo "$as_me:14918: \"$ac_cpp conftest.$ac_ext\"") >&5
14919   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14920   ac_status=$?
14921   egrep -v '^ *\+' conftest.er1 >conftest.err
14922   rm -f conftest.er1
14923   cat conftest.err >&5
14924   echo "$as_me:14924: \$? = $ac_status" >&5
14925   (exit $ac_status); } >/dev/null; then
14926   if test -s conftest.err; then
14927     ac_cpp_err=$ac_c_preproc_warn_flag
14928   else
14929     ac_cpp_err=
14930   fi
14931 else
14932   ac_cpp_err=yes
14933 fi
14934 if test -z "$ac_cpp_err"; then
14935   eval "$as_ac_Header=yes"
14936 else
14937   echo "$as_me: failed program was:" >&5
14938   cat conftest.$ac_ext >&5
14939   eval "$as_ac_Header=no"
14940 fi
14941 rm -f conftest.err conftest.$ac_ext
14942 fi
14943 echo "$as_me:14943: result: `eval echo '${'$as_ac_Header'}'`" >&5
14944 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14945 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14946   cat >>confdefs.h <<EOF
14947 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14948 EOF
14949
14950 fi
14951 done
14952
14953 fi
14954 if test "$ac_cv_header_termios_h" = yes ; then
14955         case "$CFLAGS $CPPFLAGS" in
14956         *-D_POSIX_SOURCE*)
14957                 termios_bad=dunno ;;
14958         *)      termios_bad=maybe ;;
14959         esac
14960         if test "$termios_bad" = maybe ; then
14961         echo "$as_me:14961: checking whether termios.h needs _POSIX_SOURCE" >&5
14962 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14963         cat >conftest.$ac_ext <<_ACEOF
14964 #line 14964 "configure"
14965 #include "confdefs.h"
14966 #include <termios.h>
14967 int
14968 main ()
14969 {
14970 struct termios foo; int x = foo.c_iflag
14971   ;
14972   return 0;
14973 }
14974 _ACEOF
14975 rm -f conftest.$ac_objext
14976 if { (eval echo "$as_me:14976: \"$ac_compile\"") >&5
14977   (eval $ac_compile) 2>&5
14978   ac_status=$?
14979   echo "$as_me:14979: \$? = $ac_status" >&5
14980   (exit $ac_status); } &&
14981          { ac_try='test -s conftest.$ac_objext'
14982   { (eval echo "$as_me:14982: \"$ac_try\"") >&5
14983   (eval $ac_try) 2>&5
14984   ac_status=$?
14985   echo "$as_me:14985: \$? = $ac_status" >&5
14986   (exit $ac_status); }; }; then
14987   termios_bad=no
14988 else
14989   echo "$as_me: failed program was:" >&5
14990 cat conftest.$ac_ext >&5
14991
14992                 cat >conftest.$ac_ext <<_ACEOF
14993 #line 14993 "configure"
14994 #include "confdefs.h"
14995
14996 #define _POSIX_SOURCE
14997 #include <termios.h>
14998 int
14999 main ()
15000 {
15001 struct termios foo; int x = foo.c_iflag
15002   ;
15003   return 0;
15004 }
15005 _ACEOF
15006 rm -f conftest.$ac_objext
15007 if { (eval echo "$as_me:15007: \"$ac_compile\"") >&5
15008   (eval $ac_compile) 2>&5
15009   ac_status=$?
15010   echo "$as_me:15010: \$? = $ac_status" >&5
15011   (exit $ac_status); } &&
15012          { ac_try='test -s conftest.$ac_objext'
15013   { (eval echo "$as_me:15013: \"$ac_try\"") >&5
15014   (eval $ac_try) 2>&5
15015   ac_status=$?
15016   echo "$as_me:15016: \$? = $ac_status" >&5
15017   (exit $ac_status); }; }; then
15018   termios_bad=unknown
15019 else
15020   echo "$as_me: failed program was:" >&5
15021 cat conftest.$ac_ext >&5
15022 termios_bad=yes cat >>confdefs.h <<\EOF
15023 #define _POSIX_SOURCE 1
15024 EOF
15025
15026 fi
15027 rm -f conftest.$ac_objext conftest.$ac_ext
15028
15029 fi
15030 rm -f conftest.$ac_objext conftest.$ac_ext
15031         echo "$as_me:15031: result: $termios_bad" >&5
15032 echo "${ECHO_T}$termios_bad" >&6
15033         fi
15034 fi
15035
15036 echo "$as_me:15036: checking for tcgetattr" >&5
15037 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15038 if test "${cf_cv_have_tcgetattr+set}" = set; then
15039   echo $ECHO_N "(cached) $ECHO_C" >&6
15040 else
15041
15042 cat >conftest.$ac_ext <<_ACEOF
15043 #line 15043 "configure"
15044 #include "confdefs.h"
15045
15046 #include <sys/types.h>
15047 #ifdef HAVE_UNISTD_H
15048 #include <unistd.h>
15049 #endif
15050 #ifdef HAVE_TERMIOS_H
15051 #include <termios.h>
15052 #define TTY struct termios
15053 #else
15054 #ifdef HAVE_TERMIO_H
15055 #include <termio.h>
15056 #define TTY struct termio
15057 #endif
15058 #endif
15059
15060 int
15061 main ()
15062 {
15063
15064 TTY foo;
15065 tcgetattr(1, &foo);
15066   ;
15067   return 0;
15068 }
15069 _ACEOF
15070 rm -f conftest.$ac_objext conftest$ac_exeext
15071 if { (eval echo "$as_me:15071: \"$ac_link\"") >&5
15072   (eval $ac_link) 2>&5
15073   ac_status=$?
15074   echo "$as_me:15074: \$? = $ac_status" >&5
15075   (exit $ac_status); } &&
15076          { ac_try='test -s conftest$ac_exeext'
15077   { (eval echo "$as_me:15077: \"$ac_try\"") >&5
15078   (eval $ac_try) 2>&5
15079   ac_status=$?
15080   echo "$as_me:15080: \$? = $ac_status" >&5
15081   (exit $ac_status); }; }; then
15082   cf_cv_have_tcgetattr=yes
15083 else
15084   echo "$as_me: failed program was:" >&5
15085 cat conftest.$ac_ext >&5
15086 cf_cv_have_tcgetattr=no
15087 fi
15088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15089 fi
15090 echo "$as_me:15090: result: $cf_cv_have_tcgetattr" >&5
15091 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15092 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15093 #define HAVE_TCGETATTR 1
15094 EOF
15095
15096 echo "$as_me:15096: checking for vsscanf function or workaround" >&5
15097 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15098 if test "${cf_cv_func_vsscanf+set}" = set; then
15099   echo $ECHO_N "(cached) $ECHO_C" >&6
15100 else
15101
15102 cat >conftest.$ac_ext <<_ACEOF
15103 #line 15103 "configure"
15104 #include "confdefs.h"
15105
15106 #include <stdarg.h>
15107 #include <stdio.h>
15108 int
15109 main ()
15110 {
15111
15112         va_list ap;
15113         vsscanf("from", "%d", ap)
15114   ;
15115   return 0;
15116 }
15117 _ACEOF
15118 rm -f conftest.$ac_objext conftest$ac_exeext
15119 if { (eval echo "$as_me:15119: \"$ac_link\"") >&5
15120   (eval $ac_link) 2>&5
15121   ac_status=$?
15122   echo "$as_me:15122: \$? = $ac_status" >&5
15123   (exit $ac_status); } &&
15124          { ac_try='test -s conftest$ac_exeext'
15125   { (eval echo "$as_me:15125: \"$ac_try\"") >&5
15126   (eval $ac_try) 2>&5
15127   ac_status=$?
15128   echo "$as_me:15128: \$? = $ac_status" >&5
15129   (exit $ac_status); }; }; then
15130   cf_cv_func_vsscanf=vsscanf
15131 else
15132   echo "$as_me: failed program was:" >&5
15133 cat conftest.$ac_ext >&5
15134
15135 cat >conftest.$ac_ext <<_ACEOF
15136 #line 15136 "configure"
15137 #include "confdefs.h"
15138
15139 #include <stdarg.h>
15140 #include <stdio.h>
15141 int
15142 main ()
15143 {
15144
15145     FILE strbuf;
15146     char *str = "from";
15147
15148     strbuf._flag = _IOREAD;
15149     strbuf._ptr = strbuf._base = (unsigned char *) str;
15150     strbuf._cnt = strlen(str);
15151     strbuf._file = _NFILE;
15152     return (vfscanf(&strbuf, "%d", ap))
15153   ;
15154   return 0;
15155 }
15156 _ACEOF
15157 rm -f conftest.$ac_objext conftest$ac_exeext
15158 if { (eval echo "$as_me:15158: \"$ac_link\"") >&5
15159   (eval $ac_link) 2>&5
15160   ac_status=$?
15161   echo "$as_me:15161: \$? = $ac_status" >&5
15162   (exit $ac_status); } &&
15163          { ac_try='test -s conftest$ac_exeext'
15164   { (eval echo "$as_me:15164: \"$ac_try\"") >&5
15165   (eval $ac_try) 2>&5
15166   ac_status=$?
15167   echo "$as_me:15167: \$? = $ac_status" >&5
15168   (exit $ac_status); }; }; then
15169   cf_cv_func_vsscanf=vfscanf
15170 else
15171   echo "$as_me: failed program was:" >&5
15172 cat conftest.$ac_ext >&5
15173
15174 cat >conftest.$ac_ext <<_ACEOF
15175 #line 15175 "configure"
15176 #include "confdefs.h"
15177
15178 #include <stdarg.h>
15179 #include <stdio.h>
15180 int
15181 main ()
15182 {
15183
15184     FILE strbuf;
15185     char *str = "from";
15186
15187     strbuf._flag = _IOREAD;
15188     strbuf._ptr = strbuf._base = (unsigned char *) str;
15189     strbuf._cnt = strlen(str);
15190     strbuf._file = _NFILE;
15191     return (_doscan(&strbuf, "%d", ap))
15192   ;
15193   return 0;
15194 }
15195 _ACEOF
15196 rm -f conftest.$ac_objext conftest$ac_exeext
15197 if { (eval echo "$as_me:15197: \"$ac_link\"") >&5
15198   (eval $ac_link) 2>&5
15199   ac_status=$?
15200   echo "$as_me:15200: \$? = $ac_status" >&5
15201   (exit $ac_status); } &&
15202          { ac_try='test -s conftest$ac_exeext'
15203   { (eval echo "$as_me:15203: \"$ac_try\"") >&5
15204   (eval $ac_try) 2>&5
15205   ac_status=$?
15206   echo "$as_me:15206: \$? = $ac_status" >&5
15207   (exit $ac_status); }; }; then
15208   cf_cv_func_vsscanf=_doscan
15209 else
15210   echo "$as_me: failed program was:" >&5
15211 cat conftest.$ac_ext >&5
15212
15213 cf_cv_func_vsscanf=no
15214 fi
15215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15216 fi
15217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15218 fi
15219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15220 fi
15221 echo "$as_me:15221: result: $cf_cv_func_vsscanf" >&5
15222 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15223
15224 case $cf_cv_func_vsscanf in #(vi
15225 vsscanf) cat >>confdefs.h <<\EOF
15226 #define HAVE_VSSCANF 1
15227 EOF
15228 ;; #(vi
15229 vfscanf) cat >>confdefs.h <<\EOF
15230 #define HAVE_VFSCANF 1
15231 EOF
15232 ;; #(vi
15233 _doscan) cat >>confdefs.h <<\EOF
15234 #define HAVE__DOSCAN 1
15235 EOF
15236 ;;
15237 esac
15238
15239 echo "$as_me:15239: checking for working mkstemp" >&5
15240 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15241 if test "${cf_cv_func_mkstemp+set}" = set; then
15242   echo $ECHO_N "(cached) $ECHO_C" >&6
15243 else
15244
15245 rm -rf conftest*
15246 if test "$cross_compiling" = yes; then
15247   echo "$as_me:15247: checking for mkstemp" >&5
15248 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15249 if test "${ac_cv_func_mkstemp+set}" = set; then
15250   echo $ECHO_N "(cached) $ECHO_C" >&6
15251 else
15252   cat >conftest.$ac_ext <<_ACEOF
15253 #line 15253 "configure"
15254 #include "confdefs.h"
15255 /* System header to define __stub macros and hopefully few prototypes,
15256     which can conflict with char mkstemp (); below.  */
15257 #include <assert.h>
15258 /* Override any gcc2 internal prototype to avoid an error.  */
15259 #ifdef __cplusplus
15260 extern "C"
15261 #endif
15262 /* We use char because int might match the return type of a gcc2
15263    builtin and then its argument prototype would still apply.  */
15264 char mkstemp ();
15265 char (*f) ();
15266
15267 int
15268 main ()
15269 {
15270 /* The GNU C library defines this for functions which it implements
15271     to always fail with ENOSYS.  Some functions are actually named
15272     something starting with __ and the normal name is an alias.  */
15273 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15274 choke me
15275 #else
15276 f = mkstemp;
15277 #endif
15278
15279   ;
15280   return 0;
15281 }
15282 _ACEOF
15283 rm -f conftest.$ac_objext conftest$ac_exeext
15284 if { (eval echo "$as_me:15284: \"$ac_link\"") >&5
15285   (eval $ac_link) 2>&5
15286   ac_status=$?
15287   echo "$as_me:15287: \$? = $ac_status" >&5
15288   (exit $ac_status); } &&
15289          { ac_try='test -s conftest$ac_exeext'
15290   { (eval echo "$as_me:15290: \"$ac_try\"") >&5
15291   (eval $ac_try) 2>&5
15292   ac_status=$?
15293   echo "$as_me:15293: \$? = $ac_status" >&5
15294   (exit $ac_status); }; }; then
15295   ac_cv_func_mkstemp=yes
15296 else
15297   echo "$as_me: failed program was:" >&5
15298 cat conftest.$ac_ext >&5
15299 ac_cv_func_mkstemp=no
15300 fi
15301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15302 fi
15303 echo "$as_me:15303: result: $ac_cv_func_mkstemp" >&5
15304 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15305
15306 else
15307   cat >conftest.$ac_ext <<_ACEOF
15308 #line 15308 "configure"
15309 #include "confdefs.h"
15310
15311 #include <sys/types.h>
15312 #include <stdlib.h>
15313 #include <stdio.h>
15314 #include <string.h>
15315 #include <sys/stat.h>
15316 int main()
15317 {
15318         char *tmpl = "conftestXXXXXX";
15319         char name[2][80];
15320         int n;
15321         int result = 0;
15322         int fd;
15323         struct stat sb;
15324
15325         umask(077);
15326         for (n = 0; n < 2; ++n) {
15327                 strcpy(name[n], tmpl);
15328                 if ((fd = mkstemp(name[n])) >= 0) {
15329                         if (!strcmp(name[n], tmpl)
15330                          || stat(name[n], &sb) != 0
15331                          || (sb.st_mode & S_IFMT) != S_IFREG
15332                          || (sb.st_mode & 077) != 0) {
15333                                 result = 1;
15334                         }
15335                         close(fd);
15336                 }
15337         }
15338         if (result == 0
15339          && !strcmp(name[0], name[1]))
15340                 result = 1;
15341         ${cf_cv_main_return:-return}(result);
15342 }
15343
15344 _ACEOF
15345 rm -f conftest$ac_exeext
15346 if { (eval echo "$as_me:15346: \"$ac_link\"") >&5
15347   (eval $ac_link) 2>&5
15348   ac_status=$?
15349   echo "$as_me:15349: \$? = $ac_status" >&5
15350   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15351   { (eval echo "$as_me:15351: \"$ac_try\"") >&5
15352   (eval $ac_try) 2>&5
15353   ac_status=$?
15354   echo "$as_me:15354: \$? = $ac_status" >&5
15355   (exit $ac_status); }; }; then
15356   cf_cv_func_mkstemp=yes
15357
15358 else
15359   echo "$as_me: program exited with status $ac_status" >&5
15360 echo "$as_me: failed program was:" >&5
15361 cat conftest.$ac_ext >&5
15362 cf_cv_func_mkstemp=no
15363
15364 fi
15365 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15366 fi
15367
15368 fi
15369 echo "$as_me:15369: result: $cf_cv_func_mkstemp" >&5
15370 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15371 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15372         cat >>confdefs.h <<\EOF
15373 #define HAVE_MKSTEMP 1
15374 EOF
15375
15376 fi
15377
15378 # setup for prototype of fallback for vsscanf()
15379
15380 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15381         HAVE_VSSCANF=1
15382 else
15383         HAVE_VSSCANF=0
15384 fi
15385
15386 if test "$cross_compiling" = yes ; then
15387         { echo "$as_me:15387: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15388 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15389 else
15390         echo "$as_me:15390: checking whether setvbuf arguments are reversed" >&5
15391 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15392 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15393   echo $ECHO_N "(cached) $ECHO_C" >&6
15394 else
15395   if test "$cross_compiling" = yes; then
15396   { { echo "$as_me:15396: error: cannot run test program while cross compiling" >&5
15397 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15398    { (exit 1); exit 1; }; }
15399 else
15400   cat >conftest.$ac_ext <<_ACEOF
15401 #line 15401 "configure"
15402 #include "confdefs.h"
15403 #include <stdio.h>
15404 /* If setvbuf has the reversed format, exit 0. */
15405 int
15406 main ()
15407 {
15408   /* This call has the arguments reversed.
15409      A reversed system may check and see that the address of main
15410      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15411   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15412     $ac_main_return(1);
15413   putc('\r', stdout);
15414   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15415 }
15416 _ACEOF
15417 rm -f 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); } && { ac_try='./conftest$ac_exeext'
15423   { (eval echo "$as_me:15423: \"$ac_try\"") >&5
15424   (eval $ac_try) 2>&5
15425   ac_status=$?
15426   echo "$as_me:15426: \$? = $ac_status" >&5
15427   (exit $ac_status); }; }; then
15428   ac_cv_func_setvbuf_reversed=yes
15429 else
15430   echo "$as_me: program exited with status $ac_status" >&5
15431 echo "$as_me: failed program was:" >&5
15432 cat conftest.$ac_ext >&5
15433 ac_cv_func_setvbuf_reversed=no
15434 fi
15435 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15436 fi
15437 rm -f core core.* *.core
15438 fi
15439 echo "$as_me:15439: result: $ac_cv_func_setvbuf_reversed" >&5
15440 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15441 if test $ac_cv_func_setvbuf_reversed = yes; then
15442
15443 cat >>confdefs.h <<\EOF
15444 #define SETVBUF_REVERSED 1
15445 EOF
15446
15447 fi
15448
15449 fi
15450 echo "$as_me:15450: checking return type of signal handlers" >&5
15451 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15452 if test "${ac_cv_type_signal+set}" = set; then
15453   echo $ECHO_N "(cached) $ECHO_C" >&6
15454 else
15455   cat >conftest.$ac_ext <<_ACEOF
15456 #line 15456 "configure"
15457 #include "confdefs.h"
15458 #include <sys/types.h>
15459 #include <signal.h>
15460 #ifdef signal
15461 # undef signal
15462 #endif
15463 #ifdef __cplusplus
15464 extern "C" void (*signal (int, void (*)(int)))(int);
15465 #else
15466 void (*signal ()) ();
15467 #endif
15468
15469 int
15470 main ()
15471 {
15472 int i;
15473   ;
15474   return 0;
15475 }
15476 _ACEOF
15477 rm -f conftest.$ac_objext
15478 if { (eval echo "$as_me:15478: \"$ac_compile\"") >&5
15479   (eval $ac_compile) 2>&5
15480   ac_status=$?
15481   echo "$as_me:15481: \$? = $ac_status" >&5
15482   (exit $ac_status); } &&
15483          { ac_try='test -s conftest.$ac_objext'
15484   { (eval echo "$as_me:15484: \"$ac_try\"") >&5
15485   (eval $ac_try) 2>&5
15486   ac_status=$?
15487   echo "$as_me:15487: \$? = $ac_status" >&5
15488   (exit $ac_status); }; }; then
15489   ac_cv_type_signal=void
15490 else
15491   echo "$as_me: failed program was:" >&5
15492 cat conftest.$ac_ext >&5
15493 ac_cv_type_signal=int
15494 fi
15495 rm -f conftest.$ac_objext conftest.$ac_ext
15496 fi
15497 echo "$as_me:15497: result: $ac_cv_type_signal" >&5
15498 echo "${ECHO_T}$ac_cv_type_signal" >&6
15499
15500 cat >>confdefs.h <<EOF
15501 #define RETSIGTYPE $ac_cv_type_signal
15502 EOF
15503
15504 echo "$as_me:15504: checking for type sigaction_t" >&5
15505 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15506 if test "${cf_cv_type_sigaction+set}" = set; then
15507   echo $ECHO_N "(cached) $ECHO_C" >&6
15508 else
15509
15510         cat >conftest.$ac_ext <<_ACEOF
15511 #line 15511 "configure"
15512 #include "confdefs.h"
15513
15514 #include <signal.h>
15515 int
15516 main ()
15517 {
15518 sigaction_t x
15519   ;
15520   return 0;
15521 }
15522 _ACEOF
15523 rm -f conftest.$ac_objext
15524 if { (eval echo "$as_me:15524: \"$ac_compile\"") >&5
15525   (eval $ac_compile) 2>&5
15526   ac_status=$?
15527   echo "$as_me:15527: \$? = $ac_status" >&5
15528   (exit $ac_status); } &&
15529          { ac_try='test -s conftest.$ac_objext'
15530   { (eval echo "$as_me:15530: \"$ac_try\"") >&5
15531   (eval $ac_try) 2>&5
15532   ac_status=$?
15533   echo "$as_me:15533: \$? = $ac_status" >&5
15534   (exit $ac_status); }; }; then
15535   cf_cv_type_sigaction=yes
15536 else
15537   echo "$as_me: failed program was:" >&5
15538 cat conftest.$ac_ext >&5
15539 cf_cv_type_sigaction=no
15540 fi
15541 rm -f conftest.$ac_objext conftest.$ac_ext
15542 fi
15543
15544 echo "$as_me:15544: result: $cf_cv_type_sigaction" >&5
15545 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15546 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15547 #define HAVE_TYPE_SIGACTION 1
15548 EOF
15549
15550 echo "$as_me:15550: checking declaration of size-change" >&5
15551 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15552 if test "${cf_cv_sizechange+set}" = set; then
15553   echo $ECHO_N "(cached) $ECHO_C" >&6
15554 else
15555
15556     cf_cv_sizechange=unknown
15557     cf_save_CPPFLAGS="$CPPFLAGS"
15558
15559 for cf_opts in "" "NEED_PTEM_H"
15560 do
15561
15562     CPPFLAGS="$cf_save_CPPFLAGS"
15563     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15564     cat >conftest.$ac_ext <<_ACEOF
15565 #line 15565 "configure"
15566 #include "confdefs.h"
15567 #include <sys/types.h>
15568 #ifdef HAVE_TERMIOS_H
15569 #include <termios.h>
15570 #else
15571 #ifdef HAVE_TERMIO_H
15572 #include <termio.h>
15573 #endif
15574 #endif
15575 #ifdef NEED_PTEM_H
15576 /* This is a workaround for SCO:  they neglected to define struct winsize in
15577  * termios.h -- it's only in termio.h and ptem.h
15578  */
15579 #include        <sys/stream.h>
15580 #include        <sys/ptem.h>
15581 #endif
15582 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15583 #include <sys/ioctl.h>
15584 #endif
15585
15586 int
15587 main ()
15588 {
15589
15590 #ifdef TIOCGSIZE
15591         struct ttysize win;     /* FIXME: what system is this? */
15592         int y = win.ts_lines;
15593         int x = win.ts_cols;
15594 #else
15595 #ifdef TIOCGWINSZ
15596         struct winsize win;
15597         int y = win.ws_row;
15598         int x = win.ws_col;
15599 #else
15600         no TIOCGSIZE or TIOCGWINSZ
15601 #endif /* TIOCGWINSZ */
15602 #endif /* TIOCGSIZE */
15603
15604   ;
15605   return 0;
15606 }
15607 _ACEOF
15608 rm -f conftest.$ac_objext
15609 if { (eval echo "$as_me:15609: \"$ac_compile\"") >&5
15610   (eval $ac_compile) 2>&5
15611   ac_status=$?
15612   echo "$as_me:15612: \$? = $ac_status" >&5
15613   (exit $ac_status); } &&
15614          { ac_try='test -s conftest.$ac_objext'
15615   { (eval echo "$as_me:15615: \"$ac_try\"") >&5
15616   (eval $ac_try) 2>&5
15617   ac_status=$?
15618   echo "$as_me:15618: \$? = $ac_status" >&5
15619   (exit $ac_status); }; }; then
15620   cf_cv_sizechange=yes
15621 else
15622   echo "$as_me: failed program was:" >&5
15623 cat conftest.$ac_ext >&5
15624 cf_cv_sizechange=no
15625 fi
15626 rm -f conftest.$ac_objext conftest.$ac_ext
15627
15628         CPPFLAGS="$cf_save_CPPFLAGS"
15629         if test "$cf_cv_sizechange" = yes ; then
15630                 echo "size-change succeeded ($cf_opts)" >&5
15631                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15632                 break
15633         fi
15634 done
15635
15636 fi
15637 echo "$as_me:15637: result: $cf_cv_sizechange" >&5
15638 echo "${ECHO_T}$cf_cv_sizechange" >&6
15639 if test "$cf_cv_sizechange" != no ; then
15640         cat >>confdefs.h <<\EOF
15641 #define HAVE_SIZECHANGE 1
15642 EOF
15643
15644         case $cf_cv_sizechange in #(vi
15645         NEED*)
15646                 cat >>confdefs.h <<EOF
15647 #define $cf_cv_sizechange  1
15648 EOF
15649
15650                 ;;
15651         esac
15652 fi
15653
15654 echo "$as_me:15654: checking for memmove" >&5
15655 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15656 if test "${ac_cv_func_memmove+set}" = set; then
15657   echo $ECHO_N "(cached) $ECHO_C" >&6
15658 else
15659   cat >conftest.$ac_ext <<_ACEOF
15660 #line 15660 "configure"
15661 #include "confdefs.h"
15662 /* System header to define __stub macros and hopefully few prototypes,
15663     which can conflict with char memmove (); below.  */
15664 #include <assert.h>
15665 /* Override any gcc2 internal prototype to avoid an error.  */
15666 #ifdef __cplusplus
15667 extern "C"
15668 #endif
15669 /* We use char because int might match the return type of a gcc2
15670    builtin and then its argument prototype would still apply.  */
15671 char memmove ();
15672 char (*f) ();
15673
15674 int
15675 main ()
15676 {
15677 /* The GNU C library defines this for functions which it implements
15678     to always fail with ENOSYS.  Some functions are actually named
15679     something starting with __ and the normal name is an alias.  */
15680 #if defined (__stub_memmove) || defined (__stub___memmove)
15681 choke me
15682 #else
15683 f = memmove;
15684 #endif
15685
15686   ;
15687   return 0;
15688 }
15689 _ACEOF
15690 rm -f conftest.$ac_objext conftest$ac_exeext
15691 if { (eval echo "$as_me:15691: \"$ac_link\"") >&5
15692   (eval $ac_link) 2>&5
15693   ac_status=$?
15694   echo "$as_me:15694: \$? = $ac_status" >&5
15695   (exit $ac_status); } &&
15696          { ac_try='test -s conftest$ac_exeext'
15697   { (eval echo "$as_me:15697: \"$ac_try\"") >&5
15698   (eval $ac_try) 2>&5
15699   ac_status=$?
15700   echo "$as_me:15700: \$? = $ac_status" >&5
15701   (exit $ac_status); }; }; then
15702   ac_cv_func_memmove=yes
15703 else
15704   echo "$as_me: failed program was:" >&5
15705 cat conftest.$ac_ext >&5
15706 ac_cv_func_memmove=no
15707 fi
15708 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15709 fi
15710 echo "$as_me:15710: result: $ac_cv_func_memmove" >&5
15711 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15712 if test $ac_cv_func_memmove = yes; then
15713   :
15714 else
15715
15716 echo "$as_me:15716: checking for bcopy" >&5
15717 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15718 if test "${ac_cv_func_bcopy+set}" = set; then
15719   echo $ECHO_N "(cached) $ECHO_C" >&6
15720 else
15721   cat >conftest.$ac_ext <<_ACEOF
15722 #line 15722 "configure"
15723 #include "confdefs.h"
15724 /* System header to define __stub macros and hopefully few prototypes,
15725     which can conflict with char bcopy (); below.  */
15726 #include <assert.h>
15727 /* Override any gcc2 internal prototype to avoid an error.  */
15728 #ifdef __cplusplus
15729 extern "C"
15730 #endif
15731 /* We use char because int might match the return type of a gcc2
15732    builtin and then its argument prototype would still apply.  */
15733 char bcopy ();
15734 char (*f) ();
15735
15736 int
15737 main ()
15738 {
15739 /* The GNU C library defines this for functions which it implements
15740     to always fail with ENOSYS.  Some functions are actually named
15741     something starting with __ and the normal name is an alias.  */
15742 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15743 choke me
15744 #else
15745 f = bcopy;
15746 #endif
15747
15748   ;
15749   return 0;
15750 }
15751 _ACEOF
15752 rm -f conftest.$ac_objext conftest$ac_exeext
15753 if { (eval echo "$as_me:15753: \"$ac_link\"") >&5
15754   (eval $ac_link) 2>&5
15755   ac_status=$?
15756   echo "$as_me:15756: \$? = $ac_status" >&5
15757   (exit $ac_status); } &&
15758          { ac_try='test -s conftest$ac_exeext'
15759   { (eval echo "$as_me:15759: \"$ac_try\"") >&5
15760   (eval $ac_try) 2>&5
15761   ac_status=$?
15762   echo "$as_me:15762: \$? = $ac_status" >&5
15763   (exit $ac_status); }; }; then
15764   ac_cv_func_bcopy=yes
15765 else
15766   echo "$as_me: failed program was:" >&5
15767 cat conftest.$ac_ext >&5
15768 ac_cv_func_bcopy=no
15769 fi
15770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15771 fi
15772 echo "$as_me:15772: result: $ac_cv_func_bcopy" >&5
15773 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15774 if test $ac_cv_func_bcopy = yes; then
15775
15776         echo "$as_me:15776: checking if bcopy does overlapping moves" >&5
15777 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15778 if test "${cf_cv_good_bcopy+set}" = set; then
15779   echo $ECHO_N "(cached) $ECHO_C" >&6
15780 else
15781
15782                 if test "$cross_compiling" = yes; then
15783   cf_cv_good_bcopy=unknown
15784 else
15785   cat >conftest.$ac_ext <<_ACEOF
15786 #line 15786 "configure"
15787 #include "confdefs.h"
15788
15789 int main() {
15790         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15791         char temp[40];
15792         bcopy(data, temp, sizeof(data));
15793         bcopy(temp+10, temp, 15);
15794         bcopy(temp+5, temp+15, 10);
15795         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15796 }
15797
15798 _ACEOF
15799 rm -f conftest$ac_exeext
15800 if { (eval echo "$as_me:15800: \"$ac_link\"") >&5
15801   (eval $ac_link) 2>&5
15802   ac_status=$?
15803   echo "$as_me:15803: \$? = $ac_status" >&5
15804   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15805   { (eval echo "$as_me:15805: \"$ac_try\"") >&5
15806   (eval $ac_try) 2>&5
15807   ac_status=$?
15808   echo "$as_me:15808: \$? = $ac_status" >&5
15809   (exit $ac_status); }; }; then
15810   cf_cv_good_bcopy=yes
15811 else
15812   echo "$as_me: program exited with status $ac_status" >&5
15813 echo "$as_me: failed program was:" >&5
15814 cat conftest.$ac_ext >&5
15815 cf_cv_good_bcopy=no
15816 fi
15817 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15818 fi
15819
15820 fi
15821 echo "$as_me:15821: result: $cf_cv_good_bcopy" >&5
15822 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15823
15824 else
15825   cf_cv_good_bcopy=no
15826 fi
15827
15828         if test "$cf_cv_good_bcopy" = yes ; then
15829                 cat >>confdefs.h <<\EOF
15830 #define USE_OK_BCOPY 1
15831 EOF
15832
15833         else
15834                 cat >>confdefs.h <<\EOF
15835 #define USE_MY_MEMMOVE 1
15836 EOF
15837
15838         fi
15839
15840 fi
15841
15842 echo "$as_me:15842: checking if poll really works" >&5
15843 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15844 if test "${cf_cv_working_poll+set}" = set; then
15845   echo $ECHO_N "(cached) $ECHO_C" >&6
15846 else
15847
15848 if test "$cross_compiling" = yes; then
15849   cf_cv_working_poll=unknown
15850 else
15851   cat >conftest.$ac_ext <<_ACEOF
15852 #line 15852 "configure"
15853 #include "confdefs.h"
15854
15855 #include <stdio.h>
15856 #ifdef HAVE_POLL_H
15857 #include <poll.h>
15858 #else
15859 #include <sys/poll.h>
15860 #endif
15861 int main() {
15862         struct pollfd myfds;
15863         int ret;
15864
15865         myfds.fd = 0;
15866         myfds.events = POLLIN;
15867
15868         ret = poll(&myfds, 1, 100);
15869         ${cf_cv_main_return:-return}(ret != 0);
15870 }
15871 _ACEOF
15872 rm -f conftest$ac_exeext
15873 if { (eval echo "$as_me:15873: \"$ac_link\"") >&5
15874   (eval $ac_link) 2>&5
15875   ac_status=$?
15876   echo "$as_me:15876: \$? = $ac_status" >&5
15877   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15878   { (eval echo "$as_me:15878: \"$ac_try\"") >&5
15879   (eval $ac_try) 2>&5
15880   ac_status=$?
15881   echo "$as_me:15881: \$? = $ac_status" >&5
15882   (exit $ac_status); }; }; then
15883   cf_cv_working_poll=yes
15884 else
15885   echo "$as_me: program exited with status $ac_status" >&5
15886 echo "$as_me: failed program was:" >&5
15887 cat conftest.$ac_ext >&5
15888 cf_cv_working_poll=no
15889 fi
15890 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15891 fi
15892 fi
15893 echo "$as_me:15893: result: $cf_cv_working_poll" >&5
15894 echo "${ECHO_T}$cf_cv_working_poll" >&6
15895 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15896 #define HAVE_WORKING_POLL 1
15897 EOF
15898
15899 echo "$as_me:15899: checking for va_copy" >&5
15900 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15901 if test "${cf_cv_have_va_copy+set}" = set; then
15902   echo $ECHO_N "(cached) $ECHO_C" >&6
15903 else
15904
15905 cat >conftest.$ac_ext <<_ACEOF
15906 #line 15906 "configure"
15907 #include "confdefs.h"
15908
15909 #include <stdarg.h>
15910
15911 int
15912 main ()
15913 {
15914
15915         static va_list dst;
15916         static va_list src;
15917         va_copy(dst, src)
15918   ;
15919   return 0;
15920 }
15921 _ACEOF
15922 rm -f conftest.$ac_objext conftest$ac_exeext
15923 if { (eval echo "$as_me:15923: \"$ac_link\"") >&5
15924   (eval $ac_link) 2>&5
15925   ac_status=$?
15926   echo "$as_me:15926: \$? = $ac_status" >&5
15927   (exit $ac_status); } &&
15928          { ac_try='test -s conftest$ac_exeext'
15929   { (eval echo "$as_me:15929: \"$ac_try\"") >&5
15930   (eval $ac_try) 2>&5
15931   ac_status=$?
15932   echo "$as_me:15932: \$? = $ac_status" >&5
15933   (exit $ac_status); }; }; then
15934   cf_cv_have_va_copy=yes
15935 else
15936   echo "$as_me: failed program was:" >&5
15937 cat conftest.$ac_ext >&5
15938 cf_cv_have_va_copy=no
15939 fi
15940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15941 fi
15942 echo "$as_me:15942: result: $cf_cv_have_va_copy" >&5
15943 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15944
15945 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15946 #define HAVE_VA_COPY 1
15947 EOF
15948
15949 echo "$as_me:15949: checking for __va_copy" >&5
15950 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15951 if test "${cf_cv_have___va_copy+set}" = set; then
15952   echo $ECHO_N "(cached) $ECHO_C" >&6
15953 else
15954
15955 cat >conftest.$ac_ext <<_ACEOF
15956 #line 15956 "configure"
15957 #include "confdefs.h"
15958
15959 #include <stdarg.h>
15960
15961 int
15962 main ()
15963 {
15964
15965         static va_list dst;
15966         static va_list src;
15967         __va_copy(dst, src)
15968   ;
15969   return 0;
15970 }
15971 _ACEOF
15972 rm -f conftest.$ac_objext conftest$ac_exeext
15973 if { (eval echo "$as_me:15973: \"$ac_link\"") >&5
15974   (eval $ac_link) 2>&5
15975   ac_status=$?
15976   echo "$as_me:15976: \$? = $ac_status" >&5
15977   (exit $ac_status); } &&
15978          { ac_try='test -s conftest$ac_exeext'
15979   { (eval echo "$as_me:15979: \"$ac_try\"") >&5
15980   (eval $ac_try) 2>&5
15981   ac_status=$?
15982   echo "$as_me:15982: \$? = $ac_status" >&5
15983   (exit $ac_status); }; }; then
15984   cf_cv_have___va_copy=yes
15985 else
15986   echo "$as_me: failed program was:" >&5
15987 cat conftest.$ac_ext >&5
15988 cf_cv_have___va_copy=no
15989 fi
15990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15991 fi
15992 echo "$as_me:15992: result: $cf_cv_have___va_copy" >&5
15993 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15994
15995 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15996 #define HAVE___VA_COPY 1
15997 EOF
15998
15999 echo "$as_me:15999: checking for pid_t" >&5
16000 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16001 if test "${ac_cv_type_pid_t+set}" = set; then
16002   echo $ECHO_N "(cached) $ECHO_C" >&6
16003 else
16004   cat >conftest.$ac_ext <<_ACEOF
16005 #line 16005 "configure"
16006 #include "confdefs.h"
16007 $ac_includes_default
16008 int
16009 main ()
16010 {
16011 if ((pid_t *) 0)
16012   return 0;
16013 if (sizeof (pid_t))
16014   return 0;
16015   ;
16016   return 0;
16017 }
16018 _ACEOF
16019 rm -f conftest.$ac_objext
16020 if { (eval echo "$as_me:16020: \"$ac_compile\"") >&5
16021   (eval $ac_compile) 2>&5
16022   ac_status=$?
16023   echo "$as_me:16023: \$? = $ac_status" >&5
16024   (exit $ac_status); } &&
16025          { ac_try='test -s conftest.$ac_objext'
16026   { (eval echo "$as_me:16026: \"$ac_try\"") >&5
16027   (eval $ac_try) 2>&5
16028   ac_status=$?
16029   echo "$as_me:16029: \$? = $ac_status" >&5
16030   (exit $ac_status); }; }; then
16031   ac_cv_type_pid_t=yes
16032 else
16033   echo "$as_me: failed program was:" >&5
16034 cat conftest.$ac_ext >&5
16035 ac_cv_type_pid_t=no
16036 fi
16037 rm -f conftest.$ac_objext conftest.$ac_ext
16038 fi
16039 echo "$as_me:16039: result: $ac_cv_type_pid_t" >&5
16040 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16041 if test $ac_cv_type_pid_t = yes; then
16042   :
16043 else
16044
16045 cat >>confdefs.h <<EOF
16046 #define pid_t int
16047 EOF
16048
16049 fi
16050
16051 for ac_header in unistd.h vfork.h
16052 do
16053 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16054 echo "$as_me:16054: checking for $ac_header" >&5
16055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16057   echo $ECHO_N "(cached) $ECHO_C" >&6
16058 else
16059   cat >conftest.$ac_ext <<_ACEOF
16060 #line 16060 "configure"
16061 #include "confdefs.h"
16062 #include <$ac_header>
16063 _ACEOF
16064 if { (eval echo "$as_me:16064: \"$ac_cpp conftest.$ac_ext\"") >&5
16065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16066   ac_status=$?
16067   egrep -v '^ *\+' conftest.er1 >conftest.err
16068   rm -f conftest.er1
16069   cat conftest.err >&5
16070   echo "$as_me:16070: \$? = $ac_status" >&5
16071   (exit $ac_status); } >/dev/null; then
16072   if test -s conftest.err; then
16073     ac_cpp_err=$ac_c_preproc_warn_flag
16074   else
16075     ac_cpp_err=
16076   fi
16077 else
16078   ac_cpp_err=yes
16079 fi
16080 if test -z "$ac_cpp_err"; then
16081   eval "$as_ac_Header=yes"
16082 else
16083   echo "$as_me: failed program was:" >&5
16084   cat conftest.$ac_ext >&5
16085   eval "$as_ac_Header=no"
16086 fi
16087 rm -f conftest.err conftest.$ac_ext
16088 fi
16089 echo "$as_me:16089: result: `eval echo '${'$as_ac_Header'}'`" >&5
16090 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16091 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16092   cat >>confdefs.h <<EOF
16093 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16094 EOF
16095
16096 fi
16097 done
16098
16099 for ac_func in fork vfork
16100 do
16101 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16102 echo "$as_me:16102: checking for $ac_func" >&5
16103 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16104 if eval "test \"\${$as_ac_var+set}\" = set"; then
16105   echo $ECHO_N "(cached) $ECHO_C" >&6
16106 else
16107   cat >conftest.$ac_ext <<_ACEOF
16108 #line 16108 "configure"
16109 #include "confdefs.h"
16110 /* System header to define __stub macros and hopefully few prototypes,
16111     which can conflict with char $ac_func (); below.  */
16112 #include <assert.h>
16113 /* Override any gcc2 internal prototype to avoid an error.  */
16114 #ifdef __cplusplus
16115 extern "C"
16116 #endif
16117 /* We use char because int might match the return type of a gcc2
16118    builtin and then its argument prototype would still apply.  */
16119 char $ac_func ();
16120 char (*f) ();
16121
16122 int
16123 main ()
16124 {
16125 /* The GNU C library defines this for functions which it implements
16126     to always fail with ENOSYS.  Some functions are actually named
16127     something starting with __ and the normal name is an alias.  */
16128 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16129 choke me
16130 #else
16131 f = $ac_func;
16132 #endif
16133
16134   ;
16135   return 0;
16136 }
16137 _ACEOF
16138 rm -f conftest.$ac_objext conftest$ac_exeext
16139 if { (eval echo "$as_me:16139: \"$ac_link\"") >&5
16140   (eval $ac_link) 2>&5
16141   ac_status=$?
16142   echo "$as_me:16142: \$? = $ac_status" >&5
16143   (exit $ac_status); } &&
16144          { ac_try='test -s conftest$ac_exeext'
16145   { (eval echo "$as_me:16145: \"$ac_try\"") >&5
16146   (eval $ac_try) 2>&5
16147   ac_status=$?
16148   echo "$as_me:16148: \$? = $ac_status" >&5
16149   (exit $ac_status); }; }; then
16150   eval "$as_ac_var=yes"
16151 else
16152   echo "$as_me: failed program was:" >&5
16153 cat conftest.$ac_ext >&5
16154 eval "$as_ac_var=no"
16155 fi
16156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16157 fi
16158 echo "$as_me:16158: result: `eval echo '${'$as_ac_var'}'`" >&5
16159 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16160 if test `eval echo '${'$as_ac_var'}'` = yes; then
16161   cat >>confdefs.h <<EOF
16162 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16163 EOF
16164
16165 fi
16166 done
16167
16168 ac_cv_func_fork_works=$ac_cv_func_fork
16169 if test "x$ac_cv_func_fork" = xyes; then
16170   echo "$as_me:16170: checking for working fork" >&5
16171 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16172 if test "${ac_cv_func_fork_works+set}" = set; then
16173   echo $ECHO_N "(cached) $ECHO_C" >&6
16174 else
16175   if test "$cross_compiling" = yes; then
16176   ac_cv_func_fork_works=cross
16177 else
16178   cat >conftest.$ac_ext <<_ACEOF
16179 /* By Rüdiger Kuhlmann. */
16180       #include <sys/types.h>
16181       #if HAVE_UNISTD_H
16182       # include <unistd.h>
16183       #endif
16184       /* Some systems only have a dummy stub for fork() */
16185       int main ()
16186       {
16187         if (fork() < 0)
16188           $ac_main_return (1);
16189         $ac_main_return (0);
16190       }
16191 _ACEOF
16192 rm -f conftest$ac_exeext
16193 if { (eval echo "$as_me:16193: \"$ac_link\"") >&5
16194   (eval $ac_link) 2>&5
16195   ac_status=$?
16196   echo "$as_me:16196: \$? = $ac_status" >&5
16197   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16198   { (eval echo "$as_me:16198: \"$ac_try\"") >&5
16199   (eval $ac_try) 2>&5
16200   ac_status=$?
16201   echo "$as_me:16201: \$? = $ac_status" >&5
16202   (exit $ac_status); }; }; then
16203   ac_cv_func_fork_works=yes
16204 else
16205   echo "$as_me: program exited with status $ac_status" >&5
16206 echo "$as_me: failed program was:" >&5
16207 cat conftest.$ac_ext >&5
16208 ac_cv_func_fork_works=no
16209 fi
16210 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16211 fi
16212 fi
16213 echo "$as_me:16213: result: $ac_cv_func_fork_works" >&5
16214 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16215
16216 fi
16217 if test "x$ac_cv_func_fork_works" = xcross; then
16218   case $host in
16219     *-*-amigaos* | *-*-msdosdjgpp*)
16220       # Override, as these systems have only a dummy fork() stub
16221       ac_cv_func_fork_works=no
16222       ;;
16223     *)
16224       ac_cv_func_fork_works=yes
16225       ;;
16226   esac
16227   { echo "$as_me:16227: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16228 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16229 fi
16230 ac_cv_func_vfork_works=$ac_cv_func_vfork
16231 if test "x$ac_cv_func_vfork" = xyes; then
16232   echo "$as_me:16232: checking for working vfork" >&5
16233 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16234 if test "${ac_cv_func_vfork_works+set}" = set; then
16235   echo $ECHO_N "(cached) $ECHO_C" >&6
16236 else
16237   if test "$cross_compiling" = yes; then
16238   ac_cv_func_vfork_works=cross
16239 else
16240   cat >conftest.$ac_ext <<_ACEOF
16241 #line 16241 "configure"
16242 #include "confdefs.h"
16243 /* Thanks to Paul Eggert for this test.  */
16244 #include <stdio.h>
16245 #include <sys/types.h>
16246 #include <sys/stat.h>
16247 #if HAVE_UNISTD_H
16248 # include <unistd.h>
16249 #endif
16250 #if HAVE_VFORK_H
16251 # include <vfork.h>
16252 #endif
16253 /* On some sparc systems, changes by the child to local and incoming
16254    argument registers are propagated back to the parent.  The compiler
16255    is told about this with #include <vfork.h>, but some compilers
16256    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16257    static variable whose address is put into a register that is
16258    clobbered by the vfork.  */
16259 static
16260 #ifdef __cplusplus
16261 sparc_address_test (int arg)
16262 # else
16263 sparc_address_test (arg) int arg;
16264 #endif
16265 {
16266   static pid_t child;
16267   if (!child) {
16268     child = vfork ();
16269     if (child < 0) {
16270       perror ("vfork");
16271       _exit(2);
16272     }
16273     if (!child) {
16274       arg = getpid();
16275       write(-1, "", 0);
16276       _exit (arg);
16277     }
16278   }
16279 }
16280
16281 int
16282 main ()
16283 {
16284   pid_t parent = getpid ();
16285   pid_t child;
16286
16287   sparc_address_test ();
16288
16289   child = vfork ();
16290
16291   if (child == 0) {
16292     /* Here is another test for sparc vfork register problems.  This
16293        test uses lots of local variables, at least as many local
16294        variables as main has allocated so far including compiler
16295        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16296        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16297        reuse the register of parent for one of the local variables,
16298        since it will think that parent can't possibly be used any more
16299        in this routine.  Assigning to the local variable will thus
16300        munge parent in the parent process.  */
16301     pid_t
16302       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16303       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16304     /* Convince the compiler that p..p7 are live; otherwise, it might
16305        use the same hardware register for all 8 local variables.  */
16306     if (p != p1 || p != p2 || p != p3 || p != p4
16307         || p != p5 || p != p6 || p != p7)
16308       _exit(1);
16309
16310     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16311        from child file descriptors.  If the child closes a descriptor
16312        before it execs or exits, this munges the parent's descriptor
16313        as well.  Test for this by closing stdout in the child.  */
16314     _exit(close(fileno(stdout)) != 0);
16315   } else {
16316     int status;
16317     struct stat st;
16318
16319     while (wait(&status) != child)
16320       ;
16321     $ac_main_return(
16322          /* Was there some problem with vforking?  */
16323          child < 0
16324
16325          /* Did the child fail?  (This shouldn't happen.)  */
16326          || status
16327
16328          /* Did the vfork/compiler bug occur?  */
16329          || parent != getpid()
16330
16331          /* Did the file descriptor bug occur?  */
16332          || fstat(fileno(stdout), &st) != 0
16333          );
16334   }
16335 }
16336 _ACEOF
16337 rm -f conftest$ac_exeext
16338 if { (eval echo "$as_me:16338: \"$ac_link\"") >&5
16339   (eval $ac_link) 2>&5
16340   ac_status=$?
16341   echo "$as_me:16341: \$? = $ac_status" >&5
16342   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16343   { (eval echo "$as_me:16343: \"$ac_try\"") >&5
16344   (eval $ac_try) 2>&5
16345   ac_status=$?
16346   echo "$as_me:16346: \$? = $ac_status" >&5
16347   (exit $ac_status); }; }; then
16348   ac_cv_func_vfork_works=yes
16349 else
16350   echo "$as_me: program exited with status $ac_status" >&5
16351 echo "$as_me: failed program was:" >&5
16352 cat conftest.$ac_ext >&5
16353 ac_cv_func_vfork_works=no
16354 fi
16355 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16356 fi
16357 fi
16358 echo "$as_me:16358: result: $ac_cv_func_vfork_works" >&5
16359 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16360
16361 fi;
16362 if test "x$ac_cv_func_fork_works" = xcross; then
16363   ac_cv_func_vfork_works=ac_cv_func_vfork
16364   { echo "$as_me:16364: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16365 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16366 fi
16367
16368 if test "x$ac_cv_func_vfork_works" = xyes; then
16369
16370 cat >>confdefs.h <<\EOF
16371 #define HAVE_WORKING_VFORK 1
16372 EOF
16373
16374 else
16375
16376 cat >>confdefs.h <<\EOF
16377 #define vfork fork
16378 EOF
16379
16380 fi
16381 if test "x$ac_cv_func_fork_works" = xyes; then
16382
16383 cat >>confdefs.h <<\EOF
16384 #define HAVE_WORKING_FORK 1
16385 EOF
16386
16387 fi
16388
16389 # special check for test/ditto.c
16390
16391 echo "$as_me:16391: checking for openpty in -lutil" >&5
16392 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16393 if test "${ac_cv_lib_util_openpty+set}" = set; then
16394   echo $ECHO_N "(cached) $ECHO_C" >&6
16395 else
16396   ac_check_lib_save_LIBS=$LIBS
16397 LIBS="-lutil  $LIBS"
16398 cat >conftest.$ac_ext <<_ACEOF
16399 #line 16399 "configure"
16400 #include "confdefs.h"
16401
16402 /* Override any gcc2 internal prototype to avoid an error.  */
16403 #ifdef __cplusplus
16404 extern "C"
16405 #endif
16406 /* We use char because int might match the return type of a gcc2
16407    builtin and then its argument prototype would still apply.  */
16408 char openpty ();
16409 int
16410 main ()
16411 {
16412 openpty ();
16413   ;
16414   return 0;
16415 }
16416 _ACEOF
16417 rm -f conftest.$ac_objext conftest$ac_exeext
16418 if { (eval echo "$as_me:16418: \"$ac_link\"") >&5
16419   (eval $ac_link) 2>&5
16420   ac_status=$?
16421   echo "$as_me:16421: \$? = $ac_status" >&5
16422   (exit $ac_status); } &&
16423          { ac_try='test -s conftest$ac_exeext'
16424   { (eval echo "$as_me:16424: \"$ac_try\"") >&5
16425   (eval $ac_try) 2>&5
16426   ac_status=$?
16427   echo "$as_me:16427: \$? = $ac_status" >&5
16428   (exit $ac_status); }; }; then
16429   ac_cv_lib_util_openpty=yes
16430 else
16431   echo "$as_me: failed program was:" >&5
16432 cat conftest.$ac_ext >&5
16433 ac_cv_lib_util_openpty=no
16434 fi
16435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16436 LIBS=$ac_check_lib_save_LIBS
16437 fi
16438 echo "$as_me:16438: result: $ac_cv_lib_util_openpty" >&5
16439 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16440 if test $ac_cv_lib_util_openpty = yes; then
16441   cf_cv_lib_util=yes
16442 else
16443   cf_cv_lib_util=no
16444 fi
16445
16446 echo "$as_me:16446: checking for openpty header" >&5
16447 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16448 if test "${cf_cv_func_openpty+set}" = set; then
16449   echo $ECHO_N "(cached) $ECHO_C" >&6
16450 else
16451
16452     cf_save_LIBS="$LIBS"
16453     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16454     for cf_header in pty.h libutil.h util.h
16455     do
16456     cat >conftest.$ac_ext <<_ACEOF
16457 #line 16457 "configure"
16458 #include "confdefs.h"
16459
16460 #include <$cf_header>
16461
16462 int
16463 main ()
16464 {
16465
16466     int x = openpty((int *)0, (int *)0, (char *)0,
16467                    (struct termios *)0, (struct winsize *)0);
16468
16469   ;
16470   return 0;
16471 }
16472 _ACEOF
16473 rm -f conftest.$ac_objext conftest$ac_exeext
16474 if { (eval echo "$as_me:16474: \"$ac_link\"") >&5
16475   (eval $ac_link) 2>&5
16476   ac_status=$?
16477   echo "$as_me:16477: \$? = $ac_status" >&5
16478   (exit $ac_status); } &&
16479          { ac_try='test -s conftest$ac_exeext'
16480   { (eval echo "$as_me:16480: \"$ac_try\"") >&5
16481   (eval $ac_try) 2>&5
16482   ac_status=$?
16483   echo "$as_me:16483: \$? = $ac_status" >&5
16484   (exit $ac_status); }; }; then
16485
16486         cf_cv_func_openpty=$cf_header
16487         break
16488
16489 else
16490   echo "$as_me: failed program was:" >&5
16491 cat conftest.$ac_ext >&5
16492
16493         cf_cv_func_openpty=no
16494
16495 fi
16496 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16497     done
16498     LIBS="$cf_save_LIBS"
16499
16500 fi
16501 echo "$as_me:16501: result: $cf_cv_func_openpty" >&5
16502 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16503
16504 if test "$cf_cv_func_openpty" != no ; then
16505     cat >>confdefs.h <<EOF
16506 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16507 EOF
16508
16509     cat >>confdefs.h <<\EOF
16510 #define USE_XTERM_PTY 1
16511 EOF
16512
16513     if test "$cf_cv_lib_util" = yes ; then
16514         TEST_LIBS="-lutil $TEST_LIBS"
16515     fi
16516 fi
16517
16518 if test "$with_hashed_db" != no ; then
16519         cat >>confdefs.h <<\EOF
16520 #define USE_HASHED_DB 1
16521 EOF
16522
16523 case $with_hashed_db in #(vi
16524 yes|*able*) #(vi
16525     ;;
16526 *)
16527     if test -d "$with_hashed_db" ; then
16528
16529 if test -n "$with_hashed_db/include" ; then
16530   for cf_add_incdir in $with_hashed_db/include
16531   do
16532         while test $cf_add_incdir != /usr/include
16533         do
16534           if test -d $cf_add_incdir
16535           then
16536                 cf_have_incdir=no
16537                 if test -n "$CFLAGS$CPPFLAGS" ; then
16538                   # a loop is needed to ensure we can add subdirs of existing dirs
16539                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16540                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16541                           cf_have_incdir=yes; break
16542                         fi
16543                   done
16544                 fi
16545
16546                 if test "$cf_have_incdir" = no ; then
16547                   if test "$cf_add_incdir" = /usr/local/include ; then
16548                         if test "$GCC" = yes
16549                         then
16550                           cf_save_CPPFLAGS=$CPPFLAGS
16551                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16552                           cat >conftest.$ac_ext <<_ACEOF
16553 #line 16553 "configure"
16554 #include "confdefs.h"
16555 #include <stdio.h>
16556 int
16557 main ()
16558 {
16559 printf("Hello")
16560   ;
16561   return 0;
16562 }
16563 _ACEOF
16564 rm -f conftest.$ac_objext
16565 if { (eval echo "$as_me:16565: \"$ac_compile\"") >&5
16566   (eval $ac_compile) 2>&5
16567   ac_status=$?
16568   echo "$as_me:16568: \$? = $ac_status" >&5
16569   (exit $ac_status); } &&
16570          { ac_try='test -s conftest.$ac_objext'
16571   { (eval echo "$as_me:16571: \"$ac_try\"") >&5
16572   (eval $ac_try) 2>&5
16573   ac_status=$?
16574   echo "$as_me:16574: \$? = $ac_status" >&5
16575   (exit $ac_status); }; }; then
16576   :
16577 else
16578   echo "$as_me: failed program was:" >&5
16579 cat conftest.$ac_ext >&5
16580 cf_have_incdir=yes
16581 fi
16582 rm -f conftest.$ac_objext conftest.$ac_ext
16583                           CPPFLAGS=$cf_save_CPPFLAGS
16584                         fi
16585                   fi
16586                 fi
16587
16588                 if test "$cf_have_incdir" = no ; then
16589                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16590
16591 echo "${as_me:-configure}:16591: testing adding $cf_add_incdir to include-path ..." 1>&5
16592
16593                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16594
16595                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16596                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16597                   cf_add_incdir="$cf_top_incdir"
16598                 else
16599                   break
16600                 fi
16601           fi
16602         done
16603   done
16604 fi
16605
16606 if test -n "$with_hashed_db/lib" ; then
16607   for cf_add_libdir in $with_hashed_db/lib
16608   do
16609     if test $cf_add_libdir = /usr/lib ; then
16610       :
16611     elif test -d $cf_add_libdir
16612     then
16613       cf_have_libdir=no
16614       if test -n "$LDFLAGS$LIBS" ; then
16615         # a loop is needed to ensure we can add subdirs of existing dirs
16616         for cf_test_libdir in $LDFLAGS $LIBS ; do
16617           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16618             cf_have_libdir=yes; break
16619           fi
16620         done
16621       fi
16622       if test "$cf_have_libdir" = no ; then
16623         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16624
16625 echo "${as_me:-configure}:16625: testing adding $cf_add_libdir to library-path ..." 1>&5
16626
16627         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16628       fi
16629     fi
16630   done
16631 fi
16632
16633     fi
16634 esac
16635
16636 echo "$as_me:16636: checking for db.h" >&5
16637 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16638 if test "${ac_cv_header_db_h+set}" = set; then
16639   echo $ECHO_N "(cached) $ECHO_C" >&6
16640 else
16641   cat >conftest.$ac_ext <<_ACEOF
16642 #line 16642 "configure"
16643 #include "confdefs.h"
16644 #include <db.h>
16645 _ACEOF
16646 if { (eval echo "$as_me:16646: \"$ac_cpp conftest.$ac_ext\"") >&5
16647   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16648   ac_status=$?
16649   egrep -v '^ *\+' conftest.er1 >conftest.err
16650   rm -f conftest.er1
16651   cat conftest.err >&5
16652   echo "$as_me:16652: \$? = $ac_status" >&5
16653   (exit $ac_status); } >/dev/null; then
16654   if test -s conftest.err; then
16655     ac_cpp_err=$ac_c_preproc_warn_flag
16656   else
16657     ac_cpp_err=
16658   fi
16659 else
16660   ac_cpp_err=yes
16661 fi
16662 if test -z "$ac_cpp_err"; then
16663   ac_cv_header_db_h=yes
16664 else
16665   echo "$as_me: failed program was:" >&5
16666   cat conftest.$ac_ext >&5
16667   ac_cv_header_db_h=no
16668 fi
16669 rm -f conftest.err conftest.$ac_ext
16670 fi
16671 echo "$as_me:16671: result: $ac_cv_header_db_h" >&5
16672 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16673 if test $ac_cv_header_db_h = yes; then
16674
16675 echo "$as_me:16675: checking for version of db" >&5
16676 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16677 if test "${cf_cv_hashed_db_version+set}" = set; then
16678   echo $ECHO_N "(cached) $ECHO_C" >&6
16679 else
16680
16681 cf_cv_hashed_db_version=unknown
16682
16683 for cf_db_version in 1 2 3 4 5
16684 do
16685
16686 echo "${as_me:-configure}:16686: testing checking for db version $cf_db_version ..." 1>&5
16687
16688         cat >conftest.$ac_ext <<_ACEOF
16689 #line 16689 "configure"
16690 #include "confdefs.h"
16691
16692 $ac_includes_default
16693 #include <db.h>
16694
16695 #ifdef DB_VERSION_MAJOR
16696         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16697 #if $cf_db_version == DB_VERSION_MAJOR
16698         /* ok */
16699 #else
16700         make an error
16701 #endif
16702 #else
16703 #if $cf_db_version == 1
16704         /* ok: assuming this is DB 1.8.5 */
16705 #else
16706         make an error
16707 #endif
16708 #endif
16709
16710 int
16711 main ()
16712 {
16713 DBT *foo = 0
16714   ;
16715   return 0;
16716 }
16717 _ACEOF
16718 rm -f conftest.$ac_objext
16719 if { (eval echo "$as_me:16719: \"$ac_compile\"") >&5
16720   (eval $ac_compile) 2>&5
16721   ac_status=$?
16722   echo "$as_me:16722: \$? = $ac_status" >&5
16723   (exit $ac_status); } &&
16724          { ac_try='test -s conftest.$ac_objext'
16725   { (eval echo "$as_me:16725: \"$ac_try\"") >&5
16726   (eval $ac_try) 2>&5
16727   ac_status=$?
16728   echo "$as_me:16728: \$? = $ac_status" >&5
16729   (exit $ac_status); }; }; then
16730
16731         cf_cv_hashed_db_version=$cf_db_version
16732         break
16733
16734 else
16735   echo "$as_me: failed program was:" >&5
16736 cat conftest.$ac_ext >&5
16737 fi
16738 rm -f conftest.$ac_objext conftest.$ac_ext
16739 done
16740
16741 fi
16742 echo "$as_me:16742: result: $cf_cv_hashed_db_version" >&5
16743 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16744
16745 if test "$cf_cv_hashed_db_version" = unknown ; then
16746         { { echo "$as_me:16746: error: Cannot determine version of db" >&5
16747 echo "$as_me: error: Cannot determine version of db" >&2;}
16748    { (exit 1); exit 1; }; }
16749 else
16750
16751 echo "$as_me:16751: checking for db libraries" >&5
16752 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16753 if test "${cf_cv_hashed_db_libs+set}" = set; then
16754   echo $ECHO_N "(cached) $ECHO_C" >&6
16755 else
16756
16757 cf_cv_hashed_db_libs=unknown
16758 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16759 do
16760         cf_save_libs="$LIBS"
16761         if test -n "$cf_db_libs"; then
16762                 LIBS="-l$cf_db_libs $LIBS"
16763         fi
16764
16765 echo "${as_me:-configure}:16765: testing checking for library "$cf_db_libs" ..." 1>&5
16766
16767         cat >conftest.$ac_ext <<_ACEOF
16768 #line 16768 "configure"
16769 #include "confdefs.h"
16770
16771 $ac_includes_default
16772 #include <db.h>
16773
16774 int
16775 main ()
16776 {
16777
16778         char *path = "/tmp/foo";
16779 #ifdef DB_VERSION_MAJOR
16780 #if DB_VERSION_MAJOR >= 4
16781         DB *result = 0;
16782         db_create(&result, NULL, 0);
16783         result->open(result,
16784                 NULL,
16785                 path,
16786                 path,
16787                 DB_HASH,
16788                 DB_CREATE,
16789                 0644);
16790 #elif DB_VERSION_MAJOR >= 3
16791         DB *result = 0;
16792         db_create(&result, NULL, 0);
16793         result->open(result,
16794                 path,
16795                 path,
16796                 DB_HASH,
16797                 DB_CREATE,
16798                 0644);
16799 #elif DB_VERSION_MAJOR >= 2
16800         DB *result = 0;
16801         db_open(path,
16802                 DB_HASH,
16803                 DB_CREATE,
16804                 0644,
16805                 (DB_ENV *) 0,
16806                 (DB_INFO *) 0,
16807                 &result);
16808 #endif /* DB_VERSION_MAJOR */
16809 #else
16810         DB *result = dbopen(path,
16811                      2,
16812                      0644,
16813                      DB_HASH,
16814                      0);
16815 #endif
16816         ${cf_cv_main_return:-return}(result != 0)
16817
16818   ;
16819   return 0;
16820 }
16821 _ACEOF
16822 rm -f conftest.$ac_objext conftest$ac_exeext
16823 if { (eval echo "$as_me:16823: \"$ac_link\"") >&5
16824   (eval $ac_link) 2>&5
16825   ac_status=$?
16826   echo "$as_me:16826: \$? = $ac_status" >&5
16827   (exit $ac_status); } &&
16828          { ac_try='test -s conftest$ac_exeext'
16829   { (eval echo "$as_me:16829: \"$ac_try\"") >&5
16830   (eval $ac_try) 2>&5
16831   ac_status=$?
16832   echo "$as_me:16832: \$? = $ac_status" >&5
16833   (exit $ac_status); }; }; then
16834
16835         if test -n "$cf_db_libs" ; then
16836                 cf_cv_hashed_db_libs=$cf_db_libs
16837         else
16838                 cf_cv_hashed_db_libs=default
16839         fi
16840         LIBS="$cf_save_libs"
16841         break
16842
16843 else
16844   echo "$as_me: failed program was:" >&5
16845 cat conftest.$ac_ext >&5
16846 fi
16847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16848         LIBS="$cf_save_libs"
16849 done
16850
16851 fi
16852 echo "$as_me:16852: result: $cf_cv_hashed_db_libs" >&5
16853 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16854
16855         if test "$cf_cv_hashed_db_libs" = unknown ; then
16856                 { { echo "$as_me:16856: error: Cannot determine library for db" >&5
16857 echo "$as_me: error: Cannot determine library for db" >&2;}
16858    { (exit 1); exit 1; }; }
16859         elif test "$cf_cv_hashed_db_libs" != default ; then
16860                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16861         fi
16862 fi
16863
16864 else
16865
16866         { { echo "$as_me:16866: error: Cannot find db.h" >&5
16867 echo "$as_me: error: Cannot find db.h" >&2;}
16868    { (exit 1); exit 1; }; }
16869
16870 fi
16871
16872 fi
16873
16874 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16875         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16876         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16877 fi
16878
16879 # Just in case, check if the C compiler has a bool type.
16880
16881 echo "$as_me:16881: checking if we should include stdbool.h" >&5
16882 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16883
16884 if test "${cf_cv_header_stdbool_h+set}" = set; then
16885   echo $ECHO_N "(cached) $ECHO_C" >&6
16886 else
16887
16888         cat >conftest.$ac_ext <<_ACEOF
16889 #line 16889 "configure"
16890 #include "confdefs.h"
16891
16892 int
16893 main ()
16894 {
16895 bool foo = false
16896   ;
16897   return 0;
16898 }
16899 _ACEOF
16900 rm -f conftest.$ac_objext
16901 if { (eval echo "$as_me:16901: \"$ac_compile\"") >&5
16902   (eval $ac_compile) 2>&5
16903   ac_status=$?
16904   echo "$as_me:16904: \$? = $ac_status" >&5
16905   (exit $ac_status); } &&
16906          { ac_try='test -s conftest.$ac_objext'
16907   { (eval echo "$as_me:16907: \"$ac_try\"") >&5
16908   (eval $ac_try) 2>&5
16909   ac_status=$?
16910   echo "$as_me:16910: \$? = $ac_status" >&5
16911   (exit $ac_status); }; }; then
16912   cf_cv_header_stdbool_h=0
16913 else
16914   echo "$as_me: failed program was:" >&5
16915 cat conftest.$ac_ext >&5
16916 cat >conftest.$ac_ext <<_ACEOF
16917 #line 16917 "configure"
16918 #include "confdefs.h"
16919
16920 #ifndef __BEOS__
16921 #include <stdbool.h>
16922 #endif
16923
16924 int
16925 main ()
16926 {
16927 bool foo = false
16928   ;
16929   return 0;
16930 }
16931 _ACEOF
16932 rm -f conftest.$ac_objext
16933 if { (eval echo "$as_me:16933: \"$ac_compile\"") >&5
16934   (eval $ac_compile) 2>&5
16935   ac_status=$?
16936   echo "$as_me:16936: \$? = $ac_status" >&5
16937   (exit $ac_status); } &&
16938          { ac_try='test -s conftest.$ac_objext'
16939   { (eval echo "$as_me:16939: \"$ac_try\"") >&5
16940   (eval $ac_try) 2>&5
16941   ac_status=$?
16942   echo "$as_me:16942: \$? = $ac_status" >&5
16943   (exit $ac_status); }; }; then
16944   cf_cv_header_stdbool_h=1
16945 else
16946   echo "$as_me: failed program was:" >&5
16947 cat conftest.$ac_ext >&5
16948 cf_cv_header_stdbool_h=0
16949 fi
16950 rm -f conftest.$ac_objext conftest.$ac_ext
16951 fi
16952 rm -f conftest.$ac_objext conftest.$ac_ext
16953 fi
16954
16955 if test "$cf_cv_header_stdbool_h" = 1
16956 then    echo "$as_me:16956: result: yes" >&5
16957 echo "${ECHO_T}yes" >&6
16958 else    echo "$as_me:16958: result: no" >&5
16959 echo "${ECHO_T}no" >&6
16960 fi
16961
16962 echo "$as_me:16962: checking for builtin bool type" >&5
16963 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16964
16965 if test "${cf_cv_cc_bool_type+set}" = set; then
16966   echo $ECHO_N "(cached) $ECHO_C" >&6
16967 else
16968
16969         cat >conftest.$ac_ext <<_ACEOF
16970 #line 16970 "configure"
16971 #include "confdefs.h"
16972
16973 #include <stdio.h>
16974 #include <sys/types.h>
16975
16976 int
16977 main ()
16978 {
16979 bool x = false
16980   ;
16981   return 0;
16982 }
16983 _ACEOF
16984 rm -f conftest.$ac_objext
16985 if { (eval echo "$as_me:16985: \"$ac_compile\"") >&5
16986   (eval $ac_compile) 2>&5
16987   ac_status=$?
16988   echo "$as_me:16988: \$? = $ac_status" >&5
16989   (exit $ac_status); } &&
16990          { ac_try='test -s conftest.$ac_objext'
16991   { (eval echo "$as_me:16991: \"$ac_try\"") >&5
16992   (eval $ac_try) 2>&5
16993   ac_status=$?
16994   echo "$as_me:16994: \$? = $ac_status" >&5
16995   (exit $ac_status); }; }; then
16996   cf_cv_cc_bool_type=1
16997 else
16998   echo "$as_me: failed program was:" >&5
16999 cat conftest.$ac_ext >&5
17000 cf_cv_cc_bool_type=0
17001 fi
17002 rm -f conftest.$ac_objext conftest.$ac_ext
17003
17004 fi
17005
17006 if test "$cf_cv_cc_bool_type" = 1
17007 then    echo "$as_me:17007: result: yes" >&5
17008 echo "${ECHO_T}yes" >&6
17009 else    echo "$as_me:17009: result: no" >&5
17010 echo "${ECHO_T}no" >&6
17011 fi
17012
17013 # Check for C++ compiler characteristics (and ensure that it's there!)
17014 if test -n "$CXX" ; then
17015         ac_ext=cc
17016 ac_cpp='$CXXCPP $CPPFLAGS'
17017 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17018 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17019 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17020 ac_main_return=return
17021
17022 if test -n "$GXX" ; then
17023 case $cf_cv_system_name in #(vi
17024 os2*) #(vi
17025         cf_stdcpp_libname=stdcpp
17026         ;;
17027 *)
17028         cf_stdcpp_libname=stdc++
17029         ;;
17030 esac
17031 echo "$as_me:17031: checking for library $cf_stdcpp_libname" >&5
17032 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17033 if test "${cf_cv_libstdcpp+set}" = set; then
17034   echo $ECHO_N "(cached) $ECHO_C" >&6
17035 else
17036
17037         cf_save="$LIBS"
17038         LIBS="-l$cf_stdcpp_libname $LIBS"
17039 cat >conftest.$ac_ext <<_ACEOF
17040 #line 17040 "configure"
17041 #include "confdefs.h"
17042
17043 #include <strstream.h>
17044 int
17045 main ()
17046 {
17047
17048 char buf[80];
17049 strstreambuf foo(buf, sizeof(buf))
17050
17051   ;
17052   return 0;
17053 }
17054 _ACEOF
17055 rm -f conftest.$ac_objext conftest$ac_exeext
17056 if { (eval echo "$as_me:17056: \"$ac_link\"") >&5
17057   (eval $ac_link) 2>&5
17058   ac_status=$?
17059   echo "$as_me:17059: \$? = $ac_status" >&5
17060   (exit $ac_status); } &&
17061          { ac_try='test -s conftest$ac_exeext'
17062   { (eval echo "$as_me:17062: \"$ac_try\"") >&5
17063   (eval $ac_try) 2>&5
17064   ac_status=$?
17065   echo "$as_me:17065: \$? = $ac_status" >&5
17066   (exit $ac_status); }; }; then
17067   cf_cv_libstdcpp=yes
17068 else
17069   echo "$as_me: failed program was:" >&5
17070 cat conftest.$ac_ext >&5
17071 cf_cv_libstdcpp=no
17072 fi
17073 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17074         LIBS="$cf_save"
17075
17076 fi
17077 echo "$as_me:17077: result: $cf_cv_libstdcpp" >&5
17078 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17079 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17080 fi
17081
17082         echo "$as_me:17082: checking whether $CXX understands -c and -o together" >&5
17083 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17084 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17085   echo $ECHO_N "(cached) $ECHO_C" >&6
17086 else
17087
17088 cat > conftest.$ac_ext <<CF_EOF
17089 #include <stdio.h>
17090 int main()
17091 {
17092         ${cf_cv_main_return:-return}(0);
17093 }
17094 CF_EOF
17095 # We do the test twice because some compilers refuse to overwrite an
17096 # existing .o file with -o, though they will create one.
17097 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17098 if { (eval echo "$as_me:17098: \"$ac_try\"") >&5
17099   (eval $ac_try) 2>&5
17100   ac_status=$?
17101   echo "$as_me:17101: \$? = $ac_status" >&5
17102   (exit $ac_status); } &&
17103   test -f conftest2.$ac_objext && { (eval echo "$as_me:17103: \"$ac_try\"") >&5
17104   (eval $ac_try) 2>&5
17105   ac_status=$?
17106   echo "$as_me:17106: \$? = $ac_status" >&5
17107   (exit $ac_status); };
17108 then
17109   eval cf_cv_prog_CXX_c_o=yes
17110 else
17111   eval cf_cv_prog_CXX_c_o=no
17112 fi
17113 rm -rf conftest*
17114
17115 fi
17116 if test $cf_cv_prog_CXX_c_o = yes; then
17117   echo "$as_me:17117: result: yes" >&5
17118 echo "${ECHO_T}yes" >&6
17119 else
17120   echo "$as_me:17120: result: no" >&5
17121 echo "${ECHO_T}no" >&6
17122 fi
17123
17124         case $GXX_VERSION in
17125         1*|2.0-6*)
17126                 cf_cxx_library=yes
17127                 ;;
17128         *-2.7*|2.7*)
17129
17130 cf_cxx_library=unknown
17131 case $cf_cv_system_name in #(vi
17132 os2*) #(vi
17133         cf_gpp_libname=gpp
17134         ;;
17135 *)
17136         cf_gpp_libname=g++
17137         ;;
17138 esac
17139 if test "$GXX" = yes; then
17140         echo "$as_me:17140: checking for lib$cf_gpp_libname" >&5
17141 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17142         cf_save="$LIBS"
17143         LIBS="-l$cf_gpp_libname $LIBS"
17144         cat >conftest.$ac_ext <<_ACEOF
17145 #line 17145 "configure"
17146 #include "confdefs.h"
17147
17148 #include <$cf_gpp_libname/builtin.h>
17149
17150 int
17151 main ()
17152 {
17153 two_arg_error_handler_t foo2 = lib_error_handler
17154   ;
17155   return 0;
17156 }
17157 _ACEOF
17158 rm -f conftest.$ac_objext conftest$ac_exeext
17159 if { (eval echo "$as_me:17159: \"$ac_link\"") >&5
17160   (eval $ac_link) 2>&5
17161   ac_status=$?
17162   echo "$as_me:17162: \$? = $ac_status" >&5
17163   (exit $ac_status); } &&
17164          { ac_try='test -s conftest$ac_exeext'
17165   { (eval echo "$as_me:17165: \"$ac_try\"") >&5
17166   (eval $ac_try) 2>&5
17167   ac_status=$?
17168   echo "$as_me:17168: \$? = $ac_status" >&5
17169   (exit $ac_status); }; }; then
17170   cf_cxx_library=yes
17171          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17172          if test "$cf_gpp_libname" = cpp ; then
17173             cat >>confdefs.h <<\EOF
17174 #define HAVE_GPP_BUILTIN_H 1
17175 EOF
17176
17177          else
17178             cat >>confdefs.h <<\EOF
17179 #define HAVE_GXX_BUILTIN_H 1
17180 EOF
17181
17182          fi
17183 else
17184   echo "$as_me: failed program was:" >&5
17185 cat conftest.$ac_ext >&5
17186 cat >conftest.$ac_ext <<_ACEOF
17187 #line 17187 "configure"
17188 #include "confdefs.h"
17189
17190 #include <builtin.h>
17191
17192 int
17193 main ()
17194 {
17195 two_arg_error_handler_t foo2 = lib_error_handler
17196   ;
17197   return 0;
17198 }
17199 _ACEOF
17200 rm -f conftest.$ac_objext conftest$ac_exeext
17201 if { (eval echo "$as_me:17201: \"$ac_link\"") >&5
17202   (eval $ac_link) 2>&5
17203   ac_status=$?
17204   echo "$as_me:17204: \$? = $ac_status" >&5
17205   (exit $ac_status); } &&
17206          { ac_try='test -s conftest$ac_exeext'
17207   { (eval echo "$as_me:17207: \"$ac_try\"") >&5
17208   (eval $ac_try) 2>&5
17209   ac_status=$?
17210   echo "$as_me:17210: \$? = $ac_status" >&5
17211   (exit $ac_status); }; }; then
17212   cf_cxx_library=yes
17213          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17214          cat >>confdefs.h <<\EOF
17215 #define HAVE_BUILTIN_H 1
17216 EOF
17217
17218 else
17219   echo "$as_me: failed program was:" >&5
17220 cat conftest.$ac_ext >&5
17221 cf_cxx_library=no
17222 fi
17223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17224 fi
17225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17226         LIBS="$cf_save"
17227         echo "$as_me:17227: result: $cf_cxx_library" >&5
17228 echo "${ECHO_T}$cf_cxx_library" >&6
17229 fi
17230
17231                 ;;
17232         *)
17233                 cf_cxx_library=no
17234                 ;;
17235         esac
17236
17237         ac_ext=cc
17238 ac_cpp='$CXXCPP $CPPFLAGS'
17239 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17240 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17241 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17242 ac_main_return=return
17243 echo "$as_me:17243: checking how to run the C++ preprocessor" >&5
17244 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17245 if test -z "$CXXCPP"; then
17246   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17247   echo $ECHO_N "(cached) $ECHO_C" >&6
17248 else
17249       # Double quotes because CXXCPP needs to be expanded
17250     for CXXCPP in "$CXX -E" "/lib/cpp"
17251     do
17252       ac_preproc_ok=false
17253 for ac_cxx_preproc_warn_flag in '' yes
17254 do
17255   # Use a header file that comes with gcc, so configuring glibc
17256   # with a fresh cross-compiler works.
17257   # On the NeXT, cc -E runs the code through the compiler's parser,
17258   # not just through cpp. "Syntax error" is here to catch this case.
17259   cat >conftest.$ac_ext <<_ACEOF
17260 #line 17260 "configure"
17261 #include "confdefs.h"
17262 #include <assert.h>
17263                      Syntax error
17264 _ACEOF
17265 if { (eval echo "$as_me:17265: \"$ac_cpp conftest.$ac_ext\"") >&5
17266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17267   ac_status=$?
17268   egrep -v '^ *\+' conftest.er1 >conftest.err
17269   rm -f conftest.er1
17270   cat conftest.err >&5
17271   echo "$as_me:17271: \$? = $ac_status" >&5
17272   (exit $ac_status); } >/dev/null; then
17273   if test -s conftest.err; then
17274     ac_cpp_err=$ac_cxx_preproc_warn_flag
17275   else
17276     ac_cpp_err=
17277   fi
17278 else
17279   ac_cpp_err=yes
17280 fi
17281 if test -z "$ac_cpp_err"; then
17282   :
17283 else
17284   echo "$as_me: failed program was:" >&5
17285   cat conftest.$ac_ext >&5
17286   # Broken: fails on valid input.
17287 continue
17288 fi
17289 rm -f conftest.err conftest.$ac_ext
17290
17291   # OK, works on sane cases.  Now check whether non-existent headers
17292   # can be detected and how.
17293   cat >conftest.$ac_ext <<_ACEOF
17294 #line 17294 "configure"
17295 #include "confdefs.h"
17296 #include <ac_nonexistent.h>
17297 _ACEOF
17298 if { (eval echo "$as_me:17298: \"$ac_cpp conftest.$ac_ext\"") >&5
17299   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17300   ac_status=$?
17301   egrep -v '^ *\+' conftest.er1 >conftest.err
17302   rm -f conftest.er1
17303   cat conftest.err >&5
17304   echo "$as_me:17304: \$? = $ac_status" >&5
17305   (exit $ac_status); } >/dev/null; then
17306   if test -s conftest.err; then
17307     ac_cpp_err=$ac_cxx_preproc_warn_flag
17308   else
17309     ac_cpp_err=
17310   fi
17311 else
17312   ac_cpp_err=yes
17313 fi
17314 if test -z "$ac_cpp_err"; then
17315   # Broken: success on invalid input.
17316 continue
17317 else
17318   echo "$as_me: failed program was:" >&5
17319   cat conftest.$ac_ext >&5
17320   # Passes both tests.
17321 ac_preproc_ok=:
17322 break
17323 fi
17324 rm -f conftest.err conftest.$ac_ext
17325
17326 done
17327 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17328 rm -f conftest.err conftest.$ac_ext
17329 if $ac_preproc_ok; then
17330   break
17331 fi
17332
17333     done
17334     ac_cv_prog_CXXCPP=$CXXCPP
17335
17336 fi
17337   CXXCPP=$ac_cv_prog_CXXCPP
17338 else
17339   ac_cv_prog_CXXCPP=$CXXCPP
17340 fi
17341 echo "$as_me:17341: result: $CXXCPP" >&5
17342 echo "${ECHO_T}$CXXCPP" >&6
17343 ac_preproc_ok=false
17344 for ac_cxx_preproc_warn_flag in '' yes
17345 do
17346   # Use a header file that comes with gcc, so configuring glibc
17347   # with a fresh cross-compiler works.
17348   # On the NeXT, cc -E runs the code through the compiler's parser,
17349   # not just through cpp. "Syntax error" is here to catch this case.
17350   cat >conftest.$ac_ext <<_ACEOF
17351 #line 17351 "configure"
17352 #include "confdefs.h"
17353 #include <assert.h>
17354                      Syntax error
17355 _ACEOF
17356 if { (eval echo "$as_me:17356: \"$ac_cpp conftest.$ac_ext\"") >&5
17357   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17358   ac_status=$?
17359   egrep -v '^ *\+' conftest.er1 >conftest.err
17360   rm -f conftest.er1
17361   cat conftest.err >&5
17362   echo "$as_me:17362: \$? = $ac_status" >&5
17363   (exit $ac_status); } >/dev/null; then
17364   if test -s conftest.err; then
17365     ac_cpp_err=$ac_cxx_preproc_warn_flag
17366   else
17367     ac_cpp_err=
17368   fi
17369 else
17370   ac_cpp_err=yes
17371 fi
17372 if test -z "$ac_cpp_err"; then
17373   :
17374 else
17375   echo "$as_me: failed program was:" >&5
17376   cat conftest.$ac_ext >&5
17377   # Broken: fails on valid input.
17378 continue
17379 fi
17380 rm -f conftest.err conftest.$ac_ext
17381
17382   # OK, works on sane cases.  Now check whether non-existent headers
17383   # can be detected and how.
17384   cat >conftest.$ac_ext <<_ACEOF
17385 #line 17385 "configure"
17386 #include "confdefs.h"
17387 #include <ac_nonexistent.h>
17388 _ACEOF
17389 if { (eval echo "$as_me:17389: \"$ac_cpp conftest.$ac_ext\"") >&5
17390   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17391   ac_status=$?
17392   egrep -v '^ *\+' conftest.er1 >conftest.err
17393   rm -f conftest.er1
17394   cat conftest.err >&5
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit $ac_status); } >/dev/null; then
17397   if test -s conftest.err; then
17398     ac_cpp_err=$ac_cxx_preproc_warn_flag
17399   else
17400     ac_cpp_err=
17401   fi
17402 else
17403   ac_cpp_err=yes
17404 fi
17405 if test -z "$ac_cpp_err"; then
17406   # Broken: success on invalid input.
17407 continue
17408 else
17409   echo "$as_me: failed program was:" >&5
17410   cat conftest.$ac_ext >&5
17411   # Passes both tests.
17412 ac_preproc_ok=:
17413 break
17414 fi
17415 rm -f conftest.err conftest.$ac_ext
17416
17417 done
17418 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17419 rm -f conftest.err conftest.$ac_ext
17420 if $ac_preproc_ok; then
17421   :
17422 else
17423   { { echo "$as_me:17423: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17424 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17425    { (exit 1); exit 1; }; }
17426 fi
17427
17428 ac_ext=cc
17429 ac_cpp='$CXXCPP $CPPFLAGS'
17430 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17431 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17432 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17433 ac_main_return=return
17434
17435 for ac_header in iostream typeinfo
17436 do
17437 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17438 echo "$as_me:17438: checking for $ac_header" >&5
17439 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17440 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17441   echo $ECHO_N "(cached) $ECHO_C" >&6
17442 else
17443   cat >conftest.$ac_ext <<_ACEOF
17444 #line 17444 "configure"
17445 #include "confdefs.h"
17446 #include <$ac_header>
17447 _ACEOF
17448 if { (eval echo "$as_me:17448: \"$ac_cpp conftest.$ac_ext\"") >&5
17449   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17450   ac_status=$?
17451   egrep -v '^ *\+' conftest.er1 >conftest.err
17452   rm -f conftest.er1
17453   cat conftest.err >&5
17454   echo "$as_me:17454: \$? = $ac_status" >&5
17455   (exit $ac_status); } >/dev/null; then
17456   if test -s conftest.err; then
17457     ac_cpp_err=$ac_cxx_preproc_warn_flag
17458   else
17459     ac_cpp_err=
17460   fi
17461 else
17462   ac_cpp_err=yes
17463 fi
17464 if test -z "$ac_cpp_err"; then
17465   eval "$as_ac_Header=yes"
17466 else
17467   echo "$as_me: failed program was:" >&5
17468   cat conftest.$ac_ext >&5
17469   eval "$as_ac_Header=no"
17470 fi
17471 rm -f conftest.err conftest.$ac_ext
17472 fi
17473 echo "$as_me:17473: result: `eval echo '${'$as_ac_Header'}'`" >&5
17474 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17475 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17476   cat >>confdefs.h <<EOF
17477 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17478 EOF
17479
17480 fi
17481 done
17482
17483     if test x"$ac_cv_header_iostream" = xyes ; then
17484         echo "$as_me:17484: checking if iostream uses std-namespace" >&5
17485 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17486         cat >conftest.$ac_ext <<_ACEOF
17487 #line 17487 "configure"
17488 #include "confdefs.h"
17489
17490 #include <iostream>
17491 using std::endl;
17492 using std::cerr;
17493 int
17494 main ()
17495 {
17496
17497 cerr << "testing" << endl;
17498
17499   ;
17500   return 0;
17501 }
17502 _ACEOF
17503 rm -f conftest.$ac_objext
17504 if { (eval echo "$as_me:17504: \"$ac_compile\"") >&5
17505   (eval $ac_compile) 2>&5
17506   ac_status=$?
17507   echo "$as_me:17507: \$? = $ac_status" >&5
17508   (exit $ac_status); } &&
17509          { ac_try='test -s conftest.$ac_objext'
17510   { (eval echo "$as_me:17510: \"$ac_try\"") >&5
17511   (eval $ac_try) 2>&5
17512   ac_status=$?
17513   echo "$as_me:17513: \$? = $ac_status" >&5
17514   (exit $ac_status); }; }; then
17515   cf_iostream_namespace=yes
17516 else
17517   echo "$as_me: failed program was:" >&5
17518 cat conftest.$ac_ext >&5
17519 cf_iostream_namespace=no
17520 fi
17521 rm -f conftest.$ac_objext conftest.$ac_ext
17522         echo "$as_me:17522: result: $cf_iostream_namespace" >&5
17523 echo "${ECHO_T}$cf_iostream_namespace" >&6
17524         if test "$cf_iostream_namespace" = yes ; then
17525             cat >>confdefs.h <<\EOF
17526 #define IOSTREAM_NAMESPACE 1
17527 EOF
17528
17529         fi
17530     fi
17531
17532 echo "$as_me:17532: checking if we should include stdbool.h" >&5
17533 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17534
17535 if test "${cf_cv_header_stdbool_h+set}" = set; then
17536   echo $ECHO_N "(cached) $ECHO_C" >&6
17537 else
17538
17539         cat >conftest.$ac_ext <<_ACEOF
17540 #line 17540 "configure"
17541 #include "confdefs.h"
17542
17543 int
17544 main ()
17545 {
17546 bool foo = false
17547   ;
17548   return 0;
17549 }
17550 _ACEOF
17551 rm -f conftest.$ac_objext
17552 if { (eval echo "$as_me:17552: \"$ac_compile\"") >&5
17553   (eval $ac_compile) 2>&5
17554   ac_status=$?
17555   echo "$as_me:17555: \$? = $ac_status" >&5
17556   (exit $ac_status); } &&
17557          { ac_try='test -s conftest.$ac_objext'
17558   { (eval echo "$as_me:17558: \"$ac_try\"") >&5
17559   (eval $ac_try) 2>&5
17560   ac_status=$?
17561   echo "$as_me:17561: \$? = $ac_status" >&5
17562   (exit $ac_status); }; }; then
17563   cf_cv_header_stdbool_h=0
17564 else
17565   echo "$as_me: failed program was:" >&5
17566 cat conftest.$ac_ext >&5
17567 cat >conftest.$ac_ext <<_ACEOF
17568 #line 17568 "configure"
17569 #include "confdefs.h"
17570
17571 #ifndef __BEOS__
17572 #include <stdbool.h>
17573 #endif
17574
17575 int
17576 main ()
17577 {
17578 bool foo = false
17579   ;
17580   return 0;
17581 }
17582 _ACEOF
17583 rm -f conftest.$ac_objext
17584 if { (eval echo "$as_me:17584: \"$ac_compile\"") >&5
17585   (eval $ac_compile) 2>&5
17586   ac_status=$?
17587   echo "$as_me:17587: \$? = $ac_status" >&5
17588   (exit $ac_status); } &&
17589          { ac_try='test -s conftest.$ac_objext'
17590   { (eval echo "$as_me:17590: \"$ac_try\"") >&5
17591   (eval $ac_try) 2>&5
17592   ac_status=$?
17593   echo "$as_me:17593: \$? = $ac_status" >&5
17594   (exit $ac_status); }; }; then
17595   cf_cv_header_stdbool_h=1
17596 else
17597   echo "$as_me: failed program was:" >&5
17598 cat conftest.$ac_ext >&5
17599 cf_cv_header_stdbool_h=0
17600 fi
17601 rm -f conftest.$ac_objext conftest.$ac_ext
17602 fi
17603 rm -f conftest.$ac_objext conftest.$ac_ext
17604 fi
17605
17606 if test "$cf_cv_header_stdbool_h" = 1
17607 then    echo "$as_me:17607: result: yes" >&5
17608 echo "${ECHO_T}yes" >&6
17609 else    echo "$as_me:17609: result: no" >&5
17610 echo "${ECHO_T}no" >&6
17611 fi
17612
17613 echo "$as_me:17613: checking for builtin bool type" >&5
17614 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17615
17616 if test "${cf_cv_builtin_bool+set}" = set; then
17617   echo $ECHO_N "(cached) $ECHO_C" >&6
17618 else
17619
17620         cat >conftest.$ac_ext <<_ACEOF
17621 #line 17621 "configure"
17622 #include "confdefs.h"
17623
17624 #include <stdio.h>
17625 #include <sys/types.h>
17626
17627 int
17628 main ()
17629 {
17630 bool x = false
17631   ;
17632   return 0;
17633 }
17634 _ACEOF
17635 rm -f conftest.$ac_objext
17636 if { (eval echo "$as_me:17636: \"$ac_compile\"") >&5
17637   (eval $ac_compile) 2>&5
17638   ac_status=$?
17639   echo "$as_me:17639: \$? = $ac_status" >&5
17640   (exit $ac_status); } &&
17641          { ac_try='test -s conftest.$ac_objext'
17642   { (eval echo "$as_me:17642: \"$ac_try\"") >&5
17643   (eval $ac_try) 2>&5
17644   ac_status=$?
17645   echo "$as_me:17645: \$? = $ac_status" >&5
17646   (exit $ac_status); }; }; then
17647   cf_cv_builtin_bool=1
17648 else
17649   echo "$as_me: failed program was:" >&5
17650 cat conftest.$ac_ext >&5
17651 cf_cv_builtin_bool=0
17652 fi
17653 rm -f conftest.$ac_objext conftest.$ac_ext
17654
17655 fi
17656
17657 if test "$cf_cv_builtin_bool" = 1
17658 then    echo "$as_me:17658: result: yes" >&5
17659 echo "${ECHO_T}yes" >&6
17660 else    echo "$as_me:17660: result: no" >&5
17661 echo "${ECHO_T}no" >&6
17662 fi
17663
17664 echo "$as_me:17664: checking for size of bool" >&5
17665 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17666 if test "${cf_cv_type_of_bool+set}" = set; then
17667   echo $ECHO_N "(cached) $ECHO_C" >&6
17668 else
17669
17670         rm -f cf_test.out
17671         if test "$cross_compiling" = yes; then
17672   cf_cv_type_of_bool=unknown
17673 else
17674   cat >conftest.$ac_ext <<_ACEOF
17675 #line 17675 "configure"
17676 #include "confdefs.h"
17677
17678 #include <stdlib.h>
17679 #include <stdio.h>
17680
17681 #if defined(__cplusplus)
17682
17683 #ifdef HAVE_GXX_BUILTIN_H
17684 #include <g++/builtin.h>
17685 #elif HAVE_GPP_BUILTIN_H
17686 #include <gpp/builtin.h>
17687 #elif HAVE_BUILTIN_H
17688 #include <builtin.h>
17689 #endif
17690
17691 #else
17692
17693 #if $cf_cv_header_stdbool_h
17694 #include <stdbool.h>
17695 #endif
17696
17697 #endif
17698
17699 main()
17700 {
17701         FILE *fp = fopen("cf_test.out", "w");
17702         if (fp != 0) {
17703                 bool x = true;
17704                 if ((bool)(-x) >= 0)
17705                         fputs("unsigned ", fp);
17706                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17707                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17708                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17709                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17710                 fclose(fp);
17711         }
17712         ${cf_cv_main_return:-return}(0);
17713 }
17714
17715 _ACEOF
17716 rm -f conftest$ac_exeext
17717 if { (eval echo "$as_me:17717: \"$ac_link\"") >&5
17718   (eval $ac_link) 2>&5
17719   ac_status=$?
17720   echo "$as_me:17720: \$? = $ac_status" >&5
17721   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17722   { (eval echo "$as_me:17722: \"$ac_try\"") >&5
17723   (eval $ac_try) 2>&5
17724   ac_status=$?
17725   echo "$as_me:17725: \$? = $ac_status" >&5
17726   (exit $ac_status); }; }; then
17727   cf_cv_type_of_bool=`cat cf_test.out`
17728                  if test -z "$cf_cv_type_of_bool"; then
17729                    cf_cv_type_of_bool=unknown
17730                  fi
17731 else
17732   echo "$as_me: program exited with status $ac_status" >&5
17733 echo "$as_me: failed program was:" >&5
17734 cat conftest.$ac_ext >&5
17735 cf_cv_type_of_bool=unknown
17736 fi
17737 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17738 fi
17739
17740 fi
17741
17742         rm -f cf_test.out
17743 echo "$as_me:17743: result: $cf_cv_type_of_bool" >&5
17744 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17745 if test "$cf_cv_type_of_bool" = unknown ; then
17746         case .$NCURSES_BOOL in #(vi
17747         .auto|.) NCURSES_BOOL=unsigned;;
17748         esac
17749         { echo "$as_me:17749: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17750 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17751         cf_cv_type_of_bool=$NCURSES_BOOL
17752 fi
17753
17754 echo "$as_me:17754: checking for special defines needed for etip.h" >&5
17755 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17756 cf_save_CXXFLAGS="$CXXFLAGS"
17757 cf_result="none"
17758 for cf_math in "" MATH_H
17759 do
17760 for cf_excp in "" MATH_EXCEPTION
17761 do
17762         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17763         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17764         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17765 cat >conftest.$ac_ext <<_ACEOF
17766 #line 17766 "configure"
17767 #include "confdefs.h"
17768
17769 #include <etip.h.in>
17770
17771 int
17772 main ()
17773 {
17774
17775   ;
17776   return 0;
17777 }
17778 _ACEOF
17779 rm -f conftest.$ac_objext
17780 if { (eval echo "$as_me:17780: \"$ac_compile\"") >&5
17781   (eval $ac_compile) 2>&5
17782   ac_status=$?
17783   echo "$as_me:17783: \$? = $ac_status" >&5
17784   (exit $ac_status); } &&
17785          { ac_try='test -s conftest.$ac_objext'
17786   { (eval echo "$as_me:17786: \"$ac_try\"") >&5
17787   (eval $ac_try) 2>&5
17788   ac_status=$?
17789   echo "$as_me:17789: \$? = $ac_status" >&5
17790   (exit $ac_status); }; }; then
17791
17792         test -n "$cf_math" && cat >>confdefs.h <<EOF
17793 #define ETIP_NEEDS_${cf_math} 1
17794 EOF
17795
17796         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17797 #define ETIP_NEEDS_${cf_excp} 1
17798 EOF
17799
17800         cf_result="$cf_math $cf_excp"
17801         break
17802
17803 else
17804   echo "$as_me: failed program was:" >&5
17805 cat conftest.$ac_ext >&5
17806 fi
17807 rm -f conftest.$ac_objext conftest.$ac_ext
17808 done
17809 done
17810 echo "$as_me:17810: result: $cf_result" >&5
17811 echo "${ECHO_T}$cf_result" >&6
17812 CXXFLAGS="$cf_save_CXXFLAGS"
17813
17814 if test -n "$CXX"; then
17815 echo "$as_me:17815: checking if $CXX accepts parameter initialization" >&5
17816 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17817 if test "${cf_cv_cpp_param_init+set}" = set; then
17818   echo $ECHO_N "(cached) $ECHO_C" >&6
17819 else
17820
17821         ac_ext=cc
17822 ac_cpp='$CXXCPP $CPPFLAGS'
17823 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17824 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17825 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17826 ac_main_return=return
17827
17828         if test "$cross_compiling" = yes; then
17829   cf_cv_cpp_param_init=unknown
17830 else
17831   cat >conftest.$ac_ext <<_ACEOF
17832 #line 17832 "configure"
17833 #include "confdefs.h"
17834
17835 class TEST {
17836 private:
17837         int value;
17838 public:
17839         TEST(int x = 1);
17840         ~TEST();
17841 };
17842
17843 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17844 {
17845         value = x;
17846 }
17847 void main() { }
17848
17849 _ACEOF
17850 rm -f conftest$ac_exeext
17851 if { (eval echo "$as_me:17851: \"$ac_link\"") >&5
17852   (eval $ac_link) 2>&5
17853   ac_status=$?
17854   echo "$as_me:17854: \$? = $ac_status" >&5
17855   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17856   { (eval echo "$as_me:17856: \"$ac_try\"") >&5
17857   (eval $ac_try) 2>&5
17858   ac_status=$?
17859   echo "$as_me:17859: \$? = $ac_status" >&5
17860   (exit $ac_status); }; }; then
17861   cf_cv_cpp_param_init=yes
17862 else
17863   echo "$as_me: program exited with status $ac_status" >&5
17864 echo "$as_me: failed program was:" >&5
17865 cat conftest.$ac_ext >&5
17866 cf_cv_cpp_param_init=no
17867 fi
17868 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17869 fi
17870         ac_ext=cc
17871 ac_cpp='$CXXCPP $CPPFLAGS'
17872 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17873 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17874 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17875 ac_main_return=return
17876
17877 fi
17878 echo "$as_me:17878: result: $cf_cv_cpp_param_init" >&5
17879 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17880 fi
17881 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17882 #define CPP_HAS_PARAM_INIT 1
17883 EOF
17884
17885 if test -n "$CXX"; then
17886
17887 echo "$as_me:17887: checking if $CXX accepts static_cast" >&5
17888 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17889 if test "${cf_cv_cpp_static_cast+set}" = set; then
17890   echo $ECHO_N "(cached) $ECHO_C" >&6
17891 else
17892
17893         ac_ext=cc
17894 ac_cpp='$CXXCPP $CPPFLAGS'
17895 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17896 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17897 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17898 ac_main_return=return
17899
17900         cat >conftest.$ac_ext <<_ACEOF
17901 #line 17901 "configure"
17902 #include "confdefs.h"
17903
17904 class NCursesPanel
17905 {
17906 public:
17907   NCursesPanel(int nlines,
17908                int ncols,
17909                int begin_y = 0,
17910                int begin_x = 0)
17911   {
17912   }
17913
17914   ~NCursesPanel();
17915 };
17916
17917 template<class T> class NCursesUserPanel : public NCursesPanel
17918 {
17919 public:
17920   NCursesUserPanel (int nlines,
17921                     int ncols,
17922                     int begin_y = 0,
17923                     int begin_x = 0,
17924                     const T* p_UserData = static_cast<T*>(0))
17925     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17926   {
17927   };
17928   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17929   {
17930   };
17931
17932   virtual ~NCursesUserPanel() {};
17933 };
17934
17935 int
17936 main ()
17937 {
17938
17939         const char* p_UserData = static_cast<char*>(0)
17940   ;
17941   return 0;
17942 }
17943 _ACEOF
17944 rm -f conftest.$ac_objext
17945 if { (eval echo "$as_me:17945: \"$ac_compile\"") >&5
17946   (eval $ac_compile) 2>&5
17947   ac_status=$?
17948   echo "$as_me:17948: \$? = $ac_status" >&5
17949   (exit $ac_status); } &&
17950          { ac_try='test -s conftest.$ac_objext'
17951   { (eval echo "$as_me:17951: \"$ac_try\"") >&5
17952   (eval $ac_try) 2>&5
17953   ac_status=$?
17954   echo "$as_me:17954: \$? = $ac_status" >&5
17955   (exit $ac_status); }; }; then
17956   cf_cv_cpp_static_cast=yes
17957 else
17958   echo "$as_me: failed program was:" >&5
17959 cat conftest.$ac_ext >&5
17960 cf_cv_cpp_static_cast=no
17961 fi
17962 rm -f conftest.$ac_objext conftest.$ac_ext
17963
17964         ac_ext=cc
17965 ac_cpp='$CXXCPP $CPPFLAGS'
17966 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17967 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17968 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17969 ac_main_return=return
17970
17971 fi
17972 echo "$as_me:17972: result: $cf_cv_cpp_static_cast" >&5
17973 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17974
17975 fi
17976
17977 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17978 #define CPP_HAS_STATIC_CAST 1
17979 EOF
17980
17981         CXX_AR='$(AR)'
17982         CXX_ARFLAGS='$(ARFLAGS)'
17983         case $cf_cv_system_name in #(vi
17984         irix*) #(vi
17985             if test "$GXX" != yes ; then
17986                 CXX_AR='$(CXX)'
17987                 CXX_ARFLAGS='-ar -o'
17988             fi
17989             ;;
17990         sco3.2v5*) #(vi
17991             CXXLDFLAGS="-u main"
17992             ;;
17993         solaris2*)
17994             if test "$GXX" != yes ; then
17995                 CXX_AR='$(CXX)'
17996                 CXX_ARFLAGS='-xar -o'
17997             fi
17998             ;;
17999         esac
18000
18001 else
18002         cf_cxx_library=no
18003         cf_cv_builtin_bool=1
18004
18005         # Just because we are not configuring against C++ right now does not
18006         # mean that a user will not want to use C++.  Some distributors disable
18007         # the C++ portion of this configuration as a shortcut (or just to avoid
18008         # compiling the demo in the c++ directory).  So we need a reasonable
18009         # default for the 'bool' type.
18010         #
18011         # Caveat: since the storage of the bool type is not standardized, it
18012         # may change.
18013
18014         if test "$NCURSES_BOOL" != auto ; then
18015                 cf_cv_type_of_bool=$NCURSES_BOOL
18016                 cf_cv_header_stdbool_h=0
18017         else
18018                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18019
18020 echo "$as_me:18020: checking for size of bool" >&5
18021 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18022 if test "${cf_cv_type_of_bool+set}" = set; then
18023   echo $ECHO_N "(cached) $ECHO_C" >&6
18024 else
18025
18026         rm -f cf_test.out
18027         if test "$cross_compiling" = yes; then
18028   cf_cv_type_of_bool=unknown
18029 else
18030   cat >conftest.$ac_ext <<_ACEOF
18031 #line 18031 "configure"
18032 #include "confdefs.h"
18033
18034 #include <stdlib.h>
18035 #include <stdio.h>
18036
18037 #if defined(__cplusplus)
18038
18039 #ifdef HAVE_GXX_BUILTIN_H
18040 #include <g++/builtin.h>
18041 #elif HAVE_GPP_BUILTIN_H
18042 #include <gpp/builtin.h>
18043 #elif HAVE_BUILTIN_H
18044 #include <builtin.h>
18045 #endif
18046
18047 #else
18048
18049 #if $cf_cv_header_stdbool_h
18050 #include <stdbool.h>
18051 #endif
18052
18053 #endif
18054
18055 main()
18056 {
18057         FILE *fp = fopen("cf_test.out", "w");
18058         if (fp != 0) {
18059                 bool x = true;
18060                 if ((bool)(-x) >= 0)
18061                         fputs("unsigned ", fp);
18062                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18063                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18064                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18065                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18066                 fclose(fp);
18067         }
18068         ${cf_cv_main_return:-return}(0);
18069 }
18070
18071 _ACEOF
18072 rm -f conftest$ac_exeext
18073 if { (eval echo "$as_me:18073: \"$ac_link\"") >&5
18074   (eval $ac_link) 2>&5
18075   ac_status=$?
18076   echo "$as_me:18076: \$? = $ac_status" >&5
18077   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18078   { (eval echo "$as_me:18078: \"$ac_try\"") >&5
18079   (eval $ac_try) 2>&5
18080   ac_status=$?
18081   echo "$as_me:18081: \$? = $ac_status" >&5
18082   (exit $ac_status); }; }; then
18083   cf_cv_type_of_bool=`cat cf_test.out`
18084                  if test -z "$cf_cv_type_of_bool"; then
18085                    cf_cv_type_of_bool=unknown
18086                  fi
18087 else
18088   echo "$as_me: program exited with status $ac_status" >&5
18089 echo "$as_me: failed program was:" >&5
18090 cat conftest.$ac_ext >&5
18091 cf_cv_type_of_bool=unknown
18092 fi
18093 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18094 fi
18095
18096 fi
18097
18098         rm -f cf_test.out
18099 echo "$as_me:18099: result: $cf_cv_type_of_bool" >&5
18100 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18101 if test "$cf_cv_type_of_bool" = unknown ; then
18102         case .$NCURSES_BOOL in #(vi
18103         .auto|.) NCURSES_BOOL=unsigned;;
18104         esac
18105         { echo "$as_me:18105: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18106 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18107         cf_cv_type_of_bool=$NCURSES_BOOL
18108 fi
18109
18110                 else
18111                         echo "$as_me:18111: checking for fallback type of bool" >&5
18112 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
18113                         case "$host_cpu" in #(vi
18114                         i?86)   cf_cv_type_of_bool=char ;; #(vi
18115                         *)      cf_cv_type_of_bool=int  ;;
18116                         esac
18117                         echo "$as_me:18117: result: $cf_cv_type_of_bool" >&5
18118 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18119                 fi
18120         fi
18121 fi
18122
18123 # If the C compiler did not declare bool, and we did not determine that the C++
18124 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18125 # ncurses library use the same type as C++ bool.  Note that this allows one to
18126 # specify the type of bool in a configure-script option and postpone
18127 # integration with the C++ compiler provided that the types are compatible.
18128 USE_CXX_BOOL=1
18129 if test $cf_cv_cc_bool_type = 1
18130 then
18131         # oops: C has a bool.  Unlikely, but C++ could differ.
18132         USE_CXX_BOOL=0
18133 elif test $cf_cv_builtin_bool = 0
18134 then
18135         # C++ has no bool
18136         USE_CXX_BOOL=0
18137 else
18138         # this is the normal case
18139         USE_CXX_BOOL='defined(__cplusplus)'
18140 fi
18141
18142 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18143
18144         if test "$cf_with_ada" != "no" ; then
18145                 if test "$with_libtool" != "no"; then
18146                         { echo "$as_me:18146: WARNING: libtool does not support Ada - disabling feature" >&5
18147 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18148                         cf_with_ada=no
18149                 fi
18150         fi
18151
18152         if test "$cf_with_ada" != "no" ; then
18153
18154 cf_ada_make=gnatmake
18155 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18156 set dummy $cf_ada_make; ac_word=$2
18157 echo "$as_me:18157: checking for $ac_word" >&5
18158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18159 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18160   echo $ECHO_N "(cached) $ECHO_C" >&6
18161 else
18162   if test -n "$gnat_exists"; then
18163   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18164 else
18165   ac_save_IFS=$IFS; IFS=$ac_path_separator
18166 ac_dummy="$PATH"
18167 for ac_dir in $ac_dummy; do
18168   IFS=$ac_save_IFS
18169   test -z "$ac_dir" && ac_dir=.
18170   $as_executable_p "$ac_dir/$ac_word" || continue
18171 ac_cv_prog_gnat_exists="yes"
18172 echo "$as_me:18172: found $ac_dir/$ac_word" >&5
18173 break
18174 done
18175
18176   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18177 fi
18178 fi
18179 gnat_exists=$ac_cv_prog_gnat_exists
18180 if test -n "$gnat_exists"; then
18181   echo "$as_me:18181: result: $gnat_exists" >&5
18182 echo "${ECHO_T}$gnat_exists" >&6
18183 else
18184   echo "$as_me:18184: result: no" >&5
18185 echo "${ECHO_T}no" >&6
18186 fi
18187
18188 if test "$ac_cv_prog_gnat_exists" = no; then
18189    cf_ada_make=
18190 else
18191
18192 echo "$as_me:18192: checking for gnat version" >&5
18193 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18194 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18195         grep '[0-9].[0-9][0-9]*' |\
18196     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18197 echo "$as_me:18197: result: $cf_gnat_version" >&5
18198 echo "${ECHO_T}$cf_gnat_version" >&6
18199
18200 case $cf_gnat_version in #(vi
18201 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
18202         cf_cv_prog_gnat_correct=yes
18203         ;;
18204 *)
18205         { echo "$as_me:18205: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18206 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18207         cf_cv_prog_gnat_correct=no
18208         ;;
18209 esac
18210
18211    # Extract the first word of "m4", so it can be a program name with args.
18212 set dummy m4; ac_word=$2
18213 echo "$as_me:18213: checking for $ac_word" >&5
18214 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18215 if test "${ac_cv_prog_M4_exists+set}" = set; then
18216   echo $ECHO_N "(cached) $ECHO_C" >&6
18217 else
18218   if test -n "$M4_exists"; then
18219   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18220 else
18221   ac_save_IFS=$IFS; IFS=$ac_path_separator
18222 ac_dummy="$PATH"
18223 for ac_dir in $ac_dummy; do
18224   IFS=$ac_save_IFS
18225   test -z "$ac_dir" && ac_dir=.
18226   $as_executable_p "$ac_dir/$ac_word" || continue
18227 ac_cv_prog_M4_exists="yes"
18228 echo "$as_me:18228: found $ac_dir/$ac_word" >&5
18229 break
18230 done
18231
18232   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18233 fi
18234 fi
18235 M4_exists=$ac_cv_prog_M4_exists
18236 if test -n "$M4_exists"; then
18237   echo "$as_me:18237: result: $M4_exists" >&5
18238 echo "${ECHO_T}$M4_exists" >&6
18239 else
18240   echo "$as_me:18240: result: no" >&5
18241 echo "${ECHO_T}no" >&6
18242 fi
18243
18244    if test "$ac_cv_prog_M4_exists" = no; then
18245       cf_cv_prog_gnat_correct=no
18246       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18247    fi
18248    if test "$cf_cv_prog_gnat_correct" = yes; then
18249       echo "$as_me:18249: checking if GNAT works" >&5
18250 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18251
18252 rm -rf conftest* *~conftest*
18253 cat >>conftest.ads <<CF_EOF
18254 procedure conftest;
18255 CF_EOF
18256 cat >>conftest.adb <<CF_EOF
18257 with Text_IO;
18258 with GNAT.OS_Lib;
18259 procedure conftest is
18260 begin
18261    Text_IO.Put ("Hello World");
18262    Text_IO.New_Line;
18263    GNAT.OS_Lib.OS_Exit (0);
18264 end conftest;
18265 CF_EOF
18266 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18267    if ( ./conftest 1>&5 2>&1 ) ; then
18268       cf_cv_prog_gnat_correct=yes
18269    else
18270       cf_cv_prog_gnat_correct=no
18271    fi
18272 else
18273    cf_cv_prog_gnat_correct=no
18274 fi
18275 rm -rf conftest* *~conftest*
18276
18277       echo "$as_me:18277: result: $cf_cv_prog_gnat_correct" >&5
18278 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18279    fi
18280 fi
18281
18282                 if test "$cf_cv_prog_gnat_correct" = yes; then
18283
18284         ADAFLAGS="$ADAFLAGS -gnatpn"
18285
18286                         # make ADAFLAGS consistent with CFLAGS
18287                         case "$CFLAGS" in
18288                         *-g*)
18289
18290         ADAFLAGS="$ADAFLAGS -g"
18291
18292                                 ;;
18293                         esac
18294                         case "$CFLAGS" in
18295                         *-O*)
18296
18297         ADAFLAGS="$ADAFLAGS -O3"
18298
18299                                 ;;
18300                         esac
18301
18302 echo "$as_me:18302: checking if GNAT supports generics" >&5
18303 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18304 case $cf_gnat_version in #(vi
18305 3.[1-9]*|[4-9].*) #(vi
18306         cf_gnat_generics=yes
18307         ;;
18308 *)
18309         cf_gnat_generics=no
18310         ;;
18311 esac
18312 echo "$as_me:18312: result: $cf_gnat_generics" >&5
18313 echo "${ECHO_T}$cf_gnat_generics" >&6
18314
18315 if test "$cf_gnat_generics" = yes
18316 then
18317         cf_compile_generics=generics
18318         cf_generic_objects="\${GENOBJS}"
18319 else
18320         cf_compile_generics=
18321         cf_generic_objects=
18322 fi
18323
18324 echo "$as_me:18324: checking if GNAT supports SIGINT" >&5
18325 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18326 if test "${cf_cv_gnat_sigint+set}" = set; then
18327   echo $ECHO_N "(cached) $ECHO_C" >&6
18328 else
18329
18330 rm -rf conftest* *~conftest*
18331 cat >>conftest.ads <<CF_EOF
18332 with Ada.Interrupts.Names;
18333
18334 package ConfTest is
18335
18336    pragma Warnings (Off);  --  the next pragma exists since 3.11p
18337    pragma Unreserve_All_Interrupts;
18338    pragma Warnings (On);
18339
18340    protected Process is
18341       procedure Stop;
18342       function Continue return Boolean;
18343       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18344    private
18345       Done : Boolean := False;
18346    end Process;
18347
18348 end ConfTest;
18349 CF_EOF
18350 cat >>conftest.adb <<CF_EOF
18351 package body ConfTest is
18352    protected body Process is
18353       procedure Stop is
18354       begin
18355          Done := True;
18356       end Stop;
18357       function Continue return Boolean is
18358       begin
18359          return not Done;
18360       end Continue;
18361    end Process;
18362 end ConfTest;
18363 CF_EOF
18364 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18365       cf_cv_gnat_sigint=yes
18366 else
18367    cf_cv_gnat_sigint=no
18368 fi
18369 rm -rf conftest* *~conftest*
18370
18371 fi
18372 echo "$as_me:18372: result: $cf_cv_gnat_sigint" >&5
18373 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18374
18375 if test $cf_cv_gnat_sigint = yes ; then
18376         USE_GNAT_SIGINT=""
18377 else
18378         USE_GNAT_SIGINT="#"
18379 fi
18380
18381 echo "$as_me:18381: checking if GNAT pragma Unreferenced works" >&5
18382 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18383 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18384   echo $ECHO_N "(cached) $ECHO_C" >&6
18385 else
18386
18387 rm -rf conftest* *~conftest*
18388 cat >>conftest.ads <<CF_EOF
18389 procedure conftest;
18390 CF_EOF
18391 cat >>conftest.adb <<CF_EOF
18392 with Text_IO;
18393 with GNAT.OS_Lib;
18394 procedure conftest is
18395    test : Integer;
18396    pragma Unreferenced (test);
18397 begin
18398    test := 1;
18399    Text_IO.Put ("Hello World");
18400    Text_IO.New_Line;
18401    GNAT.OS_Lib.OS_Exit (0);
18402 end conftest;
18403 CF_EOF
18404 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18405       cf_cv_pragma_unreferenced=yes
18406 else
18407    cf_cv_pragma_unreferenced=no
18408 fi
18409 rm -rf conftest* *~conftest*
18410
18411 fi
18412 echo "$as_me:18412: result: $cf_cv_pragma_unreferenced" >&5
18413 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18414
18415 # if the pragma is supported, use it (needed in the Trace code).
18416 if test $cf_cv_pragma_unreferenced = yes ; then
18417         PRAGMA_UNREF=TRUE
18418 else
18419         PRAGMA_UNREF=FALSE
18420 fi
18421
18422 cf_gnat_libraries=no
18423 cf_gnat_projects=no
18424
18425 echo "$as_me:18425: checking if GNAT supports project files" >&5
18426 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18427 case $cf_gnat_version in #(vi
18428 3.[0-9]*) #(vi
18429         ;;
18430 *)
18431         case $cf_cv_system_name in #(vi
18432         cygwin*) #(vi
18433                 ;;
18434         *)
18435                 mkdir conftest.src conftest.bin conftest.lib
18436                 cd conftest.src
18437                 rm -rf conftest* *~conftest*
18438                 cat >>library.gpr <<CF_EOF
18439 project Library is
18440   Kind := External ("LIB_KIND");
18441   for Library_Name use "ConfTest";
18442   for Object_Dir use ".";
18443   for Library_ALI_Dir use External("LIBRARY_DIR");
18444   for Library_Version use External ("SONAME");
18445   for Library_Kind use Kind;
18446   for Library_Dir use External("BUILD_DIR");
18447   Source_Dir := External ("SOURCE_DIR");
18448   for Source_Dirs use (Source_Dir);
18449   package Compiler is
18450      for Default_Switches ("Ada") use
18451        ("-g",
18452         "-O2",
18453         "-gnatafno",
18454         "-gnatVa",   -- All validity checks
18455         "-gnatwa");  -- Activate all optional errors
18456   end Compiler;
18457 end Library;
18458 CF_EOF
18459                 cat >>confpackage.ads <<CF_EOF
18460 package ConfPackage is
18461    procedure conftest;
18462 end ConfPackage;
18463 CF_EOF
18464                 cat >>confpackage.adb <<CF_EOF
18465 with Text_IO;
18466 package body ConfPackage is
18467    procedure conftest is
18468    begin
18469       Text_IO.Put ("Hello World");
18470       Text_IO.New_Line;
18471    end conftest;
18472 end ConfPackage;
18473 CF_EOF
18474                 if ( $cf_ada_make $ADAFLAGS \
18475                                 -Plibrary.gpr \
18476                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
18477                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
18478                                 -XSOURCE_DIR=`pwd` \
18479                                 -XSONAME=libConfTest.so.1 \
18480                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
18481                         cf_gnat_projects=yes
18482                 fi
18483                 cd ..
18484                 if test -f conftest.lib/confpackage.ali
18485                 then
18486                         cf_gnat_libraries=yes
18487                 fi
18488                 rm -rf conftest* *~conftest*
18489                 ;;
18490         esac
18491         ;;
18492 esac
18493 echo "$as_me:18493: result: $cf_gnat_projects" >&5
18494 echo "${ECHO_T}$cf_gnat_projects" >&6
18495
18496 if test $cf_gnat_projects = yes
18497 then
18498         echo "$as_me:18498: checking if GNAT supports libraries" >&5
18499 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18500         echo "$as_me:18500: result: $cf_gnat_libraries" >&5
18501 echo "${ECHO_T}$cf_gnat_libraries" >&6
18502 fi
18503
18504 if test "$cf_gnat_projects" = yes
18505 then
18506         USE_OLD_MAKERULES="#"
18507         USE_GNAT_PROJECTS=""
18508 else
18509         USE_OLD_MAKERULES=""
18510         USE_GNAT_PROJECTS="#"
18511 fi
18512
18513 if test "$cf_gnat_libraries" = yes
18514 then
18515         USE_GNAT_LIBRARIES=""
18516 else
18517         USE_GNAT_LIBRARIES="#"
18518 fi
18519
18520 echo "$as_me:18520: checking for ada-compiler" >&5
18521 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18522
18523 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18524 if test "${with_ada_compiler+set}" = set; then
18525   withval="$with_ada_compiler"
18526   cf_ada_compiler=$withval
18527 else
18528   cf_ada_compiler=gnatmake
18529 fi;
18530
18531 echo "$as_me:18531: result: $cf_ada_compiler" >&5
18532 echo "${ECHO_T}$cf_ada_compiler" >&6
18533
18534                         cf_ada_package=terminal_interface
18535
18536 echo "$as_me:18536: checking for ada-include" >&5
18537 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18538
18539 # Check whether --with-ada-include or --without-ada-include was given.
18540 if test "${with_ada_include+set}" = set; then
18541   withval="$with_ada_include"
18542
18543 else
18544   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18545 fi; if test -n "$prefix/share/ada/adainclude" ; then
18546
18547 if test "x$prefix" != xNONE; then
18548   cf_path_syntax="$prefix"
18549 else
18550   cf_path_syntax="$ac_default_prefix"
18551 fi
18552
18553 case ".$withval" in #(vi
18554 .\$\(*\)*|.\'*\'*) #(vi
18555   ;;
18556 ..|./*|.\\*) #(vi
18557   ;;
18558 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18559   ;;
18560 .\${*prefix}*) #(vi
18561   eval withval="$withval"
18562   case ".$withval" in #(vi
18563   .NONE/*)
18564     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18565     ;;
18566   esac
18567   ;; #(vi
18568 .no|.NONE/*)
18569   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18570   ;;
18571 *)
18572   { { echo "$as_me:18572: error: expected a pathname, not \"$withval\"" >&5
18573 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18574    { (exit 1); exit 1; }; }
18575   ;;
18576 esac
18577
18578 fi
18579 ADA_INCLUDE="$withval"
18580
18581 echo "$as_me:18581: result: $ADA_INCLUDE" >&5
18582 echo "${ECHO_T}$ADA_INCLUDE" >&6
18583
18584 echo "$as_me:18584: checking for ada-objects" >&5
18585 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18586
18587 # Check whether --with-ada-objects or --without-ada-objects was given.
18588 if test "${with_ada_objects+set}" = set; then
18589   withval="$with_ada_objects"
18590
18591 else
18592   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18593 fi; if test -n "$prefix/lib/ada/adalib" ; then
18594
18595 if test "x$prefix" != xNONE; then
18596   cf_path_syntax="$prefix"
18597 else
18598   cf_path_syntax="$ac_default_prefix"
18599 fi
18600
18601 case ".$withval" in #(vi
18602 .\$\(*\)*|.\'*\'*) #(vi
18603   ;;
18604 ..|./*|.\\*) #(vi
18605   ;;
18606 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18607   ;;
18608 .\${*prefix}*) #(vi
18609   eval withval="$withval"
18610   case ".$withval" in #(vi
18611   .NONE/*)
18612     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18613     ;;
18614   esac
18615   ;; #(vi
18616 .no|.NONE/*)
18617   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18618   ;;
18619 *)
18620   { { echo "$as_me:18620: error: expected a pathname, not \"$withval\"" >&5
18621 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18622    { (exit 1); exit 1; }; }
18623   ;;
18624 esac
18625
18626 fi
18627 ADA_OBJECTS="$withval"
18628
18629 echo "$as_me:18629: result: $ADA_OBJECTS" >&5
18630 echo "${ECHO_T}$ADA_OBJECTS" >&6
18631
18632 echo "$as_me:18632: checking if an Ada95 shared-library should be built" >&5
18633 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18634
18635 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18636 if test "${with_ada_sharedlib+set}" = set; then
18637   withval="$with_ada_sharedlib"
18638   with_ada_sharedlib=$withval
18639 else
18640   with_ada_sharedlib=no
18641 fi;
18642 echo "$as_me:18642: result: $with_ada_sharedlib" >&5
18643 echo "${ECHO_T}$with_ada_sharedlib" >&6
18644
18645 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18646 MAKE_ADA_SHAREDLIB="#"
18647
18648 if test "x$with_ada_sharedlib" != xno
18649 then
18650         MAKE_ADA_SHAREDLIB=
18651         if test "x$with_ada_sharedlib" != xyes
18652         then
18653                 ADA_SHAREDLIB="$with_ada_sharedlib"
18654         fi
18655 fi
18656
18657                 fi
18658         fi
18659 else
18660         cf_with_ada=no
18661 fi
18662
18663 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18664 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18665 ###
18666 ### ticlib modules may be a separate library, otherwise contained in termlib.
18667 ### termlib modules may be a separate library, otherwise contained in ncurses.
18668 ###
18669 ### The of "+" or " " between the tokens controls the way the script
18670 ### chooses to split module lists into libraries.
18671 ###
18672 ### (see CF_LIB_RULES).
18673 echo "$as_me:18673: checking for library subsets" >&5
18674 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18675 LIB_SUBSETS=
18676
18677 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18678         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18679         if test "$with_ticlib" != no ; then
18680                 LIB_SUBSETS="${LIB_SUBSETS} "
18681         else
18682                 LIB_SUBSETS="${LIB_SUBSETS}+"
18683         fi
18684 fi
18685
18686 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18687 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18688
18689 if test "$with_termlib" != no ; then
18690         LIB_SUBSETS="${LIB_SUBSETS} "
18691 else
18692         LIB_SUBSETS="${LIB_SUBSETS}+"
18693 fi
18694
18695 LIB_SUBSETS="${LIB_SUBSETS}base"
18696
18697 # Most term-driver calls are to tinfo, but some like init_pair are to the
18698 # base library (so it resides in base).
18699 if test "$with_term_driver" != no ; then
18700         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18701         case $cf_cv_system_name in #(vi
18702         *mingw32*) #(vi
18703                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18704                 ;;
18705         *) #(vi
18706                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18707                 ;;
18708         esac
18709 fi
18710
18711 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18712 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18713
18714 echo "$as_me:18714: result: $LIB_SUBSETS" >&5
18715 echo "${ECHO_T}$LIB_SUBSETS" >&6
18716
18717 ### Construct the list of include-directories to be generated
18718
18719 CPPFLAGS="$CPPFLAGS -I. -I../include"
18720 if test "$srcdir" != "."; then
18721         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18722 fi
18723 if test "$GCC" != yes; then
18724         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18725 elif test "$includedir" != "/usr/include"; then
18726         if test "$includedir" = '${prefix}/include' ; then
18727                 if test $prefix != /usr ; then
18728                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18729                 fi
18730         else
18731                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18732         fi
18733 fi
18734
18735 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18736 if test "$srcdir" != "."; then
18737         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18738 fi
18739 if test "$GCC" != yes; then
18740         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18741 elif test "$includedir" != "/usr/include"; then
18742         if test "$includedir" = '${prefix}/include' ; then
18743                 if test $prefix != /usr ; then
18744                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18745                 fi
18746         else
18747                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18748         fi
18749 fi
18750
18751 ### Build up pieces for makefile rules
18752 echo "$as_me:18752: checking default library suffix" >&5
18753 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18754
18755         case $DFT_LWR_MODEL in
18756         libtool) DFT_ARG_SUFFIX=''   ;;
18757         normal)  DFT_ARG_SUFFIX=''   ;;
18758         debug)   DFT_ARG_SUFFIX='_g' ;;
18759         profile) DFT_ARG_SUFFIX='_p' ;;
18760         shared)  DFT_ARG_SUFFIX=''   ;;
18761         esac
18762         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18763 echo "$as_me:18763: result: $DFT_ARG_SUFFIX" >&5
18764 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18765
18766 echo "$as_me:18766: checking default library-dependency suffix" >&5
18767 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18768
18769         case $DFT_LWR_MODEL in #(vi
18770         libtool) #(vi
18771                 DFT_LIB_SUFFIX='.la'
18772                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18773                 ;;
18774         normal) #(vi
18775                 DFT_LIB_SUFFIX='.a'
18776                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18777                 ;;
18778         debug) #(vi
18779                 DFT_LIB_SUFFIX='_g.a'
18780                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18781                 ;;
18782         profile) #(vi
18783                 DFT_LIB_SUFFIX='_p.a'
18784                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18785                 ;;
18786         shared) #(vi
18787                 case $cf_cv_system_name in
18788                 aix[56]*) #(vi
18789                         DFT_LIB_SUFFIX='.a'
18790                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18791                         ;;
18792                 cygwin*) #(vi
18793                         DFT_LIB_SUFFIX='.dll'
18794                         DFT_DEP_SUFFIX='.dll.a'
18795                         ;;
18796                 darwin*) #(vi
18797                         DFT_LIB_SUFFIX='.dylib'
18798                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18799                         ;;
18800                 hpux*) #(vi
18801                         case $target in
18802                         ia64*) #(vi
18803                                 DFT_LIB_SUFFIX='.so'
18804                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18805                                 ;;
18806                         *) #(vi
18807                                 DFT_LIB_SUFFIX='.sl'
18808                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18809                                 ;;
18810                         esac
18811                         ;;
18812                 *)      DFT_LIB_SUFFIX='.so'
18813                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18814                         ;;
18815                 esac
18816         esac
18817         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18818         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18819 echo "$as_me:18819: result: $DFT_DEP_SUFFIX" >&5
18820 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18821
18822 echo "$as_me:18822: checking default object directory" >&5
18823 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18824
18825         case $DFT_LWR_MODEL in
18826         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18827         normal)  DFT_OBJ_SUBDIR='objects' ;;
18828         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18829         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18830         shared)
18831                 case $cf_cv_system_name in #(vi
18832                 cygwin) #(vi
18833                         DFT_OBJ_SUBDIR='objects' ;;
18834                 *)
18835                         DFT_OBJ_SUBDIR='obj_s' ;;
18836                 esac
18837         esac
18838 echo "$as_me:18838: result: $DFT_OBJ_SUBDIR" >&5
18839 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18840
18841 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18842 if test "$cf_with_cxx" = yes ; then
18843 echo "$as_me:18843: checking c++ library-dependency suffix" >&5
18844 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18845 if test "$with_libtool" != "no"; then
18846         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18847 else
18848
18849         case normal in #(vi
18850         libtool) #(vi
18851                 CXX_LIB_SUFFIX='.la'
18852                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18853                 ;;
18854         normal) #(vi
18855                 CXX_LIB_SUFFIX='.a'
18856                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18857                 ;;
18858         debug) #(vi
18859                 CXX_LIB_SUFFIX='_g.a'
18860                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18861                 ;;
18862         profile) #(vi
18863                 CXX_LIB_SUFFIX='_p.a'
18864                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18865                 ;;
18866         shared) #(vi
18867                 case $cf_cv_system_name in
18868                 aix[56]*) #(vi
18869                         CXX_LIB_SUFFIX='.a'
18870                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18871                         ;;
18872                 cygwin*) #(vi
18873                         CXX_LIB_SUFFIX='.dll'
18874                         CXX_DEP_SUFFIX='.dll.a'
18875                         ;;
18876                 darwin*) #(vi
18877                         CXX_LIB_SUFFIX='.dylib'
18878                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18879                         ;;
18880                 hpux*) #(vi
18881                         case $target in
18882                         ia64*) #(vi
18883                                 CXX_LIB_SUFFIX='.so'
18884                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18885                                 ;;
18886                         *) #(vi
18887                                 CXX_LIB_SUFFIX='.sl'
18888                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18889                                 ;;
18890                         esac
18891                         ;;
18892                 *)      CXX_LIB_SUFFIX='.so'
18893                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18894                         ;;
18895                 esac
18896         esac
18897         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18898         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18899 fi
18900 echo "$as_me:18900: result: $CXX_LIB_SUFFIX" >&5
18901 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18902
18903 fi
18904
18905 # do not want -ldl in build except as needed for -lncurses dependency
18906 if test "$with_dlsym" = yes ; then
18907 if test $DFT_LWR_MODEL = shared || \
18908    test $DFT_LWR_MODEL = libtool ; then
18909
18910 # remove dl library from $LIBS
18911 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18912
18913 fi
18914 fi
18915 ### Set up low-level terminfo dependencies for makefiles.
18916
18917 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18918 # do not need libdl
18919 TICS_LIST=
18920 if test "$with_dlsym" = yes ; then
18921
18922 # remove dl library from $SHLIB_LIST
18923 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18924
18925 fi
18926
18927 if test "$with_ticlib" != no ; then
18928
18929         if test "$with_ticlib" != yes ; then
18930                 TICS_NAME=$with_ticlib
18931                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18932                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18933                 TICS_LIB_SUFFIX="${with_ticlib}"
18934         else
18935                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18936                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18937                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18938         fi
18939         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18940 else
18941         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18942 fi
18943
18944 if test "$with_termlib" != no ; then
18945
18946         if test "$with_termlib" != yes ; then
18947                 TINFO_NAME=$with_termlib
18948                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18949                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18950                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18951                 TINFO_LIB_SUFFIX="${with_termlib}"
18952         else
18953                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18954                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18955                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18956                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18957         fi
18958
18959         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18960         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18961         if test "$DFT_LWR_MODEL" = "libtool"; then
18962                 TEST_ARGS="${TEST_DEPS}"
18963                 TEST_ARG2="${TEST_DEP2}"
18964                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18965                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18966                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18967         else
18968                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18969                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18970                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18971                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18972                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18973         fi
18974 else
18975         # the next lines are needed for linking libtic over libncurses
18976         TINFO_NAME=${LIB_NAME}
18977         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18978         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18979         if test "$with_tic_depends" = yes ; then
18980                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18981         else
18982                 TICS_LIST="$SHLIB_LIST"
18983         fi
18984
18985         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18986 fi
18987
18988 if test "$DFT_LWR_MODEL" = shared ; then
18989         case $cf_cv_system_name in #(vi
18990         cygwin*)
18991                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18992                 TINFO_SUFFIX=.dll
18993                 ;;
18994         esac
18995 fi
18996
18997 if test "$with_dlsym" = yes ; then
18998
18999 # remove dl library from $TICS_LIST
19000 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19001
19002 fi
19003
19004 if test "$DFT_LWR_MODEL" = "libtool"; then
19005     OBJEXT=lo
19006 fi
19007
19008 # needed for Ada95
19009 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
19010
19011 case $DFT_LWR_MODEL in
19012 normal|debug|profile)
19013
19014 if test "$GCC" = yes ; then
19015         case $cf_cv_system_name in #(
19016         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19017                 LDFLAGS_STATIC=
19018                 LDFLAGS_SHARED=
19019                 ;;
19020     *)  #( normally, except when broken
19021         LDFLAGS_STATIC=-static
19022         LDFLAGS_SHARED=-dynamic
19023         ;;
19024     esac
19025 else
19026         case $cf_cv_system_name in #(
19027         aix[456]*)      #( from ld manpage
19028                 LDFLAGS_STATIC=-bstatic
19029                 LDFLAGS_SHARED=-bdynamic
19030                 ;;
19031         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19032                 # We could also use just "archive" and "shared".
19033                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19034                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19035                 ;;
19036         irix*)          #( from ld manpage IRIX64
19037                 LDFLAGS_STATIC=-Bstatic
19038                 LDFLAGS_SHARED=-Bdynamic
19039                 ;;
19040         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19041                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19042                 LDFLAGS_STATIC=-noso
19043                 LDFLAGS_SHARED=-so_archive
19044                 ;;
19045         solaris2*)
19046                 LDFLAGS_STATIC=-Bstatic
19047                 LDFLAGS_SHARED=-Bdynamic
19048                 ;;
19049         esac
19050 fi
19051
19052 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19053 then
19054         echo "$as_me:19054: checking if linker supports switching between static/dynamic" >&5
19055 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19056
19057         rm -f libconftest.a
19058         cat >conftest.$ac_ext <<EOF
19059 #line 19059 "configure"
19060 #include <stdio.h>
19061 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19062 EOF
19063         if { (eval echo "$as_me:19063: \"$ac_compile\"") >&5
19064   (eval $ac_compile) 2>&5
19065   ac_status=$?
19066   echo "$as_me:19066: \$? = $ac_status" >&5
19067   (exit $ac_status); } ; then
19068                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19069                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19070         fi
19071         rm -f conftest.*
19072
19073         cf_save_LIBS="$LIBS"
19074
19075         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19076         cat >conftest.$ac_ext <<_ACEOF
19077 #line 19077 "configure"
19078 #include "confdefs.h"
19079
19080 #line 19080 "configure"
19081 #include <stdio.h>
19082 int cf_ldflags_static(FILE *fp);
19083
19084 int
19085 main ()
19086 {
19087
19088         return cf_ldflags_static(stdin);
19089
19090   ;
19091   return 0;
19092 }
19093 _ACEOF
19094 rm -f conftest.$ac_objext conftest$ac_exeext
19095 if { (eval echo "$as_me:19095: \"$ac_link\"") >&5
19096   (eval $ac_link) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit $ac_status); } &&
19100          { ac_try='test -s conftest$ac_exeext'
19101   { (eval echo "$as_me:19101: \"$ac_try\"") >&5
19102   (eval $ac_try) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit $ac_status); }; }; then
19106   cf_ldflags_static=yes
19107 else
19108   echo "$as_me: failed program was:" >&5
19109 cat conftest.$ac_ext >&5
19110 cf_ldflags_static=no
19111 fi
19112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19113
19114         rm -f libconftest.*
19115         LIBS="$cf_save_LIBS"
19116
19117         echo "$as_me:19117: result: $cf_ldflags_static" >&5
19118 echo "${ECHO_T}$cf_ldflags_static" >&6
19119
19120         if test $cf_ldflags_static != yes
19121         then
19122                 LDFLAGS_STATIC=
19123                 LDFLAGS_SHARED=
19124         fi
19125 else
19126         LDFLAGS_STATIC=
19127         LDFLAGS_SHARED=
19128 fi
19129
19130         ;;
19131 esac
19132
19133 echo "$as_me:19133: checking where we will install curses.h" >&5
19134 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19135 test "$with_overwrite" = no && \
19136 test "x$includedir" = 'x${prefix}/include' && \
19137         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19138 echo "$as_me:19138: result: $includedir" >&5
19139 echo "${ECHO_T}$includedir" >&6
19140
19141 ### Resolve a conflict between normal and wide-curses by forcing applications
19142 ### that will need libutf8 to add it to their configure script.
19143 if test "$with_overwrite" != no ; then
19144 if test "$NCURSES_LIBUTF8" = 1 ; then
19145         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19146         { echo "$as_me:19146: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19147 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19148 fi
19149 fi
19150 WITH_OVERWRITE=$with_overwrite
19151
19152 # used to separate tack out of the tree
19153 NCURSES_TREE=
19154
19155 ### predefined stuff for the test programs
19156 cat >>confdefs.h <<\EOF
19157 #define HAVE_SLK_COLOR 1
19158 EOF
19159
19160 ### Construct the list of subdirectories for which we'll customize makefiles
19161 ### with the appropriate compile-rules.
19162
19163 echo "$as_me:19163: checking for src modules" >&5
19164 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19165
19166 # dependencies and linker-arguments for test-programs
19167 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19168 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19169 if test "$DFT_LWR_MODEL" = "libtool"; then
19170         TEST_ARGS="${TEST_DEPS}"
19171         TEST_ARG2="${TEST_DEP2}"
19172 else
19173         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19174         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19175 fi
19176
19177 cf_cv_src_modules=
19178 for cf_dir in $modules_to_build
19179 do
19180         if test -f $srcdir/$cf_dir/modules; then
19181
19182                 # We may/may not have tack in the distribution, though the
19183                 # makefile is.
19184                 if test $cf_dir = tack ; then
19185                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19186                                 continue
19187                         fi
19188                 fi
19189
19190                 if test -z "$cf_cv_src_modules"; then
19191                         cf_cv_src_modules=$cf_dir
19192                 else
19193                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19194                 fi
19195
19196                 # Make the ncurses_cfg.h file record the library interface files as
19197                 # well.  These are header files that are the same name as their
19198                 # directory.  Ncurses is the only library that does not follow
19199                 # that pattern.
19200                 if test $cf_dir = tack ; then
19201                         continue
19202                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
19203
19204 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19205
19206                         cat >>confdefs.h <<EOF
19207 #define HAVE_${cf_have_include}_H 1
19208 EOF
19209
19210                         cat >>confdefs.h <<EOF
19211 #define HAVE_LIB${cf_have_include} 1
19212 EOF
19213
19214                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
19215                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
19216                         if test "$DFT_LWR_MODEL" = "libtool"; then
19217                                 TEST_ARGS="${TEST_DEPS}"
19218                                 TEST_ARG2="${TEST_DEP2}"
19219                         else
19220                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
19221                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
19222                         fi
19223                 fi
19224         fi
19225 done
19226 echo "$as_me:19226: result: $cf_cv_src_modules" >&5
19227 echo "${ECHO_T}$cf_cv_src_modules" >&6
19228
19229 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
19230 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
19231
19232 SRC_SUBDIRS=
19233 if test "x$cf_with_manpages" != xno ; then
19234         SRC_SUBDIRS="$SRC_SUBDIRS man"
19235 fi
19236 SRC_SUBDIRS="$SRC_SUBDIRS include"
19237 for cf_dir in $cf_cv_src_modules
19238 do
19239         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
19240 done
19241 if test "x$cf_with_tests" != "xno" ; then
19242         SRC_SUBDIRS="$SRC_SUBDIRS test"
19243 fi
19244 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
19245 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
19246
19247 ADA_SUBDIRS=
19248 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
19249         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
19250         ADA_SUBDIRS="gen src"
19251         if test "x$cf_with_tests" != "xno" ; then
19252                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
19253         fi
19254 fi
19255
19256 SUB_MAKEFILES=
19257 for cf_dir in $SRC_SUBDIRS
19258 do
19259         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
19260 done
19261
19262 if test -n "$ADA_SUBDIRS"; then
19263         for cf_dir in $ADA_SUBDIRS
19264         do
19265                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
19266         done
19267
19268 fi
19269
19270 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
19271    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
19272    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
19273 fi
19274
19275 DIRS_TO_MAKE="lib"
19276 for cf_item in $cf_list_models
19277 do
19278
19279         case $cf_item in
19280         libtool) cf_subdir='obj_lo'  ;;
19281         normal)  cf_subdir='objects' ;;
19282         debug)   cf_subdir='obj_g' ;;
19283         profile) cf_subdir='obj_p' ;;
19284         shared)
19285                 case $cf_cv_system_name in #(vi
19286                 cygwin) #(vi
19287                         cf_subdir='objects' ;;
19288                 *)
19289                         cf_subdir='obj_s' ;;
19290                 esac
19291         esac
19292
19293         for cf_item2 in $DIRS_TO_MAKE
19294         do
19295                 test $cf_item2 = $cf_subdir && break
19296         done
19297         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
19298 done
19299 for cf_dir in $DIRS_TO_MAKE
19300 do
19301         test ! -d $cf_dir && mkdir $cf_dir
19302 done
19303
19304 # symbols that differ when compiling Ada95 by itself.
19305 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
19306
19307 # values to use as strings
19308 cat >>confdefs.h <<EOF
19309 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19310 EOF
19311
19312 cat >>confdefs.h <<EOF
19313 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
19314 EOF
19315
19316 ### Now that we're done running tests, add the compiler-warnings, if any
19317
19318 cf_fix_cppflags=no
19319 cf_new_cflags=
19320 cf_new_cppflags=
19321 cf_new_extra_cppflags=
19322
19323 for cf_add_cflags in $EXTRA_CFLAGS
19324 do
19325 case $cf_fix_cppflags in
19326 no)
19327         case $cf_add_cflags in #(vi
19328         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
19329                 case $cf_add_cflags in
19330                 -D*)
19331                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19332
19333                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19334                                 && test -z "${cf_tst_cflags}" \
19335                                 && cf_fix_cppflags=yes
19336
19337                         if test $cf_fix_cppflags = yes ; then
19338                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19339                                 continue
19340                         elif test "${cf_tst_cflags}" = "\"'" ; then
19341                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19342                                 continue
19343                         fi
19344                         ;;
19345                 esac
19346                 case "$CPPFLAGS" in
19347                 *$cf_add_cflags) #(vi
19348                         ;;
19349                 *) #(vi
19350                         case $cf_add_cflags in #(vi
19351                         -D*)
19352                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19353
19354 CPPFLAGS=`echo "$CPPFLAGS" | \
19355         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19356                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19357
19358                                 ;;
19359                         esac
19360                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19361                         ;;
19362                 esac
19363                 ;;
19364         *)
19365                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19366                 ;;
19367         esac
19368         ;;
19369 yes)
19370         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19371
19372         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19373
19374         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19375                 && test -z "${cf_tst_cflags}" \
19376                 && cf_fix_cppflags=no
19377         ;;
19378 esac
19379 done
19380
19381 if test -n "$cf_new_cflags" ; then
19382
19383         CFLAGS="$CFLAGS $cf_new_cflags"
19384 fi
19385
19386 if test -n "$cf_new_cppflags" ; then
19387
19388         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19389 fi
19390
19391 if test -n "$cf_new_extra_cppflags" ; then
19392
19393         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19394 fi
19395
19396 ### Define substitutions for header files to avoid name-pollution
19397
19398 if test "$cf_cv_have_tcgetattr" = yes ; then
19399         HAVE_TCGETATTR=1
19400 else
19401         HAVE_TCGETATTR=0
19402 fi
19403
19404 if test "$ac_cv_header_termio_h" = yes ; then
19405         HAVE_TERMIO_H=1
19406 else
19407         HAVE_TERMIO_H=0
19408 fi
19409
19410 if test "$ac_cv_header_termios_h" = yes ; then
19411         HAVE_TERMIOS_H=1
19412 else
19413         HAVE_TERMIOS_H=0
19414 fi
19415
19416 ################################################################################
19417 test "$use_database" = yes && \
19418 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
19419
19420 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
19421 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
19422
19423 if test x"$enable_pc_files" = xyes ; then \
19424 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
19425 MAKE_PC_FILES=
19426 else
19427 MAKE_PC_FILES="#"
19428 fi
19429
19430 # Extract the first word of "tic", so it can be a program name with args.
19431 set dummy tic; ac_word=$2
19432 echo "$as_me:19432: checking for $ac_word" >&5
19433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19434 if test "${ac_cv_path_TIC_PATH+set}" = set; then
19435   echo $ECHO_N "(cached) $ECHO_C" >&6
19436 else
19437   case $TIC_PATH in
19438   [\\/]* | ?:[\\/]*)
19439   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
19440   ;;
19441   *)
19442   ac_save_IFS=$IFS; IFS=$ac_path_separator
19443 ac_dummy="$PATH:/usr/local/ncurses/bin"
19444 for ac_dir in $ac_dummy; do
19445   IFS=$ac_save_IFS
19446   test -z "$ac_dir" && ac_dir=.
19447   if $as_executable_p "$ac_dir/$ac_word"; then
19448    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
19449    echo "$as_me:19449: found $ac_dir/$ac_word" >&5
19450    break
19451 fi
19452 done
19453
19454   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
19455   ;;
19456 esac
19457 fi
19458 TIC_PATH=$ac_cv_path_TIC_PATH
19459
19460 if test -n "$TIC_PATH"; then
19461   echo "$as_me:19461: result: $TIC_PATH" >&5
19462 echo "${ECHO_T}$TIC_PATH" >&6
19463 else
19464   echo "$as_me:19464: result: no" >&5
19465 echo "${ECHO_T}no" >&6
19466 fi
19467
19468 if test -n "$FALLBACK_LIST"
19469 then
19470         if test "$TIC_PATH" = unknown
19471         then
19472                 { echo "$as_me:19472: WARNING: no tic program found for fallbacks" >&5
19473 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
19474         fi
19475 fi
19476
19477 if test "x$cf_with_tests" != xno ; then
19478         MAKE_TESTS=
19479 else
19480         MAKE_TESTS="#"
19481 fi
19482
19483 ADAHTML_DIR=../../doc/html/ada
19484
19485 SUB_SCRIPTS=
19486 case $cf_cv_system_name in #(vi
19487 *mingw32*) #(vi
19488         SUB_SCRIPTS="mk-dlls.sh"
19489         ;;
19490 esac
19491
19492 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"
19493 ac_config_commands="$ac_config_commands default"
19494 cat >confcache <<\_ACEOF
19495 # This file is a shell script that caches the results of configure
19496 # tests run on this system so they can be shared between configure
19497 # scripts and configure runs, see configure's option --config-cache.
19498 # It is not useful on other systems.  If it contains results you don't
19499 # want to keep, you may remove or edit it.
19500 #
19501 # config.status only pays attention to the cache file if you give it
19502 # the --recheck option to rerun configure.
19503 #
19504 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19505 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19506 # following values.
19507
19508 _ACEOF
19509
19510 # The following way of writing the cache mishandles newlines in values,
19511 # but we know of no workaround that is simple, portable, and efficient.
19512 # So, don't put newlines in cache variables' values.
19513 # Ultrix sh set writes to stderr and can't be redirected directly,
19514 # and sets the high bit in the cache file unless we assign to the vars.
19515 {
19516   (set) 2>&1 |
19517     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19518     *ac_space=\ *)
19519       # `set' does not quote correctly, so add quotes (double-quote
19520       # substitution turns \\\\ into \\, and sed turns \\ into \).
19521       sed -n \
19522         "s/'/'\\\\''/g;
19523           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19524       ;;
19525     *)
19526       # `set' quotes correctly as required by POSIX, so do not add quotes.
19527       sed -n \
19528         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19529       ;;
19530     esac;
19531 } |
19532   sed '
19533      t clear
19534      : clear
19535      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19536      t end
19537      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19538      : end' >>confcache
19539 if cmp -s $cache_file confcache; then :; else
19540   if test -w $cache_file; then
19541     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19542     cat confcache >$cache_file
19543   else
19544     echo "not updating unwritable cache $cache_file"
19545   fi
19546 fi
19547 rm -f confcache
19548
19549 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19550 # Let make expand exec_prefix.
19551 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19552
19553 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19554 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19555 # trailing colons and then remove the whole line if VPATH becomes empty
19556 # (actually we leave an empty line to preserve line numbers).
19557 if test "x$srcdir" = x.; then
19558   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19559 s/:*\$(srcdir):*/:/;
19560 s/:*\${srcdir}:*/:/;
19561 s/:*@srcdir@:*/:/;
19562 s/^\([^=]*=[    ]*\):*/\1/;
19563 s/:*$//;
19564 s/^[^=]*=[      ]*$//;
19565 }'
19566 fi
19567
19568 DEFS=-DHAVE_CONFIG_H
19569
19570 : ${CONFIG_STATUS=./config.status}
19571 ac_clean_files_save=$ac_clean_files
19572 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19573 { echo "$as_me:19573: creating $CONFIG_STATUS" >&5
19574 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19575 cat >$CONFIG_STATUS <<_ACEOF
19576 #! $SHELL
19577 # Generated automatically by configure.
19578 # Run this file to recreate the current configuration.
19579 # Compiler output produced by configure, useful for debugging
19580 # configure, is in config.log if it exists.
19581
19582 debug=false
19583 SHELL=\${CONFIG_SHELL-$SHELL}
19584 ac_cs_invocation="\$0 \$@"
19585
19586 _ACEOF
19587
19588 cat >>$CONFIG_STATUS <<\_ACEOF
19589 # Be Bourne compatible
19590 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19591   emulate sh
19592   NULLCMD=:
19593 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19594   set -o posix
19595 fi
19596
19597 # Name of the executable.
19598 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19599
19600 if expr a : '\(a\)' >/dev/null 2>&1; then
19601   as_expr=expr
19602 else
19603   as_expr=false
19604 fi
19605
19606 rm -f conf$$ conf$$.exe conf$$.file
19607 echo >conf$$.file
19608 if ln -s conf$$.file conf$$ 2>/dev/null; then
19609   # We could just check for DJGPP; but this test a) works b) is more generic
19610   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19611   if test -f conf$$.exe; then
19612     # Don't use ln at all; we don't have any links
19613     as_ln_s='cp -p'
19614   else
19615     as_ln_s='ln -s'
19616   fi
19617 elif ln conf$$.file conf$$ 2>/dev/null; then
19618   as_ln_s=ln
19619 else
19620   as_ln_s='cp -p'
19621 fi
19622 rm -f conf$$ conf$$.exe conf$$.file
19623
19624 as_executable_p="test -f"
19625
19626 # Support unset when possible.
19627 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19628   as_unset=unset
19629 else
19630   as_unset=false
19631 fi
19632
19633 # NLS nuisances.
19634 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19635 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19636 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19637 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19638 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19639 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19640 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19641 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19642
19643 # IFS
19644 # We need space, tab and new line, in precisely that order.
19645 as_nl='
19646 '
19647 IFS="   $as_nl"
19648
19649 # CDPATH.
19650 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19651
19652 exec 6>&1
19653
19654 _ACEOF
19655
19656 # Files that config.status was made for.
19657 if test -n "$ac_config_files"; then
19658   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19659 fi
19660
19661 if test -n "$ac_config_headers"; then
19662   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19663 fi
19664
19665 if test -n "$ac_config_links"; then
19666   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19667 fi
19668
19669 if test -n "$ac_config_commands"; then
19670   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19671 fi
19672
19673 cat >>$CONFIG_STATUS <<\EOF
19674
19675 ac_cs_usage="\
19676 \`$as_me' instantiates files from templates according to the
19677 current configuration.
19678
19679 Usage: $0 [OPTIONS] [FILE]...
19680
19681   -h, --help       print this help, then exit
19682   -V, --version    print version number, then exit
19683   -d, --debug      don't remove temporary files
19684       --recheck    update $as_me by reconfiguring in the same conditions
19685   --file=FILE[:TEMPLATE]
19686                    instantiate the configuration file FILE
19687   --header=FILE[:TEMPLATE]
19688                    instantiate the configuration header FILE
19689
19690 Configuration files:
19691 $config_files
19692
19693 Configuration headers:
19694 $config_headers
19695
19696 Configuration commands:
19697 $config_commands
19698
19699 Report bugs to <dickey@invisible-island.net>."
19700 EOF
19701
19702 cat >>$CONFIG_STATUS <<EOF
19703 ac_cs_version="\\
19704 config.status
19705 configured by $0, generated by GNU Autoconf 2.52.20101002,
19706   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19707
19708 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19709 Free Software Foundation, Inc.
19710 This config.status script is free software; the Free Software Foundation
19711 gives unlimited permission to copy, distribute and modify it."
19712 srcdir=$srcdir
19713 INSTALL="$INSTALL"
19714 EOF
19715
19716 cat >>$CONFIG_STATUS <<\EOF
19717 # If no file are specified by the user, then we need to provide default
19718 # value.  By we need to know if files were specified by the user.
19719 ac_need_defaults=:
19720 while test $# != 0
19721 do
19722   case $1 in
19723   --*=*)
19724     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19725     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19726     shift
19727     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19728     shift
19729     ;;
19730   -*);;
19731   *) # This is not an option, so the user has probably given explicit
19732      # arguments.
19733      ac_need_defaults=false;;
19734   esac
19735
19736   case $1 in
19737   # Handling of the options.
19738 EOF
19739 cat >>$CONFIG_STATUS <<EOF
19740   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19741     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19742     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19743 EOF
19744 cat >>$CONFIG_STATUS <<\EOF
19745   --version | --vers* | -V )
19746     echo "$ac_cs_version"; exit 0 ;;
19747   --he | --h)
19748     # Conflict between --help and --header
19749     { { echo "$as_me:19749: error: ambiguous option: $1
19750 Try \`$0 --help' for more information." >&5
19751 echo "$as_me: error: ambiguous option: $1
19752 Try \`$0 --help' for more information." >&2;}
19753    { (exit 1); exit 1; }; };;
19754   --help | --hel | -h )
19755     echo "$ac_cs_usage"; exit 0 ;;
19756   --debug | --d* | -d )
19757     debug=: ;;
19758   --file | --fil | --fi | --f )
19759     shift
19760     CONFIG_FILES="$CONFIG_FILES $1"
19761     ac_need_defaults=false;;
19762   --header | --heade | --head | --hea )
19763     shift
19764     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19765     ac_need_defaults=false;;
19766
19767   # This is an error.
19768   -*) { { echo "$as_me:19768: error: unrecognized option: $1
19769 Try \`$0 --help' for more information." >&5
19770 echo "$as_me: error: unrecognized option: $1
19771 Try \`$0 --help' for more information." >&2;}
19772    { (exit 1); exit 1; }; } ;;
19773
19774   *) ac_config_targets="$ac_config_targets $1" ;;
19775
19776   esac
19777   shift
19778 done
19779
19780 exec 5>>config.log
19781 cat >&5 << _ACEOF
19782
19783 ## ----------------------- ##
19784 ## Running config.status.  ##
19785 ## ----------------------- ##
19786
19787 This file was extended by $as_me 2.52.20101002, executed with
19788   CONFIG_FILES    = $CONFIG_FILES
19789   CONFIG_HEADERS  = $CONFIG_HEADERS
19790   CONFIG_LINKS    = $CONFIG_LINKS
19791   CONFIG_COMMANDS = $CONFIG_COMMANDS
19792   > $ac_cs_invocation
19793 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19794
19795 _ACEOF
19796 EOF
19797
19798 cat >>$CONFIG_STATUS <<EOF
19799 #
19800 # INIT-COMMANDS section.
19801 #
19802
19803 ### Special initialization commands, used to pass information from the
19804 ### configuration-run into config.status
19805
19806 AWK="$AWK"
19807 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19808 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19809 ECHO_LINK="$ECHO_LINK"
19810 LDCONFIG="$LDCONFIG"
19811 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19812 LIB_NAME="$LIB_NAME"
19813 LIB_SUBSETS="$LIB_SUBSETS"
19814 LIB_SUFFIX="$LIB_SUFFIX"
19815 LIB_TRACING="$LIB_TRACING"
19816 LN_S="$LN_S"
19817 MAKE_TERMINFO="$MAKE_TERMINFO"
19818 NCURSES_MAJOR="$NCURSES_MAJOR"
19819 NCURSES_MINOR="$NCURSES_MINOR"
19820 NCURSES_OSPEED="$NCURSES_OSPEED"
19821 NCURSES_PATCH="$NCURSES_PATCH"
19822 SRC_SUBDIRS="$SRC_SUBDIRS"
19823 TERMINFO="$TERMINFO"
19824 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19825 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19826 TICS_NAME="$TICS_NAME"
19827 TIC_PATH="$TIC_PATH"
19828 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19829 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19830 TINFO_NAME="$TINFO_NAME"
19831 TINFO_SUFFIX="$TINFO_SUFFIX"
19832 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19833 WITH_CURSES_H="$with_curses_h"
19834 WITH_ECHO="$with_echo"
19835 WITH_OVERWRITE="$with_overwrite"
19836 cf_LIST_MODELS="$cf_list_models"
19837 cf_cv_abi_version="$cf_cv_abi_version"
19838 cf_cv_do_relink="$cf_cv_do_relink"
19839 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19840 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19841 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19842 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19843 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19844 cf_cv_rel_version="$cf_cv_rel_version"
19845 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19846 cf_cv_shared_soname='$cf_cv_shared_soname'
19847 cf_cv_shlib_version="$cf_cv_shlib_version"
19848 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19849 cf_cv_system_name="$cf_cv_system_name"
19850 cf_with_ada="$cf_with_ada"
19851 cf_with_cxx_binding="$cf_with_cxx_binding"
19852 cf_with_manpages="$cf_with_manpages"
19853 cf_with_tests="$cf_with_tests"
19854 host="$host"
19855 target="$target"
19856
19857 EOF
19858
19859 cat >>$CONFIG_STATUS <<\EOF
19860 for ac_config_target in $ac_config_targets
19861 do
19862   case "$ac_config_target" in
19863   # Handling of arguments.
19864   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19865   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19866   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19867   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19868   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19869   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
19870   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19871   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19872   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19873   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19874   *) { { echo "$as_me:19874: error: invalid argument: $ac_config_target" >&5
19875 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19876    { (exit 1); exit 1; }; };;
19877   esac
19878 done
19879
19880 # If the user did not use the arguments to specify the items to instantiate,
19881 # then the envvar interface is used.  Set only those that are not.
19882 # We use the long form for the default assignment because of an extremely
19883 # bizarre bug on SunOS 4.1.3.
19884 if $ac_need_defaults; then
19885   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19886   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19887   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19888 fi
19889
19890 # Create a temporary directory, and hook for its removal unless debugging.
19891 $debug ||
19892 {
19893   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19894   trap '{ (exit 1); exit 1; }' 1 2 13 15
19895 }
19896
19897 # Create a (secure) tmp directory for tmp files.
19898 : ${TMPDIR=/tmp}
19899 {
19900   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19901   test -n "$tmp" && test -d "$tmp"
19902 }  ||
19903 {
19904   tmp=$TMPDIR/cs$$-$RANDOM
19905   (umask 077 && mkdir $tmp)
19906 } ||
19907 {
19908    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19909    { (exit 1); exit 1; }
19910 }
19911
19912 EOF
19913
19914 cat >>$CONFIG_STATUS <<EOF
19915
19916 #
19917 # CONFIG_FILES section.
19918 #
19919
19920 # No need to generate the scripts if there are no CONFIG_FILES.
19921 # This happens for instance when ./config.status config.h
19922 if test -n "\$CONFIG_FILES"; then
19923   # Protect against being on the right side of a sed subst in config.status.
19924   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19925    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19926 s,@SHELL@,$SHELL,;t t
19927 s,@exec_prefix@,$exec_prefix,;t t
19928 s,@prefix@,$prefix,;t t
19929 s,@program_transform_name@,$program_transform_name,;t t
19930 s,@bindir@,$bindir,;t t
19931 s,@sbindir@,$sbindir,;t t
19932 s,@libexecdir@,$libexecdir,;t t
19933 s,@datadir@,$datadir,;t t
19934 s,@sysconfdir@,$sysconfdir,;t t
19935 s,@sharedstatedir@,$sharedstatedir,;t t
19936 s,@localstatedir@,$localstatedir,;t t
19937 s,@libdir@,$libdir,;t t
19938 s,@includedir@,$includedir,;t t
19939 s,@oldincludedir@,$oldincludedir,;t t
19940 s,@infodir@,$infodir,;t t
19941 s,@mandir@,$mandir,;t t
19942 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19943 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19944 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19945 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19946 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19947 s,@build_alias@,$build_alias,;t t
19948 s,@host_alias@,$host_alias,;t t
19949 s,@target_alias@,$target_alias,;t t
19950 s,@ECHO_C@,$ECHO_C,;t t
19951 s,@ECHO_N@,$ECHO_N,;t t
19952 s,@ECHO_T@,$ECHO_T,;t t
19953 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19954 s,@DEFS@,$DEFS,;t t
19955 s,@LIBS@,$LIBS,;t t
19956 s,@top_builddir@,$top_builddir,;t t
19957 s,@EGREP@,$EGREP,;t t
19958 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19959 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19960 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19961 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19962 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19963 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19964 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19965 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19966 s,@build@,$build,;t t
19967 s,@build_cpu@,$build_cpu,;t t
19968 s,@build_vendor@,$build_vendor,;t t
19969 s,@build_os@,$build_os,;t t
19970 s,@host@,$host,;t t
19971 s,@host_cpu@,$host_cpu,;t t
19972 s,@host_vendor@,$host_vendor,;t t
19973 s,@host_os@,$host_os,;t t
19974 s,@target@,$target,;t t
19975 s,@target_cpu@,$target_cpu,;t t
19976 s,@target_vendor@,$target_vendor,;t t
19977 s,@target_os@,$target_os,;t t
19978 s,@CC@,$CC,;t t
19979 s,@CFLAGS@,$CFLAGS,;t t
19980 s,@LDFLAGS@,$LDFLAGS,;t t
19981 s,@CPPFLAGS@,$CPPFLAGS,;t t
19982 s,@ac_ct_CC@,$ac_ct_CC,;t t
19983 s,@EXEEXT@,$EXEEXT,;t t
19984 s,@OBJEXT@,$OBJEXT,;t t
19985 s,@CPP@,$CPP,;t t
19986 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19987 s,@PROG_EXT@,$PROG_EXT,;t t
19988 s,@LDCONFIG@,$LDCONFIG,;t t
19989 s,@CXX@,$CXX,;t t
19990 s,@CXXFLAGS@,$CXXFLAGS,;t t
19991 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19992 s,@AWK@,$AWK,;t t
19993 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19994 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19995 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19996 s,@LINT@,$LINT,;t t
19997 s,@LINT_OPTS@,$LINT_OPTS,;t t
19998 s,@LN_S@,$LN_S,;t t
19999 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20000 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20001 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20002 s,@SET_MAKE@,$SET_MAKE,;t t
20003 s,@CTAGS@,$CTAGS,;t t
20004 s,@ETAGS@,$ETAGS,;t t
20005 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20006 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20007 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20008 s,@RANLIB@,$RANLIB,;t t
20009 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20010 s,@LD@,$LD,;t t
20011 s,@ac_ct_LD@,$ac_ct_LD,;t t
20012 s,@AR@,$AR,;t t
20013 s,@ac_ct_AR@,$ac_ct_AR,;t t
20014 s,@ARFLAGS@,$ARFLAGS,;t t
20015 s,@DESTDIR@,$DESTDIR,;t t
20016 s,@BUILD_CC@,$BUILD_CC,;t t
20017 s,@BUILD_CPP@,$BUILD_CPP,;t t
20018 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20019 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20020 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20021 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20022 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20023 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20024 s,@cf_list_models@,$cf_list_models,;t t
20025 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20026 s,@LIBTOOL@,$LIBTOOL,;t t
20027 s,@LT_UNDEF@,$LT_UNDEF,;t t
20028 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20029 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20030 s,@LIB_CREATE@,$LIB_CREATE,;t t
20031 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20032 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20033 s,@LIB_PREP@,$LIB_PREP,;t t
20034 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20035 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20036 s,@LIB_LINK@,$LIB_LINK,;t t
20037 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20038 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20039 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20040 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20041 s,@TICS_NAME@,$TICS_NAME,;t t
20042 s,@TINFO_NAME@,$TINFO_NAME,;t t
20043 s,@LIB_NAME@,$LIB_NAME,;t t
20044 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20045 s,@CC_G_OPT@,$CC_G_OPT,;t t
20046 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20047 s,@LD_MODEL@,$LD_MODEL,;t t
20048 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20049 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20050 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20051 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20052 s,@LINK_PROGS@,$LINK_PROGS,;t t
20053 s,@LINK_TESTS@,$LINK_TESTS,;t t
20054 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20055 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20056 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20057 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20058 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20059 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20060 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20061 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20062 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20063 s,@TERMINFO@,$TERMINFO,;t t
20064 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20065 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20066 s,@TERMPATH@,$TERMPATH,;t t
20067 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20068 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20069 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20070 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20071 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20072 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20073 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20074 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20075 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20076 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20077 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20078 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
20079 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
20080 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
20081 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
20082 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
20083 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20084 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
20085 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
20086 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
20087 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20088 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
20089 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
20090 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
20091 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
20092 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
20093 s,@PTHREAD@,$PTHREAD,;t t
20094 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20095 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
20096 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
20097 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
20098 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20099 s,@ECHO_LINK@,$ECHO_LINK,;t t
20100 s,@ADAFLAGS@,$ADAFLAGS,;t t
20101 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20102 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
20103 s,@ADA_TRACE@,$ADA_TRACE,;t t
20104 s,@MATH_LIB@,$MATH_LIB,;t t
20105 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
20106 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
20107 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
20108 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
20109 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
20110 s,@TEST_LIBS@,$TEST_LIBS,;t t
20111 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20112 s,@CXXCPP@,$CXXCPP,;t t
20113 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
20114 s,@CXX_AR@,$CXX_AR,;t t
20115 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
20116 s,@CXXLIBS@,$CXXLIBS,;t t
20117 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
20118 s,@gnat_exists@,$gnat_exists,;t t
20119 s,@M4_exists@,$M4_exists,;t t
20120 s,@cf_ada_make@,$cf_ada_make,;t t
20121 s,@cf_compile_generics@,$cf_compile_generics,;t t
20122 s,@cf_generic_objects@,$cf_generic_objects,;t t
20123 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20124 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20125 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20126 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20127 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20128 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20129 s,@cf_ada_package@,$cf_ada_package,;t t
20130 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20131 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20132 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20133 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20134 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20135 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20136 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20137 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20138 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20139 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20140 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20141 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20142 s,@TICS_ARGS@,$TICS_ARGS,;t t
20143 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20144 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20145 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20146 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
20147 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
20148 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20149 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20150 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20151 s,@TICS_LIST@,$TICS_LIST,;t t
20152 s,@TINFO_LIST@,$TINFO_LIST,;t t
20153 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20154 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20155 s,@TEST_ARGS@,$TEST_ARGS,;t t
20156 s,@TEST_DEPS@,$TEST_DEPS,;t t
20157 s,@TEST_ARG2@,$TEST_ARG2,;t t
20158 s,@TEST_DEP2@,$TEST_DEP2,;t t
20159 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20160 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20161 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20162 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20163 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20164 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20165 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20166 s,@cross_compiling@,$cross_compiling,;t t
20167 s,@TIC_PATH@,$TIC_PATH,;t t
20168 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20169 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20170 CEOF
20171
20172 EOF
20173
20174   cat >>$CONFIG_STATUS <<\EOF
20175   # Split the substitutions into bite-sized pieces for seds with
20176   # small command number limits, like on Digital OSF/1 and HP-UX.
20177   ac_max_sed_lines=48
20178   ac_sed_frag=1 # Number of current file.
20179   ac_beg=1 # First line for current file.
20180   ac_end=$ac_max_sed_lines # Line after last line for current file.
20181   ac_more_lines=:
20182   ac_sed_cmds=
20183   while $ac_more_lines; do
20184     if test $ac_beg -gt 1; then
20185       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20186     else
20187       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20188     fi
20189     if test ! -s $tmp/subs.frag; then
20190       ac_more_lines=false
20191     else
20192       # The purpose of the label and of the branching condition is to
20193       # speed up the sed processing (if there are no `@' at all, there
20194       # is no need to browse any of the substitutions).
20195       # These are the two extra sed commands mentioned above.
20196       (echo ':t
20197   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20198       if test -z "$ac_sed_cmds"; then
20199         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20200       else
20201         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20202       fi
20203       ac_sed_frag=`expr $ac_sed_frag + 1`
20204       ac_beg=$ac_end
20205       ac_end=`expr $ac_end + $ac_max_sed_lines`
20206     fi
20207   done
20208   if test -z "$ac_sed_cmds"; then
20209     ac_sed_cmds=cat
20210   fi
20211 fi # test -n "$CONFIG_FILES"
20212
20213 EOF
20214 cat >>$CONFIG_STATUS <<\EOF
20215 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20216   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20217   case $ac_file in
20218   - | *:- | *:-:* ) # input from stdin
20219         cat >$tmp/stdin
20220         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20221         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20222   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20223         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20224   * )   ac_file_in=$ac_file.in ;;
20225   esac
20226
20227   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20228   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20229          X"$ac_file" : 'X\(//\)[^/]' \| \
20230          X"$ac_file" : 'X\(//\)$' \| \
20231          X"$ac_file" : 'X\(/\)' \| \
20232          .     : '\(.\)' 2>/dev/null ||
20233 echo X"$ac_file" |
20234     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20235           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20236           /^X\(\/\/\)$/{ s//\1/; q; }
20237           /^X\(\/\).*/{ s//\1/; q; }
20238           s/.*/./; q'`
20239   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20240     { case "$ac_dir" in
20241   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20242   *)                      as_incr_dir=.;;
20243 esac
20244 as_dummy="$ac_dir"
20245 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20246   case $as_mkdir_dir in
20247     # Skip DOS drivespec
20248     ?:) as_incr_dir=$as_mkdir_dir ;;
20249     *)
20250       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20251       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20252     ;;
20253   esac
20254 done; }
20255
20256     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20257     # A "../" for each directory in $ac_dir_suffix.
20258     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20259   else
20260     ac_dir_suffix= ac_dots=
20261   fi
20262
20263   case $srcdir in
20264   .)  ac_srcdir=.
20265       if test -z "$ac_dots"; then
20266          ac_top_srcdir=.
20267       else
20268          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20269       fi ;;
20270   [\\/]* | ?:[\\/]* )
20271       ac_srcdir=$srcdir$ac_dir_suffix;
20272       ac_top_srcdir=$srcdir ;;
20273   *) # Relative path.
20274     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20275     ac_top_srcdir=$ac_dots$srcdir ;;
20276   esac
20277
20278   case $INSTALL in
20279   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20280   *) ac_INSTALL=$ac_dots$INSTALL ;;
20281   esac
20282
20283   if test x"$ac_file" != x-; then
20284     { echo "$as_me:20284: creating $ac_file" >&5
20285 echo "$as_me: creating $ac_file" >&6;}
20286     rm -f "$ac_file"
20287   fi
20288   # Let's still pretend it is `configure' which instantiates (i.e., don't
20289   # use $as_me), people would be surprised to read:
20290   #    /* config.h.  Generated automatically by config.status.  */
20291   configure_input="Generated automatically from `echo $ac_file_in |
20292                                                  sed 's,.*/,,'` by configure."
20293
20294   # First look for the input files in the build tree, otherwise in the
20295   # src tree.
20296   ac_file_inputs=`IFS=:
20297     for f in $ac_file_in; do
20298       case $f in
20299       -) echo $tmp/stdin ;;
20300       [\\/$]*)
20301          # Absolute (can't be DOS-style, as IFS=:)
20302          test -f "$f" || { { echo "$as_me:20302: error: cannot find input file: $f" >&5
20303 echo "$as_me: error: cannot find input file: $f" >&2;}
20304    { (exit 1); exit 1; }; }
20305          echo $f;;
20306       *) # Relative
20307          if test -f "$f"; then
20308            # Build tree
20309            echo $f
20310          elif test -f "$srcdir/$f"; then
20311            # Source tree
20312            echo $srcdir/$f
20313          else
20314            # /dev/null tree
20315            { { echo "$as_me:20315: error: cannot find input file: $f" >&5
20316 echo "$as_me: error: cannot find input file: $f" >&2;}
20317    { (exit 1); exit 1; }; }
20318          fi;;
20319       esac
20320     done` || { (exit 1); exit 1; }
20321 EOF
20322 cat >>$CONFIG_STATUS <<EOF
20323   sed "$ac_vpsub
20324 $extrasub
20325 EOF
20326 cat >>$CONFIG_STATUS <<\EOF
20327 :t
20328 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20329 s,@configure_input@,$configure_input,;t t
20330 s,@srcdir@,$ac_srcdir,;t t
20331 s,@top_srcdir@,$ac_top_srcdir,;t t
20332 s,@INSTALL@,$ac_INSTALL,;t t
20333 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20334   rm -f $tmp/stdin
20335   if test x"$ac_file" != x-; then
20336     mv $tmp/out $ac_file
20337   else
20338     cat $tmp/out
20339     rm -f $tmp/out
20340   fi
20341
20342 done
20343 EOF
20344 cat >>$CONFIG_STATUS <<\EOF
20345
20346 #
20347 # CONFIG_HEADER section.
20348 #
20349
20350 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20351 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20352 #
20353 # ac_d sets the value in "#define NAME VALUE" lines.
20354 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20355 ac_dB='[        ].*$,\1#\2'
20356 ac_dC=' '
20357 ac_dD=',;t'
20358 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20359 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20360 ac_iB='\([      ]\),\1#\2define\3'
20361 ac_iC=' '
20362 ac_iD='\4,;t'
20363 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20364 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20365 ac_uB='$,\1#\2define\3'
20366 ac_uC=' '
20367 ac_uD=',;t'
20368
20369 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20370   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20371   case $ac_file in
20372   - | *:- | *:-:* ) # input from stdin
20373         cat >$tmp/stdin
20374         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20375         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20376   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20377         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20378   * )   ac_file_in=$ac_file.in ;;
20379   esac
20380
20381   test x"$ac_file" != x- && { echo "$as_me:20381: creating $ac_file" >&5
20382 echo "$as_me: creating $ac_file" >&6;}
20383
20384   # First look for the input files in the build tree, otherwise in the
20385   # src tree.
20386   ac_file_inputs=`IFS=:
20387     for f in $ac_file_in; do
20388       case $f in
20389       -) echo $tmp/stdin ;;
20390       [\\/$]*)
20391          # Absolute (can't be DOS-style, as IFS=:)
20392          test -f "$f" || { { echo "$as_me:20392: error: cannot find input file: $f" >&5
20393 echo "$as_me: error: cannot find input file: $f" >&2;}
20394    { (exit 1); exit 1; }; }
20395          echo $f;;
20396       *) # Relative
20397          if test -f "$f"; then
20398            # Build tree
20399            echo $f
20400          elif test -f "$srcdir/$f"; then
20401            # Source tree
20402            echo $srcdir/$f
20403          else
20404            # /dev/null tree
20405            { { echo "$as_me:20405: error: cannot find input file: $f" >&5
20406 echo "$as_me: error: cannot find input file: $f" >&2;}
20407    { (exit 1); exit 1; }; }
20408          fi;;
20409       esac
20410     done` || { (exit 1); exit 1; }
20411   # Remove the trailing spaces.
20412   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20413
20414 EOF
20415
20416 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
20417 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
20418 # be either 'cat' or 'sort'.
20419 cat confdefs.h | uniq >conftest.vals
20420
20421 # Break up conftest.vals because some shells have a limit on
20422 # the size of here documents, and old seds have small limits too.
20423
20424 rm -f conftest.tail
20425 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
20426 while grep . conftest.vals >/dev/null
20427 do
20428   # Write chunks of a limited-size here document to conftest.frag.
20429   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20430   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20431   echo 'CEOF' >> $CONFIG_STATUS
20432   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20433   rm -f conftest.vals
20434   mv conftest.tail conftest.vals
20435 done
20436 rm -f conftest.vals
20437
20438 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20439 # marker @DEFS@.
20440 echo '  cat >> conftest.edit <<CEOF
20441 /@DEFS@/r conftest.frag
20442 /@DEFS@/d
20443 CEOF
20444 sed -f conftest.edit $tmp/in > $tmp/out
20445 rm -f $tmp/in
20446 mv $tmp/out $tmp/in
20447 rm -f conftest.edit conftest.frag
20448 ' >> $CONFIG_STATUS
20449
20450 cat >>$CONFIG_STATUS <<\EOF
20451   # Let's still pretend it is `configure' which instantiates (i.e., don't
20452   # use $as_me), people would be surprised to read:
20453   #    /* config.h.  Generated automatically by config.status.  */
20454   if test x"$ac_file" = x-; then
20455     echo "/* Generated automatically by configure.  */" >$tmp/config.h
20456   else
20457     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
20458   fi
20459   cat $tmp/in >>$tmp/config.h
20460   rm -f $tmp/in
20461   if test x"$ac_file" != x-; then
20462     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20463       { echo "$as_me:20463: $ac_file is unchanged" >&5
20464 echo "$as_me: $ac_file is unchanged" >&6;}
20465     else
20466       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20467          X"$ac_file" : 'X\(//\)[^/]' \| \
20468          X"$ac_file" : 'X\(//\)$' \| \
20469          X"$ac_file" : 'X\(/\)' \| \
20470          .     : '\(.\)' 2>/dev/null ||
20471 echo X"$ac_file" |
20472     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20473           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20474           /^X\(\/\/\)$/{ s//\1/; q; }
20475           /^X\(\/\).*/{ s//\1/; q; }
20476           s/.*/./; q'`
20477       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20478         { case "$ac_dir" in
20479   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20480   *)                      as_incr_dir=.;;
20481 esac
20482 as_dummy="$ac_dir"
20483 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20484   case $as_mkdir_dir in
20485     # Skip DOS drivespec
20486     ?:) as_incr_dir=$as_mkdir_dir ;;
20487     *)
20488       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20489       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20490     ;;
20491   esac
20492 done; }
20493
20494       fi
20495       rm -f $ac_file
20496       mv $tmp/config.h $ac_file
20497     fi
20498   else
20499     cat $tmp/config.h
20500     rm -f $tmp/config.h
20501   fi
20502 done
20503 EOF
20504 cat >>$CONFIG_STATUS <<\EOF
20505 #
20506 # CONFIG_COMMANDS section.
20507 #
20508 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20509   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20510   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20511
20512   case $ac_dest in
20513     default )
20514 if test "x$cf_with_tests" != xno ; then
20515
20516 for cf_dir in test
20517 do
20518         if test ! -d $srcdir/$cf_dir; then
20519                 continue
20520         elif test -f $srcdir/$cf_dir/programs; then
20521                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20522         fi
20523 done
20524
20525 fi
20526
20527         case $cf_cv_system_name in #(vi
20528         OS/2*|os2*) #(vi
20529         LIB_PREFIX=''
20530         ;;
20531         *)      LIB_PREFIX='lib'
20532         ;;
20533         esac
20534 cf_prefix=$LIB_PREFIX
20535
20536 if test $cf_cv_shlib_version = cygdll ; then
20537         TINFO_NAME=$TINFO_ARG_SUFFIX
20538         TINFO_SUFFIX=.dll
20539 fi
20540
20541 if test -n "$TINFO_SUFFIX" ; then
20542         case $TINFO_SUFFIX in
20543         tw*)
20544                 TINFO_NAME="${TINFO_NAME}tw"
20545                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
20546                 ;;
20547         t*)
20548                 TINFO_NAME="${TINFO_NAME}t"
20549                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
20550                 ;;
20551         w*)
20552                 TINFO_NAME="${TINFO_NAME}w"
20553                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
20554                 ;;
20555         esac
20556 fi
20557
20558 for cf_dir in $SRC_SUBDIRS
20559 do
20560         if test ! -d $srcdir/$cf_dir ; then
20561                 continue
20562         elif test -f $srcdir/$cf_dir/modules; then
20563
20564                 SHARED_LIB=
20565                 LIBS_TO_MAKE=
20566                 for cf_item in $cf_LIST_MODELS
20567                 do
20568
20569         case $cf_item in #(vi
20570         libtool) #(vi
20571                 cf_suffix='.la'
20572                 cf_depsuf=$cf_suffix
20573                 ;;
20574         normal) #(vi
20575                 cf_suffix='.a'
20576                 cf_depsuf=$cf_suffix
20577                 ;;
20578         debug) #(vi
20579                 cf_suffix='_g.a'
20580                 cf_depsuf=$cf_suffix
20581                 ;;
20582         profile) #(vi
20583                 cf_suffix='_p.a'
20584                 cf_depsuf=$cf_suffix
20585                 ;;
20586         shared) #(vi
20587                 case $cf_cv_system_name in
20588                 aix[56]*) #(vi
20589                         cf_suffix='.a'
20590                         cf_depsuf=$cf_suffix
20591                         ;;
20592                 cygwin*) #(vi
20593                         cf_suffix='.dll'
20594                         cf_depsuf='.dll.a'
20595                         ;;
20596                 darwin*) #(vi
20597                         cf_suffix='.dylib'
20598                         cf_depsuf=$cf_suffix
20599                         ;;
20600                 hpux*) #(vi
20601                         case $target in
20602                         ia64*) #(vi
20603                                 cf_suffix='.so'
20604                                 cf_depsuf=$cf_suffix
20605                                 ;;
20606                         *) #(vi
20607                                 cf_suffix='.sl'
20608                                 cf_depsuf=$cf_suffix
20609                                 ;;
20610                         esac
20611                         ;;
20612                 *)      cf_suffix='.so'
20613                         cf_depsuf=$cf_suffix
20614                         ;;
20615                 esac
20616         esac
20617         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20618         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20619
20620                         if test $cf_item = shared ; then
20621                         if test "$cf_cv_do_symlinks" = yes ; then
20622                                 case "$cf_cv_shlib_version" in #(vi
20623                                 rel) #(vi
20624                                         case "$cf_cv_system_name" in #(vi
20625                                         darwin*)
20626                                         case .${LIB_SUFFIX} in
20627                                         .tw*)
20628                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20629                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
20630                                                 ;;
20631                                         .t*)
20632                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20633                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
20634                                                 ;;
20635                                         .w*)
20636                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20637                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20638                                                 ;;
20639                                         *)
20640                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20641                                                 ;;
20642                                         esac
20643                                         ;; #(vi
20644                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20645                                         esac
20646                                         ;;
20647                                 abi)
20648                                         case "$cf_cv_system_name" in #(vi
20649                                         darwin*)
20650                                         case .${LIB_SUFFIX} in
20651                                         .tw*)
20652                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20653                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
20654                                                 ;;
20655                                         .t*)
20656                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20657                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
20658                                                 ;;
20659                                         .w*)
20660                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20661                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20662                                                 ;;
20663                                         *)
20664                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20665                                                 ;;
20666                                         esac
20667                                         ;; #(vi
20668                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20669                                         esac
20670                                         ;;
20671                                 esac
20672                         fi
20673                         # cygwin needs import library, and has unique naming convention
20674                         # use autodetected ${cf_prefix} for import lib and static lib, but
20675                         # use 'cyg' prefix for shared lib.
20676                         if test $cf_cv_shlib_version = cygdll ; then
20677                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20678                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20679                                 continue
20680                         fi
20681                         fi
20682                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20683                 done
20684
20685                 if test $cf_dir = ncurses ; then
20686                         cf_subsets="$LIB_SUBSETS"
20687                         cf_r_parts="$cf_subsets"
20688                         cf_liblist="$LIBS_TO_MAKE"
20689
20690                         while test -n "$cf_r_parts"
20691                         do
20692                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20693                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20694                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20695                                         cf_item=
20696                                         case $cf_l_parts in #(vi
20697                                         *termlib*) #(vi
20698                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20699                                                 ;;
20700                                         *ticlib*)
20701                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20702                                                 ;;
20703                                         *)
20704                                                 break
20705                                                 ;;
20706                                         esac
20707                                         if test -n "$cf_item"; then
20708                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20709                                         fi
20710                                 else
20711                                         break
20712                                 fi
20713                         done
20714                 else
20715                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20716                 fi
20717
20718                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20719                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20720                         $cf_dir/Makefile >$cf_dir/Makefile.out
20721                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20722
20723                 $AWK -f $srcdir/mk-0th.awk \
20724                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20725                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20726
20727                 for cf_subset in $cf_subsets
20728                 do
20729                         cf_subdirs=
20730                         for cf_item in $cf_LIST_MODELS
20731                         do
20732                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20733
20734 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20735
20736         case $cf_item in #(vi
20737         libtool) #(vi
20738                 cf_suffix='.la'
20739                 cf_depsuf=$cf_suffix
20740                 ;;
20741         normal) #(vi
20742                 cf_suffix='.a'
20743                 cf_depsuf=$cf_suffix
20744                 ;;
20745         debug) #(vi
20746                 cf_suffix='_g.a'
20747                 cf_depsuf=$cf_suffix
20748                 ;;
20749         profile) #(vi
20750                 cf_suffix='_p.a'
20751                 cf_depsuf=$cf_suffix
20752                 ;;
20753         shared) #(vi
20754                 case $cf_cv_system_name in
20755                 aix[56]*) #(vi
20756                         cf_suffix='.a'
20757                         cf_depsuf=$cf_suffix
20758                         ;;
20759                 cygwin*) #(vi
20760                         cf_suffix='.dll'
20761                         cf_depsuf='.dll.a'
20762                         ;;
20763                 darwin*) #(vi
20764                         cf_suffix='.dylib'
20765                         cf_depsuf=$cf_suffix
20766                         ;;
20767                 hpux*) #(vi
20768                         case $target in
20769                         ia64*) #(vi
20770                                 cf_suffix='.so'
20771                                 cf_depsuf=$cf_suffix
20772                                 ;;
20773                         *) #(vi
20774                                 cf_suffix='.sl'
20775                                 cf_depsuf=$cf_suffix
20776                                 ;;
20777                         esac
20778                         ;;
20779                 *)      cf_suffix='.so'
20780                         cf_depsuf=$cf_suffix
20781                         ;;
20782                 esac
20783         esac
20784         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20785         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20786
20787         case $cf_item in
20788         libtool) cf_subdir='obj_lo'  ;;
20789         normal)  cf_subdir='objects' ;;
20790         debug)   cf_subdir='obj_g' ;;
20791         profile) cf_subdir='obj_p' ;;
20792         shared)
20793                 case $cf_cv_system_name in #(vi
20794                 cygwin) #(vi
20795                         cf_subdir='objects' ;;
20796                 *)
20797                         cf_subdir='obj_s' ;;
20798                 esac
20799         esac
20800
20801                         # Test for case where we build libtinfo with a different name.
20802                         cf_libname=$cf_dir
20803                         if test $cf_dir = ncurses ; then
20804                                 case $cf_subset in
20805                                 *base*)
20806                                         cf_libname=${cf_libname}$LIB_SUFFIX
20807                                         ;;
20808                                 *termlib*)
20809                                         cf_libname=$TINFO_LIB_SUFFIX
20810                                         ;;
20811                                 ticlib*)
20812                                         cf_libname=$TICS_LIB_SUFFIX
20813                                         ;;
20814                                 esac
20815                         else
20816                                 cf_libname=${cf_libname}$LIB_SUFFIX
20817                         fi
20818                         if test -n "${DFT_ARG_SUFFIX}" ; then
20819                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20820                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20821                         fi
20822
20823                         # These dependencies really are for development, not
20824                         # builds, but they are useful in porting, too.
20825                         cf_depend="../include/ncurses_cfg.h"
20826                         if test "$srcdir" = "."; then
20827                                 cf_reldir="."
20828                         else
20829                                 cf_reldir="\${srcdir}"
20830                         fi
20831
20832                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20833                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20834                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20835                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20836                         fi
20837
20838                         cf_dir_suffix=
20839                         old_cf_suffix="$cf_suffix"
20840                         if test "$cf_cv_shlib_version_infix" = yes ; then
20841                         if test -n "$LIB_SUFFIX" ; then
20842                                 case $LIB_SUFFIX in
20843                                 tw*)
20844                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
20845                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20846                                         cf_dir_suffix=tw
20847                                         ;;
20848                                 t*)
20849                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
20850                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20851                                         cf_dir_suffix=t
20852                                         ;;
20853                                 w*)
20854                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20855                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20856                                         cf_dir_suffix=w
20857                                         ;;
20858                                 esac
20859                         fi
20860                         fi
20861
20862                         $AWK -f $srcdir/mk-1st.awk \
20863                                 name=${cf_libname}${cf_dir_suffix} \
20864                                 traces=$LIB_TRACING \
20865                                 MODEL=$cf_ITEM \
20866                                 model=$cf_subdir \
20867                                 prefix=$cf_prefix \
20868                                 suffix=$cf_suffix \
20869                                 subset=$cf_subset \
20870                                 SymLink="$LN_S" \
20871                                 TermlibRoot=$TINFO_NAME \
20872                                 TermlibSuffix=$TINFO_SUFFIX \
20873                                 ShlibVer=$cf_cv_shlib_version \
20874                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20875                                 ReLink=${cf_cv_do_relink:-no} \
20876                                 DoLinks=$cf_cv_do_symlinks \
20877                                 rmSoLocs=$cf_cv_rm_so_locs \
20878                                 ldconfig="$LDCONFIG" \
20879                                 overwrite=$WITH_OVERWRITE \
20880                                 depend="$cf_depend" \
20881                                 host="$host" \
20882                                 libtool_version="$LIBTOOL_VERSION" \
20883                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20884
20885                         cf_suffix="$old_cf_suffix"
20886
20887                         for cf_subdir2 in $cf_subdirs lib
20888                         do
20889                                 test $cf_subdir = $cf_subdir2 && break
20890                         done
20891                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20892                         $AWK -f $srcdir/mk-2nd.awk \
20893                                 name=$cf_dir \
20894                                 traces=$LIB_TRACING \
20895                                 MODEL=$cf_ITEM \
20896                                 model=$cf_subdir \
20897                                 subset=$cf_subset \
20898                                 srcdir=$srcdir \
20899                                 echo=$WITH_ECHO \
20900                                 crenames=$cf_cv_prog_CC_c_o \
20901                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20902                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20903                         cf_subdirs="$cf_subdirs $cf_subdir"
20904                         done
20905                 done
20906         fi
20907
20908         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20909 done
20910
20911 for cf_dir in $SRC_SUBDIRS
20912 do
20913         if test ! -d $srcdir/$cf_dir ; then
20914                 continue
20915         fi
20916
20917         if test -f $cf_dir/Makefile ; then
20918                 case "$cf_dir" in
20919                 Ada95) #(vi
20920                         echo 'libs \' >> Makefile
20921                         echo 'install.libs \' >> Makefile
20922                         echo 'uninstall.libs ::' >> Makefile
20923                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20924                         ;;
20925                 esac
20926         fi
20927
20928         if test -f $srcdir/$cf_dir/modules; then
20929                 echo >> Makefile
20930                 if test -f $srcdir/$cf_dir/headers; then
20931 cat >> Makefile <<CF_EOF
20932 install.includes \\
20933 uninstall.includes \\
20934 CF_EOF
20935                 fi
20936 if test "$cf_dir" != "c++" ; then
20937 echo 'lint \' >> Makefile
20938 fi
20939 cat >> Makefile <<CF_EOF
20940 libs \\
20941 lintlib \\
20942 install.libs \\
20943 uninstall.libs \\
20944 install.$cf_dir \\
20945 uninstall.$cf_dir ::
20946         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20947 CF_EOF
20948         elif test -f $srcdir/$cf_dir/headers; then
20949 cat >> Makefile <<CF_EOF
20950
20951 libs \\
20952 install.libs \\
20953 uninstall.libs \\
20954 install.includes \\
20955 uninstall.includes ::
20956         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20957 CF_EOF
20958 fi
20959 done
20960
20961 cat >> Makefile <<CF_EOF
20962
20963 install.libs uninstall.libs \\
20964 install.data uninstall.data ::
20965 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20966 CF_EOF
20967
20968 if test "x$cf_with_manpages" = xyes; then
20969 cat >> Makefile <<CF_EOF
20970
20971 install.man \\
20972 uninstall.man ::
20973         cd man && \${MAKE} \${CF_MFLAGS} \$@
20974 CF_EOF
20975 fi
20976
20977 cat >> Makefile <<CF_EOF
20978
20979 distclean ::
20980         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20981         rm -f headers.sh headers.sed mk_shared_lib.sh
20982         rm -f edit_man.* man_alias.*
20983         rm -rf \${DIRS_TO_MAKE}
20984 CF_EOF
20985
20986 # Special case: tack's manpage lives in its own directory.
20987 if test "x$cf_with_manpages" = xyes; then
20988 if test -d tack ; then
20989 if test -f $srcdir/$tack.h; then
20990 cat >> Makefile <<CF_EOF
20991
20992 install.man \\
20993 uninstall.man ::
20994         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20995 CF_EOF
20996 fi
20997 fi
20998 fi
20999
21000 rm -f headers.sed headers.sh
21001
21002 echo creating headers.sh
21003 cat >headers.sh <<CF_EOF
21004 #! /bin/sh
21005 # This shell script is generated by the 'configure' script.  It is invoked in a
21006 # subdirectory of the build tree.  It generates a sed-script in the parent
21007 # directory that is used to adjust includes for header files that reside in a
21008 # subdirectory of /usr/include, etc.
21009 PRG=""
21010 while test \$# != 3
21011 do
21012 PRG="\$PRG \$1"; shift
21013 done
21014 DST=\$1
21015 REF=\$2
21016 SRC=\$3
21017 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21018 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21019 echo installing \$SRC in \$DST
21020 CF_EOF
21021
21022 if test $WITH_CURSES_H = yes; then
21023         cat >>headers.sh <<CF_EOF
21024 case \$DST in
21025 /*/include/*)
21026         END=\`basename \$DST\`
21027         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21028         do
21029                 NAME=\`basename \$i\`
21030                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21031         done
21032         ;;
21033 *)
21034         echo "" >> \$TMPSED
21035         ;;
21036 esac
21037 CF_EOF
21038
21039 else
21040         cat >>headers.sh <<CF_EOF
21041 case \$DST in
21042 /*/include/*)
21043         END=\`basename \$DST\`
21044         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21045         do
21046                 NAME=\`basename \$i\`
21047                 if test "\$NAME" = "curses.h"
21048                 then
21049                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21050                         NAME=ncurses.h
21051                 fi
21052                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21053         done
21054         ;;
21055 *)
21056         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21057         ;;
21058 esac
21059 CF_EOF
21060 fi
21061 cat >>headers.sh <<CF_EOF
21062 rm -f \$TMPSRC
21063 sed -f \$TMPSED \$SRC > \$TMPSRC
21064 NAME=\`basename \$SRC\`
21065 CF_EOF
21066 if test $WITH_CURSES_H != yes; then
21067         cat >>headers.sh <<CF_EOF
21068 test "\$NAME" = "curses.h" && NAME=ncurses.h
21069 CF_EOF
21070 fi
21071 cat >>headers.sh <<CF_EOF
21072 # Just in case someone gzip'd manpages, remove the conflicting copy.
21073 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21074
21075 eval \$PRG \$TMPSRC \$DST/\$NAME
21076 rm -f \$TMPSRC \$TMPSED
21077 CF_EOF
21078
21079 chmod 0755 headers.sh
21080
21081 for cf_dir in $SRC_SUBDIRS
21082 do
21083         if test ! -d $srcdir/$cf_dir ; then
21084                 continue
21085         fi
21086
21087         if test -f $srcdir/$cf_dir/headers; then
21088                 $AWK -f $srcdir/mk-hdr.awk \
21089                         subset="$LIB_SUBSETS" \
21090                         compat="$WITH_CURSES_H" \
21091                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
21092         fi
21093
21094         if test -f $srcdir/$cf_dir/modules; then
21095                 if test "$cf_dir" != "c++" ; then
21096                         cat >>$cf_dir/Makefile <<"CF_EOF"
21097 depend : ${AUTO_SRC}
21098         makedepend -- ${CPPFLAGS} -- ${C_SRC}
21099
21100 # DO NOT DELETE THIS LINE -- make depend depends on it.
21101 CF_EOF
21102                 fi
21103         fi
21104 done
21105
21106 if test "x$cf_with_ada" != xno ; then
21107 if test -z "$USE_OLD_MAKERULES" ; then
21108         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
21109 fi
21110 fi
21111  ;;
21112   esac
21113 done
21114 EOF
21115
21116 cat >>$CONFIG_STATUS <<\EOF
21117
21118 { (exit 0); exit 0; }
21119 EOF
21120 chmod +x $CONFIG_STATUS
21121 ac_clean_files=$ac_clean_files_save
21122
21123 # configure is writing to config.log, and then calls config.status.
21124 # config.status does its own redirection, appending to config.log.
21125 # Unfortunately, on DOS this fails, as config.log is still kept open
21126 # by configure, so config.status won't be able to write to it; its
21127 # output is simply discarded.  So we exec the FD to /dev/null,
21128 # effectively closing config.log, so it can be properly (re)opened and
21129 # appended to by config.status.  When coming back to configure, we
21130 # need to make the FD available again.
21131 if test "$no_create" != yes; then
21132   ac_cs_success=:
21133   exec 5>/dev/null
21134   $SHELL $CONFIG_STATUS || ac_cs_success=false
21135   exec 5>>config.log
21136   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21137   # would make configure fail if this is the last instruction.
21138   $ac_cs_success || { (exit 1); exit 1; }
21139 fi
21140 ${MAKE:-make} preinstall