]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20100814
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.503 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100814.
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-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --disable-libtool-version  enable to use libtool's incompatible naming scheme
716   --with-libtool          generate libraries with libtool
717   --with-shared           generate shared-libraries
718   --with-normal           generate normal-libraries (default)
719   --with-debug            generate debug-libraries (default)
720   --with-profile          generate profile-libraries
721   --with-termlib          generate separate terminfo library
722   --with-ticlib           generate separate tic library
723   --with-gpm              use Alessandro Rubini's GPM library
724   --without-dlsym         do not use dlsym() to load GPM dynamically
725   --with-sysmouse         use sysmouse (FreeBSD console)
726   --enable-rpath          use rpath option when generating shared libraries
727   --disable-relink        relink shared libraries during install
728   --with-shlib-version=X  Specify rel or abi version for shared libs
729   --disable-rpath-hack    don't add rpath options for additional libraries
730 Fine-Tuning Your Configuration:
731   --disable-overwrite     leave out the link to -lcurses
732   --disable-database      do not use terminfo, only fallbacks/termcap
733   --with-database=XXX     specify terminfo source to install
734   --with-hashed-db        specify hashed-database library
735   --with-fallbacks=XXX    specify list of fallback terminal descriptions
736   --without-xterm-new     specify if xterm terminfo should be old version
737   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
738   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
739   --disable-big-core      assume machine has little memory
740   --disable-big-strings   assume compiler has only standard-size strings
741   --enable-termcap        compile in termcap fallback support
742   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
743   --enable-getcap         fast termcap load, no xrefs to terminfo
744   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
745   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
746   --disable-root-environ  restrict environment when running as root
747   --enable-symlinks       make tic use symbolic links not hard links
748   --enable-broken_linker  compile with broken-linker support code
749   --enable-bsdpad         recognize BSD-style prefix padding
750   --enable-widec          compile with wide-char/UTF-8 code
751   --disable-lp64          allow chtype to be long (ignore _LP64)
752   --disable-largefile     omit support for large files
753   --disable-tparm-varargs compile tparm() without varargs interface
754   --disable-tic-depends   link tic library without explicit dependency on ncurses library
755   --with-bool=TYPE        override fallback type of bool variable
756   --with-caps=alt         compile with alternate Caps file
757   --with-chtype=TYPE      override type of chtype
758   --with-ospeed=TYPE      override type of ospeed variable
759   --with-mmask-t=TYPE     override type of mmask_t
760   --with-ccharw-max=XXX   override size CCHARW_MAX
761   --with-rcs-ids          compile-in RCS identifiers
762 Options to Specify How Manpages are Installed:
763   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
764                           optionally formatted/catonly, e.g., gzip,formatted
765   --with-manpage-renames  specify manpage-renaming
766   --with-manpage-aliases  specify manpage-aliases using .so
767   --with-manpage-symlinks specify manpage-aliases using symlinks
768   --with-manpage-tbl      specify manpage processing with tbl
769 Extensions:
770   --disable-ext-funcs     disable function-extensions
771   --enable-sp-funcs       enable experimental SCREEN-extensions
772   --enable-term-driver    enable experimental terminal-driver
773   --enable-const          compile with extra/non-standard const
774   --enable-ext-colors     compile for 256-color support
775   --enable-ext-mouse      compile for extended mouse-encoding
776   --enable-no-padding     compile with $NCURSES_NO_PADDING code
777   --enable-signed-char    compile using signed Boolean's in term.h
778   --enable-sigwinch       compile with SIGWINCH handler
779   --enable-tcap-names     compile with user-definable terminal capabilities
780 Development Code:
781   --without-develop       disable development options
782   --enable-hard-tabs      compile with hard-tabs code
783   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
784 Experimental Code:
785   --disable-assumed-color do not assume anything about default-colors
786   --disable-hashmap       compile without hashmap scrolling-optimization
787   --enable-colorfgbg      compile-in experimental $COLORFGBG code
788   --enable-interop        compile-in experimental interop bindings
789   --with-pthread          use POSIX thread library
790   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
791   --enable-weak-symbols   enable weak-symbols for pthreads
792   --enable-reentrant      compile with experimental reentrant code
793   --with-wrap-prefix=XXX  override prefix used for public variables
794   --enable-safe-sprintf   compile with experimental safe-sprintf code
795   --disable-scroll-hints  compile without scroll-hints code
796   --enable-wgetch-events  compile with experimental wgetch-events code
797 Testing/development Options:
798   --enable-echo           build: display "compiling" commands (default)
799   --enable-warnings       build: turn on GCC compiler warnings
800   --enable-assertions     test: turn on generation of assertion code
801   --with-dmalloc          test: use Gray Watson's dmalloc library
802   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
803   --with-valgrind         test: use valgrind
804   --disable-leaks         test: free permanent memory, analyze leaks
805   --enable-expanded       test: generate functions for certain macros
806   --disable-macros        test: use functions rather than macros
807   --with-trace            test: add trace() function to all models of ncurses
808 Ada95 Binding Options:
809   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
810   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
811   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
812   --with-ada-sharedlib=XX build Ada95 shared-library
813
814 Some influential environment variables:
815   CC          C compiler command
816   CFLAGS      C compiler flags
817   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
818               nonstandard directory <lib dir>
819   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
820               headers in a nonstandard directory <include dir>
821   CPP         C preprocessor
822   CXX         C++ compiler command
823   CXXFLAGS    C++ compiler flags
824   CXXCPP      C++ preprocessor
825
826 Use these variables to override the choices made by `configure' or to help
827 it to find libraries and programs with nonstandard names/locations.
828
829 EOF
830 fi
831
832 if test "$ac_init_help" = "recursive"; then
833   # If there are subdirs, report their specific --help.
834   ac_popdir=`pwd`
835   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
836     cd $ac_subdir
837     # A "../" for each directory in /$ac_subdir.
838     ac_dots=`echo $ac_subdir |
839              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
840
841     case $srcdir in
842     .) # No --srcdir option.  We are building in place.
843       ac_sub_srcdir=$srcdir ;;
844     [\\/]* | ?:[\\/]* ) # Absolute path.
845       ac_sub_srcdir=$srcdir/$ac_subdir ;;
846     *) # Relative path.
847       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
848     esac
849
850     # Check for guested configure; otherwise get Cygnus style configure.
851     if test -f $ac_sub_srcdir/configure.gnu; then
852       echo
853       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
854     elif test -f $ac_sub_srcdir/configure; then
855       echo
856       $SHELL $ac_sub_srcdir/configure  --help=recursive
857     elif test -f $ac_sub_srcdir/configure.ac ||
858            test -f $ac_sub_srcdir/configure.in; then
859       echo
860       $ac_configure --help
861     else
862       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
863     fi
864     cd $ac_popdir
865   done
866 fi
867
868 test -n "$ac_init_help" && exit 0
869 if $ac_init_version; then
870   cat <<\EOF
871
872 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
873 Free Software Foundation, Inc.
874 This configure script is free software; the Free Software Foundation
875 gives unlimited permission to copy, distribute and modify it.
876 EOF
877   exit 0
878 fi
879 exec 5>config.log
880 cat >&5 <<EOF
881 This file contains any messages produced by compilers while
882 running configure, to aid debugging if configure makes a mistake.
883
884 It was created by $as_me, which was
885 generated by GNU Autoconf 2.52.20100814.  Invocation command line was
886
887   $ $0 $@
888
889 EOF
890 {
891 cat <<_ASUNAME
892 ## ---------- ##
893 ## Platform.  ##
894 ## ---------- ##
895
896 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
897 uname -m = `(uname -m) 2>/dev/null || echo unknown`
898 uname -r = `(uname -r) 2>/dev/null || echo unknown`
899 uname -s = `(uname -s) 2>/dev/null || echo unknown`
900 uname -v = `(uname -v) 2>/dev/null || echo unknown`
901
902 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
903 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
904
905 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
906 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
907 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
908 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
909 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
910 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
911 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
912
913 PATH = $PATH
914
915 _ASUNAME
916 } >&5
917
918 cat >&5 <<EOF
919 ## ------------ ##
920 ## Core tests.  ##
921 ## ------------ ##
922
923 EOF
924
925 # Keep a trace of the command line.
926 # Strip out --no-create and --no-recursion so they do not pile up.
927 # Also quote any args containing shell meta-characters.
928 ac_configure_args=
929 ac_sep=
930 for ac_arg
931 do
932   case $ac_arg in
933   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
934   | --no-cr | --no-c) ;;
935   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
936   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
937   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
938     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
939     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
940     ac_sep=" " ;;
941   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
942      ac_sep=" " ;;
943   esac
944   # Get rid of the leading space.
945 done
946
947 # When interrupted or exit'd, cleanup temporary files, and complete
948 # config.log.  We remove comments because anyway the quotes in there
949 # would cause problems or look ugly.
950 trap 'exit_status=$?
951   # Save into config.log some information that might help in debugging.
952   echo >&5
953   echo "## ----------------- ##" >&5
954   echo "## Cache variables.  ##" >&5
955   echo "## ----------------- ##" >&5
956   echo >&5
957   # The following way of writing the cache mishandles newlines in values,
958 {
959   (set) 2>&1 |
960     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
961     *ac_space=\ *)
962       sed -n \
963         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
964           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
965       ;;
966     *)
967       sed -n \
968         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
969       ;;
970     esac;
971 } >&5
972   sed "/^$/d" confdefs.h >conftest.log
973   if test -s conftest.log; then
974     echo >&5
975     echo "## ------------ ##" >&5
976     echo "## confdefs.h.  ##" >&5
977     echo "## ------------ ##" >&5
978     echo >&5
979     cat conftest.log >&5
980   fi
981   (echo; echo) >&5
982   test "$ac_signal" != 0 &&
983     echo "$as_me: caught signal $ac_signal" >&5
984   echo "$as_me: exit $exit_status" >&5
985   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
986     exit $exit_status
987      ' 0
988 for ac_signal in 1 2 13 15; do
989   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
990 done
991 ac_signal=0
992
993 # confdefs.h avoids OS command line length limits that DEFS can exceed.
994 rm -rf conftest* confdefs.h
995 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
996 echo >confdefs.h
997
998 # Let the site file select an alternate cache file if it wants to.
999 # Prefer explicitly selected file to automatically selected ones.
1000 if test -z "$CONFIG_SITE"; then
1001   if test "x$prefix" != xNONE; then
1002     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1003   else
1004     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1005   fi
1006 fi
1007 for ac_site_file in $CONFIG_SITE; do
1008   if test -r "$ac_site_file"; then
1009     { echo "$as_me:1009: loading site script $ac_site_file" >&5
1010 echo "$as_me: loading site script $ac_site_file" >&6;}
1011     cat "$ac_site_file" >&5
1012     . "$ac_site_file"
1013   fi
1014 done
1015
1016 if test -r "$cache_file"; then
1017   # Some versions of bash will fail to source /dev/null (special
1018   # files actually), so we avoid doing that.
1019   if test -f "$cache_file"; then
1020     { echo "$as_me:1020: loading cache $cache_file" >&5
1021 echo "$as_me: loading cache $cache_file" >&6;}
1022     case $cache_file in
1023       [\\/]* | ?:[\\/]* ) . $cache_file;;
1024       *)                      . ./$cache_file;;
1025     esac
1026   fi
1027 else
1028   { echo "$as_me:1028: creating cache $cache_file" >&5
1029 echo "$as_me: creating cache $cache_file" >&6;}
1030   >$cache_file
1031 fi
1032
1033 # Check that the precious variables saved in the cache have kept the same
1034 # value.
1035 ac_cache_corrupted=false
1036 for ac_var in `(set) 2>&1 |
1037                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1038   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1039   eval ac_new_set=\$ac_env_${ac_var}_set
1040   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1041   eval ac_new_val="\$ac_env_${ac_var}_value"
1042   case $ac_old_set,$ac_new_set in
1043     set,)
1044       { echo "$as_me:1044: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1045 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1046       ac_cache_corrupted=: ;;
1047     ,set)
1048       { echo "$as_me:1048: error: \`$ac_var' was not set in the previous run" >&5
1049 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1050       ac_cache_corrupted=: ;;
1051     ,);;
1052     *)
1053       if test "x$ac_old_val" != "x$ac_new_val"; then
1054         { echo "$as_me:1054: error: \`$ac_var' has changed since the previous run:" >&5
1055 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1056         { echo "$as_me:1056:   former value:  $ac_old_val" >&5
1057 echo "$as_me:   former value:  $ac_old_val" >&2;}
1058         { echo "$as_me:1058:   current value: $ac_new_val" >&5
1059 echo "$as_me:   current value: $ac_new_val" >&2;}
1060         ac_cache_corrupted=:
1061       fi;;
1062   esac
1063   # Pass precious variables to config.status.  It doesn't matter if
1064   # we pass some twice (in addition to the command line arguments).
1065   if test "$ac_new_set" = set; then
1066     case $ac_new_val in
1067     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1068       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1069       ac_configure_args="$ac_configure_args '$ac_arg'"
1070       ;;
1071     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1072        ;;
1073     esac
1074   fi
1075 done
1076 if $ac_cache_corrupted; then
1077   { echo "$as_me:1077: error: changes in the environment can compromise the build" >&5
1078 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1079   { { echo "$as_me:1079: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1080 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1081    { (exit 1); exit 1; }; }
1082 fi
1083
1084 ac_ext=c
1085 ac_cpp='$CPP $CPPFLAGS'
1086 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1087 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1088 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1089 ac_main_return=return
1090
1091 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1092   *c*,-n*) ECHO_N= ECHO_C='
1093 ' ECHO_T='      ' ;;
1094   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1095   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1096 esac
1097 echo "#! $SHELL" >conftest.sh
1098 echo  "exit 0"   >>conftest.sh
1099 chmod +x conftest.sh
1100 if { (echo "$as_me:1100: PATH=\".;.\"; conftest.sh") >&5
1101   (PATH=".;."; conftest.sh) 2>&5
1102   ac_status=$?
1103   echo "$as_me:1103: \$? = $ac_status" >&5
1104   (exit $ac_status); }; then
1105   ac_path_separator=';'
1106 else
1107   ac_path_separator=:
1108 fi
1109 PATH_SEPARATOR="$ac_path_separator"
1110 rm -f conftest.sh
1111
1112 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1113
1114 top_builddir=`pwd`
1115
1116 echo "$as_me:1116: checking for egrep" >&5
1117 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1118 if test "${ac_cv_prog_egrep+set}" = set; then
1119   echo $ECHO_N "(cached) $ECHO_C" >&6
1120 else
1121   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1122     then ac_cv_prog_egrep='grep -E'
1123     else ac_cv_prog_egrep='egrep'
1124     fi
1125 fi
1126 echo "$as_me:1126: result: $ac_cv_prog_egrep" >&5
1127 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1128  EGREP=$ac_cv_prog_egrep
1129
1130 test -z "$EGREP" && { { echo "$as_me:1130: error: No egrep program found" >&5
1131 echo "$as_me: error: No egrep program found" >&2;}
1132    { (exit 1); exit 1; }; }
1133
1134 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1135 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 cf_cv_abi_version=${NCURSES_MAJOR}
1138 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1139 cf_cv_timestamp=`date`
1140 echo "$as_me:1140: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1141 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1142
1143 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1144
1145 # Check whether --with-rel-version or --without-rel-version was given.
1146 if test "${with_rel_version+set}" = set; then
1147   withval="$with_rel_version"
1148   { echo "$as_me:1148: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1149 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1150  cf_cv_rel_version=$withval
1151 fi;
1152
1153  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1154  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1155
1156 if test -n "$NCURSES_MAJOR" ; then
1157   case $NCURSES_MAJOR in #(vi
1158   [0-9]*) #(vi
1159         ;;
1160   *)
1161         { { echo "$as_me:1161: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1162 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1163    { (exit 1); exit 1; }; }
1164         ;;
1165   esac
1166 else
1167   { { echo "$as_me:1167: error: Release major-version value is empty" >&5
1168 echo "$as_me: error: Release major-version value is empty" >&2;}
1169    { (exit 1); exit 1; }; }
1170 fi
1171
1172 if test -n "$NCURSES_MINOR" ; then
1173   case $NCURSES_MINOR in #(vi
1174   [0-9]*) #(vi
1175         ;;
1176   *)
1177         { { echo "$as_me:1177: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1178 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1179    { (exit 1); exit 1; }; }
1180         ;;
1181   esac
1182 else
1183   { { echo "$as_me:1183: error: Release minor-version value is empty" >&5
1184 echo "$as_me: error: Release minor-version value is empty" >&2;}
1185    { (exit 1); exit 1; }; }
1186 fi
1187
1188 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1189
1190 # Check whether --with-abi-version or --without-abi-version was given.
1191 if test "${with_abi_version+set}" = set; then
1192   withval="$with_abi_version"
1193   { echo "$as_me:1193: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1194 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1195  cf_cv_abi_version=$withval
1196 fi;
1197
1198 if test -n "$cf_cv_abi_version" ; then
1199   case $cf_cv_abi_version in #(vi
1200   [0-9]*) #(vi
1201         ;;
1202   *)
1203         { { echo "$as_me:1203: error: ABI version is not a number: $cf_cv_abi_version" >&5
1204 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1205    { (exit 1); exit 1; }; }
1206         ;;
1207   esac
1208 else
1209   { { echo "$as_me:1209: error: ABI version value is empty" >&5
1210 echo "$as_me: error: ABI version value is empty" >&2;}
1211    { (exit 1); exit 1; }; }
1212 fi
1213
1214 ac_aux_dir=
1215 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1216   if test -f $ac_dir/install-sh; then
1217     ac_aux_dir=$ac_dir
1218     ac_install_sh="$ac_aux_dir/install-sh -c"
1219     break
1220   elif test -f $ac_dir/install.sh; then
1221     ac_aux_dir=$ac_dir
1222     ac_install_sh="$ac_aux_dir/install.sh -c"
1223     break
1224   elif test -f $ac_dir/shtool; then
1225     ac_aux_dir=$ac_dir
1226     ac_install_sh="$ac_aux_dir/shtool install -c"
1227     break
1228   fi
1229 done
1230 if test -z "$ac_aux_dir"; then
1231   { { echo "$as_me:1231: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1232 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1233    { (exit 1); exit 1; }; }
1234 fi
1235 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1236 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1237 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1238
1239 # Make sure we can run config.sub.
1240 $ac_config_sub sun4 >/dev/null 2>&1 ||
1241   { { echo "$as_me:1241: error: cannot run $ac_config_sub" >&5
1242 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1243    { (exit 1); exit 1; }; }
1244
1245 echo "$as_me:1245: checking build system type" >&5
1246 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1247 if test "${ac_cv_build+set}" = set; then
1248   echo $ECHO_N "(cached) $ECHO_C" >&6
1249 else
1250   ac_cv_build_alias=$build_alias
1251 test -z "$ac_cv_build_alias" &&
1252   ac_cv_build_alias=`$ac_config_guess`
1253 test -z "$ac_cv_build_alias" &&
1254   { { echo "$as_me:1254: error: cannot guess build type; you must specify one" >&5
1255 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1256    { (exit 1); exit 1; }; }
1257 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1258   { { echo "$as_me:1258: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1259 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1260    { (exit 1); exit 1; }; }
1261
1262 fi
1263 echo "$as_me:1263: result: $ac_cv_build" >&5
1264 echo "${ECHO_T}$ac_cv_build" >&6
1265 build=$ac_cv_build
1266 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1267 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1268 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1269
1270 echo "$as_me:1270: checking host system type" >&5
1271 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1272 if test "${ac_cv_host+set}" = set; then
1273   echo $ECHO_N "(cached) $ECHO_C" >&6
1274 else
1275   ac_cv_host_alias=$host_alias
1276 test -z "$ac_cv_host_alias" &&
1277   ac_cv_host_alias=$ac_cv_build_alias
1278 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1279   { { echo "$as_me:1279: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1280 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1281    { (exit 1); exit 1; }; }
1282
1283 fi
1284 echo "$as_me:1284: result: $ac_cv_host" >&5
1285 echo "${ECHO_T}$ac_cv_host" >&6
1286 host=$ac_cv_host
1287 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1288 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1289 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1290
1291 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1292         echo "$as_me:1292: checking target system type" >&5
1293 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1294 if test "${ac_cv_target+set}" = set; then
1295   echo $ECHO_N "(cached) $ECHO_C" >&6
1296 else
1297   ac_cv_target_alias=$target_alias
1298 test "x$ac_cv_target_alias" = "x" &&
1299   ac_cv_target_alias=$ac_cv_host_alias
1300 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1301   { { echo "$as_me:1301: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1302 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1303    { (exit 1); exit 1; }; }
1304
1305 fi
1306 echo "$as_me:1306: result: $ac_cv_target" >&5
1307 echo "${ECHO_T}$ac_cv_target" >&6
1308 target=$ac_cv_target
1309 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1310 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1311 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1312
1313 # The aliases save the names the user supplied, while $host etc.
1314 # will get canonicalized.
1315 test -n "$target_alias" &&
1316   test "$program_prefix$program_suffix$program_transform_name" = \
1317     NONENONEs,x,x, &&
1318   program_prefix=${target_alias}-
1319         system_name="$host_os"
1320 else
1321         system_name="`(uname -s -r) 2>/dev/null`"
1322         if test -z "$system_name" ; then
1323                 system_name="`(hostname) 2>/dev/null`"
1324         fi
1325 fi
1326 test -n "$system_name" && cat >>confdefs.h <<EOF
1327 #define SYSTEM_NAME "$system_name"
1328 EOF
1329
1330 if test "${cf_cv_system_name+set}" = set; then
1331   echo $ECHO_N "(cached) $ECHO_C" >&6
1332 else
1333   cf_cv_system_name="$system_name"
1334 fi
1335
1336 test -z "$system_name" && system_name="$cf_cv_system_name"
1337 test -n "$cf_cv_system_name" && echo "$as_me:1337: result: Configuring for $cf_cv_system_name" >&5
1338 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1339
1340 if test ".$system_name" != ".$cf_cv_system_name" ; then
1341         echo "$as_me:1341: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1342 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1343         { { echo "$as_me:1343: error: \"Please remove config.cache and try again.\"" >&5
1344 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1345    { (exit 1); exit 1; }; }
1346 fi
1347
1348 # Check whether --with-system-type or --without-system-type was given.
1349 if test "${with_system_type+set}" = set; then
1350   withval="$with_system_type"
1351   { echo "$as_me:1351: WARNING: overriding system type to $withval" >&5
1352 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1353  cf_cv_system_name=$withval
1354 fi;
1355
1356 ###     Save the given $CFLAGS to allow user-override.
1357 cf_user_CFLAGS="$CFLAGS"
1358
1359 ###     Default install-location
1360
1361 echo "$as_me:1361: checking for prefix" >&5
1362 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1363 if test "x$prefix" = "xNONE" ; then
1364         case "$cf_cv_system_name" in
1365                 # non-vendor systems don't have a conflict
1366         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1367                 prefix=/usr
1368                 ;;
1369         *)      prefix=$ac_default_prefix
1370                 ;;
1371         esac
1372 fi
1373 echo "$as_me:1373: result: $prefix" >&5
1374 echo "${ECHO_T}$prefix" >&6
1375
1376 if test "x$prefix" = "xNONE" ; then
1377 echo "$as_me:1377: checking for default include-directory" >&5
1378 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1379 test -n "$verbose" && echo 1>&6
1380 for cf_symbol in \
1381         $includedir \
1382         $includedir/ncurses \
1383         $prefix/include \
1384         $prefix/include/ncurses \
1385         /usr/local/include \
1386         /usr/local/include/ncurses \
1387         /usr/include \
1388         /usr/include/ncurses
1389 do
1390         cf_dir=`eval echo $cf_symbol`
1391         if test -f $cf_dir/curses.h ; then
1392         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1393                 includedir="$cf_symbol"
1394                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1395                 break
1396         fi
1397         fi
1398         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1399 done
1400 echo "$as_me:1400: result: $includedir" >&5
1401 echo "${ECHO_T}$includedir" >&6
1402 fi
1403
1404 ###     Checks for programs.
1405 ac_ext=c
1406 ac_cpp='$CPP $CPPFLAGS'
1407 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1408 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1409 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1410 ac_main_return=return
1411 if test -n "$ac_tool_prefix"; then
1412   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1413 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1414 echo "$as_me:1414: checking for $ac_word" >&5
1415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1416 if test "${ac_cv_prog_CC+set}" = set; then
1417   echo $ECHO_N "(cached) $ECHO_C" >&6
1418 else
1419   if test -n "$CC"; then
1420   ac_cv_prog_CC="$CC" # Let the user override the test.
1421 else
1422   ac_save_IFS=$IFS; IFS=$ac_path_separator
1423 ac_dummy="$PATH"
1424 for ac_dir in $ac_dummy; do
1425   IFS=$ac_save_IFS
1426   test -z "$ac_dir" && ac_dir=.
1427   $as_executable_p "$ac_dir/$ac_word" || continue
1428 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1429 echo "$as_me:1429: found $ac_dir/$ac_word" >&5
1430 break
1431 done
1432
1433 fi
1434 fi
1435 CC=$ac_cv_prog_CC
1436 if test -n "$CC"; then
1437   echo "$as_me:1437: result: $CC" >&5
1438 echo "${ECHO_T}$CC" >&6
1439 else
1440   echo "$as_me:1440: result: no" >&5
1441 echo "${ECHO_T}no" >&6
1442 fi
1443
1444 fi
1445 if test -z "$ac_cv_prog_CC"; then
1446   ac_ct_CC=$CC
1447   # Extract the first word of "gcc", so it can be a program name with args.
1448 set dummy gcc; ac_word=$2
1449 echo "$as_me:1449: checking for $ac_word" >&5
1450 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1451 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1452   echo $ECHO_N "(cached) $ECHO_C" >&6
1453 else
1454   if test -n "$ac_ct_CC"; then
1455   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1456 else
1457   ac_save_IFS=$IFS; IFS=$ac_path_separator
1458 ac_dummy="$PATH"
1459 for ac_dir in $ac_dummy; do
1460   IFS=$ac_save_IFS
1461   test -z "$ac_dir" && ac_dir=.
1462   $as_executable_p "$ac_dir/$ac_word" || continue
1463 ac_cv_prog_ac_ct_CC="gcc"
1464 echo "$as_me:1464: found $ac_dir/$ac_word" >&5
1465 break
1466 done
1467
1468 fi
1469 fi
1470 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1471 if test -n "$ac_ct_CC"; then
1472   echo "$as_me:1472: result: $ac_ct_CC" >&5
1473 echo "${ECHO_T}$ac_ct_CC" >&6
1474 else
1475   echo "$as_me:1475: result: no" >&5
1476 echo "${ECHO_T}no" >&6
1477 fi
1478
1479   CC=$ac_ct_CC
1480 else
1481   CC="$ac_cv_prog_CC"
1482 fi
1483
1484 if test -z "$CC"; then
1485   if test -n "$ac_tool_prefix"; then
1486   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1487 set dummy ${ac_tool_prefix}cc; ac_word=$2
1488 echo "$as_me:1488: checking for $ac_word" >&5
1489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1490 if test "${ac_cv_prog_CC+set}" = set; then
1491   echo $ECHO_N "(cached) $ECHO_C" >&6
1492 else
1493   if test -n "$CC"; then
1494   ac_cv_prog_CC="$CC" # Let the user override the test.
1495 else
1496   ac_save_IFS=$IFS; IFS=$ac_path_separator
1497 ac_dummy="$PATH"
1498 for ac_dir in $ac_dummy; do
1499   IFS=$ac_save_IFS
1500   test -z "$ac_dir" && ac_dir=.
1501   $as_executable_p "$ac_dir/$ac_word" || continue
1502 ac_cv_prog_CC="${ac_tool_prefix}cc"
1503 echo "$as_me:1503: found $ac_dir/$ac_word" >&5
1504 break
1505 done
1506
1507 fi
1508 fi
1509 CC=$ac_cv_prog_CC
1510 if test -n "$CC"; then
1511   echo "$as_me:1511: result: $CC" >&5
1512 echo "${ECHO_T}$CC" >&6
1513 else
1514   echo "$as_me:1514: result: no" >&5
1515 echo "${ECHO_T}no" >&6
1516 fi
1517
1518 fi
1519 if test -z "$ac_cv_prog_CC"; then
1520   ac_ct_CC=$CC
1521   # Extract the first word of "cc", so it can be a program name with args.
1522 set dummy cc; ac_word=$2
1523 echo "$as_me:1523: checking for $ac_word" >&5
1524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1525 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1526   echo $ECHO_N "(cached) $ECHO_C" >&6
1527 else
1528   if test -n "$ac_ct_CC"; then
1529   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1530 else
1531   ac_save_IFS=$IFS; IFS=$ac_path_separator
1532 ac_dummy="$PATH"
1533 for ac_dir in $ac_dummy; do
1534   IFS=$ac_save_IFS
1535   test -z "$ac_dir" && ac_dir=.
1536   $as_executable_p "$ac_dir/$ac_word" || continue
1537 ac_cv_prog_ac_ct_CC="cc"
1538 echo "$as_me:1538: found $ac_dir/$ac_word" >&5
1539 break
1540 done
1541
1542 fi
1543 fi
1544 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1545 if test -n "$ac_ct_CC"; then
1546   echo "$as_me:1546: result: $ac_ct_CC" >&5
1547 echo "${ECHO_T}$ac_ct_CC" >&6
1548 else
1549   echo "$as_me:1549: result: no" >&5
1550 echo "${ECHO_T}no" >&6
1551 fi
1552
1553   CC=$ac_ct_CC
1554 else
1555   CC="$ac_cv_prog_CC"
1556 fi
1557
1558 fi
1559 if test -z "$CC"; then
1560   # Extract the first word of "cc", so it can be a program name with args.
1561 set dummy cc; ac_word=$2
1562 echo "$as_me:1562: checking for $ac_word" >&5
1563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1564 if test "${ac_cv_prog_CC+set}" = set; then
1565   echo $ECHO_N "(cached) $ECHO_C" >&6
1566 else
1567   if test -n "$CC"; then
1568   ac_cv_prog_CC="$CC" # Let the user override the test.
1569 else
1570   ac_prog_rejected=no
1571   ac_save_IFS=$IFS; IFS=$ac_path_separator
1572 ac_dummy="$PATH"
1573 for ac_dir in $ac_dummy; do
1574   IFS=$ac_save_IFS
1575   test -z "$ac_dir" && ac_dir=.
1576   $as_executable_p "$ac_dir/$ac_word" || continue
1577 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1578   ac_prog_rejected=yes
1579   continue
1580 fi
1581 ac_cv_prog_CC="cc"
1582 echo "$as_me:1582: found $ac_dir/$ac_word" >&5
1583 break
1584 done
1585
1586 if test $ac_prog_rejected = yes; then
1587   # We found a bogon in the path, so make sure we never use it.
1588   set dummy $ac_cv_prog_CC
1589   shift
1590   if test $# != 0; then
1591     # We chose a different compiler from the bogus one.
1592     # However, it has the same basename, so the bogon will be chosen
1593     # first if we set CC to just the basename; use the full file name.
1594     shift
1595     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1596     shift
1597     ac_cv_prog_CC="$@"
1598   fi
1599 fi
1600 fi
1601 fi
1602 CC=$ac_cv_prog_CC
1603 if test -n "$CC"; then
1604   echo "$as_me:1604: result: $CC" >&5
1605 echo "${ECHO_T}$CC" >&6
1606 else
1607   echo "$as_me:1607: result: no" >&5
1608 echo "${ECHO_T}no" >&6
1609 fi
1610
1611 fi
1612 if test -z "$CC"; then
1613   if test -n "$ac_tool_prefix"; then
1614   for ac_prog in cl
1615   do
1616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1618 echo "$as_me:1618: checking for $ac_word" >&5
1619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1620 if test "${ac_cv_prog_CC+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   ac_save_IFS=$IFS; IFS=$ac_path_separator
1627 ac_dummy="$PATH"
1628 for ac_dir in $ac_dummy; do
1629   IFS=$ac_save_IFS
1630   test -z "$ac_dir" && ac_dir=.
1631   $as_executable_p "$ac_dir/$ac_word" || continue
1632 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1633 echo "$as_me:1633: found $ac_dir/$ac_word" >&5
1634 break
1635 done
1636
1637 fi
1638 fi
1639 CC=$ac_cv_prog_CC
1640 if test -n "$CC"; then
1641   echo "$as_me:1641: result: $CC" >&5
1642 echo "${ECHO_T}$CC" >&6
1643 else
1644   echo "$as_me:1644: result: no" >&5
1645 echo "${ECHO_T}no" >&6
1646 fi
1647
1648     test -n "$CC" && break
1649   done
1650 fi
1651 if test -z "$CC"; then
1652   ac_ct_CC=$CC
1653   for ac_prog in cl
1654 do
1655   # Extract the first word of "$ac_prog", so it can be a program name with args.
1656 set dummy $ac_prog; ac_word=$2
1657 echo "$as_me:1657: checking for $ac_word" >&5
1658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1659 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1660   echo $ECHO_N "(cached) $ECHO_C" >&6
1661 else
1662   if test -n "$ac_ct_CC"; then
1663   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1664 else
1665   ac_save_IFS=$IFS; IFS=$ac_path_separator
1666 ac_dummy="$PATH"
1667 for ac_dir in $ac_dummy; do
1668   IFS=$ac_save_IFS
1669   test -z "$ac_dir" && ac_dir=.
1670   $as_executable_p "$ac_dir/$ac_word" || continue
1671 ac_cv_prog_ac_ct_CC="$ac_prog"
1672 echo "$as_me:1672: found $ac_dir/$ac_word" >&5
1673 break
1674 done
1675
1676 fi
1677 fi
1678 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1679 if test -n "$ac_ct_CC"; then
1680   echo "$as_me:1680: result: $ac_ct_CC" >&5
1681 echo "${ECHO_T}$ac_ct_CC" >&6
1682 else
1683   echo "$as_me:1683: result: no" >&5
1684 echo "${ECHO_T}no" >&6
1685 fi
1686
1687   test -n "$ac_ct_CC" && break
1688 done
1689
1690   CC=$ac_ct_CC
1691 fi
1692
1693 fi
1694
1695 test -z "$CC" && { { echo "$as_me:1695: error: no acceptable cc found in \$PATH" >&5
1696 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1697    { (exit 1); exit 1; }; }
1698
1699 # Provide some information about the compiler.
1700 echo "$as_me:1700:" \
1701      "checking for C compiler version" >&5
1702 ac_compiler=`set X $ac_compile; echo $2`
1703 { (eval echo "$as_me:1703: \"$ac_compiler --version </dev/null >&5\"") >&5
1704   (eval $ac_compiler --version </dev/null >&5) 2>&5
1705   ac_status=$?
1706   echo "$as_me:1706: \$? = $ac_status" >&5
1707   (exit $ac_status); }
1708 { (eval echo "$as_me:1708: \"$ac_compiler -v </dev/null >&5\"") >&5
1709   (eval $ac_compiler -v </dev/null >&5) 2>&5
1710   ac_status=$?
1711   echo "$as_me:1711: \$? = $ac_status" >&5
1712   (exit $ac_status); }
1713 { (eval echo "$as_me:1713: \"$ac_compiler -V </dev/null >&5\"") >&5
1714   (eval $ac_compiler -V </dev/null >&5) 2>&5
1715   ac_status=$?
1716   echo "$as_me:1716: \$? = $ac_status" >&5
1717   (exit $ac_status); }
1718
1719 cat >conftest.$ac_ext <<_ACEOF
1720 #line 1720 "configure"
1721 #include "confdefs.h"
1722
1723 int
1724 main ()
1725 {
1726
1727   ;
1728   return 0;
1729 }
1730 _ACEOF
1731 ac_clean_files_save=$ac_clean_files
1732 ac_clean_files="$ac_clean_files a.out a.exe"
1733 # Try to create an executable without -o first, disregard a.out.
1734 # It will help us diagnose broken compilers, and finding out an intuition
1735 # of exeext.
1736 echo "$as_me:1736: checking for C compiler default output" >&5
1737 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1738 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1739 if { (eval echo "$as_me:1739: \"$ac_link_default\"") >&5
1740   (eval $ac_link_default) 2>&5
1741   ac_status=$?
1742   echo "$as_me:1742: \$? = $ac_status" >&5
1743   (exit $ac_status); }; then
1744   # Find the output, starting from the most likely.  This scheme is
1745 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1746 # resort.
1747 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1748                 ls a.out conftest 2>/dev/null;
1749                 ls a.* conftest.* 2>/dev/null`; do
1750   case $ac_file in
1751     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1752     a.out ) # We found the default executable, but exeext='' is most
1753             # certainly right.
1754             break;;
1755     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1756           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1757           export ac_cv_exeext
1758           break;;
1759     * ) break;;
1760   esac
1761 done
1762 else
1763   echo "$as_me: failed program was:" >&5
1764 cat conftest.$ac_ext >&5
1765 { { echo "$as_me:1765: error: C compiler cannot create executables" >&5
1766 echo "$as_me: error: C compiler cannot create executables" >&2;}
1767    { (exit 77); exit 77; }; }
1768 fi
1769
1770 ac_exeext=$ac_cv_exeext
1771 echo "$as_me:1771: result: $ac_file" >&5
1772 echo "${ECHO_T}$ac_file" >&6
1773
1774 # Check the compiler produces executables we can run.  If not, either
1775 # the compiler is broken, or we cross compile.
1776 echo "$as_me:1776: checking whether the C compiler works" >&5
1777 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1778 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1779 # If not cross compiling, check that we can run a simple program.
1780 if test "$cross_compiling" != yes; then
1781   if { ac_try='./$ac_file'
1782   { (eval echo "$as_me:1782: \"$ac_try\"") >&5
1783   (eval $ac_try) 2>&5
1784   ac_status=$?
1785   echo "$as_me:1785: \$? = $ac_status" >&5
1786   (exit $ac_status); }; }; then
1787     cross_compiling=no
1788   else
1789     if test "$cross_compiling" = maybe; then
1790         cross_compiling=yes
1791     else
1792         { { echo "$as_me:1792: error: cannot run C compiled programs.
1793 If you meant to cross compile, use \`--host'." >&5
1794 echo "$as_me: error: cannot run C compiled programs.
1795 If you meant to cross compile, use \`--host'." >&2;}
1796    { (exit 1); exit 1; }; }
1797     fi
1798   fi
1799 fi
1800 echo "$as_me:1800: result: yes" >&5
1801 echo "${ECHO_T}yes" >&6
1802
1803 rm -f a.out a.exe conftest$ac_cv_exeext
1804 ac_clean_files=$ac_clean_files_save
1805 # Check the compiler produces executables we can run.  If not, either
1806 # the compiler is broken, or we cross compile.
1807 echo "$as_me:1807: checking whether we are cross compiling" >&5
1808 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1809 echo "$as_me:1809: result: $cross_compiling" >&5
1810 echo "${ECHO_T}$cross_compiling" >&6
1811
1812 echo "$as_me:1812: checking for executable suffix" >&5
1813 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1814 if { (eval echo "$as_me:1814: \"$ac_link\"") >&5
1815   (eval $ac_link) 2>&5
1816   ac_status=$?
1817   echo "$as_me:1817: \$? = $ac_status" >&5
1818   (exit $ac_status); }; then
1819   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1820 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1821 # work properly (i.e., refer to `conftest.exe'), while it won't with
1822 # `rm'.
1823 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1824   case $ac_file in
1825     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1826     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1827           export ac_cv_exeext
1828           break;;
1829     * ) break;;
1830   esac
1831 done
1832 else
1833   { { echo "$as_me:1833: error: cannot compute EXEEXT: cannot compile and link" >&5
1834 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1835    { (exit 1); exit 1; }; }
1836 fi
1837
1838 rm -f conftest$ac_cv_exeext
1839 echo "$as_me:1839: result: $ac_cv_exeext" >&5
1840 echo "${ECHO_T}$ac_cv_exeext" >&6
1841
1842 rm -f conftest.$ac_ext
1843 EXEEXT=$ac_cv_exeext
1844 ac_exeext=$EXEEXT
1845 echo "$as_me:1845: checking for object suffix" >&5
1846 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1847 if test "${ac_cv_objext+set}" = set; then
1848   echo $ECHO_N "(cached) $ECHO_C" >&6
1849 else
1850   cat >conftest.$ac_ext <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1853
1854 int
1855 main ()
1856 {
1857
1858   ;
1859   return 0;
1860 }
1861 _ACEOF
1862 rm -f conftest.o conftest.obj
1863 if { (eval echo "$as_me:1863: \"$ac_compile\"") >&5
1864   (eval $ac_compile) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit $ac_status); }; then
1868   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1869   case $ac_file in
1870     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1871     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1872        break;;
1873   esac
1874 done
1875 else
1876   echo "$as_me: failed program was:" >&5
1877 cat conftest.$ac_ext >&5
1878 { { echo "$as_me:1878: error: cannot compute OBJEXT: cannot compile" >&5
1879 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1880    { (exit 1); exit 1; }; }
1881 fi
1882
1883 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1884 fi
1885 echo "$as_me:1885: result: $ac_cv_objext" >&5
1886 echo "${ECHO_T}$ac_cv_objext" >&6
1887 OBJEXT=$ac_cv_objext
1888 ac_objext=$OBJEXT
1889 echo "$as_me:1889: checking whether we are using the GNU C compiler" >&5
1890 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1891 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1892   echo $ECHO_N "(cached) $ECHO_C" >&6
1893 else
1894   cat >conftest.$ac_ext <<_ACEOF
1895 #line 1895 "configure"
1896 #include "confdefs.h"
1897
1898 int
1899 main ()
1900 {
1901 #ifndef __GNUC__
1902        choke me
1903 #endif
1904
1905   ;
1906   return 0;
1907 }
1908 _ACEOF
1909 rm -f conftest.$ac_objext
1910 if { (eval echo "$as_me:1910: \"$ac_compile\"") >&5
1911   (eval $ac_compile) 2>&5
1912   ac_status=$?
1913   echo "$as_me:1913: \$? = $ac_status" >&5
1914   (exit $ac_status); } &&
1915          { ac_try='test -s conftest.$ac_objext'
1916   { (eval echo "$as_me:1916: \"$ac_try\"") >&5
1917   (eval $ac_try) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit $ac_status); }; }; then
1921   ac_compiler_gnu=yes
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat conftest.$ac_ext >&5
1925 ac_compiler_gnu=no
1926 fi
1927 rm -f conftest.$ac_objext conftest.$ac_ext
1928 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1929
1930 fi
1931 echo "$as_me:1931: result: $ac_cv_c_compiler_gnu" >&5
1932 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1933 GCC=`test $ac_compiler_gnu = yes && echo yes`
1934 ac_test_CFLAGS=${CFLAGS+set}
1935 ac_save_CFLAGS=$CFLAGS
1936 CFLAGS="-g"
1937 echo "$as_me:1937: checking whether $CC accepts -g" >&5
1938 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1939 if test "${ac_cv_prog_cc_g+set}" = set; then
1940   echo $ECHO_N "(cached) $ECHO_C" >&6
1941 else
1942   cat >conftest.$ac_ext <<_ACEOF
1943 #line 1943 "configure"
1944 #include "confdefs.h"
1945
1946 int
1947 main ()
1948 {
1949
1950   ;
1951   return 0;
1952 }
1953 _ACEOF
1954 rm -f conftest.$ac_objext
1955 if { (eval echo "$as_me:1955: \"$ac_compile\"") >&5
1956   (eval $ac_compile) 2>&5
1957   ac_status=$?
1958   echo "$as_me:1958: \$? = $ac_status" >&5
1959   (exit $ac_status); } &&
1960          { ac_try='test -s conftest.$ac_objext'
1961   { (eval echo "$as_me:1961: \"$ac_try\"") >&5
1962   (eval $ac_try) 2>&5
1963   ac_status=$?
1964   echo "$as_me:1964: \$? = $ac_status" >&5
1965   (exit $ac_status); }; }; then
1966   ac_cv_prog_cc_g=yes
1967 else
1968   echo "$as_me: failed program was:" >&5
1969 cat conftest.$ac_ext >&5
1970 ac_cv_prog_cc_g=no
1971 fi
1972 rm -f conftest.$ac_objext conftest.$ac_ext
1973 fi
1974 echo "$as_me:1974: result: $ac_cv_prog_cc_g" >&5
1975 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1976 if test "$ac_test_CFLAGS" = set; then
1977   CFLAGS=$ac_save_CFLAGS
1978 elif test $ac_cv_prog_cc_g = yes; then
1979   if test "$GCC" = yes; then
1980     CFLAGS="-g -O2"
1981   else
1982     CFLAGS="-g"
1983   fi
1984 else
1985   if test "$GCC" = yes; then
1986     CFLAGS="-O2"
1987   else
1988     CFLAGS=
1989   fi
1990 fi
1991 # Some people use a C++ compiler to compile C.  Since we use `exit',
1992 # in C++ we need to declare it.  In case someone uses the same compiler
1993 # for both compiling C and C++ we need to have the C++ compiler decide
1994 # the declaration of exit, since it's the most demanding environment.
1995 cat >conftest.$ac_ext <<_ACEOF
1996 #ifndef __cplusplus
1997   choke me
1998 #endif
1999 _ACEOF
2000 rm -f conftest.$ac_objext
2001 if { (eval echo "$as_me:2001: \"$ac_compile\"") >&5
2002   (eval $ac_compile) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit $ac_status); } &&
2006          { ac_try='test -s conftest.$ac_objext'
2007   { (eval echo "$as_me:2007: \"$ac_try\"") >&5
2008   (eval $ac_try) 2>&5
2009   ac_status=$?
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); }; }; then
2012   for ac_declaration in \
2013    ''\
2014    '#include <stdlib.h>' \
2015    'extern "C" void std::exit (int) throw (); using std::exit;' \
2016    'extern "C" void std::exit (int); using std::exit;' \
2017    'extern "C" void exit (int) throw ();' \
2018    'extern "C" void exit (int);' \
2019    'void exit (int);'
2020 do
2021   cat >conftest.$ac_ext <<_ACEOF
2022 #line 2022 "configure"
2023 #include "confdefs.h"
2024 #include <stdlib.h>
2025 $ac_declaration
2026 int
2027 main ()
2028 {
2029 exit (42);
2030   ;
2031   return 0;
2032 }
2033 _ACEOF
2034 rm -f conftest.$ac_objext
2035 if { (eval echo "$as_me:2035: \"$ac_compile\"") >&5
2036   (eval $ac_compile) 2>&5
2037   ac_status=$?
2038   echo "$as_me:2038: \$? = $ac_status" >&5
2039   (exit $ac_status); } &&
2040          { ac_try='test -s conftest.$ac_objext'
2041   { (eval echo "$as_me:2041: \"$ac_try\"") >&5
2042   (eval $ac_try) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); }; }; then
2046   :
2047 else
2048   echo "$as_me: failed program was:" >&5
2049 cat conftest.$ac_ext >&5
2050 continue
2051 fi
2052 rm -f conftest.$ac_objext conftest.$ac_ext
2053   cat >conftest.$ac_ext <<_ACEOF
2054 #line 2054 "configure"
2055 #include "confdefs.h"
2056 $ac_declaration
2057 int
2058 main ()
2059 {
2060 exit (42);
2061   ;
2062   return 0;
2063 }
2064 _ACEOF
2065 rm -f conftest.$ac_objext
2066 if { (eval echo "$as_me:2066: \"$ac_compile\"") >&5
2067   (eval $ac_compile) 2>&5
2068   ac_status=$?
2069   echo "$as_me:2069: \$? = $ac_status" >&5
2070   (exit $ac_status); } &&
2071          { ac_try='test -s conftest.$ac_objext'
2072   { (eval echo "$as_me:2072: \"$ac_try\"") >&5
2073   (eval $ac_try) 2>&5
2074   ac_status=$?
2075   echo "$as_me:2075: \$? = $ac_status" >&5
2076   (exit $ac_status); }; }; then
2077   break
2078 else
2079   echo "$as_me: failed program was:" >&5
2080 cat conftest.$ac_ext >&5
2081 fi
2082 rm -f conftest.$ac_objext conftest.$ac_ext
2083 done
2084 rm -rf conftest*
2085 if test -n "$ac_declaration"; then
2086   echo '#ifdef __cplusplus' >>confdefs.h
2087   echo $ac_declaration      >>confdefs.h
2088   echo '#endif'             >>confdefs.h
2089 fi
2090
2091 else
2092   echo "$as_me: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 fi
2095 rm -f conftest.$ac_objext conftest.$ac_ext
2096 ac_ext=c
2097 ac_cpp='$CPP $CPPFLAGS'
2098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2101 ac_main_return=return
2102
2103 GCC_VERSION=none
2104 if test "$GCC" = yes ; then
2105         echo "$as_me:2105: checking version of $CC" >&5
2106 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2107         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2108         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2109         echo "$as_me:2109: result: $GCC_VERSION" >&5
2110 echo "${ECHO_T}$GCC_VERSION" >&6
2111 fi
2112
2113 ac_ext=c
2114 ac_cpp='$CPP $CPPFLAGS'
2115 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2116 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2117 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2118 ac_main_return=return
2119 echo "$as_me:2119: checking how to run the C preprocessor" >&5
2120 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2121 # On Suns, sometimes $CPP names a directory.
2122 if test -n "$CPP" && test -d "$CPP"; then
2123   CPP=
2124 fi
2125 if test -z "$CPP"; then
2126   if test "${ac_cv_prog_CPP+set}" = set; then
2127   echo $ECHO_N "(cached) $ECHO_C" >&6
2128 else
2129       # Double quotes because CPP needs to be expanded
2130     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2131     do
2132       ac_preproc_ok=false
2133 for ac_c_preproc_warn_flag in '' yes
2134 do
2135   # Use a header file that comes with gcc, so configuring glibc
2136   # with a fresh cross-compiler works.
2137   # On the NeXT, cc -E runs the code through the compiler's parser,
2138   # not just through cpp. "Syntax error" is here to catch this case.
2139   cat >conftest.$ac_ext <<_ACEOF
2140 #line 2140 "configure"
2141 #include "confdefs.h"
2142 #include <assert.h>
2143                      Syntax error
2144 _ACEOF
2145 if { (eval echo "$as_me:2145: \"$ac_cpp conftest.$ac_ext\"") >&5
2146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2147   ac_status=$?
2148   egrep -v '^ *\+' conftest.er1 >conftest.err
2149   rm -f conftest.er1
2150   cat conftest.err >&5
2151   echo "$as_me:2151: \$? = $ac_status" >&5
2152   (exit $ac_status); } >/dev/null; then
2153   if test -s conftest.err; then
2154     ac_cpp_err=$ac_c_preproc_warn_flag
2155   else
2156     ac_cpp_err=
2157   fi
2158 else
2159   ac_cpp_err=yes
2160 fi
2161 if test -z "$ac_cpp_err"; then
2162   :
2163 else
2164   echo "$as_me: failed program was:" >&5
2165   cat conftest.$ac_ext >&5
2166   # Broken: fails on valid input.
2167 continue
2168 fi
2169 rm -f conftest.err conftest.$ac_ext
2170
2171   # OK, works on sane cases.  Now check whether non-existent headers
2172   # can be detected and how.
2173   cat >conftest.$ac_ext <<_ACEOF
2174 #line 2174 "configure"
2175 #include "confdefs.h"
2176 #include <ac_nonexistent.h>
2177 _ACEOF
2178 if { (eval echo "$as_me:2178: \"$ac_cpp conftest.$ac_ext\"") >&5
2179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2180   ac_status=$?
2181   egrep -v '^ *\+' conftest.er1 >conftest.err
2182   rm -f conftest.er1
2183   cat conftest.err >&5
2184   echo "$as_me:2184: \$? = $ac_status" >&5
2185   (exit $ac_status); } >/dev/null; then
2186   if test -s conftest.err; then
2187     ac_cpp_err=$ac_c_preproc_warn_flag
2188   else
2189     ac_cpp_err=
2190   fi
2191 else
2192   ac_cpp_err=yes
2193 fi
2194 if test -z "$ac_cpp_err"; then
2195   # Broken: success on invalid input.
2196 continue
2197 else
2198   echo "$as_me: failed program was:" >&5
2199   cat conftest.$ac_ext >&5
2200   # Passes both tests.
2201 ac_preproc_ok=:
2202 break
2203 fi
2204 rm -f conftest.err conftest.$ac_ext
2205
2206 done
2207 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2208 rm -f conftest.err conftest.$ac_ext
2209 if $ac_preproc_ok; then
2210   break
2211 fi
2212
2213     done
2214     ac_cv_prog_CPP=$CPP
2215
2216 fi
2217   CPP=$ac_cv_prog_CPP
2218 else
2219   ac_cv_prog_CPP=$CPP
2220 fi
2221 echo "$as_me:2221: result: $CPP" >&5
2222 echo "${ECHO_T}$CPP" >&6
2223 ac_preproc_ok=false
2224 for ac_c_preproc_warn_flag in '' yes
2225 do
2226   # Use a header file that comes with gcc, so configuring glibc
2227   # with a fresh cross-compiler works.
2228   # On the NeXT, cc -E runs the code through the compiler's parser,
2229   # not just through cpp. "Syntax error" is here to catch this case.
2230   cat >conftest.$ac_ext <<_ACEOF
2231 #line 2231 "configure"
2232 #include "confdefs.h"
2233 #include <assert.h>
2234                      Syntax error
2235 _ACEOF
2236 if { (eval echo "$as_me:2236: \"$ac_cpp conftest.$ac_ext\"") >&5
2237   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2238   ac_status=$?
2239   egrep -v '^ *\+' conftest.er1 >conftest.err
2240   rm -f conftest.er1
2241   cat conftest.err >&5
2242   echo "$as_me:2242: \$? = $ac_status" >&5
2243   (exit $ac_status); } >/dev/null; then
2244   if test -s conftest.err; then
2245     ac_cpp_err=$ac_c_preproc_warn_flag
2246   else
2247     ac_cpp_err=
2248   fi
2249 else
2250   ac_cpp_err=yes
2251 fi
2252 if test -z "$ac_cpp_err"; then
2253   :
2254 else
2255   echo "$as_me: failed program was:" >&5
2256   cat conftest.$ac_ext >&5
2257   # Broken: fails on valid input.
2258 continue
2259 fi
2260 rm -f conftest.err conftest.$ac_ext
2261
2262   # OK, works on sane cases.  Now check whether non-existent headers
2263   # can be detected and how.
2264   cat >conftest.$ac_ext <<_ACEOF
2265 #line 2265 "configure"
2266 #include "confdefs.h"
2267 #include <ac_nonexistent.h>
2268 _ACEOF
2269 if { (eval echo "$as_me:2269: \"$ac_cpp conftest.$ac_ext\"") >&5
2270   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2271   ac_status=$?
2272   egrep -v '^ *\+' conftest.er1 >conftest.err
2273   rm -f conftest.er1
2274   cat conftest.err >&5
2275   echo "$as_me:2275: \$? = $ac_status" >&5
2276   (exit $ac_status); } >/dev/null; then
2277   if test -s conftest.err; then
2278     ac_cpp_err=$ac_c_preproc_warn_flag
2279   else
2280     ac_cpp_err=
2281   fi
2282 else
2283   ac_cpp_err=yes
2284 fi
2285 if test -z "$ac_cpp_err"; then
2286   # Broken: success on invalid input.
2287 continue
2288 else
2289   echo "$as_me: failed program was:" >&5
2290   cat conftest.$ac_ext >&5
2291   # Passes both tests.
2292 ac_preproc_ok=:
2293 break
2294 fi
2295 rm -f conftest.err conftest.$ac_ext
2296
2297 done
2298 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2299 rm -f conftest.err conftest.$ac_ext
2300 if $ac_preproc_ok; then
2301   :
2302 else
2303   { { echo "$as_me:2303: error: C preprocessor \"$CPP\" fails sanity check" >&5
2304 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2305    { (exit 1); exit 1; }; }
2306 fi
2307
2308 ac_ext=c
2309 ac_cpp='$CPP $CPPFLAGS'
2310 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2311 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2312 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2313 ac_main_return=return
2314
2315 if test $ac_cv_c_compiler_gnu = yes; then
2316     echo "$as_me:2316: checking whether $CC needs -traditional" >&5
2317 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2318 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2319   echo $ECHO_N "(cached) $ECHO_C" >&6
2320 else
2321     ac_pattern="Autoconf.*'x'"
2322   cat >conftest.$ac_ext <<_ACEOF
2323 #line 2323 "configure"
2324 #include "confdefs.h"
2325 #include <sgtty.h>
2326 int Autoconf = TIOCGETP;
2327 _ACEOF
2328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2329   egrep "$ac_pattern" >/dev/null 2>&1; then
2330   ac_cv_prog_gcc_traditional=yes
2331 else
2332   ac_cv_prog_gcc_traditional=no
2333 fi
2334 rm -rf conftest*
2335
2336   if test $ac_cv_prog_gcc_traditional = no; then
2337     cat >conftest.$ac_ext <<_ACEOF
2338 #line 2338 "configure"
2339 #include "confdefs.h"
2340 #include <termio.h>
2341 int Autoconf = TCGETA;
2342 _ACEOF
2343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2344   egrep "$ac_pattern" >/dev/null 2>&1; then
2345   ac_cv_prog_gcc_traditional=yes
2346 fi
2347 rm -rf conftest*
2348
2349   fi
2350 fi
2351 echo "$as_me:2351: result: $ac_cv_prog_gcc_traditional" >&5
2352 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2353   if test $ac_cv_prog_gcc_traditional = yes; then
2354     CC="$CC -traditional"
2355   fi
2356 fi
2357
2358 echo "$as_me:2358: checking whether $CC understands -c and -o together" >&5
2359 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2360 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2361   echo $ECHO_N "(cached) $ECHO_C" >&6
2362 else
2363
2364 cat > conftest.$ac_ext <<CF_EOF
2365 #include <stdio.h>
2366 int main()
2367 {
2368         ${cf_cv_main_return:-return}(0);
2369 }
2370 CF_EOF
2371 # We do the test twice because some compilers refuse to overwrite an
2372 # existing .o file with -o, though they will create one.
2373 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2374 if { (eval echo "$as_me:2374: \"$ac_try\"") >&5
2375   (eval $ac_try) 2>&5
2376   ac_status=$?
2377   echo "$as_me:2377: \$? = $ac_status" >&5
2378   (exit $ac_status); } &&
2379   test -f conftest2.$ac_objext && { (eval echo "$as_me:2379: \"$ac_try\"") >&5
2380   (eval $ac_try) 2>&5
2381   ac_status=$?
2382   echo "$as_me:2382: \$? = $ac_status" >&5
2383   (exit $ac_status); };
2384 then
2385   eval cf_cv_prog_CC_c_o=yes
2386 else
2387   eval cf_cv_prog_CC_c_o=no
2388 fi
2389 rm -rf conftest*
2390
2391 fi
2392 if test $cf_cv_prog_CC_c_o = yes; then
2393   echo "$as_me:2393: result: yes" >&5
2394 echo "${ECHO_T}yes" >&6
2395 else
2396   echo "$as_me:2396: result: no" >&5
2397 echo "${ECHO_T}no" >&6
2398 fi
2399
2400 echo "$as_me:2400: checking for POSIXized ISC" >&5
2401 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2402 if test -d /etc/conf/kconfig.d &&
2403    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2404 then
2405   echo "$as_me:2405: result: yes" >&5
2406 echo "${ECHO_T}yes" >&6
2407   ISC=yes # If later tests want to check for ISC.
2408
2409 cat >>confdefs.h <<\EOF
2410 #define _POSIX_SOURCE 1
2411 EOF
2412
2413   if test "$GCC" = yes; then
2414     CC="$CC -posix"
2415   else
2416     CC="$CC -Xp"
2417   fi
2418 else
2419   echo "$as_me:2419: result: no" >&5
2420 echo "${ECHO_T}no" >&6
2421   ISC=
2422 fi
2423
2424 echo "$as_me:2424: checking for ${CC-cc} option to accept ANSI C" >&5
2425 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2426 if test "${cf_cv_ansi_cc+set}" = set; then
2427   echo $ECHO_N "(cached) $ECHO_C" >&6
2428 else
2429
2430 cf_cv_ansi_cc=no
2431 cf_save_CFLAGS="$CFLAGS"
2432 cf_save_CPPFLAGS="$CPPFLAGS"
2433 # Don't try gcc -ansi; that turns off useful extensions and
2434 # breaks some systems' header files.
2435 # AIX                   -qlanglvl=ansi
2436 # Ultrix and OSF/1      -std1
2437 # HP-UX                 -Aa -D_HPUX_SOURCE
2438 # SVR4                  -Xc
2439 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2440 for cf_arg in "-DCC_HAS_PROTOS" \
2441         "" \
2442         -qlanglvl=ansi \
2443         -std1 \
2444         -Ae \
2445         "-Aa -D_HPUX_SOURCE" \
2446         -Xc
2447 do
2448
2449 cf_fix_cppflags=no
2450 cf_new_cflags=
2451 cf_new_cppflags=
2452 cf_new_extra_cppflags=
2453
2454 for cf_add_cflags in $cf_arg
2455 do
2456 case $cf_fix_cppflags in
2457 no)
2458         case $cf_add_cflags in #(vi
2459         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2460                 case $cf_add_cflags in
2461                 -D*)
2462                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2463
2464                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2465                                 && test -z "${cf_tst_cflags}" \
2466                                 && cf_fix_cppflags=yes
2467
2468                         if test $cf_fix_cppflags = yes ; then
2469                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2470                                 continue
2471                         elif test "${cf_tst_cflags}" = "\"'" ; then
2472                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2473                                 continue
2474                         fi
2475                         ;;
2476                 esac
2477                 case "$CPPFLAGS" in
2478                 *$cf_add_cflags) #(vi
2479                         ;;
2480                 *) #(vi
2481                         case $cf_add_cflags in #(vi
2482                         -D*)
2483                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2484
2485 CPPFLAGS=`echo "$CPPFLAGS" | \
2486         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2487                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2488
2489                                 ;;
2490                         esac
2491                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2492                         ;;
2493                 esac
2494                 ;;
2495         *)
2496                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2497                 ;;
2498         esac
2499         ;;
2500 yes)
2501         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2502
2503         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2504
2505         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2506                 && test -z "${cf_tst_cflags}" \
2507                 && cf_fix_cppflags=no
2508         ;;
2509 esac
2510 done
2511
2512 if test -n "$cf_new_cflags" ; then
2513
2514         CFLAGS="$CFLAGS $cf_new_cflags"
2515 fi
2516
2517 if test -n "$cf_new_cppflags" ; then
2518
2519         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2520 fi
2521
2522 if test -n "$cf_new_extra_cppflags" ; then
2523
2524         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2525 fi
2526
2527         cat >conftest.$ac_ext <<_ACEOF
2528 #line 2528 "configure"
2529 #include "confdefs.h"
2530
2531 #ifndef CC_HAS_PROTOS
2532 #if !defined(__STDC__) || (__STDC__ != 1)
2533 choke me
2534 #endif
2535 #endif
2536
2537 int
2538 main ()
2539 {
2540
2541         int test (int i, double x);
2542         struct s1 {int (*f) (int a);};
2543         struct s2 {int (*f) (double a);};
2544   ;
2545   return 0;
2546 }
2547 _ACEOF
2548 rm -f conftest.$ac_objext
2549 if { (eval echo "$as_me:2549: \"$ac_compile\"") >&5
2550   (eval $ac_compile) 2>&5
2551   ac_status=$?
2552   echo "$as_me:2552: \$? = $ac_status" >&5
2553   (exit $ac_status); } &&
2554          { ac_try='test -s conftest.$ac_objext'
2555   { (eval echo "$as_me:2555: \"$ac_try\"") >&5
2556   (eval $ac_try) 2>&5
2557   ac_status=$?
2558   echo "$as_me:2558: \$? = $ac_status" >&5
2559   (exit $ac_status); }; }; then
2560   cf_cv_ansi_cc="$cf_arg"; break
2561 else
2562   echo "$as_me: failed program was:" >&5
2563 cat conftest.$ac_ext >&5
2564 fi
2565 rm -f conftest.$ac_objext conftest.$ac_ext
2566 done
2567 CFLAGS="$cf_save_CFLAGS"
2568 CPPFLAGS="$cf_save_CPPFLAGS"
2569
2570 fi
2571 echo "$as_me:2571: result: $cf_cv_ansi_cc" >&5
2572 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2573
2574 if test "$cf_cv_ansi_cc" != "no"; then
2575 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2576
2577 cf_fix_cppflags=no
2578 cf_new_cflags=
2579 cf_new_cppflags=
2580 cf_new_extra_cppflags=
2581
2582 for cf_add_cflags in $cf_cv_ansi_cc
2583 do
2584 case $cf_fix_cppflags in
2585 no)
2586         case $cf_add_cflags in #(vi
2587         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2588                 case $cf_add_cflags in
2589                 -D*)
2590                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2591
2592                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2593                                 && test -z "${cf_tst_cflags}" \
2594                                 && cf_fix_cppflags=yes
2595
2596                         if test $cf_fix_cppflags = yes ; then
2597                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2598                                 continue
2599                         elif test "${cf_tst_cflags}" = "\"'" ; then
2600                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2601                                 continue
2602                         fi
2603                         ;;
2604                 esac
2605                 case "$CPPFLAGS" in
2606                 *$cf_add_cflags) #(vi
2607                         ;;
2608                 *) #(vi
2609                         case $cf_add_cflags in #(vi
2610                         -D*)
2611                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2612
2613 CPPFLAGS=`echo "$CPPFLAGS" | \
2614         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2615                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2616
2617                                 ;;
2618                         esac
2619                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2620                         ;;
2621                 esac
2622                 ;;
2623         *)
2624                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2625                 ;;
2626         esac
2627         ;;
2628 yes)
2629         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2630
2631         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2632
2633         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2634                 && test -z "${cf_tst_cflags}" \
2635                 && cf_fix_cppflags=no
2636         ;;
2637 esac
2638 done
2639
2640 if test -n "$cf_new_cflags" ; then
2641
2642         CFLAGS="$CFLAGS $cf_new_cflags"
2643 fi
2644
2645 if test -n "$cf_new_cppflags" ; then
2646
2647         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2648 fi
2649
2650 if test -n "$cf_new_extra_cppflags" ; then
2651
2652         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2653 fi
2654
2655 else
2656         cat >>confdefs.h <<\EOF
2657 #define CC_HAS_PROTOS 1
2658 EOF
2659
2660 fi
2661 fi
2662
2663 if test "$cf_cv_ansi_cc" = "no"; then
2664         { { echo "$as_me:2664: error: Your compiler does not appear to recognize prototypes.
2665 You have the following choices:
2666         a. adjust your compiler options
2667         b. get an up-to-date compiler
2668         c. use a wrapper such as unproto" >&5
2669 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2670 You have the following choices:
2671         a. adjust your compiler options
2672         b. get an up-to-date compiler
2673         c. use a wrapper such as unproto" >&2;}
2674    { (exit 1); exit 1; }; }
2675 fi
2676
2677 case $cf_cv_system_name in
2678 os2*)
2679     CFLAGS="$CFLAGS -Zmt"
2680     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2681     CXXFLAGS="$CXXFLAGS -Zmt"
2682     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2683     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2684     ac_cv_exeext=.exe
2685     ;;
2686 esac
2687
2688 PROG_EXT="$EXEEXT"
2689
2690 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2691 #define PROG_EXT "$PROG_EXT"
2692 EOF
2693
2694 if test "$cross_compiling" = yes ; then
2695   LDCONFIG=:
2696 else
2697 case "$cf_cv_system_name" in #(vi
2698 dragonfly*|freebsd*) #(vi
2699   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2700   ;;
2701 *) LDPATH=$PATH:/sbin:/usr/sbin
2702   # Extract the first word of "ldconfig", so it can be a program name with args.
2703 set dummy ldconfig; ac_word=$2
2704 echo "$as_me:2704: checking for $ac_word" >&5
2705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2706 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2707   echo $ECHO_N "(cached) $ECHO_C" >&6
2708 else
2709   case $LDCONFIG in
2710   [\\/]* | ?:[\\/]*)
2711   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2712   ;;
2713   *)
2714   ac_save_IFS=$IFS; IFS=$ac_path_separator
2715 ac_dummy="$LDPATH"
2716 for ac_dir in $ac_dummy; do
2717   IFS=$ac_save_IFS
2718   test -z "$ac_dir" && ac_dir=.
2719   if $as_executable_p "$ac_dir/$ac_word"; then
2720    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2721    echo "$as_me:2721: found $ac_dir/$ac_word" >&5
2722    break
2723 fi
2724 done
2725
2726   ;;
2727 esac
2728 fi
2729 LDCONFIG=$ac_cv_path_LDCONFIG
2730
2731 if test -n "$LDCONFIG"; then
2732   echo "$as_me:2732: result: $LDCONFIG" >&5
2733 echo "${ECHO_T}$LDCONFIG" >&6
2734 else
2735   echo "$as_me:2735: result: no" >&5
2736 echo "${ECHO_T}no" >&6
2737 fi
2738
2739   ;;
2740 esac
2741 fi
2742
2743 echo "$as_me:2743: checking if you want to ensure bool is consistent with C++" >&5
2744 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2745
2746 # Check whether --with-cxx or --without-cxx was given.
2747 if test "${with_cxx+set}" = set; then
2748   withval="$with_cxx"
2749   cf_with_cxx=$withval
2750 else
2751   cf_with_cxx=yes
2752 fi;
2753 echo "$as_me:2753: result: $cf_with_cxx" >&5
2754 echo "${ECHO_T}$cf_with_cxx" >&6
2755 if test "X$cf_with_cxx" = Xno ; then
2756         CXX=""
2757         GXX=""
2758 else
2759         # with autoconf 2.13, we can change the error to a warning:
2760                 ac_ext=cc
2761 ac_cpp='$CXXCPP $CPPFLAGS'
2762 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2763 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2764 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2765 ac_main_return=return
2766 if test -n "$ac_tool_prefix"; then
2767   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2768   do
2769     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2770 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2771 echo "$as_me:2771: checking for $ac_word" >&5
2772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2773 if test "${ac_cv_prog_CXX+set}" = set; then
2774   echo $ECHO_N "(cached) $ECHO_C" >&6
2775 else
2776   if test -n "$CXX"; then
2777   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2778 else
2779   ac_save_IFS=$IFS; IFS=$ac_path_separator
2780 ac_dummy="$PATH"
2781 for ac_dir in $ac_dummy; do
2782   IFS=$ac_save_IFS
2783   test -z "$ac_dir" && ac_dir=.
2784   $as_executable_p "$ac_dir/$ac_word" || continue
2785 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2786 echo "$as_me:2786: found $ac_dir/$ac_word" >&5
2787 break
2788 done
2789
2790 fi
2791 fi
2792 CXX=$ac_cv_prog_CXX
2793 if test -n "$CXX"; then
2794   echo "$as_me:2794: result: $CXX" >&5
2795 echo "${ECHO_T}$CXX" >&6
2796 else
2797   echo "$as_me:2797: result: no" >&5
2798 echo "${ECHO_T}no" >&6
2799 fi
2800
2801     test -n "$CXX" && break
2802   done
2803 fi
2804 if test -z "$CXX"; then
2805   ac_ct_CXX=$CXX
2806   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2807 do
2808   # Extract the first word of "$ac_prog", so it can be a program name with args.
2809 set dummy $ac_prog; ac_word=$2
2810 echo "$as_me:2810: checking for $ac_word" >&5
2811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2812 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2813   echo $ECHO_N "(cached) $ECHO_C" >&6
2814 else
2815   if test -n "$ac_ct_CXX"; then
2816   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2817 else
2818   ac_save_IFS=$IFS; IFS=$ac_path_separator
2819 ac_dummy="$PATH"
2820 for ac_dir in $ac_dummy; do
2821   IFS=$ac_save_IFS
2822   test -z "$ac_dir" && ac_dir=.
2823   $as_executable_p "$ac_dir/$ac_word" || continue
2824 ac_cv_prog_ac_ct_CXX="$ac_prog"
2825 echo "$as_me:2825: found $ac_dir/$ac_word" >&5
2826 break
2827 done
2828
2829 fi
2830 fi
2831 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2832 if test -n "$ac_ct_CXX"; then
2833   echo "$as_me:2833: result: $ac_ct_CXX" >&5
2834 echo "${ECHO_T}$ac_ct_CXX" >&6
2835 else
2836   echo "$as_me:2836: result: no" >&5
2837 echo "${ECHO_T}no" >&6
2838 fi
2839
2840   test -n "$ac_ct_CXX" && break
2841 done
2842 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2843
2844   CXX=$ac_ct_CXX
2845 fi
2846
2847 # Provide some information about the compiler.
2848 echo "$as_me:2848:" \
2849      "checking for C++ compiler version" >&5
2850 ac_compiler=`set X $ac_compile; echo $2`
2851 { (eval echo "$as_me:2851: \"$ac_compiler --version </dev/null >&5\"") >&5
2852   (eval $ac_compiler --version </dev/null >&5) 2>&5
2853   ac_status=$?
2854   echo "$as_me:2854: \$? = $ac_status" >&5
2855   (exit $ac_status); }
2856 { (eval echo "$as_me:2856: \"$ac_compiler -v </dev/null >&5\"") >&5
2857   (eval $ac_compiler -v </dev/null >&5) 2>&5
2858   ac_status=$?
2859   echo "$as_me:2859: \$? = $ac_status" >&5
2860   (exit $ac_status); }
2861 { (eval echo "$as_me:2861: \"$ac_compiler -V </dev/null >&5\"") >&5
2862   (eval $ac_compiler -V </dev/null >&5) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); }
2866
2867 echo "$as_me:2867: checking whether we are using the GNU C++ compiler" >&5
2868 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2869 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2870   echo $ECHO_N "(cached) $ECHO_C" >&6
2871 else
2872   cat >conftest.$ac_ext <<_ACEOF
2873 #line 2873 "configure"
2874 #include "confdefs.h"
2875
2876 int
2877 main ()
2878 {
2879 #ifndef __GNUC__
2880        choke me
2881 #endif
2882
2883   ;
2884   return 0;
2885 }
2886 _ACEOF
2887 rm -f conftest.$ac_objext
2888 if { (eval echo "$as_me:2888: \"$ac_compile\"") >&5
2889   (eval $ac_compile) 2>&5
2890   ac_status=$?
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit $ac_status); } &&
2893          { ac_try='test -s conftest.$ac_objext'
2894   { (eval echo "$as_me:2894: \"$ac_try\"") >&5
2895   (eval $ac_try) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); }; }; then
2899   ac_compiler_gnu=yes
2900 else
2901   echo "$as_me: failed program was:" >&5
2902 cat conftest.$ac_ext >&5
2903 ac_compiler_gnu=no
2904 fi
2905 rm -f conftest.$ac_objext conftest.$ac_ext
2906 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2907
2908 fi
2909 echo "$as_me:2909: result: $ac_cv_cxx_compiler_gnu" >&5
2910 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2911 GXX=`test $ac_compiler_gnu = yes && echo yes`
2912 ac_test_CXXFLAGS=${CXXFLAGS+set}
2913 ac_save_CXXFLAGS=$CXXFLAGS
2914 CXXFLAGS="-g"
2915 echo "$as_me:2915: checking whether $CXX accepts -g" >&5
2916 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2917 if test "${ac_cv_prog_cxx_g+set}" = set; then
2918   echo $ECHO_N "(cached) $ECHO_C" >&6
2919 else
2920   cat >conftest.$ac_ext <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923
2924 int
2925 main ()
2926 {
2927
2928   ;
2929   return 0;
2930 }
2931 _ACEOF
2932 rm -f conftest.$ac_objext
2933 if { (eval echo "$as_me:2933: \"$ac_compile\"") >&5
2934   (eval $ac_compile) 2>&5
2935   ac_status=$?
2936   echo "$as_me:2936: \$? = $ac_status" >&5
2937   (exit $ac_status); } &&
2938          { ac_try='test -s conftest.$ac_objext'
2939   { (eval echo "$as_me:2939: \"$ac_try\"") >&5
2940   (eval $ac_try) 2>&5
2941   ac_status=$?
2942   echo "$as_me:2942: \$? = $ac_status" >&5
2943   (exit $ac_status); }; }; then
2944   ac_cv_prog_cxx_g=yes
2945 else
2946   echo "$as_me: failed program was:" >&5
2947 cat conftest.$ac_ext >&5
2948 ac_cv_prog_cxx_g=no
2949 fi
2950 rm -f conftest.$ac_objext conftest.$ac_ext
2951 fi
2952 echo "$as_me:2952: result: $ac_cv_prog_cxx_g" >&5
2953 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2954 if test "$ac_test_CXXFLAGS" = set; then
2955   CXXFLAGS=$ac_save_CXXFLAGS
2956 elif test $ac_cv_prog_cxx_g = yes; then
2957   if test "$GXX" = yes; then
2958     CXXFLAGS="-g -O2"
2959   else
2960     CXXFLAGS="-g"
2961   fi
2962 else
2963   if test "$GXX" = yes; then
2964     CXXFLAGS="-O2"
2965   else
2966     CXXFLAGS=
2967   fi
2968 fi
2969 for ac_declaration in \
2970    ''\
2971    '#include <stdlib.h>' \
2972    'extern "C" void std::exit (int) throw (); using std::exit;' \
2973    'extern "C" void std::exit (int); using std::exit;' \
2974    'extern "C" void exit (int) throw ();' \
2975    'extern "C" void exit (int);' \
2976    'void exit (int);'
2977 do
2978   cat >conftest.$ac_ext <<_ACEOF
2979 #line 2979 "configure"
2980 #include "confdefs.h"
2981 #include <stdlib.h>
2982 $ac_declaration
2983 int
2984 main ()
2985 {
2986 exit (42);
2987   ;
2988   return 0;
2989 }
2990 _ACEOF
2991 rm -f conftest.$ac_objext
2992 if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993   (eval $ac_compile) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); } &&
2997          { ac_try='test -s conftest.$ac_objext'
2998   { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999   (eval $ac_try) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3001: \$? = $ac_status" >&5
3002   (exit $ac_status); }; }; then
3003   :
3004 else
3005   echo "$as_me: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3007 continue
3008 fi
3009 rm -f conftest.$ac_objext conftest.$ac_ext
3010   cat >conftest.$ac_ext <<_ACEOF
3011 #line 3011 "configure"
3012 #include "confdefs.h"
3013 $ac_declaration
3014 int
3015 main ()
3016 {
3017 exit (42);
3018   ;
3019   return 0;
3020 }
3021 _ACEOF
3022 rm -f conftest.$ac_objext
3023 if { (eval echo "$as_me:3023: \"$ac_compile\"") >&5
3024   (eval $ac_compile) 2>&5
3025   ac_status=$?
3026   echo "$as_me:3026: \$? = $ac_status" >&5
3027   (exit $ac_status); } &&
3028          { ac_try='test -s conftest.$ac_objext'
3029   { (eval echo "$as_me:3029: \"$ac_try\"") >&5
3030   (eval $ac_try) 2>&5
3031   ac_status=$?
3032   echo "$as_me:3032: \$? = $ac_status" >&5
3033   (exit $ac_status); }; }; then
3034   break
3035 else
3036   echo "$as_me: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
3038 fi
3039 rm -f conftest.$ac_objext conftest.$ac_ext
3040 done
3041 rm -rf conftest*
3042 if test -n "$ac_declaration"; then
3043   echo '#ifdef __cplusplus' >>confdefs.h
3044   echo $ac_declaration      >>confdefs.h
3045   echo '#endif'             >>confdefs.h
3046 fi
3047
3048 ac_ext=c
3049 ac_cpp='$CPP $CPPFLAGS'
3050 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3051 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3052 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3053 ac_main_return=return
3054
3055                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3056         if test "$CXX" = "g++" ; then
3057                 # Extract the first word of "g++", so it can be a program name with args.
3058 set dummy g++; ac_word=$2
3059 echo "$as_me:3059: checking for $ac_word" >&5
3060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3061 if test "${ac_cv_path_CXX+set}" = set; then
3062   echo $ECHO_N "(cached) $ECHO_C" >&6
3063 else
3064   case $CXX in
3065   [\\/]* | ?:[\\/]*)
3066   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3067   ;;
3068   *)
3069   ac_save_IFS=$IFS; IFS=$ac_path_separator
3070 ac_dummy="$PATH"
3071 for ac_dir in $ac_dummy; do
3072   IFS=$ac_save_IFS
3073   test -z "$ac_dir" && ac_dir=.
3074   if $as_executable_p "$ac_dir/$ac_word"; then
3075    ac_cv_path_CXX="$ac_dir/$ac_word"
3076    echo "$as_me:3076: found $ac_dir/$ac_word" >&5
3077    break
3078 fi
3079 done
3080
3081   ;;
3082 esac
3083 fi
3084 CXX=$ac_cv_path_CXX
3085
3086 if test -n "$CXX"; then
3087   echo "$as_me:3087: result: $CXX" >&5
3088 echo "${ECHO_T}$CXX" >&6
3089 else
3090   echo "$as_me:3090: result: no" >&5
3091 echo "${ECHO_T}no" >&6
3092 fi
3093
3094         fi
3095         if test "$CXX" = "g++" ; then
3096                 { echo "$as_me:3096: WARNING: ignoring hardcoded g++" >&5
3097 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3098                 cf_with_cxx=no; CXX=""; GXX="";
3099         fi
3100 fi
3101
3102 GXX_VERSION=none
3103 if test "$GXX" = yes; then
3104         echo "$as_me:3104: checking version of g++" >&5
3105 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3106         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3107         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3108         echo "$as_me:3108: result: $GXX_VERSION" >&5
3109 echo "${ECHO_T}$GXX_VERSION" >&6
3110 fi
3111
3112 case $GXX_VERSION in
3113 1*|2.[0-6]*)
3114         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3115         # cf_cxx_library=no
3116         { echo "$as_me:3116: WARNING: templates do not work" >&5
3117 echo "$as_me: WARNING: templates do not work" >&2;}
3118         ;;
3119 esac
3120
3121 echo "$as_me:3121: checking if you want to build C++ binding and demo" >&5
3122 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3123
3124 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3125 if test "${with_cxx_binding+set}" = set; then
3126   withval="$with_cxx_binding"
3127   cf_with_cxx_binding=$withval
3128 else
3129   cf_with_cxx_binding=$cf_with_cxx
3130 fi;
3131 echo "$as_me:3131: result: $cf_with_cxx_binding" >&5
3132 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3133
3134 echo "$as_me:3134: checking if you want to build with Ada95" >&5
3135 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3136
3137 # Check whether --with-ada or --without-ada was given.
3138 if test "${with_ada+set}" = set; then
3139   withval="$with_ada"
3140   cf_with_ada=$withval
3141 else
3142   cf_with_ada=yes
3143 fi;
3144 echo "$as_me:3144: result: $cf_with_ada" >&5
3145 echo "${ECHO_T}$cf_with_ada" >&6
3146
3147 echo "$as_me:3147: checking if you want to install manpages" >&5
3148 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3149
3150 # Check whether --with-manpages or --without-manpages was given.
3151 if test "${with_manpages+set}" = set; then
3152   withval="$with_manpages"
3153   cf_with_manpages=$withval
3154 else
3155   cf_with_manpages=yes
3156 fi;
3157 echo "$as_me:3157: result: $cf_with_manpages" >&5
3158 echo "${ECHO_T}$cf_with_manpages" >&6
3159
3160 echo "$as_me:3160: checking if you want to build programs such as tic" >&5
3161 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3162
3163 # Check whether --with-progs or --without-progs was given.
3164 if test "${with_progs+set}" = set; then
3165   withval="$with_progs"
3166   cf_with_progs=$withval
3167 else
3168   cf_with_progs=yes
3169 fi;
3170 echo "$as_me:3170: result: $cf_with_progs" >&5
3171 echo "${ECHO_T}$cf_with_progs" >&6
3172
3173 echo "$as_me:3173: checking if you wish to install curses.h" >&5
3174 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3175
3176 # Check whether --with-curses-h or --without-curses-h was given.
3177 if test "${with_curses_h+set}" = set; then
3178   withval="$with_curses_h"
3179   with_curses_h=$withval
3180 else
3181   with_curses_h=yes
3182 fi;
3183 echo "$as_me:3183: result: $with_curses_h" >&5
3184 echo "${ECHO_T}$with_curses_h" >&6
3185
3186 modules_to_build="ncurses"
3187 if test "X$cf_with_progs" != Xno ; then
3188 modules_to_build="$modules_to_build progs tack"
3189 fi
3190 modules_to_build="$modules_to_build panel menu form"
3191
3192 test "$program_prefix" != NONE &&
3193   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3194 # Use a double $ so make ignores it.
3195 test "$program_suffix" != NONE &&
3196   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3197 # Double any \ or $.  echo might interpret backslashes.
3198 # By default was `s,x,x', remove it if useless.
3199 cat <<\_ACEOF >conftest.sed
3200 s/[\\$]/&&/g;s/;s,x,x,$//
3201 _ACEOF
3202 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3203 rm conftest.sed
3204
3205 for ac_prog in mawk gawk nawk awk
3206 do
3207   # Extract the first word of "$ac_prog", so it can be a program name with args.
3208 set dummy $ac_prog; ac_word=$2
3209 echo "$as_me:3209: checking for $ac_word" >&5
3210 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3211 if test "${ac_cv_prog_AWK+set}" = set; then
3212   echo $ECHO_N "(cached) $ECHO_C" >&6
3213 else
3214   if test -n "$AWK"; then
3215   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3216 else
3217   ac_save_IFS=$IFS; IFS=$ac_path_separator
3218 ac_dummy="$PATH"
3219 for ac_dir in $ac_dummy; do
3220   IFS=$ac_save_IFS
3221   test -z "$ac_dir" && ac_dir=.
3222   $as_executable_p "$ac_dir/$ac_word" || continue
3223 ac_cv_prog_AWK="$ac_prog"
3224 echo "$as_me:3224: found $ac_dir/$ac_word" >&5
3225 break
3226 done
3227
3228 fi
3229 fi
3230 AWK=$ac_cv_prog_AWK
3231 if test -n "$AWK"; then
3232   echo "$as_me:3232: result: $AWK" >&5
3233 echo "${ECHO_T}$AWK" >&6
3234 else
3235   echo "$as_me:3235: result: no" >&5
3236 echo "${ECHO_T}no" >&6
3237 fi
3238
3239   test -n "$AWK" && break
3240 done
3241
3242 test -z "$AWK" && { { echo "$as_me:3242: error: No awk program found" >&5
3243 echo "$as_me: error: No awk program found" >&2;}
3244    { (exit 1); exit 1; }; }
3245
3246 echo "$as_me:3246: checking for egrep" >&5
3247 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3248 if test "${ac_cv_prog_egrep+set}" = set; then
3249   echo $ECHO_N "(cached) $ECHO_C" >&6
3250 else
3251   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3252     then ac_cv_prog_egrep='grep -E'
3253     else ac_cv_prog_egrep='egrep'
3254     fi
3255 fi
3256 echo "$as_me:3256: result: $ac_cv_prog_egrep" >&5
3257 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3258  EGREP=$ac_cv_prog_egrep
3259
3260 test -z "$EGREP" && { { echo "$as_me:3260: error: No egrep program found" >&5
3261 echo "$as_me: error: No egrep program found" >&2;}
3262    { (exit 1); exit 1; }; }
3263
3264 # Find a good install program.  We prefer a C program (faster),
3265 # so one script is as good as another.  But avoid the broken or
3266 # incompatible versions:
3267 # SysV /etc/install, /usr/sbin/install
3268 # SunOS /usr/etc/install
3269 # IRIX /sbin/install
3270 # AIX /bin/install
3271 # AmigaOS /C/install, which installs bootblocks on floppy discs
3272 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3273 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3274 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3275 # ./install, which can be erroneously created by make from ./install.sh.
3276 echo "$as_me:3276: checking for a BSD compatible install" >&5
3277 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3278 if test -z "$INSTALL"; then
3279 if test "${ac_cv_path_install+set}" = set; then
3280   echo $ECHO_N "(cached) $ECHO_C" >&6
3281 else
3282     ac_save_IFS=$IFS; IFS=$ac_path_separator
3283   for ac_dir in $PATH; do
3284     IFS=$ac_save_IFS
3285     # Account for people who put trailing slashes in PATH elements.
3286     case $ac_dir/ in
3287     / | ./ | .// | /cC/* \
3288     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3289     | /usr/ucb/* ) ;;
3290     *)
3291       # OSF1 and SCO ODT 3.0 have their own names for install.
3292       # Don't use installbsd from OSF since it installs stuff as root
3293       # by default.
3294       for ac_prog in ginstall scoinst install; do
3295         if $as_executable_p "$ac_dir/$ac_prog"; then
3296           if test $ac_prog = install &&
3297             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3298             # AIX install.  It has an incompatible calling convention.
3299             :
3300           elif test $ac_prog = install &&
3301             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3302             # program-specific install script used by HP pwplus--don't use.
3303             :
3304           else
3305             ac_cv_path_install="$ac_dir/$ac_prog -c"
3306             break 2
3307           fi
3308         fi
3309       done
3310       ;;
3311     esac
3312   done
3313
3314 fi
3315   if test "${ac_cv_path_install+set}" = set; then
3316     INSTALL=$ac_cv_path_install
3317   else
3318     # As a last resort, use the slow shell script.  We don't cache a
3319     # path for INSTALL within a source directory, because that will
3320     # break other packages using the cache if that directory is
3321     # removed, or if the path is relative.
3322     INSTALL=$ac_install_sh
3323   fi
3324 fi
3325 echo "$as_me:3325: result: $INSTALL" >&5
3326 echo "${ECHO_T}$INSTALL" >&6
3327
3328 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3329 # It thinks the first close brace ends the variable substitution.
3330 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3331
3332 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3333
3334 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3335
3336 case $INSTALL in
3337 /*)
3338   ;;
3339 *)
3340   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3341   test -z "$cf_dir" && cf_dir=.
3342   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3343   ;;
3344 esac
3345
3346 for ac_prog in tdlint lint alint splint lclint
3347 do
3348   # Extract the first word of "$ac_prog", so it can be a program name with args.
3349 set dummy $ac_prog; ac_word=$2
3350 echo "$as_me:3350: checking for $ac_word" >&5
3351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3352 if test "${ac_cv_prog_LINT+set}" = set; then
3353   echo $ECHO_N "(cached) $ECHO_C" >&6
3354 else
3355   if test -n "$LINT"; then
3356   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3357 else
3358   ac_save_IFS=$IFS; IFS=$ac_path_separator
3359 ac_dummy="$PATH"
3360 for ac_dir in $ac_dummy; do
3361   IFS=$ac_save_IFS
3362   test -z "$ac_dir" && ac_dir=.
3363   $as_executable_p "$ac_dir/$ac_word" || continue
3364 ac_cv_prog_LINT="$ac_prog"
3365 echo "$as_me:3365: found $ac_dir/$ac_word" >&5
3366 break
3367 done
3368
3369 fi
3370 fi
3371 LINT=$ac_cv_prog_LINT
3372 if test -n "$LINT"; then
3373   echo "$as_me:3373: result: $LINT" >&5
3374 echo "${ECHO_T}$LINT" >&6
3375 else
3376   echo "$as_me:3376: result: no" >&5
3377 echo "${ECHO_T}no" >&6
3378 fi
3379
3380   test -n "$LINT" && break
3381 done
3382
3383 echo "$as_me:3383: checking whether ln -s works" >&5
3384 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3385 LN_S=$as_ln_s
3386 if test "$LN_S" = "ln -s"; then
3387   echo "$as_me:3387: result: yes" >&5
3388 echo "${ECHO_T}yes" >&6
3389 else
3390   echo "$as_me:3390: result: no, using $LN_S" >&5
3391 echo "${ECHO_T}no, using $LN_S" >&6
3392 fi
3393
3394 echo "$as_me:3394: checking if $LN_S -f options work" >&5
3395 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3396
3397 rm -f conf$$.src conf$$dst
3398 echo >conf$$.dst
3399 echo first >conf$$.src
3400 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3401         cf_prog_ln_sf=yes
3402 else
3403         cf_prog_ln_sf=no
3404 fi
3405 rm -f conf$$.dst conf$$src
3406 echo "$as_me:3406: result: $cf_prog_ln_sf" >&5
3407 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3408
3409 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3410
3411 echo "$as_me:3411: checking for long file names" >&5
3412 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3413 if test "${ac_cv_sys_long_file_names+set}" = set; then
3414   echo $ECHO_N "(cached) $ECHO_C" >&6
3415 else
3416   ac_cv_sys_long_file_names=yes
3417 # Test for long file names in all the places we know might matter:
3418 #      .                the current directory, where building will happen
3419 #      $prefix/lib      where we will be installing things
3420 #      $exec_prefix/lib likewise
3421 # eval it to expand exec_prefix.
3422 #      $TMPDIR          if set, where it might want to write temporary files
3423 # if $TMPDIR is not set:
3424 #      /tmp             where it might want to write temporary files
3425 #      /var/tmp         likewise
3426 #      /usr/tmp         likewise
3427 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3428   ac_tmpdirs=$TMPDIR
3429 else
3430   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3431 fi
3432 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3433   test -d $ac_dir || continue
3434   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3435   ac_xdir=$ac_dir/cf$$
3436   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3437   ac_tf1=$ac_xdir/conftest9012345
3438   ac_tf2=$ac_xdir/conftest9012346
3439   (echo 1 >$ac_tf1) 2>/dev/null
3440   (echo 2 >$ac_tf2) 2>/dev/null
3441   ac_val=`cat $ac_tf1 2>/dev/null`
3442   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3443     ac_cv_sys_long_file_names=no
3444     rm -rf $ac_xdir 2>/dev/null
3445     break
3446   fi
3447   rm -rf $ac_xdir 2>/dev/null
3448 done
3449 fi
3450 echo "$as_me:3450: result: $ac_cv_sys_long_file_names" >&5
3451 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3452 if test $ac_cv_sys_long_file_names = yes; then
3453
3454 cat >>confdefs.h <<\EOF
3455 #define HAVE_LONG_FILE_NAMES 1
3456 EOF
3457
3458 fi
3459
3460 # if we find pkg-config, check if we should install the ".pc" files.
3461
3462 echo "$as_me:3462: checking if you want to use pkg-config" >&5
3463 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3464
3465 # Check whether --with-pkg-config or --without-pkg-config was given.
3466 if test "${with_pkg_config+set}" = set; then
3467   withval="$with_pkg_config"
3468   cf_pkg_config=$withval
3469 else
3470   cf_pkg_config=yes
3471 fi;
3472 echo "$as_me:3472: result: $cf_pkg_config" >&5
3473 echo "${ECHO_T}$cf_pkg_config" >&6
3474
3475 case $cf_pkg_config in #(vi
3476 no) #(vi
3477         PKG_CONFIG=none
3478         ;;
3479 yes) #(vi
3480         # Extract the first word of "pkg-config", so it can be a program name with args.
3481 set dummy pkg-config; ac_word=$2
3482 echo "$as_me:3482: checking for $ac_word" >&5
3483 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3484 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3485   echo $ECHO_N "(cached) $ECHO_C" >&6
3486 else
3487   case $PKG_CONFIG in
3488   [\\/]* | ?:[\\/]*)
3489   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3490   ;;
3491   *)
3492   ac_save_IFS=$IFS; IFS=$ac_path_separator
3493 ac_dummy="$PATH"
3494 for ac_dir in $ac_dummy; do
3495   IFS=$ac_save_IFS
3496   test -z "$ac_dir" && ac_dir=.
3497   if $as_executable_p "$ac_dir/$ac_word"; then
3498    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3499    echo "$as_me:3499: found $ac_dir/$ac_word" >&5
3500    break
3501 fi
3502 done
3503
3504   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3505   ;;
3506 esac
3507 fi
3508 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3509
3510 if test -n "$PKG_CONFIG"; then
3511   echo "$as_me:3511: result: $PKG_CONFIG" >&5
3512 echo "${ECHO_T}$PKG_CONFIG" >&6
3513 else
3514   echo "$as_me:3514: result: no" >&5
3515 echo "${ECHO_T}no" >&6
3516 fi
3517
3518         ;;
3519 *)
3520         PKG_CONFIG=$withval
3521         ;;
3522 esac
3523
3524 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3525 if test "$PKG_CONFIG" != none ; then
3526
3527 if test "x$prefix" != xNONE; then
3528   cf_path_syntax="$prefix"
3529 else
3530   cf_path_syntax="$ac_default_prefix"
3531 fi
3532
3533 case ".$PKG_CONFIG" in #(vi
3534 .\$\(*\)*|.\'*\'*) #(vi
3535   ;;
3536 ..|./*|.\\*) #(vi
3537   ;;
3538 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3539   ;;
3540 .\${*prefix}*) #(vi
3541   eval PKG_CONFIG="$PKG_CONFIG"
3542   case ".$PKG_CONFIG" in #(vi
3543   .NONE/*)
3544     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3545     ;;
3546   esac
3547   ;; #(vi
3548 .no|.NONE/*)
3549   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3550   ;;
3551 *)
3552   { { echo "$as_me:3552: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3553 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3554    { (exit 1); exit 1; }; }
3555   ;;
3556 esac
3557
3558 fi
3559
3560 if test "$PKG_CONFIG" != no ; then
3561         echo "$as_me:3561: checking if we should install .pc files for $PKG_CONFIG" >&5
3562 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3563
3564         # Leave this as something that can be overridden in the environment.
3565         if test -z "$PKG_CONFIG_LIBDIR" ; then
3566                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3567         fi
3568         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3569         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3570
3571 # Check whether --enable-pc-files or --disable-pc-files was given.
3572 if test "${enable_pc_files+set}" = set; then
3573   enableval="$enable_pc_files"
3574   enable_pc_files=$enableval
3575 else
3576   enable_pc_files=no
3577 fi;
3578                 echo "$as_me:3578: result: $enable_pc_files" >&5
3579 echo "${ECHO_T}$enable_pc_files" >&6
3580         else
3581                 echo "$as_me:3581: result: no" >&5
3582 echo "${ECHO_T}no" >&6
3583                 { echo "$as_me:3583: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3584 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3585                 enable_pc_files=no
3586         fi
3587 fi
3588
3589 echo "$as_me:3589: checking if we should assume mixed-case filenames" >&5
3590 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3591
3592 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3593 if test "${enable_mixed_case+set}" = set; then
3594   enableval="$enable_mixed_case"
3595   enable_mixedcase=$enableval
3596 else
3597   enable_mixedcase=auto
3598 fi;
3599 echo "$as_me:3599: result: $enable_mixedcase" >&5
3600 echo "${ECHO_T}$enable_mixedcase" >&6
3601 if test "$enable_mixedcase" = "auto" ; then
3602
3603 echo "$as_me:3603: checking if filesystem supports mixed-case filenames" >&5
3604 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3605 if test "${cf_cv_mixedcase+set}" = set; then
3606   echo $ECHO_N "(cached) $ECHO_C" >&6
3607 else
3608
3609 if test "$cross_compiling" = yes ; then
3610         case $target_alias in #(vi
3611         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3612                 cf_cv_mixedcase=no
3613                 ;;
3614         *)
3615                 cf_cv_mixedcase=yes
3616                 ;;
3617         esac
3618 else
3619         rm -f conftest CONFTEST
3620         echo test >conftest
3621         if test -f CONFTEST ; then
3622                 cf_cv_mixedcase=no
3623         else
3624                 cf_cv_mixedcase=yes
3625         fi
3626         rm -f conftest CONFTEST
3627 fi
3628
3629 fi
3630 echo "$as_me:3630: result: $cf_cv_mixedcase" >&5
3631 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3632 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3633 #define MIXEDCASE_FILENAMES 1
3634 EOF
3635
3636 else
3637     cf_cv_mixedcase=$enable_mixedcase
3638     if test "$enable_mixedcase" = "yes" ; then
3639         cat >>confdefs.h <<\EOF
3640 #define MIXEDCASE_FILENAMES 1
3641 EOF
3642
3643     fi
3644 fi
3645
3646 # do this after mixed-case option (tags/TAGS is not as important as tic).
3647 echo "$as_me:3647: checking whether ${MAKE-make} sets \${MAKE}" >&5
3648 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3649 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3650 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3651   echo $ECHO_N "(cached) $ECHO_C" >&6
3652 else
3653   cat >conftest.make <<\EOF
3654 all:
3655         @echo 'ac_maketemp="${MAKE}"'
3656 EOF
3657 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3658 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3659 if test -n "$ac_maketemp"; then
3660   eval ac_cv_prog_make_${ac_make}_set=yes
3661 else
3662   eval ac_cv_prog_make_${ac_make}_set=no
3663 fi
3664 rm -f conftest.make
3665 fi
3666 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3667   echo "$as_me:3667: result: yes" >&5
3668 echo "${ECHO_T}yes" >&6
3669   SET_MAKE=
3670 else
3671   echo "$as_me:3671: result: no" >&5
3672 echo "${ECHO_T}no" >&6
3673   SET_MAKE="MAKE=${MAKE-make}"
3674 fi
3675
3676 for ac_prog in exctags ctags
3677 do
3678   # Extract the first word of "$ac_prog", so it can be a program name with args.
3679 set dummy $ac_prog; ac_word=$2
3680 echo "$as_me:3680: checking for $ac_word" >&5
3681 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3682 if test "${ac_cv_prog_CTAGS+set}" = set; then
3683   echo $ECHO_N "(cached) $ECHO_C" >&6
3684 else
3685   if test -n "$CTAGS"; then
3686   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3687 else
3688   ac_save_IFS=$IFS; IFS=$ac_path_separator
3689 ac_dummy="$PATH"
3690 for ac_dir in $ac_dummy; do
3691   IFS=$ac_save_IFS
3692   test -z "$ac_dir" && ac_dir=.
3693   $as_executable_p "$ac_dir/$ac_word" || continue
3694 ac_cv_prog_CTAGS="$ac_prog"
3695 echo "$as_me:3695: found $ac_dir/$ac_word" >&5
3696 break
3697 done
3698
3699 fi
3700 fi
3701 CTAGS=$ac_cv_prog_CTAGS
3702 if test -n "$CTAGS"; then
3703   echo "$as_me:3703: result: $CTAGS" >&5
3704 echo "${ECHO_T}$CTAGS" >&6
3705 else
3706   echo "$as_me:3706: result: no" >&5
3707 echo "${ECHO_T}no" >&6
3708 fi
3709
3710   test -n "$CTAGS" && break
3711 done
3712
3713 for ac_prog in exetags etags
3714 do
3715   # Extract the first word of "$ac_prog", so it can be a program name with args.
3716 set dummy $ac_prog; ac_word=$2
3717 echo "$as_me:3717: checking for $ac_word" >&5
3718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719 if test "${ac_cv_prog_ETAGS+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   if test -n "$ETAGS"; then
3723   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3724 else
3725   ac_save_IFS=$IFS; IFS=$ac_path_separator
3726 ac_dummy="$PATH"
3727 for ac_dir in $ac_dummy; do
3728   IFS=$ac_save_IFS
3729   test -z "$ac_dir" && ac_dir=.
3730   $as_executable_p "$ac_dir/$ac_word" || continue
3731 ac_cv_prog_ETAGS="$ac_prog"
3732 echo "$as_me:3732: found $ac_dir/$ac_word" >&5
3733 break
3734 done
3735
3736 fi
3737 fi
3738 ETAGS=$ac_cv_prog_ETAGS
3739 if test -n "$ETAGS"; then
3740   echo "$as_me:3740: result: $ETAGS" >&5
3741 echo "${ECHO_T}$ETAGS" >&6
3742 else
3743   echo "$as_me:3743: result: no" >&5
3744 echo "${ECHO_T}no" >&6
3745 fi
3746
3747   test -n "$ETAGS" && break
3748 done
3749
3750 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
3751 set dummy ${CTAGS-ctags}; ac_word=$2
3752 echo "$as_me:3752: checking for $ac_word" >&5
3753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3754 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3755   echo $ECHO_N "(cached) $ECHO_C" >&6
3756 else
3757   if test -n "$MAKE_LOWER_TAGS"; then
3758   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3759 else
3760   ac_save_IFS=$IFS; IFS=$ac_path_separator
3761 ac_dummy="$PATH"
3762 for ac_dir in $ac_dummy; do
3763   IFS=$ac_save_IFS
3764   test -z "$ac_dir" && ac_dir=.
3765   $as_executable_p "$ac_dir/$ac_word" || continue
3766 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3767 echo "$as_me:3767: found $ac_dir/$ac_word" >&5
3768 break
3769 done
3770
3771   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3772 fi
3773 fi
3774 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3775 if test -n "$MAKE_LOWER_TAGS"; then
3776   echo "$as_me:3776: result: $MAKE_LOWER_TAGS" >&5
3777 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3778 else
3779   echo "$as_me:3779: result: no" >&5
3780 echo "${ECHO_T}no" >&6
3781 fi
3782
3783 if test "$cf_cv_mixedcase" = yes ; then
3784         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3785 set dummy ${ETAGS-etags}; ac_word=$2
3786 echo "$as_me:3786: checking for $ac_word" >&5
3787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3788 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3789   echo $ECHO_N "(cached) $ECHO_C" >&6
3790 else
3791   if test -n "$MAKE_UPPER_TAGS"; then
3792   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3793 else
3794   ac_save_IFS=$IFS; IFS=$ac_path_separator
3795 ac_dummy="$PATH"
3796 for ac_dir in $ac_dummy; do
3797   IFS=$ac_save_IFS
3798   test -z "$ac_dir" && ac_dir=.
3799   $as_executable_p "$ac_dir/$ac_word" || continue
3800 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3801 echo "$as_me:3801: found $ac_dir/$ac_word" >&5
3802 break
3803 done
3804
3805   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3806 fi
3807 fi
3808 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3809 if test -n "$MAKE_UPPER_TAGS"; then
3810   echo "$as_me:3810: result: $MAKE_UPPER_TAGS" >&5
3811 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3812 else
3813   echo "$as_me:3813: result: no" >&5
3814 echo "${ECHO_T}no" >&6
3815 fi
3816
3817 else
3818         MAKE_UPPER_TAGS=no
3819 fi
3820
3821 if test "$MAKE_UPPER_TAGS" = yes ; then
3822         MAKE_UPPER_TAGS=
3823 else
3824         MAKE_UPPER_TAGS="#"
3825 fi
3826
3827 if test "$MAKE_LOWER_TAGS" = yes ; then
3828         MAKE_LOWER_TAGS=
3829 else
3830         MAKE_LOWER_TAGS="#"
3831 fi
3832
3833 echo "$as_me:3833: checking for makeflags variable" >&5
3834 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3835 if test "${cf_cv_makeflags+set}" = set; then
3836   echo $ECHO_N "(cached) $ECHO_C" >&6
3837 else
3838
3839         cf_cv_makeflags=''
3840         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3841         do
3842                 cat >cf_makeflags.tmp <<CF_EOF
3843 SHELL = /bin/sh
3844 all :
3845         @ echo '.$cf_option'
3846 CF_EOF
3847                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3848                 case "$cf_result" in
3849                 .*k)
3850                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3851                         case "$cf_result" in
3852                         .*CC=*) cf_cv_makeflags=
3853                                 ;;
3854                         *)      cf_cv_makeflags=$cf_option
3855                                 ;;
3856                         esac
3857                         break
3858                         ;;
3859                 .-)     ;;
3860                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3861                         ;;
3862                 esac
3863         done
3864         rm -f cf_makeflags.tmp
3865
3866 fi
3867 echo "$as_me:3867: result: $cf_cv_makeflags" >&5
3868 echo "${ECHO_T}$cf_cv_makeflags" >&6
3869
3870 if test -n "$ac_tool_prefix"; then
3871   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3872 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3873 echo "$as_me:3873: checking for $ac_word" >&5
3874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3875 if test "${ac_cv_prog_RANLIB+set}" = set; then
3876   echo $ECHO_N "(cached) $ECHO_C" >&6
3877 else
3878   if test -n "$RANLIB"; then
3879   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3880 else
3881   ac_save_IFS=$IFS; IFS=$ac_path_separator
3882 ac_dummy="$PATH"
3883 for ac_dir in $ac_dummy; do
3884   IFS=$ac_save_IFS
3885   test -z "$ac_dir" && ac_dir=.
3886   $as_executable_p "$ac_dir/$ac_word" || continue
3887 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3888 echo "$as_me:3888: found $ac_dir/$ac_word" >&5
3889 break
3890 done
3891
3892 fi
3893 fi
3894 RANLIB=$ac_cv_prog_RANLIB
3895 if test -n "$RANLIB"; then
3896   echo "$as_me:3896: result: $RANLIB" >&5
3897 echo "${ECHO_T}$RANLIB" >&6
3898 else
3899   echo "$as_me:3899: result: no" >&5
3900 echo "${ECHO_T}no" >&6
3901 fi
3902
3903 fi
3904 if test -z "$ac_cv_prog_RANLIB"; then
3905   ac_ct_RANLIB=$RANLIB
3906   # Extract the first word of "ranlib", so it can be a program name with args.
3907 set dummy ranlib; ac_word=$2
3908 echo "$as_me:3908: checking for $ac_word" >&5
3909 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3910 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3911   echo $ECHO_N "(cached) $ECHO_C" >&6
3912 else
3913   if test -n "$ac_ct_RANLIB"; then
3914   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3915 else
3916   ac_save_IFS=$IFS; IFS=$ac_path_separator
3917 ac_dummy="$PATH"
3918 for ac_dir in $ac_dummy; do
3919   IFS=$ac_save_IFS
3920   test -z "$ac_dir" && ac_dir=.
3921   $as_executable_p "$ac_dir/$ac_word" || continue
3922 ac_cv_prog_ac_ct_RANLIB="ranlib"
3923 echo "$as_me:3923: found $ac_dir/$ac_word" >&5
3924 break
3925 done
3926
3927   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3928 fi
3929 fi
3930 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3931 if test -n "$ac_ct_RANLIB"; then
3932   echo "$as_me:3932: result: $ac_ct_RANLIB" >&5
3933 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3934 else
3935   echo "$as_me:3935: result: no" >&5
3936 echo "${ECHO_T}no" >&6
3937 fi
3938
3939   RANLIB=$ac_ct_RANLIB
3940 else
3941   RANLIB="$ac_cv_prog_RANLIB"
3942 fi
3943
3944 if test -n "$ac_tool_prefix"; then
3945   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3946 set dummy ${ac_tool_prefix}ld; ac_word=$2
3947 echo "$as_me:3947: checking for $ac_word" >&5
3948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3949 if test "${ac_cv_prog_LD+set}" = set; then
3950   echo $ECHO_N "(cached) $ECHO_C" >&6
3951 else
3952   if test -n "$LD"; then
3953   ac_cv_prog_LD="$LD" # Let the user override the test.
3954 else
3955   ac_save_IFS=$IFS; IFS=$ac_path_separator
3956 ac_dummy="$PATH"
3957 for ac_dir in $ac_dummy; do
3958   IFS=$ac_save_IFS
3959   test -z "$ac_dir" && ac_dir=.
3960   $as_executable_p "$ac_dir/$ac_word" || continue
3961 ac_cv_prog_LD="${ac_tool_prefix}ld"
3962 echo "$as_me:3962: found $ac_dir/$ac_word" >&5
3963 break
3964 done
3965
3966 fi
3967 fi
3968 LD=$ac_cv_prog_LD
3969 if test -n "$LD"; then
3970   echo "$as_me:3970: result: $LD" >&5
3971 echo "${ECHO_T}$LD" >&6
3972 else
3973   echo "$as_me:3973: result: no" >&5
3974 echo "${ECHO_T}no" >&6
3975 fi
3976
3977 fi
3978 if test -z "$ac_cv_prog_LD"; then
3979   ac_ct_LD=$LD
3980   # Extract the first word of "ld", so it can be a program name with args.
3981 set dummy ld; ac_word=$2
3982 echo "$as_me:3982: checking for $ac_word" >&5
3983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3984 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3985   echo $ECHO_N "(cached) $ECHO_C" >&6
3986 else
3987   if test -n "$ac_ct_LD"; then
3988   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3989 else
3990   ac_save_IFS=$IFS; IFS=$ac_path_separator
3991 ac_dummy="$PATH"
3992 for ac_dir in $ac_dummy; do
3993   IFS=$ac_save_IFS
3994   test -z "$ac_dir" && ac_dir=.
3995   $as_executable_p "$ac_dir/$ac_word" || continue
3996 ac_cv_prog_ac_ct_LD="ld"
3997 echo "$as_me:3997: found $ac_dir/$ac_word" >&5
3998 break
3999 done
4000
4001   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4002 fi
4003 fi
4004 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4005 if test -n "$ac_ct_LD"; then
4006   echo "$as_me:4006: result: $ac_ct_LD" >&5
4007 echo "${ECHO_T}$ac_ct_LD" >&6
4008 else
4009   echo "$as_me:4009: result: no" >&5
4010 echo "${ECHO_T}no" >&6
4011 fi
4012
4013   LD=$ac_ct_LD
4014 else
4015   LD="$ac_cv_prog_LD"
4016 fi
4017
4018 if test -n "$ac_tool_prefix"; then
4019   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4020 set dummy ${ac_tool_prefix}ar; ac_word=$2
4021 echo "$as_me:4021: checking for $ac_word" >&5
4022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4023 if test "${ac_cv_prog_AR+set}" = set; then
4024   echo $ECHO_N "(cached) $ECHO_C" >&6
4025 else
4026   if test -n "$AR"; then
4027   ac_cv_prog_AR="$AR" # Let the user override the test.
4028 else
4029   ac_save_IFS=$IFS; IFS=$ac_path_separator
4030 ac_dummy="$PATH"
4031 for ac_dir in $ac_dummy; do
4032   IFS=$ac_save_IFS
4033   test -z "$ac_dir" && ac_dir=.
4034   $as_executable_p "$ac_dir/$ac_word" || continue
4035 ac_cv_prog_AR="${ac_tool_prefix}ar"
4036 echo "$as_me:4036: found $ac_dir/$ac_word" >&5
4037 break
4038 done
4039
4040 fi
4041 fi
4042 AR=$ac_cv_prog_AR
4043 if test -n "$AR"; then
4044   echo "$as_me:4044: result: $AR" >&5
4045 echo "${ECHO_T}$AR" >&6
4046 else
4047   echo "$as_me:4047: result: no" >&5
4048 echo "${ECHO_T}no" >&6
4049 fi
4050
4051 fi
4052 if test -z "$ac_cv_prog_AR"; then
4053   ac_ct_AR=$AR
4054   # Extract the first word of "ar", so it can be a program name with args.
4055 set dummy ar; ac_word=$2
4056 echo "$as_me:4056: checking for $ac_word" >&5
4057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4058 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4059   echo $ECHO_N "(cached) $ECHO_C" >&6
4060 else
4061   if test -n "$ac_ct_AR"; then
4062   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4063 else
4064   ac_save_IFS=$IFS; IFS=$ac_path_separator
4065 ac_dummy="$PATH"
4066 for ac_dir in $ac_dummy; do
4067   IFS=$ac_save_IFS
4068   test -z "$ac_dir" && ac_dir=.
4069   $as_executable_p "$ac_dir/$ac_word" || continue
4070 ac_cv_prog_ac_ct_AR="ar"
4071 echo "$as_me:4071: found $ac_dir/$ac_word" >&5
4072 break
4073 done
4074
4075   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4076 fi
4077 fi
4078 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4079 if test -n "$ac_ct_AR"; then
4080   echo "$as_me:4080: result: $ac_ct_AR" >&5
4081 echo "${ECHO_T}$ac_ct_AR" >&6
4082 else
4083   echo "$as_me:4083: result: no" >&5
4084 echo "${ECHO_T}no" >&6
4085 fi
4086
4087   AR=$ac_ct_AR
4088 else
4089   AR="$ac_cv_prog_AR"
4090 fi
4091
4092 if test -n "$ac_tool_prefix"; then
4093   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4094 set dummy ${ac_tool_prefix}ar; ac_word=$2
4095 echo "$as_me:4095: checking for $ac_word" >&5
4096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4097 if test "${ac_cv_prog_AR+set}" = set; then
4098   echo $ECHO_N "(cached) $ECHO_C" >&6
4099 else
4100   if test -n "$AR"; then
4101   ac_cv_prog_AR="$AR" # Let the user override the test.
4102 else
4103   ac_save_IFS=$IFS; IFS=$ac_path_separator
4104 ac_dummy="$PATH"
4105 for ac_dir in $ac_dummy; do
4106   IFS=$ac_save_IFS
4107   test -z "$ac_dir" && ac_dir=.
4108   $as_executable_p "$ac_dir/$ac_word" || continue
4109 ac_cv_prog_AR="${ac_tool_prefix}ar"
4110 echo "$as_me:4110: found $ac_dir/$ac_word" >&5
4111 break
4112 done
4113
4114 fi
4115 fi
4116 AR=$ac_cv_prog_AR
4117 if test -n "$AR"; then
4118   echo "$as_me:4118: result: $AR" >&5
4119 echo "${ECHO_T}$AR" >&6
4120 else
4121   echo "$as_me:4121: result: no" >&5
4122 echo "${ECHO_T}no" >&6
4123 fi
4124
4125 fi
4126 if test -z "$ac_cv_prog_AR"; then
4127   ac_ct_AR=$AR
4128   # Extract the first word of "ar", so it can be a program name with args.
4129 set dummy ar; ac_word=$2
4130 echo "$as_me:4130: checking for $ac_word" >&5
4131 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4132 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4133   echo $ECHO_N "(cached) $ECHO_C" >&6
4134 else
4135   if test -n "$ac_ct_AR"; then
4136   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4137 else
4138   ac_save_IFS=$IFS; IFS=$ac_path_separator
4139 ac_dummy="$PATH"
4140 for ac_dir in $ac_dummy; do
4141   IFS=$ac_save_IFS
4142   test -z "$ac_dir" && ac_dir=.
4143   $as_executable_p "$ac_dir/$ac_word" || continue
4144 ac_cv_prog_ac_ct_AR="ar"
4145 echo "$as_me:4145: found $ac_dir/$ac_word" >&5
4146 break
4147 done
4148
4149   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4150 fi
4151 fi
4152 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4153 if test -n "$ac_ct_AR"; then
4154   echo "$as_me:4154: result: $ac_ct_AR" >&5
4155 echo "${ECHO_T}$ac_ct_AR" >&6
4156 else
4157   echo "$as_me:4157: result: no" >&5
4158 echo "${ECHO_T}no" >&6
4159 fi
4160
4161   AR=$ac_ct_AR
4162 else
4163   AR="$ac_cv_prog_AR"
4164 fi
4165
4166 echo "$as_me:4166: checking for options to update archives" >&5
4167 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4168 if test "${cf_cv_ar_flags+set}" = set; then
4169   echo $ECHO_N "(cached) $ECHO_C" >&6
4170 else
4171
4172         cf_cv_ar_flags=unknown
4173         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4174         do
4175
4176                 # check if $ARFLAGS already contains this choice
4177                 if test "x$ARFLAGS" != "x" ; then
4178                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4179                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4180                                 cf_cv_ar_flags=
4181                                 break
4182                         fi
4183                 fi
4184
4185                 rm -f conftest.$ac_cv_objext
4186                 rm -f conftest.a
4187
4188                 cat >conftest.$ac_ext <<EOF
4189 #line 4189 "configure"
4190 int     testdata[3] = { 123, 456, 789 };
4191 EOF
4192                 if { (eval echo "$as_me:4192: \"$ac_compile\"") >&5
4193   (eval $ac_compile) 2>&5
4194   ac_status=$?
4195   echo "$as_me:4195: \$? = $ac_status" >&5
4196   (exit $ac_status); } ; then
4197                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4198                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4199                         if test -f conftest.a ; then
4200                                 cf_cv_ar_flags=$cf_ar_flags
4201                                 break
4202                         fi
4203                 else
4204                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4205
4206 echo "${as_me-configure}:4206: testing cannot compile test-program ..." 1>&5
4207
4208                         break
4209                 fi
4210         done
4211         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4212
4213 fi
4214 echo "$as_me:4214: result: $cf_cv_ar_flags" >&5
4215 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4216
4217 if test -n "$ARFLAGS" ; then
4218         if test -n "$cf_cv_ar_flags" ; then
4219                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4220         fi
4221 else
4222         ARFLAGS=$cf_cv_ar_flags
4223 fi
4224
4225 echo "$as_me:4225: checking if you have specified an install-prefix" >&5
4226 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4227
4228 # Check whether --with-install-prefix or --without-install-prefix was given.
4229 if test "${with_install_prefix+set}" = set; then
4230   withval="$with_install_prefix"
4231   case "$withval" in #(vi
4232         yes|no) #(vi
4233                 ;;
4234         *)      DESTDIR="$withval"
4235                 ;;
4236         esac
4237 fi;
4238 echo "$as_me:4238: result: $DESTDIR" >&5
4239 echo "${ECHO_T}$DESTDIR" >&6
4240
4241 ###############################################################################
4242
4243 # If we're cross-compiling, allow the user to override the tools and their
4244 # options.  The configure script is oriented toward identifying the host
4245 # compiler, etc., but we need a build compiler to generate parts of the source.
4246
4247 if test "$cross_compiling" = yes ; then
4248
4249         # defaults that we might want to override
4250         : ${BUILD_CFLAGS:=''}
4251         : ${BUILD_CPPFLAGS:=''}
4252         : ${BUILD_LDFLAGS:=''}
4253         : ${BUILD_LIBS:=''}
4254         : ${BUILD_EXEEXT:='$x'}
4255         : ${BUILD_OBJEXT:='o'}
4256
4257 # Check whether --with-build-cc or --without-build-cc was given.
4258 if test "${with_build_cc+set}" = set; then
4259   withval="$with_build_cc"
4260   BUILD_CC="$withval"
4261 else
4262   for ac_prog in gcc cc cl
4263 do
4264   # Extract the first word of "$ac_prog", so it can be a program name with args.
4265 set dummy $ac_prog; ac_word=$2
4266 echo "$as_me:4266: checking for $ac_word" >&5
4267 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4268 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4269   echo $ECHO_N "(cached) $ECHO_C" >&6
4270 else
4271   if test -n "$BUILD_CC"; then
4272   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4273 else
4274   ac_save_IFS=$IFS; IFS=$ac_path_separator
4275 ac_dummy="$PATH"
4276 for ac_dir in $ac_dummy; do
4277   IFS=$ac_save_IFS
4278   test -z "$ac_dir" && ac_dir=.
4279   $as_executable_p "$ac_dir/$ac_word" || continue
4280 ac_cv_prog_BUILD_CC="$ac_prog"
4281 echo "$as_me:4281: found $ac_dir/$ac_word" >&5
4282 break
4283 done
4284
4285 fi
4286 fi
4287 BUILD_CC=$ac_cv_prog_BUILD_CC
4288 if test -n "$BUILD_CC"; then
4289   echo "$as_me:4289: result: $BUILD_CC" >&5
4290 echo "${ECHO_T}$BUILD_CC" >&6
4291 else
4292   echo "$as_me:4292: result: no" >&5
4293 echo "${ECHO_T}no" >&6
4294 fi
4295
4296   test -n "$BUILD_CC" && break
4297 done
4298
4299 fi;
4300         echo "$as_me:4300: checking for native build C compiler" >&5
4301 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4302         echo "$as_me:4302: result: $BUILD_CC" >&5
4303 echo "${ECHO_T}$BUILD_CC" >&6
4304
4305         echo "$as_me:4305: checking for native build C preprocessor" >&5
4306 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4307
4308 # Check whether --with-build-cpp or --without-build-cpp was given.
4309 if test "${with_build_cpp+set}" = set; then
4310   withval="$with_build_cpp"
4311   BUILD_CPP="$withval"
4312 else
4313   BUILD_CPP='${BUILD_CC} -E'
4314 fi;
4315         echo "$as_me:4315: result: $BUILD_CPP" >&5
4316 echo "${ECHO_T}$BUILD_CPP" >&6
4317
4318         echo "$as_me:4318: checking for native build C flags" >&5
4319 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4320
4321 # Check whether --with-build-cflags or --without-build-cflags was given.
4322 if test "${with_build_cflags+set}" = set; then
4323   withval="$with_build_cflags"
4324   BUILD_CFLAGS="$withval"
4325 fi;
4326         echo "$as_me:4326: result: $BUILD_CFLAGS" >&5
4327 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4328
4329         echo "$as_me:4329: checking for native build C preprocessor-flags" >&5
4330 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4331
4332 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4333 if test "${with_build_cppflags+set}" = set; then
4334   withval="$with_build_cppflags"
4335   BUILD_CPPFLAGS="$withval"
4336 fi;
4337         echo "$as_me:4337: result: $BUILD_CPPFLAGS" >&5
4338 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4339
4340         echo "$as_me:4340: checking for native build linker-flags" >&5
4341 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4342
4343 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4344 if test "${with_build_ldflags+set}" = set; then
4345   withval="$with_build_ldflags"
4346   BUILD_LDFLAGS="$withval"
4347 fi;
4348         echo "$as_me:4348: result: $BUILD_LDFLAGS" >&5
4349 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4350
4351         echo "$as_me:4351: checking for native build linker-libraries" >&5
4352 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4353
4354 # Check whether --with-build-libs or --without-build-libs was given.
4355 if test "${with_build_libs+set}" = set; then
4356   withval="$with_build_libs"
4357   BUILD_LIBS="$withval"
4358 fi;
4359         echo "$as_me:4359: result: $BUILD_LIBS" >&5
4360 echo "${ECHO_T}$BUILD_LIBS" >&6
4361
4362         # this assumes we're on Unix.
4363         BUILD_EXEEXT=
4364         BUILD_OBJEXT=o
4365
4366         : ${BUILD_CC:='${CC}'}
4367
4368         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4369                 { { echo "$as_me:4369: error: Cross-build requires two compilers.
4370 Use --with-build-cc to specify the native compiler." >&5
4371 echo "$as_me: error: Cross-build requires two compilers.
4372 Use --with-build-cc to specify the native compiler." >&2;}
4373    { (exit 1); exit 1; }; }
4374         fi
4375
4376 else
4377         : ${BUILD_CC:='${CC}'}
4378         : ${BUILD_CPP:='${CPP}'}
4379         : ${BUILD_CFLAGS:='${CFLAGS}'}
4380         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4381         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4382         : ${BUILD_LIBS:='${LIBS}'}
4383         : ${BUILD_EXEEXT:='$x'}
4384         : ${BUILD_OBJEXT:='o'}
4385 fi
4386
4387 ###############################################################################
4388
4389 ### Options to allow the user to specify the set of libraries which are used.
4390 ### Use "--without-normal --with-shared" to allow the default model to be
4391 ### shared, for example.
4392 cf_list_models=""
4393
4394 echo "$as_me:4394: checking if libtool -version-number should be used" >&5
4395 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4396
4397 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4398 if test "${enable_libtool_version+set}" = set; then
4399   enableval="$enable_libtool_version"
4400   test "$enableval" != no && enableval=yes
4401   if test "$enableval" != "yes" ; then
4402     cf_libtool_version=no
4403   else
4404     cf_libtool_version=yes
4405   fi
4406 else
4407   enableval=yes
4408   cf_libtool_version=yes
4409
4410 fi;
4411 echo "$as_me:4411: result: $cf_libtool_version" >&5
4412 echo "${ECHO_T}$cf_libtool_version" >&6
4413
4414 if test "$cf_libtool_version" = yes ; then
4415         LIBTOOL_VERSION="-version-number"
4416 else
4417         LIBTOOL_VERSION="-version-info"
4418 fi
4419
4420 LIBTOOL=
4421
4422 # common library maintenance symbols that are convenient for libtool scripts:
4423 LIB_CREATE='${AR} -cr'
4424 LIB_OBJECT='${OBJECTS}'
4425 LIB_SUFFIX=.a
4426 LIB_PREP="$RANLIB"
4427
4428 # symbols used to prop libtool up to enable it to determine what it should be
4429 # doing:
4430 LIB_CLEAN=
4431 LIB_COMPILE=
4432 LIB_LINK='${CC}'
4433 LIB_INSTALL=
4434 LIB_UNINSTALL=
4435
4436 echo "$as_me:4436: checking if you want to build libraries with libtool" >&5
4437 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4438
4439 # Check whether --with-libtool or --without-libtool was given.
4440 if test "${with_libtool+set}" = set; then
4441   withval="$with_libtool"
4442   with_libtool=$withval
4443 else
4444   with_libtool=no
4445 fi;
4446 echo "$as_me:4446: result: $with_libtool" >&5
4447 echo "${ECHO_T}$with_libtool" >&6
4448 if test "$with_libtool" != "no"; then
4449
4450         if test "$with_libtool" != "yes" ; then
4451
4452 if test "x$prefix" != xNONE; then
4453   cf_path_syntax="$prefix"
4454 else
4455   cf_path_syntax="$ac_default_prefix"
4456 fi
4457
4458 case ".$with_libtool" in #(vi
4459 .\$\(*\)*|.\'*\'*) #(vi
4460   ;;
4461 ..|./*|.\\*) #(vi
4462   ;;
4463 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4464   ;;
4465 .\${*prefix}*) #(vi
4466   eval with_libtool="$with_libtool"
4467   case ".$with_libtool" in #(vi
4468   .NONE/*)
4469     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4470     ;;
4471   esac
4472   ;; #(vi
4473 .no|.NONE/*)
4474   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4475   ;;
4476 *)
4477   { { echo "$as_me:4477: error: expected a pathname, not \"$with_libtool\"" >&5
4478 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4479    { (exit 1); exit 1; }; }
4480   ;;
4481 esac
4482
4483                 LIBTOOL=$with_libtool
4484         else
4485                 # Extract the first word of "libtool", so it can be a program name with args.
4486 set dummy libtool; ac_word=$2
4487 echo "$as_me:4487: checking for $ac_word" >&5
4488 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4489 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4490   echo $ECHO_N "(cached) $ECHO_C" >&6
4491 else
4492   case $LIBTOOL in
4493   [\\/]* | ?:[\\/]*)
4494   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4495   ;;
4496   *)
4497   ac_save_IFS=$IFS; IFS=$ac_path_separator
4498 ac_dummy="$PATH"
4499 for ac_dir in $ac_dummy; do
4500   IFS=$ac_save_IFS
4501   test -z "$ac_dir" && ac_dir=.
4502   if $as_executable_p "$ac_dir/$ac_word"; then
4503    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4504    echo "$as_me:4504: found $ac_dir/$ac_word" >&5
4505    break
4506 fi
4507 done
4508
4509   ;;
4510 esac
4511 fi
4512 LIBTOOL=$ac_cv_path_LIBTOOL
4513
4514 if test -n "$LIBTOOL"; then
4515   echo "$as_me:4515: result: $LIBTOOL" >&5
4516 echo "${ECHO_T}$LIBTOOL" >&6
4517 else
4518   echo "$as_me:4518: result: no" >&5
4519 echo "${ECHO_T}no" >&6
4520 fi
4521
4522         fi
4523         if test -z "$LIBTOOL" ; then
4524                 { { echo "$as_me:4524: error: Cannot find libtool" >&5
4525 echo "$as_me: error: Cannot find libtool" >&2;}
4526    { (exit 1); exit 1; }; }
4527         fi
4528         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4529         LIB_OBJECT='${OBJECTS:.o=.lo}'
4530         LIB_SUFFIX=.la
4531         LIB_CLEAN='${LIBTOOL} --mode=clean'
4532         LIB_COMPILE='${LIBTOOL} --mode=compile'
4533         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4534         LIB_INSTALL='${LIBTOOL} --mode=install'
4535         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4536         LIB_PREP=:
4537
4538         # Show the version of libtool
4539         echo "$as_me:4539: checking version of libtool" >&5
4540 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4541
4542         # Save the version in a cache variable - this is not entirely a good
4543         # thing, but the version string from libtool is very ugly, and for
4544         # bug reports it might be useful to have the original string. "("
4545         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.].*//'`
4546         echo "$as_me:4546: result: $cf_cv_libtool_version" >&5
4547 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4548         if test -z "$cf_cv_libtool_version" ; then
4549                 { { echo "$as_me:4549: error: This is not GNU libtool" >&5
4550 echo "$as_me: error: This is not GNU libtool" >&2;}
4551    { (exit 1); exit 1; }; }
4552         fi
4553
4554         # special hack to add -no-undefined (which libtool should do for itself)
4555         LT_UNDEF=
4556         case "$cf_cv_system_name" in #(vi
4557         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4558                 LT_UNDEF=-no-undefined
4559                 ;;
4560         esac
4561
4562         # special hack to add --tag option for C++ compiler
4563         case $cf_cv_libtool_version in #(vi
4564         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4565                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4566                 LIBTOOL="$LIBTOOL --tag=CC"
4567                 ;;
4568         *)
4569                 LIBTOOL_CXX="$LIBTOOL"
4570                 ;;
4571         esac
4572 else
4573         LIBTOOL=""
4574         LIBTOOL_CXX=""
4575 fi
4576
4577 test -z "$LIBTOOL" && ECHO_LT=
4578
4579 if test "$with_libtool" != "no" ; then
4580
4581 cf_list_models="$cf_list_models libtool"
4582
4583 else
4584
4585 echo "$as_me:4585: checking if you want to build shared libraries" >&5
4586 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4587
4588 # Check whether --with-shared or --without-shared was given.
4589 if test "${with_shared+set}" = set; then
4590   withval="$with_shared"
4591   with_shared=$withval
4592 else
4593   with_shared=no
4594 fi;
4595 echo "$as_me:4595: result: $with_shared" >&5
4596 echo "${ECHO_T}$with_shared" >&6
4597 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4598
4599 echo "$as_me:4599: checking if you want to build static libraries" >&5
4600 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4601
4602 # Check whether --with-normal or --without-normal was given.
4603 if test "${with_normal+set}" = set; then
4604   withval="$with_normal"
4605   with_normal=$withval
4606 else
4607   with_normal=yes
4608 fi;
4609 echo "$as_me:4609: result: $with_normal" >&5
4610 echo "${ECHO_T}$with_normal" >&6
4611 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4612
4613 echo "$as_me:4613: checking if you want to build debug libraries" >&5
4614 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4615
4616 # Check whether --with-debug or --without-debug was given.
4617 if test "${with_debug+set}" = set; then
4618   withval="$with_debug"
4619   with_debug=$withval
4620 else
4621   with_debug=yes
4622 fi;
4623 echo "$as_me:4623: result: $with_debug" >&5
4624 echo "${ECHO_T}$with_debug" >&6
4625 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4626
4627 echo "$as_me:4627: checking if you want to build profiling libraries" >&5
4628 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4629
4630 # Check whether --with-profile or --without-profile was given.
4631 if test "${with_profile+set}" = set; then
4632   withval="$with_profile"
4633   with_profile=$withval
4634 else
4635   with_profile=no
4636 fi;
4637 echo "$as_me:4637: result: $with_profile" >&5
4638 echo "${ECHO_T}$with_profile" >&6
4639 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4640
4641 fi
4642
4643 ###############################################################################
4644
4645 echo "$as_me:4645: checking for specified models" >&5
4646 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4647 test -z "$cf_list_models" && cf_list_models=normal
4648 test "$with_libtool" != "no" && cf_list_models=libtool
4649 echo "$as_me:4649: result: $cf_list_models" >&5
4650 echo "${ECHO_T}$cf_list_models" >&6
4651
4652 ### Use the first model as the default, and save its suffix for use in building
4653 ### up test-applications.
4654 echo "$as_me:4654: checking for default model" >&5
4655 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4656 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4657 echo "$as_me:4657: result: $DFT_LWR_MODEL" >&5
4658 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4659
4660 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4661
4662 TICS_NAME=tic
4663
4664 TINFO_NAME=tinfo
4665
4666 LIB_NAME=ncurses
4667
4668 LIB_DIR=../lib
4669 LIB_2ND=../../lib
4670
4671         case $cf_cv_system_name in #(vi
4672         OS/2*|os2*) #(vi
4673         LIB_PREFIX=''
4674         ;;
4675         *)      LIB_PREFIX='lib'
4676         ;;
4677         esac
4678 cf_prefix=$LIB_PREFIX
4679
4680 LIB_PREFIX=$cf_prefix
4681
4682 LIB_SUFFIX=
4683
4684 ###############################################################################
4685
4686 echo "$as_me:4686: checking if you want to build a separate terminfo library" >&5
4687 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4688
4689 # Check whether --with-termlib or --without-termlib was given.
4690 if test "${with_termlib+set}" = set; then
4691   withval="$with_termlib"
4692   with_termlib=$withval
4693 else
4694   with_termlib=no
4695 fi;
4696 echo "$as_me:4696: result: $with_termlib" >&5
4697 echo "${ECHO_T}$with_termlib" >&6
4698
4699 echo "$as_me:4699: checking if you want to build a separate tic library" >&5
4700 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4701
4702 # Check whether --with-ticlib or --without-ticlib was given.
4703 if test "${with_ticlib+set}" = set; then
4704   withval="$with_ticlib"
4705   with_ticlib=$withval
4706 else
4707   with_ticlib=no
4708 fi;
4709 echo "$as_me:4709: result: $with_ticlib" >&5
4710 echo "${ECHO_T}$with_ticlib" >&6
4711
4712 ### Checks for special libraries, must be done up-front.
4713 SHLIB_LIST=""
4714
4715 echo "$as_me:4715: checking if you want to link with the GPM mouse library" >&5
4716 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4717
4718 # Check whether --with-gpm or --without-gpm was given.
4719 if test "${with_gpm+set}" = set; then
4720   withval="$with_gpm"
4721   with_gpm=$withval
4722 else
4723   with_gpm=maybe
4724 fi;
4725 echo "$as_me:4725: result: $with_gpm" >&5
4726 echo "${ECHO_T}$with_gpm" >&6
4727
4728 if test "$with_gpm" != no ; then
4729         echo "$as_me:4729: checking for gpm.h" >&5
4730 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4731 if test "${ac_cv_header_gpm_h+set}" = set; then
4732   echo $ECHO_N "(cached) $ECHO_C" >&6
4733 else
4734   cat >conftest.$ac_ext <<_ACEOF
4735 #line 4735 "configure"
4736 #include "confdefs.h"
4737 #include <gpm.h>
4738 _ACEOF
4739 if { (eval echo "$as_me:4739: \"$ac_cpp conftest.$ac_ext\"") >&5
4740   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4741   ac_status=$?
4742   egrep -v '^ *\+' conftest.er1 >conftest.err
4743   rm -f conftest.er1
4744   cat conftest.err >&5
4745   echo "$as_me:4745: \$? = $ac_status" >&5
4746   (exit $ac_status); } >/dev/null; then
4747   if test -s conftest.err; then
4748     ac_cpp_err=$ac_c_preproc_warn_flag
4749   else
4750     ac_cpp_err=
4751   fi
4752 else
4753   ac_cpp_err=yes
4754 fi
4755 if test -z "$ac_cpp_err"; then
4756   ac_cv_header_gpm_h=yes
4757 else
4758   echo "$as_me: failed program was:" >&5
4759   cat conftest.$ac_ext >&5
4760   ac_cv_header_gpm_h=no
4761 fi
4762 rm -f conftest.err conftest.$ac_ext
4763 fi
4764 echo "$as_me:4764: result: $ac_cv_header_gpm_h" >&5
4765 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4766 if test $ac_cv_header_gpm_h = yes; then
4767
4768                 cat >>confdefs.h <<\EOF
4769 #define HAVE_GPM_H 1
4770 EOF
4771
4772                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4773                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4774
4775 echo "${as_me-configure}:4775: testing assuming we really have GPM library ..." 1>&5
4776
4777                         cat >>confdefs.h <<\EOF
4778 #define HAVE_LIBGPM 1
4779 EOF
4780
4781                 else
4782                         echo "$as_me:4782: checking for Gpm_Open in -lgpm" >&5
4783 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4784 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4785   echo $ECHO_N "(cached) $ECHO_C" >&6
4786 else
4787   ac_check_lib_save_LIBS=$LIBS
4788 LIBS="-lgpm  $LIBS"
4789 cat >conftest.$ac_ext <<_ACEOF
4790 #line 4790 "configure"
4791 #include "confdefs.h"
4792
4793 /* Override any gcc2 internal prototype to avoid an error.  */
4794 #ifdef __cplusplus
4795 extern "C"
4796 #endif
4797 /* We use char because int might match the return type of a gcc2
4798    builtin and then its argument prototype would still apply.  */
4799 char Gpm_Open ();
4800 int
4801 main ()
4802 {
4803 Gpm_Open ();
4804   ;
4805   return 0;
4806 }
4807 _ACEOF
4808 rm -f conftest.$ac_objext conftest$ac_exeext
4809 if { (eval echo "$as_me:4809: \"$ac_link\"") >&5
4810   (eval $ac_link) 2>&5
4811   ac_status=$?
4812   echo "$as_me:4812: \$? = $ac_status" >&5
4813   (exit $ac_status); } &&
4814          { ac_try='test -s conftest$ac_exeext'
4815   { (eval echo "$as_me:4815: \"$ac_try\"") >&5
4816   (eval $ac_try) 2>&5
4817   ac_status=$?
4818   echo "$as_me:4818: \$? = $ac_status" >&5
4819   (exit $ac_status); }; }; then
4820   ac_cv_lib_gpm_Gpm_Open=yes
4821 else
4822   echo "$as_me: failed program was:" >&5
4823 cat conftest.$ac_ext >&5
4824 ac_cv_lib_gpm_Gpm_Open=no
4825 fi
4826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4827 LIBS=$ac_check_lib_save_LIBS
4828 fi
4829 echo "$as_me:4829: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4830 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4831 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4832   :
4833 else
4834
4835                                 { { echo "$as_me:4835: error: Cannot link with GPM library" >&5
4836 echo "$as_me: error: Cannot link with GPM library" >&2;}
4837    { (exit 1); exit 1; }; }
4838                 fi
4839                 with_gpm=yes
4840
4841 fi
4842
4843 else
4844
4845                 test "$with_gpm" != maybe && { echo "$as_me:4845: WARNING: Cannot find GPM header" >&5
4846 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4847                 with_gpm=no
4848
4849 fi
4850
4851 fi
4852
4853 if test "$with_gpm" != no ; then
4854         echo "$as_me:4854: checking if you want to load GPM dynamically" >&5
4855 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4856
4857 # Check whether --with-dlsym or --without-dlsym was given.
4858 if test "${with_dlsym+set}" = set; then
4859   withval="$with_dlsym"
4860   with_dlsym=$withval
4861 else
4862   with_dlsym=yes
4863 fi;
4864         echo "$as_me:4864: result: $with_dlsym" >&5
4865 echo "${ECHO_T}$with_dlsym" >&6
4866         if test "$with_dlsym" = yes ; then
4867
4868 cf_have_dlsym=no
4869 echo "$as_me:4869: checking for dlsym" >&5
4870 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4871 if test "${ac_cv_func_dlsym+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   cat >conftest.$ac_ext <<_ACEOF
4875 #line 4875 "configure"
4876 #include "confdefs.h"
4877 /* System header to define __stub macros and hopefully few prototypes,
4878     which can conflict with char dlsym (); below.  */
4879 #include <assert.h>
4880 /* Override any gcc2 internal prototype to avoid an error.  */
4881 #ifdef __cplusplus
4882 extern "C"
4883 #endif
4884 /* We use char because int might match the return type of a gcc2
4885    builtin and then its argument prototype would still apply.  */
4886 char dlsym ();
4887 char (*f) ();
4888
4889 int
4890 main ()
4891 {
4892 /* The GNU C library defines this for functions which it implements
4893     to always fail with ENOSYS.  Some functions are actually named
4894     something starting with __ and the normal name is an alias.  */
4895 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4896 choke me
4897 #else
4898 f = dlsym;
4899 #endif
4900
4901   ;
4902   return 0;
4903 }
4904 _ACEOF
4905 rm -f conftest.$ac_objext conftest$ac_exeext
4906 if { (eval echo "$as_me:4906: \"$ac_link\"") >&5
4907   (eval $ac_link) 2>&5
4908   ac_status=$?
4909   echo "$as_me:4909: \$? = $ac_status" >&5
4910   (exit $ac_status); } &&
4911          { ac_try='test -s conftest$ac_exeext'
4912   { (eval echo "$as_me:4912: \"$ac_try\"") >&5
4913   (eval $ac_try) 2>&5
4914   ac_status=$?
4915   echo "$as_me:4915: \$? = $ac_status" >&5
4916   (exit $ac_status); }; }; then
4917   ac_cv_func_dlsym=yes
4918 else
4919   echo "$as_me: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4921 ac_cv_func_dlsym=no
4922 fi
4923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4924 fi
4925 echo "$as_me:4925: result: $ac_cv_func_dlsym" >&5
4926 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4927 if test $ac_cv_func_dlsym = yes; then
4928   cf_have_dlsym=yes
4929 else
4930
4931 cf_have_libdl=no
4932 echo "$as_me:4932: checking for dlsym in -ldl" >&5
4933 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4934 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4935   echo $ECHO_N "(cached) $ECHO_C" >&6
4936 else
4937   ac_check_lib_save_LIBS=$LIBS
4938 LIBS="-ldl  $LIBS"
4939 cat >conftest.$ac_ext <<_ACEOF
4940 #line 4940 "configure"
4941 #include "confdefs.h"
4942
4943 /* Override any gcc2 internal prototype to avoid an error.  */
4944 #ifdef __cplusplus
4945 extern "C"
4946 #endif
4947 /* We use char because int might match the return type of a gcc2
4948    builtin and then its argument prototype would still apply.  */
4949 char dlsym ();
4950 int
4951 main ()
4952 {
4953 dlsym ();
4954   ;
4955   return 0;
4956 }
4957 _ACEOF
4958 rm -f conftest.$ac_objext conftest$ac_exeext
4959 if { (eval echo "$as_me:4959: \"$ac_link\"") >&5
4960   (eval $ac_link) 2>&5
4961   ac_status=$?
4962   echo "$as_me:4962: \$? = $ac_status" >&5
4963   (exit $ac_status); } &&
4964          { ac_try='test -s conftest$ac_exeext'
4965   { (eval echo "$as_me:4965: \"$ac_try\"") >&5
4966   (eval $ac_try) 2>&5
4967   ac_status=$?
4968   echo "$as_me:4968: \$? = $ac_status" >&5
4969   (exit $ac_status); }; }; then
4970   ac_cv_lib_dl_dlsym=yes
4971 else
4972   echo "$as_me: failed program was:" >&5
4973 cat conftest.$ac_ext >&5
4974 ac_cv_lib_dl_dlsym=no
4975 fi
4976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4977 LIBS=$ac_check_lib_save_LIBS
4978 fi
4979 echo "$as_me:4979: result: $ac_cv_lib_dl_dlsym" >&5
4980 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4981 if test $ac_cv_lib_dl_dlsym = yes; then
4982
4983         cf_have_dlsym=yes
4984         cf_have_libdl=yes
4985 fi
4986
4987 fi
4988
4989 if test "$cf_have_dlsym" = yes ; then
4990         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4991
4992         echo "$as_me:4992: checking whether able to link to dl*() functions" >&5
4993 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4994         cat >conftest.$ac_ext <<_ACEOF
4995 #line 4995 "configure"
4996 #include "confdefs.h"
4997 #include <dlfcn.h>
4998 int
4999 main ()
5000 {
5001
5002                 void *obj;
5003                 if ((obj = dlopen("filename", 0)) != 0) {
5004                         if (dlsym(obj, "symbolname") == 0) {
5005                         dlclose(obj);
5006                         }
5007                 }
5008   ;
5009   return 0;
5010 }
5011 _ACEOF
5012 rm -f conftest.$ac_objext conftest$ac_exeext
5013 if { (eval echo "$as_me:5013: \"$ac_link\"") >&5
5014   (eval $ac_link) 2>&5
5015   ac_status=$?
5016   echo "$as_me:5016: \$? = $ac_status" >&5
5017   (exit $ac_status); } &&
5018          { ac_try='test -s conftest$ac_exeext'
5019   { (eval echo "$as_me:5019: \"$ac_try\"") >&5
5020   (eval $ac_try) 2>&5
5021   ac_status=$?
5022   echo "$as_me:5022: \$? = $ac_status" >&5
5023   (exit $ac_status); }; }; then
5024
5025                 cat >>confdefs.h <<\EOF
5026 #define HAVE_LIBDL 1
5027 EOF
5028
5029 else
5030   echo "$as_me: failed program was:" >&5
5031 cat conftest.$ac_ext >&5
5032
5033                 { { echo "$as_me:5033: error: Cannot link test program for libdl" >&5
5034 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5035    { (exit 1); exit 1; }; }
5036 fi
5037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5038         echo "$as_me:5038: result: ok" >&5
5039 echo "${ECHO_T}ok" >&6
5040 else
5041         { { echo "$as_me:5041: error: Cannot find dlsym function" >&5
5042 echo "$as_me: error: Cannot find dlsym function" >&2;}
5043    { (exit 1); exit 1; }; }
5044 fi
5045
5046                 if test "$with_gpm" != yes ; then
5047                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5048
5049 echo "${as_me-configure}:5049: testing assuming soname for gpm is $with_gpm ..." 1>&5
5050
5051                         cf_cv_gpm_soname="$with_gpm"
5052                 else
5053
5054 echo "$as_me:5054: checking for soname of gpm library" >&5
5055 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5056 if test "${cf_cv_gpm_soname+set}" = set; then
5057   echo $ECHO_N "(cached) $ECHO_C" >&6
5058 else
5059
5060 cf_cv_gpm_soname=unknown
5061 if test "$cross_compiling" != yes ; then
5062 cat >conftest.$ac_ext <<CF_EOF
5063 #include <gpm.h>
5064 int main()
5065 {
5066 if (Gpm_Open(0,0)) Gpm_Close();
5067         ${cf_cv_main_return:-return}(0);
5068 }
5069 CF_EOF
5070 cf_save_LIBS="$LIBS"
5071         LIBS="-lgpm $LIBS"
5072         if { (eval echo "$as_me:5072: \"$ac_compile\"") >&5
5073   (eval $ac_compile) 2>&5
5074   ac_status=$?
5075   echo "$as_me:5075: \$? = $ac_status" >&5
5076   (exit $ac_status); } ; then
5077                 if { (eval echo "$as_me:5077: \"$ac_link\"") >&5
5078   (eval $ac_link) 2>&5
5079   ac_status=$?
5080   echo "$as_me:5080: \$? = $ac_status" >&5
5081   (exit $ac_status); } ; then
5082                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5083                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5084                 fi
5085         fi
5086 rm -rf conftest*
5087 LIBS="$cf_save_LIBS"
5088 fi
5089
5090 fi
5091 echo "$as_me:5091: result: $cf_cv_gpm_soname" >&5
5092 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5093
5094                 fi
5095                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5096 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5097 EOF
5098
5099                 SHLIB_LIST="-ldl $SHLIB_LIST"
5100         else
5101                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5102                 TEST_LIBS="-lgpm $TEST_LIBS"
5103         fi
5104         cat >>confdefs.h <<\EOF
5105 #define HAVE_LIBGPM 1
5106 EOF
5107
5108 echo "$as_me:5108: checking for Gpm_Wgetch in -lgpm" >&5
5109 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5110 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5111   echo $ECHO_N "(cached) $ECHO_C" >&6
5112 else
5113   ac_check_lib_save_LIBS=$LIBS
5114 LIBS="-lgpm  $LIBS"
5115 cat >conftest.$ac_ext <<_ACEOF
5116 #line 5116 "configure"
5117 #include "confdefs.h"
5118
5119 /* Override any gcc2 internal prototype to avoid an error.  */
5120 #ifdef __cplusplus
5121 extern "C"
5122 #endif
5123 /* We use char because int might match the return type of a gcc2
5124    builtin and then its argument prototype would still apply.  */
5125 char Gpm_Wgetch ();
5126 int
5127 main ()
5128 {
5129 Gpm_Wgetch ();
5130   ;
5131   return 0;
5132 }
5133 _ACEOF
5134 rm -f conftest.$ac_objext conftest$ac_exeext
5135 if { (eval echo "$as_me:5135: \"$ac_link\"") >&5
5136   (eval $ac_link) 2>&5
5137   ac_status=$?
5138   echo "$as_me:5138: \$? = $ac_status" >&5
5139   (exit $ac_status); } &&
5140          { ac_try='test -s conftest$ac_exeext'
5141   { (eval echo "$as_me:5141: \"$ac_try\"") >&5
5142   (eval $ac_try) 2>&5
5143   ac_status=$?
5144   echo "$as_me:5144: \$? = $ac_status" >&5
5145   (exit $ac_status); }; }; then
5146   ac_cv_lib_gpm_Gpm_Wgetch=yes
5147 else
5148   echo "$as_me: failed program was:" >&5
5149 cat conftest.$ac_ext >&5
5150 ac_cv_lib_gpm_Gpm_Wgetch=no
5151 fi
5152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5153 LIBS=$ac_check_lib_save_LIBS
5154 fi
5155 echo "$as_me:5155: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5156 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5157 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5158
5159 echo "$as_me:5159: checking if GPM is weakly bound to curses library" >&5
5160 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5161 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5162   echo $ECHO_N "(cached) $ECHO_C" >&6
5163 else
5164
5165 cf_cv_check_gpm_wgetch=unknown
5166 if test "$cross_compiling" != yes ; then
5167
5168 cat >conftest.$ac_ext <<CF_EOF
5169 #include <gpm.h>
5170 int main()
5171 {
5172         Gpm_Wgetch();
5173         ${cf_cv_main_return:-return}(0);
5174 }
5175 CF_EOF
5176
5177         cf_save_LIBS="$LIBS"
5178         # This only works if we can look at the symbol table.  If a shared
5179         # library is stripped for install, we cannot use that.  So we're forced
5180         # to rely on the static library, noting that some packagers may not
5181         # include it.
5182         LIBS="-static -lgpm -dynamic $LIBS"
5183         if { (eval echo "$as_me:5183: \"$ac_compile\"") >&5
5184   (eval $ac_compile) 2>&5
5185   ac_status=$?
5186   echo "$as_me:5186: \$? = $ac_status" >&5
5187   (exit $ac_status); } ; then
5188                 if { (eval echo "$as_me:5188: \"$ac_link\"") >&5
5189   (eval $ac_link) 2>&5
5190   ac_status=$?
5191   echo "$as_me:5191: \$? = $ac_status" >&5
5192   (exit $ac_status); } ; then
5193                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5194                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5195                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5196                 fi
5197         fi
5198         rm -rf conftest*
5199         LIBS="$cf_save_LIBS"
5200 fi
5201
5202 fi
5203 echo "$as_me:5203: result: $cf_cv_check_gpm_wgetch" >&5
5204 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5205
5206 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5207         { echo "$as_me:5207: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5208 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5209 fi
5210
5211 fi
5212
5213 fi
5214
5215 # not everyone has "test -c"
5216 if test -c /dev/sysmouse 2>/dev/null ; then
5217 echo "$as_me:5217: checking if you want to use sysmouse" >&5
5218 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5219
5220 # Check whether --with-sysmouse or --without-sysmouse was given.
5221 if test "${with_sysmouse+set}" = set; then
5222   withval="$with_sysmouse"
5223   cf_with_sysmouse=$withval
5224 else
5225   cf_with_sysmouse=maybe
5226 fi;
5227         if test "$cf_with_sysmouse" != no ; then
5228         cat >conftest.$ac_ext <<_ACEOF
5229 #line 5229 "configure"
5230 #include "confdefs.h"
5231
5232 #include <osreldate.h>
5233 #if (__FreeBSD_version >= 400017)
5234 #include <sys/consio.h>
5235 #include <sys/fbio.h>
5236 #else
5237 #include <machine/console.h>
5238 #endif
5239
5240 int
5241 main ()
5242 {
5243
5244         struct mouse_info the_mouse;
5245         ioctl(0, CONS_MOUSECTL, &the_mouse);
5246
5247   ;
5248   return 0;
5249 }
5250 _ACEOF
5251 rm -f conftest.$ac_objext
5252 if { (eval echo "$as_me:5252: \"$ac_compile\"") >&5
5253   (eval $ac_compile) 2>&5
5254   ac_status=$?
5255   echo "$as_me:5255: \$? = $ac_status" >&5
5256   (exit $ac_status); } &&
5257          { ac_try='test -s conftest.$ac_objext'
5258   { (eval echo "$as_me:5258: \"$ac_try\"") >&5
5259   (eval $ac_try) 2>&5
5260   ac_status=$?
5261   echo "$as_me:5261: \$? = $ac_status" >&5
5262   (exit $ac_status); }; }; then
5263   cf_with_sysmouse=yes
5264 else
5265   echo "$as_me: failed program was:" >&5
5266 cat conftest.$ac_ext >&5
5267 cf_with_sysmouse=no
5268 fi
5269 rm -f conftest.$ac_objext conftest.$ac_ext
5270         fi
5271 echo "$as_me:5271: result: $cf_with_sysmouse" >&5
5272 echo "${ECHO_T}$cf_with_sysmouse" >&6
5273 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5274 #define USE_SYSMOUSE 1
5275 EOF
5276
5277 fi
5278
5279 if test X"$CC_G_OPT" = X"" ; then
5280         CC_G_OPT='-g'
5281         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5282 fi
5283
5284 if test X"$CXX_G_OPT" = X"" ; then
5285         CXX_G_OPT='-g'
5286         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5287 fi
5288
5289 echo "$as_me:5289: checking for default loader flags" >&5
5290 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5291 case $DFT_LWR_MODEL in
5292 libtool) LD_MODEL=''   ;;
5293 normal)  LD_MODEL=''   ;;
5294 debug)   LD_MODEL=$CC_G_OPT ;;
5295 profile) LD_MODEL='-pg';;
5296 shared)  LD_MODEL=''   ;;
5297 esac
5298 echo "$as_me:5298: result: $LD_MODEL" >&5
5299 echo "${ECHO_T}$LD_MODEL" >&6
5300
5301 case $DFT_LWR_MODEL in
5302 shared)
5303
5304 echo "$as_me:5304: checking if rpath option should be used" >&5
5305 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5306
5307 # Check whether --enable-rpath or --disable-rpath was given.
5308 if test "${enable_rpath+set}" = set; then
5309   enableval="$enable_rpath"
5310   cf_cv_enable_rpath=$enableval
5311 else
5312   cf_cv_enable_rpath=no
5313 fi;
5314 echo "$as_me:5314: result: $cf_cv_enable_rpath" >&5
5315 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5316
5317 echo "$as_me:5317: checking if shared libraries should be relinked during install" >&5
5318 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5319
5320 # Check whether --enable-relink or --disable-relink was given.
5321 if test "${enable_relink+set}" = set; then
5322   enableval="$enable_relink"
5323   cf_cv_do_relink=$enableval
5324 else
5325   cf_cv_do_relink=yes
5326 fi;
5327 echo "$as_me:5327: result: $cf_cv_do_relink" >&5
5328 echo "${ECHO_T}$cf_cv_do_relink" >&6
5329         ;;
5330 esac
5331
5332 LD_RPATH_OPT=
5333 echo "$as_me:5333: checking for an rpath option" >&5
5334 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5335 case $cf_cv_system_name in #(vi
5336 irix*) #(vi
5337         if test "$GCC" = yes; then
5338                 LD_RPATH_OPT="-Wl,-rpath,"
5339         else
5340                 LD_RPATH_OPT="-rpath "
5341         fi
5342         ;;
5343 linux*|gnu*|k*bsd*-gnu) #(vi
5344         LD_RPATH_OPT="-Wl,-rpath,"
5345         ;;
5346 openbsd[2-9].*) #(vi
5347         LD_RPATH_OPT="-Wl,-rpath,"
5348         ;;
5349 freebsd*) #(vi
5350         LD_RPATH_OPT="-rpath "
5351         ;;
5352 netbsd*) #(vi
5353         LD_RPATH_OPT="-Wl,-rpath,"
5354         ;;
5355 osf*|mls+*) #(vi
5356         LD_RPATH_OPT="-rpath "
5357         ;;
5358 solaris2*) #(vi
5359         LD_RPATH_OPT="-R"
5360         ;;
5361 *)
5362         ;;
5363 esac
5364 echo "$as_me:5364: result: $LD_RPATH_OPT" >&5
5365 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5366
5367 case "x$LD_RPATH_OPT" in #(vi
5368 x-R*)
5369         echo "$as_me:5369: checking if we need a space after rpath option" >&5
5370 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5371         cf_save_LIBS="$LIBS"
5372         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5373         cat >conftest.$ac_ext <<_ACEOF
5374 #line 5374 "configure"
5375 #include "confdefs.h"
5376
5377 int
5378 main ()
5379 {
5380
5381   ;
5382   return 0;
5383 }
5384 _ACEOF
5385 rm -f conftest.$ac_objext conftest$ac_exeext
5386 if { (eval echo "$as_me:5386: \"$ac_link\"") >&5
5387   (eval $ac_link) 2>&5
5388   ac_status=$?
5389   echo "$as_me:5389: \$? = $ac_status" >&5
5390   (exit $ac_status); } &&
5391          { ac_try='test -s conftest$ac_exeext'
5392   { (eval echo "$as_me:5392: \"$ac_try\"") >&5
5393   (eval $ac_try) 2>&5
5394   ac_status=$?
5395   echo "$as_me:5395: \$? = $ac_status" >&5
5396   (exit $ac_status); }; }; then
5397   cf_rpath_space=no
5398 else
5399   echo "$as_me: failed program was:" >&5
5400 cat conftest.$ac_ext >&5
5401 cf_rpath_space=yes
5402 fi
5403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5404         LIBS="$cf_save_LIBS"
5405         echo "$as_me:5405: result: $cf_rpath_space" >&5
5406 echo "${ECHO_T}$cf_rpath_space" >&6
5407         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5408         ;;
5409 esac
5410
5411         LOCAL_LDFLAGS=
5412         LOCAL_LDFLAGS2=
5413         LD_SHARED_OPTS=
5414         INSTALL_LIB="-m 644"
5415
5416         cf_cv_do_symlinks=no
5417         cf_ld_rpath_opt=
5418         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5419
5420         echo "$as_me:5420: checking if release/abi version should be used for shared libs" >&5
5421 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5422
5423 # Check whether --with-shlib-version or --without-shlib-version was given.
5424 if test "${with_shlib_version+set}" = set; then
5425   withval="$with_shlib_version"
5426   test -z "$withval" && withval=auto
5427         case $withval in #(vi
5428         yes) #(vi
5429                 cf_cv_shlib_version=auto
5430                 ;;
5431         rel|abi|auto|no) #(vi
5432                 cf_cv_shlib_version=$withval
5433                 ;;
5434         *)
5435                 { { echo "$as_me:5435: error: option value must be one of: rel, abi, auto or no" >&5
5436 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5437    { (exit 1); exit 1; }; }
5438                 ;;
5439         esac
5440
5441 else
5442   cf_cv_shlib_version=auto
5443 fi;
5444         echo "$as_me:5444: result: $cf_cv_shlib_version" >&5
5445 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5446
5447         cf_cv_rm_so_locs=no
5448
5449         # Some less-capable ports of gcc support only -fpic
5450         CC_SHARED_OPTS=
5451         if test "$GCC" = yes
5452         then
5453                 echo "$as_me:5453: checking which $CC option to use" >&5
5454 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5455                 cf_save_CFLAGS="$CFLAGS"
5456                 for CC_SHARED_OPTS in -fPIC -fpic ''
5457                 do
5458                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5459                         cat >conftest.$ac_ext <<_ACEOF
5460 #line 5460 "configure"
5461 #include "confdefs.h"
5462 #include <stdio.h>
5463 int
5464 main ()
5465 {
5466 int x = 1
5467   ;
5468   return 0;
5469 }
5470 _ACEOF
5471 rm -f conftest.$ac_objext
5472 if { (eval echo "$as_me:5472: \"$ac_compile\"") >&5
5473   (eval $ac_compile) 2>&5
5474   ac_status=$?
5475   echo "$as_me:5475: \$? = $ac_status" >&5
5476   (exit $ac_status); } &&
5477          { ac_try='test -s conftest.$ac_objext'
5478   { (eval echo "$as_me:5478: \"$ac_try\"") >&5
5479   (eval $ac_try) 2>&5
5480   ac_status=$?
5481   echo "$as_me:5481: \$? = $ac_status" >&5
5482   (exit $ac_status); }; }; then
5483   break
5484 else
5485   echo "$as_me: failed program was:" >&5
5486 cat conftest.$ac_ext >&5
5487 fi
5488 rm -f conftest.$ac_objext conftest.$ac_ext
5489                 done
5490                 echo "$as_me:5490: result: $CC_SHARED_OPTS" >&5
5491 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5492                 CFLAGS="$cf_save_CFLAGS"
5493         fi
5494
5495         cf_cv_shlib_version_infix=no
5496
5497         case $cf_cv_system_name in #(vi
5498         aix[56]*) #(vi
5499                 if test "$GCC" = yes; then
5500                         CC_SHARED_OPTS=
5501                         MK_SHARED_LIB='$(CC) -shared'
5502                 fi
5503                 ;;
5504         beos*) #(vi
5505                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5506                 ;;
5507         cygwin*) #(vi
5508                 CC_SHARED_OPTS=
5509                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5510                 cf_cv_shlib_version=cygdll
5511                 cf_cv_shlib_version_infix=cygdll
5512                 cat >mk_shared_lib.sh <<-CF_EOF
5513                 #!/bin/sh
5514                 SHARED_LIB=\$1
5515                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5516                 shift
5517                 cat <<-EOF
5518                 Linking shared library
5519                 ** SHARED_LIB \$SHARED_LIB
5520                 ** IMPORT_LIB \$IMPORT_LIB
5521 EOF
5522                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5523 CF_EOF
5524                 chmod +x mk_shared_lib.sh
5525                 ;;
5526         darwin*) #(vi
5527                 EXTRA_CFLAGS="-no-cpp-precomp"
5528                 CC_SHARED_OPTS="-dynamic"
5529                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5530                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5531                 cf_cv_shlib_version_infix=yes
5532                 echo "$as_me:5532: checking if ld -search_paths_first works" >&5
5533 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5534 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537
5538                         cf_save_LDFLAGS=$LDFLAGS
5539                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5540                         cat >conftest.$ac_ext <<_ACEOF
5541 #line 5541 "configure"
5542 #include "confdefs.h"
5543
5544 int
5545 main ()
5546 {
5547 int i;
5548   ;
5549   return 0;
5550 }
5551 _ACEOF
5552 rm -f conftest.$ac_objext conftest$ac_exeext
5553 if { (eval echo "$as_me:5553: \"$ac_link\"") >&5
5554   (eval $ac_link) 2>&5
5555   ac_status=$?
5556   echo "$as_me:5556: \$? = $ac_status" >&5
5557   (exit $ac_status); } &&
5558          { ac_try='test -s conftest$ac_exeext'
5559   { (eval echo "$as_me:5559: \"$ac_try\"") >&5
5560   (eval $ac_try) 2>&5
5561   ac_status=$?
5562   echo "$as_me:5562: \$? = $ac_status" >&5
5563   (exit $ac_status); }; }; then
5564   cf_cv_ldflags_search_paths_first=yes
5565 else
5566   echo "$as_me: failed program was:" >&5
5567 cat conftest.$ac_ext >&5
5568 cf_cv_ldflags_search_paths_first=no
5569 fi
5570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5571                                 LDFLAGS=$cf_save_LDFLAGS
5572 fi
5573 echo "$as_me:5573: result: $cf_cv_ldflags_search_paths_first" >&5
5574 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5575                 if test $cf_cv_ldflags_search_paths_first = yes; then
5576                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5577                 fi
5578                 ;;
5579         hpux*) #(vi
5580                 # (tested with gcc 2.7.2 -- I don't have c89)
5581                 if test "$GCC" = yes; then
5582                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5583                 else
5584                         CC_SHARED_OPTS='+Z'
5585                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5586                 fi
5587                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5588                 # HP-UX shared libraries must be executable, and should be
5589                 # readonly to exploit a quirk in the memory manager.
5590                 INSTALL_LIB="-m 555"
5591                 ;;
5592         irix*) #(vi
5593                 if test "$cf_cv_enable_rpath" = yes ; then
5594                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5595                 fi
5596                 # tested with IRIX 5.2 and 'cc'.
5597                 if test "$GCC" != yes; then
5598                         CC_SHARED_OPTS='-KPIC'
5599                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5600                 else
5601                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5602                 fi
5603                 cf_cv_rm_so_locs=yes
5604                 ;;
5605         linux*|gnu*|k*bsd*-gnu) #(vi
5606                 if test "$DFT_LWR_MODEL" = "shared" ; then
5607                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5608                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5609                 fi
5610                 if test "$cf_cv_enable_rpath" = yes ; then
5611                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5612                 fi
5613
5614         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5615         if test "$cf_cv_shlib_version" = rel; then
5616                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5617         else
5618                 cf_cv_shared_soname='`basename $@`'
5619         fi
5620
5621                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5622                 ;;
5623         openbsd[2-9].*) #(vi
5624                 if test "$DFT_LWR_MODEL" = "shared" ; then
5625                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5626                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5627                 fi
5628                 if test "$cf_cv_enable_rpath" = yes ; then
5629                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5630                 fi
5631                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5632
5633         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5634         if test "$cf_cv_shlib_version" = rel; then
5635                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5636         else
5637                 cf_cv_shared_soname='`basename $@`'
5638         fi
5639
5640                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5641                 ;;
5642         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5643                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5644                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5645                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5646                 ;;
5647         freebsd*) #(vi
5648                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5649                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5650                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5651                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5652                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5653                 fi
5654
5655         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5656         if test "$cf_cv_shlib_version" = rel; then
5657                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5658         else
5659                 cf_cv_shared_soname='`basename $@`'
5660         fi
5661
5662                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5663                 ;;
5664         netbsd*) #(vi
5665                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5666                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5667                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5668                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5669                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5670                         if test "$cf_cv_shlib_version" = auto; then
5671                         if test -f /usr/libexec/ld.elf_so; then
5672                                 cf_cv_shlib_version=abi
5673                         else
5674                                 cf_cv_shlib_version=rel
5675                         fi
5676                         fi
5677
5678         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5679         if test "$cf_cv_shlib_version" = rel; then
5680                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5681         else
5682                 cf_cv_shared_soname='`basename $@`'
5683         fi
5684
5685                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5686                 else
5687                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5688                 fi
5689                 ;;
5690         osf*|mls+*) #(vi
5691                 # tested with OSF/1 V3.2 and 'cc'
5692                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5693                 # link with shared libs).
5694                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5695                 case $host_os in #(vi
5696                 osf4*)
5697                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5698                         ;;
5699                 esac
5700                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5701                 if test "$DFT_LWR_MODEL" = "shared" ; then
5702                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5703                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5704                 fi
5705                 cf_cv_rm_so_locs=yes
5706                 ;;
5707         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5708                 # tested with osr5.0.5
5709                 if test "$GCC" != yes; then
5710                         CC_SHARED_OPTS='-belf -KPIC'
5711                 fi
5712                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5713                 if test "$cf_cv_enable_rpath" = yes ; then
5714                         # only way is to set LD_RUN_PATH but no switch for it
5715                         RUN_PATH=$libdir
5716                 fi
5717                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5718                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5719                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5720                 ;;
5721         sunos4*) #(vi
5722                 # tested with SunOS 4.1.1 and gcc 2.7.0
5723                 if test "$GCC" != yes; then
5724                         CC_SHARED_OPTS='-KPIC'
5725                 fi
5726                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5727                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5728                 ;;
5729         solaris2*) #(vi
5730                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5731                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5732                 if test "$DFT_LWR_MODEL" = "shared" ; then
5733                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5734                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5735                 fi
5736                 if test "$cf_cv_enable_rpath" = yes ; then
5737                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5738                 fi
5739
5740         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5741         if test "$cf_cv_shlib_version" = rel; then
5742                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5743         else
5744                 cf_cv_shared_soname='`basename $@`'
5745         fi
5746
5747                 if test "$GCC" != yes; then
5748                         cf_save_CFLAGS="$CFLAGS"
5749                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5750                         do
5751                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5752                                 cat >conftest.$ac_ext <<_ACEOF
5753 #line 5753 "configure"
5754 #include "confdefs.h"
5755 #include <stdio.h>
5756 int
5757 main ()
5758 {
5759 printf("Hello\n");
5760   ;
5761   return 0;
5762 }
5763 _ACEOF
5764 rm -f conftest.$ac_objext
5765 if { (eval echo "$as_me:5765: \"$ac_compile\"") >&5
5766   (eval $ac_compile) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); } &&
5770          { ac_try='test -s conftest.$ac_objext'
5771   { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772   (eval $ac_try) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); }; }; then
5776   break
5777 else
5778   echo "$as_me: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 fi
5781 rm -f conftest.$ac_objext conftest.$ac_ext
5782                         done
5783                         CFLAGS="$cf_save_CFLAGS"
5784                         CC_SHARED_OPTS=$cf_shared_opts
5785                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5786                 else
5787                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5788                 fi
5789                 ;;
5790         sysv5uw7*|unix_sv*) #(vi
5791                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5792                 if test "$GCC" != yes; then
5793                         CC_SHARED_OPTS='-KPIC'
5794                 fi
5795                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5796                 ;;
5797         *)
5798                 CC_SHARED_OPTS='unknown'
5799                 MK_SHARED_LIB='echo unknown'
5800                 ;;
5801         esac
5802
5803         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5804         case "$cf_cv_shlib_version" in #(vi
5805         rel|abi)
5806                 case "$MK_SHARED_LIB" in #(vi
5807                 *'-o $@') #(vi
5808                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5809                         ;;
5810                 *)
5811                         { echo "$as_me:5811: WARNING: ignored --with-shlib-version" >&5
5812 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5813                         ;;
5814                 esac
5815                 ;;
5816         esac
5817
5818         if test -n "$cf_ld_rpath_opt" ; then
5819                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5820         fi
5821
5822 if test "$CC_SHARED_OPTS" = "unknown"; then
5823         for model in $cf_list_models; do
5824                 if test "$model" = "shared"; then
5825                         { { echo "$as_me:5825: error: Shared libraries are not supported in this version" >&5
5826 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5827    { (exit 1); exit 1; }; }
5828                 fi
5829         done
5830 fi
5831
5832 ### If we're building with rpath, try to link non-standard libs that way too.
5833 if test "$DFT_LWR_MODEL" = "shared"; then
5834
5835 echo "$as_me:5835: checking if rpath should be not be set" >&5
5836 echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
5837
5838 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5839 if test "${enable_rpath_hack+set}" = set; then
5840   enableval="$enable_rpath_hack"
5841   test "$enableval" != no && enableval=yes
5842   if test "$enableval" != "yes" ; then
5843     cf_disable_rpath_hack=yes
5844   else
5845     cf_disable_rpath_hack=no
5846   fi
5847 else
5848   enableval=yes
5849   cf_disable_rpath_hack=no
5850
5851 fi;
5852 echo "$as_me:5852: result: $cf_disable_rpath_hack" >&5
5853 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5854 if test "$cf_disable_rpath_hack" = no ; then
5855
5856 echo "$as_me:5856: checking for updated LDFLAGS" >&5
5857 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5858 if test -n "$LD_RPATH_OPT" ; then
5859         echo "$as_me:5859: result: maybe" >&5
5860 echo "${ECHO_T}maybe" >&6
5861
5862         for ac_prog in ldd
5863 do
5864   # Extract the first word of "$ac_prog", so it can be a program name with args.
5865 set dummy $ac_prog; ac_word=$2
5866 echo "$as_me:5866: checking for $ac_word" >&5
5867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5868 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5869   echo $ECHO_N "(cached) $ECHO_C" >&6
5870 else
5871   if test -n "$cf_ldd_prog"; then
5872   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5873 else
5874   ac_save_IFS=$IFS; IFS=$ac_path_separator
5875 ac_dummy="$PATH"
5876 for ac_dir in $ac_dummy; do
5877   IFS=$ac_save_IFS
5878   test -z "$ac_dir" && ac_dir=.
5879   $as_executable_p "$ac_dir/$ac_word" || continue
5880 ac_cv_prog_cf_ldd_prog="$ac_prog"
5881 echo "$as_me:5881: found $ac_dir/$ac_word" >&5
5882 break
5883 done
5884
5885 fi
5886 fi
5887 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5888 if test -n "$cf_ldd_prog"; then
5889   echo "$as_me:5889: result: $cf_ldd_prog" >&5
5890 echo "${ECHO_T}$cf_ldd_prog" >&6
5891 else
5892   echo "$as_me:5892: result: no" >&5
5893 echo "${ECHO_T}no" >&6
5894 fi
5895
5896   test -n "$cf_ldd_prog" && break
5897 done
5898 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5899
5900         cf_rpath_list="/usr/lib /lib"
5901         if test "$cf_ldd_prog" != no
5902         then
5903 cat >conftest.$ac_ext <<_ACEOF
5904 #line 5904 "configure"
5905 #include "confdefs.h"
5906 #include <stdio.h>
5907 int
5908 main ()
5909 {
5910 printf("Hello");
5911   ;
5912   return 0;
5913 }
5914 _ACEOF
5915 rm -f conftest.$ac_objext conftest$ac_exeext
5916 if { (eval echo "$as_me:5916: \"$ac_link\"") >&5
5917   (eval $ac_link) 2>&5
5918   ac_status=$?
5919   echo "$as_me:5919: \$? = $ac_status" >&5
5920   (exit $ac_status); } &&
5921          { ac_try='test -s conftest$ac_exeext'
5922   { (eval echo "$as_me:5922: \"$ac_try\"") >&5
5923   (eval $ac_try) 2>&5
5924   ac_status=$?
5925   echo "$as_me:5925: \$? = $ac_status" >&5
5926   (exit $ac_status); }; }; then
5927   cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[     ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5928 else
5929   echo "$as_me: failed program was:" >&5
5930 cat conftest.$ac_ext >&5
5931 fi
5932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5933         fi
5934
5935         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5936
5937 echo "${as_me-configure}:5937: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5938
5939 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5940
5941 echo "${as_me-configure}:5941: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5942
5943 cf_rpath_dst=
5944 for cf_rpath_src in $LDFLAGS
5945 do
5946         case $cf_rpath_src in #(vi
5947         -L*) #(vi
5948
5949                 # check if this refers to a directory which we will ignore
5950                 cf_rpath_skip=no
5951                 if test -n "$cf_rpath_list"
5952                 then
5953                         for cf_rpath_item in $cf_rpath_list
5954                         do
5955                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5956                                 then
5957                                         cf_rpath_skip=yes
5958                                         break
5959                                 fi
5960                         done
5961                 fi
5962
5963                 if test "$cf_rpath_skip" = no
5964                 then
5965                         # transform the option
5966                         if test "$LD_RPATH_OPT" = "-R " ; then
5967                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5968                         else
5969                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5970                         fi
5971
5972                         # if we have not already added this, add it now
5973                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5974                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5975                         then
5976                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5977
5978 echo "${as_me-configure}:5978: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5979
5980                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5981                         fi
5982                 fi
5983                 ;;
5984         esac
5985         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5986 done
5987 LDFLAGS=$cf_rpath_dst
5988
5989 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
5990
5991 echo "${as_me-configure}:5991: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
5992
5993 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
5994
5995 echo "${as_me-configure}:5995: testing ...checking LIBS $LIBS ..." 1>&5
5996
5997 cf_rpath_dst=
5998 for cf_rpath_src in $LIBS
5999 do
6000         case $cf_rpath_src in #(vi
6001         -L*) #(vi
6002
6003                 # check if this refers to a directory which we will ignore
6004                 cf_rpath_skip=no
6005                 if test -n "$cf_rpath_list"
6006                 then
6007                         for cf_rpath_item in $cf_rpath_list
6008                         do
6009                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6010                                 then
6011                                         cf_rpath_skip=yes
6012                                         break
6013                                 fi
6014                         done
6015                 fi
6016
6017                 if test "$cf_rpath_skip" = no
6018                 then
6019                         # transform the option
6020                         if test "$LD_RPATH_OPT" = "-R " ; then
6021                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6022                         else
6023                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6024                         fi
6025
6026                         # if we have not already added this, add it now
6027                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6028                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6029                         then
6030                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6031
6032 echo "${as_me-configure}:6032: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6033
6034                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6035                         fi
6036                 fi
6037                 ;;
6038         esac
6039         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6040 done
6041 LIBS=$cf_rpath_dst
6042
6043 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6044
6045 echo "${as_me-configure}:6045: testing ...checked LIBS $LIBS ..." 1>&5
6046
6047         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6048
6049 echo "${as_me-configure}:6049: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6050
6051 fi
6052
6053 fi
6054
6055 fi
6056
6057 ###############################################################################
6058
6059 ###     use option --disable-overwrite to leave out the link to -lcurses
6060 echo "$as_me:6060: checking if you wish to install ncurses overwriting curses" >&5
6061 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6062
6063 # Check whether --enable-overwrite or --disable-overwrite was given.
6064 if test "${enable_overwrite+set}" = set; then
6065   enableval="$enable_overwrite"
6066   with_overwrite=$enableval
6067 else
6068   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6069 fi;
6070 echo "$as_me:6070: result: $with_overwrite" >&5
6071 echo "${ECHO_T}$with_overwrite" >&6
6072
6073 echo "$as_me:6073: checking if external terminfo-database is used" >&5
6074 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6075
6076 # Check whether --enable-database or --disable-database was given.
6077 if test "${enable_database+set}" = set; then
6078   enableval="$enable_database"
6079   use_database=$enableval
6080 else
6081   use_database=yes
6082 fi;
6083 echo "$as_me:6083: result: $use_database" >&5
6084 echo "${ECHO_T}$use_database" >&6
6085
6086 case $host_os in #(vi
6087 os2*) #(vi
6088         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6089         ;;
6090 *) #(vi
6091         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6092         ;;
6093 esac
6094
6095         case $cf_cv_system_name in
6096         os2*)   PATH_SEPARATOR=';'  ;;
6097         *)      PATH_SEPARATOR=':'  ;;
6098         esac
6099
6100 if test "$use_database" != no ; then
6101         cat >>confdefs.h <<\EOF
6102 #define USE_DATABASE 1
6103 EOF
6104
6105         echo "$as_me:6105: checking which terminfo source-file will be installed" >&5
6106 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6107
6108 # Check whether --with-database or --without-database was given.
6109 if test "${with_database+set}" = set; then
6110   withval="$with_database"
6111   TERMINFO_SRC=$withval
6112 fi;
6113         echo "$as_me:6113: result: $TERMINFO_SRC" >&5
6114 echo "${ECHO_T}$TERMINFO_SRC" >&6
6115
6116         echo "$as_me:6116: checking whether to use hashed database instead of directory/tree" >&5
6117 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6118
6119 # Check whether --with-hashed-db or --without-hashed-db was given.
6120 if test "${with_hashed_db+set}" = set; then
6121   withval="$with_hashed_db"
6122
6123 else
6124   with_hashed_db=no
6125 fi;
6126         echo "$as_me:6126: result: $with_hashed_db" >&5
6127 echo "${ECHO_T}$with_hashed_db" >&6
6128 else
6129         with_hashed_db=no
6130 fi
6131
6132 echo "$as_me:6132: checking for list of fallback descriptions" >&5
6133 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6134
6135 # Check whether --with-fallbacks or --without-fallbacks was given.
6136 if test "${with_fallbacks+set}" = set; then
6137   withval="$with_fallbacks"
6138   with_fallback=$withval
6139 else
6140   with_fallback=
6141 fi;
6142 echo "$as_me:6142: result: $with_fallback" >&5
6143 echo "${ECHO_T}$with_fallback" >&6
6144 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6145
6146 echo "$as_me:6146: checking if you want modern xterm or antique" >&5
6147 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6148
6149 # Check whether --with-xterm-new or --without-xterm-new was given.
6150 if test "${with_xterm_new+set}" = set; then
6151   withval="$with_xterm_new"
6152   with_xterm_new=$withval
6153 else
6154   with_xterm_new=yes
6155 fi;
6156 case $with_xterm_new in
6157 no)     with_xterm_new=xterm-old;;
6158 *)      with_xterm_new=xterm-new;;
6159 esac
6160 echo "$as_me:6160: result: $with_xterm_new" >&5
6161 echo "${ECHO_T}$with_xterm_new" >&6
6162 WHICH_XTERM=$with_xterm_new
6163
6164 MAKE_TERMINFO=
6165 if test "$use_database" = no ; then
6166         TERMINFO="${datadir}/terminfo"
6167         MAKE_TERMINFO="#"
6168 else
6169
6170 echo "$as_me:6170: checking for list of terminfo directories" >&5
6171 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6172
6173 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6174 if test "${with_terminfo_dirs+set}" = set; then
6175   withval="$with_terminfo_dirs"
6176
6177 else
6178   withval=${TERMINFO_DIRS-${datadir}/terminfo}
6179 fi;
6180 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6181 cf_dst_path=
6182 for cf_src_path in $withval
6183 do
6184
6185 if test "x$prefix" != xNONE; then
6186   cf_path_syntax="$prefix"
6187 else
6188   cf_path_syntax="$ac_default_prefix"
6189 fi
6190
6191 case ".$cf_src_path" in #(vi
6192 .\$\(*\)*|.\'*\'*) #(vi
6193   ;;
6194 ..|./*|.\\*) #(vi
6195   ;;
6196 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6197   ;;
6198 .\${*prefix}*) #(vi
6199   eval cf_src_path="$cf_src_path"
6200   case ".$cf_src_path" in #(vi
6201   .NONE/*)
6202     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6203     ;;
6204   esac
6205   ;; #(vi
6206 .no|.NONE/*)
6207   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6208   ;;
6209 *)
6210   { { echo "$as_me:6210: error: expected a pathname, not \"$cf_src_path\"" >&5
6211 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6212    { (exit 1); exit 1; }; }
6213   ;;
6214 esac
6215
6216   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6217   cf_dst_path="${cf_dst_path}${cf_src_path}"
6218 done
6219 IFS="$ac_save_ifs"
6220
6221 eval 'TERMINFO_DIRS="$cf_dst_path"'
6222
6223 echo "$as_me:6223: result: $TERMINFO_DIRS" >&5
6224 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6225 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6226 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6227 EOF
6228
6229 echo "$as_me:6229: checking for default terminfo directory" >&5
6230 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6231
6232 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6233 if test "${with_default_terminfo_dir+set}" = set; then
6234   withval="$with_default_terminfo_dir"
6235
6236 else
6237   withval="${TERMINFO-${datadir}/terminfo}"
6238 fi; if test -n "${datadir}/terminfo" ; then
6239
6240 if test "x$prefix" != xNONE; then
6241   cf_path_syntax="$prefix"
6242 else
6243   cf_path_syntax="$ac_default_prefix"
6244 fi
6245
6246 case ".$withval" in #(vi
6247 .\$\(*\)*|.\'*\'*) #(vi
6248   ;;
6249 ..|./*|.\\*) #(vi
6250   ;;
6251 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6252   ;;
6253 .\${*prefix}*) #(vi
6254   eval withval="$withval"
6255   case ".$withval" in #(vi
6256   .NONE/*)
6257     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6258     ;;
6259   esac
6260   ;; #(vi
6261 .no|.NONE/*)
6262   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6263   ;;
6264 *)
6265   { { echo "$as_me:6265: error: expected a pathname, not \"$withval\"" >&5
6266 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6267    { (exit 1); exit 1; }; }
6268   ;;
6269 esac
6270
6271 fi
6272 TERMINFO="$withval"
6273
6274 echo "$as_me:6274: result: $TERMINFO" >&5
6275 echo "${ECHO_T}$TERMINFO" >&6
6276 cat >>confdefs.h <<EOF
6277 #define TERMINFO "$TERMINFO"
6278 EOF
6279
6280 fi
6281
6282 ###     use option --disable-big-core to make tic run on small machines
6283 ###     We need 4Mb, check if we can allocate 50% more than that.
6284 echo "$as_me:6284: checking if big-core option selected" >&5
6285 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6286
6287 # Check whether --enable-big-core or --disable-big-core was given.
6288 if test "${enable_big_core+set}" = set; then
6289   enableval="$enable_big_core"
6290   with_big_core=$enableval
6291 else
6292   if test "$cross_compiling" = yes; then
6293   with_big_core=no
6294 else
6295   cat >conftest.$ac_ext <<_ACEOF
6296 #line 6296 "configure"
6297 #include "confdefs.h"
6298
6299 #include <stdlib.h>
6300 #include <string.h>
6301 int main() {
6302         unsigned long n = 6000000L;
6303         char *s = malloc(n);
6304         if (s != 0)
6305                 s[0] = s[n-1] = 0;
6306         ${cf_cv_main_return:-return}(s == 0);
6307 }
6308 _ACEOF
6309 rm -f conftest$ac_exeext
6310 if { (eval echo "$as_me:6310: \"$ac_link\"") >&5
6311   (eval $ac_link) 2>&5
6312   ac_status=$?
6313   echo "$as_me:6313: \$? = $ac_status" >&5
6314   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6315   { (eval echo "$as_me:6315: \"$ac_try\"") >&5
6316   (eval $ac_try) 2>&5
6317   ac_status=$?
6318   echo "$as_me:6318: \$? = $ac_status" >&5
6319   (exit $ac_status); }; }; then
6320   with_big_core=yes
6321 else
6322   echo "$as_me: program exited with status $ac_status" >&5
6323 echo "$as_me: failed program was:" >&5
6324 cat conftest.$ac_ext >&5
6325 with_big_core=no
6326 fi
6327 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6328 fi
6329 fi;
6330 echo "$as_me:6330: result: $with_big_core" >&5
6331 echo "${ECHO_T}$with_big_core" >&6
6332 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6333 #define HAVE_BIG_CORE 1
6334 EOF
6335
6336 ### ISO C only guarantees 512-char strings, we have tables which load faster
6337 ### when constructed using "big" strings.  More than the C compiler, the awk
6338 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6339 echo "$as_me:6339: checking if big-strings option selected" >&5
6340 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6341
6342 # Check whether --enable-big-strings or --disable-big-strings was given.
6343 if test "${enable_big_strings+set}" = set; then
6344   enableval="$enable_big_strings"
6345   with_big_strings=$enableval
6346 else
6347
6348         case x$AWK in #(vi
6349         x)
6350                 eval with_big_strings=no
6351                 ;;
6352         *) #(vi
6353                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6354                         | $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
6355                         eval with_big_strings=yes
6356                 else
6357                         eval with_big_strings=no
6358                 fi
6359                 ;;
6360         esac
6361
6362 fi;
6363 echo "$as_me:6363: result: $with_big_strings" >&5
6364 echo "${ECHO_T}$with_big_strings" >&6
6365
6366 USE_BIG_STRINGS=0
6367 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6368
6369 ###     use option --enable-termcap to compile in the termcap fallback support
6370 echo "$as_me:6370: checking if you want termcap-fallback support" >&5
6371 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6372
6373 # Check whether --enable-termcap or --disable-termcap was given.
6374 if test "${enable_termcap+set}" = set; then
6375   enableval="$enable_termcap"
6376   with_termcap=$enableval
6377 else
6378   with_termcap=no
6379 fi;
6380 echo "$as_me:6380: result: $with_termcap" >&5
6381 echo "${ECHO_T}$with_termcap" >&6
6382
6383 if test "$with_termcap" != "yes" ; then
6384         if test "$use_database" = no ; then
6385                 if test -z "$with_fallback" ; then
6386                         { { echo "$as_me:6386: error: You have disabled the database w/o specifying fallbacks" >&5
6387 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6388    { (exit 1); exit 1; }; }
6389                 fi
6390         fi
6391         cat >>confdefs.h <<\EOF
6392 #define PURE_TERMINFO 1
6393 EOF
6394
6395 else
6396
6397 if test "$with_ticlib" != no ; then
6398         { { echo "$as_me:6398: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6399 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6400    { (exit 1); exit 1; }; }
6401 fi
6402
6403 cat >>confdefs.h <<\EOF
6404 #define USE_TERMCAP 1
6405 EOF
6406
6407 echo "$as_me:6407: checking for list of termcap files" >&5
6408 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6409
6410 # Check whether --with-termpath or --without-termpath was given.
6411 if test "${with_termpath+set}" = set; then
6412   withval="$with_termpath"
6413
6414 else
6415   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6416 fi;
6417 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6418 cf_dst_path=
6419 for cf_src_path in $withval
6420 do
6421
6422 if test "x$prefix" != xNONE; then
6423   cf_path_syntax="$prefix"
6424 else
6425   cf_path_syntax="$ac_default_prefix"
6426 fi
6427
6428 case ".$cf_src_path" in #(vi
6429 .\$\(*\)*|.\'*\'*) #(vi
6430   ;;
6431 ..|./*|.\\*) #(vi
6432   ;;
6433 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6434   ;;
6435 .\${*prefix}*) #(vi
6436   eval cf_src_path="$cf_src_path"
6437   case ".$cf_src_path" in #(vi
6438   .NONE/*)
6439     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6440     ;;
6441   esac
6442   ;; #(vi
6443 .no|.NONE/*)
6444   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6445   ;;
6446 *)
6447   { { echo "$as_me:6447: error: expected a pathname, not \"$cf_src_path\"" >&5
6448 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6449    { (exit 1); exit 1; }; }
6450   ;;
6451 esac
6452
6453   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6454   cf_dst_path="${cf_dst_path}${cf_src_path}"
6455 done
6456 IFS="$ac_save_ifs"
6457
6458 eval 'TERMPATH="$cf_dst_path"'
6459
6460 echo "$as_me:6460: result: $TERMPATH" >&5
6461 echo "${ECHO_T}$TERMPATH" >&6
6462 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6463 #define TERMPATH "$TERMPATH"
6464 EOF
6465
6466 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6467 echo "$as_me:6467: checking if fast termcap-loader is needed" >&5
6468 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6469
6470 # Check whether --enable-getcap or --disable-getcap was given.
6471 if test "${enable_getcap+set}" = set; then
6472   enableval="$enable_getcap"
6473   with_getcap=$enableval
6474 else
6475   with_getcap=no
6476 fi;
6477 echo "$as_me:6477: result: $with_getcap" >&5
6478 echo "${ECHO_T}$with_getcap" >&6
6479 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6480 #define USE_GETCAP 1
6481 EOF
6482
6483 echo "$as_me:6483: checking if translated termcaps will be cached in ~/.terminfo" >&5
6484 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6485
6486 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6487 if test "${enable_getcap_cache+set}" = set; then
6488   enableval="$enable_getcap_cache"
6489   with_getcap_cache=$enableval
6490 else
6491   with_getcap_cache=no
6492 fi;
6493 echo "$as_me:6493: result: $with_getcap_cache" >&5
6494 echo "${ECHO_T}$with_getcap_cache" >&6
6495 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6496 #define USE_GETCAP_CACHE 1
6497 EOF
6498
6499 fi
6500
6501 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6502 echo "$as_me:6502: checking if ~/.terminfo is wanted" >&5
6503 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6504
6505 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6506 if test "${enable_home_terminfo+set}" = set; then
6507   enableval="$enable_home_terminfo"
6508   with_home_terminfo=$enableval
6509 else
6510   with_home_terminfo=yes
6511 fi;
6512 echo "$as_me:6512: result: $with_home_terminfo" >&5
6513 echo "${ECHO_T}$with_home_terminfo" >&6
6514 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6515 #define USE_HOME_TERMINFO 1
6516 EOF
6517
6518 echo "$as_me:6518: checking if you want to use restricted environment when running as root" >&5
6519 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6520
6521 # Check whether --enable-root-environ or --disable-root-environ was given.
6522 if test "${enable_root_environ+set}" = set; then
6523   enableval="$enable_root_environ"
6524   with_root_environ=$enableval
6525 else
6526   with_root_environ=yes
6527 fi;
6528 echo "$as_me:6528: result: $with_root_environ" >&5
6529 echo "${ECHO_T}$with_root_environ" >&6
6530 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6531 #define USE_ROOT_ENVIRON 1
6532 EOF
6533
6534 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6535 ###   to reduce storage requirements for the terminfo database.
6536
6537 for ac_func in \
6538         remove \
6539         unlink
6540 do
6541 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6542 echo "$as_me:6542: checking for $ac_func" >&5
6543 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6544 if eval "test \"\${$as_ac_var+set}\" = set"; then
6545   echo $ECHO_N "(cached) $ECHO_C" >&6
6546 else
6547   cat >conftest.$ac_ext <<_ACEOF
6548 #line 6548 "configure"
6549 #include "confdefs.h"
6550 /* System header to define __stub macros and hopefully few prototypes,
6551     which can conflict with char $ac_func (); below.  */
6552 #include <assert.h>
6553 /* Override any gcc2 internal prototype to avoid an error.  */
6554 #ifdef __cplusplus
6555 extern "C"
6556 #endif
6557 /* We use char because int might match the return type of a gcc2
6558    builtin and then its argument prototype would still apply.  */
6559 char $ac_func ();
6560 char (*f) ();
6561
6562 int
6563 main ()
6564 {
6565 /* The GNU C library defines this for functions which it implements
6566     to always fail with ENOSYS.  Some functions are actually named
6567     something starting with __ and the normal name is an alias.  */
6568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6569 choke me
6570 #else
6571 f = $ac_func;
6572 #endif
6573
6574   ;
6575   return 0;
6576 }
6577 _ACEOF
6578 rm -f conftest.$ac_objext conftest$ac_exeext
6579 if { (eval echo "$as_me:6579: \"$ac_link\"") >&5
6580   (eval $ac_link) 2>&5
6581   ac_status=$?
6582   echo "$as_me:6582: \$? = $ac_status" >&5
6583   (exit $ac_status); } &&
6584          { ac_try='test -s conftest$ac_exeext'
6585   { (eval echo "$as_me:6585: \"$ac_try\"") >&5
6586   (eval $ac_try) 2>&5
6587   ac_status=$?
6588   echo "$as_me:6588: \$? = $ac_status" >&5
6589   (exit $ac_status); }; }; then
6590   eval "$as_ac_var=yes"
6591 else
6592   echo "$as_me: failed program was:" >&5
6593 cat conftest.$ac_ext >&5
6594 eval "$as_ac_var=no"
6595 fi
6596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6597 fi
6598 echo "$as_me:6598: result: `eval echo '${'$as_ac_var'}'`" >&5
6599 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6600 if test `eval echo '${'$as_ac_var'}'` = yes; then
6601   cat >>confdefs.h <<EOF
6602 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6603 EOF
6604
6605 fi
6606 done
6607
6608 if test "$cross_compiling" = yes ; then
6609
6610 for ac_func in \
6611                 link \
6612                 symlink
6613 do
6614 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6615 echo "$as_me:6615: checking for $ac_func" >&5
6616 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6617 if eval "test \"\${$as_ac_var+set}\" = set"; then
6618   echo $ECHO_N "(cached) $ECHO_C" >&6
6619 else
6620   cat >conftest.$ac_ext <<_ACEOF
6621 #line 6621 "configure"
6622 #include "confdefs.h"
6623 /* System header to define __stub macros and hopefully few prototypes,
6624     which can conflict with char $ac_func (); below.  */
6625 #include <assert.h>
6626 /* Override any gcc2 internal prototype to avoid an error.  */
6627 #ifdef __cplusplus
6628 extern "C"
6629 #endif
6630 /* We use char because int might match the return type of a gcc2
6631    builtin and then its argument prototype would still apply.  */
6632 char $ac_func ();
6633 char (*f) ();
6634
6635 int
6636 main ()
6637 {
6638 /* The GNU C library defines this for functions which it implements
6639     to always fail with ENOSYS.  Some functions are actually named
6640     something starting with __ and the normal name is an alias.  */
6641 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6642 choke me
6643 #else
6644 f = $ac_func;
6645 #endif
6646
6647   ;
6648   return 0;
6649 }
6650 _ACEOF
6651 rm -f conftest.$ac_objext conftest$ac_exeext
6652 if { (eval echo "$as_me:6652: \"$ac_link\"") >&5
6653   (eval $ac_link) 2>&5
6654   ac_status=$?
6655   echo "$as_me:6655: \$? = $ac_status" >&5
6656   (exit $ac_status); } &&
6657          { ac_try='test -s conftest$ac_exeext'
6658   { (eval echo "$as_me:6658: \"$ac_try\"") >&5
6659   (eval $ac_try) 2>&5
6660   ac_status=$?
6661   echo "$as_me:6661: \$? = $ac_status" >&5
6662   (exit $ac_status); }; }; then
6663   eval "$as_ac_var=yes"
6664 else
6665   echo "$as_me: failed program was:" >&5
6666 cat conftest.$ac_ext >&5
6667 eval "$as_ac_var=no"
6668 fi
6669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6670 fi
6671 echo "$as_me:6671: result: `eval echo '${'$as_ac_var'}'`" >&5
6672 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6673 if test `eval echo '${'$as_ac_var'}'` = yes; then
6674   cat >>confdefs.h <<EOF
6675 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6676 EOF
6677
6678 fi
6679 done
6680
6681 else
6682         echo "$as_me:6682: checking if link/symlink functions work" >&5
6683 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6684 if test "${cf_cv_link_funcs+set}" = set; then
6685   echo $ECHO_N "(cached) $ECHO_C" >&6
6686 else
6687
6688                 cf_cv_link_funcs=
6689                 for cf_func in link symlink ; do
6690                         if test "$cross_compiling" = yes; then
6691
6692                         eval 'ac_cv_func_'$cf_func'=error'
6693 else
6694   cat >conftest.$ac_ext <<_ACEOF
6695 #line 6695 "configure"
6696 #include "confdefs.h"
6697
6698 #include <sys/types.h>
6699 #include <sys/stat.h>
6700 #ifdef HAVE_UNISTD_H
6701 #include <unistd.h>
6702 #endif
6703 int main()
6704 {
6705         int fail = 0;
6706         char *src = "config.log";
6707         char *dst = "conftest.chk";
6708         struct stat src_sb;
6709         struct stat dst_sb;
6710
6711         stat(src, &src_sb);
6712         fail = ($cf_func("config.log", "conftest.chk") < 0)
6713             || (stat(dst, &dst_sb) < 0)
6714             || (dst_sb.st_mtime != src_sb.st_mtime);
6715 #ifdef HAVE_UNLINK
6716         unlink(dst);
6717 #else
6718         remove(dst);
6719 #endif
6720         ${cf_cv_main_return:-return} (fail);
6721 }
6722
6723 _ACEOF
6724 rm -f conftest$ac_exeext
6725 if { (eval echo "$as_me:6725: \"$ac_link\"") >&5
6726   (eval $ac_link) 2>&5
6727   ac_status=$?
6728   echo "$as_me:6728: \$? = $ac_status" >&5
6729   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6730   { (eval echo "$as_me:6730: \"$ac_try\"") >&5
6731   (eval $ac_try) 2>&5
6732   ac_status=$?
6733   echo "$as_me:6733: \$? = $ac_status" >&5
6734   (exit $ac_status); }; }; then
6735
6736                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6737                         eval 'ac_cv_func_'$cf_func'=yes'
6738 else
6739   echo "$as_me: program exited with status $ac_status" >&5
6740 echo "$as_me: failed program was:" >&5
6741 cat conftest.$ac_ext >&5
6742
6743                         eval 'ac_cv_func_'$cf_func'=no'
6744 fi
6745 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6746 fi
6747                 done
6748                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6749
6750 fi
6751 echo "$as_me:6751: result: $cf_cv_link_funcs" >&5
6752 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6753         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6754 #define HAVE_LINK 1
6755 EOF
6756
6757         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6758 #define HAVE_SYMLINK 1
6759 EOF
6760
6761 fi
6762
6763 with_links=no
6764 with_symlinks=no
6765
6766 # soft links (symbolic links) are useful for some systems where hard links do
6767 # not work, or to make it simpler to copy terminfo trees around.
6768 if test "$ac_cv_func_symlink" = yes ; then
6769     echo "$as_me:6769: checking if tic should use symbolic links" >&5
6770 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6771
6772 # Check whether --enable-symlinks or --disable-symlinks was given.
6773 if test "${enable_symlinks+set}" = set; then
6774   enableval="$enable_symlinks"
6775   with_symlinks=$enableval
6776 else
6777   with_symlinks=no
6778 fi;
6779     echo "$as_me:6779: result: $with_symlinks" >&5
6780 echo "${ECHO_T}$with_symlinks" >&6
6781 fi
6782
6783 # If we have hard links and did not choose to use soft links instead, there is
6784 # no reason to make this choice optional - use the hard links.
6785 if test "$with_symlinks" = no ; then
6786     echo "$as_me:6786: checking if tic should use hard links" >&5
6787 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6788     if test "$ac_cv_func_link" = yes ; then
6789         with_links=yes
6790     else
6791         with_links=no
6792     fi
6793     echo "$as_me:6793: result: $with_links" >&5
6794 echo "${ECHO_T}$with_links" >&6
6795 fi
6796
6797 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6798 #define USE_LINKS 1
6799 EOF
6800
6801 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6802 #define USE_SYMLINKS 1
6803 EOF
6804
6805 ###   use option --enable-broken-linker to force on use of broken-linker support
6806 echo "$as_me:6806: checking if you want broken-linker support code" >&5
6807 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6808
6809 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6810 if test "${enable_broken_linker+set}" = set; then
6811   enableval="$enable_broken_linker"
6812   with_broken_linker=$enableval
6813 else
6814   with_broken_linker=${BROKEN_LINKER-no}
6815 fi;
6816 echo "$as_me:6816: result: $with_broken_linker" >&5
6817 echo "${ECHO_T}$with_broken_linker" >&6
6818
6819 BROKEN_LINKER=0
6820 if test "$with_broken_linker" = yes ; then
6821         cat >>confdefs.h <<\EOF
6822 #define BROKEN_LINKER 1
6823 EOF
6824
6825         BROKEN_LINKER=1
6826 elif test "$DFT_LWR_MODEL" = shared ; then
6827         case $cf_cv_system_name in #(vi
6828         cygwin*)
6829                 cat >>confdefs.h <<\EOF
6830 #define BROKEN_LINKER 1
6831 EOF
6832
6833                 BROKEN_LINKER=1
6834                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6835
6836 echo "${as_me-configure}:6836: testing cygwin linker is broken anyway ..." 1>&5
6837
6838                 ;;
6839         esac
6840 fi
6841
6842 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6843 echo "$as_me:6843: checking if tputs should process BSD-style prefix padding" >&5
6844 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6845
6846 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6847 if test "${enable_bsdpad+set}" = set; then
6848   enableval="$enable_bsdpad"
6849   with_bsdpad=$enableval
6850 else
6851   with_bsdpad=no
6852 fi;
6853 echo "$as_me:6853: result: $with_bsdpad" >&5
6854 echo "${ECHO_T}$with_bsdpad" >&6
6855 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6856 #define BSD_TPUTS 1
6857 EOF
6858
6859 ###   use option --enable-widec to turn on use of wide-character support
6860 NCURSES_CH_T=chtype
6861 NCURSES_LIBUTF8=0
6862
6863 NEED_WCHAR_H=0
6864 NCURSES_MBSTATE_T=0
6865 NCURSES_WCHAR_T=0
6866 NCURSES_WINT_T=0
6867
6868 # Check to define _XOPEN_SOURCE "automatically"
6869
6870 cf_XOPEN_SOURCE=500
6871 cf_POSIX_C_SOURCE=199506L
6872 cf_xopen_source=
6873
6874 case $host_os in #(vi
6875 aix[456]*) #(vi
6876         cf_xopen_source="-D_ALL_SOURCE"
6877         ;;
6878 darwin[0-8].*) #(vi
6879         cf_xopen_source="-D_APPLE_C_SOURCE"
6880         ;;
6881 darwin*) #(vi
6882         cf_xopen_source="-D_DARWIN_C_SOURCE"
6883         ;;
6884 freebsd*|dragonfly*) #(vi
6885         # 5.x headers associate
6886         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6887         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6888         cf_POSIX_C_SOURCE=200112L
6889         cf_XOPEN_SOURCE=600
6890         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6891         ;;
6892 hpux11*) #(vi
6893         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6894         ;;
6895 hpux*) #(vi
6896         cf_xopen_source="-D_HPUX_SOURCE"
6897         ;;
6898 irix[56].*) #(vi
6899         cf_xopen_source="-D_SGI_SOURCE"
6900         ;;
6901 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6902
6903 echo "$as_me:6903: checking if we must define _GNU_SOURCE" >&5
6904 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6905 if test "${cf_cv_gnu_source+set}" = set; then
6906   echo $ECHO_N "(cached) $ECHO_C" >&6
6907 else
6908
6909 cat >conftest.$ac_ext <<_ACEOF
6910 #line 6910 "configure"
6911 #include "confdefs.h"
6912 #include <sys/types.h>
6913 int
6914 main ()
6915 {
6916
6917 #ifndef _XOPEN_SOURCE
6918 make an error
6919 #endif
6920   ;
6921   return 0;
6922 }
6923 _ACEOF
6924 rm -f conftest.$ac_objext
6925 if { (eval echo "$as_me:6925: \"$ac_compile\"") >&5
6926   (eval $ac_compile) 2>&5
6927   ac_status=$?
6928   echo "$as_me:6928: \$? = $ac_status" >&5
6929   (exit $ac_status); } &&
6930          { ac_try='test -s conftest.$ac_objext'
6931   { (eval echo "$as_me:6931: \"$ac_try\"") >&5
6932   (eval $ac_try) 2>&5
6933   ac_status=$?
6934   echo "$as_me:6934: \$? = $ac_status" >&5
6935   (exit $ac_status); }; }; then
6936   cf_cv_gnu_source=no
6937 else
6938   echo "$as_me: failed program was:" >&5
6939 cat conftest.$ac_ext >&5
6940 cf_save="$CPPFLAGS"
6941          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6942          cat >conftest.$ac_ext <<_ACEOF
6943 #line 6943 "configure"
6944 #include "confdefs.h"
6945 #include <sys/types.h>
6946 int
6947 main ()
6948 {
6949
6950 #ifdef _XOPEN_SOURCE
6951 make an error
6952 #endif
6953   ;
6954   return 0;
6955 }
6956 _ACEOF
6957 rm -f conftest.$ac_objext
6958 if { (eval echo "$as_me:6958: \"$ac_compile\"") >&5
6959   (eval $ac_compile) 2>&5
6960   ac_status=$?
6961   echo "$as_me:6961: \$? = $ac_status" >&5
6962   (exit $ac_status); } &&
6963          { ac_try='test -s conftest.$ac_objext'
6964   { (eval echo "$as_me:6964: \"$ac_try\"") >&5
6965   (eval $ac_try) 2>&5
6966   ac_status=$?
6967   echo "$as_me:6967: \$? = $ac_status" >&5
6968   (exit $ac_status); }; }; then
6969   cf_cv_gnu_source=no
6970 else
6971   echo "$as_me: failed program was:" >&5
6972 cat conftest.$ac_ext >&5
6973 cf_cv_gnu_source=yes
6974 fi
6975 rm -f conftest.$ac_objext conftest.$ac_ext
6976         CPPFLAGS="$cf_save"
6977
6978 fi
6979 rm -f conftest.$ac_objext conftest.$ac_ext
6980
6981 fi
6982 echo "$as_me:6982: result: $cf_cv_gnu_source" >&5
6983 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6984 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6985
6986         ;;
6987 mirbsd*) #(vi
6988         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6989         ;;
6990 netbsd*) #(vi
6991         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6992         ;;
6993 openbsd*) #(vi
6994         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6995         ;;
6996 osf[45]*) #(vi
6997         cf_xopen_source="-D_OSF_SOURCE"
6998         ;;
6999 nto-qnx*) #(vi
7000         cf_xopen_source="-D_QNX_SOURCE"
7001         ;;
7002 sco*) #(vi
7003         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7004         ;;
7005 solaris2.1[0-9]) #(vi
7006         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7007         ;;
7008 solaris2.[1-9]) #(vi
7009         cf_xopen_source="-D__EXTENSIONS__"
7010         ;;
7011 *)
7012         echo "$as_me:7012: checking if we should define _XOPEN_SOURCE" >&5
7013 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7014 if test "${cf_cv_xopen_source+set}" = set; then
7015   echo $ECHO_N "(cached) $ECHO_C" >&6
7016 else
7017
7018         cat >conftest.$ac_ext <<_ACEOF
7019 #line 7019 "configure"
7020 #include "confdefs.h"
7021 #include <sys/types.h>
7022 int
7023 main ()
7024 {
7025
7026 #ifndef _XOPEN_SOURCE
7027 make an error
7028 #endif
7029   ;
7030   return 0;
7031 }
7032 _ACEOF
7033 rm -f conftest.$ac_objext
7034 if { (eval echo "$as_me:7034: \"$ac_compile\"") >&5
7035   (eval $ac_compile) 2>&5
7036   ac_status=$?
7037   echo "$as_me:7037: \$? = $ac_status" >&5
7038   (exit $ac_status); } &&
7039          { ac_try='test -s conftest.$ac_objext'
7040   { (eval echo "$as_me:7040: \"$ac_try\"") >&5
7041   (eval $ac_try) 2>&5
7042   ac_status=$?
7043   echo "$as_me:7043: \$? = $ac_status" >&5
7044   (exit $ac_status); }; }; then
7045   cf_cv_xopen_source=no
7046 else
7047   echo "$as_me: failed program was:" >&5
7048 cat conftest.$ac_ext >&5
7049 cf_save="$CPPFLAGS"
7050          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7051          cat >conftest.$ac_ext <<_ACEOF
7052 #line 7052 "configure"
7053 #include "confdefs.h"
7054 #include <sys/types.h>
7055 int
7056 main ()
7057 {
7058
7059 #ifdef _XOPEN_SOURCE
7060 make an error
7061 #endif
7062   ;
7063   return 0;
7064 }
7065 _ACEOF
7066 rm -f conftest.$ac_objext
7067 if { (eval echo "$as_me:7067: \"$ac_compile\"") >&5
7068   (eval $ac_compile) 2>&5
7069   ac_status=$?
7070   echo "$as_me:7070: \$? = $ac_status" >&5
7071   (exit $ac_status); } &&
7072          { ac_try='test -s conftest.$ac_objext'
7073   { (eval echo "$as_me:7073: \"$ac_try\"") >&5
7074   (eval $ac_try) 2>&5
7075   ac_status=$?
7076   echo "$as_me:7076: \$? = $ac_status" >&5
7077   (exit $ac_status); }; }; then
7078   cf_cv_xopen_source=no
7079 else
7080   echo "$as_me: failed program was:" >&5
7081 cat conftest.$ac_ext >&5
7082 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7083 fi
7084 rm -f conftest.$ac_objext conftest.$ac_ext
7085         CPPFLAGS="$cf_save"
7086
7087 fi
7088 rm -f conftest.$ac_objext conftest.$ac_ext
7089
7090 fi
7091 echo "$as_me:7091: result: $cf_cv_xopen_source" >&5
7092 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7093         if test "$cf_cv_xopen_source" != no ; then
7094
7095 CFLAGS=`echo "$CFLAGS" | \
7096         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7097                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7098
7099 CPPFLAGS=`echo "$CPPFLAGS" | \
7100         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7101                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7102
7103                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7104
7105 cf_fix_cppflags=no
7106 cf_new_cflags=
7107 cf_new_cppflags=
7108 cf_new_extra_cppflags=
7109
7110 for cf_add_cflags in $cf_temp_xopen_source
7111 do
7112 case $cf_fix_cppflags in
7113 no)
7114         case $cf_add_cflags in #(vi
7115         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7116                 case $cf_add_cflags in
7117                 -D*)
7118                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7119
7120                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7121                                 && test -z "${cf_tst_cflags}" \
7122                                 && cf_fix_cppflags=yes
7123
7124                         if test $cf_fix_cppflags = yes ; then
7125                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7126                                 continue
7127                         elif test "${cf_tst_cflags}" = "\"'" ; then
7128                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7129                                 continue
7130                         fi
7131                         ;;
7132                 esac
7133                 case "$CPPFLAGS" in
7134                 *$cf_add_cflags) #(vi
7135                         ;;
7136                 *) #(vi
7137                         case $cf_add_cflags in #(vi
7138                         -D*)
7139                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7140
7141 CPPFLAGS=`echo "$CPPFLAGS" | \
7142         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7143                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7144
7145                                 ;;
7146                         esac
7147                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7148                         ;;
7149                 esac
7150                 ;;
7151         *)
7152                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7153                 ;;
7154         esac
7155         ;;
7156 yes)
7157         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7158
7159         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7160
7161         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7162                 && test -z "${cf_tst_cflags}" \
7163                 && cf_fix_cppflags=no
7164         ;;
7165 esac
7166 done
7167
7168 if test -n "$cf_new_cflags" ; then
7169
7170         CFLAGS="$CFLAGS $cf_new_cflags"
7171 fi
7172
7173 if test -n "$cf_new_cppflags" ; then
7174
7175         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7176 fi
7177
7178 if test -n "$cf_new_extra_cppflags" ; then
7179
7180         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7181 fi
7182
7183         fi
7184
7185 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7186
7187 cf_save_CFLAGS="$CFLAGS"
7188 cf_save_CPPFLAGS="$CPPFLAGS"
7189
7190 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7191         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7192                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7193
7194 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7195         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7196                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7197
7198 echo "$as_me:7198: checking if we should define _POSIX_C_SOURCE" >&5
7199 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7200 if test "${cf_cv_posix_c_source+set}" = set; then
7201   echo $ECHO_N "(cached) $ECHO_C" >&6
7202 else
7203
7204 echo "${as_me-configure}:7204: testing if the symbol is already defined go no further ..." 1>&5
7205
7206         cat >conftest.$ac_ext <<_ACEOF
7207 #line 7207 "configure"
7208 #include "confdefs.h"
7209 #include <sys/types.h>
7210 int
7211 main ()
7212 {
7213
7214 #ifndef _POSIX_C_SOURCE
7215 make an error
7216 #endif
7217   ;
7218   return 0;
7219 }
7220 _ACEOF
7221 rm -f conftest.$ac_objext
7222 if { (eval echo "$as_me:7222: \"$ac_compile\"") >&5
7223   (eval $ac_compile) 2>&5
7224   ac_status=$?
7225   echo "$as_me:7225: \$? = $ac_status" >&5
7226   (exit $ac_status); } &&
7227          { ac_try='test -s conftest.$ac_objext'
7228   { (eval echo "$as_me:7228: \"$ac_try\"") >&5
7229   (eval $ac_try) 2>&5
7230   ac_status=$?
7231   echo "$as_me:7231: \$? = $ac_status" >&5
7232   (exit $ac_status); }; }; then
7233   cf_cv_posix_c_source=no
7234 else
7235   echo "$as_me: failed program was:" >&5
7236 cat conftest.$ac_ext >&5
7237 cf_want_posix_source=no
7238          case .$cf_POSIX_C_SOURCE in #(vi
7239          .[12]??*) #(vi
7240                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7241                 ;;
7242          .2) #(vi
7243                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7244                 cf_want_posix_source=yes
7245                 ;;
7246          .*)
7247                 cf_want_posix_source=yes
7248                 ;;
7249          esac
7250          if test "$cf_want_posix_source" = yes ; then
7251                 cat >conftest.$ac_ext <<_ACEOF
7252 #line 7252 "configure"
7253 #include "confdefs.h"
7254 #include <sys/types.h>
7255 int
7256 main ()
7257 {
7258
7259 #ifdef _POSIX_SOURCE
7260 make an error
7261 #endif
7262   ;
7263   return 0;
7264 }
7265 _ACEOF
7266 rm -f conftest.$ac_objext
7267 if { (eval echo "$as_me:7267: \"$ac_compile\"") >&5
7268   (eval $ac_compile) 2>&5
7269   ac_status=$?
7270   echo "$as_me:7270: \$? = $ac_status" >&5
7271   (exit $ac_status); } &&
7272          { ac_try='test -s conftest.$ac_objext'
7273   { (eval echo "$as_me:7273: \"$ac_try\"") >&5
7274   (eval $ac_try) 2>&5
7275   ac_status=$?
7276   echo "$as_me:7276: \$? = $ac_status" >&5
7277   (exit $ac_status); }; }; then
7278   :
7279 else
7280   echo "$as_me: failed program was:" >&5
7281 cat conftest.$ac_ext >&5
7282 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7283 fi
7284 rm -f conftest.$ac_objext conftest.$ac_ext
7285          fi
7286
7287 echo "${as_me-configure}:7287: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7288
7289          CFLAGS="$cf_trim_CFLAGS"
7290          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7291
7292 echo "${as_me-configure}:7292: testing if the second compile does not leave our definition intact error ..." 1>&5
7293
7294          cat >conftest.$ac_ext <<_ACEOF
7295 #line 7295 "configure"
7296 #include "confdefs.h"
7297 #include <sys/types.h>
7298 int
7299 main ()
7300 {
7301
7302 #ifndef _POSIX_C_SOURCE
7303 make an error
7304 #endif
7305   ;
7306   return 0;
7307 }
7308 _ACEOF
7309 rm -f conftest.$ac_objext
7310 if { (eval echo "$as_me:7310: \"$ac_compile\"") >&5
7311   (eval $ac_compile) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); } &&
7315          { ac_try='test -s conftest.$ac_objext'
7316   { (eval echo "$as_me:7316: \"$ac_try\"") >&5
7317   (eval $ac_try) 2>&5
7318   ac_status=$?
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); }; }; then
7321   :
7322 else
7323   echo "$as_me: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325 cf_cv_posix_c_source=no
7326 fi
7327 rm -f conftest.$ac_objext conftest.$ac_ext
7328          CFLAGS="$cf_save_CFLAGS"
7329          CPPFLAGS="$cf_save_CPPFLAGS"
7330
7331 fi
7332 rm -f conftest.$ac_objext conftest.$ac_ext
7333
7334 fi
7335 echo "$as_me:7335: result: $cf_cv_posix_c_source" >&5
7336 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7337
7338 if test "$cf_cv_posix_c_source" != no ; then
7339         CFLAGS="$cf_trim_CFLAGS"
7340         CPPFLAGS="$cf_trim_CPPFLAGS"
7341
7342 cf_fix_cppflags=no
7343 cf_new_cflags=
7344 cf_new_cppflags=
7345 cf_new_extra_cppflags=
7346
7347 for cf_add_cflags in $cf_cv_posix_c_source
7348 do
7349 case $cf_fix_cppflags in
7350 no)
7351         case $cf_add_cflags in #(vi
7352         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7353                 case $cf_add_cflags in
7354                 -D*)
7355                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7356
7357                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7358                                 && test -z "${cf_tst_cflags}" \
7359                                 && cf_fix_cppflags=yes
7360
7361                         if test $cf_fix_cppflags = yes ; then
7362                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7363                                 continue
7364                         elif test "${cf_tst_cflags}" = "\"'" ; then
7365                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7366                                 continue
7367                         fi
7368                         ;;
7369                 esac
7370                 case "$CPPFLAGS" in
7371                 *$cf_add_cflags) #(vi
7372                         ;;
7373                 *) #(vi
7374                         case $cf_add_cflags in #(vi
7375                         -D*)
7376                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7377
7378 CPPFLAGS=`echo "$CPPFLAGS" | \
7379         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7380                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7381
7382                                 ;;
7383                         esac
7384                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7385                         ;;
7386                 esac
7387                 ;;
7388         *)
7389                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7390                 ;;
7391         esac
7392         ;;
7393 yes)
7394         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7395
7396         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7397
7398         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7399                 && test -z "${cf_tst_cflags}" \
7400                 && cf_fix_cppflags=no
7401         ;;
7402 esac
7403 done
7404
7405 if test -n "$cf_new_cflags" ; then
7406
7407         CFLAGS="$CFLAGS $cf_new_cflags"
7408 fi
7409
7410 if test -n "$cf_new_cppflags" ; then
7411
7412         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7413 fi
7414
7415 if test -n "$cf_new_extra_cppflags" ; then
7416
7417         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7418 fi
7419
7420 fi
7421
7422         ;;
7423 esac
7424
7425 if test -n "$cf_xopen_source" ; then
7426
7427 cf_fix_cppflags=no
7428 cf_new_cflags=
7429 cf_new_cppflags=
7430 cf_new_extra_cppflags=
7431
7432 for cf_add_cflags in $cf_xopen_source
7433 do
7434 case $cf_fix_cppflags in
7435 no)
7436         case $cf_add_cflags in #(vi
7437         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7438                 case $cf_add_cflags in
7439                 -D*)
7440                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7441
7442                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7443                                 && test -z "${cf_tst_cflags}" \
7444                                 && cf_fix_cppflags=yes
7445
7446                         if test $cf_fix_cppflags = yes ; then
7447                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7448                                 continue
7449                         elif test "${cf_tst_cflags}" = "\"'" ; then
7450                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7451                                 continue
7452                         fi
7453                         ;;
7454                 esac
7455                 case "$CPPFLAGS" in
7456                 *$cf_add_cflags) #(vi
7457                         ;;
7458                 *) #(vi
7459                         case $cf_add_cflags in #(vi
7460                         -D*)
7461                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7462
7463 CPPFLAGS=`echo "$CPPFLAGS" | \
7464         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7465                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7466
7467                                 ;;
7468                         esac
7469                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7470                         ;;
7471                 esac
7472                 ;;
7473         *)
7474                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7475                 ;;
7476         esac
7477         ;;
7478 yes)
7479         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7480
7481         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7482
7483         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7484                 && test -z "${cf_tst_cflags}" \
7485                 && cf_fix_cppflags=no
7486         ;;
7487 esac
7488 done
7489
7490 if test -n "$cf_new_cflags" ; then
7491
7492         CFLAGS="$CFLAGS $cf_new_cflags"
7493 fi
7494
7495 if test -n "$cf_new_cppflags" ; then
7496
7497         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7498 fi
7499
7500 if test -n "$cf_new_extra_cppflags" ; then
7501
7502         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7503 fi
7504
7505 fi
7506
7507 # Work around breakage on OS X
7508
7509 echo "$as_me:7509: checking if SIGWINCH is defined" >&5
7510 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7511 if test "${cf_cv_define_sigwinch+set}" = set; then
7512   echo $ECHO_N "(cached) $ECHO_C" >&6
7513 else
7514
7515         cat >conftest.$ac_ext <<_ACEOF
7516 #line 7516 "configure"
7517 #include "confdefs.h"
7518
7519 #include <sys/types.h>
7520 #include <sys/signal.h>
7521
7522 int
7523 main ()
7524 {
7525 int x = SIGWINCH
7526   ;
7527   return 0;
7528 }
7529 _ACEOF
7530 rm -f conftest.$ac_objext
7531 if { (eval echo "$as_me:7531: \"$ac_compile\"") >&5
7532   (eval $ac_compile) 2>&5
7533   ac_status=$?
7534   echo "$as_me:7534: \$? = $ac_status" >&5
7535   (exit $ac_status); } &&
7536          { ac_try='test -s conftest.$ac_objext'
7537   { (eval echo "$as_me:7537: \"$ac_try\"") >&5
7538   (eval $ac_try) 2>&5
7539   ac_status=$?
7540   echo "$as_me:7540: \$? = $ac_status" >&5
7541   (exit $ac_status); }; }; then
7542   cf_cv_define_sigwinch=yes
7543 else
7544   echo "$as_me: failed program was:" >&5
7545 cat conftest.$ac_ext >&5
7546 cat >conftest.$ac_ext <<_ACEOF
7547 #line 7547 "configure"
7548 #include "confdefs.h"
7549
7550 #undef _XOPEN_SOURCE
7551 #undef _POSIX_SOURCE
7552 #undef _POSIX_C_SOURCE
7553 #include <sys/types.h>
7554 #include <sys/signal.h>
7555
7556 int
7557 main ()
7558 {
7559 int x = SIGWINCH
7560   ;
7561   return 0;
7562 }
7563 _ACEOF
7564 rm -f conftest.$ac_objext
7565 if { (eval echo "$as_me:7565: \"$ac_compile\"") >&5
7566   (eval $ac_compile) 2>&5
7567   ac_status=$?
7568   echo "$as_me:7568: \$? = $ac_status" >&5
7569   (exit $ac_status); } &&
7570          { ac_try='test -s conftest.$ac_objext'
7571   { (eval echo "$as_me:7571: \"$ac_try\"") >&5
7572   (eval $ac_try) 2>&5
7573   ac_status=$?
7574   echo "$as_me:7574: \$? = $ac_status" >&5
7575   (exit $ac_status); }; }; then
7576   cf_cv_define_sigwinch=maybe
7577 else
7578   echo "$as_me: failed program was:" >&5
7579 cat conftest.$ac_ext >&5
7580 cf_cv_define_sigwinch=no
7581 fi
7582 rm -f conftest.$ac_objext conftest.$ac_ext
7583
7584 fi
7585 rm -f conftest.$ac_objext conftest.$ac_ext
7586
7587 fi
7588 echo "$as_me:7588: result: $cf_cv_define_sigwinch" >&5
7589 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7590
7591 if test "$cf_cv_define_sigwinch" = maybe ; then
7592 echo "$as_me:7592: checking for actual SIGWINCH definition" >&5
7593 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7594 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7595   echo $ECHO_N "(cached) $ECHO_C" >&6
7596 else
7597
7598 cf_cv_fixup_sigwinch=unknown
7599 cf_sigwinch=32
7600 while test $cf_sigwinch != 1
7601 do
7602         cat >conftest.$ac_ext <<_ACEOF
7603 #line 7603 "configure"
7604 #include "confdefs.h"
7605
7606 #undef _XOPEN_SOURCE
7607 #undef _POSIX_SOURCE
7608 #undef _POSIX_C_SOURCE
7609 #include <sys/types.h>
7610 #include <sys/signal.h>
7611
7612 int
7613 main ()
7614 {
7615
7616 #if SIGWINCH != $cf_sigwinch
7617 make an error
7618 #endif
7619 int x = SIGWINCH
7620   ;
7621   return 0;
7622 }
7623 _ACEOF
7624 rm -f conftest.$ac_objext
7625 if { (eval echo "$as_me:7625: \"$ac_compile\"") >&5
7626   (eval $ac_compile) 2>&5
7627   ac_status=$?
7628   echo "$as_me:7628: \$? = $ac_status" >&5
7629   (exit $ac_status); } &&
7630          { ac_try='test -s conftest.$ac_objext'
7631   { (eval echo "$as_me:7631: \"$ac_try\"") >&5
7632   (eval $ac_try) 2>&5
7633   ac_status=$?
7634   echo "$as_me:7634: \$? = $ac_status" >&5
7635   (exit $ac_status); }; }; then
7636   cf_cv_fixup_sigwinch=$cf_sigwinch
7637          break
7638 else
7639   echo "$as_me: failed program was:" >&5
7640 cat conftest.$ac_ext >&5
7641 fi
7642 rm -f conftest.$ac_objext conftest.$ac_ext
7643
7644 cf_sigwinch=`expr $cf_sigwinch - 1`
7645 done
7646
7647 fi
7648 echo "$as_me:7648: result: $cf_cv_fixup_sigwinch" >&5
7649 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7650
7651         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7652                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7653         fi
7654 fi
7655
7656 # Checks for CODESET support.
7657
7658   echo "$as_me:7658: checking for nl_langinfo and CODESET" >&5
7659 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7660 if test "${am_cv_langinfo_codeset+set}" = set; then
7661   echo $ECHO_N "(cached) $ECHO_C" >&6
7662 else
7663   cat >conftest.$ac_ext <<_ACEOF
7664 #line 7664 "configure"
7665 #include "confdefs.h"
7666 #include <langinfo.h>
7667 int
7668 main ()
7669 {
7670 char* cs = nl_langinfo(CODESET);
7671   ;
7672   return 0;
7673 }
7674 _ACEOF
7675 rm -f conftest.$ac_objext conftest$ac_exeext
7676 if { (eval echo "$as_me:7676: \"$ac_link\"") >&5
7677   (eval $ac_link) 2>&5
7678   ac_status=$?
7679   echo "$as_me:7679: \$? = $ac_status" >&5
7680   (exit $ac_status); } &&
7681          { ac_try='test -s conftest$ac_exeext'
7682   { (eval echo "$as_me:7682: \"$ac_try\"") >&5
7683   (eval $ac_try) 2>&5
7684   ac_status=$?
7685   echo "$as_me:7685: \$? = $ac_status" >&5
7686   (exit $ac_status); }; }; then
7687   am_cv_langinfo_codeset=yes
7688 else
7689   echo "$as_me: failed program was:" >&5
7690 cat conftest.$ac_ext >&5
7691 am_cv_langinfo_codeset=no
7692 fi
7693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7694
7695 fi
7696 echo "$as_me:7696: result: $am_cv_langinfo_codeset" >&5
7697 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7698   if test $am_cv_langinfo_codeset = yes; then
7699
7700 cat >>confdefs.h <<\EOF
7701 #define HAVE_LANGINFO_CODESET 1
7702 EOF
7703
7704   fi
7705
7706 # use these variables to work around a defect in gcc's fixincludes.
7707 NCURSES_OK_WCHAR_T=
7708 NCURSES_OK_WINT_T=
7709
7710 echo "$as_me:7710: checking if you want wide-character code" >&5
7711 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7712
7713 # Check whether --enable-widec or --disable-widec was given.
7714 if test "${enable_widec+set}" = set; then
7715   enableval="$enable_widec"
7716   with_widec=$enableval
7717 else
7718   with_widec=no
7719 fi;
7720 echo "$as_me:7720: result: $with_widec" >&5
7721 echo "${ECHO_T}$with_widec" >&6
7722 if test "$with_widec" = yes ; then
7723         LIB_SUFFIX="w${LIB_SUFFIX}"
7724         cat >>confdefs.h <<\EOF
7725 #define USE_WIDEC_SUPPORT 1
7726 EOF
7727
7728         case "$CFLAGS $CPPFLAGS" in #(vi
7729         *-D_XOPEN_SOURCE=500) #(vi
7730                 ;;
7731         *)
7732
7733 echo "$as_me:7733: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7734 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7735 cat >conftest.$ac_ext <<_ACEOF
7736 #line 7736 "configure"
7737 #include "confdefs.h"
7738 #include <sys/types.h>
7739
7740 int
7741 main ()
7742 {
7743
7744 #ifndef _XOPEN_SOURCE_EXTENDED
7745 make an error
7746 #endif
7747   ;
7748   return 0;
7749 }
7750 _ACEOF
7751 rm -f conftest.$ac_objext
7752 if { (eval echo "$as_me:7752: \"$ac_compile\"") >&5
7753   (eval $ac_compile) 2>&5
7754   ac_status=$?
7755   echo "$as_me:7755: \$? = $ac_status" >&5
7756   (exit $ac_status); } &&
7757          { ac_try='test -s conftest.$ac_objext'
7758   { (eval echo "$as_me:7758: \"$ac_try\"") >&5
7759   (eval $ac_try) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit $ac_status); }; }; then
7763   cf_result=no
7764 else
7765   echo "$as_me: failed program was:" >&5
7766 cat conftest.$ac_ext >&5
7767 cf_result=yes
7768 fi
7769 rm -f conftest.$ac_objext conftest.$ac_ext
7770 echo "$as_me:7770: result: $cf_result" >&5
7771 echo "${ECHO_T}$cf_result" >&6
7772
7773 if test "$cf_result" = yes ; then
7774         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7775 elif test "x" != "x" ; then
7776         echo "$as_me:7776: checking checking for compatible value versus " >&5
7777 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7778         cat >conftest.$ac_ext <<_ACEOF
7779 #line 7779 "configure"
7780 #include "confdefs.h"
7781 #include <sys/types.h>
7782
7783 int
7784 main ()
7785 {
7786
7787 #if _XOPEN_SOURCE_EXTENDED- < 0
7788 make an error
7789 #endif
7790   ;
7791   return 0;
7792 }
7793 _ACEOF
7794 rm -f conftest.$ac_objext
7795 if { (eval echo "$as_me:7795: \"$ac_compile\"") >&5
7796   (eval $ac_compile) 2>&5
7797   ac_status=$?
7798   echo "$as_me:7798: \$? = $ac_status" >&5
7799   (exit $ac_status); } &&
7800          { ac_try='test -s conftest.$ac_objext'
7801   { (eval echo "$as_me:7801: \"$ac_try\"") >&5
7802   (eval $ac_try) 2>&5
7803   ac_status=$?
7804   echo "$as_me:7804: \$? = $ac_status" >&5
7805   (exit $ac_status); }; }; then
7806   cf_result=yes
7807 else
7808   echo "$as_me: failed program was:" >&5
7809 cat conftest.$ac_ext >&5
7810 cf_result=no
7811 fi
7812 rm -f conftest.$ac_objext conftest.$ac_ext
7813         echo "$as_me:7813: result: $cf_result" >&5
7814 echo "${ECHO_T}$cf_result" >&6
7815         if test "$cf_result" = no ; then
7816                 # perhaps we can override it - try...
7817                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7818         fi
7819 fi
7820
7821                 ;;
7822         esac
7823
7824         # with_overwrite=no
7825         NCURSES_CH_T=cchar_t
7826
7827 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7828 do
7829 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7830 echo "$as_me:7830: checking for $ac_func" >&5
7831 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7832 if eval "test \"\${$as_ac_var+set}\" = set"; then
7833   echo $ECHO_N "(cached) $ECHO_C" >&6
7834 else
7835   cat >conftest.$ac_ext <<_ACEOF
7836 #line 7836 "configure"
7837 #include "confdefs.h"
7838 /* System header to define __stub macros and hopefully few prototypes,
7839     which can conflict with char $ac_func (); below.  */
7840 #include <assert.h>
7841 /* Override any gcc2 internal prototype to avoid an error.  */
7842 #ifdef __cplusplus
7843 extern "C"
7844 #endif
7845 /* We use char because int might match the return type of a gcc2
7846    builtin and then its argument prototype would still apply.  */
7847 char $ac_func ();
7848 char (*f) ();
7849
7850 int
7851 main ()
7852 {
7853 /* The GNU C library defines this for functions which it implements
7854     to always fail with ENOSYS.  Some functions are actually named
7855     something starting with __ and the normal name is an alias.  */
7856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7857 choke me
7858 #else
7859 f = $ac_func;
7860 #endif
7861
7862   ;
7863   return 0;
7864 }
7865 _ACEOF
7866 rm -f conftest.$ac_objext conftest$ac_exeext
7867 if { (eval echo "$as_me:7867: \"$ac_link\"") >&5
7868   (eval $ac_link) 2>&5
7869   ac_status=$?
7870   echo "$as_me:7870: \$? = $ac_status" >&5
7871   (exit $ac_status); } &&
7872          { ac_try='test -s conftest$ac_exeext'
7873   { (eval echo "$as_me:7873: \"$ac_try\"") >&5
7874   (eval $ac_try) 2>&5
7875   ac_status=$?
7876   echo "$as_me:7876: \$? = $ac_status" >&5
7877   (exit $ac_status); }; }; then
7878   eval "$as_ac_var=yes"
7879 else
7880   echo "$as_me: failed program was:" >&5
7881 cat conftest.$ac_ext >&5
7882 eval "$as_ac_var=no"
7883 fi
7884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7885 fi
7886 echo "$as_me:7886: result: `eval echo '${'$as_ac_var'}'`" >&5
7887 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7888 if test `eval echo '${'$as_ac_var'}'` = yes; then
7889   cat >>confdefs.h <<EOF
7890 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7891 EOF
7892
7893 fi
7894 done
7895
7896         if test "$ac_cv_func_putwc" != yes ; then
7897
7898 echo "$as_me:7898: checking for multibyte character support" >&5
7899 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7900 if test "${cf_cv_utf8_lib+set}" = set; then
7901   echo $ECHO_N "(cached) $ECHO_C" >&6
7902 else
7903
7904         cf_save_LIBS="$LIBS"
7905         cat >conftest.$ac_ext <<_ACEOF
7906 #line 7906 "configure"
7907 #include "confdefs.h"
7908
7909 #include <stdlib.h>
7910 int
7911 main ()
7912 {
7913 putwc(0,0);
7914   ;
7915   return 0;
7916 }
7917 _ACEOF
7918 rm -f conftest.$ac_objext conftest$ac_exeext
7919 if { (eval echo "$as_me:7919: \"$ac_link\"") >&5
7920   (eval $ac_link) 2>&5
7921   ac_status=$?
7922   echo "$as_me:7922: \$? = $ac_status" >&5
7923   (exit $ac_status); } &&
7924          { ac_try='test -s conftest$ac_exeext'
7925   { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7926   (eval $ac_try) 2>&5
7927   ac_status=$?
7928   echo "$as_me:7928: \$? = $ac_status" >&5
7929   (exit $ac_status); }; }; then
7930   cf_cv_utf8_lib=yes
7931 else
7932   echo "$as_me: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7934
7935 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7936 # will be set on completion of the AC_TRY_LINK below.
7937 cf_cv_header_path_utf8=
7938 cf_cv_library_path_utf8=
7939
7940 echo "${as_me-configure}:7940: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7941
7942 cf_save_LIBS="$LIBS"
7943
7944 cat >conftest.$ac_ext <<_ACEOF
7945 #line 7945 "configure"
7946 #include "confdefs.h"
7947
7948 #include <libutf8.h>
7949 int
7950 main ()
7951 {
7952 putwc(0,0);
7953   ;
7954   return 0;
7955 }
7956 _ACEOF
7957 rm -f conftest.$ac_objext conftest$ac_exeext
7958 if { (eval echo "$as_me:7958: \"$ac_link\"") >&5
7959   (eval $ac_link) 2>&5
7960   ac_status=$?
7961   echo "$as_me:7961: \$? = $ac_status" >&5
7962   (exit $ac_status); } &&
7963          { ac_try='test -s conftest$ac_exeext'
7964   { (eval echo "$as_me:7964: \"$ac_try\"") >&5
7965   (eval $ac_try) 2>&5
7966   ac_status=$?
7967   echo "$as_me:7967: \$? = $ac_status" >&5
7968   (exit $ac_status); }; }; then
7969
7970         cf_cv_find_linkage_utf8=yes
7971         cf_cv_header_path_utf8=/usr/include
7972         cf_cv_library_path_utf8=/usr/lib
7973
7974 else
7975   echo "$as_me: failed program was:" >&5
7976 cat conftest.$ac_ext >&5
7977
7978 LIBS="-lutf8  $cf_save_LIBS"
7979
7980 cat >conftest.$ac_ext <<_ACEOF
7981 #line 7981 "configure"
7982 #include "confdefs.h"
7983
7984 #include <libutf8.h>
7985 int
7986 main ()
7987 {
7988 putwc(0,0);
7989   ;
7990   return 0;
7991 }
7992 _ACEOF
7993 rm -f conftest.$ac_objext conftest$ac_exeext
7994 if { (eval echo "$as_me:7994: \"$ac_link\"") >&5
7995   (eval $ac_link) 2>&5
7996   ac_status=$?
7997   echo "$as_me:7997: \$? = $ac_status" >&5
7998   (exit $ac_status); } &&
7999          { ac_try='test -s conftest$ac_exeext'
8000   { (eval echo "$as_me:8000: \"$ac_try\"") >&5
8001   (eval $ac_try) 2>&5
8002   ac_status=$?
8003   echo "$as_me:8003: \$? = $ac_status" >&5
8004   (exit $ac_status); }; }; then
8005
8006         cf_cv_find_linkage_utf8=yes
8007         cf_cv_header_path_utf8=/usr/include
8008         cf_cv_library_path_utf8=/usr/lib
8009         cf_cv_library_file_utf8="-lutf8"
8010
8011 else
8012   echo "$as_me: failed program was:" >&5
8013 cat conftest.$ac_ext >&5
8014
8015         cf_cv_find_linkage_utf8=no
8016         LIBS="$cf_save_LIBS"
8017
8018     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8019
8020 echo "${as_me-configure}:8020: testing find linkage for utf8 library ..." 1>&5
8021
8022 echo "${as_me-configure}:8022: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8023
8024     cf_save_CPPFLAGS="$CPPFLAGS"
8025     cf_test_CPPFLAGS="$CPPFLAGS"
8026
8027 cf_search=
8028
8029 # collect the current set of include-directories from compiler flags
8030 cf_header_path_list=""
8031 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8032         for cf_header_path in $CPPFLAGS $CFLAGS
8033         do
8034                 case $cf_header_path in #(vi
8035                 -I*)
8036                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8037
8038 test "$cf_header_path" != "NONE" && \
8039 test -d "$cf_header_path" && \
8040  {
8041         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8042         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8043         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8044         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8045         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8046         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8047 }
8048
8049                         cf_header_path_list="$cf_header_path_list $cf_search"
8050                         ;;
8051                 esac
8052         done
8053 fi
8054
8055 # add the variations for the package we are looking for
8056
8057 cf_search=
8058
8059 test "/usr" != "$prefix" && \
8060 test -d "/usr" && \
8061 (test $prefix = NONE || test "/usr" != "$prefix") && {
8062         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8063         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8064         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8065         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8066         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8067         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8068 }
8069
8070 test "$prefix" != "NONE" && \
8071 test -d "$prefix" && \
8072  {
8073         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8074         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8075         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8076         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8077         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8078         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8079 }
8080
8081 test "/usr/local" != "$prefix" && \
8082 test -d "/usr/local" && \
8083 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8084         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8085         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8086         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8087         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8088         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8089         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8090 }
8091
8092 test "/opt" != "$prefix" && \
8093 test -d "/opt" && \
8094 (test $prefix = NONE || test "/opt" != "$prefix") && {
8095         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8096         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8097         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8098         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8099         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8100         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8101 }
8102
8103 test "$HOME" != "$prefix" && \
8104 test -d "$HOME" && \
8105 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8106         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8107         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8108         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8109         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8110         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8111         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8112 }
8113
8114 test "$includedir" != NONE && \
8115 test "$includedir" != "/usr/include" && \
8116 test -d "$includedir" && {
8117         test -d $includedir &&    cf_search="$cf_search $includedir"
8118         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8119 }
8120
8121 test "$oldincludedir" != NONE && \
8122 test "$oldincludedir" != "/usr/include" && \
8123 test -d "$oldincludedir" && {
8124         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8125         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8126 }
8127
8128 cf_search="$cf_search $cf_header_path_list"
8129
8130     for cf_cv_header_path_utf8 in $cf_search
8131     do
8132       if test -d $cf_cv_header_path_utf8 ; then
8133         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8134
8135 echo "${as_me-configure}:8135: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8136
8137         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8138         cat >conftest.$ac_ext <<_ACEOF
8139 #line 8139 "configure"
8140 #include "confdefs.h"
8141
8142 #include <libutf8.h>
8143 int
8144 main ()
8145 {
8146 putwc(0,0);
8147   ;
8148   return 0;
8149 }
8150 _ACEOF
8151 rm -f conftest.$ac_objext
8152 if { (eval echo "$as_me:8152: \"$ac_compile\"") >&5
8153   (eval $ac_compile) 2>&5
8154   ac_status=$?
8155   echo "$as_me:8155: \$? = $ac_status" >&5
8156   (exit $ac_status); } &&
8157          { ac_try='test -s conftest.$ac_objext'
8158   { (eval echo "$as_me:8158: \"$ac_try\"") >&5
8159   (eval $ac_try) 2>&5
8160   ac_status=$?
8161   echo "$as_me:8161: \$? = $ac_status" >&5
8162   (exit $ac_status); }; }; then
8163
8164             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8165
8166 echo "${as_me-configure}:8166: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8167
8168             cf_cv_find_linkage_utf8=maybe
8169             cf_test_CPPFLAGS="$CPPFLAGS"
8170             break
8171 else
8172   echo "$as_me: failed program was:" >&5
8173 cat conftest.$ac_ext >&5
8174
8175             CPPFLAGS="$cf_save_CPPFLAGS"
8176
8177 fi
8178 rm -f conftest.$ac_objext conftest.$ac_ext
8179       fi
8180     done
8181
8182     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8183
8184 echo "${as_me-configure}:8184: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8185
8186       cf_save_LIBS="$LIBS"
8187       cf_save_LDFLAGS="$LDFLAGS"
8188
8189       if test "$cf_cv_find_linkage_utf8" != yes ; then
8190
8191 cf_search=
8192 cf_library_path_list=""
8193 if test -n "${LDFLAGS}${LIBS}" ; then
8194         for cf_library_path in $LDFLAGS $LIBS
8195         do
8196                 case $cf_library_path in #(vi
8197                 -L*)
8198                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8199
8200 test "$cf_library_path" != "NONE" && \
8201 test -d "$cf_library_path" && \
8202  {
8203         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8204         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8205         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8206         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8207         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8208         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8209 }
8210
8211                         cf_library_path_list="$cf_library_path_list $cf_search"
8212                         ;;
8213                 esac
8214         done
8215 fi
8216
8217 cf_search=
8218
8219 test "/usr" != "$prefix" && \
8220 test -d "/usr" && \
8221 (test $prefix = NONE || test "/usr" != "$prefix") && {
8222         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8223         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8224         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8225         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8226         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8227         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8228 }
8229
8230 test "$prefix" != "NONE" && \
8231 test -d "$prefix" && \
8232  {
8233         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8234         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8235         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8236         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8237         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8238         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8239 }
8240
8241 test "/usr/local" != "$prefix" && \
8242 test -d "/usr/local" && \
8243 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8244         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8245         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8246         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8247         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8248         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8249         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8250 }
8251
8252 test "/opt" != "$prefix" && \
8253 test -d "/opt" && \
8254 (test $prefix = NONE || test "/opt" != "$prefix") && {
8255         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8256         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8257         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8258         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8259         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8260         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8261 }
8262
8263 test "$HOME" != "$prefix" && \
8264 test -d "$HOME" && \
8265 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8266         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8267         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8268         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8269         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8270         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8271         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8272 }
8273
8274 cf_search="$cf_library_path_list $cf_search"
8275
8276         for cf_cv_library_path_utf8 in $cf_search
8277         do
8278           if test -d $cf_cv_library_path_utf8 ; then
8279             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8280
8281 echo "${as_me-configure}:8281: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8282
8283             CPPFLAGS="$cf_test_CPPFLAGS"
8284             LIBS="-lutf8  $cf_save_LIBS"
8285             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8286             cat >conftest.$ac_ext <<_ACEOF
8287 #line 8287 "configure"
8288 #include "confdefs.h"
8289
8290 #include <libutf8.h>
8291 int
8292 main ()
8293 {
8294 putwc(0,0);
8295   ;
8296   return 0;
8297 }
8298 _ACEOF
8299 rm -f conftest.$ac_objext conftest$ac_exeext
8300 if { (eval echo "$as_me:8300: \"$ac_link\"") >&5
8301   (eval $ac_link) 2>&5
8302   ac_status=$?
8303   echo "$as_me:8303: \$? = $ac_status" >&5
8304   (exit $ac_status); } &&
8305          { ac_try='test -s conftest$ac_exeext'
8306   { (eval echo "$as_me:8306: \"$ac_try\"") >&5
8307   (eval $ac_try) 2>&5
8308   ac_status=$?
8309   echo "$as_me:8309: \$? = $ac_status" >&5
8310   (exit $ac_status); }; }; then
8311
8312                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8313
8314 echo "${as_me-configure}:8314: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8315
8316                 cf_cv_find_linkage_utf8=yes
8317                 cf_cv_library_file_utf8="-lutf8"
8318                 break
8319 else
8320   echo "$as_me: failed program was:" >&5
8321 cat conftest.$ac_ext >&5
8322
8323                 CPPFLAGS="$cf_save_CPPFLAGS"
8324                 LIBS="$cf_save_LIBS"
8325                 LDFLAGS="$cf_save_LDFLAGS"
8326
8327 fi
8328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8329           fi
8330         done
8331         CPPFLAGS="$cf_save_CPPFLAGS"
8332         LDFLAGS="$cf_save_LDFLAGS"
8333       fi
8334
8335     else
8336       cf_cv_find_linkage_utf8=no
8337     fi
8338
8339 fi
8340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8341
8342 fi
8343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8344
8345 LIBS="$cf_save_LIBS"
8346
8347 if test "$cf_cv_find_linkage_utf8" = yes ; then
8348 cf_cv_utf8_lib=add-on
8349 else
8350 cf_cv_utf8_lib=no
8351 fi
8352
8353 fi
8354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8355 fi
8356 echo "$as_me:8356: result: $cf_cv_utf8_lib" >&5
8357 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8358
8359 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8360 # ncurses/ncursesw:
8361 if test "$cf_cv_utf8_lib" = "add-on" ; then
8362         cat >>confdefs.h <<\EOF
8363 #define HAVE_LIBUTF8_H 1
8364 EOF
8365
8366 if test -n "$cf_cv_header_path_utf8" ; then
8367   for cf_add_incdir in $cf_cv_header_path_utf8
8368   do
8369         while test $cf_add_incdir != /usr/include
8370         do
8371           if test -d $cf_add_incdir
8372           then
8373                 cf_have_incdir=no
8374                 if test -n "$CFLAGS$CPPFLAGS" ; then
8375                   # a loop is needed to ensure we can add subdirs of existing dirs
8376                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8377                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8378                           cf_have_incdir=yes; break
8379                         fi
8380                   done
8381                 fi
8382
8383                 if test "$cf_have_incdir" = no ; then
8384                   if test "$cf_add_incdir" = /usr/local/include ; then
8385                         if test "$GCC" = yes
8386                         then
8387                           cf_save_CPPFLAGS=$CPPFLAGS
8388                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8389                           cat >conftest.$ac_ext <<_ACEOF
8390 #line 8390 "configure"
8391 #include "confdefs.h"
8392 #include <stdio.h>
8393 int
8394 main ()
8395 {
8396 printf("Hello")
8397   ;
8398   return 0;
8399 }
8400 _ACEOF
8401 rm -f conftest.$ac_objext
8402 if { (eval echo "$as_me:8402: \"$ac_compile\"") >&5
8403   (eval $ac_compile) 2>&5
8404   ac_status=$?
8405   echo "$as_me:8405: \$? = $ac_status" >&5
8406   (exit $ac_status); } &&
8407          { ac_try='test -s conftest.$ac_objext'
8408   { (eval echo "$as_me:8408: \"$ac_try\"") >&5
8409   (eval $ac_try) 2>&5
8410   ac_status=$?
8411   echo "$as_me:8411: \$? = $ac_status" >&5
8412   (exit $ac_status); }; }; then
8413   :
8414 else
8415   echo "$as_me: failed program was:" >&5
8416 cat conftest.$ac_ext >&5
8417 cf_have_incdir=yes
8418 fi
8419 rm -f conftest.$ac_objext conftest.$ac_ext
8420                           CPPFLAGS=$cf_save_CPPFLAGS
8421                         fi
8422                   fi
8423                 fi
8424
8425                 if test "$cf_have_incdir" = no ; then
8426                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8427
8428 echo "${as_me-configure}:8428: testing adding $cf_add_incdir to include-path ..." 1>&5
8429
8430                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8431
8432                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8433                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8434                   cf_add_incdir="$cf_top_incdir"
8435                 else
8436                   break
8437                 fi
8438           fi
8439         done
8440   done
8441 fi
8442
8443 if test -n "$cf_cv_library_path_utf8" ; then
8444   for cf_add_libdir in $cf_cv_library_path_utf8
8445   do
8446     if test $cf_add_libdir = /usr/lib ; then
8447       :
8448     elif test -d $cf_add_libdir
8449     then
8450       cf_have_libdir=no
8451       if test -n "$LDFLAGS$LIBS" ; then
8452         # a loop is needed to ensure we can add subdirs of existing dirs
8453         for cf_test_libdir in $LDFLAGS $LIBS ; do
8454           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8455             cf_have_libdir=yes; break
8456           fi
8457         done
8458       fi
8459       if test "$cf_have_libdir" = no ; then
8460         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8461
8462 echo "${as_me-configure}:8462: testing adding $cf_add_libdir to library-path ..." 1>&5
8463
8464         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8465       fi
8466     fi
8467   done
8468 fi
8469
8470         LIBS="$cf_cv_library_file_utf8 $LIBS"
8471 fi
8472
8473                 if test "$cf_cv_utf8_lib" != no ; then
8474                         NCURSES_LIBUTF8=1
8475                 fi
8476         fi
8477
8478 # This is needed on Tru64 5.0 to declare mbstate_t
8479 echo "$as_me:8479: checking if we must include wchar.h to declare mbstate_t" >&5
8480 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8481 if test "${cf_cv_mbstate_t+set}" = set; then
8482   echo $ECHO_N "(cached) $ECHO_C" >&6
8483 else
8484
8485 cat >conftest.$ac_ext <<_ACEOF
8486 #line 8486 "configure"
8487 #include "confdefs.h"
8488
8489 #include <stdlib.h>
8490 #include <stdarg.h>
8491 #include <stdio.h>
8492 #ifdef HAVE_LIBUTF8_H
8493 #include <libutf8.h>
8494 #endif
8495 int
8496 main ()
8497 {
8498 mbstate_t state
8499   ;
8500   return 0;
8501 }
8502 _ACEOF
8503 rm -f conftest.$ac_objext
8504 if { (eval echo "$as_me:8504: \"$ac_compile\"") >&5
8505   (eval $ac_compile) 2>&5
8506   ac_status=$?
8507   echo "$as_me:8507: \$? = $ac_status" >&5
8508   (exit $ac_status); } &&
8509          { ac_try='test -s conftest.$ac_objext'
8510   { (eval echo "$as_me:8510: \"$ac_try\"") >&5
8511   (eval $ac_try) 2>&5
8512   ac_status=$?
8513   echo "$as_me:8513: \$? = $ac_status" >&5
8514   (exit $ac_status); }; }; then
8515   cf_cv_mbstate_t=no
8516 else
8517   echo "$as_me: failed program was:" >&5
8518 cat conftest.$ac_ext >&5
8519 cat >conftest.$ac_ext <<_ACEOF
8520 #line 8520 "configure"
8521 #include "confdefs.h"
8522
8523 #include <stdlib.h>
8524 #include <stdarg.h>
8525 #include <stdio.h>
8526 #include <wchar.h>
8527 #ifdef HAVE_LIBUTF8_H
8528 #include <libutf8.h>
8529 #endif
8530 int
8531 main ()
8532 {
8533 mbstate_t value
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 rm -f conftest.$ac_objext
8539 if { (eval echo "$as_me:8539: \"$ac_compile\"") >&5
8540   (eval $ac_compile) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); } &&
8544          { ac_try='test -s conftest.$ac_objext'
8545   { (eval echo "$as_me:8545: \"$ac_try\"") >&5
8546   (eval $ac_try) 2>&5
8547   ac_status=$?
8548   echo "$as_me:8548: \$? = $ac_status" >&5
8549   (exit $ac_status); }; }; then
8550   cf_cv_mbstate_t=yes
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 cat conftest.$ac_ext >&5
8554 cf_cv_mbstate_t=unknown
8555 fi
8556 rm -f conftest.$ac_objext conftest.$ac_ext
8557 fi
8558 rm -f conftest.$ac_objext conftest.$ac_ext
8559 fi
8560 echo "$as_me:8560: result: $cf_cv_mbstate_t" >&5
8561 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8562
8563 if test "$cf_cv_mbstate_t" = yes ; then
8564         cat >>confdefs.h <<\EOF
8565 #define NEED_WCHAR_H 1
8566 EOF
8567
8568         NEED_WCHAR_H=1
8569 fi
8570
8571 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8572 if test "$cf_cv_mbstate_t" = unknown ; then
8573         NCURSES_MBSTATE_T=1
8574 fi
8575
8576 # This is needed on Tru64 5.0 to declare wchar_t
8577 echo "$as_me:8577: checking if we must include wchar.h to declare wchar_t" >&5
8578 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8579 if test "${cf_cv_wchar_t+set}" = set; then
8580   echo $ECHO_N "(cached) $ECHO_C" >&6
8581 else
8582
8583 cat >conftest.$ac_ext <<_ACEOF
8584 #line 8584 "configure"
8585 #include "confdefs.h"
8586
8587 #include <stdlib.h>
8588 #include <stdarg.h>
8589 #include <stdio.h>
8590 #ifdef HAVE_LIBUTF8_H
8591 #include <libutf8.h>
8592 #endif
8593 int
8594 main ()
8595 {
8596 wchar_t state
8597   ;
8598   return 0;
8599 }
8600 _ACEOF
8601 rm -f conftest.$ac_objext
8602 if { (eval echo "$as_me:8602: \"$ac_compile\"") >&5
8603   (eval $ac_compile) 2>&5
8604   ac_status=$?
8605   echo "$as_me:8605: \$? = $ac_status" >&5
8606   (exit $ac_status); } &&
8607          { ac_try='test -s conftest.$ac_objext'
8608   { (eval echo "$as_me:8608: \"$ac_try\"") >&5
8609   (eval $ac_try) 2>&5
8610   ac_status=$?
8611   echo "$as_me:8611: \$? = $ac_status" >&5
8612   (exit $ac_status); }; }; then
8613   cf_cv_wchar_t=no
8614 else
8615   echo "$as_me: failed program was:" >&5
8616 cat conftest.$ac_ext >&5
8617 cat >conftest.$ac_ext <<_ACEOF
8618 #line 8618 "configure"
8619 #include "confdefs.h"
8620
8621 #include <stdlib.h>
8622 #include <stdarg.h>
8623 #include <stdio.h>
8624 #include <wchar.h>
8625 #ifdef HAVE_LIBUTF8_H
8626 #include <libutf8.h>
8627 #endif
8628 int
8629 main ()
8630 {
8631 wchar_t value
8632   ;
8633   return 0;
8634 }
8635 _ACEOF
8636 rm -f conftest.$ac_objext
8637 if { (eval echo "$as_me:8637: \"$ac_compile\"") >&5
8638   (eval $ac_compile) 2>&5
8639   ac_status=$?
8640   echo "$as_me:8640: \$? = $ac_status" >&5
8641   (exit $ac_status); } &&
8642          { ac_try='test -s conftest.$ac_objext'
8643   { (eval echo "$as_me:8643: \"$ac_try\"") >&5
8644   (eval $ac_try) 2>&5
8645   ac_status=$?
8646   echo "$as_me:8646: \$? = $ac_status" >&5
8647   (exit $ac_status); }; }; then
8648   cf_cv_wchar_t=yes
8649 else
8650   echo "$as_me: failed program was:" >&5
8651 cat conftest.$ac_ext >&5
8652 cf_cv_wchar_t=unknown
8653 fi
8654 rm -f conftest.$ac_objext conftest.$ac_ext
8655 fi
8656 rm -f conftest.$ac_objext conftest.$ac_ext
8657 fi
8658 echo "$as_me:8658: result: $cf_cv_wchar_t" >&5
8659 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8660
8661 if test "$cf_cv_wchar_t" = yes ; then
8662         cat >>confdefs.h <<\EOF
8663 #define NEED_WCHAR_H 1
8664 EOF
8665
8666         NEED_WCHAR_H=1
8667 fi
8668
8669 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8670 if test "$cf_cv_wchar_t" = unknown ; then
8671         NCURSES_WCHAR_T=1
8672 fi
8673
8674 # if we find wchar_t in either place, use substitution to provide a fallback.
8675 if test "$cf_cv_wchar_t" != unknown ; then
8676         NCURSES_OK_WCHAR_T=1
8677 fi
8678
8679 # This is needed on Tru64 5.0 to declare wint_t
8680 echo "$as_me:8680: checking if we must include wchar.h to declare wint_t" >&5
8681 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8682 if test "${cf_cv_wint_t+set}" = set; then
8683   echo $ECHO_N "(cached) $ECHO_C" >&6
8684 else
8685
8686 cat >conftest.$ac_ext <<_ACEOF
8687 #line 8687 "configure"
8688 #include "confdefs.h"
8689
8690 #include <stdlib.h>
8691 #include <stdarg.h>
8692 #include <stdio.h>
8693 #ifdef HAVE_LIBUTF8_H
8694 #include <libutf8.h>
8695 #endif
8696 int
8697 main ()
8698 {
8699 wint_t state
8700   ;
8701   return 0;
8702 }
8703 _ACEOF
8704 rm -f conftest.$ac_objext
8705 if { (eval echo "$as_me:8705: \"$ac_compile\"") >&5
8706   (eval $ac_compile) 2>&5
8707   ac_status=$?
8708   echo "$as_me:8708: \$? = $ac_status" >&5
8709   (exit $ac_status); } &&
8710          { ac_try='test -s conftest.$ac_objext'
8711   { (eval echo "$as_me:8711: \"$ac_try\"") >&5
8712   (eval $ac_try) 2>&5
8713   ac_status=$?
8714   echo "$as_me:8714: \$? = $ac_status" >&5
8715   (exit $ac_status); }; }; then
8716   cf_cv_wint_t=no
8717 else
8718   echo "$as_me: failed program was:" >&5
8719 cat conftest.$ac_ext >&5
8720 cat >conftest.$ac_ext <<_ACEOF
8721 #line 8721 "configure"
8722 #include "confdefs.h"
8723
8724 #include <stdlib.h>
8725 #include <stdarg.h>
8726 #include <stdio.h>
8727 #include <wchar.h>
8728 #ifdef HAVE_LIBUTF8_H
8729 #include <libutf8.h>
8730 #endif
8731 int
8732 main ()
8733 {
8734 wint_t value
8735   ;
8736   return 0;
8737 }
8738 _ACEOF
8739 rm -f conftest.$ac_objext
8740 if { (eval echo "$as_me:8740: \"$ac_compile\"") >&5
8741   (eval $ac_compile) 2>&5
8742   ac_status=$?
8743   echo "$as_me:8743: \$? = $ac_status" >&5
8744   (exit $ac_status); } &&
8745          { ac_try='test -s conftest.$ac_objext'
8746   { (eval echo "$as_me:8746: \"$ac_try\"") >&5
8747   (eval $ac_try) 2>&5
8748   ac_status=$?
8749   echo "$as_me:8749: \$? = $ac_status" >&5
8750   (exit $ac_status); }; }; then
8751   cf_cv_wint_t=yes
8752 else
8753   echo "$as_me: failed program was:" >&5
8754 cat conftest.$ac_ext >&5
8755 cf_cv_wint_t=unknown
8756 fi
8757 rm -f conftest.$ac_objext conftest.$ac_ext
8758 fi
8759 rm -f conftest.$ac_objext conftest.$ac_ext
8760 fi
8761 echo "$as_me:8761: result: $cf_cv_wint_t" >&5
8762 echo "${ECHO_T}$cf_cv_wint_t" >&6
8763
8764 if test "$cf_cv_wint_t" = yes ; then
8765         cat >>confdefs.h <<\EOF
8766 #define NEED_WCHAR_H 1
8767 EOF
8768
8769         NEED_WCHAR_H=1
8770 fi
8771
8772 # if we do not find wint_t in either place, use substitution to provide a fallback.
8773 if test "$cf_cv_wint_t" = unknown ; then
8774         NCURSES_WINT_T=1
8775 fi
8776
8777 # if we find wint_t in either place, use substitution to provide a fallback.
8778 if test "$cf_cv_wint_t" != unknown ; then
8779         NCURSES_OK_WINT_T=1
8780 fi
8781
8782         if test "$NCURSES_MBSTATE_T" != 0; then
8783                 cat >>confdefs.h <<\EOF
8784 #define NEED_MBSTATE_T_DEF 1
8785 EOF
8786
8787         fi
8788 fi
8789
8790 ###   use option --disable-lp64 to allow long chtype
8791 case $cf_cv_abi_version in
8792 [345]*)
8793         default_with_lp64=no
8794         ;;
8795 *)
8796         default_with_lp64=yes
8797         ;;
8798 esac
8799
8800 echo "$as_me:8800: checking whether to enable _LP64 definition in curses.h" >&5
8801 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8802
8803 # Check whether --enable-lp64 or --disable-lp64 was given.
8804 if test "${enable_lp64+set}" = set; then
8805   enableval="$enable_lp64"
8806   with_lp64=$enableval
8807 else
8808   with_lp64=$default_with_lp64
8809 fi;
8810 echo "$as_me:8810: result: $with_lp64" >&5
8811 echo "${ECHO_T}$with_lp64" >&6
8812
8813 if test "$with_lp64" = yes ; then
8814         cf_cv_enable_lp64=1
8815 else
8816         cf_cv_enable_lp64=0
8817 fi
8818
8819 # Check whether --enable-largefile or --disable-largefile was given.
8820 if test "${enable_largefile+set}" = set; then
8821   enableval="$enable_largefile"
8822
8823 fi;
8824 if test "$enable_largefile" != no; then
8825
8826   echo "$as_me:8826: checking for special C compiler options needed for large files" >&5
8827 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8828 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8829   echo $ECHO_N "(cached) $ECHO_C" >&6
8830 else
8831   ac_cv_sys_largefile_CC=no
8832      if test "$GCC" != yes; then
8833        ac_save_CC=$CC
8834        while :; do
8835          # IRIX 6.2 and later do not support large files by default,
8836          # so use the C compiler's -n32 option if that helps.
8837          cat >conftest.$ac_ext <<_ACEOF
8838 #line 8838 "configure"
8839 #include "confdefs.h"
8840 #include <sys/types.h>
8841  /* Check that off_t can represent 2**63 - 1 correctly.
8842     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8843     since some C++ compilers masquerading as C compilers
8844     incorrectly reject 9223372036854775807.  */
8845 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8846   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8847                        && LARGE_OFF_T % 2147483647 == 1)
8848                       ? 1 : -1];
8849 int
8850 main ()
8851 {
8852
8853   ;
8854   return 0;
8855 }
8856 _ACEOF
8857          rm -f conftest.$ac_objext
8858 if { (eval echo "$as_me:8858: \"$ac_compile\"") >&5
8859   (eval $ac_compile) 2>&5
8860   ac_status=$?
8861   echo "$as_me:8861: \$? = $ac_status" >&5
8862   (exit $ac_status); } &&
8863          { ac_try='test -s conftest.$ac_objext'
8864   { (eval echo "$as_me:8864: \"$ac_try\"") >&5
8865   (eval $ac_try) 2>&5
8866   ac_status=$?
8867   echo "$as_me:8867: \$? = $ac_status" >&5
8868   (exit $ac_status); }; }; then
8869   break
8870 else
8871   echo "$as_me: failed program was:" >&5
8872 cat conftest.$ac_ext >&5
8873 fi
8874 rm -f conftest.$ac_objext
8875          CC="$CC -n32"
8876          rm -f conftest.$ac_objext
8877 if { (eval echo "$as_me:8877: \"$ac_compile\"") >&5
8878   (eval $ac_compile) 2>&5
8879   ac_status=$?
8880   echo "$as_me:8880: \$? = $ac_status" >&5
8881   (exit $ac_status); } &&
8882          { ac_try='test -s conftest.$ac_objext'
8883   { (eval echo "$as_me:8883: \"$ac_try\"") >&5
8884   (eval $ac_try) 2>&5
8885   ac_status=$?
8886   echo "$as_me:8886: \$? = $ac_status" >&5
8887   (exit $ac_status); }; }; then
8888   ac_cv_sys_largefile_CC=' -n32'; break
8889 else
8890   echo "$as_me: failed program was:" >&5
8891 cat conftest.$ac_ext >&5
8892 fi
8893 rm -f conftest.$ac_objext
8894          break
8895        done
8896        CC=$ac_save_CC
8897        rm -f conftest.$ac_ext
8898     fi
8899 fi
8900 echo "$as_me:8900: result: $ac_cv_sys_largefile_CC" >&5
8901 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8902   if test "$ac_cv_sys_largefile_CC" != no; then
8903     CC=$CC$ac_cv_sys_largefile_CC
8904   fi
8905
8906   echo "$as_me:8906: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8907 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8908 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8909   echo $ECHO_N "(cached) $ECHO_C" >&6
8910 else
8911   while :; do
8912   ac_cv_sys_file_offset_bits=no
8913   cat >conftest.$ac_ext <<_ACEOF
8914 #line 8914 "configure"
8915 #include "confdefs.h"
8916 #include <sys/types.h>
8917  /* Check that off_t can represent 2**63 - 1 correctly.
8918     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8919     since some C++ compilers masquerading as C compilers
8920     incorrectly reject 9223372036854775807.  */
8921 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8922   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8923                        && LARGE_OFF_T % 2147483647 == 1)
8924                       ? 1 : -1];
8925 int
8926 main ()
8927 {
8928
8929   ;
8930   return 0;
8931 }
8932 _ACEOF
8933 rm -f conftest.$ac_objext
8934 if { (eval echo "$as_me:8934: \"$ac_compile\"") >&5
8935   (eval $ac_compile) 2>&5
8936   ac_status=$?
8937   echo "$as_me:8937: \$? = $ac_status" >&5
8938   (exit $ac_status); } &&
8939          { ac_try='test -s conftest.$ac_objext'
8940   { (eval echo "$as_me:8940: \"$ac_try\"") >&5
8941   (eval $ac_try) 2>&5
8942   ac_status=$?
8943   echo "$as_me:8943: \$? = $ac_status" >&5
8944   (exit $ac_status); }; }; then
8945   break
8946 else
8947   echo "$as_me: failed program was:" >&5
8948 cat conftest.$ac_ext >&5
8949 fi
8950 rm -f conftest.$ac_objext conftest.$ac_ext
8951   cat >conftest.$ac_ext <<_ACEOF
8952 #line 8952 "configure"
8953 #include "confdefs.h"
8954 #define _FILE_OFFSET_BITS 64
8955 #include <sys/types.h>
8956  /* Check that off_t can represent 2**63 - 1 correctly.
8957     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8958     since some C++ compilers masquerading as C compilers
8959     incorrectly reject 9223372036854775807.  */
8960 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8961   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8962                        && LARGE_OFF_T % 2147483647 == 1)
8963                       ? 1 : -1];
8964 int
8965 main ()
8966 {
8967
8968   ;
8969   return 0;
8970 }
8971 _ACEOF
8972 rm -f conftest.$ac_objext
8973 if { (eval echo "$as_me:8973: \"$ac_compile\"") >&5
8974   (eval $ac_compile) 2>&5
8975   ac_status=$?
8976   echo "$as_me:8976: \$? = $ac_status" >&5
8977   (exit $ac_status); } &&
8978          { ac_try='test -s conftest.$ac_objext'
8979   { (eval echo "$as_me:8979: \"$ac_try\"") >&5
8980   (eval $ac_try) 2>&5
8981   ac_status=$?
8982   echo "$as_me:8982: \$? = $ac_status" >&5
8983   (exit $ac_status); }; }; then
8984   ac_cv_sys_file_offset_bits=64; break
8985 else
8986   echo "$as_me: failed program was:" >&5
8987 cat conftest.$ac_ext >&5
8988 fi
8989 rm -f conftest.$ac_objext conftest.$ac_ext
8990   break
8991 done
8992 fi
8993 echo "$as_me:8993: result: $ac_cv_sys_file_offset_bits" >&5
8994 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8995 if test "$ac_cv_sys_file_offset_bits" != no; then
8996
8997 cat >>confdefs.h <<EOF
8998 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8999 EOF
9000
9001 fi
9002 rm -rf conftest*
9003   echo "$as_me:9003: checking for _LARGE_FILES value needed for large files" >&5
9004 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9005 if test "${ac_cv_sys_large_files+set}" = set; then
9006   echo $ECHO_N "(cached) $ECHO_C" >&6
9007 else
9008   while :; do
9009   ac_cv_sys_large_files=no
9010   cat >conftest.$ac_ext <<_ACEOF
9011 #line 9011 "configure"
9012 #include "confdefs.h"
9013 #include <sys/types.h>
9014  /* Check that off_t can represent 2**63 - 1 correctly.
9015     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9016     since some C++ compilers masquerading as C compilers
9017     incorrectly reject 9223372036854775807.  */
9018 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9019   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9020                        && LARGE_OFF_T % 2147483647 == 1)
9021                       ? 1 : -1];
9022 int
9023 main ()
9024 {
9025
9026   ;
9027   return 0;
9028 }
9029 _ACEOF
9030 rm -f conftest.$ac_objext
9031 if { (eval echo "$as_me:9031: \"$ac_compile\"") >&5
9032   (eval $ac_compile) 2>&5
9033   ac_status=$?
9034   echo "$as_me:9034: \$? = $ac_status" >&5
9035   (exit $ac_status); } &&
9036          { ac_try='test -s conftest.$ac_objext'
9037   { (eval echo "$as_me:9037: \"$ac_try\"") >&5
9038   (eval $ac_try) 2>&5
9039   ac_status=$?
9040   echo "$as_me:9040: \$? = $ac_status" >&5
9041   (exit $ac_status); }; }; then
9042   break
9043 else
9044   echo "$as_me: failed program was:" >&5
9045 cat conftest.$ac_ext >&5
9046 fi
9047 rm -f conftest.$ac_objext conftest.$ac_ext
9048   cat >conftest.$ac_ext <<_ACEOF
9049 #line 9049 "configure"
9050 #include "confdefs.h"
9051 #define _LARGE_FILES 1
9052 #include <sys/types.h>
9053  /* Check that off_t can represent 2**63 - 1 correctly.
9054     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9055     since some C++ compilers masquerading as C compilers
9056     incorrectly reject 9223372036854775807.  */
9057 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9058   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9059                        && LARGE_OFF_T % 2147483647 == 1)
9060                       ? 1 : -1];
9061 int
9062 main ()
9063 {
9064
9065   ;
9066   return 0;
9067 }
9068 _ACEOF
9069 rm -f conftest.$ac_objext
9070 if { (eval echo "$as_me:9070: \"$ac_compile\"") >&5
9071   (eval $ac_compile) 2>&5
9072   ac_status=$?
9073   echo "$as_me:9073: \$? = $ac_status" >&5
9074   (exit $ac_status); } &&
9075          { ac_try='test -s conftest.$ac_objext'
9076   { (eval echo "$as_me:9076: \"$ac_try\"") >&5
9077   (eval $ac_try) 2>&5
9078   ac_status=$?
9079   echo "$as_me:9079: \$? = $ac_status" >&5
9080   (exit $ac_status); }; }; then
9081   ac_cv_sys_large_files=1; break
9082 else
9083   echo "$as_me: failed program was:" >&5
9084 cat conftest.$ac_ext >&5
9085 fi
9086 rm -f conftest.$ac_objext conftest.$ac_ext
9087   break
9088 done
9089 fi
9090 echo "$as_me:9090: result: $ac_cv_sys_large_files" >&5
9091 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9092 if test "$ac_cv_sys_large_files" != no; then
9093
9094 cat >>confdefs.h <<EOF
9095 #define _LARGE_FILES $ac_cv_sys_large_files
9096 EOF
9097
9098 fi
9099 rm -rf conftest*
9100 fi
9101
9102     if test "$enable_largefile" != no ; then
9103         echo "$as_me:9103: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9104 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9105 if test "${ac_cv_sys_largefile_source+set}" = set; then
9106   echo $ECHO_N "(cached) $ECHO_C" >&6
9107 else
9108   while :; do
9109   ac_cv_sys_largefile_source=no
9110   cat >conftest.$ac_ext <<_ACEOF
9111 #line 9111 "configure"
9112 #include "confdefs.h"
9113 #include <stdio.h>
9114 int
9115 main ()
9116 {
9117 return !fseeko;
9118   ;
9119   return 0;
9120 }
9121 _ACEOF
9122 rm -f conftest.$ac_objext
9123 if { (eval echo "$as_me:9123: \"$ac_compile\"") >&5
9124   (eval $ac_compile) 2>&5
9125   ac_status=$?
9126   echo "$as_me:9126: \$? = $ac_status" >&5
9127   (exit $ac_status); } &&
9128          { ac_try='test -s conftest.$ac_objext'
9129   { (eval echo "$as_me:9129: \"$ac_try\"") >&5
9130   (eval $ac_try) 2>&5
9131   ac_status=$?
9132   echo "$as_me:9132: \$? = $ac_status" >&5
9133   (exit $ac_status); }; }; then
9134   break
9135 else
9136   echo "$as_me: failed program was:" >&5
9137 cat conftest.$ac_ext >&5
9138 fi
9139 rm -f conftest.$ac_objext conftest.$ac_ext
9140   cat >conftest.$ac_ext <<_ACEOF
9141 #line 9141 "configure"
9142 #include "confdefs.h"
9143 #define _LARGEFILE_SOURCE 1
9144 #include <stdio.h>
9145 int
9146 main ()
9147 {
9148 return !fseeko;
9149   ;
9150   return 0;
9151 }
9152 _ACEOF
9153 rm -f conftest.$ac_objext
9154 if { (eval echo "$as_me:9154: \"$ac_compile\"") >&5
9155   (eval $ac_compile) 2>&5
9156   ac_status=$?
9157   echo "$as_me:9157: \$? = $ac_status" >&5
9158   (exit $ac_status); } &&
9159          { ac_try='test -s conftest.$ac_objext'
9160   { (eval echo "$as_me:9160: \"$ac_try\"") >&5
9161   (eval $ac_try) 2>&5
9162   ac_status=$?
9163   echo "$as_me:9163: \$? = $ac_status" >&5
9164   (exit $ac_status); }; }; then
9165   ac_cv_sys_largefile_source=1; break
9166 else
9167   echo "$as_me: failed program was:" >&5
9168 cat conftest.$ac_ext >&5
9169 fi
9170 rm -f conftest.$ac_objext conftest.$ac_ext
9171   break
9172 done
9173 fi
9174 echo "$as_me:9174: result: $ac_cv_sys_largefile_source" >&5
9175 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9176 if test "$ac_cv_sys_largefile_source" != no; then
9177
9178 cat >>confdefs.h <<EOF
9179 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9180 EOF
9181
9182 fi
9183 rm -rf conftest*
9184
9185 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9186 # in glibc 2.1.3, but that breaks too many other things.
9187 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9188 echo "$as_me:9188: checking for fseeko" >&5
9189 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9190 if test "${ac_cv_func_fseeko+set}" = set; then
9191   echo $ECHO_N "(cached) $ECHO_C" >&6
9192 else
9193   cat >conftest.$ac_ext <<_ACEOF
9194 #line 9194 "configure"
9195 #include "confdefs.h"
9196 #include <stdio.h>
9197 int
9198 main ()
9199 {
9200 return fseeko && fseeko (stdin, 0, 0);
9201   ;
9202   return 0;
9203 }
9204 _ACEOF
9205 rm -f conftest.$ac_objext conftest$ac_exeext
9206 if { (eval echo "$as_me:9206: \"$ac_link\"") >&5
9207   (eval $ac_link) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); } &&
9211          { ac_try='test -s conftest$ac_exeext'
9212   { (eval echo "$as_me:9212: \"$ac_try\"") >&5
9213   (eval $ac_try) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); }; }; then
9217   ac_cv_func_fseeko=yes
9218 else
9219   echo "$as_me: failed program was:" >&5
9220 cat conftest.$ac_ext >&5
9221 ac_cv_func_fseeko=no
9222 fi
9223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9224 fi
9225 echo "$as_me:9225: result: $ac_cv_func_fseeko" >&5
9226 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9227 if test $ac_cv_func_fseeko = yes; then
9228
9229 cat >>confdefs.h <<\EOF
9230 #define HAVE_FSEEKO 1
9231 EOF
9232
9233 fi
9234
9235         # Normally we would collect these definitions in the config.h,
9236         # but (like _XOPEN_SOURCE), some environments rely on having these
9237         # defined before any of the system headers are included.  Another
9238         # case comes up with C++, e.g., on AIX the compiler compiles the
9239         # header files by themselves before looking at the body files it is
9240         # told to compile.  For ncurses, those header files do not include
9241         # the config.h
9242         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9243         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9244         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9245
9246         echo "$as_me:9246: checking whether to use struct dirent64" >&5
9247 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9248 if test "${cf_cv_struct_dirent64+set}" = set; then
9249   echo $ECHO_N "(cached) $ECHO_C" >&6
9250 else
9251
9252                 cat >conftest.$ac_ext <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9255
9256 #include <sys/types.h>
9257 #include <dirent.h>
9258
9259 int
9260 main ()
9261 {
9262
9263                 /* if transitional largefile support is setup, this is true */
9264                 extern struct dirent64 * readdir(DIR *);
9265                 struct dirent64 *x = readdir((DIR *)0);
9266                 struct dirent *y = readdir((DIR *)0);
9267                 int z = x - y;
9268
9269   ;
9270   return 0;
9271 }
9272 _ACEOF
9273 rm -f conftest.$ac_objext
9274 if { (eval echo "$as_me:9274: \"$ac_compile\"") >&5
9275   (eval $ac_compile) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); } &&
9279          { ac_try='test -s conftest.$ac_objext'
9280   { (eval echo "$as_me:9280: \"$ac_try\"") >&5
9281   (eval $ac_try) 2>&5
9282   ac_status=$?
9283   echo "$as_me:9283: \$? = $ac_status" >&5
9284   (exit $ac_status); }; }; then
9285   cf_cv_struct_dirent64=yes
9286 else
9287   echo "$as_me: failed program was:" >&5
9288 cat conftest.$ac_ext >&5
9289 cf_cv_struct_dirent64=no
9290 fi
9291 rm -f conftest.$ac_objext conftest.$ac_ext
9292
9293 fi
9294 echo "$as_me:9294: result: $cf_cv_struct_dirent64" >&5
9295 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9296         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9297 #define HAVE_STRUCT_DIRENT64 1
9298 EOF
9299
9300     fi
9301
9302 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9303 echo "$as_me:9303: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9304 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9305
9306 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9307 if test "${enable_tparm_varargs+set}" = set; then
9308   enableval="$enable_tparm_varargs"
9309   with_tparm_varargs=$enableval
9310 else
9311   with_tparm_varargs=yes
9312 fi;
9313 echo "$as_me:9313: result: $with_tparm_varargs" >&5
9314 echo "${ECHO_T}$with_tparm_varargs" >&6
9315 NCURSES_TPARM_VARARGS=0
9316 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9317
9318 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9319 if test "$with_ticlib" != no ; then
9320 echo "$as_me:9320: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9321 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9322
9323 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9324 if test "${enable_tic_depends+set}" = set; then
9325   enableval="$enable_tic_depends"
9326   with_tic_depends=$enableval
9327 else
9328   with_tic_depends=yes
9329 fi;
9330 echo "$as_me:9330: result: $with_tic_depends" >&5
9331 echo "${ECHO_T}$with_tic_depends" >&6
9332 else
9333         with_tic_depends=no
9334 fi
9335
9336 ###   use option --with-bool to override bool's type
9337 echo "$as_me:9337: checking for type of bool" >&5
9338 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9339
9340 # Check whether --with-bool or --without-bool was given.
9341 if test "${with_bool+set}" = set; then
9342   withval="$with_bool"
9343   NCURSES_BOOL="$withval"
9344 else
9345   NCURSES_BOOL=auto
9346 fi;
9347 echo "$as_me:9347: result: $NCURSES_BOOL" >&5
9348 echo "${ECHO_T}$NCURSES_BOOL" >&6
9349
9350 echo "$as_me:9350: checking for alternate terminal capabilities file" >&5
9351 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9352
9353 # Check whether --with-caps or --without-caps was given.
9354 if test "${with_caps+set}" = set; then
9355   withval="$with_caps"
9356   TERMINFO_CAPS=Caps.$withval
9357 else
9358   TERMINFO_CAPS=Caps
9359 fi;
9360 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9361 echo "$as_me:9361: result: $TERMINFO_CAPS" >&5
9362 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9363
9364 ###   use option --with-chtype to override chtype's type
9365 echo "$as_me:9365: checking for type of chtype" >&5
9366 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9367
9368 # Check whether --with-chtype or --without-chtype was given.
9369 if test "${with_chtype+set}" = set; then
9370   withval="$with_chtype"
9371   NCURSES_CHTYPE="$withval"
9372 else
9373   NCURSES_CHTYPE=auto
9374 fi;
9375 echo "$as_me:9375: result: $NCURSES_CHTYPE" >&5
9376 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9377
9378 ###   use option --with-ospeed to override ospeed's type
9379 echo "$as_me:9379: checking for type of ospeed" >&5
9380 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9381
9382 # Check whether --with-ospeed or --without-ospeed was given.
9383 if test "${with_ospeed+set}" = set; then
9384   withval="$with_ospeed"
9385   NCURSES_OSPEED="$withval"
9386 else
9387   NCURSES_OSPEED=short
9388 fi;
9389 echo "$as_me:9389: result: $NCURSES_OSPEED" >&5
9390 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9391
9392 ###   use option --with-mmask-t to override mmask_t's type
9393 echo "$as_me:9393: checking for type of mmask_t" >&5
9394 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9395
9396 # Check whether --with-mmask-t or --without-mmask-t was given.
9397 if test "${with_mmask_t+set}" = set; then
9398   withval="$with_mmask_t"
9399   NCURSES_MMASK_T="$withval"
9400 else
9401   NCURSES_MMASK_T=auto
9402 fi;
9403 echo "$as_me:9403: result: $NCURSES_MMASK_T" >&5
9404 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9405
9406 ###   use option --with-ccharw-max to override CCHARW_MAX size
9407 echo "$as_me:9407: checking for size CCHARW_MAX" >&5
9408 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9409
9410 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9411 if test "${with_ccharw_max+set}" = set; then
9412   withval="$with_ccharw_max"
9413   NCURSES_CCHARW_MAX="$withval"
9414 else
9415   NCURSES_CCHARW_MAX=5
9416 fi;
9417 echo "$as_me:9417: result: $NCURSES_CCHARW_MAX" >&5
9418 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9419
9420 ### Enable compiling-in rcs id's
9421 echo "$as_me:9421: checking if RCS identifiers should be compiled-in" >&5
9422 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9423
9424 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9425 if test "${with_rcs_ids+set}" = set; then
9426   withval="$with_rcs_ids"
9427   with_rcs_ids=$withval
9428 else
9429   with_rcs_ids=no
9430 fi;
9431 echo "$as_me:9431: result: $with_rcs_ids" >&5
9432 echo "${ECHO_T}$with_rcs_ids" >&6
9433 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9434 #define USE_RCS_IDS 1
9435 EOF
9436
9437 ###############################################################################
9438
9439 echo "$as_me:9439: checking format of man-pages" >&5
9440 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9441
9442 # Check whether --with-manpage-format or --without-manpage-format was given.
9443 if test "${with_manpage_format+set}" = set; then
9444   withval="$with_manpage_format"
9445   MANPAGE_FORMAT=$withval
9446 else
9447   MANPAGE_FORMAT=unknown
9448 fi;
9449
9450 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9451 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9452
9453 cf_unknown=
9454
9455 case $MANPAGE_FORMAT in
9456 unknown)
9457   if test -z "$MANPATH" ; then
9458     MANPATH="/usr/man:/usr/share/man"
9459   fi
9460
9461   # look for the 'date' man-page (it's most likely to be installed!)
9462   MANPAGE_FORMAT=
9463   cf_preform=no
9464   cf_catonly=yes
9465   cf_example=date
9466
9467   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9468   for cf_dir in $MANPATH; do
9469     test -z "$cf_dir" && cf_dir=/usr/man
9470     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
9471     do
9472       cf_test=`echo $cf_name | sed -e 's/*//'`
9473       if test "x$cf_test" = "x$cf_name" ; then
9474
9475         case "$cf_name" in
9476         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9477         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9478         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9479         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9480         esac
9481
9482         case "$cf_name" in
9483         $cf_dir/man*)
9484           cf_catonly=no
9485           ;;
9486         $cf_dir/cat*)
9487           cf_preform=yes
9488           ;;
9489         esac
9490         break
9491       fi
9492
9493       # if we found a match in either man* or cat*, stop looking
9494       if test -n "$MANPAGE_FORMAT" ; then
9495         cf_found=no
9496         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9497         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9498         case "$cf_name" in
9499         $cf_dir/cat*)
9500           cf_found=yes
9501           ;;
9502         esac
9503         test $cf_found=yes && break
9504       fi
9505     done
9506     # only check the first directory in $MANPATH where we find manpages
9507     if test -n "$MANPAGE_FORMAT" ; then
9508        break
9509     fi
9510   done
9511   # if we did not find the example, just assume it is normal
9512   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9513   IFS="$ac_save_ifs"
9514   ;;
9515 *)
9516   for cf_option in $MANPAGE_FORMAT; do
9517      case $cf_option in #(vi
9518      gzip|compress|BSDI|normal|formatted|catonly)
9519        ;;
9520      *)
9521        cf_unknown="$cf_unknown $cf_option"
9522        ;;
9523      esac
9524   done
9525   ;;
9526 esac
9527
9528 echo "$as_me:9528: result: $MANPAGE_FORMAT" >&5
9529 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9530 if test -n "$cf_unknown" ; then
9531   { echo "$as_me:9531: WARNING: Unexpected manpage-format $cf_unknown" >&5
9532 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9533 fi
9534
9535 echo "$as_me:9535: checking for manpage renaming" >&5
9536 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9537
9538 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9539 if test "${with_manpage_renames+set}" = set; then
9540   withval="$with_manpage_renames"
9541   MANPAGE_RENAMES=$withval
9542 else
9543   MANPAGE_RENAMES=yes
9544 fi;
9545
9546 case ".$MANPAGE_RENAMES" in #(vi
9547 .no) #(vi
9548   ;;
9549 .|.yes)
9550   # Debian 'man' program?
9551   if test -f /etc/debian_version ; then
9552     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9553   else
9554     MANPAGE_RENAMES=no
9555   fi
9556   ;;
9557 esac
9558
9559 if test "$MANPAGE_RENAMES" != no ; then
9560   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9561     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9562   elif test ! -f $MANPAGE_RENAMES ; then
9563     { { echo "$as_me:9563: error: not a filename: $MANPAGE_RENAMES" >&5
9564 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9565    { (exit 1); exit 1; }; }
9566   fi
9567
9568   test ! -d man && mkdir man
9569
9570   # Construct a sed-script to perform renaming within man-pages
9571   if test -n "$MANPAGE_RENAMES" ; then
9572     test ! -d man && mkdir man
9573     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9574   fi
9575 fi
9576
9577 echo "$as_me:9577: result: $MANPAGE_RENAMES" >&5
9578 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9579
9580 echo "$as_me:9580: checking if manpage aliases will be installed" >&5
9581 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9582
9583 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9584 if test "${with_manpage_aliases+set}" = set; then
9585   withval="$with_manpage_aliases"
9586   MANPAGE_ALIASES=$withval
9587 else
9588   MANPAGE_ALIASES=yes
9589 fi;
9590
9591 echo "$as_me:9591: result: $MANPAGE_ALIASES" >&5
9592 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9593
9594 case "x$LN_S" in #(vi
9595 xln*) #(vi
9596         cf_use_symlinks=yes
9597         ;;
9598 *)
9599         cf_use_symlinks=no
9600         ;;
9601 esac
9602
9603 MANPAGE_SYMLINKS=no
9604 if test "$MANPAGE_ALIASES" = yes ; then
9605 echo "$as_me:9605: checking if manpage symlinks should be used" >&5
9606 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9607
9608 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9609 if test "${with_manpage_symlinks+set}" = set; then
9610   withval="$with_manpage_symlinks"
9611   MANPAGE_SYMLINKS=$withval
9612 else
9613   MANPAGE_SYMLINKS=$cf_use_symlinks
9614 fi;
9615
9616 if test "$$cf_use_symlinks" = no; then
9617 if test "$MANPAGE_SYMLINKS" = yes ; then
9618         { echo "$as_me:9618: WARNING: cannot make symlinks" >&5
9619 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9620         MANPAGE_SYMLINKS=no
9621 fi
9622 fi
9623
9624 echo "$as_me:9624: result: $MANPAGE_SYMLINKS" >&5
9625 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9626 fi
9627
9628 echo "$as_me:9628: checking for manpage tbl" >&5
9629 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9630
9631 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9632 if test "${with_manpage_tbl+set}" = set; then
9633   withval="$with_manpage_tbl"
9634   MANPAGE_TBL=$withval
9635 else
9636   MANPAGE_TBL=no
9637 fi;
9638
9639 echo "$as_me:9639: result: $MANPAGE_TBL" >&5
9640 echo "${ECHO_T}$MANPAGE_TBL" >&6
9641
9642   if test "$prefix" = "NONE" ; then
9643      cf_prefix="$ac_default_prefix"
9644   else
9645      cf_prefix="$prefix"
9646   fi
9647
9648   case "$MANPAGE_FORMAT" in # (vi
9649   *catonly*) # (vi
9650     cf_format=yes
9651     cf_inboth=no
9652     ;;
9653   *formatted*) # (vi
9654     cf_format=yes
9655     cf_inboth=yes
9656     ;;
9657   *)
9658     cf_format=no
9659     cf_inboth=no
9660     ;;
9661   esac
9662
9663 test ! -d man && mkdir man
9664
9665 cf_so_strip=
9666 cf_compress=
9667 case "$MANPAGE_FORMAT" in #(vi
9668 *compress*) #(vi
9669         cf_so_strip="Z"
9670         cf_compress=compress
9671   ;;
9672 *gzip*)
9673         cf_so_strip="gz"
9674         cf_compress=gzip
9675   ;;
9676 esac
9677
9678 cf_edit_man=./edit_man.sh
9679 cf_man_alias=`pwd`/man_alias.sed
9680
9681 cat >$cf_edit_man <<CF_EOF
9682 #! /bin/sh
9683 # this script is generated by the configure-script CF_MAN_PAGES macro.
9684
9685 prefix="$cf_prefix"
9686 datadir="$datadir"
9687
9688 NCURSES_MAJOR="$NCURSES_MAJOR"
9689 NCURSES_MINOR="$NCURSES_MINOR"
9690 NCURSES_PATCH="$NCURSES_PATCH"
9691
9692 NCURSES_OSPEED="$NCURSES_OSPEED"
9693 TERMINFO="$TERMINFO"
9694
9695 INSTALL="$INSTALL"
9696 INSTALL_DATA="$INSTALL_DATA"
9697
9698 transform="$program_transform_name"
9699
9700 TMP=\${TMPDIR-/tmp}/man\$\$
9701 trap "rm -f \$TMP" 0 1 2 5 15
9702
9703 form=\$1
9704 shift || exit 1
9705
9706 verb=\$1
9707 shift || exit 1
9708
9709 mandir=\$1
9710 shift || exit 1
9711
9712 srcdir=\$1
9713 top_srcdir=\$srcdir/..
9714 shift || exit 1
9715
9716 if test "\$form" = normal ; then
9717         if test "$cf_format" = yes ; then
9718         if test "$cf_inboth" = no ; then
9719                 sh \$0 format \$verb \$mandir \$srcdir \$*
9720                 exit $?
9721         fi
9722         fi
9723         cf_subdir=\$mandir/man
9724         cf_tables=$MANPAGE_TBL
9725 else
9726         cf_subdir=\$mandir/cat
9727         cf_tables=yes
9728 fi
9729
9730 # process the list of source-files
9731 for i in \$* ; do
9732 case \$i in #(vi
9733 *.orig|*.rej) ;; #(vi
9734 *.[0-9]*)
9735         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9736         if test \$verb = installing ; then
9737         if test ! -d \$cf_subdir\${section} ; then
9738                 mkdir -p \$cf_subdir\$section
9739         fi
9740         fi
9741
9742         # replace variables in man page
9743         if test ! -f $cf_man_alias ; then
9744 cat >>$cf_man_alias <<-CF_EOF2
9745                 s,@DATADIR@,\$datadir,g
9746                 s,@TERMINFO@,\$TERMINFO,g
9747                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9748                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9749                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9750                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9751 CF_EOF
9752
9753         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9754         do
9755                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9756                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9757 cat >>$cf_edit_man <<-CF_EOF
9758                 s,@$cf_NAME@,$cf_name,g
9759 CF_EOF
9760         done
9761
9762 cat >>$cf_edit_man <<CF_EOF
9763 CF_EOF2
9764                 echo "...made $cf_man_alias"
9765         fi
9766
9767         aliases=
9768         cf_source=\`basename \$i\`
9769         inalias=\$cf_source
9770         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9771         if test ! -f \$inalias ; then
9772                 echo .. skipped \$cf_source
9773                 continue
9774         fi
9775 CF_EOF
9776
9777 if test "$MANPAGE_ALIASES" != no ; then
9778 cat >>$cf_edit_man <<CF_EOF
9779         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9780 CF_EOF
9781 fi
9782
9783 if test "$MANPAGE_RENAMES" = no ; then
9784 cat >>$cf_edit_man <<CF_EOF
9785         # perform program transformations for section 1 man pages
9786         if test \$section = 1 ; then
9787                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9788         else
9789                 cf_target=\$cf_subdir\${section}/\$cf_source
9790         fi
9791 CF_EOF
9792 else
9793 cat >>$cf_edit_man <<CF_EOF
9794         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9795         if test -z "\$cf_target" ; then
9796                 echo '? missing rename for '\$cf_source
9797                 cf_target="\$cf_source"
9798         fi
9799         cf_target="\$cf_subdir\${section}/\${cf_target}"
9800
9801 CF_EOF
9802 fi
9803
9804 cat >>$cf_edit_man <<CF_EOF
9805         sed     -f $cf_man_alias \\
9806 CF_EOF
9807
9808 if test -f $MANPAGE_RENAMES ; then
9809 cat >>$cf_edit_man <<CF_EOF
9810                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9811 CF_EOF
9812 else
9813 cat >>$cf_edit_man <<CF_EOF
9814                 < \$i >\$TMP
9815 CF_EOF
9816 fi
9817
9818 cat >>$cf_edit_man <<CF_EOF
9819 if test \$cf_tables = yes ; then
9820         tbl \$TMP >\$TMP.out
9821         mv \$TMP.out \$TMP
9822 fi
9823 CF_EOF
9824
9825 if test $with_curses_h != yes ; then
9826 cat >>$cf_edit_man <<CF_EOF
9827         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9828         mv \$TMP.out \$TMP
9829 CF_EOF
9830 fi
9831
9832 cat >>$cf_edit_man <<CF_EOF
9833         if test \$form = format ; then
9834                 nroff -man \$TMP >\$TMP.out
9835                 mv \$TMP.out \$TMP
9836         fi
9837 CF_EOF
9838
9839 if test -n "$cf_compress" ; then
9840 cat >>$cf_edit_man <<CF_EOF
9841         if test \$verb = installing ; then
9842         if ( $cf_compress -f \$TMP )
9843         then
9844                 mv \$TMP.$cf_so_strip \$TMP
9845         fi
9846         fi
9847         cf_target="\$cf_target.$cf_so_strip"
9848 CF_EOF
9849 fi
9850
9851 case "$MANPAGE_FORMAT" in #(vi
9852 *BSDI*)
9853 cat >>$cf_edit_man <<CF_EOF
9854         if test \$form = format ; then
9855                 # BSDI installs only .0 suffixes in the cat directories
9856                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9857         fi
9858 CF_EOF
9859   ;;
9860 esac
9861
9862 cat >>$cf_edit_man <<CF_EOF
9863         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9864         if test \$verb = installing ; then
9865                 echo \$verb \$cf_target
9866                 \$INSTALL_DATA \$TMP \$cf_target
9867                 test -d \$cf_subdir\${section} &&
9868                 test -n "\$aliases" && (
9869                         cd \$cf_subdir\${section} && (
9870                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9871                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9872                                 cf_target=\`basename \$cf_target\`
9873                                 for cf_alias in \$aliases
9874                                 do
9875                                         if test \$section = 1 ; then
9876                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9877                                         fi
9878
9879                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9880                                                 if test -f \$cf_alias\${suffix} ; then
9881                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9882                                                         then
9883                                                                 continue
9884                                                         fi
9885                                                 fi
9886                                                 echo .. \$verb alias \$cf_alias\${suffix}
9887 CF_EOF
9888 case "x$LN_S" in #(vi
9889 *-f) #(vi
9890 cat >>$cf_edit_man <<CF_EOF
9891                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9892 CF_EOF
9893         ;;
9894 *)
9895 cat >>$cf_edit_man <<CF_EOF
9896                                                 rm -f \$cf_alias\${suffix}
9897                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9898 CF_EOF
9899         ;;
9900 esac
9901 cat >>$cf_edit_man <<CF_EOF
9902                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9903                                                 echo ".so \$cf_source" >\$TMP
9904 CF_EOF
9905 if test -n "$cf_compress" ; then
9906 cat >>$cf_edit_man <<CF_EOF
9907                                                 if test -n "$cf_so_strip" ; then
9908                                                         $cf_compress -f \$TMP
9909                                                         mv \$TMP.$cf_so_strip \$TMP
9910                                                 fi
9911 CF_EOF
9912 fi
9913 cat >>$cf_edit_man <<CF_EOF
9914                                                 echo .. \$verb alias \$cf_alias\${suffix}
9915                                                 rm -f \$cf_alias\${suffix}
9916                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9917                                         fi
9918                                 done
9919                         )
9920                 )
9921         elif test \$verb = removing ; then
9922                 test -f \$cf_target && (
9923                         echo \$verb \$cf_target
9924                         rm -f \$cf_target
9925                 )
9926                 test -d \$cf_subdir\${section} &&
9927                 test -n "\$aliases" && (
9928                         cd \$cf_subdir\${section} && (
9929                                 for cf_alias in \$aliases
9930                                 do
9931                                         if test \$section = 1 ; then
9932                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9933                                         fi
9934
9935                                         echo .. \$verb alias \$cf_alias\${suffix}
9936                                         rm -f \$cf_alias\${suffix}
9937                                 done
9938                         )
9939                 )
9940         else
9941 #               echo ".hy 0"
9942                 cat \$TMP
9943         fi
9944         ;;
9945 esac
9946 done
9947
9948 if test $cf_inboth = yes ; then
9949 if test \$form != format ; then
9950         sh \$0 format \$verb \$mandir \$srcdir \$*
9951 fi
9952 fi
9953
9954 exit 0
9955 CF_EOF
9956 chmod 755 $cf_edit_man
9957
9958 ###############################################################################
9959
9960 ### Note that some functions (such as const) are normally disabled anyway.
9961 echo "$as_me:9961: checking if you want to build with function extensions" >&5
9962 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9963
9964 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9965 if test "${enable_ext_funcs+set}" = set; then
9966   enableval="$enable_ext_funcs"
9967   with_ext_funcs=$enableval
9968 else
9969   with_ext_funcs=yes
9970 fi;
9971 echo "$as_me:9971: result: $with_ext_funcs" >&5
9972 echo "${ECHO_T}$with_ext_funcs" >&6
9973 if test "$with_ext_funcs" = yes ; then
9974         NCURSES_EXT_FUNCS=1
9975         cat >>confdefs.h <<\EOF
9976 #define HAVE_CURSES_VERSION 1
9977 EOF
9978
9979         cat >>confdefs.h <<\EOF
9980 #define HAVE_HAS_KEY 1
9981 EOF
9982
9983         cat >>confdefs.h <<\EOF
9984 #define HAVE_RESIZETERM 1
9985 EOF
9986
9987         cat >>confdefs.h <<\EOF
9988 #define HAVE_RESIZE_TERM 1
9989 EOF
9990
9991         cat >>confdefs.h <<\EOF
9992 #define HAVE_USE_DEFAULT_COLORS 1
9993 EOF
9994
9995         cat >>confdefs.h <<\EOF
9996 #define HAVE_WRESIZE 1
9997 EOF
9998
9999         cat >>confdefs.h <<\EOF
10000 #define NCURSES_EXT_FUNCS 1
10001 EOF
10002
10003         GENERATED_EXT_FUNCS=generated
10004 else
10005         NCURSES_EXT_FUNCS=0
10006         GENERATED_EXT_FUNCS=
10007 fi
10008
10009 echo "$as_me:10009: checking if you want to build with experimental SCREEN extensions" >&5
10010 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10011
10012 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10013 if test "${enable_sp_funcs+set}" = set; then
10014   enableval="$enable_sp_funcs"
10015   with_sp_funcs=$enableval
10016 else
10017   with_sp_funcs=no
10018 fi;
10019 echo "$as_me:10019: result: $with_sp_funcs" >&5
10020 echo "${ECHO_T}$with_sp_funcs" >&6
10021 if test "$with_sp_funcs" = yes ; then
10022         NCURSES_SP_FUNCS=1
10023         cat >>confdefs.h <<\EOF
10024 #define NCURSES_SP_FUNCS 1
10025 EOF
10026
10027         GENERATED_SP_FUNCS=generated
10028 else
10029         NCURSES_SP_FUNCS=0
10030         GENERATED_SP_FUNCS=
10031 fi
10032
10033 echo "$as_me:10033: checking if you want to build with experimental terminal-driver" >&5
10034 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10035
10036 # Check whether --enable-term-driver or --disable-term-driver was given.
10037 if test "${enable_term_driver+set}" = set; then
10038   enableval="$enable_term_driver"
10039   with_term_driver=$enableval
10040 else
10041   with_term_driver=no
10042 fi;
10043 echo "$as_me:10043: result: $with_term_driver" >&5
10044 echo "${ECHO_T}$with_term_driver" >&6
10045 if test "$with_term_driver" = yes ; then
10046         cat >>confdefs.h <<\EOF
10047 #define USE_TERM_DRIVER 1
10048 EOF
10049
10050         if test "$with_sp_funcs" != yes ; then
10051                 { { echo "$as_me:10051: error: The term-driver option relies upon sp-funcs" >&5
10052 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10053    { (exit 1); exit 1; }; }
10054         fi
10055 fi
10056
10057 ###   use option --enable-const to turn on use of const beyond that in XSI.
10058 echo "$as_me:10058: checking for extended use of const keyword" >&5
10059 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10060
10061 # Check whether --enable-const or --disable-const was given.
10062 if test "${enable_const+set}" = set; then
10063   enableval="$enable_const"
10064   with_ext_const=$enableval
10065 else
10066   with_ext_const=no
10067 fi;
10068 echo "$as_me:10068: result: $with_ext_const" >&5
10069 echo "${ECHO_T}$with_ext_const" >&6
10070 NCURSES_CONST='/*nothing*/'
10071 if test "$with_ext_const" = yes ; then
10072         NCURSES_CONST=const
10073 fi
10074
10075 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10076 echo "$as_me:10076: checking if you want to use extended colors" >&5
10077 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10078
10079 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10080 if test "${enable_ext_colors+set}" = set; then
10081   enableval="$enable_ext_colors"
10082   with_ext_colors=$enableval
10083 else
10084   with_ext_colors=no
10085 fi;
10086 echo "$as_me:10086: result: $with_ext_colors" >&5
10087 echo "${ECHO_T}$with_ext_colors" >&6
10088 NCURSES_EXT_COLORS=0
10089 if test "$with_ext_colors" = yes ; then
10090         if test "$with_widec" != yes ; then
10091                 { { echo "$as_me:10091: error: This option applies only to wide-character library" >&5
10092 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10093    { (exit 1); exit 1; }; }
10094         else
10095                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10096
10097 if test "${with_abi_version+set}" != set; then
10098         case $cf_cv_rel_version in
10099         5.*)
10100                 cf_cv_rel_version=6.0
10101                 cf_cv_abi_version=6
10102                 { echo "$as_me:10102: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10103 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10104                 ;;
10105         esac
10106 fi
10107
10108         fi
10109         NCURSES_EXT_COLORS=1
10110         cat >>confdefs.h <<\EOF
10111 #define NCURSES_EXT_COLORS 1
10112 EOF
10113
10114 fi
10115
10116 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10117 echo "$as_me:10117: checking if you want to use extended mouse encoding" >&5
10118 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10119
10120 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10121 if test "${enable_ext_mouse+set}" = set; then
10122   enableval="$enable_ext_mouse"
10123   with_ext_mouse=$enableval
10124 else
10125   with_ext_mouse=no
10126 fi;
10127 echo "$as_me:10127: result: $with_ext_mouse" >&5
10128 echo "${ECHO_T}$with_ext_mouse" >&6
10129 NCURSES_MOUSE_VERSION=1
10130 if test "$with_ext_mouse" = yes ; then
10131         NCURSES_MOUSE_VERSION=2
10132
10133 if test "${with_abi_version+set}" != set; then
10134         case $cf_cv_rel_version in
10135         5.*)
10136                 cf_cv_rel_version=6.0
10137                 cf_cv_abi_version=6
10138                 { echo "$as_me:10138: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10139 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10140                 ;;
10141         esac
10142 fi
10143
10144 fi
10145
10146 echo "$as_me:10146: checking if you want \$NCURSES_NO_PADDING code" >&5
10147 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10148
10149 # Check whether --enable-no-padding or --disable-no-padding was given.
10150 if test "${enable_no_padding+set}" = set; then
10151   enableval="$enable_no_padding"
10152   with_no_padding=$enableval
10153 else
10154   with_no_padding=$with_ext_funcs
10155 fi;
10156 echo "$as_me:10156: result: $with_no_padding" >&5
10157 echo "${ECHO_T}$with_no_padding" >&6
10158 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10159 #define NCURSES_NO_PADDING 1
10160 EOF
10161
10162 echo "$as_me:10162: checking for ANSI C header files" >&5
10163 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10164 if test "${ac_cv_header_stdc+set}" = set; then
10165   echo $ECHO_N "(cached) $ECHO_C" >&6
10166 else
10167   cat >conftest.$ac_ext <<_ACEOF
10168 #line 10168 "configure"
10169 #include "confdefs.h"
10170 #include <stdlib.h>
10171 #include <stdarg.h>
10172 #include <string.h>
10173 #include <float.h>
10174
10175 _ACEOF
10176 if { (eval echo "$as_me:10176: \"$ac_cpp conftest.$ac_ext\"") >&5
10177   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10178   ac_status=$?
10179   egrep -v '^ *\+' conftest.er1 >conftest.err
10180   rm -f conftest.er1
10181   cat conftest.err >&5
10182   echo "$as_me:10182: \$? = $ac_status" >&5
10183   (exit $ac_status); } >/dev/null; then
10184   if test -s conftest.err; then
10185     ac_cpp_err=$ac_c_preproc_warn_flag
10186   else
10187     ac_cpp_err=
10188   fi
10189 else
10190   ac_cpp_err=yes
10191 fi
10192 if test -z "$ac_cpp_err"; then
10193   ac_cv_header_stdc=yes
10194 else
10195   echo "$as_me: failed program was:" >&5
10196   cat conftest.$ac_ext >&5
10197   ac_cv_header_stdc=no
10198 fi
10199 rm -f conftest.err conftest.$ac_ext
10200
10201 if test $ac_cv_header_stdc = yes; then
10202   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10203   cat >conftest.$ac_ext <<_ACEOF
10204 #line 10204 "configure"
10205 #include "confdefs.h"
10206 #include <string.h>
10207
10208 _ACEOF
10209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10210   egrep "memchr" >/dev/null 2>&1; then
10211   :
10212 else
10213   ac_cv_header_stdc=no
10214 fi
10215 rm -rf conftest*
10216
10217 fi
10218
10219 if test $ac_cv_header_stdc = yes; then
10220   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10221   cat >conftest.$ac_ext <<_ACEOF
10222 #line 10222 "configure"
10223 #include "confdefs.h"
10224 #include <stdlib.h>
10225
10226 _ACEOF
10227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10228   egrep "free" >/dev/null 2>&1; then
10229   :
10230 else
10231   ac_cv_header_stdc=no
10232 fi
10233 rm -rf conftest*
10234
10235 fi
10236
10237 if test $ac_cv_header_stdc = yes; then
10238   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10239   if test "$cross_compiling" = yes; then
10240   :
10241 else
10242   cat >conftest.$ac_ext <<_ACEOF
10243 #line 10243 "configure"
10244 #include "confdefs.h"
10245 #include <ctype.h>
10246 #if ((' ' & 0x0FF) == 0x020)
10247 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10248 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10249 #else
10250 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10251                      || ('j' <= (c) && (c) <= 'r') \
10252                      || ('s' <= (c) && (c) <= 'z'))
10253 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10254 #endif
10255
10256 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10257 int
10258 main ()
10259 {
10260   int i;
10261   for (i = 0; i < 256; i++)
10262     if (XOR (islower (i), ISLOWER (i))
10263         || toupper (i) != TOUPPER (i))
10264       $ac_main_return(2);
10265   $ac_main_return (0);
10266 }
10267 _ACEOF
10268 rm -f conftest$ac_exeext
10269 if { (eval echo "$as_me:10269: \"$ac_link\"") >&5
10270   (eval $ac_link) 2>&5
10271   ac_status=$?
10272   echo "$as_me:10272: \$? = $ac_status" >&5
10273   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10274   { (eval echo "$as_me:10274: \"$ac_try\"") >&5
10275   (eval $ac_try) 2>&5
10276   ac_status=$?
10277   echo "$as_me:10277: \$? = $ac_status" >&5
10278   (exit $ac_status); }; }; then
10279   :
10280 else
10281   echo "$as_me: program exited with status $ac_status" >&5
10282 echo "$as_me: failed program was:" >&5
10283 cat conftest.$ac_ext >&5
10284 ac_cv_header_stdc=no
10285 fi
10286 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10287 fi
10288 fi
10289 fi
10290 echo "$as_me:10290: result: $ac_cv_header_stdc" >&5
10291 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10292 if test $ac_cv_header_stdc = yes; then
10293
10294 cat >>confdefs.h <<\EOF
10295 #define STDC_HEADERS 1
10296 EOF
10297
10298 fi
10299
10300 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10301
10302 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10303                   inttypes.h stdint.h unistd.h
10304 do
10305 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10306 echo "$as_me:10306: checking for $ac_header" >&5
10307 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10309   echo $ECHO_N "(cached) $ECHO_C" >&6
10310 else
10311   cat >conftest.$ac_ext <<_ACEOF
10312 #line 10312 "configure"
10313 #include "confdefs.h"
10314 $ac_includes_default
10315 #include <$ac_header>
10316 _ACEOF
10317 rm -f conftest.$ac_objext
10318 if { (eval echo "$as_me:10318: \"$ac_compile\"") >&5
10319   (eval $ac_compile) 2>&5
10320   ac_status=$?
10321   echo "$as_me:10321: \$? = $ac_status" >&5
10322   (exit $ac_status); } &&
10323          { ac_try='test -s conftest.$ac_objext'
10324   { (eval echo "$as_me:10324: \"$ac_try\"") >&5
10325   (eval $ac_try) 2>&5
10326   ac_status=$?
10327   echo "$as_me:10327: \$? = $ac_status" >&5
10328   (exit $ac_status); }; }; then
10329   eval "$as_ac_Header=yes"
10330 else
10331   echo "$as_me: failed program was:" >&5
10332 cat conftest.$ac_ext >&5
10333 eval "$as_ac_Header=no"
10334 fi
10335 rm -f conftest.$ac_objext conftest.$ac_ext
10336 fi
10337 echo "$as_me:10337: result: `eval echo '${'$as_ac_Header'}'`" >&5
10338 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10339 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10340   cat >>confdefs.h <<EOF
10341 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10342 EOF
10343
10344 fi
10345 done
10346
10347 echo "$as_me:10347: checking for signed char" >&5
10348 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10349 if test "${ac_cv_type_signed_char+set}" = set; then
10350   echo $ECHO_N "(cached) $ECHO_C" >&6
10351 else
10352   cat >conftest.$ac_ext <<_ACEOF
10353 #line 10353 "configure"
10354 #include "confdefs.h"
10355 $ac_includes_default
10356 int
10357 main ()
10358 {
10359 if ((signed char *) 0)
10360   return 0;
10361 if (sizeof (signed char))
10362   return 0;
10363   ;
10364   return 0;
10365 }
10366 _ACEOF
10367 rm -f conftest.$ac_objext
10368 if { (eval echo "$as_me:10368: \"$ac_compile\"") >&5
10369   (eval $ac_compile) 2>&5
10370   ac_status=$?
10371   echo "$as_me:10371: \$? = $ac_status" >&5
10372   (exit $ac_status); } &&
10373          { ac_try='test -s conftest.$ac_objext'
10374   { (eval echo "$as_me:10374: \"$ac_try\"") >&5
10375   (eval $ac_try) 2>&5
10376   ac_status=$?
10377   echo "$as_me:10377: \$? = $ac_status" >&5
10378   (exit $ac_status); }; }; then
10379   ac_cv_type_signed_char=yes
10380 else
10381   echo "$as_me: failed program was:" >&5
10382 cat conftest.$ac_ext >&5
10383 ac_cv_type_signed_char=no
10384 fi
10385 rm -f conftest.$ac_objext conftest.$ac_ext
10386 fi
10387 echo "$as_me:10387: result: $ac_cv_type_signed_char" >&5
10388 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10389
10390 echo "$as_me:10390: checking size of signed char" >&5
10391 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10392 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10393   echo $ECHO_N "(cached) $ECHO_C" >&6
10394 else
10395   if test "$ac_cv_type_signed_char" = yes; then
10396   if test "$cross_compiling" = yes; then
10397   # Depending upon the size, compute the lo and hi bounds.
10398 cat >conftest.$ac_ext <<_ACEOF
10399 #line 10399 "configure"
10400 #include "confdefs.h"
10401 $ac_includes_default
10402 int
10403 main ()
10404 {
10405 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10406   ;
10407   return 0;
10408 }
10409 _ACEOF
10410 rm -f conftest.$ac_objext
10411 if { (eval echo "$as_me:10411: \"$ac_compile\"") >&5
10412   (eval $ac_compile) 2>&5
10413   ac_status=$?
10414   echo "$as_me:10414: \$? = $ac_status" >&5
10415   (exit $ac_status); } &&
10416          { ac_try='test -s conftest.$ac_objext'
10417   { (eval echo "$as_me:10417: \"$ac_try\"") >&5
10418   (eval $ac_try) 2>&5
10419   ac_status=$?
10420   echo "$as_me:10420: \$? = $ac_status" >&5
10421   (exit $ac_status); }; }; then
10422   ac_lo=0 ac_mid=0
10423   while :; do
10424     cat >conftest.$ac_ext <<_ACEOF
10425 #line 10425 "configure"
10426 #include "confdefs.h"
10427 $ac_includes_default
10428 int
10429 main ()
10430 {
10431 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10432   ;
10433   return 0;
10434 }
10435 _ACEOF
10436 rm -f conftest.$ac_objext
10437 if { (eval echo "$as_me:10437: \"$ac_compile\"") >&5
10438   (eval $ac_compile) 2>&5
10439   ac_status=$?
10440   echo "$as_me:10440: \$? = $ac_status" >&5
10441   (exit $ac_status); } &&
10442          { ac_try='test -s conftest.$ac_objext'
10443   { (eval echo "$as_me:10443: \"$ac_try\"") >&5
10444   (eval $ac_try) 2>&5
10445   ac_status=$?
10446   echo "$as_me:10446: \$? = $ac_status" >&5
10447   (exit $ac_status); }; }; then
10448   ac_hi=$ac_mid; break
10449 else
10450   echo "$as_me: failed program was:" >&5
10451 cat conftest.$ac_ext >&5
10452 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10453 fi
10454 rm -f conftest.$ac_objext conftest.$ac_ext
10455   done
10456 else
10457   echo "$as_me: failed program was:" >&5
10458 cat conftest.$ac_ext >&5
10459 ac_hi=-1 ac_mid=-1
10460   while :; do
10461     cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464 $ac_includes_default
10465 int
10466 main ()
10467 {
10468 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10469   ;
10470   return 0;
10471 }
10472 _ACEOF
10473 rm -f conftest.$ac_objext
10474 if { (eval echo "$as_me:10474: \"$ac_compile\"") >&5
10475   (eval $ac_compile) 2>&5
10476   ac_status=$?
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit $ac_status); } &&
10479          { ac_try='test -s conftest.$ac_objext'
10480   { (eval echo "$as_me:10480: \"$ac_try\"") >&5
10481   (eval $ac_try) 2>&5
10482   ac_status=$?
10483   echo "$as_me:10483: \$? = $ac_status" >&5
10484   (exit $ac_status); }; }; then
10485   ac_lo=$ac_mid; break
10486 else
10487   echo "$as_me: failed program was:" >&5
10488 cat conftest.$ac_ext >&5
10489 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10490 fi
10491 rm -f conftest.$ac_objext conftest.$ac_ext
10492   done
10493 fi
10494 rm -f conftest.$ac_objext conftest.$ac_ext
10495 # Binary search between lo and hi bounds.
10496 while test "x$ac_lo" != "x$ac_hi"; do
10497   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10498   cat >conftest.$ac_ext <<_ACEOF
10499 #line 10499 "configure"
10500 #include "confdefs.h"
10501 $ac_includes_default
10502 int
10503 main ()
10504 {
10505 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10506   ;
10507   return 0;
10508 }
10509 _ACEOF
10510 rm -f conftest.$ac_objext
10511 if { (eval echo "$as_me:10511: \"$ac_compile\"") >&5
10512   (eval $ac_compile) 2>&5
10513   ac_status=$?
10514   echo "$as_me:10514: \$? = $ac_status" >&5
10515   (exit $ac_status); } &&
10516          { ac_try='test -s conftest.$ac_objext'
10517   { (eval echo "$as_me:10517: \"$ac_try\"") >&5
10518   (eval $ac_try) 2>&5
10519   ac_status=$?
10520   echo "$as_me:10520: \$? = $ac_status" >&5
10521   (exit $ac_status); }; }; then
10522   ac_hi=$ac_mid
10523 else
10524   echo "$as_me: failed program was:" >&5
10525 cat conftest.$ac_ext >&5
10526 ac_lo=`expr $ac_mid + 1`
10527 fi
10528 rm -f conftest.$ac_objext conftest.$ac_ext
10529 done
10530 ac_cv_sizeof_signed_char=$ac_lo
10531 else
10532   if test "$cross_compiling" = yes; then
10533   { { echo "$as_me:10533: error: cannot run test program while cross compiling" >&5
10534 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10535    { (exit 1); exit 1; }; }
10536 else
10537   cat >conftest.$ac_ext <<_ACEOF
10538 #line 10538 "configure"
10539 #include "confdefs.h"
10540 $ac_includes_default
10541 int
10542 main ()
10543 {
10544 FILE *f = fopen ("conftest.val", "w");
10545 if (!f)
10546   $ac_main_return (1);
10547 fprintf (f, "%d", (sizeof (signed char)));
10548 fclose (f);
10549   ;
10550   return 0;
10551 }
10552 _ACEOF
10553 rm -f conftest$ac_exeext
10554 if { (eval echo "$as_me:10554: \"$ac_link\"") >&5
10555   (eval $ac_link) 2>&5
10556   ac_status=$?
10557   echo "$as_me:10557: \$? = $ac_status" >&5
10558   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10559   { (eval echo "$as_me:10559: \"$ac_try\"") >&5
10560   (eval $ac_try) 2>&5
10561   ac_status=$?
10562   echo "$as_me:10562: \$? = $ac_status" >&5
10563   (exit $ac_status); }; }; then
10564   ac_cv_sizeof_signed_char=`cat conftest.val`
10565 else
10566   echo "$as_me: program exited with status $ac_status" >&5
10567 echo "$as_me: failed program was:" >&5
10568 cat conftest.$ac_ext >&5
10569 fi
10570 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10571 fi
10572 fi
10573 rm -f conftest.val
10574 else
10575   ac_cv_sizeof_signed_char=0
10576 fi
10577 fi
10578 echo "$as_me:10578: result: $ac_cv_sizeof_signed_char" >&5
10579 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10580 cat >>confdefs.h <<EOF
10581 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10582 EOF
10583
10584 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10585         NCURSES_SBOOL="signed char"
10586 else
10587         NCURSES_SBOOL="char"
10588 fi
10589 echo "$as_me:10589: checking if you want to use signed Boolean array in term.h" >&5
10590 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10591
10592 # Check whether --enable-signed-char or --disable-signed-char was given.
10593 if test "${enable_signed_char+set}" = set; then
10594   enableval="$enable_signed_char"
10595   with_signed_char=$enableval
10596 else
10597   with_signed_char=no
10598 fi;
10599 echo "$as_me:10599: result: $with_signed_char" >&5
10600 echo "${ECHO_T}$with_signed_char" >&6
10601 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10602
10603 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10604 echo "$as_me:10604: checking if you want SIGWINCH handler" >&5
10605 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10606
10607 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10608 if test "${enable_sigwinch+set}" = set; then
10609   enableval="$enable_sigwinch"
10610   with_sigwinch=$enableval
10611 else
10612   with_sigwinch=$with_ext_funcs
10613 fi;
10614 echo "$as_me:10614: result: $with_sigwinch" >&5
10615 echo "${ECHO_T}$with_sigwinch" >&6
10616 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10617 #define USE_SIGWINCH 1
10618 EOF
10619
10620 ###   use option --enable-tcap-names to allow user to define new capabilities
10621 echo "$as_me:10621: checking if you want user-definable terminal capabilities like termcap" >&5
10622 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10623
10624 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10625 if test "${enable_tcap_names+set}" = set; then
10626   enableval="$enable_tcap_names"
10627   with_tcap_names=$enableval
10628 else
10629   with_tcap_names=$with_ext_funcs
10630 fi;
10631 echo "$as_me:10631: result: $with_tcap_names" >&5
10632 echo "${ECHO_T}$with_tcap_names" >&6
10633 NCURSES_XNAMES=0
10634 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10635
10636 ###############################################################################
10637 # These options are relatively safe to experiment with.
10638
10639 echo "$as_me:10639: checking if you want all development code" >&5
10640 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10641
10642 # Check whether --with-develop or --without-develop was given.
10643 if test "${with_develop+set}" = set; then
10644   withval="$with_develop"
10645   with_develop=$withval
10646 else
10647   with_develop=no
10648 fi;
10649 echo "$as_me:10649: result: $with_develop" >&5
10650 echo "${ECHO_T}$with_develop" >&6
10651
10652 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10653 echo "$as_me:10653: checking if you want hard-tabs code" >&5
10654 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10655
10656 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10657 if test "${enable_hard_tabs+set}" = set; then
10658   enableval="$enable_hard_tabs"
10659
10660 else
10661   enable_hard_tabs=$with_develop
10662 fi;
10663 echo "$as_me:10663: result: $enable_hard_tabs" >&5
10664 echo "${ECHO_T}$enable_hard_tabs" >&6
10665 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10666 #define USE_HARD_TABS 1
10667 EOF
10668
10669 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10670 echo "$as_me:10670: checking if you want limited support for xmc" >&5
10671 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10672
10673 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10674 if test "${enable_xmc_glitch+set}" = set; then
10675   enableval="$enable_xmc_glitch"
10676
10677 else
10678   enable_xmc_glitch=$with_develop
10679 fi;
10680 echo "$as_me:10680: result: $enable_xmc_glitch" >&5
10681 echo "${ECHO_T}$enable_xmc_glitch" >&6
10682 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10683 #define USE_XMC_SUPPORT 1
10684 EOF
10685
10686 ###############################################################################
10687 # These are just experimental, probably should not be in a package:
10688
10689 echo "$as_me:10689: checking if you do not want to assume colors are white-on-black" >&5
10690 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10691
10692 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10693 if test "${enable_assumed_color+set}" = set; then
10694   enableval="$enable_assumed_color"
10695   with_assumed_color=$enableval
10696 else
10697   with_assumed_color=yes
10698 fi;
10699 echo "$as_me:10699: result: $with_assumed_color" >&5
10700 echo "${ECHO_T}$with_assumed_color" >&6
10701 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10702 #define USE_ASSUMED_COLOR 1
10703 EOF
10704
10705 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10706 echo "$as_me:10706: checking if you want hashmap scrolling-optimization code" >&5
10707 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10708
10709 # Check whether --enable-hashmap or --disable-hashmap was given.
10710 if test "${enable_hashmap+set}" = set; then
10711   enableval="$enable_hashmap"
10712   with_hashmap=$enableval
10713 else
10714   with_hashmap=yes
10715 fi;
10716 echo "$as_me:10716: result: $with_hashmap" >&5
10717 echo "${ECHO_T}$with_hashmap" >&6
10718 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10719 #define USE_HASHMAP 1
10720 EOF
10721
10722 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10723 echo "$as_me:10723: checking if you want colorfgbg code" >&5
10724 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10725
10726 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10727 if test "${enable_colorfgbg+set}" = set; then
10728   enableval="$enable_colorfgbg"
10729   with_colorfgbg=$enableval
10730 else
10731   with_colorfgbg=no
10732 fi;
10733 echo "$as_me:10733: result: $with_colorfgbg" >&5
10734 echo "${ECHO_T}$with_colorfgbg" >&6
10735 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10736 #define USE_COLORFGBG 1
10737 EOF
10738
10739 ###   use option --enable-interop to turn on use of bindings used for interop
10740 echo "$as_me:10740: checking if you want interop bindings" >&5
10741 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10742
10743 # Check whether --enable-interop or --disable-interop was given.
10744 if test "${enable_interop+set}" = set; then
10745   enableval="$enable_interop"
10746   with_exp_interop=$enableval
10747 else
10748   with_exp_interop=no
10749 fi;
10750 echo "$as_me:10750: result: $with_exp_interop" >&5
10751 echo "${ECHO_T}$with_exp_interop" >&6
10752
10753 NCURSES_INTEROP_FUNCS=0
10754 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10755
10756 # This is still experimental (20080329), but should ultimately be moved to
10757 # the script-block --with-normal, etc.
10758
10759 echo "$as_me:10759: checking if you want to link with the pthread library" >&5
10760 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10761
10762 # Check whether --with-pthread or --without-pthread was given.
10763 if test "${with_pthread+set}" = set; then
10764   withval="$with_pthread"
10765   with_pthread=$withval
10766 else
10767   with_pthread=no
10768 fi;
10769 echo "$as_me:10769: result: $with_pthread" >&5
10770 echo "${ECHO_T}$with_pthread" >&6
10771
10772 if test "$with_pthread" != no ; then
10773     echo "$as_me:10773: checking for pthread.h" >&5
10774 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10775 if test "${ac_cv_header_pthread_h+set}" = set; then
10776   echo $ECHO_N "(cached) $ECHO_C" >&6
10777 else
10778   cat >conftest.$ac_ext <<_ACEOF
10779 #line 10779 "configure"
10780 #include "confdefs.h"
10781 #include <pthread.h>
10782 _ACEOF
10783 if { (eval echo "$as_me:10783: \"$ac_cpp conftest.$ac_ext\"") >&5
10784   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10785   ac_status=$?
10786   egrep -v '^ *\+' conftest.er1 >conftest.err
10787   rm -f conftest.er1
10788   cat conftest.err >&5
10789   echo "$as_me:10789: \$? = $ac_status" >&5
10790   (exit $ac_status); } >/dev/null; then
10791   if test -s conftest.err; then
10792     ac_cpp_err=$ac_c_preproc_warn_flag
10793   else
10794     ac_cpp_err=
10795   fi
10796 else
10797   ac_cpp_err=yes
10798 fi
10799 if test -z "$ac_cpp_err"; then
10800   ac_cv_header_pthread_h=yes
10801 else
10802   echo "$as_me: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   ac_cv_header_pthread_h=no
10805 fi
10806 rm -f conftest.err conftest.$ac_ext
10807 fi
10808 echo "$as_me:10808: result: $ac_cv_header_pthread_h" >&5
10809 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10810 if test $ac_cv_header_pthread_h = yes; then
10811
10812         cat >>confdefs.h <<\EOF
10813 #define HAVE_PTHREADS_H 1
10814 EOF
10815
10816         echo "$as_me:10816: checking if we can link with the pthread library" >&5
10817 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10818         cf_save_LIBS="$LIBS"
10819         LIBS="-lpthread $LIBS"
10820         cat >conftest.$ac_ext <<_ACEOF
10821 #line 10821 "configure"
10822 #include "confdefs.h"
10823
10824 #include <pthread.h>
10825
10826 int
10827 main ()
10828 {
10829
10830         int rc = pthread_create(0,0,0,0);
10831
10832   ;
10833   return 0;
10834 }
10835 _ACEOF
10836 rm -f conftest.$ac_objext conftest$ac_exeext
10837 if { (eval echo "$as_me:10837: \"$ac_link\"") >&5
10838   (eval $ac_link) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit $ac_status); } &&
10842          { ac_try='test -s conftest$ac_exeext'
10843   { (eval echo "$as_me:10843: \"$ac_try\"") >&5
10844   (eval $ac_try) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit $ac_status); }; }; then
10848   with_pthread=yes
10849 else
10850   echo "$as_me: failed program was:" >&5
10851 cat conftest.$ac_ext >&5
10852 with_pthread=no
10853 fi
10854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10855         LIBS="$cf_save_LIBS"
10856         echo "$as_me:10856: result: $with_pthread" >&5
10857 echo "${ECHO_T}$with_pthread" >&6
10858
10859         if test "$with_pthread" = yes ; then
10860             LIBS="-lpthread $LIBS"
10861             cat >>confdefs.h <<\EOF
10862 #define HAVE_LIBPTHREADS 1
10863 EOF
10864
10865         else
10866             { { echo "$as_me:10866: error: Cannot link with pthread library" >&5
10867 echo "$as_me: error: Cannot link with pthread library" >&2;}
10868    { (exit 1); exit 1; }; }
10869         fi
10870
10871 fi
10872
10873 fi
10874
10875 echo "$as_me:10875: checking if you want to allow EINTR in wgetch with pthreads" >&5
10876 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
10877
10878 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
10879 if test "${enable_pthreads_eintr+set}" = set; then
10880   enableval="$enable_pthreads_eintr"
10881   use_pthreads_eintr=$enableval
10882 else
10883   use_pthreads_eintr=no
10884 fi;
10885 echo "$as_me:10885: result: $use_pthreads_eintr" >&5
10886 echo "${ECHO_T}$use_pthreads_eintr" >&6
10887 if test $use_pthreads_eintr = yes ; then
10888     cat >>confdefs.h <<\EOF
10889 #define USE_PTHREADS_EINTR 1
10890 EOF
10891
10892 fi
10893
10894 echo "$as_me:10894: checking if you want to use weak-symbols for pthreads" >&5
10895 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10896
10897 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10898 if test "${enable_weak_symbols+set}" = set; then
10899   enableval="$enable_weak_symbols"
10900   use_weak_symbols=$enableval
10901 else
10902   use_weak_symbols=no
10903 fi;
10904 echo "$as_me:10904: result: $use_weak_symbols" >&5
10905 echo "${ECHO_T}$use_weak_symbols" >&6
10906 if test "$use_weak_symbols" = yes ; then
10907
10908 echo "$as_me:10908: checking if $CC supports weak symbols" >&5
10909 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10910 if test "${cf_cv_weak_symbols+set}" = set; then
10911   echo $ECHO_N "(cached) $ECHO_C" >&6
10912 else
10913
10914 cat >conftest.$ac_ext <<_ACEOF
10915 #line 10915 "configure"
10916 #include "confdefs.h"
10917
10918 #include <stdio.h>
10919 int
10920 main ()
10921 {
10922
10923 #if defined(__GNUC__)
10924 #  if defined __USE_ISOC99
10925 #    define _cat_pragma(exp)    _Pragma(#exp)
10926 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10927 #  else
10928 #    define _weak_pragma(exp)
10929 #  endif
10930 #  define _declare(name)        __extension__ extern __typeof__(name) name
10931 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10932 #endif
10933
10934 weak_symbol(fopen);
10935
10936   ;
10937   return 0;
10938 }
10939 _ACEOF
10940 rm -f conftest.$ac_objext
10941 if { (eval echo "$as_me:10941: \"$ac_compile\"") >&5
10942   (eval $ac_compile) 2>&5
10943   ac_status=$?
10944   echo "$as_me:10944: \$? = $ac_status" >&5
10945   (exit $ac_status); } &&
10946          { ac_try='test -s conftest.$ac_objext'
10947   { (eval echo "$as_me:10947: \"$ac_try\"") >&5
10948   (eval $ac_try) 2>&5
10949   ac_status=$?
10950   echo "$as_me:10950: \$? = $ac_status" >&5
10951   (exit $ac_status); }; }; then
10952   cf_cv_weak_symbols=yes
10953 else
10954   echo "$as_me: failed program was:" >&5
10955 cat conftest.$ac_ext >&5
10956 cf_cv_weak_symbols=no
10957 fi
10958 rm -f conftest.$ac_objext conftest.$ac_ext
10959
10960 fi
10961 echo "$as_me:10961: result: $cf_cv_weak_symbols" >&5
10962 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10963
10964 else
10965     cf_cv_weak_symbols=no
10966 fi
10967
10968 if test $cf_cv_weak_symbols = yes ; then
10969     cat >>confdefs.h <<\EOF
10970 #define USE_WEAK_SYMBOLS 1
10971 EOF
10972
10973 fi
10974
10975 PTHREAD=
10976 if test "$with_pthread" = "yes" ; then
10977     cat >>confdefs.h <<\EOF
10978 #define USE_PTHREADS 1
10979 EOF
10980
10981     enable_reentrant=yes
10982     if test $cf_cv_weak_symbols = yes ; then
10983         PTHREAD=-lpthread
10984     fi
10985 fi
10986
10987 # Reentrant code has to be opaque; there's little advantage to making ncurses
10988 # opaque outside of that, so there is no --enable-opaque option.  We can use
10989 # this option without --with-pthreads, but this will be always set for
10990 # pthreads.
10991 echo "$as_me:10991: checking if you want experimental reentrant code" >&5
10992 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10993
10994 # Check whether --enable-reentrant or --disable-reentrant was given.
10995 if test "${enable_reentrant+set}" = set; then
10996   enableval="$enable_reentrant"
10997   with_reentrant=$enableval
10998 else
10999   with_reentrant=no
11000 fi;
11001 echo "$as_me:11001: result: $with_reentrant" >&5
11002 echo "${ECHO_T}$with_reentrant" >&6
11003 if test "$with_reentrant" = yes ; then
11004         cf_cv_enable_reentrant=1
11005         cf_cv_enable_opaque="NCURSES_INTERNALS"
11006         NCURSES_OPAQUE=1
11007         NCURSES_SIZE_T=int
11008         if test $cf_cv_weak_symbols = yes ; then
11009
11010 # remove pthread library from $LIBS
11011 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11012
11013                 TEST_LIBS="-lpthread $TEST_LIBS"
11014                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11015         fi
11016         LIB_SUFFIX="t${LIB_SUFFIX}"
11017         cat >>confdefs.h <<\EOF
11018 #define USE_REENTRANT 1
11019 EOF
11020
11021 if test "${with_abi_version+set}" != set; then
11022         case $cf_cv_rel_version in
11023         5.*)
11024                 cf_cv_rel_version=6.0
11025                 cf_cv_abi_version=6
11026                 { echo "$as_me:11026: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11027 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11028                 ;;
11029         esac
11030 fi
11031
11032 else
11033         cf_cv_enable_reentrant=0
11034         cf_cv_enable_opaque="NCURSES_OPAQUE"
11035         NCURSES_OPAQUE=0
11036         NCURSES_SIZE_T=short
11037 fi
11038
11039 ### Allow using a different wrap-prefix
11040 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11041         echo "$as_me:11041: checking for prefix used to wrap public variables" >&5
11042 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11043
11044 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11045 if test "${with_wrap_prefix+set}" = set; then
11046   withval="$with_wrap_prefix"
11047   NCURSES_WRAP_PREFIX=$withval
11048 else
11049   NCURSES_WRAP_PREFIX=_nc_
11050 fi;
11051         echo "$as_me:11051: result: $NCURSES_WRAP_PREFIX" >&5
11052 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11053 else
11054         NCURSES_WRAP_PREFIX=_nc_
11055 fi
11056
11057 cat >>confdefs.h <<EOF
11058 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11059 EOF
11060
11061 echo "$as_me:11061: checking if you want experimental safe-sprintf code" >&5
11062 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11063
11064 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11065 if test "${enable_safe_sprintf+set}" = set; then
11066   enableval="$enable_safe_sprintf"
11067   with_safe_sprintf=$enableval
11068 else
11069   with_safe_sprintf=no
11070 fi;
11071 echo "$as_me:11071: result: $with_safe_sprintf" >&5
11072 echo "${ECHO_T}$with_safe_sprintf" >&6
11073 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11074 #define USE_SAFE_SPRINTF 1
11075 EOF
11076
11077 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11078 # when hashmap is used scroll hints are useless
11079 if test "$with_hashmap" = no ; then
11080 echo "$as_me:11080: checking if you want to experiment without scrolling-hints code" >&5
11081 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11082
11083 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11084 if test "${enable_scroll_hints+set}" = set; then
11085   enableval="$enable_scroll_hints"
11086   with_scroll_hints=$enableval
11087 else
11088   with_scroll_hints=yes
11089 fi;
11090 echo "$as_me:11090: result: $with_scroll_hints" >&5
11091 echo "${ECHO_T}$with_scroll_hints" >&6
11092 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11093 #define USE_SCROLL_HINTS 1
11094 EOF
11095
11096 fi
11097
11098 echo "$as_me:11098: checking if you want experimental wgetch-events code" >&5
11099 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11100
11101 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11102 if test "${enable_wgetch_events+set}" = set; then
11103   enableval="$enable_wgetch_events"
11104   with_wgetch_events=$enableval
11105 else
11106   with_wgetch_events=no
11107 fi;
11108 echo "$as_me:11108: result: $with_wgetch_events" >&5
11109 echo "${ECHO_T}$with_wgetch_events" >&6
11110 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11111 #define NCURSES_WGETCH_EVENTS 1
11112 EOF
11113
11114 ###############################################################################
11115
11116 ###     use option --disable-echo to suppress full display compiling commands
11117 echo "$as_me:11117: checking if you want to display full commands during build" >&5
11118 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11119
11120 # Check whether --enable-echo or --disable-echo was given.
11121 if test "${enable_echo+set}" = set; then
11122   enableval="$enable_echo"
11123   with_echo=$enableval
11124 else
11125   with_echo=yes
11126 fi;
11127 if test "$with_echo" = yes; then
11128         ECHO_LINK=
11129 else
11130         ECHO_LINK='@ echo linking $@ ... ;'
11131         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11132         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11133 fi
11134 echo "$as_me:11134: result: $with_echo" >&5
11135 echo "${ECHO_T}$with_echo" >&6
11136
11137 ###     use option --enable-warnings to turn on all gcc warnings
11138 echo "$as_me:11138: checking if you want to see compiler warnings" >&5
11139 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11140
11141 # Check whether --enable-warnings or --disable-warnings was given.
11142 if test "${enable_warnings+set}" = set; then
11143   enableval="$enable_warnings"
11144   with_warnings=$enableval
11145 fi;
11146 echo "$as_me:11146: result: $with_warnings" >&5
11147 echo "${ECHO_T}$with_warnings" >&6
11148
11149 if test "x$with_warnings" = "xyes"; then
11150
11151         ADAFLAGS="$ADAFLAGS -gnatg"
11152
11153 INTEL_COMPILER=no
11154
11155 if test "$GCC" = yes ; then
11156         case $host_os in
11157         linux*|gnu*)
11158                 echo "$as_me:11158: checking if this is really Intel C compiler" >&5
11159 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11160                 cf_save_CFLAGS="$CFLAGS"
11161                 CFLAGS="$CFLAGS -no-gcc"
11162                 cat >conftest.$ac_ext <<_ACEOF
11163 #line 11163 "configure"
11164 #include "confdefs.h"
11165
11166 int
11167 main ()
11168 {
11169
11170 #ifdef __INTEL_COMPILER
11171 #else
11172 make an error
11173 #endif
11174
11175   ;
11176   return 0;
11177 }
11178 _ACEOF
11179 rm -f conftest.$ac_objext
11180 if { (eval echo "$as_me:11180: \"$ac_compile\"") >&5
11181   (eval $ac_compile) 2>&5
11182   ac_status=$?
11183   echo "$as_me:11183: \$? = $ac_status" >&5
11184   (exit $ac_status); } &&
11185          { ac_try='test -s conftest.$ac_objext'
11186   { (eval echo "$as_me:11186: \"$ac_try\"") >&5
11187   (eval $ac_try) 2>&5
11188   ac_status=$?
11189   echo "$as_me:11189: \$? = $ac_status" >&5
11190   (exit $ac_status); }; }; then
11191   INTEL_COMPILER=yes
11192 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11193
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 cat conftest.$ac_ext >&5
11197 fi
11198 rm -f conftest.$ac_objext conftest.$ac_ext
11199                 CFLAGS="$cf_save_CFLAGS"
11200                 echo "$as_me:11200: result: $INTEL_COMPILER" >&5
11201 echo "${ECHO_T}$INTEL_COMPILER" >&6
11202                 ;;
11203         esac
11204 fi
11205
11206 cat > conftest.$ac_ext <<EOF
11207 #line 11207 "${as_me-configure}"
11208 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11209 EOF
11210
11211 if test "$INTEL_COMPILER" = yes
11212 then
11213 # The "-wdXXX" options suppress warnings:
11214 # remark #1419: external declaration in primary source file
11215 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11216 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11217 # remark #193: zero used for undefined preprocessing identifier
11218 # remark #593: variable "curs_sb_left_arrow" was set but never used
11219 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11220 # remark #869: parameter "tw" was never referenced
11221 # remark #981: operands are evaluated in unspecified order
11222 # warning #279: controlling expression is constant
11223
11224         { echo "$as_me:11224: checking for $CC warning options..." >&5
11225 echo "$as_me: checking for $CC warning options..." >&6;}
11226         cf_save_CFLAGS="$CFLAGS"
11227         EXTRA_CFLAGS="-Wall"
11228         for cf_opt in \
11229                 wd1419 \
11230                 wd1683 \
11231                 wd1684 \
11232                 wd193 \
11233                 wd593 \
11234                 wd279 \
11235                 wd810 \
11236                 wd869 \
11237                 wd981
11238         do
11239                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11240                 if { (eval echo "$as_me:11240: \"$ac_compile\"") >&5
11241   (eval $ac_compile) 2>&5
11242   ac_status=$?
11243   echo "$as_me:11243: \$? = $ac_status" >&5
11244   (exit $ac_status); }; then
11245                         test -n "$verbose" && echo "$as_me:11245: result: ... -$cf_opt" >&5
11246 echo "${ECHO_T}... -$cf_opt" >&6
11247                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11248                 fi
11249         done
11250         CFLAGS="$cf_save_CFLAGS"
11251
11252 elif test "$GCC" = yes
11253 then
11254         { echo "$as_me:11254: checking for $CC warning options..." >&5
11255 echo "$as_me: checking for $CC warning options..." >&6;}
11256         cf_save_CFLAGS="$CFLAGS"
11257         EXTRA_CFLAGS=
11258         cf_warn_CONST=""
11259         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11260         for cf_opt in W Wall \
11261                 Wbad-function-cast \
11262                 Wcast-align \
11263                 Wcast-qual \
11264                 Winline \
11265                 Wmissing-declarations \
11266                 Wmissing-prototypes \
11267                 Wnested-externs \
11268                 Wpointer-arith \
11269                 Wshadow \
11270                 Wstrict-prototypes \
11271                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11272         do
11273                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11274                 if { (eval echo "$as_me:11274: \"$ac_compile\"") >&5
11275   (eval $ac_compile) 2>&5
11276   ac_status=$?
11277   echo "$as_me:11277: \$? = $ac_status" >&5
11278   (exit $ac_status); }; then
11279                         test -n "$verbose" && echo "$as_me:11279: result: ... -$cf_opt" >&5
11280 echo "${ECHO_T}... -$cf_opt" >&6
11281                         case $cf_opt in #(vi
11282                         Wcast-qual) #(vi
11283                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11284                                 ;;
11285                         Winline) #(vi
11286                                 case $GCC_VERSION in
11287                                 [34].*)
11288                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11289
11290 echo "${as_me-configure}:11290: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11291
11292                                         continue;;
11293                                 esac
11294                                 ;;
11295                         esac
11296                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11297                 fi
11298         done
11299         CFLAGS="$cf_save_CFLAGS"
11300 fi
11301 rm -rf conftest*
11302
11303         if test "$cf_with_cxx" = yes ; then
11304
11305 INTEL_CPLUSPLUS=no
11306
11307 if test "$GCC" = yes ; then
11308         case $host_os in
11309         linux*|gnu*)
11310                 echo "$as_me:11310: checking if this is really Intel C++ compiler" >&5
11311 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11312                 cf_save_CFLAGS="$CXXFLAGS"
11313                 CXXFLAGS="$CXXFLAGS -no-gcc"
11314                 cat >conftest.$ac_ext <<_ACEOF
11315 #line 11315 "configure"
11316 #include "confdefs.h"
11317
11318 int
11319 main ()
11320 {
11321
11322 #ifdef __INTEL_COMPILER
11323 #else
11324 make an error
11325 #endif
11326
11327   ;
11328   return 0;
11329 }
11330 _ACEOF
11331 rm -f conftest.$ac_objext
11332 if { (eval echo "$as_me:11332: \"$ac_compile\"") >&5
11333   (eval $ac_compile) 2>&5
11334   ac_status=$?
11335   echo "$as_me:11335: \$? = $ac_status" >&5
11336   (exit $ac_status); } &&
11337          { ac_try='test -s conftest.$ac_objext'
11338   { (eval echo "$as_me:11338: \"$ac_try\"") >&5
11339   (eval $ac_try) 2>&5
11340   ac_status=$?
11341   echo "$as_me:11341: \$? = $ac_status" >&5
11342   (exit $ac_status); }; }; then
11343   INTEL_CPLUSPLUS=yes
11344 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11345
11346 else
11347   echo "$as_me: failed program was:" >&5
11348 cat conftest.$ac_ext >&5
11349 fi
11350 rm -f conftest.$ac_objext conftest.$ac_ext
11351                 CXXFLAGS="$cf_save_CFLAGS"
11352                 echo "$as_me:11352: result: $INTEL_CPLUSPLUS" >&5
11353 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11354                 ;;
11355         esac
11356 fi
11357
11358 ac_ext=cc
11359 ac_cpp='$CXXCPP $CPPFLAGS'
11360 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11361 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11362 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11363 ac_main_return=return
11364
11365 cat > conftest.$ac_ext <<EOF
11366 #line 11366 "configure"
11367 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11368 EOF
11369
11370 if test "$INTEL_CPLUSPLUS" = yes
11371 then
11372 # The "-wdXXX" options suppress warnings:
11373 # remark #1419: external declaration in primary source file
11374 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11375 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11376 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11377 # remark #193: zero used for undefined preprocessing identifier
11378 # remark #593: variable "curs_sb_left_arrow" was set but never used
11379 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11380 # remark #869: parameter "tw" was never referenced
11381 # remark #981: operands are evaluated in unspecified order
11382 # warning #269: invalid format string conversion
11383
11384         { echo "$as_me:11384: checking for $CC warning options..." >&5
11385 echo "$as_me: checking for $CC warning options..." >&6;}
11386         cf_save_CXXFLAGS="$CXXFLAGS"
11387         EXTRA_CXXFLAGS="-Wall"
11388         for cf_opt in \
11389                 wd1419 \
11390                 wd1682 \
11391                 wd1683 \
11392                 wd1684 \
11393                 wd193 \
11394                 wd279 \
11395                 wd593 \
11396                 wd810 \
11397                 wd869 \
11398                 wd981
11399         do
11400                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11401                 if { (eval echo "$as_me:11401: \"$ac_compile\"") >&5
11402   (eval $ac_compile) 2>&5
11403   ac_status=$?
11404   echo "$as_me:11404: \$? = $ac_status" >&5
11405   (exit $ac_status); }; then
11406                         test -n "$verbose" && echo "$as_me:11406: result: ... -$cf_opt" >&5
11407 echo "${ECHO_T}... -$cf_opt" >&6
11408                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11409                 fi
11410         done
11411         CXXFLAGS="$cf_save_CXXFLAGS"
11412
11413 elif test "$GXX" = yes
11414 then
11415         { echo "$as_me:11415: checking for $CXX warning options..." >&5
11416 echo "$as_me: checking for $CXX warning options..." >&6;}
11417         cf_save_CXXFLAGS="$CXXFLAGS"
11418         EXTRA_CXXFLAGS="-W -Wall"
11419         cf_gxx_extra_warnings=""
11420         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11421         case "$GCC_VERSION" in
11422         [1-2].*)
11423                 ;;
11424         *)
11425                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11426                 ;;
11427         esac
11428         for cf_opt in \
11429                 Wabi \
11430                 fabi-version=0 \
11431                 Woverloaded-virtual \
11432                 Wsign-promo \
11433                 Wsynth \
11434                 Wold-style-cast \
11435                 Wcast-align \
11436                 Wcast-qual \
11437                 Wmissing-prototypes \
11438                 Wpointer-arith \
11439                 Wshadow \
11440                 Wstrict-prototypes \
11441                 Wundef $cf_gxx_extra_warnings Wno-unused
11442         do
11443                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11444                 if { (eval echo "$as_me:11444: \"$ac_compile\"") >&5
11445   (eval $ac_compile) 2>&5
11446   ac_status=$?
11447   echo "$as_me:11447: \$? = $ac_status" >&5
11448   (exit $ac_status); }; then
11449                         test -n "$verbose" && echo "$as_me:11449: result: ... -$cf_opt" >&5
11450 echo "${ECHO_T}... -$cf_opt" >&6
11451                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11452                 else
11453                         test -n "$verbose" && echo "$as_me:11453: result: ... no -$cf_opt" >&5
11454 echo "${ECHO_T}... no -$cf_opt" >&6
11455                 fi
11456         done
11457         CXXFLAGS="$cf_save_CXXFLAGS"
11458 fi
11459
11460 rm -rf conftest*
11461 ac_ext=c
11462 ac_cpp='$CPP $CPPFLAGS'
11463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11466 ac_main_return=return
11467
11468         fi
11469 fi
11470
11471 if test "$GCC" = yes
11472 then
11473 cat > conftest.i <<EOF
11474 #ifndef GCC_PRINTF
11475 #define GCC_PRINTF 0
11476 #endif
11477 #ifndef GCC_SCANF
11478 #define GCC_SCANF 0
11479 #endif
11480 #ifndef GCC_NORETURN
11481 #define GCC_NORETURN /* nothing */
11482 #endif
11483 #ifndef GCC_UNUSED
11484 #define GCC_UNUSED /* nothing */
11485 #endif
11486 EOF
11487 if test "$GCC" = yes
11488 then
11489         { echo "$as_me:11489: checking for $CC __attribute__ directives..." >&5
11490 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11491 cat > conftest.$ac_ext <<EOF
11492 #line 11492 "${as_me-configure}"
11493 #include "confdefs.h"
11494 #include "conftest.h"
11495 #include "conftest.i"
11496 #if     GCC_PRINTF
11497 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11498 #else
11499 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11500 #endif
11501 #if     GCC_SCANF
11502 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11503 #else
11504 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11505 #endif
11506 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11507 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11508 extern void foo(void) GCC_NORETURN;
11509 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11510 EOF
11511         cf_printf_attribute=no
11512         cf_scanf_attribute=no
11513         for cf_attribute in scanf printf unused noreturn
11514         do
11515
11516 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11517
11518                 cf_directive="__attribute__(($cf_attribute))"
11519                 echo "checking for $CC $cf_directive" 1>&5
11520
11521                 case $cf_attribute in #(vi
11522                 printf) #(vi
11523                         cf_printf_attribute=yes
11524                         cat >conftest.h <<EOF
11525 #define GCC_$cf_ATTRIBUTE 1
11526 EOF
11527                         ;;
11528                 scanf) #(vi
11529                         cf_scanf_attribute=yes
11530                         cat >conftest.h <<EOF
11531 #define GCC_$cf_ATTRIBUTE 1
11532 EOF
11533                         ;;
11534                 *) #(vi
11535                         cat >conftest.h <<EOF
11536 #define GCC_$cf_ATTRIBUTE $cf_directive
11537 EOF
11538                         ;;
11539                 esac
11540
11541                 if { (eval echo "$as_me:11541: \"$ac_compile\"") >&5
11542   (eval $ac_compile) 2>&5
11543   ac_status=$?
11544   echo "$as_me:11544: \$? = $ac_status" >&5
11545   (exit $ac_status); }; then
11546                         test -n "$verbose" && echo "$as_me:11546: result: ... $cf_attribute" >&5
11547 echo "${ECHO_T}... $cf_attribute" >&6
11548                         cat conftest.h >>confdefs.h
11549                         case $cf_attribute in #(vi
11550                         printf) #(vi
11551                                 if test "$cf_printf_attribute" = no ; then
11552                                         cat >>confdefs.h <<EOF
11553 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11554 EOF
11555                                 else
11556                                         cat >>confdefs.h <<EOF
11557 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11558 EOF
11559                                 fi
11560                                 ;;
11561                         scanf) #(vi
11562                                 if test "$cf_scanf_attribute" = no ; then
11563                                         cat >>confdefs.h <<EOF
11564 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11565 EOF
11566                                 else
11567                                         cat >>confdefs.h <<EOF
11568 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11569 EOF
11570                                 fi
11571                                 ;;
11572                         esac
11573                 fi
11574         done
11575 else
11576         fgrep define conftest.i >>confdefs.h
11577 fi
11578 rm -rf conftest*
11579 fi
11580
11581 ###     use option --enable-assertions to turn on generation of assertion code
11582 echo "$as_me:11582: checking if you want to enable runtime assertions" >&5
11583 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11584
11585 # Check whether --enable-assertions or --disable-assertions was given.
11586 if test "${enable_assertions+set}" = set; then
11587   enableval="$enable_assertions"
11588   with_assertions=$enableval
11589 else
11590   with_assertions=no
11591 fi;
11592 echo "$as_me:11592: result: $with_assertions" >&5
11593 echo "${ECHO_T}$with_assertions" >&6
11594 if test -n "$GCC"
11595 then
11596         if test "$with_assertions" = no
11597         then
11598                 cat >>confdefs.h <<\EOF
11599 #define NDEBUG 1
11600 EOF
11601
11602                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11603         else
11604
11605         ADAFLAGS="$ADAFLAGS -gnata"
11606
11607         fi
11608 fi
11609
11610 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11611
11612 echo "$as_me:11612: checking if you want to use dmalloc for testing" >&5
11613 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11614
11615 # Check whether --with-dmalloc or --without-dmalloc was given.
11616 if test "${with_dmalloc+set}" = set; then
11617   withval="$with_dmalloc"
11618   cat >>confdefs.h <<\EOF
11619 #define USE_DMALLOC 1
11620 EOF
11621
11622         : ${with_cflags:=-g}
11623         : ${with_no_leaks:=yes}
11624          with_dmalloc=yes
11625 else
11626   with_dmalloc=
11627 fi;
11628 echo "$as_me:11628: result: ${with_dmalloc:-no}" >&5
11629 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11630
11631 case .$with_cflags in #(vi
11632 .*-g*)
11633         case .$CFLAGS in #(vi
11634         .*-g*) #(vi
11635                 ;;
11636         *)
11637
11638 cf_fix_cppflags=no
11639 cf_new_cflags=
11640 cf_new_cppflags=
11641 cf_new_extra_cppflags=
11642
11643 for cf_add_cflags in -g
11644 do
11645 case $cf_fix_cppflags in
11646 no)
11647         case $cf_add_cflags in #(vi
11648         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11649                 case $cf_add_cflags in
11650                 -D*)
11651                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11652
11653                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11654                                 && test -z "${cf_tst_cflags}" \
11655                                 && cf_fix_cppflags=yes
11656
11657                         if test $cf_fix_cppflags = yes ; then
11658                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11659                                 continue
11660                         elif test "${cf_tst_cflags}" = "\"'" ; then
11661                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11662                                 continue
11663                         fi
11664                         ;;
11665                 esac
11666                 case "$CPPFLAGS" in
11667                 *$cf_add_cflags) #(vi
11668                         ;;
11669                 *) #(vi
11670                         case $cf_add_cflags in #(vi
11671                         -D*)
11672                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11673
11674 CPPFLAGS=`echo "$CPPFLAGS" | \
11675         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11676                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11677
11678                                 ;;
11679                         esac
11680                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11681                         ;;
11682                 esac
11683                 ;;
11684         *)
11685                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11686                 ;;
11687         esac
11688         ;;
11689 yes)
11690         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11691
11692         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11693
11694         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11695                 && test -z "${cf_tst_cflags}" \
11696                 && cf_fix_cppflags=no
11697         ;;
11698 esac
11699 done
11700
11701 if test -n "$cf_new_cflags" ; then
11702
11703         CFLAGS="$CFLAGS $cf_new_cflags"
11704 fi
11705
11706 if test -n "$cf_new_cppflags" ; then
11707
11708         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11709 fi
11710
11711 if test -n "$cf_new_extra_cppflags" ; then
11712
11713         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11714 fi
11715
11716                 ;;
11717         esac
11718         ;;
11719 esac
11720
11721 if test "$with_dmalloc" = yes ; then
11722         echo "$as_me:11722: checking for dmalloc.h" >&5
11723 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11724 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11725   echo $ECHO_N "(cached) $ECHO_C" >&6
11726 else
11727   cat >conftest.$ac_ext <<_ACEOF
11728 #line 11728 "configure"
11729 #include "confdefs.h"
11730 #include <dmalloc.h>
11731 _ACEOF
11732 if { (eval echo "$as_me:11732: \"$ac_cpp conftest.$ac_ext\"") >&5
11733   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11734   ac_status=$?
11735   egrep -v '^ *\+' conftest.er1 >conftest.err
11736   rm -f conftest.er1
11737   cat conftest.err >&5
11738   echo "$as_me:11738: \$? = $ac_status" >&5
11739   (exit $ac_status); } >/dev/null; then
11740   if test -s conftest.err; then
11741     ac_cpp_err=$ac_c_preproc_warn_flag
11742   else
11743     ac_cpp_err=
11744   fi
11745 else
11746   ac_cpp_err=yes
11747 fi
11748 if test -z "$ac_cpp_err"; then
11749   ac_cv_header_dmalloc_h=yes
11750 else
11751   echo "$as_me: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   ac_cv_header_dmalloc_h=no
11754 fi
11755 rm -f conftest.err conftest.$ac_ext
11756 fi
11757 echo "$as_me:11757: result: $ac_cv_header_dmalloc_h" >&5
11758 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11759 if test $ac_cv_header_dmalloc_h = yes; then
11760
11761 echo "$as_me:11761: checking for dmalloc_debug in -ldmalloc" >&5
11762 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11763 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11764   echo $ECHO_N "(cached) $ECHO_C" >&6
11765 else
11766   ac_check_lib_save_LIBS=$LIBS
11767 LIBS="-ldmalloc  $LIBS"
11768 cat >conftest.$ac_ext <<_ACEOF
11769 #line 11769 "configure"
11770 #include "confdefs.h"
11771
11772 /* Override any gcc2 internal prototype to avoid an error.  */
11773 #ifdef __cplusplus
11774 extern "C"
11775 #endif
11776 /* We use char because int might match the return type of a gcc2
11777    builtin and then its argument prototype would still apply.  */
11778 char dmalloc_debug ();
11779 int
11780 main ()
11781 {
11782 dmalloc_debug ();
11783   ;
11784   return 0;
11785 }
11786 _ACEOF
11787 rm -f conftest.$ac_objext conftest$ac_exeext
11788 if { (eval echo "$as_me:11788: \"$ac_link\"") >&5
11789   (eval $ac_link) 2>&5
11790   ac_status=$?
11791   echo "$as_me:11791: \$? = $ac_status" >&5
11792   (exit $ac_status); } &&
11793          { ac_try='test -s conftest$ac_exeext'
11794   { (eval echo "$as_me:11794: \"$ac_try\"") >&5
11795   (eval $ac_try) 2>&5
11796   ac_status=$?
11797   echo "$as_me:11797: \$? = $ac_status" >&5
11798   (exit $ac_status); }; }; then
11799   ac_cv_lib_dmalloc_dmalloc_debug=yes
11800 else
11801   echo "$as_me: failed program was:" >&5
11802 cat conftest.$ac_ext >&5
11803 ac_cv_lib_dmalloc_dmalloc_debug=no
11804 fi
11805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11806 LIBS=$ac_check_lib_save_LIBS
11807 fi
11808 echo "$as_me:11808: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11809 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11810 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11811   cat >>confdefs.h <<EOF
11812 #define HAVE_LIBDMALLOC 1
11813 EOF
11814
11815   LIBS="-ldmalloc $LIBS"
11816
11817 fi
11818
11819 fi
11820
11821 fi
11822
11823 echo "$as_me:11823: checking if you want to use dbmalloc for testing" >&5
11824 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11825
11826 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11827 if test "${with_dbmalloc+set}" = set; then
11828   withval="$with_dbmalloc"
11829   cat >>confdefs.h <<\EOF
11830 #define USE_DBMALLOC 1
11831 EOF
11832
11833         : ${with_cflags:=-g}
11834         : ${with_no_leaks:=yes}
11835          with_dbmalloc=yes
11836 else
11837   with_dbmalloc=
11838 fi;
11839 echo "$as_me:11839: result: ${with_dbmalloc:-no}" >&5
11840 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11841
11842 case .$with_cflags in #(vi
11843 .*-g*)
11844         case .$CFLAGS in #(vi
11845         .*-g*) #(vi
11846                 ;;
11847         *)
11848
11849 cf_fix_cppflags=no
11850 cf_new_cflags=
11851 cf_new_cppflags=
11852 cf_new_extra_cppflags=
11853
11854 for cf_add_cflags in -g
11855 do
11856 case $cf_fix_cppflags in
11857 no)
11858         case $cf_add_cflags in #(vi
11859         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11860                 case $cf_add_cflags in
11861                 -D*)
11862                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11863
11864                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11865                                 && test -z "${cf_tst_cflags}" \
11866                                 && cf_fix_cppflags=yes
11867
11868                         if test $cf_fix_cppflags = yes ; then
11869                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11870                                 continue
11871                         elif test "${cf_tst_cflags}" = "\"'" ; then
11872                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11873                                 continue
11874                         fi
11875                         ;;
11876                 esac
11877                 case "$CPPFLAGS" in
11878                 *$cf_add_cflags) #(vi
11879                         ;;
11880                 *) #(vi
11881                         case $cf_add_cflags in #(vi
11882                         -D*)
11883                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11884
11885 CPPFLAGS=`echo "$CPPFLAGS" | \
11886         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11887                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11888
11889                                 ;;
11890                         esac
11891                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11892                         ;;
11893                 esac
11894                 ;;
11895         *)
11896                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11897                 ;;
11898         esac
11899         ;;
11900 yes)
11901         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11902
11903         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11904
11905         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11906                 && test -z "${cf_tst_cflags}" \
11907                 && cf_fix_cppflags=no
11908         ;;
11909 esac
11910 done
11911
11912 if test -n "$cf_new_cflags" ; then
11913
11914         CFLAGS="$CFLAGS $cf_new_cflags"
11915 fi
11916
11917 if test -n "$cf_new_cppflags" ; then
11918
11919         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11920 fi
11921
11922 if test -n "$cf_new_extra_cppflags" ; then
11923
11924         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11925 fi
11926
11927                 ;;
11928         esac
11929         ;;
11930 esac
11931
11932 if test "$with_dbmalloc" = yes ; then
11933         echo "$as_me:11933: checking for dbmalloc.h" >&5
11934 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11935 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11936   echo $ECHO_N "(cached) $ECHO_C" >&6
11937 else
11938   cat >conftest.$ac_ext <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11941 #include <dbmalloc.h>
11942 _ACEOF
11943 if { (eval echo "$as_me:11943: \"$ac_cpp conftest.$ac_ext\"") >&5
11944   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11945   ac_status=$?
11946   egrep -v '^ *\+' conftest.er1 >conftest.err
11947   rm -f conftest.er1
11948   cat conftest.err >&5
11949   echo "$as_me:11949: \$? = $ac_status" >&5
11950   (exit $ac_status); } >/dev/null; then
11951   if test -s conftest.err; then
11952     ac_cpp_err=$ac_c_preproc_warn_flag
11953   else
11954     ac_cpp_err=
11955   fi
11956 else
11957   ac_cpp_err=yes
11958 fi
11959 if test -z "$ac_cpp_err"; then
11960   ac_cv_header_dbmalloc_h=yes
11961 else
11962   echo "$as_me: failed program was:" >&5
11963   cat conftest.$ac_ext >&5
11964   ac_cv_header_dbmalloc_h=no
11965 fi
11966 rm -f conftest.err conftest.$ac_ext
11967 fi
11968 echo "$as_me:11968: result: $ac_cv_header_dbmalloc_h" >&5
11969 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11970 if test $ac_cv_header_dbmalloc_h = yes; then
11971
11972 echo "$as_me:11972: checking for debug_malloc in -ldbmalloc" >&5
11973 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11974 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11975   echo $ECHO_N "(cached) $ECHO_C" >&6
11976 else
11977   ac_check_lib_save_LIBS=$LIBS
11978 LIBS="-ldbmalloc  $LIBS"
11979 cat >conftest.$ac_ext <<_ACEOF
11980 #line 11980 "configure"
11981 #include "confdefs.h"
11982
11983 /* Override any gcc2 internal prototype to avoid an error.  */
11984 #ifdef __cplusplus
11985 extern "C"
11986 #endif
11987 /* We use char because int might match the return type of a gcc2
11988    builtin and then its argument prototype would still apply.  */
11989 char debug_malloc ();
11990 int
11991 main ()
11992 {
11993 debug_malloc ();
11994   ;
11995   return 0;
11996 }
11997 _ACEOF
11998 rm -f conftest.$ac_objext conftest$ac_exeext
11999 if { (eval echo "$as_me:11999: \"$ac_link\"") >&5
12000   (eval $ac_link) 2>&5
12001   ac_status=$?
12002   echo "$as_me:12002: \$? = $ac_status" >&5
12003   (exit $ac_status); } &&
12004          { ac_try='test -s conftest$ac_exeext'
12005   { (eval echo "$as_me:12005: \"$ac_try\"") >&5
12006   (eval $ac_try) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); }; }; then
12010   ac_cv_lib_dbmalloc_debug_malloc=yes
12011 else
12012   echo "$as_me: failed program was:" >&5
12013 cat conftest.$ac_ext >&5
12014 ac_cv_lib_dbmalloc_debug_malloc=no
12015 fi
12016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12017 LIBS=$ac_check_lib_save_LIBS
12018 fi
12019 echo "$as_me:12019: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12020 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12021 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12022   cat >>confdefs.h <<EOF
12023 #define HAVE_LIBDBMALLOC 1
12024 EOF
12025
12026   LIBS="-ldbmalloc $LIBS"
12027
12028 fi
12029
12030 fi
12031
12032 fi
12033
12034 echo "$as_me:12034: checking if you want to use valgrind for testing" >&5
12035 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12036
12037 # Check whether --with-valgrind or --without-valgrind was given.
12038 if test "${with_valgrind+set}" = set; then
12039   withval="$with_valgrind"
12040   cat >>confdefs.h <<\EOF
12041 #define USE_VALGRIND 1
12042 EOF
12043
12044         : ${with_cflags:=-g}
12045         : ${with_no_leaks:=yes}
12046          with_valgrind=yes
12047 else
12048   with_valgrind=
12049 fi;
12050 echo "$as_me:12050: result: ${with_valgrind:-no}" >&5
12051 echo "${ECHO_T}${with_valgrind:-no}" >&6
12052
12053 case .$with_cflags in #(vi
12054 .*-g*)
12055         case .$CFLAGS in #(vi
12056         .*-g*) #(vi
12057                 ;;
12058         *)
12059
12060 cf_fix_cppflags=no
12061 cf_new_cflags=
12062 cf_new_cppflags=
12063 cf_new_extra_cppflags=
12064
12065 for cf_add_cflags in -g
12066 do
12067 case $cf_fix_cppflags in
12068 no)
12069         case $cf_add_cflags in #(vi
12070         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12071                 case $cf_add_cflags in
12072                 -D*)
12073                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12074
12075                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12076                                 && test -z "${cf_tst_cflags}" \
12077                                 && cf_fix_cppflags=yes
12078
12079                         if test $cf_fix_cppflags = yes ; then
12080                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12081                                 continue
12082                         elif test "${cf_tst_cflags}" = "\"'" ; then
12083                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12084                                 continue
12085                         fi
12086                         ;;
12087                 esac
12088                 case "$CPPFLAGS" in
12089                 *$cf_add_cflags) #(vi
12090                         ;;
12091                 *) #(vi
12092                         case $cf_add_cflags in #(vi
12093                         -D*)
12094                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12095
12096 CPPFLAGS=`echo "$CPPFLAGS" | \
12097         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12098                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12099
12100                                 ;;
12101                         esac
12102                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12103                         ;;
12104                 esac
12105                 ;;
12106         *)
12107                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12108                 ;;
12109         esac
12110         ;;
12111 yes)
12112         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12113
12114         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12115
12116         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12117                 && test -z "${cf_tst_cflags}" \
12118                 && cf_fix_cppflags=no
12119         ;;
12120 esac
12121 done
12122
12123 if test -n "$cf_new_cflags" ; then
12124
12125         CFLAGS="$CFLAGS $cf_new_cflags"
12126 fi
12127
12128 if test -n "$cf_new_cppflags" ; then
12129
12130         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12131 fi
12132
12133 if test -n "$cf_new_extra_cppflags" ; then
12134
12135         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12136 fi
12137
12138                 ;;
12139         esac
12140         ;;
12141 esac
12142
12143 echo "$as_me:12143: checking if you want to perform memory-leak testing" >&5
12144 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12145
12146 # Check whether --enable-leaks or --disable-leaks was given.
12147 if test "${enable_leaks+set}" = set; then
12148   enableval="$enable_leaks"
12149   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12150 else
12151   : ${with_no_leaks:=no}
12152 fi;
12153 echo "$as_me:12153: result: $with_no_leaks" >&5
12154 echo "${ECHO_T}$with_no_leaks" >&6
12155
12156 if test "$with_no_leaks" = yes ; then
12157         cat >>confdefs.h <<\EOF
12158 #define NO_LEAKS 1
12159 EOF
12160
12161         cat >>confdefs.h <<\EOF
12162 #define YY_NO_LEAKS 1
12163 EOF
12164
12165 fi
12166
12167 cat >>confdefs.h <<\EOF
12168 #define HAVE_NC_ALLOC_H 1
12169 EOF
12170
12171 ###     use option --enable-expanded to generate certain macros as functions
12172
12173 # Check whether --enable-expanded or --disable-expanded was given.
12174 if test "${enable_expanded+set}" = set; then
12175   enableval="$enable_expanded"
12176   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12177 #define NCURSES_EXPANDED 1
12178 EOF
12179
12180 fi;
12181
12182 ###     use option --disable-macros to suppress macros in favor of functions
12183
12184 # Check whether --enable-macros or --disable-macros was given.
12185 if test "${enable_macros+set}" = set; then
12186   enableval="$enable_macros"
12187   test "$enableval" = no && cat >>confdefs.h <<\EOF
12188 #define NCURSES_NOMACROS 1
12189 EOF
12190
12191 fi;
12192
12193 # Normally we only add trace() to the debug-library.  Allow this to be
12194 # extended to all models of the ncurses library:
12195 cf_all_traces=no
12196 case "$CFLAGS $CPPFLAGS" in
12197 *-DTRACE*)
12198         cf_all_traces=yes
12199         ;;
12200 esac
12201
12202 echo "$as_me:12202: checking whether to add trace feature to all models" >&5
12203 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12204
12205 # Check whether --with-trace or --without-trace was given.
12206 if test "${with_trace+set}" = set; then
12207   withval="$with_trace"
12208   cf_with_trace=$withval
12209 else
12210   cf_with_trace=$cf_all_traces
12211 fi;
12212 echo "$as_me:12212: result: $cf_with_trace" >&5
12213 echo "${ECHO_T}$cf_with_trace" >&6
12214
12215 if test "$cf_with_trace" = yes ; then
12216         LIB_TRACING=all
12217         ADA_TRACE=TRUE
12218
12219 cf_fix_cppflags=no
12220 cf_new_cflags=
12221 cf_new_cppflags=
12222 cf_new_extra_cppflags=
12223
12224 for cf_add_cflags in -DTRACE
12225 do
12226 case $cf_fix_cppflags in
12227 no)
12228         case $cf_add_cflags in #(vi
12229         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12230                 case $cf_add_cflags in
12231                 -D*)
12232                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12233
12234                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12235                                 && test -z "${cf_tst_cflags}" \
12236                                 && cf_fix_cppflags=yes
12237
12238                         if test $cf_fix_cppflags = yes ; then
12239                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12240                                 continue
12241                         elif test "${cf_tst_cflags}" = "\"'" ; then
12242                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12243                                 continue
12244                         fi
12245                         ;;
12246                 esac
12247                 case "$CPPFLAGS" in
12248                 *$cf_add_cflags) #(vi
12249                         ;;
12250                 *) #(vi
12251                         case $cf_add_cflags in #(vi
12252                         -D*)
12253                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12254
12255 CPPFLAGS=`echo "$CPPFLAGS" | \
12256         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12257                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12258
12259                                 ;;
12260                         esac
12261                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12262                         ;;
12263                 esac
12264                 ;;
12265         *)
12266                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12267                 ;;
12268         esac
12269         ;;
12270 yes)
12271         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12272
12273         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12274
12275         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12276                 && test -z "${cf_tst_cflags}" \
12277                 && cf_fix_cppflags=no
12278         ;;
12279 esac
12280 done
12281
12282 if test -n "$cf_new_cflags" ; then
12283
12284         CFLAGS="$CFLAGS $cf_new_cflags"
12285 fi
12286
12287 if test -n "$cf_new_cppflags" ; then
12288
12289         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12290 fi
12291
12292 if test -n "$cf_new_extra_cppflags" ; then
12293
12294         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12295 fi
12296
12297 else
12298         LIB_TRACING=DEBUG
12299         ADA_TRACE=FALSE
12300 fi
12301
12302 ###     Checks for libraries.
12303 case $cf_cv_system_name in #(vi
12304 *mingw32*) #(vi
12305         ;;
12306 *)
12307 echo "$as_me:12307: checking for gettimeofday" >&5
12308 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12309 if test "${ac_cv_func_gettimeofday+set}" = set; then
12310   echo $ECHO_N "(cached) $ECHO_C" >&6
12311 else
12312   cat >conftest.$ac_ext <<_ACEOF
12313 #line 12313 "configure"
12314 #include "confdefs.h"
12315 /* System header to define __stub macros and hopefully few prototypes,
12316     which can conflict with char gettimeofday (); below.  */
12317 #include <assert.h>
12318 /* Override any gcc2 internal prototype to avoid an error.  */
12319 #ifdef __cplusplus
12320 extern "C"
12321 #endif
12322 /* We use char because int might match the return type of a gcc2
12323    builtin and then its argument prototype would still apply.  */
12324 char gettimeofday ();
12325 char (*f) ();
12326
12327 int
12328 main ()
12329 {
12330 /* The GNU C library defines this for functions which it implements
12331     to always fail with ENOSYS.  Some functions are actually named
12332     something starting with __ and the normal name is an alias.  */
12333 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12334 choke me
12335 #else
12336 f = gettimeofday;
12337 #endif
12338
12339   ;
12340   return 0;
12341 }
12342 _ACEOF
12343 rm -f conftest.$ac_objext conftest$ac_exeext
12344 if { (eval echo "$as_me:12344: \"$ac_link\"") >&5
12345   (eval $ac_link) 2>&5
12346   ac_status=$?
12347   echo "$as_me:12347: \$? = $ac_status" >&5
12348   (exit $ac_status); } &&
12349          { ac_try='test -s conftest$ac_exeext'
12350   { (eval echo "$as_me:12350: \"$ac_try\"") >&5
12351   (eval $ac_try) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); }; }; then
12355   ac_cv_func_gettimeofday=yes
12356 else
12357   echo "$as_me: failed program was:" >&5
12358 cat conftest.$ac_ext >&5
12359 ac_cv_func_gettimeofday=no
12360 fi
12361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12362 fi
12363 echo "$as_me:12363: result: $ac_cv_func_gettimeofday" >&5
12364 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12365 if test $ac_cv_func_gettimeofday = yes; then
12366   cat >>confdefs.h <<\EOF
12367 #define HAVE_GETTIMEOFDAY 1
12368 EOF
12369
12370 else
12371
12372 echo "$as_me:12372: checking for gettimeofday in -lbsd" >&5
12373 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12374 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12375   echo $ECHO_N "(cached) $ECHO_C" >&6
12376 else
12377   ac_check_lib_save_LIBS=$LIBS
12378 LIBS="-lbsd  $LIBS"
12379 cat >conftest.$ac_ext <<_ACEOF
12380 #line 12380 "configure"
12381 #include "confdefs.h"
12382
12383 /* Override any gcc2 internal prototype to avoid an error.  */
12384 #ifdef __cplusplus
12385 extern "C"
12386 #endif
12387 /* We use char because int might match the return type of a gcc2
12388    builtin and then its argument prototype would still apply.  */
12389 char gettimeofday ();
12390 int
12391 main ()
12392 {
12393 gettimeofday ();
12394   ;
12395   return 0;
12396 }
12397 _ACEOF
12398 rm -f conftest.$ac_objext conftest$ac_exeext
12399 if { (eval echo "$as_me:12399: \"$ac_link\"") >&5
12400   (eval $ac_link) 2>&5
12401   ac_status=$?
12402   echo "$as_me:12402: \$? = $ac_status" >&5
12403   (exit $ac_status); } &&
12404          { ac_try='test -s conftest$ac_exeext'
12405   { (eval echo "$as_me:12405: \"$ac_try\"") >&5
12406   (eval $ac_try) 2>&5
12407   ac_status=$?
12408   echo "$as_me:12408: \$? = $ac_status" >&5
12409   (exit $ac_status); }; }; then
12410   ac_cv_lib_bsd_gettimeofday=yes
12411 else
12412   echo "$as_me: failed program was:" >&5
12413 cat conftest.$ac_ext >&5
12414 ac_cv_lib_bsd_gettimeofday=no
12415 fi
12416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12417 LIBS=$ac_check_lib_save_LIBS
12418 fi
12419 echo "$as_me:12419: result: $ac_cv_lib_bsd_gettimeofday" >&5
12420 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12421 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12422   cat >>confdefs.h <<\EOF
12423 #define HAVE_GETTIMEOFDAY 1
12424 EOF
12425
12426         LIBS="-lbsd $LIBS"
12427 fi
12428
12429 fi
12430         ;;
12431 esac
12432
12433 echo "$as_me:12433: checking if -lm needed for math functions" >&5
12434 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12435 if test "${cf_cv_need_libm+set}" = set; then
12436   echo $ECHO_N "(cached) $ECHO_C" >&6
12437 else
12438
12439         cat >conftest.$ac_ext <<_ACEOF
12440 #line 12440 "configure"
12441 #include "confdefs.h"
12442
12443         #include <stdio.h>
12444         #include <math.h>
12445
12446 int
12447 main ()
12448 {
12449 double x = rand(); printf("result = %g\n", sin(x))
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 rm -f conftest.$ac_objext conftest$ac_exeext
12455 if { (eval echo "$as_me:12455: \"$ac_link\"") >&5
12456   (eval $ac_link) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); } &&
12460          { ac_try='test -s conftest$ac_exeext'
12461   { (eval echo "$as_me:12461: \"$ac_try\"") >&5
12462   (eval $ac_try) 2>&5
12463   ac_status=$?
12464   echo "$as_me:12464: \$? = $ac_status" >&5
12465   (exit $ac_status); }; }; then
12466   cf_cv_need_libm=no
12467 else
12468   echo "$as_me: failed program was:" >&5
12469 cat conftest.$ac_ext >&5
12470 cf_cv_need_libm=yes
12471 fi
12472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12473 fi
12474 echo "$as_me:12474: result: $cf_cv_need_libm" >&5
12475 echo "${ECHO_T}$cf_cv_need_libm" >&6
12476 if test "$cf_cv_need_libm" = yes
12477 then
12478 MATH_LIB=-lm
12479 fi
12480
12481 ###     Checks for header files.
12482 echo "$as_me:12482: checking for ANSI C header files" >&5
12483 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12484 if test "${ac_cv_header_stdc+set}" = set; then
12485   echo $ECHO_N "(cached) $ECHO_C" >&6
12486 else
12487   cat >conftest.$ac_ext <<_ACEOF
12488 #line 12488 "configure"
12489 #include "confdefs.h"
12490 #include <stdlib.h>
12491 #include <stdarg.h>
12492 #include <string.h>
12493 #include <float.h>
12494
12495 _ACEOF
12496 if { (eval echo "$as_me:12496: \"$ac_cpp conftest.$ac_ext\"") >&5
12497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12498   ac_status=$?
12499   egrep -v '^ *\+' conftest.er1 >conftest.err
12500   rm -f conftest.er1
12501   cat conftest.err >&5
12502   echo "$as_me:12502: \$? = $ac_status" >&5
12503   (exit $ac_status); } >/dev/null; then
12504   if test -s conftest.err; then
12505     ac_cpp_err=$ac_c_preproc_warn_flag
12506   else
12507     ac_cpp_err=
12508   fi
12509 else
12510   ac_cpp_err=yes
12511 fi
12512 if test -z "$ac_cpp_err"; then
12513   ac_cv_header_stdc=yes
12514 else
12515   echo "$as_me: failed program was:" >&5
12516   cat conftest.$ac_ext >&5
12517   ac_cv_header_stdc=no
12518 fi
12519 rm -f conftest.err conftest.$ac_ext
12520
12521 if test $ac_cv_header_stdc = yes; then
12522   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12523   cat >conftest.$ac_ext <<_ACEOF
12524 #line 12524 "configure"
12525 #include "confdefs.h"
12526 #include <string.h>
12527
12528 _ACEOF
12529 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12530   egrep "memchr" >/dev/null 2>&1; then
12531   :
12532 else
12533   ac_cv_header_stdc=no
12534 fi
12535 rm -rf conftest*
12536
12537 fi
12538
12539 if test $ac_cv_header_stdc = yes; then
12540   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12541   cat >conftest.$ac_ext <<_ACEOF
12542 #line 12542 "configure"
12543 #include "confdefs.h"
12544 #include <stdlib.h>
12545
12546 _ACEOF
12547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12548   egrep "free" >/dev/null 2>&1; then
12549   :
12550 else
12551   ac_cv_header_stdc=no
12552 fi
12553 rm -rf conftest*
12554
12555 fi
12556
12557 if test $ac_cv_header_stdc = yes; then
12558   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12559   if test "$cross_compiling" = yes; then
12560   :
12561 else
12562   cat >conftest.$ac_ext <<_ACEOF
12563 #line 12563 "configure"
12564 #include "confdefs.h"
12565 #include <ctype.h>
12566 #if ((' ' & 0x0FF) == 0x020)
12567 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12568 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12569 #else
12570 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12571                      || ('j' <= (c) && (c) <= 'r') \
12572                      || ('s' <= (c) && (c) <= 'z'))
12573 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12574 #endif
12575
12576 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12577 int
12578 main ()
12579 {
12580   int i;
12581   for (i = 0; i < 256; i++)
12582     if (XOR (islower (i), ISLOWER (i))
12583         || toupper (i) != TOUPPER (i))
12584       $ac_main_return(2);
12585   $ac_main_return (0);
12586 }
12587 _ACEOF
12588 rm -f conftest$ac_exeext
12589 if { (eval echo "$as_me:12589: \"$ac_link\"") >&5
12590   (eval $ac_link) 2>&5
12591   ac_status=$?
12592   echo "$as_me:12592: \$? = $ac_status" >&5
12593   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12594   { (eval echo "$as_me:12594: \"$ac_try\"") >&5
12595   (eval $ac_try) 2>&5
12596   ac_status=$?
12597   echo "$as_me:12597: \$? = $ac_status" >&5
12598   (exit $ac_status); }; }; then
12599   :
12600 else
12601   echo "$as_me: program exited with status $ac_status" >&5
12602 echo "$as_me: failed program was:" >&5
12603 cat conftest.$ac_ext >&5
12604 ac_cv_header_stdc=no
12605 fi
12606 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12607 fi
12608 fi
12609 fi
12610 echo "$as_me:12610: result: $ac_cv_header_stdc" >&5
12611 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12612 if test $ac_cv_header_stdc = yes; then
12613
12614 cat >>confdefs.h <<\EOF
12615 #define STDC_HEADERS 1
12616 EOF
12617
12618 fi
12619
12620 ac_header_dirent=no
12621 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12622   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12623 echo "$as_me:12623: checking for $ac_hdr that defines DIR" >&5
12624 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12625 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12626   echo $ECHO_N "(cached) $ECHO_C" >&6
12627 else
12628   cat >conftest.$ac_ext <<_ACEOF
12629 #line 12629 "configure"
12630 #include "confdefs.h"
12631 #include <sys/types.h>
12632 #include <$ac_hdr>
12633
12634 int
12635 main ()
12636 {
12637 if ((DIR *) 0)
12638 return 0;
12639   ;
12640   return 0;
12641 }
12642 _ACEOF
12643 rm -f conftest.$ac_objext
12644 if { (eval echo "$as_me:12644: \"$ac_compile\"") >&5
12645   (eval $ac_compile) 2>&5
12646   ac_status=$?
12647   echo "$as_me:12647: \$? = $ac_status" >&5
12648   (exit $ac_status); } &&
12649          { ac_try='test -s conftest.$ac_objext'
12650   { (eval echo "$as_me:12650: \"$ac_try\"") >&5
12651   (eval $ac_try) 2>&5
12652   ac_status=$?
12653   echo "$as_me:12653: \$? = $ac_status" >&5
12654   (exit $ac_status); }; }; then
12655   eval "$as_ac_Header=yes"
12656 else
12657   echo "$as_me: failed program was:" >&5
12658 cat conftest.$ac_ext >&5
12659 eval "$as_ac_Header=no"
12660 fi
12661 rm -f conftest.$ac_objext conftest.$ac_ext
12662 fi
12663 echo "$as_me:12663: result: `eval echo '${'$as_ac_Header'}'`" >&5
12664 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12665 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12666   cat >>confdefs.h <<EOF
12667 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12668 EOF
12669
12670 ac_header_dirent=$ac_hdr; break
12671 fi
12672
12673 done
12674 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12675 if test $ac_header_dirent = dirent.h; then
12676   echo "$as_me:12676: checking for opendir in -ldir" >&5
12677 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12678 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12679   echo $ECHO_N "(cached) $ECHO_C" >&6
12680 else
12681   ac_check_lib_save_LIBS=$LIBS
12682 LIBS="-ldir  $LIBS"
12683 cat >conftest.$ac_ext <<_ACEOF
12684 #line 12684 "configure"
12685 #include "confdefs.h"
12686
12687 /* Override any gcc2 internal prototype to avoid an error.  */
12688 #ifdef __cplusplus
12689 extern "C"
12690 #endif
12691 /* We use char because int might match the return type of a gcc2
12692    builtin and then its argument prototype would still apply.  */
12693 char opendir ();
12694 int
12695 main ()
12696 {
12697 opendir ();
12698   ;
12699   return 0;
12700 }
12701 _ACEOF
12702 rm -f conftest.$ac_objext conftest$ac_exeext
12703 if { (eval echo "$as_me:12703: \"$ac_link\"") >&5
12704   (eval $ac_link) 2>&5
12705   ac_status=$?
12706   echo "$as_me:12706: \$? = $ac_status" >&5
12707   (exit $ac_status); } &&
12708          { ac_try='test -s conftest$ac_exeext'
12709   { (eval echo "$as_me:12709: \"$ac_try\"") >&5
12710   (eval $ac_try) 2>&5
12711   ac_status=$?
12712   echo "$as_me:12712: \$? = $ac_status" >&5
12713   (exit $ac_status); }; }; then
12714   ac_cv_lib_dir_opendir=yes
12715 else
12716   echo "$as_me: failed program was:" >&5
12717 cat conftest.$ac_ext >&5
12718 ac_cv_lib_dir_opendir=no
12719 fi
12720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12721 LIBS=$ac_check_lib_save_LIBS
12722 fi
12723 echo "$as_me:12723: result: $ac_cv_lib_dir_opendir" >&5
12724 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12725 if test $ac_cv_lib_dir_opendir = yes; then
12726   LIBS="$LIBS -ldir"
12727 fi
12728
12729 else
12730   echo "$as_me:12730: checking for opendir in -lx" >&5
12731 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12732 if test "${ac_cv_lib_x_opendir+set}" = set; then
12733   echo $ECHO_N "(cached) $ECHO_C" >&6
12734 else
12735   ac_check_lib_save_LIBS=$LIBS
12736 LIBS="-lx  $LIBS"
12737 cat >conftest.$ac_ext <<_ACEOF
12738 #line 12738 "configure"
12739 #include "confdefs.h"
12740
12741 /* Override any gcc2 internal prototype to avoid an error.  */
12742 #ifdef __cplusplus
12743 extern "C"
12744 #endif
12745 /* We use char because int might match the return type of a gcc2
12746    builtin and then its argument prototype would still apply.  */
12747 char opendir ();
12748 int
12749 main ()
12750 {
12751 opendir ();
12752   ;
12753   return 0;
12754 }
12755 _ACEOF
12756 rm -f conftest.$ac_objext conftest$ac_exeext
12757 if { (eval echo "$as_me:12757: \"$ac_link\"") >&5
12758   (eval $ac_link) 2>&5
12759   ac_status=$?
12760   echo "$as_me:12760: \$? = $ac_status" >&5
12761   (exit $ac_status); } &&
12762          { ac_try='test -s conftest$ac_exeext'
12763   { (eval echo "$as_me:12763: \"$ac_try\"") >&5
12764   (eval $ac_try) 2>&5
12765   ac_status=$?
12766   echo "$as_me:12766: \$? = $ac_status" >&5
12767   (exit $ac_status); }; }; then
12768   ac_cv_lib_x_opendir=yes
12769 else
12770   echo "$as_me: failed program was:" >&5
12771 cat conftest.$ac_ext >&5
12772 ac_cv_lib_x_opendir=no
12773 fi
12774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12775 LIBS=$ac_check_lib_save_LIBS
12776 fi
12777 echo "$as_me:12777: result: $ac_cv_lib_x_opendir" >&5
12778 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12779 if test $ac_cv_lib_x_opendir = yes; then
12780   LIBS="$LIBS -lx"
12781 fi
12782
12783 fi
12784
12785 echo "$as_me:12785: checking whether time.h and sys/time.h may both be included" >&5
12786 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12787 if test "${ac_cv_header_time+set}" = set; then
12788   echo $ECHO_N "(cached) $ECHO_C" >&6
12789 else
12790   cat >conftest.$ac_ext <<_ACEOF
12791 #line 12791 "configure"
12792 #include "confdefs.h"
12793 #include <sys/types.h>
12794 #include <sys/time.h>
12795 #include <time.h>
12796
12797 int
12798 main ()
12799 {
12800 if ((struct tm *) 0)
12801 return 0;
12802   ;
12803   return 0;
12804 }
12805 _ACEOF
12806 rm -f conftest.$ac_objext
12807 if { (eval echo "$as_me:12807: \"$ac_compile\"") >&5
12808   (eval $ac_compile) 2>&5
12809   ac_status=$?
12810   echo "$as_me:12810: \$? = $ac_status" >&5
12811   (exit $ac_status); } &&
12812          { ac_try='test -s conftest.$ac_objext'
12813   { (eval echo "$as_me:12813: \"$ac_try\"") >&5
12814   (eval $ac_try) 2>&5
12815   ac_status=$?
12816   echo "$as_me:12816: \$? = $ac_status" >&5
12817   (exit $ac_status); }; }; then
12818   ac_cv_header_time=yes
12819 else
12820   echo "$as_me: failed program was:" >&5
12821 cat conftest.$ac_ext >&5
12822 ac_cv_header_time=no
12823 fi
12824 rm -f conftest.$ac_objext conftest.$ac_ext
12825 fi
12826 echo "$as_me:12826: result: $ac_cv_header_time" >&5
12827 echo "${ECHO_T}$ac_cv_header_time" >&6
12828 if test $ac_cv_header_time = yes; then
12829
12830 cat >>confdefs.h <<\EOF
12831 #define TIME_WITH_SYS_TIME 1
12832 EOF
12833
12834 fi
12835
12836 cf_regex_func=no
12837
12838 cf_regex_libs="regex re"
12839 case $host_os in #(vi
12840 mingw*)
12841         cf_regex_libs="regex.dll $cf_regex_libs"
12842         ;;
12843 esac
12844
12845 echo "$as_me:12845: checking for regcomp" >&5
12846 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12847 if test "${ac_cv_func_regcomp+set}" = set; then
12848   echo $ECHO_N "(cached) $ECHO_C" >&6
12849 else
12850   cat >conftest.$ac_ext <<_ACEOF
12851 #line 12851 "configure"
12852 #include "confdefs.h"
12853 /* System header to define __stub macros and hopefully few prototypes,
12854     which can conflict with char regcomp (); below.  */
12855 #include <assert.h>
12856 /* Override any gcc2 internal prototype to avoid an error.  */
12857 #ifdef __cplusplus
12858 extern "C"
12859 #endif
12860 /* We use char because int might match the return type of a gcc2
12861    builtin and then its argument prototype would still apply.  */
12862 char regcomp ();
12863 char (*f) ();
12864
12865 int
12866 main ()
12867 {
12868 /* The GNU C library defines this for functions which it implements
12869     to always fail with ENOSYS.  Some functions are actually named
12870     something starting with __ and the normal name is an alias.  */
12871 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12872 choke me
12873 #else
12874 f = regcomp;
12875 #endif
12876
12877   ;
12878   return 0;
12879 }
12880 _ACEOF
12881 rm -f conftest.$ac_objext conftest$ac_exeext
12882 if { (eval echo "$as_me:12882: \"$ac_link\"") >&5
12883   (eval $ac_link) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); } &&
12887          { ac_try='test -s conftest$ac_exeext'
12888   { (eval echo "$as_me:12888: \"$ac_try\"") >&5
12889   (eval $ac_try) 2>&5
12890   ac_status=$?
12891   echo "$as_me:12891: \$? = $ac_status" >&5
12892   (exit $ac_status); }; }; then
12893   ac_cv_func_regcomp=yes
12894 else
12895   echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12897 ac_cv_func_regcomp=no
12898 fi
12899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12900 fi
12901 echo "$as_me:12901: result: $ac_cv_func_regcomp" >&5
12902 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12903 if test $ac_cv_func_regcomp = yes; then
12904   cf_regex_func=regcomp
12905 else
12906
12907         for cf_regex_lib in $cf_regex_libs
12908         do
12909                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12910 echo "$as_me:12910: checking for regcomp in -l$cf_regex_lib" >&5
12911 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12912 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12913   echo $ECHO_N "(cached) $ECHO_C" >&6
12914 else
12915   ac_check_lib_save_LIBS=$LIBS
12916 LIBS="-l$cf_regex_lib  $LIBS"
12917 cat >conftest.$ac_ext <<_ACEOF
12918 #line 12918 "configure"
12919 #include "confdefs.h"
12920
12921 /* Override any gcc2 internal prototype to avoid an error.  */
12922 #ifdef __cplusplus
12923 extern "C"
12924 #endif
12925 /* We use char because int might match the return type of a gcc2
12926    builtin and then its argument prototype would still apply.  */
12927 char regcomp ();
12928 int
12929 main ()
12930 {
12931 regcomp ();
12932   ;
12933   return 0;
12934 }
12935 _ACEOF
12936 rm -f conftest.$ac_objext conftest$ac_exeext
12937 if { (eval echo "$as_me:12937: \"$ac_link\"") >&5
12938   (eval $ac_link) 2>&5
12939   ac_status=$?
12940   echo "$as_me:12940: \$? = $ac_status" >&5
12941   (exit $ac_status); } &&
12942          { ac_try='test -s conftest$ac_exeext'
12943   { (eval echo "$as_me:12943: \"$ac_try\"") >&5
12944   (eval $ac_try) 2>&5
12945   ac_status=$?
12946   echo "$as_me:12946: \$? = $ac_status" >&5
12947   (exit $ac_status); }; }; then
12948   eval "$as_ac_Lib=yes"
12949 else
12950   echo "$as_me: failed program was:" >&5
12951 cat conftest.$ac_ext >&5
12952 eval "$as_ac_Lib=no"
12953 fi
12954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12955 LIBS=$ac_check_lib_save_LIBS
12956 fi
12957 echo "$as_me:12957: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12958 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12959 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12960
12961                                 LIBS="-l$cf_regex_lib $LIBS"
12962                                 cf_regex_func=regcomp
12963                                 break
12964 fi
12965
12966         done
12967
12968 fi
12969
12970 if test "$cf_regex_func" = no ; then
12971         echo "$as_me:12971: checking for compile" >&5
12972 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12973 if test "${ac_cv_func_compile+set}" = set; then
12974   echo $ECHO_N "(cached) $ECHO_C" >&6
12975 else
12976   cat >conftest.$ac_ext <<_ACEOF
12977 #line 12977 "configure"
12978 #include "confdefs.h"
12979 /* System header to define __stub macros and hopefully few prototypes,
12980     which can conflict with char compile (); below.  */
12981 #include <assert.h>
12982 /* Override any gcc2 internal prototype to avoid an error.  */
12983 #ifdef __cplusplus
12984 extern "C"
12985 #endif
12986 /* We use char because int might match the return type of a gcc2
12987    builtin and then its argument prototype would still apply.  */
12988 char compile ();
12989 char (*f) ();
12990
12991 int
12992 main ()
12993 {
12994 /* The GNU C library defines this for functions which it implements
12995     to always fail with ENOSYS.  Some functions are actually named
12996     something starting with __ and the normal name is an alias.  */
12997 #if defined (__stub_compile) || defined (__stub___compile)
12998 choke me
12999 #else
13000 f = compile;
13001 #endif
13002
13003   ;
13004   return 0;
13005 }
13006 _ACEOF
13007 rm -f conftest.$ac_objext conftest$ac_exeext
13008 if { (eval echo "$as_me:13008: \"$ac_link\"") >&5
13009   (eval $ac_link) 2>&5
13010   ac_status=$?
13011   echo "$as_me:13011: \$? = $ac_status" >&5
13012   (exit $ac_status); } &&
13013          { ac_try='test -s conftest$ac_exeext'
13014   { (eval echo "$as_me:13014: \"$ac_try\"") >&5
13015   (eval $ac_try) 2>&5
13016   ac_status=$?
13017   echo "$as_me:13017: \$? = $ac_status" >&5
13018   (exit $ac_status); }; }; then
13019   ac_cv_func_compile=yes
13020 else
13021   echo "$as_me: failed program was:" >&5
13022 cat conftest.$ac_ext >&5
13023 ac_cv_func_compile=no
13024 fi
13025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13026 fi
13027 echo "$as_me:13027: result: $ac_cv_func_compile" >&5
13028 echo "${ECHO_T}$ac_cv_func_compile" >&6
13029 if test $ac_cv_func_compile = yes; then
13030   cf_regex_func=compile
13031 else
13032
13033                 echo "$as_me:13033: checking for compile in -lgen" >&5
13034 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13035 if test "${ac_cv_lib_gen_compile+set}" = set; then
13036   echo $ECHO_N "(cached) $ECHO_C" >&6
13037 else
13038   ac_check_lib_save_LIBS=$LIBS
13039 LIBS="-lgen  $LIBS"
13040 cat >conftest.$ac_ext <<_ACEOF
13041 #line 13041 "configure"
13042 #include "confdefs.h"
13043
13044 /* Override any gcc2 internal prototype to avoid an error.  */
13045 #ifdef __cplusplus
13046 extern "C"
13047 #endif
13048 /* We use char because int might match the return type of a gcc2
13049    builtin and then its argument prototype would still apply.  */
13050 char compile ();
13051 int
13052 main ()
13053 {
13054 compile ();
13055   ;
13056   return 0;
13057 }
13058 _ACEOF
13059 rm -f conftest.$ac_objext conftest$ac_exeext
13060 if { (eval echo "$as_me:13060: \"$ac_link\"") >&5
13061   (eval $ac_link) 2>&5
13062   ac_status=$?
13063   echo "$as_me:13063: \$? = $ac_status" >&5
13064   (exit $ac_status); } &&
13065          { ac_try='test -s conftest$ac_exeext'
13066   { (eval echo "$as_me:13066: \"$ac_try\"") >&5
13067   (eval $ac_try) 2>&5
13068   ac_status=$?
13069   echo "$as_me:13069: \$? = $ac_status" >&5
13070   (exit $ac_status); }; }; then
13071   ac_cv_lib_gen_compile=yes
13072 else
13073   echo "$as_me: failed program was:" >&5
13074 cat conftest.$ac_ext >&5
13075 ac_cv_lib_gen_compile=no
13076 fi
13077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13078 LIBS=$ac_check_lib_save_LIBS
13079 fi
13080 echo "$as_me:13080: result: $ac_cv_lib_gen_compile" >&5
13081 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13082 if test $ac_cv_lib_gen_compile = yes; then
13083
13084                                 LIBS="-lgen $LIBS"
13085                                 cf_regex_func=compile
13086 fi
13087
13088 fi
13089
13090 fi
13091
13092 if test "$cf_regex_func" = no ; then
13093         { echo "$as_me:13093: WARNING: cannot find regular expression library" >&5
13094 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13095 fi
13096
13097 echo "$as_me:13097: checking for regular-expression headers" >&5
13098 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13099 if test "${cf_cv_regex_hdrs+set}" = set; then
13100   echo $ECHO_N "(cached) $ECHO_C" >&6
13101 else
13102
13103 cf_cv_regex_hdrs=no
13104 case $cf_regex_func in #(vi
13105 compile) #(vi
13106         for cf_regex_hdr in regexp.h regexpr.h
13107         do
13108                 cat >conftest.$ac_ext <<_ACEOF
13109 #line 13109 "configure"
13110 #include "confdefs.h"
13111 #include <$cf_regex_hdr>
13112 int
13113 main ()
13114 {
13115
13116                         char *p = compile("", "", "", 0);
13117                         int x = step("", "");
13118
13119   ;
13120   return 0;
13121 }
13122 _ACEOF
13123 rm -f conftest.$ac_objext conftest$ac_exeext
13124 if { (eval echo "$as_me:13124: \"$ac_link\"") >&5
13125   (eval $ac_link) 2>&5
13126   ac_status=$?
13127   echo "$as_me:13127: \$? = $ac_status" >&5
13128   (exit $ac_status); } &&
13129          { ac_try='test -s conftest$ac_exeext'
13130   { (eval echo "$as_me:13130: \"$ac_try\"") >&5
13131   (eval $ac_try) 2>&5
13132   ac_status=$?
13133   echo "$as_me:13133: \$? = $ac_status" >&5
13134   (exit $ac_status); }; }; then
13135
13136                         cf_cv_regex_hdrs=$cf_regex_hdr
13137                         break
13138
13139 else
13140   echo "$as_me: failed program was:" >&5
13141 cat conftest.$ac_ext >&5
13142 fi
13143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13144         done
13145         ;;
13146 *)
13147         for cf_regex_hdr in regex.h
13148         do
13149                 cat >conftest.$ac_ext <<_ACEOF
13150 #line 13150 "configure"
13151 #include "confdefs.h"
13152 #include <sys/types.h>
13153 #include <$cf_regex_hdr>
13154 int
13155 main ()
13156 {
13157
13158                         regex_t *p;
13159                         int x = regcomp(p, "", 0);
13160                         int y = regexec(p, "", 0, 0, 0);
13161                         regfree(p);
13162
13163   ;
13164   return 0;
13165 }
13166 _ACEOF
13167 rm -f conftest.$ac_objext conftest$ac_exeext
13168 if { (eval echo "$as_me:13168: \"$ac_link\"") >&5
13169   (eval $ac_link) 2>&5
13170   ac_status=$?
13171   echo "$as_me:13171: \$? = $ac_status" >&5
13172   (exit $ac_status); } &&
13173          { ac_try='test -s conftest$ac_exeext'
13174   { (eval echo "$as_me:13174: \"$ac_try\"") >&5
13175   (eval $ac_try) 2>&5
13176   ac_status=$?
13177   echo "$as_me:13177: \$? = $ac_status" >&5
13178   (exit $ac_status); }; }; then
13179
13180                         cf_cv_regex_hdrs=$cf_regex_hdr
13181                         break
13182
13183 else
13184   echo "$as_me: failed program was:" >&5
13185 cat conftest.$ac_ext >&5
13186 fi
13187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13188         done
13189         ;;
13190 esac
13191
13192 fi
13193 echo "$as_me:13193: result: $cf_cv_regex_hdrs" >&5
13194 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13195
13196 case $cf_cv_regex_hdrs in #(vi
13197     no)        { echo "$as_me:13197: WARNING: no regular expression header found" >&5
13198 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13199     regex.h)   cat >>confdefs.h <<\EOF
13200 #define HAVE_REGEX_H_FUNCS 1
13201 EOF
13202  ;; #(vi
13203     regexp.h)  cat >>confdefs.h <<\EOF
13204 #define HAVE_REGEXP_H_FUNCS 1
13205 EOF
13206  ;; #(vi
13207     regexpr.h) cat >>confdefs.h <<\EOF
13208 #define HAVE_REGEXPR_H_FUNCS 1
13209 EOF
13210  ;;
13211 esac
13212
13213 for ac_header in \
13214 fcntl.h \
13215 getopt.h \
13216 limits.h \
13217 locale.h \
13218 poll.h \
13219 sys/bsdtypes.h \
13220 sys/ioctl.h \
13221 sys/param.h \
13222 sys/poll.h \
13223 sys/select.h \
13224 sys/time.h \
13225 sys/times.h \
13226 ttyent.h \
13227 unistd.h \
13228 wctype.h \
13229
13230 do
13231 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13232 echo "$as_me:13232: checking for $ac_header" >&5
13233 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13234 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13235   echo $ECHO_N "(cached) $ECHO_C" >&6
13236 else
13237   cat >conftest.$ac_ext <<_ACEOF
13238 #line 13238 "configure"
13239 #include "confdefs.h"
13240 #include <$ac_header>
13241 _ACEOF
13242 if { (eval echo "$as_me:13242: \"$ac_cpp conftest.$ac_ext\"") >&5
13243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13244   ac_status=$?
13245   egrep -v '^ *\+' conftest.er1 >conftest.err
13246   rm -f conftest.er1
13247   cat conftest.err >&5
13248   echo "$as_me:13248: \$? = $ac_status" >&5
13249   (exit $ac_status); } >/dev/null; then
13250   if test -s conftest.err; then
13251     ac_cpp_err=$ac_c_preproc_warn_flag
13252   else
13253     ac_cpp_err=
13254   fi
13255 else
13256   ac_cpp_err=yes
13257 fi
13258 if test -z "$ac_cpp_err"; then
13259   eval "$as_ac_Header=yes"
13260 else
13261   echo "$as_me: failed program was:" >&5
13262   cat conftest.$ac_ext >&5
13263   eval "$as_ac_Header=no"
13264 fi
13265 rm -f conftest.err conftest.$ac_ext
13266 fi
13267 echo "$as_me:13267: result: `eval echo '${'$as_ac_Header'}'`" >&5
13268 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13269 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13270   cat >>confdefs.h <<EOF
13271 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13272 EOF
13273
13274 fi
13275 done
13276
13277 # check for ISC (this may also define _POSIX_SOURCE)
13278 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13279 if test "$ISC" = yes ; then
13280
13281 echo "$as_me:13281: checking for main in -lcposix" >&5
13282 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13283 if test "${ac_cv_lib_cposix_main+set}" = set; then
13284   echo $ECHO_N "(cached) $ECHO_C" >&6
13285 else
13286   ac_check_lib_save_LIBS=$LIBS
13287 LIBS="-lcposix  $LIBS"
13288 cat >conftest.$ac_ext <<_ACEOF
13289 #line 13289 "configure"
13290 #include "confdefs.h"
13291
13292 int
13293 main ()
13294 {
13295 main ();
13296   ;
13297   return 0;
13298 }
13299 _ACEOF
13300 rm -f conftest.$ac_objext conftest$ac_exeext
13301 if { (eval echo "$as_me:13301: \"$ac_link\"") >&5
13302   (eval $ac_link) 2>&5
13303   ac_status=$?
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit $ac_status); } &&
13306          { ac_try='test -s conftest$ac_exeext'
13307   { (eval echo "$as_me:13307: \"$ac_try\"") >&5
13308   (eval $ac_try) 2>&5
13309   ac_status=$?
13310   echo "$as_me:13310: \$? = $ac_status" >&5
13311   (exit $ac_status); }; }; then
13312   ac_cv_lib_cposix_main=yes
13313 else
13314   echo "$as_me: failed program was:" >&5
13315 cat conftest.$ac_ext >&5
13316 ac_cv_lib_cposix_main=no
13317 fi
13318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13319 LIBS=$ac_check_lib_save_LIBS
13320 fi
13321 echo "$as_me:13321: result: $ac_cv_lib_cposix_main" >&5
13322 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13323 if test $ac_cv_lib_cposix_main = yes; then
13324   cat >>confdefs.h <<EOF
13325 #define HAVE_LIBCPOSIX 1
13326 EOF
13327
13328   LIBS="-lcposix $LIBS"
13329
13330 fi
13331
13332         echo "$as_me:13332: checking for bzero in -linet" >&5
13333 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13334 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13335   echo $ECHO_N "(cached) $ECHO_C" >&6
13336 else
13337   ac_check_lib_save_LIBS=$LIBS
13338 LIBS="-linet  $LIBS"
13339 cat >conftest.$ac_ext <<_ACEOF
13340 #line 13340 "configure"
13341 #include "confdefs.h"
13342
13343 /* Override any gcc2 internal prototype to avoid an error.  */
13344 #ifdef __cplusplus
13345 extern "C"
13346 #endif
13347 /* We use char because int might match the return type of a gcc2
13348    builtin and then its argument prototype would still apply.  */
13349 char bzero ();
13350 int
13351 main ()
13352 {
13353 bzero ();
13354   ;
13355   return 0;
13356 }
13357 _ACEOF
13358 rm -f conftest.$ac_objext conftest$ac_exeext
13359 if { (eval echo "$as_me:13359: \"$ac_link\"") >&5
13360   (eval $ac_link) 2>&5
13361   ac_status=$?
13362   echo "$as_me:13362: \$? = $ac_status" >&5
13363   (exit $ac_status); } &&
13364          { ac_try='test -s conftest$ac_exeext'
13365   { (eval echo "$as_me:13365: \"$ac_try\"") >&5
13366   (eval $ac_try) 2>&5
13367   ac_status=$?
13368   echo "$as_me:13368: \$? = $ac_status" >&5
13369   (exit $ac_status); }; }; then
13370   ac_cv_lib_inet_bzero=yes
13371 else
13372   echo "$as_me: failed program was:" >&5
13373 cat conftest.$ac_ext >&5
13374 ac_cv_lib_inet_bzero=no
13375 fi
13376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13377 LIBS=$ac_check_lib_save_LIBS
13378 fi
13379 echo "$as_me:13379: result: $ac_cv_lib_inet_bzero" >&5
13380 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13381 if test $ac_cv_lib_inet_bzero = yes; then
13382   LIBS="-linet $LIBS"
13383 fi
13384 fi
13385
13386 echo "$as_me:13386: checking if sys/time.h works with sys/select.h" >&5
13387 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13388 if test "${cf_cv_sys_time_select+set}" = set; then
13389   echo $ECHO_N "(cached) $ECHO_C" >&6
13390 else
13391
13392 cat >conftest.$ac_ext <<_ACEOF
13393 #line 13393 "configure"
13394 #include "confdefs.h"
13395
13396 #include <sys/types.h>
13397 #ifdef HAVE_SYS_TIME_H
13398 #include <sys/time.h>
13399 #endif
13400 #ifdef HAVE_SYS_SELECT_H
13401 #include <sys/select.h>
13402 #endif
13403
13404 int
13405 main ()
13406 {
13407
13408   ;
13409   return 0;
13410 }
13411 _ACEOF
13412 rm -f conftest.$ac_objext
13413 if { (eval echo "$as_me:13413: \"$ac_compile\"") >&5
13414   (eval $ac_compile) 2>&5
13415   ac_status=$?
13416   echo "$as_me:13416: \$? = $ac_status" >&5
13417   (exit $ac_status); } &&
13418          { ac_try='test -s conftest.$ac_objext'
13419   { (eval echo "$as_me:13419: \"$ac_try\"") >&5
13420   (eval $ac_try) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit $ac_status); }; }; then
13424   cf_cv_sys_time_select=yes
13425 else
13426   echo "$as_me: failed program was:" >&5
13427 cat conftest.$ac_ext >&5
13428 cf_cv_sys_time_select=no
13429 fi
13430 rm -f conftest.$ac_objext conftest.$ac_ext
13431
13432 fi
13433
13434 echo "$as_me:13434: result: $cf_cv_sys_time_select" >&5
13435 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13436 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13437 #define HAVE_SYS_TIME_SELECT 1
13438 EOF
13439
13440 ###     checks for compiler characteristics
13441 ac_ext=c
13442 ac_cpp='$CPP $CPPFLAGS'
13443 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13444 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13445 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13446 ac_main_return=return
13447
13448 echo "$as_me:13448: checking for $CC option to accept ANSI C" >&5
13449 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13450 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13451   echo $ECHO_N "(cached) $ECHO_C" >&6
13452 else
13453   ac_cv_prog_cc_stdc=no
13454 ac_save_CC=$CC
13455 cat >conftest.$ac_ext <<_ACEOF
13456 #line 13456 "configure"
13457 #include "confdefs.h"
13458 #include <stdarg.h>
13459 #include <stdio.h>
13460 #include <sys/types.h>
13461 #include <sys/stat.h>
13462 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13463 struct buf { int x; };
13464 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13465 static char *e (p, i)
13466      char **p;
13467      int i;
13468 {
13469   return p[i];
13470 }
13471 static char *f (char * (*g) (char **, int), char **p, ...)
13472 {
13473   char *s;
13474   va_list v;
13475   va_start (v,p);
13476   s = g (p, va_arg (v,int));
13477   va_end (v);
13478   return s;
13479 }
13480 int test (int i, double x);
13481 struct s1 {int (*f) (int a);};
13482 struct s2 {int (*f) (double a);};
13483 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13484 int argc;
13485 char **argv;
13486 int
13487 main ()
13488 {
13489 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13490   ;
13491   return 0;
13492 }
13493 _ACEOF
13494 # Don't try gcc -ansi; that turns off useful extensions and
13495 # breaks some systems' header files.
13496 # AIX                   -qlanglvl=ansi
13497 # Ultrix and OSF/1      -std1
13498 # HP-UX 10.20 and later -Ae
13499 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13500 # SVR4                  -Xc -D__EXTENSIONS__
13501 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13502 do
13503   CC="$ac_save_CC $ac_arg"
13504   rm -f conftest.$ac_objext
13505 if { (eval echo "$as_me:13505: \"$ac_compile\"") >&5
13506   (eval $ac_compile) 2>&5
13507   ac_status=$?
13508   echo "$as_me:13508: \$? = $ac_status" >&5
13509   (exit $ac_status); } &&
13510          { ac_try='test -s conftest.$ac_objext'
13511   { (eval echo "$as_me:13511: \"$ac_try\"") >&5
13512   (eval $ac_try) 2>&5
13513   ac_status=$?
13514   echo "$as_me:13514: \$? = $ac_status" >&5
13515   (exit $ac_status); }; }; then
13516   ac_cv_prog_cc_stdc=$ac_arg
13517 break
13518 else
13519   echo "$as_me: failed program was:" >&5
13520 cat conftest.$ac_ext >&5
13521 fi
13522 rm -f conftest.$ac_objext
13523 done
13524 rm -f conftest.$ac_ext conftest.$ac_objext
13525 CC=$ac_save_CC
13526
13527 fi
13528
13529 case "x$ac_cv_prog_cc_stdc" in
13530   x|xno)
13531     echo "$as_me:13531: result: none needed" >&5
13532 echo "${ECHO_T}none needed" >&6 ;;
13533   *)
13534     echo "$as_me:13534: result: $ac_cv_prog_cc_stdc" >&5
13535 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13536     CC="$CC $ac_cv_prog_cc_stdc" ;;
13537 esac
13538
13539 echo "$as_me:13539: checking for an ANSI C-conforming const" >&5
13540 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13541 if test "${ac_cv_c_const+set}" = set; then
13542   echo $ECHO_N "(cached) $ECHO_C" >&6
13543 else
13544   cat >conftest.$ac_ext <<_ACEOF
13545 #line 13545 "configure"
13546 #include "confdefs.h"
13547
13548 int
13549 main ()
13550 {
13551 /* FIXME: Include the comments suggested by Paul. */
13552 #ifndef __cplusplus
13553   /* Ultrix mips cc rejects this.  */
13554   typedef int charset[2];
13555   const charset x;
13556   /* SunOS 4.1.1 cc rejects this.  */
13557   char const *const *ccp;
13558   char **p;
13559   /* NEC SVR4.0.2 mips cc rejects this.  */
13560   struct point {int x, y;};
13561   static struct point const zero = {0,0};
13562   /* AIX XL C 1.02.0.0 rejects this.
13563      It does not let you subtract one const X* pointer from another in
13564      an arm of an if-expression whose if-part is not a constant
13565      expression */
13566   const char *g = "string";
13567   ccp = &g + (g ? g-g : 0);
13568   /* HPUX 7.0 cc rejects these. */
13569   ++ccp;
13570   p = (char**) ccp;
13571   ccp = (char const *const *) p;
13572   { /* SCO 3.2v4 cc rejects this.  */
13573     char *t;
13574     char const *s = 0 ? (char *) 0 : (char const *) 0;
13575
13576     *t++ = 0;
13577   }
13578   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13579     int x[] = {25, 17};
13580     const int *foo = &x[0];
13581     ++foo;
13582   }
13583   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13584     typedef const int *iptr;
13585     iptr p = 0;
13586     ++p;
13587   }
13588   { /* AIX XL C 1.02.0.0 rejects this saying
13589        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13590     struct s { int j; const int *ap[3]; };
13591     struct s *b; b->j = 5;
13592   }
13593   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13594     const int foo = 10;
13595   }
13596 #endif
13597
13598   ;
13599   return 0;
13600 }
13601 _ACEOF
13602 rm -f conftest.$ac_objext
13603 if { (eval echo "$as_me:13603: \"$ac_compile\"") >&5
13604   (eval $ac_compile) 2>&5
13605   ac_status=$?
13606   echo "$as_me:13606: \$? = $ac_status" >&5
13607   (exit $ac_status); } &&
13608          { ac_try='test -s conftest.$ac_objext'
13609   { (eval echo "$as_me:13609: \"$ac_try\"") >&5
13610   (eval $ac_try) 2>&5
13611   ac_status=$?
13612   echo "$as_me:13612: \$? = $ac_status" >&5
13613   (exit $ac_status); }; }; then
13614   ac_cv_c_const=yes
13615 else
13616   echo "$as_me: failed program was:" >&5
13617 cat conftest.$ac_ext >&5
13618 ac_cv_c_const=no
13619 fi
13620 rm -f conftest.$ac_objext conftest.$ac_ext
13621 fi
13622 echo "$as_me:13622: result: $ac_cv_c_const" >&5
13623 echo "${ECHO_T}$ac_cv_c_const" >&6
13624 if test $ac_cv_c_const = no; then
13625
13626 cat >>confdefs.h <<\EOF
13627 #define const
13628 EOF
13629
13630 fi
13631
13632 echo "$as_me:13632: checking for inline" >&5
13633 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13634 if test "${ac_cv_c_inline+set}" = set; then
13635   echo $ECHO_N "(cached) $ECHO_C" >&6
13636 else
13637   ac_cv_c_inline=no
13638 for ac_kw in inline __inline__ __inline; do
13639   cat >conftest.$ac_ext <<_ACEOF
13640 #line 13640 "configure"
13641 #include "confdefs.h"
13642 #ifndef __cplusplus
13643 static $ac_kw int static_foo () {return 0; }
13644 $ac_kw int foo () {return 0; }
13645 #endif
13646
13647 _ACEOF
13648 rm -f conftest.$ac_objext
13649 if { (eval echo "$as_me:13649: \"$ac_compile\"") >&5
13650   (eval $ac_compile) 2>&5
13651   ac_status=$?
13652   echo "$as_me:13652: \$? = $ac_status" >&5
13653   (exit $ac_status); } &&
13654          { ac_try='test -s conftest.$ac_objext'
13655   { (eval echo "$as_me:13655: \"$ac_try\"") >&5
13656   (eval $ac_try) 2>&5
13657   ac_status=$?
13658   echo "$as_me:13658: \$? = $ac_status" >&5
13659   (exit $ac_status); }; }; then
13660   ac_cv_c_inline=$ac_kw; break
13661 else
13662   echo "$as_me: failed program was:" >&5
13663 cat conftest.$ac_ext >&5
13664 fi
13665 rm -f conftest.$ac_objext conftest.$ac_ext
13666 done
13667
13668 fi
13669 echo "$as_me:13669: result: $ac_cv_c_inline" >&5
13670 echo "${ECHO_T}$ac_cv_c_inline" >&6
13671 case $ac_cv_c_inline in
13672   inline | yes) ;;
13673   no)
13674 cat >>confdefs.h <<\EOF
13675 #define inline
13676 EOF
13677  ;;
13678   *)  cat >>confdefs.h <<EOF
13679 #define inline $ac_cv_c_inline
13680 EOF
13681  ;;
13682 esac
13683
13684 NCURSES_INLINE=
13685 if test "$ac_cv_c_inline" != no ; then
13686   NCURSES_INLINE=inline
13687   if test "$INTEL_COMPILER" = yes
13688   then
13689     :
13690   elif test "$GCC" = yes
13691   then
13692     echo "$as_me:13692: checking if $CC supports options to tune inlining" >&5
13693 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13694 if test "${cf_cv_gcc_inline+set}" = set; then
13695   echo $ECHO_N "(cached) $ECHO_C" >&6
13696 else
13697
13698       cf_save_CFLAGS=$CFLAGS
13699       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13700       cat >conftest.$ac_ext <<_ACEOF
13701 #line 13701 "configure"
13702 #include "confdefs.h"
13703 inline int foo(void) { return 1; }
13704 int
13705 main ()
13706 {
13707 ${cf_cv_main_return:-return} foo()
13708   ;
13709   return 0;
13710 }
13711 _ACEOF
13712 rm -f conftest.$ac_objext
13713 if { (eval echo "$as_me:13713: \"$ac_compile\"") >&5
13714   (eval $ac_compile) 2>&5
13715   ac_status=$?
13716   echo "$as_me:13716: \$? = $ac_status" >&5
13717   (exit $ac_status); } &&
13718          { ac_try='test -s conftest.$ac_objext'
13719   { (eval echo "$as_me:13719: \"$ac_try\"") >&5
13720   (eval $ac_try) 2>&5
13721   ac_status=$?
13722   echo "$as_me:13722: \$? = $ac_status" >&5
13723   (exit $ac_status); }; }; then
13724   cf_cv_gcc_inline=yes
13725 else
13726   echo "$as_me: failed program was:" >&5
13727 cat conftest.$ac_ext >&5
13728 cf_cv_gcc_inline=no
13729 fi
13730 rm -f conftest.$ac_objext conftest.$ac_ext
13731       CFLAGS=$cf_save_CFLAGS
13732
13733 fi
13734 echo "$as_me:13734: result: $cf_cv_gcc_inline" >&5
13735 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13736     if test "$cf_cv_gcc_inline" = yes ; then
13737
13738 cf_fix_cppflags=no
13739 cf_new_cflags=
13740 cf_new_cppflags=
13741 cf_new_extra_cppflags=
13742
13743 for cf_add_cflags in --param max-inline-insns-single=1200
13744 do
13745 case $cf_fix_cppflags in
13746 no)
13747         case $cf_add_cflags in #(vi
13748         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13749                 case $cf_add_cflags in
13750                 -D*)
13751                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13752
13753                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13754                                 && test -z "${cf_tst_cflags}" \
13755                                 && cf_fix_cppflags=yes
13756
13757                         if test $cf_fix_cppflags = yes ; then
13758                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13759                                 continue
13760                         elif test "${cf_tst_cflags}" = "\"'" ; then
13761                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13762                                 continue
13763                         fi
13764                         ;;
13765                 esac
13766                 case "$CPPFLAGS" in
13767                 *$cf_add_cflags) #(vi
13768                         ;;
13769                 *) #(vi
13770                         case $cf_add_cflags in #(vi
13771                         -D*)
13772                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13773
13774 CPPFLAGS=`echo "$CPPFLAGS" | \
13775         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13776                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13777
13778                                 ;;
13779                         esac
13780                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13781                         ;;
13782                 esac
13783                 ;;
13784         *)
13785                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13786                 ;;
13787         esac
13788         ;;
13789 yes)
13790         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13791
13792         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13793
13794         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13795                 && test -z "${cf_tst_cflags}" \
13796                 && cf_fix_cppflags=no
13797         ;;
13798 esac
13799 done
13800
13801 if test -n "$cf_new_cflags" ; then
13802
13803         CFLAGS="$CFLAGS $cf_new_cflags"
13804 fi
13805
13806 if test -n "$cf_new_cppflags" ; then
13807
13808         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13809 fi
13810
13811 if test -n "$cf_new_extra_cppflags" ; then
13812
13813         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13814 fi
13815
13816     fi
13817   fi
13818 fi
13819
13820 echo "$as_me:13820: checking for signal global datatype" >&5
13821 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13822 if test "${cf_cv_sig_atomic_t+set}" = set; then
13823   echo $ECHO_N "(cached) $ECHO_C" >&6
13824 else
13825
13826         for cf_type in \
13827                 "volatile sig_atomic_t" \
13828                 "sig_atomic_t" \
13829                 "int"
13830         do
13831         cat >conftest.$ac_ext <<_ACEOF
13832 #line 13832 "configure"
13833 #include "confdefs.h"
13834
13835 #include <sys/types.h>
13836 #include <signal.h>
13837 #include <stdio.h>
13838
13839 extern $cf_type x;
13840 $cf_type x;
13841 static void handler(int sig)
13842 {
13843         x = 5;
13844 }
13845 int
13846 main ()
13847 {
13848 signal(SIGINT, handler);
13849                  x = 1
13850   ;
13851   return 0;
13852 }
13853 _ACEOF
13854 rm -f conftest.$ac_objext
13855 if { (eval echo "$as_me:13855: \"$ac_compile\"") >&5
13856   (eval $ac_compile) 2>&5
13857   ac_status=$?
13858   echo "$as_me:13858: \$? = $ac_status" >&5
13859   (exit $ac_status); } &&
13860          { ac_try='test -s conftest.$ac_objext'
13861   { (eval echo "$as_me:13861: \"$ac_try\"") >&5
13862   (eval $ac_try) 2>&5
13863   ac_status=$?
13864   echo "$as_me:13864: \$? = $ac_status" >&5
13865   (exit $ac_status); }; }; then
13866   cf_cv_sig_atomic_t=$cf_type
13867 else
13868   echo "$as_me: failed program was:" >&5
13869 cat conftest.$ac_ext >&5
13870 cf_cv_sig_atomic_t=no
13871 fi
13872 rm -f conftest.$ac_objext conftest.$ac_ext
13873                 test "$cf_cv_sig_atomic_t" != no && break
13874         done
13875
13876 fi
13877
13878 echo "$as_me:13878: result: $cf_cv_sig_atomic_t" >&5
13879 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13880 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13881 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13882 EOF
13883
13884 if test $NCURSES_CHTYPE = auto ; then
13885
13886 echo "$as_me:13886: checking for type of chtype" >&5
13887 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13888 if test "${cf_cv_typeof_chtype+set}" = set; then
13889   echo $ECHO_N "(cached) $ECHO_C" >&6
13890 else
13891
13892                 if test "$cross_compiling" = yes; then
13893   cf_cv_typeof_chtype=long
13894 else
13895   cat >conftest.$ac_ext <<_ACEOF
13896 #line 13896 "configure"
13897 #include "confdefs.h"
13898
13899 #define WANT_BITS 31
13900 #include <stdio.h>
13901 int main()
13902 {
13903         FILE *fp = fopen("cf_test.out", "w");
13904         if (fp != 0) {
13905                 char *result = "long";
13906                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13907                         int n;
13908                         unsigned int x, y;
13909                         for (n = 0; n < WANT_BITS; n++) {
13910                                 x = (1 << n);
13911                                 y = (x >> n);
13912                                 if (y != 1 || x == 0) {
13913                                         x = 0;
13914                                         break;
13915                                 }
13916                         }
13917                         /*
13918                          * If x is nonzero, an int is big enough for the bits
13919                          * that we want.
13920                          */
13921                         result = (x != 0) ? "int" : "long";
13922                 }
13923                 fputs(result, fp);
13924                 fclose(fp);
13925         }
13926         ${cf_cv_main_return:-return}(0);
13927 }
13928
13929 _ACEOF
13930 rm -f conftest$ac_exeext
13931 if { (eval echo "$as_me:13931: \"$ac_link\"") >&5
13932   (eval $ac_link) 2>&5
13933   ac_status=$?
13934   echo "$as_me:13934: \$? = $ac_status" >&5
13935   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13936   { (eval echo "$as_me:13936: \"$ac_try\"") >&5
13937   (eval $ac_try) 2>&5
13938   ac_status=$?
13939   echo "$as_me:13939: \$? = $ac_status" >&5
13940   (exit $ac_status); }; }; then
13941   cf_cv_typeof_chtype=`cat cf_test.out`
13942 else
13943   echo "$as_me: program exited with status $ac_status" >&5
13944 echo "$as_me: failed program was:" >&5
13945 cat conftest.$ac_ext >&5
13946 cf_cv_typeof_chtype=long
13947 fi
13948 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13949 fi
13950                 rm -f cf_test.out
13951
13952 fi
13953
13954 echo "$as_me:13954: result: $cf_cv_typeof_chtype" >&5
13955 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13956
13957 cat >>confdefs.h <<EOF
13958 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13959 EOF
13960
13961 else
13962         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13963 fi
13964 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13965
13966 echo "$as_me:13966: checking if unsigned literals are legal" >&5
13967 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13968 if test "${cf_cv_unsigned_literals+set}" = set; then
13969   echo $ECHO_N "(cached) $ECHO_C" >&6
13970 else
13971
13972         cat >conftest.$ac_ext <<_ACEOF
13973 #line 13973 "configure"
13974 #include "confdefs.h"
13975
13976 int
13977 main ()
13978 {
13979 long x = 1L + 1UL + 1U + 1
13980   ;
13981   return 0;
13982 }
13983 _ACEOF
13984 rm -f conftest.$ac_objext
13985 if { (eval echo "$as_me:13985: \"$ac_compile\"") >&5
13986   (eval $ac_compile) 2>&5
13987   ac_status=$?
13988   echo "$as_me:13988: \$? = $ac_status" >&5
13989   (exit $ac_status); } &&
13990          { ac_try='test -s conftest.$ac_objext'
13991   { (eval echo "$as_me:13991: \"$ac_try\"") >&5
13992   (eval $ac_try) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit $ac_status); }; }; then
13996   cf_cv_unsigned_literals=yes
13997 else
13998   echo "$as_me: failed program was:" >&5
13999 cat conftest.$ac_ext >&5
14000 cf_cv_unsigned_literals=no
14001 fi
14002 rm -f conftest.$ac_objext conftest.$ac_ext
14003
14004 fi
14005
14006 echo "$as_me:14006: result: $cf_cv_unsigned_literals" >&5
14007 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14008
14009 cf_cv_1UL="1"
14010 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14011 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14012
14013 if test $NCURSES_MMASK_T = auto ; then
14014         cf_cv_typeof_mmask_t=long
14015 else
14016         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14017 fi
14018 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14019
14020 ###     Checks for external-data
14021
14022 echo "$as_me:14022: checking if external errno is declared" >&5
14023 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14024 if test "${cf_cv_dcl_errno+set}" = set; then
14025   echo $ECHO_N "(cached) $ECHO_C" >&6
14026 else
14027
14028     cat >conftest.$ac_ext <<_ACEOF
14029 #line 14029 "configure"
14030 #include "confdefs.h"
14031
14032 #ifdef HAVE_STDLIB_H
14033 #include <stdlib.h>
14034 #endif
14035 #include <stdio.h>
14036 #include <sys/types.h>
14037 #include <errno.h>
14038 int
14039 main ()
14040 {
14041 int x = (int) errno
14042   ;
14043   return 0;
14044 }
14045 _ACEOF
14046 rm -f conftest.$ac_objext
14047 if { (eval echo "$as_me:14047: \"$ac_compile\"") >&5
14048   (eval $ac_compile) 2>&5
14049   ac_status=$?
14050   echo "$as_me:14050: \$? = $ac_status" >&5
14051   (exit $ac_status); } &&
14052          { ac_try='test -s conftest.$ac_objext'
14053   { (eval echo "$as_me:14053: \"$ac_try\"") >&5
14054   (eval $ac_try) 2>&5
14055   ac_status=$?
14056   echo "$as_me:14056: \$? = $ac_status" >&5
14057   (exit $ac_status); }; }; then
14058   cf_cv_dcl_errno=yes
14059 else
14060   echo "$as_me: failed program was:" >&5
14061 cat conftest.$ac_ext >&5
14062 cf_cv_dcl_errno=no
14063 fi
14064 rm -f conftest.$ac_objext conftest.$ac_ext
14065
14066 fi
14067 echo "$as_me:14067: result: $cf_cv_dcl_errno" >&5
14068 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14069
14070 if test "$cf_cv_dcl_errno" = no ; then
14071
14072 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14073
14074     cat >>confdefs.h <<EOF
14075 #define $cf_result 1
14076 EOF
14077
14078 fi
14079
14080 # It's possible (for near-UNIX clones) that the data doesn't exist
14081
14082 echo "$as_me:14082: checking if external errno exists" >&5
14083 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14084 if test "${cf_cv_have_errno+set}" = set; then
14085   echo $ECHO_N "(cached) $ECHO_C" >&6
14086 else
14087
14088     cat >conftest.$ac_ext <<_ACEOF
14089 #line 14089 "configure"
14090 #include "confdefs.h"
14091
14092 #undef errno
14093 extern int errno;
14094
14095 int
14096 main ()
14097 {
14098 errno = 2
14099   ;
14100   return 0;
14101 }
14102 _ACEOF
14103 rm -f conftest.$ac_objext conftest$ac_exeext
14104 if { (eval echo "$as_me:14104: \"$ac_link\"") >&5
14105   (eval $ac_link) 2>&5
14106   ac_status=$?
14107   echo "$as_me:14107: \$? = $ac_status" >&5
14108   (exit $ac_status); } &&
14109          { ac_try='test -s conftest$ac_exeext'
14110   { (eval echo "$as_me:14110: \"$ac_try\"") >&5
14111   (eval $ac_try) 2>&5
14112   ac_status=$?
14113   echo "$as_me:14113: \$? = $ac_status" >&5
14114   (exit $ac_status); }; }; then
14115   cf_cv_have_errno=yes
14116 else
14117   echo "$as_me: failed program was:" >&5
14118 cat conftest.$ac_ext >&5
14119 cf_cv_have_errno=no
14120 fi
14121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14122
14123 fi
14124 echo "$as_me:14124: result: $cf_cv_have_errno" >&5
14125 echo "${ECHO_T}$cf_cv_have_errno" >&6
14126
14127 if test "$cf_cv_have_errno" = yes ; then
14128
14129 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14130
14131     cat >>confdefs.h <<EOF
14132 #define $cf_result 1
14133 EOF
14134
14135 fi
14136
14137 echo "$as_me:14137: checking if data-only library module links" >&5
14138 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14139 if test "${cf_cv_link_dataonly+set}" = set; then
14140   echo $ECHO_N "(cached) $ECHO_C" >&6
14141 else
14142
14143         rm -f conftest.a
14144         cat >conftest.$ac_ext <<EOF
14145 #line 14145 "configure"
14146 int     testdata[3] = { 123, 456, 789 };
14147 EOF
14148         if { (eval echo "$as_me:14148: \"$ac_compile\"") >&5
14149   (eval $ac_compile) 2>&5
14150   ac_status=$?
14151   echo "$as_me:14151: \$? = $ac_status" >&5
14152   (exit $ac_status); } ; then
14153                 mv conftest.o data.o && \
14154                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14155         fi
14156         rm -f conftest.$ac_ext data.o
14157         cat >conftest.$ac_ext <<EOF
14158 #line 14158 "configure"
14159 int     testfunc()
14160 {
14161 #if defined(NeXT)
14162         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14163 #else
14164         extern int testdata[3];
14165         return testdata[0] == 123
14166            &&  testdata[1] == 456
14167            &&  testdata[2] == 789;
14168 #endif
14169 }
14170 EOF
14171         if { (eval echo "$as_me:14171: \"$ac_compile\"") >&5
14172   (eval $ac_compile) 2>&5
14173   ac_status=$?
14174   echo "$as_me:14174: \$? = $ac_status" >&5
14175   (exit $ac_status); }; then
14176                 mv conftest.o func.o && \
14177                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14178         fi
14179         rm -f conftest.$ac_ext func.o
14180         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14181         cf_saveLIBS="$LIBS"
14182         LIBS="conftest.a $LIBS"
14183         if test "$cross_compiling" = yes; then
14184   cf_cv_link_dataonly=unknown
14185 else
14186   cat >conftest.$ac_ext <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14189
14190         int main()
14191         {
14192                 extern int testfunc();
14193                 ${cf_cv_main_return:-return} (!testfunc());
14194         }
14195
14196 _ACEOF
14197 rm -f conftest$ac_exeext
14198 if { (eval echo "$as_me:14198: \"$ac_link\"") >&5
14199   (eval $ac_link) 2>&5
14200   ac_status=$?
14201   echo "$as_me:14201: \$? = $ac_status" >&5
14202   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14203   { (eval echo "$as_me:14203: \"$ac_try\"") >&5
14204   (eval $ac_try) 2>&5
14205   ac_status=$?
14206   echo "$as_me:14206: \$? = $ac_status" >&5
14207   (exit $ac_status); }; }; then
14208   cf_cv_link_dataonly=yes
14209 else
14210   echo "$as_me: program exited with status $ac_status" >&5
14211 echo "$as_me: failed program was:" >&5
14212 cat conftest.$ac_ext >&5
14213 cf_cv_link_dataonly=no
14214 fi
14215 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14216 fi
14217         LIBS="$cf_saveLIBS"
14218
14219 fi
14220
14221 echo "$as_me:14221: result: $cf_cv_link_dataonly" >&5
14222 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14223
14224 if test "$cf_cv_link_dataonly" = no ; then
14225         cat >>confdefs.h <<\EOF
14226 #define BROKEN_LINKER 1
14227 EOF
14228
14229         BROKEN_LINKER=1
14230 fi
14231
14232 ###     Checks for library functions.
14233
14234 for ac_func in \
14235 getcwd \
14236 getegid \
14237 geteuid \
14238 getttynam \
14239 issetugid \
14240 poll \
14241 remove \
14242 select \
14243 setbuf \
14244 setbuffer \
14245 setvbuf \
14246 sigaction \
14247 sigvec \
14248 strdup \
14249 strstr \
14250 tcgetpgrp \
14251 times \
14252 vsnprintf \
14253
14254 do
14255 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14256 echo "$as_me:14256: checking for $ac_func" >&5
14257 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14258 if eval "test \"\${$as_ac_var+set}\" = set"; then
14259   echo $ECHO_N "(cached) $ECHO_C" >&6
14260 else
14261   cat >conftest.$ac_ext <<_ACEOF
14262 #line 14262 "configure"
14263 #include "confdefs.h"
14264 /* System header to define __stub macros and hopefully few prototypes,
14265     which can conflict with char $ac_func (); below.  */
14266 #include <assert.h>
14267 /* Override any gcc2 internal prototype to avoid an error.  */
14268 #ifdef __cplusplus
14269 extern "C"
14270 #endif
14271 /* We use char because int might match the return type of a gcc2
14272    builtin and then its argument prototype would still apply.  */
14273 char $ac_func ();
14274 char (*f) ();
14275
14276 int
14277 main ()
14278 {
14279 /* The GNU C library defines this for functions which it implements
14280     to always fail with ENOSYS.  Some functions are actually named
14281     something starting with __ and the normal name is an alias.  */
14282 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14283 choke me
14284 #else
14285 f = $ac_func;
14286 #endif
14287
14288   ;
14289   return 0;
14290 }
14291 _ACEOF
14292 rm -f conftest.$ac_objext conftest$ac_exeext
14293 if { (eval echo "$as_me:14293: \"$ac_link\"") >&5
14294   (eval $ac_link) 2>&5
14295   ac_status=$?
14296   echo "$as_me:14296: \$? = $ac_status" >&5
14297   (exit $ac_status); } &&
14298          { ac_try='test -s conftest$ac_exeext'
14299   { (eval echo "$as_me:14299: \"$ac_try\"") >&5
14300   (eval $ac_try) 2>&5
14301   ac_status=$?
14302   echo "$as_me:14302: \$? = $ac_status" >&5
14303   (exit $ac_status); }; }; then
14304   eval "$as_ac_var=yes"
14305 else
14306   echo "$as_me: failed program was:" >&5
14307 cat conftest.$ac_ext >&5
14308 eval "$as_ac_var=no"
14309 fi
14310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14311 fi
14312 echo "$as_me:14312: result: `eval echo '${'$as_ac_var'}'`" >&5
14313 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14314 if test `eval echo '${'$as_ac_var'}'` = yes; then
14315   cat >>confdefs.h <<EOF
14316 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14317 EOF
14318
14319 fi
14320 done
14321
14322 if test "$with_getcap" = "yes" ; then
14323
14324 echo "$as_me:14324: checking for terminal-capability database functions" >&5
14325 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14326 if test "${cf_cv_cgetent+set}" = set; then
14327   echo $ECHO_N "(cached) $ECHO_C" >&6
14328 else
14329
14330 cat >conftest.$ac_ext <<_ACEOF
14331 #line 14331 "configure"
14332 #include "confdefs.h"
14333
14334 #include <stdlib.h>
14335 int
14336 main ()
14337 {
14338
14339         char temp[128];
14340         char *buf = temp;
14341         char *db_array = temp;
14342         cgetent(&buf, /* int *, */ &db_array, "vt100");
14343         cgetcap(buf, "tc", '=');
14344         cgetmatch(buf, "tc");
14345
14346   ;
14347   return 0;
14348 }
14349 _ACEOF
14350 rm -f conftest.$ac_objext conftest$ac_exeext
14351 if { (eval echo "$as_me:14351: \"$ac_link\"") >&5
14352   (eval $ac_link) 2>&5
14353   ac_status=$?
14354   echo "$as_me:14354: \$? = $ac_status" >&5
14355   (exit $ac_status); } &&
14356          { ac_try='test -s conftest$ac_exeext'
14357   { (eval echo "$as_me:14357: \"$ac_try\"") >&5
14358   (eval $ac_try) 2>&5
14359   ac_status=$?
14360   echo "$as_me:14360: \$? = $ac_status" >&5
14361   (exit $ac_status); }; }; then
14362   cf_cv_cgetent=yes
14363 else
14364   echo "$as_me: failed program was:" >&5
14365 cat conftest.$ac_ext >&5
14366 cf_cv_cgetent=no
14367 fi
14368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14369
14370 fi
14371
14372 echo "$as_me:14372: result: $cf_cv_cgetent" >&5
14373 echo "${ECHO_T}$cf_cv_cgetent" >&6
14374 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14375 #define HAVE_BSD_CGETENT 1
14376 EOF
14377
14378 fi
14379
14380 echo "$as_me:14380: checking for isascii" >&5
14381 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14382 if test "${cf_cv_have_isascii+set}" = set; then
14383   echo $ECHO_N "(cached) $ECHO_C" >&6
14384 else
14385
14386         cat >conftest.$ac_ext <<_ACEOF
14387 #line 14387 "configure"
14388 #include "confdefs.h"
14389 #include <ctype.h>
14390 int
14391 main ()
14392 {
14393 int x = isascii(' ')
14394   ;
14395   return 0;
14396 }
14397 _ACEOF
14398 rm -f conftest.$ac_objext conftest$ac_exeext
14399 if { (eval echo "$as_me:14399: \"$ac_link\"") >&5
14400   (eval $ac_link) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); } &&
14404          { ac_try='test -s conftest$ac_exeext'
14405   { (eval echo "$as_me:14405: \"$ac_try\"") >&5
14406   (eval $ac_try) 2>&5
14407   ac_status=$?
14408   echo "$as_me:14408: \$? = $ac_status" >&5
14409   (exit $ac_status); }; }; then
14410   cf_cv_have_isascii=yes
14411 else
14412   echo "$as_me: failed program was:" >&5
14413 cat conftest.$ac_ext >&5
14414 cf_cv_have_isascii=no
14415 fi
14416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14417
14418 fi
14419 echo "$as_me:14419: result: $cf_cv_have_isascii" >&5
14420 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14421 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14422 #define HAVE_ISASCII 1
14423 EOF
14424
14425 if test "$ac_cv_func_sigaction" = yes; then
14426 echo "$as_me:14426: checking whether sigaction needs _POSIX_SOURCE" >&5
14427 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14428 cat >conftest.$ac_ext <<_ACEOF
14429 #line 14429 "configure"
14430 #include "confdefs.h"
14431
14432 #include <sys/types.h>
14433 #include <signal.h>
14434 int
14435 main ()
14436 {
14437 struct sigaction act
14438   ;
14439   return 0;
14440 }
14441 _ACEOF
14442 rm -f conftest.$ac_objext
14443 if { (eval echo "$as_me:14443: \"$ac_compile\"") >&5
14444   (eval $ac_compile) 2>&5
14445   ac_status=$?
14446   echo "$as_me:14446: \$? = $ac_status" >&5
14447   (exit $ac_status); } &&
14448          { ac_try='test -s conftest.$ac_objext'
14449   { (eval echo "$as_me:14449: \"$ac_try\"") >&5
14450   (eval $ac_try) 2>&5
14451   ac_status=$?
14452   echo "$as_me:14452: \$? = $ac_status" >&5
14453   (exit $ac_status); }; }; then
14454   sigact_bad=no
14455 else
14456   echo "$as_me: failed program was:" >&5
14457 cat conftest.$ac_ext >&5
14458
14459 cat >conftest.$ac_ext <<_ACEOF
14460 #line 14460 "configure"
14461 #include "confdefs.h"
14462
14463 #define _POSIX_SOURCE
14464 #include <sys/types.h>
14465 #include <signal.h>
14466 int
14467 main ()
14468 {
14469 struct sigaction act
14470   ;
14471   return 0;
14472 }
14473 _ACEOF
14474 rm -f conftest.$ac_objext
14475 if { (eval echo "$as_me:14475: \"$ac_compile\"") >&5
14476   (eval $ac_compile) 2>&5
14477   ac_status=$?
14478   echo "$as_me:14478: \$? = $ac_status" >&5
14479   (exit $ac_status); } &&
14480          { ac_try='test -s conftest.$ac_objext'
14481   { (eval echo "$as_me:14481: \"$ac_try\"") >&5
14482   (eval $ac_try) 2>&5
14483   ac_status=$?
14484   echo "$as_me:14484: \$? = $ac_status" >&5
14485   (exit $ac_status); }; }; then
14486   sigact_bad=yes
14487          cat >>confdefs.h <<\EOF
14488 #define SVR4_ACTION 1
14489 EOF
14490
14491 else
14492   echo "$as_me: failed program was:" >&5
14493 cat conftest.$ac_ext >&5
14494 sigact_bad=unknown
14495 fi
14496 rm -f conftest.$ac_objext conftest.$ac_ext
14497 fi
14498 rm -f conftest.$ac_objext conftest.$ac_ext
14499 echo "$as_me:14499: result: $sigact_bad" >&5
14500 echo "${ECHO_T}$sigact_bad" >&6
14501 fi
14502
14503 echo "$as_me:14503: checking if nanosleep really works" >&5
14504 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14505 if test "${cf_cv_func_nanosleep+set}" = set; then
14506   echo $ECHO_N "(cached) $ECHO_C" >&6
14507 else
14508
14509 if test "$cross_compiling" = yes; then
14510   cf_cv_func_nanosleep=unknown
14511 else
14512   cat >conftest.$ac_ext <<_ACEOF
14513 #line 14513 "configure"
14514 #include "confdefs.h"
14515
14516 #include <stdio.h>
14517 #include <errno.h>
14518 #include <time.h>
14519
14520 #ifdef HAVE_SYS_TIME_H
14521 #include <sys/time.h>
14522 #endif
14523
14524 int main() {
14525         struct timespec ts1, ts2;
14526         int code;
14527         ts1.tv_sec  = 0;
14528         ts1.tv_nsec = 750000000;
14529         ts2.tv_sec  = 0;
14530         ts2.tv_nsec = 0;
14531         errno = 0;
14532         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14533         ${cf_cv_main_return:-return}(code != 0);
14534 }
14535
14536 _ACEOF
14537 rm -f conftest$ac_exeext
14538 if { (eval echo "$as_me:14538: \"$ac_link\"") >&5
14539   (eval $ac_link) 2>&5
14540   ac_status=$?
14541   echo "$as_me:14541: \$? = $ac_status" >&5
14542   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14543   { (eval echo "$as_me:14543: \"$ac_try\"") >&5
14544   (eval $ac_try) 2>&5
14545   ac_status=$?
14546   echo "$as_me:14546: \$? = $ac_status" >&5
14547   (exit $ac_status); }; }; then
14548   cf_cv_func_nanosleep=yes
14549 else
14550   echo "$as_me: program exited with status $ac_status" >&5
14551 echo "$as_me: failed program was:" >&5
14552 cat conftest.$ac_ext >&5
14553 cf_cv_func_nanosleep=no
14554 fi
14555 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14556 fi
14557 fi
14558 echo "$as_me:14558: result: $cf_cv_func_nanosleep" >&5
14559 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14560
14561 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14562 #define HAVE_NANOSLEEP 1
14563 EOF
14564
14565 for ac_header in \
14566 termio.h \
14567 termios.h \
14568 unistd.h \
14569
14570 do
14571 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14572 echo "$as_me:14572: checking for $ac_header" >&5
14573 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14574 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14575   echo $ECHO_N "(cached) $ECHO_C" >&6
14576 else
14577   cat >conftest.$ac_ext <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14580 #include <$ac_header>
14581 _ACEOF
14582 if { (eval echo "$as_me:14582: \"$ac_cpp conftest.$ac_ext\"") >&5
14583   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14584   ac_status=$?
14585   egrep -v '^ *\+' conftest.er1 >conftest.err
14586   rm -f conftest.er1
14587   cat conftest.err >&5
14588   echo "$as_me:14588: \$? = $ac_status" >&5
14589   (exit $ac_status); } >/dev/null; then
14590   if test -s conftest.err; then
14591     ac_cpp_err=$ac_c_preproc_warn_flag
14592   else
14593     ac_cpp_err=
14594   fi
14595 else
14596   ac_cpp_err=yes
14597 fi
14598 if test -z "$ac_cpp_err"; then
14599   eval "$as_ac_Header=yes"
14600 else
14601   echo "$as_me: failed program was:" >&5
14602   cat conftest.$ac_ext >&5
14603   eval "$as_ac_Header=no"
14604 fi
14605 rm -f conftest.err conftest.$ac_ext
14606 fi
14607 echo "$as_me:14607: result: `eval echo '${'$as_ac_Header'}'`" >&5
14608 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14609 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14610   cat >>confdefs.h <<EOF
14611 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14612 EOF
14613
14614 fi
14615 done
14616
14617 if test "$ISC" = yes ; then
14618
14619 for ac_header in sys/termio.h
14620 do
14621 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14622 echo "$as_me:14622: checking for $ac_header" >&5
14623 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14625   echo $ECHO_N "(cached) $ECHO_C" >&6
14626 else
14627   cat >conftest.$ac_ext <<_ACEOF
14628 #line 14628 "configure"
14629 #include "confdefs.h"
14630 #include <$ac_header>
14631 _ACEOF
14632 if { (eval echo "$as_me:14632: \"$ac_cpp conftest.$ac_ext\"") >&5
14633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14634   ac_status=$?
14635   egrep -v '^ *\+' conftest.er1 >conftest.err
14636   rm -f conftest.er1
14637   cat conftest.err >&5
14638   echo "$as_me:14638: \$? = $ac_status" >&5
14639   (exit $ac_status); } >/dev/null; then
14640   if test -s conftest.err; then
14641     ac_cpp_err=$ac_c_preproc_warn_flag
14642   else
14643     ac_cpp_err=
14644   fi
14645 else
14646   ac_cpp_err=yes
14647 fi
14648 if test -z "$ac_cpp_err"; then
14649   eval "$as_ac_Header=yes"
14650 else
14651   echo "$as_me: failed program was:" >&5
14652   cat conftest.$ac_ext >&5
14653   eval "$as_ac_Header=no"
14654 fi
14655 rm -f conftest.err conftest.$ac_ext
14656 fi
14657 echo "$as_me:14657: result: `eval echo '${'$as_ac_Header'}'`" >&5
14658 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14659 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14660   cat >>confdefs.h <<EOF
14661 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14662 EOF
14663
14664 fi
14665 done
14666
14667 fi
14668 if test "$ac_cv_header_termios_h" = yes ; then
14669         case "$CFLAGS $CPPFLAGS" in
14670         *-D_POSIX_SOURCE*)
14671                 termios_bad=dunno ;;
14672         *)      termios_bad=maybe ;;
14673         esac
14674         if test "$termios_bad" = maybe ; then
14675         echo "$as_me:14675: checking whether termios.h needs _POSIX_SOURCE" >&5
14676 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14677         cat >conftest.$ac_ext <<_ACEOF
14678 #line 14678 "configure"
14679 #include "confdefs.h"
14680 #include <termios.h>
14681 int
14682 main ()
14683 {
14684 struct termios foo; int x = foo.c_iflag
14685   ;
14686   return 0;
14687 }
14688 _ACEOF
14689 rm -f conftest.$ac_objext
14690 if { (eval echo "$as_me:14690: \"$ac_compile\"") >&5
14691   (eval $ac_compile) 2>&5
14692   ac_status=$?
14693   echo "$as_me:14693: \$? = $ac_status" >&5
14694   (exit $ac_status); } &&
14695          { ac_try='test -s conftest.$ac_objext'
14696   { (eval echo "$as_me:14696: \"$ac_try\"") >&5
14697   (eval $ac_try) 2>&5
14698   ac_status=$?
14699   echo "$as_me:14699: \$? = $ac_status" >&5
14700   (exit $ac_status); }; }; then
14701   termios_bad=no
14702 else
14703   echo "$as_me: failed program was:" >&5
14704 cat conftest.$ac_ext >&5
14705
14706                 cat >conftest.$ac_ext <<_ACEOF
14707 #line 14707 "configure"
14708 #include "confdefs.h"
14709
14710 #define _POSIX_SOURCE
14711 #include <termios.h>
14712 int
14713 main ()
14714 {
14715 struct termios foo; int x = foo.c_iflag
14716   ;
14717   return 0;
14718 }
14719 _ACEOF
14720 rm -f conftest.$ac_objext
14721 if { (eval echo "$as_me:14721: \"$ac_compile\"") >&5
14722   (eval $ac_compile) 2>&5
14723   ac_status=$?
14724   echo "$as_me:14724: \$? = $ac_status" >&5
14725   (exit $ac_status); } &&
14726          { ac_try='test -s conftest.$ac_objext'
14727   { (eval echo "$as_me:14727: \"$ac_try\"") >&5
14728   (eval $ac_try) 2>&5
14729   ac_status=$?
14730   echo "$as_me:14730: \$? = $ac_status" >&5
14731   (exit $ac_status); }; }; then
14732   termios_bad=unknown
14733 else
14734   echo "$as_me: failed program was:" >&5
14735 cat conftest.$ac_ext >&5
14736 termios_bad=yes cat >>confdefs.h <<\EOF
14737 #define SVR4_TERMIO 1
14738 EOF
14739
14740 fi
14741 rm -f conftest.$ac_objext conftest.$ac_ext
14742
14743 fi
14744 rm -f conftest.$ac_objext conftest.$ac_ext
14745         echo "$as_me:14745: result: $termios_bad" >&5
14746 echo "${ECHO_T}$termios_bad" >&6
14747         fi
14748 fi
14749
14750 echo "$as_me:14750: checking for tcgetattr" >&5
14751 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14752 if test "${cf_cv_have_tcgetattr+set}" = set; then
14753   echo $ECHO_N "(cached) $ECHO_C" >&6
14754 else
14755
14756 cat >conftest.$ac_ext <<_ACEOF
14757 #line 14757 "configure"
14758 #include "confdefs.h"
14759
14760 #include <sys/types.h>
14761 #ifdef HAVE_UNISTD_H
14762 #include <unistd.h>
14763 #endif
14764 #ifdef HAVE_TERMIOS_H
14765 #include <termios.h>
14766 #define TTY struct termios
14767 #else
14768 #ifdef HAVE_TERMIO_H
14769 #include <termio.h>
14770 #define TTY struct termio
14771 #endif
14772 #endif
14773
14774 int
14775 main ()
14776 {
14777
14778 TTY foo;
14779 tcgetattr(1, &foo);
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784 rm -f conftest.$ac_objext conftest$ac_exeext
14785 if { (eval echo "$as_me:14785: \"$ac_link\"") >&5
14786   (eval $ac_link) 2>&5
14787   ac_status=$?
14788   echo "$as_me:14788: \$? = $ac_status" >&5
14789   (exit $ac_status); } &&
14790          { ac_try='test -s conftest$ac_exeext'
14791   { (eval echo "$as_me:14791: \"$ac_try\"") >&5
14792   (eval $ac_try) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); }; }; then
14796   cf_cv_have_tcgetattr=yes
14797 else
14798   echo "$as_me: failed program was:" >&5
14799 cat conftest.$ac_ext >&5
14800 cf_cv_have_tcgetattr=no
14801 fi
14802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14803 fi
14804 echo "$as_me:14804: result: $cf_cv_have_tcgetattr" >&5
14805 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14806 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14807 #define HAVE_TCGETATTR 1
14808 EOF
14809
14810 echo "$as_me:14810: checking for vsscanf function or workaround" >&5
14811 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14812 if test "${cf_cv_func_vsscanf+set}" = set; then
14813   echo $ECHO_N "(cached) $ECHO_C" >&6
14814 else
14815
14816 cat >conftest.$ac_ext <<_ACEOF
14817 #line 14817 "configure"
14818 #include "confdefs.h"
14819
14820 #include <stdarg.h>
14821 #include <stdio.h>
14822 int
14823 main ()
14824 {
14825
14826         va_list ap;
14827         vsscanf("from", "%d", ap)
14828   ;
14829   return 0;
14830 }
14831 _ACEOF
14832 rm -f conftest.$ac_objext conftest$ac_exeext
14833 if { (eval echo "$as_me:14833: \"$ac_link\"") >&5
14834   (eval $ac_link) 2>&5
14835   ac_status=$?
14836   echo "$as_me:14836: \$? = $ac_status" >&5
14837   (exit $ac_status); } &&
14838          { ac_try='test -s conftest$ac_exeext'
14839   { (eval echo "$as_me:14839: \"$ac_try\"") >&5
14840   (eval $ac_try) 2>&5
14841   ac_status=$?
14842   echo "$as_me:14842: \$? = $ac_status" >&5
14843   (exit $ac_status); }; }; then
14844   cf_cv_func_vsscanf=vsscanf
14845 else
14846   echo "$as_me: failed program was:" >&5
14847 cat conftest.$ac_ext >&5
14848
14849 cat >conftest.$ac_ext <<_ACEOF
14850 #line 14850 "configure"
14851 #include "confdefs.h"
14852
14853 #include <stdarg.h>
14854 #include <stdio.h>
14855 int
14856 main ()
14857 {
14858
14859     FILE strbuf;
14860     char *str = "from";
14861
14862     strbuf._flag = _IOREAD;
14863     strbuf._ptr = strbuf._base = (unsigned char *) str;
14864     strbuf._cnt = strlen(str);
14865     strbuf._file = _NFILE;
14866     return (vfscanf(&strbuf, "%d", ap))
14867   ;
14868   return 0;
14869 }
14870 _ACEOF
14871 rm -f conftest.$ac_objext conftest$ac_exeext
14872 if { (eval echo "$as_me:14872: \"$ac_link\"") >&5
14873   (eval $ac_link) 2>&5
14874   ac_status=$?
14875   echo "$as_me:14875: \$? = $ac_status" >&5
14876   (exit $ac_status); } &&
14877          { ac_try='test -s conftest$ac_exeext'
14878   { (eval echo "$as_me:14878: \"$ac_try\"") >&5
14879   (eval $ac_try) 2>&5
14880   ac_status=$?
14881   echo "$as_me:14881: \$? = $ac_status" >&5
14882   (exit $ac_status); }; }; then
14883   cf_cv_func_vsscanf=vfscanf
14884 else
14885   echo "$as_me: failed program was:" >&5
14886 cat conftest.$ac_ext >&5
14887
14888 cat >conftest.$ac_ext <<_ACEOF
14889 #line 14889 "configure"
14890 #include "confdefs.h"
14891
14892 #include <stdarg.h>
14893 #include <stdio.h>
14894 int
14895 main ()
14896 {
14897
14898     FILE strbuf;
14899     char *str = "from";
14900
14901     strbuf._flag = _IOREAD;
14902     strbuf._ptr = strbuf._base = (unsigned char *) str;
14903     strbuf._cnt = strlen(str);
14904     strbuf._file = _NFILE;
14905     return (_doscan(&strbuf, "%d", ap))
14906   ;
14907   return 0;
14908 }
14909 _ACEOF
14910 rm -f conftest.$ac_objext conftest$ac_exeext
14911 if { (eval echo "$as_me:14911: \"$ac_link\"") >&5
14912   (eval $ac_link) 2>&5
14913   ac_status=$?
14914   echo "$as_me:14914: \$? = $ac_status" >&5
14915   (exit $ac_status); } &&
14916          { ac_try='test -s conftest$ac_exeext'
14917   { (eval echo "$as_me:14917: \"$ac_try\"") >&5
14918   (eval $ac_try) 2>&5
14919   ac_status=$?
14920   echo "$as_me:14920: \$? = $ac_status" >&5
14921   (exit $ac_status); }; }; then
14922   cf_cv_func_vsscanf=_doscan
14923 else
14924   echo "$as_me: failed program was:" >&5
14925 cat conftest.$ac_ext >&5
14926
14927 cf_cv_func_vsscanf=no
14928 fi
14929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14930 fi
14931 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14932 fi
14933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14934 fi
14935 echo "$as_me:14935: result: $cf_cv_func_vsscanf" >&5
14936 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14937
14938 case $cf_cv_func_vsscanf in #(vi
14939 vsscanf) cat >>confdefs.h <<\EOF
14940 #define HAVE_VSSCANF 1
14941 EOF
14942 ;; #(vi
14943 vfscanf) cat >>confdefs.h <<\EOF
14944 #define HAVE_VFSCANF 1
14945 EOF
14946 ;; #(vi
14947 _doscan) cat >>confdefs.h <<\EOF
14948 #define HAVE__DOSCAN 1
14949 EOF
14950 ;;
14951 esac
14952
14953 echo "$as_me:14953: checking for working mkstemp" >&5
14954 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14955 if test "${cf_cv_func_mkstemp+set}" = set; then
14956   echo $ECHO_N "(cached) $ECHO_C" >&6
14957 else
14958
14959 rm -rf conftest*
14960 if test "$cross_compiling" = yes; then
14961   echo "$as_me:14961: checking for mkstemp" >&5
14962 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14963 if test "${ac_cv_func_mkstemp+set}" = set; then
14964   echo $ECHO_N "(cached) $ECHO_C" >&6
14965 else
14966   cat >conftest.$ac_ext <<_ACEOF
14967 #line 14967 "configure"
14968 #include "confdefs.h"
14969 /* System header to define __stub macros and hopefully few prototypes,
14970     which can conflict with char mkstemp (); below.  */
14971 #include <assert.h>
14972 /* Override any gcc2 internal prototype to avoid an error.  */
14973 #ifdef __cplusplus
14974 extern "C"
14975 #endif
14976 /* We use char because int might match the return type of a gcc2
14977    builtin and then its argument prototype would still apply.  */
14978 char mkstemp ();
14979 char (*f) ();
14980
14981 int
14982 main ()
14983 {
14984 /* The GNU C library defines this for functions which it implements
14985     to always fail with ENOSYS.  Some functions are actually named
14986     something starting with __ and the normal name is an alias.  */
14987 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14988 choke me
14989 #else
14990 f = mkstemp;
14991 #endif
14992
14993   ;
14994   return 0;
14995 }
14996 _ACEOF
14997 rm -f conftest.$ac_objext conftest$ac_exeext
14998 if { (eval echo "$as_me:14998: \"$ac_link\"") >&5
14999   (eval $ac_link) 2>&5
15000   ac_status=$?
15001   echo "$as_me:15001: \$? = $ac_status" >&5
15002   (exit $ac_status); } &&
15003          { ac_try='test -s conftest$ac_exeext'
15004   { (eval echo "$as_me:15004: \"$ac_try\"") >&5
15005   (eval $ac_try) 2>&5
15006   ac_status=$?
15007   echo "$as_me:15007: \$? = $ac_status" >&5
15008   (exit $ac_status); }; }; then
15009   ac_cv_func_mkstemp=yes
15010 else
15011   echo "$as_me: failed program was:" >&5
15012 cat conftest.$ac_ext >&5
15013 ac_cv_func_mkstemp=no
15014 fi
15015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15016 fi
15017 echo "$as_me:15017: result: $ac_cv_func_mkstemp" >&5
15018 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15019
15020 else
15021   cat >conftest.$ac_ext <<_ACEOF
15022 #line 15022 "configure"
15023 #include "confdefs.h"
15024
15025 #include <sys/types.h>
15026 #include <stdlib.h>
15027 #include <stdio.h>
15028 #include <string.h>
15029 #include <sys/stat.h>
15030 int main()
15031 {
15032         char *tmpl = "conftestXXXXXX";
15033         char name[2][80];
15034         int n;
15035         int result = 0;
15036         int fd;
15037         struct stat sb;
15038
15039         umask(077);
15040         for (n = 0; n < 2; ++n) {
15041                 strcpy(name[n], tmpl);
15042                 if ((fd = mkstemp(name[n])) >= 0) {
15043                         if (!strcmp(name[n], tmpl)
15044                          || stat(name[n], &sb) != 0
15045                          || (sb.st_mode & S_IFMT) != S_IFREG
15046                          || (sb.st_mode & 077) != 0) {
15047                                 result = 1;
15048                         }
15049                         close(fd);
15050                 }
15051         }
15052         if (result == 0
15053          && !strcmp(name[0], name[1]))
15054                 result = 1;
15055         ${cf_cv_main_return:-return}(result);
15056 }
15057
15058 _ACEOF
15059 rm -f conftest$ac_exeext
15060 if { (eval echo "$as_me:15060: \"$ac_link\"") >&5
15061   (eval $ac_link) 2>&5
15062   ac_status=$?
15063   echo "$as_me:15063: \$? = $ac_status" >&5
15064   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15065   { (eval echo "$as_me:15065: \"$ac_try\"") >&5
15066   (eval $ac_try) 2>&5
15067   ac_status=$?
15068   echo "$as_me:15068: \$? = $ac_status" >&5
15069   (exit $ac_status); }; }; then
15070   cf_cv_func_mkstemp=yes
15071
15072 else
15073   echo "$as_me: program exited with status $ac_status" >&5
15074 echo "$as_me: failed program was:" >&5
15075 cat conftest.$ac_ext >&5
15076 cf_cv_func_mkstemp=no
15077
15078 fi
15079 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15080 fi
15081
15082 fi
15083 echo "$as_me:15083: result: $cf_cv_func_mkstemp" >&5
15084 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15085 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15086         cat >>confdefs.h <<\EOF
15087 #define HAVE_MKSTEMP 1
15088 EOF
15089
15090 fi
15091
15092 # setup for prototype of fallback for vsscanf()
15093
15094 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15095         HAVE_VSSCANF=1
15096 else
15097         HAVE_VSSCANF=0
15098 fi
15099
15100 if test "$cross_compiling" = yes ; then
15101         { echo "$as_me:15101: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15102 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15103 else
15104         echo "$as_me:15104: checking whether setvbuf arguments are reversed" >&5
15105 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15106 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15107   echo $ECHO_N "(cached) $ECHO_C" >&6
15108 else
15109   if test "$cross_compiling" = yes; then
15110   { { echo "$as_me:15110: error: cannot run test program while cross compiling" >&5
15111 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15112    { (exit 1); exit 1; }; }
15113 else
15114   cat >conftest.$ac_ext <<_ACEOF
15115 #line 15115 "configure"
15116 #include "confdefs.h"
15117 #include <stdio.h>
15118 /* If setvbuf has the reversed format, exit 0. */
15119 int
15120 main ()
15121 {
15122   /* This call has the arguments reversed.
15123      A reversed system may check and see that the address of main
15124      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15125   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15126     $ac_main_return(1);
15127   putc('\r', stdout);
15128   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15129 }
15130 _ACEOF
15131 rm -f conftest$ac_exeext
15132 if { (eval echo "$as_me:15132: \"$ac_link\"") >&5
15133   (eval $ac_link) 2>&5
15134   ac_status=$?
15135   echo "$as_me:15135: \$? = $ac_status" >&5
15136   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15137   { (eval echo "$as_me:15137: \"$ac_try\"") >&5
15138   (eval $ac_try) 2>&5
15139   ac_status=$?
15140   echo "$as_me:15140: \$? = $ac_status" >&5
15141   (exit $ac_status); }; }; then
15142   ac_cv_func_setvbuf_reversed=yes
15143 else
15144   echo "$as_me: program exited with status $ac_status" >&5
15145 echo "$as_me: failed program was:" >&5
15146 cat conftest.$ac_ext >&5
15147 ac_cv_func_setvbuf_reversed=no
15148 fi
15149 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15150 fi
15151 rm -f core core.* *.core
15152 fi
15153 echo "$as_me:15153: result: $ac_cv_func_setvbuf_reversed" >&5
15154 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15155 if test $ac_cv_func_setvbuf_reversed = yes; then
15156
15157 cat >>confdefs.h <<\EOF
15158 #define SETVBUF_REVERSED 1
15159 EOF
15160
15161 fi
15162
15163 fi
15164 echo "$as_me:15164: checking return type of signal handlers" >&5
15165 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15166 if test "${ac_cv_type_signal+set}" = set; then
15167   echo $ECHO_N "(cached) $ECHO_C" >&6
15168 else
15169   cat >conftest.$ac_ext <<_ACEOF
15170 #line 15170 "configure"
15171 #include "confdefs.h"
15172 #include <sys/types.h>
15173 #include <signal.h>
15174 #ifdef signal
15175 # undef signal
15176 #endif
15177 #ifdef __cplusplus
15178 extern "C" void (*signal (int, void (*)(int)))(int);
15179 #else
15180 void (*signal ()) ();
15181 #endif
15182
15183 int
15184 main ()
15185 {
15186 int i;
15187   ;
15188   return 0;
15189 }
15190 _ACEOF
15191 rm -f conftest.$ac_objext
15192 if { (eval echo "$as_me:15192: \"$ac_compile\"") >&5
15193   (eval $ac_compile) 2>&5
15194   ac_status=$?
15195   echo "$as_me:15195: \$? = $ac_status" >&5
15196   (exit $ac_status); } &&
15197          { ac_try='test -s conftest.$ac_objext'
15198   { (eval echo "$as_me:15198: \"$ac_try\"") >&5
15199   (eval $ac_try) 2>&5
15200   ac_status=$?
15201   echo "$as_me:15201: \$? = $ac_status" >&5
15202   (exit $ac_status); }; }; then
15203   ac_cv_type_signal=void
15204 else
15205   echo "$as_me: failed program was:" >&5
15206 cat conftest.$ac_ext >&5
15207 ac_cv_type_signal=int
15208 fi
15209 rm -f conftest.$ac_objext conftest.$ac_ext
15210 fi
15211 echo "$as_me:15211: result: $ac_cv_type_signal" >&5
15212 echo "${ECHO_T}$ac_cv_type_signal" >&6
15213
15214 cat >>confdefs.h <<EOF
15215 #define RETSIGTYPE $ac_cv_type_signal
15216 EOF
15217
15218 echo "$as_me:15218: checking for type sigaction_t" >&5
15219 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15220 if test "${cf_cv_type_sigaction+set}" = set; then
15221   echo $ECHO_N "(cached) $ECHO_C" >&6
15222 else
15223
15224         cat >conftest.$ac_ext <<_ACEOF
15225 #line 15225 "configure"
15226 #include "confdefs.h"
15227
15228 #include <signal.h>
15229 int
15230 main ()
15231 {
15232 sigaction_t x
15233   ;
15234   return 0;
15235 }
15236 _ACEOF
15237 rm -f conftest.$ac_objext
15238 if { (eval echo "$as_me:15238: \"$ac_compile\"") >&5
15239   (eval $ac_compile) 2>&5
15240   ac_status=$?
15241   echo "$as_me:15241: \$? = $ac_status" >&5
15242   (exit $ac_status); } &&
15243          { ac_try='test -s conftest.$ac_objext'
15244   { (eval echo "$as_me:15244: \"$ac_try\"") >&5
15245   (eval $ac_try) 2>&5
15246   ac_status=$?
15247   echo "$as_me:15247: \$? = $ac_status" >&5
15248   (exit $ac_status); }; }; then
15249   cf_cv_type_sigaction=yes
15250 else
15251   echo "$as_me: failed program was:" >&5
15252 cat conftest.$ac_ext >&5
15253 cf_cv_type_sigaction=no
15254 fi
15255 rm -f conftest.$ac_objext conftest.$ac_ext
15256 fi
15257
15258 echo "$as_me:15258: result: $cf_cv_type_sigaction" >&5
15259 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15260 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15261 #define HAVE_TYPE_SIGACTION 1
15262 EOF
15263
15264 echo "$as_me:15264: checking declaration of size-change" >&5
15265 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15266 if test "${cf_cv_sizechange+set}" = set; then
15267   echo $ECHO_N "(cached) $ECHO_C" >&6
15268 else
15269
15270     cf_cv_sizechange=unknown
15271     cf_save_CPPFLAGS="$CPPFLAGS"
15272
15273 for cf_opts in "" "NEED_PTEM_H"
15274 do
15275
15276     CPPFLAGS="$cf_save_CPPFLAGS"
15277     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15278     cat >conftest.$ac_ext <<_ACEOF
15279 #line 15279 "configure"
15280 #include "confdefs.h"
15281 #include <sys/types.h>
15282 #ifdef HAVE_TERMIOS_H
15283 #include <termios.h>
15284 #else
15285 #ifdef HAVE_TERMIO_H
15286 #include <termio.h>
15287 #endif
15288 #endif
15289 #ifdef NEED_PTEM_H
15290 /* This is a workaround for SCO:  they neglected to define struct winsize in
15291  * termios.h -- it's only in termio.h and ptem.h
15292  */
15293 #include        <sys/stream.h>
15294 #include        <sys/ptem.h>
15295 #endif
15296 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15297 #include <sys/ioctl.h>
15298 #endif
15299
15300 int
15301 main ()
15302 {
15303
15304 #ifdef TIOCGSIZE
15305         struct ttysize win;     /* FIXME: what system is this? */
15306         int y = win.ts_lines;
15307         int x = win.ts_cols;
15308 #else
15309 #ifdef TIOCGWINSZ
15310         struct winsize win;
15311         int y = win.ws_row;
15312         int x = win.ws_col;
15313 #else
15314         no TIOCGSIZE or TIOCGWINSZ
15315 #endif /* TIOCGWINSZ */
15316 #endif /* TIOCGSIZE */
15317
15318   ;
15319   return 0;
15320 }
15321 _ACEOF
15322 rm -f conftest.$ac_objext
15323 if { (eval echo "$as_me:15323: \"$ac_compile\"") >&5
15324   (eval $ac_compile) 2>&5
15325   ac_status=$?
15326   echo "$as_me:15326: \$? = $ac_status" >&5
15327   (exit $ac_status); } &&
15328          { ac_try='test -s conftest.$ac_objext'
15329   { (eval echo "$as_me:15329: \"$ac_try\"") >&5
15330   (eval $ac_try) 2>&5
15331   ac_status=$?
15332   echo "$as_me:15332: \$? = $ac_status" >&5
15333   (exit $ac_status); }; }; then
15334   cf_cv_sizechange=yes
15335 else
15336   echo "$as_me: failed program was:" >&5
15337 cat conftest.$ac_ext >&5
15338 cf_cv_sizechange=no
15339 fi
15340 rm -f conftest.$ac_objext conftest.$ac_ext
15341
15342         CPPFLAGS="$cf_save_CPPFLAGS"
15343         if test "$cf_cv_sizechange" = yes ; then
15344                 echo "size-change succeeded ($cf_opts)" >&5
15345                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15346                 break
15347         fi
15348 done
15349
15350 fi
15351 echo "$as_me:15351: result: $cf_cv_sizechange" >&5
15352 echo "${ECHO_T}$cf_cv_sizechange" >&6
15353 if test "$cf_cv_sizechange" != no ; then
15354         cat >>confdefs.h <<\EOF
15355 #define HAVE_SIZECHANGE 1
15356 EOF
15357
15358         case $cf_cv_sizechange in #(vi
15359         NEED*)
15360                 cat >>confdefs.h <<EOF
15361 #define $cf_cv_sizechange  1
15362 EOF
15363
15364                 ;;
15365         esac
15366 fi
15367
15368 echo "$as_me:15368: checking for memmove" >&5
15369 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15370 if test "${ac_cv_func_memmove+set}" = set; then
15371   echo $ECHO_N "(cached) $ECHO_C" >&6
15372 else
15373   cat >conftest.$ac_ext <<_ACEOF
15374 #line 15374 "configure"
15375 #include "confdefs.h"
15376 /* System header to define __stub macros and hopefully few prototypes,
15377     which can conflict with char memmove (); below.  */
15378 #include <assert.h>
15379 /* Override any gcc2 internal prototype to avoid an error.  */
15380 #ifdef __cplusplus
15381 extern "C"
15382 #endif
15383 /* We use char because int might match the return type of a gcc2
15384    builtin and then its argument prototype would still apply.  */
15385 char memmove ();
15386 char (*f) ();
15387
15388 int
15389 main ()
15390 {
15391 /* The GNU C library defines this for functions which it implements
15392     to always fail with ENOSYS.  Some functions are actually named
15393     something starting with __ and the normal name is an alias.  */
15394 #if defined (__stub_memmove) || defined (__stub___memmove)
15395 choke me
15396 #else
15397 f = memmove;
15398 #endif
15399
15400   ;
15401   return 0;
15402 }
15403 _ACEOF
15404 rm -f conftest.$ac_objext conftest$ac_exeext
15405 if { (eval echo "$as_me:15405: \"$ac_link\"") >&5
15406   (eval $ac_link) 2>&5
15407   ac_status=$?
15408   echo "$as_me:15408: \$? = $ac_status" >&5
15409   (exit $ac_status); } &&
15410          { ac_try='test -s conftest$ac_exeext'
15411   { (eval echo "$as_me:15411: \"$ac_try\"") >&5
15412   (eval $ac_try) 2>&5
15413   ac_status=$?
15414   echo "$as_me:15414: \$? = $ac_status" >&5
15415   (exit $ac_status); }; }; then
15416   ac_cv_func_memmove=yes
15417 else
15418   echo "$as_me: failed program was:" >&5
15419 cat conftest.$ac_ext >&5
15420 ac_cv_func_memmove=no
15421 fi
15422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15423 fi
15424 echo "$as_me:15424: result: $ac_cv_func_memmove" >&5
15425 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15426 if test $ac_cv_func_memmove = yes; then
15427   :
15428 else
15429
15430 echo "$as_me:15430: checking for bcopy" >&5
15431 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15432 if test "${ac_cv_func_bcopy+set}" = set; then
15433   echo $ECHO_N "(cached) $ECHO_C" >&6
15434 else
15435   cat >conftest.$ac_ext <<_ACEOF
15436 #line 15436 "configure"
15437 #include "confdefs.h"
15438 /* System header to define __stub macros and hopefully few prototypes,
15439     which can conflict with char bcopy (); below.  */
15440 #include <assert.h>
15441 /* Override any gcc2 internal prototype to avoid an error.  */
15442 #ifdef __cplusplus
15443 extern "C"
15444 #endif
15445 /* We use char because int might match the return type of a gcc2
15446    builtin and then its argument prototype would still apply.  */
15447 char bcopy ();
15448 char (*f) ();
15449
15450 int
15451 main ()
15452 {
15453 /* The GNU C library defines this for functions which it implements
15454     to always fail with ENOSYS.  Some functions are actually named
15455     something starting with __ and the normal name is an alias.  */
15456 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15457 choke me
15458 #else
15459 f = bcopy;
15460 #endif
15461
15462   ;
15463   return 0;
15464 }
15465 _ACEOF
15466 rm -f conftest.$ac_objext conftest$ac_exeext
15467 if { (eval echo "$as_me:15467: \"$ac_link\"") >&5
15468   (eval $ac_link) 2>&5
15469   ac_status=$?
15470   echo "$as_me:15470: \$? = $ac_status" >&5
15471   (exit $ac_status); } &&
15472          { ac_try='test -s conftest$ac_exeext'
15473   { (eval echo "$as_me:15473: \"$ac_try\"") >&5
15474   (eval $ac_try) 2>&5
15475   ac_status=$?
15476   echo "$as_me:15476: \$? = $ac_status" >&5
15477   (exit $ac_status); }; }; then
15478   ac_cv_func_bcopy=yes
15479 else
15480   echo "$as_me: failed program was:" >&5
15481 cat conftest.$ac_ext >&5
15482 ac_cv_func_bcopy=no
15483 fi
15484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15485 fi
15486 echo "$as_me:15486: result: $ac_cv_func_bcopy" >&5
15487 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15488 if test $ac_cv_func_bcopy = yes; then
15489
15490         echo "$as_me:15490: checking if bcopy does overlapping moves" >&5
15491 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15492 if test "${cf_cv_good_bcopy+set}" = set; then
15493   echo $ECHO_N "(cached) $ECHO_C" >&6
15494 else
15495
15496                 if test "$cross_compiling" = yes; then
15497   cf_cv_good_bcopy=unknown
15498 else
15499   cat >conftest.$ac_ext <<_ACEOF
15500 #line 15500 "configure"
15501 #include "confdefs.h"
15502
15503 int main() {
15504         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15505         char temp[40];
15506         bcopy(data, temp, sizeof(data));
15507         bcopy(temp+10, temp, 15);
15508         bcopy(temp+5, temp+15, 10);
15509         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15510 }
15511
15512 _ACEOF
15513 rm -f conftest$ac_exeext
15514 if { (eval echo "$as_me:15514: \"$ac_link\"") >&5
15515   (eval $ac_link) 2>&5
15516   ac_status=$?
15517   echo "$as_me:15517: \$? = $ac_status" >&5
15518   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15519   { (eval echo "$as_me:15519: \"$ac_try\"") >&5
15520   (eval $ac_try) 2>&5
15521   ac_status=$?
15522   echo "$as_me:15522: \$? = $ac_status" >&5
15523   (exit $ac_status); }; }; then
15524   cf_cv_good_bcopy=yes
15525 else
15526   echo "$as_me: program exited with status $ac_status" >&5
15527 echo "$as_me: failed program was:" >&5
15528 cat conftest.$ac_ext >&5
15529 cf_cv_good_bcopy=no
15530 fi
15531 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15532 fi
15533
15534 fi
15535 echo "$as_me:15535: result: $cf_cv_good_bcopy" >&5
15536 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15537
15538 else
15539   cf_cv_good_bcopy=no
15540 fi
15541
15542         if test "$cf_cv_good_bcopy" = yes ; then
15543                 cat >>confdefs.h <<\EOF
15544 #define USE_OK_BCOPY 1
15545 EOF
15546
15547         else
15548                 cat >>confdefs.h <<\EOF
15549 #define USE_MY_MEMMOVE 1
15550 EOF
15551
15552         fi
15553
15554 fi
15555
15556 echo "$as_me:15556: checking if poll really works" >&5
15557 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15558 if test "${cf_cv_working_poll+set}" = set; then
15559   echo $ECHO_N "(cached) $ECHO_C" >&6
15560 else
15561
15562 if test "$cross_compiling" = yes; then
15563   cf_cv_working_poll=unknown
15564 else
15565   cat >conftest.$ac_ext <<_ACEOF
15566 #line 15566 "configure"
15567 #include "confdefs.h"
15568
15569 #include <stdio.h>
15570 #ifdef HAVE_POLL_H
15571 #include <poll.h>
15572 #else
15573 #include <sys/poll.h>
15574 #endif
15575 int main() {
15576         struct pollfd myfds;
15577         int ret;
15578
15579         myfds.fd = 0;
15580         myfds.events = POLLIN;
15581
15582         ret = poll(&myfds, 1, 100);
15583         ${cf_cv_main_return:-return}(ret != 0);
15584 }
15585 _ACEOF
15586 rm -f conftest$ac_exeext
15587 if { (eval echo "$as_me:15587: \"$ac_link\"") >&5
15588   (eval $ac_link) 2>&5
15589   ac_status=$?
15590   echo "$as_me:15590: \$? = $ac_status" >&5
15591   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15592   { (eval echo "$as_me:15592: \"$ac_try\"") >&5
15593   (eval $ac_try) 2>&5
15594   ac_status=$?
15595   echo "$as_me:15595: \$? = $ac_status" >&5
15596   (exit $ac_status); }; }; then
15597   cf_cv_working_poll=yes
15598 else
15599   echo "$as_me: program exited with status $ac_status" >&5
15600 echo "$as_me: failed program was:" >&5
15601 cat conftest.$ac_ext >&5
15602 cf_cv_working_poll=no
15603 fi
15604 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15605 fi
15606 fi
15607 echo "$as_me:15607: result: $cf_cv_working_poll" >&5
15608 echo "${ECHO_T}$cf_cv_working_poll" >&6
15609 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15610 #define HAVE_WORKING_POLL 1
15611 EOF
15612
15613 echo "$as_me:15613: checking for va_copy" >&5
15614 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15615 if test "${cf_cv_have_va_copy+set}" = set; then
15616   echo $ECHO_N "(cached) $ECHO_C" >&6
15617 else
15618
15619 cat >conftest.$ac_ext <<_ACEOF
15620 #line 15620 "configure"
15621 #include "confdefs.h"
15622
15623 #include <stdarg.h>
15624
15625 int
15626 main ()
15627 {
15628
15629         static va_list dst;
15630         static va_list src;
15631         va_copy(dst, src)
15632   ;
15633   return 0;
15634 }
15635 _ACEOF
15636 rm -f conftest.$ac_objext conftest$ac_exeext
15637 if { (eval echo "$as_me:15637: \"$ac_link\"") >&5
15638   (eval $ac_link) 2>&5
15639   ac_status=$?
15640   echo "$as_me:15640: \$? = $ac_status" >&5
15641   (exit $ac_status); } &&
15642          { ac_try='test -s conftest$ac_exeext'
15643   { (eval echo "$as_me:15643: \"$ac_try\"") >&5
15644   (eval $ac_try) 2>&5
15645   ac_status=$?
15646   echo "$as_me:15646: \$? = $ac_status" >&5
15647   (exit $ac_status); }; }; then
15648   cf_cv_have_va_copy=yes
15649 else
15650   echo "$as_me: failed program was:" >&5
15651 cat conftest.$ac_ext >&5
15652 cf_cv_have_va_copy=no
15653 fi
15654 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15655 fi
15656 echo "$as_me:15656: result: $cf_cv_have_va_copy" >&5
15657 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15658
15659 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15660 #define HAVE_VA_COPY 1
15661 EOF
15662
15663 echo "$as_me:15663: checking for __va_copy" >&5
15664 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15665 if test "${cf_cv_have___va_copy+set}" = set; then
15666   echo $ECHO_N "(cached) $ECHO_C" >&6
15667 else
15668
15669 cat >conftest.$ac_ext <<_ACEOF
15670 #line 15670 "configure"
15671 #include "confdefs.h"
15672
15673 #include <stdarg.h>
15674
15675 int
15676 main ()
15677 {
15678
15679         static va_list dst;
15680         static va_list src;
15681         __va_copy(dst, src)
15682   ;
15683   return 0;
15684 }
15685 _ACEOF
15686 rm -f conftest.$ac_objext conftest$ac_exeext
15687 if { (eval echo "$as_me:15687: \"$ac_link\"") >&5
15688   (eval $ac_link) 2>&5
15689   ac_status=$?
15690   echo "$as_me:15690: \$? = $ac_status" >&5
15691   (exit $ac_status); } &&
15692          { ac_try='test -s conftest$ac_exeext'
15693   { (eval echo "$as_me:15693: \"$ac_try\"") >&5
15694   (eval $ac_try) 2>&5
15695   ac_status=$?
15696   echo "$as_me:15696: \$? = $ac_status" >&5
15697   (exit $ac_status); }; }; then
15698   cf_cv_have___va_copy=yes
15699 else
15700   echo "$as_me: failed program was:" >&5
15701 cat conftest.$ac_ext >&5
15702 cf_cv_have___va_copy=no
15703 fi
15704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15705 fi
15706 echo "$as_me:15706: result: $cf_cv_have___va_copy" >&5
15707 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15708
15709 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15710 #define HAVE___VA_COPY 1
15711 EOF
15712
15713 echo "$as_me:15713: checking for pid_t" >&5
15714 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15715 if test "${ac_cv_type_pid_t+set}" = set; then
15716   echo $ECHO_N "(cached) $ECHO_C" >&6
15717 else
15718   cat >conftest.$ac_ext <<_ACEOF
15719 #line 15719 "configure"
15720 #include "confdefs.h"
15721 $ac_includes_default
15722 int
15723 main ()
15724 {
15725 if ((pid_t *) 0)
15726   return 0;
15727 if (sizeof (pid_t))
15728   return 0;
15729   ;
15730   return 0;
15731 }
15732 _ACEOF
15733 rm -f conftest.$ac_objext
15734 if { (eval echo "$as_me:15734: \"$ac_compile\"") >&5
15735   (eval $ac_compile) 2>&5
15736   ac_status=$?
15737   echo "$as_me:15737: \$? = $ac_status" >&5
15738   (exit $ac_status); } &&
15739          { ac_try='test -s conftest.$ac_objext'
15740   { (eval echo "$as_me:15740: \"$ac_try\"") >&5
15741   (eval $ac_try) 2>&5
15742   ac_status=$?
15743   echo "$as_me:15743: \$? = $ac_status" >&5
15744   (exit $ac_status); }; }; then
15745   ac_cv_type_pid_t=yes
15746 else
15747   echo "$as_me: failed program was:" >&5
15748 cat conftest.$ac_ext >&5
15749 ac_cv_type_pid_t=no
15750 fi
15751 rm -f conftest.$ac_objext conftest.$ac_ext
15752 fi
15753 echo "$as_me:15753: result: $ac_cv_type_pid_t" >&5
15754 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15755 if test $ac_cv_type_pid_t = yes; then
15756   :
15757 else
15758
15759 cat >>confdefs.h <<EOF
15760 #define pid_t int
15761 EOF
15762
15763 fi
15764
15765 for ac_header in unistd.h vfork.h
15766 do
15767 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15768 echo "$as_me:15768: checking for $ac_header" >&5
15769 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15770 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15771   echo $ECHO_N "(cached) $ECHO_C" >&6
15772 else
15773   cat >conftest.$ac_ext <<_ACEOF
15774 #line 15774 "configure"
15775 #include "confdefs.h"
15776 #include <$ac_header>
15777 _ACEOF
15778 if { (eval echo "$as_me:15778: \"$ac_cpp conftest.$ac_ext\"") >&5
15779   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15780   ac_status=$?
15781   egrep -v '^ *\+' conftest.er1 >conftest.err
15782   rm -f conftest.er1
15783   cat conftest.err >&5
15784   echo "$as_me:15784: \$? = $ac_status" >&5
15785   (exit $ac_status); } >/dev/null; then
15786   if test -s conftest.err; then
15787     ac_cpp_err=$ac_c_preproc_warn_flag
15788   else
15789     ac_cpp_err=
15790   fi
15791 else
15792   ac_cpp_err=yes
15793 fi
15794 if test -z "$ac_cpp_err"; then
15795   eval "$as_ac_Header=yes"
15796 else
15797   echo "$as_me: failed program was:" >&5
15798   cat conftest.$ac_ext >&5
15799   eval "$as_ac_Header=no"
15800 fi
15801 rm -f conftest.err conftest.$ac_ext
15802 fi
15803 echo "$as_me:15803: result: `eval echo '${'$as_ac_Header'}'`" >&5
15804 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15805 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15806   cat >>confdefs.h <<EOF
15807 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15808 EOF
15809
15810 fi
15811 done
15812
15813 for ac_func in fork vfork
15814 do
15815 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15816 echo "$as_me:15816: checking for $ac_func" >&5
15817 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15818 if eval "test \"\${$as_ac_var+set}\" = set"; then
15819   echo $ECHO_N "(cached) $ECHO_C" >&6
15820 else
15821   cat >conftest.$ac_ext <<_ACEOF
15822 #line 15822 "configure"
15823 #include "confdefs.h"
15824 /* System header to define __stub macros and hopefully few prototypes,
15825     which can conflict with char $ac_func (); below.  */
15826 #include <assert.h>
15827 /* Override any gcc2 internal prototype to avoid an error.  */
15828 #ifdef __cplusplus
15829 extern "C"
15830 #endif
15831 /* We use char because int might match the return type of a gcc2
15832    builtin and then its argument prototype would still apply.  */
15833 char $ac_func ();
15834 char (*f) ();
15835
15836 int
15837 main ()
15838 {
15839 /* The GNU C library defines this for functions which it implements
15840     to always fail with ENOSYS.  Some functions are actually named
15841     something starting with __ and the normal name is an alias.  */
15842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15843 choke me
15844 #else
15845 f = $ac_func;
15846 #endif
15847
15848   ;
15849   return 0;
15850 }
15851 _ACEOF
15852 rm -f conftest.$ac_objext conftest$ac_exeext
15853 if { (eval echo "$as_me:15853: \"$ac_link\"") >&5
15854   (eval $ac_link) 2>&5
15855   ac_status=$?
15856   echo "$as_me:15856: \$? = $ac_status" >&5
15857   (exit $ac_status); } &&
15858          { ac_try='test -s conftest$ac_exeext'
15859   { (eval echo "$as_me:15859: \"$ac_try\"") >&5
15860   (eval $ac_try) 2>&5
15861   ac_status=$?
15862   echo "$as_me:15862: \$? = $ac_status" >&5
15863   (exit $ac_status); }; }; then
15864   eval "$as_ac_var=yes"
15865 else
15866   echo "$as_me: failed program was:" >&5
15867 cat conftest.$ac_ext >&5
15868 eval "$as_ac_var=no"
15869 fi
15870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15871 fi
15872 echo "$as_me:15872: result: `eval echo '${'$as_ac_var'}'`" >&5
15873 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15874 if test `eval echo '${'$as_ac_var'}'` = yes; then
15875   cat >>confdefs.h <<EOF
15876 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15877 EOF
15878
15879 fi
15880 done
15881
15882 ac_cv_func_fork_works=$ac_cv_func_fork
15883 if test "x$ac_cv_func_fork" = xyes; then
15884   echo "$as_me:15884: checking for working fork" >&5
15885 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15886 if test "${ac_cv_func_fork_works+set}" = set; then
15887   echo $ECHO_N "(cached) $ECHO_C" >&6
15888 else
15889   if test "$cross_compiling" = yes; then
15890   ac_cv_func_fork_works=cross
15891 else
15892   cat >conftest.$ac_ext <<_ACEOF
15893 /* By Rüdiger Kuhlmann. */
15894       #include <sys/types.h>
15895       #if HAVE_UNISTD_H
15896       # include <unistd.h>
15897       #endif
15898       /* Some systems only have a dummy stub for fork() */
15899       int main ()
15900       {
15901         if (fork() < 0)
15902           $ac_main_return (1);
15903         $ac_main_return (0);
15904       }
15905 _ACEOF
15906 rm -f conftest$ac_exeext
15907 if { (eval echo "$as_me:15907: \"$ac_link\"") >&5
15908   (eval $ac_link) 2>&5
15909   ac_status=$?
15910   echo "$as_me:15910: \$? = $ac_status" >&5
15911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15912   { (eval echo "$as_me:15912: \"$ac_try\"") >&5
15913   (eval $ac_try) 2>&5
15914   ac_status=$?
15915   echo "$as_me:15915: \$? = $ac_status" >&5
15916   (exit $ac_status); }; }; then
15917   ac_cv_func_fork_works=yes
15918 else
15919   echo "$as_me: program exited with status $ac_status" >&5
15920 echo "$as_me: failed program was:" >&5
15921 cat conftest.$ac_ext >&5
15922 ac_cv_func_fork_works=no
15923 fi
15924 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15925 fi
15926 fi
15927 echo "$as_me:15927: result: $ac_cv_func_fork_works" >&5
15928 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15929
15930 fi
15931 if test "x$ac_cv_func_fork_works" = xcross; then
15932   case $host in
15933     *-*-amigaos* | *-*-msdosdjgpp*)
15934       # Override, as these systems have only a dummy fork() stub
15935       ac_cv_func_fork_works=no
15936       ;;
15937     *)
15938       ac_cv_func_fork_works=yes
15939       ;;
15940   esac
15941   { echo "$as_me:15941: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15942 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15943 fi
15944 ac_cv_func_vfork_works=$ac_cv_func_vfork
15945 if test "x$ac_cv_func_vfork" = xyes; then
15946   echo "$as_me:15946: checking for working vfork" >&5
15947 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15948 if test "${ac_cv_func_vfork_works+set}" = set; then
15949   echo $ECHO_N "(cached) $ECHO_C" >&6
15950 else
15951   if test "$cross_compiling" = yes; then
15952   ac_cv_func_vfork_works=cross
15953 else
15954   cat >conftest.$ac_ext <<_ACEOF
15955 #line 15955 "configure"
15956 #include "confdefs.h"
15957 /* Thanks to Paul Eggert for this test.  */
15958 #include <stdio.h>
15959 #include <sys/types.h>
15960 #include <sys/stat.h>
15961 #if HAVE_UNISTD_H
15962 # include <unistd.h>
15963 #endif
15964 #if HAVE_VFORK_H
15965 # include <vfork.h>
15966 #endif
15967 /* On some sparc systems, changes by the child to local and incoming
15968    argument registers are propagated back to the parent.  The compiler
15969    is told about this with #include <vfork.h>, but some compilers
15970    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15971    static variable whose address is put into a register that is
15972    clobbered by the vfork.  */
15973 static
15974 #ifdef __cplusplus
15975 sparc_address_test (int arg)
15976 # else
15977 sparc_address_test (arg) int arg;
15978 #endif
15979 {
15980   static pid_t child;
15981   if (!child) {
15982     child = vfork ();
15983     if (child < 0) {
15984       perror ("vfork");
15985       _exit(2);
15986     }
15987     if (!child) {
15988       arg = getpid();
15989       write(-1, "", 0);
15990       _exit (arg);
15991     }
15992   }
15993 }
15994
15995 int
15996 main ()
15997 {
15998   pid_t parent = getpid ();
15999   pid_t child;
16000
16001   sparc_address_test ();
16002
16003   child = vfork ();
16004
16005   if (child == 0) {
16006     /* Here is another test for sparc vfork register problems.  This
16007        test uses lots of local variables, at least as many local
16008        variables as main has allocated so far including compiler
16009        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16010        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16011        reuse the register of parent for one of the local variables,
16012        since it will think that parent can't possibly be used any more
16013        in this routine.  Assigning to the local variable will thus
16014        munge parent in the parent process.  */
16015     pid_t
16016       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16017       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16018     /* Convince the compiler that p..p7 are live; otherwise, it might
16019        use the same hardware register for all 8 local variables.  */
16020     if (p != p1 || p != p2 || p != p3 || p != p4
16021         || p != p5 || p != p6 || p != p7)
16022       _exit(1);
16023
16024     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16025        from child file descriptors.  If the child closes a descriptor
16026        before it execs or exits, this munges the parent's descriptor
16027        as well.  Test for this by closing stdout in the child.  */
16028     _exit(close(fileno(stdout)) != 0);
16029   } else {
16030     int status;
16031     struct stat st;
16032
16033     while (wait(&status) != child)
16034       ;
16035     $ac_main_return(
16036          /* Was there some problem with vforking?  */
16037          child < 0
16038
16039          /* Did the child fail?  (This shouldn't happen.)  */
16040          || status
16041
16042          /* Did the vfork/compiler bug occur?  */
16043          || parent != getpid()
16044
16045          /* Did the file descriptor bug occur?  */
16046          || fstat(fileno(stdout), &st) != 0
16047          );
16048   }
16049 }
16050 _ACEOF
16051 rm -f conftest$ac_exeext
16052 if { (eval echo "$as_me:16052: \"$ac_link\"") >&5
16053   (eval $ac_link) 2>&5
16054   ac_status=$?
16055   echo "$as_me:16055: \$? = $ac_status" >&5
16056   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16057   { (eval echo "$as_me:16057: \"$ac_try\"") >&5
16058   (eval $ac_try) 2>&5
16059   ac_status=$?
16060   echo "$as_me:16060: \$? = $ac_status" >&5
16061   (exit $ac_status); }; }; then
16062   ac_cv_func_vfork_works=yes
16063 else
16064   echo "$as_me: program exited with status $ac_status" >&5
16065 echo "$as_me: failed program was:" >&5
16066 cat conftest.$ac_ext >&5
16067 ac_cv_func_vfork_works=no
16068 fi
16069 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16070 fi
16071 fi
16072 echo "$as_me:16072: result: $ac_cv_func_vfork_works" >&5
16073 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16074
16075 fi;
16076 if test "x$ac_cv_func_fork_works" = xcross; then
16077   ac_cv_func_vfork_works=ac_cv_func_vfork
16078   { echo "$as_me:16078: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16079 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16080 fi
16081
16082 if test "x$ac_cv_func_vfork_works" = xyes; then
16083
16084 cat >>confdefs.h <<\EOF
16085 #define HAVE_WORKING_VFORK 1
16086 EOF
16087
16088 else
16089
16090 cat >>confdefs.h <<\EOF
16091 #define vfork fork
16092 EOF
16093
16094 fi
16095 if test "x$ac_cv_func_fork_works" = xyes; then
16096
16097 cat >>confdefs.h <<\EOF
16098 #define HAVE_WORKING_FORK 1
16099 EOF
16100
16101 fi
16102
16103 # special check for test/ditto.c
16104
16105 echo "$as_me:16105: checking for openpty in -lutil" >&5
16106 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16107 if test "${ac_cv_lib_util_openpty+set}" = set; then
16108   echo $ECHO_N "(cached) $ECHO_C" >&6
16109 else
16110   ac_check_lib_save_LIBS=$LIBS
16111 LIBS="-lutil  $LIBS"
16112 cat >conftest.$ac_ext <<_ACEOF
16113 #line 16113 "configure"
16114 #include "confdefs.h"
16115
16116 /* Override any gcc2 internal prototype to avoid an error.  */
16117 #ifdef __cplusplus
16118 extern "C"
16119 #endif
16120 /* We use char because int might match the return type of a gcc2
16121    builtin and then its argument prototype would still apply.  */
16122 char openpty ();
16123 int
16124 main ()
16125 {
16126 openpty ();
16127   ;
16128   return 0;
16129 }
16130 _ACEOF
16131 rm -f conftest.$ac_objext conftest$ac_exeext
16132 if { (eval echo "$as_me:16132: \"$ac_link\"") >&5
16133   (eval $ac_link) 2>&5
16134   ac_status=$?
16135   echo "$as_me:16135: \$? = $ac_status" >&5
16136   (exit $ac_status); } &&
16137          { ac_try='test -s conftest$ac_exeext'
16138   { (eval echo "$as_me:16138: \"$ac_try\"") >&5
16139   (eval $ac_try) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); }; }; then
16143   ac_cv_lib_util_openpty=yes
16144 else
16145   echo "$as_me: failed program was:" >&5
16146 cat conftest.$ac_ext >&5
16147 ac_cv_lib_util_openpty=no
16148 fi
16149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16150 LIBS=$ac_check_lib_save_LIBS
16151 fi
16152 echo "$as_me:16152: result: $ac_cv_lib_util_openpty" >&5
16153 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16154 if test $ac_cv_lib_util_openpty = yes; then
16155   cf_cv_lib_util=yes
16156 else
16157   cf_cv_lib_util=no
16158 fi
16159
16160 echo "$as_me:16160: checking for openpty header" >&5
16161 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16162 if test "${cf_cv_func_openpty+set}" = set; then
16163   echo $ECHO_N "(cached) $ECHO_C" >&6
16164 else
16165
16166     cf_save_LIBS="$LIBS"
16167     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16168     for cf_header in pty.h libutil.h util.h
16169     do
16170     cat >conftest.$ac_ext <<_ACEOF
16171 #line 16171 "configure"
16172 #include "confdefs.h"
16173
16174 #include <$cf_header>
16175
16176 int
16177 main ()
16178 {
16179
16180     int x = openpty((int *)0, (int *)0, (char *)0,
16181                    (struct termios *)0, (struct winsize *)0);
16182
16183   ;
16184   return 0;
16185 }
16186 _ACEOF
16187 rm -f conftest.$ac_objext conftest$ac_exeext
16188 if { (eval echo "$as_me:16188: \"$ac_link\"") >&5
16189   (eval $ac_link) 2>&5
16190   ac_status=$?
16191   echo "$as_me:16191: \$? = $ac_status" >&5
16192   (exit $ac_status); } &&
16193          { ac_try='test -s conftest$ac_exeext'
16194   { (eval echo "$as_me:16194: \"$ac_try\"") >&5
16195   (eval $ac_try) 2>&5
16196   ac_status=$?
16197   echo "$as_me:16197: \$? = $ac_status" >&5
16198   (exit $ac_status); }; }; then
16199
16200         cf_cv_func_openpty=$cf_header
16201         break
16202
16203 else
16204   echo "$as_me: failed program was:" >&5
16205 cat conftest.$ac_ext >&5
16206
16207         cf_cv_func_openpty=no
16208
16209 fi
16210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16211     done
16212     LIBS="$cf_save_LIBS"
16213
16214 fi
16215 echo "$as_me:16215: result: $cf_cv_func_openpty" >&5
16216 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16217
16218 if test "$cf_cv_func_openpty" != no ; then
16219     cat >>confdefs.h <<EOF
16220 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16221 EOF
16222
16223     cat >>confdefs.h <<\EOF
16224 #define USE_XTERM_PTY 1
16225 EOF
16226
16227     if test "$cf_cv_lib_util" = yes ; then
16228         TEST_LIBS="-lutil $TEST_LIBS"
16229     fi
16230 fi
16231
16232 if test "$with_hashed_db" != no ; then
16233         cat >>confdefs.h <<\EOF
16234 #define USE_HASHED_DB 1
16235 EOF
16236
16237 case $with_hashed_db in #(vi
16238 yes|*able*) #(vi
16239     ;;
16240 *)
16241     if test -d "$with_hashed_db" ; then
16242
16243 if test -n "$with_hashed_db/include" ; then
16244   for cf_add_incdir in $with_hashed_db/include
16245   do
16246         while test $cf_add_incdir != /usr/include
16247         do
16248           if test -d $cf_add_incdir
16249           then
16250                 cf_have_incdir=no
16251                 if test -n "$CFLAGS$CPPFLAGS" ; then
16252                   # a loop is needed to ensure we can add subdirs of existing dirs
16253                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16254                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16255                           cf_have_incdir=yes; break
16256                         fi
16257                   done
16258                 fi
16259
16260                 if test "$cf_have_incdir" = no ; then
16261                   if test "$cf_add_incdir" = /usr/local/include ; then
16262                         if test "$GCC" = yes
16263                         then
16264                           cf_save_CPPFLAGS=$CPPFLAGS
16265                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16266                           cat >conftest.$ac_ext <<_ACEOF
16267 #line 16267 "configure"
16268 #include "confdefs.h"
16269 #include <stdio.h>
16270 int
16271 main ()
16272 {
16273 printf("Hello")
16274   ;
16275   return 0;
16276 }
16277 _ACEOF
16278 rm -f conftest.$ac_objext
16279 if { (eval echo "$as_me:16279: \"$ac_compile\"") >&5
16280   (eval $ac_compile) 2>&5
16281   ac_status=$?
16282   echo "$as_me:16282: \$? = $ac_status" >&5
16283   (exit $ac_status); } &&
16284          { ac_try='test -s conftest.$ac_objext'
16285   { (eval echo "$as_me:16285: \"$ac_try\"") >&5
16286   (eval $ac_try) 2>&5
16287   ac_status=$?
16288   echo "$as_me:16288: \$? = $ac_status" >&5
16289   (exit $ac_status); }; }; then
16290   :
16291 else
16292   echo "$as_me: failed program was:" >&5
16293 cat conftest.$ac_ext >&5
16294 cf_have_incdir=yes
16295 fi
16296 rm -f conftest.$ac_objext conftest.$ac_ext
16297                           CPPFLAGS=$cf_save_CPPFLAGS
16298                         fi
16299                   fi
16300                 fi
16301
16302                 if test "$cf_have_incdir" = no ; then
16303                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16304
16305 echo "${as_me-configure}:16305: testing adding $cf_add_incdir to include-path ..." 1>&5
16306
16307                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16308
16309                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16310                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16311                   cf_add_incdir="$cf_top_incdir"
16312                 else
16313                   break
16314                 fi
16315           fi
16316         done
16317   done
16318 fi
16319
16320 if test -n "$with_hashed_db/lib" ; then
16321   for cf_add_libdir in $with_hashed_db/lib
16322   do
16323     if test $cf_add_libdir = /usr/lib ; then
16324       :
16325     elif test -d $cf_add_libdir
16326     then
16327       cf_have_libdir=no
16328       if test -n "$LDFLAGS$LIBS" ; then
16329         # a loop is needed to ensure we can add subdirs of existing dirs
16330         for cf_test_libdir in $LDFLAGS $LIBS ; do
16331           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16332             cf_have_libdir=yes; break
16333           fi
16334         done
16335       fi
16336       if test "$cf_have_libdir" = no ; then
16337         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16338
16339 echo "${as_me-configure}:16339: testing adding $cf_add_libdir to library-path ..." 1>&5
16340
16341         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16342       fi
16343     fi
16344   done
16345 fi
16346
16347     fi
16348 esac
16349
16350 echo "$as_me:16350: checking for db.h" >&5
16351 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16352 if test "${ac_cv_header_db_h+set}" = set; then
16353   echo $ECHO_N "(cached) $ECHO_C" >&6
16354 else
16355   cat >conftest.$ac_ext <<_ACEOF
16356 #line 16356 "configure"
16357 #include "confdefs.h"
16358 #include <db.h>
16359 _ACEOF
16360 if { (eval echo "$as_me:16360: \"$ac_cpp conftest.$ac_ext\"") >&5
16361   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16362   ac_status=$?
16363   egrep -v '^ *\+' conftest.er1 >conftest.err
16364   rm -f conftest.er1
16365   cat conftest.err >&5
16366   echo "$as_me:16366: \$? = $ac_status" >&5
16367   (exit $ac_status); } >/dev/null; then
16368   if test -s conftest.err; then
16369     ac_cpp_err=$ac_c_preproc_warn_flag
16370   else
16371     ac_cpp_err=
16372   fi
16373 else
16374   ac_cpp_err=yes
16375 fi
16376 if test -z "$ac_cpp_err"; then
16377   ac_cv_header_db_h=yes
16378 else
16379   echo "$as_me: failed program was:" >&5
16380   cat conftest.$ac_ext >&5
16381   ac_cv_header_db_h=no
16382 fi
16383 rm -f conftest.err conftest.$ac_ext
16384 fi
16385 echo "$as_me:16385: result: $ac_cv_header_db_h" >&5
16386 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16387 if test $ac_cv_header_db_h = yes; then
16388
16389 echo "$as_me:16389: checking for version of db" >&5
16390 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16391 if test "${cf_cv_hashed_db_version+set}" = set; then
16392   echo $ECHO_N "(cached) $ECHO_C" >&6
16393 else
16394
16395 cf_cv_hashed_db_version=unknown
16396
16397 for cf_db_version in 1 2 3 4 5
16398 do
16399
16400 echo "${as_me-configure}:16400: testing checking for db version $cf_db_version ..." 1>&5
16401
16402         cat >conftest.$ac_ext <<_ACEOF
16403 #line 16403 "configure"
16404 #include "confdefs.h"
16405
16406 $ac_includes_default
16407 #include <db.h>
16408
16409 #ifdef DB_VERSION_MAJOR
16410         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16411 #if $cf_db_version == DB_VERSION_MAJOR
16412         /* ok */
16413 #else
16414         make an error
16415 #endif
16416 #else
16417 #if $cf_db_version == 1
16418         /* ok: assuming this is DB 1.8.5 */
16419 #else
16420         make an error
16421 #endif
16422 #endif
16423
16424 int
16425 main ()
16426 {
16427 DBT *foo = 0
16428   ;
16429   return 0;
16430 }
16431 _ACEOF
16432 rm -f conftest.$ac_objext
16433 if { (eval echo "$as_me:16433: \"$ac_compile\"") >&5
16434   (eval $ac_compile) 2>&5
16435   ac_status=$?
16436   echo "$as_me:16436: \$? = $ac_status" >&5
16437   (exit $ac_status); } &&
16438          { ac_try='test -s conftest.$ac_objext'
16439   { (eval echo "$as_me:16439: \"$ac_try\"") >&5
16440   (eval $ac_try) 2>&5
16441   ac_status=$?
16442   echo "$as_me:16442: \$? = $ac_status" >&5
16443   (exit $ac_status); }; }; then
16444
16445         cf_cv_hashed_db_version=$cf_db_version
16446         break
16447
16448 else
16449   echo "$as_me: failed program was:" >&5
16450 cat conftest.$ac_ext >&5
16451 fi
16452 rm -f conftest.$ac_objext conftest.$ac_ext
16453 done
16454
16455 fi
16456 echo "$as_me:16456: result: $cf_cv_hashed_db_version" >&5
16457 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16458
16459 if test "$cf_cv_hashed_db_version" = unknown ; then
16460         { { echo "$as_me:16460: error: Cannot determine version of db" >&5
16461 echo "$as_me: error: Cannot determine version of db" >&2;}
16462    { (exit 1); exit 1; }; }
16463 else
16464
16465 echo "$as_me:16465: checking for db libraries" >&5
16466 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16467 if test "${cf_cv_hashed_db_libs+set}" = set; then
16468   echo $ECHO_N "(cached) $ECHO_C" >&6
16469 else
16470
16471 cf_cv_hashed_db_libs=unknown
16472 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16473 do
16474         cf_save_libs="$LIBS"
16475         if test -n "$cf_db_libs"; then
16476                 LIBS="-l$cf_db_libs $LIBS"
16477         fi
16478
16479 echo "${as_me-configure}:16479: testing checking for library "$cf_db_libs" ..." 1>&5
16480
16481         cat >conftest.$ac_ext <<_ACEOF
16482 #line 16482 "configure"
16483 #include "confdefs.h"
16484
16485 $ac_includes_default
16486 #include <db.h>
16487
16488 int
16489 main ()
16490 {
16491
16492         char *path = "/tmp/foo";
16493 #ifdef DB_VERSION_MAJOR
16494 #if DB_VERSION_MAJOR >= 4
16495         DB *result = 0;
16496         db_create(&result, NULL, 0);
16497         result->open(result,
16498                 NULL,
16499                 path,
16500                 path,
16501                 DB_HASH,
16502                 DB_CREATE,
16503                 0644);
16504 #elif DB_VERSION_MAJOR >= 3
16505         DB *result = 0;
16506         db_create(&result, NULL, 0);
16507         result->open(result,
16508                 path,
16509                 path,
16510                 DB_HASH,
16511                 DB_CREATE,
16512                 0644);
16513 #elif DB_VERSION_MAJOR >= 2
16514         DB *result = 0;
16515         db_open(path,
16516                 DB_HASH,
16517                 DB_CREATE,
16518                 0644,
16519                 (DB_ENV *) 0,
16520                 (DB_INFO *) 0,
16521                 &result);
16522 #endif /* DB_VERSION_MAJOR */
16523 #else
16524         DB *result = dbopen(path,
16525                      2,
16526                      0644,
16527                      DB_HASH,
16528                      0);
16529 #endif
16530         ${cf_cv_main_return:-return}(result != 0)
16531
16532   ;
16533   return 0;
16534 }
16535 _ACEOF
16536 rm -f conftest.$ac_objext conftest$ac_exeext
16537 if { (eval echo "$as_me:16537: \"$ac_link\"") >&5
16538   (eval $ac_link) 2>&5
16539   ac_status=$?
16540   echo "$as_me:16540: \$? = $ac_status" >&5
16541   (exit $ac_status); } &&
16542          { ac_try='test -s conftest$ac_exeext'
16543   { (eval echo "$as_me:16543: \"$ac_try\"") >&5
16544   (eval $ac_try) 2>&5
16545   ac_status=$?
16546   echo "$as_me:16546: \$? = $ac_status" >&5
16547   (exit $ac_status); }; }; then
16548
16549         if test -n "$cf_db_libs" ; then
16550                 cf_cv_hashed_db_libs=$cf_db_libs
16551         else
16552                 cf_cv_hashed_db_libs=default
16553         fi
16554         LIBS="$cf_save_libs"
16555         break
16556
16557 else
16558   echo "$as_me: failed program was:" >&5
16559 cat conftest.$ac_ext >&5
16560 fi
16561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16562         LIBS="$cf_save_libs"
16563 done
16564
16565 fi
16566 echo "$as_me:16566: result: $cf_cv_hashed_db_libs" >&5
16567 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16568
16569         if test "$cf_cv_hashed_db_libs" = unknown ; then
16570                 { { echo "$as_me:16570: error: Cannot determine library for db" >&5
16571 echo "$as_me: error: Cannot determine library for db" >&2;}
16572    { (exit 1); exit 1; }; }
16573         elif test "$cf_cv_hashed_db_libs" != default ; then
16574                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16575         fi
16576 fi
16577
16578 else
16579
16580         { { echo "$as_me:16580: error: Cannot find db.h" >&5
16581 echo "$as_me: error: Cannot find db.h" >&2;}
16582    { (exit 1); exit 1; }; }
16583
16584 fi
16585
16586 fi
16587
16588 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16589         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16590         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16591 fi
16592
16593 # Just in case, check if the C compiler has a bool type.
16594
16595 echo "$as_me:16595: checking if we should include stdbool.h" >&5
16596 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16597
16598 if test "${cf_cv_header_stdbool_h+set}" = set; then
16599   echo $ECHO_N "(cached) $ECHO_C" >&6
16600 else
16601
16602         cat >conftest.$ac_ext <<_ACEOF
16603 #line 16603 "configure"
16604 #include "confdefs.h"
16605
16606 int
16607 main ()
16608 {
16609 bool foo = false
16610   ;
16611   return 0;
16612 }
16613 _ACEOF
16614 rm -f conftest.$ac_objext
16615 if { (eval echo "$as_me:16615: \"$ac_compile\"") >&5
16616   (eval $ac_compile) 2>&5
16617   ac_status=$?
16618   echo "$as_me:16618: \$? = $ac_status" >&5
16619   (exit $ac_status); } &&
16620          { ac_try='test -s conftest.$ac_objext'
16621   { (eval echo "$as_me:16621: \"$ac_try\"") >&5
16622   (eval $ac_try) 2>&5
16623   ac_status=$?
16624   echo "$as_me:16624: \$? = $ac_status" >&5
16625   (exit $ac_status); }; }; then
16626   cf_cv_header_stdbool_h=0
16627 else
16628   echo "$as_me: failed program was:" >&5
16629 cat conftest.$ac_ext >&5
16630 cat >conftest.$ac_ext <<_ACEOF
16631 #line 16631 "configure"
16632 #include "confdefs.h"
16633
16634 #ifndef __BEOS__
16635 #include <stdbool.h>
16636 #endif
16637
16638 int
16639 main ()
16640 {
16641 bool foo = false
16642   ;
16643   return 0;
16644 }
16645 _ACEOF
16646 rm -f conftest.$ac_objext
16647 if { (eval echo "$as_me:16647: \"$ac_compile\"") >&5
16648   (eval $ac_compile) 2>&5
16649   ac_status=$?
16650   echo "$as_me:16650: \$? = $ac_status" >&5
16651   (exit $ac_status); } &&
16652          { ac_try='test -s conftest.$ac_objext'
16653   { (eval echo "$as_me:16653: \"$ac_try\"") >&5
16654   (eval $ac_try) 2>&5
16655   ac_status=$?
16656   echo "$as_me:16656: \$? = $ac_status" >&5
16657   (exit $ac_status); }; }; then
16658   cf_cv_header_stdbool_h=1
16659 else
16660   echo "$as_me: failed program was:" >&5
16661 cat conftest.$ac_ext >&5
16662 cf_cv_header_stdbool_h=0
16663 fi
16664 rm -f conftest.$ac_objext conftest.$ac_ext
16665 fi
16666 rm -f conftest.$ac_objext conftest.$ac_ext
16667 fi
16668
16669 if test "$cf_cv_header_stdbool_h" = 1
16670 then    echo "$as_me:16670: result: yes" >&5
16671 echo "${ECHO_T}yes" >&6
16672 else    echo "$as_me:16672: result: no" >&5
16673 echo "${ECHO_T}no" >&6
16674 fi
16675
16676 echo "$as_me:16676: checking for builtin bool type" >&5
16677 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16678
16679 if test "${cf_cv_cc_bool_type+set}" = set; then
16680   echo $ECHO_N "(cached) $ECHO_C" >&6
16681 else
16682
16683         cat >conftest.$ac_ext <<_ACEOF
16684 #line 16684 "configure"
16685 #include "confdefs.h"
16686
16687 #include <stdio.h>
16688 #include <sys/types.h>
16689
16690 int
16691 main ()
16692 {
16693 bool x = false
16694   ;
16695   return 0;
16696 }
16697 _ACEOF
16698 rm -f conftest.$ac_objext
16699 if { (eval echo "$as_me:16699: \"$ac_compile\"") >&5
16700   (eval $ac_compile) 2>&5
16701   ac_status=$?
16702   echo "$as_me:16702: \$? = $ac_status" >&5
16703   (exit $ac_status); } &&
16704          { ac_try='test -s conftest.$ac_objext'
16705   { (eval echo "$as_me:16705: \"$ac_try\"") >&5
16706   (eval $ac_try) 2>&5
16707   ac_status=$?
16708   echo "$as_me:16708: \$? = $ac_status" >&5
16709   (exit $ac_status); }; }; then
16710   cf_cv_cc_bool_type=1
16711 else
16712   echo "$as_me: failed program was:" >&5
16713 cat conftest.$ac_ext >&5
16714 cf_cv_cc_bool_type=0
16715 fi
16716 rm -f conftest.$ac_objext conftest.$ac_ext
16717
16718 fi
16719
16720 if test "$cf_cv_cc_bool_type" = 1
16721 then    echo "$as_me:16721: result: yes" >&5
16722 echo "${ECHO_T}yes" >&6
16723 else    echo "$as_me:16723: result: no" >&5
16724 echo "${ECHO_T}no" >&6
16725 fi
16726
16727 # Check for C++ compiler characteristics (and ensure that it's there!)
16728 if test -n "$CXX" ; then
16729         ac_ext=cc
16730 ac_cpp='$CXXCPP $CPPFLAGS'
16731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16734 ac_main_return=return
16735
16736 if test -n "$GXX" ; then
16737 case $cf_cv_system_name in #(vi
16738 os2*) #(vi
16739         cf_stdcpp_libname=stdcpp
16740         ;;
16741 *)
16742         cf_stdcpp_libname=stdc++
16743         ;;
16744 esac
16745 echo "$as_me:16745: checking for library $cf_stdcpp_libname" >&5
16746 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16747 if test "${cf_cv_libstdcpp+set}" = set; then
16748   echo $ECHO_N "(cached) $ECHO_C" >&6
16749 else
16750
16751         cf_save="$LIBS"
16752         LIBS="-l$cf_stdcpp_libname $LIBS"
16753 cat >conftest.$ac_ext <<_ACEOF
16754 #line 16754 "configure"
16755 #include "confdefs.h"
16756
16757 #include <strstream.h>
16758 int
16759 main ()
16760 {
16761
16762 char buf[80];
16763 strstreambuf foo(buf, sizeof(buf))
16764
16765   ;
16766   return 0;
16767 }
16768 _ACEOF
16769 rm -f conftest.$ac_objext conftest$ac_exeext
16770 if { (eval echo "$as_me:16770: \"$ac_link\"") >&5
16771   (eval $ac_link) 2>&5
16772   ac_status=$?
16773   echo "$as_me:16773: \$? = $ac_status" >&5
16774   (exit $ac_status); } &&
16775          { ac_try='test -s conftest$ac_exeext'
16776   { (eval echo "$as_me:16776: \"$ac_try\"") >&5
16777   (eval $ac_try) 2>&5
16778   ac_status=$?
16779   echo "$as_me:16779: \$? = $ac_status" >&5
16780   (exit $ac_status); }; }; then
16781   cf_cv_libstdcpp=yes
16782 else
16783   echo "$as_me: failed program was:" >&5
16784 cat conftest.$ac_ext >&5
16785 cf_cv_libstdcpp=no
16786 fi
16787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16788         LIBS="$cf_save"
16789
16790 fi
16791 echo "$as_me:16791: result: $cf_cv_libstdcpp" >&5
16792 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16793 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
16794 fi
16795
16796         echo "$as_me:16796: checking whether $CXX understands -c and -o together" >&5
16797 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16798 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16799   echo $ECHO_N "(cached) $ECHO_C" >&6
16800 else
16801
16802 cat > conftest.$ac_ext <<CF_EOF
16803 #include <stdio.h>
16804 int main()
16805 {
16806         ${cf_cv_main_return:-return}(0);
16807 }
16808 CF_EOF
16809 # We do the test twice because some compilers refuse to overwrite an
16810 # existing .o file with -o, though they will create one.
16811 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16812 if { (eval echo "$as_me:16812: \"$ac_try\"") >&5
16813   (eval $ac_try) 2>&5
16814   ac_status=$?
16815   echo "$as_me:16815: \$? = $ac_status" >&5
16816   (exit $ac_status); } &&
16817   test -f conftest2.$ac_objext && { (eval echo "$as_me:16817: \"$ac_try\"") >&5
16818   (eval $ac_try) 2>&5
16819   ac_status=$?
16820   echo "$as_me:16820: \$? = $ac_status" >&5
16821   (exit $ac_status); };
16822 then
16823   eval cf_cv_prog_CXX_c_o=yes
16824 else
16825   eval cf_cv_prog_CXX_c_o=no
16826 fi
16827 rm -rf conftest*
16828
16829 fi
16830 if test $cf_cv_prog_CXX_c_o = yes; then
16831   echo "$as_me:16831: result: yes" >&5
16832 echo "${ECHO_T}yes" >&6
16833 else
16834   echo "$as_me:16834: result: no" >&5
16835 echo "${ECHO_T}no" >&6
16836 fi
16837
16838         case $GXX_VERSION in
16839         1*|2.0-6*)
16840                 cf_cxx_library=yes
16841                 ;;
16842         *-2.7*|2.7*)
16843
16844 cf_cxx_library=unknown
16845 case $cf_cv_system_name in #(vi
16846 os2*) #(vi
16847         cf_gpp_libname=gpp
16848         ;;
16849 *)
16850         cf_gpp_libname=g++
16851         ;;
16852 esac
16853 if test "$GXX" = yes; then
16854         echo "$as_me:16854: checking for lib$cf_gpp_libname" >&5
16855 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16856         cf_save="$LIBS"
16857         LIBS="-l$cf_gpp_libname $LIBS"
16858         cat >conftest.$ac_ext <<_ACEOF
16859 #line 16859 "configure"
16860 #include "confdefs.h"
16861
16862 #include <$cf_gpp_libname/builtin.h>
16863
16864 int
16865 main ()
16866 {
16867 two_arg_error_handler_t foo2 = lib_error_handler
16868   ;
16869   return 0;
16870 }
16871 _ACEOF
16872 rm -f conftest.$ac_objext conftest$ac_exeext
16873 if { (eval echo "$as_me:16873: \"$ac_link\"") >&5
16874   (eval $ac_link) 2>&5
16875   ac_status=$?
16876   echo "$as_me:16876: \$? = $ac_status" >&5
16877   (exit $ac_status); } &&
16878          { ac_try='test -s conftest$ac_exeext'
16879   { (eval echo "$as_me:16879: \"$ac_try\"") >&5
16880   (eval $ac_try) 2>&5
16881   ac_status=$?
16882   echo "$as_me:16882: \$? = $ac_status" >&5
16883   (exit $ac_status); }; }; then
16884   cf_cxx_library=yes
16885          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16886          if test "$cf_gpp_libname" = cpp ; then
16887             cat >>confdefs.h <<\EOF
16888 #define HAVE_GPP_BUILTIN_H 1
16889 EOF
16890
16891          else
16892             cat >>confdefs.h <<\EOF
16893 #define HAVE_GXX_BUILTIN_H 1
16894 EOF
16895
16896          fi
16897 else
16898   echo "$as_me: failed program was:" >&5
16899 cat conftest.$ac_ext >&5
16900 cat >conftest.$ac_ext <<_ACEOF
16901 #line 16901 "configure"
16902 #include "confdefs.h"
16903
16904 #include <builtin.h>
16905
16906 int
16907 main ()
16908 {
16909 two_arg_error_handler_t foo2 = lib_error_handler
16910   ;
16911   return 0;
16912 }
16913 _ACEOF
16914 rm -f conftest.$ac_objext conftest$ac_exeext
16915 if { (eval echo "$as_me:16915: \"$ac_link\"") >&5
16916   (eval $ac_link) 2>&5
16917   ac_status=$?
16918   echo "$as_me:16918: \$? = $ac_status" >&5
16919   (exit $ac_status); } &&
16920          { ac_try='test -s conftest$ac_exeext'
16921   { (eval echo "$as_me:16921: \"$ac_try\"") >&5
16922   (eval $ac_try) 2>&5
16923   ac_status=$?
16924   echo "$as_me:16924: \$? = $ac_status" >&5
16925   (exit $ac_status); }; }; then
16926   cf_cxx_library=yes
16927          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16928          cat >>confdefs.h <<\EOF
16929 #define HAVE_BUILTIN_H 1
16930 EOF
16931
16932 else
16933   echo "$as_me: failed program was:" >&5
16934 cat conftest.$ac_ext >&5
16935 cf_cxx_library=no
16936 fi
16937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16938 fi
16939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16940         LIBS="$cf_save"
16941         echo "$as_me:16941: result: $cf_cxx_library" >&5
16942 echo "${ECHO_T}$cf_cxx_library" >&6
16943 fi
16944
16945                 ;;
16946         *)
16947                 cf_cxx_library=no
16948                 ;;
16949         esac
16950
16951         ac_ext=cc
16952 ac_cpp='$CXXCPP $CPPFLAGS'
16953 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16954 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16955 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16956 ac_main_return=return
16957 echo "$as_me:16957: checking how to run the C++ preprocessor" >&5
16958 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16959 if test -z "$CXXCPP"; then
16960   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16961   echo $ECHO_N "(cached) $ECHO_C" >&6
16962 else
16963       # Double quotes because CXXCPP needs to be expanded
16964     for CXXCPP in "$CXX -E" "/lib/cpp"
16965     do
16966       ac_preproc_ok=false
16967 for ac_cxx_preproc_warn_flag in '' yes
16968 do
16969   # Use a header file that comes with gcc, so configuring glibc
16970   # with a fresh cross-compiler works.
16971   # On the NeXT, cc -E runs the code through the compiler's parser,
16972   # not just through cpp. "Syntax error" is here to catch this case.
16973   cat >conftest.$ac_ext <<_ACEOF
16974 #line 16974 "configure"
16975 #include "confdefs.h"
16976 #include <assert.h>
16977                      Syntax error
16978 _ACEOF
16979 if { (eval echo "$as_me:16979: \"$ac_cpp conftest.$ac_ext\"") >&5
16980   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16981   ac_status=$?
16982   egrep -v '^ *\+' conftest.er1 >conftest.err
16983   rm -f conftest.er1
16984   cat conftest.err >&5
16985   echo "$as_me:16985: \$? = $ac_status" >&5
16986   (exit $ac_status); } >/dev/null; then
16987   if test -s conftest.err; then
16988     ac_cpp_err=$ac_cxx_preproc_warn_flag
16989   else
16990     ac_cpp_err=
16991   fi
16992 else
16993   ac_cpp_err=yes
16994 fi
16995 if test -z "$ac_cpp_err"; then
16996   :
16997 else
16998   echo "$as_me: failed program was:" >&5
16999   cat conftest.$ac_ext >&5
17000   # Broken: fails on valid input.
17001 continue
17002 fi
17003 rm -f conftest.err conftest.$ac_ext
17004
17005   # OK, works on sane cases.  Now check whether non-existent headers
17006   # can be detected and how.
17007   cat >conftest.$ac_ext <<_ACEOF
17008 #line 17008 "configure"
17009 #include "confdefs.h"
17010 #include <ac_nonexistent.h>
17011 _ACEOF
17012 if { (eval echo "$as_me:17012: \"$ac_cpp conftest.$ac_ext\"") >&5
17013   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17014   ac_status=$?
17015   egrep -v '^ *\+' conftest.er1 >conftest.err
17016   rm -f conftest.er1
17017   cat conftest.err >&5
17018   echo "$as_me:17018: \$? = $ac_status" >&5
17019   (exit $ac_status); } >/dev/null; then
17020   if test -s conftest.err; then
17021     ac_cpp_err=$ac_cxx_preproc_warn_flag
17022   else
17023     ac_cpp_err=
17024   fi
17025 else
17026   ac_cpp_err=yes
17027 fi
17028 if test -z "$ac_cpp_err"; then
17029   # Broken: success on invalid input.
17030 continue
17031 else
17032   echo "$as_me: failed program was:" >&5
17033   cat conftest.$ac_ext >&5
17034   # Passes both tests.
17035 ac_preproc_ok=:
17036 break
17037 fi
17038 rm -f conftest.err conftest.$ac_ext
17039
17040 done
17041 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17042 rm -f conftest.err conftest.$ac_ext
17043 if $ac_preproc_ok; then
17044   break
17045 fi
17046
17047     done
17048     ac_cv_prog_CXXCPP=$CXXCPP
17049
17050 fi
17051   CXXCPP=$ac_cv_prog_CXXCPP
17052 else
17053   ac_cv_prog_CXXCPP=$CXXCPP
17054 fi
17055 echo "$as_me:17055: result: $CXXCPP" >&5
17056 echo "${ECHO_T}$CXXCPP" >&6
17057 ac_preproc_ok=false
17058 for ac_cxx_preproc_warn_flag in '' yes
17059 do
17060   # Use a header file that comes with gcc, so configuring glibc
17061   # with a fresh cross-compiler works.
17062   # On the NeXT, cc -E runs the code through the compiler's parser,
17063   # not just through cpp. "Syntax error" is here to catch this case.
17064   cat >conftest.$ac_ext <<_ACEOF
17065 #line 17065 "configure"
17066 #include "confdefs.h"
17067 #include <assert.h>
17068                      Syntax error
17069 _ACEOF
17070 if { (eval echo "$as_me:17070: \"$ac_cpp conftest.$ac_ext\"") >&5
17071   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17072   ac_status=$?
17073   egrep -v '^ *\+' conftest.er1 >conftest.err
17074   rm -f conftest.er1
17075   cat conftest.err >&5
17076   echo "$as_me:17076: \$? = $ac_status" >&5
17077   (exit $ac_status); } >/dev/null; then
17078   if test -s conftest.err; then
17079     ac_cpp_err=$ac_cxx_preproc_warn_flag
17080   else
17081     ac_cpp_err=
17082   fi
17083 else
17084   ac_cpp_err=yes
17085 fi
17086 if test -z "$ac_cpp_err"; then
17087   :
17088 else
17089   echo "$as_me: failed program was:" >&5
17090   cat conftest.$ac_ext >&5
17091   # Broken: fails on valid input.
17092 continue
17093 fi
17094 rm -f conftest.err conftest.$ac_ext
17095
17096   # OK, works on sane cases.  Now check whether non-existent headers
17097   # can be detected and how.
17098   cat >conftest.$ac_ext <<_ACEOF
17099 #line 17099 "configure"
17100 #include "confdefs.h"
17101 #include <ac_nonexistent.h>
17102 _ACEOF
17103 if { (eval echo "$as_me:17103: \"$ac_cpp conftest.$ac_ext\"") >&5
17104   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17105   ac_status=$?
17106   egrep -v '^ *\+' conftest.er1 >conftest.err
17107   rm -f conftest.er1
17108   cat conftest.err >&5
17109   echo "$as_me:17109: \$? = $ac_status" >&5
17110   (exit $ac_status); } >/dev/null; then
17111   if test -s conftest.err; then
17112     ac_cpp_err=$ac_cxx_preproc_warn_flag
17113   else
17114     ac_cpp_err=
17115   fi
17116 else
17117   ac_cpp_err=yes
17118 fi
17119 if test -z "$ac_cpp_err"; then
17120   # Broken: success on invalid input.
17121 continue
17122 else
17123   echo "$as_me: failed program was:" >&5
17124   cat conftest.$ac_ext >&5
17125   # Passes both tests.
17126 ac_preproc_ok=:
17127 break
17128 fi
17129 rm -f conftest.err conftest.$ac_ext
17130
17131 done
17132 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17133 rm -f conftest.err conftest.$ac_ext
17134 if $ac_preproc_ok; then
17135   :
17136 else
17137   { { echo "$as_me:17137: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17138 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17139    { (exit 1); exit 1; }; }
17140 fi
17141
17142 ac_ext=cc
17143 ac_cpp='$CXXCPP $CPPFLAGS'
17144 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17145 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17146 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17147 ac_main_return=return
17148
17149 for ac_header in iostream typeinfo
17150 do
17151 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17152 echo "$as_me:17152: checking for $ac_header" >&5
17153 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17154 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17155   echo $ECHO_N "(cached) $ECHO_C" >&6
17156 else
17157   cat >conftest.$ac_ext <<_ACEOF
17158 #line 17158 "configure"
17159 #include "confdefs.h"
17160 #include <$ac_header>
17161 _ACEOF
17162 if { (eval echo "$as_me:17162: \"$ac_cpp conftest.$ac_ext\"") >&5
17163   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17164   ac_status=$?
17165   egrep -v '^ *\+' conftest.er1 >conftest.err
17166   rm -f conftest.er1
17167   cat conftest.err >&5
17168   echo "$as_me:17168: \$? = $ac_status" >&5
17169   (exit $ac_status); } >/dev/null; then
17170   if test -s conftest.err; then
17171     ac_cpp_err=$ac_cxx_preproc_warn_flag
17172   else
17173     ac_cpp_err=
17174   fi
17175 else
17176   ac_cpp_err=yes
17177 fi
17178 if test -z "$ac_cpp_err"; then
17179   eval "$as_ac_Header=yes"
17180 else
17181   echo "$as_me: failed program was:" >&5
17182   cat conftest.$ac_ext >&5
17183   eval "$as_ac_Header=no"
17184 fi
17185 rm -f conftest.err conftest.$ac_ext
17186 fi
17187 echo "$as_me:17187: result: `eval echo '${'$as_ac_Header'}'`" >&5
17188 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17189 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17190   cat >>confdefs.h <<EOF
17191 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17192 EOF
17193
17194 fi
17195 done
17196
17197     if test x"$ac_cv_header_iostream" = xyes ; then
17198         echo "$as_me:17198: checking if iostream uses std-namespace" >&5
17199 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17200         cat >conftest.$ac_ext <<_ACEOF
17201 #line 17201 "configure"
17202 #include "confdefs.h"
17203
17204 #include <iostream>
17205 using std::endl;
17206 using std::cerr;
17207 int
17208 main ()
17209 {
17210
17211 cerr << "testing" << endl;
17212
17213   ;
17214   return 0;
17215 }
17216 _ACEOF
17217 rm -f conftest.$ac_objext
17218 if { (eval echo "$as_me:17218: \"$ac_compile\"") >&5
17219   (eval $ac_compile) 2>&5
17220   ac_status=$?
17221   echo "$as_me:17221: \$? = $ac_status" >&5
17222   (exit $ac_status); } &&
17223          { ac_try='test -s conftest.$ac_objext'
17224   { (eval echo "$as_me:17224: \"$ac_try\"") >&5
17225   (eval $ac_try) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit $ac_status); }; }; then
17229   cf_iostream_namespace=yes
17230 else
17231   echo "$as_me: failed program was:" >&5
17232 cat conftest.$ac_ext >&5
17233 cf_iostream_namespace=no
17234 fi
17235 rm -f conftest.$ac_objext conftest.$ac_ext
17236         echo "$as_me:17236: result: $cf_iostream_namespace" >&5
17237 echo "${ECHO_T}$cf_iostream_namespace" >&6
17238         if test "$cf_iostream_namespace" = yes ; then
17239             cat >>confdefs.h <<\EOF
17240 #define IOSTREAM_NAMESPACE 1
17241 EOF
17242
17243         fi
17244     fi
17245
17246 echo "$as_me:17246: checking if we should include stdbool.h" >&5
17247 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17248
17249 if test "${cf_cv_header_stdbool_h+set}" = set; then
17250   echo $ECHO_N "(cached) $ECHO_C" >&6
17251 else
17252
17253         cat >conftest.$ac_ext <<_ACEOF
17254 #line 17254 "configure"
17255 #include "confdefs.h"
17256
17257 int
17258 main ()
17259 {
17260 bool foo = false
17261   ;
17262   return 0;
17263 }
17264 _ACEOF
17265 rm -f conftest.$ac_objext
17266 if { (eval echo "$as_me:17266: \"$ac_compile\"") >&5
17267   (eval $ac_compile) 2>&5
17268   ac_status=$?
17269   echo "$as_me:17269: \$? = $ac_status" >&5
17270   (exit $ac_status); } &&
17271          { ac_try='test -s conftest.$ac_objext'
17272   { (eval echo "$as_me:17272: \"$ac_try\"") >&5
17273   (eval $ac_try) 2>&5
17274   ac_status=$?
17275   echo "$as_me:17275: \$? = $ac_status" >&5
17276   (exit $ac_status); }; }; then
17277   cf_cv_header_stdbool_h=0
17278 else
17279   echo "$as_me: failed program was:" >&5
17280 cat conftest.$ac_ext >&5
17281 cat >conftest.$ac_ext <<_ACEOF
17282 #line 17282 "configure"
17283 #include "confdefs.h"
17284
17285 #ifndef __BEOS__
17286 #include <stdbool.h>
17287 #endif
17288
17289 int
17290 main ()
17291 {
17292 bool foo = false
17293   ;
17294   return 0;
17295 }
17296 _ACEOF
17297 rm -f conftest.$ac_objext
17298 if { (eval echo "$as_me:17298: \"$ac_compile\"") >&5
17299   (eval $ac_compile) 2>&5
17300   ac_status=$?
17301   echo "$as_me:17301: \$? = $ac_status" >&5
17302   (exit $ac_status); } &&
17303          { ac_try='test -s conftest.$ac_objext'
17304   { (eval echo "$as_me:17304: \"$ac_try\"") >&5
17305   (eval $ac_try) 2>&5
17306   ac_status=$?
17307   echo "$as_me:17307: \$? = $ac_status" >&5
17308   (exit $ac_status); }; }; then
17309   cf_cv_header_stdbool_h=1
17310 else
17311   echo "$as_me: failed program was:" >&5
17312 cat conftest.$ac_ext >&5
17313 cf_cv_header_stdbool_h=0
17314 fi
17315 rm -f conftest.$ac_objext conftest.$ac_ext
17316 fi
17317 rm -f conftest.$ac_objext conftest.$ac_ext
17318 fi
17319
17320 if test "$cf_cv_header_stdbool_h" = 1
17321 then    echo "$as_me:17321: result: yes" >&5
17322 echo "${ECHO_T}yes" >&6
17323 else    echo "$as_me:17323: result: no" >&5
17324 echo "${ECHO_T}no" >&6
17325 fi
17326
17327 echo "$as_me:17327: checking for builtin bool type" >&5
17328 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17329
17330 if test "${cf_cv_builtin_bool+set}" = set; then
17331   echo $ECHO_N "(cached) $ECHO_C" >&6
17332 else
17333
17334         cat >conftest.$ac_ext <<_ACEOF
17335 #line 17335 "configure"
17336 #include "confdefs.h"
17337
17338 #include <stdio.h>
17339 #include <sys/types.h>
17340
17341 int
17342 main ()
17343 {
17344 bool x = false
17345   ;
17346   return 0;
17347 }
17348 _ACEOF
17349 rm -f conftest.$ac_objext
17350 if { (eval echo "$as_me:17350: \"$ac_compile\"") >&5
17351   (eval $ac_compile) 2>&5
17352   ac_status=$?
17353   echo "$as_me:17353: \$? = $ac_status" >&5
17354   (exit $ac_status); } &&
17355          { ac_try='test -s conftest.$ac_objext'
17356   { (eval echo "$as_me:17356: \"$ac_try\"") >&5
17357   (eval $ac_try) 2>&5
17358   ac_status=$?
17359   echo "$as_me:17359: \$? = $ac_status" >&5
17360   (exit $ac_status); }; }; then
17361   cf_cv_builtin_bool=1
17362 else
17363   echo "$as_me: failed program was:" >&5
17364 cat conftest.$ac_ext >&5
17365 cf_cv_builtin_bool=0
17366 fi
17367 rm -f conftest.$ac_objext conftest.$ac_ext
17368
17369 fi
17370
17371 if test "$cf_cv_builtin_bool" = 1
17372 then    echo "$as_me:17372: result: yes" >&5
17373 echo "${ECHO_T}yes" >&6
17374 else    echo "$as_me:17374: result: no" >&5
17375 echo "${ECHO_T}no" >&6
17376 fi
17377
17378 echo "$as_me:17378: checking for size of bool" >&5
17379 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17380 if test "${cf_cv_type_of_bool+set}" = set; then
17381   echo $ECHO_N "(cached) $ECHO_C" >&6
17382 else
17383
17384         rm -f cf_test.out
17385         if test "$cross_compiling" = yes; then
17386   cf_cv_type_of_bool=unknown
17387 else
17388   cat >conftest.$ac_ext <<_ACEOF
17389 #line 17389 "configure"
17390 #include "confdefs.h"
17391
17392 #include <stdlib.h>
17393 #include <stdio.h>
17394
17395 #if defined(__cplusplus)
17396
17397 #ifdef HAVE_GXX_BUILTIN_H
17398 #include <g++/builtin.h>
17399 #elif HAVE_GPP_BUILTIN_H
17400 #include <gpp/builtin.h>
17401 #elif HAVE_BUILTIN_H
17402 #include <builtin.h>
17403 #endif
17404
17405 #else
17406
17407 #if $cf_cv_header_stdbool_h
17408 #include <stdbool.h>
17409 #endif
17410
17411 #endif
17412
17413 main()
17414 {
17415         FILE *fp = fopen("cf_test.out", "w");
17416         if (fp != 0) {
17417                 bool x = true;
17418                 if ((bool)(-x) >= 0)
17419                         fputs("unsigned ", fp);
17420                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17421                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17422                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17423                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17424                 fclose(fp);
17425         }
17426         ${cf_cv_main_return:-return}(0);
17427 }
17428
17429 _ACEOF
17430 rm -f conftest$ac_exeext
17431 if { (eval echo "$as_me:17431: \"$ac_link\"") >&5
17432   (eval $ac_link) 2>&5
17433   ac_status=$?
17434   echo "$as_me:17434: \$? = $ac_status" >&5
17435   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17436   { (eval echo "$as_me:17436: \"$ac_try\"") >&5
17437   (eval $ac_try) 2>&5
17438   ac_status=$?
17439   echo "$as_me:17439: \$? = $ac_status" >&5
17440   (exit $ac_status); }; }; then
17441   cf_cv_type_of_bool=`cat cf_test.out`
17442                  if test -z "$cf_cv_type_of_bool"; then
17443                    cf_cv_type_of_bool=unknown
17444                  fi
17445 else
17446   echo "$as_me: program exited with status $ac_status" >&5
17447 echo "$as_me: failed program was:" >&5
17448 cat conftest.$ac_ext >&5
17449 cf_cv_type_of_bool=unknown
17450 fi
17451 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17452 fi
17453
17454 fi
17455
17456         rm -f cf_test.out
17457 echo "$as_me:17457: result: $cf_cv_type_of_bool" >&5
17458 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17459 if test "$cf_cv_type_of_bool" = unknown ; then
17460         case .$NCURSES_BOOL in #(vi
17461         .auto|.) NCURSES_BOOL=unsigned;;
17462         esac
17463         { echo "$as_me:17463: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17464 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17465         cf_cv_type_of_bool=$NCURSES_BOOL
17466 fi
17467
17468 echo "$as_me:17468: checking for special defines needed for etip.h" >&5
17469 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17470 cf_save_CXXFLAGS="$CXXFLAGS"
17471 cf_result="none"
17472 for cf_math in "" MATH_H
17473 do
17474 for cf_excp in "" MATH_EXCEPTION
17475 do
17476         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17477         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17478         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17479 cat >conftest.$ac_ext <<_ACEOF
17480 #line 17480 "configure"
17481 #include "confdefs.h"
17482
17483 #include <etip.h.in>
17484
17485 int
17486 main ()
17487 {
17488
17489   ;
17490   return 0;
17491 }
17492 _ACEOF
17493 rm -f conftest.$ac_objext
17494 if { (eval echo "$as_me:17494: \"$ac_compile\"") >&5
17495   (eval $ac_compile) 2>&5
17496   ac_status=$?
17497   echo "$as_me:17497: \$? = $ac_status" >&5
17498   (exit $ac_status); } &&
17499          { ac_try='test -s conftest.$ac_objext'
17500   { (eval echo "$as_me:17500: \"$ac_try\"") >&5
17501   (eval $ac_try) 2>&5
17502   ac_status=$?
17503   echo "$as_me:17503: \$? = $ac_status" >&5
17504   (exit $ac_status); }; }; then
17505
17506         test -n "$cf_math" && cat >>confdefs.h <<EOF
17507 #define ETIP_NEEDS_${cf_math} 1
17508 EOF
17509
17510         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17511 #define ETIP_NEEDS_${cf_excp} 1
17512 EOF
17513
17514         cf_result="$cf_math $cf_excp"
17515         break
17516
17517 else
17518   echo "$as_me: failed program was:" >&5
17519 cat conftest.$ac_ext >&5
17520 fi
17521 rm -f conftest.$ac_objext conftest.$ac_ext
17522 done
17523 done
17524 echo "$as_me:17524: result: $cf_result" >&5
17525 echo "${ECHO_T}$cf_result" >&6
17526 CXXFLAGS="$cf_save_CXXFLAGS"
17527
17528 if test -n "$CXX"; then
17529 echo "$as_me:17529: checking if $CXX accepts parameter initialization" >&5
17530 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17531 if test "${cf_cv_cpp_param_init+set}" = set; then
17532   echo $ECHO_N "(cached) $ECHO_C" >&6
17533 else
17534
17535         ac_ext=cc
17536 ac_cpp='$CXXCPP $CPPFLAGS'
17537 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17538 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17539 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17540 ac_main_return=return
17541
17542         if test "$cross_compiling" = yes; then
17543   cf_cv_cpp_param_init=unknown
17544 else
17545   cat >conftest.$ac_ext <<_ACEOF
17546 #line 17546 "configure"
17547 #include "confdefs.h"
17548
17549 class TEST {
17550 private:
17551         int value;
17552 public:
17553         TEST(int x = 1);
17554         ~TEST();
17555 };
17556
17557 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17558 {
17559         value = x;
17560 }
17561 void main() { }
17562
17563 _ACEOF
17564 rm -f conftest$ac_exeext
17565 if { (eval echo "$as_me:17565: \"$ac_link\"") >&5
17566   (eval $ac_link) 2>&5
17567   ac_status=$?
17568   echo "$as_me:17568: \$? = $ac_status" >&5
17569   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17570   { (eval echo "$as_me:17570: \"$ac_try\"") >&5
17571   (eval $ac_try) 2>&5
17572   ac_status=$?
17573   echo "$as_me:17573: \$? = $ac_status" >&5
17574   (exit $ac_status); }; }; then
17575   cf_cv_cpp_param_init=yes
17576 else
17577   echo "$as_me: program exited with status $ac_status" >&5
17578 echo "$as_me: failed program was:" >&5
17579 cat conftest.$ac_ext >&5
17580 cf_cv_cpp_param_init=no
17581 fi
17582 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17583 fi
17584         ac_ext=cc
17585 ac_cpp='$CXXCPP $CPPFLAGS'
17586 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17587 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17588 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17589 ac_main_return=return
17590
17591 fi
17592 echo "$as_me:17592: result: $cf_cv_cpp_param_init" >&5
17593 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17594 fi
17595 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17596 #define CPP_HAS_PARAM_INIT 1
17597 EOF
17598
17599 if test -n "$CXX"; then
17600
17601 echo "$as_me:17601: checking if $CXX accepts static_cast" >&5
17602 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17603 if test "${cf_cv_cpp_static_cast+set}" = set; then
17604   echo $ECHO_N "(cached) $ECHO_C" >&6
17605 else
17606
17607         ac_ext=cc
17608 ac_cpp='$CXXCPP $CPPFLAGS'
17609 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17610 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17611 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17612 ac_main_return=return
17613
17614         cat >conftest.$ac_ext <<_ACEOF
17615 #line 17615 "configure"
17616 #include "confdefs.h"
17617
17618 class NCursesPanel
17619 {
17620 public:
17621   NCursesPanel(int nlines,
17622                int ncols,
17623                int begin_y = 0,
17624                int begin_x = 0)
17625   {
17626   }
17627
17628   ~NCursesPanel();
17629 };
17630
17631 template<class T> class NCursesUserPanel : public NCursesPanel
17632 {
17633 public:
17634   NCursesUserPanel (int nlines,
17635                     int ncols,
17636                     int begin_y = 0,
17637                     int begin_x = 0,
17638                     const T* p_UserData = static_cast<T*>(0))
17639     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17640   {
17641   };
17642   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17643   {
17644   };
17645
17646   virtual ~NCursesUserPanel() {};
17647 };
17648
17649 int
17650 main ()
17651 {
17652
17653         const char* p_UserData = static_cast<char*>(0)
17654   ;
17655   return 0;
17656 }
17657 _ACEOF
17658 rm -f conftest.$ac_objext
17659 if { (eval echo "$as_me:17659: \"$ac_compile\"") >&5
17660   (eval $ac_compile) 2>&5
17661   ac_status=$?
17662   echo "$as_me:17662: \$? = $ac_status" >&5
17663   (exit $ac_status); } &&
17664          { ac_try='test -s conftest.$ac_objext'
17665   { (eval echo "$as_me:17665: \"$ac_try\"") >&5
17666   (eval $ac_try) 2>&5
17667   ac_status=$?
17668   echo "$as_me:17668: \$? = $ac_status" >&5
17669   (exit $ac_status); }; }; then
17670   cf_cv_cpp_static_cast=yes
17671 else
17672   echo "$as_me: failed program was:" >&5
17673 cat conftest.$ac_ext >&5
17674 cf_cv_cpp_static_cast=no
17675 fi
17676 rm -f conftest.$ac_objext conftest.$ac_ext
17677
17678         ac_ext=cc
17679 ac_cpp='$CXXCPP $CPPFLAGS'
17680 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17681 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17682 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17683 ac_main_return=return
17684
17685 fi
17686 echo "$as_me:17686: result: $cf_cv_cpp_static_cast" >&5
17687 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17688
17689 fi
17690
17691 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17692 #define CPP_HAS_STATIC_CAST 1
17693 EOF
17694
17695         CXX_AR='$(AR)'
17696         CXX_ARFLAGS='$(ARFLAGS)'
17697         case $cf_cv_system_name in #(vi
17698         irix*) #(vi
17699             if test "$GXX" != yes ; then
17700                 CXX_AR='$(CXX)'
17701                 CXX_ARFLAGS='-ar -o'
17702             fi
17703             ;;
17704         sco3.2v5*) #(vi
17705             CXXLDFLAGS="-u main"
17706             ;;
17707         solaris2*)
17708             if test "$GXX" != yes ; then
17709                 CXX_AR='$(CXX)'
17710                 CXX_ARFLAGS='-xar -o'
17711             fi
17712             ;;
17713         esac
17714
17715 else
17716         cf_cxx_library=no
17717         cf_cv_builtin_bool=1
17718
17719         # Just because we are not configuring against C++ right now does not
17720         # mean that a user will not want to use C++.  Some distributors disable
17721         # the C++ portion of this configuration as a shortcut (or just to avoid
17722         # compiling the demo in the c++ directory).  So we need a reasonable
17723         # default for the 'bool' type.
17724         #
17725         # Caveat: since the storage of the bool type is not standardized, it
17726         # may change.
17727
17728         if test "$NCURSES_BOOL" != auto ; then
17729                 cf_cv_type_of_bool=$NCURSES_BOOL
17730                 cf_cv_header_stdbool_h=0
17731         else
17732                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17733
17734 echo "$as_me:17734: checking for size of bool" >&5
17735 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17736 if test "${cf_cv_type_of_bool+set}" = set; then
17737   echo $ECHO_N "(cached) $ECHO_C" >&6
17738 else
17739
17740         rm -f cf_test.out
17741         if test "$cross_compiling" = yes; then
17742   cf_cv_type_of_bool=unknown
17743 else
17744   cat >conftest.$ac_ext <<_ACEOF
17745 #line 17745 "configure"
17746 #include "confdefs.h"
17747
17748 #include <stdlib.h>
17749 #include <stdio.h>
17750
17751 #if defined(__cplusplus)
17752
17753 #ifdef HAVE_GXX_BUILTIN_H
17754 #include <g++/builtin.h>
17755 #elif HAVE_GPP_BUILTIN_H
17756 #include <gpp/builtin.h>
17757 #elif HAVE_BUILTIN_H
17758 #include <builtin.h>
17759 #endif
17760
17761 #else
17762
17763 #if $cf_cv_header_stdbool_h
17764 #include <stdbool.h>
17765 #endif
17766
17767 #endif
17768
17769 main()
17770 {
17771         FILE *fp = fopen("cf_test.out", "w");
17772         if (fp != 0) {
17773                 bool x = true;
17774                 if ((bool)(-x) >= 0)
17775                         fputs("unsigned ", fp);
17776                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17777                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17778                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17779                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17780                 fclose(fp);
17781         }
17782         ${cf_cv_main_return:-return}(0);
17783 }
17784
17785 _ACEOF
17786 rm -f conftest$ac_exeext
17787 if { (eval echo "$as_me:17787: \"$ac_link\"") >&5
17788   (eval $ac_link) 2>&5
17789   ac_status=$?
17790   echo "$as_me:17790: \$? = $ac_status" >&5
17791   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17792   { (eval echo "$as_me:17792: \"$ac_try\"") >&5
17793   (eval $ac_try) 2>&5
17794   ac_status=$?
17795   echo "$as_me:17795: \$? = $ac_status" >&5
17796   (exit $ac_status); }; }; then
17797   cf_cv_type_of_bool=`cat cf_test.out`
17798                  if test -z "$cf_cv_type_of_bool"; then
17799                    cf_cv_type_of_bool=unknown
17800                  fi
17801 else
17802   echo "$as_me: program exited with status $ac_status" >&5
17803 echo "$as_me: failed program was:" >&5
17804 cat conftest.$ac_ext >&5
17805 cf_cv_type_of_bool=unknown
17806 fi
17807 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17808 fi
17809
17810 fi
17811
17812         rm -f cf_test.out
17813 echo "$as_me:17813: result: $cf_cv_type_of_bool" >&5
17814 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17815 if test "$cf_cv_type_of_bool" = unknown ; then
17816         case .$NCURSES_BOOL in #(vi
17817         .auto|.) NCURSES_BOOL=unsigned;;
17818         esac
17819         { echo "$as_me:17819: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17820 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17821         cf_cv_type_of_bool=$NCURSES_BOOL
17822 fi
17823
17824                 else
17825                         echo "$as_me:17825: checking for fallback type of bool" >&5
17826 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17827                         case "$host_cpu" in #(vi
17828                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17829                         *)      cf_cv_type_of_bool=int  ;;
17830                         esac
17831                         echo "$as_me:17831: result: $cf_cv_type_of_bool" >&5
17832 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17833                 fi
17834         fi
17835 fi
17836
17837 # If the C compiler did not declare bool, and we did not determine that the C++
17838 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17839 # ncurses library use the same type as C++ bool.  Note that this allows one to
17840 # specify the type of bool in a configure-script option and postpone
17841 # integration with the C++ compiler provided that the types are compatible.
17842 USE_CXX_BOOL=1
17843 if test $cf_cv_cc_bool_type = 1
17844 then
17845         # oops: C has a bool.  Unlikely, but C++ could differ.
17846         USE_CXX_BOOL=0
17847 elif test $cf_cv_builtin_bool = 0
17848 then
17849         # C++ has no bool
17850         USE_CXX_BOOL=0
17851 else
17852         # this is the normal case
17853         USE_CXX_BOOL='defined(__cplusplus)'
17854 fi
17855
17856 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17857
17858         if test "$cf_with_ada" != "no" ; then
17859                 if test "$with_libtool" != "no"; then
17860                         { echo "$as_me:17860: WARNING: libtool does not support Ada - disabling feature" >&5
17861 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17862                         cf_with_ada=no
17863                 fi
17864         fi
17865
17866         if test "$cf_with_ada" != "no" ; then
17867
17868 cf_ada_make=gnatmake
17869 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17870 set dummy $cf_ada_make; ac_word=$2
17871 echo "$as_me:17871: checking for $ac_word" >&5
17872 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17873 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17874   echo $ECHO_N "(cached) $ECHO_C" >&6
17875 else
17876   if test -n "$gnat_exists"; then
17877   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17878 else
17879   ac_save_IFS=$IFS; IFS=$ac_path_separator
17880 ac_dummy="$PATH"
17881 for ac_dir in $ac_dummy; do
17882   IFS=$ac_save_IFS
17883   test -z "$ac_dir" && ac_dir=.
17884   $as_executable_p "$ac_dir/$ac_word" || continue
17885 ac_cv_prog_gnat_exists="yes"
17886 echo "$as_me:17886: found $ac_dir/$ac_word" >&5
17887 break
17888 done
17889
17890   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17891 fi
17892 fi
17893 gnat_exists=$ac_cv_prog_gnat_exists
17894 if test -n "$gnat_exists"; then
17895   echo "$as_me:17895: result: $gnat_exists" >&5
17896 echo "${ECHO_T}$gnat_exists" >&6
17897 else
17898   echo "$as_me:17898: result: no" >&5
17899 echo "${ECHO_T}no" >&6
17900 fi
17901
17902 if test "$ac_cv_prog_gnat_exists" = no; then
17903    cf_ada_make=
17904 else
17905
17906 echo "$as_me:17906: checking for gnat version" >&5
17907 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17908 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17909   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17910 echo "$as_me:17910: result: $cf_gnat_version" >&5
17911 echo "${ECHO_T}$cf_gnat_version" >&6
17912
17913 case $cf_gnat_version in
17914   3.1[1-9]*|3.[2-9]*|[4-9].*)
17915     cf_cv_prog_gnat_correct=yes
17916     ;;
17917   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17918      cf_cv_prog_gnat_correct=no
17919      ;;
17920 esac
17921
17922 case $cf_gnat_version in
17923   3.[1-9]*|[4-9].*)
17924       cf_compile_generics=generics
17925       cf_generic_objects="\${GENOBJS}"
17926       ;;
17927   *)  cf_compile_generics=
17928       cf_generic_objects=
17929       ;;
17930 esac
17931
17932 case $cf_gnat_version in
17933   3.[0-9]*)
17934     USE_OLD_MAKERULES=""
17935     USE_GNAT_PROJECTS="#"
17936     ;;
17937   *)
17938     USE_OLD_MAKERULES="#"
17939     USE_GNAT_PROJECTS=""
17940     ;;
17941 esac
17942
17943    # Extract the first word of "m4", so it can be a program name with args.
17944 set dummy m4; ac_word=$2
17945 echo "$as_me:17945: checking for $ac_word" >&5
17946 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17947 if test "${ac_cv_prog_M4_exists+set}" = set; then
17948   echo $ECHO_N "(cached) $ECHO_C" >&6
17949 else
17950   if test -n "$M4_exists"; then
17951   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17952 else
17953   ac_save_IFS=$IFS; IFS=$ac_path_separator
17954 ac_dummy="$PATH"
17955 for ac_dir in $ac_dummy; do
17956   IFS=$ac_save_IFS
17957   test -z "$ac_dir" && ac_dir=.
17958   $as_executable_p "$ac_dir/$ac_word" || continue
17959 ac_cv_prog_M4_exists="yes"
17960 echo "$as_me:17960: found $ac_dir/$ac_word" >&5
17961 break
17962 done
17963
17964   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17965 fi
17966 fi
17967 M4_exists=$ac_cv_prog_M4_exists
17968 if test -n "$M4_exists"; then
17969   echo "$as_me:17969: result: $M4_exists" >&5
17970 echo "${ECHO_T}$M4_exists" >&6
17971 else
17972   echo "$as_me:17972: result: no" >&5
17973 echo "${ECHO_T}no" >&6
17974 fi
17975
17976    if test "$ac_cv_prog_M4_exists" = no; then
17977       cf_cv_prog_gnat_correct=no
17978       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17979    fi
17980    if test "$cf_cv_prog_gnat_correct" = yes; then
17981       echo "$as_me:17981: checking if GNAT works" >&5
17982 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17983
17984 rm -rf conftest*
17985 cat >>conftest.ads <<CF_EOF
17986 procedure conftest;
17987 CF_EOF
17988 cat >>conftest.adb <<CF_EOF
17989 with Text_IO;
17990 with GNAT.OS_Lib;
17991 procedure conftest is
17992 begin
17993    Text_IO.Put ("Hello World");
17994    Text_IO.New_Line;
17995    GNAT.OS_Lib.OS_Exit (0);
17996 end conftest;
17997 CF_EOF
17998 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17999    if ( ./conftest 1>&5 2>&1 ) ; then
18000       cf_cv_prog_gnat_correct=yes
18001    else
18002       cf_cv_prog_gnat_correct=no
18003    fi
18004 else
18005    cf_cv_prog_gnat_correct=no
18006 fi
18007 rm -rf conftest*
18008
18009       echo "$as_me:18009: result: $cf_cv_prog_gnat_correct" >&5
18010 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18011    fi
18012 fi
18013
18014                 if test "$cf_cv_prog_gnat_correct" = yes; then
18015
18016         ADAFLAGS="$ADAFLAGS -O3 -gnatpn"
18017
18018 echo "$as_me:18018: checking if GNAT pragma Unreferenced works" >&5
18019 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18020 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18021   echo $ECHO_N "(cached) $ECHO_C" >&6
18022 else
18023
18024 rm -rf conftest*
18025 cat >>conftest.ads <<CF_EOF
18026 procedure conftest;
18027 CF_EOF
18028 cat >>conftest.adb <<CF_EOF
18029 with Text_IO;
18030 with GNAT.OS_Lib;
18031 procedure conftest is
18032    test : Integer;
18033    pragma Unreferenced (test);
18034 begin
18035    test := 1;
18036    Text_IO.Put ("Hello World");
18037    Text_IO.New_Line;
18038    GNAT.OS_Lib.OS_Exit (0);
18039 end conftest;
18040 CF_EOF
18041 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18042       cf_cv_pragma_unreferenced=yes
18043 else
18044    cf_cv_pragma_unreferenced=no
18045 fi
18046 rm -rf conftest*
18047
18048 fi
18049 echo "$as_me:18049: result: $cf_cv_pragma_unreferenced" >&5
18050 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18051
18052 # if the pragma is supported, use it (needed in the Trace code).
18053 if test $cf_cv_pragma_unreferenced = yes ; then
18054         PRAGMA_UNREF=TRUE
18055 else
18056         PRAGMA_UNREF=FALSE
18057 fi
18058
18059 echo "$as_me:18059: checking for ada-compiler" >&5
18060 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18061
18062 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18063 if test "${with_ada_compiler+set}" = set; then
18064   withval="$with_ada_compiler"
18065   cf_ada_compiler=$withval
18066 else
18067   cf_ada_compiler=gnatmake
18068 fi;
18069
18070 echo "$as_me:18070: result: $cf_ada_compiler" >&5
18071 echo "${ECHO_T}$cf_ada_compiler" >&6
18072
18073                         cf_ada_package=terminal_interface
18074
18075 echo "$as_me:18075: checking for ada-include" >&5
18076 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18077
18078 # Check whether --with-ada-include or --without-ada-include was given.
18079 if test "${with_ada_include+set}" = set; then
18080   withval="$with_ada_include"
18081
18082 else
18083   withval="${ADA_INCLUDE-$prefix/share/ada/adainclude}"
18084 fi; if test -n "$prefix/share/ada/adainclude" ; then
18085
18086 if test "x$prefix" != xNONE; then
18087   cf_path_syntax="$prefix"
18088 else
18089   cf_path_syntax="$ac_default_prefix"
18090 fi
18091
18092 case ".$withval" in #(vi
18093 .\$\(*\)*|.\'*\'*) #(vi
18094   ;;
18095 ..|./*|.\\*) #(vi
18096   ;;
18097 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18098   ;;
18099 .\${*prefix}*) #(vi
18100   eval withval="$withval"
18101   case ".$withval" in #(vi
18102   .NONE/*)
18103     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18104     ;;
18105   esac
18106   ;; #(vi
18107 .no|.NONE/*)
18108   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18109   ;;
18110 *)
18111   { { echo "$as_me:18111: error: expected a pathname, not \"$withval\"" >&5
18112 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18113    { (exit 1); exit 1; }; }
18114   ;;
18115 esac
18116
18117 fi
18118 ADA_INCLUDE="$withval"
18119
18120 echo "$as_me:18120: result: $ADA_INCLUDE" >&5
18121 echo "${ECHO_T}$ADA_INCLUDE" >&6
18122
18123 echo "$as_me:18123: checking for ada-objects" >&5
18124 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18125
18126 # Check whether --with-ada-objects or --without-ada-objects was given.
18127 if test "${with_ada_objects+set}" = set; then
18128   withval="$with_ada_objects"
18129
18130 else
18131   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
18132 fi; if test -n "$prefix/lib/ada/adalib" ; then
18133
18134 if test "x$prefix" != xNONE; then
18135   cf_path_syntax="$prefix"
18136 else
18137   cf_path_syntax="$ac_default_prefix"
18138 fi
18139
18140 case ".$withval" in #(vi
18141 .\$\(*\)*|.\'*\'*) #(vi
18142   ;;
18143 ..|./*|.\\*) #(vi
18144   ;;
18145 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18146   ;;
18147 .\${*prefix}*) #(vi
18148   eval withval="$withval"
18149   case ".$withval" in #(vi
18150   .NONE/*)
18151     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18152     ;;
18153   esac
18154   ;; #(vi
18155 .no|.NONE/*)
18156   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18157   ;;
18158 *)
18159   { { echo "$as_me:18159: error: expected a pathname, not \"$withval\"" >&5
18160 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18161    { (exit 1); exit 1; }; }
18162   ;;
18163 esac
18164
18165 fi
18166 ADA_OBJECTS="$withval"
18167
18168 echo "$as_me:18168: result: $ADA_OBJECTS" >&5
18169 echo "${ECHO_T}$ADA_OBJECTS" >&6
18170
18171 echo "$as_me:18171: checking if an Ada95 shared-library should be built" >&5
18172 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18173
18174 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18175 if test "${with_ada_sharedlib+set}" = set; then
18176   withval="$with_ada_sharedlib"
18177   with_ada_sharedlib=$withval
18178 else
18179   with_ada_sharedlib=no
18180 fi;
18181 echo "$as_me:18181: result: $with_ada_sharedlib" >&5
18182 echo "${ECHO_T}$with_ada_sharedlib" >&6
18183
18184 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18185 MAKE_ADA_SHAREDLIB="#"
18186
18187 if test "x$with_ada_sharedlib" != xno
18188 then
18189         MAKE_ADA_SHAREDLIB=
18190         if test "x$with_ada_sharedlib" != xyes
18191         then
18192                 ADA_SHAREDLIB="$with_ada_sharedlib"
18193         fi
18194 fi
18195
18196                 fi
18197         fi
18198 else
18199         cf_with_ada=no
18200 fi
18201
18202 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18203 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18204 ###
18205 ### ticlib modules may be a separate library, otherwise contained in termlib.
18206 ### termlib modules may be a separate library, otherwise contained in ncurses.
18207 ###
18208 ### The of "+" or " " between the tokens controls the way the script
18209 ### chooses to split module lists into libraries.
18210 ###
18211 ### (see CF_LIB_RULES).
18212 echo "$as_me:18212: checking for library subsets" >&5
18213 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18214 LIB_SUBSETS=
18215
18216 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18217         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18218         if test "$with_ticlib" != no ; then
18219                 LIB_SUBSETS="${LIB_SUBSETS} "
18220         else
18221                 LIB_SUBSETS="${LIB_SUBSETS}+"
18222         fi
18223 fi
18224
18225 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18226 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18227
18228 if test "$with_termlib" != no ; then
18229         LIB_SUBSETS="${LIB_SUBSETS} "
18230 else
18231         LIB_SUBSETS="${LIB_SUBSETS}+"
18232 fi
18233
18234 LIB_SUBSETS="${LIB_SUBSETS}base"
18235
18236 # Most term-driver calls are to tinfo, but some like init_pair are to the
18237 # base library (so it resides in base).
18238 if test "$with_term_driver" != no ; then
18239         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18240         case $cf_cv_system_name in #(vi
18241         *mingw32*) #(vi
18242                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18243                 ;;
18244         *) #(vi
18245                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18246                 ;;
18247         esac
18248 fi
18249
18250 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18251 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18252
18253 echo "$as_me:18253: result: $LIB_SUBSETS" >&5
18254 echo "${ECHO_T}$LIB_SUBSETS" >&6
18255
18256 ### Construct the list of include-directories to be generated
18257
18258 CPPFLAGS="$CPPFLAGS -I. -I../include"
18259 if test "$srcdir" != "."; then
18260         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18261 fi
18262 if test "$GCC" != yes; then
18263         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18264 elif test "$includedir" != "/usr/include"; then
18265         if test "$includedir" = '${prefix}/include' ; then
18266                 if test $prefix != /usr ; then
18267                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18268                 fi
18269         else
18270                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18271         fi
18272 fi
18273
18274 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18275 if test "$srcdir" != "."; then
18276         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18277 fi
18278 if test "$GCC" != yes; then
18279         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18280 elif test "$includedir" != "/usr/include"; then
18281         if test "$includedir" = '${prefix}/include' ; then
18282                 if test $prefix != /usr ; then
18283                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18284                 fi
18285         else
18286                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18287         fi
18288 fi
18289
18290 ### Build up pieces for makefile rules
18291 echo "$as_me:18291: checking default library suffix" >&5
18292 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18293
18294         case $DFT_LWR_MODEL in
18295         libtool) DFT_ARG_SUFFIX=''   ;;
18296         normal)  DFT_ARG_SUFFIX=''   ;;
18297         debug)   DFT_ARG_SUFFIX='_g' ;;
18298         profile) DFT_ARG_SUFFIX='_p' ;;
18299         shared)  DFT_ARG_SUFFIX=''   ;;
18300         esac
18301         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18302 echo "$as_me:18302: result: $DFT_ARG_SUFFIX" >&5
18303 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18304
18305 echo "$as_me:18305: checking default library-dependency suffix" >&5
18306 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18307
18308         case $DFT_LWR_MODEL in #(vi
18309         libtool) #(vi
18310                 DFT_LIB_SUFFIX='.la'
18311                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18312                 ;;
18313         normal) #(vi
18314                 DFT_LIB_SUFFIX='.a'
18315                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18316                 ;;
18317         debug) #(vi
18318                 DFT_LIB_SUFFIX='_g.a'
18319                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18320                 ;;
18321         profile) #(vi
18322                 DFT_LIB_SUFFIX='_p.a'
18323                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18324                 ;;
18325         shared) #(vi
18326                 case $cf_cv_system_name in
18327                 aix[56]*) #(vi
18328                         DFT_LIB_SUFFIX='.a'
18329                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18330                         ;;
18331                 cygwin*) #(vi
18332                         DFT_LIB_SUFFIX='.dll'
18333                         DFT_DEP_SUFFIX='.dll.a'
18334                         ;;
18335                 darwin*) #(vi
18336                         DFT_LIB_SUFFIX='.dylib'
18337                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18338                         ;;
18339                 hpux*) #(vi
18340                         case $target in
18341                         ia64*) #(vi
18342                                 DFT_LIB_SUFFIX='.so'
18343                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18344                                 ;;
18345                         *) #(vi
18346                                 DFT_LIB_SUFFIX='.sl'
18347                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18348                                 ;;
18349                         esac
18350                         ;;
18351                 *)      DFT_LIB_SUFFIX='.so'
18352                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18353                         ;;
18354                 esac
18355         esac
18356         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18357         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18358 echo "$as_me:18358: result: $DFT_DEP_SUFFIX" >&5
18359 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18360
18361 echo "$as_me:18361: checking default object directory" >&5
18362 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18363
18364         case $DFT_LWR_MODEL in
18365         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18366         normal)  DFT_OBJ_SUBDIR='objects' ;;
18367         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18368         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18369         shared)
18370                 case $cf_cv_system_name in #(vi
18371                 cygwin) #(vi
18372                         DFT_OBJ_SUBDIR='objects' ;;
18373                 *)
18374                         DFT_OBJ_SUBDIR='obj_s' ;;
18375                 esac
18376         esac
18377 echo "$as_me:18377: result: $DFT_OBJ_SUBDIR" >&5
18378 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18379
18380 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18381 if test "$cf_with_cxx" = yes ; then
18382 echo "$as_me:18382: checking c++ library-dependency suffix" >&5
18383 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18384 if test "$with_libtool" != "no"; then
18385         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18386 else
18387
18388         case normal in #(vi
18389         libtool) #(vi
18390                 CXX_LIB_SUFFIX='.la'
18391                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18392                 ;;
18393         normal) #(vi
18394                 CXX_LIB_SUFFIX='.a'
18395                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18396                 ;;
18397         debug) #(vi
18398                 CXX_LIB_SUFFIX='_g.a'
18399                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18400                 ;;
18401         profile) #(vi
18402                 CXX_LIB_SUFFIX='_p.a'
18403                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18404                 ;;
18405         shared) #(vi
18406                 case $cf_cv_system_name in
18407                 aix[56]*) #(vi
18408                         CXX_LIB_SUFFIX='.a'
18409                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18410                         ;;
18411                 cygwin*) #(vi
18412                         CXX_LIB_SUFFIX='.dll'
18413                         CXX_DEP_SUFFIX='.dll.a'
18414                         ;;
18415                 darwin*) #(vi
18416                         CXX_LIB_SUFFIX='.dylib'
18417                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18418                         ;;
18419                 hpux*) #(vi
18420                         case $target in
18421                         ia64*) #(vi
18422                                 CXX_LIB_SUFFIX='.so'
18423                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18424                                 ;;
18425                         *) #(vi
18426                                 CXX_LIB_SUFFIX='.sl'
18427                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18428                                 ;;
18429                         esac
18430                         ;;
18431                 *)      CXX_LIB_SUFFIX='.so'
18432                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18433                         ;;
18434                 esac
18435         esac
18436         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18437         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18438 fi
18439 echo "$as_me:18439: result: $CXX_LIB_SUFFIX" >&5
18440 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18441
18442 fi
18443
18444 # do not want -ldl in build except as needed for -lncurses dependency
18445 if test "$with_dlsym" = yes ; then
18446 if test $DFT_LWR_MODEL = shared || \
18447    test $DFT_LWR_MODEL = libtool ; then
18448
18449 # remove dl library from $LIBS
18450 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18451
18452 fi
18453 fi
18454 ### Set up low-level terminfo dependencies for makefiles.
18455
18456 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18457 # do not need libdl
18458 TICS_LIST=
18459 if test "$with_dlsym" = yes ; then
18460
18461 # remove dl library from $SHLIB_LIST
18462 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18463
18464 fi
18465
18466 if test "$with_ticlib" != no ; then
18467
18468         if test "$with_ticlib" != yes ; then
18469                 TICS_NAME=$with_ticlib
18470                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18471                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18472                 TICS_LIB_SUFFIX="${with_ticlib}"
18473         else
18474                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18475                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18476                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18477         fi
18478         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18479 else
18480         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18481 fi
18482
18483 if test "$with_termlib" != no ; then
18484
18485         if test "$with_termlib" != yes ; then
18486                 TINFO_NAME=$with_termlib
18487                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18488                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18489                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18490                 TINFO_LIB_SUFFIX="${with_termlib}"
18491         else
18492                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18493                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18494                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18495                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18496         fi
18497
18498         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18499         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18500         if test "$DFT_LWR_MODEL" = "libtool"; then
18501                 TEST_ARGS="${TEST_DEPS}"
18502                 TEST_ARG2="${TEST_DEP2}"
18503                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18504                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18505                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18506         else
18507                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18508                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18509                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18510                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18511                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18512         fi
18513 else
18514         # the next lines are needed for linking libtic over libncurses
18515         TINFO_NAME=${LIB_NAME}
18516         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18517         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18518         if test "$with_tic_depends" = yes ; then
18519                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18520         else
18521                 TICS_LIST="$SHLIB_LIST"
18522         fi
18523
18524         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18525 fi
18526
18527 if test "$DFT_LWR_MODEL" = shared ; then
18528         case $cf_cv_system_name in #(vi
18529         cygwin*)
18530                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18531                 TINFO_SUFFIX=.dll
18532                 ;;
18533         esac
18534 fi
18535
18536 if test "$with_dlsym" = yes ; then
18537
18538 # remove dl library from $TICS_LIST
18539 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18540
18541 fi
18542
18543 if test "$DFT_LWR_MODEL" = "libtool"; then
18544     OBJEXT=lo
18545 fi
18546
18547 # needed for Ada95
18548 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18549
18550 case $DFT_LWR_MODEL in
18551 normal|debug|profile)
18552
18553 if test "$GCC" = yes ; then
18554         case $cf_cv_system_name in #(
18555         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18556                 LDFLAGS_STATIC=
18557                 LDFLAGS_SHARED=
18558                 ;;
18559     *)  #( normally, except when broken
18560         LDFLAGS_STATIC=-static
18561         LDFLAGS_SHARED=-dynamic
18562         ;;
18563     esac
18564 else
18565         case $cf_cv_system_name in #(
18566         aix[456]*)      #( from ld manpage
18567                 LDFLAGS_STATIC=-bstatic
18568                 LDFLAGS_SHARED=-bdynamic
18569                 ;;
18570         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18571                 # We could also use just "archive" and "shared".
18572                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18573                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18574                 ;;
18575         irix*)          #( from ld manpage IRIX64
18576                 LDFLAGS_STATIC=-Bstatic
18577                 LDFLAGS_SHARED=-Bdynamic
18578                 ;;
18579         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18580                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18581                 LDFLAGS_STATIC=-noso
18582                 LDFLAGS_SHARED=-so_archive
18583                 ;;
18584         solaris2*)
18585                 LDFLAGS_STATIC=-Bstatic
18586                 LDFLAGS_SHARED=-Bdynamic
18587                 ;;
18588         esac
18589 fi
18590
18591         ;;
18592 esac
18593
18594 echo "$as_me:18594: checking where we will install curses.h" >&5
18595 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18596 test "$with_overwrite" = no && \
18597 test "x$includedir" = 'x${prefix}/include' && \
18598         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18599 echo "$as_me:18599: result: $includedir" >&5
18600 echo "${ECHO_T}$includedir" >&6
18601
18602 ### Resolve a conflict between normal and wide-curses by forcing applications
18603 ### that will need libutf8 to add it to their configure script.
18604 if test "$with_overwrite" != no ; then
18605 if test "$NCURSES_LIBUTF8" = 1 ; then
18606         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18607         { echo "$as_me:18607: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18608 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18609 fi
18610 fi
18611 WITH_OVERWRITE=$with_overwrite
18612
18613 # used to separate tack out of the tree
18614 NCURSES_TREE=
18615
18616 ### predefined stuff for the test programs
18617 cat >>confdefs.h <<\EOF
18618 #define HAVE_SLK_COLOR 1
18619 EOF
18620
18621 ### Construct the list of subdirectories for which we'll customize makefiles
18622 ### with the appropriate compile-rules.
18623
18624 echo "$as_me:18624: checking for src modules" >&5
18625 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18626
18627 # dependencies and linker-arguments for test-programs
18628 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18629 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18630 if test "$DFT_LWR_MODEL" = "libtool"; then
18631         TEST_ARGS="${TEST_DEPS}"
18632         TEST_ARG2="${TEST_DEP2}"
18633 else
18634         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18635         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18636 fi
18637
18638 cf_cv_src_modules=
18639 for cf_dir in $modules_to_build
18640 do
18641         if test -f $srcdir/$cf_dir/modules; then
18642
18643                 # We may/may not have tack in the distribution, though the
18644                 # makefile is.
18645                 if test $cf_dir = tack ; then
18646                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18647                                 continue
18648                         fi
18649                 fi
18650
18651                 if test -z "$cf_cv_src_modules"; then
18652                         cf_cv_src_modules=$cf_dir
18653                 else
18654                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18655                 fi
18656
18657                 # Make the ncurses_cfg.h file record the library interface files as
18658                 # well.  These are header files that are the same name as their
18659                 # directory.  Ncurses is the only library that does not follow
18660                 # that pattern.
18661                 if test $cf_dir = tack ; then
18662                         continue
18663                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18664
18665 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18666
18667                         cat >>confdefs.h <<EOF
18668 #define HAVE_${cf_have_include}_H 1
18669 EOF
18670
18671                         cat >>confdefs.h <<EOF
18672 #define HAVE_LIB${cf_have_include} 1
18673 EOF
18674
18675                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18676                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18677                         if test "$DFT_LWR_MODEL" = "libtool"; then
18678                                 TEST_ARGS="${TEST_DEPS}"
18679                                 TEST_ARG2="${TEST_DEP2}"
18680                         else
18681                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18682                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18683                         fi
18684                 fi
18685         fi
18686 done
18687 echo "$as_me:18687: result: $cf_cv_src_modules" >&5
18688 echo "${ECHO_T}$cf_cv_src_modules" >&6
18689
18690 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18691 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18692
18693 SRC_SUBDIRS=
18694 if test "x$cf_with_manpages" != xno ; then
18695         SRC_SUBDIRS="$SRC_SUBDIRS man"
18696 fi
18697 SRC_SUBDIRS="$SRC_SUBDIRS include"
18698 for cf_dir in $cf_cv_src_modules
18699 do
18700         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18701 done
18702 SRC_SUBDIRS="$SRC_SUBDIRS test"
18703 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18704 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18705
18706 ADA_SUBDIRS=
18707 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18708         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18709         ADA_SUBDIRS="gen src samples"
18710 fi
18711
18712 SUB_MAKEFILES=
18713 for cf_dir in $SRC_SUBDIRS
18714 do
18715         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18716 done
18717
18718 if test -n "$ADA_SUBDIRS"; then
18719         for cf_dir in $ADA_SUBDIRS
18720         do
18721                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18722         done
18723
18724 fi
18725
18726 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18727    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18728    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18729 fi
18730
18731 DIRS_TO_MAKE="lib"
18732 for cf_item in $cf_list_models
18733 do
18734
18735         case $cf_item in
18736         libtool) cf_subdir='obj_lo'  ;;
18737         normal)  cf_subdir='objects' ;;
18738         debug)   cf_subdir='obj_g' ;;
18739         profile) cf_subdir='obj_p' ;;
18740         shared)
18741                 case $cf_cv_system_name in #(vi
18742                 cygwin) #(vi
18743                         cf_subdir='objects' ;;
18744                 *)
18745                         cf_subdir='obj_s' ;;
18746                 esac
18747         esac
18748
18749         for cf_item2 in $DIRS_TO_MAKE
18750         do
18751                 test $cf_item2 = $cf_subdir && break
18752         done
18753         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18754 done
18755 for cf_dir in $DIRS_TO_MAKE
18756 do
18757         test ! -d $cf_dir && mkdir $cf_dir
18758 done
18759
18760 # symbols that differ when compiling Ada95 by itself.
18761 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18762
18763 # values to use as strings
18764 cat >>confdefs.h <<EOF
18765 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18766 EOF
18767
18768 cat >>confdefs.h <<EOF
18769 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18770 EOF
18771
18772 ### Now that we're done running tests, add the compiler-warnings, if any
18773
18774 cf_fix_cppflags=no
18775 cf_new_cflags=
18776 cf_new_cppflags=
18777 cf_new_extra_cppflags=
18778
18779 for cf_add_cflags in $EXTRA_CFLAGS
18780 do
18781 case $cf_fix_cppflags in
18782 no)
18783         case $cf_add_cflags in #(vi
18784         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18785                 case $cf_add_cflags in
18786                 -D*)
18787                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18788
18789                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18790                                 && test -z "${cf_tst_cflags}" \
18791                                 && cf_fix_cppflags=yes
18792
18793                         if test $cf_fix_cppflags = yes ; then
18794                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18795                                 continue
18796                         elif test "${cf_tst_cflags}" = "\"'" ; then
18797                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18798                                 continue
18799                         fi
18800                         ;;
18801                 esac
18802                 case "$CPPFLAGS" in
18803                 *$cf_add_cflags) #(vi
18804                         ;;
18805                 *) #(vi
18806                         case $cf_add_cflags in #(vi
18807                         -D*)
18808                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18809
18810 CPPFLAGS=`echo "$CPPFLAGS" | \
18811         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18812                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18813
18814                                 ;;
18815                         esac
18816                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18817                         ;;
18818                 esac
18819                 ;;
18820         *)
18821                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18822                 ;;
18823         esac
18824         ;;
18825 yes)
18826         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18827
18828         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18829
18830         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18831                 && test -z "${cf_tst_cflags}" \
18832                 && cf_fix_cppflags=no
18833         ;;
18834 esac
18835 done
18836
18837 if test -n "$cf_new_cflags" ; then
18838
18839         CFLAGS="$CFLAGS $cf_new_cflags"
18840 fi
18841
18842 if test -n "$cf_new_cppflags" ; then
18843
18844         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18845 fi
18846
18847 if test -n "$cf_new_extra_cppflags" ; then
18848
18849         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18850 fi
18851
18852 ### Define substitutions for header files to avoid name-pollution
18853
18854 if test "$cf_cv_have_tcgetattr" = yes ; then
18855         HAVE_TCGETATTR=1
18856 else
18857         HAVE_TCGETATTR=0
18858 fi
18859
18860 if test "$ac_cv_header_termio_h" = yes ; then
18861         HAVE_TERMIO_H=1
18862 else
18863         HAVE_TERMIO_H=0
18864 fi
18865
18866 if test "$ac_cv_header_termios_h" = yes ; then
18867         HAVE_TERMIOS_H=1
18868 else
18869         HAVE_TERMIOS_H=0
18870 fi
18871
18872 ################################################################################
18873 test "$use_database" = yes && \
18874 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18875
18876 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18877 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18878
18879 if test x"$enable_pc_files" = xyes ; then \
18880 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18881 MAKE_PC_FILES=
18882 else
18883 MAKE_PC_FILES="#"
18884 fi
18885
18886 # Extract the first word of "tic", so it can be a program name with args.
18887 set dummy tic; ac_word=$2
18888 echo "$as_me:18888: checking for $ac_word" >&5
18889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18890 if test "${ac_cv_path_TIC_PATH+set}" = set; then
18891   echo $ECHO_N "(cached) $ECHO_C" >&6
18892 else
18893   case $TIC_PATH in
18894   [\\/]* | ?:[\\/]*)
18895   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
18896   ;;
18897   *)
18898   ac_save_IFS=$IFS; IFS=$ac_path_separator
18899 ac_dummy="$PATH:/usr/local/ncurses/bin"
18900 for ac_dir in $ac_dummy; do
18901   IFS=$ac_save_IFS
18902   test -z "$ac_dir" && ac_dir=.
18903   if $as_executable_p "$ac_dir/$ac_word"; then
18904    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
18905    echo "$as_me:18905: found $ac_dir/$ac_word" >&5
18906    break
18907 fi
18908 done
18909
18910   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
18911   ;;
18912 esac
18913 fi
18914 TIC_PATH=$ac_cv_path_TIC_PATH
18915
18916 if test -n "$TIC_PATH"; then
18917   echo "$as_me:18917: result: $TIC_PATH" >&5
18918 echo "${ECHO_T}$TIC_PATH" >&6
18919 else
18920   echo "$as_me:18920: result: no" >&5
18921 echo "${ECHO_T}no" >&6
18922 fi
18923
18924 if test -n "$FALLBACK_LIST"
18925 then
18926         if test "$TIC_PATH" = unknown
18927         then
18928                 { { echo "$as_me:18928: error: no tic program found for fallbacks" >&5
18929 echo "$as_me: error: no tic program found for fallbacks" >&2;}
18930    { (exit 1); exit 1; }; }
18931         fi
18932 fi
18933
18934 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_MAKEFILES Makefile"
18935 ac_config_commands="$ac_config_commands default"
18936 cat >confcache <<\_ACEOF
18937 # This file is a shell script that caches the results of configure
18938 # tests run on this system so they can be shared between configure
18939 # scripts and configure runs, see configure's option --config-cache.
18940 # It is not useful on other systems.  If it contains results you don't
18941 # want to keep, you may remove or edit it.
18942 #
18943 # config.status only pays attention to the cache file if you give it
18944 # the --recheck option to rerun configure.
18945 #
18946 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18947 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18948 # following values.
18949
18950 _ACEOF
18951
18952 # The following way of writing the cache mishandles newlines in values,
18953 # but we know of no workaround that is simple, portable, and efficient.
18954 # So, don't put newlines in cache variables' values.
18955 # Ultrix sh set writes to stderr and can't be redirected directly,
18956 # and sets the high bit in the cache file unless we assign to the vars.
18957 {
18958   (set) 2>&1 |
18959     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18960     *ac_space=\ *)
18961       # `set' does not quote correctly, so add quotes (double-quote
18962       # substitution turns \\\\ into \\, and sed turns \\ into \).
18963       sed -n \
18964         "s/'/'\\\\''/g;
18965           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18966       ;;
18967     *)
18968       # `set' quotes correctly as required by POSIX, so do not add quotes.
18969       sed -n \
18970         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18971       ;;
18972     esac;
18973 } |
18974   sed '
18975      t clear
18976      : clear
18977      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18978      t end
18979      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18980      : end' >>confcache
18981 if cmp -s $cache_file confcache; then :; else
18982   if test -w $cache_file; then
18983     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18984     cat confcache >$cache_file
18985   else
18986     echo "not updating unwritable cache $cache_file"
18987   fi
18988 fi
18989 rm -f confcache
18990
18991 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18992 # Let make expand exec_prefix.
18993 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18994
18995 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18996 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18997 # trailing colons and then remove the whole line if VPATH becomes empty
18998 # (actually we leave an empty line to preserve line numbers).
18999 if test "x$srcdir" = x.; then
19000   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19001 s/:*\$(srcdir):*/:/;
19002 s/:*\${srcdir}:*/:/;
19003 s/:*@srcdir@:*/:/;
19004 s/^\([^=]*=[    ]*\):*/\1/;
19005 s/:*$//;
19006 s/^[^=]*=[      ]*$//;
19007 }'
19008 fi
19009
19010 DEFS=-DHAVE_CONFIG_H
19011
19012 : ${CONFIG_STATUS=./config.status}
19013 ac_clean_files_save=$ac_clean_files
19014 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19015 { echo "$as_me:19015: creating $CONFIG_STATUS" >&5
19016 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19017 cat >$CONFIG_STATUS <<_ACEOF
19018 #! $SHELL
19019 # Generated automatically by configure.
19020 # Run this file to recreate the current configuration.
19021 # Compiler output produced by configure, useful for debugging
19022 # configure, is in config.log if it exists.
19023
19024 debug=false
19025 SHELL=\${CONFIG_SHELL-$SHELL}
19026 ac_cs_invocation="\$0 \$@"
19027
19028 _ACEOF
19029
19030 cat >>$CONFIG_STATUS <<\_ACEOF
19031 # Be Bourne compatible
19032 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19033   emulate sh
19034   NULLCMD=:
19035 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19036   set -o posix
19037 fi
19038
19039 # Name of the executable.
19040 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19041
19042 if expr a : '\(a\)' >/dev/null 2>&1; then
19043   as_expr=expr
19044 else
19045   as_expr=false
19046 fi
19047
19048 rm -f conf$$ conf$$.exe conf$$.file
19049 echo >conf$$.file
19050 if ln -s conf$$.file conf$$ 2>/dev/null; then
19051   # We could just check for DJGPP; but this test a) works b) is more generic
19052   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19053   if test -f conf$$.exe; then
19054     # Don't use ln at all; we don't have any links
19055     as_ln_s='cp -p'
19056   else
19057     as_ln_s='ln -s'
19058   fi
19059 elif ln conf$$.file conf$$ 2>/dev/null; then
19060   as_ln_s=ln
19061 else
19062   as_ln_s='cp -p'
19063 fi
19064 rm -f conf$$ conf$$.exe conf$$.file
19065
19066 as_executable_p="test -f"
19067
19068 # Support unset when possible.
19069 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19070   as_unset=unset
19071 else
19072   as_unset=false
19073 fi
19074
19075 # NLS nuisances.
19076 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19077 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19078 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19079 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19080 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19081 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19082 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19083 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19084
19085 # IFS
19086 # We need space, tab and new line, in precisely that order.
19087 as_nl='
19088 '
19089 IFS="   $as_nl"
19090
19091 # CDPATH.
19092 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19093
19094 exec 6>&1
19095
19096 _ACEOF
19097
19098 # Files that config.status was made for.
19099 if test -n "$ac_config_files"; then
19100   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19101 fi
19102
19103 if test -n "$ac_config_headers"; then
19104   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19105 fi
19106
19107 if test -n "$ac_config_links"; then
19108   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19109 fi
19110
19111 if test -n "$ac_config_commands"; then
19112   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19113 fi
19114
19115 cat >>$CONFIG_STATUS <<\EOF
19116
19117 ac_cs_usage="\
19118 \`$as_me' instantiates files from templates according to the
19119 current configuration.
19120
19121 Usage: $0 [OPTIONS] [FILE]...
19122
19123   -h, --help       print this help, then exit
19124   -V, --version    print version number, then exit
19125   -d, --debug      don't remove temporary files
19126       --recheck    update $as_me by reconfiguring in the same conditions
19127   --file=FILE[:TEMPLATE]
19128                    instantiate the configuration file FILE
19129   --header=FILE[:TEMPLATE]
19130                    instantiate the configuration header FILE
19131
19132 Configuration files:
19133 $config_files
19134
19135 Configuration headers:
19136 $config_headers
19137
19138 Configuration commands:
19139 $config_commands
19140
19141 Report bugs to <bug-autoconf@gnu.org>."
19142 EOF
19143
19144 cat >>$CONFIG_STATUS <<EOF
19145 ac_cs_version="\\
19146 config.status
19147 configured by $0, generated by GNU Autoconf 2.52.20100814,
19148   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19149
19150 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19151 Free Software Foundation, Inc.
19152 This config.status script is free software; the Free Software Foundation
19153 gives unlimited permission to copy, distribute and modify it."
19154 srcdir=$srcdir
19155 INSTALL="$INSTALL"
19156 EOF
19157
19158 cat >>$CONFIG_STATUS <<\EOF
19159 # If no file are specified by the user, then we need to provide default
19160 # value.  By we need to know if files were specified by the user.
19161 ac_need_defaults=:
19162 while test $# != 0
19163 do
19164   case $1 in
19165   --*=*)
19166     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19167     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19168     shift
19169     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19170     shift
19171     ;;
19172   -*);;
19173   *) # This is not an option, so the user has probably given explicit
19174      # arguments.
19175      ac_need_defaults=false;;
19176   esac
19177
19178   case $1 in
19179   # Handling of the options.
19180 EOF
19181 cat >>$CONFIG_STATUS <<EOF
19182   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19183     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19184     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19185 EOF
19186 cat >>$CONFIG_STATUS <<\EOF
19187   --version | --vers* | -V )
19188     echo "$ac_cs_version"; exit 0 ;;
19189   --he | --h)
19190     # Conflict between --help and --header
19191     { { echo "$as_me:19191: error: ambiguous option: $1
19192 Try \`$0 --help' for more information." >&5
19193 echo "$as_me: error: ambiguous option: $1
19194 Try \`$0 --help' for more information." >&2;}
19195    { (exit 1); exit 1; }; };;
19196   --help | --hel | -h )
19197     echo "$ac_cs_usage"; exit 0 ;;
19198   --debug | --d* | -d )
19199     debug=: ;;
19200   --file | --fil | --fi | --f )
19201     shift
19202     CONFIG_FILES="$CONFIG_FILES $1"
19203     ac_need_defaults=false;;
19204   --header | --heade | --head | --hea )
19205     shift
19206     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19207     ac_need_defaults=false;;
19208
19209   # This is an error.
19210   -*) { { echo "$as_me:19210: error: unrecognized option: $1
19211 Try \`$0 --help' for more information." >&5
19212 echo "$as_me: error: unrecognized option: $1
19213 Try \`$0 --help' for more information." >&2;}
19214    { (exit 1); exit 1; }; } ;;
19215
19216   *) ac_config_targets="$ac_config_targets $1" ;;
19217
19218   esac
19219   shift
19220 done
19221
19222 exec 5>>config.log
19223 cat >&5 << _ACEOF
19224
19225 ## ----------------------- ##
19226 ## Running config.status.  ##
19227 ## ----------------------- ##
19228
19229 This file was extended by $as_me 2.52.20100814, executed with
19230   CONFIG_FILES    = $CONFIG_FILES
19231   CONFIG_HEADERS  = $CONFIG_HEADERS
19232   CONFIG_LINKS    = $CONFIG_LINKS
19233   CONFIG_COMMANDS = $CONFIG_COMMANDS
19234   > $ac_cs_invocation
19235 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19236
19237 _ACEOF
19238 EOF
19239
19240 cat >>$CONFIG_STATUS <<EOF
19241 #
19242 # INIT-COMMANDS section.
19243 #
19244
19245 ### Special initialization commands, used to pass information from the
19246 ### configuration-run into config.status
19247
19248 AWK="$AWK"
19249 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19250 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19251 ECHO_LINK="$ECHO_LINK"
19252 LDCONFIG="$LDCONFIG"
19253 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19254 LIB_NAME="$LIB_NAME"
19255 LIB_SUBSETS="$LIB_SUBSETS"
19256 LIB_SUFFIX="$LIB_SUFFIX"
19257 LIB_TRACING="$LIB_TRACING"
19258 LN_S="$LN_S"
19259 MAKE_TERMINFO="$MAKE_TERMINFO"
19260 NCURSES_MAJOR="$NCURSES_MAJOR"
19261 NCURSES_MINOR="$NCURSES_MINOR"
19262 NCURSES_OSPEED="$NCURSES_OSPEED"
19263 NCURSES_PATCH="$NCURSES_PATCH"
19264 SRC_SUBDIRS="$SRC_SUBDIRS"
19265 TERMINFO="$TERMINFO"
19266 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19267 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19268 TICS_NAME="$TICS_NAME"
19269 TIC_PATH="$TIC_PATH"
19270 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19271 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19272 TINFO_NAME="$TINFO_NAME"
19273 TINFO_SUFFIX="$TINFO_SUFFIX"
19274 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19275 WITH_CURSES_H="$with_curses_h"
19276 WITH_ECHO="$with_echo"
19277 WITH_OVERWRITE="$with_overwrite"
19278 cf_LIST_MODELS="$cf_list_models"
19279 cf_cv_abi_version="$cf_cv_abi_version"
19280 cf_cv_do_relink="$cf_cv_do_relink"
19281 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19282 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19283 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19284 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19285 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19286 cf_cv_rel_version="$cf_cv_rel_version"
19287 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19288 cf_cv_shared_soname='$cf_cv_shared_soname'
19289 cf_cv_shlib_version="$cf_cv_shlib_version"
19290 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19291 cf_cv_system_name="$cf_cv_system_name"
19292 cf_with_ada="$cf_with_ada"
19293 cf_with_cxx_binding="$cf_with_cxx_binding"
19294 cf_with_manpages="$cf_with_manpages"
19295 host="$host"
19296 target="$target"
19297
19298 EOF
19299
19300 cat >>$CONFIG_STATUS <<\EOF
19301 for ac_config_target in $ac_config_targets
19302 do
19303   case "$ac_config_target" in
19304   # Handling of arguments.
19305   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19306   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19307   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19308   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19309   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19310   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19311   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19312   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19313   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19314   *) { { echo "$as_me:19314: error: invalid argument: $ac_config_target" >&5
19315 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19316    { (exit 1); exit 1; }; };;
19317   esac
19318 done
19319
19320 # If the user did not use the arguments to specify the items to instantiate,
19321 # then the envvar interface is used.  Set only those that are not.
19322 # We use the long form for the default assignment because of an extremely
19323 # bizarre bug on SunOS 4.1.3.
19324 if $ac_need_defaults; then
19325   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19326   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19327   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19328 fi
19329
19330 # Create a temporary directory, and hook for its removal unless debugging.
19331 $debug ||
19332 {
19333   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19334   trap '{ (exit 1); exit 1; }' 1 2 13 15
19335 }
19336
19337 # Create a (secure) tmp directory for tmp files.
19338 : ${TMPDIR=/tmp}
19339 {
19340   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19341   test -n "$tmp" && test -d "$tmp"
19342 }  ||
19343 {
19344   tmp=$TMPDIR/cs$$-$RANDOM
19345   (umask 077 && mkdir $tmp)
19346 } ||
19347 {
19348    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19349    { (exit 1); exit 1; }
19350 }
19351
19352 EOF
19353
19354 cat >>$CONFIG_STATUS <<EOF
19355
19356 #
19357 # CONFIG_FILES section.
19358 #
19359
19360 # No need to generate the scripts if there are no CONFIG_FILES.
19361 # This happens for instance when ./config.status config.h
19362 if test -n "\$CONFIG_FILES"; then
19363   # Protect against being on the right side of a sed subst in config.status.
19364   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19365    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19366 s,@SHELL@,$SHELL,;t t
19367 s,@exec_prefix@,$exec_prefix,;t t
19368 s,@prefix@,$prefix,;t t
19369 s,@program_transform_name@,$program_transform_name,;t t
19370 s,@bindir@,$bindir,;t t
19371 s,@sbindir@,$sbindir,;t t
19372 s,@libexecdir@,$libexecdir,;t t
19373 s,@datadir@,$datadir,;t t
19374 s,@sysconfdir@,$sysconfdir,;t t
19375 s,@sharedstatedir@,$sharedstatedir,;t t
19376 s,@localstatedir@,$localstatedir,;t t
19377 s,@libdir@,$libdir,;t t
19378 s,@includedir@,$includedir,;t t
19379 s,@oldincludedir@,$oldincludedir,;t t
19380 s,@infodir@,$infodir,;t t
19381 s,@mandir@,$mandir,;t t
19382 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19383 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19384 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19385 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19386 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19387 s,@build_alias@,$build_alias,;t t
19388 s,@host_alias@,$host_alias,;t t
19389 s,@target_alias@,$target_alias,;t t
19390 s,@ECHO_C@,$ECHO_C,;t t
19391 s,@ECHO_N@,$ECHO_N,;t t
19392 s,@ECHO_T@,$ECHO_T,;t t
19393 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19394 s,@DEFS@,$DEFS,;t t
19395 s,@LIBS@,$LIBS,;t t
19396 s,@top_builddir@,$top_builddir,;t t
19397 s,@EGREP@,$EGREP,;t t
19398 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19399 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19400 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19401 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19402 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19403 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19404 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19405 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19406 s,@build@,$build,;t t
19407 s,@build_cpu@,$build_cpu,;t t
19408 s,@build_vendor@,$build_vendor,;t t
19409 s,@build_os@,$build_os,;t t
19410 s,@host@,$host,;t t
19411 s,@host_cpu@,$host_cpu,;t t
19412 s,@host_vendor@,$host_vendor,;t t
19413 s,@host_os@,$host_os,;t t
19414 s,@target@,$target,;t t
19415 s,@target_cpu@,$target_cpu,;t t
19416 s,@target_vendor@,$target_vendor,;t t
19417 s,@target_os@,$target_os,;t t
19418 s,@CC@,$CC,;t t
19419 s,@CFLAGS@,$CFLAGS,;t t
19420 s,@LDFLAGS@,$LDFLAGS,;t t
19421 s,@CPPFLAGS@,$CPPFLAGS,;t t
19422 s,@ac_ct_CC@,$ac_ct_CC,;t t
19423 s,@EXEEXT@,$EXEEXT,;t t
19424 s,@OBJEXT@,$OBJEXT,;t t
19425 s,@CPP@,$CPP,;t t
19426 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19427 s,@PROG_EXT@,$PROG_EXT,;t t
19428 s,@LDCONFIG@,$LDCONFIG,;t t
19429 s,@CXX@,$CXX,;t t
19430 s,@CXXFLAGS@,$CXXFLAGS,;t t
19431 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19432 s,@AWK@,$AWK,;t t
19433 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19434 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19435 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19436 s,@LINT@,$LINT,;t t
19437 s,@LINT_OPTS@,$LINT_OPTS,;t t
19438 s,@LN_S@,$LN_S,;t t
19439 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19440 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19441 s,@SET_MAKE@,$SET_MAKE,;t t
19442 s,@CTAGS@,$CTAGS,;t t
19443 s,@ETAGS@,$ETAGS,;t t
19444 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19445 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19446 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19447 s,@RANLIB@,$RANLIB,;t t
19448 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19449 s,@LD@,$LD,;t t
19450 s,@ac_ct_LD@,$ac_ct_LD,;t t
19451 s,@AR@,$AR,;t t
19452 s,@ac_ct_AR@,$ac_ct_AR,;t t
19453 s,@ARFLAGS@,$ARFLAGS,;t t
19454 s,@DESTDIR@,$DESTDIR,;t t
19455 s,@BUILD_CC@,$BUILD_CC,;t t
19456 s,@BUILD_CPP@,$BUILD_CPP,;t t
19457 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19458 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19459 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19460 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19461 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19462 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19463 s,@cf_list_models@,$cf_list_models,;t t
19464 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
19465 s,@LIBTOOL@,$LIBTOOL,;t t
19466 s,@LT_UNDEF@,$LT_UNDEF,;t t
19467 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19468 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19469 s,@LIB_CREATE@,$LIB_CREATE,;t t
19470 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19471 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19472 s,@LIB_PREP@,$LIB_PREP,;t t
19473 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19474 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19475 s,@LIB_LINK@,$LIB_LINK,;t t
19476 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19477 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19478 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19479 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19480 s,@TICS_NAME@,$TICS_NAME,;t t
19481 s,@TINFO_NAME@,$TINFO_NAME,;t t
19482 s,@LIB_NAME@,$LIB_NAME,;t t
19483 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19484 s,@CC_G_OPT@,$CC_G_OPT,;t t
19485 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19486 s,@LD_MODEL@,$LD_MODEL,;t t
19487 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19488 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19489 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19490 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19491 s,@LINK_PROGS@,$LINK_PROGS,;t t
19492 s,@LINK_TESTS@,$LINK_TESTS,;t t
19493 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19494 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19495 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19496 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19497 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19498 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19499 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19500 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19501 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19502 s,@TERMINFO@,$TERMINFO,;t t
19503 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19504 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19505 s,@TERMPATH@,$TERMPATH,;t t
19506 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19507 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19508 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19509 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19510 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19511 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19512 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19513 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19514 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19515 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19516 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19517 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19518 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19519 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19520 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19521 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19522 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19523 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19524 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19525 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19526 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19527 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19528 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19529 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19530 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19531 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19532 s,@PTHREAD@,$PTHREAD,;t t
19533 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19534 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19535 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19536 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19537 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19538 s,@ECHO_LINK@,$ECHO_LINK,;t t
19539 s,@ADAFLAGS@,$ADAFLAGS,;t t
19540 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19541 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19542 s,@ADA_TRACE@,$ADA_TRACE,;t t
19543 s,@MATH_LIB@,$MATH_LIB,;t t
19544 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19545 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19546 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19547 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19548 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19549 s,@TEST_LIBS@,$TEST_LIBS,;t t
19550 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19551 s,@CXXCPP@,$CXXCPP,;t t
19552 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19553 s,@CXX_AR@,$CXX_AR,;t t
19554 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19555 s,@CXXLIBS@,$CXXLIBS,;t t
19556 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19557 s,@gnat_exists@,$gnat_exists,;t t
19558 s,@cf_compile_generics@,$cf_compile_generics,;t t
19559 s,@cf_generic_objects@,$cf_generic_objects,;t t
19560 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
19561 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
19562 s,@M4_exists@,$M4_exists,;t t
19563 s,@cf_ada_make@,$cf_ada_make,;t t
19564 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19565 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19566 s,@cf_ada_package@,$cf_ada_package,;t t
19567 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19568 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19569 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
19570 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
19571 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19572 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19573 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19574 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19575 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19576 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19577 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19578 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19579 s,@TICS_ARGS@,$TICS_ARGS,;t t
19580 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19581 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19582 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19583 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19584 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19585 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19586 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19587 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19588 s,@TICS_LIST@,$TICS_LIST,;t t
19589 s,@TINFO_LIST@,$TINFO_LIST,;t t
19590 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19591 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19592 s,@TEST_ARGS@,$TEST_ARGS,;t t
19593 s,@TEST_DEPS@,$TEST_DEPS,;t t
19594 s,@TEST_ARG2@,$TEST_ARG2,;t t
19595 s,@TEST_DEP2@,$TEST_DEP2,;t t
19596 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19597 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19598 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19599 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19600 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19601 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19602 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19603 s,@cross_compiling@,$cross_compiling,;t t
19604 s,@TIC_PATH@,$TIC_PATH,;t t
19605 CEOF
19606
19607 EOF
19608
19609   cat >>$CONFIG_STATUS <<\EOF
19610   # Split the substitutions into bite-sized pieces for seds with
19611   # small command number limits, like on Digital OSF/1 and HP-UX.
19612   ac_max_sed_lines=48
19613   ac_sed_frag=1 # Number of current file.
19614   ac_beg=1 # First line for current file.
19615   ac_end=$ac_max_sed_lines # Line after last line for current file.
19616   ac_more_lines=:
19617   ac_sed_cmds=
19618   while $ac_more_lines; do
19619     if test $ac_beg -gt 1; then
19620       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19621     else
19622       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19623     fi
19624     if test ! -s $tmp/subs.frag; then
19625       ac_more_lines=false
19626     else
19627       # The purpose of the label and of the branching condition is to
19628       # speed up the sed processing (if there are no `@' at all, there
19629       # is no need to browse any of the substitutions).
19630       # These are the two extra sed commands mentioned above.
19631       (echo ':t
19632   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19633       if test -z "$ac_sed_cmds"; then
19634         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19635       else
19636         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19637       fi
19638       ac_sed_frag=`expr $ac_sed_frag + 1`
19639       ac_beg=$ac_end
19640       ac_end=`expr $ac_end + $ac_max_sed_lines`
19641     fi
19642   done
19643   if test -z "$ac_sed_cmds"; then
19644     ac_sed_cmds=cat
19645   fi
19646 fi # test -n "$CONFIG_FILES"
19647
19648 EOF
19649 cat >>$CONFIG_STATUS <<\EOF
19650 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19651   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19652   case $ac_file in
19653   - | *:- | *:-:* ) # input from stdin
19654         cat >$tmp/stdin
19655         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19656         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19657   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19658         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19659   * )   ac_file_in=$ac_file.in ;;
19660   esac
19661
19662   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19663   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19664          X"$ac_file" : 'X\(//\)[^/]' \| \
19665          X"$ac_file" : 'X\(//\)$' \| \
19666          X"$ac_file" : 'X\(/\)' \| \
19667          .     : '\(.\)' 2>/dev/null ||
19668 echo X"$ac_file" |
19669     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19670           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19671           /^X\(\/\/\)$/{ s//\1/; q; }
19672           /^X\(\/\).*/{ s//\1/; q; }
19673           s/.*/./; q'`
19674   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19675     { case "$ac_dir" in
19676   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19677   *)                      as_incr_dir=.;;
19678 esac
19679 as_dummy="$ac_dir"
19680 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19681   case $as_mkdir_dir in
19682     # Skip DOS drivespec
19683     ?:) as_incr_dir=$as_mkdir_dir ;;
19684     *)
19685       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19686       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19687     ;;
19688   esac
19689 done; }
19690
19691     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19692     # A "../" for each directory in $ac_dir_suffix.
19693     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19694   else
19695     ac_dir_suffix= ac_dots=
19696   fi
19697
19698   case $srcdir in
19699   .)  ac_srcdir=.
19700       if test -z "$ac_dots"; then
19701          ac_top_srcdir=.
19702       else
19703          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19704       fi ;;
19705   [\\/]* | ?:[\\/]* )
19706       ac_srcdir=$srcdir$ac_dir_suffix;
19707       ac_top_srcdir=$srcdir ;;
19708   *) # Relative path.
19709     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19710     ac_top_srcdir=$ac_dots$srcdir ;;
19711   esac
19712
19713   case $INSTALL in
19714   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19715   *) ac_INSTALL=$ac_dots$INSTALL ;;
19716   esac
19717
19718   if test x"$ac_file" != x-; then
19719     { echo "$as_me:19719: creating $ac_file" >&5
19720 echo "$as_me: creating $ac_file" >&6;}
19721     rm -f "$ac_file"
19722   fi
19723   # Let's still pretend it is `configure' which instantiates (i.e., don't
19724   # use $as_me), people would be surprised to read:
19725   #    /* config.h.  Generated automatically by config.status.  */
19726   configure_input="Generated automatically from `echo $ac_file_in |
19727                                                  sed 's,.*/,,'` by configure."
19728
19729   # First look for the input files in the build tree, otherwise in the
19730   # src tree.
19731   ac_file_inputs=`IFS=:
19732     for f in $ac_file_in; do
19733       case $f in
19734       -) echo $tmp/stdin ;;
19735       [\\/$]*)
19736          # Absolute (can't be DOS-style, as IFS=:)
19737          test -f "$f" || { { echo "$as_me:19737: error: cannot find input file: $f" >&5
19738 echo "$as_me: error: cannot find input file: $f" >&2;}
19739    { (exit 1); exit 1; }; }
19740          echo $f;;
19741       *) # Relative
19742          if test -f "$f"; then
19743            # Build tree
19744            echo $f
19745          elif test -f "$srcdir/$f"; then
19746            # Source tree
19747            echo $srcdir/$f
19748          else
19749            # /dev/null tree
19750            { { echo "$as_me:19750: error: cannot find input file: $f" >&5
19751 echo "$as_me: error: cannot find input file: $f" >&2;}
19752    { (exit 1); exit 1; }; }
19753          fi;;
19754       esac
19755     done` || { (exit 1); exit 1; }
19756 EOF
19757 cat >>$CONFIG_STATUS <<EOF
19758   sed "$ac_vpsub
19759 $extrasub
19760 EOF
19761 cat >>$CONFIG_STATUS <<\EOF
19762 :t
19763 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19764 s,@configure_input@,$configure_input,;t t
19765 s,@srcdir@,$ac_srcdir,;t t
19766 s,@top_srcdir@,$ac_top_srcdir,;t t
19767 s,@INSTALL@,$ac_INSTALL,;t t
19768 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19769   rm -f $tmp/stdin
19770   if test x"$ac_file" != x-; then
19771     mv $tmp/out $ac_file
19772   else
19773     cat $tmp/out
19774     rm -f $tmp/out
19775   fi
19776
19777 done
19778 EOF
19779 cat >>$CONFIG_STATUS <<\EOF
19780
19781 #
19782 # CONFIG_HEADER section.
19783 #
19784
19785 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19786 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19787 #
19788 # ac_d sets the value in "#define NAME VALUE" lines.
19789 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19790 ac_dB='[        ].*$,\1#\2'
19791 ac_dC=' '
19792 ac_dD=',;t'
19793 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19794 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19795 ac_iB='\([      ]\),\1#\2define\3'
19796 ac_iC=' '
19797 ac_iD='\4,;t'
19798 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19799 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19800 ac_uB='$,\1#\2define\3'
19801 ac_uC=' '
19802 ac_uD=',;t'
19803
19804 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19805   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19806   case $ac_file in
19807   - | *:- | *:-:* ) # input from stdin
19808         cat >$tmp/stdin
19809         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19810         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19811   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19812         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19813   * )   ac_file_in=$ac_file.in ;;
19814   esac
19815
19816   test x"$ac_file" != x- && { echo "$as_me:19816: creating $ac_file" >&5
19817 echo "$as_me: creating $ac_file" >&6;}
19818
19819   # First look for the input files in the build tree, otherwise in the
19820   # src tree.
19821   ac_file_inputs=`IFS=:
19822     for f in $ac_file_in; do
19823       case $f in
19824       -) echo $tmp/stdin ;;
19825       [\\/$]*)
19826          # Absolute (can't be DOS-style, as IFS=:)
19827          test -f "$f" || { { echo "$as_me:19827: error: cannot find input file: $f" >&5
19828 echo "$as_me: error: cannot find input file: $f" >&2;}
19829    { (exit 1); exit 1; }; }
19830          echo $f;;
19831       *) # Relative
19832          if test -f "$f"; then
19833            # Build tree
19834            echo $f
19835          elif test -f "$srcdir/$f"; then
19836            # Source tree
19837            echo $srcdir/$f
19838          else
19839            # /dev/null tree
19840            { { echo "$as_me:19840: error: cannot find input file: $f" >&5
19841 echo "$as_me: error: cannot find input file: $f" >&2;}
19842    { (exit 1); exit 1; }; }
19843          fi;;
19844       esac
19845     done` || { (exit 1); exit 1; }
19846   # Remove the trailing spaces.
19847   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19848
19849 EOF
19850
19851 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19852 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19853 # be either 'cat' or 'sort'.
19854 cat confdefs.h | uniq >conftest.vals
19855
19856 # Break up conftest.vals because some shells have a limit on
19857 # the size of here documents, and old seds have small limits too.
19858
19859 rm -f conftest.tail
19860 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19861 while grep . conftest.vals >/dev/null
19862 do
19863   # Write chunks of a limited-size here document to conftest.frag.
19864   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19865   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19866   echo 'CEOF' >> $CONFIG_STATUS
19867   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19868   rm -f conftest.vals
19869   mv conftest.tail conftest.vals
19870 done
19871 rm -f conftest.vals
19872
19873 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19874 # marker @DEFS@.
19875 echo '  cat >> conftest.edit <<CEOF
19876 /@DEFS@/r conftest.frag
19877 /@DEFS@/d
19878 CEOF
19879 sed -f conftest.edit $tmp/in > $tmp/out
19880 rm -f $tmp/in
19881 mv $tmp/out $tmp/in
19882 rm -f conftest.edit conftest.frag
19883 ' >> $CONFIG_STATUS
19884
19885 cat >>$CONFIG_STATUS <<\EOF
19886   # Let's still pretend it is `configure' which instantiates (i.e., don't
19887   # use $as_me), people would be surprised to read:
19888   #    /* config.h.  Generated automatically by config.status.  */
19889   if test x"$ac_file" = x-; then
19890     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19891   else
19892     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19893   fi
19894   cat $tmp/in >>$tmp/config.h
19895   rm -f $tmp/in
19896   if test x"$ac_file" != x-; then
19897     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19898       { echo "$as_me:19898: $ac_file is unchanged" >&5
19899 echo "$as_me: $ac_file is unchanged" >&6;}
19900     else
19901       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19902          X"$ac_file" : 'X\(//\)[^/]' \| \
19903          X"$ac_file" : 'X\(//\)$' \| \
19904          X"$ac_file" : 'X\(/\)' \| \
19905          .     : '\(.\)' 2>/dev/null ||
19906 echo X"$ac_file" |
19907     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19908           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19909           /^X\(\/\/\)$/{ s//\1/; q; }
19910           /^X\(\/\).*/{ s//\1/; q; }
19911           s/.*/./; q'`
19912       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19913         { case "$ac_dir" in
19914   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19915   *)                      as_incr_dir=.;;
19916 esac
19917 as_dummy="$ac_dir"
19918 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19919   case $as_mkdir_dir in
19920     # Skip DOS drivespec
19921     ?:) as_incr_dir=$as_mkdir_dir ;;
19922     *)
19923       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19924       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19925     ;;
19926   esac
19927 done; }
19928
19929       fi
19930       rm -f $ac_file
19931       mv $tmp/config.h $ac_file
19932     fi
19933   else
19934     cat $tmp/config.h
19935     rm -f $tmp/config.h
19936   fi
19937 done
19938 EOF
19939 cat >>$CONFIG_STATUS <<\EOF
19940 #
19941 # CONFIG_COMMANDS section.
19942 #
19943 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19944   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19945   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19946
19947   case $ac_dest in
19948     default )
19949
19950 for cf_dir in test
19951 do
19952         if test ! -d $srcdir/$cf_dir; then
19953                 continue
19954         elif test -f $srcdir/$cf_dir/programs; then
19955                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19956         fi
19957 done
19958
19959         case $cf_cv_system_name in #(vi
19960         OS/2*|os2*) #(vi
19961         LIB_PREFIX=''
19962         ;;
19963         *)      LIB_PREFIX='lib'
19964         ;;
19965         esac
19966 cf_prefix=$LIB_PREFIX
19967
19968 if test $cf_cv_shlib_version = cygdll ; then
19969         TINFO_NAME=$TINFO_ARG_SUFFIX
19970         TINFO_SUFFIX=.dll
19971 fi
19972
19973 for cf_dir in $SRC_SUBDIRS
19974 do
19975         if test ! -d $srcdir/$cf_dir ; then
19976                 continue
19977         elif test -f $srcdir/$cf_dir/modules; then
19978
19979                 SHARED_LIB=
19980                 LIBS_TO_MAKE=
19981                 for cf_item in $cf_LIST_MODELS
19982                 do
19983
19984         case $cf_item in #(vi
19985         libtool) #(vi
19986                 cf_suffix='.la'
19987                 cf_depsuf=$cf_suffix
19988                 ;;
19989         normal) #(vi
19990                 cf_suffix='.a'
19991                 cf_depsuf=$cf_suffix
19992                 ;;
19993         debug) #(vi
19994                 cf_suffix='_g.a'
19995                 cf_depsuf=$cf_suffix
19996                 ;;
19997         profile) #(vi
19998                 cf_suffix='_p.a'
19999                 cf_depsuf=$cf_suffix
20000                 ;;
20001         shared) #(vi
20002                 case $cf_cv_system_name in
20003                 aix[56]*) #(vi
20004                         cf_suffix='.a'
20005                         cf_depsuf=$cf_suffix
20006                         ;;
20007                 cygwin*) #(vi
20008                         cf_suffix='.dll'
20009                         cf_depsuf='.dll.a'
20010                         ;;
20011                 darwin*) #(vi
20012                         cf_suffix='.dylib'
20013                         cf_depsuf=$cf_suffix
20014                         ;;
20015                 hpux*) #(vi
20016                         case $target in
20017                         ia64*) #(vi
20018                                 cf_suffix='.so'
20019                                 cf_depsuf=$cf_suffix
20020                                 ;;
20021                         *) #(vi
20022                                 cf_suffix='.sl'
20023                                 cf_depsuf=$cf_suffix
20024                                 ;;
20025                         esac
20026                         ;;
20027                 *)      cf_suffix='.so'
20028                         cf_depsuf=$cf_suffix
20029                         ;;
20030                 esac
20031         esac
20032         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20033         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20034
20035                         if test $cf_item = shared ; then
20036                         if test "$cf_cv_do_symlinks" = yes ; then
20037                                 case "$cf_cv_shlib_version" in #(vi
20038                                 rel) #(vi
20039                                         case "$cf_cv_system_name" in #(vi
20040                                         darwin*)
20041                                         case .${LIB_SUFFIX} in
20042                                         .w*)
20043                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20044                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20045                                                 ;;
20046                                         *)
20047                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20048                                                 ;;
20049                                         esac
20050                                         ;; #(vi
20051                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20052                                         esac
20053                                         ;;
20054                                 abi)
20055                                         case "$cf_cv_system_name" in #(vi
20056                                         darwin*)
20057                                         case .${LIB_SUFFIX} in
20058                                         .w*)
20059                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20060                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20061                                                 ;;
20062                                         *)
20063                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20064                                                 ;;
20065                                         esac
20066                                         ;; #(vi
20067                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20068                                         esac
20069                                         ;;
20070                                 esac
20071                         fi
20072                         # cygwin needs import library, and has unique naming convention
20073                         # use autodetected ${cf_prefix} for import lib and static lib, but
20074                         # use 'cyg' prefix for shared lib.
20075                         if test $cf_cv_shlib_version = cygdll ; then
20076                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20077                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20078                                 continue
20079                         fi
20080                         fi
20081                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20082                 done
20083
20084                 if test $cf_dir = ncurses ; then
20085                         cf_subsets="$LIB_SUBSETS"
20086                         cf_r_parts="$cf_subsets"
20087                         cf_liblist="$LIBS_TO_MAKE"
20088
20089                         while test -n "$cf_r_parts"
20090                         do
20091                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20092                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20093                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20094                                         cf_item=
20095                                         case $cf_l_parts in #(vi
20096                                         *termlib*) #(vi
20097                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20098                                                 ;;
20099                                         *ticlib*)
20100                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20101                                                 ;;
20102                                         *)
20103                                                 break
20104                                                 ;;
20105                                         esac
20106                                         if test -n "$cf_item"; then
20107                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20108                                         fi
20109                                 else
20110                                         break
20111                                 fi
20112                         done
20113                 else
20114                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20115                 fi
20116
20117                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20118                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20119                         $cf_dir/Makefile >$cf_dir/Makefile.out
20120                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20121
20122                 $AWK -f $srcdir/mk-0th.awk \
20123                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20124                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20125
20126                 for cf_subset in $cf_subsets
20127                 do
20128                         cf_subdirs=
20129                         for cf_item in $cf_LIST_MODELS
20130                         do
20131                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20132
20133 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20134
20135         case $cf_item in #(vi
20136         libtool) #(vi
20137                 cf_suffix='.la'
20138                 cf_depsuf=$cf_suffix
20139                 ;;
20140         normal) #(vi
20141                 cf_suffix='.a'
20142                 cf_depsuf=$cf_suffix
20143                 ;;
20144         debug) #(vi
20145                 cf_suffix='_g.a'
20146                 cf_depsuf=$cf_suffix
20147                 ;;
20148         profile) #(vi
20149                 cf_suffix='_p.a'
20150                 cf_depsuf=$cf_suffix
20151                 ;;
20152         shared) #(vi
20153                 case $cf_cv_system_name in
20154                 aix[56]*) #(vi
20155                         cf_suffix='.a'
20156                         cf_depsuf=$cf_suffix
20157                         ;;
20158                 cygwin*) #(vi
20159                         cf_suffix='.dll'
20160                         cf_depsuf='.dll.a'
20161                         ;;
20162                 darwin*) #(vi
20163                         cf_suffix='.dylib'
20164                         cf_depsuf=$cf_suffix
20165                         ;;
20166                 hpux*) #(vi
20167                         case $target in
20168                         ia64*) #(vi
20169                                 cf_suffix='.so'
20170                                 cf_depsuf=$cf_suffix
20171                                 ;;
20172                         *) #(vi
20173                                 cf_suffix='.sl'
20174                                 cf_depsuf=$cf_suffix
20175                                 ;;
20176                         esac
20177                         ;;
20178                 *)      cf_suffix='.so'
20179                         cf_depsuf=$cf_suffix
20180                         ;;
20181                 esac
20182         esac
20183         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20184         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20185
20186         case $cf_item in
20187         libtool) cf_subdir='obj_lo'  ;;
20188         normal)  cf_subdir='objects' ;;
20189         debug)   cf_subdir='obj_g' ;;
20190         profile) cf_subdir='obj_p' ;;
20191         shared)
20192                 case $cf_cv_system_name in #(vi
20193                 cygwin) #(vi
20194                         cf_subdir='objects' ;;
20195                 *)
20196                         cf_subdir='obj_s' ;;
20197                 esac
20198         esac
20199
20200                         # Test for case where we build libtinfo with a different name.
20201                         cf_libname=$cf_dir
20202                         if test $cf_dir = ncurses ; then
20203                                 case $cf_subset in
20204                                 *base*)
20205                                         cf_libname=${cf_libname}$LIB_SUFFIX
20206                                         ;;
20207                                 *termlib*)
20208                                         cf_libname=$TINFO_LIB_SUFFIX
20209                                         ;;
20210                                 ticlib*)
20211                                         cf_libname=$TICS_LIB_SUFFIX
20212                                         ;;
20213                                 esac
20214                         else
20215                                 cf_libname=${cf_libname}$LIB_SUFFIX
20216                         fi
20217                         if test -n "${DFT_ARG_SUFFIX}" ; then
20218                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20219                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20220                         fi
20221
20222                         # These dependencies really are for development, not
20223                         # builds, but they are useful in porting, too.
20224                         cf_depend="../include/ncurses_cfg.h"
20225                         if test "$srcdir" = "."; then
20226                                 cf_reldir="."
20227                         else
20228                                 cf_reldir="\${srcdir}"
20229                         fi
20230
20231                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20232                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20233                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20234                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20235                         fi
20236
20237                         cf_dir_suffix=
20238                         old_cf_suffix="$cf_suffix"
20239                         if test "$cf_cv_shlib_version_infix" = yes ; then
20240                         if test -n "$LIB_SUFFIX" ; then
20241                                 case $LIB_SUFFIX in
20242                                 w*)
20243                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20244                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20245                                         cf_dir_suffix=w
20246                                         ;;
20247                                 esac
20248                         fi
20249                         fi
20250
20251                         $AWK -f $srcdir/mk-1st.awk \
20252                                 name=${cf_libname}${cf_dir_suffix} \
20253                                 traces=$LIB_TRACING \
20254                                 MODEL=$cf_ITEM \
20255                                 model=$cf_subdir \
20256                                 prefix=$cf_prefix \
20257                                 suffix=$cf_suffix \
20258                                 subset=$cf_subset \
20259                                 SymLink="$LN_S" \
20260                                 TermlibRoot=$TINFO_NAME \
20261                                 TermlibSuffix=$TINFO_SUFFIX \
20262                                 ShlibVer=$cf_cv_shlib_version \
20263                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20264                                 ReLink=${cf_cv_do_relink-no} \
20265                                 DoLinks=$cf_cv_do_symlinks \
20266                                 rmSoLocs=$cf_cv_rm_so_locs \
20267                                 ldconfig="$LDCONFIG" \
20268                                 overwrite=$WITH_OVERWRITE \
20269                                 depend="$cf_depend" \
20270                                 host="$host" \
20271                                 libtool_version="$LIBTOOL_VERSION" \
20272                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20273
20274                         cf_suffix="$old_cf_suffix"
20275
20276                         for cf_subdir2 in $cf_subdirs lib
20277                         do
20278                                 test $cf_subdir = $cf_subdir2 && break
20279                         done
20280                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20281                         $AWK -f $srcdir/mk-2nd.awk \
20282                                 name=$cf_dir \
20283                                 traces=$LIB_TRACING \
20284                                 MODEL=$cf_ITEM \
20285                                 model=$cf_subdir \
20286                                 subset=$cf_subset \
20287                                 srcdir=$srcdir \
20288                                 echo=$WITH_ECHO \
20289                                 crenames=$cf_cv_prog_CC_c_o \
20290                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20291                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20292                         cf_subdirs="$cf_subdirs $cf_subdir"
20293                         done
20294                 done
20295         fi
20296
20297         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20298 done
20299
20300 for cf_dir in $SRC_SUBDIRS
20301 do
20302         if test ! -d $srcdir/$cf_dir ; then
20303                 continue
20304         fi
20305
20306         if test -f $cf_dir/Makefile ; then
20307                 case "$cf_dir" in
20308                 Ada95) #(vi
20309                         echo 'libs \' >> Makefile
20310                         echo 'install.libs \' >> Makefile
20311                         echo 'uninstall.libs ::' >> Makefile
20312                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20313                         ;;
20314                 esac
20315         fi
20316
20317         if test -f $srcdir/$cf_dir/modules; then
20318                 echo >> Makefile
20319                 if test -f $srcdir/$cf_dir/headers; then
20320 cat >> Makefile <<CF_EOF
20321 install.includes \\
20322 uninstall.includes \\
20323 CF_EOF
20324                 fi
20325 if test "$cf_dir" != "c++" ; then
20326 echo 'lint \' >> Makefile
20327 fi
20328 cat >> Makefile <<CF_EOF
20329 libs \\
20330 lintlib \\
20331 install.libs \\
20332 uninstall.libs \\
20333 install.$cf_dir \\
20334 uninstall.$cf_dir ::
20335         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20336 CF_EOF
20337         elif test -f $srcdir/$cf_dir/headers; then
20338 cat >> Makefile <<CF_EOF
20339
20340 libs \\
20341 install.libs \\
20342 uninstall.libs \\
20343 install.includes \\
20344 uninstall.includes ::
20345         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20346 CF_EOF
20347 fi
20348 done
20349
20350 cat >> Makefile <<CF_EOF
20351
20352 install.libs uninstall.libs \\
20353 install.data uninstall.data ::
20354 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20355 CF_EOF
20356
20357 if test "x$cf_with_manpages" = xyes; then
20358 cat >> Makefile <<CF_EOF
20359
20360 install.man \\
20361 uninstall.man ::
20362         cd man && \${MAKE} \${CF_MFLAGS} \$@
20363 CF_EOF
20364 fi
20365
20366 cat >> Makefile <<CF_EOF
20367
20368 distclean ::
20369         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20370         rm -f headers.sh headers.sed mk_shared_lib.sh
20371         rm -f edit_man.* man_alias.*
20372         rm -rf \${DIRS_TO_MAKE}
20373 CF_EOF
20374
20375 # Special case: tack's manpage lives in its own directory.
20376 if test "x$cf_with_manpages" = xyes; then
20377 if test -d tack ; then
20378 if test -f $srcdir/$tack.h; then
20379 cat >> Makefile <<CF_EOF
20380
20381 install.man \\
20382 uninstall.man ::
20383         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20384 CF_EOF
20385 fi
20386 fi
20387 fi
20388
20389 rm -f headers.sed headers.sh
20390
20391 echo creating headers.sh
20392 cat >headers.sh <<CF_EOF
20393 #! /bin/sh
20394 # This shell script is generated by the 'configure' script.  It is invoked in a
20395 # subdirectory of the build tree.  It generates a sed-script in the parent
20396 # directory that is used to adjust includes for header files that reside in a
20397 # subdirectory of /usr/include, etc.
20398 PRG=""
20399 while test \$# != 3
20400 do
20401 PRG="\$PRG \$1"; shift
20402 done
20403 DST=\$1
20404 REF=\$2
20405 SRC=\$3
20406 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
20407 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
20408 echo installing \$SRC in \$DST
20409 CF_EOF
20410
20411 if test $WITH_CURSES_H = yes; then
20412         cat >>headers.sh <<CF_EOF
20413 case \$DST in
20414 /*/include/*)
20415         END=\`basename \$DST\`
20416         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20417         do
20418                 NAME=\`basename \$i\`
20419                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20420         done
20421         ;;
20422 *)
20423         echo "" >> \$TMPSED
20424         ;;
20425 esac
20426 CF_EOF
20427
20428 else
20429         cat >>headers.sh <<CF_EOF
20430 case \$DST in
20431 /*/include/*)
20432         END=\`basename \$DST\`
20433         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20434         do
20435                 NAME=\`basename \$i\`
20436                 if test "\$NAME" = "curses.h"
20437                 then
20438                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20439                         NAME=ncurses.h
20440                 fi
20441                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20442         done
20443         ;;
20444 *)
20445         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20446         ;;
20447 esac
20448 CF_EOF
20449 fi
20450 cat >>headers.sh <<CF_EOF
20451 rm -f \$TMPSRC
20452 sed -f \$TMPSED \$SRC > \$TMPSRC
20453 NAME=\`basename \$SRC\`
20454 CF_EOF
20455 if test $WITH_CURSES_H != yes; then
20456         cat >>headers.sh <<CF_EOF
20457 test "\$NAME" = "curses.h" && NAME=ncurses.h
20458 CF_EOF
20459 fi
20460 cat >>headers.sh <<CF_EOF
20461 # Just in case someone gzip'd manpages, remove the conflicting copy.
20462 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20463
20464 eval \$PRG \$TMPSRC \$DST/\$NAME
20465 rm -f \$TMPSRC \$TMPSED
20466 CF_EOF
20467
20468 chmod 0755 headers.sh
20469
20470 for cf_dir in $SRC_SUBDIRS
20471 do
20472         if test ! -d $srcdir/$cf_dir ; then
20473                 continue
20474         fi
20475
20476         if test -f $srcdir/$cf_dir/headers; then
20477                 $AWK -f $srcdir/mk-hdr.awk \
20478                         subset="$LIB_SUBSETS" \
20479                         compat="$WITH_CURSES_H" \
20480                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20481         fi
20482
20483         if test -f $srcdir/$cf_dir/modules; then
20484                 if test "$cf_dir" != "c++" ; then
20485                         cat >>$cf_dir/Makefile <<"CF_EOF"
20486 depend : ${AUTO_SRC}
20487         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20488
20489 # DO NOT DELETE THIS LINE -- make depend depends on it.
20490 CF_EOF
20491                 fi
20492         fi
20493 done
20494
20495 if test "x$cf_with_ada" != xno ; then
20496 if test -z "$USE_OLD_MAKERULES" ; then
20497         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
20498 fi
20499 fi
20500  ;;
20501   esac
20502 done
20503 EOF
20504
20505 cat >>$CONFIG_STATUS <<\EOF
20506
20507 { (exit 0); exit 0; }
20508 EOF
20509 chmod +x $CONFIG_STATUS
20510 ac_clean_files=$ac_clean_files_save
20511
20512 # configure is writing to config.log, and then calls config.status.
20513 # config.status does its own redirection, appending to config.log.
20514 # Unfortunately, on DOS this fails, as config.log is still kept open
20515 # by configure, so config.status won't be able to write to it; its
20516 # output is simply discarded.  So we exec the FD to /dev/null,
20517 # effectively closing config.log, so it can be properly (re)opened and
20518 # appended to by config.status.  When coming back to configure, we
20519 # need to make the FD available again.
20520 if test "$no_create" != yes; then
20521   ac_cs_success=:
20522   exec 5>/dev/null
20523   $SHELL $CONFIG_STATUS || ac_cs_success=false
20524   exec 5>>config.log
20525   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20526   # would make configure fail if this is the last instruction.
20527   $ac_cs_success || { (exit 1); exit 1; }
20528 fi
20529 ${MAKE-make} preinstall