]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20101128
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.514 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101001.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-tests         suppress build with test-programs
703   --without-curses-h      install curses.h as ncurses.h only
704   --with-pkg-config{=path} enable/disable use of pkg-config
705   --enable-pc-files       generate and install .pc files for pkg-config
706   --enable-mixed-case     tic should assume mixed-case filenames
707   --with-install-prefix   prefixes actual install-location ($DESTDIR)
708 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
709   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
710   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
711   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
712   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
713   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
714   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
715 Options to Specify the Libraries Built/Used:
716   --disable-libtool-version  enable to use libtool's incompatible naming scheme
717   --with-libtool          generate libraries with libtool
718   --with-shared           generate shared-libraries
719   --with-normal           generate normal-libraries (default)
720   --with-debug            generate debug-libraries (default)
721   --with-profile          generate profile-libraries
722   --with-termlib          generate separate terminfo library
723   --with-ticlib           generate separate tic library
724   --with-gpm              use Alessandro Rubini's GPM library
725   --without-dlsym         do not use dlsym() to load GPM dynamically
726   --with-sysmouse         use sysmouse (FreeBSD console)
727   --enable-rpath          use rpath option when generating shared libraries
728   --disable-relink        relink shared libraries during install
729   --with-shlib-version=X  Specify rel or abi version for shared libs
730   --disable-rpath-hack    don't add rpath options for additional libraries
731 Fine-Tuning Your Configuration:
732   --disable-overwrite     leave out the link to -lcurses
733   --disable-database      do not use terminfo, only fallbacks/termcap
734   --with-database=XXX     specify terminfo source to install
735   --with-hashed-db        specify hashed-database library
736   --with-fallbacks=XXX    specify list of fallback terminal descriptions
737   --without-xterm-new     specify if xterm terminfo should be old version
738   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
739   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
740   --disable-big-core      assume machine has little memory
741   --disable-big-strings   assume compiler has only standard-size strings
742   --enable-termcap        compile in termcap fallback support
743   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
744   --enable-getcap         fast termcap load, no xrefs to terminfo
745   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
746   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
747   --disable-root-environ  restrict environment when running as root
748   --enable-symlinks       make tic use symbolic links not hard links
749   --enable-broken_linker  compile with broken-linker support code
750   --enable-bsdpad         recognize BSD-style prefix padding
751   --enable-widec          compile with wide-char/UTF-8 code
752   --disable-lp64          allow chtype to be long (ignore _LP64)
753   --disable-largefile     omit support for large files
754   --disable-tparm-varargs compile tparm() without varargs interface
755   --disable-tic-depends   link tic library without explicit dependency on ncurses library
756   --with-bool=TYPE        override fallback type of bool variable
757   --with-caps=alt         compile with alternate Caps file
758   --with-chtype=TYPE      override type of chtype
759   --with-ospeed=TYPE      override type of ospeed variable
760   --with-mmask-t=TYPE     override type of mmask_t
761   --with-ccharw-max=XXX   override size CCHARW_MAX
762   --with-rcs-ids          compile-in RCS identifiers
763 Options to Specify How Manpages are Installed:
764   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
765                           optionally formatted/catonly, e.g., gzip,formatted
766   --with-manpage-renames  specify manpage-renaming
767   --with-manpage-aliases  specify manpage-aliases using .so
768   --with-manpage-symlinks specify manpage-aliases using symlinks
769   --with-manpage-tbl      specify manpage processing with tbl
770 Extensions:
771   --disable-ext-funcs     disable function-extensions
772   --enable-sp-funcs       enable experimental SCREEN-extensions
773   --enable-term-driver    enable experimental terminal-driver
774   --enable-const          compile with extra/non-standard const
775   --enable-ext-colors     compile for 256-color support
776   --enable-ext-mouse      compile for extended mouse-encoding
777   --enable-no-padding     compile with $NCURSES_NO_PADDING code
778   --enable-signed-char    compile using signed Boolean's in term.h
779   --enable-sigwinch       compile with SIGWINCH handler
780   --enable-tcap-names     compile with user-definable terminal capabilities
781 Development Code:
782   --without-develop       disable development options
783   --enable-hard-tabs      compile with hard-tabs code
784   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
785 Experimental Code:
786   --disable-assumed-color do not assume anything about default-colors
787   --disable-hashmap       compile without hashmap scrolling-optimization
788   --enable-colorfgbg      compile-in experimental $COLORFGBG code
789   --enable-interop        compile-in experimental interop bindings
790   --with-pthread          use POSIX thread library
791   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
792   --enable-weak-symbols   enable weak-symbols for pthreads
793   --enable-reentrant      compile with experimental reentrant code
794   --with-wrap-prefix=XXX  override prefix used for public variables
795   --enable-safe-sprintf   compile with experimental safe-sprintf code
796   --disable-scroll-hints  compile without scroll-hints code
797   --enable-wgetch-events  compile with experimental wgetch-events code
798 Testing/development Options:
799   --enable-echo           build: display "compiling" commands (default)
800   --enable-warnings       build: turn on GCC compiler warnings
801   --enable-assertions     test: turn on generation of assertion code
802   --with-dmalloc          test: use Gray Watson's dmalloc library
803   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
804   --with-valgrind         test: use valgrind
805   --disable-leaks         test: free permanent memory, analyze leaks
806   --enable-expanded       test: generate functions for certain macros
807   --disable-macros        test: use functions rather than macros
808   --with-trace            test: add trace() function to all models of ncurses
809 Ada95 Binding Options:
810   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
811   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
812   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
813   --with-ada-sharedlib=XX build Ada95 shared-library
814
815 Some influential environment variables:
816   CC          C compiler command
817   CFLAGS      C compiler flags
818   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
819               nonstandard directory <lib dir>
820   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
821               headers in a nonstandard directory <include dir>
822   CPP         C preprocessor
823   CXX         C++ compiler command
824   CXXFLAGS    C++ compiler flags
825   CXXCPP      C++ preprocessor
826
827 Use these variables to override the choices made by `configure' or to help
828 it to find libraries and programs with nonstandard names/locations.
829
830 EOF
831 fi
832
833 if test "$ac_init_help" = "recursive"; then
834   # If there are subdirs, report their specific --help.
835   ac_popdir=`pwd`
836   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
837     cd $ac_subdir
838     # A "../" for each directory in /$ac_subdir.
839     ac_dots=`echo $ac_subdir |
840              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
841
842     case $srcdir in
843     .) # No --srcdir option.  We are building in place.
844       ac_sub_srcdir=$srcdir ;;
845     [\\/]* | ?:[\\/]* ) # Absolute path.
846       ac_sub_srcdir=$srcdir/$ac_subdir ;;
847     *) # Relative path.
848       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
849     esac
850
851     # Check for guested configure; otherwise get Cygnus style configure.
852     if test -f $ac_sub_srcdir/configure.gnu; then
853       echo
854       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
855     elif test -f $ac_sub_srcdir/configure; then
856       echo
857       $SHELL $ac_sub_srcdir/configure  --help=recursive
858     elif test -f $ac_sub_srcdir/configure.ac ||
859            test -f $ac_sub_srcdir/configure.in; then
860       echo
861       $ac_configure --help
862     else
863       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
864     fi
865     cd $ac_popdir
866   done
867 fi
868
869 test -n "$ac_init_help" && exit 0
870 if $ac_init_version; then
871   cat <<\EOF
872
873 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
874 Free Software Foundation, Inc.
875 This configure script is free software; the Free Software Foundation
876 gives unlimited permission to copy, distribute and modify it.
877 EOF
878   exit 0
879 fi
880 exec 5>config.log
881 cat >&5 <<EOF
882 This file contains any messages produced by compilers while
883 running configure, to aid debugging if configure makes a mistake.
884
885 It was created by $as_me, which was
886 generated by GNU Autoconf 2.52.20101001.  Invocation command line was
887
888   $ $0 $@
889
890 EOF
891 {
892 cat <<_ASUNAME
893 ## ---------- ##
894 ## Platform.  ##
895 ## ---------- ##
896
897 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
898 uname -m = `(uname -m) 2>/dev/null || echo unknown`
899 uname -r = `(uname -r) 2>/dev/null || echo unknown`
900 uname -s = `(uname -s) 2>/dev/null || echo unknown`
901 uname -v = `(uname -v) 2>/dev/null || echo unknown`
902
903 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
904 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
905
906 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
907 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
908 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
909 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
910 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
911 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
912 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
913
914 PATH = $PATH
915
916 _ASUNAME
917 } >&5
918
919 cat >&5 <<EOF
920 ## ------------ ##
921 ## Core tests.  ##
922 ## ------------ ##
923
924 EOF
925
926 # Keep a trace of the command line.
927 # Strip out --no-create and --no-recursion so they do not pile up.
928 # Also quote any args containing shell meta-characters.
929 ac_configure_args=
930 ac_sep=
931 for ac_arg
932 do
933   case $ac_arg in
934   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
935   | --no-cr | --no-c) ;;
936   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
937   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
938   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
939     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
940     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
941     ac_sep=" " ;;
942   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
943      ac_sep=" " ;;
944   esac
945   # Get rid of the leading space.
946 done
947
948 # When interrupted or exit'd, cleanup temporary files, and complete
949 # config.log.  We remove comments because anyway the quotes in there
950 # would cause problems or look ugly.
951 trap 'exit_status=$?
952   # Save into config.log some information that might help in debugging.
953   echo >&5
954   echo "## ----------------- ##" >&5
955   echo "## Cache variables.  ##" >&5
956   echo "## ----------------- ##" >&5
957   echo >&5
958   # The following way of writing the cache mishandles newlines in values,
959 {
960   (set) 2>&1 |
961     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
962     *ac_space=\ *)
963       sed -n \
964         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
965           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
966       ;;
967     *)
968       sed -n \
969         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
970       ;;
971     esac;
972 } >&5
973   sed "/^$/d" confdefs.h >conftest.log
974   if test -s conftest.log; then
975     echo >&5
976     echo "## ------------ ##" >&5
977     echo "## confdefs.h.  ##" >&5
978     echo "## ------------ ##" >&5
979     echo >&5
980     cat conftest.log >&5
981   fi
982   (echo; echo) >&5
983   test "$ac_signal" != 0 &&
984     echo "$as_me: caught signal $ac_signal" >&5
985   echo "$as_me: exit $exit_status" >&5
986   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
987     exit $exit_status
988      ' 0
989 for ac_signal in 1 2 13 15; do
990   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
991 done
992 ac_signal=0
993
994 # confdefs.h avoids OS command line length limits that DEFS can exceed.
995 rm -rf conftest* confdefs.h
996 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
997 echo >confdefs.h
998
999 # Let the site file select an alternate cache file if it wants to.
1000 # Prefer explicitly selected file to automatically selected ones.
1001 if test -z "$CONFIG_SITE"; then
1002   if test "x$prefix" != xNONE; then
1003     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1004   else
1005     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1006   fi
1007 fi
1008 for ac_site_file in $CONFIG_SITE; do
1009   if test -r "$ac_site_file"; then
1010     { echo "$as_me:1010: loading site script $ac_site_file" >&5
1011 echo "$as_me: loading site script $ac_site_file" >&6;}
1012     cat "$ac_site_file" >&5
1013     . "$ac_site_file"
1014   fi
1015 done
1016
1017 if test -r "$cache_file"; then
1018   # Some versions of bash will fail to source /dev/null (special
1019   # files actually), so we avoid doing that.
1020   if test -f "$cache_file"; then
1021     { echo "$as_me:1021: loading cache $cache_file" >&5
1022 echo "$as_me: loading cache $cache_file" >&6;}
1023     case $cache_file in
1024       [\\/]* | ?:[\\/]* ) . $cache_file;;
1025       *)                      . ./$cache_file;;
1026     esac
1027   fi
1028 else
1029   { echo "$as_me:1029: creating cache $cache_file" >&5
1030 echo "$as_me: creating cache $cache_file" >&6;}
1031   >$cache_file
1032 fi
1033
1034 # Check that the precious variables saved in the cache have kept the same
1035 # value.
1036 ac_cache_corrupted=false
1037 for ac_var in `(set) 2>&1 |
1038                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1039   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1040   eval ac_new_set=\$ac_env_${ac_var}_set
1041   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1042   eval ac_new_val="\$ac_env_${ac_var}_value"
1043   case $ac_old_set,$ac_new_set in
1044     set,)
1045       { echo "$as_me:1045: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1046 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1047       ac_cache_corrupted=: ;;
1048     ,set)
1049       { echo "$as_me:1049: error: \`$ac_var' was not set in the previous run" >&5
1050 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1051       ac_cache_corrupted=: ;;
1052     ,);;
1053     *)
1054       if test "x$ac_old_val" != "x$ac_new_val"; then
1055         { echo "$as_me:1055: error: \`$ac_var' has changed since the previous run:" >&5
1056 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1057         { echo "$as_me:1057:   former value:  $ac_old_val" >&5
1058 echo "$as_me:   former value:  $ac_old_val" >&2;}
1059         { echo "$as_me:1059:   current value: $ac_new_val" >&5
1060 echo "$as_me:   current value: $ac_new_val" >&2;}
1061         ac_cache_corrupted=:
1062       fi;;
1063   esac
1064   # Pass precious variables to config.status.  It doesn't matter if
1065   # we pass some twice (in addition to the command line arguments).
1066   if test "$ac_new_set" = set; then
1067     case $ac_new_val in
1068     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1069       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1070       ac_configure_args="$ac_configure_args '$ac_arg'"
1071       ;;
1072     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1073        ;;
1074     esac
1075   fi
1076 done
1077 if $ac_cache_corrupted; then
1078   { echo "$as_me:1078: error: changes in the environment can compromise the build" >&5
1079 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1080   { { echo "$as_me:1080: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1081 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1082    { (exit 1); exit 1; }; }
1083 fi
1084
1085 ac_ext=c
1086 ac_cpp='$CPP $CPPFLAGS'
1087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1090 ac_main_return=return
1091
1092 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1093   *c*,-n*) ECHO_N= ECHO_C='
1094 ' ECHO_T='      ' ;;
1095   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1096   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1097 esac
1098 echo "#! $SHELL" >conftest.sh
1099 echo  "exit 0"   >>conftest.sh
1100 chmod +x conftest.sh
1101 if { (echo "$as_me:1101: PATH=\".;.\"; conftest.sh") >&5
1102   (PATH=".;."; conftest.sh) 2>&5
1103   ac_status=$?
1104   echo "$as_me:1104: \$? = $ac_status" >&5
1105   (exit $ac_status); }; then
1106   ac_path_separator=';'
1107 else
1108   ac_path_separator=:
1109 fi
1110 PATH_SEPARATOR="$ac_path_separator"
1111 rm -f conftest.sh
1112
1113 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1114
1115 top_builddir=`pwd`
1116
1117 echo "$as_me:1117: checking for egrep" >&5
1118 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1119 if test "${ac_cv_prog_egrep+set}" = set; then
1120   echo $ECHO_N "(cached) $ECHO_C" >&6
1121 else
1122   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1123     then ac_cv_prog_egrep='grep -E'
1124     else ac_cv_prog_egrep='egrep'
1125     fi
1126 fi
1127 echo "$as_me:1127: result: $ac_cv_prog_egrep" >&5
1128 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1129  EGREP=$ac_cv_prog_egrep
1130
1131 test -z "$EGREP" && { { echo "$as_me:1131: error: No egrep program found" >&5
1132 echo "$as_me: error: No egrep program found" >&2;}
1133    { (exit 1); exit 1; }; }
1134
1135 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1138 cf_cv_abi_version=${NCURSES_MAJOR}
1139 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1140 cf_cv_timestamp=`date`
1141 echo "$as_me:1141: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1142 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1143
1144 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1145
1146 # Check whether --with-rel-version or --without-rel-version was given.
1147 if test "${with_rel_version+set}" = set; then
1148   withval="$with_rel_version"
1149   { echo "$as_me:1149: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1150 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1151  cf_cv_rel_version=$withval
1152 fi;
1153
1154  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1155  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1156
1157 if test -n "$NCURSES_MAJOR" ; then
1158   case $NCURSES_MAJOR in #(vi
1159   [0-9]*) #(vi
1160         ;;
1161   *)
1162         { { echo "$as_me:1162: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1163 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1164    { (exit 1); exit 1; }; }
1165         ;;
1166   esac
1167 else
1168   { { echo "$as_me:1168: error: Release major-version value is empty" >&5
1169 echo "$as_me: error: Release major-version value is empty" >&2;}
1170    { (exit 1); exit 1; }; }
1171 fi
1172
1173 if test -n "$NCURSES_MINOR" ; then
1174   case $NCURSES_MINOR in #(vi
1175   [0-9]*) #(vi
1176         ;;
1177   *)
1178         { { echo "$as_me:1178: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1179 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1180    { (exit 1); exit 1; }; }
1181         ;;
1182   esac
1183 else
1184   { { echo "$as_me:1184: error: Release minor-version value is empty" >&5
1185 echo "$as_me: error: Release minor-version value is empty" >&2;}
1186    { (exit 1); exit 1; }; }
1187 fi
1188
1189 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1190
1191 # Check whether --with-abi-version or --without-abi-version was given.
1192 if test "${with_abi_version+set}" = set; then
1193   withval="$with_abi_version"
1194   { echo "$as_me:1194: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1195 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1196  cf_cv_abi_version=$withval
1197 fi;
1198
1199 if test -n "$cf_cv_abi_version" ; then
1200   case $cf_cv_abi_version in #(vi
1201   [0-9]*) #(vi
1202         ;;
1203   *)
1204         { { echo "$as_me:1204: error: ABI version is not a number: $cf_cv_abi_version" >&5
1205 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1206    { (exit 1); exit 1; }; }
1207         ;;
1208   esac
1209 else
1210   { { echo "$as_me:1210: error: ABI version value is empty" >&5
1211 echo "$as_me: error: ABI version value is empty" >&2;}
1212    { (exit 1); exit 1; }; }
1213 fi
1214
1215 ac_aux_dir=
1216 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1217   if test -f $ac_dir/install-sh; then
1218     ac_aux_dir=$ac_dir
1219     ac_install_sh="$ac_aux_dir/install-sh -c"
1220     break
1221   elif test -f $ac_dir/install.sh; then
1222     ac_aux_dir=$ac_dir
1223     ac_install_sh="$ac_aux_dir/install.sh -c"
1224     break
1225   elif test -f $ac_dir/shtool; then
1226     ac_aux_dir=$ac_dir
1227     ac_install_sh="$ac_aux_dir/shtool install -c"
1228     break
1229   fi
1230 done
1231 if test -z "$ac_aux_dir"; then
1232   { { echo "$as_me:1232: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1233 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1234    { (exit 1); exit 1; }; }
1235 fi
1236 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1237 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1238 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1239
1240 # Make sure we can run config.sub.
1241 $ac_config_sub sun4 >/dev/null 2>&1 ||
1242   { { echo "$as_me:1242: error: cannot run $ac_config_sub" >&5
1243 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1244    { (exit 1); exit 1; }; }
1245
1246 echo "$as_me:1246: checking build system type" >&5
1247 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1248 if test "${ac_cv_build+set}" = set; then
1249   echo $ECHO_N "(cached) $ECHO_C" >&6
1250 else
1251   ac_cv_build_alias=$build_alias
1252 test -z "$ac_cv_build_alias" &&
1253   ac_cv_build_alias=`$ac_config_guess`
1254 test -z "$ac_cv_build_alias" &&
1255   { { echo "$as_me:1255: error: cannot guess build type; you must specify one" >&5
1256 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1257    { (exit 1); exit 1; }; }
1258 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1259   { { echo "$as_me:1259: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1260 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1261    { (exit 1); exit 1; }; }
1262
1263 fi
1264 echo "$as_me:1264: result: $ac_cv_build" >&5
1265 echo "${ECHO_T}$ac_cv_build" >&6
1266 build=$ac_cv_build
1267 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270
1271 echo "$as_me:1271: checking host system type" >&5
1272 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1273 if test "${ac_cv_host+set}" = set; then
1274   echo $ECHO_N "(cached) $ECHO_C" >&6
1275 else
1276   ac_cv_host_alias=$host_alias
1277 test -z "$ac_cv_host_alias" &&
1278   ac_cv_host_alias=$ac_cv_build_alias
1279 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1280   { { echo "$as_me:1280: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1281 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1282    { (exit 1); exit 1; }; }
1283
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_host" >&5
1286 echo "${ECHO_T}$ac_cv_host" >&6
1287 host=$ac_cv_host
1288 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1289 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1290 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1291
1292 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1293         echo "$as_me:1293: checking target system type" >&5
1294 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1295 if test "${ac_cv_target+set}" = set; then
1296   echo $ECHO_N "(cached) $ECHO_C" >&6
1297 else
1298   ac_cv_target_alias=$target_alias
1299 test "x$ac_cv_target_alias" = "x" &&
1300   ac_cv_target_alias=$ac_cv_host_alias
1301 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1302   { { echo "$as_me:1302: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1303 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1304    { (exit 1); exit 1; }; }
1305
1306 fi
1307 echo "$as_me:1307: result: $ac_cv_target" >&5
1308 echo "${ECHO_T}$ac_cv_target" >&6
1309 target=$ac_cv_target
1310 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1311 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1312 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1313
1314 # The aliases save the names the user supplied, while $host etc.
1315 # will get canonicalized.
1316 test -n "$target_alias" &&
1317   test "$program_prefix$program_suffix$program_transform_name" = \
1318     NONENONEs,x,x, &&
1319   program_prefix=${target_alias}-
1320         system_name="$host_os"
1321 else
1322         system_name="`(uname -s -r) 2>/dev/null`"
1323         if test -z "$system_name" ; then
1324                 system_name="`(hostname) 2>/dev/null`"
1325         fi
1326 fi
1327 test -n "$system_name" && cat >>confdefs.h <<EOF
1328 #define SYSTEM_NAME "$system_name"
1329 EOF
1330
1331 if test "${cf_cv_system_name+set}" = set; then
1332   echo $ECHO_N "(cached) $ECHO_C" >&6
1333 else
1334   cf_cv_system_name="$system_name"
1335 fi
1336
1337 test -z "$system_name" && system_name="$cf_cv_system_name"
1338 test -n "$cf_cv_system_name" && echo "$as_me:1338: result: Configuring for $cf_cv_system_name" >&5
1339 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1340
1341 if test ".$system_name" != ".$cf_cv_system_name" ; then
1342         echo "$as_me:1342: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1343 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1344         { { echo "$as_me:1344: error: \"Please remove config.cache and try again.\"" >&5
1345 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # Check whether --with-system-type or --without-system-type was given.
1350 if test "${with_system_type+set}" = set; then
1351   withval="$with_system_type"
1352   { echo "$as_me:1352: WARNING: overriding system type to $withval" >&5
1353 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1354  cf_cv_system_name=$withval
1355 fi;
1356
1357 ###     Save the given $CFLAGS to allow user-override.
1358 cf_user_CFLAGS="$CFLAGS"
1359
1360 ###     Default install-location
1361
1362 echo "$as_me:1362: checking for prefix" >&5
1363 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1364 if test "x$prefix" = "xNONE" ; then
1365         case "$cf_cv_system_name" in
1366                 # non-vendor systems don't have a conflict
1367         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1368                 prefix=/usr
1369                 ;;
1370         *)      prefix=$ac_default_prefix
1371                 ;;
1372         esac
1373 fi
1374 echo "$as_me:1374: result: $prefix" >&5
1375 echo "${ECHO_T}$prefix" >&6
1376
1377 if test "x$prefix" = "xNONE" ; then
1378 echo "$as_me:1378: checking for default include-directory" >&5
1379 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1380 test -n "$verbose" && echo 1>&6
1381 for cf_symbol in \
1382         $includedir \
1383         $includedir/ncurses \
1384         $prefix/include \
1385         $prefix/include/ncurses \
1386         /usr/local/include \
1387         /usr/local/include/ncurses \
1388         /usr/include \
1389         /usr/include/ncurses
1390 do
1391         cf_dir=`eval echo $cf_symbol`
1392         if test -f $cf_dir/curses.h ; then
1393         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1394                 includedir="$cf_symbol"
1395                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1396                 break
1397         fi
1398         fi
1399         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1400 done
1401 echo "$as_me:1401: result: $includedir" >&5
1402 echo "${ECHO_T}$includedir" >&6
1403 fi
1404
1405 ###     Checks for programs.
1406 ac_ext=c
1407 ac_cpp='$CPP $CPPFLAGS'
1408 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1409 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1410 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1411 ac_main_return=return
1412 if test -n "$ac_tool_prefix"; then
1413   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1414 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1415 echo "$as_me:1415: checking for $ac_word" >&5
1416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1417 if test "${ac_cv_prog_CC+set}" = set; then
1418   echo $ECHO_N "(cached) $ECHO_C" >&6
1419 else
1420   if test -n "$CC"; then
1421   ac_cv_prog_CC="$CC" # Let the user override the test.
1422 else
1423   ac_save_IFS=$IFS; IFS=$ac_path_separator
1424 ac_dummy="$PATH"
1425 for ac_dir in $ac_dummy; do
1426   IFS=$ac_save_IFS
1427   test -z "$ac_dir" && ac_dir=.
1428   $as_executable_p "$ac_dir/$ac_word" || continue
1429 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1430 echo "$as_me:1430: found $ac_dir/$ac_word" >&5
1431 break
1432 done
1433
1434 fi
1435 fi
1436 CC=$ac_cv_prog_CC
1437 if test -n "$CC"; then
1438   echo "$as_me:1438: result: $CC" >&5
1439 echo "${ECHO_T}$CC" >&6
1440 else
1441   echo "$as_me:1441: result: no" >&5
1442 echo "${ECHO_T}no" >&6
1443 fi
1444
1445 fi
1446 if test -z "$ac_cv_prog_CC"; then
1447   ac_ct_CC=$CC
1448   # Extract the first word of "gcc", so it can be a program name with args.
1449 set dummy gcc; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$ac_ct_CC"; then
1456   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_ac_ct_CC="gcc"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1472 if test -n "$ac_ct_CC"; then
1473   echo "$as_me:1473: result: $ac_ct_CC" >&5
1474 echo "${ECHO_T}$ac_ct_CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480   CC=$ac_ct_CC
1481 else
1482   CC="$ac_cv_prog_CC"
1483 fi
1484
1485 if test -z "$CC"; then
1486   if test -n "$ac_tool_prefix"; then
1487   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1488 set dummy ${ac_tool_prefix}cc; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$CC"; then
1495   ac_cv_prog_CC="$CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_CC="${ac_tool_prefix}cc"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 CC=$ac_cv_prog_CC
1511 if test -n "$CC"; then
1512   echo "$as_me:1512: result: $CC" >&5
1513 echo "${ECHO_T}$CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519 fi
1520 if test -z "$ac_cv_prog_CC"; then
1521   ac_ct_CC=$CC
1522   # Extract the first word of "cc", so it can be a program name with args.
1523 set dummy cc; ac_word=$2
1524 echo "$as_me:1524: checking for $ac_word" >&5
1525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1526 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   if test -n "$ac_ct_CC"; then
1530   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1531 else
1532   ac_save_IFS=$IFS; IFS=$ac_path_separator
1533 ac_dummy="$PATH"
1534 for ac_dir in $ac_dummy; do
1535   IFS=$ac_save_IFS
1536   test -z "$ac_dir" && ac_dir=.
1537   $as_executable_p "$ac_dir/$ac_word" || continue
1538 ac_cv_prog_ac_ct_CC="cc"
1539 echo "$as_me:1539: found $ac_dir/$ac_word" >&5
1540 break
1541 done
1542
1543 fi
1544 fi
1545 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1546 if test -n "$ac_ct_CC"; then
1547   echo "$as_me:1547: result: $ac_ct_CC" >&5
1548 echo "${ECHO_T}$ac_ct_CC" >&6
1549 else
1550   echo "$as_me:1550: result: no" >&5
1551 echo "${ECHO_T}no" >&6
1552 fi
1553
1554   CC=$ac_ct_CC
1555 else
1556   CC="$ac_cv_prog_CC"
1557 fi
1558
1559 fi
1560 if test -z "$CC"; then
1561   # Extract the first word of "cc", so it can be a program name with args.
1562 set dummy cc; ac_word=$2
1563 echo "$as_me:1563: checking for $ac_word" >&5
1564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1565 if test "${ac_cv_prog_CC+set}" = set; then
1566   echo $ECHO_N "(cached) $ECHO_C" >&6
1567 else
1568   if test -n "$CC"; then
1569   ac_cv_prog_CC="$CC" # Let the user override the test.
1570 else
1571   ac_prog_rejected=no
1572   ac_save_IFS=$IFS; IFS=$ac_path_separator
1573 ac_dummy="$PATH"
1574 for ac_dir in $ac_dummy; do
1575   IFS=$ac_save_IFS
1576   test -z "$ac_dir" && ac_dir=.
1577   $as_executable_p "$ac_dir/$ac_word" || continue
1578 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1579   ac_prog_rejected=yes
1580   continue
1581 fi
1582 ac_cv_prog_CC="cc"
1583 echo "$as_me:1583: found $ac_dir/$ac_word" >&5
1584 break
1585 done
1586
1587 if test $ac_prog_rejected = yes; then
1588   # We found a bogon in the path, so make sure we never use it.
1589   set dummy $ac_cv_prog_CC
1590   shift
1591   if test $# != 0; then
1592     # We chose a different compiler from the bogus one.
1593     # However, it has the same basename, so the bogon will be chosen
1594     # first if we set CC to just the basename; use the full file name.
1595     shift
1596     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1597     shift
1598     ac_cv_prog_CC="$@"
1599   fi
1600 fi
1601 fi
1602 fi
1603 CC=$ac_cv_prog_CC
1604 if test -n "$CC"; then
1605   echo "$as_me:1605: result: $CC" >&5
1606 echo "${ECHO_T}$CC" >&6
1607 else
1608   echo "$as_me:1608: result: no" >&5
1609 echo "${ECHO_T}no" >&6
1610 fi
1611
1612 fi
1613 if test -z "$CC"; then
1614   if test -n "$ac_tool_prefix"; then
1615   for ac_prog in cl
1616   do
1617     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1619 echo "$as_me:1619: checking for $ac_word" >&5
1620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1621 if test "${ac_cv_prog_CC+set}" = set; then
1622   echo $ECHO_N "(cached) $ECHO_C" >&6
1623 else
1624   if test -n "$CC"; then
1625   ac_cv_prog_CC="$CC" # Let the user override the test.
1626 else
1627   ac_save_IFS=$IFS; IFS=$ac_path_separator
1628 ac_dummy="$PATH"
1629 for ac_dir in $ac_dummy; do
1630   IFS=$ac_save_IFS
1631   test -z "$ac_dir" && ac_dir=.
1632   $as_executable_p "$ac_dir/$ac_word" || continue
1633 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1634 echo "$as_me:1634: found $ac_dir/$ac_word" >&5
1635 break
1636 done
1637
1638 fi
1639 fi
1640 CC=$ac_cv_prog_CC
1641 if test -n "$CC"; then
1642   echo "$as_me:1642: result: $CC" >&5
1643 echo "${ECHO_T}$CC" >&6
1644 else
1645   echo "$as_me:1645: result: no" >&5
1646 echo "${ECHO_T}no" >&6
1647 fi
1648
1649     test -n "$CC" && break
1650   done
1651 fi
1652 if test -z "$CC"; then
1653   ac_ct_CC=$CC
1654   for ac_prog in cl
1655 do
1656   # Extract the first word of "$ac_prog", so it can be a program name with args.
1657 set dummy $ac_prog; ac_word=$2
1658 echo "$as_me:1658: checking for $ac_word" >&5
1659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1660 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1661   echo $ECHO_N "(cached) $ECHO_C" >&6
1662 else
1663   if test -n "$ac_ct_CC"; then
1664   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1665 else
1666   ac_save_IFS=$IFS; IFS=$ac_path_separator
1667 ac_dummy="$PATH"
1668 for ac_dir in $ac_dummy; do
1669   IFS=$ac_save_IFS
1670   test -z "$ac_dir" && ac_dir=.
1671   $as_executable_p "$ac_dir/$ac_word" || continue
1672 ac_cv_prog_ac_ct_CC="$ac_prog"
1673 echo "$as_me:1673: found $ac_dir/$ac_word" >&5
1674 break
1675 done
1676
1677 fi
1678 fi
1679 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1680 if test -n "$ac_ct_CC"; then
1681   echo "$as_me:1681: result: $ac_ct_CC" >&5
1682 echo "${ECHO_T}$ac_ct_CC" >&6
1683 else
1684   echo "$as_me:1684: result: no" >&5
1685 echo "${ECHO_T}no" >&6
1686 fi
1687
1688   test -n "$ac_ct_CC" && break
1689 done
1690
1691   CC=$ac_ct_CC
1692 fi
1693
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710   (eval $ac_compiler -v </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main ()
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main ()
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main ()
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main ()
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main ()
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main ()
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 ac_ext=c
2115 ac_cpp='$CPP $CPPFLAGS'
2116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2119 ac_main_return=return
2120 echo "$as_me:2120: checking how to run the C preprocessor" >&5
2121 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2122 # On Suns, sometimes $CPP names a directory.
2123 if test -n "$CPP" && test -d "$CPP"; then
2124   CPP=
2125 fi
2126 if test -z "$CPP"; then
2127   if test "${ac_cv_prog_CPP+set}" = set; then
2128   echo $ECHO_N "(cached) $ECHO_C" >&6
2129 else
2130       # Double quotes because CPP needs to be expanded
2131     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2132     do
2133       ac_preproc_ok=false
2134 for ac_c_preproc_warn_flag in '' yes
2135 do
2136   # Use a header file that comes with gcc, so configuring glibc
2137   # with a fresh cross-compiler works.
2138   # On the NeXT, cc -E runs the code through the compiler's parser,
2139   # not just through cpp. "Syntax error" is here to catch this case.
2140   cat >conftest.$ac_ext <<_ACEOF
2141 #line 2141 "configure"
2142 #include "confdefs.h"
2143 #include <assert.h>
2144                      Syntax error
2145 _ACEOF
2146 if { (eval echo "$as_me:2146: \"$ac_cpp conftest.$ac_ext\"") >&5
2147   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2148   ac_status=$?
2149   egrep -v '^ *\+' conftest.er1 >conftest.err
2150   rm -f conftest.er1
2151   cat conftest.err >&5
2152   echo "$as_me:2152: \$? = $ac_status" >&5
2153   (exit $ac_status); } >/dev/null; then
2154   if test -s conftest.err; then
2155     ac_cpp_err=$ac_c_preproc_warn_flag
2156   else
2157     ac_cpp_err=
2158   fi
2159 else
2160   ac_cpp_err=yes
2161 fi
2162 if test -z "$ac_cpp_err"; then
2163   :
2164 else
2165   echo "$as_me: failed program was:" >&5
2166   cat conftest.$ac_ext >&5
2167   # Broken: fails on valid input.
2168 continue
2169 fi
2170 rm -f conftest.err conftest.$ac_ext
2171
2172   # OK, works on sane cases.  Now check whether non-existent headers
2173   # can be detected and how.
2174   cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177 #include <ac_nonexistent.h>
2178 _ACEOF
2179 if { (eval echo "$as_me:2179: \"$ac_cpp conftest.$ac_ext\"") >&5
2180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2181   ac_status=$?
2182   egrep -v '^ *\+' conftest.er1 >conftest.err
2183   rm -f conftest.er1
2184   cat conftest.err >&5
2185   echo "$as_me:2185: \$? = $ac_status" >&5
2186   (exit $ac_status); } >/dev/null; then
2187   if test -s conftest.err; then
2188     ac_cpp_err=$ac_c_preproc_warn_flag
2189   else
2190     ac_cpp_err=
2191   fi
2192 else
2193   ac_cpp_err=yes
2194 fi
2195 if test -z "$ac_cpp_err"; then
2196   # Broken: success on invalid input.
2197 continue
2198 else
2199   echo "$as_me: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201   # Passes both tests.
2202 ac_preproc_ok=:
2203 break
2204 fi
2205 rm -f conftest.err conftest.$ac_ext
2206
2207 done
2208 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2209 rm -f conftest.err conftest.$ac_ext
2210 if $ac_preproc_ok; then
2211   break
2212 fi
2213
2214     done
2215     ac_cv_prog_CPP=$CPP
2216
2217 fi
2218   CPP=$ac_cv_prog_CPP
2219 else
2220   ac_cv_prog_CPP=$CPP
2221 fi
2222 echo "$as_me:2222: result: $CPP" >&5
2223 echo "${ECHO_T}$CPP" >&6
2224 ac_preproc_ok=false
2225 for ac_c_preproc_warn_flag in '' yes
2226 do
2227   # Use a header file that comes with gcc, so configuring glibc
2228   # with a fresh cross-compiler works.
2229   # On the NeXT, cc -E runs the code through the compiler's parser,
2230   # not just through cpp. "Syntax error" is here to catch this case.
2231   cat >conftest.$ac_ext <<_ACEOF
2232 #line 2232 "configure"
2233 #include "confdefs.h"
2234 #include <assert.h>
2235                      Syntax error
2236 _ACEOF
2237 if { (eval echo "$as_me:2237: \"$ac_cpp conftest.$ac_ext\"") >&5
2238   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2239   ac_status=$?
2240   egrep -v '^ *\+' conftest.er1 >conftest.err
2241   rm -f conftest.er1
2242   cat conftest.err >&5
2243   echo "$as_me:2243: \$? = $ac_status" >&5
2244   (exit $ac_status); } >/dev/null; then
2245   if test -s conftest.err; then
2246     ac_cpp_err=$ac_c_preproc_warn_flag
2247   else
2248     ac_cpp_err=
2249   fi
2250 else
2251   ac_cpp_err=yes
2252 fi
2253 if test -z "$ac_cpp_err"; then
2254   :
2255 else
2256   echo "$as_me: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   # Broken: fails on valid input.
2259 continue
2260 fi
2261 rm -f conftest.err conftest.$ac_ext
2262
2263   # OK, works on sane cases.  Now check whether non-existent headers
2264   # can be detected and how.
2265   cat >conftest.$ac_ext <<_ACEOF
2266 #line 2266 "configure"
2267 #include "confdefs.h"
2268 #include <ac_nonexistent.h>
2269 _ACEOF
2270 if { (eval echo "$as_me:2270: \"$ac_cpp conftest.$ac_ext\"") >&5
2271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2272   ac_status=$?
2273   egrep -v '^ *\+' conftest.er1 >conftest.err
2274   rm -f conftest.er1
2275   cat conftest.err >&5
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } >/dev/null; then
2278   if test -s conftest.err; then
2279     ac_cpp_err=$ac_c_preproc_warn_flag
2280   else
2281     ac_cpp_err=
2282   fi
2283 else
2284   ac_cpp_err=yes
2285 fi
2286 if test -z "$ac_cpp_err"; then
2287   # Broken: success on invalid input.
2288 continue
2289 else
2290   echo "$as_me: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   # Passes both tests.
2293 ac_preproc_ok=:
2294 break
2295 fi
2296 rm -f conftest.err conftest.$ac_ext
2297
2298 done
2299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2300 rm -f conftest.err conftest.$ac_ext
2301 if $ac_preproc_ok; then
2302   :
2303 else
2304   { { echo "$as_me:2304: error: C preprocessor \"$CPP\" fails sanity check" >&5
2305 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2306    { (exit 1); exit 1; }; }
2307 fi
2308
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2312 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return=return
2315
2316 if test $ac_cv_c_compiler_gnu = yes; then
2317     echo "$as_me:2317: checking whether $CC needs -traditional" >&5
2318 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2319 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322     ac_pattern="Autoconf.*'x'"
2323   cat >conftest.$ac_ext <<_ACEOF
2324 #line 2324 "configure"
2325 #include "confdefs.h"
2326 #include <sgtty.h>
2327 int Autoconf = TIOCGETP;
2328 _ACEOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330   egrep "$ac_pattern" >/dev/null 2>&1; then
2331   ac_cv_prog_gcc_traditional=yes
2332 else
2333   ac_cv_prog_gcc_traditional=no
2334 fi
2335 rm -rf conftest*
2336
2337   if test $ac_cv_prog_gcc_traditional = no; then
2338     cat >conftest.$ac_ext <<_ACEOF
2339 #line 2339 "configure"
2340 #include "confdefs.h"
2341 #include <termio.h>
2342 int Autoconf = TCGETA;
2343 _ACEOF
2344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2345   egrep "$ac_pattern" >/dev/null 2>&1; then
2346   ac_cv_prog_gcc_traditional=yes
2347 fi
2348 rm -rf conftest*
2349
2350   fi
2351 fi
2352 echo "$as_me:2352: result: $ac_cv_prog_gcc_traditional" >&5
2353 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2354   if test $ac_cv_prog_gcc_traditional = yes; then
2355     CC="$CC -traditional"
2356   fi
2357 fi
2358
2359 echo "$as_me:2359: checking whether $CC understands -c and -o together" >&5
2360 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2361 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2362   echo $ECHO_N "(cached) $ECHO_C" >&6
2363 else
2364
2365 cat > conftest.$ac_ext <<CF_EOF
2366 #include <stdio.h>
2367 int main()
2368 {
2369         ${cf_cv_main_return:-return}(0);
2370 }
2371 CF_EOF
2372 # We do the test twice because some compilers refuse to overwrite an
2373 # existing .o file with -o, though they will create one.
2374 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2375 if { (eval echo "$as_me:2375: \"$ac_try\"") >&5
2376   (eval $ac_try) 2>&5
2377   ac_status=$?
2378   echo "$as_me:2378: \$? = $ac_status" >&5
2379   (exit $ac_status); } &&
2380   test -f conftest2.$ac_objext && { (eval echo "$as_me:2380: \"$ac_try\"") >&5
2381   (eval $ac_try) 2>&5
2382   ac_status=$?
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); };
2385 then
2386   eval cf_cv_prog_CC_c_o=yes
2387 else
2388   eval cf_cv_prog_CC_c_o=no
2389 fi
2390 rm -rf conftest*
2391
2392 fi
2393 if test $cf_cv_prog_CC_c_o = yes; then
2394   echo "$as_me:2394: result: yes" >&5
2395 echo "${ECHO_T}yes" >&6
2396 else
2397   echo "$as_me:2397: result: no" >&5
2398 echo "${ECHO_T}no" >&6
2399 fi
2400
2401 echo "$as_me:2401: checking for POSIXized ISC" >&5
2402 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2403 if test -d /etc/conf/kconfig.d &&
2404    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2405 then
2406   echo "$as_me:2406: result: yes" >&5
2407 echo "${ECHO_T}yes" >&6
2408   ISC=yes # If later tests want to check for ISC.
2409
2410 cat >>confdefs.h <<\EOF
2411 #define _POSIX_SOURCE 1
2412 EOF
2413
2414   if test "$GCC" = yes; then
2415     CC="$CC -posix"
2416   else
2417     CC="$CC -Xp"
2418   fi
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422   ISC=
2423 fi
2424
2425 echo "$as_me:2425: checking for ${CC:-cc} option to accept ANSI C" >&5
2426 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2427 if test "${cf_cv_ansi_cc+set}" = set; then
2428   echo $ECHO_N "(cached) $ECHO_C" >&6
2429 else
2430
2431 cf_cv_ansi_cc=no
2432 cf_save_CFLAGS="$CFLAGS"
2433 cf_save_CPPFLAGS="$CPPFLAGS"
2434 # Don't try gcc -ansi; that turns off useful extensions and
2435 # breaks some systems' header files.
2436 # AIX                   -qlanglvl=ansi
2437 # Ultrix and OSF/1      -std1
2438 # HP-UX                 -Aa -D_HPUX_SOURCE
2439 # SVR4                  -Xc
2440 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2441 for cf_arg in "-DCC_HAS_PROTOS" \
2442         "" \
2443         -qlanglvl=ansi \
2444         -std1 \
2445         -Ae \
2446         "-Aa -D_HPUX_SOURCE" \
2447         -Xc
2448 do
2449
2450 cf_fix_cppflags=no
2451 cf_new_cflags=
2452 cf_new_cppflags=
2453 cf_new_extra_cppflags=
2454
2455 for cf_add_cflags in $cf_arg
2456 do
2457 case $cf_fix_cppflags in
2458 no)
2459         case $cf_add_cflags in #(vi
2460         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2461                 case $cf_add_cflags in
2462                 -D*)
2463                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2464
2465                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2466                                 && test -z "${cf_tst_cflags}" \
2467                                 && cf_fix_cppflags=yes
2468
2469                         if test $cf_fix_cppflags = yes ; then
2470                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2471                                 continue
2472                         elif test "${cf_tst_cflags}" = "\"'" ; then
2473                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2474                                 continue
2475                         fi
2476                         ;;
2477                 esac
2478                 case "$CPPFLAGS" in
2479                 *$cf_add_cflags) #(vi
2480                         ;;
2481                 *) #(vi
2482                         case $cf_add_cflags in #(vi
2483                         -D*)
2484                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2485
2486 CPPFLAGS=`echo "$CPPFLAGS" | \
2487         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2488                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2489
2490                                 ;;
2491                         esac
2492                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2493                         ;;
2494                 esac
2495                 ;;
2496         *)
2497                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2498                 ;;
2499         esac
2500         ;;
2501 yes)
2502         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2503
2504         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2505
2506         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2507                 && test -z "${cf_tst_cflags}" \
2508                 && cf_fix_cppflags=no
2509         ;;
2510 esac
2511 done
2512
2513 if test -n "$cf_new_cflags" ; then
2514
2515         CFLAGS="$CFLAGS $cf_new_cflags"
2516 fi
2517
2518 if test -n "$cf_new_cppflags" ; then
2519
2520         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2521 fi
2522
2523 if test -n "$cf_new_extra_cppflags" ; then
2524
2525         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2526 fi
2527
2528         cat >conftest.$ac_ext <<_ACEOF
2529 #line 2529 "configure"
2530 #include "confdefs.h"
2531
2532 #ifndef CC_HAS_PROTOS
2533 #if !defined(__STDC__) || (__STDC__ != 1)
2534 choke me
2535 #endif
2536 #endif
2537
2538 int
2539 main ()
2540 {
2541
2542         int test (int i, double x);
2543         struct s1 {int (*f) (int a);};
2544         struct s2 {int (*f) (double a);};
2545   ;
2546   return 0;
2547 }
2548 _ACEOF
2549 rm -f conftest.$ac_objext
2550 if { (eval echo "$as_me:2550: \"$ac_compile\"") >&5
2551   (eval $ac_compile) 2>&5
2552   ac_status=$?
2553   echo "$as_me:2553: \$? = $ac_status" >&5
2554   (exit $ac_status); } &&
2555          { ac_try='test -s conftest.$ac_objext'
2556   { (eval echo "$as_me:2556: \"$ac_try\"") >&5
2557   (eval $ac_try) 2>&5
2558   ac_status=$?
2559   echo "$as_me:2559: \$? = $ac_status" >&5
2560   (exit $ac_status); }; }; then
2561   cf_cv_ansi_cc="$cf_arg"; break
2562 else
2563   echo "$as_me: failed program was:" >&5
2564 cat conftest.$ac_ext >&5
2565 fi
2566 rm -f conftest.$ac_objext conftest.$ac_ext
2567 done
2568 CFLAGS="$cf_save_CFLAGS"
2569 CPPFLAGS="$cf_save_CPPFLAGS"
2570
2571 fi
2572 echo "$as_me:2572: result: $cf_cv_ansi_cc" >&5
2573 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2574
2575 if test "$cf_cv_ansi_cc" != "no"; then
2576 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2577
2578 cf_fix_cppflags=no
2579 cf_new_cflags=
2580 cf_new_cppflags=
2581 cf_new_extra_cppflags=
2582
2583 for cf_add_cflags in $cf_cv_ansi_cc
2584 do
2585 case $cf_fix_cppflags in
2586 no)
2587         case $cf_add_cflags in #(vi
2588         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2589                 case $cf_add_cflags in
2590                 -D*)
2591                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2592
2593                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2594                                 && test -z "${cf_tst_cflags}" \
2595                                 && cf_fix_cppflags=yes
2596
2597                         if test $cf_fix_cppflags = yes ; then
2598                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2599                                 continue
2600                         elif test "${cf_tst_cflags}" = "\"'" ; then
2601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2602                                 continue
2603                         fi
2604                         ;;
2605                 esac
2606                 case "$CPPFLAGS" in
2607                 *$cf_add_cflags) #(vi
2608                         ;;
2609                 *) #(vi
2610                         case $cf_add_cflags in #(vi
2611                         -D*)
2612                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2613
2614 CPPFLAGS=`echo "$CPPFLAGS" | \
2615         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2616                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2617
2618                                 ;;
2619                         esac
2620                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2621                         ;;
2622                 esac
2623                 ;;
2624         *)
2625                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2626                 ;;
2627         esac
2628         ;;
2629 yes)
2630         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2631
2632         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2633
2634         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2635                 && test -z "${cf_tst_cflags}" \
2636                 && cf_fix_cppflags=no
2637         ;;
2638 esac
2639 done
2640
2641 if test -n "$cf_new_cflags" ; then
2642
2643         CFLAGS="$CFLAGS $cf_new_cflags"
2644 fi
2645
2646 if test -n "$cf_new_cppflags" ; then
2647
2648         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2649 fi
2650
2651 if test -n "$cf_new_extra_cppflags" ; then
2652
2653         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2654 fi
2655
2656 else
2657         cat >>confdefs.h <<\EOF
2658 #define CC_HAS_PROTOS 1
2659 EOF
2660
2661 fi
2662 fi
2663
2664 if test "$cf_cv_ansi_cc" = "no"; then
2665         { { echo "$as_me:2665: error: Your compiler does not appear to recognize prototypes.
2666 You have the following choices:
2667         a. adjust your compiler options
2668         b. get an up-to-date compiler
2669         c. use a wrapper such as unproto" >&5
2670 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2671 You have the following choices:
2672         a. adjust your compiler options
2673         b. get an up-to-date compiler
2674         c. use a wrapper such as unproto" >&2;}
2675    { (exit 1); exit 1; }; }
2676 fi
2677
2678 case $cf_cv_system_name in
2679 os2*)
2680     CFLAGS="$CFLAGS -Zmt"
2681     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2682     CXXFLAGS="$CXXFLAGS -Zmt"
2683     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2684     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2685     ac_cv_exeext=.exe
2686     ;;
2687 esac
2688
2689 PROG_EXT="$EXEEXT"
2690
2691 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2692 #define PROG_EXT "$PROG_EXT"
2693 EOF
2694
2695 if test "$cross_compiling" = yes ; then
2696   LDCONFIG=:
2697 else
2698 case "$cf_cv_system_name" in #(vi
2699 dragonfly*|freebsd*) #(vi
2700   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2701   ;;
2702 *) LDPATH=$PATH:/sbin:/usr/sbin
2703   # Extract the first word of "ldconfig", so it can be a program name with args.
2704 set dummy ldconfig; ac_word=$2
2705 echo "$as_me:2705: checking for $ac_word" >&5
2706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2707 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2708   echo $ECHO_N "(cached) $ECHO_C" >&6
2709 else
2710   case $LDCONFIG in
2711   [\\/]* | ?:[\\/]*)
2712   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2713   ;;
2714   *)
2715   ac_save_IFS=$IFS; IFS=$ac_path_separator
2716 ac_dummy="$LDPATH"
2717 for ac_dir in $ac_dummy; do
2718   IFS=$ac_save_IFS
2719   test -z "$ac_dir" && ac_dir=.
2720   if $as_executable_p "$ac_dir/$ac_word"; then
2721    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2722    echo "$as_me:2722: found $ac_dir/$ac_word" >&5
2723    break
2724 fi
2725 done
2726
2727   ;;
2728 esac
2729 fi
2730 LDCONFIG=$ac_cv_path_LDCONFIG
2731
2732 if test -n "$LDCONFIG"; then
2733   echo "$as_me:2733: result: $LDCONFIG" >&5
2734 echo "${ECHO_T}$LDCONFIG" >&6
2735 else
2736   echo "$as_me:2736: result: no" >&5
2737 echo "${ECHO_T}no" >&6
2738 fi
2739
2740   ;;
2741 esac
2742 fi
2743
2744 echo "$as_me:2744: checking if you want to ensure bool is consistent with C++" >&5
2745 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2746
2747 # Check whether --with-cxx or --without-cxx was given.
2748 if test "${with_cxx+set}" = set; then
2749   withval="$with_cxx"
2750   cf_with_cxx=$withval
2751 else
2752   cf_with_cxx=yes
2753 fi;
2754 echo "$as_me:2754: result: $cf_with_cxx" >&5
2755 echo "${ECHO_T}$cf_with_cxx" >&6
2756 if test "X$cf_with_cxx" = Xno ; then
2757         CXX=""
2758         GXX=""
2759 else
2760         # with autoconf 2.13, we can change the error to a warning:
2761                 ac_ext=cc
2762 ac_cpp='$CXXCPP $CPPFLAGS'
2763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2766 ac_main_return=return
2767 if test -n "$ac_tool_prefix"; then
2768   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2769   do
2770     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2771 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2772 echo "$as_me:2772: checking for $ac_word" >&5
2773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2774 if test "${ac_cv_prog_CXX+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777   if test -n "$CXX"; then
2778   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2779 else
2780   ac_save_IFS=$IFS; IFS=$ac_path_separator
2781 ac_dummy="$PATH"
2782 for ac_dir in $ac_dummy; do
2783   IFS=$ac_save_IFS
2784   test -z "$ac_dir" && ac_dir=.
2785   $as_executable_p "$ac_dir/$ac_word" || continue
2786 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2787 echo "$as_me:2787: found $ac_dir/$ac_word" >&5
2788 break
2789 done
2790
2791 fi
2792 fi
2793 CXX=$ac_cv_prog_CXX
2794 if test -n "$CXX"; then
2795   echo "$as_me:2795: result: $CXX" >&5
2796 echo "${ECHO_T}$CXX" >&6
2797 else
2798   echo "$as_me:2798: result: no" >&5
2799 echo "${ECHO_T}no" >&6
2800 fi
2801
2802     test -n "$CXX" && break
2803   done
2804 fi
2805 if test -z "$CXX"; then
2806   ac_ct_CXX=$CXX
2807   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2808 do
2809   # Extract the first word of "$ac_prog", so it can be a program name with args.
2810 set dummy $ac_prog; ac_word=$2
2811 echo "$as_me:2811: checking for $ac_word" >&5
2812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2814   echo $ECHO_N "(cached) $ECHO_C" >&6
2815 else
2816   if test -n "$ac_ct_CXX"; then
2817   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2818 else
2819   ac_save_IFS=$IFS; IFS=$ac_path_separator
2820 ac_dummy="$PATH"
2821 for ac_dir in $ac_dummy; do
2822   IFS=$ac_save_IFS
2823   test -z "$ac_dir" && ac_dir=.
2824   $as_executable_p "$ac_dir/$ac_word" || continue
2825 ac_cv_prog_ac_ct_CXX="$ac_prog"
2826 echo "$as_me:2826: found $ac_dir/$ac_word" >&5
2827 break
2828 done
2829
2830 fi
2831 fi
2832 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2833 if test -n "$ac_ct_CXX"; then
2834   echo "$as_me:2834: result: $ac_ct_CXX" >&5
2835 echo "${ECHO_T}$ac_ct_CXX" >&6
2836 else
2837   echo "$as_me:2837: result: no" >&5
2838 echo "${ECHO_T}no" >&6
2839 fi
2840
2841   test -n "$ac_ct_CXX" && break
2842 done
2843 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2844
2845   CXX=$ac_ct_CXX
2846 fi
2847
2848 # Provide some information about the compiler.
2849 echo "$as_me:2849:" \
2850      "checking for C++ compiler version" >&5
2851 ac_compiler=`set X $ac_compile; echo $2`
2852 { (eval echo "$as_me:2852: \"$ac_compiler --version </dev/null >&5\"") >&5
2853   (eval $ac_compiler --version </dev/null >&5) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); }
2857 { (eval echo "$as_me:2857: \"$ac_compiler -v </dev/null >&5\"") >&5
2858   (eval $ac_compiler -v </dev/null >&5) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }
2862 { (eval echo "$as_me:2862: \"$ac_compiler -V </dev/null >&5\"") >&5
2863   (eval $ac_compiler -V </dev/null >&5) 2>&5
2864   ac_status=$?
2865   echo "$as_me:2865: \$? = $ac_status" >&5
2866   (exit $ac_status); }
2867
2868 echo "$as_me:2868: checking whether we are using the GNU C++ compiler" >&5
2869 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2870 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2871   echo $ECHO_N "(cached) $ECHO_C" >&6
2872 else
2873   cat >conftest.$ac_ext <<_ACEOF
2874 #line 2874 "configure"
2875 #include "confdefs.h"
2876
2877 int
2878 main ()
2879 {
2880 #ifndef __GNUC__
2881        choke me
2882 #endif
2883
2884   ;
2885   return 0;
2886 }
2887 _ACEOF
2888 rm -f conftest.$ac_objext
2889 if { (eval echo "$as_me:2889: \"$ac_compile\"") >&5
2890   (eval $ac_compile) 2>&5
2891   ac_status=$?
2892   echo "$as_me:2892: \$? = $ac_status" >&5
2893   (exit $ac_status); } &&
2894          { ac_try='test -s conftest.$ac_objext'
2895   { (eval echo "$as_me:2895: \"$ac_try\"") >&5
2896   (eval $ac_try) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); }; }; then
2900   ac_compiler_gnu=yes
2901 else
2902   echo "$as_me: failed program was:" >&5
2903 cat conftest.$ac_ext >&5
2904 ac_compiler_gnu=no
2905 fi
2906 rm -f conftest.$ac_objext conftest.$ac_ext
2907 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2908
2909 fi
2910 echo "$as_me:2910: result: $ac_cv_cxx_compiler_gnu" >&5
2911 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2912 GXX=`test $ac_compiler_gnu = yes && echo yes`
2913 ac_test_CXXFLAGS=${CXXFLAGS+set}
2914 ac_save_CXXFLAGS=$CXXFLAGS
2915 CXXFLAGS="-g"
2916 echo "$as_me:2916: checking whether $CXX accepts -g" >&5
2917 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2918 if test "${ac_cv_prog_cxx_g+set}" = set; then
2919   echo $ECHO_N "(cached) $ECHO_C" >&6
2920 else
2921   cat >conftest.$ac_ext <<_ACEOF
2922 #line 2922 "configure"
2923 #include "confdefs.h"
2924
2925 int
2926 main ()
2927 {
2928
2929   ;
2930   return 0;
2931 }
2932 _ACEOF
2933 rm -f conftest.$ac_objext
2934 if { (eval echo "$as_me:2934: \"$ac_compile\"") >&5
2935   (eval $ac_compile) 2>&5
2936   ac_status=$?
2937   echo "$as_me:2937: \$? = $ac_status" >&5
2938   (exit $ac_status); } &&
2939          { ac_try='test -s conftest.$ac_objext'
2940   { (eval echo "$as_me:2940: \"$ac_try\"") >&5
2941   (eval $ac_try) 2>&5
2942   ac_status=$?
2943   echo "$as_me:2943: \$? = $ac_status" >&5
2944   (exit $ac_status); }; }; then
2945   ac_cv_prog_cxx_g=yes
2946 else
2947   echo "$as_me: failed program was:" >&5
2948 cat conftest.$ac_ext >&5
2949 ac_cv_prog_cxx_g=no
2950 fi
2951 rm -f conftest.$ac_objext conftest.$ac_ext
2952 fi
2953 echo "$as_me:2953: result: $ac_cv_prog_cxx_g" >&5
2954 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2955 if test "$ac_test_CXXFLAGS" = set; then
2956   CXXFLAGS=$ac_save_CXXFLAGS
2957 elif test $ac_cv_prog_cxx_g = yes; then
2958   if test "$GXX" = yes; then
2959     CXXFLAGS="-g -O2"
2960   else
2961     CXXFLAGS="-g"
2962   fi
2963 else
2964   if test "$GXX" = yes; then
2965     CXXFLAGS="-O2"
2966   else
2967     CXXFLAGS=
2968   fi
2969 fi
2970 for ac_declaration in \
2971    ''\
2972    '#include <stdlib.h>' \
2973    'extern "C" void std::exit (int) throw (); using std::exit;' \
2974    'extern "C" void std::exit (int); using std::exit;' \
2975    'extern "C" void exit (int) throw ();' \
2976    'extern "C" void exit (int);' \
2977    'void exit (int);'
2978 do
2979   cat >conftest.$ac_ext <<_ACEOF
2980 #line 2980 "configure"
2981 #include "confdefs.h"
2982 #include <stdlib.h>
2983 $ac_declaration
2984 int
2985 main ()
2986 {
2987 exit (42);
2988   ;
2989   return 0;
2990 }
2991 _ACEOF
2992 rm -f conftest.$ac_objext
2993 if { (eval echo "$as_me:2993: \"$ac_compile\"") >&5
2994   (eval $ac_compile) 2>&5
2995   ac_status=$?
2996   echo "$as_me:2996: \$? = $ac_status" >&5
2997   (exit $ac_status); } &&
2998          { ac_try='test -s conftest.$ac_objext'
2999   { (eval echo "$as_me:2999: \"$ac_try\"") >&5
3000   (eval $ac_try) 2>&5
3001   ac_status=$?
3002   echo "$as_me:3002: \$? = $ac_status" >&5
3003   (exit $ac_status); }; }; then
3004   :
3005 else
3006   echo "$as_me: failed program was:" >&5
3007 cat conftest.$ac_ext >&5
3008 continue
3009 fi
3010 rm -f conftest.$ac_objext conftest.$ac_ext
3011   cat >conftest.$ac_ext <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 $ac_declaration
3015 int
3016 main ()
3017 {
3018 exit (42);
3019   ;
3020   return 0;
3021 }
3022 _ACEOF
3023 rm -f conftest.$ac_objext
3024 if { (eval echo "$as_me:3024: \"$ac_compile\"") >&5
3025   (eval $ac_compile) 2>&5
3026   ac_status=$?
3027   echo "$as_me:3027: \$? = $ac_status" >&5
3028   (exit $ac_status); } &&
3029          { ac_try='test -s conftest.$ac_objext'
3030   { (eval echo "$as_me:3030: \"$ac_try\"") >&5
3031   (eval $ac_try) 2>&5
3032   ac_status=$?
3033   echo "$as_me:3033: \$? = $ac_status" >&5
3034   (exit $ac_status); }; }; then
3035   break
3036 else
3037   echo "$as_me: failed program was:" >&5
3038 cat conftest.$ac_ext >&5
3039 fi
3040 rm -f conftest.$ac_objext conftest.$ac_ext
3041 done
3042 rm -rf conftest*
3043 if test -n "$ac_declaration"; then
3044   echo '#ifdef __cplusplus' >>confdefs.h
3045   echo $ac_declaration      >>confdefs.h
3046   echo '#endif'             >>confdefs.h
3047 fi
3048
3049 ac_ext=c
3050 ac_cpp='$CPP $CPPFLAGS'
3051 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3052 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3054 ac_main_return=return
3055
3056                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3057         if test "$CXX" = "g++" ; then
3058                 # Extract the first word of "g++", so it can be a program name with args.
3059 set dummy g++; ac_word=$2
3060 echo "$as_me:3060: checking for $ac_word" >&5
3061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3062 if test "${ac_cv_path_CXX+set}" = set; then
3063   echo $ECHO_N "(cached) $ECHO_C" >&6
3064 else
3065   case $CXX in
3066   [\\/]* | ?:[\\/]*)
3067   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3068   ;;
3069   *)
3070   ac_save_IFS=$IFS; IFS=$ac_path_separator
3071 ac_dummy="$PATH"
3072 for ac_dir in $ac_dummy; do
3073   IFS=$ac_save_IFS
3074   test -z "$ac_dir" && ac_dir=.
3075   if $as_executable_p "$ac_dir/$ac_word"; then
3076    ac_cv_path_CXX="$ac_dir/$ac_word"
3077    echo "$as_me:3077: found $ac_dir/$ac_word" >&5
3078    break
3079 fi
3080 done
3081
3082   ;;
3083 esac
3084 fi
3085 CXX=$ac_cv_path_CXX
3086
3087 if test -n "$CXX"; then
3088   echo "$as_me:3088: result: $CXX" >&5
3089 echo "${ECHO_T}$CXX" >&6
3090 else
3091   echo "$as_me:3091: result: no" >&5
3092 echo "${ECHO_T}no" >&6
3093 fi
3094
3095         fi
3096         if test "$CXX" = "g++" ; then
3097                 { echo "$as_me:3097: WARNING: ignoring hardcoded g++" >&5
3098 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3099                 cf_with_cxx=no; CXX=""; GXX="";
3100         fi
3101 fi
3102
3103 GXX_VERSION=none
3104 if test "$GXX" = yes; then
3105         echo "$as_me:3105: checking version of g++" >&5
3106 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3107         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3108         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3109         echo "$as_me:3109: result: $GXX_VERSION" >&5
3110 echo "${ECHO_T}$GXX_VERSION" >&6
3111 fi
3112
3113 case $GXX_VERSION in
3114 1*|2.[0-6]*)
3115         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3116         # cf_cxx_library=no
3117         { echo "$as_me:3117: WARNING: templates do not work" >&5
3118 echo "$as_me: WARNING: templates do not work" >&2;}
3119         ;;
3120 esac
3121
3122 echo "$as_me:3122: checking if you want to build C++ binding and demo" >&5
3123 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3124
3125 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3126 if test "${with_cxx_binding+set}" = set; then
3127   withval="$with_cxx_binding"
3128   cf_with_cxx_binding=$withval
3129 else
3130   cf_with_cxx_binding=$cf_with_cxx
3131 fi;
3132 echo "$as_me:3132: result: $cf_with_cxx_binding" >&5
3133 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3134
3135 echo "$as_me:3135: checking if you want to build with Ada95" >&5
3136 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3137
3138 # Check whether --with-ada or --without-ada was given.
3139 if test "${with_ada+set}" = set; then
3140   withval="$with_ada"
3141   cf_with_ada=$withval
3142 else
3143   cf_with_ada=yes
3144 fi;
3145 echo "$as_me:3145: result: $cf_with_ada" >&5
3146 echo "${ECHO_T}$cf_with_ada" >&6
3147
3148 echo "$as_me:3148: checking if you want to install manpages" >&5
3149 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3150
3151 # Check whether --with-manpages or --without-manpages was given.
3152 if test "${with_manpages+set}" = set; then
3153   withval="$with_manpages"
3154   cf_with_manpages=$withval
3155 else
3156   cf_with_manpages=yes
3157 fi;
3158 echo "$as_me:3158: result: $cf_with_manpages" >&5
3159 echo "${ECHO_T}$cf_with_manpages" >&6
3160
3161 echo "$as_me:3161: checking if you want to build programs such as tic" >&5
3162 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3163
3164 # Check whether --with-progs or --without-progs was given.
3165 if test "${with_progs+set}" = set; then
3166   withval="$with_progs"
3167   cf_with_progs=$withval
3168 else
3169   cf_with_progs=yes
3170 fi;
3171 echo "$as_me:3171: result: $cf_with_progs" >&5
3172 echo "${ECHO_T}$cf_with_progs" >&6
3173
3174 echo "$as_me:3174: checking if you want to build test-programs" >&5
3175 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3176
3177 # Check whether --with-tests or --without-tests was given.
3178 if test "${with_tests+set}" = set; then
3179   withval="$with_tests"
3180   cf_with_tests=$withval
3181 else
3182   cf_with_tests=yes
3183 fi;
3184 echo "$as_me:3184: result: $cf_with_tests" >&5
3185 echo "${ECHO_T}$cf_with_tests" >&6
3186
3187 echo "$as_me:3187: checking if you wish to install curses.h" >&5
3188 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3189
3190 # Check whether --with-curses-h or --without-curses-h was given.
3191 if test "${with_curses_h+set}" = set; then
3192   withval="$with_curses_h"
3193   with_curses_h=$withval
3194 else
3195   with_curses_h=yes
3196 fi;
3197 echo "$as_me:3197: result: $with_curses_h" >&5
3198 echo "${ECHO_T}$with_curses_h" >&6
3199
3200 modules_to_build="ncurses"
3201 if test "X$cf_with_progs" != Xno ; then
3202 modules_to_build="$modules_to_build progs tack"
3203 fi
3204 modules_to_build="$modules_to_build panel menu form"
3205
3206 test "$program_prefix" != NONE &&
3207   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3208 # Use a double $ so make ignores it.
3209 test "$program_suffix" != NONE &&
3210   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3211 # Double any \ or $.  echo might interpret backslashes.
3212 # By default was `s,x,x', remove it if useless.
3213 cat <<\_ACEOF >conftest.sed
3214 s/[\\$]/&&/g;s/;s,x,x,$//
3215 _ACEOF
3216 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3217 rm conftest.sed
3218
3219 for ac_prog in mawk gawk nawk awk
3220 do
3221   # Extract the first word of "$ac_prog", so it can be a program name with args.
3222 set dummy $ac_prog; ac_word=$2
3223 echo "$as_me:3223: checking for $ac_word" >&5
3224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3225 if test "${ac_cv_prog_AWK+set}" = set; then
3226   echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228   if test -n "$AWK"; then
3229   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3230 else
3231   ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 ac_dummy="$PATH"
3233 for ac_dir in $ac_dummy; do
3234   IFS=$ac_save_IFS
3235   test -z "$ac_dir" && ac_dir=.
3236   $as_executable_p "$ac_dir/$ac_word" || continue
3237 ac_cv_prog_AWK="$ac_prog"
3238 echo "$as_me:3238: found $ac_dir/$ac_word" >&5
3239 break
3240 done
3241
3242 fi
3243 fi
3244 AWK=$ac_cv_prog_AWK
3245 if test -n "$AWK"; then
3246   echo "$as_me:3246: result: $AWK" >&5
3247 echo "${ECHO_T}$AWK" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253   test -n "$AWK" && break
3254 done
3255
3256 test -z "$AWK" && { { echo "$as_me:3256: error: No awk program found" >&5
3257 echo "$as_me: error: No awk program found" >&2;}
3258    { (exit 1); exit 1; }; }
3259
3260 echo "$as_me:3260: checking for egrep" >&5
3261 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3262 if test "${ac_cv_prog_egrep+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3266     then ac_cv_prog_egrep='grep -E'
3267     else ac_cv_prog_egrep='egrep'
3268     fi
3269 fi
3270 echo "$as_me:3270: result: $ac_cv_prog_egrep" >&5
3271 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3272  EGREP=$ac_cv_prog_egrep
3273
3274 test -z "$EGREP" && { { echo "$as_me:3274: error: No egrep program found" >&5
3275 echo "$as_me: error: No egrep program found" >&2;}
3276    { (exit 1); exit 1; }; }
3277
3278 # Find a good install program.  We prefer a C program (faster),
3279 # so one script is as good as another.  But avoid the broken or
3280 # incompatible versions:
3281 # SysV /etc/install, /usr/sbin/install
3282 # SunOS /usr/etc/install
3283 # IRIX /sbin/install
3284 # AIX /bin/install
3285 # AmigaOS /C/install, which installs bootblocks on floppy discs
3286 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3287 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3288 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3289 # ./install, which can be erroneously created by make from ./install.sh.
3290 echo "$as_me:3290: checking for a BSD compatible install" >&5
3291 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3292 if test -z "$INSTALL"; then
3293 if test "${ac_cv_path_install+set}" = set; then
3294   echo $ECHO_N "(cached) $ECHO_C" >&6
3295 else
3296     ac_save_IFS=$IFS; IFS=$ac_path_separator
3297   for ac_dir in $PATH; do
3298     IFS=$ac_save_IFS
3299     # Account for people who put trailing slashes in PATH elements.
3300     case $ac_dir/ in
3301     / | ./ | .// | /cC/* \
3302     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3303     | /usr/ucb/* ) ;;
3304     *)
3305       # OSF1 and SCO ODT 3.0 have their own names for install.
3306       # Don't use installbsd from OSF since it installs stuff as root
3307       # by default.
3308       for ac_prog in ginstall scoinst install; do
3309         if $as_executable_p "$ac_dir/$ac_prog"; then
3310           if test $ac_prog = install &&
3311             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3312             # AIX install.  It has an incompatible calling convention.
3313             :
3314           elif test $ac_prog = install &&
3315             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3316             # program-specific install script used by HP pwplus--don't use.
3317             :
3318           else
3319             ac_cv_path_install="$ac_dir/$ac_prog -c"
3320             break 2
3321           fi
3322         fi
3323       done
3324       ;;
3325     esac
3326   done
3327
3328 fi
3329   if test "${ac_cv_path_install+set}" = set; then
3330     INSTALL=$ac_cv_path_install
3331   else
3332     # As a last resort, use the slow shell script.  We don't cache a
3333     # path for INSTALL within a source directory, because that will
3334     # break other packages using the cache if that directory is
3335     # removed, or if the path is relative.
3336     INSTALL=$ac_install_sh
3337   fi
3338 fi
3339 echo "$as_me:3339: result: $INSTALL" >&5
3340 echo "${ECHO_T}$INSTALL" >&6
3341
3342 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3343 # It thinks the first close brace ends the variable substitution.
3344 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3345
3346 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3347
3348 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3349
3350 case $INSTALL in
3351 /*)
3352   ;;
3353 *)
3354   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3355   test -z "$cf_dir" && cf_dir=.
3356   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3357   ;;
3358 esac
3359
3360 for ac_prog in tdlint lint alint splint lclint
3361 do
3362   # Extract the first word of "$ac_prog", so it can be a program name with args.
3363 set dummy $ac_prog; ac_word=$2
3364 echo "$as_me:3364: checking for $ac_word" >&5
3365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3366 if test "${ac_cv_prog_LINT+set}" = set; then
3367   echo $ECHO_N "(cached) $ECHO_C" >&6
3368 else
3369   if test -n "$LINT"; then
3370   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3371 else
3372   ac_save_IFS=$IFS; IFS=$ac_path_separator
3373 ac_dummy="$PATH"
3374 for ac_dir in $ac_dummy; do
3375   IFS=$ac_save_IFS
3376   test -z "$ac_dir" && ac_dir=.
3377   $as_executable_p "$ac_dir/$ac_word" || continue
3378 ac_cv_prog_LINT="$ac_prog"
3379 echo "$as_me:3379: found $ac_dir/$ac_word" >&5
3380 break
3381 done
3382
3383 fi
3384 fi
3385 LINT=$ac_cv_prog_LINT
3386 if test -n "$LINT"; then
3387   echo "$as_me:3387: result: $LINT" >&5
3388 echo "${ECHO_T}$LINT" >&6
3389 else
3390   echo "$as_me:3390: result: no" >&5
3391 echo "${ECHO_T}no" >&6
3392 fi
3393
3394   test -n "$LINT" && break
3395 done
3396
3397 echo "$as_me:3397: checking whether ln -s works" >&5
3398 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3399 LN_S=$as_ln_s
3400 if test "$LN_S" = "ln -s"; then
3401   echo "$as_me:3401: result: yes" >&5
3402 echo "${ECHO_T}yes" >&6
3403 else
3404   echo "$as_me:3404: result: no, using $LN_S" >&5
3405 echo "${ECHO_T}no, using $LN_S" >&6
3406 fi
3407
3408 echo "$as_me:3408: checking if $LN_S -f options work" >&5
3409 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3410
3411 rm -f conf$$.src conf$$dst
3412 echo >conf$$.dst
3413 echo first >conf$$.src
3414 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3415         cf_prog_ln_sf=yes
3416 else
3417         cf_prog_ln_sf=no
3418 fi
3419 rm -f conf$$.dst conf$$src
3420 echo "$as_me:3420: result: $cf_prog_ln_sf" >&5
3421 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3422
3423 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3424
3425 echo "$as_me:3425: checking for long file names" >&5
3426 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3427 if test "${ac_cv_sys_long_file_names+set}" = set; then
3428   echo $ECHO_N "(cached) $ECHO_C" >&6
3429 else
3430   ac_cv_sys_long_file_names=yes
3431 # Test for long file names in all the places we know might matter:
3432 #      .                the current directory, where building will happen
3433 #      $prefix/lib      where we will be installing things
3434 #      $exec_prefix/lib likewise
3435 # eval it to expand exec_prefix.
3436 #      $TMPDIR          if set, where it might want to write temporary files
3437 # if $TMPDIR is not set:
3438 #      /tmp             where it might want to write temporary files
3439 #      /var/tmp         likewise
3440 #      /usr/tmp         likewise
3441 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3442   ac_tmpdirs=$TMPDIR
3443 else
3444   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3445 fi
3446 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3447   test -d $ac_dir || continue
3448   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3449   ac_xdir=$ac_dir/cf$$
3450   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3451   ac_tf1=$ac_xdir/conftest9012345
3452   ac_tf2=$ac_xdir/conftest9012346
3453   (echo 1 >$ac_tf1) 2>/dev/null
3454   (echo 2 >$ac_tf2) 2>/dev/null
3455   ac_val=`cat $ac_tf1 2>/dev/null`
3456   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3457     ac_cv_sys_long_file_names=no
3458     rm -rf $ac_xdir 2>/dev/null
3459     break
3460   fi
3461   rm -rf $ac_xdir 2>/dev/null
3462 done
3463 fi
3464 echo "$as_me:3464: result: $ac_cv_sys_long_file_names" >&5
3465 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3466 if test $ac_cv_sys_long_file_names = yes; then
3467
3468 cat >>confdefs.h <<\EOF
3469 #define HAVE_LONG_FILE_NAMES 1
3470 EOF
3471
3472 fi
3473
3474 # if we find pkg-config, check if we should install the ".pc" files.
3475
3476 echo "$as_me:3476: checking if you want to use pkg-config" >&5
3477 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3478
3479 # Check whether --with-pkg-config or --without-pkg-config was given.
3480 if test "${with_pkg_config+set}" = set; then
3481   withval="$with_pkg_config"
3482   cf_pkg_config=$withval
3483 else
3484   cf_pkg_config=yes
3485 fi;
3486 echo "$as_me:3486: result: $cf_pkg_config" >&5
3487 echo "${ECHO_T}$cf_pkg_config" >&6
3488
3489 case $cf_pkg_config in #(vi
3490 no) #(vi
3491         PKG_CONFIG=none
3492         ;;
3493 yes) #(vi
3494         # Extract the first word of "pkg-config", so it can be a program name with args.
3495 set dummy pkg-config; ac_word=$2
3496 echo "$as_me:3496: checking for $ac_word" >&5
3497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   case $PKG_CONFIG in
3502   [\\/]* | ?:[\\/]*)
3503   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3504   ;;
3505   *)
3506   ac_save_IFS=$IFS; IFS=$ac_path_separator
3507 ac_dummy="$PATH"
3508 for ac_dir in $ac_dummy; do
3509   IFS=$ac_save_IFS
3510   test -z "$ac_dir" && ac_dir=.
3511   if $as_executable_p "$ac_dir/$ac_word"; then
3512    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3513    echo "$as_me:3513: found $ac_dir/$ac_word" >&5
3514    break
3515 fi
3516 done
3517
3518   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3519   ;;
3520 esac
3521 fi
3522 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3523
3524 if test -n "$PKG_CONFIG"; then
3525   echo "$as_me:3525: result: $PKG_CONFIG" >&5
3526 echo "${ECHO_T}$PKG_CONFIG" >&6
3527 else
3528   echo "$as_me:3528: result: no" >&5
3529 echo "${ECHO_T}no" >&6
3530 fi
3531
3532         ;;
3533 *)
3534         PKG_CONFIG=$withval
3535         ;;
3536 esac
3537
3538 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3539 if test "$PKG_CONFIG" != none ; then
3540
3541 if test "x$prefix" != xNONE; then
3542   cf_path_syntax="$prefix"
3543 else
3544   cf_path_syntax="$ac_default_prefix"
3545 fi
3546
3547 case ".$PKG_CONFIG" in #(vi
3548 .\$\(*\)*|.\'*\'*) #(vi
3549   ;;
3550 ..|./*|.\\*) #(vi
3551   ;;
3552 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3553   ;;
3554 .\${*prefix}*) #(vi
3555   eval PKG_CONFIG="$PKG_CONFIG"
3556   case ".$PKG_CONFIG" in #(vi
3557   .NONE/*)
3558     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3559     ;;
3560   esac
3561   ;; #(vi
3562 .no|.NONE/*)
3563   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3564   ;;
3565 *)
3566   { { echo "$as_me:3566: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3567 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3568    { (exit 1); exit 1; }; }
3569   ;;
3570 esac
3571
3572 fi
3573
3574 if test "$PKG_CONFIG" != no ; then
3575         echo "$as_me:3575: checking if we should install .pc files for $PKG_CONFIG" >&5
3576 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3577
3578         # Leave this as something that can be overridden in the environment.
3579         if test -z "$PKG_CONFIG_LIBDIR" ; then
3580                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3581         fi
3582         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3583         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3584
3585 # Check whether --enable-pc-files or --disable-pc-files was given.
3586 if test "${enable_pc_files+set}" = set; then
3587   enableval="$enable_pc_files"
3588   enable_pc_files=$enableval
3589 else
3590   enable_pc_files=no
3591 fi;
3592                 echo "$as_me:3592: result: $enable_pc_files" >&5
3593 echo "${ECHO_T}$enable_pc_files" >&6
3594         else
3595                 echo "$as_me:3595: result: no" >&5
3596 echo "${ECHO_T}no" >&6
3597                 { echo "$as_me:3597: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3598 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3599                 enable_pc_files=no
3600         fi
3601 fi
3602
3603 echo "$as_me:3603: checking if we should assume mixed-case filenames" >&5
3604 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3605
3606 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3607 if test "${enable_mixed_case+set}" = set; then
3608   enableval="$enable_mixed_case"
3609   enable_mixedcase=$enableval
3610 else
3611   enable_mixedcase=auto
3612 fi;
3613 echo "$as_me:3613: result: $enable_mixedcase" >&5
3614 echo "${ECHO_T}$enable_mixedcase" >&6
3615 if test "$enable_mixedcase" = "auto" ; then
3616
3617 echo "$as_me:3617: checking if filesystem supports mixed-case filenames" >&5
3618 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3619 if test "${cf_cv_mixedcase+set}" = set; then
3620   echo $ECHO_N "(cached) $ECHO_C" >&6
3621 else
3622
3623 if test "$cross_compiling" = yes ; then
3624         case $target_alias in #(vi
3625         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3626                 cf_cv_mixedcase=no
3627                 ;;
3628         *)
3629                 cf_cv_mixedcase=yes
3630                 ;;
3631         esac
3632 else
3633         rm -f conftest CONFTEST
3634         echo test >conftest
3635         if test -f CONFTEST ; then
3636                 cf_cv_mixedcase=no
3637         else
3638                 cf_cv_mixedcase=yes
3639         fi
3640         rm -f conftest CONFTEST
3641 fi
3642
3643 fi
3644 echo "$as_me:3644: result: $cf_cv_mixedcase" >&5
3645 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3646 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3647 #define MIXEDCASE_FILENAMES 1
3648 EOF
3649
3650 else
3651     cf_cv_mixedcase=$enable_mixedcase
3652     if test "$enable_mixedcase" = "yes" ; then
3653         cat >>confdefs.h <<\EOF
3654 #define MIXEDCASE_FILENAMES 1
3655 EOF
3656
3657     fi
3658 fi
3659
3660 # do this after mixed-case option (tags/TAGS is not as important as tic).
3661 echo "$as_me:3661: checking whether ${MAKE-make} sets \${MAKE}" >&5
3662 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3663 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3664 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3665   echo $ECHO_N "(cached) $ECHO_C" >&6
3666 else
3667   cat >conftest.make <<\EOF
3668 all:
3669         @echo 'ac_maketemp="${MAKE}"'
3670 EOF
3671 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3672 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3673 if test -n "$ac_maketemp"; then
3674   eval ac_cv_prog_make_${ac_make}_set=yes
3675 else
3676   eval ac_cv_prog_make_${ac_make}_set=no
3677 fi
3678 rm -f conftest.make
3679 fi
3680 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3681   echo "$as_me:3681: result: yes" >&5
3682 echo "${ECHO_T}yes" >&6
3683   SET_MAKE=
3684 else
3685   echo "$as_me:3685: result: no" >&5
3686 echo "${ECHO_T}no" >&6
3687   SET_MAKE="MAKE=${MAKE-make}"
3688 fi
3689
3690 for ac_prog in exctags ctags
3691 do
3692   # Extract the first word of "$ac_prog", so it can be a program name with args.
3693 set dummy $ac_prog; ac_word=$2
3694 echo "$as_me:3694: checking for $ac_word" >&5
3695 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3696 if test "${ac_cv_prog_CTAGS+set}" = set; then
3697   echo $ECHO_N "(cached) $ECHO_C" >&6
3698 else
3699   if test -n "$CTAGS"; then
3700   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3701 else
3702   ac_save_IFS=$IFS; IFS=$ac_path_separator
3703 ac_dummy="$PATH"
3704 for ac_dir in $ac_dummy; do
3705   IFS=$ac_save_IFS
3706   test -z "$ac_dir" && ac_dir=.
3707   $as_executable_p "$ac_dir/$ac_word" || continue
3708 ac_cv_prog_CTAGS="$ac_prog"
3709 echo "$as_me:3709: found $ac_dir/$ac_word" >&5
3710 break
3711 done
3712
3713 fi
3714 fi
3715 CTAGS=$ac_cv_prog_CTAGS
3716 if test -n "$CTAGS"; then
3717   echo "$as_me:3717: result: $CTAGS" >&5
3718 echo "${ECHO_T}$CTAGS" >&6
3719 else
3720   echo "$as_me:3720: result: no" >&5
3721 echo "${ECHO_T}no" >&6
3722 fi
3723
3724   test -n "$CTAGS" && break
3725 done
3726
3727 for ac_prog in exetags etags
3728 do
3729   # Extract the first word of "$ac_prog", so it can be a program name with args.
3730 set dummy $ac_prog; ac_word=$2
3731 echo "$as_me:3731: checking for $ac_word" >&5
3732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3733 if test "${ac_cv_prog_ETAGS+set}" = set; then
3734   echo $ECHO_N "(cached) $ECHO_C" >&6
3735 else
3736   if test -n "$ETAGS"; then
3737   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3738 else
3739   ac_save_IFS=$IFS; IFS=$ac_path_separator
3740 ac_dummy="$PATH"
3741 for ac_dir in $ac_dummy; do
3742   IFS=$ac_save_IFS
3743   test -z "$ac_dir" && ac_dir=.
3744   $as_executable_p "$ac_dir/$ac_word" || continue
3745 ac_cv_prog_ETAGS="$ac_prog"
3746 echo "$as_me:3746: found $ac_dir/$ac_word" >&5
3747 break
3748 done
3749
3750 fi
3751 fi
3752 ETAGS=$ac_cv_prog_ETAGS
3753 if test -n "$ETAGS"; then
3754   echo "$as_me:3754: result: $ETAGS" >&5
3755 echo "${ECHO_T}$ETAGS" >&6
3756 else
3757   echo "$as_me:3757: result: no" >&5
3758 echo "${ECHO_T}no" >&6
3759 fi
3760
3761   test -n "$ETAGS" && break
3762 done
3763
3764 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3765 set dummy ${CTAGS:-ctags}; ac_word=$2
3766 echo "$as_me:3766: checking for $ac_word" >&5
3767 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3768 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3769   echo $ECHO_N "(cached) $ECHO_C" >&6
3770 else
3771   if test -n "$MAKE_LOWER_TAGS"; then
3772   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3773 else
3774   ac_save_IFS=$IFS; IFS=$ac_path_separator
3775 ac_dummy="$PATH"
3776 for ac_dir in $ac_dummy; do
3777   IFS=$ac_save_IFS
3778   test -z "$ac_dir" && ac_dir=.
3779   $as_executable_p "$ac_dir/$ac_word" || continue
3780 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3781 echo "$as_me:3781: found $ac_dir/$ac_word" >&5
3782 break
3783 done
3784
3785   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3786 fi
3787 fi
3788 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3789 if test -n "$MAKE_LOWER_TAGS"; then
3790   echo "$as_me:3790: result: $MAKE_LOWER_TAGS" >&5
3791 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3792 else
3793   echo "$as_me:3793: result: no" >&5
3794 echo "${ECHO_T}no" >&6
3795 fi
3796
3797 if test "$cf_cv_mixedcase" = yes ; then
3798         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3799 set dummy ${ETAGS:-etags}; ac_word=$2
3800 echo "$as_me:3800: checking for $ac_word" >&5
3801 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3802 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3803   echo $ECHO_N "(cached) $ECHO_C" >&6
3804 else
3805   if test -n "$MAKE_UPPER_TAGS"; then
3806   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3807 else
3808   ac_save_IFS=$IFS; IFS=$ac_path_separator
3809 ac_dummy="$PATH"
3810 for ac_dir in $ac_dummy; do
3811   IFS=$ac_save_IFS
3812   test -z "$ac_dir" && ac_dir=.
3813   $as_executable_p "$ac_dir/$ac_word" || continue
3814 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3815 echo "$as_me:3815: found $ac_dir/$ac_word" >&5
3816 break
3817 done
3818
3819   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3820 fi
3821 fi
3822 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3823 if test -n "$MAKE_UPPER_TAGS"; then
3824   echo "$as_me:3824: result: $MAKE_UPPER_TAGS" >&5
3825 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3826 else
3827   echo "$as_me:3827: result: no" >&5
3828 echo "${ECHO_T}no" >&6
3829 fi
3830
3831 else
3832         MAKE_UPPER_TAGS=no
3833 fi
3834
3835 if test "$MAKE_UPPER_TAGS" = yes ; then
3836         MAKE_UPPER_TAGS=
3837 else
3838         MAKE_UPPER_TAGS="#"
3839 fi
3840
3841 if test "$MAKE_LOWER_TAGS" = yes ; then
3842         MAKE_LOWER_TAGS=
3843 else
3844         MAKE_LOWER_TAGS="#"
3845 fi
3846
3847 echo "$as_me:3847: checking for makeflags variable" >&5
3848 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3849 if test "${cf_cv_makeflags+set}" = set; then
3850   echo $ECHO_N "(cached) $ECHO_C" >&6
3851 else
3852
3853         cf_cv_makeflags=''
3854         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3855         do
3856                 cat >cf_makeflags.tmp <<CF_EOF
3857 SHELL = /bin/sh
3858 all :
3859         @ echo '.$cf_option'
3860 CF_EOF
3861                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[       ]*$,,'`
3862                 case "$cf_result" in
3863                 .*k)
3864                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3865                         case "$cf_result" in
3866                         .*CC=*) cf_cv_makeflags=
3867                                 ;;
3868                         *)      cf_cv_makeflags=$cf_option
3869                                 ;;
3870                         esac
3871                         break
3872                         ;;
3873                 .-)     ;;
3874                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3875                         ;;
3876                 esac
3877         done
3878         rm -f cf_makeflags.tmp
3879
3880 fi
3881 echo "$as_me:3881: result: $cf_cv_makeflags" >&5
3882 echo "${ECHO_T}$cf_cv_makeflags" >&6
3883
3884 if test -n "$ac_tool_prefix"; then
3885   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3886 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3887 echo "$as_me:3887: checking for $ac_word" >&5
3888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3889 if test "${ac_cv_prog_RANLIB+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   if test -n "$RANLIB"; then
3893   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3894 else
3895   ac_save_IFS=$IFS; IFS=$ac_path_separator
3896 ac_dummy="$PATH"
3897 for ac_dir in $ac_dummy; do
3898   IFS=$ac_save_IFS
3899   test -z "$ac_dir" && ac_dir=.
3900   $as_executable_p "$ac_dir/$ac_word" || continue
3901 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3902 echo "$as_me:3902: found $ac_dir/$ac_word" >&5
3903 break
3904 done
3905
3906 fi
3907 fi
3908 RANLIB=$ac_cv_prog_RANLIB
3909 if test -n "$RANLIB"; then
3910   echo "$as_me:3910: result: $RANLIB" >&5
3911 echo "${ECHO_T}$RANLIB" >&6
3912 else
3913   echo "$as_me:3913: result: no" >&5
3914 echo "${ECHO_T}no" >&6
3915 fi
3916
3917 fi
3918 if test -z "$ac_cv_prog_RANLIB"; then
3919   ac_ct_RANLIB=$RANLIB
3920   # Extract the first word of "ranlib", so it can be a program name with args.
3921 set dummy ranlib; ac_word=$2
3922 echo "$as_me:3922: checking for $ac_word" >&5
3923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3924 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3925   echo $ECHO_N "(cached) $ECHO_C" >&6
3926 else
3927   if test -n "$ac_ct_RANLIB"; then
3928   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3929 else
3930   ac_save_IFS=$IFS; IFS=$ac_path_separator
3931 ac_dummy="$PATH"
3932 for ac_dir in $ac_dummy; do
3933   IFS=$ac_save_IFS
3934   test -z "$ac_dir" && ac_dir=.
3935   $as_executable_p "$ac_dir/$ac_word" || continue
3936 ac_cv_prog_ac_ct_RANLIB="ranlib"
3937 echo "$as_me:3937: found $ac_dir/$ac_word" >&5
3938 break
3939 done
3940
3941   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3942 fi
3943 fi
3944 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3945 if test -n "$ac_ct_RANLIB"; then
3946   echo "$as_me:3946: result: $ac_ct_RANLIB" >&5
3947 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3948 else
3949   echo "$as_me:3949: result: no" >&5
3950 echo "${ECHO_T}no" >&6
3951 fi
3952
3953   RANLIB=$ac_ct_RANLIB
3954 else
3955   RANLIB="$ac_cv_prog_RANLIB"
3956 fi
3957
3958 if test -n "$ac_tool_prefix"; then
3959   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3960 set dummy ${ac_tool_prefix}ld; ac_word=$2
3961 echo "$as_me:3961: checking for $ac_word" >&5
3962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3963 if test "${ac_cv_prog_LD+set}" = set; then
3964   echo $ECHO_N "(cached) $ECHO_C" >&6
3965 else
3966   if test -n "$LD"; then
3967   ac_cv_prog_LD="$LD" # Let the user override the test.
3968 else
3969   ac_save_IFS=$IFS; IFS=$ac_path_separator
3970 ac_dummy="$PATH"
3971 for ac_dir in $ac_dummy; do
3972   IFS=$ac_save_IFS
3973   test -z "$ac_dir" && ac_dir=.
3974   $as_executable_p "$ac_dir/$ac_word" || continue
3975 ac_cv_prog_LD="${ac_tool_prefix}ld"
3976 echo "$as_me:3976: found $ac_dir/$ac_word" >&5
3977 break
3978 done
3979
3980 fi
3981 fi
3982 LD=$ac_cv_prog_LD
3983 if test -n "$LD"; then
3984   echo "$as_me:3984: result: $LD" >&5
3985 echo "${ECHO_T}$LD" >&6
3986 else
3987   echo "$as_me:3987: result: no" >&5
3988 echo "${ECHO_T}no" >&6
3989 fi
3990
3991 fi
3992 if test -z "$ac_cv_prog_LD"; then
3993   ac_ct_LD=$LD
3994   # Extract the first word of "ld", so it can be a program name with args.
3995 set dummy ld; ac_word=$2
3996 echo "$as_me:3996: checking for $ac_word" >&5
3997 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3998 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3999   echo $ECHO_N "(cached) $ECHO_C" >&6
4000 else
4001   if test -n "$ac_ct_LD"; then
4002   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4003 else
4004   ac_save_IFS=$IFS; IFS=$ac_path_separator
4005 ac_dummy="$PATH"
4006 for ac_dir in $ac_dummy; do
4007   IFS=$ac_save_IFS
4008   test -z "$ac_dir" && ac_dir=.
4009   $as_executable_p "$ac_dir/$ac_word" || continue
4010 ac_cv_prog_ac_ct_LD="ld"
4011 echo "$as_me:4011: found $ac_dir/$ac_word" >&5
4012 break
4013 done
4014
4015   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4016 fi
4017 fi
4018 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4019 if test -n "$ac_ct_LD"; then
4020   echo "$as_me:4020: result: $ac_ct_LD" >&5
4021 echo "${ECHO_T}$ac_ct_LD" >&6
4022 else
4023   echo "$as_me:4023: result: no" >&5
4024 echo "${ECHO_T}no" >&6
4025 fi
4026
4027   LD=$ac_ct_LD
4028 else
4029   LD="$ac_cv_prog_LD"
4030 fi
4031
4032 if test -n "$ac_tool_prefix"; then
4033   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4034 set dummy ${ac_tool_prefix}ar; ac_word=$2
4035 echo "$as_me:4035: checking for $ac_word" >&5
4036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4037 if test "${ac_cv_prog_AR+set}" = set; then
4038   echo $ECHO_N "(cached) $ECHO_C" >&6
4039 else
4040   if test -n "$AR"; then
4041   ac_cv_prog_AR="$AR" # Let the user override the test.
4042 else
4043   ac_save_IFS=$IFS; IFS=$ac_path_separator
4044 ac_dummy="$PATH"
4045 for ac_dir in $ac_dummy; do
4046   IFS=$ac_save_IFS
4047   test -z "$ac_dir" && ac_dir=.
4048   $as_executable_p "$ac_dir/$ac_word" || continue
4049 ac_cv_prog_AR="${ac_tool_prefix}ar"
4050 echo "$as_me:4050: found $ac_dir/$ac_word" >&5
4051 break
4052 done
4053
4054 fi
4055 fi
4056 AR=$ac_cv_prog_AR
4057 if test -n "$AR"; then
4058   echo "$as_me:4058: result: $AR" >&5
4059 echo "${ECHO_T}$AR" >&6
4060 else
4061   echo "$as_me:4061: result: no" >&5
4062 echo "${ECHO_T}no" >&6
4063 fi
4064
4065 fi
4066 if test -z "$ac_cv_prog_AR"; then
4067   ac_ct_AR=$AR
4068   # Extract the first word of "ar", so it can be a program name with args.
4069 set dummy ar; ac_word=$2
4070 echo "$as_me:4070: checking for $ac_word" >&5
4071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4072 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4073   echo $ECHO_N "(cached) $ECHO_C" >&6
4074 else
4075   if test -n "$ac_ct_AR"; then
4076   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4077 else
4078   ac_save_IFS=$IFS; IFS=$ac_path_separator
4079 ac_dummy="$PATH"
4080 for ac_dir in $ac_dummy; do
4081   IFS=$ac_save_IFS
4082   test -z "$ac_dir" && ac_dir=.
4083   $as_executable_p "$ac_dir/$ac_word" || continue
4084 ac_cv_prog_ac_ct_AR="ar"
4085 echo "$as_me:4085: found $ac_dir/$ac_word" >&5
4086 break
4087 done
4088
4089   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4090 fi
4091 fi
4092 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4093 if test -n "$ac_ct_AR"; then
4094   echo "$as_me:4094: result: $ac_ct_AR" >&5
4095 echo "${ECHO_T}$ac_ct_AR" >&6
4096 else
4097   echo "$as_me:4097: result: no" >&5
4098 echo "${ECHO_T}no" >&6
4099 fi
4100
4101   AR=$ac_ct_AR
4102 else
4103   AR="$ac_cv_prog_AR"
4104 fi
4105
4106 if test -n "$ac_tool_prefix"; then
4107   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4108 set dummy ${ac_tool_prefix}ar; ac_word=$2
4109 echo "$as_me:4109: checking for $ac_word" >&5
4110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4111 if test "${ac_cv_prog_AR+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$AR"; then
4115   ac_cv_prog_AR="$AR" # Let the user override the test.
4116 else
4117   ac_save_IFS=$IFS; IFS=$ac_path_separator
4118 ac_dummy="$PATH"
4119 for ac_dir in $ac_dummy; do
4120   IFS=$ac_save_IFS
4121   test -z "$ac_dir" && ac_dir=.
4122   $as_executable_p "$ac_dir/$ac_word" || continue
4123 ac_cv_prog_AR="${ac_tool_prefix}ar"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128 fi
4129 fi
4130 AR=$ac_cv_prog_AR
4131 if test -n "$AR"; then
4132   echo "$as_me:4132: result: $AR" >&5
4133 echo "${ECHO_T}$AR" >&6
4134 else
4135   echo "$as_me:4135: result: no" >&5
4136 echo "${ECHO_T}no" >&6
4137 fi
4138
4139 fi
4140 if test -z "$ac_cv_prog_AR"; then
4141   ac_ct_AR=$AR
4142   # Extract the first word of "ar", so it can be a program name with args.
4143 set dummy ar; ac_word=$2
4144 echo "$as_me:4144: checking for $ac_word" >&5
4145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4146 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4147   echo $ECHO_N "(cached) $ECHO_C" >&6
4148 else
4149   if test -n "$ac_ct_AR"; then
4150   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4151 else
4152   ac_save_IFS=$IFS; IFS=$ac_path_separator
4153 ac_dummy="$PATH"
4154 for ac_dir in $ac_dummy; do
4155   IFS=$ac_save_IFS
4156   test -z "$ac_dir" && ac_dir=.
4157   $as_executable_p "$ac_dir/$ac_word" || continue
4158 ac_cv_prog_ac_ct_AR="ar"
4159 echo "$as_me:4159: found $ac_dir/$ac_word" >&5
4160 break
4161 done
4162
4163   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4164 fi
4165 fi
4166 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4167 if test -n "$ac_ct_AR"; then
4168   echo "$as_me:4168: result: $ac_ct_AR" >&5
4169 echo "${ECHO_T}$ac_ct_AR" >&6
4170 else
4171   echo "$as_me:4171: result: no" >&5
4172 echo "${ECHO_T}no" >&6
4173 fi
4174
4175   AR=$ac_ct_AR
4176 else
4177   AR="$ac_cv_prog_AR"
4178 fi
4179
4180 echo "$as_me:4180: checking for options to update archives" >&5
4181 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4182 if test "${cf_cv_ar_flags+set}" = set; then
4183   echo $ECHO_N "(cached) $ECHO_C" >&6
4184 else
4185
4186         cf_cv_ar_flags=unknown
4187         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4188         do
4189
4190                 # check if $ARFLAGS already contains this choice
4191                 if test "x$ARFLAGS" != "x" ; then
4192                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4193                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4194                                 cf_cv_ar_flags=
4195                                 break
4196                         fi
4197                 fi
4198
4199                 rm -f conftest.$ac_cv_objext
4200                 rm -f conftest.a
4201
4202                 cat >conftest.$ac_ext <<EOF
4203 #line 4203 "configure"
4204 int     testdata[3] = { 123, 456, 789 };
4205 EOF
4206                 if { (eval echo "$as_me:4206: \"$ac_compile\"") >&5
4207   (eval $ac_compile) 2>&5
4208   ac_status=$?
4209   echo "$as_me:4209: \$? = $ac_status" >&5
4210   (exit $ac_status); } ; then
4211                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4212                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4213                         if test -f conftest.a ; then
4214                                 cf_cv_ar_flags=$cf_ar_flags
4215                                 break
4216                         fi
4217                 else
4218                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4219
4220 echo "${as_me:-configure}:4220: testing cannot compile test-program ..." 1>&5
4221
4222                         break
4223                 fi
4224         done
4225         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4226
4227 fi
4228 echo "$as_me:4228: result: $cf_cv_ar_flags" >&5
4229 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4230
4231 if test -n "$ARFLAGS" ; then
4232         if test -n "$cf_cv_ar_flags" ; then
4233                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4234         fi
4235 else
4236         ARFLAGS=$cf_cv_ar_flags
4237 fi
4238
4239 echo "$as_me:4239: checking if you have specified an install-prefix" >&5
4240 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4241
4242 # Check whether --with-install-prefix or --without-install-prefix was given.
4243 if test "${with_install_prefix+set}" = set; then
4244   withval="$with_install_prefix"
4245   case "$withval" in #(vi
4246         yes|no) #(vi
4247                 ;;
4248         *)      DESTDIR="$withval"
4249                 ;;
4250         esac
4251 fi;
4252 echo "$as_me:4252: result: $DESTDIR" >&5
4253 echo "${ECHO_T}$DESTDIR" >&6
4254
4255 ###############################################################################
4256
4257 # If we're cross-compiling, allow the user to override the tools and their
4258 # options.  The configure script is oriented toward identifying the host
4259 # compiler, etc., but we need a build compiler to generate parts of the source.
4260
4261 if test "$cross_compiling" = yes ; then
4262
4263         # defaults that we might want to override
4264         : ${BUILD_CFLAGS:=''}
4265         : ${BUILD_CPPFLAGS:=''}
4266         : ${BUILD_LDFLAGS:=''}
4267         : ${BUILD_LIBS:=''}
4268         : ${BUILD_EXEEXT:='$x'}
4269         : ${BUILD_OBJEXT:='o'}
4270
4271 # Check whether --with-build-cc or --without-build-cc was given.
4272 if test "${with_build_cc+set}" = set; then
4273   withval="$with_build_cc"
4274   BUILD_CC="$withval"
4275 else
4276   for ac_prog in gcc cc cl
4277 do
4278   # Extract the first word of "$ac_prog", so it can be a program name with args.
4279 set dummy $ac_prog; ac_word=$2
4280 echo "$as_me:4280: checking for $ac_word" >&5
4281 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4282 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4283   echo $ECHO_N "(cached) $ECHO_C" >&6
4284 else
4285   if test -n "$BUILD_CC"; then
4286   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4287 else
4288   ac_save_IFS=$IFS; IFS=$ac_path_separator
4289 ac_dummy="$PATH"
4290 for ac_dir in $ac_dummy; do
4291   IFS=$ac_save_IFS
4292   test -z "$ac_dir" && ac_dir=.
4293   $as_executable_p "$ac_dir/$ac_word" || continue
4294 ac_cv_prog_BUILD_CC="$ac_prog"
4295 echo "$as_me:4295: found $ac_dir/$ac_word" >&5
4296 break
4297 done
4298
4299 fi
4300 fi
4301 BUILD_CC=$ac_cv_prog_BUILD_CC
4302 if test -n "$BUILD_CC"; then
4303   echo "$as_me:4303: result: $BUILD_CC" >&5
4304 echo "${ECHO_T}$BUILD_CC" >&6
4305 else
4306   echo "$as_me:4306: result: no" >&5
4307 echo "${ECHO_T}no" >&6
4308 fi
4309
4310   test -n "$BUILD_CC" && break
4311 done
4312
4313 fi;
4314         echo "$as_me:4314: checking for native build C compiler" >&5
4315 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4316         echo "$as_me:4316: result: $BUILD_CC" >&5
4317 echo "${ECHO_T}$BUILD_CC" >&6
4318
4319         echo "$as_me:4319: checking for native build C preprocessor" >&5
4320 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4321
4322 # Check whether --with-build-cpp or --without-build-cpp was given.
4323 if test "${with_build_cpp+set}" = set; then
4324   withval="$with_build_cpp"
4325   BUILD_CPP="$withval"
4326 else
4327   BUILD_CPP='${BUILD_CC} -E'
4328 fi;
4329         echo "$as_me:4329: result: $BUILD_CPP" >&5
4330 echo "${ECHO_T}$BUILD_CPP" >&6
4331
4332         echo "$as_me:4332: checking for native build C flags" >&5
4333 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4334
4335 # Check whether --with-build-cflags or --without-build-cflags was given.
4336 if test "${with_build_cflags+set}" = set; then
4337   withval="$with_build_cflags"
4338   BUILD_CFLAGS="$withval"
4339 fi;
4340         echo "$as_me:4340: result: $BUILD_CFLAGS" >&5
4341 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4342
4343         echo "$as_me:4343: checking for native build C preprocessor-flags" >&5
4344 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4345
4346 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4347 if test "${with_build_cppflags+set}" = set; then
4348   withval="$with_build_cppflags"
4349   BUILD_CPPFLAGS="$withval"
4350 fi;
4351         echo "$as_me:4351: result: $BUILD_CPPFLAGS" >&5
4352 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4353
4354         echo "$as_me:4354: checking for native build linker-flags" >&5
4355 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4356
4357 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4358 if test "${with_build_ldflags+set}" = set; then
4359   withval="$with_build_ldflags"
4360   BUILD_LDFLAGS="$withval"
4361 fi;
4362         echo "$as_me:4362: result: $BUILD_LDFLAGS" >&5
4363 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4364
4365         echo "$as_me:4365: checking for native build linker-libraries" >&5
4366 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4367
4368 # Check whether --with-build-libs or --without-build-libs was given.
4369 if test "${with_build_libs+set}" = set; then
4370   withval="$with_build_libs"
4371   BUILD_LIBS="$withval"
4372 fi;
4373         echo "$as_me:4373: result: $BUILD_LIBS" >&5
4374 echo "${ECHO_T}$BUILD_LIBS" >&6
4375
4376         # this assumes we're on Unix.
4377         BUILD_EXEEXT=
4378         BUILD_OBJEXT=o
4379
4380         : ${BUILD_CC:='${CC}'}
4381
4382         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4383                 { { echo "$as_me:4383: error: Cross-build requires two compilers.
4384 Use --with-build-cc to specify the native compiler." >&5
4385 echo "$as_me: error: Cross-build requires two compilers.
4386 Use --with-build-cc to specify the native compiler." >&2;}
4387    { (exit 1); exit 1; }; }
4388         fi
4389
4390 else
4391         : ${BUILD_CC:='${CC}'}
4392         : ${BUILD_CPP:='${CPP}'}
4393         : ${BUILD_CFLAGS:='${CFLAGS}'}
4394         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4395         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4396         : ${BUILD_LIBS:='${LIBS}'}
4397         : ${BUILD_EXEEXT:='$x'}
4398         : ${BUILD_OBJEXT:='o'}
4399 fi
4400
4401 ###############################################################################
4402
4403 ### Options to allow the user to specify the set of libraries which are used.
4404 ### Use "--without-normal --with-shared" to allow the default model to be
4405 ### shared, for example.
4406 cf_list_models=""
4407
4408 echo "$as_me:4408: checking if libtool -version-number should be used" >&5
4409 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4410
4411 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4412 if test "${enable_libtool_version+set}" = set; then
4413   enableval="$enable_libtool_version"
4414   test "$enableval" != no && enableval=yes
4415   if test "$enableval" != "yes" ; then
4416     cf_libtool_version=no
4417   else
4418     cf_libtool_version=yes
4419   fi
4420 else
4421   enableval=yes
4422   cf_libtool_version=yes
4423
4424 fi;
4425 echo "$as_me:4425: result: $cf_libtool_version" >&5
4426 echo "${ECHO_T}$cf_libtool_version" >&6
4427
4428 if test "$cf_libtool_version" = yes ; then
4429         LIBTOOL_VERSION="-version-number"
4430 else
4431         LIBTOOL_VERSION="-version-info"
4432 fi
4433
4434 LIBTOOL=
4435
4436 # common library maintenance symbols that are convenient for libtool scripts:
4437 LIB_CREATE='${AR} -cr'
4438 LIB_OBJECT='${OBJECTS}'
4439 LIB_SUFFIX=.a
4440 LIB_PREP="$RANLIB"
4441
4442 # symbols used to prop libtool up to enable it to determine what it should be
4443 # doing:
4444 LIB_CLEAN=
4445 LIB_COMPILE=
4446 LIB_LINK='${CC}'
4447 LIB_INSTALL=
4448 LIB_UNINSTALL=
4449
4450 echo "$as_me:4450: checking if you want to build libraries with libtool" >&5
4451 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4452
4453 # Check whether --with-libtool or --without-libtool was given.
4454 if test "${with_libtool+set}" = set; then
4455   withval="$with_libtool"
4456   with_libtool=$withval
4457 else
4458   with_libtool=no
4459 fi;
4460 echo "$as_me:4460: result: $with_libtool" >&5
4461 echo "${ECHO_T}$with_libtool" >&6
4462 if test "$with_libtool" != "no"; then
4463
4464         if test "$with_libtool" != "yes" ; then
4465
4466 if test "x$prefix" != xNONE; then
4467   cf_path_syntax="$prefix"
4468 else
4469   cf_path_syntax="$ac_default_prefix"
4470 fi
4471
4472 case ".$with_libtool" in #(vi
4473 .\$\(*\)*|.\'*\'*) #(vi
4474   ;;
4475 ..|./*|.\\*) #(vi
4476   ;;
4477 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4478   ;;
4479 .\${*prefix}*) #(vi
4480   eval with_libtool="$with_libtool"
4481   case ".$with_libtool" in #(vi
4482   .NONE/*)
4483     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4484     ;;
4485   esac
4486   ;; #(vi
4487 .no|.NONE/*)
4488   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4489   ;;
4490 *)
4491   { { echo "$as_me:4491: error: expected a pathname, not \"$with_libtool\"" >&5
4492 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4493    { (exit 1); exit 1; }; }
4494   ;;
4495 esac
4496
4497                 LIBTOOL=$with_libtool
4498         else
4499                 # Extract the first word of "libtool", so it can be a program name with args.
4500 set dummy libtool; ac_word=$2
4501 echo "$as_me:4501: checking for $ac_word" >&5
4502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4503 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4504   echo $ECHO_N "(cached) $ECHO_C" >&6
4505 else
4506   case $LIBTOOL in
4507   [\\/]* | ?:[\\/]*)
4508   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4509   ;;
4510   *)
4511   ac_save_IFS=$IFS; IFS=$ac_path_separator
4512 ac_dummy="$PATH"
4513 for ac_dir in $ac_dummy; do
4514   IFS=$ac_save_IFS
4515   test -z "$ac_dir" && ac_dir=.
4516   if $as_executable_p "$ac_dir/$ac_word"; then
4517    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4518    echo "$as_me:4518: found $ac_dir/$ac_word" >&5
4519    break
4520 fi
4521 done
4522
4523   ;;
4524 esac
4525 fi
4526 LIBTOOL=$ac_cv_path_LIBTOOL
4527
4528 if test -n "$LIBTOOL"; then
4529   echo "$as_me:4529: result: $LIBTOOL" >&5
4530 echo "${ECHO_T}$LIBTOOL" >&6
4531 else
4532   echo "$as_me:4532: result: no" >&5
4533 echo "${ECHO_T}no" >&6
4534 fi
4535
4536         fi
4537         if test -z "$LIBTOOL" ; then
4538                 { { echo "$as_me:4538: error: Cannot find libtool" >&5
4539 echo "$as_me: error: Cannot find libtool" >&2;}
4540    { (exit 1); exit 1; }; }
4541         fi
4542         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4543         LIB_OBJECT='${OBJECTS:.o=.lo}'
4544         LIB_SUFFIX=.la
4545         LIB_CLEAN='${LIBTOOL} --mode=clean'
4546         LIB_COMPILE='${LIBTOOL} --mode=compile'
4547         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4548         LIB_INSTALL='${LIBTOOL} --mode=install'
4549         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4550         LIB_PREP=:
4551
4552         # Show the version of libtool
4553         echo "$as_me:4553: checking version of libtool" >&5
4554 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4555
4556         # Save the version in a cache variable - this is not entirely a good
4557         # thing, but the version string from libtool is very ugly, and for
4558         # bug reports it might be useful to have the original string. "("
4559         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.].*//'`
4560         echo "$as_me:4560: result: $cf_cv_libtool_version" >&5
4561 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4562         if test -z "$cf_cv_libtool_version" ; then
4563                 { { echo "$as_me:4563: error: This is not GNU libtool" >&5
4564 echo "$as_me: error: This is not GNU libtool" >&2;}
4565    { (exit 1); exit 1; }; }
4566         fi
4567
4568         # special hack to add -no-undefined (which libtool should do for itself)
4569         LT_UNDEF=
4570         case "$cf_cv_system_name" in #(vi
4571         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4572                 LT_UNDEF=-no-undefined
4573                 ;;
4574         esac
4575
4576         # special hack to add --tag option for C++ compiler
4577         case $cf_cv_libtool_version in #(vi
4578         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4579                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4580                 LIBTOOL="$LIBTOOL --tag=CC"
4581                 ;;
4582         *)
4583                 LIBTOOL_CXX="$LIBTOOL"
4584                 ;;
4585         esac
4586 else
4587         LIBTOOL=""
4588         LIBTOOL_CXX=""
4589 fi
4590
4591 test -z "$LIBTOOL" && ECHO_LT=
4592
4593 if test "$with_libtool" != "no" ; then
4594
4595 cf_list_models="$cf_list_models libtool"
4596
4597 else
4598
4599 echo "$as_me:4599: checking if you want to build shared libraries" >&5
4600 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4601
4602 # Check whether --with-shared or --without-shared was given.
4603 if test "${with_shared+set}" = set; then
4604   withval="$with_shared"
4605   with_shared=$withval
4606 else
4607   with_shared=no
4608 fi;
4609 echo "$as_me:4609: result: $with_shared" >&5
4610 echo "${ECHO_T}$with_shared" >&6
4611 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4612
4613 echo "$as_me:4613: checking if you want to build static libraries" >&5
4614 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4615
4616 # Check whether --with-normal or --without-normal was given.
4617 if test "${with_normal+set}" = set; then
4618   withval="$with_normal"
4619   with_normal=$withval
4620 else
4621   with_normal=yes
4622 fi;
4623 echo "$as_me:4623: result: $with_normal" >&5
4624 echo "${ECHO_T}$with_normal" >&6
4625 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4626
4627 echo "$as_me:4627: checking if you want to build debug libraries" >&5
4628 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4629
4630 # Check whether --with-debug or --without-debug was given.
4631 if test "${with_debug+set}" = set; then
4632   withval="$with_debug"
4633   with_debug=$withval
4634 else
4635   with_debug=yes
4636 fi;
4637 echo "$as_me:4637: result: $with_debug" >&5
4638 echo "${ECHO_T}$with_debug" >&6
4639 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4640
4641 echo "$as_me:4641: checking if you want to build profiling libraries" >&5
4642 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4643
4644 # Check whether --with-profile or --without-profile was given.
4645 if test "${with_profile+set}" = set; then
4646   withval="$with_profile"
4647   with_profile=$withval
4648 else
4649   with_profile=no
4650 fi;
4651 echo "$as_me:4651: result: $with_profile" >&5
4652 echo "${ECHO_T}$with_profile" >&6
4653 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4654
4655 fi
4656
4657 ###############################################################################
4658
4659 echo "$as_me:4659: checking for specified models" >&5
4660 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4661 test -z "$cf_list_models" && cf_list_models=normal
4662 test "$with_libtool" != "no" && cf_list_models=libtool
4663 echo "$as_me:4663: result: $cf_list_models" >&5
4664 echo "${ECHO_T}$cf_list_models" >&6
4665
4666 ### Use the first model as the default, and save its suffix for use in building
4667 ### up test-applications.
4668 echo "$as_me:4668: checking for default model" >&5
4669 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4670 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4671 echo "$as_me:4671: result: $DFT_LWR_MODEL" >&5
4672 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4673
4674 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4675
4676 TICS_NAME=tic
4677
4678 TINFO_NAME=tinfo
4679
4680 LIB_NAME=ncurses
4681
4682 LIB_DIR=../lib
4683 LIB_2ND=../../lib
4684
4685         case $cf_cv_system_name in #(vi
4686         OS/2*|os2*) #(vi
4687         LIB_PREFIX=''
4688         ;;
4689         *)      LIB_PREFIX='lib'
4690         ;;
4691         esac
4692 cf_prefix=$LIB_PREFIX
4693
4694 LIB_PREFIX=$cf_prefix
4695
4696 LIB_SUFFIX=
4697
4698 ###############################################################################
4699
4700 echo "$as_me:4700: checking if you want to build a separate terminfo library" >&5
4701 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4702
4703 # Check whether --with-termlib or --without-termlib was given.
4704 if test "${with_termlib+set}" = set; then
4705   withval="$with_termlib"
4706   with_termlib=$withval
4707 else
4708   with_termlib=no
4709 fi;
4710 echo "$as_me:4710: result: $with_termlib" >&5
4711 echo "${ECHO_T}$with_termlib" >&6
4712
4713 echo "$as_me:4713: checking if you want to build a separate tic library" >&5
4714 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4715
4716 # Check whether --with-ticlib or --without-ticlib was given.
4717 if test "${with_ticlib+set}" = set; then
4718   withval="$with_ticlib"
4719   with_ticlib=$withval
4720 else
4721   with_ticlib=no
4722 fi;
4723 echo "$as_me:4723: result: $with_ticlib" >&5
4724 echo "${ECHO_T}$with_ticlib" >&6
4725
4726 ### Checks for special libraries, must be done up-front.
4727 SHLIB_LIST=""
4728
4729 echo "$as_me:4729: checking if you want to link with the GPM mouse library" >&5
4730 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4731
4732 # Check whether --with-gpm or --without-gpm was given.
4733 if test "${with_gpm+set}" = set; then
4734   withval="$with_gpm"
4735   with_gpm=$withval
4736 else
4737   with_gpm=maybe
4738 fi;
4739 echo "$as_me:4739: result: $with_gpm" >&5
4740 echo "${ECHO_T}$with_gpm" >&6
4741
4742 if test "$with_gpm" != no ; then
4743         echo "$as_me:4743: checking for gpm.h" >&5
4744 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4745 if test "${ac_cv_header_gpm_h+set}" = set; then
4746   echo $ECHO_N "(cached) $ECHO_C" >&6
4747 else
4748   cat >conftest.$ac_ext <<_ACEOF
4749 #line 4749 "configure"
4750 #include "confdefs.h"
4751 #include <gpm.h>
4752 _ACEOF
4753 if { (eval echo "$as_me:4753: \"$ac_cpp conftest.$ac_ext\"") >&5
4754   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4755   ac_status=$?
4756   egrep -v '^ *\+' conftest.er1 >conftest.err
4757   rm -f conftest.er1
4758   cat conftest.err >&5
4759   echo "$as_me:4759: \$? = $ac_status" >&5
4760   (exit $ac_status); } >/dev/null; then
4761   if test -s conftest.err; then
4762     ac_cpp_err=$ac_c_preproc_warn_flag
4763   else
4764     ac_cpp_err=
4765   fi
4766 else
4767   ac_cpp_err=yes
4768 fi
4769 if test -z "$ac_cpp_err"; then
4770   ac_cv_header_gpm_h=yes
4771 else
4772   echo "$as_me: failed program was:" >&5
4773   cat conftest.$ac_ext >&5
4774   ac_cv_header_gpm_h=no
4775 fi
4776 rm -f conftest.err conftest.$ac_ext
4777 fi
4778 echo "$as_me:4778: result: $ac_cv_header_gpm_h" >&5
4779 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4780 if test $ac_cv_header_gpm_h = yes; then
4781
4782                 cat >>confdefs.h <<\EOF
4783 #define HAVE_GPM_H 1
4784 EOF
4785
4786                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4787                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4788
4789 echo "${as_me:-configure}:4789: testing assuming we really have GPM library ..." 1>&5
4790
4791                         cat >>confdefs.h <<\EOF
4792 #define HAVE_LIBGPM 1
4793 EOF
4794
4795                 else
4796                         echo "$as_me:4796: checking for Gpm_Open in -lgpm" >&5
4797 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4798 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4799   echo $ECHO_N "(cached) $ECHO_C" >&6
4800 else
4801   ac_check_lib_save_LIBS=$LIBS
4802 LIBS="-lgpm  $LIBS"
4803 cat >conftest.$ac_ext <<_ACEOF
4804 #line 4804 "configure"
4805 #include "confdefs.h"
4806
4807 /* Override any gcc2 internal prototype to avoid an error.  */
4808 #ifdef __cplusplus
4809 extern "C"
4810 #endif
4811 /* We use char because int might match the return type of a gcc2
4812    builtin and then its argument prototype would still apply.  */
4813 char Gpm_Open ();
4814 int
4815 main ()
4816 {
4817 Gpm_Open ();
4818   ;
4819   return 0;
4820 }
4821 _ACEOF
4822 rm -f conftest.$ac_objext conftest$ac_exeext
4823 if { (eval echo "$as_me:4823: \"$ac_link\"") >&5
4824   (eval $ac_link) 2>&5
4825   ac_status=$?
4826   echo "$as_me:4826: \$? = $ac_status" >&5
4827   (exit $ac_status); } &&
4828          { ac_try='test -s conftest$ac_exeext'
4829   { (eval echo "$as_me:4829: \"$ac_try\"") >&5
4830   (eval $ac_try) 2>&5
4831   ac_status=$?
4832   echo "$as_me:4832: \$? = $ac_status" >&5
4833   (exit $ac_status); }; }; then
4834   ac_cv_lib_gpm_Gpm_Open=yes
4835 else
4836   echo "$as_me: failed program was:" >&5
4837 cat conftest.$ac_ext >&5
4838 ac_cv_lib_gpm_Gpm_Open=no
4839 fi
4840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4841 LIBS=$ac_check_lib_save_LIBS
4842 fi
4843 echo "$as_me:4843: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4844 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4845 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4846   :
4847 else
4848
4849                                 { { echo "$as_me:4849: error: Cannot link with GPM library" >&5
4850 echo "$as_me: error: Cannot link with GPM library" >&2;}
4851    { (exit 1); exit 1; }; }
4852                 fi
4853                 with_gpm=yes
4854
4855 fi
4856
4857 else
4858
4859                 test "$with_gpm" != maybe && { echo "$as_me:4859: WARNING: Cannot find GPM header" >&5
4860 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4861                 with_gpm=no
4862
4863 fi
4864
4865 fi
4866
4867 if test "$with_gpm" != no ; then
4868         echo "$as_me:4868: checking if you want to load GPM dynamically" >&5
4869 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4870
4871 # Check whether --with-dlsym or --without-dlsym was given.
4872 if test "${with_dlsym+set}" = set; then
4873   withval="$with_dlsym"
4874   with_dlsym=$withval
4875 else
4876   with_dlsym=yes
4877 fi;
4878         echo "$as_me:4878: result: $with_dlsym" >&5
4879 echo "${ECHO_T}$with_dlsym" >&6
4880         if test "$with_dlsym" = yes ; then
4881
4882 cf_have_dlsym=no
4883 echo "$as_me:4883: checking for dlsym" >&5
4884 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4885 if test "${ac_cv_func_dlsym+set}" = set; then
4886   echo $ECHO_N "(cached) $ECHO_C" >&6
4887 else
4888   cat >conftest.$ac_ext <<_ACEOF
4889 #line 4889 "configure"
4890 #include "confdefs.h"
4891 /* System header to define __stub macros and hopefully few prototypes,
4892     which can conflict with char dlsym (); below.  */
4893 #include <assert.h>
4894 /* Override any gcc2 internal prototype to avoid an error.  */
4895 #ifdef __cplusplus
4896 extern "C"
4897 #endif
4898 /* We use char because int might match the return type of a gcc2
4899    builtin and then its argument prototype would still apply.  */
4900 char dlsym ();
4901 char (*f) ();
4902
4903 int
4904 main ()
4905 {
4906 /* The GNU C library defines this for functions which it implements
4907     to always fail with ENOSYS.  Some functions are actually named
4908     something starting with __ and the normal name is an alias.  */
4909 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4910 choke me
4911 #else
4912 f = dlsym;
4913 #endif
4914
4915   ;
4916   return 0;
4917 }
4918 _ACEOF
4919 rm -f conftest.$ac_objext conftest$ac_exeext
4920 if { (eval echo "$as_me:4920: \"$ac_link\"") >&5
4921   (eval $ac_link) 2>&5
4922   ac_status=$?
4923   echo "$as_me:4923: \$? = $ac_status" >&5
4924   (exit $ac_status); } &&
4925          { ac_try='test -s conftest$ac_exeext'
4926   { (eval echo "$as_me:4926: \"$ac_try\"") >&5
4927   (eval $ac_try) 2>&5
4928   ac_status=$?
4929   echo "$as_me:4929: \$? = $ac_status" >&5
4930   (exit $ac_status); }; }; then
4931   ac_cv_func_dlsym=yes
4932 else
4933   echo "$as_me: failed program was:" >&5
4934 cat conftest.$ac_ext >&5
4935 ac_cv_func_dlsym=no
4936 fi
4937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4938 fi
4939 echo "$as_me:4939: result: $ac_cv_func_dlsym" >&5
4940 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4941 if test $ac_cv_func_dlsym = yes; then
4942   cf_have_dlsym=yes
4943 else
4944
4945 cf_have_libdl=no
4946 echo "$as_me:4946: checking for dlsym in -ldl" >&5
4947 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4948 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   ac_check_lib_save_LIBS=$LIBS
4952 LIBS="-ldl  $LIBS"
4953 cat >conftest.$ac_ext <<_ACEOF
4954 #line 4954 "configure"
4955 #include "confdefs.h"
4956
4957 /* Override any gcc2 internal prototype to avoid an error.  */
4958 #ifdef __cplusplus
4959 extern "C"
4960 #endif
4961 /* We use char because int might match the return type of a gcc2
4962    builtin and then its argument prototype would still apply.  */
4963 char dlsym ();
4964 int
4965 main ()
4966 {
4967 dlsym ();
4968   ;
4969   return 0;
4970 }
4971 _ACEOF
4972 rm -f conftest.$ac_objext conftest$ac_exeext
4973 if { (eval echo "$as_me:4973: \"$ac_link\"") >&5
4974   (eval $ac_link) 2>&5
4975   ac_status=$?
4976   echo "$as_me:4976: \$? = $ac_status" >&5
4977   (exit $ac_status); } &&
4978          { ac_try='test -s conftest$ac_exeext'
4979   { (eval echo "$as_me:4979: \"$ac_try\"") >&5
4980   (eval $ac_try) 2>&5
4981   ac_status=$?
4982   echo "$as_me:4982: \$? = $ac_status" >&5
4983   (exit $ac_status); }; }; then
4984   ac_cv_lib_dl_dlsym=yes
4985 else
4986   echo "$as_me: failed program was:" >&5
4987 cat conftest.$ac_ext >&5
4988 ac_cv_lib_dl_dlsym=no
4989 fi
4990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4991 LIBS=$ac_check_lib_save_LIBS
4992 fi
4993 echo "$as_me:4993: result: $ac_cv_lib_dl_dlsym" >&5
4994 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4995 if test $ac_cv_lib_dl_dlsym = yes; then
4996
4997         cf_have_dlsym=yes
4998         cf_have_libdl=yes
4999 fi
5000
5001 fi
5002
5003 if test "$cf_have_dlsym" = yes ; then
5004         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5005
5006         echo "$as_me:5006: checking whether able to link to dl*() functions" >&5
5007 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5008         cat >conftest.$ac_ext <<_ACEOF
5009 #line 5009 "configure"
5010 #include "confdefs.h"
5011 #include <dlfcn.h>
5012 int
5013 main ()
5014 {
5015
5016                 void *obj;
5017                 if ((obj = dlopen("filename", 0)) != 0) {
5018                         if (dlsym(obj, "symbolname") == 0) {
5019                         dlclose(obj);
5020                         }
5021                 }
5022   ;
5023   return 0;
5024 }
5025 _ACEOF
5026 rm -f conftest.$ac_objext conftest$ac_exeext
5027 if { (eval echo "$as_me:5027: \"$ac_link\"") >&5
5028   (eval $ac_link) 2>&5
5029   ac_status=$?
5030   echo "$as_me:5030: \$? = $ac_status" >&5
5031   (exit $ac_status); } &&
5032          { ac_try='test -s conftest$ac_exeext'
5033   { (eval echo "$as_me:5033: \"$ac_try\"") >&5
5034   (eval $ac_try) 2>&5
5035   ac_status=$?
5036   echo "$as_me:5036: \$? = $ac_status" >&5
5037   (exit $ac_status); }; }; then
5038
5039                 cat >>confdefs.h <<\EOF
5040 #define HAVE_LIBDL 1
5041 EOF
5042
5043 else
5044   echo "$as_me: failed program was:" >&5
5045 cat conftest.$ac_ext >&5
5046
5047                 { { echo "$as_me:5047: error: Cannot link test program for libdl" >&5
5048 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5049    { (exit 1); exit 1; }; }
5050 fi
5051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5052         echo "$as_me:5052: result: ok" >&5
5053 echo "${ECHO_T}ok" >&6
5054 else
5055         { { echo "$as_me:5055: error: Cannot find dlsym function" >&5
5056 echo "$as_me: error: Cannot find dlsym function" >&2;}
5057    { (exit 1); exit 1; }; }
5058 fi
5059
5060                 if test "$with_gpm" != yes ; then
5061                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5062
5063 echo "${as_me:-configure}:5063: testing assuming soname for gpm is $with_gpm ..." 1>&5
5064
5065                         cf_cv_gpm_soname="$with_gpm"
5066                 else
5067
5068 echo "$as_me:5068: checking for soname of gpm library" >&5
5069 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5070 if test "${cf_cv_gpm_soname+set}" = set; then
5071   echo $ECHO_N "(cached) $ECHO_C" >&6
5072 else
5073
5074 cf_cv_gpm_soname=unknown
5075 if test "$cross_compiling" != yes ; then
5076 cat >conftest.$ac_ext <<CF_EOF
5077 #include <gpm.h>
5078 int main()
5079 {
5080 if (Gpm_Open(0,0)) Gpm_Close();
5081         ${cf_cv_main_return:-return}(0);
5082 }
5083 CF_EOF
5084 cf_save_LIBS="$LIBS"
5085         LIBS="-lgpm $LIBS"
5086         if { (eval echo "$as_me:5086: \"$ac_compile\"") >&5
5087   (eval $ac_compile) 2>&5
5088   ac_status=$?
5089   echo "$as_me:5089: \$? = $ac_status" >&5
5090   (exit $ac_status); } ; then
5091                 if { (eval echo "$as_me:5091: \"$ac_link\"") >&5
5092   (eval $ac_link) 2>&5
5093   ac_status=$?
5094   echo "$as_me:5094: \$? = $ac_status" >&5
5095   (exit $ac_status); } ; then
5096                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5097                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5098                 fi
5099         fi
5100 rm -rf conftest*
5101 LIBS="$cf_save_LIBS"
5102 fi
5103
5104 fi
5105 echo "$as_me:5105: result: $cf_cv_gpm_soname" >&5
5106 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5107
5108                 fi
5109                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5110 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5111 EOF
5112
5113                 SHLIB_LIST="-ldl $SHLIB_LIST"
5114         else
5115                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5116                 TEST_LIBS="-lgpm $TEST_LIBS"
5117         fi
5118         cat >>confdefs.h <<\EOF
5119 #define HAVE_LIBGPM 1
5120 EOF
5121
5122 echo "$as_me:5122: checking for Gpm_Wgetch in -lgpm" >&5
5123 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5124 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5125   echo $ECHO_N "(cached) $ECHO_C" >&6
5126 else
5127   ac_check_lib_save_LIBS=$LIBS
5128 LIBS="-lgpm  $LIBS"
5129 cat >conftest.$ac_ext <<_ACEOF
5130 #line 5130 "configure"
5131 #include "confdefs.h"
5132
5133 /* Override any gcc2 internal prototype to avoid an error.  */
5134 #ifdef __cplusplus
5135 extern "C"
5136 #endif
5137 /* We use char because int might match the return type of a gcc2
5138    builtin and then its argument prototype would still apply.  */
5139 char Gpm_Wgetch ();
5140 int
5141 main ()
5142 {
5143 Gpm_Wgetch ();
5144   ;
5145   return 0;
5146 }
5147 _ACEOF
5148 rm -f conftest.$ac_objext conftest$ac_exeext
5149 if { (eval echo "$as_me:5149: \"$ac_link\"") >&5
5150   (eval $ac_link) 2>&5
5151   ac_status=$?
5152   echo "$as_me:5152: \$? = $ac_status" >&5
5153   (exit $ac_status); } &&
5154          { ac_try='test -s conftest$ac_exeext'
5155   { (eval echo "$as_me:5155: \"$ac_try\"") >&5
5156   (eval $ac_try) 2>&5
5157   ac_status=$?
5158   echo "$as_me:5158: \$? = $ac_status" >&5
5159   (exit $ac_status); }; }; then
5160   ac_cv_lib_gpm_Gpm_Wgetch=yes
5161 else
5162   echo "$as_me: failed program was:" >&5
5163 cat conftest.$ac_ext >&5
5164 ac_cv_lib_gpm_Gpm_Wgetch=no
5165 fi
5166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5167 LIBS=$ac_check_lib_save_LIBS
5168 fi
5169 echo "$as_me:5169: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5170 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5171 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5172
5173 echo "$as_me:5173: checking if GPM is weakly bound to curses library" >&5
5174 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5175 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5176   echo $ECHO_N "(cached) $ECHO_C" >&6
5177 else
5178
5179 cf_cv_check_gpm_wgetch=unknown
5180 if test "$cross_compiling" != yes ; then
5181
5182 cat >conftest.$ac_ext <<CF_EOF
5183 #include <gpm.h>
5184 int main()
5185 {
5186         Gpm_Wgetch();
5187         ${cf_cv_main_return:-return}(0);
5188 }
5189 CF_EOF
5190
5191         cf_save_LIBS="$LIBS"
5192         # This only works if we can look at the symbol table.  If a shared
5193         # library is stripped for install, we cannot use that.  So we're forced
5194         # to rely on the static library, noting that some packagers may not
5195         # include it.
5196         LIBS="-static -lgpm -dynamic $LIBS"
5197         if { (eval echo "$as_me:5197: \"$ac_compile\"") >&5
5198   (eval $ac_compile) 2>&5
5199   ac_status=$?
5200   echo "$as_me:5200: \$? = $ac_status" >&5
5201   (exit $ac_status); } ; then
5202                 if { (eval echo "$as_me:5202: \"$ac_link\"") >&5
5203   (eval $ac_link) 2>&5
5204   ac_status=$?
5205   echo "$as_me:5205: \$? = $ac_status" >&5
5206   (exit $ac_status); } ; then
5207                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5208                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5209                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5210                 fi
5211         fi
5212         rm -rf conftest*
5213         LIBS="$cf_save_LIBS"
5214 fi
5215
5216 fi
5217 echo "$as_me:5217: result: $cf_cv_check_gpm_wgetch" >&5
5218 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5219
5220 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5221         { echo "$as_me:5221: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5222 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5223 fi
5224
5225 fi
5226
5227 fi
5228
5229 # not everyone has "test -c"
5230 if test -c /dev/sysmouse 2>/dev/null ; then
5231 echo "$as_me:5231: checking if you want to use sysmouse" >&5
5232 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5233
5234 # Check whether --with-sysmouse or --without-sysmouse was given.
5235 if test "${with_sysmouse+set}" = set; then
5236   withval="$with_sysmouse"
5237   cf_with_sysmouse=$withval
5238 else
5239   cf_with_sysmouse=maybe
5240 fi;
5241         if test "$cf_with_sysmouse" != no ; then
5242         cat >conftest.$ac_ext <<_ACEOF
5243 #line 5243 "configure"
5244 #include "confdefs.h"
5245
5246 #include <osreldate.h>
5247 #if (__FreeBSD_version >= 400017)
5248 #include <sys/consio.h>
5249 #include <sys/fbio.h>
5250 #else
5251 #include <machine/console.h>
5252 #endif
5253
5254 int
5255 main ()
5256 {
5257
5258         struct mouse_info the_mouse;
5259         ioctl(0, CONS_MOUSECTL, &the_mouse);
5260
5261   ;
5262   return 0;
5263 }
5264 _ACEOF
5265 rm -f conftest.$ac_objext
5266 if { (eval echo "$as_me:5266: \"$ac_compile\"") >&5
5267   (eval $ac_compile) 2>&5
5268   ac_status=$?
5269   echo "$as_me:5269: \$? = $ac_status" >&5
5270   (exit $ac_status); } &&
5271          { ac_try='test -s conftest.$ac_objext'
5272   { (eval echo "$as_me:5272: \"$ac_try\"") >&5
5273   (eval $ac_try) 2>&5
5274   ac_status=$?
5275   echo "$as_me:5275: \$? = $ac_status" >&5
5276   (exit $ac_status); }; }; then
5277   cf_with_sysmouse=yes
5278 else
5279   echo "$as_me: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 cf_with_sysmouse=no
5282 fi
5283 rm -f conftest.$ac_objext conftest.$ac_ext
5284         fi
5285 echo "$as_me:5285: result: $cf_with_sysmouse" >&5
5286 echo "${ECHO_T}$cf_with_sysmouse" >&6
5287 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5288 #define USE_SYSMOUSE 1
5289 EOF
5290
5291 fi
5292
5293 if test X"$CC_G_OPT" = X"" ; then
5294         CC_G_OPT='-g'
5295         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5296 fi
5297
5298 if test X"$CXX_G_OPT" = X"" ; then
5299         CXX_G_OPT='-g'
5300         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5301 fi
5302
5303 echo "$as_me:5303: checking for default loader flags" >&5
5304 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5305 case $DFT_LWR_MODEL in
5306 libtool) LD_MODEL=''   ;;
5307 normal)  LD_MODEL=''   ;;
5308 debug)   LD_MODEL=$CC_G_OPT ;;
5309 profile) LD_MODEL='-pg';;
5310 shared)  LD_MODEL=''   ;;
5311 esac
5312 echo "$as_me:5312: result: $LD_MODEL" >&5
5313 echo "${ECHO_T}$LD_MODEL" >&6
5314
5315 case $DFT_LWR_MODEL in
5316 shared)
5317
5318 echo "$as_me:5318: checking if rpath option should be used" >&5
5319 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5320
5321 # Check whether --enable-rpath or --disable-rpath was given.
5322 if test "${enable_rpath+set}" = set; then
5323   enableval="$enable_rpath"
5324   cf_cv_enable_rpath=$enableval
5325 else
5326   cf_cv_enable_rpath=no
5327 fi;
5328 echo "$as_me:5328: result: $cf_cv_enable_rpath" >&5
5329 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5330
5331 echo "$as_me:5331: checking if shared libraries should be relinked during install" >&5
5332 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5333
5334 # Check whether --enable-relink or --disable-relink was given.
5335 if test "${enable_relink+set}" = set; then
5336   enableval="$enable_relink"
5337   cf_cv_do_relink=$enableval
5338 else
5339   cf_cv_do_relink=yes
5340 fi;
5341 echo "$as_me:5341: result: $cf_cv_do_relink" >&5
5342 echo "${ECHO_T}$cf_cv_do_relink" >&6
5343         ;;
5344 esac
5345
5346 LD_RPATH_OPT=
5347 echo "$as_me:5347: checking for an rpath option" >&5
5348 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5349 case $cf_cv_system_name in #(vi
5350 irix*) #(vi
5351         if test "$GCC" = yes; then
5352                 LD_RPATH_OPT="-Wl,-rpath,"
5353         else
5354                 LD_RPATH_OPT="-rpath "
5355         fi
5356         ;;
5357 linux*|gnu*|k*bsd*-gnu) #(vi
5358         LD_RPATH_OPT="-Wl,-rpath,"
5359         ;;
5360 openbsd[2-9].*) #(vi
5361         LD_RPATH_OPT="-Wl,-rpath,"
5362         ;;
5363 freebsd*) #(vi
5364         LD_RPATH_OPT="-rpath "
5365         ;;
5366 netbsd*) #(vi
5367         LD_RPATH_OPT="-Wl,-rpath,"
5368         ;;
5369 osf*|mls+*) #(vi
5370         LD_RPATH_OPT="-rpath "
5371         ;;
5372 solaris2*) #(vi
5373         LD_RPATH_OPT="-R"
5374         ;;
5375 *)
5376         ;;
5377 esac
5378 echo "$as_me:5378: result: $LD_RPATH_OPT" >&5
5379 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5380
5381 case "x$LD_RPATH_OPT" in #(vi
5382 x-R*)
5383         echo "$as_me:5383: checking if we need a space after rpath option" >&5
5384 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5385         cf_save_LIBS="$LIBS"
5386         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5387         cat >conftest.$ac_ext <<_ACEOF
5388 #line 5388 "configure"
5389 #include "confdefs.h"
5390
5391 int
5392 main ()
5393 {
5394
5395   ;
5396   return 0;
5397 }
5398 _ACEOF
5399 rm -f conftest.$ac_objext conftest$ac_exeext
5400 if { (eval echo "$as_me:5400: \"$ac_link\"") >&5
5401   (eval $ac_link) 2>&5
5402   ac_status=$?
5403   echo "$as_me:5403: \$? = $ac_status" >&5
5404   (exit $ac_status); } &&
5405          { ac_try='test -s conftest$ac_exeext'
5406   { (eval echo "$as_me:5406: \"$ac_try\"") >&5
5407   (eval $ac_try) 2>&5
5408   ac_status=$?
5409   echo "$as_me:5409: \$? = $ac_status" >&5
5410   (exit $ac_status); }; }; then
5411   cf_rpath_space=no
5412 else
5413   echo "$as_me: failed program was:" >&5
5414 cat conftest.$ac_ext >&5
5415 cf_rpath_space=yes
5416 fi
5417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5418         LIBS="$cf_save_LIBS"
5419         echo "$as_me:5419: result: $cf_rpath_space" >&5
5420 echo "${ECHO_T}$cf_rpath_space" >&6
5421         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5422         ;;
5423 esac
5424
5425         LOCAL_LDFLAGS=
5426         LOCAL_LDFLAGS2=
5427         LD_SHARED_OPTS=
5428         INSTALL_LIB="-m 644"
5429
5430         cf_cv_do_symlinks=no
5431         cf_ld_rpath_opt=
5432         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5433
5434         echo "$as_me:5434: checking if release/abi version should be used for shared libs" >&5
5435 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5436
5437 # Check whether --with-shlib-version or --without-shlib-version was given.
5438 if test "${with_shlib_version+set}" = set; then
5439   withval="$with_shlib_version"
5440   test -z "$withval" && withval=auto
5441         case $withval in #(vi
5442         yes) #(vi
5443                 cf_cv_shlib_version=auto
5444                 ;;
5445         rel|abi|auto|no) #(vi
5446                 cf_cv_shlib_version=$withval
5447                 ;;
5448         *)
5449                 { { echo "$as_me:5449: error: option value must be one of: rel, abi, auto or no" >&5
5450 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5451    { (exit 1); exit 1; }; }
5452                 ;;
5453         esac
5454
5455 else
5456   cf_cv_shlib_version=auto
5457 fi;
5458         echo "$as_me:5458: result: $cf_cv_shlib_version" >&5
5459 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5460
5461         cf_cv_rm_so_locs=no
5462
5463         # Some less-capable ports of gcc support only -fpic
5464         CC_SHARED_OPTS=
5465         if test "$GCC" = yes
5466         then
5467                 echo "$as_me:5467: checking which $CC option to use" >&5
5468 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5469                 cf_save_CFLAGS="$CFLAGS"
5470                 for CC_SHARED_OPTS in -fPIC -fpic ''
5471                 do
5472                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5473                         cat >conftest.$ac_ext <<_ACEOF
5474 #line 5474 "configure"
5475 #include "confdefs.h"
5476 #include <stdio.h>
5477 int
5478 main ()
5479 {
5480 int x = 1
5481   ;
5482   return 0;
5483 }
5484 _ACEOF
5485 rm -f conftest.$ac_objext
5486 if { (eval echo "$as_me:5486: \"$ac_compile\"") >&5
5487   (eval $ac_compile) 2>&5
5488   ac_status=$?
5489   echo "$as_me:5489: \$? = $ac_status" >&5
5490   (exit $ac_status); } &&
5491          { ac_try='test -s conftest.$ac_objext'
5492   { (eval echo "$as_me:5492: \"$ac_try\"") >&5
5493   (eval $ac_try) 2>&5
5494   ac_status=$?
5495   echo "$as_me:5495: \$? = $ac_status" >&5
5496   (exit $ac_status); }; }; then
5497   break
5498 else
5499   echo "$as_me: failed program was:" >&5
5500 cat conftest.$ac_ext >&5
5501 fi
5502 rm -f conftest.$ac_objext conftest.$ac_ext
5503                 done
5504                 echo "$as_me:5504: result: $CC_SHARED_OPTS" >&5
5505 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5506                 CFLAGS="$cf_save_CFLAGS"
5507         fi
5508
5509         cf_cv_shlib_version_infix=no
5510
5511         case $cf_cv_system_name in #(vi
5512         aix[56]*) #(vi
5513                 if test "$GCC" = yes; then
5514                         CC_SHARED_OPTS=
5515                         MK_SHARED_LIB='$(CC) -shared'
5516                 fi
5517                 ;;
5518         beos*) #(vi
5519                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5520                 ;;
5521         cygwin*) #(vi
5522                 CC_SHARED_OPTS=
5523                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5524                 cf_cv_shlib_version=cygdll
5525                 cf_cv_shlib_version_infix=cygdll
5526                 cat >mk_shared_lib.sh <<-CF_EOF
5527                 #!/bin/sh
5528                 SHARED_LIB=\$1
5529                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5530                 shift
5531                 cat <<-EOF
5532                 Linking shared library
5533                 ** SHARED_LIB \$SHARED_LIB
5534                 ** IMPORT_LIB \$IMPORT_LIB
5535 EOF
5536                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5537 CF_EOF
5538                 chmod +x mk_shared_lib.sh
5539                 ;;
5540         darwin*) #(vi
5541                 EXTRA_CFLAGS="-no-cpp-precomp"
5542                 CC_SHARED_OPTS="-dynamic"
5543                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5544                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5545                 cf_cv_shlib_version_infix=yes
5546                 echo "$as_me:5546: checking if ld -search_paths_first works" >&5
5547 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5548 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5549   echo $ECHO_N "(cached) $ECHO_C" >&6
5550 else
5551
5552                         cf_save_LDFLAGS=$LDFLAGS
5553                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5554                         cat >conftest.$ac_ext <<_ACEOF
5555 #line 5555 "configure"
5556 #include "confdefs.h"
5557
5558 int
5559 main ()
5560 {
5561 int i;
5562   ;
5563   return 0;
5564 }
5565 _ACEOF
5566 rm -f conftest.$ac_objext conftest$ac_exeext
5567 if { (eval echo "$as_me:5567: \"$ac_link\"") >&5
5568   (eval $ac_link) 2>&5
5569   ac_status=$?
5570   echo "$as_me:5570: \$? = $ac_status" >&5
5571   (exit $ac_status); } &&
5572          { ac_try='test -s conftest$ac_exeext'
5573   { (eval echo "$as_me:5573: \"$ac_try\"") >&5
5574   (eval $ac_try) 2>&5
5575   ac_status=$?
5576   echo "$as_me:5576: \$? = $ac_status" >&5
5577   (exit $ac_status); }; }; then
5578   cf_cv_ldflags_search_paths_first=yes
5579 else
5580   echo "$as_me: failed program was:" >&5
5581 cat conftest.$ac_ext >&5
5582 cf_cv_ldflags_search_paths_first=no
5583 fi
5584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5585                                 LDFLAGS=$cf_save_LDFLAGS
5586 fi
5587 echo "$as_me:5587: result: $cf_cv_ldflags_search_paths_first" >&5
5588 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5589                 if test $cf_cv_ldflags_search_paths_first = yes; then
5590                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5591                 fi
5592                 ;;
5593         hpux*) #(vi
5594                 # (tested with gcc 2.7.2 -- I don't have c89)
5595                 if test "$GCC" = yes; then
5596                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5597                 else
5598                         CC_SHARED_OPTS='+Z'
5599                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5600                 fi
5601                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5602                 # HP-UX shared libraries must be executable, and should be
5603                 # readonly to exploit a quirk in the memory manager.
5604                 INSTALL_LIB="-m 555"
5605                 ;;
5606         irix*) #(vi
5607                 if test "$cf_cv_enable_rpath" = yes ; then
5608                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5609                 fi
5610                 # tested with IRIX 5.2 and 'cc'.
5611                 if test "$GCC" != yes; then
5612                         CC_SHARED_OPTS='-KPIC'
5613                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5614                 else
5615                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5616                 fi
5617                 cf_cv_rm_so_locs=yes
5618                 ;;
5619         linux*|gnu*|k*bsd*-gnu) #(vi
5620                 if test "$DFT_LWR_MODEL" = "shared" ; then
5621                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5622                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5623                 fi
5624                 if test "$cf_cv_enable_rpath" = yes ; then
5625                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5626                 fi
5627
5628         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5629         if test "$cf_cv_shlib_version" = rel; then
5630                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5631         else
5632                 cf_cv_shared_soname='`basename $@`'
5633         fi
5634
5635                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5636                 ;;
5637         openbsd[2-9].*) #(vi
5638                 if test "$DFT_LWR_MODEL" = "shared" ; then
5639                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5640                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5641                 fi
5642                 if test "$cf_cv_enable_rpath" = yes ; then
5643                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5644                 fi
5645                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5646
5647         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5648         if test "$cf_cv_shlib_version" = rel; then
5649                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5650         else
5651                 cf_cv_shared_soname='`basename $@`'
5652         fi
5653
5654                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5655                 ;;
5656         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5657                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5658                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5659                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5660                 ;;
5661         freebsd*) #(vi
5662                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5663                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5664                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5665                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5666                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5667                 fi
5668
5669         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5670         if test "$cf_cv_shlib_version" = rel; then
5671                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5672         else
5673                 cf_cv_shared_soname='`basename $@`'
5674         fi
5675
5676                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5677                 ;;
5678         netbsd*) #(vi
5679                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5680                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5681                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5682                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5683                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5684                         if test "$cf_cv_shlib_version" = auto; then
5685                         if test -f /usr/libexec/ld.elf_so; then
5686                                 cf_cv_shlib_version=abi
5687                         else
5688                                 cf_cv_shlib_version=rel
5689                         fi
5690                         fi
5691
5692         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5693         if test "$cf_cv_shlib_version" = rel; then
5694                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5695         else
5696                 cf_cv_shared_soname='`basename $@`'
5697         fi
5698
5699                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5700                 else
5701                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5702                 fi
5703                 ;;
5704         osf*|mls+*) #(vi
5705                 # tested with OSF/1 V3.2 and 'cc'
5706                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5707                 # link with shared libs).
5708                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5709                 case $host_os in #(vi
5710                 osf4*)
5711                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5712                         ;;
5713                 esac
5714                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5715                 if test "$DFT_LWR_MODEL" = "shared" ; then
5716                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5717                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5718                 fi
5719                 cf_cv_rm_so_locs=yes
5720                 ;;
5721         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5722                 # tested with osr5.0.5
5723                 if test "$GCC" != yes; then
5724                         CC_SHARED_OPTS='-belf -KPIC'
5725                 fi
5726                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5727                 if test "$cf_cv_enable_rpath" = yes ; then
5728                         # only way is to set LD_RUN_PATH but no switch for it
5729                         RUN_PATH=$libdir
5730                 fi
5731                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5732                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5733                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5734                 ;;
5735         sunos4*) #(vi
5736                 # tested with SunOS 4.1.1 and gcc 2.7.0
5737                 if test "$GCC" != yes; then
5738                         CC_SHARED_OPTS='-KPIC'
5739                 fi
5740                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5741                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5742                 ;;
5743         solaris2*) #(vi
5744                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5745                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5746                 if test "$DFT_LWR_MODEL" = "shared" ; then
5747                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5748                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5749                 fi
5750                 if test "$cf_cv_enable_rpath" = yes ; then
5751                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5752                 fi
5753
5754         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5755         if test "$cf_cv_shlib_version" = rel; then
5756                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5757         else
5758                 cf_cv_shared_soname='`basename $@`'
5759         fi
5760
5761                 if test "$GCC" != yes; then
5762                         cf_save_CFLAGS="$CFLAGS"
5763                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5764                         do
5765                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5766                                 cat >conftest.$ac_ext <<_ACEOF
5767 #line 5767 "configure"
5768 #include "confdefs.h"
5769 #include <stdio.h>
5770 int
5771 main ()
5772 {
5773 printf("Hello\n");
5774   ;
5775   return 0;
5776 }
5777 _ACEOF
5778 rm -f conftest.$ac_objext
5779 if { (eval echo "$as_me:5779: \"$ac_compile\"") >&5
5780   (eval $ac_compile) 2>&5
5781   ac_status=$?
5782   echo "$as_me:5782: \$? = $ac_status" >&5
5783   (exit $ac_status); } &&
5784          { ac_try='test -s conftest.$ac_objext'
5785   { (eval echo "$as_me:5785: \"$ac_try\"") >&5
5786   (eval $ac_try) 2>&5
5787   ac_status=$?
5788   echo "$as_me:5788: \$? = $ac_status" >&5
5789   (exit $ac_status); }; }; then
5790   break
5791 else
5792   echo "$as_me: failed program was:" >&5
5793 cat conftest.$ac_ext >&5
5794 fi
5795 rm -f conftest.$ac_objext conftest.$ac_ext
5796                         done
5797                         CFLAGS="$cf_save_CFLAGS"
5798                         CC_SHARED_OPTS=$cf_shared_opts
5799                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5800                 else
5801                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5802                 fi
5803                 ;;
5804         sysv5uw7*|unix_sv*) #(vi
5805                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5806                 if test "$GCC" != yes; then
5807                         CC_SHARED_OPTS='-KPIC'
5808                 fi
5809                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5810                 ;;
5811         *)
5812                 CC_SHARED_OPTS='unknown'
5813                 MK_SHARED_LIB='echo unknown'
5814                 ;;
5815         esac
5816
5817         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5818         case "$cf_cv_shlib_version" in #(vi
5819         rel|abi)
5820                 case "$MK_SHARED_LIB" in #(vi
5821                 *'-o $@') #(vi
5822                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5823                         ;;
5824                 *)
5825                         { echo "$as_me:5825: WARNING: ignored --with-shlib-version" >&5
5826 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5827                         ;;
5828                 esac
5829                 ;;
5830         esac
5831
5832         if test -n "$cf_ld_rpath_opt" ; then
5833                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5834         fi
5835
5836 if test "$CC_SHARED_OPTS" = "unknown"; then
5837         for model in $cf_list_models; do
5838                 if test "$model" = "shared"; then
5839                         { { echo "$as_me:5839: error: Shared libraries are not supported in this version" >&5
5840 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5841    { (exit 1); exit 1; }; }
5842                 fi
5843         done
5844 fi
5845
5846 ### If we're building with rpath, try to link non-standard libs that way too.
5847 if test "$DFT_LWR_MODEL" = "shared"; then
5848
5849 echo "$as_me:5849: checking if rpath should be not be set" >&5
5850 echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
5851
5852 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5853 if test "${enable_rpath_hack+set}" = set; then
5854   enableval="$enable_rpath_hack"
5855   test "$enableval" != no && enableval=yes
5856   if test "$enableval" != "yes" ; then
5857     cf_disable_rpath_hack=yes
5858   else
5859     cf_disable_rpath_hack=no
5860   fi
5861 else
5862   enableval=yes
5863   cf_disable_rpath_hack=no
5864
5865 fi;
5866 echo "$as_me:5866: result: $cf_disable_rpath_hack" >&5
5867 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5868 if test "$cf_disable_rpath_hack" = no ; then
5869
5870 echo "$as_me:5870: checking for updated LDFLAGS" >&5
5871 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5872 if test -n "$LD_RPATH_OPT" ; then
5873         echo "$as_me:5873: result: maybe" >&5
5874 echo "${ECHO_T}maybe" >&6
5875
5876         for ac_prog in ldd
5877 do
5878   # Extract the first word of "$ac_prog", so it can be a program name with args.
5879 set dummy $ac_prog; ac_word=$2
5880 echo "$as_me:5880: checking for $ac_word" >&5
5881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5882 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5883   echo $ECHO_N "(cached) $ECHO_C" >&6
5884 else
5885   if test -n "$cf_ldd_prog"; then
5886   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5887 else
5888   ac_save_IFS=$IFS; IFS=$ac_path_separator
5889 ac_dummy="$PATH"
5890 for ac_dir in $ac_dummy; do
5891   IFS=$ac_save_IFS
5892   test -z "$ac_dir" && ac_dir=.
5893   $as_executable_p "$ac_dir/$ac_word" || continue
5894 ac_cv_prog_cf_ldd_prog="$ac_prog"
5895 echo "$as_me:5895: found $ac_dir/$ac_word" >&5
5896 break
5897 done
5898
5899 fi
5900 fi
5901 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5902 if test -n "$cf_ldd_prog"; then
5903   echo "$as_me:5903: result: $cf_ldd_prog" >&5
5904 echo "${ECHO_T}$cf_ldd_prog" >&6
5905 else
5906   echo "$as_me:5906: result: no" >&5
5907 echo "${ECHO_T}no" >&6
5908 fi
5909
5910   test -n "$cf_ldd_prog" && break
5911 done
5912 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5913
5914         cf_rpath_list="/usr/lib /lib"
5915         if test "$cf_ldd_prog" != no
5916         then
5917 cat >conftest.$ac_ext <<_ACEOF
5918 #line 5918 "configure"
5919 #include "confdefs.h"
5920 #include <stdio.h>
5921 int
5922 main ()
5923 {
5924 printf("Hello");
5925   ;
5926   return 0;
5927 }
5928 _ACEOF
5929 rm -f conftest.$ac_objext conftest$ac_exeext
5930 if { (eval echo "$as_me:5930: \"$ac_link\"") >&5
5931   (eval $ac_link) 2>&5
5932   ac_status=$?
5933   echo "$as_me:5933: \$? = $ac_status" >&5
5934   (exit $ac_status); } &&
5935          { ac_try='test -s conftest$ac_exeext'
5936   { (eval echo "$as_me:5936: \"$ac_try\"") >&5
5937   (eval $ac_try) 2>&5
5938   ac_status=$?
5939   echo "$as_me:5939: \$? = $ac_status" >&5
5940   (exit $ac_status); }; }; then
5941   cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[     ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5942 else
5943   echo "$as_me: failed program was:" >&5
5944 cat conftest.$ac_ext >&5
5945 fi
5946 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5947         fi
5948
5949         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5950
5951 echo "${as_me:-configure}:5951: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5952
5953 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5954
5955 echo "${as_me:-configure}:5955: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5956
5957 cf_rpath_dst=
5958 for cf_rpath_src in $LDFLAGS
5959 do
5960         case $cf_rpath_src in #(vi
5961         -L*) #(vi
5962
5963                 # check if this refers to a directory which we will ignore
5964                 cf_rpath_skip=no
5965                 if test -n "$cf_rpath_list"
5966                 then
5967                         for cf_rpath_item in $cf_rpath_list
5968                         do
5969                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5970                                 then
5971                                         cf_rpath_skip=yes
5972                                         break
5973                                 fi
5974                         done
5975                 fi
5976
5977                 if test "$cf_rpath_skip" = no
5978                 then
5979                         # transform the option
5980                         if test "$LD_RPATH_OPT" = "-R " ; then
5981                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5982                         else
5983                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5984                         fi
5985
5986                         # if we have not already added this, add it now
5987                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5988                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5989                         then
5990                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5991
5992 echo "${as_me:-configure}:5992: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5993
5994                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5995                         fi
5996                 fi
5997                 ;;
5998         esac
5999         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6000 done
6001 LDFLAGS=$cf_rpath_dst
6002
6003 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6004
6005 echo "${as_me:-configure}:6005: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6006
6007 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6008
6009 echo "${as_me:-configure}:6009: testing ...checking LIBS $LIBS ..." 1>&5
6010
6011 cf_rpath_dst=
6012 for cf_rpath_src in $LIBS
6013 do
6014         case $cf_rpath_src in #(vi
6015         -L*) #(vi
6016
6017                 # check if this refers to a directory which we will ignore
6018                 cf_rpath_skip=no
6019                 if test -n "$cf_rpath_list"
6020                 then
6021                         for cf_rpath_item in $cf_rpath_list
6022                         do
6023                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6024                                 then
6025                                         cf_rpath_skip=yes
6026                                         break
6027                                 fi
6028                         done
6029                 fi
6030
6031                 if test "$cf_rpath_skip" = no
6032                 then
6033                         # transform the option
6034                         if test "$LD_RPATH_OPT" = "-R " ; then
6035                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6036                         else
6037                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6038                         fi
6039
6040                         # if we have not already added this, add it now
6041                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6042                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6043                         then
6044                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6045
6046 echo "${as_me:-configure}:6046: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6047
6048                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6049                         fi
6050                 fi
6051                 ;;
6052         esac
6053         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6054 done
6055 LIBS=$cf_rpath_dst
6056
6057 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6058
6059 echo "${as_me:-configure}:6059: testing ...checked LIBS $LIBS ..." 1>&5
6060
6061         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6062
6063 echo "${as_me:-configure}:6063: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6064
6065 fi
6066
6067 fi
6068
6069 fi
6070
6071 ###############################################################################
6072
6073 ###     use option --disable-overwrite to leave out the link to -lcurses
6074 echo "$as_me:6074: checking if you wish to install ncurses overwriting curses" >&5
6075 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6076
6077 # Check whether --enable-overwrite or --disable-overwrite was given.
6078 if test "${enable_overwrite+set}" = set; then
6079   enableval="$enable_overwrite"
6080   with_overwrite=$enableval
6081 else
6082   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6083 fi;
6084 echo "$as_me:6084: result: $with_overwrite" >&5
6085 echo "${ECHO_T}$with_overwrite" >&6
6086
6087 echo "$as_me:6087: checking if external terminfo-database is used" >&5
6088 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6089
6090 # Check whether --enable-database or --disable-database was given.
6091 if test "${enable_database+set}" = set; then
6092   enableval="$enable_database"
6093   use_database=$enableval
6094 else
6095   use_database=yes
6096 fi;
6097 echo "$as_me:6097: result: $use_database" >&5
6098 echo "${ECHO_T}$use_database" >&6
6099
6100 case $host_os in #(vi
6101 os2*) #(vi
6102         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6103         ;;
6104 *) #(vi
6105         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6106         ;;
6107 esac
6108
6109         case $cf_cv_system_name in
6110         os2*)   PATH_SEPARATOR=';'  ;;
6111         *)      PATH_SEPARATOR=':'  ;;
6112         esac
6113
6114 if test "$use_database" != no ; then
6115         cat >>confdefs.h <<\EOF
6116 #define USE_DATABASE 1
6117 EOF
6118
6119         echo "$as_me:6119: checking which terminfo source-file will be installed" >&5
6120 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6121
6122 # Check whether --with-database or --without-database was given.
6123 if test "${with_database+set}" = set; then
6124   withval="$with_database"
6125   TERMINFO_SRC=$withval
6126 fi;
6127         echo "$as_me:6127: result: $TERMINFO_SRC" >&5
6128 echo "${ECHO_T}$TERMINFO_SRC" >&6
6129
6130         echo "$as_me:6130: checking whether to use hashed database instead of directory/tree" >&5
6131 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6132
6133 # Check whether --with-hashed-db or --without-hashed-db was given.
6134 if test "${with_hashed_db+set}" = set; then
6135   withval="$with_hashed_db"
6136
6137 else
6138   with_hashed_db=no
6139 fi;
6140         echo "$as_me:6140: result: $with_hashed_db" >&5
6141 echo "${ECHO_T}$with_hashed_db" >&6
6142 else
6143         with_hashed_db=no
6144 fi
6145
6146 echo "$as_me:6146: checking for list of fallback descriptions" >&5
6147 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6148
6149 # Check whether --with-fallbacks or --without-fallbacks was given.
6150 if test "${with_fallbacks+set}" = set; then
6151   withval="$with_fallbacks"
6152   with_fallback=$withval
6153 else
6154   with_fallback=
6155 fi;
6156 echo "$as_me:6156: result: $with_fallback" >&5
6157 echo "${ECHO_T}$with_fallback" >&6
6158 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6159
6160 echo "$as_me:6160: checking if you want modern xterm or antique" >&5
6161 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6162
6163 # Check whether --with-xterm-new or --without-xterm-new was given.
6164 if test "${with_xterm_new+set}" = set; then
6165   withval="$with_xterm_new"
6166   with_xterm_new=$withval
6167 else
6168   with_xterm_new=yes
6169 fi;
6170 case $with_xterm_new in
6171 no)     with_xterm_new=xterm-old;;
6172 *)      with_xterm_new=xterm-new;;
6173 esac
6174 echo "$as_me:6174: result: $with_xterm_new" >&5
6175 echo "${ECHO_T}$with_xterm_new" >&6
6176 WHICH_XTERM=$with_xterm_new
6177
6178 MAKE_TERMINFO=
6179 if test "$use_database" = no ; then
6180         TERMINFO="${datadir}/terminfo"
6181         MAKE_TERMINFO="#"
6182 else
6183
6184 echo "$as_me:6184: checking for list of terminfo directories" >&5
6185 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6186
6187 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6188 if test "${with_terminfo_dirs+set}" = set; then
6189   withval="$with_terminfo_dirs"
6190
6191 else
6192   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6193 fi;
6194 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6195 cf_dst_path=
6196 for cf_src_path in $withval
6197 do
6198
6199 if test "x$prefix" != xNONE; then
6200   cf_path_syntax="$prefix"
6201 else
6202   cf_path_syntax="$ac_default_prefix"
6203 fi
6204
6205 case ".$cf_src_path" in #(vi
6206 .\$\(*\)*|.\'*\'*) #(vi
6207   ;;
6208 ..|./*|.\\*) #(vi
6209   ;;
6210 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6211   ;;
6212 .\${*prefix}*) #(vi
6213   eval cf_src_path="$cf_src_path"
6214   case ".$cf_src_path" in #(vi
6215   .NONE/*)
6216     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6217     ;;
6218   esac
6219   ;; #(vi
6220 .no|.NONE/*)
6221   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6222   ;;
6223 *)
6224   { { echo "$as_me:6224: error: expected a pathname, not \"$cf_src_path\"" >&5
6225 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6226    { (exit 1); exit 1; }; }
6227   ;;
6228 esac
6229
6230   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6231   cf_dst_path="${cf_dst_path}${cf_src_path}"
6232 done
6233 IFS="$ac_save_ifs"
6234
6235 eval 'TERMINFO_DIRS="$cf_dst_path"'
6236
6237 echo "$as_me:6237: result: $TERMINFO_DIRS" >&5
6238 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6239 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6240 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6241 EOF
6242
6243 echo "$as_me:6243: checking for default terminfo directory" >&5
6244 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6245
6246 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6247 if test "${with_default_terminfo_dir+set}" = set; then
6248   withval="$with_default_terminfo_dir"
6249
6250 else
6251   withval="${TERMINFO:-${datadir}/terminfo}"
6252 fi; if test -n "${datadir}/terminfo" ; then
6253
6254 if test "x$prefix" != xNONE; then
6255   cf_path_syntax="$prefix"
6256 else
6257   cf_path_syntax="$ac_default_prefix"
6258 fi
6259
6260 case ".$withval" in #(vi
6261 .\$\(*\)*|.\'*\'*) #(vi
6262   ;;
6263 ..|./*|.\\*) #(vi
6264   ;;
6265 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6266   ;;
6267 .\${*prefix}*) #(vi
6268   eval withval="$withval"
6269   case ".$withval" in #(vi
6270   .NONE/*)
6271     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6272     ;;
6273   esac
6274   ;; #(vi
6275 .no|.NONE/*)
6276   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6277   ;;
6278 *)
6279   { { echo "$as_me:6279: error: expected a pathname, not \"$withval\"" >&5
6280 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6281    { (exit 1); exit 1; }; }
6282   ;;
6283 esac
6284
6285 fi
6286 TERMINFO="$withval"
6287
6288 echo "$as_me:6288: result: $TERMINFO" >&5
6289 echo "${ECHO_T}$TERMINFO" >&6
6290 cat >>confdefs.h <<EOF
6291 #define TERMINFO "$TERMINFO"
6292 EOF
6293
6294 fi
6295
6296 ###     use option --disable-big-core to make tic run on small machines
6297 ###     We need 4Mb, check if we can allocate 50% more than that.
6298 echo "$as_me:6298: checking if big-core option selected" >&5
6299 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6300
6301 # Check whether --enable-big-core or --disable-big-core was given.
6302 if test "${enable_big_core+set}" = set; then
6303   enableval="$enable_big_core"
6304   with_big_core=$enableval
6305 else
6306   if test "$cross_compiling" = yes; then
6307   with_big_core=no
6308 else
6309   cat >conftest.$ac_ext <<_ACEOF
6310 #line 6310 "configure"
6311 #include "confdefs.h"
6312
6313 #include <stdlib.h>
6314 #include <string.h>
6315 int main() {
6316         unsigned long n = 6000000L;
6317         char *s = malloc(n);
6318         if (s != 0)
6319                 s[0] = s[n-1] = 0;
6320         ${cf_cv_main_return:-return}(s == 0);
6321 }
6322 _ACEOF
6323 rm -f conftest$ac_exeext
6324 if { (eval echo "$as_me:6324: \"$ac_link\"") >&5
6325   (eval $ac_link) 2>&5
6326   ac_status=$?
6327   echo "$as_me:6327: \$? = $ac_status" >&5
6328   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6329   { (eval echo "$as_me:6329: \"$ac_try\"") >&5
6330   (eval $ac_try) 2>&5
6331   ac_status=$?
6332   echo "$as_me:6332: \$? = $ac_status" >&5
6333   (exit $ac_status); }; }; then
6334   with_big_core=yes
6335 else
6336   echo "$as_me: program exited with status $ac_status" >&5
6337 echo "$as_me: failed program was:" >&5
6338 cat conftest.$ac_ext >&5
6339 with_big_core=no
6340 fi
6341 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6342 fi
6343 fi;
6344 echo "$as_me:6344: result: $with_big_core" >&5
6345 echo "${ECHO_T}$with_big_core" >&6
6346 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6347 #define HAVE_BIG_CORE 1
6348 EOF
6349
6350 ### ISO C only guarantees 512-char strings, we have tables which load faster
6351 ### when constructed using "big" strings.  More than the C compiler, the awk
6352 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6353 echo "$as_me:6353: checking if big-strings option selected" >&5
6354 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6355
6356 # Check whether --enable-big-strings or --disable-big-strings was given.
6357 if test "${enable_big_strings+set}" = set; then
6358   enableval="$enable_big_strings"
6359   with_big_strings=$enableval
6360 else
6361
6362         case x$AWK in #(vi
6363         x)
6364                 eval with_big_strings=no
6365                 ;;
6366         *) #(vi
6367                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6368                         | $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
6369                         eval with_big_strings=yes
6370                 else
6371                         eval with_big_strings=no
6372                 fi
6373                 ;;
6374         esac
6375
6376 fi;
6377 echo "$as_me:6377: result: $with_big_strings" >&5
6378 echo "${ECHO_T}$with_big_strings" >&6
6379
6380 USE_BIG_STRINGS=0
6381 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6382
6383 ###     use option --enable-termcap to compile in the termcap fallback support
6384 echo "$as_me:6384: checking if you want termcap-fallback support" >&5
6385 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6386
6387 # Check whether --enable-termcap or --disable-termcap was given.
6388 if test "${enable_termcap+set}" = set; then
6389   enableval="$enable_termcap"
6390   with_termcap=$enableval
6391 else
6392   with_termcap=no
6393 fi;
6394 echo "$as_me:6394: result: $with_termcap" >&5
6395 echo "${ECHO_T}$with_termcap" >&6
6396
6397 if test "$with_termcap" != "yes" ; then
6398         if test "$use_database" = no ; then
6399                 if test -z "$with_fallback" ; then
6400                         { { echo "$as_me:6400: error: You have disabled the database w/o specifying fallbacks" >&5
6401 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6402    { (exit 1); exit 1; }; }
6403                 fi
6404         fi
6405         cat >>confdefs.h <<\EOF
6406 #define PURE_TERMINFO 1
6407 EOF
6408
6409 else
6410
6411 if test "$with_ticlib" != no ; then
6412         { { echo "$as_me:6412: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6413 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6414    { (exit 1); exit 1; }; }
6415 fi
6416
6417 cat >>confdefs.h <<\EOF
6418 #define USE_TERMCAP 1
6419 EOF
6420
6421 echo "$as_me:6421: checking for list of termcap files" >&5
6422 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6423
6424 # Check whether --with-termpath or --without-termpath was given.
6425 if test "${with_termpath+set}" = set; then
6426   withval="$with_termpath"
6427
6428 else
6429   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6430 fi;
6431 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6432 cf_dst_path=
6433 for cf_src_path in $withval
6434 do
6435
6436 if test "x$prefix" != xNONE; then
6437   cf_path_syntax="$prefix"
6438 else
6439   cf_path_syntax="$ac_default_prefix"
6440 fi
6441
6442 case ".$cf_src_path" in #(vi
6443 .\$\(*\)*|.\'*\'*) #(vi
6444   ;;
6445 ..|./*|.\\*) #(vi
6446   ;;
6447 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6448   ;;
6449 .\${*prefix}*) #(vi
6450   eval cf_src_path="$cf_src_path"
6451   case ".$cf_src_path" in #(vi
6452   .NONE/*)
6453     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6454     ;;
6455   esac
6456   ;; #(vi
6457 .no|.NONE/*)
6458   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6459   ;;
6460 *)
6461   { { echo "$as_me:6461: error: expected a pathname, not \"$cf_src_path\"" >&5
6462 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6463    { (exit 1); exit 1; }; }
6464   ;;
6465 esac
6466
6467   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6468   cf_dst_path="${cf_dst_path}${cf_src_path}"
6469 done
6470 IFS="$ac_save_ifs"
6471
6472 eval 'TERMPATH="$cf_dst_path"'
6473
6474 echo "$as_me:6474: result: $TERMPATH" >&5
6475 echo "${ECHO_T}$TERMPATH" >&6
6476 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6477 #define TERMPATH "$TERMPATH"
6478 EOF
6479
6480 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6481 echo "$as_me:6481: checking if fast termcap-loader is needed" >&5
6482 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6483
6484 # Check whether --enable-getcap or --disable-getcap was given.
6485 if test "${enable_getcap+set}" = set; then
6486   enableval="$enable_getcap"
6487   with_getcap=$enableval
6488 else
6489   with_getcap=no
6490 fi;
6491 echo "$as_me:6491: result: $with_getcap" >&5
6492 echo "${ECHO_T}$with_getcap" >&6
6493 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6494 #define USE_GETCAP 1
6495 EOF
6496
6497 echo "$as_me:6497: checking if translated termcaps will be cached in ~/.terminfo" >&5
6498 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6499
6500 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6501 if test "${enable_getcap_cache+set}" = set; then
6502   enableval="$enable_getcap_cache"
6503   with_getcap_cache=$enableval
6504 else
6505   with_getcap_cache=no
6506 fi;
6507 echo "$as_me:6507: result: $with_getcap_cache" >&5
6508 echo "${ECHO_T}$with_getcap_cache" >&6
6509 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6510 #define USE_GETCAP_CACHE 1
6511 EOF
6512
6513 fi
6514
6515 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6516 echo "$as_me:6516: checking if ~/.terminfo is wanted" >&5
6517 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6518
6519 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6520 if test "${enable_home_terminfo+set}" = set; then
6521   enableval="$enable_home_terminfo"
6522   with_home_terminfo=$enableval
6523 else
6524   with_home_terminfo=yes
6525 fi;
6526 echo "$as_me:6526: result: $with_home_terminfo" >&5
6527 echo "${ECHO_T}$with_home_terminfo" >&6
6528 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6529 #define USE_HOME_TERMINFO 1
6530 EOF
6531
6532 echo "$as_me:6532: checking if you want to use restricted environment when running as root" >&5
6533 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6534
6535 # Check whether --enable-root-environ or --disable-root-environ was given.
6536 if test "${enable_root_environ+set}" = set; then
6537   enableval="$enable_root_environ"
6538   with_root_environ=$enableval
6539 else
6540   with_root_environ=yes
6541 fi;
6542 echo "$as_me:6542: result: $with_root_environ" >&5
6543 echo "${ECHO_T}$with_root_environ" >&6
6544 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6545 #define USE_ROOT_ENVIRON 1
6546 EOF
6547
6548 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6549 ###   to reduce storage requirements for the terminfo database.
6550
6551 for ac_func in \
6552         remove \
6553         unlink
6554 do
6555 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6556 echo "$as_me:6556: checking for $ac_func" >&5
6557 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6558 if eval "test \"\${$as_ac_var+set}\" = set"; then
6559   echo $ECHO_N "(cached) $ECHO_C" >&6
6560 else
6561   cat >conftest.$ac_ext <<_ACEOF
6562 #line 6562 "configure"
6563 #include "confdefs.h"
6564 /* System header to define __stub macros and hopefully few prototypes,
6565     which can conflict with char $ac_func (); below.  */
6566 #include <assert.h>
6567 /* Override any gcc2 internal prototype to avoid an error.  */
6568 #ifdef __cplusplus
6569 extern "C"
6570 #endif
6571 /* We use char because int might match the return type of a gcc2
6572    builtin and then its argument prototype would still apply.  */
6573 char $ac_func ();
6574 char (*f) ();
6575
6576 int
6577 main ()
6578 {
6579 /* The GNU C library defines this for functions which it implements
6580     to always fail with ENOSYS.  Some functions are actually named
6581     something starting with __ and the normal name is an alias.  */
6582 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6583 choke me
6584 #else
6585 f = $ac_func;
6586 #endif
6587
6588   ;
6589   return 0;
6590 }
6591 _ACEOF
6592 rm -f conftest.$ac_objext conftest$ac_exeext
6593 if { (eval echo "$as_me:6593: \"$ac_link\"") >&5
6594   (eval $ac_link) 2>&5
6595   ac_status=$?
6596   echo "$as_me:6596: \$? = $ac_status" >&5
6597   (exit $ac_status); } &&
6598          { ac_try='test -s conftest$ac_exeext'
6599   { (eval echo "$as_me:6599: \"$ac_try\"") >&5
6600   (eval $ac_try) 2>&5
6601   ac_status=$?
6602   echo "$as_me:6602: \$? = $ac_status" >&5
6603   (exit $ac_status); }; }; then
6604   eval "$as_ac_var=yes"
6605 else
6606   echo "$as_me: failed program was:" >&5
6607 cat conftest.$ac_ext >&5
6608 eval "$as_ac_var=no"
6609 fi
6610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6611 fi
6612 echo "$as_me:6612: result: `eval echo '${'$as_ac_var'}'`" >&5
6613 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6614 if test `eval echo '${'$as_ac_var'}'` = yes; then
6615   cat >>confdefs.h <<EOF
6616 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6617 EOF
6618
6619 fi
6620 done
6621
6622 if test "$cross_compiling" = yes ; then
6623
6624 for ac_func in \
6625                 link \
6626                 symlink
6627 do
6628 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6629 echo "$as_me:6629: checking for $ac_func" >&5
6630 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6631 if eval "test \"\${$as_ac_var+set}\" = set"; then
6632   echo $ECHO_N "(cached) $ECHO_C" >&6
6633 else
6634   cat >conftest.$ac_ext <<_ACEOF
6635 #line 6635 "configure"
6636 #include "confdefs.h"
6637 /* System header to define __stub macros and hopefully few prototypes,
6638     which can conflict with char $ac_func (); below.  */
6639 #include <assert.h>
6640 /* Override any gcc2 internal prototype to avoid an error.  */
6641 #ifdef __cplusplus
6642 extern "C"
6643 #endif
6644 /* We use char because int might match the return type of a gcc2
6645    builtin and then its argument prototype would still apply.  */
6646 char $ac_func ();
6647 char (*f) ();
6648
6649 int
6650 main ()
6651 {
6652 /* The GNU C library defines this for functions which it implements
6653     to always fail with ENOSYS.  Some functions are actually named
6654     something starting with __ and the normal name is an alias.  */
6655 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6656 choke me
6657 #else
6658 f = $ac_func;
6659 #endif
6660
6661   ;
6662   return 0;
6663 }
6664 _ACEOF
6665 rm -f conftest.$ac_objext conftest$ac_exeext
6666 if { (eval echo "$as_me:6666: \"$ac_link\"") >&5
6667   (eval $ac_link) 2>&5
6668   ac_status=$?
6669   echo "$as_me:6669: \$? = $ac_status" >&5
6670   (exit $ac_status); } &&
6671          { ac_try='test -s conftest$ac_exeext'
6672   { (eval echo "$as_me:6672: \"$ac_try\"") >&5
6673   (eval $ac_try) 2>&5
6674   ac_status=$?
6675   echo "$as_me:6675: \$? = $ac_status" >&5
6676   (exit $ac_status); }; }; then
6677   eval "$as_ac_var=yes"
6678 else
6679   echo "$as_me: failed program was:" >&5
6680 cat conftest.$ac_ext >&5
6681 eval "$as_ac_var=no"
6682 fi
6683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6684 fi
6685 echo "$as_me:6685: result: `eval echo '${'$as_ac_var'}'`" >&5
6686 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6687 if test `eval echo '${'$as_ac_var'}'` = yes; then
6688   cat >>confdefs.h <<EOF
6689 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6690 EOF
6691
6692 fi
6693 done
6694
6695 else
6696         echo "$as_me:6696: checking if link/symlink functions work" >&5
6697 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6698 if test "${cf_cv_link_funcs+set}" = set; then
6699   echo $ECHO_N "(cached) $ECHO_C" >&6
6700 else
6701
6702                 cf_cv_link_funcs=
6703                 for cf_func in link symlink ; do
6704                         if test "$cross_compiling" = yes; then
6705
6706                         eval 'ac_cv_func_'$cf_func'=error'
6707 else
6708   cat >conftest.$ac_ext <<_ACEOF
6709 #line 6709 "configure"
6710 #include "confdefs.h"
6711
6712 #include <sys/types.h>
6713 #include <sys/stat.h>
6714 #ifdef HAVE_UNISTD_H
6715 #include <unistd.h>
6716 #endif
6717 int main()
6718 {
6719         int fail = 0;
6720         char *src = "config.log";
6721         char *dst = "conftest.chk";
6722         struct stat src_sb;
6723         struct stat dst_sb;
6724
6725         stat(src, &src_sb);
6726         fail = ($cf_func("config.log", "conftest.chk") < 0)
6727             || (stat(dst, &dst_sb) < 0)
6728             || (dst_sb.st_mtime != src_sb.st_mtime);
6729 #ifdef HAVE_UNLINK
6730         unlink(dst);
6731 #else
6732         remove(dst);
6733 #endif
6734         ${cf_cv_main_return:-return} (fail);
6735 }
6736
6737 _ACEOF
6738 rm -f conftest$ac_exeext
6739 if { (eval echo "$as_me:6739: \"$ac_link\"") >&5
6740   (eval $ac_link) 2>&5
6741   ac_status=$?
6742   echo "$as_me:6742: \$? = $ac_status" >&5
6743   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6744   { (eval echo "$as_me:6744: \"$ac_try\"") >&5
6745   (eval $ac_try) 2>&5
6746   ac_status=$?
6747   echo "$as_me:6747: \$? = $ac_status" >&5
6748   (exit $ac_status); }; }; then
6749
6750                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6751                         eval 'ac_cv_func_'$cf_func'=yes'
6752 else
6753   echo "$as_me: program exited with status $ac_status" >&5
6754 echo "$as_me: failed program was:" >&5
6755 cat conftest.$ac_ext >&5
6756
6757                         eval 'ac_cv_func_'$cf_func'=no'
6758 fi
6759 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6760 fi
6761                 done
6762                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6763
6764 fi
6765 echo "$as_me:6765: result: $cf_cv_link_funcs" >&5
6766 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6767         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6768 #define HAVE_LINK 1
6769 EOF
6770
6771         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6772 #define HAVE_SYMLINK 1
6773 EOF
6774
6775 fi
6776
6777 with_links=no
6778 with_symlinks=no
6779
6780 # soft links (symbolic links) are useful for some systems where hard links do
6781 # not work, or to make it simpler to copy terminfo trees around.
6782 if test "$ac_cv_func_symlink" = yes ; then
6783     echo "$as_me:6783: checking if tic should use symbolic links" >&5
6784 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6785
6786 # Check whether --enable-symlinks or --disable-symlinks was given.
6787 if test "${enable_symlinks+set}" = set; then
6788   enableval="$enable_symlinks"
6789   with_symlinks=$enableval
6790 else
6791   with_symlinks=no
6792 fi;
6793     echo "$as_me:6793: result: $with_symlinks" >&5
6794 echo "${ECHO_T}$with_symlinks" >&6
6795 fi
6796
6797 # If we have hard links and did not choose to use soft links instead, there is
6798 # no reason to make this choice optional - use the hard links.
6799 if test "$with_symlinks" = no ; then
6800     echo "$as_me:6800: checking if tic should use hard links" >&5
6801 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6802     if test "$ac_cv_func_link" = yes ; then
6803         with_links=yes
6804     else
6805         with_links=no
6806     fi
6807     echo "$as_me:6807: result: $with_links" >&5
6808 echo "${ECHO_T}$with_links" >&6
6809 fi
6810
6811 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6812 #define USE_LINKS 1
6813 EOF
6814
6815 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6816 #define USE_SYMLINKS 1
6817 EOF
6818
6819 ###   use option --enable-broken-linker to force on use of broken-linker support
6820 echo "$as_me:6820: checking if you want broken-linker support code" >&5
6821 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6822
6823 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6824 if test "${enable_broken_linker+set}" = set; then
6825   enableval="$enable_broken_linker"
6826   with_broken_linker=$enableval
6827 else
6828   with_broken_linker=${BROKEN_LINKER:-no}
6829 fi;
6830 echo "$as_me:6830: result: $with_broken_linker" >&5
6831 echo "${ECHO_T}$with_broken_linker" >&6
6832
6833 BROKEN_LINKER=0
6834 if test "$with_broken_linker" = yes ; then
6835         cat >>confdefs.h <<\EOF
6836 #define BROKEN_LINKER 1
6837 EOF
6838
6839         BROKEN_LINKER=1
6840 elif test "$DFT_LWR_MODEL" = shared ; then
6841         case $cf_cv_system_name in #(vi
6842         cygwin*)
6843                 cat >>confdefs.h <<\EOF
6844 #define BROKEN_LINKER 1
6845 EOF
6846
6847                 BROKEN_LINKER=1
6848                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6849
6850 echo "${as_me:-configure}:6850: testing cygwin linker is broken anyway ..." 1>&5
6851
6852                 ;;
6853         esac
6854 fi
6855
6856 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6857 echo "$as_me:6857: checking if tputs should process BSD-style prefix padding" >&5
6858 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6859
6860 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6861 if test "${enable_bsdpad+set}" = set; then
6862   enableval="$enable_bsdpad"
6863   with_bsdpad=$enableval
6864 else
6865   with_bsdpad=no
6866 fi;
6867 echo "$as_me:6867: result: $with_bsdpad" >&5
6868 echo "${ECHO_T}$with_bsdpad" >&6
6869 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6870 #define BSD_TPUTS 1
6871 EOF
6872
6873 ###   use option --enable-widec to turn on use of wide-character support
6874 NCURSES_CH_T=chtype
6875 NCURSES_LIBUTF8=0
6876
6877 NEED_WCHAR_H=0
6878 NCURSES_MBSTATE_T=0
6879 NCURSES_WCHAR_T=0
6880 NCURSES_WINT_T=0
6881
6882 # Check to define _XOPEN_SOURCE "automatically"
6883
6884 cf_XOPEN_SOURCE=500
6885 cf_POSIX_C_SOURCE=199506L
6886 cf_xopen_source=
6887
6888 case $host_os in #(vi
6889 aix[456]*) #(vi
6890         cf_xopen_source="-D_ALL_SOURCE"
6891         ;;
6892 darwin[0-8].*) #(vi
6893         cf_xopen_source="-D_APPLE_C_SOURCE"
6894         ;;
6895 darwin*) #(vi
6896         cf_xopen_source="-D_DARWIN_C_SOURCE"
6897         ;;
6898 freebsd*|dragonfly*) #(vi
6899         # 5.x headers associate
6900         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6901         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6902         cf_POSIX_C_SOURCE=200112L
6903         cf_XOPEN_SOURCE=600
6904         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6905         ;;
6906 hpux11*) #(vi
6907         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6908         ;;
6909 hpux*) #(vi
6910         cf_xopen_source="-D_HPUX_SOURCE"
6911         ;;
6912 irix[56].*) #(vi
6913         cf_xopen_source="-D_SGI_SOURCE"
6914         ;;
6915 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6916
6917 echo "$as_me:6917: checking if we must define _GNU_SOURCE" >&5
6918 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6919 if test "${cf_cv_gnu_source+set}" = set; then
6920   echo $ECHO_N "(cached) $ECHO_C" >&6
6921 else
6922
6923 cat >conftest.$ac_ext <<_ACEOF
6924 #line 6924 "configure"
6925 #include "confdefs.h"
6926 #include <sys/types.h>
6927 int
6928 main ()
6929 {
6930
6931 #ifndef _XOPEN_SOURCE
6932 make an error
6933 #endif
6934   ;
6935   return 0;
6936 }
6937 _ACEOF
6938 rm -f conftest.$ac_objext
6939 if { (eval echo "$as_me:6939: \"$ac_compile\"") >&5
6940   (eval $ac_compile) 2>&5
6941   ac_status=$?
6942   echo "$as_me:6942: \$? = $ac_status" >&5
6943   (exit $ac_status); } &&
6944          { ac_try='test -s conftest.$ac_objext'
6945   { (eval echo "$as_me:6945: \"$ac_try\"") >&5
6946   (eval $ac_try) 2>&5
6947   ac_status=$?
6948   echo "$as_me:6948: \$? = $ac_status" >&5
6949   (exit $ac_status); }; }; then
6950   cf_cv_gnu_source=no
6951 else
6952   echo "$as_me: failed program was:" >&5
6953 cat conftest.$ac_ext >&5
6954 cf_save="$CPPFLAGS"
6955          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6956          cat >conftest.$ac_ext <<_ACEOF
6957 #line 6957 "configure"
6958 #include "confdefs.h"
6959 #include <sys/types.h>
6960 int
6961 main ()
6962 {
6963
6964 #ifdef _XOPEN_SOURCE
6965 make an error
6966 #endif
6967   ;
6968   return 0;
6969 }
6970 _ACEOF
6971 rm -f conftest.$ac_objext
6972 if { (eval echo "$as_me:6972: \"$ac_compile\"") >&5
6973   (eval $ac_compile) 2>&5
6974   ac_status=$?
6975   echo "$as_me:6975: \$? = $ac_status" >&5
6976   (exit $ac_status); } &&
6977          { ac_try='test -s conftest.$ac_objext'
6978   { (eval echo "$as_me:6978: \"$ac_try\"") >&5
6979   (eval $ac_try) 2>&5
6980   ac_status=$?
6981   echo "$as_me:6981: \$? = $ac_status" >&5
6982   (exit $ac_status); }; }; then
6983   cf_cv_gnu_source=no
6984 else
6985   echo "$as_me: failed program was:" >&5
6986 cat conftest.$ac_ext >&5
6987 cf_cv_gnu_source=yes
6988 fi
6989 rm -f conftest.$ac_objext conftest.$ac_ext
6990         CPPFLAGS="$cf_save"
6991
6992 fi
6993 rm -f conftest.$ac_objext conftest.$ac_ext
6994
6995 fi
6996 echo "$as_me:6996: result: $cf_cv_gnu_source" >&5
6997 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6998 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6999
7000         ;;
7001 mirbsd*) #(vi
7002         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7003         ;;
7004 netbsd*) #(vi
7005         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7006         ;;
7007 openbsd*) #(vi
7008         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7009         ;;
7010 osf[45]*) #(vi
7011         cf_xopen_source="-D_OSF_SOURCE"
7012         ;;
7013 nto-qnx*) #(vi
7014         cf_xopen_source="-D_QNX_SOURCE"
7015         ;;
7016 sco*) #(vi
7017         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7018         ;;
7019 solaris2.1[0-9]) #(vi
7020         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7021         ;;
7022 solaris2.[1-9]) #(vi
7023         cf_xopen_source="-D__EXTENSIONS__"
7024         ;;
7025 *)
7026         echo "$as_me:7026: checking if we should define _XOPEN_SOURCE" >&5
7027 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7028 if test "${cf_cv_xopen_source+set}" = set; then
7029   echo $ECHO_N "(cached) $ECHO_C" >&6
7030 else
7031
7032         cat >conftest.$ac_ext <<_ACEOF
7033 #line 7033 "configure"
7034 #include "confdefs.h"
7035 #include <sys/types.h>
7036 int
7037 main ()
7038 {
7039
7040 #ifndef _XOPEN_SOURCE
7041 make an error
7042 #endif
7043   ;
7044   return 0;
7045 }
7046 _ACEOF
7047 rm -f conftest.$ac_objext
7048 if { (eval echo "$as_me:7048: \"$ac_compile\"") >&5
7049   (eval $ac_compile) 2>&5
7050   ac_status=$?
7051   echo "$as_me:7051: \$? = $ac_status" >&5
7052   (exit $ac_status); } &&
7053          { ac_try='test -s conftest.$ac_objext'
7054   { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055   (eval $ac_try) 2>&5
7056   ac_status=$?
7057   echo "$as_me:7057: \$? = $ac_status" >&5
7058   (exit $ac_status); }; }; then
7059   cf_cv_xopen_source=no
7060 else
7061   echo "$as_me: failed program was:" >&5
7062 cat conftest.$ac_ext >&5
7063 cf_save="$CPPFLAGS"
7064          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7065          cat >conftest.$ac_ext <<_ACEOF
7066 #line 7066 "configure"
7067 #include "confdefs.h"
7068 #include <sys/types.h>
7069 int
7070 main ()
7071 {
7072
7073 #ifdef _XOPEN_SOURCE
7074 make an error
7075 #endif
7076   ;
7077   return 0;
7078 }
7079 _ACEOF
7080 rm -f conftest.$ac_objext
7081 if { (eval echo "$as_me:7081: \"$ac_compile\"") >&5
7082   (eval $ac_compile) 2>&5
7083   ac_status=$?
7084   echo "$as_me:7084: \$? = $ac_status" >&5
7085   (exit $ac_status); } &&
7086          { ac_try='test -s conftest.$ac_objext'
7087   { (eval echo "$as_me:7087: \"$ac_try\"") >&5
7088   (eval $ac_try) 2>&5
7089   ac_status=$?
7090   echo "$as_me:7090: \$? = $ac_status" >&5
7091   (exit $ac_status); }; }; then
7092   cf_cv_xopen_source=no
7093 else
7094   echo "$as_me: failed program was:" >&5
7095 cat conftest.$ac_ext >&5
7096 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7097 fi
7098 rm -f conftest.$ac_objext conftest.$ac_ext
7099         CPPFLAGS="$cf_save"
7100
7101 fi
7102 rm -f conftest.$ac_objext conftest.$ac_ext
7103
7104 fi
7105 echo "$as_me:7105: result: $cf_cv_xopen_source" >&5
7106 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7107         if test "$cf_cv_xopen_source" != no ; then
7108
7109 CFLAGS=`echo "$CFLAGS" | \
7110         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7111                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7112
7113 CPPFLAGS=`echo "$CPPFLAGS" | \
7114         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7115                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7116
7117                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7118
7119 cf_fix_cppflags=no
7120 cf_new_cflags=
7121 cf_new_cppflags=
7122 cf_new_extra_cppflags=
7123
7124 for cf_add_cflags in $cf_temp_xopen_source
7125 do
7126 case $cf_fix_cppflags in
7127 no)
7128         case $cf_add_cflags in #(vi
7129         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7130                 case $cf_add_cflags in
7131                 -D*)
7132                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7133
7134                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7135                                 && test -z "${cf_tst_cflags}" \
7136                                 && cf_fix_cppflags=yes
7137
7138                         if test $cf_fix_cppflags = yes ; then
7139                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7140                                 continue
7141                         elif test "${cf_tst_cflags}" = "\"'" ; then
7142                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7143                                 continue
7144                         fi
7145                         ;;
7146                 esac
7147                 case "$CPPFLAGS" in
7148                 *$cf_add_cflags) #(vi
7149                         ;;
7150                 *) #(vi
7151                         case $cf_add_cflags in #(vi
7152                         -D*)
7153                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7154
7155 CPPFLAGS=`echo "$CPPFLAGS" | \
7156         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7157                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7158
7159                                 ;;
7160                         esac
7161                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7162                         ;;
7163                 esac
7164                 ;;
7165         *)
7166                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7167                 ;;
7168         esac
7169         ;;
7170 yes)
7171         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7172
7173         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7174
7175         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7176                 && test -z "${cf_tst_cflags}" \
7177                 && cf_fix_cppflags=no
7178         ;;
7179 esac
7180 done
7181
7182 if test -n "$cf_new_cflags" ; then
7183
7184         CFLAGS="$CFLAGS $cf_new_cflags"
7185 fi
7186
7187 if test -n "$cf_new_cppflags" ; then
7188
7189         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7190 fi
7191
7192 if test -n "$cf_new_extra_cppflags" ; then
7193
7194         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7195 fi
7196
7197         fi
7198
7199 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7200
7201 cf_save_CFLAGS="$CFLAGS"
7202 cf_save_CPPFLAGS="$CPPFLAGS"
7203
7204 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7205         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7206                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7207
7208 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7209         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7210                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7211
7212 echo "$as_me:7212: checking if we should define _POSIX_C_SOURCE" >&5
7213 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7214 if test "${cf_cv_posix_c_source+set}" = set; then
7215   echo $ECHO_N "(cached) $ECHO_C" >&6
7216 else
7217
7218 echo "${as_me:-configure}:7218: testing if the symbol is already defined go no further ..." 1>&5
7219
7220         cat >conftest.$ac_ext <<_ACEOF
7221 #line 7221 "configure"
7222 #include "confdefs.h"
7223 #include <sys/types.h>
7224 int
7225 main ()
7226 {
7227
7228 #ifndef _POSIX_C_SOURCE
7229 make an error
7230 #endif
7231   ;
7232   return 0;
7233 }
7234 _ACEOF
7235 rm -f conftest.$ac_objext
7236 if { (eval echo "$as_me:7236: \"$ac_compile\"") >&5
7237   (eval $ac_compile) 2>&5
7238   ac_status=$?
7239   echo "$as_me:7239: \$? = $ac_status" >&5
7240   (exit $ac_status); } &&
7241          { ac_try='test -s conftest.$ac_objext'
7242   { (eval echo "$as_me:7242: \"$ac_try\"") >&5
7243   (eval $ac_try) 2>&5
7244   ac_status=$?
7245   echo "$as_me:7245: \$? = $ac_status" >&5
7246   (exit $ac_status); }; }; then
7247   cf_cv_posix_c_source=no
7248 else
7249   echo "$as_me: failed program was:" >&5
7250 cat conftest.$ac_ext >&5
7251 cf_want_posix_source=no
7252          case .$cf_POSIX_C_SOURCE in #(vi
7253          .[12]??*) #(vi
7254                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7255                 ;;
7256          .2) #(vi
7257                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7258                 cf_want_posix_source=yes
7259                 ;;
7260          .*)
7261                 cf_want_posix_source=yes
7262                 ;;
7263          esac
7264          if test "$cf_want_posix_source" = yes ; then
7265                 cat >conftest.$ac_ext <<_ACEOF
7266 #line 7266 "configure"
7267 #include "confdefs.h"
7268 #include <sys/types.h>
7269 int
7270 main ()
7271 {
7272
7273 #ifdef _POSIX_SOURCE
7274 make an error
7275 #endif
7276   ;
7277   return 0;
7278 }
7279 _ACEOF
7280 rm -f conftest.$ac_objext
7281 if { (eval echo "$as_me:7281: \"$ac_compile\"") >&5
7282   (eval $ac_compile) 2>&5
7283   ac_status=$?
7284   echo "$as_me:7284: \$? = $ac_status" >&5
7285   (exit $ac_status); } &&
7286          { ac_try='test -s conftest.$ac_objext'
7287   { (eval echo "$as_me:7287: \"$ac_try\"") >&5
7288   (eval $ac_try) 2>&5
7289   ac_status=$?
7290   echo "$as_me:7290: \$? = $ac_status" >&5
7291   (exit $ac_status); }; }; then
7292   :
7293 else
7294   echo "$as_me: failed program was:" >&5
7295 cat conftest.$ac_ext >&5
7296 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7297 fi
7298 rm -f conftest.$ac_objext conftest.$ac_ext
7299          fi
7300
7301 echo "${as_me:-configure}:7301: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7302
7303          CFLAGS="$cf_trim_CFLAGS"
7304          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7305
7306 echo "${as_me:-configure}:7306: testing if the second compile does not leave our definition intact error ..." 1>&5
7307
7308          cat >conftest.$ac_ext <<_ACEOF
7309 #line 7309 "configure"
7310 #include "confdefs.h"
7311 #include <sys/types.h>
7312 int
7313 main ()
7314 {
7315
7316 #ifndef _POSIX_C_SOURCE
7317 make an error
7318 #endif
7319   ;
7320   return 0;
7321 }
7322 _ACEOF
7323 rm -f conftest.$ac_objext
7324 if { (eval echo "$as_me:7324: \"$ac_compile\"") >&5
7325   (eval $ac_compile) 2>&5
7326   ac_status=$?
7327   echo "$as_me:7327: \$? = $ac_status" >&5
7328   (exit $ac_status); } &&
7329          { ac_try='test -s conftest.$ac_objext'
7330   { (eval echo "$as_me:7330: \"$ac_try\"") >&5
7331   (eval $ac_try) 2>&5
7332   ac_status=$?
7333   echo "$as_me:7333: \$? = $ac_status" >&5
7334   (exit $ac_status); }; }; then
7335   :
7336 else
7337   echo "$as_me: failed program was:" >&5
7338 cat conftest.$ac_ext >&5
7339 cf_cv_posix_c_source=no
7340 fi
7341 rm -f conftest.$ac_objext conftest.$ac_ext
7342          CFLAGS="$cf_save_CFLAGS"
7343          CPPFLAGS="$cf_save_CPPFLAGS"
7344
7345 fi
7346 rm -f conftest.$ac_objext conftest.$ac_ext
7347
7348 fi
7349 echo "$as_me:7349: result: $cf_cv_posix_c_source" >&5
7350 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7351
7352 if test "$cf_cv_posix_c_source" != no ; then
7353         CFLAGS="$cf_trim_CFLAGS"
7354         CPPFLAGS="$cf_trim_CPPFLAGS"
7355
7356 cf_fix_cppflags=no
7357 cf_new_cflags=
7358 cf_new_cppflags=
7359 cf_new_extra_cppflags=
7360
7361 for cf_add_cflags in $cf_cv_posix_c_source
7362 do
7363 case $cf_fix_cppflags in
7364 no)
7365         case $cf_add_cflags in #(vi
7366         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7367                 case $cf_add_cflags in
7368                 -D*)
7369                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7370
7371                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7372                                 && test -z "${cf_tst_cflags}" \
7373                                 && cf_fix_cppflags=yes
7374
7375                         if test $cf_fix_cppflags = yes ; then
7376                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7377                                 continue
7378                         elif test "${cf_tst_cflags}" = "\"'" ; then
7379                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7380                                 continue
7381                         fi
7382                         ;;
7383                 esac
7384                 case "$CPPFLAGS" in
7385                 *$cf_add_cflags) #(vi
7386                         ;;
7387                 *) #(vi
7388                         case $cf_add_cflags in #(vi
7389                         -D*)
7390                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7391
7392 CPPFLAGS=`echo "$CPPFLAGS" | \
7393         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7394                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7395
7396                                 ;;
7397                         esac
7398                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7399                         ;;
7400                 esac
7401                 ;;
7402         *)
7403                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7404                 ;;
7405         esac
7406         ;;
7407 yes)
7408         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7409
7410         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7411
7412         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7413                 && test -z "${cf_tst_cflags}" \
7414                 && cf_fix_cppflags=no
7415         ;;
7416 esac
7417 done
7418
7419 if test -n "$cf_new_cflags" ; then
7420
7421         CFLAGS="$CFLAGS $cf_new_cflags"
7422 fi
7423
7424 if test -n "$cf_new_cppflags" ; then
7425
7426         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7427 fi
7428
7429 if test -n "$cf_new_extra_cppflags" ; then
7430
7431         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7432 fi
7433
7434 fi
7435
7436         ;;
7437 esac
7438
7439 if test -n "$cf_xopen_source" ; then
7440
7441 cf_fix_cppflags=no
7442 cf_new_cflags=
7443 cf_new_cppflags=
7444 cf_new_extra_cppflags=
7445
7446 for cf_add_cflags in $cf_xopen_source
7447 do
7448 case $cf_fix_cppflags in
7449 no)
7450         case $cf_add_cflags in #(vi
7451         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7452                 case $cf_add_cflags in
7453                 -D*)
7454                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7455
7456                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7457                                 && test -z "${cf_tst_cflags}" \
7458                                 && cf_fix_cppflags=yes
7459
7460                         if test $cf_fix_cppflags = yes ; then
7461                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7462                                 continue
7463                         elif test "${cf_tst_cflags}" = "\"'" ; then
7464                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7465                                 continue
7466                         fi
7467                         ;;
7468                 esac
7469                 case "$CPPFLAGS" in
7470                 *$cf_add_cflags) #(vi
7471                         ;;
7472                 *) #(vi
7473                         case $cf_add_cflags in #(vi
7474                         -D*)
7475                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7476
7477 CPPFLAGS=`echo "$CPPFLAGS" | \
7478         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7479                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7480
7481                                 ;;
7482                         esac
7483                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7484                         ;;
7485                 esac
7486                 ;;
7487         *)
7488                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7489                 ;;
7490         esac
7491         ;;
7492 yes)
7493         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7494
7495         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7496
7497         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7498                 && test -z "${cf_tst_cflags}" \
7499                 && cf_fix_cppflags=no
7500         ;;
7501 esac
7502 done
7503
7504 if test -n "$cf_new_cflags" ; then
7505
7506         CFLAGS="$CFLAGS $cf_new_cflags"
7507 fi
7508
7509 if test -n "$cf_new_cppflags" ; then
7510
7511         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7512 fi
7513
7514 if test -n "$cf_new_extra_cppflags" ; then
7515
7516         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7517 fi
7518
7519 fi
7520
7521 # Work around breakage on OS X
7522
7523 echo "$as_me:7523: checking if SIGWINCH is defined" >&5
7524 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7525 if test "${cf_cv_define_sigwinch+set}" = set; then
7526   echo $ECHO_N "(cached) $ECHO_C" >&6
7527 else
7528
7529         cat >conftest.$ac_ext <<_ACEOF
7530 #line 7530 "configure"
7531 #include "confdefs.h"
7532
7533 #include <sys/types.h>
7534 #include <sys/signal.h>
7535
7536 int
7537 main ()
7538 {
7539 int x = SIGWINCH
7540   ;
7541   return 0;
7542 }
7543 _ACEOF
7544 rm -f conftest.$ac_objext
7545 if { (eval echo "$as_me:7545: \"$ac_compile\"") >&5
7546   (eval $ac_compile) 2>&5
7547   ac_status=$?
7548   echo "$as_me:7548: \$? = $ac_status" >&5
7549   (exit $ac_status); } &&
7550          { ac_try='test -s conftest.$ac_objext'
7551   { (eval echo "$as_me:7551: \"$ac_try\"") >&5
7552   (eval $ac_try) 2>&5
7553   ac_status=$?
7554   echo "$as_me:7554: \$? = $ac_status" >&5
7555   (exit $ac_status); }; }; then
7556   cf_cv_define_sigwinch=yes
7557 else
7558   echo "$as_me: failed program was:" >&5
7559 cat conftest.$ac_ext >&5
7560 cat >conftest.$ac_ext <<_ACEOF
7561 #line 7561 "configure"
7562 #include "confdefs.h"
7563
7564 #undef _XOPEN_SOURCE
7565 #undef _POSIX_SOURCE
7566 #undef _POSIX_C_SOURCE
7567 #include <sys/types.h>
7568 #include <sys/signal.h>
7569
7570 int
7571 main ()
7572 {
7573 int x = SIGWINCH
7574   ;
7575   return 0;
7576 }
7577 _ACEOF
7578 rm -f conftest.$ac_objext
7579 if { (eval echo "$as_me:7579: \"$ac_compile\"") >&5
7580   (eval $ac_compile) 2>&5
7581   ac_status=$?
7582   echo "$as_me:7582: \$? = $ac_status" >&5
7583   (exit $ac_status); } &&
7584          { ac_try='test -s conftest.$ac_objext'
7585   { (eval echo "$as_me:7585: \"$ac_try\"") >&5
7586   (eval $ac_try) 2>&5
7587   ac_status=$?
7588   echo "$as_me:7588: \$? = $ac_status" >&5
7589   (exit $ac_status); }; }; then
7590   cf_cv_define_sigwinch=maybe
7591 else
7592   echo "$as_me: failed program was:" >&5
7593 cat conftest.$ac_ext >&5
7594 cf_cv_define_sigwinch=no
7595 fi
7596 rm -f conftest.$ac_objext conftest.$ac_ext
7597
7598 fi
7599 rm -f conftest.$ac_objext conftest.$ac_ext
7600
7601 fi
7602 echo "$as_me:7602: result: $cf_cv_define_sigwinch" >&5
7603 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7604
7605 if test "$cf_cv_define_sigwinch" = maybe ; then
7606 echo "$as_me:7606: checking for actual SIGWINCH definition" >&5
7607 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7608 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7609   echo $ECHO_N "(cached) $ECHO_C" >&6
7610 else
7611
7612 cf_cv_fixup_sigwinch=unknown
7613 cf_sigwinch=32
7614 while test $cf_sigwinch != 1
7615 do
7616         cat >conftest.$ac_ext <<_ACEOF
7617 #line 7617 "configure"
7618 #include "confdefs.h"
7619
7620 #undef _XOPEN_SOURCE
7621 #undef _POSIX_SOURCE
7622 #undef _POSIX_C_SOURCE
7623 #include <sys/types.h>
7624 #include <sys/signal.h>
7625
7626 int
7627 main ()
7628 {
7629
7630 #if SIGWINCH != $cf_sigwinch
7631 make an error
7632 #endif
7633 int x = SIGWINCH
7634   ;
7635   return 0;
7636 }
7637 _ACEOF
7638 rm -f conftest.$ac_objext
7639 if { (eval echo "$as_me:7639: \"$ac_compile\"") >&5
7640   (eval $ac_compile) 2>&5
7641   ac_status=$?
7642   echo "$as_me:7642: \$? = $ac_status" >&5
7643   (exit $ac_status); } &&
7644          { ac_try='test -s conftest.$ac_objext'
7645   { (eval echo "$as_me:7645: \"$ac_try\"") >&5
7646   (eval $ac_try) 2>&5
7647   ac_status=$?
7648   echo "$as_me:7648: \$? = $ac_status" >&5
7649   (exit $ac_status); }; }; then
7650   cf_cv_fixup_sigwinch=$cf_sigwinch
7651          break
7652 else
7653   echo "$as_me: failed program was:" >&5
7654 cat conftest.$ac_ext >&5
7655 fi
7656 rm -f conftest.$ac_objext conftest.$ac_ext
7657
7658 cf_sigwinch=`expr $cf_sigwinch - 1`
7659 done
7660
7661 fi
7662 echo "$as_me:7662: result: $cf_cv_fixup_sigwinch" >&5
7663 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7664
7665         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7666                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7667         fi
7668 fi
7669
7670 # Checks for CODESET support.
7671
7672   echo "$as_me:7672: checking for nl_langinfo and CODESET" >&5
7673 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7674 if test "${am_cv_langinfo_codeset+set}" = set; then
7675   echo $ECHO_N "(cached) $ECHO_C" >&6
7676 else
7677   cat >conftest.$ac_ext <<_ACEOF
7678 #line 7678 "configure"
7679 #include "confdefs.h"
7680 #include <langinfo.h>
7681 int
7682 main ()
7683 {
7684 char* cs = nl_langinfo(CODESET);
7685   ;
7686   return 0;
7687 }
7688 _ACEOF
7689 rm -f conftest.$ac_objext conftest$ac_exeext
7690 if { (eval echo "$as_me:7690: \"$ac_link\"") >&5
7691   (eval $ac_link) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit $ac_status); } &&
7695          { ac_try='test -s conftest$ac_exeext'
7696   { (eval echo "$as_me:7696: \"$ac_try\"") >&5
7697   (eval $ac_try) 2>&5
7698   ac_status=$?
7699   echo "$as_me:7699: \$? = $ac_status" >&5
7700   (exit $ac_status); }; }; then
7701   am_cv_langinfo_codeset=yes
7702 else
7703   echo "$as_me: failed program was:" >&5
7704 cat conftest.$ac_ext >&5
7705 am_cv_langinfo_codeset=no
7706 fi
7707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7708
7709 fi
7710 echo "$as_me:7710: result: $am_cv_langinfo_codeset" >&5
7711 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7712   if test $am_cv_langinfo_codeset = yes; then
7713
7714 cat >>confdefs.h <<\EOF
7715 #define HAVE_LANGINFO_CODESET 1
7716 EOF
7717
7718   fi
7719
7720 # use these variables to work around a defect in gcc's fixincludes.
7721 NCURSES_OK_WCHAR_T=
7722 NCURSES_OK_WINT_T=
7723
7724 echo "$as_me:7724: checking if you want wide-character code" >&5
7725 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7726
7727 # Check whether --enable-widec or --disable-widec was given.
7728 if test "${enable_widec+set}" = set; then
7729   enableval="$enable_widec"
7730   with_widec=$enableval
7731 else
7732   with_widec=no
7733 fi;
7734 echo "$as_me:7734: result: $with_widec" >&5
7735 echo "${ECHO_T}$with_widec" >&6
7736 if test "$with_widec" = yes ; then
7737         LIB_SUFFIX="w${LIB_SUFFIX}"
7738         cat >>confdefs.h <<\EOF
7739 #define USE_WIDEC_SUPPORT 1
7740 EOF
7741
7742         case "$CFLAGS $CPPFLAGS" in #(vi
7743         *-D_XOPEN_SOURCE=500) #(vi
7744                 ;;
7745         *)
7746
7747 echo "$as_me:7747: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7748 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7749 cat >conftest.$ac_ext <<_ACEOF
7750 #line 7750 "configure"
7751 #include "confdefs.h"
7752 #include <sys/types.h>
7753
7754 int
7755 main ()
7756 {
7757
7758 #ifndef _XOPEN_SOURCE_EXTENDED
7759 make an error
7760 #endif
7761   ;
7762   return 0;
7763 }
7764 _ACEOF
7765 rm -f conftest.$ac_objext
7766 if { (eval echo "$as_me:7766: \"$ac_compile\"") >&5
7767   (eval $ac_compile) 2>&5
7768   ac_status=$?
7769   echo "$as_me:7769: \$? = $ac_status" >&5
7770   (exit $ac_status); } &&
7771          { ac_try='test -s conftest.$ac_objext'
7772   { (eval echo "$as_me:7772: \"$ac_try\"") >&5
7773   (eval $ac_try) 2>&5
7774   ac_status=$?
7775   echo "$as_me:7775: \$? = $ac_status" >&5
7776   (exit $ac_status); }; }; then
7777   cf_result=no
7778 else
7779   echo "$as_me: failed program was:" >&5
7780 cat conftest.$ac_ext >&5
7781 cf_result=yes
7782 fi
7783 rm -f conftest.$ac_objext conftest.$ac_ext
7784 echo "$as_me:7784: result: $cf_result" >&5
7785 echo "${ECHO_T}$cf_result" >&6
7786
7787 if test "$cf_result" = yes ; then
7788         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7789 elif test "x" != "x" ; then
7790         echo "$as_me:7790: checking checking for compatible value versus " >&5
7791 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7792         cat >conftest.$ac_ext <<_ACEOF
7793 #line 7793 "configure"
7794 #include "confdefs.h"
7795 #include <sys/types.h>
7796
7797 int
7798 main ()
7799 {
7800
7801 #if _XOPEN_SOURCE_EXTENDED- < 0
7802 make an error
7803 #endif
7804   ;
7805   return 0;
7806 }
7807 _ACEOF
7808 rm -f conftest.$ac_objext
7809 if { (eval echo "$as_me:7809: \"$ac_compile\"") >&5
7810   (eval $ac_compile) 2>&5
7811   ac_status=$?
7812   echo "$as_me:7812: \$? = $ac_status" >&5
7813   (exit $ac_status); } &&
7814          { ac_try='test -s conftest.$ac_objext'
7815   { (eval echo "$as_me:7815: \"$ac_try\"") >&5
7816   (eval $ac_try) 2>&5
7817   ac_status=$?
7818   echo "$as_me:7818: \$? = $ac_status" >&5
7819   (exit $ac_status); }; }; then
7820   cf_result=yes
7821 else
7822   echo "$as_me: failed program was:" >&5
7823 cat conftest.$ac_ext >&5
7824 cf_result=no
7825 fi
7826 rm -f conftest.$ac_objext conftest.$ac_ext
7827         echo "$as_me:7827: result: $cf_result" >&5
7828 echo "${ECHO_T}$cf_result" >&6
7829         if test "$cf_result" = no ; then
7830                 # perhaps we can override it - try...
7831                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7832         fi
7833 fi
7834
7835                 ;;
7836         esac
7837
7838         # with_overwrite=no
7839         NCURSES_CH_T=cchar_t
7840
7841 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7842 do
7843 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7844 echo "$as_me:7844: checking for $ac_func" >&5
7845 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7846 if eval "test \"\${$as_ac_var+set}\" = set"; then
7847   echo $ECHO_N "(cached) $ECHO_C" >&6
7848 else
7849   cat >conftest.$ac_ext <<_ACEOF
7850 #line 7850 "configure"
7851 #include "confdefs.h"
7852 /* System header to define __stub macros and hopefully few prototypes,
7853     which can conflict with char $ac_func (); below.  */
7854 #include <assert.h>
7855 /* Override any gcc2 internal prototype to avoid an error.  */
7856 #ifdef __cplusplus
7857 extern "C"
7858 #endif
7859 /* We use char because int might match the return type of a gcc2
7860    builtin and then its argument prototype would still apply.  */
7861 char $ac_func ();
7862 char (*f) ();
7863
7864 int
7865 main ()
7866 {
7867 /* The GNU C library defines this for functions which it implements
7868     to always fail with ENOSYS.  Some functions are actually named
7869     something starting with __ and the normal name is an alias.  */
7870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7871 choke me
7872 #else
7873 f = $ac_func;
7874 #endif
7875
7876   ;
7877   return 0;
7878 }
7879 _ACEOF
7880 rm -f conftest.$ac_objext conftest$ac_exeext
7881 if { (eval echo "$as_me:7881: \"$ac_link\"") >&5
7882   (eval $ac_link) 2>&5
7883   ac_status=$?
7884   echo "$as_me:7884: \$? = $ac_status" >&5
7885   (exit $ac_status); } &&
7886          { ac_try='test -s conftest$ac_exeext'
7887   { (eval echo "$as_me:7887: \"$ac_try\"") >&5
7888   (eval $ac_try) 2>&5
7889   ac_status=$?
7890   echo "$as_me:7890: \$? = $ac_status" >&5
7891   (exit $ac_status); }; }; then
7892   eval "$as_ac_var=yes"
7893 else
7894   echo "$as_me: failed program was:" >&5
7895 cat conftest.$ac_ext >&5
7896 eval "$as_ac_var=no"
7897 fi
7898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7899 fi
7900 echo "$as_me:7900: result: `eval echo '${'$as_ac_var'}'`" >&5
7901 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7902 if test `eval echo '${'$as_ac_var'}'` = yes; then
7903   cat >>confdefs.h <<EOF
7904 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7905 EOF
7906
7907 fi
7908 done
7909
7910         if test "$ac_cv_func_putwc" != yes ; then
7911
7912 echo "$as_me:7912: checking for multibyte character support" >&5
7913 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7914 if test "${cf_cv_utf8_lib+set}" = set; then
7915   echo $ECHO_N "(cached) $ECHO_C" >&6
7916 else
7917
7918         cf_save_LIBS="$LIBS"
7919         cat >conftest.$ac_ext <<_ACEOF
7920 #line 7920 "configure"
7921 #include "confdefs.h"
7922
7923 #include <stdlib.h>
7924 int
7925 main ()
7926 {
7927 putwc(0,0);
7928   ;
7929   return 0;
7930 }
7931 _ACEOF
7932 rm -f conftest.$ac_objext conftest$ac_exeext
7933 if { (eval echo "$as_me:7933: \"$ac_link\"") >&5
7934   (eval $ac_link) 2>&5
7935   ac_status=$?
7936   echo "$as_me:7936: \$? = $ac_status" >&5
7937   (exit $ac_status); } &&
7938          { ac_try='test -s conftest$ac_exeext'
7939   { (eval echo "$as_me:7939: \"$ac_try\"") >&5
7940   (eval $ac_try) 2>&5
7941   ac_status=$?
7942   echo "$as_me:7942: \$? = $ac_status" >&5
7943   (exit $ac_status); }; }; then
7944   cf_cv_utf8_lib=yes
7945 else
7946   echo "$as_me: failed program was:" >&5
7947 cat conftest.$ac_ext >&5
7948
7949 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7950 # will be set on completion of the AC_TRY_LINK below.
7951 cf_cv_header_path_utf8=
7952 cf_cv_library_path_utf8=
7953
7954 echo "${as_me:-configure}:7954: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7955
7956 cf_save_LIBS="$LIBS"
7957
7958 cat >conftest.$ac_ext <<_ACEOF
7959 #line 7959 "configure"
7960 #include "confdefs.h"
7961
7962 #include <libutf8.h>
7963 int
7964 main ()
7965 {
7966 putwc(0,0);
7967   ;
7968   return 0;
7969 }
7970 _ACEOF
7971 rm -f conftest.$ac_objext conftest$ac_exeext
7972 if { (eval echo "$as_me:7972: \"$ac_link\"") >&5
7973   (eval $ac_link) 2>&5
7974   ac_status=$?
7975   echo "$as_me:7975: \$? = $ac_status" >&5
7976   (exit $ac_status); } &&
7977          { ac_try='test -s conftest$ac_exeext'
7978   { (eval echo "$as_me:7978: \"$ac_try\"") >&5
7979   (eval $ac_try) 2>&5
7980   ac_status=$?
7981   echo "$as_me:7981: \$? = $ac_status" >&5
7982   (exit $ac_status); }; }; then
7983
7984         cf_cv_find_linkage_utf8=yes
7985         cf_cv_header_path_utf8=/usr/include
7986         cf_cv_library_path_utf8=/usr/lib
7987
7988 else
7989   echo "$as_me: failed program was:" >&5
7990 cat conftest.$ac_ext >&5
7991
7992 LIBS="-lutf8  $cf_save_LIBS"
7993
7994 cat >conftest.$ac_ext <<_ACEOF
7995 #line 7995 "configure"
7996 #include "confdefs.h"
7997
7998 #include <libutf8.h>
7999 int
8000 main ()
8001 {
8002 putwc(0,0);
8003   ;
8004   return 0;
8005 }
8006 _ACEOF
8007 rm -f conftest.$ac_objext conftest$ac_exeext
8008 if { (eval echo "$as_me:8008: \"$ac_link\"") >&5
8009   (eval $ac_link) 2>&5
8010   ac_status=$?
8011   echo "$as_me:8011: \$? = $ac_status" >&5
8012   (exit $ac_status); } &&
8013          { ac_try='test -s conftest$ac_exeext'
8014   { (eval echo "$as_me:8014: \"$ac_try\"") >&5
8015   (eval $ac_try) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit $ac_status); }; }; then
8019
8020         cf_cv_find_linkage_utf8=yes
8021         cf_cv_header_path_utf8=/usr/include
8022         cf_cv_library_path_utf8=/usr/lib
8023         cf_cv_library_file_utf8="-lutf8"
8024
8025 else
8026   echo "$as_me: failed program was:" >&5
8027 cat conftest.$ac_ext >&5
8028
8029         cf_cv_find_linkage_utf8=no
8030         LIBS="$cf_save_LIBS"
8031
8032     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8033
8034 echo "${as_me:-configure}:8034: testing find linkage for utf8 library ..." 1>&5
8035
8036 echo "${as_me:-configure}:8036: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8037
8038     cf_save_CPPFLAGS="$CPPFLAGS"
8039     cf_test_CPPFLAGS="$CPPFLAGS"
8040
8041 cf_search=
8042
8043 # collect the current set of include-directories from compiler flags
8044 cf_header_path_list=""
8045 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8046         for cf_header_path in $CPPFLAGS $CFLAGS
8047         do
8048                 case $cf_header_path in #(vi
8049                 -I*)
8050                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8051
8052 test "$cf_header_path" != "NONE" && \
8053 test -d "$cf_header_path" && \
8054  {
8055         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8056         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8057         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8058         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8059         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8060         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8061 }
8062
8063                         cf_header_path_list="$cf_header_path_list $cf_search"
8064                         ;;
8065                 esac
8066         done
8067 fi
8068
8069 # add the variations for the package we are looking for
8070
8071 cf_search=
8072
8073 test "/usr" != "$prefix" && \
8074 test -d "/usr" && \
8075 (test $prefix = NONE || test "/usr" != "$prefix") && {
8076         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8077         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8078         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8079         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8080         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8081         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8082 }
8083
8084 test "$prefix" != "NONE" && \
8085 test -d "$prefix" && \
8086  {
8087         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8088         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8089         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8090         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8091         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8092         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8093 }
8094
8095 test "/usr/local" != "$prefix" && \
8096 test -d "/usr/local" && \
8097 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8098         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8099         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8100         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8101         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8102         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8103         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8104 }
8105
8106 test "/opt" != "$prefix" && \
8107 test -d "/opt" && \
8108 (test $prefix = NONE || test "/opt" != "$prefix") && {
8109         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8110         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8111         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8112         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8113         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8114         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8115 }
8116
8117 test "$HOME" != "$prefix" && \
8118 test -d "$HOME" && \
8119 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8120         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8121         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8122         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8123         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8124         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8125         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8126 }
8127
8128 test "$includedir" != NONE && \
8129 test "$includedir" != "/usr/include" && \
8130 test -d "$includedir" && {
8131         test -d $includedir &&    cf_search="$cf_search $includedir"
8132         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8133 }
8134
8135 test "$oldincludedir" != NONE && \
8136 test "$oldincludedir" != "/usr/include" && \
8137 test -d "$oldincludedir" && {
8138         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8139         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8140 }
8141
8142 cf_search="$cf_search $cf_header_path_list"
8143
8144     for cf_cv_header_path_utf8 in $cf_search
8145     do
8146       if test -d $cf_cv_header_path_utf8 ; then
8147         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8148
8149 echo "${as_me:-configure}:8149: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8150
8151         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8152         cat >conftest.$ac_ext <<_ACEOF
8153 #line 8153 "configure"
8154 #include "confdefs.h"
8155
8156 #include <libutf8.h>
8157 int
8158 main ()
8159 {
8160 putwc(0,0);
8161   ;
8162   return 0;
8163 }
8164 _ACEOF
8165 rm -f conftest.$ac_objext
8166 if { (eval echo "$as_me:8166: \"$ac_compile\"") >&5
8167   (eval $ac_compile) 2>&5
8168   ac_status=$?
8169   echo "$as_me:8169: \$? = $ac_status" >&5
8170   (exit $ac_status); } &&
8171          { ac_try='test -s conftest.$ac_objext'
8172   { (eval echo "$as_me:8172: \"$ac_try\"") >&5
8173   (eval $ac_try) 2>&5
8174   ac_status=$?
8175   echo "$as_me:8175: \$? = $ac_status" >&5
8176   (exit $ac_status); }; }; then
8177
8178             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8179
8180 echo "${as_me:-configure}:8180: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8181
8182             cf_cv_find_linkage_utf8=maybe
8183             cf_test_CPPFLAGS="$CPPFLAGS"
8184             break
8185 else
8186   echo "$as_me: failed program was:" >&5
8187 cat conftest.$ac_ext >&5
8188
8189             CPPFLAGS="$cf_save_CPPFLAGS"
8190
8191 fi
8192 rm -f conftest.$ac_objext conftest.$ac_ext
8193       fi
8194     done
8195
8196     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8197
8198 echo "${as_me:-configure}:8198: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8199
8200       cf_save_LIBS="$LIBS"
8201       cf_save_LDFLAGS="$LDFLAGS"
8202
8203       if test "$cf_cv_find_linkage_utf8" != yes ; then
8204
8205 cf_search=
8206 cf_library_path_list=""
8207 if test -n "${LDFLAGS}${LIBS}" ; then
8208         for cf_library_path in $LDFLAGS $LIBS
8209         do
8210                 case $cf_library_path in #(vi
8211                 -L*)
8212                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8213
8214 test "$cf_library_path" != "NONE" && \
8215 test -d "$cf_library_path" && \
8216  {
8217         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8218         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8219         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8220         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8221         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8222         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8223 }
8224
8225                         cf_library_path_list="$cf_library_path_list $cf_search"
8226                         ;;
8227                 esac
8228         done
8229 fi
8230
8231 cf_search=
8232
8233 test "/usr" != "$prefix" && \
8234 test -d "/usr" && \
8235 (test $prefix = NONE || test "/usr" != "$prefix") && {
8236         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8237         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8238         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8239         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8240         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8241         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8242 }
8243
8244 test "$prefix" != "NONE" && \
8245 test -d "$prefix" && \
8246  {
8247         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8248         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8249         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8250         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8251         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8252         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8253 }
8254
8255 test "/usr/local" != "$prefix" && \
8256 test -d "/usr/local" && \
8257 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8258         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8259         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8260         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8261         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8262         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8263         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8264 }
8265
8266 test "/opt" != "$prefix" && \
8267 test -d "/opt" && \
8268 (test $prefix = NONE || test "/opt" != "$prefix") && {
8269         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8270         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8271         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8272         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8273         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8274         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8275 }
8276
8277 test "$HOME" != "$prefix" && \
8278 test -d "$HOME" && \
8279 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8280         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8281         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8282         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8283         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8284         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8285         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8286 }
8287
8288 cf_search="$cf_library_path_list $cf_search"
8289
8290         for cf_cv_library_path_utf8 in $cf_search
8291         do
8292           if test -d $cf_cv_library_path_utf8 ; then
8293             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8294
8295 echo "${as_me:-configure}:8295: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8296
8297             CPPFLAGS="$cf_test_CPPFLAGS"
8298             LIBS="-lutf8  $cf_save_LIBS"
8299             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8300             cat >conftest.$ac_ext <<_ACEOF
8301 #line 8301 "configure"
8302 #include "confdefs.h"
8303
8304 #include <libutf8.h>
8305 int
8306 main ()
8307 {
8308 putwc(0,0);
8309   ;
8310   return 0;
8311 }
8312 _ACEOF
8313 rm -f conftest.$ac_objext conftest$ac_exeext
8314 if { (eval echo "$as_me:8314: \"$ac_link\"") >&5
8315   (eval $ac_link) 2>&5
8316   ac_status=$?
8317   echo "$as_me:8317: \$? = $ac_status" >&5
8318   (exit $ac_status); } &&
8319          { ac_try='test -s conftest$ac_exeext'
8320   { (eval echo "$as_me:8320: \"$ac_try\"") >&5
8321   (eval $ac_try) 2>&5
8322   ac_status=$?
8323   echo "$as_me:8323: \$? = $ac_status" >&5
8324   (exit $ac_status); }; }; then
8325
8326                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8327
8328 echo "${as_me:-configure}:8328: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8329
8330                 cf_cv_find_linkage_utf8=yes
8331                 cf_cv_library_file_utf8="-lutf8"
8332                 break
8333 else
8334   echo "$as_me: failed program was:" >&5
8335 cat conftest.$ac_ext >&5
8336
8337                 CPPFLAGS="$cf_save_CPPFLAGS"
8338                 LIBS="$cf_save_LIBS"
8339                 LDFLAGS="$cf_save_LDFLAGS"
8340
8341 fi
8342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8343           fi
8344         done
8345         CPPFLAGS="$cf_save_CPPFLAGS"
8346         LDFLAGS="$cf_save_LDFLAGS"
8347       fi
8348
8349     else
8350       cf_cv_find_linkage_utf8=no
8351     fi
8352
8353 fi
8354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8355
8356 fi
8357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8358
8359 LIBS="$cf_save_LIBS"
8360
8361 if test "$cf_cv_find_linkage_utf8" = yes ; then
8362 cf_cv_utf8_lib=add-on
8363 else
8364 cf_cv_utf8_lib=no
8365 fi
8366
8367 fi
8368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8369 fi
8370 echo "$as_me:8370: result: $cf_cv_utf8_lib" >&5
8371 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8372
8373 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8374 # ncurses/ncursesw:
8375 if test "$cf_cv_utf8_lib" = "add-on" ; then
8376         cat >>confdefs.h <<\EOF
8377 #define HAVE_LIBUTF8_H 1
8378 EOF
8379
8380 if test -n "$cf_cv_header_path_utf8" ; then
8381   for cf_add_incdir in $cf_cv_header_path_utf8
8382   do
8383         while test $cf_add_incdir != /usr/include
8384         do
8385           if test -d $cf_add_incdir
8386           then
8387                 cf_have_incdir=no
8388                 if test -n "$CFLAGS$CPPFLAGS" ; then
8389                   # a loop is needed to ensure we can add subdirs of existing dirs
8390                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8391                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8392                           cf_have_incdir=yes; break
8393                         fi
8394                   done
8395                 fi
8396
8397                 if test "$cf_have_incdir" = no ; then
8398                   if test "$cf_add_incdir" = /usr/local/include ; then
8399                         if test "$GCC" = yes
8400                         then
8401                           cf_save_CPPFLAGS=$CPPFLAGS
8402                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8403                           cat >conftest.$ac_ext <<_ACEOF
8404 #line 8404 "configure"
8405 #include "confdefs.h"
8406 #include <stdio.h>
8407 int
8408 main ()
8409 {
8410 printf("Hello")
8411   ;
8412   return 0;
8413 }
8414 _ACEOF
8415 rm -f conftest.$ac_objext
8416 if { (eval echo "$as_me:8416: \"$ac_compile\"") >&5
8417   (eval $ac_compile) 2>&5
8418   ac_status=$?
8419   echo "$as_me:8419: \$? = $ac_status" >&5
8420   (exit $ac_status); } &&
8421          { ac_try='test -s conftest.$ac_objext'
8422   { (eval echo "$as_me:8422: \"$ac_try\"") >&5
8423   (eval $ac_try) 2>&5
8424   ac_status=$?
8425   echo "$as_me:8425: \$? = $ac_status" >&5
8426   (exit $ac_status); }; }; then
8427   :
8428 else
8429   echo "$as_me: failed program was:" >&5
8430 cat conftest.$ac_ext >&5
8431 cf_have_incdir=yes
8432 fi
8433 rm -f conftest.$ac_objext conftest.$ac_ext
8434                           CPPFLAGS=$cf_save_CPPFLAGS
8435                         fi
8436                   fi
8437                 fi
8438
8439                 if test "$cf_have_incdir" = no ; then
8440                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8441
8442 echo "${as_me:-configure}:8442: testing adding $cf_add_incdir to include-path ..." 1>&5
8443
8444                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8445
8446                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8447                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8448                   cf_add_incdir="$cf_top_incdir"
8449                 else
8450                   break
8451                 fi
8452           fi
8453         done
8454   done
8455 fi
8456
8457 if test -n "$cf_cv_library_path_utf8" ; then
8458   for cf_add_libdir in $cf_cv_library_path_utf8
8459   do
8460     if test $cf_add_libdir = /usr/lib ; then
8461       :
8462     elif test -d $cf_add_libdir
8463     then
8464       cf_have_libdir=no
8465       if test -n "$LDFLAGS$LIBS" ; then
8466         # a loop is needed to ensure we can add subdirs of existing dirs
8467         for cf_test_libdir in $LDFLAGS $LIBS ; do
8468           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8469             cf_have_libdir=yes; break
8470           fi
8471         done
8472       fi
8473       if test "$cf_have_libdir" = no ; then
8474         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8475
8476 echo "${as_me:-configure}:8476: testing adding $cf_add_libdir to library-path ..." 1>&5
8477
8478         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8479       fi
8480     fi
8481   done
8482 fi
8483
8484         LIBS="$cf_cv_library_file_utf8 $LIBS"
8485 fi
8486
8487                 if test "$cf_cv_utf8_lib" != no ; then
8488                         NCURSES_LIBUTF8=1
8489                 fi
8490         fi
8491
8492 # This is needed on Tru64 5.0 to declare mbstate_t
8493 echo "$as_me:8493: checking if we must include wchar.h to declare mbstate_t" >&5
8494 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8495 if test "${cf_cv_mbstate_t+set}" = set; then
8496   echo $ECHO_N "(cached) $ECHO_C" >&6
8497 else
8498
8499 cat >conftest.$ac_ext <<_ACEOF
8500 #line 8500 "configure"
8501 #include "confdefs.h"
8502
8503 #include <stdlib.h>
8504 #include <stdarg.h>
8505 #include <stdio.h>
8506 #ifdef HAVE_LIBUTF8_H
8507 #include <libutf8.h>
8508 #endif
8509 int
8510 main ()
8511 {
8512 mbstate_t state
8513   ;
8514   return 0;
8515 }
8516 _ACEOF
8517 rm -f conftest.$ac_objext
8518 if { (eval echo "$as_me:8518: \"$ac_compile\"") >&5
8519   (eval $ac_compile) 2>&5
8520   ac_status=$?
8521   echo "$as_me:8521: \$? = $ac_status" >&5
8522   (exit $ac_status); } &&
8523          { ac_try='test -s conftest.$ac_objext'
8524   { (eval echo "$as_me:8524: \"$ac_try\"") >&5
8525   (eval $ac_try) 2>&5
8526   ac_status=$?
8527   echo "$as_me:8527: \$? = $ac_status" >&5
8528   (exit $ac_status); }; }; then
8529   cf_cv_mbstate_t=no
8530 else
8531   echo "$as_me: failed program was:" >&5
8532 cat conftest.$ac_ext >&5
8533 cat >conftest.$ac_ext <<_ACEOF
8534 #line 8534 "configure"
8535 #include "confdefs.h"
8536
8537 #include <stdlib.h>
8538 #include <stdarg.h>
8539 #include <stdio.h>
8540 #include <wchar.h>
8541 #ifdef HAVE_LIBUTF8_H
8542 #include <libutf8.h>
8543 #endif
8544 int
8545 main ()
8546 {
8547 mbstate_t value
8548   ;
8549   return 0;
8550 }
8551 _ACEOF
8552 rm -f conftest.$ac_objext
8553 if { (eval echo "$as_me:8553: \"$ac_compile\"") >&5
8554   (eval $ac_compile) 2>&5
8555   ac_status=$?
8556   echo "$as_me:8556: \$? = $ac_status" >&5
8557   (exit $ac_status); } &&
8558          { ac_try='test -s conftest.$ac_objext'
8559   { (eval echo "$as_me:8559: \"$ac_try\"") >&5
8560   (eval $ac_try) 2>&5
8561   ac_status=$?
8562   echo "$as_me:8562: \$? = $ac_status" >&5
8563   (exit $ac_status); }; }; then
8564   cf_cv_mbstate_t=yes
8565 else
8566   echo "$as_me: failed program was:" >&5
8567 cat conftest.$ac_ext >&5
8568 cf_cv_mbstate_t=unknown
8569 fi
8570 rm -f conftest.$ac_objext conftest.$ac_ext
8571 fi
8572 rm -f conftest.$ac_objext conftest.$ac_ext
8573 fi
8574 echo "$as_me:8574: result: $cf_cv_mbstate_t" >&5
8575 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8576
8577 if test "$cf_cv_mbstate_t" = yes ; then
8578         cat >>confdefs.h <<\EOF
8579 #define NEED_WCHAR_H 1
8580 EOF
8581
8582         NEED_WCHAR_H=1
8583 fi
8584
8585 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8586 if test "$cf_cv_mbstate_t" = unknown ; then
8587         NCURSES_MBSTATE_T=1
8588 fi
8589
8590 # This is needed on Tru64 5.0 to declare wchar_t
8591 echo "$as_me:8591: checking if we must include wchar.h to declare wchar_t" >&5
8592 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8593 if test "${cf_cv_wchar_t+set}" = set; then
8594   echo $ECHO_N "(cached) $ECHO_C" >&6
8595 else
8596
8597 cat >conftest.$ac_ext <<_ACEOF
8598 #line 8598 "configure"
8599 #include "confdefs.h"
8600
8601 #include <stdlib.h>
8602 #include <stdarg.h>
8603 #include <stdio.h>
8604 #ifdef HAVE_LIBUTF8_H
8605 #include <libutf8.h>
8606 #endif
8607 int
8608 main ()
8609 {
8610 wchar_t state
8611   ;
8612   return 0;
8613 }
8614 _ACEOF
8615 rm -f conftest.$ac_objext
8616 if { (eval echo "$as_me:8616: \"$ac_compile\"") >&5
8617   (eval $ac_compile) 2>&5
8618   ac_status=$?
8619   echo "$as_me:8619: \$? = $ac_status" >&5
8620   (exit $ac_status); } &&
8621          { ac_try='test -s conftest.$ac_objext'
8622   { (eval echo "$as_me:8622: \"$ac_try\"") >&5
8623   (eval $ac_try) 2>&5
8624   ac_status=$?
8625   echo "$as_me:8625: \$? = $ac_status" >&5
8626   (exit $ac_status); }; }; then
8627   cf_cv_wchar_t=no
8628 else
8629   echo "$as_me: failed program was:" >&5
8630 cat conftest.$ac_ext >&5
8631 cat >conftest.$ac_ext <<_ACEOF
8632 #line 8632 "configure"
8633 #include "confdefs.h"
8634
8635 #include <stdlib.h>
8636 #include <stdarg.h>
8637 #include <stdio.h>
8638 #include <wchar.h>
8639 #ifdef HAVE_LIBUTF8_H
8640 #include <libutf8.h>
8641 #endif
8642 int
8643 main ()
8644 {
8645 wchar_t value
8646   ;
8647   return 0;
8648 }
8649 _ACEOF
8650 rm -f conftest.$ac_objext
8651 if { (eval echo "$as_me:8651: \"$ac_compile\"") >&5
8652   (eval $ac_compile) 2>&5
8653   ac_status=$?
8654   echo "$as_me:8654: \$? = $ac_status" >&5
8655   (exit $ac_status); } &&
8656          { ac_try='test -s conftest.$ac_objext'
8657   { (eval echo "$as_me:8657: \"$ac_try\"") >&5
8658   (eval $ac_try) 2>&5
8659   ac_status=$?
8660   echo "$as_me:8660: \$? = $ac_status" >&5
8661   (exit $ac_status); }; }; then
8662   cf_cv_wchar_t=yes
8663 else
8664   echo "$as_me: failed program was:" >&5
8665 cat conftest.$ac_ext >&5
8666 cf_cv_wchar_t=unknown
8667 fi
8668 rm -f conftest.$ac_objext conftest.$ac_ext
8669 fi
8670 rm -f conftest.$ac_objext conftest.$ac_ext
8671 fi
8672 echo "$as_me:8672: result: $cf_cv_wchar_t" >&5
8673 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8674
8675 if test "$cf_cv_wchar_t" = yes ; then
8676         cat >>confdefs.h <<\EOF
8677 #define NEED_WCHAR_H 1
8678 EOF
8679
8680         NEED_WCHAR_H=1
8681 fi
8682
8683 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8684 if test "$cf_cv_wchar_t" = unknown ; then
8685         NCURSES_WCHAR_T=1
8686 fi
8687
8688 # if we find wchar_t in either place, use substitution to provide a fallback.
8689 if test "$cf_cv_wchar_t" != unknown ; then
8690         NCURSES_OK_WCHAR_T=1
8691 fi
8692
8693 # This is needed on Tru64 5.0 to declare wint_t
8694 echo "$as_me:8694: checking if we must include wchar.h to declare wint_t" >&5
8695 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8696 if test "${cf_cv_wint_t+set}" = set; then
8697   echo $ECHO_N "(cached) $ECHO_C" >&6
8698 else
8699
8700 cat >conftest.$ac_ext <<_ACEOF
8701 #line 8701 "configure"
8702 #include "confdefs.h"
8703
8704 #include <stdlib.h>
8705 #include <stdarg.h>
8706 #include <stdio.h>
8707 #ifdef HAVE_LIBUTF8_H
8708 #include <libutf8.h>
8709 #endif
8710 int
8711 main ()
8712 {
8713 wint_t state
8714   ;
8715   return 0;
8716 }
8717 _ACEOF
8718 rm -f conftest.$ac_objext
8719 if { (eval echo "$as_me:8719: \"$ac_compile\"") >&5
8720   (eval $ac_compile) 2>&5
8721   ac_status=$?
8722   echo "$as_me:8722: \$? = $ac_status" >&5
8723   (exit $ac_status); } &&
8724          { ac_try='test -s conftest.$ac_objext'
8725   { (eval echo "$as_me:8725: \"$ac_try\"") >&5
8726   (eval $ac_try) 2>&5
8727   ac_status=$?
8728   echo "$as_me:8728: \$? = $ac_status" >&5
8729   (exit $ac_status); }; }; then
8730   cf_cv_wint_t=no
8731 else
8732   echo "$as_me: failed program was:" >&5
8733 cat conftest.$ac_ext >&5
8734 cat >conftest.$ac_ext <<_ACEOF
8735 #line 8735 "configure"
8736 #include "confdefs.h"
8737
8738 #include <stdlib.h>
8739 #include <stdarg.h>
8740 #include <stdio.h>
8741 #include <wchar.h>
8742 #ifdef HAVE_LIBUTF8_H
8743 #include <libutf8.h>
8744 #endif
8745 int
8746 main ()
8747 {
8748 wint_t value
8749   ;
8750   return 0;
8751 }
8752 _ACEOF
8753 rm -f conftest.$ac_objext
8754 if { (eval echo "$as_me:8754: \"$ac_compile\"") >&5
8755   (eval $ac_compile) 2>&5
8756   ac_status=$?
8757   echo "$as_me:8757: \$? = $ac_status" >&5
8758   (exit $ac_status); } &&
8759          { ac_try='test -s conftest.$ac_objext'
8760   { (eval echo "$as_me:8760: \"$ac_try\"") >&5
8761   (eval $ac_try) 2>&5
8762   ac_status=$?
8763   echo "$as_me:8763: \$? = $ac_status" >&5
8764   (exit $ac_status); }; }; then
8765   cf_cv_wint_t=yes
8766 else
8767   echo "$as_me: failed program was:" >&5
8768 cat conftest.$ac_ext >&5
8769 cf_cv_wint_t=unknown
8770 fi
8771 rm -f conftest.$ac_objext conftest.$ac_ext
8772 fi
8773 rm -f conftest.$ac_objext conftest.$ac_ext
8774 fi
8775 echo "$as_me:8775: result: $cf_cv_wint_t" >&5
8776 echo "${ECHO_T}$cf_cv_wint_t" >&6
8777
8778 if test "$cf_cv_wint_t" = yes ; then
8779         cat >>confdefs.h <<\EOF
8780 #define NEED_WCHAR_H 1
8781 EOF
8782
8783         NEED_WCHAR_H=1
8784 fi
8785
8786 # if we do not find wint_t in either place, use substitution to provide a fallback.
8787 if test "$cf_cv_wint_t" = unknown ; then
8788         NCURSES_WINT_T=1
8789 fi
8790
8791 # if we find wint_t in either place, use substitution to provide a fallback.
8792 if test "$cf_cv_wint_t" != unknown ; then
8793         NCURSES_OK_WINT_T=1
8794 fi
8795
8796         if test "$NCURSES_MBSTATE_T" != 0; then
8797                 cat >>confdefs.h <<\EOF
8798 #define NEED_MBSTATE_T_DEF 1
8799 EOF
8800
8801         fi
8802 fi
8803
8804 ###   use option --disable-lp64 to allow long chtype
8805 case $cf_cv_abi_version in
8806 [345]*)
8807         default_with_lp64=no
8808         ;;
8809 *)
8810         default_with_lp64=yes
8811         ;;
8812 esac
8813
8814 echo "$as_me:8814: checking whether to enable _LP64 definition in curses.h" >&5
8815 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8816
8817 # Check whether --enable-lp64 or --disable-lp64 was given.
8818 if test "${enable_lp64+set}" = set; then
8819   enableval="$enable_lp64"
8820   with_lp64=$enableval
8821 else
8822   with_lp64=$default_with_lp64
8823 fi;
8824 echo "$as_me:8824: result: $with_lp64" >&5
8825 echo "${ECHO_T}$with_lp64" >&6
8826
8827 if test "$with_lp64" = yes ; then
8828         cf_cv_enable_lp64=1
8829 else
8830         cf_cv_enable_lp64=0
8831 fi
8832
8833 # Check whether --enable-largefile or --disable-largefile was given.
8834 if test "${enable_largefile+set}" = set; then
8835   enableval="$enable_largefile"
8836
8837 fi;
8838 if test "$enable_largefile" != no; then
8839
8840   echo "$as_me:8840: checking for special C compiler options needed for large files" >&5
8841 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8842 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8843   echo $ECHO_N "(cached) $ECHO_C" >&6
8844 else
8845   ac_cv_sys_largefile_CC=no
8846      if test "$GCC" != yes; then
8847        ac_save_CC=$CC
8848        while :; do
8849          # IRIX 6.2 and later do not support large files by default,
8850          # so use the C compiler's -n32 option if that helps.
8851          cat >conftest.$ac_ext <<_ACEOF
8852 #line 8852 "configure"
8853 #include "confdefs.h"
8854 #include <sys/types.h>
8855  /* Check that off_t can represent 2**63 - 1 correctly.
8856     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8857     since some C++ compilers masquerading as C compilers
8858     incorrectly reject 9223372036854775807.  */
8859 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8860   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8861                        && LARGE_OFF_T % 2147483647 == 1)
8862                       ? 1 : -1];
8863 int
8864 main ()
8865 {
8866
8867   ;
8868   return 0;
8869 }
8870 _ACEOF
8871          rm -f conftest.$ac_objext
8872 if { (eval echo "$as_me:8872: \"$ac_compile\"") >&5
8873   (eval $ac_compile) 2>&5
8874   ac_status=$?
8875   echo "$as_me:8875: \$? = $ac_status" >&5
8876   (exit $ac_status); } &&
8877          { ac_try='test -s conftest.$ac_objext'
8878   { (eval echo "$as_me:8878: \"$ac_try\"") >&5
8879   (eval $ac_try) 2>&5
8880   ac_status=$?
8881   echo "$as_me:8881: \$? = $ac_status" >&5
8882   (exit $ac_status); }; }; then
8883   break
8884 else
8885   echo "$as_me: failed program was:" >&5
8886 cat conftest.$ac_ext >&5
8887 fi
8888 rm -f conftest.$ac_objext
8889          CC="$CC -n32"
8890          rm -f conftest.$ac_objext
8891 if { (eval echo "$as_me:8891: \"$ac_compile\"") >&5
8892   (eval $ac_compile) 2>&5
8893   ac_status=$?
8894   echo "$as_me:8894: \$? = $ac_status" >&5
8895   (exit $ac_status); } &&
8896          { ac_try='test -s conftest.$ac_objext'
8897   { (eval echo "$as_me:8897: \"$ac_try\"") >&5
8898   (eval $ac_try) 2>&5
8899   ac_status=$?
8900   echo "$as_me:8900: \$? = $ac_status" >&5
8901   (exit $ac_status); }; }; then
8902   ac_cv_sys_largefile_CC=' -n32'; break
8903 else
8904   echo "$as_me: failed program was:" >&5
8905 cat conftest.$ac_ext >&5
8906 fi
8907 rm -f conftest.$ac_objext
8908          break
8909        done
8910        CC=$ac_save_CC
8911        rm -f conftest.$ac_ext
8912     fi
8913 fi
8914 echo "$as_me:8914: result: $ac_cv_sys_largefile_CC" >&5
8915 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8916   if test "$ac_cv_sys_largefile_CC" != no; then
8917     CC=$CC$ac_cv_sys_largefile_CC
8918   fi
8919
8920   echo "$as_me:8920: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8921 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8922 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8923   echo $ECHO_N "(cached) $ECHO_C" >&6
8924 else
8925   while :; do
8926   ac_cv_sys_file_offset_bits=no
8927   cat >conftest.$ac_ext <<_ACEOF
8928 #line 8928 "configure"
8929 #include "confdefs.h"
8930 #include <sys/types.h>
8931  /* Check that off_t can represent 2**63 - 1 correctly.
8932     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8933     since some C++ compilers masquerading as C compilers
8934     incorrectly reject 9223372036854775807.  */
8935 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8936   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8937                        && LARGE_OFF_T % 2147483647 == 1)
8938                       ? 1 : -1];
8939 int
8940 main ()
8941 {
8942
8943   ;
8944   return 0;
8945 }
8946 _ACEOF
8947 rm -f conftest.$ac_objext
8948 if { (eval echo "$as_me:8948: \"$ac_compile\"") >&5
8949   (eval $ac_compile) 2>&5
8950   ac_status=$?
8951   echo "$as_me:8951: \$? = $ac_status" >&5
8952   (exit $ac_status); } &&
8953          { ac_try='test -s conftest.$ac_objext'
8954   { (eval echo "$as_me:8954: \"$ac_try\"") >&5
8955   (eval $ac_try) 2>&5
8956   ac_status=$?
8957   echo "$as_me:8957: \$? = $ac_status" >&5
8958   (exit $ac_status); }; }; then
8959   break
8960 else
8961   echo "$as_me: failed program was:" >&5
8962 cat conftest.$ac_ext >&5
8963 fi
8964 rm -f conftest.$ac_objext conftest.$ac_ext
8965   cat >conftest.$ac_ext <<_ACEOF
8966 #line 8966 "configure"
8967 #include "confdefs.h"
8968 #define _FILE_OFFSET_BITS 64
8969 #include <sys/types.h>
8970  /* Check that off_t can represent 2**63 - 1 correctly.
8971     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8972     since some C++ compilers masquerading as C compilers
8973     incorrectly reject 9223372036854775807.  */
8974 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8975   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8976                        && LARGE_OFF_T % 2147483647 == 1)
8977                       ? 1 : -1];
8978 int
8979 main ()
8980 {
8981
8982   ;
8983   return 0;
8984 }
8985 _ACEOF
8986 rm -f conftest.$ac_objext
8987 if { (eval echo "$as_me:8987: \"$ac_compile\"") >&5
8988   (eval $ac_compile) 2>&5
8989   ac_status=$?
8990   echo "$as_me:8990: \$? = $ac_status" >&5
8991   (exit $ac_status); } &&
8992          { ac_try='test -s conftest.$ac_objext'
8993   { (eval echo "$as_me:8993: \"$ac_try\"") >&5
8994   (eval $ac_try) 2>&5
8995   ac_status=$?
8996   echo "$as_me:8996: \$? = $ac_status" >&5
8997   (exit $ac_status); }; }; then
8998   ac_cv_sys_file_offset_bits=64; break
8999 else
9000   echo "$as_me: failed program was:" >&5
9001 cat conftest.$ac_ext >&5
9002 fi
9003 rm -f conftest.$ac_objext conftest.$ac_ext
9004   break
9005 done
9006 fi
9007 echo "$as_me:9007: result: $ac_cv_sys_file_offset_bits" >&5
9008 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9009 if test "$ac_cv_sys_file_offset_bits" != no; then
9010
9011 cat >>confdefs.h <<EOF
9012 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9013 EOF
9014
9015 fi
9016 rm -rf conftest*
9017   echo "$as_me:9017: checking for _LARGE_FILES value needed for large files" >&5
9018 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9019 if test "${ac_cv_sys_large_files+set}" = set; then
9020   echo $ECHO_N "(cached) $ECHO_C" >&6
9021 else
9022   while :; do
9023   ac_cv_sys_large_files=no
9024   cat >conftest.$ac_ext <<_ACEOF
9025 #line 9025 "configure"
9026 #include "confdefs.h"
9027 #include <sys/types.h>
9028  /* Check that off_t can represent 2**63 - 1 correctly.
9029     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9030     since some C++ compilers masquerading as C compilers
9031     incorrectly reject 9223372036854775807.  */
9032 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9033   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9034                        && LARGE_OFF_T % 2147483647 == 1)
9035                       ? 1 : -1];
9036 int
9037 main ()
9038 {
9039
9040   ;
9041   return 0;
9042 }
9043 _ACEOF
9044 rm -f conftest.$ac_objext
9045 if { (eval echo "$as_me:9045: \"$ac_compile\"") >&5
9046   (eval $ac_compile) 2>&5
9047   ac_status=$?
9048   echo "$as_me:9048: \$? = $ac_status" >&5
9049   (exit $ac_status); } &&
9050          { ac_try='test -s conftest.$ac_objext'
9051   { (eval echo "$as_me:9051: \"$ac_try\"") >&5
9052   (eval $ac_try) 2>&5
9053   ac_status=$?
9054   echo "$as_me:9054: \$? = $ac_status" >&5
9055   (exit $ac_status); }; }; then
9056   break
9057 else
9058   echo "$as_me: failed program was:" >&5
9059 cat conftest.$ac_ext >&5
9060 fi
9061 rm -f conftest.$ac_objext conftest.$ac_ext
9062   cat >conftest.$ac_ext <<_ACEOF
9063 #line 9063 "configure"
9064 #include "confdefs.h"
9065 #define _LARGE_FILES 1
9066 #include <sys/types.h>
9067  /* Check that off_t can represent 2**63 - 1 correctly.
9068     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9069     since some C++ compilers masquerading as C compilers
9070     incorrectly reject 9223372036854775807.  */
9071 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9072   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9073                        && LARGE_OFF_T % 2147483647 == 1)
9074                       ? 1 : -1];
9075 int
9076 main ()
9077 {
9078
9079   ;
9080   return 0;
9081 }
9082 _ACEOF
9083 rm -f conftest.$ac_objext
9084 if { (eval echo "$as_me:9084: \"$ac_compile\"") >&5
9085   (eval $ac_compile) 2>&5
9086   ac_status=$?
9087   echo "$as_me:9087: \$? = $ac_status" >&5
9088   (exit $ac_status); } &&
9089          { ac_try='test -s conftest.$ac_objext'
9090   { (eval echo "$as_me:9090: \"$ac_try\"") >&5
9091   (eval $ac_try) 2>&5
9092   ac_status=$?
9093   echo "$as_me:9093: \$? = $ac_status" >&5
9094   (exit $ac_status); }; }; then
9095   ac_cv_sys_large_files=1; break
9096 else
9097   echo "$as_me: failed program was:" >&5
9098 cat conftest.$ac_ext >&5
9099 fi
9100 rm -f conftest.$ac_objext conftest.$ac_ext
9101   break
9102 done
9103 fi
9104 echo "$as_me:9104: result: $ac_cv_sys_large_files" >&5
9105 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9106 if test "$ac_cv_sys_large_files" != no; then
9107
9108 cat >>confdefs.h <<EOF
9109 #define _LARGE_FILES $ac_cv_sys_large_files
9110 EOF
9111
9112 fi
9113 rm -rf conftest*
9114 fi
9115
9116     if test "$enable_largefile" != no ; then
9117         echo "$as_me:9117: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9118 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9119 if test "${ac_cv_sys_largefile_source+set}" = set; then
9120   echo $ECHO_N "(cached) $ECHO_C" >&6
9121 else
9122   while :; do
9123   ac_cv_sys_largefile_source=no
9124   cat >conftest.$ac_ext <<_ACEOF
9125 #line 9125 "configure"
9126 #include "confdefs.h"
9127 #include <stdio.h>
9128 int
9129 main ()
9130 {
9131 return !fseeko;
9132   ;
9133   return 0;
9134 }
9135 _ACEOF
9136 rm -f conftest.$ac_objext
9137 if { (eval echo "$as_me:9137: \"$ac_compile\"") >&5
9138   (eval $ac_compile) 2>&5
9139   ac_status=$?
9140   echo "$as_me:9140: \$? = $ac_status" >&5
9141   (exit $ac_status); } &&
9142          { ac_try='test -s conftest.$ac_objext'
9143   { (eval echo "$as_me:9143: \"$ac_try\"") >&5
9144   (eval $ac_try) 2>&5
9145   ac_status=$?
9146   echo "$as_me:9146: \$? = $ac_status" >&5
9147   (exit $ac_status); }; }; then
9148   break
9149 else
9150   echo "$as_me: failed program was:" >&5
9151 cat conftest.$ac_ext >&5
9152 fi
9153 rm -f conftest.$ac_objext conftest.$ac_ext
9154   cat >conftest.$ac_ext <<_ACEOF
9155 #line 9155 "configure"
9156 #include "confdefs.h"
9157 #define _LARGEFILE_SOURCE 1
9158 #include <stdio.h>
9159 int
9160 main ()
9161 {
9162 return !fseeko;
9163   ;
9164   return 0;
9165 }
9166 _ACEOF
9167 rm -f conftest.$ac_objext
9168 if { (eval echo "$as_me:9168: \"$ac_compile\"") >&5
9169   (eval $ac_compile) 2>&5
9170   ac_status=$?
9171   echo "$as_me:9171: \$? = $ac_status" >&5
9172   (exit $ac_status); } &&
9173          { ac_try='test -s conftest.$ac_objext'
9174   { (eval echo "$as_me:9174: \"$ac_try\"") >&5
9175   (eval $ac_try) 2>&5
9176   ac_status=$?
9177   echo "$as_me:9177: \$? = $ac_status" >&5
9178   (exit $ac_status); }; }; then
9179   ac_cv_sys_largefile_source=1; break
9180 else
9181   echo "$as_me: failed program was:" >&5
9182 cat conftest.$ac_ext >&5
9183 fi
9184 rm -f conftest.$ac_objext conftest.$ac_ext
9185   break
9186 done
9187 fi
9188 echo "$as_me:9188: result: $ac_cv_sys_largefile_source" >&5
9189 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9190 if test "$ac_cv_sys_largefile_source" != no; then
9191
9192 cat >>confdefs.h <<EOF
9193 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9194 EOF
9195
9196 fi
9197 rm -rf conftest*
9198
9199 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9200 # in glibc 2.1.3, but that breaks too many other things.
9201 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9202 echo "$as_me:9202: checking for fseeko" >&5
9203 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9204 if test "${ac_cv_func_fseeko+set}" = set; then
9205   echo $ECHO_N "(cached) $ECHO_C" >&6
9206 else
9207   cat >conftest.$ac_ext <<_ACEOF
9208 #line 9208 "configure"
9209 #include "confdefs.h"
9210 #include <stdio.h>
9211 int
9212 main ()
9213 {
9214 return fseeko && fseeko (stdin, 0, 0);
9215   ;
9216   return 0;
9217 }
9218 _ACEOF
9219 rm -f conftest.$ac_objext conftest$ac_exeext
9220 if { (eval echo "$as_me:9220: \"$ac_link\"") >&5
9221   (eval $ac_link) 2>&5
9222   ac_status=$?
9223   echo "$as_me:9223: \$? = $ac_status" >&5
9224   (exit $ac_status); } &&
9225          { ac_try='test -s conftest$ac_exeext'
9226   { (eval echo "$as_me:9226: \"$ac_try\"") >&5
9227   (eval $ac_try) 2>&5
9228   ac_status=$?
9229   echo "$as_me:9229: \$? = $ac_status" >&5
9230   (exit $ac_status); }; }; then
9231   ac_cv_func_fseeko=yes
9232 else
9233   echo "$as_me: failed program was:" >&5
9234 cat conftest.$ac_ext >&5
9235 ac_cv_func_fseeko=no
9236 fi
9237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9238 fi
9239 echo "$as_me:9239: result: $ac_cv_func_fseeko" >&5
9240 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9241 if test $ac_cv_func_fseeko = yes; then
9242
9243 cat >>confdefs.h <<\EOF
9244 #define HAVE_FSEEKO 1
9245 EOF
9246
9247 fi
9248
9249         # Normally we would collect these definitions in the config.h,
9250         # but (like _XOPEN_SOURCE), some environments rely on having these
9251         # defined before any of the system headers are included.  Another
9252         # case comes up with C++, e.g., on AIX the compiler compiles the
9253         # header files by themselves before looking at the body files it is
9254         # told to compile.  For ncurses, those header files do not include
9255         # the config.h
9256         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9257         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9258         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9259
9260         echo "$as_me:9260: checking whether to use struct dirent64" >&5
9261 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9262 if test "${cf_cv_struct_dirent64+set}" = set; then
9263   echo $ECHO_N "(cached) $ECHO_C" >&6
9264 else
9265
9266                 cat >conftest.$ac_ext <<_ACEOF
9267 #line 9267 "configure"
9268 #include "confdefs.h"
9269
9270 #include <sys/types.h>
9271 #include <dirent.h>
9272
9273 int
9274 main ()
9275 {
9276
9277                 /* if transitional largefile support is setup, this is true */
9278                 extern struct dirent64 * readdir(DIR *);
9279                 struct dirent64 *x = readdir((DIR *)0);
9280                 struct dirent *y = readdir((DIR *)0);
9281                 int z = x - y;
9282
9283   ;
9284   return 0;
9285 }
9286 _ACEOF
9287 rm -f conftest.$ac_objext
9288 if { (eval echo "$as_me:9288: \"$ac_compile\"") >&5
9289   (eval $ac_compile) 2>&5
9290   ac_status=$?
9291   echo "$as_me:9291: \$? = $ac_status" >&5
9292   (exit $ac_status); } &&
9293          { ac_try='test -s conftest.$ac_objext'
9294   { (eval echo "$as_me:9294: \"$ac_try\"") >&5
9295   (eval $ac_try) 2>&5
9296   ac_status=$?
9297   echo "$as_me:9297: \$? = $ac_status" >&5
9298   (exit $ac_status); }; }; then
9299   cf_cv_struct_dirent64=yes
9300 else
9301   echo "$as_me: failed program was:" >&5
9302 cat conftest.$ac_ext >&5
9303 cf_cv_struct_dirent64=no
9304 fi
9305 rm -f conftest.$ac_objext conftest.$ac_ext
9306
9307 fi
9308 echo "$as_me:9308: result: $cf_cv_struct_dirent64" >&5
9309 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9310         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9311 #define HAVE_STRUCT_DIRENT64 1
9312 EOF
9313
9314     fi
9315
9316 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9317 echo "$as_me:9317: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9318 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9319
9320 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9321 if test "${enable_tparm_varargs+set}" = set; then
9322   enableval="$enable_tparm_varargs"
9323   with_tparm_varargs=$enableval
9324 else
9325   with_tparm_varargs=yes
9326 fi;
9327 echo "$as_me:9327: result: $with_tparm_varargs" >&5
9328 echo "${ECHO_T}$with_tparm_varargs" >&6
9329 NCURSES_TPARM_VARARGS=0
9330 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9331
9332 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9333 if test "$with_ticlib" != no ; then
9334 echo "$as_me:9334: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9335 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9336
9337 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9338 if test "${enable_tic_depends+set}" = set; then
9339   enableval="$enable_tic_depends"
9340   with_tic_depends=$enableval
9341 else
9342   with_tic_depends=yes
9343 fi;
9344 echo "$as_me:9344: result: $with_tic_depends" >&5
9345 echo "${ECHO_T}$with_tic_depends" >&6
9346 else
9347         with_tic_depends=no
9348 fi
9349
9350 ###   use option --with-bool to override bool's type
9351 echo "$as_me:9351: checking for type of bool" >&5
9352 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9353
9354 # Check whether --with-bool or --without-bool was given.
9355 if test "${with_bool+set}" = set; then
9356   withval="$with_bool"
9357   NCURSES_BOOL="$withval"
9358 else
9359   NCURSES_BOOL=auto
9360 fi;
9361 echo "$as_me:9361: result: $NCURSES_BOOL" >&5
9362 echo "${ECHO_T}$NCURSES_BOOL" >&6
9363
9364 echo "$as_me:9364: checking for alternate terminal capabilities file" >&5
9365 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9366
9367 # Check whether --with-caps or --without-caps was given.
9368 if test "${with_caps+set}" = set; then
9369   withval="$with_caps"
9370   TERMINFO_CAPS=Caps.$withval
9371 else
9372   TERMINFO_CAPS=Caps
9373 fi;
9374 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9375 echo "$as_me:9375: result: $TERMINFO_CAPS" >&5
9376 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9377
9378 ###   use option --with-chtype to override chtype's type
9379 echo "$as_me:9379: checking for type of chtype" >&5
9380 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9381
9382 # Check whether --with-chtype or --without-chtype was given.
9383 if test "${with_chtype+set}" = set; then
9384   withval="$with_chtype"
9385   NCURSES_CHTYPE="$withval"
9386 else
9387   NCURSES_CHTYPE=auto
9388 fi;
9389 echo "$as_me:9389: result: $NCURSES_CHTYPE" >&5
9390 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9391
9392 ###   use option --with-ospeed to override ospeed's type
9393 echo "$as_me:9393: checking for type of ospeed" >&5
9394 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9395
9396 # Check whether --with-ospeed or --without-ospeed was given.
9397 if test "${with_ospeed+set}" = set; then
9398   withval="$with_ospeed"
9399   NCURSES_OSPEED="$withval"
9400 else
9401   NCURSES_OSPEED=short
9402 fi;
9403 echo "$as_me:9403: result: $NCURSES_OSPEED" >&5
9404 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9405
9406 ###   use option --with-mmask-t to override mmask_t's type
9407 echo "$as_me:9407: checking for type of mmask_t" >&5
9408 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9409
9410 # Check whether --with-mmask-t or --without-mmask-t was given.
9411 if test "${with_mmask_t+set}" = set; then
9412   withval="$with_mmask_t"
9413   NCURSES_MMASK_T="$withval"
9414 else
9415   NCURSES_MMASK_T=auto
9416 fi;
9417 echo "$as_me:9417: result: $NCURSES_MMASK_T" >&5
9418 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9419
9420 ###   use option --with-ccharw-max to override CCHARW_MAX size
9421 echo "$as_me:9421: checking for size CCHARW_MAX" >&5
9422 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9423
9424 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9425 if test "${with_ccharw_max+set}" = set; then
9426   withval="$with_ccharw_max"
9427   NCURSES_CCHARW_MAX="$withval"
9428 else
9429   NCURSES_CCHARW_MAX=5
9430 fi;
9431 echo "$as_me:9431: result: $NCURSES_CCHARW_MAX" >&5
9432 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9433
9434 ### Enable compiling-in rcs id's
9435 echo "$as_me:9435: checking if RCS identifiers should be compiled-in" >&5
9436 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9437
9438 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9439 if test "${with_rcs_ids+set}" = set; then
9440   withval="$with_rcs_ids"
9441   with_rcs_ids=$withval
9442 else
9443   with_rcs_ids=no
9444 fi;
9445 echo "$as_me:9445: result: $with_rcs_ids" >&5
9446 echo "${ECHO_T}$with_rcs_ids" >&6
9447 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9448 #define USE_RCS_IDS 1
9449 EOF
9450
9451 ###############################################################################
9452
9453 echo "$as_me:9453: checking format of man-pages" >&5
9454 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9455
9456 # Check whether --with-manpage-format or --without-manpage-format was given.
9457 if test "${with_manpage_format+set}" = set; then
9458   withval="$with_manpage_format"
9459   MANPAGE_FORMAT=$withval
9460 else
9461   MANPAGE_FORMAT=unknown
9462 fi;
9463
9464 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9465 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9466
9467 cf_unknown=
9468
9469 case $MANPAGE_FORMAT in
9470 unknown)
9471   if test -z "$MANPATH" ; then
9472     MANPATH="/usr/man:/usr/share/man"
9473   fi
9474
9475   # look for the 'date' man-page (it's most likely to be installed!)
9476   MANPAGE_FORMAT=
9477   cf_preform=no
9478   cf_catonly=yes
9479   cf_example=date
9480
9481   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9482   for cf_dir in $MANPATH; do
9483     test -z "$cf_dir" && cf_dir=/usr/man
9484     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
9485     do
9486       cf_test=`echo $cf_name | sed -e 's/*//'`
9487       if test "x$cf_test" = "x$cf_name" ; then
9488
9489         case "$cf_name" in
9490         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9491         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9492         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9493         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9494         esac
9495
9496         case "$cf_name" in
9497         $cf_dir/man*)
9498           cf_catonly=no
9499           ;;
9500         $cf_dir/cat*)
9501           cf_preform=yes
9502           ;;
9503         esac
9504         break
9505       fi
9506
9507       # if we found a match in either man* or cat*, stop looking
9508       if test -n "$MANPAGE_FORMAT" ; then
9509         cf_found=no
9510         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9511         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9512         case "$cf_name" in
9513         $cf_dir/cat*)
9514           cf_found=yes
9515           ;;
9516         esac
9517         test $cf_found=yes && break
9518       fi
9519     done
9520     # only check the first directory in $MANPATH where we find manpages
9521     if test -n "$MANPAGE_FORMAT" ; then
9522        break
9523     fi
9524   done
9525   # if we did not find the example, just assume it is normal
9526   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9527   IFS="$ac_save_ifs"
9528   ;;
9529 *)
9530   for cf_option in $MANPAGE_FORMAT; do
9531      case $cf_option in #(vi
9532      gzip|compress|BSDI|normal|formatted|catonly)
9533        ;;
9534      *)
9535        cf_unknown="$cf_unknown $cf_option"
9536        ;;
9537      esac
9538   done
9539   ;;
9540 esac
9541
9542 echo "$as_me:9542: result: $MANPAGE_FORMAT" >&5
9543 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9544 if test -n "$cf_unknown" ; then
9545   { echo "$as_me:9545: WARNING: Unexpected manpage-format $cf_unknown" >&5
9546 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9547 fi
9548
9549 echo "$as_me:9549: checking for manpage renaming" >&5
9550 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9551
9552 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9553 if test "${with_manpage_renames+set}" = set; then
9554   withval="$with_manpage_renames"
9555   MANPAGE_RENAMES=$withval
9556 else
9557   MANPAGE_RENAMES=yes
9558 fi;
9559
9560 case ".$MANPAGE_RENAMES" in #(vi
9561 .no) #(vi
9562   ;;
9563 .|.yes)
9564   # Debian 'man' program?
9565   if test -f /etc/debian_version ; then
9566     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9567   else
9568     MANPAGE_RENAMES=no
9569   fi
9570   ;;
9571 esac
9572
9573 if test "$MANPAGE_RENAMES" != no ; then
9574   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9575     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9576   elif test ! -f $MANPAGE_RENAMES ; then
9577     { { echo "$as_me:9577: error: not a filename: $MANPAGE_RENAMES" >&5
9578 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9579    { (exit 1); exit 1; }; }
9580   fi
9581
9582   test ! -d man && mkdir man
9583
9584   # Construct a sed-script to perform renaming within man-pages
9585   if test -n "$MANPAGE_RENAMES" ; then
9586     test ! -d man && mkdir man
9587     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9588   fi
9589 fi
9590
9591 echo "$as_me:9591: result: $MANPAGE_RENAMES" >&5
9592 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9593
9594 echo "$as_me:9594: checking if manpage aliases will be installed" >&5
9595 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9596
9597 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9598 if test "${with_manpage_aliases+set}" = set; then
9599   withval="$with_manpage_aliases"
9600   MANPAGE_ALIASES=$withval
9601 else
9602   MANPAGE_ALIASES=yes
9603 fi;
9604
9605 echo "$as_me:9605: result: $MANPAGE_ALIASES" >&5
9606 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9607
9608 case "x$LN_S" in #(vi
9609 xln*) #(vi
9610         cf_use_symlinks=yes
9611         ;;
9612 *)
9613         cf_use_symlinks=no
9614         ;;
9615 esac
9616
9617 MANPAGE_SYMLINKS=no
9618 if test "$MANPAGE_ALIASES" = yes ; then
9619 echo "$as_me:9619: checking if manpage symlinks should be used" >&5
9620 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9621
9622 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9623 if test "${with_manpage_symlinks+set}" = set; then
9624   withval="$with_manpage_symlinks"
9625   MANPAGE_SYMLINKS=$withval
9626 else
9627   MANPAGE_SYMLINKS=$cf_use_symlinks
9628 fi;
9629
9630 if test "$$cf_use_symlinks" = no; then
9631 if test "$MANPAGE_SYMLINKS" = yes ; then
9632         { echo "$as_me:9632: WARNING: cannot make symlinks" >&5
9633 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9634         MANPAGE_SYMLINKS=no
9635 fi
9636 fi
9637
9638 echo "$as_me:9638: result: $MANPAGE_SYMLINKS" >&5
9639 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9640 fi
9641
9642 echo "$as_me:9642: checking for manpage tbl" >&5
9643 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9644
9645 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9646 if test "${with_manpage_tbl+set}" = set; then
9647   withval="$with_manpage_tbl"
9648   MANPAGE_TBL=$withval
9649 else
9650   MANPAGE_TBL=no
9651 fi;
9652
9653 echo "$as_me:9653: result: $MANPAGE_TBL" >&5
9654 echo "${ECHO_T}$MANPAGE_TBL" >&6
9655
9656   if test "$prefix" = "NONE" ; then
9657      cf_prefix="$ac_default_prefix"
9658   else
9659      cf_prefix="$prefix"
9660   fi
9661
9662   case "$MANPAGE_FORMAT" in # (vi
9663   *catonly*) # (vi
9664     cf_format=yes
9665     cf_inboth=no
9666     ;;
9667   *formatted*) # (vi
9668     cf_format=yes
9669     cf_inboth=yes
9670     ;;
9671   *)
9672     cf_format=no
9673     cf_inboth=no
9674     ;;
9675   esac
9676
9677 test ! -d man && mkdir man
9678
9679 cf_so_strip=
9680 cf_compress=
9681 case "$MANPAGE_FORMAT" in #(vi
9682 *compress*) #(vi
9683         cf_so_strip="Z"
9684         cf_compress=compress
9685   ;;
9686 *gzip*)
9687         cf_so_strip="gz"
9688         cf_compress=gzip
9689   ;;
9690 esac
9691
9692 cf_edit_man=./edit_man.sh
9693 cf_man_alias=`pwd`/man_alias.sed
9694
9695 cat >$cf_edit_man <<CF_EOF
9696 #! /bin/sh
9697 # this script is generated by the configure-script CF_MAN_PAGES macro.
9698
9699 prefix="$cf_prefix"
9700 datadir="$datadir"
9701
9702 NCURSES_MAJOR="$NCURSES_MAJOR"
9703 NCURSES_MINOR="$NCURSES_MINOR"
9704 NCURSES_PATCH="$NCURSES_PATCH"
9705
9706 NCURSES_OSPEED="$NCURSES_OSPEED"
9707 TERMINFO="$TERMINFO"
9708
9709 INSTALL="$INSTALL"
9710 INSTALL_DATA="$INSTALL_DATA"
9711
9712 transform="$program_transform_name"
9713
9714 TMP=\${TMPDIR:=/tmp}/man\$\$
9715 trap "rm -f \$TMP" 0 1 2 5 15
9716
9717 form=\$1
9718 shift || exit 1
9719
9720 verb=\$1
9721 shift || exit 1
9722
9723 mandir=\$1
9724 shift || exit 1
9725
9726 srcdir=\$1
9727 top_srcdir=\$srcdir/..
9728 shift || exit 1
9729
9730 if test "\$form" = normal ; then
9731         if test "$cf_format" = yes ; then
9732         if test "$cf_inboth" = no ; then
9733                 sh \$0 format \$verb \$mandir \$srcdir \$*
9734                 exit $?
9735         fi
9736         fi
9737         cf_subdir=\$mandir/man
9738         cf_tables=$MANPAGE_TBL
9739 else
9740         cf_subdir=\$mandir/cat
9741         cf_tables=yes
9742 fi
9743
9744 # process the list of source-files
9745 for i in \$* ; do
9746 case \$i in #(vi
9747 *.orig|*.rej) ;; #(vi
9748 *.[0-9]*)
9749         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9750         if test \$verb = installing ; then
9751         if test ! -d \$cf_subdir\${section} ; then
9752                 mkdir -p \$cf_subdir\$section
9753         fi
9754         fi
9755
9756         # replace variables in man page
9757         if test ! -f $cf_man_alias ; then
9758 cat >>$cf_man_alias <<-CF_EOF2
9759                 s,@DATADIR@,\$datadir,g
9760                 s,@TERMINFO@,\$TERMINFO,g
9761                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9762                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9763                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9764                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9765 CF_EOF
9766
9767         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9768         do
9769                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9770                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9771 cat >>$cf_edit_man <<-CF_EOF
9772                 s,@$cf_NAME@,$cf_name,g
9773 CF_EOF
9774         done
9775
9776 cat >>$cf_edit_man <<CF_EOF
9777 CF_EOF2
9778                 echo "...made $cf_man_alias"
9779         fi
9780
9781         aliases=
9782         cf_source=\`basename \$i\`
9783         inalias=\$cf_source
9784         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9785         if test ! -f \$inalias ; then
9786                 echo .. skipped \$cf_source
9787                 continue
9788         fi
9789 CF_EOF
9790
9791 if test "$MANPAGE_ALIASES" != no ; then
9792 cat >>$cf_edit_man <<CF_EOF
9793         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9794 CF_EOF
9795 fi
9796
9797 if test "$MANPAGE_RENAMES" = no ; then
9798 cat >>$cf_edit_man <<CF_EOF
9799         # perform program transformations for section 1 man pages
9800         if test \$section = 1 ; then
9801                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9802         else
9803                 cf_target=\$cf_subdir\${section}/\$cf_source
9804         fi
9805 CF_EOF
9806 else
9807 cat >>$cf_edit_man <<CF_EOF
9808         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9809         if test -z "\$cf_target" ; then
9810                 echo '? missing rename for '\$cf_source
9811                 cf_target="\$cf_source"
9812         fi
9813         cf_target="\$cf_subdir\${section}/\${cf_target}"
9814
9815 CF_EOF
9816 fi
9817
9818 cat >>$cf_edit_man <<CF_EOF
9819         sed     -f $cf_man_alias \\
9820 CF_EOF
9821
9822 if test -f $MANPAGE_RENAMES ; then
9823 cat >>$cf_edit_man <<CF_EOF
9824                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9825 CF_EOF
9826 else
9827 cat >>$cf_edit_man <<CF_EOF
9828                 < \$i >\$TMP
9829 CF_EOF
9830 fi
9831
9832 cat >>$cf_edit_man <<CF_EOF
9833 if test \$cf_tables = yes ; then
9834         tbl \$TMP >\$TMP.out
9835         mv \$TMP.out \$TMP
9836 fi
9837 CF_EOF
9838
9839 if test $with_curses_h != yes ; then
9840 cat >>$cf_edit_man <<CF_EOF
9841         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9842         mv \$TMP.out \$TMP
9843 CF_EOF
9844 fi
9845
9846 cat >>$cf_edit_man <<CF_EOF
9847         if test \$form = format ; then
9848                 nroff -man \$TMP >\$TMP.out
9849                 mv \$TMP.out \$TMP
9850         fi
9851 CF_EOF
9852
9853 if test -n "$cf_compress" ; then
9854 cat >>$cf_edit_man <<CF_EOF
9855         if test \$verb = installing ; then
9856         if ( $cf_compress -f \$TMP )
9857         then
9858                 mv \$TMP.$cf_so_strip \$TMP
9859         fi
9860         fi
9861         cf_target="\$cf_target.$cf_so_strip"
9862 CF_EOF
9863 fi
9864
9865 case "$MANPAGE_FORMAT" in #(vi
9866 *BSDI*)
9867 cat >>$cf_edit_man <<CF_EOF
9868         if test \$form = format ; then
9869                 # BSDI installs only .0 suffixes in the cat directories
9870                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9871         fi
9872 CF_EOF
9873   ;;
9874 esac
9875
9876 cat >>$cf_edit_man <<CF_EOF
9877         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9878         if test \$verb = installing ; then
9879                 echo \$verb \$cf_target
9880                 \$INSTALL_DATA \$TMP \$cf_target
9881                 test -d \$cf_subdir\${section} &&
9882                 test -n "\$aliases" && (
9883                         cd \$cf_subdir\${section} && (
9884                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9885                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9886                                 cf_target=\`basename \$cf_target\`
9887                                 for cf_alias in \$aliases
9888                                 do
9889                                         if test \$section = 1 ; then
9890                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9891                                         fi
9892
9893                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9894                                                 if test -f \$cf_alias\${suffix} ; then
9895                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9896                                                         then
9897                                                                 continue
9898                                                         fi
9899                                                 fi
9900                                                 echo .. \$verb alias \$cf_alias\${suffix}
9901 CF_EOF
9902 case "x$LN_S" in #(vi
9903 *-f) #(vi
9904 cat >>$cf_edit_man <<CF_EOF
9905                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9906 CF_EOF
9907         ;;
9908 *)
9909 cat >>$cf_edit_man <<CF_EOF
9910                                                 rm -f \$cf_alias\${suffix}
9911                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9912 CF_EOF
9913         ;;
9914 esac
9915 cat >>$cf_edit_man <<CF_EOF
9916                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9917                                                 echo ".so \$cf_source" >\$TMP
9918 CF_EOF
9919 if test -n "$cf_compress" ; then
9920 cat >>$cf_edit_man <<CF_EOF
9921                                                 if test -n "$cf_so_strip" ; then
9922                                                         $cf_compress -f \$TMP
9923                                                         mv \$TMP.$cf_so_strip \$TMP
9924                                                 fi
9925 CF_EOF
9926 fi
9927 cat >>$cf_edit_man <<CF_EOF
9928                                                 echo .. \$verb alias \$cf_alias\${suffix}
9929                                                 rm -f \$cf_alias\${suffix}
9930                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9931                                         fi
9932                                 done
9933                         )
9934                 )
9935         elif test \$verb = removing ; then
9936                 test -f \$cf_target && (
9937                         echo \$verb \$cf_target
9938                         rm -f \$cf_target
9939                 )
9940                 test -d \$cf_subdir\${section} &&
9941                 test -n "\$aliases" && (
9942                         cd \$cf_subdir\${section} && (
9943                                 for cf_alias in \$aliases
9944                                 do
9945                                         if test \$section = 1 ; then
9946                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9947                                         fi
9948
9949                                         echo .. \$verb alias \$cf_alias\${suffix}
9950                                         rm -f \$cf_alias\${suffix}
9951                                 done
9952                         )
9953                 )
9954         else
9955 #               echo ".hy 0"
9956                 cat \$TMP
9957         fi
9958         ;;
9959 esac
9960 done
9961
9962 if test $cf_inboth = yes ; then
9963 if test \$form != format ; then
9964         sh \$0 format \$verb \$mandir \$srcdir \$*
9965 fi
9966 fi
9967
9968 exit 0
9969 CF_EOF
9970 chmod 755 $cf_edit_man
9971
9972 ###############################################################################
9973
9974 ### Note that some functions (such as const) are normally disabled anyway.
9975 echo "$as_me:9975: checking if you want to build with function extensions" >&5
9976 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9977
9978 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9979 if test "${enable_ext_funcs+set}" = set; then
9980   enableval="$enable_ext_funcs"
9981   with_ext_funcs=$enableval
9982 else
9983   with_ext_funcs=yes
9984 fi;
9985 echo "$as_me:9985: result: $with_ext_funcs" >&5
9986 echo "${ECHO_T}$with_ext_funcs" >&6
9987 if test "$with_ext_funcs" = yes ; then
9988         NCURSES_EXT_FUNCS=1
9989         cat >>confdefs.h <<\EOF
9990 #define HAVE_CURSES_VERSION 1
9991 EOF
9992
9993         cat >>confdefs.h <<\EOF
9994 #define HAVE_HAS_KEY 1
9995 EOF
9996
9997         cat >>confdefs.h <<\EOF
9998 #define HAVE_RESIZETERM 1
9999 EOF
10000
10001         cat >>confdefs.h <<\EOF
10002 #define HAVE_RESIZE_TERM 1
10003 EOF
10004
10005         cat >>confdefs.h <<\EOF
10006 #define HAVE_TERM_ENTRY_H 1
10007 EOF
10008
10009         cat >>confdefs.h <<\EOF
10010 #define HAVE_USE_DEFAULT_COLORS 1
10011 EOF
10012
10013         cat >>confdefs.h <<\EOF
10014 #define HAVE_WRESIZE 1
10015 EOF
10016
10017         cat >>confdefs.h <<\EOF
10018 #define NCURSES_EXT_FUNCS 1
10019 EOF
10020
10021         GENERATED_EXT_FUNCS=generated
10022 else
10023         NCURSES_EXT_FUNCS=0
10024         GENERATED_EXT_FUNCS=
10025 fi
10026
10027 echo "$as_me:10027: checking if you want to build with experimental SCREEN extensions" >&5
10028 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10029
10030 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10031 if test "${enable_sp_funcs+set}" = set; then
10032   enableval="$enable_sp_funcs"
10033   with_sp_funcs=$enableval
10034 else
10035   with_sp_funcs=no
10036 fi;
10037 echo "$as_me:10037: result: $with_sp_funcs" >&5
10038 echo "${ECHO_T}$with_sp_funcs" >&6
10039 if test "$with_sp_funcs" = yes ; then
10040         NCURSES_SP_FUNCS=1
10041         cat >>confdefs.h <<\EOF
10042 #define NCURSES_SP_FUNCS 1
10043 EOF
10044
10045         GENERATED_SP_FUNCS=generated
10046 else
10047         NCURSES_SP_FUNCS=0
10048         GENERATED_SP_FUNCS=
10049 fi
10050
10051 echo "$as_me:10051: checking if you want to build with experimental terminal-driver" >&5
10052 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10053
10054 # Check whether --enable-term-driver or --disable-term-driver was given.
10055 if test "${enable_term_driver+set}" = set; then
10056   enableval="$enable_term_driver"
10057   with_term_driver=$enableval
10058 else
10059   with_term_driver=no
10060 fi;
10061 echo "$as_me:10061: result: $with_term_driver" >&5
10062 echo "${ECHO_T}$with_term_driver" >&6
10063 if test "$with_term_driver" = yes ; then
10064         cat >>confdefs.h <<\EOF
10065 #define USE_TERM_DRIVER 1
10066 EOF
10067
10068         if test "$with_sp_funcs" != yes ; then
10069                 { { echo "$as_me:10069: error: The term-driver option relies upon sp-funcs" >&5
10070 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10071    { (exit 1); exit 1; }; }
10072         fi
10073 fi
10074
10075 ###   use option --enable-const to turn on use of const beyond that in XSI.
10076 echo "$as_me:10076: checking for extended use of const keyword" >&5
10077 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10078
10079 # Check whether --enable-const or --disable-const was given.
10080 if test "${enable_const+set}" = set; then
10081   enableval="$enable_const"
10082   with_ext_const=$enableval
10083 else
10084   with_ext_const=no
10085 fi;
10086 echo "$as_me:10086: result: $with_ext_const" >&5
10087 echo "${ECHO_T}$with_ext_const" >&6
10088 NCURSES_CONST='/*nothing*/'
10089 if test "$with_ext_const" = yes ; then
10090         NCURSES_CONST=const
10091 fi
10092
10093 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10094 echo "$as_me:10094: checking if you want to use extended colors" >&5
10095 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10096
10097 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10098 if test "${enable_ext_colors+set}" = set; then
10099   enableval="$enable_ext_colors"
10100   with_ext_colors=$enableval
10101 else
10102   with_ext_colors=no
10103 fi;
10104 echo "$as_me:10104: result: $with_ext_colors" >&5
10105 echo "${ECHO_T}$with_ext_colors" >&6
10106 NCURSES_EXT_COLORS=0
10107 if test "$with_ext_colors" = yes ; then
10108         if test "$with_widec" != yes ; then
10109                 { { echo "$as_me:10109: error: This option applies only to wide-character library" >&5
10110 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10111    { (exit 1); exit 1; }; }
10112         else
10113                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10114
10115 if test "${with_abi_version+set}" != set; then
10116         case $cf_cv_rel_version in
10117         5.*)
10118                 cf_cv_rel_version=6.0
10119                 cf_cv_abi_version=6
10120                 { echo "$as_me:10120: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10121 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10122                 ;;
10123         esac
10124 fi
10125
10126         fi
10127         NCURSES_EXT_COLORS=1
10128         cat >>confdefs.h <<\EOF
10129 #define NCURSES_EXT_COLORS 1
10130 EOF
10131
10132 fi
10133
10134 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10135 echo "$as_me:10135: checking if you want to use extended mouse encoding" >&5
10136 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10137
10138 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10139 if test "${enable_ext_mouse+set}" = set; then
10140   enableval="$enable_ext_mouse"
10141   with_ext_mouse=$enableval
10142 else
10143   with_ext_mouse=no
10144 fi;
10145 echo "$as_me:10145: result: $with_ext_mouse" >&5
10146 echo "${ECHO_T}$with_ext_mouse" >&6
10147 NCURSES_MOUSE_VERSION=1
10148 if test "$with_ext_mouse" = yes ; then
10149         NCURSES_MOUSE_VERSION=2
10150
10151 if test "${with_abi_version+set}" != set; then
10152         case $cf_cv_rel_version in
10153         5.*)
10154                 cf_cv_rel_version=6.0
10155                 cf_cv_abi_version=6
10156                 { echo "$as_me:10156: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10157 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10158                 ;;
10159         esac
10160 fi
10161
10162 fi
10163
10164 echo "$as_me:10164: checking if you want \$NCURSES_NO_PADDING code" >&5
10165 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10166
10167 # Check whether --enable-no-padding or --disable-no-padding was given.
10168 if test "${enable_no_padding+set}" = set; then
10169   enableval="$enable_no_padding"
10170   with_no_padding=$enableval
10171 else
10172   with_no_padding=$with_ext_funcs
10173 fi;
10174 echo "$as_me:10174: result: $with_no_padding" >&5
10175 echo "${ECHO_T}$with_no_padding" >&6
10176 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10177 #define NCURSES_NO_PADDING 1
10178 EOF
10179
10180 echo "$as_me:10180: checking for ANSI C header files" >&5
10181 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10182 if test "${ac_cv_header_stdc+set}" = set; then
10183   echo $ECHO_N "(cached) $ECHO_C" >&6
10184 else
10185   cat >conftest.$ac_ext <<_ACEOF
10186 #line 10186 "configure"
10187 #include "confdefs.h"
10188 #include <stdlib.h>
10189 #include <stdarg.h>
10190 #include <string.h>
10191 #include <float.h>
10192
10193 _ACEOF
10194 if { (eval echo "$as_me:10194: \"$ac_cpp conftest.$ac_ext\"") >&5
10195   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10196   ac_status=$?
10197   egrep -v '^ *\+' conftest.er1 >conftest.err
10198   rm -f conftest.er1
10199   cat conftest.err >&5
10200   echo "$as_me:10200: \$? = $ac_status" >&5
10201   (exit $ac_status); } >/dev/null; then
10202   if test -s conftest.err; then
10203     ac_cpp_err=$ac_c_preproc_warn_flag
10204   else
10205     ac_cpp_err=
10206   fi
10207 else
10208   ac_cpp_err=yes
10209 fi
10210 if test -z "$ac_cpp_err"; then
10211   ac_cv_header_stdc=yes
10212 else
10213   echo "$as_me: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   ac_cv_header_stdc=no
10216 fi
10217 rm -f conftest.err conftest.$ac_ext
10218
10219 if test $ac_cv_header_stdc = yes; then
10220   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10221   cat >conftest.$ac_ext <<_ACEOF
10222 #line 10222 "configure"
10223 #include "confdefs.h"
10224 #include <string.h>
10225
10226 _ACEOF
10227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10228   egrep "memchr" >/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   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10239   cat >conftest.$ac_ext <<_ACEOF
10240 #line 10240 "configure"
10241 #include "confdefs.h"
10242 #include <stdlib.h>
10243
10244 _ACEOF
10245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10246   egrep "free" >/dev/null 2>&1; then
10247   :
10248 else
10249   ac_cv_header_stdc=no
10250 fi
10251 rm -rf conftest*
10252
10253 fi
10254
10255 if test $ac_cv_header_stdc = yes; then
10256   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10257   if test "$cross_compiling" = yes; then
10258   :
10259 else
10260   cat >conftest.$ac_ext <<_ACEOF
10261 #line 10261 "configure"
10262 #include "confdefs.h"
10263 #include <ctype.h>
10264 #if ((' ' & 0x0FF) == 0x020)
10265 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10266 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10267 #else
10268 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10269                      || ('j' <= (c) && (c) <= 'r') \
10270                      || ('s' <= (c) && (c) <= 'z'))
10271 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10272 #endif
10273
10274 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10275 int
10276 main ()
10277 {
10278   int i;
10279   for (i = 0; i < 256; i++)
10280     if (XOR (islower (i), ISLOWER (i))
10281         || toupper (i) != TOUPPER (i))
10282       $ac_main_return(2);
10283   $ac_main_return (0);
10284 }
10285 _ACEOF
10286 rm -f conftest$ac_exeext
10287 if { (eval echo "$as_me:10287: \"$ac_link\"") >&5
10288   (eval $ac_link) 2>&5
10289   ac_status=$?
10290   echo "$as_me:10290: \$? = $ac_status" >&5
10291   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10292   { (eval echo "$as_me:10292: \"$ac_try\"") >&5
10293   (eval $ac_try) 2>&5
10294   ac_status=$?
10295   echo "$as_me:10295: \$? = $ac_status" >&5
10296   (exit $ac_status); }; }; then
10297   :
10298 else
10299   echo "$as_me: program exited with status $ac_status" >&5
10300 echo "$as_me: failed program was:" >&5
10301 cat conftest.$ac_ext >&5
10302 ac_cv_header_stdc=no
10303 fi
10304 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10305 fi
10306 fi
10307 fi
10308 echo "$as_me:10308: result: $ac_cv_header_stdc" >&5
10309 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10310 if test $ac_cv_header_stdc = yes; then
10311
10312 cat >>confdefs.h <<\EOF
10313 #define STDC_HEADERS 1
10314 EOF
10315
10316 fi
10317
10318 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10319
10320 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10321                   inttypes.h stdint.h unistd.h
10322 do
10323 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10324 echo "$as_me:10324: checking for $ac_header" >&5
10325 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10326 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10327   echo $ECHO_N "(cached) $ECHO_C" >&6
10328 else
10329   cat >conftest.$ac_ext <<_ACEOF
10330 #line 10330 "configure"
10331 #include "confdefs.h"
10332 $ac_includes_default
10333 #include <$ac_header>
10334 _ACEOF
10335 rm -f conftest.$ac_objext
10336 if { (eval echo "$as_me:10336: \"$ac_compile\"") >&5
10337   (eval $ac_compile) 2>&5
10338   ac_status=$?
10339   echo "$as_me:10339: \$? = $ac_status" >&5
10340   (exit $ac_status); } &&
10341          { ac_try='test -s conftest.$ac_objext'
10342   { (eval echo "$as_me:10342: \"$ac_try\"") >&5
10343   (eval $ac_try) 2>&5
10344   ac_status=$?
10345   echo "$as_me:10345: \$? = $ac_status" >&5
10346   (exit $ac_status); }; }; then
10347   eval "$as_ac_Header=yes"
10348 else
10349   echo "$as_me: failed program was:" >&5
10350 cat conftest.$ac_ext >&5
10351 eval "$as_ac_Header=no"
10352 fi
10353 rm -f conftest.$ac_objext conftest.$ac_ext
10354 fi
10355 echo "$as_me:10355: result: `eval echo '${'$as_ac_Header'}'`" >&5
10356 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10357 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10358   cat >>confdefs.h <<EOF
10359 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10360 EOF
10361
10362 fi
10363 done
10364
10365 echo "$as_me:10365: checking for signed char" >&5
10366 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10367 if test "${ac_cv_type_signed_char+set}" = set; then
10368   echo $ECHO_N "(cached) $ECHO_C" >&6
10369 else
10370   cat >conftest.$ac_ext <<_ACEOF
10371 #line 10371 "configure"
10372 #include "confdefs.h"
10373 $ac_includes_default
10374 int
10375 main ()
10376 {
10377 if ((signed char *) 0)
10378   return 0;
10379 if (sizeof (signed char))
10380   return 0;
10381   ;
10382   return 0;
10383 }
10384 _ACEOF
10385 rm -f conftest.$ac_objext
10386 if { (eval echo "$as_me:10386: \"$ac_compile\"") >&5
10387   (eval $ac_compile) 2>&5
10388   ac_status=$?
10389   echo "$as_me:10389: \$? = $ac_status" >&5
10390   (exit $ac_status); } &&
10391          { ac_try='test -s conftest.$ac_objext'
10392   { (eval echo "$as_me:10392: \"$ac_try\"") >&5
10393   (eval $ac_try) 2>&5
10394   ac_status=$?
10395   echo "$as_me:10395: \$? = $ac_status" >&5
10396   (exit $ac_status); }; }; then
10397   ac_cv_type_signed_char=yes
10398 else
10399   echo "$as_me: failed program was:" >&5
10400 cat conftest.$ac_ext >&5
10401 ac_cv_type_signed_char=no
10402 fi
10403 rm -f conftest.$ac_objext conftest.$ac_ext
10404 fi
10405 echo "$as_me:10405: result: $ac_cv_type_signed_char" >&5
10406 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10407
10408 echo "$as_me:10408: checking size of signed char" >&5
10409 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10410 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10411   echo $ECHO_N "(cached) $ECHO_C" >&6
10412 else
10413   if test "$ac_cv_type_signed_char" = yes; then
10414   if test "$cross_compiling" = yes; then
10415   # Depending upon the size, compute the lo and hi bounds.
10416 cat >conftest.$ac_ext <<_ACEOF
10417 #line 10417 "configure"
10418 #include "confdefs.h"
10419 $ac_includes_default
10420 int
10421 main ()
10422 {
10423 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10424   ;
10425   return 0;
10426 }
10427 _ACEOF
10428 rm -f conftest.$ac_objext
10429 if { (eval echo "$as_me:10429: \"$ac_compile\"") >&5
10430   (eval $ac_compile) 2>&5
10431   ac_status=$?
10432   echo "$as_me:10432: \$? = $ac_status" >&5
10433   (exit $ac_status); } &&
10434          { ac_try='test -s conftest.$ac_objext'
10435   { (eval echo "$as_me:10435: \"$ac_try\"") >&5
10436   (eval $ac_try) 2>&5
10437   ac_status=$?
10438   echo "$as_me:10438: \$? = $ac_status" >&5
10439   (exit $ac_status); }; }; then
10440   ac_lo=0 ac_mid=0
10441   while :; do
10442     cat >conftest.$ac_ext <<_ACEOF
10443 #line 10443 "configure"
10444 #include "confdefs.h"
10445 $ac_includes_default
10446 int
10447 main ()
10448 {
10449 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10450   ;
10451   return 0;
10452 }
10453 _ACEOF
10454 rm -f conftest.$ac_objext
10455 if { (eval echo "$as_me:10455: \"$ac_compile\"") >&5
10456   (eval $ac_compile) 2>&5
10457   ac_status=$?
10458   echo "$as_me:10458: \$? = $ac_status" >&5
10459   (exit $ac_status); } &&
10460          { ac_try='test -s conftest.$ac_objext'
10461   { (eval echo "$as_me:10461: \"$ac_try\"") >&5
10462   (eval $ac_try) 2>&5
10463   ac_status=$?
10464   echo "$as_me:10464: \$? = $ac_status" >&5
10465   (exit $ac_status); }; }; then
10466   ac_hi=$ac_mid; break
10467 else
10468   echo "$as_me: failed program was:" >&5
10469 cat conftest.$ac_ext >&5
10470 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10471 fi
10472 rm -f conftest.$ac_objext conftest.$ac_ext
10473   done
10474 else
10475   echo "$as_me: failed program was:" >&5
10476 cat conftest.$ac_ext >&5
10477 ac_hi=-1 ac_mid=-1
10478   while :; do
10479     cat >conftest.$ac_ext <<_ACEOF
10480 #line 10480 "configure"
10481 #include "confdefs.h"
10482 $ac_includes_default
10483 int
10484 main ()
10485 {
10486 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10487   ;
10488   return 0;
10489 }
10490 _ACEOF
10491 rm -f conftest.$ac_objext
10492 if { (eval echo "$as_me:10492: \"$ac_compile\"") >&5
10493   (eval $ac_compile) 2>&5
10494   ac_status=$?
10495   echo "$as_me:10495: \$? = $ac_status" >&5
10496   (exit $ac_status); } &&
10497          { ac_try='test -s conftest.$ac_objext'
10498   { (eval echo "$as_me:10498: \"$ac_try\"") >&5
10499   (eval $ac_try) 2>&5
10500   ac_status=$?
10501   echo "$as_me:10501: \$? = $ac_status" >&5
10502   (exit $ac_status); }; }; then
10503   ac_lo=$ac_mid; break
10504 else
10505   echo "$as_me: failed program was:" >&5
10506 cat conftest.$ac_ext >&5
10507 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10508 fi
10509 rm -f conftest.$ac_objext conftest.$ac_ext
10510   done
10511 fi
10512 rm -f conftest.$ac_objext conftest.$ac_ext
10513 # Binary search between lo and hi bounds.
10514 while test "x$ac_lo" != "x$ac_hi"; do
10515   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10516   cat >conftest.$ac_ext <<_ACEOF
10517 #line 10517 "configure"
10518 #include "confdefs.h"
10519 $ac_includes_default
10520 int
10521 main ()
10522 {
10523 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10524   ;
10525   return 0;
10526 }
10527 _ACEOF
10528 rm -f conftest.$ac_objext
10529 if { (eval echo "$as_me:10529: \"$ac_compile\"") >&5
10530   (eval $ac_compile) 2>&5
10531   ac_status=$?
10532   echo "$as_me:10532: \$? = $ac_status" >&5
10533   (exit $ac_status); } &&
10534          { ac_try='test -s conftest.$ac_objext'
10535   { (eval echo "$as_me:10535: \"$ac_try\"") >&5
10536   (eval $ac_try) 2>&5
10537   ac_status=$?
10538   echo "$as_me:10538: \$? = $ac_status" >&5
10539   (exit $ac_status); }; }; then
10540   ac_hi=$ac_mid
10541 else
10542   echo "$as_me: failed program was:" >&5
10543 cat conftest.$ac_ext >&5
10544 ac_lo=`expr $ac_mid + 1`
10545 fi
10546 rm -f conftest.$ac_objext conftest.$ac_ext
10547 done
10548 ac_cv_sizeof_signed_char=$ac_lo
10549 else
10550   if test "$cross_compiling" = yes; then
10551   { { echo "$as_me:10551: error: cannot run test program while cross compiling" >&5
10552 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10553    { (exit 1); exit 1; }; }
10554 else
10555   cat >conftest.$ac_ext <<_ACEOF
10556 #line 10556 "configure"
10557 #include "confdefs.h"
10558 $ac_includes_default
10559 int
10560 main ()
10561 {
10562 FILE *f = fopen ("conftest.val", "w");
10563 if (!f)
10564   $ac_main_return (1);
10565 fprintf (f, "%d", (sizeof (signed char)));
10566 fclose (f);
10567   ;
10568   return 0;
10569 }
10570 _ACEOF
10571 rm -f conftest$ac_exeext
10572 if { (eval echo "$as_me:10572: \"$ac_link\"") >&5
10573   (eval $ac_link) 2>&5
10574   ac_status=$?
10575   echo "$as_me:10575: \$? = $ac_status" >&5
10576   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10577   { (eval echo "$as_me:10577: \"$ac_try\"") >&5
10578   (eval $ac_try) 2>&5
10579   ac_status=$?
10580   echo "$as_me:10580: \$? = $ac_status" >&5
10581   (exit $ac_status); }; }; then
10582   ac_cv_sizeof_signed_char=`cat conftest.val`
10583 else
10584   echo "$as_me: program exited with status $ac_status" >&5
10585 echo "$as_me: failed program was:" >&5
10586 cat conftest.$ac_ext >&5
10587 fi
10588 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10589 fi
10590 fi
10591 rm -f conftest.val
10592 else
10593   ac_cv_sizeof_signed_char=0
10594 fi
10595 fi
10596 echo "$as_me:10596: result: $ac_cv_sizeof_signed_char" >&5
10597 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10598 cat >>confdefs.h <<EOF
10599 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10600 EOF
10601
10602 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10603         NCURSES_SBOOL="signed char"
10604 else
10605         NCURSES_SBOOL="char"
10606 fi
10607 echo "$as_me:10607: checking if you want to use signed Boolean array in term.h" >&5
10608 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10609
10610 # Check whether --enable-signed-char or --disable-signed-char was given.
10611 if test "${enable_signed_char+set}" = set; then
10612   enableval="$enable_signed_char"
10613   with_signed_char=$enableval
10614 else
10615   with_signed_char=no
10616 fi;
10617 echo "$as_me:10617: result: $with_signed_char" >&5
10618 echo "${ECHO_T}$with_signed_char" >&6
10619 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10620
10621 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10622 echo "$as_me:10622: checking if you want SIGWINCH handler" >&5
10623 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10624
10625 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10626 if test "${enable_sigwinch+set}" = set; then
10627   enableval="$enable_sigwinch"
10628   with_sigwinch=$enableval
10629 else
10630   with_sigwinch=$with_ext_funcs
10631 fi;
10632 echo "$as_me:10632: result: $with_sigwinch" >&5
10633 echo "${ECHO_T}$with_sigwinch" >&6
10634 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10635 #define USE_SIGWINCH 1
10636 EOF
10637
10638 ###   use option --enable-tcap-names to allow user to define new capabilities
10639 echo "$as_me:10639: checking if you want user-definable terminal capabilities like termcap" >&5
10640 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10641
10642 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10643 if test "${enable_tcap_names+set}" = set; then
10644   enableval="$enable_tcap_names"
10645   with_tcap_names=$enableval
10646 else
10647   with_tcap_names=$with_ext_funcs
10648 fi;
10649 echo "$as_me:10649: result: $with_tcap_names" >&5
10650 echo "${ECHO_T}$with_tcap_names" >&6
10651 NCURSES_XNAMES=0
10652 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10653
10654 ###############################################################################
10655 # These options are relatively safe to experiment with.
10656
10657 echo "$as_me:10657: checking if you want all development code" >&5
10658 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10659
10660 # Check whether --with-develop or --without-develop was given.
10661 if test "${with_develop+set}" = set; then
10662   withval="$with_develop"
10663   with_develop=$withval
10664 else
10665   with_develop=no
10666 fi;
10667 echo "$as_me:10667: result: $with_develop" >&5
10668 echo "${ECHO_T}$with_develop" >&6
10669
10670 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10671 echo "$as_me:10671: checking if you want hard-tabs code" >&5
10672 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10673
10674 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10675 if test "${enable_hard_tabs+set}" = set; then
10676   enableval="$enable_hard_tabs"
10677
10678 else
10679   enable_hard_tabs=$with_develop
10680 fi;
10681 echo "$as_me:10681: result: $enable_hard_tabs" >&5
10682 echo "${ECHO_T}$enable_hard_tabs" >&6
10683 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10684 #define USE_HARD_TABS 1
10685 EOF
10686
10687 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10688 echo "$as_me:10688: checking if you want limited support for xmc" >&5
10689 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10690
10691 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10692 if test "${enable_xmc_glitch+set}" = set; then
10693   enableval="$enable_xmc_glitch"
10694
10695 else
10696   enable_xmc_glitch=$with_develop
10697 fi;
10698 echo "$as_me:10698: result: $enable_xmc_glitch" >&5
10699 echo "${ECHO_T}$enable_xmc_glitch" >&6
10700 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10701 #define USE_XMC_SUPPORT 1
10702 EOF
10703
10704 ###############################################################################
10705 # These are just experimental, probably should not be in a package:
10706
10707 echo "$as_me:10707: checking if you do not want to assume colors are white-on-black" >&5
10708 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10709
10710 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10711 if test "${enable_assumed_color+set}" = set; then
10712   enableval="$enable_assumed_color"
10713   with_assumed_color=$enableval
10714 else
10715   with_assumed_color=yes
10716 fi;
10717 echo "$as_me:10717: result: $with_assumed_color" >&5
10718 echo "${ECHO_T}$with_assumed_color" >&6
10719 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10720 #define USE_ASSUMED_COLOR 1
10721 EOF
10722
10723 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10724 echo "$as_me:10724: checking if you want hashmap scrolling-optimization code" >&5
10725 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10726
10727 # Check whether --enable-hashmap or --disable-hashmap was given.
10728 if test "${enable_hashmap+set}" = set; then
10729   enableval="$enable_hashmap"
10730   with_hashmap=$enableval
10731 else
10732   with_hashmap=yes
10733 fi;
10734 echo "$as_me:10734: result: $with_hashmap" >&5
10735 echo "${ECHO_T}$with_hashmap" >&6
10736 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10737 #define USE_HASHMAP 1
10738 EOF
10739
10740 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10741 echo "$as_me:10741: checking if you want colorfgbg code" >&5
10742 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10743
10744 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10745 if test "${enable_colorfgbg+set}" = set; then
10746   enableval="$enable_colorfgbg"
10747   with_colorfgbg=$enableval
10748 else
10749   with_colorfgbg=no
10750 fi;
10751 echo "$as_me:10751: result: $with_colorfgbg" >&5
10752 echo "${ECHO_T}$with_colorfgbg" >&6
10753 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10754 #define USE_COLORFGBG 1
10755 EOF
10756
10757 ###   use option --enable-interop to turn on use of bindings used for interop
10758 echo "$as_me:10758: checking if you want interop bindings" >&5
10759 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10760
10761 # Check whether --enable-interop or --disable-interop was given.
10762 if test "${enable_interop+set}" = set; then
10763   enableval="$enable_interop"
10764   with_exp_interop=$enableval
10765 else
10766   with_exp_interop=no
10767 fi;
10768 echo "$as_me:10768: result: $with_exp_interop" >&5
10769 echo "${ECHO_T}$with_exp_interop" >&6
10770
10771 NCURSES_INTEROP_FUNCS=0
10772 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10773
10774 # This is still experimental (20080329), but should ultimately be moved to
10775 # the script-block --with-normal, etc.
10776
10777 echo "$as_me:10777: checking if you want to link with the pthread library" >&5
10778 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10779
10780 # Check whether --with-pthread or --without-pthread was given.
10781 if test "${with_pthread+set}" = set; then
10782   withval="$with_pthread"
10783   with_pthread=$withval
10784 else
10785   with_pthread=no
10786 fi;
10787 echo "$as_me:10787: result: $with_pthread" >&5
10788 echo "${ECHO_T}$with_pthread" >&6
10789
10790 if test "$with_pthread" != no ; then
10791     echo "$as_me:10791: checking for pthread.h" >&5
10792 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10793 if test "${ac_cv_header_pthread_h+set}" = set; then
10794   echo $ECHO_N "(cached) $ECHO_C" >&6
10795 else
10796   cat >conftest.$ac_ext <<_ACEOF
10797 #line 10797 "configure"
10798 #include "confdefs.h"
10799 #include <pthread.h>
10800 _ACEOF
10801 if { (eval echo "$as_me:10801: \"$ac_cpp conftest.$ac_ext\"") >&5
10802   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10803   ac_status=$?
10804   egrep -v '^ *\+' conftest.er1 >conftest.err
10805   rm -f conftest.er1
10806   cat conftest.err >&5
10807   echo "$as_me:10807: \$? = $ac_status" >&5
10808   (exit $ac_status); } >/dev/null; then
10809   if test -s conftest.err; then
10810     ac_cpp_err=$ac_c_preproc_warn_flag
10811   else
10812     ac_cpp_err=
10813   fi
10814 else
10815   ac_cpp_err=yes
10816 fi
10817 if test -z "$ac_cpp_err"; then
10818   ac_cv_header_pthread_h=yes
10819 else
10820   echo "$as_me: failed program was:" >&5
10821   cat conftest.$ac_ext >&5
10822   ac_cv_header_pthread_h=no
10823 fi
10824 rm -f conftest.err conftest.$ac_ext
10825 fi
10826 echo "$as_me:10826: result: $ac_cv_header_pthread_h" >&5
10827 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10828 if test $ac_cv_header_pthread_h = yes; then
10829
10830         cat >>confdefs.h <<\EOF
10831 #define HAVE_PTHREADS_H 1
10832 EOF
10833
10834         echo "$as_me:10834: checking if we can link with the pthread library" >&5
10835 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10836         cf_save_LIBS="$LIBS"
10837         LIBS="-lpthread $LIBS"
10838         cat >conftest.$ac_ext <<_ACEOF
10839 #line 10839 "configure"
10840 #include "confdefs.h"
10841
10842 #include <pthread.h>
10843
10844 int
10845 main ()
10846 {
10847
10848         int rc = pthread_create(0,0,0,0);
10849
10850   ;
10851   return 0;
10852 }
10853 _ACEOF
10854 rm -f conftest.$ac_objext conftest$ac_exeext
10855 if { (eval echo "$as_me:10855: \"$ac_link\"") >&5
10856   (eval $ac_link) 2>&5
10857   ac_status=$?
10858   echo "$as_me:10858: \$? = $ac_status" >&5
10859   (exit $ac_status); } &&
10860          { ac_try='test -s conftest$ac_exeext'
10861   { (eval echo "$as_me:10861: \"$ac_try\"") >&5
10862   (eval $ac_try) 2>&5
10863   ac_status=$?
10864   echo "$as_me:10864: \$? = $ac_status" >&5
10865   (exit $ac_status); }; }; then
10866   with_pthread=yes
10867 else
10868   echo "$as_me: failed program was:" >&5
10869 cat conftest.$ac_ext >&5
10870 with_pthread=no
10871 fi
10872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10873         LIBS="$cf_save_LIBS"
10874         echo "$as_me:10874: result: $with_pthread" >&5
10875 echo "${ECHO_T}$with_pthread" >&6
10876
10877         if test "$with_pthread" = yes ; then
10878             LIBS="-lpthread $LIBS"
10879             cat >>confdefs.h <<\EOF
10880 #define HAVE_LIBPTHREADS 1
10881 EOF
10882
10883         else
10884             { { echo "$as_me:10884: error: Cannot link with pthread library" >&5
10885 echo "$as_me: error: Cannot link with pthread library" >&2;}
10886    { (exit 1); exit 1; }; }
10887         fi
10888
10889 fi
10890
10891 fi
10892
10893 if test "x$with_pthread" != xno; then
10894         echo "$as_me:10894: checking for pthread_kill" >&5
10895 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
10896 if test "${ac_cv_func_pthread_kill+set}" = set; then
10897   echo $ECHO_N "(cached) $ECHO_C" >&6
10898 else
10899   cat >conftest.$ac_ext <<_ACEOF
10900 #line 10900 "configure"
10901 #include "confdefs.h"
10902 /* System header to define __stub macros and hopefully few prototypes,
10903     which can conflict with char pthread_kill (); below.  */
10904 #include <assert.h>
10905 /* Override any gcc2 internal prototype to avoid an error.  */
10906 #ifdef __cplusplus
10907 extern "C"
10908 #endif
10909 /* We use char because int might match the return type of a gcc2
10910    builtin and then its argument prototype would still apply.  */
10911 char pthread_kill ();
10912 char (*f) ();
10913
10914 int
10915 main ()
10916 {
10917 /* The GNU C library defines this for functions which it implements
10918     to always fail with ENOSYS.  Some functions are actually named
10919     something starting with __ and the normal name is an alias.  */
10920 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
10921 choke me
10922 #else
10923 f = pthread_kill;
10924 #endif
10925
10926   ;
10927   return 0;
10928 }
10929 _ACEOF
10930 rm -f conftest.$ac_objext conftest$ac_exeext
10931 if { (eval echo "$as_me:10931: \"$ac_link\"") >&5
10932   (eval $ac_link) 2>&5
10933   ac_status=$?
10934   echo "$as_me:10934: \$? = $ac_status" >&5
10935   (exit $ac_status); } &&
10936          { ac_try='test -s conftest$ac_exeext'
10937   { (eval echo "$as_me:10937: \"$ac_try\"") >&5
10938   (eval $ac_try) 2>&5
10939   ac_status=$?
10940   echo "$as_me:10940: \$? = $ac_status" >&5
10941   (exit $ac_status); }; }; then
10942   ac_cv_func_pthread_kill=yes
10943 else
10944   echo "$as_me: failed program was:" >&5
10945 cat conftest.$ac_ext >&5
10946 ac_cv_func_pthread_kill=no
10947 fi
10948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10949 fi
10950 echo "$as_me:10950: result: $ac_cv_func_pthread_kill" >&5
10951 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
10952 if test $ac_cv_func_pthread_kill = yes; then
10953
10954                 echo "$as_me:10954: checking if you want to allow EINTR in wgetch with pthreads" >&5
10955 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
10956
10957 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
10958 if test "${enable_pthreads_eintr+set}" = set; then
10959   enableval="$enable_pthreads_eintr"
10960   use_pthreads_eintr=$enableval
10961 else
10962   use_pthreads_eintr=no
10963 fi;
10964                 echo "$as_me:10964: result: $use_pthreads_eintr" >&5
10965 echo "${ECHO_T}$use_pthreads_eintr" >&6
10966                 if test $use_pthreads_eintr = yes ; then
10967                         cat >>confdefs.h <<\EOF
10968 #define USE_PTHREADS_EINTR 1
10969 EOF
10970
10971                 fi
10972 fi
10973
10974         echo "$as_me:10974: checking if you want to use weak-symbols for pthreads" >&5
10975 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10976
10977 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10978 if test "${enable_weak_symbols+set}" = set; then
10979   enableval="$enable_weak_symbols"
10980   use_weak_symbols=$enableval
10981 else
10982   use_weak_symbols=no
10983 fi;
10984         echo "$as_me:10984: result: $use_weak_symbols" >&5
10985 echo "${ECHO_T}$use_weak_symbols" >&6
10986         if test "$use_weak_symbols" = yes ; then
10987
10988 echo "$as_me:10988: checking if $CC supports weak symbols" >&5
10989 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10990 if test "${cf_cv_weak_symbols+set}" = set; then
10991   echo $ECHO_N "(cached) $ECHO_C" >&6
10992 else
10993
10994 cat >conftest.$ac_ext <<_ACEOF
10995 #line 10995 "configure"
10996 #include "confdefs.h"
10997
10998 #include <stdio.h>
10999 int
11000 main ()
11001 {
11002
11003 #if defined(__GNUC__)
11004 #  if defined __USE_ISOC99
11005 #    define _cat_pragma(exp)    _Pragma(#exp)
11006 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11007 #  else
11008 #    define _weak_pragma(exp)
11009 #  endif
11010 #  define _declare(name)        __extension__ extern __typeof__(name) name
11011 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11012 #endif
11013
11014 weak_symbol(fopen);
11015
11016   ;
11017   return 0;
11018 }
11019 _ACEOF
11020 rm -f conftest.$ac_objext
11021 if { (eval echo "$as_me:11021: \"$ac_compile\"") >&5
11022   (eval $ac_compile) 2>&5
11023   ac_status=$?
11024   echo "$as_me:11024: \$? = $ac_status" >&5
11025   (exit $ac_status); } &&
11026          { ac_try='test -s conftest.$ac_objext'
11027   { (eval echo "$as_me:11027: \"$ac_try\"") >&5
11028   (eval $ac_try) 2>&5
11029   ac_status=$?
11030   echo "$as_me:11030: \$? = $ac_status" >&5
11031   (exit $ac_status); }; }; then
11032   cf_cv_weak_symbols=yes
11033 else
11034   echo "$as_me: failed program was:" >&5
11035 cat conftest.$ac_ext >&5
11036 cf_cv_weak_symbols=no
11037 fi
11038 rm -f conftest.$ac_objext conftest.$ac_ext
11039
11040 fi
11041 echo "$as_me:11041: result: $cf_cv_weak_symbols" >&5
11042 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11043
11044         else
11045                 cf_cv_weak_symbols=no
11046         fi
11047
11048         if test $cf_cv_weak_symbols = yes ; then
11049                 cat >>confdefs.h <<\EOF
11050 #define USE_WEAK_SYMBOLS 1
11051 EOF
11052
11053         fi
11054 fi
11055
11056 PTHREAD=
11057 if test "$with_pthread" = "yes" ; then
11058     cat >>confdefs.h <<\EOF
11059 #define USE_PTHREADS 1
11060 EOF
11061
11062     enable_reentrant=yes
11063     if test $cf_cv_weak_symbols = yes ; then
11064         PTHREAD=-lpthread
11065     fi
11066 fi
11067
11068 # Reentrant code has to be opaque; there's little advantage to making ncurses
11069 # opaque outside of that, so there is no --enable-opaque option.  We can use
11070 # this option without --with-pthreads, but this will be always set for
11071 # pthreads.
11072 echo "$as_me:11072: checking if you want experimental reentrant code" >&5
11073 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11074
11075 # Check whether --enable-reentrant or --disable-reentrant was given.
11076 if test "${enable_reentrant+set}" = set; then
11077   enableval="$enable_reentrant"
11078   with_reentrant=$enableval
11079 else
11080   with_reentrant=no
11081 fi;
11082 echo "$as_me:11082: result: $with_reentrant" >&5
11083 echo "${ECHO_T}$with_reentrant" >&6
11084 if test "$with_reentrant" = yes ; then
11085         cf_cv_enable_reentrant=1
11086         cf_cv_enable_opaque="NCURSES_INTERNALS"
11087         NCURSES_OPAQUE=1
11088         NCURSES_SIZE_T=int
11089         if test $cf_cv_weak_symbols = yes ; then
11090
11091 # remove pthread library from $LIBS
11092 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11093
11094                 TEST_LIBS="-lpthread $TEST_LIBS"
11095                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11096         else
11097                 LIB_SUFFIX="t${LIB_SUFFIX}"
11098         fi
11099         cat >>confdefs.h <<\EOF
11100 #define USE_REENTRANT 1
11101 EOF
11102
11103 if test "${with_abi_version+set}" != set; then
11104         case $cf_cv_rel_version in
11105         5.*)
11106                 cf_cv_rel_version=6.0
11107                 cf_cv_abi_version=6
11108                 { echo "$as_me:11108: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11109 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11110                 ;;
11111         esac
11112 fi
11113
11114 else
11115         cf_cv_enable_reentrant=0
11116         cf_cv_enable_opaque="NCURSES_OPAQUE"
11117         NCURSES_OPAQUE=0
11118         NCURSES_SIZE_T=short
11119 fi
11120
11121 ### Allow using a different wrap-prefix
11122 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11123         echo "$as_me:11123: checking for prefix used to wrap public variables" >&5
11124 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11125
11126 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11127 if test "${with_wrap_prefix+set}" = set; then
11128   withval="$with_wrap_prefix"
11129   NCURSES_WRAP_PREFIX=$withval
11130 else
11131   NCURSES_WRAP_PREFIX=_nc_
11132 fi;
11133         echo "$as_me:11133: result: $NCURSES_WRAP_PREFIX" >&5
11134 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11135 else
11136         NCURSES_WRAP_PREFIX=_nc_
11137 fi
11138
11139 cat >>confdefs.h <<EOF
11140 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11141 EOF
11142
11143 echo "$as_me:11143: checking if you want experimental safe-sprintf code" >&5
11144 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11145
11146 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11147 if test "${enable_safe_sprintf+set}" = set; then
11148   enableval="$enable_safe_sprintf"
11149   with_safe_sprintf=$enableval
11150 else
11151   with_safe_sprintf=no
11152 fi;
11153 echo "$as_me:11153: result: $with_safe_sprintf" >&5
11154 echo "${ECHO_T}$with_safe_sprintf" >&6
11155 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11156 #define USE_SAFE_SPRINTF 1
11157 EOF
11158
11159 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11160 # when hashmap is used scroll hints are useless
11161 if test "$with_hashmap" = no ; then
11162 echo "$as_me:11162: checking if you want to experiment without scrolling-hints code" >&5
11163 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11164
11165 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11166 if test "${enable_scroll_hints+set}" = set; then
11167   enableval="$enable_scroll_hints"
11168   with_scroll_hints=$enableval
11169 else
11170   with_scroll_hints=yes
11171 fi;
11172 echo "$as_me:11172: result: $with_scroll_hints" >&5
11173 echo "${ECHO_T}$with_scroll_hints" >&6
11174 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11175 #define USE_SCROLL_HINTS 1
11176 EOF
11177
11178 fi
11179
11180 echo "$as_me:11180: checking if you want experimental wgetch-events code" >&5
11181 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11182
11183 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11184 if test "${enable_wgetch_events+set}" = set; then
11185   enableval="$enable_wgetch_events"
11186   with_wgetch_events=$enableval
11187 else
11188   with_wgetch_events=no
11189 fi;
11190 echo "$as_me:11190: result: $with_wgetch_events" >&5
11191 echo "${ECHO_T}$with_wgetch_events" >&6
11192 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11193 #define NCURSES_WGETCH_EVENTS 1
11194 EOF
11195
11196 ###############################################################################
11197
11198 ###     use option --disable-echo to suppress full display compiling commands
11199 echo "$as_me:11199: checking if you want to display full commands during build" >&5
11200 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11201
11202 # Check whether --enable-echo or --disable-echo was given.
11203 if test "${enable_echo+set}" = set; then
11204   enableval="$enable_echo"
11205   with_echo=$enableval
11206 else
11207   with_echo=yes
11208 fi;
11209 if test "$with_echo" = yes; then
11210         ECHO_LINK=
11211 else
11212         ECHO_LINK='@ echo linking $@ ... ;'
11213         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11214         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11215 fi
11216 echo "$as_me:11216: result: $with_echo" >&5
11217 echo "${ECHO_T}$with_echo" >&6
11218
11219 ###     use option --enable-warnings to turn on all gcc warnings
11220 echo "$as_me:11220: checking if you want to see compiler warnings" >&5
11221 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11222
11223 # Check whether --enable-warnings or --disable-warnings was given.
11224 if test "${enable_warnings+set}" = set; then
11225   enableval="$enable_warnings"
11226   with_warnings=$enableval
11227 fi;
11228 echo "$as_me:11228: result: $with_warnings" >&5
11229 echo "${ECHO_T}$with_warnings" >&6
11230
11231 if test "x$with_warnings" = "xyes"; then
11232
11233         ADAFLAGS="$ADAFLAGS -gnatg"
11234
11235 INTEL_COMPILER=no
11236
11237 if test "$GCC" = yes ; then
11238         case $host_os in
11239         linux*|gnu*)
11240                 echo "$as_me:11240: checking if this is really Intel C compiler" >&5
11241 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11242                 cf_save_CFLAGS="$CFLAGS"
11243                 CFLAGS="$CFLAGS -no-gcc"
11244                 cat >conftest.$ac_ext <<_ACEOF
11245 #line 11245 "configure"
11246 #include "confdefs.h"
11247
11248 int
11249 main ()
11250 {
11251
11252 #ifdef __INTEL_COMPILER
11253 #else
11254 make an error
11255 #endif
11256
11257   ;
11258   return 0;
11259 }
11260 _ACEOF
11261 rm -f conftest.$ac_objext
11262 if { (eval echo "$as_me:11262: \"$ac_compile\"") >&5
11263   (eval $ac_compile) 2>&5
11264   ac_status=$?
11265   echo "$as_me:11265: \$? = $ac_status" >&5
11266   (exit $ac_status); } &&
11267          { ac_try='test -s conftest.$ac_objext'
11268   { (eval echo "$as_me:11268: \"$ac_try\"") >&5
11269   (eval $ac_try) 2>&5
11270   ac_status=$?
11271   echo "$as_me:11271: \$? = $ac_status" >&5
11272   (exit $ac_status); }; }; then
11273   INTEL_COMPILER=yes
11274 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11275
11276 else
11277   echo "$as_me: failed program was:" >&5
11278 cat conftest.$ac_ext >&5
11279 fi
11280 rm -f conftest.$ac_objext conftest.$ac_ext
11281                 CFLAGS="$cf_save_CFLAGS"
11282                 echo "$as_me:11282: result: $INTEL_COMPILER" >&5
11283 echo "${ECHO_T}$INTEL_COMPILER" >&6
11284                 ;;
11285         esac
11286 fi
11287
11288 cat > conftest.$ac_ext <<EOF
11289 #line 11289 "${as_me:-configure}"
11290 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11291 EOF
11292
11293 if test "$INTEL_COMPILER" = yes
11294 then
11295 # The "-wdXXX" options suppress warnings:
11296 # remark #1419: external declaration in primary source file
11297 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11298 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11299 # remark #193: zero used for undefined preprocessing identifier
11300 # remark #593: variable "curs_sb_left_arrow" was set but never used
11301 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11302 # remark #869: parameter "tw" was never referenced
11303 # remark #981: operands are evaluated in unspecified order
11304 # warning #279: controlling expression is constant
11305
11306         { echo "$as_me:11306: checking for $CC warning options..." >&5
11307 echo "$as_me: checking for $CC warning options..." >&6;}
11308         cf_save_CFLAGS="$CFLAGS"
11309         EXTRA_CFLAGS="-Wall"
11310         for cf_opt in \
11311                 wd1419 \
11312                 wd1683 \
11313                 wd1684 \
11314                 wd193 \
11315                 wd593 \
11316                 wd279 \
11317                 wd810 \
11318                 wd869 \
11319                 wd981
11320         do
11321                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11322                 if { (eval echo "$as_me:11322: \"$ac_compile\"") >&5
11323   (eval $ac_compile) 2>&5
11324   ac_status=$?
11325   echo "$as_me:11325: \$? = $ac_status" >&5
11326   (exit $ac_status); }; then
11327                         test -n "$verbose" && echo "$as_me:11327: result: ... -$cf_opt" >&5
11328 echo "${ECHO_T}... -$cf_opt" >&6
11329                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11330                 fi
11331         done
11332         CFLAGS="$cf_save_CFLAGS"
11333
11334 elif test "$GCC" = yes
11335 then
11336         { echo "$as_me:11336: checking for $CC warning options..." >&5
11337 echo "$as_me: checking for $CC warning options..." >&6;}
11338         cf_save_CFLAGS="$CFLAGS"
11339         EXTRA_CFLAGS=
11340         cf_warn_CONST=""
11341         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11342         for cf_opt in W Wall \
11343                 Wbad-function-cast \
11344                 Wcast-align \
11345                 Wcast-qual \
11346                 Winline \
11347                 Wmissing-declarations \
11348                 Wmissing-prototypes \
11349                 Wnested-externs \
11350                 Wpointer-arith \
11351                 Wshadow \
11352                 Wstrict-prototypes \
11353                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11354         do
11355                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11356                 if { (eval echo "$as_me:11356: \"$ac_compile\"") >&5
11357   (eval $ac_compile) 2>&5
11358   ac_status=$?
11359   echo "$as_me:11359: \$? = $ac_status" >&5
11360   (exit $ac_status); }; then
11361                         test -n "$verbose" && echo "$as_me:11361: result: ... -$cf_opt" >&5
11362 echo "${ECHO_T}... -$cf_opt" >&6
11363                         case $cf_opt in #(vi
11364                         Wcast-qual) #(vi
11365                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11366                                 ;;
11367                         Winline) #(vi
11368                                 case $GCC_VERSION in
11369                                 [34].*)
11370                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11371
11372 echo "${as_me:-configure}:11372: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11373
11374                                         continue;;
11375                                 esac
11376                                 ;;
11377                         esac
11378                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11379                 fi
11380         done
11381         CFLAGS="$cf_save_CFLAGS"
11382 fi
11383 rm -rf conftest*
11384
11385         if test "$cf_with_cxx" = yes ; then
11386
11387 INTEL_CPLUSPLUS=no
11388
11389 if test "$GCC" = yes ; then
11390         case $host_os in
11391         linux*|gnu*)
11392                 echo "$as_me:11392: checking if this is really Intel C++ compiler" >&5
11393 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11394                 cf_save_CFLAGS="$CXXFLAGS"
11395                 CXXFLAGS="$CXXFLAGS -no-gcc"
11396                 cat >conftest.$ac_ext <<_ACEOF
11397 #line 11397 "configure"
11398 #include "confdefs.h"
11399
11400 int
11401 main ()
11402 {
11403
11404 #ifdef __INTEL_COMPILER
11405 #else
11406 make an error
11407 #endif
11408
11409   ;
11410   return 0;
11411 }
11412 _ACEOF
11413 rm -f conftest.$ac_objext
11414 if { (eval echo "$as_me:11414: \"$ac_compile\"") >&5
11415   (eval $ac_compile) 2>&5
11416   ac_status=$?
11417   echo "$as_me:11417: \$? = $ac_status" >&5
11418   (exit $ac_status); } &&
11419          { ac_try='test -s conftest.$ac_objext'
11420   { (eval echo "$as_me:11420: \"$ac_try\"") >&5
11421   (eval $ac_try) 2>&5
11422   ac_status=$?
11423   echo "$as_me:11423: \$? = $ac_status" >&5
11424   (exit $ac_status); }; }; then
11425   INTEL_CPLUSPLUS=yes
11426 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11427
11428 else
11429   echo "$as_me: failed program was:" >&5
11430 cat conftest.$ac_ext >&5
11431 fi
11432 rm -f conftest.$ac_objext conftest.$ac_ext
11433                 CXXFLAGS="$cf_save_CFLAGS"
11434                 echo "$as_me:11434: result: $INTEL_CPLUSPLUS" >&5
11435 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11436                 ;;
11437         esac
11438 fi
11439
11440 ac_ext=cc
11441 ac_cpp='$CXXCPP $CPPFLAGS'
11442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11445 ac_main_return=return
11446
11447 cat > conftest.$ac_ext <<EOF
11448 #line 11448 "configure"
11449 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11450 EOF
11451
11452 if test "$INTEL_CPLUSPLUS" = yes
11453 then
11454 # The "-wdXXX" options suppress warnings:
11455 # remark #1419: external declaration in primary source file
11456 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11457 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11458 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11459 # remark #193: zero used for undefined preprocessing identifier
11460 # remark #593: variable "curs_sb_left_arrow" was set but never used
11461 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11462 # remark #869: parameter "tw" was never referenced
11463 # remark #981: operands are evaluated in unspecified order
11464 # warning #269: invalid format string conversion
11465
11466         { echo "$as_me:11466: checking for $CC warning options..." >&5
11467 echo "$as_me: checking for $CC warning options..." >&6;}
11468         cf_save_CXXFLAGS="$CXXFLAGS"
11469         EXTRA_CXXFLAGS="-Wall"
11470         for cf_opt in \
11471                 wd1419 \
11472                 wd1682 \
11473                 wd1683 \
11474                 wd1684 \
11475                 wd193 \
11476                 wd279 \
11477                 wd593 \
11478                 wd810 \
11479                 wd869 \
11480                 wd981
11481         do
11482                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11483                 if { (eval echo "$as_me:11483: \"$ac_compile\"") >&5
11484   (eval $ac_compile) 2>&5
11485   ac_status=$?
11486   echo "$as_me:11486: \$? = $ac_status" >&5
11487   (exit $ac_status); }; then
11488                         test -n "$verbose" && echo "$as_me:11488: result: ... -$cf_opt" >&5
11489 echo "${ECHO_T}... -$cf_opt" >&6
11490                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11491                 fi
11492         done
11493         CXXFLAGS="$cf_save_CXXFLAGS"
11494
11495 elif test "$GXX" = yes
11496 then
11497         { echo "$as_me:11497: checking for $CXX warning options..." >&5
11498 echo "$as_me: checking for $CXX warning options..." >&6;}
11499         cf_save_CXXFLAGS="$CXXFLAGS"
11500         EXTRA_CXXFLAGS="-W -Wall"
11501         cf_gxx_extra_warnings=""
11502         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11503         case "$GCC_VERSION" in
11504         [1-2].*)
11505                 ;;
11506         *)
11507                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11508                 ;;
11509         esac
11510         for cf_opt in \
11511                 Wabi \
11512                 fabi-version=0 \
11513                 Woverloaded-virtual \
11514                 Wsign-promo \
11515                 Wsynth \
11516                 Wold-style-cast \
11517                 Wcast-align \
11518                 Wcast-qual \
11519                 Wmissing-prototypes \
11520                 Wpointer-arith \
11521                 Wshadow \
11522                 Wstrict-prototypes \
11523                 Wundef $cf_gxx_extra_warnings Wno-unused
11524         do
11525                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11526                 if { (eval echo "$as_me:11526: \"$ac_compile\"") >&5
11527   (eval $ac_compile) 2>&5
11528   ac_status=$?
11529   echo "$as_me:11529: \$? = $ac_status" >&5
11530   (exit $ac_status); }; then
11531                         test -n "$verbose" && echo "$as_me:11531: result: ... -$cf_opt" >&5
11532 echo "${ECHO_T}... -$cf_opt" >&6
11533                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11534                 else
11535                         test -n "$verbose" && echo "$as_me:11535: result: ... no -$cf_opt" >&5
11536 echo "${ECHO_T}... no -$cf_opt" >&6
11537                 fi
11538         done
11539         CXXFLAGS="$cf_save_CXXFLAGS"
11540 fi
11541
11542 rm -rf conftest*
11543 ac_ext=c
11544 ac_cpp='$CPP $CPPFLAGS'
11545 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11546 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11547 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11548 ac_main_return=return
11549
11550         fi
11551 fi
11552
11553 if test "$GCC" = yes
11554 then
11555 cat > conftest.i <<EOF
11556 #ifndef GCC_PRINTF
11557 #define GCC_PRINTF 0
11558 #endif
11559 #ifndef GCC_SCANF
11560 #define GCC_SCANF 0
11561 #endif
11562 #ifndef GCC_NORETURN
11563 #define GCC_NORETURN /* nothing */
11564 #endif
11565 #ifndef GCC_UNUSED
11566 #define GCC_UNUSED /* nothing */
11567 #endif
11568 EOF
11569 if test "$GCC" = yes
11570 then
11571         { echo "$as_me:11571: checking for $CC __attribute__ directives..." >&5
11572 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11573 cat > conftest.$ac_ext <<EOF
11574 #line 11574 "${as_me:-configure}"
11575 #include "confdefs.h"
11576 #include "conftest.h"
11577 #include "conftest.i"
11578 #if     GCC_PRINTF
11579 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11580 #else
11581 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11582 #endif
11583 #if     GCC_SCANF
11584 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11585 #else
11586 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11587 #endif
11588 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11589 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11590 extern void foo(void) GCC_NORETURN;
11591 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11592 EOF
11593         cf_printf_attribute=no
11594         cf_scanf_attribute=no
11595         for cf_attribute in scanf printf unused noreturn
11596         do
11597
11598 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11599
11600                 cf_directive="__attribute__(($cf_attribute))"
11601                 echo "checking for $CC $cf_directive" 1>&5
11602
11603                 case $cf_attribute in #(vi
11604                 printf) #(vi
11605                         cf_printf_attribute=yes
11606                         cat >conftest.h <<EOF
11607 #define GCC_$cf_ATTRIBUTE 1
11608 EOF
11609                         ;;
11610                 scanf) #(vi
11611                         cf_scanf_attribute=yes
11612                         cat >conftest.h <<EOF
11613 #define GCC_$cf_ATTRIBUTE 1
11614 EOF
11615                         ;;
11616                 *) #(vi
11617                         cat >conftest.h <<EOF
11618 #define GCC_$cf_ATTRIBUTE $cf_directive
11619 EOF
11620                         ;;
11621                 esac
11622
11623                 if { (eval echo "$as_me:11623: \"$ac_compile\"") >&5
11624   (eval $ac_compile) 2>&5
11625   ac_status=$?
11626   echo "$as_me:11626: \$? = $ac_status" >&5
11627   (exit $ac_status); }; then
11628                         test -n "$verbose" && echo "$as_me:11628: result: ... $cf_attribute" >&5
11629 echo "${ECHO_T}... $cf_attribute" >&6
11630                         cat conftest.h >>confdefs.h
11631                         case $cf_attribute in #(vi
11632                         printf) #(vi
11633                                 if test "$cf_printf_attribute" = no ; then
11634                                         cat >>confdefs.h <<EOF
11635 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11636 EOF
11637                                 else
11638                                         cat >>confdefs.h <<EOF
11639 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11640 EOF
11641                                 fi
11642                                 ;;
11643                         scanf) #(vi
11644                                 if test "$cf_scanf_attribute" = no ; then
11645                                         cat >>confdefs.h <<EOF
11646 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11647 EOF
11648                                 else
11649                                         cat >>confdefs.h <<EOF
11650 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11651 EOF
11652                                 fi
11653                                 ;;
11654                         esac
11655                 fi
11656         done
11657 else
11658         fgrep define conftest.i >>confdefs.h
11659 fi
11660 rm -rf conftest*
11661 fi
11662
11663 ###     use option --enable-assertions to turn on generation of assertion code
11664 echo "$as_me:11664: checking if you want to enable runtime assertions" >&5
11665 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11666
11667 # Check whether --enable-assertions or --disable-assertions was given.
11668 if test "${enable_assertions+set}" = set; then
11669   enableval="$enable_assertions"
11670   with_assertions=$enableval
11671 else
11672   with_assertions=no
11673 fi;
11674 echo "$as_me:11674: result: $with_assertions" >&5
11675 echo "${ECHO_T}$with_assertions" >&6
11676 if test -n "$GCC"
11677 then
11678         if test "$with_assertions" = no
11679         then
11680                 cat >>confdefs.h <<\EOF
11681 #define NDEBUG 1
11682 EOF
11683
11684                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11685         else
11686
11687         ADAFLAGS="$ADAFLAGS -gnata"
11688
11689         fi
11690 fi
11691
11692 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11693
11694 echo "$as_me:11694: checking if you want to use dmalloc for testing" >&5
11695 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11696
11697 # Check whether --with-dmalloc or --without-dmalloc was given.
11698 if test "${with_dmalloc+set}" = set; then
11699   withval="$with_dmalloc"
11700   cat >>confdefs.h <<\EOF
11701 #define USE_DMALLOC 1
11702 EOF
11703
11704         : ${with_cflags:=-g}
11705         : ${with_no_leaks:=yes}
11706          with_dmalloc=yes
11707 else
11708   with_dmalloc=
11709 fi;
11710 echo "$as_me:11710: result: ${with_dmalloc:-no}" >&5
11711 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11712
11713 case .$with_cflags in #(vi
11714 .*-g*)
11715         case .$CFLAGS in #(vi
11716         .*-g*) #(vi
11717                 ;;
11718         *)
11719
11720 cf_fix_cppflags=no
11721 cf_new_cflags=
11722 cf_new_cppflags=
11723 cf_new_extra_cppflags=
11724
11725 for cf_add_cflags in -g
11726 do
11727 case $cf_fix_cppflags in
11728 no)
11729         case $cf_add_cflags in #(vi
11730         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11731                 case $cf_add_cflags in
11732                 -D*)
11733                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11734
11735                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11736                                 && test -z "${cf_tst_cflags}" \
11737                                 && cf_fix_cppflags=yes
11738
11739                         if test $cf_fix_cppflags = yes ; then
11740                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11741                                 continue
11742                         elif test "${cf_tst_cflags}" = "\"'" ; then
11743                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11744                                 continue
11745                         fi
11746                         ;;
11747                 esac
11748                 case "$CPPFLAGS" in
11749                 *$cf_add_cflags) #(vi
11750                         ;;
11751                 *) #(vi
11752                         case $cf_add_cflags in #(vi
11753                         -D*)
11754                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11755
11756 CPPFLAGS=`echo "$CPPFLAGS" | \
11757         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11758                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11759
11760                                 ;;
11761                         esac
11762                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11763                         ;;
11764                 esac
11765                 ;;
11766         *)
11767                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11768                 ;;
11769         esac
11770         ;;
11771 yes)
11772         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11773
11774         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11775
11776         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11777                 && test -z "${cf_tst_cflags}" \
11778                 && cf_fix_cppflags=no
11779         ;;
11780 esac
11781 done
11782
11783 if test -n "$cf_new_cflags" ; then
11784
11785         CFLAGS="$CFLAGS $cf_new_cflags"
11786 fi
11787
11788 if test -n "$cf_new_cppflags" ; then
11789
11790         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11791 fi
11792
11793 if test -n "$cf_new_extra_cppflags" ; then
11794
11795         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11796 fi
11797
11798                 ;;
11799         esac
11800         ;;
11801 esac
11802
11803 if test "$with_dmalloc" = yes ; then
11804         echo "$as_me:11804: checking for dmalloc.h" >&5
11805 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11806 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11807   echo $ECHO_N "(cached) $ECHO_C" >&6
11808 else
11809   cat >conftest.$ac_ext <<_ACEOF
11810 #line 11810 "configure"
11811 #include "confdefs.h"
11812 #include <dmalloc.h>
11813 _ACEOF
11814 if { (eval echo "$as_me:11814: \"$ac_cpp conftest.$ac_ext\"") >&5
11815   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11816   ac_status=$?
11817   egrep -v '^ *\+' conftest.er1 >conftest.err
11818   rm -f conftest.er1
11819   cat conftest.err >&5
11820   echo "$as_me:11820: \$? = $ac_status" >&5
11821   (exit $ac_status); } >/dev/null; then
11822   if test -s conftest.err; then
11823     ac_cpp_err=$ac_c_preproc_warn_flag
11824   else
11825     ac_cpp_err=
11826   fi
11827 else
11828   ac_cpp_err=yes
11829 fi
11830 if test -z "$ac_cpp_err"; then
11831   ac_cv_header_dmalloc_h=yes
11832 else
11833   echo "$as_me: failed program was:" >&5
11834   cat conftest.$ac_ext >&5
11835   ac_cv_header_dmalloc_h=no
11836 fi
11837 rm -f conftest.err conftest.$ac_ext
11838 fi
11839 echo "$as_me:11839: result: $ac_cv_header_dmalloc_h" >&5
11840 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11841 if test $ac_cv_header_dmalloc_h = yes; then
11842
11843 echo "$as_me:11843: checking for dmalloc_debug in -ldmalloc" >&5
11844 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11845 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11846   echo $ECHO_N "(cached) $ECHO_C" >&6
11847 else
11848   ac_check_lib_save_LIBS=$LIBS
11849 LIBS="-ldmalloc  $LIBS"
11850 cat >conftest.$ac_ext <<_ACEOF
11851 #line 11851 "configure"
11852 #include "confdefs.h"
11853
11854 /* Override any gcc2 internal prototype to avoid an error.  */
11855 #ifdef __cplusplus
11856 extern "C"
11857 #endif
11858 /* We use char because int might match the return type of a gcc2
11859    builtin and then its argument prototype would still apply.  */
11860 char dmalloc_debug ();
11861 int
11862 main ()
11863 {
11864 dmalloc_debug ();
11865   ;
11866   return 0;
11867 }
11868 _ACEOF
11869 rm -f conftest.$ac_objext conftest$ac_exeext
11870 if { (eval echo "$as_me:11870: \"$ac_link\"") >&5
11871   (eval $ac_link) 2>&5
11872   ac_status=$?
11873   echo "$as_me:11873: \$? = $ac_status" >&5
11874   (exit $ac_status); } &&
11875          { ac_try='test -s conftest$ac_exeext'
11876   { (eval echo "$as_me:11876: \"$ac_try\"") >&5
11877   (eval $ac_try) 2>&5
11878   ac_status=$?
11879   echo "$as_me:11879: \$? = $ac_status" >&5
11880   (exit $ac_status); }; }; then
11881   ac_cv_lib_dmalloc_dmalloc_debug=yes
11882 else
11883   echo "$as_me: failed program was:" >&5
11884 cat conftest.$ac_ext >&5
11885 ac_cv_lib_dmalloc_dmalloc_debug=no
11886 fi
11887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11888 LIBS=$ac_check_lib_save_LIBS
11889 fi
11890 echo "$as_me:11890: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11891 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11892 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11893   cat >>confdefs.h <<EOF
11894 #define HAVE_LIBDMALLOC 1
11895 EOF
11896
11897   LIBS="-ldmalloc $LIBS"
11898
11899 fi
11900
11901 fi
11902
11903 fi
11904
11905 echo "$as_me:11905: checking if you want to use dbmalloc for testing" >&5
11906 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11907
11908 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11909 if test "${with_dbmalloc+set}" = set; then
11910   withval="$with_dbmalloc"
11911   cat >>confdefs.h <<\EOF
11912 #define USE_DBMALLOC 1
11913 EOF
11914
11915         : ${with_cflags:=-g}
11916         : ${with_no_leaks:=yes}
11917          with_dbmalloc=yes
11918 else
11919   with_dbmalloc=
11920 fi;
11921 echo "$as_me:11921: result: ${with_dbmalloc:-no}" >&5
11922 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11923
11924 case .$with_cflags in #(vi
11925 .*-g*)
11926         case .$CFLAGS in #(vi
11927         .*-g*) #(vi
11928                 ;;
11929         *)
11930
11931 cf_fix_cppflags=no
11932 cf_new_cflags=
11933 cf_new_cppflags=
11934 cf_new_extra_cppflags=
11935
11936 for cf_add_cflags in -g
11937 do
11938 case $cf_fix_cppflags in
11939 no)
11940         case $cf_add_cflags in #(vi
11941         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11942                 case $cf_add_cflags in
11943                 -D*)
11944                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11945
11946                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11947                                 && test -z "${cf_tst_cflags}" \
11948                                 && cf_fix_cppflags=yes
11949
11950                         if test $cf_fix_cppflags = yes ; then
11951                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11952                                 continue
11953                         elif test "${cf_tst_cflags}" = "\"'" ; then
11954                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11955                                 continue
11956                         fi
11957                         ;;
11958                 esac
11959                 case "$CPPFLAGS" in
11960                 *$cf_add_cflags) #(vi
11961                         ;;
11962                 *) #(vi
11963                         case $cf_add_cflags in #(vi
11964                         -D*)
11965                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11966
11967 CPPFLAGS=`echo "$CPPFLAGS" | \
11968         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11969                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11970
11971                                 ;;
11972                         esac
11973                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11974                         ;;
11975                 esac
11976                 ;;
11977         *)
11978                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11979                 ;;
11980         esac
11981         ;;
11982 yes)
11983         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11984
11985         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11986
11987         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11988                 && test -z "${cf_tst_cflags}" \
11989                 && cf_fix_cppflags=no
11990         ;;
11991 esac
11992 done
11993
11994 if test -n "$cf_new_cflags" ; then
11995
11996         CFLAGS="$CFLAGS $cf_new_cflags"
11997 fi
11998
11999 if test -n "$cf_new_cppflags" ; then
12000
12001         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12002 fi
12003
12004 if test -n "$cf_new_extra_cppflags" ; then
12005
12006         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12007 fi
12008
12009                 ;;
12010         esac
12011         ;;
12012 esac
12013
12014 if test "$with_dbmalloc" = yes ; then
12015         echo "$as_me:12015: checking for dbmalloc.h" >&5
12016 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12017 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12018   echo $ECHO_N "(cached) $ECHO_C" >&6
12019 else
12020   cat >conftest.$ac_ext <<_ACEOF
12021 #line 12021 "configure"
12022 #include "confdefs.h"
12023 #include <dbmalloc.h>
12024 _ACEOF
12025 if { (eval echo "$as_me:12025: \"$ac_cpp conftest.$ac_ext\"") >&5
12026   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12027   ac_status=$?
12028   egrep -v '^ *\+' conftest.er1 >conftest.err
12029   rm -f conftest.er1
12030   cat conftest.err >&5
12031   echo "$as_me:12031: \$? = $ac_status" >&5
12032   (exit $ac_status); } >/dev/null; then
12033   if test -s conftest.err; then
12034     ac_cpp_err=$ac_c_preproc_warn_flag
12035   else
12036     ac_cpp_err=
12037   fi
12038 else
12039   ac_cpp_err=yes
12040 fi
12041 if test -z "$ac_cpp_err"; then
12042   ac_cv_header_dbmalloc_h=yes
12043 else
12044   echo "$as_me: failed program was:" >&5
12045   cat conftest.$ac_ext >&5
12046   ac_cv_header_dbmalloc_h=no
12047 fi
12048 rm -f conftest.err conftest.$ac_ext
12049 fi
12050 echo "$as_me:12050: result: $ac_cv_header_dbmalloc_h" >&5
12051 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12052 if test $ac_cv_header_dbmalloc_h = yes; then
12053
12054 echo "$as_me:12054: checking for debug_malloc in -ldbmalloc" >&5
12055 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12056 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12057   echo $ECHO_N "(cached) $ECHO_C" >&6
12058 else
12059   ac_check_lib_save_LIBS=$LIBS
12060 LIBS="-ldbmalloc  $LIBS"
12061 cat >conftest.$ac_ext <<_ACEOF
12062 #line 12062 "configure"
12063 #include "confdefs.h"
12064
12065 /* Override any gcc2 internal prototype to avoid an error.  */
12066 #ifdef __cplusplus
12067 extern "C"
12068 #endif
12069 /* We use char because int might match the return type of a gcc2
12070    builtin and then its argument prototype would still apply.  */
12071 char debug_malloc ();
12072 int
12073 main ()
12074 {
12075 debug_malloc ();
12076   ;
12077   return 0;
12078 }
12079 _ACEOF
12080 rm -f conftest.$ac_objext conftest$ac_exeext
12081 if { (eval echo "$as_me:12081: \"$ac_link\"") >&5
12082   (eval $ac_link) 2>&5
12083   ac_status=$?
12084   echo "$as_me:12084: \$? = $ac_status" >&5
12085   (exit $ac_status); } &&
12086          { ac_try='test -s conftest$ac_exeext'
12087   { (eval echo "$as_me:12087: \"$ac_try\"") >&5
12088   (eval $ac_try) 2>&5
12089   ac_status=$?
12090   echo "$as_me:12090: \$? = $ac_status" >&5
12091   (exit $ac_status); }; }; then
12092   ac_cv_lib_dbmalloc_debug_malloc=yes
12093 else
12094   echo "$as_me: failed program was:" >&5
12095 cat conftest.$ac_ext >&5
12096 ac_cv_lib_dbmalloc_debug_malloc=no
12097 fi
12098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12099 LIBS=$ac_check_lib_save_LIBS
12100 fi
12101 echo "$as_me:12101: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12102 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12103 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12104   cat >>confdefs.h <<EOF
12105 #define HAVE_LIBDBMALLOC 1
12106 EOF
12107
12108   LIBS="-ldbmalloc $LIBS"
12109
12110 fi
12111
12112 fi
12113
12114 fi
12115
12116 echo "$as_me:12116: checking if you want to use valgrind for testing" >&5
12117 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12118
12119 # Check whether --with-valgrind or --without-valgrind was given.
12120 if test "${with_valgrind+set}" = set; then
12121   withval="$with_valgrind"
12122   cat >>confdefs.h <<\EOF
12123 #define USE_VALGRIND 1
12124 EOF
12125
12126         : ${with_cflags:=-g}
12127         : ${with_no_leaks:=yes}
12128          with_valgrind=yes
12129 else
12130   with_valgrind=
12131 fi;
12132 echo "$as_me:12132: result: ${with_valgrind:-no}" >&5
12133 echo "${ECHO_T}${with_valgrind:-no}" >&6
12134
12135 case .$with_cflags in #(vi
12136 .*-g*)
12137         case .$CFLAGS in #(vi
12138         .*-g*) #(vi
12139                 ;;
12140         *)
12141
12142 cf_fix_cppflags=no
12143 cf_new_cflags=
12144 cf_new_cppflags=
12145 cf_new_extra_cppflags=
12146
12147 for cf_add_cflags in -g
12148 do
12149 case $cf_fix_cppflags in
12150 no)
12151         case $cf_add_cflags in #(vi
12152         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12153                 case $cf_add_cflags in
12154                 -D*)
12155                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12156
12157                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12158                                 && test -z "${cf_tst_cflags}" \
12159                                 && cf_fix_cppflags=yes
12160
12161                         if test $cf_fix_cppflags = yes ; then
12162                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12163                                 continue
12164                         elif test "${cf_tst_cflags}" = "\"'" ; then
12165                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12166                                 continue
12167                         fi
12168                         ;;
12169                 esac
12170                 case "$CPPFLAGS" in
12171                 *$cf_add_cflags) #(vi
12172                         ;;
12173                 *) #(vi
12174                         case $cf_add_cflags in #(vi
12175                         -D*)
12176                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12177
12178 CPPFLAGS=`echo "$CPPFLAGS" | \
12179         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12180                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12181
12182                                 ;;
12183                         esac
12184                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12185                         ;;
12186                 esac
12187                 ;;
12188         *)
12189                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12190                 ;;
12191         esac
12192         ;;
12193 yes)
12194         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12195
12196         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12197
12198         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12199                 && test -z "${cf_tst_cflags}" \
12200                 && cf_fix_cppflags=no
12201         ;;
12202 esac
12203 done
12204
12205 if test -n "$cf_new_cflags" ; then
12206
12207         CFLAGS="$CFLAGS $cf_new_cflags"
12208 fi
12209
12210 if test -n "$cf_new_cppflags" ; then
12211
12212         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12213 fi
12214
12215 if test -n "$cf_new_extra_cppflags" ; then
12216
12217         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12218 fi
12219
12220                 ;;
12221         esac
12222         ;;
12223 esac
12224
12225 echo "$as_me:12225: checking if you want to perform memory-leak testing" >&5
12226 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12227
12228 # Check whether --enable-leaks or --disable-leaks was given.
12229 if test "${enable_leaks+set}" = set; then
12230   enableval="$enable_leaks"
12231   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12232 else
12233   : ${with_no_leaks:=no}
12234 fi;
12235 echo "$as_me:12235: result: $with_no_leaks" >&5
12236 echo "${ECHO_T}$with_no_leaks" >&6
12237
12238 if test "$with_no_leaks" = yes ; then
12239         cat >>confdefs.h <<\EOF
12240 #define NO_LEAKS 1
12241 EOF
12242
12243         cat >>confdefs.h <<\EOF
12244 #define YY_NO_LEAKS 1
12245 EOF
12246
12247 fi
12248
12249 cat >>confdefs.h <<\EOF
12250 #define HAVE_NC_ALLOC_H 1
12251 EOF
12252
12253 ###     use option --enable-expanded to generate certain macros as functions
12254
12255 # Check whether --enable-expanded or --disable-expanded was given.
12256 if test "${enable_expanded+set}" = set; then
12257   enableval="$enable_expanded"
12258   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12259 #define NCURSES_EXPANDED 1
12260 EOF
12261
12262 fi;
12263
12264 ###     use option --disable-macros to suppress macros in favor of functions
12265
12266 # Check whether --enable-macros or --disable-macros was given.
12267 if test "${enable_macros+set}" = set; then
12268   enableval="$enable_macros"
12269   test "$enableval" = no && cat >>confdefs.h <<\EOF
12270 #define NCURSES_NOMACROS 1
12271 EOF
12272
12273 fi;
12274
12275 # Normally we only add trace() to the debug-library.  Allow this to be
12276 # extended to all models of the ncurses library:
12277 cf_all_traces=no
12278 case "$CFLAGS $CPPFLAGS" in
12279 *-DTRACE*)
12280         cf_all_traces=yes
12281         ;;
12282 esac
12283
12284 echo "$as_me:12284: checking whether to add trace feature to all models" >&5
12285 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12286
12287 # Check whether --with-trace or --without-trace was given.
12288 if test "${with_trace+set}" = set; then
12289   withval="$with_trace"
12290   cf_with_trace=$withval
12291 else
12292   cf_with_trace=$cf_all_traces
12293 fi;
12294 echo "$as_me:12294: result: $cf_with_trace" >&5
12295 echo "${ECHO_T}$cf_with_trace" >&6
12296
12297 if test "$cf_with_trace" = yes ; then
12298         LIB_TRACING=all
12299         ADA_TRACE=TRUE
12300
12301 cf_fix_cppflags=no
12302 cf_new_cflags=
12303 cf_new_cppflags=
12304 cf_new_extra_cppflags=
12305
12306 for cf_add_cflags in -DTRACE
12307 do
12308 case $cf_fix_cppflags in
12309 no)
12310         case $cf_add_cflags in #(vi
12311         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12312                 case $cf_add_cflags in
12313                 -D*)
12314                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12315
12316                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12317                                 && test -z "${cf_tst_cflags}" \
12318                                 && cf_fix_cppflags=yes
12319
12320                         if test $cf_fix_cppflags = yes ; then
12321                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12322                                 continue
12323                         elif test "${cf_tst_cflags}" = "\"'" ; then
12324                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12325                                 continue
12326                         fi
12327                         ;;
12328                 esac
12329                 case "$CPPFLAGS" in
12330                 *$cf_add_cflags) #(vi
12331                         ;;
12332                 *) #(vi
12333                         case $cf_add_cflags in #(vi
12334                         -D*)
12335                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12336
12337 CPPFLAGS=`echo "$CPPFLAGS" | \
12338         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12339                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12340
12341                                 ;;
12342                         esac
12343                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12344                         ;;
12345                 esac
12346                 ;;
12347         *)
12348                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12349                 ;;
12350         esac
12351         ;;
12352 yes)
12353         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12354
12355         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12356
12357         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12358                 && test -z "${cf_tst_cflags}" \
12359                 && cf_fix_cppflags=no
12360         ;;
12361 esac
12362 done
12363
12364 if test -n "$cf_new_cflags" ; then
12365
12366         CFLAGS="$CFLAGS $cf_new_cflags"
12367 fi
12368
12369 if test -n "$cf_new_cppflags" ; then
12370
12371         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12372 fi
12373
12374 if test -n "$cf_new_extra_cppflags" ; then
12375
12376         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12377 fi
12378
12379 else
12380         LIB_TRACING=DEBUG
12381         ADA_TRACE=FALSE
12382 fi
12383
12384 ###     Checks for libraries.
12385 case $cf_cv_system_name in #(vi
12386 *mingw32*) #(vi
12387         ;;
12388 *)
12389 echo "$as_me:12389: checking for gettimeofday" >&5
12390 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12391 if test "${ac_cv_func_gettimeofday+set}" = set; then
12392   echo $ECHO_N "(cached) $ECHO_C" >&6
12393 else
12394   cat >conftest.$ac_ext <<_ACEOF
12395 #line 12395 "configure"
12396 #include "confdefs.h"
12397 /* System header to define __stub macros and hopefully few prototypes,
12398     which can conflict with char gettimeofday (); below.  */
12399 #include <assert.h>
12400 /* Override any gcc2 internal prototype to avoid an error.  */
12401 #ifdef __cplusplus
12402 extern "C"
12403 #endif
12404 /* We use char because int might match the return type of a gcc2
12405    builtin and then its argument prototype would still apply.  */
12406 char gettimeofday ();
12407 char (*f) ();
12408
12409 int
12410 main ()
12411 {
12412 /* The GNU C library defines this for functions which it implements
12413     to always fail with ENOSYS.  Some functions are actually named
12414     something starting with __ and the normal name is an alias.  */
12415 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12416 choke me
12417 #else
12418 f = gettimeofday;
12419 #endif
12420
12421   ;
12422   return 0;
12423 }
12424 _ACEOF
12425 rm -f conftest.$ac_objext conftest$ac_exeext
12426 if { (eval echo "$as_me:12426: \"$ac_link\"") >&5
12427   (eval $ac_link) 2>&5
12428   ac_status=$?
12429   echo "$as_me:12429: \$? = $ac_status" >&5
12430   (exit $ac_status); } &&
12431          { ac_try='test -s conftest$ac_exeext'
12432   { (eval echo "$as_me:12432: \"$ac_try\"") >&5
12433   (eval $ac_try) 2>&5
12434   ac_status=$?
12435   echo "$as_me:12435: \$? = $ac_status" >&5
12436   (exit $ac_status); }; }; then
12437   ac_cv_func_gettimeofday=yes
12438 else
12439   echo "$as_me: failed program was:" >&5
12440 cat conftest.$ac_ext >&5
12441 ac_cv_func_gettimeofday=no
12442 fi
12443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12444 fi
12445 echo "$as_me:12445: result: $ac_cv_func_gettimeofday" >&5
12446 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12447 if test $ac_cv_func_gettimeofday = yes; then
12448   cat >>confdefs.h <<\EOF
12449 #define HAVE_GETTIMEOFDAY 1
12450 EOF
12451
12452 else
12453
12454 echo "$as_me:12454: checking for gettimeofday in -lbsd" >&5
12455 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12456 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12457   echo $ECHO_N "(cached) $ECHO_C" >&6
12458 else
12459   ac_check_lib_save_LIBS=$LIBS
12460 LIBS="-lbsd  $LIBS"
12461 cat >conftest.$ac_ext <<_ACEOF
12462 #line 12462 "configure"
12463 #include "confdefs.h"
12464
12465 /* Override any gcc2 internal prototype to avoid an error.  */
12466 #ifdef __cplusplus
12467 extern "C"
12468 #endif
12469 /* We use char because int might match the return type of a gcc2
12470    builtin and then its argument prototype would still apply.  */
12471 char gettimeofday ();
12472 int
12473 main ()
12474 {
12475 gettimeofday ();
12476   ;
12477   return 0;
12478 }
12479 _ACEOF
12480 rm -f conftest.$ac_objext conftest$ac_exeext
12481 if { (eval echo "$as_me:12481: \"$ac_link\"") >&5
12482   (eval $ac_link) 2>&5
12483   ac_status=$?
12484   echo "$as_me:12484: \$? = $ac_status" >&5
12485   (exit $ac_status); } &&
12486          { ac_try='test -s conftest$ac_exeext'
12487   { (eval echo "$as_me:12487: \"$ac_try\"") >&5
12488   (eval $ac_try) 2>&5
12489   ac_status=$?
12490   echo "$as_me:12490: \$? = $ac_status" >&5
12491   (exit $ac_status); }; }; then
12492   ac_cv_lib_bsd_gettimeofday=yes
12493 else
12494   echo "$as_me: failed program was:" >&5
12495 cat conftest.$ac_ext >&5
12496 ac_cv_lib_bsd_gettimeofday=no
12497 fi
12498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12499 LIBS=$ac_check_lib_save_LIBS
12500 fi
12501 echo "$as_me:12501: result: $ac_cv_lib_bsd_gettimeofday" >&5
12502 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12503 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12504   cat >>confdefs.h <<\EOF
12505 #define HAVE_GETTIMEOFDAY 1
12506 EOF
12507
12508         LIBS="-lbsd $LIBS"
12509 fi
12510
12511 fi
12512         ;;
12513 esac
12514
12515 echo "$as_me:12515: checking if -lm needed for math functions" >&5
12516 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12517 if test "${cf_cv_need_libm+set}" = set; then
12518   echo $ECHO_N "(cached) $ECHO_C" >&6
12519 else
12520
12521         cat >conftest.$ac_ext <<_ACEOF
12522 #line 12522 "configure"
12523 #include "confdefs.h"
12524
12525         #include <stdio.h>
12526         #include <math.h>
12527
12528 int
12529 main ()
12530 {
12531 double x = rand(); printf("result = %g\n", sin(x))
12532   ;
12533   return 0;
12534 }
12535 _ACEOF
12536 rm -f conftest.$ac_objext conftest$ac_exeext
12537 if { (eval echo "$as_me:12537: \"$ac_link\"") >&5
12538   (eval $ac_link) 2>&5
12539   ac_status=$?
12540   echo "$as_me:12540: \$? = $ac_status" >&5
12541   (exit $ac_status); } &&
12542          { ac_try='test -s conftest$ac_exeext'
12543   { (eval echo "$as_me:12543: \"$ac_try\"") >&5
12544   (eval $ac_try) 2>&5
12545   ac_status=$?
12546   echo "$as_me:12546: \$? = $ac_status" >&5
12547   (exit $ac_status); }; }; then
12548   cf_cv_need_libm=no
12549 else
12550   echo "$as_me: failed program was:" >&5
12551 cat conftest.$ac_ext >&5
12552 cf_cv_need_libm=yes
12553 fi
12554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12555 fi
12556 echo "$as_me:12556: result: $cf_cv_need_libm" >&5
12557 echo "${ECHO_T}$cf_cv_need_libm" >&6
12558 if test "$cf_cv_need_libm" = yes
12559 then
12560 MATH_LIB=-lm
12561 fi
12562
12563 ###     Checks for header files.
12564 echo "$as_me:12564: checking for ANSI C header files" >&5
12565 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12566 if test "${ac_cv_header_stdc+set}" = set; then
12567   echo $ECHO_N "(cached) $ECHO_C" >&6
12568 else
12569   cat >conftest.$ac_ext <<_ACEOF
12570 #line 12570 "configure"
12571 #include "confdefs.h"
12572 #include <stdlib.h>
12573 #include <stdarg.h>
12574 #include <string.h>
12575 #include <float.h>
12576
12577 _ACEOF
12578 if { (eval echo "$as_me:12578: \"$ac_cpp conftest.$ac_ext\"") >&5
12579   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12580   ac_status=$?
12581   egrep -v '^ *\+' conftest.er1 >conftest.err
12582   rm -f conftest.er1
12583   cat conftest.err >&5
12584   echo "$as_me:12584: \$? = $ac_status" >&5
12585   (exit $ac_status); } >/dev/null; then
12586   if test -s conftest.err; then
12587     ac_cpp_err=$ac_c_preproc_warn_flag
12588   else
12589     ac_cpp_err=
12590   fi
12591 else
12592   ac_cpp_err=yes
12593 fi
12594 if test -z "$ac_cpp_err"; then
12595   ac_cv_header_stdc=yes
12596 else
12597   echo "$as_me: failed program was:" >&5
12598   cat conftest.$ac_ext >&5
12599   ac_cv_header_stdc=no
12600 fi
12601 rm -f conftest.err conftest.$ac_ext
12602
12603 if test $ac_cv_header_stdc = yes; then
12604   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12605   cat >conftest.$ac_ext <<_ACEOF
12606 #line 12606 "configure"
12607 #include "confdefs.h"
12608 #include <string.h>
12609
12610 _ACEOF
12611 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12612   egrep "memchr" >/dev/null 2>&1; then
12613   :
12614 else
12615   ac_cv_header_stdc=no
12616 fi
12617 rm -rf conftest*
12618
12619 fi
12620
12621 if test $ac_cv_header_stdc = yes; then
12622   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12623   cat >conftest.$ac_ext <<_ACEOF
12624 #line 12624 "configure"
12625 #include "confdefs.h"
12626 #include <stdlib.h>
12627
12628 _ACEOF
12629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12630   egrep "free" >/dev/null 2>&1; then
12631   :
12632 else
12633   ac_cv_header_stdc=no
12634 fi
12635 rm -rf conftest*
12636
12637 fi
12638
12639 if test $ac_cv_header_stdc = yes; then
12640   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12641   if test "$cross_compiling" = yes; then
12642   :
12643 else
12644   cat >conftest.$ac_ext <<_ACEOF
12645 #line 12645 "configure"
12646 #include "confdefs.h"
12647 #include <ctype.h>
12648 #if ((' ' & 0x0FF) == 0x020)
12649 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12650 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12651 #else
12652 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12653                      || ('j' <= (c) && (c) <= 'r') \
12654                      || ('s' <= (c) && (c) <= 'z'))
12655 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12656 #endif
12657
12658 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12659 int
12660 main ()
12661 {
12662   int i;
12663   for (i = 0; i < 256; i++)
12664     if (XOR (islower (i), ISLOWER (i))
12665         || toupper (i) != TOUPPER (i))
12666       $ac_main_return(2);
12667   $ac_main_return (0);
12668 }
12669 _ACEOF
12670 rm -f conftest$ac_exeext
12671 if { (eval echo "$as_me:12671: \"$ac_link\"") >&5
12672   (eval $ac_link) 2>&5
12673   ac_status=$?
12674   echo "$as_me:12674: \$? = $ac_status" >&5
12675   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12676   { (eval echo "$as_me:12676: \"$ac_try\"") >&5
12677   (eval $ac_try) 2>&5
12678   ac_status=$?
12679   echo "$as_me:12679: \$? = $ac_status" >&5
12680   (exit $ac_status); }; }; then
12681   :
12682 else
12683   echo "$as_me: program exited with status $ac_status" >&5
12684 echo "$as_me: failed program was:" >&5
12685 cat conftest.$ac_ext >&5
12686 ac_cv_header_stdc=no
12687 fi
12688 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12689 fi
12690 fi
12691 fi
12692 echo "$as_me:12692: result: $ac_cv_header_stdc" >&5
12693 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12694 if test $ac_cv_header_stdc = yes; then
12695
12696 cat >>confdefs.h <<\EOF
12697 #define STDC_HEADERS 1
12698 EOF
12699
12700 fi
12701
12702 ac_header_dirent=no
12703 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12704   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12705 echo "$as_me:12705: checking for $ac_hdr that defines DIR" >&5
12706 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12707 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12708   echo $ECHO_N "(cached) $ECHO_C" >&6
12709 else
12710   cat >conftest.$ac_ext <<_ACEOF
12711 #line 12711 "configure"
12712 #include "confdefs.h"
12713 #include <sys/types.h>
12714 #include <$ac_hdr>
12715
12716 int
12717 main ()
12718 {
12719 if ((DIR *) 0)
12720 return 0;
12721   ;
12722   return 0;
12723 }
12724 _ACEOF
12725 rm -f conftest.$ac_objext
12726 if { (eval echo "$as_me:12726: \"$ac_compile\"") >&5
12727   (eval $ac_compile) 2>&5
12728   ac_status=$?
12729   echo "$as_me:12729: \$? = $ac_status" >&5
12730   (exit $ac_status); } &&
12731          { ac_try='test -s conftest.$ac_objext'
12732   { (eval echo "$as_me:12732: \"$ac_try\"") >&5
12733   (eval $ac_try) 2>&5
12734   ac_status=$?
12735   echo "$as_me:12735: \$? = $ac_status" >&5
12736   (exit $ac_status); }; }; then
12737   eval "$as_ac_Header=yes"
12738 else
12739   echo "$as_me: failed program was:" >&5
12740 cat conftest.$ac_ext >&5
12741 eval "$as_ac_Header=no"
12742 fi
12743 rm -f conftest.$ac_objext conftest.$ac_ext
12744 fi
12745 echo "$as_me:12745: result: `eval echo '${'$as_ac_Header'}'`" >&5
12746 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12747 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12748   cat >>confdefs.h <<EOF
12749 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12750 EOF
12751
12752 ac_header_dirent=$ac_hdr; break
12753 fi
12754
12755 done
12756 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12757 if test $ac_header_dirent = dirent.h; then
12758   echo "$as_me:12758: checking for opendir in -ldir" >&5
12759 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12760 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12761   echo $ECHO_N "(cached) $ECHO_C" >&6
12762 else
12763   ac_check_lib_save_LIBS=$LIBS
12764 LIBS="-ldir  $LIBS"
12765 cat >conftest.$ac_ext <<_ACEOF
12766 #line 12766 "configure"
12767 #include "confdefs.h"
12768
12769 /* Override any gcc2 internal prototype to avoid an error.  */
12770 #ifdef __cplusplus
12771 extern "C"
12772 #endif
12773 /* We use char because int might match the return type of a gcc2
12774    builtin and then its argument prototype would still apply.  */
12775 char opendir ();
12776 int
12777 main ()
12778 {
12779 opendir ();
12780   ;
12781   return 0;
12782 }
12783 _ACEOF
12784 rm -f conftest.$ac_objext conftest$ac_exeext
12785 if { (eval echo "$as_me:12785: \"$ac_link\"") >&5
12786   (eval $ac_link) 2>&5
12787   ac_status=$?
12788   echo "$as_me:12788: \$? = $ac_status" >&5
12789   (exit $ac_status); } &&
12790          { ac_try='test -s conftest$ac_exeext'
12791   { (eval echo "$as_me:12791: \"$ac_try\"") >&5
12792   (eval $ac_try) 2>&5
12793   ac_status=$?
12794   echo "$as_me:12794: \$? = $ac_status" >&5
12795   (exit $ac_status); }; }; then
12796   ac_cv_lib_dir_opendir=yes
12797 else
12798   echo "$as_me: failed program was:" >&5
12799 cat conftest.$ac_ext >&5
12800 ac_cv_lib_dir_opendir=no
12801 fi
12802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12803 LIBS=$ac_check_lib_save_LIBS
12804 fi
12805 echo "$as_me:12805: result: $ac_cv_lib_dir_opendir" >&5
12806 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12807 if test $ac_cv_lib_dir_opendir = yes; then
12808   LIBS="$LIBS -ldir"
12809 fi
12810
12811 else
12812   echo "$as_me:12812: checking for opendir in -lx" >&5
12813 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12814 if test "${ac_cv_lib_x_opendir+set}" = set; then
12815   echo $ECHO_N "(cached) $ECHO_C" >&6
12816 else
12817   ac_check_lib_save_LIBS=$LIBS
12818 LIBS="-lx  $LIBS"
12819 cat >conftest.$ac_ext <<_ACEOF
12820 #line 12820 "configure"
12821 #include "confdefs.h"
12822
12823 /* Override any gcc2 internal prototype to avoid an error.  */
12824 #ifdef __cplusplus
12825 extern "C"
12826 #endif
12827 /* We use char because int might match the return type of a gcc2
12828    builtin and then its argument prototype would still apply.  */
12829 char opendir ();
12830 int
12831 main ()
12832 {
12833 opendir ();
12834   ;
12835   return 0;
12836 }
12837 _ACEOF
12838 rm -f conftest.$ac_objext conftest$ac_exeext
12839 if { (eval echo "$as_me:12839: \"$ac_link\"") >&5
12840   (eval $ac_link) 2>&5
12841   ac_status=$?
12842   echo "$as_me:12842: \$? = $ac_status" >&5
12843   (exit $ac_status); } &&
12844          { ac_try='test -s conftest$ac_exeext'
12845   { (eval echo "$as_me:12845: \"$ac_try\"") >&5
12846   (eval $ac_try) 2>&5
12847   ac_status=$?
12848   echo "$as_me:12848: \$? = $ac_status" >&5
12849   (exit $ac_status); }; }; then
12850   ac_cv_lib_x_opendir=yes
12851 else
12852   echo "$as_me: failed program was:" >&5
12853 cat conftest.$ac_ext >&5
12854 ac_cv_lib_x_opendir=no
12855 fi
12856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12857 LIBS=$ac_check_lib_save_LIBS
12858 fi
12859 echo "$as_me:12859: result: $ac_cv_lib_x_opendir" >&5
12860 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12861 if test $ac_cv_lib_x_opendir = yes; then
12862   LIBS="$LIBS -lx"
12863 fi
12864
12865 fi
12866
12867 echo "$as_me:12867: checking whether time.h and sys/time.h may both be included" >&5
12868 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12869 if test "${ac_cv_header_time+set}" = set; then
12870   echo $ECHO_N "(cached) $ECHO_C" >&6
12871 else
12872   cat >conftest.$ac_ext <<_ACEOF
12873 #line 12873 "configure"
12874 #include "confdefs.h"
12875 #include <sys/types.h>
12876 #include <sys/time.h>
12877 #include <time.h>
12878
12879 int
12880 main ()
12881 {
12882 if ((struct tm *) 0)
12883 return 0;
12884   ;
12885   return 0;
12886 }
12887 _ACEOF
12888 rm -f conftest.$ac_objext
12889 if { (eval echo "$as_me:12889: \"$ac_compile\"") >&5
12890   (eval $ac_compile) 2>&5
12891   ac_status=$?
12892   echo "$as_me:12892: \$? = $ac_status" >&5
12893   (exit $ac_status); } &&
12894          { ac_try='test -s conftest.$ac_objext'
12895   { (eval echo "$as_me:12895: \"$ac_try\"") >&5
12896   (eval $ac_try) 2>&5
12897   ac_status=$?
12898   echo "$as_me:12898: \$? = $ac_status" >&5
12899   (exit $ac_status); }; }; then
12900   ac_cv_header_time=yes
12901 else
12902   echo "$as_me: failed program was:" >&5
12903 cat conftest.$ac_ext >&5
12904 ac_cv_header_time=no
12905 fi
12906 rm -f conftest.$ac_objext conftest.$ac_ext
12907 fi
12908 echo "$as_me:12908: result: $ac_cv_header_time" >&5
12909 echo "${ECHO_T}$ac_cv_header_time" >&6
12910 if test $ac_cv_header_time = yes; then
12911
12912 cat >>confdefs.h <<\EOF
12913 #define TIME_WITH_SYS_TIME 1
12914 EOF
12915
12916 fi
12917
12918 cf_regex_func=no
12919
12920 cf_regex_libs="regex re"
12921 case $host_os in #(vi
12922 mingw*)
12923         cf_regex_libs="regex.dll $cf_regex_libs"
12924         ;;
12925 esac
12926
12927 echo "$as_me:12927: checking for regcomp" >&5
12928 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12929 if test "${ac_cv_func_regcomp+set}" = set; then
12930   echo $ECHO_N "(cached) $ECHO_C" >&6
12931 else
12932   cat >conftest.$ac_ext <<_ACEOF
12933 #line 12933 "configure"
12934 #include "confdefs.h"
12935 /* System header to define __stub macros and hopefully few prototypes,
12936     which can conflict with char regcomp (); below.  */
12937 #include <assert.h>
12938 /* Override any gcc2 internal prototype to avoid an error.  */
12939 #ifdef __cplusplus
12940 extern "C"
12941 #endif
12942 /* We use char because int might match the return type of a gcc2
12943    builtin and then its argument prototype would still apply.  */
12944 char regcomp ();
12945 char (*f) ();
12946
12947 int
12948 main ()
12949 {
12950 /* The GNU C library defines this for functions which it implements
12951     to always fail with ENOSYS.  Some functions are actually named
12952     something starting with __ and the normal name is an alias.  */
12953 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12954 choke me
12955 #else
12956 f = regcomp;
12957 #endif
12958
12959   ;
12960   return 0;
12961 }
12962 _ACEOF
12963 rm -f conftest.$ac_objext conftest$ac_exeext
12964 if { (eval echo "$as_me:12964: \"$ac_link\"") >&5
12965   (eval $ac_link) 2>&5
12966   ac_status=$?
12967   echo "$as_me:12967: \$? = $ac_status" >&5
12968   (exit $ac_status); } &&
12969          { ac_try='test -s conftest$ac_exeext'
12970   { (eval echo "$as_me:12970: \"$ac_try\"") >&5
12971   (eval $ac_try) 2>&5
12972   ac_status=$?
12973   echo "$as_me:12973: \$? = $ac_status" >&5
12974   (exit $ac_status); }; }; then
12975   ac_cv_func_regcomp=yes
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 cat conftest.$ac_ext >&5
12979 ac_cv_func_regcomp=no
12980 fi
12981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12982 fi
12983 echo "$as_me:12983: result: $ac_cv_func_regcomp" >&5
12984 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12985 if test $ac_cv_func_regcomp = yes; then
12986   cf_regex_func=regcomp
12987 else
12988
12989         for cf_regex_lib in $cf_regex_libs
12990         do
12991                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12992 echo "$as_me:12992: checking for regcomp in -l$cf_regex_lib" >&5
12993 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12994 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12995   echo $ECHO_N "(cached) $ECHO_C" >&6
12996 else
12997   ac_check_lib_save_LIBS=$LIBS
12998 LIBS="-l$cf_regex_lib  $LIBS"
12999 cat >conftest.$ac_ext <<_ACEOF
13000 #line 13000 "configure"
13001 #include "confdefs.h"
13002
13003 /* Override any gcc2 internal prototype to avoid an error.  */
13004 #ifdef __cplusplus
13005 extern "C"
13006 #endif
13007 /* We use char because int might match the return type of a gcc2
13008    builtin and then its argument prototype would still apply.  */
13009 char regcomp ();
13010 int
13011 main ()
13012 {
13013 regcomp ();
13014   ;
13015   return 0;
13016 }
13017 _ACEOF
13018 rm -f conftest.$ac_objext conftest$ac_exeext
13019 if { (eval echo "$as_me:13019: \"$ac_link\"") >&5
13020   (eval $ac_link) 2>&5
13021   ac_status=$?
13022   echo "$as_me:13022: \$? = $ac_status" >&5
13023   (exit $ac_status); } &&
13024          { ac_try='test -s conftest$ac_exeext'
13025   { (eval echo "$as_me:13025: \"$ac_try\"") >&5
13026   (eval $ac_try) 2>&5
13027   ac_status=$?
13028   echo "$as_me:13028: \$? = $ac_status" >&5
13029   (exit $ac_status); }; }; then
13030   eval "$as_ac_Lib=yes"
13031 else
13032   echo "$as_me: failed program was:" >&5
13033 cat conftest.$ac_ext >&5
13034 eval "$as_ac_Lib=no"
13035 fi
13036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13037 LIBS=$ac_check_lib_save_LIBS
13038 fi
13039 echo "$as_me:13039: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13040 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13041 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13042
13043                                 LIBS="-l$cf_regex_lib $LIBS"
13044                                 cf_regex_func=regcomp
13045                                 break
13046 fi
13047
13048         done
13049
13050 fi
13051
13052 if test "$cf_regex_func" = no ; then
13053         echo "$as_me:13053: checking for compile" >&5
13054 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13055 if test "${ac_cv_func_compile+set}" = set; then
13056   echo $ECHO_N "(cached) $ECHO_C" >&6
13057 else
13058   cat >conftest.$ac_ext <<_ACEOF
13059 #line 13059 "configure"
13060 #include "confdefs.h"
13061 /* System header to define __stub macros and hopefully few prototypes,
13062     which can conflict with char compile (); below.  */
13063 #include <assert.h>
13064 /* Override any gcc2 internal prototype to avoid an error.  */
13065 #ifdef __cplusplus
13066 extern "C"
13067 #endif
13068 /* We use char because int might match the return type of a gcc2
13069    builtin and then its argument prototype would still apply.  */
13070 char compile ();
13071 char (*f) ();
13072
13073 int
13074 main ()
13075 {
13076 /* The GNU C library defines this for functions which it implements
13077     to always fail with ENOSYS.  Some functions are actually named
13078     something starting with __ and the normal name is an alias.  */
13079 #if defined (__stub_compile) || defined (__stub___compile)
13080 choke me
13081 #else
13082 f = compile;
13083 #endif
13084
13085   ;
13086   return 0;
13087 }
13088 _ACEOF
13089 rm -f conftest.$ac_objext conftest$ac_exeext
13090 if { (eval echo "$as_me:13090: \"$ac_link\"") >&5
13091   (eval $ac_link) 2>&5
13092   ac_status=$?
13093   echo "$as_me:13093: \$? = $ac_status" >&5
13094   (exit $ac_status); } &&
13095          { ac_try='test -s conftest$ac_exeext'
13096   { (eval echo "$as_me:13096: \"$ac_try\"") >&5
13097   (eval $ac_try) 2>&5
13098   ac_status=$?
13099   echo "$as_me:13099: \$? = $ac_status" >&5
13100   (exit $ac_status); }; }; then
13101   ac_cv_func_compile=yes
13102 else
13103   echo "$as_me: failed program was:" >&5
13104 cat conftest.$ac_ext >&5
13105 ac_cv_func_compile=no
13106 fi
13107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13108 fi
13109 echo "$as_me:13109: result: $ac_cv_func_compile" >&5
13110 echo "${ECHO_T}$ac_cv_func_compile" >&6
13111 if test $ac_cv_func_compile = yes; then
13112   cf_regex_func=compile
13113 else
13114
13115                 echo "$as_me:13115: checking for compile in -lgen" >&5
13116 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13117 if test "${ac_cv_lib_gen_compile+set}" = set; then
13118   echo $ECHO_N "(cached) $ECHO_C" >&6
13119 else
13120   ac_check_lib_save_LIBS=$LIBS
13121 LIBS="-lgen  $LIBS"
13122 cat >conftest.$ac_ext <<_ACEOF
13123 #line 13123 "configure"
13124 #include "confdefs.h"
13125
13126 /* Override any gcc2 internal prototype to avoid an error.  */
13127 #ifdef __cplusplus
13128 extern "C"
13129 #endif
13130 /* We use char because int might match the return type of a gcc2
13131    builtin and then its argument prototype would still apply.  */
13132 char compile ();
13133 int
13134 main ()
13135 {
13136 compile ();
13137   ;
13138   return 0;
13139 }
13140 _ACEOF
13141 rm -f conftest.$ac_objext conftest$ac_exeext
13142 if { (eval echo "$as_me:13142: \"$ac_link\"") >&5
13143   (eval $ac_link) 2>&5
13144   ac_status=$?
13145   echo "$as_me:13145: \$? = $ac_status" >&5
13146   (exit $ac_status); } &&
13147          { ac_try='test -s conftest$ac_exeext'
13148   { (eval echo "$as_me:13148: \"$ac_try\"") >&5
13149   (eval $ac_try) 2>&5
13150   ac_status=$?
13151   echo "$as_me:13151: \$? = $ac_status" >&5
13152   (exit $ac_status); }; }; then
13153   ac_cv_lib_gen_compile=yes
13154 else
13155   echo "$as_me: failed program was:" >&5
13156 cat conftest.$ac_ext >&5
13157 ac_cv_lib_gen_compile=no
13158 fi
13159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13160 LIBS=$ac_check_lib_save_LIBS
13161 fi
13162 echo "$as_me:13162: result: $ac_cv_lib_gen_compile" >&5
13163 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13164 if test $ac_cv_lib_gen_compile = yes; then
13165
13166                                 LIBS="-lgen $LIBS"
13167                                 cf_regex_func=compile
13168 fi
13169
13170 fi
13171
13172 fi
13173
13174 if test "$cf_regex_func" = no ; then
13175         { echo "$as_me:13175: WARNING: cannot find regular expression library" >&5
13176 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13177 fi
13178
13179 echo "$as_me:13179: checking for regular-expression headers" >&5
13180 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13181 if test "${cf_cv_regex_hdrs+set}" = set; then
13182   echo $ECHO_N "(cached) $ECHO_C" >&6
13183 else
13184
13185 cf_cv_regex_hdrs=no
13186 case $cf_regex_func in #(vi
13187 compile) #(vi
13188         for cf_regex_hdr in regexp.h regexpr.h
13189         do
13190                 cat >conftest.$ac_ext <<_ACEOF
13191 #line 13191 "configure"
13192 #include "confdefs.h"
13193 #include <$cf_regex_hdr>
13194 int
13195 main ()
13196 {
13197
13198                         char *p = compile("", "", "", 0);
13199                         int x = step("", "");
13200
13201   ;
13202   return 0;
13203 }
13204 _ACEOF
13205 rm -f conftest.$ac_objext conftest$ac_exeext
13206 if { (eval echo "$as_me:13206: \"$ac_link\"") >&5
13207   (eval $ac_link) 2>&5
13208   ac_status=$?
13209   echo "$as_me:13209: \$? = $ac_status" >&5
13210   (exit $ac_status); } &&
13211          { ac_try='test -s conftest$ac_exeext'
13212   { (eval echo "$as_me:13212: \"$ac_try\"") >&5
13213   (eval $ac_try) 2>&5
13214   ac_status=$?
13215   echo "$as_me:13215: \$? = $ac_status" >&5
13216   (exit $ac_status); }; }; then
13217
13218                         cf_cv_regex_hdrs=$cf_regex_hdr
13219                         break
13220
13221 else
13222   echo "$as_me: failed program was:" >&5
13223 cat conftest.$ac_ext >&5
13224 fi
13225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13226         done
13227         ;;
13228 *)
13229         for cf_regex_hdr in regex.h
13230         do
13231                 cat >conftest.$ac_ext <<_ACEOF
13232 #line 13232 "configure"
13233 #include "confdefs.h"
13234 #include <sys/types.h>
13235 #include <$cf_regex_hdr>
13236 int
13237 main ()
13238 {
13239
13240                         regex_t *p;
13241                         int x = regcomp(p, "", 0);
13242                         int y = regexec(p, "", 0, 0, 0);
13243                         regfree(p);
13244
13245   ;
13246   return 0;
13247 }
13248 _ACEOF
13249 rm -f conftest.$ac_objext conftest$ac_exeext
13250 if { (eval echo "$as_me:13250: \"$ac_link\"") >&5
13251   (eval $ac_link) 2>&5
13252   ac_status=$?
13253   echo "$as_me:13253: \$? = $ac_status" >&5
13254   (exit $ac_status); } &&
13255          { ac_try='test -s conftest$ac_exeext'
13256   { (eval echo "$as_me:13256: \"$ac_try\"") >&5
13257   (eval $ac_try) 2>&5
13258   ac_status=$?
13259   echo "$as_me:13259: \$? = $ac_status" >&5
13260   (exit $ac_status); }; }; then
13261
13262                         cf_cv_regex_hdrs=$cf_regex_hdr
13263                         break
13264
13265 else
13266   echo "$as_me: failed program was:" >&5
13267 cat conftest.$ac_ext >&5
13268 fi
13269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13270         done
13271         ;;
13272 esac
13273
13274 fi
13275 echo "$as_me:13275: result: $cf_cv_regex_hdrs" >&5
13276 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13277
13278 case $cf_cv_regex_hdrs in #(vi
13279     no)        { echo "$as_me:13279: WARNING: no regular expression header found" >&5
13280 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13281     regex.h)   cat >>confdefs.h <<\EOF
13282 #define HAVE_REGEX_H_FUNCS 1
13283 EOF
13284  ;; #(vi
13285     regexp.h)  cat >>confdefs.h <<\EOF
13286 #define HAVE_REGEXP_H_FUNCS 1
13287 EOF
13288  ;; #(vi
13289     regexpr.h) cat >>confdefs.h <<\EOF
13290 #define HAVE_REGEXPR_H_FUNCS 1
13291 EOF
13292  ;;
13293 esac
13294
13295 for ac_header in \
13296 fcntl.h \
13297 getopt.h \
13298 limits.h \
13299 locale.h \
13300 poll.h \
13301 sys/bsdtypes.h \
13302 sys/ioctl.h \
13303 sys/param.h \
13304 sys/poll.h \
13305 sys/select.h \
13306 sys/time.h \
13307 sys/times.h \
13308 ttyent.h \
13309 unistd.h \
13310 wctype.h \
13311
13312 do
13313 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13314 echo "$as_me:13314: checking for $ac_header" >&5
13315 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13316 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13317   echo $ECHO_N "(cached) $ECHO_C" >&6
13318 else
13319   cat >conftest.$ac_ext <<_ACEOF
13320 #line 13320 "configure"
13321 #include "confdefs.h"
13322 #include <$ac_header>
13323 _ACEOF
13324 if { (eval echo "$as_me:13324: \"$ac_cpp conftest.$ac_ext\"") >&5
13325   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13326   ac_status=$?
13327   egrep -v '^ *\+' conftest.er1 >conftest.err
13328   rm -f conftest.er1
13329   cat conftest.err >&5
13330   echo "$as_me:13330: \$? = $ac_status" >&5
13331   (exit $ac_status); } >/dev/null; then
13332   if test -s conftest.err; then
13333     ac_cpp_err=$ac_c_preproc_warn_flag
13334   else
13335     ac_cpp_err=
13336   fi
13337 else
13338   ac_cpp_err=yes
13339 fi
13340 if test -z "$ac_cpp_err"; then
13341   eval "$as_ac_Header=yes"
13342 else
13343   echo "$as_me: failed program was:" >&5
13344   cat conftest.$ac_ext >&5
13345   eval "$as_ac_Header=no"
13346 fi
13347 rm -f conftest.err conftest.$ac_ext
13348 fi
13349 echo "$as_me:13349: result: `eval echo '${'$as_ac_Header'}'`" >&5
13350 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13351 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13352   cat >>confdefs.h <<EOF
13353 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13354 EOF
13355
13356 fi
13357 done
13358
13359 # check for ISC (this may also define _POSIX_SOURCE)
13360 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13361 if test "$ISC" = yes ; then
13362
13363 echo "$as_me:13363: checking for main in -lcposix" >&5
13364 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13365 if test "${ac_cv_lib_cposix_main+set}" = set; then
13366   echo $ECHO_N "(cached) $ECHO_C" >&6
13367 else
13368   ac_check_lib_save_LIBS=$LIBS
13369 LIBS="-lcposix  $LIBS"
13370 cat >conftest.$ac_ext <<_ACEOF
13371 #line 13371 "configure"
13372 #include "confdefs.h"
13373
13374 int
13375 main ()
13376 {
13377 main ();
13378   ;
13379   return 0;
13380 }
13381 _ACEOF
13382 rm -f conftest.$ac_objext conftest$ac_exeext
13383 if { (eval echo "$as_me:13383: \"$ac_link\"") >&5
13384   (eval $ac_link) 2>&5
13385   ac_status=$?
13386   echo "$as_me:13386: \$? = $ac_status" >&5
13387   (exit $ac_status); } &&
13388          { ac_try='test -s conftest$ac_exeext'
13389   { (eval echo "$as_me:13389: \"$ac_try\"") >&5
13390   (eval $ac_try) 2>&5
13391   ac_status=$?
13392   echo "$as_me:13392: \$? = $ac_status" >&5
13393   (exit $ac_status); }; }; then
13394   ac_cv_lib_cposix_main=yes
13395 else
13396   echo "$as_me: failed program was:" >&5
13397 cat conftest.$ac_ext >&5
13398 ac_cv_lib_cposix_main=no
13399 fi
13400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13401 LIBS=$ac_check_lib_save_LIBS
13402 fi
13403 echo "$as_me:13403: result: $ac_cv_lib_cposix_main" >&5
13404 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13405 if test $ac_cv_lib_cposix_main = yes; then
13406   cat >>confdefs.h <<EOF
13407 #define HAVE_LIBCPOSIX 1
13408 EOF
13409
13410   LIBS="-lcposix $LIBS"
13411
13412 fi
13413
13414         echo "$as_me:13414: checking for bzero in -linet" >&5
13415 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13416 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13417   echo $ECHO_N "(cached) $ECHO_C" >&6
13418 else
13419   ac_check_lib_save_LIBS=$LIBS
13420 LIBS="-linet  $LIBS"
13421 cat >conftest.$ac_ext <<_ACEOF
13422 #line 13422 "configure"
13423 #include "confdefs.h"
13424
13425 /* Override any gcc2 internal prototype to avoid an error.  */
13426 #ifdef __cplusplus
13427 extern "C"
13428 #endif
13429 /* We use char because int might match the return type of a gcc2
13430    builtin and then its argument prototype would still apply.  */
13431 char bzero ();
13432 int
13433 main ()
13434 {
13435 bzero ();
13436   ;
13437   return 0;
13438 }
13439 _ACEOF
13440 rm -f conftest.$ac_objext conftest$ac_exeext
13441 if { (eval echo "$as_me:13441: \"$ac_link\"") >&5
13442   (eval $ac_link) 2>&5
13443   ac_status=$?
13444   echo "$as_me:13444: \$? = $ac_status" >&5
13445   (exit $ac_status); } &&
13446          { ac_try='test -s conftest$ac_exeext'
13447   { (eval echo "$as_me:13447: \"$ac_try\"") >&5
13448   (eval $ac_try) 2>&5
13449   ac_status=$?
13450   echo "$as_me:13450: \$? = $ac_status" >&5
13451   (exit $ac_status); }; }; then
13452   ac_cv_lib_inet_bzero=yes
13453 else
13454   echo "$as_me: failed program was:" >&5
13455 cat conftest.$ac_ext >&5
13456 ac_cv_lib_inet_bzero=no
13457 fi
13458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13459 LIBS=$ac_check_lib_save_LIBS
13460 fi
13461 echo "$as_me:13461: result: $ac_cv_lib_inet_bzero" >&5
13462 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13463 if test $ac_cv_lib_inet_bzero = yes; then
13464   LIBS="-linet $LIBS"
13465 fi
13466 fi
13467
13468 echo "$as_me:13468: checking if sys/time.h works with sys/select.h" >&5
13469 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13470 if test "${cf_cv_sys_time_select+set}" = set; then
13471   echo $ECHO_N "(cached) $ECHO_C" >&6
13472 else
13473
13474 cat >conftest.$ac_ext <<_ACEOF
13475 #line 13475 "configure"
13476 #include "confdefs.h"
13477
13478 #include <sys/types.h>
13479 #ifdef HAVE_SYS_TIME_H
13480 #include <sys/time.h>
13481 #endif
13482 #ifdef HAVE_SYS_SELECT_H
13483 #include <sys/select.h>
13484 #endif
13485
13486 int
13487 main ()
13488 {
13489
13490   ;
13491   return 0;
13492 }
13493 _ACEOF
13494 rm -f conftest.$ac_objext
13495 if { (eval echo "$as_me:13495: \"$ac_compile\"") >&5
13496   (eval $ac_compile) 2>&5
13497   ac_status=$?
13498   echo "$as_me:13498: \$? = $ac_status" >&5
13499   (exit $ac_status); } &&
13500          { ac_try='test -s conftest.$ac_objext'
13501   { (eval echo "$as_me:13501: \"$ac_try\"") >&5
13502   (eval $ac_try) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit $ac_status); }; }; then
13506   cf_cv_sys_time_select=yes
13507 else
13508   echo "$as_me: failed program was:" >&5
13509 cat conftest.$ac_ext >&5
13510 cf_cv_sys_time_select=no
13511 fi
13512 rm -f conftest.$ac_objext conftest.$ac_ext
13513
13514 fi
13515
13516 echo "$as_me:13516: result: $cf_cv_sys_time_select" >&5
13517 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13518 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13519 #define HAVE_SYS_TIME_SELECT 1
13520 EOF
13521
13522 ###     checks for compiler characteristics
13523 ac_ext=c
13524 ac_cpp='$CPP $CPPFLAGS'
13525 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13526 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13527 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13528 ac_main_return=return
13529
13530 echo "$as_me:13530: checking for $CC option to accept ANSI C" >&5
13531 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13532 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13533   echo $ECHO_N "(cached) $ECHO_C" >&6
13534 else
13535   ac_cv_prog_cc_stdc=no
13536 ac_save_CC=$CC
13537 cat >conftest.$ac_ext <<_ACEOF
13538 #line 13538 "configure"
13539 #include "confdefs.h"
13540 #include <stdarg.h>
13541 #include <stdio.h>
13542 #include <sys/types.h>
13543 #include <sys/stat.h>
13544 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13545 struct buf { int x; };
13546 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13547 static char *e (p, i)
13548      char **p;
13549      int i;
13550 {
13551   return p[i];
13552 }
13553 static char *f (char * (*g) (char **, int), char **p, ...)
13554 {
13555   char *s;
13556   va_list v;
13557   va_start (v,p);
13558   s = g (p, va_arg (v,int));
13559   va_end (v);
13560   return s;
13561 }
13562 int test (int i, double x);
13563 struct s1 {int (*f) (int a);};
13564 struct s2 {int (*f) (double a);};
13565 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13566 int argc;
13567 char **argv;
13568 int
13569 main ()
13570 {
13571 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13572   ;
13573   return 0;
13574 }
13575 _ACEOF
13576 # Don't try gcc -ansi; that turns off useful extensions and
13577 # breaks some systems' header files.
13578 # AIX                   -qlanglvl=ansi
13579 # Ultrix and OSF/1      -std1
13580 # HP-UX 10.20 and later -Ae
13581 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13582 # SVR4                  -Xc -D__EXTENSIONS__
13583 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13584 do
13585   CC="$ac_save_CC $ac_arg"
13586   rm -f conftest.$ac_objext
13587 if { (eval echo "$as_me:13587: \"$ac_compile\"") >&5
13588   (eval $ac_compile) 2>&5
13589   ac_status=$?
13590   echo "$as_me:13590: \$? = $ac_status" >&5
13591   (exit $ac_status); } &&
13592          { ac_try='test -s conftest.$ac_objext'
13593   { (eval echo "$as_me:13593: \"$ac_try\"") >&5
13594   (eval $ac_try) 2>&5
13595   ac_status=$?
13596   echo "$as_me:13596: \$? = $ac_status" >&5
13597   (exit $ac_status); }; }; then
13598   ac_cv_prog_cc_stdc=$ac_arg
13599 break
13600 else
13601   echo "$as_me: failed program was:" >&5
13602 cat conftest.$ac_ext >&5
13603 fi
13604 rm -f conftest.$ac_objext
13605 done
13606 rm -f conftest.$ac_ext conftest.$ac_objext
13607 CC=$ac_save_CC
13608
13609 fi
13610
13611 case "x$ac_cv_prog_cc_stdc" in
13612   x|xno)
13613     echo "$as_me:13613: result: none needed" >&5
13614 echo "${ECHO_T}none needed" >&6 ;;
13615   *)
13616     echo "$as_me:13616: result: $ac_cv_prog_cc_stdc" >&5
13617 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13618     CC="$CC $ac_cv_prog_cc_stdc" ;;
13619 esac
13620
13621 echo "$as_me:13621: checking for an ANSI C-conforming const" >&5
13622 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13623 if test "${ac_cv_c_const+set}" = set; then
13624   echo $ECHO_N "(cached) $ECHO_C" >&6
13625 else
13626   cat >conftest.$ac_ext <<_ACEOF
13627 #line 13627 "configure"
13628 #include "confdefs.h"
13629
13630 int
13631 main ()
13632 {
13633 /* FIXME: Include the comments suggested by Paul. */
13634 #ifndef __cplusplus
13635   /* Ultrix mips cc rejects this.  */
13636   typedef int charset[2];
13637   const charset x;
13638   /* SunOS 4.1.1 cc rejects this.  */
13639   char const *const *ccp;
13640   char **p;
13641   /* NEC SVR4.0.2 mips cc rejects this.  */
13642   struct point {int x, y;};
13643   static struct point const zero = {0,0};
13644   /* AIX XL C 1.02.0.0 rejects this.
13645      It does not let you subtract one const X* pointer from another in
13646      an arm of an if-expression whose if-part is not a constant
13647      expression */
13648   const char *g = "string";
13649   ccp = &g + (g ? g-g : 0);
13650   /* HPUX 7.0 cc rejects these. */
13651   ++ccp;
13652   p = (char**) ccp;
13653   ccp = (char const *const *) p;
13654   { /* SCO 3.2v4 cc rejects this.  */
13655     char *t;
13656     char const *s = 0 ? (char *) 0 : (char const *) 0;
13657
13658     *t++ = 0;
13659   }
13660   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13661     int x[] = {25, 17};
13662     const int *foo = &x[0];
13663     ++foo;
13664   }
13665   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13666     typedef const int *iptr;
13667     iptr p = 0;
13668     ++p;
13669   }
13670   { /* AIX XL C 1.02.0.0 rejects this saying
13671        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13672     struct s { int j; const int *ap[3]; };
13673     struct s *b; b->j = 5;
13674   }
13675   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13676     const int foo = 10;
13677   }
13678 #endif
13679
13680   ;
13681   return 0;
13682 }
13683 _ACEOF
13684 rm -f conftest.$ac_objext
13685 if { (eval echo "$as_me:13685: \"$ac_compile\"") >&5
13686   (eval $ac_compile) 2>&5
13687   ac_status=$?
13688   echo "$as_me:13688: \$? = $ac_status" >&5
13689   (exit $ac_status); } &&
13690          { ac_try='test -s conftest.$ac_objext'
13691   { (eval echo "$as_me:13691: \"$ac_try\"") >&5
13692   (eval $ac_try) 2>&5
13693   ac_status=$?
13694   echo "$as_me:13694: \$? = $ac_status" >&5
13695   (exit $ac_status); }; }; then
13696   ac_cv_c_const=yes
13697 else
13698   echo "$as_me: failed program was:" >&5
13699 cat conftest.$ac_ext >&5
13700 ac_cv_c_const=no
13701 fi
13702 rm -f conftest.$ac_objext conftest.$ac_ext
13703 fi
13704 echo "$as_me:13704: result: $ac_cv_c_const" >&5
13705 echo "${ECHO_T}$ac_cv_c_const" >&6
13706 if test $ac_cv_c_const = no; then
13707
13708 cat >>confdefs.h <<\EOF
13709 #define const
13710 EOF
13711
13712 fi
13713
13714 echo "$as_me:13714: checking for inline" >&5
13715 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13716 if test "${ac_cv_c_inline+set}" = set; then
13717   echo $ECHO_N "(cached) $ECHO_C" >&6
13718 else
13719   ac_cv_c_inline=no
13720 for ac_kw in inline __inline__ __inline; do
13721   cat >conftest.$ac_ext <<_ACEOF
13722 #line 13722 "configure"
13723 #include "confdefs.h"
13724 #ifndef __cplusplus
13725 static $ac_kw int static_foo () {return 0; }
13726 $ac_kw int foo () {return 0; }
13727 #endif
13728
13729 _ACEOF
13730 rm -f conftest.$ac_objext
13731 if { (eval echo "$as_me:13731: \"$ac_compile\"") >&5
13732   (eval $ac_compile) 2>&5
13733   ac_status=$?
13734   echo "$as_me:13734: \$? = $ac_status" >&5
13735   (exit $ac_status); } &&
13736          { ac_try='test -s conftest.$ac_objext'
13737   { (eval echo "$as_me:13737: \"$ac_try\"") >&5
13738   (eval $ac_try) 2>&5
13739   ac_status=$?
13740   echo "$as_me:13740: \$? = $ac_status" >&5
13741   (exit $ac_status); }; }; then
13742   ac_cv_c_inline=$ac_kw; break
13743 else
13744   echo "$as_me: failed program was:" >&5
13745 cat conftest.$ac_ext >&5
13746 fi
13747 rm -f conftest.$ac_objext conftest.$ac_ext
13748 done
13749
13750 fi
13751 echo "$as_me:13751: result: $ac_cv_c_inline" >&5
13752 echo "${ECHO_T}$ac_cv_c_inline" >&6
13753 case $ac_cv_c_inline in
13754   inline | yes) ;;
13755   no)
13756 cat >>confdefs.h <<\EOF
13757 #define inline
13758 EOF
13759  ;;
13760   *)  cat >>confdefs.h <<EOF
13761 #define inline $ac_cv_c_inline
13762 EOF
13763  ;;
13764 esac
13765
13766 NCURSES_INLINE=
13767 if test "$ac_cv_c_inline" != no ; then
13768   NCURSES_INLINE=inline
13769   if test "$INTEL_COMPILER" = yes
13770   then
13771     :
13772   elif test "$GCC" = yes
13773   then
13774     echo "$as_me:13774: checking if $CC supports options to tune inlining" >&5
13775 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13776 if test "${cf_cv_gcc_inline+set}" = set; then
13777   echo $ECHO_N "(cached) $ECHO_C" >&6
13778 else
13779
13780       cf_save_CFLAGS=$CFLAGS
13781       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13782       cat >conftest.$ac_ext <<_ACEOF
13783 #line 13783 "configure"
13784 #include "confdefs.h"
13785 inline int foo(void) { return 1; }
13786 int
13787 main ()
13788 {
13789 ${cf_cv_main_return:-return} foo()
13790   ;
13791   return 0;
13792 }
13793 _ACEOF
13794 rm -f conftest.$ac_objext
13795 if { (eval echo "$as_me:13795: \"$ac_compile\"") >&5
13796   (eval $ac_compile) 2>&5
13797   ac_status=$?
13798   echo "$as_me:13798: \$? = $ac_status" >&5
13799   (exit $ac_status); } &&
13800          { ac_try='test -s conftest.$ac_objext'
13801   { (eval echo "$as_me:13801: \"$ac_try\"") >&5
13802   (eval $ac_try) 2>&5
13803   ac_status=$?
13804   echo "$as_me:13804: \$? = $ac_status" >&5
13805   (exit $ac_status); }; }; then
13806   cf_cv_gcc_inline=yes
13807 else
13808   echo "$as_me: failed program was:" >&5
13809 cat conftest.$ac_ext >&5
13810 cf_cv_gcc_inline=no
13811 fi
13812 rm -f conftest.$ac_objext conftest.$ac_ext
13813       CFLAGS=$cf_save_CFLAGS
13814
13815 fi
13816 echo "$as_me:13816: result: $cf_cv_gcc_inline" >&5
13817 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13818     if test "$cf_cv_gcc_inline" = yes ; then
13819
13820 cf_fix_cppflags=no
13821 cf_new_cflags=
13822 cf_new_cppflags=
13823 cf_new_extra_cppflags=
13824
13825 for cf_add_cflags in --param max-inline-insns-single=1200
13826 do
13827 case $cf_fix_cppflags in
13828 no)
13829         case $cf_add_cflags in #(vi
13830         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13831                 case $cf_add_cflags in
13832                 -D*)
13833                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13834
13835                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13836                                 && test -z "${cf_tst_cflags}" \
13837                                 && cf_fix_cppflags=yes
13838
13839                         if test $cf_fix_cppflags = yes ; then
13840                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13841                                 continue
13842                         elif test "${cf_tst_cflags}" = "\"'" ; then
13843                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13844                                 continue
13845                         fi
13846                         ;;
13847                 esac
13848                 case "$CPPFLAGS" in
13849                 *$cf_add_cflags) #(vi
13850                         ;;
13851                 *) #(vi
13852                         case $cf_add_cflags in #(vi
13853                         -D*)
13854                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13855
13856 CPPFLAGS=`echo "$CPPFLAGS" | \
13857         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13858                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13859
13860                                 ;;
13861                         esac
13862                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13863                         ;;
13864                 esac
13865                 ;;
13866         *)
13867                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13868                 ;;
13869         esac
13870         ;;
13871 yes)
13872         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13873
13874         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13875
13876         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13877                 && test -z "${cf_tst_cflags}" \
13878                 && cf_fix_cppflags=no
13879         ;;
13880 esac
13881 done
13882
13883 if test -n "$cf_new_cflags" ; then
13884
13885         CFLAGS="$CFLAGS $cf_new_cflags"
13886 fi
13887
13888 if test -n "$cf_new_cppflags" ; then
13889
13890         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13891 fi
13892
13893 if test -n "$cf_new_extra_cppflags" ; then
13894
13895         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13896 fi
13897
13898     fi
13899   fi
13900 fi
13901
13902 echo "$as_me:13902: checking for signal global datatype" >&5
13903 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13904 if test "${cf_cv_sig_atomic_t+set}" = set; then
13905   echo $ECHO_N "(cached) $ECHO_C" >&6
13906 else
13907
13908         for cf_type in \
13909                 "volatile sig_atomic_t" \
13910                 "sig_atomic_t" \
13911                 "int"
13912         do
13913         cat >conftest.$ac_ext <<_ACEOF
13914 #line 13914 "configure"
13915 #include "confdefs.h"
13916
13917 #include <sys/types.h>
13918 #include <signal.h>
13919 #include <stdio.h>
13920
13921 extern $cf_type x;
13922 $cf_type x;
13923 static void handler(int sig)
13924 {
13925         x = 5;
13926 }
13927 int
13928 main ()
13929 {
13930 signal(SIGINT, handler);
13931                  x = 1
13932   ;
13933   return 0;
13934 }
13935 _ACEOF
13936 rm -f conftest.$ac_objext
13937 if { (eval echo "$as_me:13937: \"$ac_compile\"") >&5
13938   (eval $ac_compile) 2>&5
13939   ac_status=$?
13940   echo "$as_me:13940: \$? = $ac_status" >&5
13941   (exit $ac_status); } &&
13942          { ac_try='test -s conftest.$ac_objext'
13943   { (eval echo "$as_me:13943: \"$ac_try\"") >&5
13944   (eval $ac_try) 2>&5
13945   ac_status=$?
13946   echo "$as_me:13946: \$? = $ac_status" >&5
13947   (exit $ac_status); }; }; then
13948   cf_cv_sig_atomic_t=$cf_type
13949 else
13950   echo "$as_me: failed program was:" >&5
13951 cat conftest.$ac_ext >&5
13952 cf_cv_sig_atomic_t=no
13953 fi
13954 rm -f conftest.$ac_objext conftest.$ac_ext
13955                 test "$cf_cv_sig_atomic_t" != no && break
13956         done
13957
13958 fi
13959
13960 echo "$as_me:13960: result: $cf_cv_sig_atomic_t" >&5
13961 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13962 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13963 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13964 EOF
13965
13966 if test $NCURSES_CHTYPE = auto ; then
13967
13968 echo "$as_me:13968: checking for type of chtype" >&5
13969 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13970 if test "${cf_cv_typeof_chtype+set}" = set; then
13971   echo $ECHO_N "(cached) $ECHO_C" >&6
13972 else
13973
13974                 if test "$cross_compiling" = yes; then
13975   cf_cv_typeof_chtype=long
13976 else
13977   cat >conftest.$ac_ext <<_ACEOF
13978 #line 13978 "configure"
13979 #include "confdefs.h"
13980
13981 #define WANT_BITS 31
13982 #include <stdio.h>
13983 int main()
13984 {
13985         FILE *fp = fopen("cf_test.out", "w");
13986         if (fp != 0) {
13987                 char *result = "long";
13988                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13989                         int n;
13990                         unsigned int x, y;
13991                         for (n = 0; n < WANT_BITS; n++) {
13992                                 x = (1 << n);
13993                                 y = (x >> n);
13994                                 if (y != 1 || x == 0) {
13995                                         x = 0;
13996                                         break;
13997                                 }
13998                         }
13999                         /*
14000                          * If x is nonzero, an int is big enough for the bits
14001                          * that we want.
14002                          */
14003                         result = (x != 0) ? "int" : "long";
14004                 }
14005                 fputs(result, fp);
14006                 fclose(fp);
14007         }
14008         ${cf_cv_main_return:-return}(0);
14009 }
14010
14011 _ACEOF
14012 rm -f conftest$ac_exeext
14013 if { (eval echo "$as_me:14013: \"$ac_link\"") >&5
14014   (eval $ac_link) 2>&5
14015   ac_status=$?
14016   echo "$as_me:14016: \$? = $ac_status" >&5
14017   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14018   { (eval echo "$as_me:14018: \"$ac_try\"") >&5
14019   (eval $ac_try) 2>&5
14020   ac_status=$?
14021   echo "$as_me:14021: \$? = $ac_status" >&5
14022   (exit $ac_status); }; }; then
14023   cf_cv_typeof_chtype=`cat cf_test.out`
14024 else
14025   echo "$as_me: program exited with status $ac_status" >&5
14026 echo "$as_me: failed program was:" >&5
14027 cat conftest.$ac_ext >&5
14028 cf_cv_typeof_chtype=long
14029 fi
14030 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14031 fi
14032                 rm -f cf_test.out
14033
14034 fi
14035
14036 echo "$as_me:14036: result: $cf_cv_typeof_chtype" >&5
14037 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14038
14039 cat >>confdefs.h <<EOF
14040 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14041 EOF
14042
14043 else
14044         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14045 fi
14046 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14047
14048 echo "$as_me:14048: checking if unsigned literals are legal" >&5
14049 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14050 if test "${cf_cv_unsigned_literals+set}" = set; then
14051   echo $ECHO_N "(cached) $ECHO_C" >&6
14052 else
14053
14054         cat >conftest.$ac_ext <<_ACEOF
14055 #line 14055 "configure"
14056 #include "confdefs.h"
14057
14058 int
14059 main ()
14060 {
14061 long x = 1L + 1UL + 1U + 1
14062   ;
14063   return 0;
14064 }
14065 _ACEOF
14066 rm -f conftest.$ac_objext
14067 if { (eval echo "$as_me:14067: \"$ac_compile\"") >&5
14068   (eval $ac_compile) 2>&5
14069   ac_status=$?
14070   echo "$as_me:14070: \$? = $ac_status" >&5
14071   (exit $ac_status); } &&
14072          { ac_try='test -s conftest.$ac_objext'
14073   { (eval echo "$as_me:14073: \"$ac_try\"") >&5
14074   (eval $ac_try) 2>&5
14075   ac_status=$?
14076   echo "$as_me:14076: \$? = $ac_status" >&5
14077   (exit $ac_status); }; }; then
14078   cf_cv_unsigned_literals=yes
14079 else
14080   echo "$as_me: failed program was:" >&5
14081 cat conftest.$ac_ext >&5
14082 cf_cv_unsigned_literals=no
14083 fi
14084 rm -f conftest.$ac_objext conftest.$ac_ext
14085
14086 fi
14087
14088 echo "$as_me:14088: result: $cf_cv_unsigned_literals" >&5
14089 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14090
14091 cf_cv_1UL="1"
14092 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14093 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14094
14095 if test $NCURSES_MMASK_T = auto ; then
14096         cf_cv_typeof_mmask_t=long
14097 else
14098         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14099 fi
14100 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14101
14102 ###     Checks for external-data
14103
14104 echo "$as_me:14104: checking if external errno is declared" >&5
14105 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14106 if test "${cf_cv_dcl_errno+set}" = set; then
14107   echo $ECHO_N "(cached) $ECHO_C" >&6
14108 else
14109
14110     cat >conftest.$ac_ext <<_ACEOF
14111 #line 14111 "configure"
14112 #include "confdefs.h"
14113
14114 #ifdef HAVE_STDLIB_H
14115 #include <stdlib.h>
14116 #endif
14117 #include <stdio.h>
14118 #include <sys/types.h>
14119 #include <errno.h>
14120 int
14121 main ()
14122 {
14123 int x = (int) errno
14124   ;
14125   return 0;
14126 }
14127 _ACEOF
14128 rm -f conftest.$ac_objext
14129 if { (eval echo "$as_me:14129: \"$ac_compile\"") >&5
14130   (eval $ac_compile) 2>&5
14131   ac_status=$?
14132   echo "$as_me:14132: \$? = $ac_status" >&5
14133   (exit $ac_status); } &&
14134          { ac_try='test -s conftest.$ac_objext'
14135   { (eval echo "$as_me:14135: \"$ac_try\"") >&5
14136   (eval $ac_try) 2>&5
14137   ac_status=$?
14138   echo "$as_me:14138: \$? = $ac_status" >&5
14139   (exit $ac_status); }; }; then
14140   cf_cv_dcl_errno=yes
14141 else
14142   echo "$as_me: failed program was:" >&5
14143 cat conftest.$ac_ext >&5
14144 cf_cv_dcl_errno=no
14145 fi
14146 rm -f conftest.$ac_objext conftest.$ac_ext
14147
14148 fi
14149 echo "$as_me:14149: result: $cf_cv_dcl_errno" >&5
14150 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14151
14152 if test "$cf_cv_dcl_errno" = no ; then
14153
14154 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14155
14156     cat >>confdefs.h <<EOF
14157 #define $cf_result 1
14158 EOF
14159
14160 fi
14161
14162 # It's possible (for near-UNIX clones) that the data doesn't exist
14163
14164 echo "$as_me:14164: checking if external errno exists" >&5
14165 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14166 if test "${cf_cv_have_errno+set}" = set; then
14167   echo $ECHO_N "(cached) $ECHO_C" >&6
14168 else
14169
14170     cat >conftest.$ac_ext <<_ACEOF
14171 #line 14171 "configure"
14172 #include "confdefs.h"
14173
14174 #undef errno
14175 extern int errno;
14176
14177 int
14178 main ()
14179 {
14180 errno = 2
14181   ;
14182   return 0;
14183 }
14184 _ACEOF
14185 rm -f conftest.$ac_objext conftest$ac_exeext
14186 if { (eval echo "$as_me:14186: \"$ac_link\"") >&5
14187   (eval $ac_link) 2>&5
14188   ac_status=$?
14189   echo "$as_me:14189: \$? = $ac_status" >&5
14190   (exit $ac_status); } &&
14191          { ac_try='test -s conftest$ac_exeext'
14192   { (eval echo "$as_me:14192: \"$ac_try\"") >&5
14193   (eval $ac_try) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit $ac_status); }; }; then
14197   cf_cv_have_errno=yes
14198 else
14199   echo "$as_me: failed program was:" >&5
14200 cat conftest.$ac_ext >&5
14201 cf_cv_have_errno=no
14202 fi
14203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14204
14205 fi
14206 echo "$as_me:14206: result: $cf_cv_have_errno" >&5
14207 echo "${ECHO_T}$cf_cv_have_errno" >&6
14208
14209 if test "$cf_cv_have_errno" = yes ; then
14210
14211 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14212
14213     cat >>confdefs.h <<EOF
14214 #define $cf_result 1
14215 EOF
14216
14217 fi
14218
14219 echo "$as_me:14219: checking if data-only library module links" >&5
14220 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14221 if test "${cf_cv_link_dataonly+set}" = set; then
14222   echo $ECHO_N "(cached) $ECHO_C" >&6
14223 else
14224
14225         rm -f conftest.a
14226         cat >conftest.$ac_ext <<EOF
14227 #line 14227 "configure"
14228 int     testdata[3] = { 123, 456, 789 };
14229 EOF
14230         if { (eval echo "$as_me:14230: \"$ac_compile\"") >&5
14231   (eval $ac_compile) 2>&5
14232   ac_status=$?
14233   echo "$as_me:14233: \$? = $ac_status" >&5
14234   (exit $ac_status); } ; then
14235                 mv conftest.o data.o && \
14236                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14237         fi
14238         rm -f conftest.$ac_ext data.o
14239         cat >conftest.$ac_ext <<EOF
14240 #line 14240 "configure"
14241 int     testfunc()
14242 {
14243 #if defined(NeXT)
14244         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14245 #else
14246         extern int testdata[3];
14247         return testdata[0] == 123
14248            &&  testdata[1] == 456
14249            &&  testdata[2] == 789;
14250 #endif
14251 }
14252 EOF
14253         if { (eval echo "$as_me:14253: \"$ac_compile\"") >&5
14254   (eval $ac_compile) 2>&5
14255   ac_status=$?
14256   echo "$as_me:14256: \$? = $ac_status" >&5
14257   (exit $ac_status); }; then
14258                 mv conftest.o func.o && \
14259                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14260         fi
14261         rm -f conftest.$ac_ext func.o
14262         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14263         cf_saveLIBS="$LIBS"
14264         LIBS="conftest.a $LIBS"
14265         if test "$cross_compiling" = yes; then
14266   cf_cv_link_dataonly=unknown
14267 else
14268   cat >conftest.$ac_ext <<_ACEOF
14269 #line 14269 "configure"
14270 #include "confdefs.h"
14271
14272         int main()
14273         {
14274                 extern int testfunc();
14275                 ${cf_cv_main_return:-return} (!testfunc());
14276         }
14277
14278 _ACEOF
14279 rm -f conftest$ac_exeext
14280 if { (eval echo "$as_me:14280: \"$ac_link\"") >&5
14281   (eval $ac_link) 2>&5
14282   ac_status=$?
14283   echo "$as_me:14283: \$? = $ac_status" >&5
14284   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14285   { (eval echo "$as_me:14285: \"$ac_try\"") >&5
14286   (eval $ac_try) 2>&5
14287   ac_status=$?
14288   echo "$as_me:14288: \$? = $ac_status" >&5
14289   (exit $ac_status); }; }; then
14290   cf_cv_link_dataonly=yes
14291 else
14292   echo "$as_me: program exited with status $ac_status" >&5
14293 echo "$as_me: failed program was:" >&5
14294 cat conftest.$ac_ext >&5
14295 cf_cv_link_dataonly=no
14296 fi
14297 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14298 fi
14299         LIBS="$cf_saveLIBS"
14300
14301 fi
14302
14303 echo "$as_me:14303: result: $cf_cv_link_dataonly" >&5
14304 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14305
14306 if test "$cf_cv_link_dataonly" = no ; then
14307         cat >>confdefs.h <<\EOF
14308 #define BROKEN_LINKER 1
14309 EOF
14310
14311         BROKEN_LINKER=1
14312 fi
14313
14314 ###     Checks for library functions.
14315
14316 for ac_func in \
14317 getcwd \
14318 getegid \
14319 geteuid \
14320 getttynam \
14321 issetugid \
14322 poll \
14323 remove \
14324 select \
14325 setbuf \
14326 setbuffer \
14327 setvbuf \
14328 sigaction \
14329 sigvec \
14330 strdup \
14331 strstr \
14332 tcgetpgrp \
14333 times \
14334 vsnprintf \
14335
14336 do
14337 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14338 echo "$as_me:14338: checking for $ac_func" >&5
14339 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14340 if eval "test \"\${$as_ac_var+set}\" = set"; then
14341   echo $ECHO_N "(cached) $ECHO_C" >&6
14342 else
14343   cat >conftest.$ac_ext <<_ACEOF
14344 #line 14344 "configure"
14345 #include "confdefs.h"
14346 /* System header to define __stub macros and hopefully few prototypes,
14347     which can conflict with char $ac_func (); below.  */
14348 #include <assert.h>
14349 /* Override any gcc2 internal prototype to avoid an error.  */
14350 #ifdef __cplusplus
14351 extern "C"
14352 #endif
14353 /* We use char because int might match the return type of a gcc2
14354    builtin and then its argument prototype would still apply.  */
14355 char $ac_func ();
14356 char (*f) ();
14357
14358 int
14359 main ()
14360 {
14361 /* The GNU C library defines this for functions which it implements
14362     to always fail with ENOSYS.  Some functions are actually named
14363     something starting with __ and the normal name is an alias.  */
14364 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14365 choke me
14366 #else
14367 f = $ac_func;
14368 #endif
14369
14370   ;
14371   return 0;
14372 }
14373 _ACEOF
14374 rm -f conftest.$ac_objext conftest$ac_exeext
14375 if { (eval echo "$as_me:14375: \"$ac_link\"") >&5
14376   (eval $ac_link) 2>&5
14377   ac_status=$?
14378   echo "$as_me:14378: \$? = $ac_status" >&5
14379   (exit $ac_status); } &&
14380          { ac_try='test -s conftest$ac_exeext'
14381   { (eval echo "$as_me:14381: \"$ac_try\"") >&5
14382   (eval $ac_try) 2>&5
14383   ac_status=$?
14384   echo "$as_me:14384: \$? = $ac_status" >&5
14385   (exit $ac_status); }; }; then
14386   eval "$as_ac_var=yes"
14387 else
14388   echo "$as_me: failed program was:" >&5
14389 cat conftest.$ac_ext >&5
14390 eval "$as_ac_var=no"
14391 fi
14392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14393 fi
14394 echo "$as_me:14394: result: `eval echo '${'$as_ac_var'}'`" >&5
14395 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14396 if test `eval echo '${'$as_ac_var'}'` = yes; then
14397   cat >>confdefs.h <<EOF
14398 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14399 EOF
14400
14401 fi
14402 done
14403
14404 if test "$with_getcap" = "yes" ; then
14405
14406 echo "$as_me:14406: checking for terminal-capability database functions" >&5
14407 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14408 if test "${cf_cv_cgetent+set}" = set; then
14409   echo $ECHO_N "(cached) $ECHO_C" >&6
14410 else
14411
14412 cat >conftest.$ac_ext <<_ACEOF
14413 #line 14413 "configure"
14414 #include "confdefs.h"
14415
14416 #include <stdlib.h>
14417 int
14418 main ()
14419 {
14420
14421         char temp[128];
14422         char *buf = temp;
14423         char *db_array = temp;
14424         cgetent(&buf, /* int *, */ &db_array, "vt100");
14425         cgetcap(buf, "tc", '=');
14426         cgetmatch(buf, "tc");
14427
14428   ;
14429   return 0;
14430 }
14431 _ACEOF
14432 rm -f conftest.$ac_objext conftest$ac_exeext
14433 if { (eval echo "$as_me:14433: \"$ac_link\"") >&5
14434   (eval $ac_link) 2>&5
14435   ac_status=$?
14436   echo "$as_me:14436: \$? = $ac_status" >&5
14437   (exit $ac_status); } &&
14438          { ac_try='test -s conftest$ac_exeext'
14439   { (eval echo "$as_me:14439: \"$ac_try\"") >&5
14440   (eval $ac_try) 2>&5
14441   ac_status=$?
14442   echo "$as_me:14442: \$? = $ac_status" >&5
14443   (exit $ac_status); }; }; then
14444   cf_cv_cgetent=yes
14445 else
14446   echo "$as_me: failed program was:" >&5
14447 cat conftest.$ac_ext >&5
14448 cf_cv_cgetent=no
14449 fi
14450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14451
14452 fi
14453
14454 echo "$as_me:14454: result: $cf_cv_cgetent" >&5
14455 echo "${ECHO_T}$cf_cv_cgetent" >&6
14456 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14457 #define HAVE_BSD_CGETENT 1
14458 EOF
14459
14460 fi
14461
14462 echo "$as_me:14462: checking for isascii" >&5
14463 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14464 if test "${cf_cv_have_isascii+set}" = set; then
14465   echo $ECHO_N "(cached) $ECHO_C" >&6
14466 else
14467
14468         cat >conftest.$ac_ext <<_ACEOF
14469 #line 14469 "configure"
14470 #include "confdefs.h"
14471 #include <ctype.h>
14472 int
14473 main ()
14474 {
14475 int x = isascii(' ')
14476   ;
14477   return 0;
14478 }
14479 _ACEOF
14480 rm -f conftest.$ac_objext conftest$ac_exeext
14481 if { (eval echo "$as_me:14481: \"$ac_link\"") >&5
14482   (eval $ac_link) 2>&5
14483   ac_status=$?
14484   echo "$as_me:14484: \$? = $ac_status" >&5
14485   (exit $ac_status); } &&
14486          { ac_try='test -s conftest$ac_exeext'
14487   { (eval echo "$as_me:14487: \"$ac_try\"") >&5
14488   (eval $ac_try) 2>&5
14489   ac_status=$?
14490   echo "$as_me:14490: \$? = $ac_status" >&5
14491   (exit $ac_status); }; }; then
14492   cf_cv_have_isascii=yes
14493 else
14494   echo "$as_me: failed program was:" >&5
14495 cat conftest.$ac_ext >&5
14496 cf_cv_have_isascii=no
14497 fi
14498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14499
14500 fi
14501 echo "$as_me:14501: result: $cf_cv_have_isascii" >&5
14502 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14503 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14504 #define HAVE_ISASCII 1
14505 EOF
14506
14507 if test "$ac_cv_func_sigaction" = yes; then
14508 echo "$as_me:14508: checking whether sigaction needs _POSIX_SOURCE" >&5
14509 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14510 cat >conftest.$ac_ext <<_ACEOF
14511 #line 14511 "configure"
14512 #include "confdefs.h"
14513
14514 #include <sys/types.h>
14515 #include <signal.h>
14516 int
14517 main ()
14518 {
14519 struct sigaction act
14520   ;
14521   return 0;
14522 }
14523 _ACEOF
14524 rm -f conftest.$ac_objext
14525 if { (eval echo "$as_me:14525: \"$ac_compile\"") >&5
14526   (eval $ac_compile) 2>&5
14527   ac_status=$?
14528   echo "$as_me:14528: \$? = $ac_status" >&5
14529   (exit $ac_status); } &&
14530          { ac_try='test -s conftest.$ac_objext'
14531   { (eval echo "$as_me:14531: \"$ac_try\"") >&5
14532   (eval $ac_try) 2>&5
14533   ac_status=$?
14534   echo "$as_me:14534: \$? = $ac_status" >&5
14535   (exit $ac_status); }; }; then
14536   sigact_bad=no
14537 else
14538   echo "$as_me: failed program was:" >&5
14539 cat conftest.$ac_ext >&5
14540
14541 cat >conftest.$ac_ext <<_ACEOF
14542 #line 14542 "configure"
14543 #include "confdefs.h"
14544
14545 #define _POSIX_SOURCE
14546 #include <sys/types.h>
14547 #include <signal.h>
14548 int
14549 main ()
14550 {
14551 struct sigaction act
14552   ;
14553   return 0;
14554 }
14555 _ACEOF
14556 rm -f conftest.$ac_objext
14557 if { (eval echo "$as_me:14557: \"$ac_compile\"") >&5
14558   (eval $ac_compile) 2>&5
14559   ac_status=$?
14560   echo "$as_me:14560: \$? = $ac_status" >&5
14561   (exit $ac_status); } &&
14562          { ac_try='test -s conftest.$ac_objext'
14563   { (eval echo "$as_me:14563: \"$ac_try\"") >&5
14564   (eval $ac_try) 2>&5
14565   ac_status=$?
14566   echo "$as_me:14566: \$? = $ac_status" >&5
14567   (exit $ac_status); }; }; then
14568   sigact_bad=yes
14569          cat >>confdefs.h <<\EOF
14570 #define SVR4_ACTION 1
14571 EOF
14572
14573 else
14574   echo "$as_me: failed program was:" >&5
14575 cat conftest.$ac_ext >&5
14576 sigact_bad=unknown
14577 fi
14578 rm -f conftest.$ac_objext conftest.$ac_ext
14579 fi
14580 rm -f conftest.$ac_objext conftest.$ac_ext
14581 echo "$as_me:14581: result: $sigact_bad" >&5
14582 echo "${ECHO_T}$sigact_bad" >&6
14583 fi
14584
14585 echo "$as_me:14585: checking if nanosleep really works" >&5
14586 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14587 if test "${cf_cv_func_nanosleep+set}" = set; then
14588   echo $ECHO_N "(cached) $ECHO_C" >&6
14589 else
14590
14591 if test "$cross_compiling" = yes; then
14592   cf_cv_func_nanosleep=unknown
14593 else
14594   cat >conftest.$ac_ext <<_ACEOF
14595 #line 14595 "configure"
14596 #include "confdefs.h"
14597
14598 #include <stdio.h>
14599 #include <errno.h>
14600 #include <time.h>
14601
14602 #ifdef HAVE_SYS_TIME_H
14603 #include <sys/time.h>
14604 #endif
14605
14606 int main() {
14607         struct timespec ts1, ts2;
14608         int code;
14609         ts1.tv_sec  = 0;
14610         ts1.tv_nsec = 750000000;
14611         ts2.tv_sec  = 0;
14612         ts2.tv_nsec = 0;
14613         errno = 0;
14614         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14615         ${cf_cv_main_return:-return}(code != 0);
14616 }
14617
14618 _ACEOF
14619 rm -f conftest$ac_exeext
14620 if { (eval echo "$as_me:14620: \"$ac_link\"") >&5
14621   (eval $ac_link) 2>&5
14622   ac_status=$?
14623   echo "$as_me:14623: \$? = $ac_status" >&5
14624   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14625   { (eval echo "$as_me:14625: \"$ac_try\"") >&5
14626   (eval $ac_try) 2>&5
14627   ac_status=$?
14628   echo "$as_me:14628: \$? = $ac_status" >&5
14629   (exit $ac_status); }; }; then
14630   cf_cv_func_nanosleep=yes
14631 else
14632   echo "$as_me: program exited with status $ac_status" >&5
14633 echo "$as_me: failed program was:" >&5
14634 cat conftest.$ac_ext >&5
14635 cf_cv_func_nanosleep=no
14636 fi
14637 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14638 fi
14639 fi
14640 echo "$as_me:14640: result: $cf_cv_func_nanosleep" >&5
14641 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14642
14643 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14644 #define HAVE_NANOSLEEP 1
14645 EOF
14646
14647 for ac_header in \
14648 termio.h \
14649 termios.h \
14650 unistd.h \
14651
14652 do
14653 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14654 echo "$as_me:14654: checking for $ac_header" >&5
14655 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14656 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14657   echo $ECHO_N "(cached) $ECHO_C" >&6
14658 else
14659   cat >conftest.$ac_ext <<_ACEOF
14660 #line 14660 "configure"
14661 #include "confdefs.h"
14662 #include <$ac_header>
14663 _ACEOF
14664 if { (eval echo "$as_me:14664: \"$ac_cpp conftest.$ac_ext\"") >&5
14665   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14666   ac_status=$?
14667   egrep -v '^ *\+' conftest.er1 >conftest.err
14668   rm -f conftest.er1
14669   cat conftest.err >&5
14670   echo "$as_me:14670: \$? = $ac_status" >&5
14671   (exit $ac_status); } >/dev/null; then
14672   if test -s conftest.err; then
14673     ac_cpp_err=$ac_c_preproc_warn_flag
14674   else
14675     ac_cpp_err=
14676   fi
14677 else
14678   ac_cpp_err=yes
14679 fi
14680 if test -z "$ac_cpp_err"; then
14681   eval "$as_ac_Header=yes"
14682 else
14683   echo "$as_me: failed program was:" >&5
14684   cat conftest.$ac_ext >&5
14685   eval "$as_ac_Header=no"
14686 fi
14687 rm -f conftest.err conftest.$ac_ext
14688 fi
14689 echo "$as_me:14689: result: `eval echo '${'$as_ac_Header'}'`" >&5
14690 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14691 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14692   cat >>confdefs.h <<EOF
14693 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14694 EOF
14695
14696 fi
14697 done
14698
14699 if test "$ISC" = yes ; then
14700
14701 for ac_header in sys/termio.h
14702 do
14703 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14704 echo "$as_me:14704: checking for $ac_header" >&5
14705 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14706 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14707   echo $ECHO_N "(cached) $ECHO_C" >&6
14708 else
14709   cat >conftest.$ac_ext <<_ACEOF
14710 #line 14710 "configure"
14711 #include "confdefs.h"
14712 #include <$ac_header>
14713 _ACEOF
14714 if { (eval echo "$as_me:14714: \"$ac_cpp conftest.$ac_ext\"") >&5
14715   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14716   ac_status=$?
14717   egrep -v '^ *\+' conftest.er1 >conftest.err
14718   rm -f conftest.er1
14719   cat conftest.err >&5
14720   echo "$as_me:14720: \$? = $ac_status" >&5
14721   (exit $ac_status); } >/dev/null; then
14722   if test -s conftest.err; then
14723     ac_cpp_err=$ac_c_preproc_warn_flag
14724   else
14725     ac_cpp_err=
14726   fi
14727 else
14728   ac_cpp_err=yes
14729 fi
14730 if test -z "$ac_cpp_err"; then
14731   eval "$as_ac_Header=yes"
14732 else
14733   echo "$as_me: failed program was:" >&5
14734   cat conftest.$ac_ext >&5
14735   eval "$as_ac_Header=no"
14736 fi
14737 rm -f conftest.err conftest.$ac_ext
14738 fi
14739 echo "$as_me:14739: result: `eval echo '${'$as_ac_Header'}'`" >&5
14740 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14741 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14742   cat >>confdefs.h <<EOF
14743 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14744 EOF
14745
14746 fi
14747 done
14748
14749 fi
14750 if test "$ac_cv_header_termios_h" = yes ; then
14751         case "$CFLAGS $CPPFLAGS" in
14752         *-D_POSIX_SOURCE*)
14753                 termios_bad=dunno ;;
14754         *)      termios_bad=maybe ;;
14755         esac
14756         if test "$termios_bad" = maybe ; then
14757         echo "$as_me:14757: checking whether termios.h needs _POSIX_SOURCE" >&5
14758 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14759         cat >conftest.$ac_ext <<_ACEOF
14760 #line 14760 "configure"
14761 #include "confdefs.h"
14762 #include <termios.h>
14763 int
14764 main ()
14765 {
14766 struct termios foo; int x = foo.c_iflag
14767   ;
14768   return 0;
14769 }
14770 _ACEOF
14771 rm -f conftest.$ac_objext
14772 if { (eval echo "$as_me:14772: \"$ac_compile\"") >&5
14773   (eval $ac_compile) 2>&5
14774   ac_status=$?
14775   echo "$as_me:14775: \$? = $ac_status" >&5
14776   (exit $ac_status); } &&
14777          { ac_try='test -s conftest.$ac_objext'
14778   { (eval echo "$as_me:14778: \"$ac_try\"") >&5
14779   (eval $ac_try) 2>&5
14780   ac_status=$?
14781   echo "$as_me:14781: \$? = $ac_status" >&5
14782   (exit $ac_status); }; }; then
14783   termios_bad=no
14784 else
14785   echo "$as_me: failed program was:" >&5
14786 cat conftest.$ac_ext >&5
14787
14788                 cat >conftest.$ac_ext <<_ACEOF
14789 #line 14789 "configure"
14790 #include "confdefs.h"
14791
14792 #define _POSIX_SOURCE
14793 #include <termios.h>
14794 int
14795 main ()
14796 {
14797 struct termios foo; int x = foo.c_iflag
14798   ;
14799   return 0;
14800 }
14801 _ACEOF
14802 rm -f conftest.$ac_objext
14803 if { (eval echo "$as_me:14803: \"$ac_compile\"") >&5
14804   (eval $ac_compile) 2>&5
14805   ac_status=$?
14806   echo "$as_me:14806: \$? = $ac_status" >&5
14807   (exit $ac_status); } &&
14808          { ac_try='test -s conftest.$ac_objext'
14809   { (eval echo "$as_me:14809: \"$ac_try\"") >&5
14810   (eval $ac_try) 2>&5
14811   ac_status=$?
14812   echo "$as_me:14812: \$? = $ac_status" >&5
14813   (exit $ac_status); }; }; then
14814   termios_bad=unknown
14815 else
14816   echo "$as_me: failed program was:" >&5
14817 cat conftest.$ac_ext >&5
14818 termios_bad=yes cat >>confdefs.h <<\EOF
14819 #define SVR4_TERMIO 1
14820 EOF
14821
14822 fi
14823 rm -f conftest.$ac_objext conftest.$ac_ext
14824
14825 fi
14826 rm -f conftest.$ac_objext conftest.$ac_ext
14827         echo "$as_me:14827: result: $termios_bad" >&5
14828 echo "${ECHO_T}$termios_bad" >&6
14829         fi
14830 fi
14831
14832 echo "$as_me:14832: checking for tcgetattr" >&5
14833 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14834 if test "${cf_cv_have_tcgetattr+set}" = set; then
14835   echo $ECHO_N "(cached) $ECHO_C" >&6
14836 else
14837
14838 cat >conftest.$ac_ext <<_ACEOF
14839 #line 14839 "configure"
14840 #include "confdefs.h"
14841
14842 #include <sys/types.h>
14843 #ifdef HAVE_UNISTD_H
14844 #include <unistd.h>
14845 #endif
14846 #ifdef HAVE_TERMIOS_H
14847 #include <termios.h>
14848 #define TTY struct termios
14849 #else
14850 #ifdef HAVE_TERMIO_H
14851 #include <termio.h>
14852 #define TTY struct termio
14853 #endif
14854 #endif
14855
14856 int
14857 main ()
14858 {
14859
14860 TTY foo;
14861 tcgetattr(1, &foo);
14862   ;
14863   return 0;
14864 }
14865 _ACEOF
14866 rm -f conftest.$ac_objext conftest$ac_exeext
14867 if { (eval echo "$as_me:14867: \"$ac_link\"") >&5
14868   (eval $ac_link) 2>&5
14869   ac_status=$?
14870   echo "$as_me:14870: \$? = $ac_status" >&5
14871   (exit $ac_status); } &&
14872          { ac_try='test -s conftest$ac_exeext'
14873   { (eval echo "$as_me:14873: \"$ac_try\"") >&5
14874   (eval $ac_try) 2>&5
14875   ac_status=$?
14876   echo "$as_me:14876: \$? = $ac_status" >&5
14877   (exit $ac_status); }; }; then
14878   cf_cv_have_tcgetattr=yes
14879 else
14880   echo "$as_me: failed program was:" >&5
14881 cat conftest.$ac_ext >&5
14882 cf_cv_have_tcgetattr=no
14883 fi
14884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14885 fi
14886 echo "$as_me:14886: result: $cf_cv_have_tcgetattr" >&5
14887 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14888 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14889 #define HAVE_TCGETATTR 1
14890 EOF
14891
14892 echo "$as_me:14892: checking for vsscanf function or workaround" >&5
14893 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14894 if test "${cf_cv_func_vsscanf+set}" = set; then
14895   echo $ECHO_N "(cached) $ECHO_C" >&6
14896 else
14897
14898 cat >conftest.$ac_ext <<_ACEOF
14899 #line 14899 "configure"
14900 #include "confdefs.h"
14901
14902 #include <stdarg.h>
14903 #include <stdio.h>
14904 int
14905 main ()
14906 {
14907
14908         va_list ap;
14909         vsscanf("from", "%d", ap)
14910   ;
14911   return 0;
14912 }
14913 _ACEOF
14914 rm -f conftest.$ac_objext conftest$ac_exeext
14915 if { (eval echo "$as_me:14915: \"$ac_link\"") >&5
14916   (eval $ac_link) 2>&5
14917   ac_status=$?
14918   echo "$as_me:14918: \$? = $ac_status" >&5
14919   (exit $ac_status); } &&
14920          { ac_try='test -s conftest$ac_exeext'
14921   { (eval echo "$as_me:14921: \"$ac_try\"") >&5
14922   (eval $ac_try) 2>&5
14923   ac_status=$?
14924   echo "$as_me:14924: \$? = $ac_status" >&5
14925   (exit $ac_status); }; }; then
14926   cf_cv_func_vsscanf=vsscanf
14927 else
14928   echo "$as_me: failed program was:" >&5
14929 cat conftest.$ac_ext >&5
14930
14931 cat >conftest.$ac_ext <<_ACEOF
14932 #line 14932 "configure"
14933 #include "confdefs.h"
14934
14935 #include <stdarg.h>
14936 #include <stdio.h>
14937 int
14938 main ()
14939 {
14940
14941     FILE strbuf;
14942     char *str = "from";
14943
14944     strbuf._flag = _IOREAD;
14945     strbuf._ptr = strbuf._base = (unsigned char *) str;
14946     strbuf._cnt = strlen(str);
14947     strbuf._file = _NFILE;
14948     return (vfscanf(&strbuf, "%d", ap))
14949   ;
14950   return 0;
14951 }
14952 _ACEOF
14953 rm -f conftest.$ac_objext conftest$ac_exeext
14954 if { (eval echo "$as_me:14954: \"$ac_link\"") >&5
14955   (eval $ac_link) 2>&5
14956   ac_status=$?
14957   echo "$as_me:14957: \$? = $ac_status" >&5
14958   (exit $ac_status); } &&
14959          { ac_try='test -s conftest$ac_exeext'
14960   { (eval echo "$as_me:14960: \"$ac_try\"") >&5
14961   (eval $ac_try) 2>&5
14962   ac_status=$?
14963   echo "$as_me:14963: \$? = $ac_status" >&5
14964   (exit $ac_status); }; }; then
14965   cf_cv_func_vsscanf=vfscanf
14966 else
14967   echo "$as_me: failed program was:" >&5
14968 cat conftest.$ac_ext >&5
14969
14970 cat >conftest.$ac_ext <<_ACEOF
14971 #line 14971 "configure"
14972 #include "confdefs.h"
14973
14974 #include <stdarg.h>
14975 #include <stdio.h>
14976 int
14977 main ()
14978 {
14979
14980     FILE strbuf;
14981     char *str = "from";
14982
14983     strbuf._flag = _IOREAD;
14984     strbuf._ptr = strbuf._base = (unsigned char *) str;
14985     strbuf._cnt = strlen(str);
14986     strbuf._file = _NFILE;
14987     return (_doscan(&strbuf, "%d", ap))
14988   ;
14989   return 0;
14990 }
14991 _ACEOF
14992 rm -f conftest.$ac_objext conftest$ac_exeext
14993 if { (eval echo "$as_me:14993: \"$ac_link\"") >&5
14994   (eval $ac_link) 2>&5
14995   ac_status=$?
14996   echo "$as_me:14996: \$? = $ac_status" >&5
14997   (exit $ac_status); } &&
14998          { ac_try='test -s conftest$ac_exeext'
14999   { (eval echo "$as_me:14999: \"$ac_try\"") >&5
15000   (eval $ac_try) 2>&5
15001   ac_status=$?
15002   echo "$as_me:15002: \$? = $ac_status" >&5
15003   (exit $ac_status); }; }; then
15004   cf_cv_func_vsscanf=_doscan
15005 else
15006   echo "$as_me: failed program was:" >&5
15007 cat conftest.$ac_ext >&5
15008
15009 cf_cv_func_vsscanf=no
15010 fi
15011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15012 fi
15013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15014 fi
15015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15016 fi
15017 echo "$as_me:15017: result: $cf_cv_func_vsscanf" >&5
15018 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15019
15020 case $cf_cv_func_vsscanf in #(vi
15021 vsscanf) cat >>confdefs.h <<\EOF
15022 #define HAVE_VSSCANF 1
15023 EOF
15024 ;; #(vi
15025 vfscanf) cat >>confdefs.h <<\EOF
15026 #define HAVE_VFSCANF 1
15027 EOF
15028 ;; #(vi
15029 _doscan) cat >>confdefs.h <<\EOF
15030 #define HAVE__DOSCAN 1
15031 EOF
15032 ;;
15033 esac
15034
15035 echo "$as_me:15035: checking for working mkstemp" >&5
15036 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15037 if test "${cf_cv_func_mkstemp+set}" = set; then
15038   echo $ECHO_N "(cached) $ECHO_C" >&6
15039 else
15040
15041 rm -rf conftest*
15042 if test "$cross_compiling" = yes; then
15043   echo "$as_me:15043: checking for mkstemp" >&5
15044 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15045 if test "${ac_cv_func_mkstemp+set}" = set; then
15046   echo $ECHO_N "(cached) $ECHO_C" >&6
15047 else
15048   cat >conftest.$ac_ext <<_ACEOF
15049 #line 15049 "configure"
15050 #include "confdefs.h"
15051 /* System header to define __stub macros and hopefully few prototypes,
15052     which can conflict with char mkstemp (); below.  */
15053 #include <assert.h>
15054 /* Override any gcc2 internal prototype to avoid an error.  */
15055 #ifdef __cplusplus
15056 extern "C"
15057 #endif
15058 /* We use char because int might match the return type of a gcc2
15059    builtin and then its argument prototype would still apply.  */
15060 char mkstemp ();
15061 char (*f) ();
15062
15063 int
15064 main ()
15065 {
15066 /* The GNU C library defines this for functions which it implements
15067     to always fail with ENOSYS.  Some functions are actually named
15068     something starting with __ and the normal name is an alias.  */
15069 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15070 choke me
15071 #else
15072 f = mkstemp;
15073 #endif
15074
15075   ;
15076   return 0;
15077 }
15078 _ACEOF
15079 rm -f conftest.$ac_objext conftest$ac_exeext
15080 if { (eval echo "$as_me:15080: \"$ac_link\"") >&5
15081   (eval $ac_link) 2>&5
15082   ac_status=$?
15083   echo "$as_me:15083: \$? = $ac_status" >&5
15084   (exit $ac_status); } &&
15085          { ac_try='test -s conftest$ac_exeext'
15086   { (eval echo "$as_me:15086: \"$ac_try\"") >&5
15087   (eval $ac_try) 2>&5
15088   ac_status=$?
15089   echo "$as_me:15089: \$? = $ac_status" >&5
15090   (exit $ac_status); }; }; then
15091   ac_cv_func_mkstemp=yes
15092 else
15093   echo "$as_me: failed program was:" >&5
15094 cat conftest.$ac_ext >&5
15095 ac_cv_func_mkstemp=no
15096 fi
15097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15098 fi
15099 echo "$as_me:15099: result: $ac_cv_func_mkstemp" >&5
15100 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15101
15102 else
15103   cat >conftest.$ac_ext <<_ACEOF
15104 #line 15104 "configure"
15105 #include "confdefs.h"
15106
15107 #include <sys/types.h>
15108 #include <stdlib.h>
15109 #include <stdio.h>
15110 #include <string.h>
15111 #include <sys/stat.h>
15112 int main()
15113 {
15114         char *tmpl = "conftestXXXXXX";
15115         char name[2][80];
15116         int n;
15117         int result = 0;
15118         int fd;
15119         struct stat sb;
15120
15121         umask(077);
15122         for (n = 0; n < 2; ++n) {
15123                 strcpy(name[n], tmpl);
15124                 if ((fd = mkstemp(name[n])) >= 0) {
15125                         if (!strcmp(name[n], tmpl)
15126                          || stat(name[n], &sb) != 0
15127                          || (sb.st_mode & S_IFMT) != S_IFREG
15128                          || (sb.st_mode & 077) != 0) {
15129                                 result = 1;
15130                         }
15131                         close(fd);
15132                 }
15133         }
15134         if (result == 0
15135          && !strcmp(name[0], name[1]))
15136                 result = 1;
15137         ${cf_cv_main_return:-return}(result);
15138 }
15139
15140 _ACEOF
15141 rm -f conftest$ac_exeext
15142 if { (eval echo "$as_me:15142: \"$ac_link\"") >&5
15143   (eval $ac_link) 2>&5
15144   ac_status=$?
15145   echo "$as_me:15145: \$? = $ac_status" >&5
15146   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15147   { (eval echo "$as_me:15147: \"$ac_try\"") >&5
15148   (eval $ac_try) 2>&5
15149   ac_status=$?
15150   echo "$as_me:15150: \$? = $ac_status" >&5
15151   (exit $ac_status); }; }; then
15152   cf_cv_func_mkstemp=yes
15153
15154 else
15155   echo "$as_me: program exited with status $ac_status" >&5
15156 echo "$as_me: failed program was:" >&5
15157 cat conftest.$ac_ext >&5
15158 cf_cv_func_mkstemp=no
15159
15160 fi
15161 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15162 fi
15163
15164 fi
15165 echo "$as_me:15165: result: $cf_cv_func_mkstemp" >&5
15166 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15167 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15168         cat >>confdefs.h <<\EOF
15169 #define HAVE_MKSTEMP 1
15170 EOF
15171
15172 fi
15173
15174 # setup for prototype of fallback for vsscanf()
15175
15176 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15177         HAVE_VSSCANF=1
15178 else
15179         HAVE_VSSCANF=0
15180 fi
15181
15182 if test "$cross_compiling" = yes ; then
15183         { echo "$as_me:15183: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15184 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15185 else
15186         echo "$as_me:15186: checking whether setvbuf arguments are reversed" >&5
15187 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15188 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15189   echo $ECHO_N "(cached) $ECHO_C" >&6
15190 else
15191   if test "$cross_compiling" = yes; then
15192   { { echo "$as_me:15192: error: cannot run test program while cross compiling" >&5
15193 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15194    { (exit 1); exit 1; }; }
15195 else
15196   cat >conftest.$ac_ext <<_ACEOF
15197 #line 15197 "configure"
15198 #include "confdefs.h"
15199 #include <stdio.h>
15200 /* If setvbuf has the reversed format, exit 0. */
15201 int
15202 main ()
15203 {
15204   /* This call has the arguments reversed.
15205      A reversed system may check and see that the address of main
15206      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15207   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15208     $ac_main_return(1);
15209   putc('\r', stdout);
15210   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15211 }
15212 _ACEOF
15213 rm -f conftest$ac_exeext
15214 if { (eval echo "$as_me:15214: \"$ac_link\"") >&5
15215   (eval $ac_link) 2>&5
15216   ac_status=$?
15217   echo "$as_me:15217: \$? = $ac_status" >&5
15218   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15219   { (eval echo "$as_me:15219: \"$ac_try\"") >&5
15220   (eval $ac_try) 2>&5
15221   ac_status=$?
15222   echo "$as_me:15222: \$? = $ac_status" >&5
15223   (exit $ac_status); }; }; then
15224   ac_cv_func_setvbuf_reversed=yes
15225 else
15226   echo "$as_me: program exited with status $ac_status" >&5
15227 echo "$as_me: failed program was:" >&5
15228 cat conftest.$ac_ext >&5
15229 ac_cv_func_setvbuf_reversed=no
15230 fi
15231 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15232 fi
15233 rm -f core core.* *.core
15234 fi
15235 echo "$as_me:15235: result: $ac_cv_func_setvbuf_reversed" >&5
15236 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15237 if test $ac_cv_func_setvbuf_reversed = yes; then
15238
15239 cat >>confdefs.h <<\EOF
15240 #define SETVBUF_REVERSED 1
15241 EOF
15242
15243 fi
15244
15245 fi
15246 echo "$as_me:15246: checking return type of signal handlers" >&5
15247 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15248 if test "${ac_cv_type_signal+set}" = set; then
15249   echo $ECHO_N "(cached) $ECHO_C" >&6
15250 else
15251   cat >conftest.$ac_ext <<_ACEOF
15252 #line 15252 "configure"
15253 #include "confdefs.h"
15254 #include <sys/types.h>
15255 #include <signal.h>
15256 #ifdef signal
15257 # undef signal
15258 #endif
15259 #ifdef __cplusplus
15260 extern "C" void (*signal (int, void (*)(int)))(int);
15261 #else
15262 void (*signal ()) ();
15263 #endif
15264
15265 int
15266 main ()
15267 {
15268 int i;
15269   ;
15270   return 0;
15271 }
15272 _ACEOF
15273 rm -f conftest.$ac_objext
15274 if { (eval echo "$as_me:15274: \"$ac_compile\"") >&5
15275   (eval $ac_compile) 2>&5
15276   ac_status=$?
15277   echo "$as_me:15277: \$? = $ac_status" >&5
15278   (exit $ac_status); } &&
15279          { ac_try='test -s conftest.$ac_objext'
15280   { (eval echo "$as_me:15280: \"$ac_try\"") >&5
15281   (eval $ac_try) 2>&5
15282   ac_status=$?
15283   echo "$as_me:15283: \$? = $ac_status" >&5
15284   (exit $ac_status); }; }; then
15285   ac_cv_type_signal=void
15286 else
15287   echo "$as_me: failed program was:" >&5
15288 cat conftest.$ac_ext >&5
15289 ac_cv_type_signal=int
15290 fi
15291 rm -f conftest.$ac_objext conftest.$ac_ext
15292 fi
15293 echo "$as_me:15293: result: $ac_cv_type_signal" >&5
15294 echo "${ECHO_T}$ac_cv_type_signal" >&6
15295
15296 cat >>confdefs.h <<EOF
15297 #define RETSIGTYPE $ac_cv_type_signal
15298 EOF
15299
15300 echo "$as_me:15300: checking for type sigaction_t" >&5
15301 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15302 if test "${cf_cv_type_sigaction+set}" = set; then
15303   echo $ECHO_N "(cached) $ECHO_C" >&6
15304 else
15305
15306         cat >conftest.$ac_ext <<_ACEOF
15307 #line 15307 "configure"
15308 #include "confdefs.h"
15309
15310 #include <signal.h>
15311 int
15312 main ()
15313 {
15314 sigaction_t x
15315   ;
15316   return 0;
15317 }
15318 _ACEOF
15319 rm -f conftest.$ac_objext
15320 if { (eval echo "$as_me:15320: \"$ac_compile\"") >&5
15321   (eval $ac_compile) 2>&5
15322   ac_status=$?
15323   echo "$as_me:15323: \$? = $ac_status" >&5
15324   (exit $ac_status); } &&
15325          { ac_try='test -s conftest.$ac_objext'
15326   { (eval echo "$as_me:15326: \"$ac_try\"") >&5
15327   (eval $ac_try) 2>&5
15328   ac_status=$?
15329   echo "$as_me:15329: \$? = $ac_status" >&5
15330   (exit $ac_status); }; }; then
15331   cf_cv_type_sigaction=yes
15332 else
15333   echo "$as_me: failed program was:" >&5
15334 cat conftest.$ac_ext >&5
15335 cf_cv_type_sigaction=no
15336 fi
15337 rm -f conftest.$ac_objext conftest.$ac_ext
15338 fi
15339
15340 echo "$as_me:15340: result: $cf_cv_type_sigaction" >&5
15341 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15342 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15343 #define HAVE_TYPE_SIGACTION 1
15344 EOF
15345
15346 echo "$as_me:15346: checking declaration of size-change" >&5
15347 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15348 if test "${cf_cv_sizechange+set}" = set; then
15349   echo $ECHO_N "(cached) $ECHO_C" >&6
15350 else
15351
15352     cf_cv_sizechange=unknown
15353     cf_save_CPPFLAGS="$CPPFLAGS"
15354
15355 for cf_opts in "" "NEED_PTEM_H"
15356 do
15357
15358     CPPFLAGS="$cf_save_CPPFLAGS"
15359     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15360     cat >conftest.$ac_ext <<_ACEOF
15361 #line 15361 "configure"
15362 #include "confdefs.h"
15363 #include <sys/types.h>
15364 #ifdef HAVE_TERMIOS_H
15365 #include <termios.h>
15366 #else
15367 #ifdef HAVE_TERMIO_H
15368 #include <termio.h>
15369 #endif
15370 #endif
15371 #ifdef NEED_PTEM_H
15372 /* This is a workaround for SCO:  they neglected to define struct winsize in
15373  * termios.h -- it's only in termio.h and ptem.h
15374  */
15375 #include        <sys/stream.h>
15376 #include        <sys/ptem.h>
15377 #endif
15378 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15379 #include <sys/ioctl.h>
15380 #endif
15381
15382 int
15383 main ()
15384 {
15385
15386 #ifdef TIOCGSIZE
15387         struct ttysize win;     /* FIXME: what system is this? */
15388         int y = win.ts_lines;
15389         int x = win.ts_cols;
15390 #else
15391 #ifdef TIOCGWINSZ
15392         struct winsize win;
15393         int y = win.ws_row;
15394         int x = win.ws_col;
15395 #else
15396         no TIOCGSIZE or TIOCGWINSZ
15397 #endif /* TIOCGWINSZ */
15398 #endif /* TIOCGSIZE */
15399
15400   ;
15401   return 0;
15402 }
15403 _ACEOF
15404 rm -f conftest.$ac_objext
15405 if { (eval echo "$as_me:15405: \"$ac_compile\"") >&5
15406   (eval $ac_compile) 2>&5
15407   ac_status=$?
15408   echo "$as_me:15408: \$? = $ac_status" >&5
15409   (exit $ac_status); } &&
15410          { ac_try='test -s conftest.$ac_objext'
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   cf_cv_sizechange=yes
15417 else
15418   echo "$as_me: failed program was:" >&5
15419 cat conftest.$ac_ext >&5
15420 cf_cv_sizechange=no
15421 fi
15422 rm -f conftest.$ac_objext conftest.$ac_ext
15423
15424         CPPFLAGS="$cf_save_CPPFLAGS"
15425         if test "$cf_cv_sizechange" = yes ; then
15426                 echo "size-change succeeded ($cf_opts)" >&5
15427                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15428                 break
15429         fi
15430 done
15431
15432 fi
15433 echo "$as_me:15433: result: $cf_cv_sizechange" >&5
15434 echo "${ECHO_T}$cf_cv_sizechange" >&6
15435 if test "$cf_cv_sizechange" != no ; then
15436         cat >>confdefs.h <<\EOF
15437 #define HAVE_SIZECHANGE 1
15438 EOF
15439
15440         case $cf_cv_sizechange in #(vi
15441         NEED*)
15442                 cat >>confdefs.h <<EOF
15443 #define $cf_cv_sizechange  1
15444 EOF
15445
15446                 ;;
15447         esac
15448 fi
15449
15450 echo "$as_me:15450: checking for memmove" >&5
15451 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15452 if test "${ac_cv_func_memmove+set}" = set; then
15453   echo $ECHO_N "(cached) $ECHO_C" >&6
15454 else
15455   cat >conftest.$ac_ext <<_ACEOF
15456 #line 15456 "configure"
15457 #include "confdefs.h"
15458 /* System header to define __stub macros and hopefully few prototypes,
15459     which can conflict with char memmove (); below.  */
15460 #include <assert.h>
15461 /* Override any gcc2 internal prototype to avoid an error.  */
15462 #ifdef __cplusplus
15463 extern "C"
15464 #endif
15465 /* We use char because int might match the return type of a gcc2
15466    builtin and then its argument prototype would still apply.  */
15467 char memmove ();
15468 char (*f) ();
15469
15470 int
15471 main ()
15472 {
15473 /* The GNU C library defines this for functions which it implements
15474     to always fail with ENOSYS.  Some functions are actually named
15475     something starting with __ and the normal name is an alias.  */
15476 #if defined (__stub_memmove) || defined (__stub___memmove)
15477 choke me
15478 #else
15479 f = memmove;
15480 #endif
15481
15482   ;
15483   return 0;
15484 }
15485 _ACEOF
15486 rm -f conftest.$ac_objext conftest$ac_exeext
15487 if { (eval echo "$as_me:15487: \"$ac_link\"") >&5
15488   (eval $ac_link) 2>&5
15489   ac_status=$?
15490   echo "$as_me:15490: \$? = $ac_status" >&5
15491   (exit $ac_status); } &&
15492          { ac_try='test -s conftest$ac_exeext'
15493   { (eval echo "$as_me:15493: \"$ac_try\"") >&5
15494   (eval $ac_try) 2>&5
15495   ac_status=$?
15496   echo "$as_me:15496: \$? = $ac_status" >&5
15497   (exit $ac_status); }; }; then
15498   ac_cv_func_memmove=yes
15499 else
15500   echo "$as_me: failed program was:" >&5
15501 cat conftest.$ac_ext >&5
15502 ac_cv_func_memmove=no
15503 fi
15504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15505 fi
15506 echo "$as_me:15506: result: $ac_cv_func_memmove" >&5
15507 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15508 if test $ac_cv_func_memmove = yes; then
15509   :
15510 else
15511
15512 echo "$as_me:15512: checking for bcopy" >&5
15513 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15514 if test "${ac_cv_func_bcopy+set}" = set; then
15515   echo $ECHO_N "(cached) $ECHO_C" >&6
15516 else
15517   cat >conftest.$ac_ext <<_ACEOF
15518 #line 15518 "configure"
15519 #include "confdefs.h"
15520 /* System header to define __stub macros and hopefully few prototypes,
15521     which can conflict with char bcopy (); below.  */
15522 #include <assert.h>
15523 /* Override any gcc2 internal prototype to avoid an error.  */
15524 #ifdef __cplusplus
15525 extern "C"
15526 #endif
15527 /* We use char because int might match the return type of a gcc2
15528    builtin and then its argument prototype would still apply.  */
15529 char bcopy ();
15530 char (*f) ();
15531
15532 int
15533 main ()
15534 {
15535 /* The GNU C library defines this for functions which it implements
15536     to always fail with ENOSYS.  Some functions are actually named
15537     something starting with __ and the normal name is an alias.  */
15538 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15539 choke me
15540 #else
15541 f = bcopy;
15542 #endif
15543
15544   ;
15545   return 0;
15546 }
15547 _ACEOF
15548 rm -f conftest.$ac_objext conftest$ac_exeext
15549 if { (eval echo "$as_me:15549: \"$ac_link\"") >&5
15550   (eval $ac_link) 2>&5
15551   ac_status=$?
15552   echo "$as_me:15552: \$? = $ac_status" >&5
15553   (exit $ac_status); } &&
15554          { ac_try='test -s conftest$ac_exeext'
15555   { (eval echo "$as_me:15555: \"$ac_try\"") >&5
15556   (eval $ac_try) 2>&5
15557   ac_status=$?
15558   echo "$as_me:15558: \$? = $ac_status" >&5
15559   (exit $ac_status); }; }; then
15560   ac_cv_func_bcopy=yes
15561 else
15562   echo "$as_me: failed program was:" >&5
15563 cat conftest.$ac_ext >&5
15564 ac_cv_func_bcopy=no
15565 fi
15566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15567 fi
15568 echo "$as_me:15568: result: $ac_cv_func_bcopy" >&5
15569 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15570 if test $ac_cv_func_bcopy = yes; then
15571
15572         echo "$as_me:15572: checking if bcopy does overlapping moves" >&5
15573 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15574 if test "${cf_cv_good_bcopy+set}" = set; then
15575   echo $ECHO_N "(cached) $ECHO_C" >&6
15576 else
15577
15578                 if test "$cross_compiling" = yes; then
15579   cf_cv_good_bcopy=unknown
15580 else
15581   cat >conftest.$ac_ext <<_ACEOF
15582 #line 15582 "configure"
15583 #include "confdefs.h"
15584
15585 int main() {
15586         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15587         char temp[40];
15588         bcopy(data, temp, sizeof(data));
15589         bcopy(temp+10, temp, 15);
15590         bcopy(temp+5, temp+15, 10);
15591         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15592 }
15593
15594 _ACEOF
15595 rm -f conftest$ac_exeext
15596 if { (eval echo "$as_me:15596: \"$ac_link\"") >&5
15597   (eval $ac_link) 2>&5
15598   ac_status=$?
15599   echo "$as_me:15599: \$? = $ac_status" >&5
15600   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15601   { (eval echo "$as_me:15601: \"$ac_try\"") >&5
15602   (eval $ac_try) 2>&5
15603   ac_status=$?
15604   echo "$as_me:15604: \$? = $ac_status" >&5
15605   (exit $ac_status); }; }; then
15606   cf_cv_good_bcopy=yes
15607 else
15608   echo "$as_me: program exited with status $ac_status" >&5
15609 echo "$as_me: failed program was:" >&5
15610 cat conftest.$ac_ext >&5
15611 cf_cv_good_bcopy=no
15612 fi
15613 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15614 fi
15615
15616 fi
15617 echo "$as_me:15617: result: $cf_cv_good_bcopy" >&5
15618 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15619
15620 else
15621   cf_cv_good_bcopy=no
15622 fi
15623
15624         if test "$cf_cv_good_bcopy" = yes ; then
15625                 cat >>confdefs.h <<\EOF
15626 #define USE_OK_BCOPY 1
15627 EOF
15628
15629         else
15630                 cat >>confdefs.h <<\EOF
15631 #define USE_MY_MEMMOVE 1
15632 EOF
15633
15634         fi
15635
15636 fi
15637
15638 echo "$as_me:15638: checking if poll really works" >&5
15639 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15640 if test "${cf_cv_working_poll+set}" = set; then
15641   echo $ECHO_N "(cached) $ECHO_C" >&6
15642 else
15643
15644 if test "$cross_compiling" = yes; then
15645   cf_cv_working_poll=unknown
15646 else
15647   cat >conftest.$ac_ext <<_ACEOF
15648 #line 15648 "configure"
15649 #include "confdefs.h"
15650
15651 #include <stdio.h>
15652 #ifdef HAVE_POLL_H
15653 #include <poll.h>
15654 #else
15655 #include <sys/poll.h>
15656 #endif
15657 int main() {
15658         struct pollfd myfds;
15659         int ret;
15660
15661         myfds.fd = 0;
15662         myfds.events = POLLIN;
15663
15664         ret = poll(&myfds, 1, 100);
15665         ${cf_cv_main_return:-return}(ret != 0);
15666 }
15667 _ACEOF
15668 rm -f conftest$ac_exeext
15669 if { (eval echo "$as_me:15669: \"$ac_link\"") >&5
15670   (eval $ac_link) 2>&5
15671   ac_status=$?
15672   echo "$as_me:15672: \$? = $ac_status" >&5
15673   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15674   { (eval echo "$as_me:15674: \"$ac_try\"") >&5
15675   (eval $ac_try) 2>&5
15676   ac_status=$?
15677   echo "$as_me:15677: \$? = $ac_status" >&5
15678   (exit $ac_status); }; }; then
15679   cf_cv_working_poll=yes
15680 else
15681   echo "$as_me: program exited with status $ac_status" >&5
15682 echo "$as_me: failed program was:" >&5
15683 cat conftest.$ac_ext >&5
15684 cf_cv_working_poll=no
15685 fi
15686 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15687 fi
15688 fi
15689 echo "$as_me:15689: result: $cf_cv_working_poll" >&5
15690 echo "${ECHO_T}$cf_cv_working_poll" >&6
15691 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15692 #define HAVE_WORKING_POLL 1
15693 EOF
15694
15695 echo "$as_me:15695: checking for va_copy" >&5
15696 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15697 if test "${cf_cv_have_va_copy+set}" = set; then
15698   echo $ECHO_N "(cached) $ECHO_C" >&6
15699 else
15700
15701 cat >conftest.$ac_ext <<_ACEOF
15702 #line 15702 "configure"
15703 #include "confdefs.h"
15704
15705 #include <stdarg.h>
15706
15707 int
15708 main ()
15709 {
15710
15711         static va_list dst;
15712         static va_list src;
15713         va_copy(dst, src)
15714   ;
15715   return 0;
15716 }
15717 _ACEOF
15718 rm -f conftest.$ac_objext conftest$ac_exeext
15719 if { (eval echo "$as_me:15719: \"$ac_link\"") >&5
15720   (eval $ac_link) 2>&5
15721   ac_status=$?
15722   echo "$as_me:15722: \$? = $ac_status" >&5
15723   (exit $ac_status); } &&
15724          { ac_try='test -s conftest$ac_exeext'
15725   { (eval echo "$as_me:15725: \"$ac_try\"") >&5
15726   (eval $ac_try) 2>&5
15727   ac_status=$?
15728   echo "$as_me:15728: \$? = $ac_status" >&5
15729   (exit $ac_status); }; }; then
15730   cf_cv_have_va_copy=yes
15731 else
15732   echo "$as_me: failed program was:" >&5
15733 cat conftest.$ac_ext >&5
15734 cf_cv_have_va_copy=no
15735 fi
15736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15737 fi
15738 echo "$as_me:15738: result: $cf_cv_have_va_copy" >&5
15739 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15740
15741 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15742 #define HAVE_VA_COPY 1
15743 EOF
15744
15745 echo "$as_me:15745: checking for __va_copy" >&5
15746 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15747 if test "${cf_cv_have___va_copy+set}" = set; then
15748   echo $ECHO_N "(cached) $ECHO_C" >&6
15749 else
15750
15751 cat >conftest.$ac_ext <<_ACEOF
15752 #line 15752 "configure"
15753 #include "confdefs.h"
15754
15755 #include <stdarg.h>
15756
15757 int
15758 main ()
15759 {
15760
15761         static va_list dst;
15762         static va_list src;
15763         __va_copy(dst, src)
15764   ;
15765   return 0;
15766 }
15767 _ACEOF
15768 rm -f conftest.$ac_objext conftest$ac_exeext
15769 if { (eval echo "$as_me:15769: \"$ac_link\"") >&5
15770   (eval $ac_link) 2>&5
15771   ac_status=$?
15772   echo "$as_me:15772: \$? = $ac_status" >&5
15773   (exit $ac_status); } &&
15774          { ac_try='test -s conftest$ac_exeext'
15775   { (eval echo "$as_me:15775: \"$ac_try\"") >&5
15776   (eval $ac_try) 2>&5
15777   ac_status=$?
15778   echo "$as_me:15778: \$? = $ac_status" >&5
15779   (exit $ac_status); }; }; then
15780   cf_cv_have___va_copy=yes
15781 else
15782   echo "$as_me: failed program was:" >&5
15783 cat conftest.$ac_ext >&5
15784 cf_cv_have___va_copy=no
15785 fi
15786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15787 fi
15788 echo "$as_me:15788: result: $cf_cv_have___va_copy" >&5
15789 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15790
15791 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15792 #define HAVE___VA_COPY 1
15793 EOF
15794
15795 echo "$as_me:15795: checking for pid_t" >&5
15796 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15797 if test "${ac_cv_type_pid_t+set}" = set; then
15798   echo $ECHO_N "(cached) $ECHO_C" >&6
15799 else
15800   cat >conftest.$ac_ext <<_ACEOF
15801 #line 15801 "configure"
15802 #include "confdefs.h"
15803 $ac_includes_default
15804 int
15805 main ()
15806 {
15807 if ((pid_t *) 0)
15808   return 0;
15809 if (sizeof (pid_t))
15810   return 0;
15811   ;
15812   return 0;
15813 }
15814 _ACEOF
15815 rm -f conftest.$ac_objext
15816 if { (eval echo "$as_me:15816: \"$ac_compile\"") >&5
15817   (eval $ac_compile) 2>&5
15818   ac_status=$?
15819   echo "$as_me:15819: \$? = $ac_status" >&5
15820   (exit $ac_status); } &&
15821          { ac_try='test -s conftest.$ac_objext'
15822   { (eval echo "$as_me:15822: \"$ac_try\"") >&5
15823   (eval $ac_try) 2>&5
15824   ac_status=$?
15825   echo "$as_me:15825: \$? = $ac_status" >&5
15826   (exit $ac_status); }; }; then
15827   ac_cv_type_pid_t=yes
15828 else
15829   echo "$as_me: failed program was:" >&5
15830 cat conftest.$ac_ext >&5
15831 ac_cv_type_pid_t=no
15832 fi
15833 rm -f conftest.$ac_objext conftest.$ac_ext
15834 fi
15835 echo "$as_me:15835: result: $ac_cv_type_pid_t" >&5
15836 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15837 if test $ac_cv_type_pid_t = yes; then
15838   :
15839 else
15840
15841 cat >>confdefs.h <<EOF
15842 #define pid_t int
15843 EOF
15844
15845 fi
15846
15847 for ac_header in unistd.h vfork.h
15848 do
15849 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15850 echo "$as_me:15850: checking for $ac_header" >&5
15851 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15852 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15853   echo $ECHO_N "(cached) $ECHO_C" >&6
15854 else
15855   cat >conftest.$ac_ext <<_ACEOF
15856 #line 15856 "configure"
15857 #include "confdefs.h"
15858 #include <$ac_header>
15859 _ACEOF
15860 if { (eval echo "$as_me:15860: \"$ac_cpp conftest.$ac_ext\"") >&5
15861   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15862   ac_status=$?
15863   egrep -v '^ *\+' conftest.er1 >conftest.err
15864   rm -f conftest.er1
15865   cat conftest.err >&5
15866   echo "$as_me:15866: \$? = $ac_status" >&5
15867   (exit $ac_status); } >/dev/null; then
15868   if test -s conftest.err; then
15869     ac_cpp_err=$ac_c_preproc_warn_flag
15870   else
15871     ac_cpp_err=
15872   fi
15873 else
15874   ac_cpp_err=yes
15875 fi
15876 if test -z "$ac_cpp_err"; then
15877   eval "$as_ac_Header=yes"
15878 else
15879   echo "$as_me: failed program was:" >&5
15880   cat conftest.$ac_ext >&5
15881   eval "$as_ac_Header=no"
15882 fi
15883 rm -f conftest.err conftest.$ac_ext
15884 fi
15885 echo "$as_me:15885: result: `eval echo '${'$as_ac_Header'}'`" >&5
15886 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15887 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15888   cat >>confdefs.h <<EOF
15889 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15890 EOF
15891
15892 fi
15893 done
15894
15895 for ac_func in fork vfork
15896 do
15897 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15898 echo "$as_me:15898: checking for $ac_func" >&5
15899 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15900 if eval "test \"\${$as_ac_var+set}\" = set"; then
15901   echo $ECHO_N "(cached) $ECHO_C" >&6
15902 else
15903   cat >conftest.$ac_ext <<_ACEOF
15904 #line 15904 "configure"
15905 #include "confdefs.h"
15906 /* System header to define __stub macros and hopefully few prototypes,
15907     which can conflict with char $ac_func (); below.  */
15908 #include <assert.h>
15909 /* Override any gcc2 internal prototype to avoid an error.  */
15910 #ifdef __cplusplus
15911 extern "C"
15912 #endif
15913 /* We use char because int might match the return type of a gcc2
15914    builtin and then its argument prototype would still apply.  */
15915 char $ac_func ();
15916 char (*f) ();
15917
15918 int
15919 main ()
15920 {
15921 /* The GNU C library defines this for functions which it implements
15922     to always fail with ENOSYS.  Some functions are actually named
15923     something starting with __ and the normal name is an alias.  */
15924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15925 choke me
15926 #else
15927 f = $ac_func;
15928 #endif
15929
15930   ;
15931   return 0;
15932 }
15933 _ACEOF
15934 rm -f conftest.$ac_objext conftest$ac_exeext
15935 if { (eval echo "$as_me:15935: \"$ac_link\"") >&5
15936   (eval $ac_link) 2>&5
15937   ac_status=$?
15938   echo "$as_me:15938: \$? = $ac_status" >&5
15939   (exit $ac_status); } &&
15940          { ac_try='test -s conftest$ac_exeext'
15941   { (eval echo "$as_me:15941: \"$ac_try\"") >&5
15942   (eval $ac_try) 2>&5
15943   ac_status=$?
15944   echo "$as_me:15944: \$? = $ac_status" >&5
15945   (exit $ac_status); }; }; then
15946   eval "$as_ac_var=yes"
15947 else
15948   echo "$as_me: failed program was:" >&5
15949 cat conftest.$ac_ext >&5
15950 eval "$as_ac_var=no"
15951 fi
15952 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15953 fi
15954 echo "$as_me:15954: result: `eval echo '${'$as_ac_var'}'`" >&5
15955 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15956 if test `eval echo '${'$as_ac_var'}'` = yes; then
15957   cat >>confdefs.h <<EOF
15958 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15959 EOF
15960
15961 fi
15962 done
15963
15964 ac_cv_func_fork_works=$ac_cv_func_fork
15965 if test "x$ac_cv_func_fork" = xyes; then
15966   echo "$as_me:15966: checking for working fork" >&5
15967 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15968 if test "${ac_cv_func_fork_works+set}" = set; then
15969   echo $ECHO_N "(cached) $ECHO_C" >&6
15970 else
15971   if test "$cross_compiling" = yes; then
15972   ac_cv_func_fork_works=cross
15973 else
15974   cat >conftest.$ac_ext <<_ACEOF
15975 /* By Rüdiger Kuhlmann. */
15976       #include <sys/types.h>
15977       #if HAVE_UNISTD_H
15978       # include <unistd.h>
15979       #endif
15980       /* Some systems only have a dummy stub for fork() */
15981       int main ()
15982       {
15983         if (fork() < 0)
15984           $ac_main_return (1);
15985         $ac_main_return (0);
15986       }
15987 _ACEOF
15988 rm -f conftest$ac_exeext
15989 if { (eval echo "$as_me:15989: \"$ac_link\"") >&5
15990   (eval $ac_link) 2>&5
15991   ac_status=$?
15992   echo "$as_me:15992: \$? = $ac_status" >&5
15993   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15994   { (eval echo "$as_me:15994: \"$ac_try\"") >&5
15995   (eval $ac_try) 2>&5
15996   ac_status=$?
15997   echo "$as_me:15997: \$? = $ac_status" >&5
15998   (exit $ac_status); }; }; then
15999   ac_cv_func_fork_works=yes
16000 else
16001   echo "$as_me: program exited with status $ac_status" >&5
16002 echo "$as_me: failed program was:" >&5
16003 cat conftest.$ac_ext >&5
16004 ac_cv_func_fork_works=no
16005 fi
16006 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16007 fi
16008 fi
16009 echo "$as_me:16009: result: $ac_cv_func_fork_works" >&5
16010 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16011
16012 fi
16013 if test "x$ac_cv_func_fork_works" = xcross; then
16014   case $host in
16015     *-*-amigaos* | *-*-msdosdjgpp*)
16016       # Override, as these systems have only a dummy fork() stub
16017       ac_cv_func_fork_works=no
16018       ;;
16019     *)
16020       ac_cv_func_fork_works=yes
16021       ;;
16022   esac
16023   { echo "$as_me:16023: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16024 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16025 fi
16026 ac_cv_func_vfork_works=$ac_cv_func_vfork
16027 if test "x$ac_cv_func_vfork" = xyes; then
16028   echo "$as_me:16028: checking for working vfork" >&5
16029 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16030 if test "${ac_cv_func_vfork_works+set}" = set; then
16031   echo $ECHO_N "(cached) $ECHO_C" >&6
16032 else
16033   if test "$cross_compiling" = yes; then
16034   ac_cv_func_vfork_works=cross
16035 else
16036   cat >conftest.$ac_ext <<_ACEOF
16037 #line 16037 "configure"
16038 #include "confdefs.h"
16039 /* Thanks to Paul Eggert for this test.  */
16040 #include <stdio.h>
16041 #include <sys/types.h>
16042 #include <sys/stat.h>
16043 #if HAVE_UNISTD_H
16044 # include <unistd.h>
16045 #endif
16046 #if HAVE_VFORK_H
16047 # include <vfork.h>
16048 #endif
16049 /* On some sparc systems, changes by the child to local and incoming
16050    argument registers are propagated back to the parent.  The compiler
16051    is told about this with #include <vfork.h>, but some compilers
16052    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16053    static variable whose address is put into a register that is
16054    clobbered by the vfork.  */
16055 static
16056 #ifdef __cplusplus
16057 sparc_address_test (int arg)
16058 # else
16059 sparc_address_test (arg) int arg;
16060 #endif
16061 {
16062   static pid_t child;
16063   if (!child) {
16064     child = vfork ();
16065     if (child < 0) {
16066       perror ("vfork");
16067       _exit(2);
16068     }
16069     if (!child) {
16070       arg = getpid();
16071       write(-1, "", 0);
16072       _exit (arg);
16073     }
16074   }
16075 }
16076
16077 int
16078 main ()
16079 {
16080   pid_t parent = getpid ();
16081   pid_t child;
16082
16083   sparc_address_test ();
16084
16085   child = vfork ();
16086
16087   if (child == 0) {
16088     /* Here is another test for sparc vfork register problems.  This
16089        test uses lots of local variables, at least as many local
16090        variables as main has allocated so far including compiler
16091        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16092        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16093        reuse the register of parent for one of the local variables,
16094        since it will think that parent can't possibly be used any more
16095        in this routine.  Assigning to the local variable will thus
16096        munge parent in the parent process.  */
16097     pid_t
16098       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16099       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16100     /* Convince the compiler that p..p7 are live; otherwise, it might
16101        use the same hardware register for all 8 local variables.  */
16102     if (p != p1 || p != p2 || p != p3 || p != p4
16103         || p != p5 || p != p6 || p != p7)
16104       _exit(1);
16105
16106     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16107        from child file descriptors.  If the child closes a descriptor
16108        before it execs or exits, this munges the parent's descriptor
16109        as well.  Test for this by closing stdout in the child.  */
16110     _exit(close(fileno(stdout)) != 0);
16111   } else {
16112     int status;
16113     struct stat st;
16114
16115     while (wait(&status) != child)
16116       ;
16117     $ac_main_return(
16118          /* Was there some problem with vforking?  */
16119          child < 0
16120
16121          /* Did the child fail?  (This shouldn't happen.)  */
16122          || status
16123
16124          /* Did the vfork/compiler bug occur?  */
16125          || parent != getpid()
16126
16127          /* Did the file descriptor bug occur?  */
16128          || fstat(fileno(stdout), &st) != 0
16129          );
16130   }
16131 }
16132 _ACEOF
16133 rm -f conftest$ac_exeext
16134 if { (eval echo "$as_me:16134: \"$ac_link\"") >&5
16135   (eval $ac_link) 2>&5
16136   ac_status=$?
16137   echo "$as_me:16137: \$? = $ac_status" >&5
16138   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16139   { (eval echo "$as_me:16139: \"$ac_try\"") >&5
16140   (eval $ac_try) 2>&5
16141   ac_status=$?
16142   echo "$as_me:16142: \$? = $ac_status" >&5
16143   (exit $ac_status); }; }; then
16144   ac_cv_func_vfork_works=yes
16145 else
16146   echo "$as_me: program exited with status $ac_status" >&5
16147 echo "$as_me: failed program was:" >&5
16148 cat conftest.$ac_ext >&5
16149 ac_cv_func_vfork_works=no
16150 fi
16151 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16152 fi
16153 fi
16154 echo "$as_me:16154: result: $ac_cv_func_vfork_works" >&5
16155 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16156
16157 fi;
16158 if test "x$ac_cv_func_fork_works" = xcross; then
16159   ac_cv_func_vfork_works=ac_cv_func_vfork
16160   { echo "$as_me:16160: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16161 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16162 fi
16163
16164 if test "x$ac_cv_func_vfork_works" = xyes; then
16165
16166 cat >>confdefs.h <<\EOF
16167 #define HAVE_WORKING_VFORK 1
16168 EOF
16169
16170 else
16171
16172 cat >>confdefs.h <<\EOF
16173 #define vfork fork
16174 EOF
16175
16176 fi
16177 if test "x$ac_cv_func_fork_works" = xyes; then
16178
16179 cat >>confdefs.h <<\EOF
16180 #define HAVE_WORKING_FORK 1
16181 EOF
16182
16183 fi
16184
16185 # special check for test/ditto.c
16186
16187 echo "$as_me:16187: checking for openpty in -lutil" >&5
16188 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16189 if test "${ac_cv_lib_util_openpty+set}" = set; then
16190   echo $ECHO_N "(cached) $ECHO_C" >&6
16191 else
16192   ac_check_lib_save_LIBS=$LIBS
16193 LIBS="-lutil  $LIBS"
16194 cat >conftest.$ac_ext <<_ACEOF
16195 #line 16195 "configure"
16196 #include "confdefs.h"
16197
16198 /* Override any gcc2 internal prototype to avoid an error.  */
16199 #ifdef __cplusplus
16200 extern "C"
16201 #endif
16202 /* We use char because int might match the return type of a gcc2
16203    builtin and then its argument prototype would still apply.  */
16204 char openpty ();
16205 int
16206 main ()
16207 {
16208 openpty ();
16209   ;
16210   return 0;
16211 }
16212 _ACEOF
16213 rm -f conftest.$ac_objext conftest$ac_exeext
16214 if { (eval echo "$as_me:16214: \"$ac_link\"") >&5
16215   (eval $ac_link) 2>&5
16216   ac_status=$?
16217   echo "$as_me:16217: \$? = $ac_status" >&5
16218   (exit $ac_status); } &&
16219          { ac_try='test -s conftest$ac_exeext'
16220   { (eval echo "$as_me:16220: \"$ac_try\"") >&5
16221   (eval $ac_try) 2>&5
16222   ac_status=$?
16223   echo "$as_me:16223: \$? = $ac_status" >&5
16224   (exit $ac_status); }; }; then
16225   ac_cv_lib_util_openpty=yes
16226 else
16227   echo "$as_me: failed program was:" >&5
16228 cat conftest.$ac_ext >&5
16229 ac_cv_lib_util_openpty=no
16230 fi
16231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16232 LIBS=$ac_check_lib_save_LIBS
16233 fi
16234 echo "$as_me:16234: result: $ac_cv_lib_util_openpty" >&5
16235 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16236 if test $ac_cv_lib_util_openpty = yes; then
16237   cf_cv_lib_util=yes
16238 else
16239   cf_cv_lib_util=no
16240 fi
16241
16242 echo "$as_me:16242: checking for openpty header" >&5
16243 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16244 if test "${cf_cv_func_openpty+set}" = set; then
16245   echo $ECHO_N "(cached) $ECHO_C" >&6
16246 else
16247
16248     cf_save_LIBS="$LIBS"
16249     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16250     for cf_header in pty.h libutil.h util.h
16251     do
16252     cat >conftest.$ac_ext <<_ACEOF
16253 #line 16253 "configure"
16254 #include "confdefs.h"
16255
16256 #include <$cf_header>
16257
16258 int
16259 main ()
16260 {
16261
16262     int x = openpty((int *)0, (int *)0, (char *)0,
16263                    (struct termios *)0, (struct winsize *)0);
16264
16265   ;
16266   return 0;
16267 }
16268 _ACEOF
16269 rm -f conftest.$ac_objext conftest$ac_exeext
16270 if { (eval echo "$as_me:16270: \"$ac_link\"") >&5
16271   (eval $ac_link) 2>&5
16272   ac_status=$?
16273   echo "$as_me:16273: \$? = $ac_status" >&5
16274   (exit $ac_status); } &&
16275          { ac_try='test -s conftest$ac_exeext'
16276   { (eval echo "$as_me:16276: \"$ac_try\"") >&5
16277   (eval $ac_try) 2>&5
16278   ac_status=$?
16279   echo "$as_me:16279: \$? = $ac_status" >&5
16280   (exit $ac_status); }; }; then
16281
16282         cf_cv_func_openpty=$cf_header
16283         break
16284
16285 else
16286   echo "$as_me: failed program was:" >&5
16287 cat conftest.$ac_ext >&5
16288
16289         cf_cv_func_openpty=no
16290
16291 fi
16292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16293     done
16294     LIBS="$cf_save_LIBS"
16295
16296 fi
16297 echo "$as_me:16297: result: $cf_cv_func_openpty" >&5
16298 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16299
16300 if test "$cf_cv_func_openpty" != no ; then
16301     cat >>confdefs.h <<EOF
16302 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16303 EOF
16304
16305     cat >>confdefs.h <<\EOF
16306 #define USE_XTERM_PTY 1
16307 EOF
16308
16309     if test "$cf_cv_lib_util" = yes ; then
16310         TEST_LIBS="-lutil $TEST_LIBS"
16311     fi
16312 fi
16313
16314 if test "$with_hashed_db" != no ; then
16315         cat >>confdefs.h <<\EOF
16316 #define USE_HASHED_DB 1
16317 EOF
16318
16319 case $with_hashed_db in #(vi
16320 yes|*able*) #(vi
16321     ;;
16322 *)
16323     if test -d "$with_hashed_db" ; then
16324
16325 if test -n "$with_hashed_db/include" ; then
16326   for cf_add_incdir in $with_hashed_db/include
16327   do
16328         while test $cf_add_incdir != /usr/include
16329         do
16330           if test -d $cf_add_incdir
16331           then
16332                 cf_have_incdir=no
16333                 if test -n "$CFLAGS$CPPFLAGS" ; then
16334                   # a loop is needed to ensure we can add subdirs of existing dirs
16335                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16336                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16337                           cf_have_incdir=yes; break
16338                         fi
16339                   done
16340                 fi
16341
16342                 if test "$cf_have_incdir" = no ; then
16343                   if test "$cf_add_incdir" = /usr/local/include ; then
16344                         if test "$GCC" = yes
16345                         then
16346                           cf_save_CPPFLAGS=$CPPFLAGS
16347                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16348                           cat >conftest.$ac_ext <<_ACEOF
16349 #line 16349 "configure"
16350 #include "confdefs.h"
16351 #include <stdio.h>
16352 int
16353 main ()
16354 {
16355 printf("Hello")
16356   ;
16357   return 0;
16358 }
16359 _ACEOF
16360 rm -f conftest.$ac_objext
16361 if { (eval echo "$as_me:16361: \"$ac_compile\"") >&5
16362   (eval $ac_compile) 2>&5
16363   ac_status=$?
16364   echo "$as_me:16364: \$? = $ac_status" >&5
16365   (exit $ac_status); } &&
16366          { ac_try='test -s conftest.$ac_objext'
16367   { (eval echo "$as_me:16367: \"$ac_try\"") >&5
16368   (eval $ac_try) 2>&5
16369   ac_status=$?
16370   echo "$as_me:16370: \$? = $ac_status" >&5
16371   (exit $ac_status); }; }; then
16372   :
16373 else
16374   echo "$as_me: failed program was:" >&5
16375 cat conftest.$ac_ext >&5
16376 cf_have_incdir=yes
16377 fi
16378 rm -f conftest.$ac_objext conftest.$ac_ext
16379                           CPPFLAGS=$cf_save_CPPFLAGS
16380                         fi
16381                   fi
16382                 fi
16383
16384                 if test "$cf_have_incdir" = no ; then
16385                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16386
16387 echo "${as_me:-configure}:16387: testing adding $cf_add_incdir to include-path ..." 1>&5
16388
16389                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16390
16391                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16392                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16393                   cf_add_incdir="$cf_top_incdir"
16394                 else
16395                   break
16396                 fi
16397           fi
16398         done
16399   done
16400 fi
16401
16402 if test -n "$with_hashed_db/lib" ; then
16403   for cf_add_libdir in $with_hashed_db/lib
16404   do
16405     if test $cf_add_libdir = /usr/lib ; then
16406       :
16407     elif test -d $cf_add_libdir
16408     then
16409       cf_have_libdir=no
16410       if test -n "$LDFLAGS$LIBS" ; then
16411         # a loop is needed to ensure we can add subdirs of existing dirs
16412         for cf_test_libdir in $LDFLAGS $LIBS ; do
16413           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16414             cf_have_libdir=yes; break
16415           fi
16416         done
16417       fi
16418       if test "$cf_have_libdir" = no ; then
16419         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16420
16421 echo "${as_me:-configure}:16421: testing adding $cf_add_libdir to library-path ..." 1>&5
16422
16423         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16424       fi
16425     fi
16426   done
16427 fi
16428
16429     fi
16430 esac
16431
16432 echo "$as_me:16432: checking for db.h" >&5
16433 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16434 if test "${ac_cv_header_db_h+set}" = set; then
16435   echo $ECHO_N "(cached) $ECHO_C" >&6
16436 else
16437   cat >conftest.$ac_ext <<_ACEOF
16438 #line 16438 "configure"
16439 #include "confdefs.h"
16440 #include <db.h>
16441 _ACEOF
16442 if { (eval echo "$as_me:16442: \"$ac_cpp conftest.$ac_ext\"") >&5
16443   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16444   ac_status=$?
16445   egrep -v '^ *\+' conftest.er1 >conftest.err
16446   rm -f conftest.er1
16447   cat conftest.err >&5
16448   echo "$as_me:16448: \$? = $ac_status" >&5
16449   (exit $ac_status); } >/dev/null; then
16450   if test -s conftest.err; then
16451     ac_cpp_err=$ac_c_preproc_warn_flag
16452   else
16453     ac_cpp_err=
16454   fi
16455 else
16456   ac_cpp_err=yes
16457 fi
16458 if test -z "$ac_cpp_err"; then
16459   ac_cv_header_db_h=yes
16460 else
16461   echo "$as_me: failed program was:" >&5
16462   cat conftest.$ac_ext >&5
16463   ac_cv_header_db_h=no
16464 fi
16465 rm -f conftest.err conftest.$ac_ext
16466 fi
16467 echo "$as_me:16467: result: $ac_cv_header_db_h" >&5
16468 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16469 if test $ac_cv_header_db_h = yes; then
16470
16471 echo "$as_me:16471: checking for version of db" >&5
16472 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16473 if test "${cf_cv_hashed_db_version+set}" = set; then
16474   echo $ECHO_N "(cached) $ECHO_C" >&6
16475 else
16476
16477 cf_cv_hashed_db_version=unknown
16478
16479 for cf_db_version in 1 2 3 4 5
16480 do
16481
16482 echo "${as_me:-configure}:16482: testing checking for db version $cf_db_version ..." 1>&5
16483
16484         cat >conftest.$ac_ext <<_ACEOF
16485 #line 16485 "configure"
16486 #include "confdefs.h"
16487
16488 $ac_includes_default
16489 #include <db.h>
16490
16491 #ifdef DB_VERSION_MAJOR
16492         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16493 #if $cf_db_version == DB_VERSION_MAJOR
16494         /* ok */
16495 #else
16496         make an error
16497 #endif
16498 #else
16499 #if $cf_db_version == 1
16500         /* ok: assuming this is DB 1.8.5 */
16501 #else
16502         make an error
16503 #endif
16504 #endif
16505
16506 int
16507 main ()
16508 {
16509 DBT *foo = 0
16510   ;
16511   return 0;
16512 }
16513 _ACEOF
16514 rm -f conftest.$ac_objext
16515 if { (eval echo "$as_me:16515: \"$ac_compile\"") >&5
16516   (eval $ac_compile) 2>&5
16517   ac_status=$?
16518   echo "$as_me:16518: \$? = $ac_status" >&5
16519   (exit $ac_status); } &&
16520          { ac_try='test -s conftest.$ac_objext'
16521   { (eval echo "$as_me:16521: \"$ac_try\"") >&5
16522   (eval $ac_try) 2>&5
16523   ac_status=$?
16524   echo "$as_me:16524: \$? = $ac_status" >&5
16525   (exit $ac_status); }; }; then
16526
16527         cf_cv_hashed_db_version=$cf_db_version
16528         break
16529
16530 else
16531   echo "$as_me: failed program was:" >&5
16532 cat conftest.$ac_ext >&5
16533 fi
16534 rm -f conftest.$ac_objext conftest.$ac_ext
16535 done
16536
16537 fi
16538 echo "$as_me:16538: result: $cf_cv_hashed_db_version" >&5
16539 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16540
16541 if test "$cf_cv_hashed_db_version" = unknown ; then
16542         { { echo "$as_me:16542: error: Cannot determine version of db" >&5
16543 echo "$as_me: error: Cannot determine version of db" >&2;}
16544    { (exit 1); exit 1; }; }
16545 else
16546
16547 echo "$as_me:16547: checking for db libraries" >&5
16548 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16549 if test "${cf_cv_hashed_db_libs+set}" = set; then
16550   echo $ECHO_N "(cached) $ECHO_C" >&6
16551 else
16552
16553 cf_cv_hashed_db_libs=unknown
16554 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16555 do
16556         cf_save_libs="$LIBS"
16557         if test -n "$cf_db_libs"; then
16558                 LIBS="-l$cf_db_libs $LIBS"
16559         fi
16560
16561 echo "${as_me:-configure}:16561: testing checking for library "$cf_db_libs" ..." 1>&5
16562
16563         cat >conftest.$ac_ext <<_ACEOF
16564 #line 16564 "configure"
16565 #include "confdefs.h"
16566
16567 $ac_includes_default
16568 #include <db.h>
16569
16570 int
16571 main ()
16572 {
16573
16574         char *path = "/tmp/foo";
16575 #ifdef DB_VERSION_MAJOR
16576 #if DB_VERSION_MAJOR >= 4
16577         DB *result = 0;
16578         db_create(&result, NULL, 0);
16579         result->open(result,
16580                 NULL,
16581                 path,
16582                 path,
16583                 DB_HASH,
16584                 DB_CREATE,
16585                 0644);
16586 #elif DB_VERSION_MAJOR >= 3
16587         DB *result = 0;
16588         db_create(&result, NULL, 0);
16589         result->open(result,
16590                 path,
16591                 path,
16592                 DB_HASH,
16593                 DB_CREATE,
16594                 0644);
16595 #elif DB_VERSION_MAJOR >= 2
16596         DB *result = 0;
16597         db_open(path,
16598                 DB_HASH,
16599                 DB_CREATE,
16600                 0644,
16601                 (DB_ENV *) 0,
16602                 (DB_INFO *) 0,
16603                 &result);
16604 #endif /* DB_VERSION_MAJOR */
16605 #else
16606         DB *result = dbopen(path,
16607                      2,
16608                      0644,
16609                      DB_HASH,
16610                      0);
16611 #endif
16612         ${cf_cv_main_return:-return}(result != 0)
16613
16614   ;
16615   return 0;
16616 }
16617 _ACEOF
16618 rm -f conftest.$ac_objext conftest$ac_exeext
16619 if { (eval echo "$as_me:16619: \"$ac_link\"") >&5
16620   (eval $ac_link) 2>&5
16621   ac_status=$?
16622   echo "$as_me:16622: \$? = $ac_status" >&5
16623   (exit $ac_status); } &&
16624          { ac_try='test -s conftest$ac_exeext'
16625   { (eval echo "$as_me:16625: \"$ac_try\"") >&5
16626   (eval $ac_try) 2>&5
16627   ac_status=$?
16628   echo "$as_me:16628: \$? = $ac_status" >&5
16629   (exit $ac_status); }; }; then
16630
16631         if test -n "$cf_db_libs" ; then
16632                 cf_cv_hashed_db_libs=$cf_db_libs
16633         else
16634                 cf_cv_hashed_db_libs=default
16635         fi
16636         LIBS="$cf_save_libs"
16637         break
16638
16639 else
16640   echo "$as_me: failed program was:" >&5
16641 cat conftest.$ac_ext >&5
16642 fi
16643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16644         LIBS="$cf_save_libs"
16645 done
16646
16647 fi
16648 echo "$as_me:16648: result: $cf_cv_hashed_db_libs" >&5
16649 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16650
16651         if test "$cf_cv_hashed_db_libs" = unknown ; then
16652                 { { echo "$as_me:16652: error: Cannot determine library for db" >&5
16653 echo "$as_me: error: Cannot determine library for db" >&2;}
16654    { (exit 1); exit 1; }; }
16655         elif test "$cf_cv_hashed_db_libs" != default ; then
16656                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16657         fi
16658 fi
16659
16660 else
16661
16662         { { echo "$as_me:16662: error: Cannot find db.h" >&5
16663 echo "$as_me: error: Cannot find db.h" >&2;}
16664    { (exit 1); exit 1; }; }
16665
16666 fi
16667
16668 fi
16669
16670 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16671         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16672         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16673 fi
16674
16675 # Just in case, check if the C compiler has a bool type.
16676
16677 echo "$as_me:16677: checking if we should include stdbool.h" >&5
16678 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16679
16680 if test "${cf_cv_header_stdbool_h+set}" = set; then
16681   echo $ECHO_N "(cached) $ECHO_C" >&6
16682 else
16683
16684         cat >conftest.$ac_ext <<_ACEOF
16685 #line 16685 "configure"
16686 #include "confdefs.h"
16687
16688 int
16689 main ()
16690 {
16691 bool foo = false
16692   ;
16693   return 0;
16694 }
16695 _ACEOF
16696 rm -f conftest.$ac_objext
16697 if { (eval echo "$as_me:16697: \"$ac_compile\"") >&5
16698   (eval $ac_compile) 2>&5
16699   ac_status=$?
16700   echo "$as_me:16700: \$? = $ac_status" >&5
16701   (exit $ac_status); } &&
16702          { ac_try='test -s conftest.$ac_objext'
16703   { (eval echo "$as_me:16703: \"$ac_try\"") >&5
16704   (eval $ac_try) 2>&5
16705   ac_status=$?
16706   echo "$as_me:16706: \$? = $ac_status" >&5
16707   (exit $ac_status); }; }; then
16708   cf_cv_header_stdbool_h=0
16709 else
16710   echo "$as_me: failed program was:" >&5
16711 cat conftest.$ac_ext >&5
16712 cat >conftest.$ac_ext <<_ACEOF
16713 #line 16713 "configure"
16714 #include "confdefs.h"
16715
16716 #ifndef __BEOS__
16717 #include <stdbool.h>
16718 #endif
16719
16720 int
16721 main ()
16722 {
16723 bool foo = false
16724   ;
16725   return 0;
16726 }
16727 _ACEOF
16728 rm -f conftest.$ac_objext
16729 if { (eval echo "$as_me:16729: \"$ac_compile\"") >&5
16730   (eval $ac_compile) 2>&5
16731   ac_status=$?
16732   echo "$as_me:16732: \$? = $ac_status" >&5
16733   (exit $ac_status); } &&
16734          { ac_try='test -s conftest.$ac_objext'
16735   { (eval echo "$as_me:16735: \"$ac_try\"") >&5
16736   (eval $ac_try) 2>&5
16737   ac_status=$?
16738   echo "$as_me:16738: \$? = $ac_status" >&5
16739   (exit $ac_status); }; }; then
16740   cf_cv_header_stdbool_h=1
16741 else
16742   echo "$as_me: failed program was:" >&5
16743 cat conftest.$ac_ext >&5
16744 cf_cv_header_stdbool_h=0
16745 fi
16746 rm -f conftest.$ac_objext conftest.$ac_ext
16747 fi
16748 rm -f conftest.$ac_objext conftest.$ac_ext
16749 fi
16750
16751 if test "$cf_cv_header_stdbool_h" = 1
16752 then    echo "$as_me:16752: result: yes" >&5
16753 echo "${ECHO_T}yes" >&6
16754 else    echo "$as_me:16754: result: no" >&5
16755 echo "${ECHO_T}no" >&6
16756 fi
16757
16758 echo "$as_me:16758: checking for builtin bool type" >&5
16759 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16760
16761 if test "${cf_cv_cc_bool_type+set}" = set; then
16762   echo $ECHO_N "(cached) $ECHO_C" >&6
16763 else
16764
16765         cat >conftest.$ac_ext <<_ACEOF
16766 #line 16766 "configure"
16767 #include "confdefs.h"
16768
16769 #include <stdio.h>
16770 #include <sys/types.h>
16771
16772 int
16773 main ()
16774 {
16775 bool x = false
16776   ;
16777   return 0;
16778 }
16779 _ACEOF
16780 rm -f conftest.$ac_objext
16781 if { (eval echo "$as_me:16781: \"$ac_compile\"") >&5
16782   (eval $ac_compile) 2>&5
16783   ac_status=$?
16784   echo "$as_me:16784: \$? = $ac_status" >&5
16785   (exit $ac_status); } &&
16786          { ac_try='test -s conftest.$ac_objext'
16787   { (eval echo "$as_me:16787: \"$ac_try\"") >&5
16788   (eval $ac_try) 2>&5
16789   ac_status=$?
16790   echo "$as_me:16790: \$? = $ac_status" >&5
16791   (exit $ac_status); }; }; then
16792   cf_cv_cc_bool_type=1
16793 else
16794   echo "$as_me: failed program was:" >&5
16795 cat conftest.$ac_ext >&5
16796 cf_cv_cc_bool_type=0
16797 fi
16798 rm -f conftest.$ac_objext conftest.$ac_ext
16799
16800 fi
16801
16802 if test "$cf_cv_cc_bool_type" = 1
16803 then    echo "$as_me:16803: result: yes" >&5
16804 echo "${ECHO_T}yes" >&6
16805 else    echo "$as_me:16805: result: no" >&5
16806 echo "${ECHO_T}no" >&6
16807 fi
16808
16809 # Check for C++ compiler characteristics (and ensure that it's there!)
16810 if test -n "$CXX" ; then
16811         ac_ext=cc
16812 ac_cpp='$CXXCPP $CPPFLAGS'
16813 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16814 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16815 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16816 ac_main_return=return
16817
16818 if test -n "$GXX" ; then
16819 case $cf_cv_system_name in #(vi
16820 os2*) #(vi
16821         cf_stdcpp_libname=stdcpp
16822         ;;
16823 *)
16824         cf_stdcpp_libname=stdc++
16825         ;;
16826 esac
16827 echo "$as_me:16827: checking for library $cf_stdcpp_libname" >&5
16828 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16829 if test "${cf_cv_libstdcpp+set}" = set; then
16830   echo $ECHO_N "(cached) $ECHO_C" >&6
16831 else
16832
16833         cf_save="$LIBS"
16834         LIBS="-l$cf_stdcpp_libname $LIBS"
16835 cat >conftest.$ac_ext <<_ACEOF
16836 #line 16836 "configure"
16837 #include "confdefs.h"
16838
16839 #include <strstream.h>
16840 int
16841 main ()
16842 {
16843
16844 char buf[80];
16845 strstreambuf foo(buf, sizeof(buf))
16846
16847   ;
16848   return 0;
16849 }
16850 _ACEOF
16851 rm -f conftest.$ac_objext conftest$ac_exeext
16852 if { (eval echo "$as_me:16852: \"$ac_link\"") >&5
16853   (eval $ac_link) 2>&5
16854   ac_status=$?
16855   echo "$as_me:16855: \$? = $ac_status" >&5
16856   (exit $ac_status); } &&
16857          { ac_try='test -s conftest$ac_exeext'
16858   { (eval echo "$as_me:16858: \"$ac_try\"") >&5
16859   (eval $ac_try) 2>&5
16860   ac_status=$?
16861   echo "$as_me:16861: \$? = $ac_status" >&5
16862   (exit $ac_status); }; }; then
16863   cf_cv_libstdcpp=yes
16864 else
16865   echo "$as_me: failed program was:" >&5
16866 cat conftest.$ac_ext >&5
16867 cf_cv_libstdcpp=no
16868 fi
16869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16870         LIBS="$cf_save"
16871
16872 fi
16873 echo "$as_me:16873: result: $cf_cv_libstdcpp" >&5
16874 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16875 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
16876 fi
16877
16878         echo "$as_me:16878: checking whether $CXX understands -c and -o together" >&5
16879 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16880 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16881   echo $ECHO_N "(cached) $ECHO_C" >&6
16882 else
16883
16884 cat > conftest.$ac_ext <<CF_EOF
16885 #include <stdio.h>
16886 int main()
16887 {
16888         ${cf_cv_main_return:-return}(0);
16889 }
16890 CF_EOF
16891 # We do the test twice because some compilers refuse to overwrite an
16892 # existing .o file with -o, though they will create one.
16893 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16894 if { (eval echo "$as_me:16894: \"$ac_try\"") >&5
16895   (eval $ac_try) 2>&5
16896   ac_status=$?
16897   echo "$as_me:16897: \$? = $ac_status" >&5
16898   (exit $ac_status); } &&
16899   test -f conftest2.$ac_objext && { (eval echo "$as_me:16899: \"$ac_try\"") >&5
16900   (eval $ac_try) 2>&5
16901   ac_status=$?
16902   echo "$as_me:16902: \$? = $ac_status" >&5
16903   (exit $ac_status); };
16904 then
16905   eval cf_cv_prog_CXX_c_o=yes
16906 else
16907   eval cf_cv_prog_CXX_c_o=no
16908 fi
16909 rm -rf conftest*
16910
16911 fi
16912 if test $cf_cv_prog_CXX_c_o = yes; then
16913   echo "$as_me:16913: result: yes" >&5
16914 echo "${ECHO_T}yes" >&6
16915 else
16916   echo "$as_me:16916: result: no" >&5
16917 echo "${ECHO_T}no" >&6
16918 fi
16919
16920         case $GXX_VERSION in
16921         1*|2.0-6*)
16922                 cf_cxx_library=yes
16923                 ;;
16924         *-2.7*|2.7*)
16925
16926 cf_cxx_library=unknown
16927 case $cf_cv_system_name in #(vi
16928 os2*) #(vi
16929         cf_gpp_libname=gpp
16930         ;;
16931 *)
16932         cf_gpp_libname=g++
16933         ;;
16934 esac
16935 if test "$GXX" = yes; then
16936         echo "$as_me:16936: checking for lib$cf_gpp_libname" >&5
16937 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16938         cf_save="$LIBS"
16939         LIBS="-l$cf_gpp_libname $LIBS"
16940         cat >conftest.$ac_ext <<_ACEOF
16941 #line 16941 "configure"
16942 #include "confdefs.h"
16943
16944 #include <$cf_gpp_libname/builtin.h>
16945
16946 int
16947 main ()
16948 {
16949 two_arg_error_handler_t foo2 = lib_error_handler
16950   ;
16951   return 0;
16952 }
16953 _ACEOF
16954 rm -f conftest.$ac_objext conftest$ac_exeext
16955 if { (eval echo "$as_me:16955: \"$ac_link\"") >&5
16956   (eval $ac_link) 2>&5
16957   ac_status=$?
16958   echo "$as_me:16958: \$? = $ac_status" >&5
16959   (exit $ac_status); } &&
16960          { ac_try='test -s conftest$ac_exeext'
16961   { (eval echo "$as_me:16961: \"$ac_try\"") >&5
16962   (eval $ac_try) 2>&5
16963   ac_status=$?
16964   echo "$as_me:16964: \$? = $ac_status" >&5
16965   (exit $ac_status); }; }; then
16966   cf_cxx_library=yes
16967          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16968          if test "$cf_gpp_libname" = cpp ; then
16969             cat >>confdefs.h <<\EOF
16970 #define HAVE_GPP_BUILTIN_H 1
16971 EOF
16972
16973          else
16974             cat >>confdefs.h <<\EOF
16975 #define HAVE_GXX_BUILTIN_H 1
16976 EOF
16977
16978          fi
16979 else
16980   echo "$as_me: failed program was:" >&5
16981 cat conftest.$ac_ext >&5
16982 cat >conftest.$ac_ext <<_ACEOF
16983 #line 16983 "configure"
16984 #include "confdefs.h"
16985
16986 #include <builtin.h>
16987
16988 int
16989 main ()
16990 {
16991 two_arg_error_handler_t foo2 = lib_error_handler
16992   ;
16993   return 0;
16994 }
16995 _ACEOF
16996 rm -f conftest.$ac_objext conftest$ac_exeext
16997 if { (eval echo "$as_me:16997: \"$ac_link\"") >&5
16998   (eval $ac_link) 2>&5
16999   ac_status=$?
17000   echo "$as_me:17000: \$? = $ac_status" >&5
17001   (exit $ac_status); } &&
17002          { ac_try='test -s conftest$ac_exeext'
17003   { (eval echo "$as_me:17003: \"$ac_try\"") >&5
17004   (eval $ac_try) 2>&5
17005   ac_status=$?
17006   echo "$as_me:17006: \$? = $ac_status" >&5
17007   (exit $ac_status); }; }; then
17008   cf_cxx_library=yes
17009          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17010          cat >>confdefs.h <<\EOF
17011 #define HAVE_BUILTIN_H 1
17012 EOF
17013
17014 else
17015   echo "$as_me: failed program was:" >&5
17016 cat conftest.$ac_ext >&5
17017 cf_cxx_library=no
17018 fi
17019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17020 fi
17021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17022         LIBS="$cf_save"
17023         echo "$as_me:17023: result: $cf_cxx_library" >&5
17024 echo "${ECHO_T}$cf_cxx_library" >&6
17025 fi
17026
17027                 ;;
17028         *)
17029                 cf_cxx_library=no
17030                 ;;
17031         esac
17032
17033         ac_ext=cc
17034 ac_cpp='$CXXCPP $CPPFLAGS'
17035 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17036 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17037 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17038 ac_main_return=return
17039 echo "$as_me:17039: checking how to run the C++ preprocessor" >&5
17040 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17041 if test -z "$CXXCPP"; then
17042   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17043   echo $ECHO_N "(cached) $ECHO_C" >&6
17044 else
17045       # Double quotes because CXXCPP needs to be expanded
17046     for CXXCPP in "$CXX -E" "/lib/cpp"
17047     do
17048       ac_preproc_ok=false
17049 for ac_cxx_preproc_warn_flag in '' yes
17050 do
17051   # Use a header file that comes with gcc, so configuring glibc
17052   # with a fresh cross-compiler works.
17053   # On the NeXT, cc -E runs the code through the compiler's parser,
17054   # not just through cpp. "Syntax error" is here to catch this case.
17055   cat >conftest.$ac_ext <<_ACEOF
17056 #line 17056 "configure"
17057 #include "confdefs.h"
17058 #include <assert.h>
17059                      Syntax error
17060 _ACEOF
17061 if { (eval echo "$as_me:17061: \"$ac_cpp conftest.$ac_ext\"") >&5
17062   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17063   ac_status=$?
17064   egrep -v '^ *\+' conftest.er1 >conftest.err
17065   rm -f conftest.er1
17066   cat conftest.err >&5
17067   echo "$as_me:17067: \$? = $ac_status" >&5
17068   (exit $ac_status); } >/dev/null; then
17069   if test -s conftest.err; then
17070     ac_cpp_err=$ac_cxx_preproc_warn_flag
17071   else
17072     ac_cpp_err=
17073   fi
17074 else
17075   ac_cpp_err=yes
17076 fi
17077 if test -z "$ac_cpp_err"; then
17078   :
17079 else
17080   echo "$as_me: failed program was:" >&5
17081   cat conftest.$ac_ext >&5
17082   # Broken: fails on valid input.
17083 continue
17084 fi
17085 rm -f conftest.err conftest.$ac_ext
17086
17087   # OK, works on sane cases.  Now check whether non-existent headers
17088   # can be detected and how.
17089   cat >conftest.$ac_ext <<_ACEOF
17090 #line 17090 "configure"
17091 #include "confdefs.h"
17092 #include <ac_nonexistent.h>
17093 _ACEOF
17094 if { (eval echo "$as_me:17094: \"$ac_cpp conftest.$ac_ext\"") >&5
17095   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17096   ac_status=$?
17097   egrep -v '^ *\+' conftest.er1 >conftest.err
17098   rm -f conftest.er1
17099   cat conftest.err >&5
17100   echo "$as_me:17100: \$? = $ac_status" >&5
17101   (exit $ac_status); } >/dev/null; then
17102   if test -s conftest.err; then
17103     ac_cpp_err=$ac_cxx_preproc_warn_flag
17104   else
17105     ac_cpp_err=
17106   fi
17107 else
17108   ac_cpp_err=yes
17109 fi
17110 if test -z "$ac_cpp_err"; then
17111   # Broken: success on invalid input.
17112 continue
17113 else
17114   echo "$as_me: failed program was:" >&5
17115   cat conftest.$ac_ext >&5
17116   # Passes both tests.
17117 ac_preproc_ok=:
17118 break
17119 fi
17120 rm -f conftest.err conftest.$ac_ext
17121
17122 done
17123 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17124 rm -f conftest.err conftest.$ac_ext
17125 if $ac_preproc_ok; then
17126   break
17127 fi
17128
17129     done
17130     ac_cv_prog_CXXCPP=$CXXCPP
17131
17132 fi
17133   CXXCPP=$ac_cv_prog_CXXCPP
17134 else
17135   ac_cv_prog_CXXCPP=$CXXCPP
17136 fi
17137 echo "$as_me:17137: result: $CXXCPP" >&5
17138 echo "${ECHO_T}$CXXCPP" >&6
17139 ac_preproc_ok=false
17140 for ac_cxx_preproc_warn_flag in '' yes
17141 do
17142   # Use a header file that comes with gcc, so configuring glibc
17143   # with a fresh cross-compiler works.
17144   # On the NeXT, cc -E runs the code through the compiler's parser,
17145   # not just through cpp. "Syntax error" is here to catch this case.
17146   cat >conftest.$ac_ext <<_ACEOF
17147 #line 17147 "configure"
17148 #include "confdefs.h"
17149 #include <assert.h>
17150                      Syntax error
17151 _ACEOF
17152 if { (eval echo "$as_me:17152: \"$ac_cpp conftest.$ac_ext\"") >&5
17153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17154   ac_status=$?
17155   egrep -v '^ *\+' conftest.er1 >conftest.err
17156   rm -f conftest.er1
17157   cat conftest.err >&5
17158   echo "$as_me:17158: \$? = $ac_status" >&5
17159   (exit $ac_status); } >/dev/null; then
17160   if test -s conftest.err; then
17161     ac_cpp_err=$ac_cxx_preproc_warn_flag
17162   else
17163     ac_cpp_err=
17164   fi
17165 else
17166   ac_cpp_err=yes
17167 fi
17168 if test -z "$ac_cpp_err"; then
17169   :
17170 else
17171   echo "$as_me: failed program was:" >&5
17172   cat conftest.$ac_ext >&5
17173   # Broken: fails on valid input.
17174 continue
17175 fi
17176 rm -f conftest.err conftest.$ac_ext
17177
17178   # OK, works on sane cases.  Now check whether non-existent headers
17179   # can be detected and how.
17180   cat >conftest.$ac_ext <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183 #include <ac_nonexistent.h>
17184 _ACEOF
17185 if { (eval echo "$as_me:17185: \"$ac_cpp conftest.$ac_ext\"") >&5
17186   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17187   ac_status=$?
17188   egrep -v '^ *\+' conftest.er1 >conftest.err
17189   rm -f conftest.er1
17190   cat conftest.err >&5
17191   echo "$as_me:17191: \$? = $ac_status" >&5
17192   (exit $ac_status); } >/dev/null; then
17193   if test -s conftest.err; then
17194     ac_cpp_err=$ac_cxx_preproc_warn_flag
17195   else
17196     ac_cpp_err=
17197   fi
17198 else
17199   ac_cpp_err=yes
17200 fi
17201 if test -z "$ac_cpp_err"; then
17202   # Broken: success on invalid input.
17203 continue
17204 else
17205   echo "$as_me: failed program was:" >&5
17206   cat conftest.$ac_ext >&5
17207   # Passes both tests.
17208 ac_preproc_ok=:
17209 break
17210 fi
17211 rm -f conftest.err conftest.$ac_ext
17212
17213 done
17214 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17215 rm -f conftest.err conftest.$ac_ext
17216 if $ac_preproc_ok; then
17217   :
17218 else
17219   { { echo "$as_me:17219: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17220 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17221    { (exit 1); exit 1; }; }
17222 fi
17223
17224 ac_ext=cc
17225 ac_cpp='$CXXCPP $CPPFLAGS'
17226 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17227 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17228 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17229 ac_main_return=return
17230
17231 for ac_header in iostream typeinfo
17232 do
17233 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17234 echo "$as_me:17234: checking for $ac_header" >&5
17235 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17236 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17237   echo $ECHO_N "(cached) $ECHO_C" >&6
17238 else
17239   cat >conftest.$ac_ext <<_ACEOF
17240 #line 17240 "configure"
17241 #include "confdefs.h"
17242 #include <$ac_header>
17243 _ACEOF
17244 if { (eval echo "$as_me:17244: \"$ac_cpp conftest.$ac_ext\"") >&5
17245   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17246   ac_status=$?
17247   egrep -v '^ *\+' conftest.er1 >conftest.err
17248   rm -f conftest.er1
17249   cat conftest.err >&5
17250   echo "$as_me:17250: \$? = $ac_status" >&5
17251   (exit $ac_status); } >/dev/null; then
17252   if test -s conftest.err; then
17253     ac_cpp_err=$ac_cxx_preproc_warn_flag
17254   else
17255     ac_cpp_err=
17256   fi
17257 else
17258   ac_cpp_err=yes
17259 fi
17260 if test -z "$ac_cpp_err"; then
17261   eval "$as_ac_Header=yes"
17262 else
17263   echo "$as_me: failed program was:" >&5
17264   cat conftest.$ac_ext >&5
17265   eval "$as_ac_Header=no"
17266 fi
17267 rm -f conftest.err conftest.$ac_ext
17268 fi
17269 echo "$as_me:17269: result: `eval echo '${'$as_ac_Header'}'`" >&5
17270 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17271 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17272   cat >>confdefs.h <<EOF
17273 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17274 EOF
17275
17276 fi
17277 done
17278
17279     if test x"$ac_cv_header_iostream" = xyes ; then
17280         echo "$as_me:17280: checking if iostream uses std-namespace" >&5
17281 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17282         cat >conftest.$ac_ext <<_ACEOF
17283 #line 17283 "configure"
17284 #include "confdefs.h"
17285
17286 #include <iostream>
17287 using std::endl;
17288 using std::cerr;
17289 int
17290 main ()
17291 {
17292
17293 cerr << "testing" << endl;
17294
17295   ;
17296   return 0;
17297 }
17298 _ACEOF
17299 rm -f conftest.$ac_objext
17300 if { (eval echo "$as_me:17300: \"$ac_compile\"") >&5
17301   (eval $ac_compile) 2>&5
17302   ac_status=$?
17303   echo "$as_me:17303: \$? = $ac_status" >&5
17304   (exit $ac_status); } &&
17305          { ac_try='test -s conftest.$ac_objext'
17306   { (eval echo "$as_me:17306: \"$ac_try\"") >&5
17307   (eval $ac_try) 2>&5
17308   ac_status=$?
17309   echo "$as_me:17309: \$? = $ac_status" >&5
17310   (exit $ac_status); }; }; then
17311   cf_iostream_namespace=yes
17312 else
17313   echo "$as_me: failed program was:" >&5
17314 cat conftest.$ac_ext >&5
17315 cf_iostream_namespace=no
17316 fi
17317 rm -f conftest.$ac_objext conftest.$ac_ext
17318         echo "$as_me:17318: result: $cf_iostream_namespace" >&5
17319 echo "${ECHO_T}$cf_iostream_namespace" >&6
17320         if test "$cf_iostream_namespace" = yes ; then
17321             cat >>confdefs.h <<\EOF
17322 #define IOSTREAM_NAMESPACE 1
17323 EOF
17324
17325         fi
17326     fi
17327
17328 echo "$as_me:17328: checking if we should include stdbool.h" >&5
17329 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17330
17331 if test "${cf_cv_header_stdbool_h+set}" = set; then
17332   echo $ECHO_N "(cached) $ECHO_C" >&6
17333 else
17334
17335         cat >conftest.$ac_ext <<_ACEOF
17336 #line 17336 "configure"
17337 #include "confdefs.h"
17338
17339 int
17340 main ()
17341 {
17342 bool foo = false
17343   ;
17344   return 0;
17345 }
17346 _ACEOF
17347 rm -f conftest.$ac_objext
17348 if { (eval echo "$as_me:17348: \"$ac_compile\"") >&5
17349   (eval $ac_compile) 2>&5
17350   ac_status=$?
17351   echo "$as_me:17351: \$? = $ac_status" >&5
17352   (exit $ac_status); } &&
17353          { ac_try='test -s conftest.$ac_objext'
17354   { (eval echo "$as_me:17354: \"$ac_try\"") >&5
17355   (eval $ac_try) 2>&5
17356   ac_status=$?
17357   echo "$as_me:17357: \$? = $ac_status" >&5
17358   (exit $ac_status); }; }; then
17359   cf_cv_header_stdbool_h=0
17360 else
17361   echo "$as_me: failed program was:" >&5
17362 cat conftest.$ac_ext >&5
17363 cat >conftest.$ac_ext <<_ACEOF
17364 #line 17364 "configure"
17365 #include "confdefs.h"
17366
17367 #ifndef __BEOS__
17368 #include <stdbool.h>
17369 #endif
17370
17371 int
17372 main ()
17373 {
17374 bool foo = false
17375   ;
17376   return 0;
17377 }
17378 _ACEOF
17379 rm -f conftest.$ac_objext
17380 if { (eval echo "$as_me:17380: \"$ac_compile\"") >&5
17381   (eval $ac_compile) 2>&5
17382   ac_status=$?
17383   echo "$as_me:17383: \$? = $ac_status" >&5
17384   (exit $ac_status); } &&
17385          { ac_try='test -s conftest.$ac_objext'
17386   { (eval echo "$as_me:17386: \"$ac_try\"") >&5
17387   (eval $ac_try) 2>&5
17388   ac_status=$?
17389   echo "$as_me:17389: \$? = $ac_status" >&5
17390   (exit $ac_status); }; }; then
17391   cf_cv_header_stdbool_h=1
17392 else
17393   echo "$as_me: failed program was:" >&5
17394 cat conftest.$ac_ext >&5
17395 cf_cv_header_stdbool_h=0
17396 fi
17397 rm -f conftest.$ac_objext conftest.$ac_ext
17398 fi
17399 rm -f conftest.$ac_objext conftest.$ac_ext
17400 fi
17401
17402 if test "$cf_cv_header_stdbool_h" = 1
17403 then    echo "$as_me:17403: result: yes" >&5
17404 echo "${ECHO_T}yes" >&6
17405 else    echo "$as_me:17405: result: no" >&5
17406 echo "${ECHO_T}no" >&6
17407 fi
17408
17409 echo "$as_me:17409: checking for builtin bool type" >&5
17410 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17411
17412 if test "${cf_cv_builtin_bool+set}" = set; then
17413   echo $ECHO_N "(cached) $ECHO_C" >&6
17414 else
17415
17416         cat >conftest.$ac_ext <<_ACEOF
17417 #line 17417 "configure"
17418 #include "confdefs.h"
17419
17420 #include <stdio.h>
17421 #include <sys/types.h>
17422
17423 int
17424 main ()
17425 {
17426 bool x = false
17427   ;
17428   return 0;
17429 }
17430 _ACEOF
17431 rm -f conftest.$ac_objext
17432 if { (eval echo "$as_me:17432: \"$ac_compile\"") >&5
17433   (eval $ac_compile) 2>&5
17434   ac_status=$?
17435   echo "$as_me:17435: \$? = $ac_status" >&5
17436   (exit $ac_status); } &&
17437          { ac_try='test -s conftest.$ac_objext'
17438   { (eval echo "$as_me:17438: \"$ac_try\"") >&5
17439   (eval $ac_try) 2>&5
17440   ac_status=$?
17441   echo "$as_me:17441: \$? = $ac_status" >&5
17442   (exit $ac_status); }; }; then
17443   cf_cv_builtin_bool=1
17444 else
17445   echo "$as_me: failed program was:" >&5
17446 cat conftest.$ac_ext >&5
17447 cf_cv_builtin_bool=0
17448 fi
17449 rm -f conftest.$ac_objext conftest.$ac_ext
17450
17451 fi
17452
17453 if test "$cf_cv_builtin_bool" = 1
17454 then    echo "$as_me:17454: result: yes" >&5
17455 echo "${ECHO_T}yes" >&6
17456 else    echo "$as_me:17456: result: no" >&5
17457 echo "${ECHO_T}no" >&6
17458 fi
17459
17460 echo "$as_me:17460: checking for size of bool" >&5
17461 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17462 if test "${cf_cv_type_of_bool+set}" = set; then
17463   echo $ECHO_N "(cached) $ECHO_C" >&6
17464 else
17465
17466         rm -f cf_test.out
17467         if test "$cross_compiling" = yes; then
17468   cf_cv_type_of_bool=unknown
17469 else
17470   cat >conftest.$ac_ext <<_ACEOF
17471 #line 17471 "configure"
17472 #include "confdefs.h"
17473
17474 #include <stdlib.h>
17475 #include <stdio.h>
17476
17477 #if defined(__cplusplus)
17478
17479 #ifdef HAVE_GXX_BUILTIN_H
17480 #include <g++/builtin.h>
17481 #elif HAVE_GPP_BUILTIN_H
17482 #include <gpp/builtin.h>
17483 #elif HAVE_BUILTIN_H
17484 #include <builtin.h>
17485 #endif
17486
17487 #else
17488
17489 #if $cf_cv_header_stdbool_h
17490 #include <stdbool.h>
17491 #endif
17492
17493 #endif
17494
17495 main()
17496 {
17497         FILE *fp = fopen("cf_test.out", "w");
17498         if (fp != 0) {
17499                 bool x = true;
17500                 if ((bool)(-x) >= 0)
17501                         fputs("unsigned ", fp);
17502                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17503                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17504                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17505                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17506                 fclose(fp);
17507         }
17508         ${cf_cv_main_return:-return}(0);
17509 }
17510
17511 _ACEOF
17512 rm -f conftest$ac_exeext
17513 if { (eval echo "$as_me:17513: \"$ac_link\"") >&5
17514   (eval $ac_link) 2>&5
17515   ac_status=$?
17516   echo "$as_me:17516: \$? = $ac_status" >&5
17517   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17518   { (eval echo "$as_me:17518: \"$ac_try\"") >&5
17519   (eval $ac_try) 2>&5
17520   ac_status=$?
17521   echo "$as_me:17521: \$? = $ac_status" >&5
17522   (exit $ac_status); }; }; then
17523   cf_cv_type_of_bool=`cat cf_test.out`
17524                  if test -z "$cf_cv_type_of_bool"; then
17525                    cf_cv_type_of_bool=unknown
17526                  fi
17527 else
17528   echo "$as_me: program exited with status $ac_status" >&5
17529 echo "$as_me: failed program was:" >&5
17530 cat conftest.$ac_ext >&5
17531 cf_cv_type_of_bool=unknown
17532 fi
17533 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17534 fi
17535
17536 fi
17537
17538         rm -f cf_test.out
17539 echo "$as_me:17539: result: $cf_cv_type_of_bool" >&5
17540 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17541 if test "$cf_cv_type_of_bool" = unknown ; then
17542         case .$NCURSES_BOOL in #(vi
17543         .auto|.) NCURSES_BOOL=unsigned;;
17544         esac
17545         { echo "$as_me:17545: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17546 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17547         cf_cv_type_of_bool=$NCURSES_BOOL
17548 fi
17549
17550 echo "$as_me:17550: checking for special defines needed for etip.h" >&5
17551 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17552 cf_save_CXXFLAGS="$CXXFLAGS"
17553 cf_result="none"
17554 for cf_math in "" MATH_H
17555 do
17556 for cf_excp in "" MATH_EXCEPTION
17557 do
17558         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17559         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17560         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17561 cat >conftest.$ac_ext <<_ACEOF
17562 #line 17562 "configure"
17563 #include "confdefs.h"
17564
17565 #include <etip.h.in>
17566
17567 int
17568 main ()
17569 {
17570
17571   ;
17572   return 0;
17573 }
17574 _ACEOF
17575 rm -f conftest.$ac_objext
17576 if { (eval echo "$as_me:17576: \"$ac_compile\"") >&5
17577   (eval $ac_compile) 2>&5
17578   ac_status=$?
17579   echo "$as_me:17579: \$? = $ac_status" >&5
17580   (exit $ac_status); } &&
17581          { ac_try='test -s conftest.$ac_objext'
17582   { (eval echo "$as_me:17582: \"$ac_try\"") >&5
17583   (eval $ac_try) 2>&5
17584   ac_status=$?
17585   echo "$as_me:17585: \$? = $ac_status" >&5
17586   (exit $ac_status); }; }; then
17587
17588         test -n "$cf_math" && cat >>confdefs.h <<EOF
17589 #define ETIP_NEEDS_${cf_math} 1
17590 EOF
17591
17592         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17593 #define ETIP_NEEDS_${cf_excp} 1
17594 EOF
17595
17596         cf_result="$cf_math $cf_excp"
17597         break
17598
17599 else
17600   echo "$as_me: failed program was:" >&5
17601 cat conftest.$ac_ext >&5
17602 fi
17603 rm -f conftest.$ac_objext conftest.$ac_ext
17604 done
17605 done
17606 echo "$as_me:17606: result: $cf_result" >&5
17607 echo "${ECHO_T}$cf_result" >&6
17608 CXXFLAGS="$cf_save_CXXFLAGS"
17609
17610 if test -n "$CXX"; then
17611 echo "$as_me:17611: checking if $CXX accepts parameter initialization" >&5
17612 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17613 if test "${cf_cv_cpp_param_init+set}" = set; then
17614   echo $ECHO_N "(cached) $ECHO_C" >&6
17615 else
17616
17617         ac_ext=cc
17618 ac_cpp='$CXXCPP $CPPFLAGS'
17619 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17620 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17621 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17622 ac_main_return=return
17623
17624         if test "$cross_compiling" = yes; then
17625   cf_cv_cpp_param_init=unknown
17626 else
17627   cat >conftest.$ac_ext <<_ACEOF
17628 #line 17628 "configure"
17629 #include "confdefs.h"
17630
17631 class TEST {
17632 private:
17633         int value;
17634 public:
17635         TEST(int x = 1);
17636         ~TEST();
17637 };
17638
17639 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17640 {
17641         value = x;
17642 }
17643 void main() { }
17644
17645 _ACEOF
17646 rm -f conftest$ac_exeext
17647 if { (eval echo "$as_me:17647: \"$ac_link\"") >&5
17648   (eval $ac_link) 2>&5
17649   ac_status=$?
17650   echo "$as_me:17650: \$? = $ac_status" >&5
17651   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17652   { (eval echo "$as_me:17652: \"$ac_try\"") >&5
17653   (eval $ac_try) 2>&5
17654   ac_status=$?
17655   echo "$as_me:17655: \$? = $ac_status" >&5
17656   (exit $ac_status); }; }; then
17657   cf_cv_cpp_param_init=yes
17658 else
17659   echo "$as_me: program exited with status $ac_status" >&5
17660 echo "$as_me: failed program was:" >&5
17661 cat conftest.$ac_ext >&5
17662 cf_cv_cpp_param_init=no
17663 fi
17664 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17665 fi
17666         ac_ext=cc
17667 ac_cpp='$CXXCPP $CPPFLAGS'
17668 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17669 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17670 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17671 ac_main_return=return
17672
17673 fi
17674 echo "$as_me:17674: result: $cf_cv_cpp_param_init" >&5
17675 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17676 fi
17677 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17678 #define CPP_HAS_PARAM_INIT 1
17679 EOF
17680
17681 if test -n "$CXX"; then
17682
17683 echo "$as_me:17683: checking if $CXX accepts static_cast" >&5
17684 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17685 if test "${cf_cv_cpp_static_cast+set}" = set; then
17686   echo $ECHO_N "(cached) $ECHO_C" >&6
17687 else
17688
17689         ac_ext=cc
17690 ac_cpp='$CXXCPP $CPPFLAGS'
17691 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17692 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17693 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17694 ac_main_return=return
17695
17696         cat >conftest.$ac_ext <<_ACEOF
17697 #line 17697 "configure"
17698 #include "confdefs.h"
17699
17700 class NCursesPanel
17701 {
17702 public:
17703   NCursesPanel(int nlines,
17704                int ncols,
17705                int begin_y = 0,
17706                int begin_x = 0)
17707   {
17708   }
17709
17710   ~NCursesPanel();
17711 };
17712
17713 template<class T> class NCursesUserPanel : public NCursesPanel
17714 {
17715 public:
17716   NCursesUserPanel (int nlines,
17717                     int ncols,
17718                     int begin_y = 0,
17719                     int begin_x = 0,
17720                     const T* p_UserData = static_cast<T*>(0))
17721     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17722   {
17723   };
17724   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17725   {
17726   };
17727
17728   virtual ~NCursesUserPanel() {};
17729 };
17730
17731 int
17732 main ()
17733 {
17734
17735         const char* p_UserData = static_cast<char*>(0)
17736   ;
17737   return 0;
17738 }
17739 _ACEOF
17740 rm -f conftest.$ac_objext
17741 if { (eval echo "$as_me:17741: \"$ac_compile\"") >&5
17742   (eval $ac_compile) 2>&5
17743   ac_status=$?
17744   echo "$as_me:17744: \$? = $ac_status" >&5
17745   (exit $ac_status); } &&
17746          { ac_try='test -s conftest.$ac_objext'
17747   { (eval echo "$as_me:17747: \"$ac_try\"") >&5
17748   (eval $ac_try) 2>&5
17749   ac_status=$?
17750   echo "$as_me:17750: \$? = $ac_status" >&5
17751   (exit $ac_status); }; }; then
17752   cf_cv_cpp_static_cast=yes
17753 else
17754   echo "$as_me: failed program was:" >&5
17755 cat conftest.$ac_ext >&5
17756 cf_cv_cpp_static_cast=no
17757 fi
17758 rm -f conftest.$ac_objext conftest.$ac_ext
17759
17760         ac_ext=cc
17761 ac_cpp='$CXXCPP $CPPFLAGS'
17762 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17763 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17764 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17765 ac_main_return=return
17766
17767 fi
17768 echo "$as_me:17768: result: $cf_cv_cpp_static_cast" >&5
17769 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17770
17771 fi
17772
17773 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17774 #define CPP_HAS_STATIC_CAST 1
17775 EOF
17776
17777         CXX_AR='$(AR)'
17778         CXX_ARFLAGS='$(ARFLAGS)'
17779         case $cf_cv_system_name in #(vi
17780         irix*) #(vi
17781             if test "$GXX" != yes ; then
17782                 CXX_AR='$(CXX)'
17783                 CXX_ARFLAGS='-ar -o'
17784             fi
17785             ;;
17786         sco3.2v5*) #(vi
17787             CXXLDFLAGS="-u main"
17788             ;;
17789         solaris2*)
17790             if test "$GXX" != yes ; then
17791                 CXX_AR='$(CXX)'
17792                 CXX_ARFLAGS='-xar -o'
17793             fi
17794             ;;
17795         esac
17796
17797 else
17798         cf_cxx_library=no
17799         cf_cv_builtin_bool=1
17800
17801         # Just because we are not configuring against C++ right now does not
17802         # mean that a user will not want to use C++.  Some distributors disable
17803         # the C++ portion of this configuration as a shortcut (or just to avoid
17804         # compiling the demo in the c++ directory).  So we need a reasonable
17805         # default for the 'bool' type.
17806         #
17807         # Caveat: since the storage of the bool type is not standardized, it
17808         # may change.
17809
17810         if test "$NCURSES_BOOL" != auto ; then
17811                 cf_cv_type_of_bool=$NCURSES_BOOL
17812                 cf_cv_header_stdbool_h=0
17813         else
17814                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17815
17816 echo "$as_me:17816: checking for size of bool" >&5
17817 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17818 if test "${cf_cv_type_of_bool+set}" = set; then
17819   echo $ECHO_N "(cached) $ECHO_C" >&6
17820 else
17821
17822         rm -f cf_test.out
17823         if test "$cross_compiling" = yes; then
17824   cf_cv_type_of_bool=unknown
17825 else
17826   cat >conftest.$ac_ext <<_ACEOF
17827 #line 17827 "configure"
17828 #include "confdefs.h"
17829
17830 #include <stdlib.h>
17831 #include <stdio.h>
17832
17833 #if defined(__cplusplus)
17834
17835 #ifdef HAVE_GXX_BUILTIN_H
17836 #include <g++/builtin.h>
17837 #elif HAVE_GPP_BUILTIN_H
17838 #include <gpp/builtin.h>
17839 #elif HAVE_BUILTIN_H
17840 #include <builtin.h>
17841 #endif
17842
17843 #else
17844
17845 #if $cf_cv_header_stdbool_h
17846 #include <stdbool.h>
17847 #endif
17848
17849 #endif
17850
17851 main()
17852 {
17853         FILE *fp = fopen("cf_test.out", "w");
17854         if (fp != 0) {
17855                 bool x = true;
17856                 if ((bool)(-x) >= 0)
17857                         fputs("unsigned ", fp);
17858                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17859                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17860                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17861                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17862                 fclose(fp);
17863         }
17864         ${cf_cv_main_return:-return}(0);
17865 }
17866
17867 _ACEOF
17868 rm -f conftest$ac_exeext
17869 if { (eval echo "$as_me:17869: \"$ac_link\"") >&5
17870   (eval $ac_link) 2>&5
17871   ac_status=$?
17872   echo "$as_me:17872: \$? = $ac_status" >&5
17873   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17874   { (eval echo "$as_me:17874: \"$ac_try\"") >&5
17875   (eval $ac_try) 2>&5
17876   ac_status=$?
17877   echo "$as_me:17877: \$? = $ac_status" >&5
17878   (exit $ac_status); }; }; then
17879   cf_cv_type_of_bool=`cat cf_test.out`
17880                  if test -z "$cf_cv_type_of_bool"; then
17881                    cf_cv_type_of_bool=unknown
17882                  fi
17883 else
17884   echo "$as_me: program exited with status $ac_status" >&5
17885 echo "$as_me: failed program was:" >&5
17886 cat conftest.$ac_ext >&5
17887 cf_cv_type_of_bool=unknown
17888 fi
17889 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17890 fi
17891
17892 fi
17893
17894         rm -f cf_test.out
17895 echo "$as_me:17895: result: $cf_cv_type_of_bool" >&5
17896 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17897 if test "$cf_cv_type_of_bool" = unknown ; then
17898         case .$NCURSES_BOOL in #(vi
17899         .auto|.) NCURSES_BOOL=unsigned;;
17900         esac
17901         { echo "$as_me:17901: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17902 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17903         cf_cv_type_of_bool=$NCURSES_BOOL
17904 fi
17905
17906                 else
17907                         echo "$as_me:17907: checking for fallback type of bool" >&5
17908 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17909                         case "$host_cpu" in #(vi
17910                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17911                         *)      cf_cv_type_of_bool=int  ;;
17912                         esac
17913                         echo "$as_me:17913: result: $cf_cv_type_of_bool" >&5
17914 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17915                 fi
17916         fi
17917 fi
17918
17919 # If the C compiler did not declare bool, and we did not determine that the C++
17920 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17921 # ncurses library use the same type as C++ bool.  Note that this allows one to
17922 # specify the type of bool in a configure-script option and postpone
17923 # integration with the C++ compiler provided that the types are compatible.
17924 USE_CXX_BOOL=1
17925 if test $cf_cv_cc_bool_type = 1
17926 then
17927         # oops: C has a bool.  Unlikely, but C++ could differ.
17928         USE_CXX_BOOL=0
17929 elif test $cf_cv_builtin_bool = 0
17930 then
17931         # C++ has no bool
17932         USE_CXX_BOOL=0
17933 else
17934         # this is the normal case
17935         USE_CXX_BOOL='defined(__cplusplus)'
17936 fi
17937
17938 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17939
17940         if test "$cf_with_ada" != "no" ; then
17941                 if test "$with_libtool" != "no"; then
17942                         { echo "$as_me:17942: WARNING: libtool does not support Ada - disabling feature" >&5
17943 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17944                         cf_with_ada=no
17945                 fi
17946         fi
17947
17948         if test "$cf_with_ada" != "no" ; then
17949
17950 cf_ada_make=gnatmake
17951 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17952 set dummy $cf_ada_make; ac_word=$2
17953 echo "$as_me:17953: checking for $ac_word" >&5
17954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17955 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17956   echo $ECHO_N "(cached) $ECHO_C" >&6
17957 else
17958   if test -n "$gnat_exists"; then
17959   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17960 else
17961   ac_save_IFS=$IFS; IFS=$ac_path_separator
17962 ac_dummy="$PATH"
17963 for ac_dir in $ac_dummy; do
17964   IFS=$ac_save_IFS
17965   test -z "$ac_dir" && ac_dir=.
17966   $as_executable_p "$ac_dir/$ac_word" || continue
17967 ac_cv_prog_gnat_exists="yes"
17968 echo "$as_me:17968: found $ac_dir/$ac_word" >&5
17969 break
17970 done
17971
17972   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17973 fi
17974 fi
17975 gnat_exists=$ac_cv_prog_gnat_exists
17976 if test -n "$gnat_exists"; then
17977   echo "$as_me:17977: result: $gnat_exists" >&5
17978 echo "${ECHO_T}$gnat_exists" >&6
17979 else
17980   echo "$as_me:17980: result: no" >&5
17981 echo "${ECHO_T}no" >&6
17982 fi
17983
17984 if test "$ac_cv_prog_gnat_exists" = no; then
17985    cf_ada_make=
17986 else
17987
17988 echo "$as_me:17988: checking for gnat version" >&5
17989 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17990 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
17991         grep '[0-9].[0-9][0-9]*' |\
17992     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17993 echo "$as_me:17993: result: $cf_gnat_version" >&5
17994 echo "${ECHO_T}$cf_gnat_version" >&6
17995
17996 case $cf_gnat_version in #(vi
17997 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
17998         cf_cv_prog_gnat_correct=yes
17999         ;;
18000 *)
18001         { echo "$as_me:18001: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18002 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18003         cf_cv_prog_gnat_correct=no
18004         ;;
18005 esac
18006
18007 echo "$as_me:18007: checking if GNAT supports generics" >&5
18008 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18009 case $cf_gnat_version in #(vi
18010 3.[1-9]*|[4-9].*) #(vi
18011         cf_gnat_generics=yes
18012         ;;
18013 *)
18014         cf_gnat_generics=no
18015         ;;
18016 esac
18017 echo "$as_me:18017: result: $cf_gnat_generics" >&5
18018 echo "${ECHO_T}$cf_gnat_generics" >&6
18019
18020 if test "$cf_gnat_generics" = yes
18021 then
18022         cf_compile_generics=generics
18023         cf_generic_objects="\${GENOBJS}"
18024 else
18025         cf_compile_generics=
18026         cf_generic_objects=
18027 fi
18028
18029 echo "$as_me:18029: checking if GNAT supports project files" >&5
18030 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18031 case $cf_gnat_version in #(vi
18032 3.[0-9]*) #(vi
18033         cf_gnat_projects=no
18034         ;;
18035 *)
18036         case $cf_cv_system_name in #(vi
18037         cygwin*) #(vi
18038                 cf_gnat_projects=no
18039                 ;;
18040         *)
18041                 cf_gnat_projects=yes
18042                 ;;
18043         esac
18044         ;;
18045 esac
18046 echo "$as_me:18046: result: $cf_gnat_projects" >&5
18047 echo "${ECHO_T}$cf_gnat_projects" >&6
18048
18049 if test "$cf_gnat_projects" = yes
18050 then
18051         USE_OLD_MAKERULES="#"
18052         USE_GNAT_PROJECTS=""
18053 else
18054         USE_OLD_MAKERULES=""
18055         USE_GNAT_PROJECTS="#"
18056 fi
18057
18058    # Extract the first word of "m4", so it can be a program name with args.
18059 set dummy m4; ac_word=$2
18060 echo "$as_me:18060: checking for $ac_word" >&5
18061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18062 if test "${ac_cv_prog_M4_exists+set}" = set; then
18063   echo $ECHO_N "(cached) $ECHO_C" >&6
18064 else
18065   if test -n "$M4_exists"; then
18066   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18067 else
18068   ac_save_IFS=$IFS; IFS=$ac_path_separator
18069 ac_dummy="$PATH"
18070 for ac_dir in $ac_dummy; do
18071   IFS=$ac_save_IFS
18072   test -z "$ac_dir" && ac_dir=.
18073   $as_executable_p "$ac_dir/$ac_word" || continue
18074 ac_cv_prog_M4_exists="yes"
18075 echo "$as_me:18075: found $ac_dir/$ac_word" >&5
18076 break
18077 done
18078
18079   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18080 fi
18081 fi
18082 M4_exists=$ac_cv_prog_M4_exists
18083 if test -n "$M4_exists"; then
18084   echo "$as_me:18084: result: $M4_exists" >&5
18085 echo "${ECHO_T}$M4_exists" >&6
18086 else
18087   echo "$as_me:18087: result: no" >&5
18088 echo "${ECHO_T}no" >&6
18089 fi
18090
18091    if test "$ac_cv_prog_M4_exists" = no; then
18092       cf_cv_prog_gnat_correct=no
18093       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18094    fi
18095    if test "$cf_cv_prog_gnat_correct" = yes; then
18096       echo "$as_me:18096: checking if GNAT works" >&5
18097 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18098
18099 rm -rf conftest*
18100 cat >>conftest.ads <<CF_EOF
18101 procedure conftest;
18102 CF_EOF
18103 cat >>conftest.adb <<CF_EOF
18104 with Text_IO;
18105 with GNAT.OS_Lib;
18106 procedure conftest is
18107 begin
18108    Text_IO.Put ("Hello World");
18109    Text_IO.New_Line;
18110    GNAT.OS_Lib.OS_Exit (0);
18111 end conftest;
18112 CF_EOF
18113 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18114    if ( ./conftest 1>&5 2>&1 ) ; then
18115       cf_cv_prog_gnat_correct=yes
18116    else
18117       cf_cv_prog_gnat_correct=no
18118    fi
18119 else
18120    cf_cv_prog_gnat_correct=no
18121 fi
18122 rm -rf conftest*
18123
18124       echo "$as_me:18124: result: $cf_cv_prog_gnat_correct" >&5
18125 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18126    fi
18127 fi
18128
18129                 if test "$cf_cv_prog_gnat_correct" = yes; then
18130
18131         ADAFLAGS="$ADAFLAGS -O3 -gnatpn"
18132
18133 echo "$as_me:18133: checking if GNAT pragma Unreferenced works" >&5
18134 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18135 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18136   echo $ECHO_N "(cached) $ECHO_C" >&6
18137 else
18138
18139 rm -rf conftest*
18140 cat >>conftest.ads <<CF_EOF
18141 procedure conftest;
18142 CF_EOF
18143 cat >>conftest.adb <<CF_EOF
18144 with Text_IO;
18145 with GNAT.OS_Lib;
18146 procedure conftest is
18147    test : Integer;
18148    pragma Unreferenced (test);
18149 begin
18150    test := 1;
18151    Text_IO.Put ("Hello World");
18152    Text_IO.New_Line;
18153    GNAT.OS_Lib.OS_Exit (0);
18154 end conftest;
18155 CF_EOF
18156 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18157       cf_cv_pragma_unreferenced=yes
18158 else
18159    cf_cv_pragma_unreferenced=no
18160 fi
18161 rm -rf conftest*
18162
18163 fi
18164 echo "$as_me:18164: result: $cf_cv_pragma_unreferenced" >&5
18165 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18166
18167 # if the pragma is supported, use it (needed in the Trace code).
18168 if test $cf_cv_pragma_unreferenced = yes ; then
18169         PRAGMA_UNREF=TRUE
18170 else
18171         PRAGMA_UNREF=FALSE
18172 fi
18173
18174 echo "$as_me:18174: checking for ada-compiler" >&5
18175 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18176
18177 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18178 if test "${with_ada_compiler+set}" = set; then
18179   withval="$with_ada_compiler"
18180   cf_ada_compiler=$withval
18181 else
18182   cf_ada_compiler=gnatmake
18183 fi;
18184
18185 echo "$as_me:18185: result: $cf_ada_compiler" >&5
18186 echo "${ECHO_T}$cf_ada_compiler" >&6
18187
18188                         cf_ada_package=terminal_interface
18189
18190 echo "$as_me:18190: checking for ada-include" >&5
18191 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18192
18193 # Check whether --with-ada-include or --without-ada-include was given.
18194 if test "${with_ada_include+set}" = set; then
18195   withval="$with_ada_include"
18196
18197 else
18198   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18199 fi; if test -n "$prefix/share/ada/adainclude" ; then
18200
18201 if test "x$prefix" != xNONE; then
18202   cf_path_syntax="$prefix"
18203 else
18204   cf_path_syntax="$ac_default_prefix"
18205 fi
18206
18207 case ".$withval" in #(vi
18208 .\$\(*\)*|.\'*\'*) #(vi
18209   ;;
18210 ..|./*|.\\*) #(vi
18211   ;;
18212 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18213   ;;
18214 .\${*prefix}*) #(vi
18215   eval withval="$withval"
18216   case ".$withval" in #(vi
18217   .NONE/*)
18218     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18219     ;;
18220   esac
18221   ;; #(vi
18222 .no|.NONE/*)
18223   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18224   ;;
18225 *)
18226   { { echo "$as_me:18226: error: expected a pathname, not \"$withval\"" >&5
18227 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18228    { (exit 1); exit 1; }; }
18229   ;;
18230 esac
18231
18232 fi
18233 ADA_INCLUDE="$withval"
18234
18235 echo "$as_me:18235: result: $ADA_INCLUDE" >&5
18236 echo "${ECHO_T}$ADA_INCLUDE" >&6
18237
18238 echo "$as_me:18238: checking for ada-objects" >&5
18239 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18240
18241 # Check whether --with-ada-objects or --without-ada-objects was given.
18242 if test "${with_ada_objects+set}" = set; then
18243   withval="$with_ada_objects"
18244
18245 else
18246   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18247 fi; if test -n "$prefix/lib/ada/adalib" ; then
18248
18249 if test "x$prefix" != xNONE; then
18250   cf_path_syntax="$prefix"
18251 else
18252   cf_path_syntax="$ac_default_prefix"
18253 fi
18254
18255 case ".$withval" in #(vi
18256 .\$\(*\)*|.\'*\'*) #(vi
18257   ;;
18258 ..|./*|.\\*) #(vi
18259   ;;
18260 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18261   ;;
18262 .\${*prefix}*) #(vi
18263   eval withval="$withval"
18264   case ".$withval" in #(vi
18265   .NONE/*)
18266     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18267     ;;
18268   esac
18269   ;; #(vi
18270 .no|.NONE/*)
18271   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18272   ;;
18273 *)
18274   { { echo "$as_me:18274: error: expected a pathname, not \"$withval\"" >&5
18275 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18276    { (exit 1); exit 1; }; }
18277   ;;
18278 esac
18279
18280 fi
18281 ADA_OBJECTS="$withval"
18282
18283 echo "$as_me:18283: result: $ADA_OBJECTS" >&5
18284 echo "${ECHO_T}$ADA_OBJECTS" >&6
18285
18286 echo "$as_me:18286: checking if an Ada95 shared-library should be built" >&5
18287 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18288
18289 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18290 if test "${with_ada_sharedlib+set}" = set; then
18291   withval="$with_ada_sharedlib"
18292   with_ada_sharedlib=$withval
18293 else
18294   with_ada_sharedlib=no
18295 fi;
18296 echo "$as_me:18296: result: $with_ada_sharedlib" >&5
18297 echo "${ECHO_T}$with_ada_sharedlib" >&6
18298
18299 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18300 MAKE_ADA_SHAREDLIB="#"
18301
18302 if test "x$with_ada_sharedlib" != xno
18303 then
18304         MAKE_ADA_SHAREDLIB=
18305         if test "x$with_ada_sharedlib" != xyes
18306         then
18307                 ADA_SHAREDLIB="$with_ada_sharedlib"
18308         fi
18309 fi
18310
18311                 fi
18312         fi
18313 else
18314         cf_with_ada=no
18315 fi
18316
18317 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18318 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18319 ###
18320 ### ticlib modules may be a separate library, otherwise contained in termlib.
18321 ### termlib modules may be a separate library, otherwise contained in ncurses.
18322 ###
18323 ### The of "+" or " " between the tokens controls the way the script
18324 ### chooses to split module lists into libraries.
18325 ###
18326 ### (see CF_LIB_RULES).
18327 echo "$as_me:18327: checking for library subsets" >&5
18328 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18329 LIB_SUBSETS=
18330
18331 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18332         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18333         if test "$with_ticlib" != no ; then
18334                 LIB_SUBSETS="${LIB_SUBSETS} "
18335         else
18336                 LIB_SUBSETS="${LIB_SUBSETS}+"
18337         fi
18338 fi
18339
18340 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18341 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18342
18343 if test "$with_termlib" != no ; then
18344         LIB_SUBSETS="${LIB_SUBSETS} "
18345 else
18346         LIB_SUBSETS="${LIB_SUBSETS}+"
18347 fi
18348
18349 LIB_SUBSETS="${LIB_SUBSETS}base"
18350
18351 # Most term-driver calls are to tinfo, but some like init_pair are to the
18352 # base library (so it resides in base).
18353 if test "$with_term_driver" != no ; then
18354         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18355         case $cf_cv_system_name in #(vi
18356         *mingw32*) #(vi
18357                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18358                 ;;
18359         *) #(vi
18360                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18361                 ;;
18362         esac
18363 fi
18364
18365 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18366 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18367
18368 echo "$as_me:18368: result: $LIB_SUBSETS" >&5
18369 echo "${ECHO_T}$LIB_SUBSETS" >&6
18370
18371 ### Construct the list of include-directories to be generated
18372
18373 CPPFLAGS="$CPPFLAGS -I. -I../include"
18374 if test "$srcdir" != "."; then
18375         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18376 fi
18377 if test "$GCC" != yes; then
18378         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18379 elif test "$includedir" != "/usr/include"; then
18380         if test "$includedir" = '${prefix}/include' ; then
18381                 if test $prefix != /usr ; then
18382                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18383                 fi
18384         else
18385                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18386         fi
18387 fi
18388
18389 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18390 if test "$srcdir" != "."; then
18391         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18392 fi
18393 if test "$GCC" != yes; then
18394         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18395 elif test "$includedir" != "/usr/include"; then
18396         if test "$includedir" = '${prefix}/include' ; then
18397                 if test $prefix != /usr ; then
18398                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18399                 fi
18400         else
18401                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18402         fi
18403 fi
18404
18405 ### Build up pieces for makefile rules
18406 echo "$as_me:18406: checking default library suffix" >&5
18407 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18408
18409         case $DFT_LWR_MODEL in
18410         libtool) DFT_ARG_SUFFIX=''   ;;
18411         normal)  DFT_ARG_SUFFIX=''   ;;
18412         debug)   DFT_ARG_SUFFIX='_g' ;;
18413         profile) DFT_ARG_SUFFIX='_p' ;;
18414         shared)  DFT_ARG_SUFFIX=''   ;;
18415         esac
18416         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18417 echo "$as_me:18417: result: $DFT_ARG_SUFFIX" >&5
18418 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18419
18420 echo "$as_me:18420: checking default library-dependency suffix" >&5
18421 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18422
18423         case $DFT_LWR_MODEL in #(vi
18424         libtool) #(vi
18425                 DFT_LIB_SUFFIX='.la'
18426                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18427                 ;;
18428         normal) #(vi
18429                 DFT_LIB_SUFFIX='.a'
18430                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18431                 ;;
18432         debug) #(vi
18433                 DFT_LIB_SUFFIX='_g.a'
18434                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18435                 ;;
18436         profile) #(vi
18437                 DFT_LIB_SUFFIX='_p.a'
18438                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18439                 ;;
18440         shared) #(vi
18441                 case $cf_cv_system_name in
18442                 aix[56]*) #(vi
18443                         DFT_LIB_SUFFIX='.a'
18444                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18445                         ;;
18446                 cygwin*) #(vi
18447                         DFT_LIB_SUFFIX='.dll'
18448                         DFT_DEP_SUFFIX='.dll.a'
18449                         ;;
18450                 darwin*) #(vi
18451                         DFT_LIB_SUFFIX='.dylib'
18452                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18453                         ;;
18454                 hpux*) #(vi
18455                         case $target in
18456                         ia64*) #(vi
18457                                 DFT_LIB_SUFFIX='.so'
18458                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18459                                 ;;
18460                         *) #(vi
18461                                 DFT_LIB_SUFFIX='.sl'
18462                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18463                                 ;;
18464                         esac
18465                         ;;
18466                 *)      DFT_LIB_SUFFIX='.so'
18467                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18468                         ;;
18469                 esac
18470         esac
18471         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18472         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18473 echo "$as_me:18473: result: $DFT_DEP_SUFFIX" >&5
18474 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18475
18476 echo "$as_me:18476: checking default object directory" >&5
18477 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18478
18479         case $DFT_LWR_MODEL in
18480         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18481         normal)  DFT_OBJ_SUBDIR='objects' ;;
18482         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18483         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18484         shared)
18485                 case $cf_cv_system_name in #(vi
18486                 cygwin) #(vi
18487                         DFT_OBJ_SUBDIR='objects' ;;
18488                 *)
18489                         DFT_OBJ_SUBDIR='obj_s' ;;
18490                 esac
18491         esac
18492 echo "$as_me:18492: result: $DFT_OBJ_SUBDIR" >&5
18493 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18494
18495 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18496 if test "$cf_with_cxx" = yes ; then
18497 echo "$as_me:18497: checking c++ library-dependency suffix" >&5
18498 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18499 if test "$with_libtool" != "no"; then
18500         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18501 else
18502
18503         case normal in #(vi
18504         libtool) #(vi
18505                 CXX_LIB_SUFFIX='.la'
18506                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18507                 ;;
18508         normal) #(vi
18509                 CXX_LIB_SUFFIX='.a'
18510                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18511                 ;;
18512         debug) #(vi
18513                 CXX_LIB_SUFFIX='_g.a'
18514                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18515                 ;;
18516         profile) #(vi
18517                 CXX_LIB_SUFFIX='_p.a'
18518                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18519                 ;;
18520         shared) #(vi
18521                 case $cf_cv_system_name in
18522                 aix[56]*) #(vi
18523                         CXX_LIB_SUFFIX='.a'
18524                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18525                         ;;
18526                 cygwin*) #(vi
18527                         CXX_LIB_SUFFIX='.dll'
18528                         CXX_DEP_SUFFIX='.dll.a'
18529                         ;;
18530                 darwin*) #(vi
18531                         CXX_LIB_SUFFIX='.dylib'
18532                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18533                         ;;
18534                 hpux*) #(vi
18535                         case $target in
18536                         ia64*) #(vi
18537                                 CXX_LIB_SUFFIX='.so'
18538                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18539                                 ;;
18540                         *) #(vi
18541                                 CXX_LIB_SUFFIX='.sl'
18542                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18543                                 ;;
18544                         esac
18545                         ;;
18546                 *)      CXX_LIB_SUFFIX='.so'
18547                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18548                         ;;
18549                 esac
18550         esac
18551         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18552         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18553 fi
18554 echo "$as_me:18554: result: $CXX_LIB_SUFFIX" >&5
18555 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18556
18557 fi
18558
18559 # do not want -ldl in build except as needed for -lncurses dependency
18560 if test "$with_dlsym" = yes ; then
18561 if test $DFT_LWR_MODEL = shared || \
18562    test $DFT_LWR_MODEL = libtool ; then
18563
18564 # remove dl library from $LIBS
18565 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18566
18567 fi
18568 fi
18569 ### Set up low-level terminfo dependencies for makefiles.
18570
18571 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18572 # do not need libdl
18573 TICS_LIST=
18574 if test "$with_dlsym" = yes ; then
18575
18576 # remove dl library from $SHLIB_LIST
18577 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18578
18579 fi
18580
18581 if test "$with_ticlib" != no ; then
18582
18583         if test "$with_ticlib" != yes ; then
18584                 TICS_NAME=$with_ticlib
18585                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18586                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18587                 TICS_LIB_SUFFIX="${with_ticlib}"
18588         else
18589                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18590                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18591                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18592         fi
18593         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18594 else
18595         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18596 fi
18597
18598 if test "$with_termlib" != no ; then
18599
18600         if test "$with_termlib" != yes ; then
18601                 TINFO_NAME=$with_termlib
18602                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18603                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18604                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18605                 TINFO_LIB_SUFFIX="${with_termlib}"
18606         else
18607                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18608                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18609                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18610                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18611         fi
18612
18613         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18614         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18615         if test "$DFT_LWR_MODEL" = "libtool"; then
18616                 TEST_ARGS="${TEST_DEPS}"
18617                 TEST_ARG2="${TEST_DEP2}"
18618                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18619                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18620                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18621         else
18622                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18623                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18624                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18625                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18626                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18627         fi
18628 else
18629         # the next lines are needed for linking libtic over libncurses
18630         TINFO_NAME=${LIB_NAME}
18631         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18632         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18633         if test "$with_tic_depends" = yes ; then
18634                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18635         else
18636                 TICS_LIST="$SHLIB_LIST"
18637         fi
18638
18639         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18640 fi
18641
18642 if test "$DFT_LWR_MODEL" = shared ; then
18643         case $cf_cv_system_name in #(vi
18644         cygwin*)
18645                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18646                 TINFO_SUFFIX=.dll
18647                 ;;
18648         esac
18649 fi
18650
18651 if test "$with_dlsym" = yes ; then
18652
18653 # remove dl library from $TICS_LIST
18654 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18655
18656 fi
18657
18658 if test "$DFT_LWR_MODEL" = "libtool"; then
18659     OBJEXT=lo
18660 fi
18661
18662 # needed for Ada95
18663 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18664
18665 case $DFT_LWR_MODEL in
18666 normal|debug|profile)
18667
18668 if test "$GCC" = yes ; then
18669         case $cf_cv_system_name in #(
18670         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18671                 LDFLAGS_STATIC=
18672                 LDFLAGS_SHARED=
18673                 ;;
18674     *)  #( normally, except when broken
18675         LDFLAGS_STATIC=-static
18676         LDFLAGS_SHARED=-dynamic
18677         ;;
18678     esac
18679 else
18680         case $cf_cv_system_name in #(
18681         aix[456]*)      #( from ld manpage
18682                 LDFLAGS_STATIC=-bstatic
18683                 LDFLAGS_SHARED=-bdynamic
18684                 ;;
18685         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18686                 # We could also use just "archive" and "shared".
18687                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18688                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18689                 ;;
18690         irix*)          #( from ld manpage IRIX64
18691                 LDFLAGS_STATIC=-Bstatic
18692                 LDFLAGS_SHARED=-Bdynamic
18693                 ;;
18694         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18695                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18696                 LDFLAGS_STATIC=-noso
18697                 LDFLAGS_SHARED=-so_archive
18698                 ;;
18699         solaris2*)
18700                 LDFLAGS_STATIC=-Bstatic
18701                 LDFLAGS_SHARED=-Bdynamic
18702                 ;;
18703         esac
18704 fi
18705
18706 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
18707 then
18708         echo "$as_me:18708: checking if linker supports switching between static/dynamic" >&5
18709 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
18710
18711         rm -f libconftest.a
18712         cat >conftest.$ac_ext <<EOF
18713 #line 18713 "configure"
18714 #include <stdio.h>
18715 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
18716 EOF
18717         if { (eval echo "$as_me:18717: \"$ac_compile\"") >&5
18718   (eval $ac_compile) 2>&5
18719   ac_status=$?
18720   echo "$as_me:18720: \$? = $ac_status" >&5
18721   (exit $ac_status); } ; then
18722                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
18723                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
18724         fi
18725         rm -f conftest.*
18726
18727         cf_save_LIBS="$LIBS"
18728
18729         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
18730         cat >conftest.$ac_ext <<_ACEOF
18731 #line 18731 "configure"
18732 #include "confdefs.h"
18733
18734 #line 18734 "configure"
18735 #include <stdio.h>
18736 int cf_ldflags_static(FILE *fp);
18737
18738 int
18739 main ()
18740 {
18741
18742         return cf_ldflags_static(stdin);
18743
18744   ;
18745   return 0;
18746 }
18747 _ACEOF
18748 rm -f conftest.$ac_objext conftest$ac_exeext
18749 if { (eval echo "$as_me:18749: \"$ac_link\"") >&5
18750   (eval $ac_link) 2>&5
18751   ac_status=$?
18752   echo "$as_me:18752: \$? = $ac_status" >&5
18753   (exit $ac_status); } &&
18754          { ac_try='test -s conftest$ac_exeext'
18755   { (eval echo "$as_me:18755: \"$ac_try\"") >&5
18756   (eval $ac_try) 2>&5
18757   ac_status=$?
18758   echo "$as_me:18758: \$? = $ac_status" >&5
18759   (exit $ac_status); }; }; then
18760   cf_ldflags_static=yes
18761 else
18762   echo "$as_me: failed program was:" >&5
18763 cat conftest.$ac_ext >&5
18764 cf_ldflags_static=no
18765 fi
18766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18767
18768         rm -f libconftest.*
18769         LIBS="$cf_save_LIBS"
18770
18771         echo "$as_me:18771: result: $cf_ldflags_static" >&5
18772 echo "${ECHO_T}$cf_ldflags_static" >&6
18773
18774         if test $cf_ldflags_static != yes
18775         then
18776                 LDFLAGS_STATIC=
18777                 LDFLAGS_SHARED=
18778         fi
18779 else
18780         LDFLAGS_STATIC=
18781         LDFLAGS_SHARED=
18782 fi
18783
18784         ;;
18785 esac
18786
18787 echo "$as_me:18787: checking where we will install curses.h" >&5
18788 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18789 test "$with_overwrite" = no && \
18790 test "x$includedir" = 'x${prefix}/include' && \
18791         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18792 echo "$as_me:18792: result: $includedir" >&5
18793 echo "${ECHO_T}$includedir" >&6
18794
18795 ### Resolve a conflict between normal and wide-curses by forcing applications
18796 ### that will need libutf8 to add it to their configure script.
18797 if test "$with_overwrite" != no ; then
18798 if test "$NCURSES_LIBUTF8" = 1 ; then
18799         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18800         { echo "$as_me:18800: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18801 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18802 fi
18803 fi
18804 WITH_OVERWRITE=$with_overwrite
18805
18806 # used to separate tack out of the tree
18807 NCURSES_TREE=
18808
18809 ### predefined stuff for the test programs
18810 cat >>confdefs.h <<\EOF
18811 #define HAVE_SLK_COLOR 1
18812 EOF
18813
18814 ### Construct the list of subdirectories for which we'll customize makefiles
18815 ### with the appropriate compile-rules.
18816
18817 echo "$as_me:18817: checking for src modules" >&5
18818 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18819
18820 # dependencies and linker-arguments for test-programs
18821 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18822 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18823 if test "$DFT_LWR_MODEL" = "libtool"; then
18824         TEST_ARGS="${TEST_DEPS}"
18825         TEST_ARG2="${TEST_DEP2}"
18826 else
18827         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18828         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18829 fi
18830
18831 cf_cv_src_modules=
18832 for cf_dir in $modules_to_build
18833 do
18834         if test -f $srcdir/$cf_dir/modules; then
18835
18836                 # We may/may not have tack in the distribution, though the
18837                 # makefile is.
18838                 if test $cf_dir = tack ; then
18839                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18840                                 continue
18841                         fi
18842                 fi
18843
18844                 if test -z "$cf_cv_src_modules"; then
18845                         cf_cv_src_modules=$cf_dir
18846                 else
18847                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18848                 fi
18849
18850                 # Make the ncurses_cfg.h file record the library interface files as
18851                 # well.  These are header files that are the same name as their
18852                 # directory.  Ncurses is the only library that does not follow
18853                 # that pattern.
18854                 if test $cf_dir = tack ; then
18855                         continue
18856                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18857
18858 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18859
18860                         cat >>confdefs.h <<EOF
18861 #define HAVE_${cf_have_include}_H 1
18862 EOF
18863
18864                         cat >>confdefs.h <<EOF
18865 #define HAVE_LIB${cf_have_include} 1
18866 EOF
18867
18868                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18869                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18870                         if test "$DFT_LWR_MODEL" = "libtool"; then
18871                                 TEST_ARGS="${TEST_DEPS}"
18872                                 TEST_ARG2="${TEST_DEP2}"
18873                         else
18874                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18875                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18876                         fi
18877                 fi
18878         fi
18879 done
18880 echo "$as_me:18880: result: $cf_cv_src_modules" >&5
18881 echo "${ECHO_T}$cf_cv_src_modules" >&6
18882
18883 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18884 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18885
18886 SRC_SUBDIRS=
18887 if test "x$cf_with_manpages" != xno ; then
18888         SRC_SUBDIRS="$SRC_SUBDIRS man"
18889 fi
18890 SRC_SUBDIRS="$SRC_SUBDIRS include"
18891 for cf_dir in $cf_cv_src_modules
18892 do
18893         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18894 done
18895 if test "x$cf_with_tests" != "xno" ; then
18896         SRC_SUBDIRS="$SRC_SUBDIRS test"
18897 fi
18898 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18899 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18900
18901 ADA_SUBDIRS=
18902 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18903         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18904         ADA_SUBDIRS="gen src"
18905         if test "x$cf_with_tests" != "xno" ; then
18906                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18907         fi
18908 fi
18909
18910 SUB_MAKEFILES=
18911 for cf_dir in $SRC_SUBDIRS
18912 do
18913         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18914 done
18915
18916 if test -n "$ADA_SUBDIRS"; then
18917         for cf_dir in $ADA_SUBDIRS
18918         do
18919                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18920         done
18921
18922 fi
18923
18924 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18925    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18926    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18927 fi
18928
18929 DIRS_TO_MAKE="lib"
18930 for cf_item in $cf_list_models
18931 do
18932
18933         case $cf_item in
18934         libtool) cf_subdir='obj_lo'  ;;
18935         normal)  cf_subdir='objects' ;;
18936         debug)   cf_subdir='obj_g' ;;
18937         profile) cf_subdir='obj_p' ;;
18938         shared)
18939                 case $cf_cv_system_name in #(vi
18940                 cygwin) #(vi
18941                         cf_subdir='objects' ;;
18942                 *)
18943                         cf_subdir='obj_s' ;;
18944                 esac
18945         esac
18946
18947         for cf_item2 in $DIRS_TO_MAKE
18948         do
18949                 test $cf_item2 = $cf_subdir && break
18950         done
18951         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18952 done
18953 for cf_dir in $DIRS_TO_MAKE
18954 do
18955         test ! -d $cf_dir && mkdir $cf_dir
18956 done
18957
18958 # symbols that differ when compiling Ada95 by itself.
18959 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18960
18961 # values to use as strings
18962 cat >>confdefs.h <<EOF
18963 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18964 EOF
18965
18966 cat >>confdefs.h <<EOF
18967 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18968 EOF
18969
18970 ### Now that we're done running tests, add the compiler-warnings, if any
18971
18972 cf_fix_cppflags=no
18973 cf_new_cflags=
18974 cf_new_cppflags=
18975 cf_new_extra_cppflags=
18976
18977 for cf_add_cflags in $EXTRA_CFLAGS
18978 do
18979 case $cf_fix_cppflags in
18980 no)
18981         case $cf_add_cflags in #(vi
18982         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18983                 case $cf_add_cflags in
18984                 -D*)
18985                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18986
18987                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18988                                 && test -z "${cf_tst_cflags}" \
18989                                 && cf_fix_cppflags=yes
18990
18991                         if test $cf_fix_cppflags = yes ; then
18992                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18993                                 continue
18994                         elif test "${cf_tst_cflags}" = "\"'" ; then
18995                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18996                                 continue
18997                         fi
18998                         ;;
18999                 esac
19000                 case "$CPPFLAGS" in
19001                 *$cf_add_cflags) #(vi
19002                         ;;
19003                 *) #(vi
19004                         case $cf_add_cflags in #(vi
19005                         -D*)
19006                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19007
19008 CPPFLAGS=`echo "$CPPFLAGS" | \
19009         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19010                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19011
19012                                 ;;
19013                         esac
19014                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19015                         ;;
19016                 esac
19017                 ;;
19018         *)
19019                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19020                 ;;
19021         esac
19022         ;;
19023 yes)
19024         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19025
19026         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19027
19028         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19029                 && test -z "${cf_tst_cflags}" \
19030                 && cf_fix_cppflags=no
19031         ;;
19032 esac
19033 done
19034
19035 if test -n "$cf_new_cflags" ; then
19036
19037         CFLAGS="$CFLAGS $cf_new_cflags"
19038 fi
19039
19040 if test -n "$cf_new_cppflags" ; then
19041
19042         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19043 fi
19044
19045 if test -n "$cf_new_extra_cppflags" ; then
19046
19047         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19048 fi
19049
19050 ### Define substitutions for header files to avoid name-pollution
19051
19052 if test "$cf_cv_have_tcgetattr" = yes ; then
19053         HAVE_TCGETATTR=1
19054 else
19055         HAVE_TCGETATTR=0
19056 fi
19057
19058 if test "$ac_cv_header_termio_h" = yes ; then
19059         HAVE_TERMIO_H=1
19060 else
19061         HAVE_TERMIO_H=0
19062 fi
19063
19064 if test "$ac_cv_header_termios_h" = yes ; then
19065         HAVE_TERMIOS_H=1
19066 else
19067         HAVE_TERMIOS_H=0
19068 fi
19069
19070 ################################################################################
19071 test "$use_database" = yes && \
19072 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
19073
19074 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
19075 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
19076
19077 if test x"$enable_pc_files" = xyes ; then \
19078 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
19079 MAKE_PC_FILES=
19080 else
19081 MAKE_PC_FILES="#"
19082 fi
19083
19084 # Extract the first word of "tic", so it can be a program name with args.
19085 set dummy tic; ac_word=$2
19086 echo "$as_me:19086: checking for $ac_word" >&5
19087 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19088 if test "${ac_cv_path_TIC_PATH+set}" = set; then
19089   echo $ECHO_N "(cached) $ECHO_C" >&6
19090 else
19091   case $TIC_PATH in
19092   [\\/]* | ?:[\\/]*)
19093   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
19094   ;;
19095   *)
19096   ac_save_IFS=$IFS; IFS=$ac_path_separator
19097 ac_dummy="$PATH:/usr/local/ncurses/bin"
19098 for ac_dir in $ac_dummy; do
19099   IFS=$ac_save_IFS
19100   test -z "$ac_dir" && ac_dir=.
19101   if $as_executable_p "$ac_dir/$ac_word"; then
19102    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
19103    echo "$as_me:19103: found $ac_dir/$ac_word" >&5
19104    break
19105 fi
19106 done
19107
19108   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
19109   ;;
19110 esac
19111 fi
19112 TIC_PATH=$ac_cv_path_TIC_PATH
19113
19114 if test -n "$TIC_PATH"; then
19115   echo "$as_me:19115: result: $TIC_PATH" >&5
19116 echo "${ECHO_T}$TIC_PATH" >&6
19117 else
19118   echo "$as_me:19118: result: no" >&5
19119 echo "${ECHO_T}no" >&6
19120 fi
19121
19122 if test -n "$FALLBACK_LIST"
19123 then
19124         if test "$TIC_PATH" = unknown
19125         then
19126                 { echo "$as_me:19126: WARNING: no tic program found for fallbacks" >&5
19127 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
19128         fi
19129 fi
19130
19131 if test "x$cf_with_tests" != xno ; then
19132         MAKE_TESTS=
19133 else
19134         MAKE_TESTS="#"
19135 fi
19136
19137 SUB_SCRIPTS=
19138 case $cf_cv_system_name in #(vi
19139 *mingw32*) #(vi
19140         SUB_SCRIPTS="mk-dlls.sh"
19141         ;;
19142 esac
19143
19144 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
19145 ac_config_commands="$ac_config_commands default"
19146 cat >confcache <<\_ACEOF
19147 # This file is a shell script that caches the results of configure
19148 # tests run on this system so they can be shared between configure
19149 # scripts and configure runs, see configure's option --config-cache.
19150 # It is not useful on other systems.  If it contains results you don't
19151 # want to keep, you may remove or edit it.
19152 #
19153 # config.status only pays attention to the cache file if you give it
19154 # the --recheck option to rerun configure.
19155 #
19156 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19157 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19158 # following values.
19159
19160 _ACEOF
19161
19162 # The following way of writing the cache mishandles newlines in values,
19163 # but we know of no workaround that is simple, portable, and efficient.
19164 # So, don't put newlines in cache variables' values.
19165 # Ultrix sh set writes to stderr and can't be redirected directly,
19166 # and sets the high bit in the cache file unless we assign to the vars.
19167 {
19168   (set) 2>&1 |
19169     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19170     *ac_space=\ *)
19171       # `set' does not quote correctly, so add quotes (double-quote
19172       # substitution turns \\\\ into \\, and sed turns \\ into \).
19173       sed -n \
19174         "s/'/'\\\\''/g;
19175           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19176       ;;
19177     *)
19178       # `set' quotes correctly as required by POSIX, so do not add quotes.
19179       sed -n \
19180         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19181       ;;
19182     esac;
19183 } |
19184   sed '
19185      t clear
19186      : clear
19187      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19188      t end
19189      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19190      : end' >>confcache
19191 if cmp -s $cache_file confcache; then :; else
19192   if test -w $cache_file; then
19193     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19194     cat confcache >$cache_file
19195   else
19196     echo "not updating unwritable cache $cache_file"
19197   fi
19198 fi
19199 rm -f confcache
19200
19201 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19202 # Let make expand exec_prefix.
19203 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19204
19205 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19206 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19207 # trailing colons and then remove the whole line if VPATH becomes empty
19208 # (actually we leave an empty line to preserve line numbers).
19209 if test "x$srcdir" = x.; then
19210   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19211 s/:*\$(srcdir):*/:/;
19212 s/:*\${srcdir}:*/:/;
19213 s/:*@srcdir@:*/:/;
19214 s/^\([^=]*=[    ]*\):*/\1/;
19215 s/:*$//;
19216 s/^[^=]*=[      ]*$//;
19217 }'
19218 fi
19219
19220 DEFS=-DHAVE_CONFIG_H
19221
19222 : ${CONFIG_STATUS=./config.status}
19223 ac_clean_files_save=$ac_clean_files
19224 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19225 { echo "$as_me:19225: creating $CONFIG_STATUS" >&5
19226 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19227 cat >$CONFIG_STATUS <<_ACEOF
19228 #! $SHELL
19229 # Generated automatically by configure.
19230 # Run this file to recreate the current configuration.
19231 # Compiler output produced by configure, useful for debugging
19232 # configure, is in config.log if it exists.
19233
19234 debug=false
19235 SHELL=\${CONFIG_SHELL-$SHELL}
19236 ac_cs_invocation="\$0 \$@"
19237
19238 _ACEOF
19239
19240 cat >>$CONFIG_STATUS <<\_ACEOF
19241 # Be Bourne compatible
19242 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19243   emulate sh
19244   NULLCMD=:
19245 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19246   set -o posix
19247 fi
19248
19249 # Name of the executable.
19250 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19251
19252 if expr a : '\(a\)' >/dev/null 2>&1; then
19253   as_expr=expr
19254 else
19255   as_expr=false
19256 fi
19257
19258 rm -f conf$$ conf$$.exe conf$$.file
19259 echo >conf$$.file
19260 if ln -s conf$$.file conf$$ 2>/dev/null; then
19261   # We could just check for DJGPP; but this test a) works b) is more generic
19262   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19263   if test -f conf$$.exe; then
19264     # Don't use ln at all; we don't have any links
19265     as_ln_s='cp -p'
19266   else
19267     as_ln_s='ln -s'
19268   fi
19269 elif ln conf$$.file conf$$ 2>/dev/null; then
19270   as_ln_s=ln
19271 else
19272   as_ln_s='cp -p'
19273 fi
19274 rm -f conf$$ conf$$.exe conf$$.file
19275
19276 as_executable_p="test -f"
19277
19278 # Support unset when possible.
19279 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19280   as_unset=unset
19281 else
19282   as_unset=false
19283 fi
19284
19285 # NLS nuisances.
19286 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19287 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19288 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19289 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19290 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19291 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19292 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19293 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19294
19295 # IFS
19296 # We need space, tab and new line, in precisely that order.
19297 as_nl='
19298 '
19299 IFS="   $as_nl"
19300
19301 # CDPATH.
19302 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19303
19304 exec 6>&1
19305
19306 _ACEOF
19307
19308 # Files that config.status was made for.
19309 if test -n "$ac_config_files"; then
19310   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19311 fi
19312
19313 if test -n "$ac_config_headers"; then
19314   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19315 fi
19316
19317 if test -n "$ac_config_links"; then
19318   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19319 fi
19320
19321 if test -n "$ac_config_commands"; then
19322   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19323 fi
19324
19325 cat >>$CONFIG_STATUS <<\EOF
19326
19327 ac_cs_usage="\
19328 \`$as_me' instantiates files from templates according to the
19329 current configuration.
19330
19331 Usage: $0 [OPTIONS] [FILE]...
19332
19333   -h, --help       print this help, then exit
19334   -V, --version    print version number, then exit
19335   -d, --debug      don't remove temporary files
19336       --recheck    update $as_me by reconfiguring in the same conditions
19337   --file=FILE[:TEMPLATE]
19338                    instantiate the configuration file FILE
19339   --header=FILE[:TEMPLATE]
19340                    instantiate the configuration header FILE
19341
19342 Configuration files:
19343 $config_files
19344
19345 Configuration headers:
19346 $config_headers
19347
19348 Configuration commands:
19349 $config_commands
19350
19351 Report bugs to <dickey@invisible-island.net>."
19352 EOF
19353
19354 cat >>$CONFIG_STATUS <<EOF
19355 ac_cs_version="\\
19356 config.status
19357 configured by $0, generated by GNU Autoconf 2.52.20101001,
19358   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19359
19360 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19361 Free Software Foundation, Inc.
19362 This config.status script is free software; the Free Software Foundation
19363 gives unlimited permission to copy, distribute and modify it."
19364 srcdir=$srcdir
19365 INSTALL="$INSTALL"
19366 EOF
19367
19368 cat >>$CONFIG_STATUS <<\EOF
19369 # If no file are specified by the user, then we need to provide default
19370 # value.  By we need to know if files were specified by the user.
19371 ac_need_defaults=:
19372 while test $# != 0
19373 do
19374   case $1 in
19375   --*=*)
19376     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19377     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19378     shift
19379     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19380     shift
19381     ;;
19382   -*);;
19383   *) # This is not an option, so the user has probably given explicit
19384      # arguments.
19385      ac_need_defaults=false;;
19386   esac
19387
19388   case $1 in
19389   # Handling of the options.
19390 EOF
19391 cat >>$CONFIG_STATUS <<EOF
19392   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19393     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19394     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19395 EOF
19396 cat >>$CONFIG_STATUS <<\EOF
19397   --version | --vers* | -V )
19398     echo "$ac_cs_version"; exit 0 ;;
19399   --he | --h)
19400     # Conflict between --help and --header
19401     { { echo "$as_me:19401: error: ambiguous option: $1
19402 Try \`$0 --help' for more information." >&5
19403 echo "$as_me: error: ambiguous option: $1
19404 Try \`$0 --help' for more information." >&2;}
19405    { (exit 1); exit 1; }; };;
19406   --help | --hel | -h )
19407     echo "$ac_cs_usage"; exit 0 ;;
19408   --debug | --d* | -d )
19409     debug=: ;;
19410   --file | --fil | --fi | --f )
19411     shift
19412     CONFIG_FILES="$CONFIG_FILES $1"
19413     ac_need_defaults=false;;
19414   --header | --heade | --head | --hea )
19415     shift
19416     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19417     ac_need_defaults=false;;
19418
19419   # This is an error.
19420   -*) { { echo "$as_me:19420: error: unrecognized option: $1
19421 Try \`$0 --help' for more information." >&5
19422 echo "$as_me: error: unrecognized option: $1
19423 Try \`$0 --help' for more information." >&2;}
19424    { (exit 1); exit 1; }; } ;;
19425
19426   *) ac_config_targets="$ac_config_targets $1" ;;
19427
19428   esac
19429   shift
19430 done
19431
19432 exec 5>>config.log
19433 cat >&5 << _ACEOF
19434
19435 ## ----------------------- ##
19436 ## Running config.status.  ##
19437 ## ----------------------- ##
19438
19439 This file was extended by $as_me 2.52.20101001, executed with
19440   CONFIG_FILES    = $CONFIG_FILES
19441   CONFIG_HEADERS  = $CONFIG_HEADERS
19442   CONFIG_LINKS    = $CONFIG_LINKS
19443   CONFIG_COMMANDS = $CONFIG_COMMANDS
19444   > $ac_cs_invocation
19445 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19446
19447 _ACEOF
19448 EOF
19449
19450 cat >>$CONFIG_STATUS <<EOF
19451 #
19452 # INIT-COMMANDS section.
19453 #
19454
19455 ### Special initialization commands, used to pass information from the
19456 ### configuration-run into config.status
19457
19458 AWK="$AWK"
19459 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19460 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19461 ECHO_LINK="$ECHO_LINK"
19462 LDCONFIG="$LDCONFIG"
19463 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19464 LIB_NAME="$LIB_NAME"
19465 LIB_SUBSETS="$LIB_SUBSETS"
19466 LIB_SUFFIX="$LIB_SUFFIX"
19467 LIB_TRACING="$LIB_TRACING"
19468 LN_S="$LN_S"
19469 MAKE_TERMINFO="$MAKE_TERMINFO"
19470 NCURSES_MAJOR="$NCURSES_MAJOR"
19471 NCURSES_MINOR="$NCURSES_MINOR"
19472 NCURSES_OSPEED="$NCURSES_OSPEED"
19473 NCURSES_PATCH="$NCURSES_PATCH"
19474 SRC_SUBDIRS="$SRC_SUBDIRS"
19475 TERMINFO="$TERMINFO"
19476 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19477 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19478 TICS_NAME="$TICS_NAME"
19479 TIC_PATH="$TIC_PATH"
19480 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19481 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19482 TINFO_NAME="$TINFO_NAME"
19483 TINFO_SUFFIX="$TINFO_SUFFIX"
19484 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19485 WITH_CURSES_H="$with_curses_h"
19486 WITH_ECHO="$with_echo"
19487 WITH_OVERWRITE="$with_overwrite"
19488 cf_LIST_MODELS="$cf_list_models"
19489 cf_cv_abi_version="$cf_cv_abi_version"
19490 cf_cv_do_relink="$cf_cv_do_relink"
19491 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19492 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19493 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19494 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19495 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19496 cf_cv_rel_version="$cf_cv_rel_version"
19497 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19498 cf_cv_shared_soname='$cf_cv_shared_soname'
19499 cf_cv_shlib_version="$cf_cv_shlib_version"
19500 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19501 cf_cv_system_name="$cf_cv_system_name"
19502 cf_with_ada="$cf_with_ada"
19503 cf_with_cxx_binding="$cf_with_cxx_binding"
19504 cf_with_manpages="$cf_with_manpages"
19505 cf_with_tests="$cf_with_tests"
19506 host="$host"
19507 target="$target"
19508
19509 EOF
19510
19511 cat >>$CONFIG_STATUS <<\EOF
19512 for ac_config_target in $ac_config_targets
19513 do
19514   case "$ac_config_target" in
19515   # Handling of arguments.
19516   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19517   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19518   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19519   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19520   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19521   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
19522   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19523   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19524   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19525   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19526   *) { { echo "$as_me:19526: error: invalid argument: $ac_config_target" >&5
19527 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19528    { (exit 1); exit 1; }; };;
19529   esac
19530 done
19531
19532 # If the user did not use the arguments to specify the items to instantiate,
19533 # then the envvar interface is used.  Set only those that are not.
19534 # We use the long form for the default assignment because of an extremely
19535 # bizarre bug on SunOS 4.1.3.
19536 if $ac_need_defaults; then
19537   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19538   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19539   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19540 fi
19541
19542 # Create a temporary directory, and hook for its removal unless debugging.
19543 $debug ||
19544 {
19545   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19546   trap '{ (exit 1); exit 1; }' 1 2 13 15
19547 }
19548
19549 # Create a (secure) tmp directory for tmp files.
19550 : ${TMPDIR=/tmp}
19551 {
19552   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19553   test -n "$tmp" && test -d "$tmp"
19554 }  ||
19555 {
19556   tmp=$TMPDIR/cs$$-$RANDOM
19557   (umask 077 && mkdir $tmp)
19558 } ||
19559 {
19560    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19561    { (exit 1); exit 1; }
19562 }
19563
19564 EOF
19565
19566 cat >>$CONFIG_STATUS <<EOF
19567
19568 #
19569 # CONFIG_FILES section.
19570 #
19571
19572 # No need to generate the scripts if there are no CONFIG_FILES.
19573 # This happens for instance when ./config.status config.h
19574 if test -n "\$CONFIG_FILES"; then
19575   # Protect against being on the right side of a sed subst in config.status.
19576   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19577    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19578 s,@SHELL@,$SHELL,;t t
19579 s,@exec_prefix@,$exec_prefix,;t t
19580 s,@prefix@,$prefix,;t t
19581 s,@program_transform_name@,$program_transform_name,;t t
19582 s,@bindir@,$bindir,;t t
19583 s,@sbindir@,$sbindir,;t t
19584 s,@libexecdir@,$libexecdir,;t t
19585 s,@datadir@,$datadir,;t t
19586 s,@sysconfdir@,$sysconfdir,;t t
19587 s,@sharedstatedir@,$sharedstatedir,;t t
19588 s,@localstatedir@,$localstatedir,;t t
19589 s,@libdir@,$libdir,;t t
19590 s,@includedir@,$includedir,;t t
19591 s,@oldincludedir@,$oldincludedir,;t t
19592 s,@infodir@,$infodir,;t t
19593 s,@mandir@,$mandir,;t t
19594 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19595 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19596 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19597 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19598 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19599 s,@build_alias@,$build_alias,;t t
19600 s,@host_alias@,$host_alias,;t t
19601 s,@target_alias@,$target_alias,;t t
19602 s,@ECHO_C@,$ECHO_C,;t t
19603 s,@ECHO_N@,$ECHO_N,;t t
19604 s,@ECHO_T@,$ECHO_T,;t t
19605 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19606 s,@DEFS@,$DEFS,;t t
19607 s,@LIBS@,$LIBS,;t t
19608 s,@top_builddir@,$top_builddir,;t t
19609 s,@EGREP@,$EGREP,;t t
19610 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19611 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19612 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19613 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19614 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19615 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19616 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19617 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19618 s,@build@,$build,;t t
19619 s,@build_cpu@,$build_cpu,;t t
19620 s,@build_vendor@,$build_vendor,;t t
19621 s,@build_os@,$build_os,;t t
19622 s,@host@,$host,;t t
19623 s,@host_cpu@,$host_cpu,;t t
19624 s,@host_vendor@,$host_vendor,;t t
19625 s,@host_os@,$host_os,;t t
19626 s,@target@,$target,;t t
19627 s,@target_cpu@,$target_cpu,;t t
19628 s,@target_vendor@,$target_vendor,;t t
19629 s,@target_os@,$target_os,;t t
19630 s,@CC@,$CC,;t t
19631 s,@CFLAGS@,$CFLAGS,;t t
19632 s,@LDFLAGS@,$LDFLAGS,;t t
19633 s,@CPPFLAGS@,$CPPFLAGS,;t t
19634 s,@ac_ct_CC@,$ac_ct_CC,;t t
19635 s,@EXEEXT@,$EXEEXT,;t t
19636 s,@OBJEXT@,$OBJEXT,;t t
19637 s,@CPP@,$CPP,;t t
19638 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19639 s,@PROG_EXT@,$PROG_EXT,;t t
19640 s,@LDCONFIG@,$LDCONFIG,;t t
19641 s,@CXX@,$CXX,;t t
19642 s,@CXXFLAGS@,$CXXFLAGS,;t t
19643 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19644 s,@AWK@,$AWK,;t t
19645 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19646 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19647 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19648 s,@LINT@,$LINT,;t t
19649 s,@LINT_OPTS@,$LINT_OPTS,;t t
19650 s,@LN_S@,$LN_S,;t t
19651 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19652 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19653 s,@SET_MAKE@,$SET_MAKE,;t t
19654 s,@CTAGS@,$CTAGS,;t t
19655 s,@ETAGS@,$ETAGS,;t t
19656 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19657 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19658 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19659 s,@RANLIB@,$RANLIB,;t t
19660 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19661 s,@LD@,$LD,;t t
19662 s,@ac_ct_LD@,$ac_ct_LD,;t t
19663 s,@AR@,$AR,;t t
19664 s,@ac_ct_AR@,$ac_ct_AR,;t t
19665 s,@ARFLAGS@,$ARFLAGS,;t t
19666 s,@DESTDIR@,$DESTDIR,;t t
19667 s,@BUILD_CC@,$BUILD_CC,;t t
19668 s,@BUILD_CPP@,$BUILD_CPP,;t t
19669 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19670 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19671 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19672 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19673 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19674 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19675 s,@cf_list_models@,$cf_list_models,;t t
19676 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
19677 s,@LIBTOOL@,$LIBTOOL,;t t
19678 s,@LT_UNDEF@,$LT_UNDEF,;t t
19679 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19680 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19681 s,@LIB_CREATE@,$LIB_CREATE,;t t
19682 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19683 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19684 s,@LIB_PREP@,$LIB_PREP,;t t
19685 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19686 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19687 s,@LIB_LINK@,$LIB_LINK,;t t
19688 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19689 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19690 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19691 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19692 s,@TICS_NAME@,$TICS_NAME,;t t
19693 s,@TINFO_NAME@,$TINFO_NAME,;t t
19694 s,@LIB_NAME@,$LIB_NAME,;t t
19695 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19696 s,@CC_G_OPT@,$CC_G_OPT,;t t
19697 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19698 s,@LD_MODEL@,$LD_MODEL,;t t
19699 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19700 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19701 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19702 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19703 s,@LINK_PROGS@,$LINK_PROGS,;t t
19704 s,@LINK_TESTS@,$LINK_TESTS,;t t
19705 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19706 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19707 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19708 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19709 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19710 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19711 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19712 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19713 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19714 s,@TERMINFO@,$TERMINFO,;t t
19715 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19716 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19717 s,@TERMPATH@,$TERMPATH,;t t
19718 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19719 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19720 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19721 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19722 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19723 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19724 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19725 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19726 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19727 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19728 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19729 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19730 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19731 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19732 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19733 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19734 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19735 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19736 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19737 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19738 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19739 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19740 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19741 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19742 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19743 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19744 s,@PTHREAD@,$PTHREAD,;t t
19745 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19746 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19747 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19748 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19749 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19750 s,@ECHO_LINK@,$ECHO_LINK,;t t
19751 s,@ADAFLAGS@,$ADAFLAGS,;t t
19752 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19753 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19754 s,@ADA_TRACE@,$ADA_TRACE,;t t
19755 s,@MATH_LIB@,$MATH_LIB,;t t
19756 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19757 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19758 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19759 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19760 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19761 s,@TEST_LIBS@,$TEST_LIBS,;t t
19762 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19763 s,@CXXCPP@,$CXXCPP,;t t
19764 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19765 s,@CXX_AR@,$CXX_AR,;t t
19766 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19767 s,@CXXLIBS@,$CXXLIBS,;t t
19768 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19769 s,@gnat_exists@,$gnat_exists,;t t
19770 s,@cf_compile_generics@,$cf_compile_generics,;t t
19771 s,@cf_generic_objects@,$cf_generic_objects,;t t
19772 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
19773 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
19774 s,@M4_exists@,$M4_exists,;t t
19775 s,@cf_ada_make@,$cf_ada_make,;t t
19776 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19777 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19778 s,@cf_ada_package@,$cf_ada_package,;t t
19779 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19780 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19781 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
19782 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
19783 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19784 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19785 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19786 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19787 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19788 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19789 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19790 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19791 s,@TICS_ARGS@,$TICS_ARGS,;t t
19792 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19793 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19794 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19795 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19796 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19797 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19798 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19799 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19800 s,@TICS_LIST@,$TICS_LIST,;t t
19801 s,@TINFO_LIST@,$TINFO_LIST,;t t
19802 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19803 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19804 s,@TEST_ARGS@,$TEST_ARGS,;t t
19805 s,@TEST_DEPS@,$TEST_DEPS,;t t
19806 s,@TEST_ARG2@,$TEST_ARG2,;t t
19807 s,@TEST_DEP2@,$TEST_DEP2,;t t
19808 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19809 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19810 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19811 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19812 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19813 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19814 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19815 s,@cross_compiling@,$cross_compiling,;t t
19816 s,@TIC_PATH@,$TIC_PATH,;t t
19817 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
19818 CEOF
19819
19820 EOF
19821
19822   cat >>$CONFIG_STATUS <<\EOF
19823   # Split the substitutions into bite-sized pieces for seds with
19824   # small command number limits, like on Digital OSF/1 and HP-UX.
19825   ac_max_sed_lines=48
19826   ac_sed_frag=1 # Number of current file.
19827   ac_beg=1 # First line for current file.
19828   ac_end=$ac_max_sed_lines # Line after last line for current file.
19829   ac_more_lines=:
19830   ac_sed_cmds=
19831   while $ac_more_lines; do
19832     if test $ac_beg -gt 1; then
19833       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19834     else
19835       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19836     fi
19837     if test ! -s $tmp/subs.frag; then
19838       ac_more_lines=false
19839     else
19840       # The purpose of the label and of the branching condition is to
19841       # speed up the sed processing (if there are no `@' at all, there
19842       # is no need to browse any of the substitutions).
19843       # These are the two extra sed commands mentioned above.
19844       (echo ':t
19845   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19846       if test -z "$ac_sed_cmds"; then
19847         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19848       else
19849         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19850       fi
19851       ac_sed_frag=`expr $ac_sed_frag + 1`
19852       ac_beg=$ac_end
19853       ac_end=`expr $ac_end + $ac_max_sed_lines`
19854     fi
19855   done
19856   if test -z "$ac_sed_cmds"; then
19857     ac_sed_cmds=cat
19858   fi
19859 fi # test -n "$CONFIG_FILES"
19860
19861 EOF
19862 cat >>$CONFIG_STATUS <<\EOF
19863 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19864   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19865   case $ac_file in
19866   - | *:- | *:-:* ) # input from stdin
19867         cat >$tmp/stdin
19868         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19869         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19870   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19871         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19872   * )   ac_file_in=$ac_file.in ;;
19873   esac
19874
19875   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19876   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19877          X"$ac_file" : 'X\(//\)[^/]' \| \
19878          X"$ac_file" : 'X\(//\)$' \| \
19879          X"$ac_file" : 'X\(/\)' \| \
19880          .     : '\(.\)' 2>/dev/null ||
19881 echo X"$ac_file" |
19882     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19883           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19884           /^X\(\/\/\)$/{ s//\1/; q; }
19885           /^X\(\/\).*/{ s//\1/; q; }
19886           s/.*/./; q'`
19887   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19888     { case "$ac_dir" in
19889   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19890   *)                      as_incr_dir=.;;
19891 esac
19892 as_dummy="$ac_dir"
19893 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19894   case $as_mkdir_dir in
19895     # Skip DOS drivespec
19896     ?:) as_incr_dir=$as_mkdir_dir ;;
19897     *)
19898       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19899       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19900     ;;
19901   esac
19902 done; }
19903
19904     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19905     # A "../" for each directory in $ac_dir_suffix.
19906     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19907   else
19908     ac_dir_suffix= ac_dots=
19909   fi
19910
19911   case $srcdir in
19912   .)  ac_srcdir=.
19913       if test -z "$ac_dots"; then
19914          ac_top_srcdir=.
19915       else
19916          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19917       fi ;;
19918   [\\/]* | ?:[\\/]* )
19919       ac_srcdir=$srcdir$ac_dir_suffix;
19920       ac_top_srcdir=$srcdir ;;
19921   *) # Relative path.
19922     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19923     ac_top_srcdir=$ac_dots$srcdir ;;
19924   esac
19925
19926   case $INSTALL in
19927   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19928   *) ac_INSTALL=$ac_dots$INSTALL ;;
19929   esac
19930
19931   if test x"$ac_file" != x-; then
19932     { echo "$as_me:19932: creating $ac_file" >&5
19933 echo "$as_me: creating $ac_file" >&6;}
19934     rm -f "$ac_file"
19935   fi
19936   # Let's still pretend it is `configure' which instantiates (i.e., don't
19937   # use $as_me), people would be surprised to read:
19938   #    /* config.h.  Generated automatically by config.status.  */
19939   configure_input="Generated automatically from `echo $ac_file_in |
19940                                                  sed 's,.*/,,'` by configure."
19941
19942   # First look for the input files in the build tree, otherwise in the
19943   # src tree.
19944   ac_file_inputs=`IFS=:
19945     for f in $ac_file_in; do
19946       case $f in
19947       -) echo $tmp/stdin ;;
19948       [\\/$]*)
19949          # Absolute (can't be DOS-style, as IFS=:)
19950          test -f "$f" || { { echo "$as_me:19950: error: cannot find input file: $f" >&5
19951 echo "$as_me: error: cannot find input file: $f" >&2;}
19952    { (exit 1); exit 1; }; }
19953          echo $f;;
19954       *) # Relative
19955          if test -f "$f"; then
19956            # Build tree
19957            echo $f
19958          elif test -f "$srcdir/$f"; then
19959            # Source tree
19960            echo $srcdir/$f
19961          else
19962            # /dev/null tree
19963            { { echo "$as_me:19963: error: cannot find input file: $f" >&5
19964 echo "$as_me: error: cannot find input file: $f" >&2;}
19965    { (exit 1); exit 1; }; }
19966          fi;;
19967       esac
19968     done` || { (exit 1); exit 1; }
19969 EOF
19970 cat >>$CONFIG_STATUS <<EOF
19971   sed "$ac_vpsub
19972 $extrasub
19973 EOF
19974 cat >>$CONFIG_STATUS <<\EOF
19975 :t
19976 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19977 s,@configure_input@,$configure_input,;t t
19978 s,@srcdir@,$ac_srcdir,;t t
19979 s,@top_srcdir@,$ac_top_srcdir,;t t
19980 s,@INSTALL@,$ac_INSTALL,;t t
19981 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19982   rm -f $tmp/stdin
19983   if test x"$ac_file" != x-; then
19984     mv $tmp/out $ac_file
19985   else
19986     cat $tmp/out
19987     rm -f $tmp/out
19988   fi
19989
19990 done
19991 EOF
19992 cat >>$CONFIG_STATUS <<\EOF
19993
19994 #
19995 # CONFIG_HEADER section.
19996 #
19997
19998 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19999 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20000 #
20001 # ac_d sets the value in "#define NAME VALUE" lines.
20002 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20003 ac_dB='[        ].*$,\1#\2'
20004 ac_dC=' '
20005 ac_dD=',;t'
20006 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20007 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20008 ac_iB='\([      ]\),\1#\2define\3'
20009 ac_iC=' '
20010 ac_iD='\4,;t'
20011 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20012 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20013 ac_uB='$,\1#\2define\3'
20014 ac_uC=' '
20015 ac_uD=',;t'
20016
20017 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20018   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20019   case $ac_file in
20020   - | *:- | *:-:* ) # input from stdin
20021         cat >$tmp/stdin
20022         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20023         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20024   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20025         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20026   * )   ac_file_in=$ac_file.in ;;
20027   esac
20028
20029   test x"$ac_file" != x- && { echo "$as_me:20029: creating $ac_file" >&5
20030 echo "$as_me: creating $ac_file" >&6;}
20031
20032   # First look for the input files in the build tree, otherwise in the
20033   # src tree.
20034   ac_file_inputs=`IFS=:
20035     for f in $ac_file_in; do
20036       case $f in
20037       -) echo $tmp/stdin ;;
20038       [\\/$]*)
20039          # Absolute (can't be DOS-style, as IFS=:)
20040          test -f "$f" || { { echo "$as_me:20040: error: cannot find input file: $f" >&5
20041 echo "$as_me: error: cannot find input file: $f" >&2;}
20042    { (exit 1); exit 1; }; }
20043          echo $f;;
20044       *) # Relative
20045          if test -f "$f"; then
20046            # Build tree
20047            echo $f
20048          elif test -f "$srcdir/$f"; then
20049            # Source tree
20050            echo $srcdir/$f
20051          else
20052            # /dev/null tree
20053            { { echo "$as_me:20053: error: cannot find input file: $f" >&5
20054 echo "$as_me: error: cannot find input file: $f" >&2;}
20055    { (exit 1); exit 1; }; }
20056          fi;;
20057       esac
20058     done` || { (exit 1); exit 1; }
20059   # Remove the trailing spaces.
20060   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20061
20062 EOF
20063
20064 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
20065 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
20066 # be either 'cat' or 'sort'.
20067 cat confdefs.h | uniq >conftest.vals
20068
20069 # Break up conftest.vals because some shells have a limit on
20070 # the size of here documents, and old seds have small limits too.
20071
20072 rm -f conftest.tail
20073 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
20074 while grep . conftest.vals >/dev/null
20075 do
20076   # Write chunks of a limited-size here document to conftest.frag.
20077   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20078   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20079   echo 'CEOF' >> $CONFIG_STATUS
20080   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20081   rm -f conftest.vals
20082   mv conftest.tail conftest.vals
20083 done
20084 rm -f conftest.vals
20085
20086 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20087 # marker @DEFS@.
20088 echo '  cat >> conftest.edit <<CEOF
20089 /@DEFS@/r conftest.frag
20090 /@DEFS@/d
20091 CEOF
20092 sed -f conftest.edit $tmp/in > $tmp/out
20093 rm -f $tmp/in
20094 mv $tmp/out $tmp/in
20095 rm -f conftest.edit conftest.frag
20096 ' >> $CONFIG_STATUS
20097
20098 cat >>$CONFIG_STATUS <<\EOF
20099   # Let's still pretend it is `configure' which instantiates (i.e., don't
20100   # use $as_me), people would be surprised to read:
20101   #    /* config.h.  Generated automatically by config.status.  */
20102   if test x"$ac_file" = x-; then
20103     echo "/* Generated automatically by configure.  */" >$tmp/config.h
20104   else
20105     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
20106   fi
20107   cat $tmp/in >>$tmp/config.h
20108   rm -f $tmp/in
20109   if test x"$ac_file" != x-; then
20110     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20111       { echo "$as_me:20111: $ac_file is unchanged" >&5
20112 echo "$as_me: $ac_file is unchanged" >&6;}
20113     else
20114       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20115          X"$ac_file" : 'X\(//\)[^/]' \| \
20116          X"$ac_file" : 'X\(//\)$' \| \
20117          X"$ac_file" : 'X\(/\)' \| \
20118          .     : '\(.\)' 2>/dev/null ||
20119 echo X"$ac_file" |
20120     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20121           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20122           /^X\(\/\/\)$/{ s//\1/; q; }
20123           /^X\(\/\).*/{ s//\1/; q; }
20124           s/.*/./; q'`
20125       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20126         { case "$ac_dir" in
20127   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20128   *)                      as_incr_dir=.;;
20129 esac
20130 as_dummy="$ac_dir"
20131 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20132   case $as_mkdir_dir in
20133     # Skip DOS drivespec
20134     ?:) as_incr_dir=$as_mkdir_dir ;;
20135     *)
20136       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20137       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20138     ;;
20139   esac
20140 done; }
20141
20142       fi
20143       rm -f $ac_file
20144       mv $tmp/config.h $ac_file
20145     fi
20146   else
20147     cat $tmp/config.h
20148     rm -f $tmp/config.h
20149   fi
20150 done
20151 EOF
20152 cat >>$CONFIG_STATUS <<\EOF
20153 #
20154 # CONFIG_COMMANDS section.
20155 #
20156 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20157   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20158   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20159
20160   case $ac_dest in
20161     default )
20162 if test "x$cf_with_tests" != xno ; then
20163
20164 for cf_dir in test
20165 do
20166         if test ! -d $srcdir/$cf_dir; then
20167                 continue
20168         elif test -f $srcdir/$cf_dir/programs; then
20169                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20170         fi
20171 done
20172
20173 fi
20174
20175         case $cf_cv_system_name in #(vi
20176         OS/2*|os2*) #(vi
20177         LIB_PREFIX=''
20178         ;;
20179         *)      LIB_PREFIX='lib'
20180         ;;
20181         esac
20182 cf_prefix=$LIB_PREFIX
20183
20184 if test $cf_cv_shlib_version = cygdll ; then
20185         TINFO_NAME=$TINFO_ARG_SUFFIX
20186         TINFO_SUFFIX=.dll
20187 fi
20188
20189 if test -n "$TINFO_SUFFIX" ; then
20190         case $TINFO_SUFFIX in
20191         tw*)
20192                 TINFO_NAME="${TINFO_NAME}tw"
20193                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
20194                 ;;
20195         t*)
20196                 TINFO_NAME="${TINFO_NAME}t"
20197                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
20198                 ;;
20199         w*)
20200                 TINFO_NAME="${TINFO_NAME}w"
20201                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
20202                 ;;
20203         esac
20204 fi
20205
20206 for cf_dir in $SRC_SUBDIRS
20207 do
20208         if test ! -d $srcdir/$cf_dir ; then
20209                 continue
20210         elif test -f $srcdir/$cf_dir/modules; then
20211
20212                 SHARED_LIB=
20213                 LIBS_TO_MAKE=
20214                 for cf_item in $cf_LIST_MODELS
20215                 do
20216
20217         case $cf_item in #(vi
20218         libtool) #(vi
20219                 cf_suffix='.la'
20220                 cf_depsuf=$cf_suffix
20221                 ;;
20222         normal) #(vi
20223                 cf_suffix='.a'
20224                 cf_depsuf=$cf_suffix
20225                 ;;
20226         debug) #(vi
20227                 cf_suffix='_g.a'
20228                 cf_depsuf=$cf_suffix
20229                 ;;
20230         profile) #(vi
20231                 cf_suffix='_p.a'
20232                 cf_depsuf=$cf_suffix
20233                 ;;
20234         shared) #(vi
20235                 case $cf_cv_system_name in
20236                 aix[56]*) #(vi
20237                         cf_suffix='.a'
20238                         cf_depsuf=$cf_suffix
20239                         ;;
20240                 cygwin*) #(vi
20241                         cf_suffix='.dll'
20242                         cf_depsuf='.dll.a'
20243                         ;;
20244                 darwin*) #(vi
20245                         cf_suffix='.dylib'
20246                         cf_depsuf=$cf_suffix
20247                         ;;
20248                 hpux*) #(vi
20249                         case $target in
20250                         ia64*) #(vi
20251                                 cf_suffix='.so'
20252                                 cf_depsuf=$cf_suffix
20253                                 ;;
20254                         *) #(vi
20255                                 cf_suffix='.sl'
20256                                 cf_depsuf=$cf_suffix
20257                                 ;;
20258                         esac
20259                         ;;
20260                 *)      cf_suffix='.so'
20261                         cf_depsuf=$cf_suffix
20262                         ;;
20263                 esac
20264         esac
20265         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20266         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20267
20268                         if test $cf_item = shared ; then
20269                         if test "$cf_cv_do_symlinks" = yes ; then
20270                                 case "$cf_cv_shlib_version" in #(vi
20271                                 rel) #(vi
20272                                         case "$cf_cv_system_name" in #(vi
20273                                         darwin*)
20274                                         case .${LIB_SUFFIX} in
20275                                         .tw*)
20276                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20277                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
20278                                                 ;;
20279                                         .t*)
20280                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20281                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
20282                                                 ;;
20283                                         .w*)
20284                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20285                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20286                                                 ;;
20287                                         *)
20288                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20289                                                 ;;
20290                                         esac
20291                                         ;; #(vi
20292                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20293                                         esac
20294                                         ;;
20295                                 abi)
20296                                         case "$cf_cv_system_name" in #(vi
20297                                         darwin*)
20298                                         case .${LIB_SUFFIX} in
20299                                         .tw*)
20300                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20301                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
20302                                                 ;;
20303                                         .t*)
20304                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20305                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
20306                                                 ;;
20307                                         .w*)
20308                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20309                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20310                                                 ;;
20311                                         *)
20312                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20313                                                 ;;
20314                                         esac
20315                                         ;; #(vi
20316                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20317                                         esac
20318                                         ;;
20319                                 esac
20320                         fi
20321                         # cygwin needs import library, and has unique naming convention
20322                         # use autodetected ${cf_prefix} for import lib and static lib, but
20323                         # use 'cyg' prefix for shared lib.
20324                         if test $cf_cv_shlib_version = cygdll ; then
20325                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20326                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20327                                 continue
20328                         fi
20329                         fi
20330                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20331                 done
20332
20333                 if test $cf_dir = ncurses ; then
20334                         cf_subsets="$LIB_SUBSETS"
20335                         cf_r_parts="$cf_subsets"
20336                         cf_liblist="$LIBS_TO_MAKE"
20337
20338                         while test -n "$cf_r_parts"
20339                         do
20340                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20341                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20342                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20343                                         cf_item=
20344                                         case $cf_l_parts in #(vi
20345                                         *termlib*) #(vi
20346                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20347                                                 ;;
20348                                         *ticlib*)
20349                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20350                                                 ;;
20351                                         *)
20352                                                 break
20353                                                 ;;
20354                                         esac
20355                                         if test -n "$cf_item"; then
20356                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20357                                         fi
20358                                 else
20359                                         break
20360                                 fi
20361                         done
20362                 else
20363                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20364                 fi
20365
20366                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20367                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20368                         $cf_dir/Makefile >$cf_dir/Makefile.out
20369                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20370
20371                 $AWK -f $srcdir/mk-0th.awk \
20372                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20373                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20374
20375                 for cf_subset in $cf_subsets
20376                 do
20377                         cf_subdirs=
20378                         for cf_item in $cf_LIST_MODELS
20379                         do
20380                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20381
20382 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20383
20384         case $cf_item in #(vi
20385         libtool) #(vi
20386                 cf_suffix='.la'
20387                 cf_depsuf=$cf_suffix
20388                 ;;
20389         normal) #(vi
20390                 cf_suffix='.a'
20391                 cf_depsuf=$cf_suffix
20392                 ;;
20393         debug) #(vi
20394                 cf_suffix='_g.a'
20395                 cf_depsuf=$cf_suffix
20396                 ;;
20397         profile) #(vi
20398                 cf_suffix='_p.a'
20399                 cf_depsuf=$cf_suffix
20400                 ;;
20401         shared) #(vi
20402                 case $cf_cv_system_name in
20403                 aix[56]*) #(vi
20404                         cf_suffix='.a'
20405                         cf_depsuf=$cf_suffix
20406                         ;;
20407                 cygwin*) #(vi
20408                         cf_suffix='.dll'
20409                         cf_depsuf='.dll.a'
20410                         ;;
20411                 darwin*) #(vi
20412                         cf_suffix='.dylib'
20413                         cf_depsuf=$cf_suffix
20414                         ;;
20415                 hpux*) #(vi
20416                         case $target in
20417                         ia64*) #(vi
20418                                 cf_suffix='.so'
20419                                 cf_depsuf=$cf_suffix
20420                                 ;;
20421                         *) #(vi
20422                                 cf_suffix='.sl'
20423                                 cf_depsuf=$cf_suffix
20424                                 ;;
20425                         esac
20426                         ;;
20427                 *)      cf_suffix='.so'
20428                         cf_depsuf=$cf_suffix
20429                         ;;
20430                 esac
20431         esac
20432         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20433         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20434
20435         case $cf_item in
20436         libtool) cf_subdir='obj_lo'  ;;
20437         normal)  cf_subdir='objects' ;;
20438         debug)   cf_subdir='obj_g' ;;
20439         profile) cf_subdir='obj_p' ;;
20440         shared)
20441                 case $cf_cv_system_name in #(vi
20442                 cygwin) #(vi
20443                         cf_subdir='objects' ;;
20444                 *)
20445                         cf_subdir='obj_s' ;;
20446                 esac
20447         esac
20448
20449                         # Test for case where we build libtinfo with a different name.
20450                         cf_libname=$cf_dir
20451                         if test $cf_dir = ncurses ; then
20452                                 case $cf_subset in
20453                                 *base*)
20454                                         cf_libname=${cf_libname}$LIB_SUFFIX
20455                                         ;;
20456                                 *termlib*)
20457                                         cf_libname=$TINFO_LIB_SUFFIX
20458                                         ;;
20459                                 ticlib*)
20460                                         cf_libname=$TICS_LIB_SUFFIX
20461                                         ;;
20462                                 esac
20463                         else
20464                                 cf_libname=${cf_libname}$LIB_SUFFIX
20465                         fi
20466                         if test -n "${DFT_ARG_SUFFIX}" ; then
20467                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20468                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20469                         fi
20470
20471                         # These dependencies really are for development, not
20472                         # builds, but they are useful in porting, too.
20473                         cf_depend="../include/ncurses_cfg.h"
20474                         if test "$srcdir" = "."; then
20475                                 cf_reldir="."
20476                         else
20477                                 cf_reldir="\${srcdir}"
20478                         fi
20479
20480                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20481                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20482                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20483                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20484                         fi
20485
20486                         cf_dir_suffix=
20487                         old_cf_suffix="$cf_suffix"
20488                         if test "$cf_cv_shlib_version_infix" = yes ; then
20489                         if test -n "$LIB_SUFFIX" ; then
20490                                 case $LIB_SUFFIX in
20491                                 tw*)
20492                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
20493                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20494                                         cf_dir_suffix=tw
20495                                         ;;
20496                                 t*)
20497                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
20498                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20499                                         cf_dir_suffix=t
20500                                         ;;
20501                                 w*)
20502                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20503                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20504                                         cf_dir_suffix=w
20505                                         ;;
20506                                 esac
20507                         fi
20508                         fi
20509
20510                         $AWK -f $srcdir/mk-1st.awk \
20511                                 name=${cf_libname}${cf_dir_suffix} \
20512                                 traces=$LIB_TRACING \
20513                                 MODEL=$cf_ITEM \
20514                                 model=$cf_subdir \
20515                                 prefix=$cf_prefix \
20516                                 suffix=$cf_suffix \
20517                                 subset=$cf_subset \
20518                                 SymLink="$LN_S" \
20519                                 TermlibRoot=$TINFO_NAME \
20520                                 TermlibSuffix=$TINFO_SUFFIX \
20521                                 ShlibVer=$cf_cv_shlib_version \
20522                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20523                                 ReLink=${cf_cv_do_relink:-no} \
20524                                 DoLinks=$cf_cv_do_symlinks \
20525                                 rmSoLocs=$cf_cv_rm_so_locs \
20526                                 ldconfig="$LDCONFIG" \
20527                                 overwrite=$WITH_OVERWRITE \
20528                                 depend="$cf_depend" \
20529                                 host="$host" \
20530                                 libtool_version="$LIBTOOL_VERSION" \
20531                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20532
20533                         cf_suffix="$old_cf_suffix"
20534
20535                         for cf_subdir2 in $cf_subdirs lib
20536                         do
20537                                 test $cf_subdir = $cf_subdir2 && break
20538                         done
20539                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20540                         $AWK -f $srcdir/mk-2nd.awk \
20541                                 name=$cf_dir \
20542                                 traces=$LIB_TRACING \
20543                                 MODEL=$cf_ITEM \
20544                                 model=$cf_subdir \
20545                                 subset=$cf_subset \
20546                                 srcdir=$srcdir \
20547                                 echo=$WITH_ECHO \
20548                                 crenames=$cf_cv_prog_CC_c_o \
20549                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20550                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20551                         cf_subdirs="$cf_subdirs $cf_subdir"
20552                         done
20553                 done
20554         fi
20555
20556         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20557 done
20558
20559 for cf_dir in $SRC_SUBDIRS
20560 do
20561         if test ! -d $srcdir/$cf_dir ; then
20562                 continue
20563         fi
20564
20565         if test -f $cf_dir/Makefile ; then
20566                 case "$cf_dir" in
20567                 Ada95) #(vi
20568                         echo 'libs \' >> Makefile
20569                         echo 'install.libs \' >> Makefile
20570                         echo 'uninstall.libs ::' >> Makefile
20571                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20572                         ;;
20573                 esac
20574         fi
20575
20576         if test -f $srcdir/$cf_dir/modules; then
20577                 echo >> Makefile
20578                 if test -f $srcdir/$cf_dir/headers; then
20579 cat >> Makefile <<CF_EOF
20580 install.includes \\
20581 uninstall.includes \\
20582 CF_EOF
20583                 fi
20584 if test "$cf_dir" != "c++" ; then
20585 echo 'lint \' >> Makefile
20586 fi
20587 cat >> Makefile <<CF_EOF
20588 libs \\
20589 lintlib \\
20590 install.libs \\
20591 uninstall.libs \\
20592 install.$cf_dir \\
20593 uninstall.$cf_dir ::
20594         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20595 CF_EOF
20596         elif test -f $srcdir/$cf_dir/headers; then
20597 cat >> Makefile <<CF_EOF
20598
20599 libs \\
20600 install.libs \\
20601 uninstall.libs \\
20602 install.includes \\
20603 uninstall.includes ::
20604         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20605 CF_EOF
20606 fi
20607 done
20608
20609 cat >> Makefile <<CF_EOF
20610
20611 install.libs uninstall.libs \\
20612 install.data uninstall.data ::
20613 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20614 CF_EOF
20615
20616 if test "x$cf_with_manpages" = xyes; then
20617 cat >> Makefile <<CF_EOF
20618
20619 install.man \\
20620 uninstall.man ::
20621         cd man && \${MAKE} \${CF_MFLAGS} \$@
20622 CF_EOF
20623 fi
20624
20625 cat >> Makefile <<CF_EOF
20626
20627 distclean ::
20628         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20629         rm -f headers.sh headers.sed mk_shared_lib.sh
20630         rm -f edit_man.* man_alias.*
20631         rm -rf \${DIRS_TO_MAKE}
20632 CF_EOF
20633
20634 # Special case: tack's manpage lives in its own directory.
20635 if test "x$cf_with_manpages" = xyes; then
20636 if test -d tack ; then
20637 if test -f $srcdir/$tack.h; then
20638 cat >> Makefile <<CF_EOF
20639
20640 install.man \\
20641 uninstall.man ::
20642         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20643 CF_EOF
20644 fi
20645 fi
20646 fi
20647
20648 rm -f headers.sed headers.sh
20649
20650 echo creating headers.sh
20651 cat >headers.sh <<CF_EOF
20652 #! /bin/sh
20653 # This shell script is generated by the 'configure' script.  It is invoked in a
20654 # subdirectory of the build tree.  It generates a sed-script in the parent
20655 # directory that is used to adjust includes for header files that reside in a
20656 # subdirectory of /usr/include, etc.
20657 PRG=""
20658 while test \$# != 3
20659 do
20660 PRG="\$PRG \$1"; shift
20661 done
20662 DST=\$1
20663 REF=\$2
20664 SRC=\$3
20665 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
20666 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
20667 echo installing \$SRC in \$DST
20668 CF_EOF
20669
20670 if test $WITH_CURSES_H = yes; then
20671         cat >>headers.sh <<CF_EOF
20672 case \$DST in
20673 /*/include/*)
20674         END=\`basename \$DST\`
20675         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20676         do
20677                 NAME=\`basename \$i\`
20678                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20679         done
20680         ;;
20681 *)
20682         echo "" >> \$TMPSED
20683         ;;
20684 esac
20685 CF_EOF
20686
20687 else
20688         cat >>headers.sh <<CF_EOF
20689 case \$DST in
20690 /*/include/*)
20691         END=\`basename \$DST\`
20692         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20693         do
20694                 NAME=\`basename \$i\`
20695                 if test "\$NAME" = "curses.h"
20696                 then
20697                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20698                         NAME=ncurses.h
20699                 fi
20700                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20701         done
20702         ;;
20703 *)
20704         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20705         ;;
20706 esac
20707 CF_EOF
20708 fi
20709 cat >>headers.sh <<CF_EOF
20710 rm -f \$TMPSRC
20711 sed -f \$TMPSED \$SRC > \$TMPSRC
20712 NAME=\`basename \$SRC\`
20713 CF_EOF
20714 if test $WITH_CURSES_H != yes; then
20715         cat >>headers.sh <<CF_EOF
20716 test "\$NAME" = "curses.h" && NAME=ncurses.h
20717 CF_EOF
20718 fi
20719 cat >>headers.sh <<CF_EOF
20720 # Just in case someone gzip'd manpages, remove the conflicting copy.
20721 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20722
20723 eval \$PRG \$TMPSRC \$DST/\$NAME
20724 rm -f \$TMPSRC \$TMPSED
20725 CF_EOF
20726
20727 chmod 0755 headers.sh
20728
20729 for cf_dir in $SRC_SUBDIRS
20730 do
20731         if test ! -d $srcdir/$cf_dir ; then
20732                 continue
20733         fi
20734
20735         if test -f $srcdir/$cf_dir/headers; then
20736                 $AWK -f $srcdir/mk-hdr.awk \
20737                         subset="$LIB_SUBSETS" \
20738                         compat="$WITH_CURSES_H" \
20739                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20740         fi
20741
20742         if test -f $srcdir/$cf_dir/modules; then
20743                 if test "$cf_dir" != "c++" ; then
20744                         cat >>$cf_dir/Makefile <<"CF_EOF"
20745 depend : ${AUTO_SRC}
20746         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20747
20748 # DO NOT DELETE THIS LINE -- make depend depends on it.
20749 CF_EOF
20750                 fi
20751         fi
20752 done
20753
20754 if test "x$cf_with_ada" != xno ; then
20755 if test -z "$USE_OLD_MAKERULES" ; then
20756         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
20757 fi
20758 fi
20759  ;;
20760   esac
20761 done
20762 EOF
20763
20764 cat >>$CONFIG_STATUS <<\EOF
20765
20766 { (exit 0); exit 0; }
20767 EOF
20768 chmod +x $CONFIG_STATUS
20769 ac_clean_files=$ac_clean_files_save
20770
20771 # configure is writing to config.log, and then calls config.status.
20772 # config.status does its own redirection, appending to config.log.
20773 # Unfortunately, on DOS this fails, as config.log is still kept open
20774 # by configure, so config.status won't be able to write to it; its
20775 # output is simply discarded.  So we exec the FD to /dev/null,
20776 # effectively closing config.log, so it can be properly (re)opened and
20777 # appended to by config.status.  When coming back to configure, we
20778 # need to make the FD available again.
20779 if test "$no_create" != yes; then
20780   ac_cs_success=:
20781   exec 5>/dev/null
20782   $SHELL $CONFIG_STATUS || ac_cs_success=false
20783   exec 5>>config.log
20784   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20785   # would make configure fail if this is the last instruction.
20786   $ac_cs_success || { (exit 1); exit 1; }
20787 fi
20788 ${MAKE:-make} preinstall